Generates AGENTS.md file using the WHAT/WHY/HOW framework. Explores the codebase and produces a minimal (<100 line) context file with progressive disclosure.
This skill is CLI-agnostic. It works with Claude Code, Codex, Amp, or any AI coding assistant.
Generate a minimal, high-impact AGENTS.md context file for this repository using the WHAT/WHY/HOW framework. See reference/AGENTS.md for the template, rules, and progressive disclosure specs.
Validate the result of every operation. If any step fails, halt and report the failure before continuing.
$ARGUMENTS
--reset: Regenerate everything from scratch -- overwrite AGENTS.md and all context files created by this skill, then re-run the full exploration.If contains :
$ARGUMENTS--reset.maestro/context/ files were created by this skill (not by maestro:setup). The skill-created files use snake_case names like building_the_project.md, running_tests.md, code_conventions.md, service_architecture.md, database_schema.md, etc. The maestro:setup files use kebab-case: product.md, tech-stack.md, guidelines.md, product-guidelines.md, workflow.md, index.md.maestro:setup files)../AGENTS.md if it exists.Read-only exploration. Do NOT ask the user for permission to explore -- just do it.
Search for .maestro/context/product.md.
If it exists, maestro:setup has been run. Read these files for pre-fill data:
.maestro/context/product.md -- purpose, users, features.maestro/context/tech-stack.md -- languages, frameworks, tools.maestro/context/guidelines.md -- coding conventions.maestro/context/workflow.md -- build/test methodologyStore findings as pre-fill. Do NOT ask questions the context already answers.
Regardless of whether maestro context exists, explore the codebase to discover or verify:
README.md, package.json / pyproject.toml / Cargo.toml / go.mod / build.gradle / pom.xml / Gemfile / composer.json (whichever exists).Makefile, justfile, Taskfile.yml, CI config (.github/workflows/*.yml, .gitlab-ci.yml), docker-compose.yml.CLAUDE.md if it exists -- extract any rules worth preserving../AGENTS.md if it exists -- note what it covers before overwriting..eslintrc*, prettier*, biome.json, ruff.toml, .rubocop.yml, clippy.toml, .editorconfig. Note what they enforce (used by template rules to avoid duplication).packages/, apps/, crates/, services/), database configs, API patterns.The agent decides what to read based on what it finds. This is exploration, not a rigid checklist -- adapt to the project.
Organize discoveries into these categories (internal notes, not output):
Use the template and rules from reference/AGENTS.md. The output file MUST be under 100 lines.
Use the progressive disclosure guidance from reference/AGENTS.md to create well-named files in .maestro/context/.
Create .maestro/context/ if it does not exist:
mkdir -p .maestro/context
Write ./AGENTS.md (overwrite if exists).
Write each progressive disclosure file to .maestro/context/.
Display summary:
AGENTS.md generated.
- ./AGENTS.md ({line_count} lines)
- .maestro/context/building_the_project.md
- .maestro/context/running_tests.md
{additional files as created}
Next steps:
- Review ./AGENTS.md and edit manually for accuracy
- /maestro:AGENTS.md --reset -- regenerate from scratch
Recommended workflow:
/maestro:setup -- Scaffold project context (run first)/maestro:AGENTS.md -- You are here. Generate AGENTS.md context file/maestro:new-track -- Create a feature/bug track with spec and plan/maestro:implement -- Execute the implementation/maestro:review -- Verify implementation correctness/maestro:status -- Check progress across all tracksAGENTS.md is an optional context enhancement that complements /maestro:setup. While setup creates project-level context files, this skill generates a codebase-oriented AGENTS.md with progressive disclosure. Run it after setup to give all agents richer context about the repository structure.