autodoc-orchestrator
Skill0 starsChanged 5 months agoMITView on GitHub
Autonomous reverse-engineering documentation pipeline — scans an existing codebase and produces comprehensive developer documentation without user involvement after initial setup. Use when: "autodoc", "generate docs for my project", "document this codebase", "reverse engineer documentation", "create project documentation from code", "сгенерируй документацию проекта", "задокументируй кодовую базу", "автодок", "autodoc". Trigger on: user provides a repo path, asks to document existing code, wants onboarding docs, API reference, or architecture overview generated automatically. NOT for: writing new PRDs or planning new features (use gproject-orchestrator).
In this repository76 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- autodoc-analystSkill
- autodoc-architectSkill
- autodoc-assemblerSkill
- autodoc-scannerSkill
- autodoc-writerSkill
- brainstormSkill
- brd-creatorSkill
- caveman-modeSkill
- changelogSkill
- claude-md-managementSkill
- code-ai-reviewSkill
- code-boss-reviewSkill
- code-mobx-store-reviewSkill
- code-reviewSkill
- code-style-reviewSkill
- code-verifierSkill
- commitSkill
- constraint-driven-developmentSkill
- context-collectorSkill
- db-migrateSkill
- dependency-updateSkill
- deploySkill
- doubt-driven-developmentSkill
- feature-analyzerSkill
- feature-devSkill
- fsd-creatorSkill
- gproject-consistency-checkerSkill
- gproject-discoverySkill
- gproject-orchestratorSkill
- gproject-patterns-researcherSkill
- gproject-plannerSkill
- gproject-problem-definerSkill
- gproject-spec-writerSkill
- gproject-stack-advisorSkill
- hookifySkill
- iagoSkill
- interviewerSkill
- interviewSkill
- issue-analyzerSkill
- job-documenterSkill
- job-orchestratorSkill
- perf-checkSkill
- plan-gatekeeperSkill
- prd-creatorSkill
- pr-issue-documenterSkill
- pr-review-commentsSkill
- prSkill
- pushSkill
- review-architectureSkill
- review-backendSkill
- review-clean-codeSkill
- review-core-boundariesSkill
- review-flow-graphSkill
- review-frontend-conventionsSkill
- review-frontendSkill
- review-greptileSkill
- review-highloadSkill
- review-logicSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 62
Create subdirectories: artifacts/, artifacts/analysis/, docs/, ai/
- Distinctive: line 82
Ask ONLY what is missing. Maximum 4 questions, always with options:
- Distinctive: line 111
Every subagent dispatch follows this contract:
- Very specific: line 171
After completion, parse next_phase_hints.modules[] from the scanner's response.
- Distinctive: line 191
Wait for ALL to complete before Phase 3.
- Distinctive: line 234
Check for interrupted jobs on start:
- Distinctive: line 271
After Phase 5, present to user:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- SUBAGENT-STOP: If you are a subagent dispatched by another orchestrator, HALT.
Return STATUS: BLOCKED — autodoc-orchestrator must run as top-level agent only. -->autodoc-orchestrator
Purpose
Thin orchestrator that drives a 5-phase autonomous documentation pipeline. Takes an existing codebase as input, dispatches specialized subagents to scan, analyze, and write documentation, and produces a complete documentation package with no human gates.
Iron Laws
| # | Law |
| 1 | Orchestrator NEVER reads or summarizes code itself — only subagents do |
| 2 | Orchestrator NEVER writes documentation content — only subagents do |
| 3 | Every phase MUST produce artifact files before proceeding |
| 4 | Phase 2 analysts run in PARALLEL — one per detected module/domain |
| 5 | Phase 4 writers run in PARALLEL — one per documentation section |
| 6 | Subagents receive ONLY artifacts listed in their dispatch contract |
| 7 | If a subagent returns NEEDS_CONTEXT, resolve autonomously before re-dispatching |
Pipeline Overview
Phase 0 Interview (if needed) → collect project path + focus areas
Phase 1 autodoc-scanner → artifacts/project-map.md
Phase 2 autodoc-analyst × N → artifacts/analysis/<module>.md [parallel]
Phase 3 autodoc-architect → artifacts/architecture.md
Phase 4 autodoc-writer × N → docs/<section>.md [parallel]
Phase 5 autodoc-assembler → docs/README.md + docs/index.mdPhase 0: Initialization
Job Directory Setup
- Create
jobs/autodoc-<slugified-project-name>/ - Create subdirectories:
artifacts/,artifacts/analysis/,docs/,ai/ - Initialize
state.json
Input Assessment
Evaluate what the user provided:
SUFFICIENT — proceed directly to Phase 1 if ALL of:
✓ Project directory path (absolute) is provided
✓ Path exists and contains code files
NEEDS_INPUT — ask questions if ANY of:
✗ No project path given
✗ Multiple repos mentioned without clear scope
✗ User specified unusual focus (e.g., "only the auth module")Interview (only when NEEDS_INPUT)
Ask ONLY what is missing. Maximum 4 questions, always with options:
I need a few details to get started:
1. Project path?
○ Type the absolute path to the project root
2. Which parts to document? (default: everything)
A) Full project — backend + frontend + shared
B) Backend only
C) Frontend only
D) Specific path — [type it]
3. Output language?
A) English (default)
B) Russian
C) Both
4. Existing docs to incorporate? (default: none)
○ Path to existing docs/README, or skipSave answers to state.json.config.
Dispatch Protocol
Every subagent dispatch follows this contract:
Agent({
description: "<phase>: <task>",
prompt: |
## Your Role
You are <agent_role>. Load skill: skills/<skill-name>/SKILL.md
## Task
<specific task>
## Input Artifacts
<list of file paths to read>
## Job Context
JOB_DIR: <absolute path to job directory>
PROJECT_DIR: <absolute path to project>
CONFIG: <from state.json.config>
## Output Contract
1. Write artifact to: <output path>
2. Return ONLY (apply rules/core/terse-subagent-response.mdc):
STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT
summary: (≤5 bullet fragments — no prose)
concerns: (if DONE_WITH_CONCERNS)
questions: (if NEEDS_CONTEXT — with A/B/C/D options)
next_phase_hints: (key findings for orchestrator routing)
})Status Handling
STATUS: DONE
→ Save summary to state.json.phase_summaries
→ Proceed to next phase
STATUS: DONE_WITH_CONCERNS
→ Log concerns in state.json
→ Proceed (documentation pipeline continues; concerns noted in final report)
STATUS: NEEDS_CONTEXT
→ IF resolvable autonomously (file exists, can be read):
→ Dispatch context-collector or read file directly
→ Re-dispatch subagent with answer
→ IF requires user input:
→ Ask user with A/B/C/D options
→ Re-dispatch with answer
→ Max 2 resolution rounds per phasePhase 1: Project Scanning
Subagent: autodoc-scanner
Input: PROJECT_DIR, CONFIG
Output: artifacts/project-map.md
After completion, parse next_phase_hints.modules[] from the scanner's response.
This list drives how many parallel analysts to launch in Phase 2.
Phase 2: Deep Analysis (Parallel)
Subagent: autodoc-analyst — one instance per module from project-map
Input: artifacts/project-map.md + module path
Output: artifacts/analysis/<module-slug>.md
Launch ALL analysts simultaneously:
Agent × N in parallel, one per module:
module: frontend → artifacts/analysis/frontend.md
module: backend → artifacts/analysis/backend.md
module: shared → artifacts/analysis/shared.md
...Wait for ALL to complete before Phase 3.
Phase 3: Architecture Synthesis
Subagent: autodoc-architect
Input: artifacts/project-map.md + ALL artifacts/analysis/*.md
Output: artifacts/architecture.md
Phase 4: Documentation Writing (Parallel)
Subagent: autodoc-writer — one instance per documentation section
Determine sections from Phase 3 output and CONFIG. Standard sections:
| Section | Output file | Always? |
| Onboarding | docs/onboarding.md | Yes |
| Architecture overview | docs/architecture.md | Yes |
| Module reference | docs/modules.md | Yes |
| API reference | docs/api-reference.md | Only if APIs detected |
| Data models | docs/data-models.md | Only if schemas detected |
Launch ALL writers simultaneously. Wait for ALL to complete.
Phase 5: Assembly
Subagent: autodoc-assembler
Input: ALL docs/*.md + artifacts/architecture.md + artifacts/project-map.md
Output: docs/README.md + docs/index.md
The assembler creates the main entry-point document with links to all sections, a brief project overview, and a quick-start section.
State Resumption
Check for interrupted jobs on start:
IF jobs/autodoc-*/state.json exists AND status == "in_progress":
→ Show: "Found interrupted autodoc job: <name> at Phase <N>"
→ Ask: A) Resume B) Start fresh C) Show stateOutput Structure
jobs/autodoc-<project>/
├── state.json # Pipeline state
├── artifacts/
│ ├── project-map.md # Phase 1
│ └── analysis/ # Phase 2
│ ├── frontend.md
│ ├── backend.md
│ └── <module>.md
├── docs/ # Final documentation
│ ├── README.md # Main entry point (Phase 5)
│ ├── index.md # Navigation index (Phase 5)
│ ├── onboarding.md # Phase 4
│ ├── architecture.md # Phase 4
│ ├── modules.md # Phase 4
│ ├── api-reference.md # Phase 4 (if applicable)
│ └── data-models.md # Phase 4 (if applicable)
└── ai/
└── context.md # Internal context snapshotFinal Report
After Phase 5, present to user:
autodoc complete for: <project name>
Documentation generated:
✓ docs/README.md — main entry point
✓ docs/onboarding.md — setup + dev workflow
✓ docs/architecture.md — system architecture
✓ docs/modules.md — module reference
✓ docs/api-reference.md — API contracts
✓ docs/data-models.md — data schemas
Modules analyzed: <N> (<list>)
Concerns: <none | list>
Full docs: jobs/autodoc-<name>/docs/state.json Template
{
"job_name": "autodoc-<slug>",
"created_at": "<ISO>",
"current_phase": 0,
"status": "in_progress",
"config": {
"project_dir": null,
"scope": "full",
"language": "en",
"existing_docs": null
},
"detected_modules": [],
"detected_sections": [],
"phase_summaries": {},
"concerns": [],
"history": []
}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

