agents-reverse-engineer 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +14 -14
  2. package/dist/change-detection/detector.d.ts +10 -0
  3. package/dist/change-detection/detector.d.ts.map +1 -1
  4. package/dist/change-detection/detector.js +12 -0
  5. package/dist/change-detection/detector.js.map +1 -1
  6. package/dist/change-detection/index.d.ts +1 -1
  7. package/dist/change-detection/index.d.ts.map +1 -1
  8. package/dist/change-detection/index.js +1 -1
  9. package/dist/change-detection/index.js.map +1 -1
  10. package/dist/cli/init.d.ts.map +1 -1
  11. package/dist/cli/init.js +0 -3
  12. package/dist/cli/init.js.map +1 -1
  13. package/dist/generation/prompts/builder.d.ts.map +1 -1
  14. package/dist/generation/prompts/builder.js +22 -21
  15. package/dist/generation/prompts/builder.js.map +1 -1
  16. package/dist/installer/banner.js +5 -5
  17. package/dist/integration/templates.d.ts.map +1 -1
  18. package/dist/integration/templates.js +47 -137
  19. package/dist/integration/templates.js.map +1 -1
  20. package/dist/orchestration/index.d.ts +1 -0
  21. package/dist/orchestration/index.d.ts.map +1 -1
  22. package/dist/orchestration/index.js +4 -0
  23. package/dist/orchestration/index.js.map +1 -1
  24. package/dist/orchestration/plan-tracker.d.ts +34 -0
  25. package/dist/orchestration/plan-tracker.d.ts.map +1 -0
  26. package/dist/orchestration/plan-tracker.js +59 -0
  27. package/dist/orchestration/plan-tracker.js.map +1 -0
  28. package/dist/orchestration/runner.d.ts +1 -1
  29. package/dist/orchestration/runner.d.ts.map +1 -1
  30. package/dist/orchestration/runner.js +104 -49
  31. package/dist/orchestration/runner.js.map +1 -1
  32. package/package.json +1 -1
