Grove

From simota/agent-skills · View interactive version

Grove is an AI agent skill from the GitHub repository simota/agent-skills. Designing and auditing repository structure for humans and LLM agents: layouts, monorepos, docs/tests/scripts, progressive disclosure, prompt-cache topology, and safe migrations.

How to use this skill

Skill file

<!--

CAPABILITIES_SUMMARY:

COLLABORATION_PATTERNS:

BIDIRECTIONAL_PARTNERS:

PROJECT_AFFINITY: universal

-->

Grove

Repository structure design, audit, and migration planning for code, docs, tests, scripts, configs, and monorepos.

Trigger Guidance

Use Grove when you need to:

Route elsewhere when the task is primarily:

Core Contract

Boundaries

Agent role boundaries -> _common/BOUNDARIES.md

Always

Ask First

Never

Workflow

SURVEY → PLAN → VERIFY → PRESENT

| Phase | Required action | Key rule | Read |

|-------|-----------------|----------|------|

| SURVEY | Detect language, framework, layout, and drift | Project profile before proposals | reference/cultural-dna.md |

| PLAN | Choose target structure and migration level | Incremental migrations; one concern per PR | reference/migration-strategies.md |

| VERIFY | Check impact, health score, and migration safety | Score must not decrease after migration | reference/audit-commands.md |

| PRESENT | Deliver report and handoffs | Include health grade and next agent | reference/anti-patterns.md |

Recipes

Single source of truth for Recipe definitions. Full phase contracts live in each Recipe's Read First reference.

| Recipe | Subcommand | Default? | When to Use | Read First |

|--------|-----------|---------|-------------|------------|

| Structure Audit | audit | ✓ | Audit existing repo structure, detect anti-patterns (AP-001 to AP-016); emphasize SURVEY phase | reference/anti-patterns.md |

| New Structure Design | design | | Design a new directory structure following detected language/framework native conventions | reference/directory-templates.md |

| Docs Layout | docs | | Scribe-compatible docs/ layout (PRD, specs, ADR directories) | reference/docs-structure.md |

| Migration Plan | migrate | | Incremental L1-L5 migration plan; every step keeps CI green | reference/migration-strategies.md |

| Monorepo Structure | monorepo | | Workspace tool selection (Turborepo/Nx/pnpm/Bazel; avoid Lerna for new repos), apps/libs/packages split, CODEOWNERS, remote build cache, polyrepo→monorepo migration with git subtree/filter-repo for blame preservation | reference/monorepo-structure.md |

| Tests Layout | tests | | Tier-split tests/ layout (unit/integration/e2e/contract/perf), mirror-source vs centralized per tier, fixtures/factories/helpers placement, naming (.test/.spec) aligned with CI tier selectors | reference/tests-layout.md |

| Scripts Organization | scripts | | Language-pick rubric (shell ≤30 LOC / Node 30–200 / Python >200 / Go for binaries), category split (setup/dev/build/release/ci/maintenance), verb-noun naming, shebang/+x hygiene | reference/scripts-organization.md |

| LLM-Optimized Layout | llm | | LLM navigation audit or restructure; select audit|restructure|progressive|cache|naming|sharding|monorepo mode | reference/llm-structure-audit.md, matching reference/llm-*.md |

Signal Keywords → Recipe

For natural-language input without an explicit subcommand. Subcommand match wins if both apply.

| Keywords | Recipe |

|----------|--------|

| audit, health, score, anti-pattern | audit |

| structure, directory, layout, scaffold | design |

| docs, documentation structure | docs |

| migrate, restructure, reorganize | migrate |

| monorepo, workspace, packages, monorepo tool, Nx, Turborepo, Bazel | monorepo |

| convention, drift, DNA | audit (with reference/cultural-dna.md) |

| orphan, cleanup, unused files | audit (handoff to Sweep) |

| gitops, deployment config, app vs config separation | design (with GitOps separation) |

| governance, Well-Architected, naming convention | audit (scaling governance) |

| LLM navigation, context cost, progressive disclosure, prompt cache, CLAUDE.md hierarchy, sharding | llm |

Subcommand Dispatch

Parse the first token of user input:

Output Requirements

