Generating project docs
Skill marcusrbrown/systematic/.agents/skills/generating-project-docs
Use when creating, refreshing, or updating project-level documentation — README.md, ARCHITECTURE.md, STRUCTURE.md, or scoped section updatesFrom its SKILL.md
npx -y skills add marcusrbrown/systematic --skill generating-project-docsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
9.5 KB, as published. Nobody here has run it
Generating Project Documentation
Overview
This plugin's documentation describes a live system whose surface (skills, agents, config schema, CLI) keeps changing. Generated docs go stale fast.
Core principle: Derive every fact from the live repository. Preserve the existing document's evolved structure. Never regress to a generic template.
If you cannot point at a file or command that justifies a sentence, do not write it.
When to Use
- Refreshing
README.mdafter new skills, agents, or features land - Fixing documentation drift (counts, structure, CLI output, runtime claims)
- Updating
ARCHITECTURE.mdorSTRUCTURE.mdwhen the codebase layout changes - Adding or refreshing a scoped section (e.g. only the "Quick Install" block)
When NOT to Use
- Writing planning docs (
docs/plans/,docs/brainstorms/) — those follow their own templates - Authoring skill or agent files — those have their own format rules
Arguments
$ARGUMENTS
- Empty or
readme— UpdateREADME.md(default) architecture— UpdateARCHITECTURE.mdstructure— UpdateSTRUCTURE.mdall— Update all three docs<section-name>— Update only that named section within the target doc (e.g.skills,agents,cli)
For scoped updates: read the current document, locate the section by heading, replace only that section's content. Preserve surrounding structure exactly.
Pre-Generation Inventory
Before writing anything, gather these from the live repo:
| Source | What to extract |
|---|---|
package.json | name, version, description, scripts, repository URL |
bun src/cli.ts list skills 2>/dev/null | exact skill count and names |
bun src/cli.ts list agents 2>/dev/null | exact agent count, names, categories |
bun src/cli.ts list commands 2>/dev/null | command inventory |
find skills -name SKILL.md -exec head -6 {} \; -exec echo --- \; | skill frontmatter (name, description) |
find agents -maxdepth 2 -name '*.md' -exec head -4 {} \; -exec echo --- \; | agent frontmatter (name, description), category from path |
| Current target doc | existing structure, badges, nav links, voice |
git log --oneline -15 | recent change context |
Use find ... -exec or while IFS= read -r for shell loops over file lists. Unquoted for f in $VAR in zsh does not word-split a multiline variable and will iterate once on the joined string.
Counts MUST come from live CLI output or ls/find. Never carry over from the previous draft.
Style Rules (Non-Negotiable)
These rules match this repo's evolved style. Match them exactly.
- Header block:
<picture>with<source>tags for dark/light mode, not bare<img> - Badges:
style=flat-square,labelColor=1a1a2e, project color scheme:- Build:
color=4FD1C5 - npm:
color=E91E8C - Docs:
color=4FD1C5 - License:
color=F5A623
- Build:
- Navigation: bold links separated by
·(middle dot) - Tables in README: avoid them. The README is reference-light; tables of skills, agents, or commands belong on the docs site. If a table feels necessary, write prose instead and link to the docs page.
- Tables in
STRUCTURE.md: allowed for Key File Locations only. Headers| File | Role |. Reference.mdfiles and source paths with backticks. - Counts: every count in prose or bullets must come from live CLI output — never hardcoded
- Code blocks: language-tagged —
bashfor shell,jsonfor config,markdownfor skill examples,mermaidfor diagrams - Voice: terse, declarative, fact-first. No marketing language. No "robust", "powerful", "leverages", "best-in-class"
- No session/process leakage: never reference subagent names, plan paths, skill names, or session framing in public docs. Public docs describe the system, not how it was built.
- Paths: backticks for every file, directory, command, env var
Section Order
Read the target doc first and preserve its evolved section structure. The section lists below are the current shape; check the live file to confirm before generating. New top-level sections need explicit approval.
README.md
The README is intentionally lean — most reference material lives on the docs site, not in this file.
- Header block (centered div with
<picture>, badges, nav links) - Problem statement (1–2 paragraphs, no heading — flows directly from the header)
## Why Systematic?— short pitch, prose not bullets## What You Get— prose enumeration of skills/agents/commands at a high level (no tables; links to docs site for details)## Quick Install—opencode.jsonsnippet and one verification command## First Workflow— canonical brainstorm → plan → work → review sequence## First-Run Checklist— short numbered list## Learn More— deep links to docs site, ARCHITECTURE.md, STRUCTURE.md## License
Do NOT add: skill tables, agent category tables, CLI reference tables, Mermaid diagrams, "How It Works" hook walkthroughs, Development sections, "Converting from..." migration guides. These belong on the docs site. The README's job is to get a new reader from zero context to running a first workflow.
ARCHITECTURE.md
Following matklad's "Bird's Eye" pattern. Audience: contributors who need to understand how the plugin works at a system level.
# Architecture— H1 title + 1–2 sentence orientation that points atSTRUCTURE.mdandAGENTS.md## Bird's Eye Overview— two-paragraph summary of plugin shape and the hooks the plugin registers. Enumerate the hooks from the object returned insrc/index.ts; never carry a count forward from the existing document.## Codemap— pipeline diagram + symbol table mapping roles to file paths## Invariants— numbered list of invariants CI enforces## Data Flow— ASCII tree from plugin load through hooks## Cross-Cutting Concerns— the gates and invariant-enforcing systems that span modules. Derive the current set fromscripts/and the CI workflow rather than reproducing the list in the existing document.
STRUCTURE.md
Audience: contributors who need to know where things live and where to put new code.
# Structure— H1 title + cross-references toARCHITECTURE.mdandAGENTS.md## Directory Layout— ASCII tree of the top-level directories with inline comments## Directory Purposes— H3 subsection per top-level directory (src/,skills/,agents/,docs/,registry/,scripts/,tests/,.opencode/)## Key File Locations— categorized tables: Entry Points, Configuration, Core Logic, Build / CI Scripts, Tests## Naming Conventions— bullets covering files, tests, skills, agents, functions, types, constants## Where to Add New Code— prescriptive checklist (new skill, new agent, new config field, new core module, new test, new docs page, new build script, new project-only command)
Generation Flow
- Inventory — run every command in "Pre-Generation Inventory". Count things; don't estimate.
- Diff against current doc — for each section, identify what changed (new assets, removed assets, count drift, renamed items).
- Write minimal diff — update only what changed. Keep voice, structure, and untouched sections exactly as they are.
- Verify — run the quality checks below. Re-read the doc end-to-end before saving.
Quality Checks
Security (always):
- No API keys, tokens, credentials, or secrets
- No internal URLs, IPs, or local paths (e.g.
/Users/...) - All example data is generic and redacted
Accuracy (always):
- Any skill/agent/command counts in prose match live CLI output exactly
- Any agent or skill names cited resolve to a real file on disk
- Badge URLs are valid and use correct style
- Cross-references between
README.md,ARCHITECTURE.md, andSTRUCTURE.mdresolve (no dangling links)
Style (always):
- Headings monotonically increase (H1 → H2 → H3, no skipping)
- All code blocks have language tags
- All file references use backticks
Common Mistakes
| Mistake | Fix |
|---|---|
| Carrying over counts from previous draft | Re-derive every count from live CLI output |
| Adding "Robust", "Powerful", "Enterprise-grade" language | Delete it. State the fact instead. |
Using bare <img> instead of <picture> with <source> tags | Match the existing header block exactly |
| Wrong badge color or style | Check style rules above: flat-square + labelColor=1a1a2e |
| Replacing the evolved structure with a generic template | Read the current doc first; preserve sections you aren't updating |
| Inventing new top-level sections | Get explicit approval before adding a new H2 |
| Leaking session/plan/skill/subagent names into docs | Public docs describe the system, not how it was built |
| Hardcoding counts | Always derive from bun src/cli.ts list output |
Quick Reference
# Inventory (run before writing)
bun src/cli.ts list skills 2>/dev/null # skill count + names
bun src/cli.ts list agents 2>/dev/null # agent count + categories
bun src/cli.ts list commands 2>/dev/null # command inventory
git log --oneline -15 # recent change context
# Verification (run after writing)
git diff README.md # review own diff