@@ -9,117 +9,38 @@
9
9
  const COMMANDS = {
10
10
  generate: {
11
11
  description: 'Generate AI-friendly documentation for the entire codebase',
12
- argumentHint: '[--budget N] [--dry-run]',
12
+ argumentHint: '[--budget N] [--dry-run] [--concurrency N] [--verbose] [--fail-fast]',
13
13
  content: `Generate comprehensive documentation for this codebase using agents-reverse-engineer.
14
14
 
15
15
  <execution>
16
- ## Phase 0: Check for Existing Plan
17
-
18
- First, check if a resumable plan exists:
16
+ Run the agents-reverse-engineer generate command:
19
17
 
20
18
  \`\`\`bash
21
- cat .agents-reverse-engineer/GENERATION-PLAN.md 2>/dev/null | head -20
22
- \`\`\`
23
-
24
- **If NO plan exists**: Run \`/are:discover --plan\` first to create the GENERATION-PLAN.md, then return here.
25
-
26
- **If plan exists**: Continue to **Resume Execution** below.
27
-
28
- ## Resume Execution
29
-
30
- Read \`.agents-reverse-engineer/GENERATION-PLAN.md\` and find unchecked tasks (\`- [ ]\`).
31
-
32
- ### For Each Unchecked File Task:
33
-
34
- 1. **Spawn ONE subagent PER FILE** (Task tool with model="sonnet") to:
35
- - Read the source file
36
- - Generate summary following guidelines below
37
- - Write the .sum file using the Write tool
38
- - **VERIFY**: Read back the .sum file to confirm it was written correctly
39
- - Report success/failure
40
-
41
- 2. **Mark complete** in the plan file: change \`- [ ]\` to \`- [x]\` (only after verification)
42
-
43
- 3. **Parallel execution**: Spawn all file tasks in parallel (one agent per file) for maximum efficiency and easy resumption
44
-
45
- ### Subagent Prompt Template:
46
-
47
- \`\`\`
48
- Analyze and document this file:
49
- 1. Compute content hash: sha256sum <file_path> | cut -d' ' -f1
50
- 2. Read: <file_path>
51
- 3. Generate .sum content following the format below (include the content_hash)
52
- 4. Write to: <file_path>.sum
53
- 5. Verify: Read back the .sum file to confirm success
54
- 6. Report: "SUCCESS: <file_path>.sum created" or "FAILED: <reason>"
19
+ npx agents-reverse-engineer@latest generate $ARGUMENTS
55
20
  \`\`\`
56
21
 
57
- ### .sum File Format
58
-
59
- \`\`\`yaml
60
- ---
61
- file_type: <generic|type|config|test|component|service|api|hook|model|schema>
62
- generated_at: <ISO timestamp>
63
- content_hash: <SHA-256 hash - compute with: sha256sum <file> | cut -d' ' -f1>
64
- purpose: <1-2 sentence description of what this file does>
65
- public_interface: [func1(), func2(), ClassName]
66
- dependencies: [express, lodash, ./utils]
67
- patterns: [singleton, factory, observer]
68
- related_files: [./types.ts, ./utils.ts]
69
- ---
70
-
71
- <Detailed 300-500 word summary covering:
72
- - What the code does and how it works
73
- - Key implementation details
74
- - Important usage patterns
75
- - Notable edge cases or gotchas>
76
- \`\`\`
22
+ This executes a three-phase pipeline:
77
23
 
78
- **Field Guidelines:**
79
- - \`purpose\`: One-line summary (what + why)
80
- - \`public_interface\`: Exported functions/classes/types
81
- - \`dependencies\`: External packages and internal imports
82
- - \`patterns\`: Design patterns used (singleton, factory, etc.)
83
- - \`related_files\`: Tightly coupled files (optional)
24
+ 1. **Discovery & Planning**: Walks the directory tree, applies filters (gitignore, vendor, binary, custom), detects file types, and creates a generation plan with token budget tracking.
84
25
 
85
- ### After All Files Complete, Generate AGENTS.md (Post-Order Traversal):
26
+ 2. **File Analysis** (concurrent): Analyzes each source file via AI and writes \`.sum\` summary files with YAML frontmatter (\`content_hash\`, \`file_type\`, \`purpose\`, \`public_interface\`, \`dependencies\`, \`patterns\`).
86
27
 
87
- Process directories from **deepest to shallowest** so child AGENTS.md files exist before parent directories are documented.
28
+ 3. **Directory & Root Documents** (sequential):
29
+ - Generates \`AGENTS.md\` per directory in post-order traversal (deepest first, so child summaries feed into parents)
30
+ - Creates root documents: \`CLAUDE.md\`, \`ARCHITECTURE.md\` (if 20+ source files)
31
+ - Creates per-package documents at each manifest location (package.json, go.mod, Cargo.toml): \`STACK.md\`, \`STRUCTURE.md\`, \`CONVENTIONS.md\`, \`TESTING.md\`, \`INTEGRATIONS.md\`, \`CONCERNS.md\`
88
32
 
89
- For each directory (in post-order):
90
- 1. Verify ALL .sum files exist for that directory
91
- 2. Read all .sum files in the directory
92
- 3. **Read AGENTS.md from any subdirectories** (already generated due to post-order)
93
- 4. Generate AGENTS.md with:
94
- - Directory description synthesized from file summaries
95
- - Files grouped by purpose (Types, Services, Utils, etc.)
96
- - Subdirectories section listing child directories with descriptions
97
- 5. Mark the directory task complete in the plan
98
-
99
- ### After All Directories Complete:
100
-
101
- Generate root documents:
102
-
103
- 1. **CLAUDE.md** - Synthesize all AGENTS.md into project overview
104
- 2. **ARCHITECTURE.md** - Document system architecture (if 20+ source files)
105
-
106
- Generate per-package documents (at each directory containing package.json, requirements.txt, Cargo.toml, etc.):
107
-
108
- 1. **STACK.md** - Technology stack from manifest file
109
- 2. **STRUCTURE.md** - Codebase structure and organization
110
- 3. **CONVENTIONS.md** - Coding conventions and patterns
111
- 4. **TESTING.md** - Test setup and patterns
112
- 5. **INTEGRATIONS.md** - External services and APIs
113
-
114
- In monorepos, these appear in each package directory (e.g., \`packages/api/STACK.md\`).
115
-
116
- ## Completion
117
-
118
- After all tasks complete:
33
+ **Options:**
34
+ - \`--dry-run\`: Preview the plan without making AI calls
35
+ - \`--budget N\`: Override token budget
36
+ - \`--concurrency N\`: Control number of parallel AI calls
37
+ - \`--verbose\`: Show detailed task breakdown
38
+ - \`--fail-fast\`: Stop on first file analysis failure
119
39
 
120
- - Report number of files analyzed
121
- - Report number of directories documented
122
- - Mark plan as complete (change header to show ✓ COMPLETE)
40
+ After completion, summarize:
41
+ - Number of files analyzed and any failures
42
+ - Number of directories documented
43
+ - Root and per-package documents generated
123
44
  </execution>`,
124
45
  },
125
46
  update: {
@@ -154,13 +75,7 @@ Run the agents-reverse-engineer init command:
154
75
  npx agents-reverse-engineer@latest init
155
76
  \`\`\`
156
77
 
157
- This creates \`.agents-reverse-engineer.yaml\` configuration file.
158
-
159
- To install commands and hooks, use the interactive installer:
160
-
161
- \`\`\`bash
162
- npx agents-reverse-engineer install
163
- \`\`\`
78
+ This creates \`.agents-reverse-engineer/config.yaml\` configuration file.
164
79
  </execution>`,
165
80
  },
166
81
  discover: {
@@ -174,7 +89,7 @@ npx agents-reverse-engineer install
174
89
  1. Run ONLY this exact command: \`npx agents-reverse-engineer@latest discover $ARGUMENTS\`
175
90
  2. DO NOT add \`--plan\` unless user typed \`--plan\`
176
91
  3. DO NOT add ANY flags the user did not explicitly type
177
- 4. If user typed nothing after \`/are:discover\`, run with ZERO flags
92
+ 4. If user typed nothing after \`COMMAND_PREFIXdiscover\`, run with ZERO flags
178
93
 
179
94
  \`\`\`bash
180
95
  npx agents-reverse-engineer@latest discover $ARGUMENTS
@@ -194,7 +109,8 @@ Report number of files found.
194
109
  1. **Plan file**: \`.agents-reverse-engineer/GENERATION-PLAN.md\`
195
110
  2. **Summary files**: All \`*.sum\` files
196
111
  3. **Directory docs**: All \`AGENTS.md\` files
197
- 4. **Root docs**: \`CLAUDE.md\`, \`ARCHITECTURE.md\`, \`STACK.md\`
112
+ 4. **Root docs**: \`CLAUDE.md\`, \`ARCHITECTURE.md\`
113
+ 5. **Per-package docs**: \`STACK.md\`, \`STRUCTURE.md\`, \`CONVENTIONS.md\`, \`TESTING.md\`, \`INTEGRATIONS.md\`, \`CONCERNS.md\`
198
114
 
199
115
  ## Dry Run (Preview)
200
116
 
@@ -204,7 +120,8 @@ First, show what would be deleted:
204
120
  echo "=== Files to delete ===" && \\
205
121
  find . -name "*.sum" -not -path "./node_modules/*" -not -path "./.git/*" 2>/dev/null && \\
206
122
  find . -name "AGENTS.md" -not -path "./node_modules/*" -not -path "./.git/*" 2>/dev/null && \\
207
- ls -la CLAUDE.md ARCHITECTURE.md STACK.md .agents-reverse-engineer/GENERATION-PLAN.md 2>/dev/null || true
123
+ find . \\( -name "STACK.md" -o -name "STRUCTURE.md" -o -name "CONVENTIONS.md" -o -name "TESTING.md" -o -name "INTEGRATIONS.md" -o -name "CONCERNS.md" \\) -not -path "./node_modules/*" -not -path "./.git/*" 2>/dev/null && \\
124
+ ls -la CLAUDE.md ARCHITECTURE.md .agents-reverse-engineer/GENERATION-PLAN.md 2>/dev/null || true
208
125
  \`\`\`
209
126
 
210
127
  Report the count of files that would be deleted.
@@ -218,7 +135,8 @@ After confirming with the user (or if no --dry-run flag):
218
135
  \`\`\`bash
219
136
  find . -name "*.sum" -not -path "./node_modules/*" -not -path "./.git/*" -delete 2>/dev/null
220
137
  find . -name "AGENTS.md" -not -path "./node_modules/*" -not -path "./.git/*" -delete 2>/dev/null
221
- rm -f CLAUDE.md ARCHITECTURE.md STACK.md
138
+ find . \\( -name "STACK.md" -o -name "STRUCTURE.md" -o -name "CONVENTIONS.md" -o -name "TESTING.md" -o -name "INTEGRATIONS.md" -o -name "CONCERNS.md" \\) -not -path "./node_modules/*" -not -path "./.git/*" -delete 2>/dev/null
139
+ rm -f CLAUDE.md ARCHITECTURE.md
222
140
  rm -f .agents-reverse-engineer/GENERATION-PLAN.md
223
141
  \`\`\`
224
142
 
@@ -226,9 +144,10 @@ Report:
226
144
  - Number of .sum files deleted
227
145
  - Number of AGENTS.md files deleted
228
146
  - Root documents deleted
147
+ - Per-package documents deleted
229
148
  - Plan file deleted
230
149
 
231
- Suggest running \`/are:discover --plan\` to start fresh.
150
+ Suggest running \`COMMAND_PREFIXgenerate\` to start fresh.
232
151
  </execution>`,
233
152
  },
234
153
  help: {
@@ -253,9 +172,8 @@ Output ONLY the reference content below. Do NOT add:
253
172
  ## Quick Start
254
173
 
255
174
  1. \`COMMAND_PREFIXinit\` — Create configuration file
256
- 2. \`COMMAND_PREFIXdiscover --plan\` — Scan codebase, create execution plan
257
- 3. \`COMMAND_PREFIXgenerate\` — Generate documentation from the plan
258
- 4. \`COMMAND_PREFIXupdate\` — Keep docs in sync after code changes
175
+ 2. \`COMMAND_PREFIXgenerate\` — Generate documentation for the codebase
176
+ 3. \`COMMAND_PREFIXupdate\` — Keep docs in sync after code changes
259
177
 
260
178
  ## Commands Reference
261
179
 
@@ -297,20 +215,18 @@ npx are discover ./src --show-excluded
297
215
  ### \`COMMAND_PREFIXgenerate\`
298
216
  Generate comprehensive documentation for the codebase.
299
217
 
300
- **Requires:** Run \`COMMAND_PREFIXdiscover --plan\` first to create \`GENERATION-PLAN.md\`.
301
-
302
218
  **Options:**
303
219
  | Flag | Description |
304
220
  |------|-------------|
305
221
  | \`--budget N\` | Override token budget (default: from config) |
306
222
  | \`--dry-run\` | Show what would be generated without writing |
307
- | \`--execute\` | Output JSON execution plan for AI agents |
308
- | \`--stream\` | Output tasks as streaming JSON, one per line |
223
+ | \`--concurrency N\` | Control number of parallel AI calls |
224
+ | \`--fail-fast\` | Stop on first file analysis failure |
309
225
  | \`--verbose, -v\` | Show detailed task breakdown |
310
226
  | \`--quiet, -q\` | Suppress output except errors |
311
227
 
312
228
  **Usage:**
313
- - \`COMMAND_PREFIXgenerate\` — Generate docs (resumes from plan)
229
+ - \`COMMAND_PREFIXgenerate\` — Generate docs
314
230
  - \`COMMAND_PREFIXgenerate --dry-run\` — Preview without writing
315
231
 
316
232
  **CLI:**
@@ -318,16 +234,15 @@ Generate comprehensive documentation for the codebase.
318
234
  npx are generate
319
235
  npx are generate --dry-run
320
236
  npx are generate --budget 50000
321
- npx are generate --execute # For programmatic use
237
+ npx are generate --concurrency 4
322
238
  \`\`\`
323
239
 
324
240
  **How it works:**
325
- 1. Reads \`GENERATION-PLAN.md\` and finds unchecked tasks
326
- 2. Spawns parallel subagents to analyze each file
327
- 3. Writes \`.sum\` summary files alongside source files
328
- 4. Generates \`AGENTS.md\` for each directory (post-order)
329
- 5. Creates root documents: \`CLAUDE.md\`, \`ARCHITECTURE.md\`
330
- 6. Creates per-package documents at each manifest location: \`STACK.md\`, \`STRUCTURE.md\`, \`CONVENTIONS.md\`, \`TESTING.md\`, \`INTEGRATIONS.md\`
241
+ 1. Discovers files, applies filters, detects file types, and creates a generation plan
242
+ 2. Analyzes each file via concurrent AI calls, writes \`.sum\` summary files
243
+ 3. Generates \`AGENTS.md\` for each directory (post-order traversal)
244
+ 4. Creates root documents: \`CLAUDE.md\`, \`ARCHITECTURE.md\` (if 20+ files)
245
+ 5. Creates per-package documents at each manifest location: \`STACK.md\`, \`STRUCTURE.md\`, \`CONVENTIONS.md\`, \`TESTING.md\`, \`INTEGRATIONS.md\`, \`CONCERNS.md\`
331
246
 
332
247
  ---
333
248
 
@@ -369,7 +284,7 @@ Remove all generated documentation artifacts.
369
284
  - All \`*.sum\` files
370
285
  - All \`AGENTS.md\` files
371
286
  - Root docs: \`CLAUDE.md\`, \`ARCHITECTURE.md\`
372
- - Per-package docs: \`STACK.md\`, \`STRUCTURE.md\`, \`CONVENTIONS.md\`, \`TESTING.md\`, \`INTEGRATIONS.md\`
287
+ - Per-package docs: \`STACK.md\`, \`STRUCTURE.md\`, \`CONVENTIONS.md\`, \`TESTING.md\`, \`INTEGRATIONS.md\`, \`CONCERNS.md\`
373
288
 
374
289
  **Usage:**
375
290
  - \`COMMAND_PREFIXclean --dry-run\` — Preview deletions
@@ -476,6 +391,7 @@ Generated alongside \`package.json\`, \`requirements.txt\`, \`Cargo.toml\`, etc.
476
391
  | \`CONVENTIONS.md\` | Coding conventions and patterns |
477
392
  | \`TESTING.md\` | Test setup and patterns |
478
393
  | \`INTEGRATIONS.md\` | External services and APIs |
394
+ | \`CONCERNS.md\` | Technical debt and known issues |
479
395
 
480
396
  In monorepos, these appear in each package directory (e.g., \`packages/api/STACK.md\`).
481
397
 
@@ -484,7 +400,6 @@ In monorepos, these appear in each package directory (e.g., \`packages/api/STACK
484
400
  **Initial documentation:**
485
401
  \`\`\`
486
402
  COMMAND_PREFIXinit
487
- COMMAND_PREFIXdiscover --plan
488
403
  COMMAND_PREFIXgenerate
489
404
  \`\`\`
490
405
 
@@ -496,7 +411,6 @@ COMMAND_PREFIXupdate
496
411
  **Full regeneration:**
497
412
  \`\`\`
498
413
  COMMAND_PREFIXclean
499
- COMMAND_PREFIXdiscover --plan
500
414
  COMMAND_PREFIXgenerate
501
415
  \`\`\`
502
416
 
@@ -508,7 +422,6 @@ COMMAND_PREFIXgenerate --dry-run # Preview generation
508
422
 
509
423
  ## Tips
510
424
 
511
- - **Resume generation**: If interrupted, run \`COMMAND_PREFIXgenerate\` again — it resumes from unchecked tasks in \`GENERATION-PLAN.md\`
512
425
  - **Large codebases**: Use \`--budget N\` to limit token usage per run
513
426
  - **Custom exclusions**: Edit \`.agents-reverse-engineer/config.yaml\` to skip files
514
427
  - **Hook auto-update**: Install creates a session-end hook that auto-runs update
@@ -522,7 +435,7 @@ COMMAND_PREFIXgenerate --dry-run # Preview generation
522
435
  };
523
436
  const PLATFORM_CONFIGS = {
524
437
  claude: {
525
- commandPrefix: '/are:',
438
+ commandPrefix: '/are-',
526
439
  pathPrefix: '.claude/skills/',
527
440
  filenameSeparator: '.',
528
441
  usesName: true,
@@ -541,16 +454,13 @@ const PLATFORM_CONFIGS = {
541
454
  usesName: false,
542
455
  },
543
456
  };
544
- function buildFrontmatter(platform, commandName, description, argumentHint) {
457
+ function buildFrontmatter(platform, commandName, description) {
545
458
  const config = PLATFORM_CONFIGS[platform];
546
459
  const lines = ['---'];
547
460
  if (config.usesName) {
548
- lines.push(`name: are:${commandName}`);
461
+ lines.push(`name: are-${commandName}`);
549
462
  }
550
463
  lines.push(`description: ${description}`);
551
- if (argumentHint) {
552
- lines.push(`argument-hint: "${argumentHint}"`);
553
- }
554
464
  if (config.extraFrontmatter) {
555
465
  lines.push(config.extraFrontmatter);
556
466
  }
@@ -598,7 +508,7 @@ function buildTemplate(platform, commandName, command) {
598
508
  const path = platform === 'claude'
599
509
  ? `${config.pathPrefix}are-${commandName}/${filename}`
600
510
  : `${config.pathPrefix}${filename}`;
601
- const frontmatter = buildFrontmatter(platform, commandName, command.description, command.argumentHint || undefined);
511
+ const frontmatter = buildFrontmatter(platform, commandName, command.description);
602
512
  // Replace command prefix placeholder in help content
603
513
  const content = command.content.replace(/COMMAND_PREFIX/g, config.commandPrefix);
604
514
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/integration/templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,gFAAgF;AAChF,yBAAyB;AACzB,gFAAgF;AAEhF,MAAM,QAAQ,GAAG;IACf,QAAQ,EAAE;QACR,WAAW,EAAE,4DAA4D;QACzE,YAAY,EAAE,0BAA0B;QACxC,OAAO,EAA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F,OAAO;QACL,QAAQ;QACR,IAAI;QACJ,OAAO,EAAE,GAAG,WAAW,OAAO,OAAO,IAAI;KAC1C,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB,CAAC,QAAkB;IACjD,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,CACtD,aAAa,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CACvC,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,aAAa;AACb,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC"}
@@ -23,5 +23,6 @@ export type { FileTaskResult, RunSummary, ProgressEvent, CommandRunOptions, } fr
23
23
  export { runPool } from './pool.js';
24
24
  export type { PoolOptions, TaskResult } from './pool.js';
25
25
  export { ProgressReporter } from './progress.js';
26
+ export { PlanTracker } from './plan-tracker.js';
26
27
  export { CommandRunner } from './runner.js';
27
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/orchestration/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,YAAY,EACV,cAAc,EACd,UAAU,EACV,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAMzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAMjD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/orchestration/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,YAAY,EACV,cAAc,EACd,UAAU,EACV,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAMzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAMjD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMhD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -28,6 +28,10 @@ export { runPool } from './pool.js';
28
28
  // ---------------------------------------------------------------------------
29
29
  export { ProgressReporter } from './progress.js';
30
30
  // ---------------------------------------------------------------------------
31
+ // Plan tracker
32
+ // ---------------------------------------------------------------------------
33
+ export { PlanTracker } from './plan-tracker.js';
34
+ // ---------------------------------------------------------------------------
31
35
  // Command runner
32
36
  // ---------------------------------------------------------------------------
33
37
  export { CommandRunner } from './runner.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/orchestration/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAaH,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/orchestration/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAaH,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Progress tracker that updates GENERATION-PLAN.md checkboxes during generation.
3
+ *
4
+ * Maintains the markdown content in memory for fast updates and serializes
5
+ * disk writes via a promise chain to handle concurrent Phase 1 completions.
6
+ *
7
+ * @module
8
+ */
9
+ /**
10
+ * Tracks generation progress by ticking checkboxes in GENERATION-PLAN.md.
11
+ *
12
+ * Create one instance at the start of `executeGenerate()`, call `markDone()`
13
+ * as tasks complete, and `flush()` before returning.
14
+ */
15
+ export declare class PlanTracker {
16
+ private content;
17
+ private readonly planPath;
18
+ private writeQueue;
19
+ constructor(projectRoot: string, initialMarkdown: string);
20
+ /** Write the initial plan file to disk. */
21
+ initialize(): Promise<void>;
22
+ /**
23
+ * Mark a task as done by replacing its checkbox.
24
+ *
25
+ * The caller must pass the exact path as it appears in the markdown:
26
+ * - File: `src/cli/init.ts`
27
+ * - Directory: `src/cli/AGENTS.md` (caller appends `/AGENTS.md`)
28
+ * - Root doc: `CLAUDE.md`
29
+ */
30
+ markDone(itemPath: string): void;
31
+ /** Wait for all queued writes to finish. */
32
+ flush(): Promise<void>;
33
+ }
34
+ //# sourceMappingURL=plan-tracker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-tracker.d.ts","sourceRoot":"","sources":["../../src/orchestration/plan-tracker.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;;;;GAKG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,UAAU,CAAoC;gBAE1C,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM;IAKxD,2CAA2C;IACrC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IASjC;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAehC,4CAA4C;IACtC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Progress tracker that updates GENERATION-PLAN.md checkboxes during generation.
3
+ *
4
+ * Maintains the markdown content in memory for fast updates and serializes
5
+ * disk writes via a promise chain to handle concurrent Phase 1 completions.
6
+ *
7
+ * @module
8
+ */
9
+ import { writeFile, mkdir } from 'node:fs/promises';
10
+ import * as path from 'node:path';
11
+ import { CONFIG_DIR } from '../config/loader.js';
12
+ /**
13
+ * Tracks generation progress by ticking checkboxes in GENERATION-PLAN.md.
14
+ *
15
+ * Create one instance at the start of `executeGenerate()`, call `markDone()`
16
+ * as tasks complete, and `flush()` before returning.
17
+ */
18
+ export class PlanTracker {
19
+ content;
20
+ planPath;
21
+ writeQueue = Promise.resolve();
22
+ constructor(projectRoot, initialMarkdown) {
23
+ this.planPath = path.join(projectRoot, CONFIG_DIR, 'GENERATION-PLAN.md');
24
+ this.content = initialMarkdown;
25
+ }
26
+ /** Write the initial plan file to disk. */
27
+ async initialize() {
28
+ try {
29
+ await mkdir(path.dirname(this.planPath), { recursive: true });
30
+ await writeFile(this.planPath, this.content, 'utf8');
31
+ }
32
+ catch {
33
+ // Non-critical — generation continues without tracking
34
+ }
35
+ }
36
+ /**
37
+ * Mark a task as done by replacing its checkbox.
38
+ *
39
+ * The caller must pass the exact path as it appears in the markdown:
40
+ * - File: `src/cli/init.ts`
41
+ * - Directory: `src/cli/AGENTS.md` (caller appends `/AGENTS.md`)
42
+ * - Root doc: `CLAUDE.md`
43
+ */
44
+ markDone(itemPath) {
45
+ const before = this.content;
46
+ this.content = this.content.replace(`- [ ] \`${itemPath}\``, `- [x] \`${itemPath}\``);
47
+ if (this.content === before)
48
+ return; // no match — skip write
49
+ // Queue a serialized write so concurrent markDone() calls don't corrupt the file
50
+ this.writeQueue = this.writeQueue
51
+ .then(() => writeFile(this.planPath, this.content, 'utf8'))
52
+ .catch(() => { });
53
+ }
54
+ /** Wait for all queued writes to finish. */
55
+ async flush() {
56
+ await this.writeQueue;
57
+ }
58
+ }
59
+ //# sourceMappingURL=plan-tracker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-tracker.js","sourceRoot":"","sources":["../../src/orchestration/plan-tracker.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,OAAO,WAAW;IACd,OAAO,CAAS;IACP,QAAQ,CAAS;IAC1B,UAAU,GAAkB,OAAO,CAAC,OAAO,EAAE,CAAC;IAEtD,YAAY,WAAmB,EAAE,eAAuB;QACtD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE,oBAAoB,CAAC,CAAC;QACzE,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC;IACjC,CAAC;IAED,2CAA2C;IAC3C,KAAK,CAAC,UAAU;QACd,IAAI,CAAC;YACH,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC9D,MAAM,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACvD,CAAC;QAAC,MAAM,CAAC;YACP,uDAAuD;QACzD,CAAC;IACH,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAgB;QACvB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CACjC,WAAW,QAAQ,IAAI,EACvB,WAAW,QAAQ,IAAI,CACxB,CAAC;QAEF,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM;YAAE,OAAO,CAAC,wBAAwB;QAE7D,iFAAiF;QACjF,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU;aAC9B,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;aAC1D,KAAK,CAAC,GAAG,EAAE,GAAoB,CAAC,CAAC,CAAC;IACvC,CAAC;IAED,4CAA4C;IAC5C,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;CACF"}
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * The three execution phases match the {@link ExecutionPlan} dependency graph:
8
8
  * 1. **File analysis** -- concurrent AI calls with configurable parallelism
9
- * 2. **Directory docs** -- sequential, post-order AGENTS.md generation
9
+ * 2. **Directory docs** -- concurrent per depth level, post-order AGENTS.md generation
10
10
  * 3. **Root documents** -- sequential AI calls for CLAUDE.md, ARCHITECTURE.md, etc.
11
11
  *
12
12
  * @module
@@ -1 +1 @@
1
- {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/orchestration/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAA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