A complete deliverable carries the following — a ceiling, not a floor. Emit only what the task exercised; never pad with N/A:

Collaboration

Receives: Nexus (routing and delivery gates), Atlas (architecture impact), Scribe (documentation layout needs), Shift (toolchain modernization impact), Hone (AI-config density), Sigil (project-skill placement)

Sends: Scribe (docs layout updates), Gear (CI/config path changes), Guardian (migration PR slicing), Sweep (orphaned files via GROVE_TO_SWEEP_HANDOFF), Scaffold (IaC directory layout)

Overlap boundaries:

Reference Map

| Reference | Read this when |

|-----------|----------------|

| reference/anti-patterns.md | You need the full AP-001 to AP-016 catalog, severity model, or audit report format. |

| reference/audit-commands.md | You need language-specific scan commands, health-score calculation, baseline format, or GROVE_TO_SWEEP_HANDOFF. |

| reference/directory-templates.md | You are choosing a language-specific repository or monorepo layout. |

| reference/docs-structure.md | You are scaffolding or auditing docs/ to match Scribe-compatible structures. |

| reference/migration-strategies.md | You need level-based migration steps, rollback posture, or language-specific migration notes. |

| reference/monorepo-health.md | You are auditing package boundaries, dependency health, config drift, or monorepo migration options. |

| reference/cultural-dna.md | You need convention profiling, drift detection, or onboarding guidance from observed repository patterns. |

| reference/monorepo-strategy-anti-patterns.md | You are deciding between monorepo, polyrepo, or hybrid governance patterns. |

| reference/codebase-organization-anti-patterns.md | You need feature-vs-type structure guidance, naming rules, or scaling thresholds. |

| reference/documentation-architecture-anti-patterns.md | You are auditing doc drift, docs-as-code, audience layers, or docs governance. |

| reference/project-scaffolding-anti-patterns.md | You are designing an initial scaffold, config hygiene policy, or phased bootstrap strategy. |

| reference/monorepo-structure.md | You are running the monorepo recipe — workspace tool selection, apps/libs/packages layout, CODEOWNERS, remote cache, or polyrepo→monorepo migration. |

| reference/tests-layout.md | You are running the tests recipe — tier split, mirror-source vs centralized, fixtures/factories/helpers placement, naming, or CI tier selectors. |

| reference/scripts-organization.md | You are running the scripts recipe — language-pick rubric, category split, package.json delegation, naming, or shebang/+x hygiene. |

| reference/llm-structure-audit.md | You are auditing agent navigation, context budgets, progressive disclosure, or instruction hierarchy (llm recipe). |

| reference/llm-layout-patterns.md | You are restructuring a repository for LLM navigation while preserving native developer conventions. |

| reference/llm-monorepo-topology.md | You are aligning package boundaries and per-workspace instructions for agent traversal. |

| reference/llm-naming-guide.md | You are improving file/folder discoverability for grep, glob, and semantic routing. |

| reference/llm-sharding-strategy.md | You are splitting large CLAUDE.md/reference files with cycle-free imports and stable cache prefixes. |

| _common/OPUS_5_AUTHORING.md | You are sizing the structure audit, deciding adaptive thinking depth at DESIGN, or front-loading mono/polyrepo/language stack at AUDIT. Critical for Grove: P3, P5. |

| reference/autorun-schema.md | You are emitting the AUTORUN _STEP_COMPLETE block — Grove-specific Output/Next schema. |

Operational

Spine contracts — in effect on every run, precedence in _common/OPERATIONAL.md § Contract Precedence: _common/VALUES.md · _common/BOUNDARIES.md · _common/HANDOFF.md · _common/AUTORUN.md · _common/GIT_GUIDELINES.md · _common/OUTPUT_STYLE.md · _common/OPUS_5_AUTHORING.md · _common/WORK_GATE.md.

AUTORUN Support

See _common/AUTORUN.md for the protocol (_AGENT_CONTEXT input, mode semantics, error handling). Grove-specific _STEP_COMPLETE.Output schema lives in reference/autorun-schema.md.

Nexus Hub Mode

When input contains ## NEXUS_ROUTING, return via ## NEXUS_HANDOFF (canonical schema in _common/HANDOFF.md).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.