agents-reverse-engineer 0.3.1 → 0.3.3
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.
- package/README.md +12 -3
- package/dist/cli/index.js +0 -0
- package/dist/installer/uninstall.d.ts.map +1 -1
- package/dist/installer/uninstall.js +36 -6
- package/dist/installer/uninstall.js.map +1 -1
- package/dist/integration/templates.d.ts +1 -0
- package/dist/integration/templates.d.ts.map +1 -1
- package/dist/integration/templates.js +296 -35
- package/dist/integration/templates.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,8 @@ AI coding assistants are powerful, but they don't know your codebase. Every sess
|
|
|
43
43
|
- **`AGENTS.md`** — Per-directory overviews with file organization (standard format)
|
|
44
44
|
- **`CLAUDE.md`** / **`GEMINI.md`** / **`OPENCODE.md`** — Runtime-specific project entry points
|
|
45
45
|
- **`ARCHITECTURE.md`** — System design overview for complex projects
|
|
46
|
-
- **`STACK.md`** — Technology stack from package
|
|
46
|
+
- **`STACK.md`** — Technology stack from package manifests
|
|
47
|
+
- **Supplementary docs** — `STRUCTURE.md`, `CONVENTIONS.md`, `TESTING.md`, `INTEGRATIONS.md`, `CONCERNS.md`
|
|
47
48
|
|
|
48
49
|
The result: Your AI assistant understands your codebase from the first message.
|
|
49
50
|
|
|
@@ -172,7 +173,7 @@ Your AI assistant executes the plan:
|
|
|
172
173
|
|
|
173
174
|
1. **File Analysis** — Creates `.sum` file for each source file
|
|
174
175
|
2. **Directory Docs** — Creates `AGENTS.md` for each directory
|
|
175
|
-
3. **Root Docs** — Creates `CLAUDE.md`, `GEMINI.md`, `OPENCODE.md`, `ARCHITECTURE.md`, `STACK.md
|
|
176
|
+
3. **Root Docs** — Creates `CLAUDE.md`, `GEMINI.md`, `OPENCODE.md`, `ARCHITECTURE.md`, `STACK.md`, and supplementary docs
|
|
176
177
|
|
|
177
178
|
---
|
|
178
179
|
|
|
@@ -257,7 +258,15 @@ Directory overview with:
|
|
|
257
258
|
- **`OPENCODE.md`** — Project entry point for OpenCode
|
|
258
259
|
- **`AGENTS.md`** — Root directory overview (universal format)
|
|
259
260
|
- **`ARCHITECTURE.md`** — System design overview (generated for complex projects)
|
|
260
|
-
- **`STACK.md`** — Technology stack from package.json
|
|
261
|
+
- **`STACK.md`** — Technology stack from package manifests (package.json, go.mod, Cargo.toml, etc.)
|
|
262
|
+
|
|
263
|
+
### Supplementary Documents
|
|
264
|
+
|
|
265
|
+
- **`STRUCTURE.md`** — Codebase organization and directory layout
|
|
266
|
+
- **`CONVENTIONS.md`** — Coding patterns and style guidelines
|
|
267
|
+
- **`TESTING.md`** — Test organization and testing patterns
|
|
268
|
+
- **`INTEGRATIONS.md`** — External services and API integrations
|
|
269
|
+
- **`CONCERNS.md`** — Technical debt and areas needing attention
|
|
261
270
|
|
|
262
271
|
---
|
|
263
272
|
|
package/dist/cli/index.js
CHANGED
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../src/installer/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA4DrE;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,MAAM,GAAE,OAAe,GACtB,eAAe,EAAE,CAKnB;
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../src/installer/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA4DrE;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,MAAM,GAAE,OAAe,GACtB,eAAe,EAAE,CAKnB;AAsID;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,EAChC,MAAM,EAAE,OAAO,GACd,OAAO,CAKT;AA4DD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAiDhF;AA+HD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAqB/E"}
|
|
@@ -131,12 +131,17 @@ function uninstallFilesForRuntime(runtime, location, dryRun) {
|
|
|
131
131
|
}
|
|
132
132
|
// Try to clean up empty directories
|
|
133
133
|
if (!dryRun) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
134
|
+
if (runtime === 'claude') {
|
|
135
|
+
// Claude uses skills format: clean up skills/are-* directories
|
|
136
|
+
const skillsDir = path.join(basePath, 'skills');
|
|
137
|
+
cleanupAreSkillDirs(skillsDir);
|
|
138
|
+
cleanupEmptyDirs(skillsDir);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
// OpenCode and Gemini use commands format
|
|
142
|
+
const commandsDir = path.join(basePath, 'commands');
|
|
143
|
+
cleanupEmptyDirs(commandsDir);
|
|
144
|
+
}
|
|
140
145
|
// Clean up hooks/ directory if empty (Claude and Gemini)
|
|
141
146
|
if (runtime === 'claude' || runtime === 'gemini') {
|
|
142
147
|
const hooksDir = path.join(basePath, 'hooks');
|
|
@@ -310,6 +315,31 @@ function unregisterGeminiHook(basePath, dryRun) {
|
|
|
310
315
|
}
|
|
311
316
|
return true;
|
|
312
317
|
}
|
|
318
|
+
/**
|
|
319
|
+
* Clean up ARE skill directories
|
|
320
|
+
*
|
|
321
|
+
* Removes all empty are-* skill directories from the skills folder.
|
|
322
|
+
*
|
|
323
|
+
* @param skillsDir - Path to the skills directory
|
|
324
|
+
*/
|
|
325
|
+
function cleanupAreSkillDirs(skillsDir) {
|
|
326
|
+
try {
|
|
327
|
+
if (!existsSync(skillsDir)) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
const entries = readdirSync(skillsDir);
|
|
331
|
+
for (const entry of entries) {
|
|
332
|
+
// Only clean up are-* directories
|
|
333
|
+
if (entry.startsWith('are-')) {
|
|
334
|
+
const skillDir = path.join(skillsDir, entry);
|
|
335
|
+
cleanupEmptyDirs(skillDir);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
catch {
|
|
340
|
+
// Ignore errors
|
|
341
|
+
}
|
|
342
|
+
}
|
|
313
343
|
/**
|
|
314
344
|
* Clean up empty directories recursively
|
|
315
345
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../src/installer/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC9G,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAmB,MAAM,YAAY,CAAC;AACjF,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GAEnB,MAAM,6BAA6B,CAAC;AAyBrC;;GAEG;AACH,MAAM,eAAe,GAAG;IACtB,gDAAgD;IAChD,oDAAoD;IACpD,oDAAoD;IACpD,kDAAkD;IAClD,iDAAiD;CAClD,CAAC;AAEF;;;;;GAKG;AACH,SAAS,sBAAsB,CAAC,OAAgC;IAC9D,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,QAAQ;YACX,OAAO,kBAAkB,EAAE,CAAC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AAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -18,6 +18,7 @@ export declare function getOpenCodeTemplates(): IntegrationTemplate[];
|
|
|
18
18
|
export declare function getGeminiTemplates(): IntegrationTemplate[];
|
|
19
19
|
/**
|
|
20
20
|
* Get session-end hook template for automatic documentation updates
|
|
21
|
+
* Uses ES module syntax for compatibility with ESM projects
|
|
21
22
|
*/
|
|
22
23
|
export declare function getHookTemplate(): string;
|
|
23
24
|
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/integration/templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/integration/templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAsnBtD;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,mBAAmB,EAAE,CAE1D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,mBAAmB,EAAE,CAE5D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,mBAAmB,EAAE,CAE1D;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAyCxC"}
|
|
@@ -101,8 +101,17 @@ For each directory (in post-order):
|
|
|
101
101
|
Generate root documents:
|
|
102
102
|
|
|
103
103
|
1. **CLAUDE.md** - Synthesize all AGENTS.md into project overview
|
|
104
|
-
2. **ARCHITECTURE.md** - Document system architecture
|
|
105
|
-
|
|
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\`).
|
|
106
115
|
|
|
107
116
|
## Completion
|
|
108
117
|
|
|
@@ -226,48 +235,295 @@ Suggest running \`/are:discover --plan\` to start fresh.
|
|
|
226
235
|
description: 'Show available ARE commands and usage guide',
|
|
227
236
|
argumentHint: '',
|
|
228
237
|
// Content uses COMMAND_PREFIX placeholder, replaced per platform
|
|
229
|
-
content:
|
|
238
|
+
content: `<objective>
|
|
239
|
+
Display the complete ARE command reference.
|
|
230
240
|
|
|
231
|
-
|
|
232
|
-
|
|
241
|
+
Output ONLY the reference content below. Do NOT add:
|
|
242
|
+
- Project-specific analysis
|
|
243
|
+
- Git status or file context
|
|
244
|
+
- Next-step suggestions
|
|
245
|
+
- Any commentary beyond the reference
|
|
246
|
+
</objective>
|
|
247
|
+
|
|
248
|
+
<reference>
|
|
249
|
+
# agents-reverse-engineer (ARE) Command Reference
|
|
250
|
+
|
|
251
|
+
**ARE** generates AI-friendly documentation for codebases, creating structured summaries optimized for AI assistants.
|
|
252
|
+
|
|
253
|
+
## Quick Start
|
|
254
|
+
|
|
255
|
+
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
|
|
259
|
+
|
|
260
|
+
## Commands Reference
|
|
261
|
+
|
|
262
|
+
### \`COMMAND_PREFIXinit\`
|
|
263
|
+
Initialize configuration in this project.
|
|
264
|
+
|
|
265
|
+
Creates \`.agents-reverse-engineer/config.yaml\` with customizable settings.
|
|
266
|
+
|
|
267
|
+
**Usage:** \`COMMAND_PREFIXinit\`
|
|
268
|
+
**CLI:** \`npx are init\`
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
### \`COMMAND_PREFIXdiscover\`
|
|
273
|
+
Discover files that would be analyzed for documentation.
|
|
274
|
+
|
|
275
|
+
**Options:**
|
|
276
|
+
| Flag | Description |
|
|
277
|
+
|------|-------------|
|
|
278
|
+
| \`[path]\` | Target directory (default: current directory) |
|
|
279
|
+
| \`--plan\` | Generate \`GENERATION-PLAN.md\` execution plan |
|
|
280
|
+
| \`--show-excluded\` | List excluded files with reasons |
|
|
281
|
+
| \`--quiet, -q\` | Suppress output except errors |
|
|
282
|
+
|
|
283
|
+
**Usage:**
|
|
284
|
+
- \`COMMAND_PREFIXdiscover\` — List discoverable files
|
|
285
|
+
- \`COMMAND_PREFIXdiscover --plan\` — Create execution plan for generate
|
|
286
|
+
- \`COMMAND_PREFIXdiscover --show-excluded\` — Debug exclusion rules
|
|
287
|
+
|
|
288
|
+
**CLI:**
|
|
289
|
+
\`\`\`bash
|
|
290
|
+
npx are discover
|
|
291
|
+
npx are discover --plan
|
|
292
|
+
npx are discover ./src --show-excluded
|
|
293
|
+
\`\`\`
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
### \`COMMAND_PREFIXgenerate\`
|
|
298
|
+
Generate comprehensive documentation for the codebase.
|
|
299
|
+
|
|
300
|
+
**Requires:** Run \`COMMAND_PREFIXdiscover --plan\` first to create \`GENERATION-PLAN.md\`.
|
|
301
|
+
|
|
302
|
+
**Options:**
|
|
303
|
+
| Flag | Description |
|
|
304
|
+
|------|-------------|
|
|
305
|
+
| \`--budget N\` | Override token budget (default: from config) |
|
|
306
|
+
| \`--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 |
|
|
309
|
+
| \`--verbose, -v\` | Show detailed task breakdown |
|
|
310
|
+
| \`--quiet, -q\` | Suppress output except errors |
|
|
311
|
+
|
|
312
|
+
**Usage:**
|
|
313
|
+
- \`COMMAND_PREFIXgenerate\` — Generate docs (resumes from plan)
|
|
314
|
+
- \`COMMAND_PREFIXgenerate --dry-run\` — Preview without writing
|
|
315
|
+
|
|
316
|
+
**CLI:**
|
|
317
|
+
\`\`\`bash
|
|
318
|
+
npx are generate
|
|
319
|
+
npx are generate --dry-run
|
|
320
|
+
npx are generate --budget 50000
|
|
321
|
+
npx are generate --execute # For programmatic use
|
|
322
|
+
\`\`\`
|
|
323
|
+
|
|
324
|
+
**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\`
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
### \`COMMAND_PREFIXupdate\`
|
|
335
|
+
Incrementally update documentation for changed files.
|
|
336
|
+
|
|
337
|
+
**Options:**
|
|
338
|
+
| Flag | Description |
|
|
339
|
+
|------|-------------|
|
|
340
|
+
| \`--uncommitted\` | Include staged but uncommitted changes |
|
|
341
|
+
| \`--dry-run\` | Show what would be updated without writing |
|
|
342
|
+
| \`--budget N\` | Override token budget |
|
|
343
|
+
| \`--verbose, -v\` | Show detailed output |
|
|
344
|
+
| \`--quiet, -q\` | Suppress output except errors |
|
|
345
|
+
|
|
346
|
+
**Usage:**
|
|
347
|
+
- \`COMMAND_PREFIXupdate\` — Update docs for committed changes
|
|
348
|
+
- \`COMMAND_PREFIXupdate --uncommitted\` — Include uncommitted changes
|
|
349
|
+
|
|
350
|
+
**CLI:**
|
|
351
|
+
\`\`\`bash
|
|
352
|
+
npx are update
|
|
353
|
+
npx are update --uncommitted --verbose
|
|
354
|
+
npx are update --dry-run
|
|
355
|
+
\`\`\`
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
### \`COMMAND_PREFIXclean\`
|
|
360
|
+
Remove all generated documentation artifacts.
|
|
361
|
+
|
|
362
|
+
**Options:**
|
|
363
|
+
| Flag | Description |
|
|
364
|
+
|------|-------------|
|
|
365
|
+
| \`--dry-run\` | Show what would be deleted without deleting |
|
|
366
|
+
|
|
367
|
+
**What gets deleted:**
|
|
368
|
+
- \`.agents-reverse-engineer/GENERATION-PLAN.md\`
|
|
369
|
+
- All \`*.sum\` files
|
|
370
|
+
- All \`AGENTS.md\` files
|
|
371
|
+
- Root docs: \`CLAUDE.md\`, \`ARCHITECTURE.md\`
|
|
372
|
+
- Per-package docs: \`STACK.md\`, \`STRUCTURE.md\`, \`CONVENTIONS.md\`, \`TESTING.md\`, \`INTEGRATIONS.md\`
|
|
233
373
|
|
|
234
|
-
|
|
374
|
+
**Usage:**
|
|
375
|
+
- \`COMMAND_PREFIXclean --dry-run\` — Preview deletions
|
|
376
|
+
- \`COMMAND_PREFIXclean\` — Delete all artifacts
|
|
235
377
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
| \`COMMAND_PREFIXupdate\` | Update docs for changed files only |
|
|
243
|
-
| \`COMMAND_PREFIXclean\` | Remove all generated documentation |
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
### \`COMMAND_PREFIXhelp\`
|
|
381
|
+
Show this command reference.
|
|
382
|
+
|
|
383
|
+
## CLI Installation
|
|
244
384
|
|
|
245
|
-
|
|
385
|
+
Install ARE commands to your AI assistant:
|
|
386
|
+
|
|
387
|
+
\`\`\`bash
|
|
388
|
+
npx agents-reverse-engineer install # Interactive mode
|
|
389
|
+
npx agents-reverse-engineer install --runtime claude -g # Global Claude
|
|
390
|
+
npx agents-reverse-engineer install --runtime claude -l # Local project
|
|
391
|
+
npx agents-reverse-engineer install --runtime all -g # All runtimes
|
|
392
|
+
\`\`\`
|
|
246
393
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
394
|
+
**Install/Uninstall Options:**
|
|
395
|
+
| Flag | Description |
|
|
396
|
+
|------|-------------|
|
|
397
|
+
| \`--runtime <name>\` | Target: \`claude\`, \`opencode\`, \`gemini\`, \`all\` |
|
|
398
|
+
| \`-g, --global\` | Install to global config directory |
|
|
399
|
+
| \`-l, --local\` | Install to current project directory |
|
|
400
|
+
| \`--force\` | Overwrite existing files (install only) |
|
|
401
|
+
|
|
402
|
+
## Configuration
|
|
403
|
+
|
|
404
|
+
**File:** \`.agents-reverse-engineer/config.yaml\`
|
|
405
|
+
|
|
406
|
+
\`\`\`yaml
|
|
407
|
+
# Exclusion patterns
|
|
408
|
+
exclude:
|
|
409
|
+
patterns:
|
|
410
|
+
- "**/*.test.ts"
|
|
411
|
+
- "**/__mocks__/**"
|
|
412
|
+
vendorDirs:
|
|
413
|
+
- node_modules
|
|
414
|
+
- dist
|
|
415
|
+
- .git
|
|
416
|
+
binaryExtensions:
|
|
417
|
+
- .png
|
|
418
|
+
- .jpg
|
|
419
|
+
- .pdf
|
|
420
|
+
|
|
421
|
+
# Options
|
|
422
|
+
options:
|
|
423
|
+
followSymlinks: false
|
|
424
|
+
maxFileSize: 100000
|
|
425
|
+
|
|
426
|
+
# Output settings
|
|
427
|
+
output:
|
|
428
|
+
verbose: false
|
|
429
|
+
colors: true
|
|
430
|
+
|
|
431
|
+
# Generation settings
|
|
432
|
+
generation:
|
|
433
|
+
tokenBudget: 50000
|
|
434
|
+
\`\`\`
|
|
251
435
|
|
|
252
436
|
## Generated Files
|
|
253
437
|
|
|
254
|
-
|
|
255
|
-
- \`AGENTS.md\` — Per-directory overviews
|
|
256
|
-
- \`CLAUDE.md\` — Project entry point
|
|
257
|
-
- \`ARCHITECTURE.md\` — System design overview
|
|
258
|
-
- \`STACK.md\` — Technology stack
|
|
438
|
+
### Per Source File
|
|
259
439
|
|
|
260
|
-
|
|
440
|
+
**\`*.sum\`** — File summaries with YAML frontmatter + detailed prose.
|
|
261
441
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
442
|
+
\`\`\`yaml
|
|
443
|
+
---
|
|
444
|
+
file_type: service
|
|
445
|
+
generated_at: 2025-01-15T10:30:00Z
|
|
446
|
+
content_hash: abc123...
|
|
447
|
+
purpose: Handles user authentication and session management
|
|
448
|
+
public_interface: [login(), logout(), refreshToken(), AuthService]
|
|
449
|
+
dependencies: [express, jsonwebtoken, ./user-model]
|
|
450
|
+
patterns: [singleton, factory, observer]
|
|
451
|
+
related_files: [./types.ts, ./middleware.ts]
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
<300-500 word summary covering implementation, patterns, edge cases>
|
|
455
|
+
\`\`\`
|
|
456
|
+
|
|
457
|
+
### Per Directory
|
|
458
|
+
|
|
459
|
+
**\`AGENTS.md\`** — Directory overview synthesized from \`.sum\` files. Groups files by purpose and links to subdirectories.
|
|
460
|
+
|
|
461
|
+
### Root Documents
|
|
462
|
+
|
|
463
|
+
| File | Purpose |
|
|
464
|
+
|------|---------|
|
|
465
|
+
| \`CLAUDE.md\` | Project entry point — synthesizes all AGENTS.md |
|
|
466
|
+
| \`ARCHITECTURE.md\` | System design, layers, data flow (if 20+ files) |
|
|
467
|
+
|
|
468
|
+
### Per-Package Documents (at each manifest file location)
|
|
469
|
+
|
|
470
|
+
Generated alongside \`package.json\`, \`requirements.txt\`, \`Cargo.toml\`, etc.:
|
|
471
|
+
|
|
472
|
+
| File | Purpose |
|
|
473
|
+
|------|---------|
|
|
474
|
+
| \`STACK.md\` | Technology stack from manifest |
|
|
475
|
+
| \`STRUCTURE.md\` | Codebase structure and organization |
|
|
476
|
+
| \`CONVENTIONS.md\` | Coding conventions and patterns |
|
|
477
|
+
| \`TESTING.md\` | Test setup and patterns |
|
|
478
|
+
| \`INTEGRATIONS.md\` | External services and APIs |
|
|
479
|
+
|
|
480
|
+
In monorepos, these appear in each package directory (e.g., \`packages/api/STACK.md\`).
|
|
481
|
+
|
|
482
|
+
## Common Workflows
|
|
483
|
+
|
|
484
|
+
**Initial documentation:**
|
|
485
|
+
\`\`\`
|
|
486
|
+
COMMAND_PREFIXinit
|
|
487
|
+
COMMAND_PREFIXdiscover --plan
|
|
488
|
+
COMMAND_PREFIXgenerate
|
|
489
|
+
\`\`\`
|
|
490
|
+
|
|
491
|
+
**After code changes:**
|
|
492
|
+
\`\`\`
|
|
493
|
+
COMMAND_PREFIXupdate
|
|
494
|
+
\`\`\`
|
|
495
|
+
|
|
496
|
+
**Full regeneration:**
|
|
497
|
+
\`\`\`
|
|
498
|
+
COMMAND_PREFIXclean
|
|
499
|
+
COMMAND_PREFIXdiscover --plan
|
|
500
|
+
COMMAND_PREFIXgenerate
|
|
501
|
+
\`\`\`
|
|
502
|
+
|
|
503
|
+
**Preview before generating:**
|
|
504
|
+
\`\`\`
|
|
505
|
+
COMMAND_PREFIXdiscover --show-excluded # Check exclusions
|
|
506
|
+
COMMAND_PREFIXgenerate --dry-run # Preview generation
|
|
507
|
+
\`\`\`
|
|
508
|
+
|
|
509
|
+
## Tips
|
|
510
|
+
|
|
511
|
+
- **Resume generation**: If interrupted, run \`COMMAND_PREFIXgenerate\` again — it resumes from unchecked tasks in \`GENERATION-PLAN.md\`
|
|
512
|
+
- **Large codebases**: Use \`--budget N\` to limit token usage per run
|
|
513
|
+
- **Custom exclusions**: Edit \`.agents-reverse-engineer/config.yaml\` to skip files
|
|
514
|
+
- **Hook auto-update**: Install creates a session-end hook that auto-runs update
|
|
515
|
+
|
|
516
|
+
## Resources
|
|
517
|
+
|
|
518
|
+
- **Repository:** https://github.com/GeoloeG-IsT/agents-reverse-engineer
|
|
519
|
+
- **Update:** \`npx agents-reverse-engineer@latest install --force\`
|
|
520
|
+
</reference>`,
|
|
265
521
|
},
|
|
266
522
|
};
|
|
267
523
|
const PLATFORM_CONFIGS = {
|
|
268
524
|
claude: {
|
|
269
525
|
commandPrefix: '/are:',
|
|
270
|
-
pathPrefix: '.claude/
|
|
526
|
+
pathPrefix: '.claude/skills/',
|
|
271
527
|
filenameSeparator: '.',
|
|
272
528
|
usesName: true,
|
|
273
529
|
},
|
|
@@ -303,8 +559,12 @@ function buildFrontmatter(platform, commandName, description, argumentHint) {
|
|
|
303
559
|
}
|
|
304
560
|
function buildTemplate(platform, commandName, command) {
|
|
305
561
|
const config = PLATFORM_CONFIGS[platform];
|
|
306
|
-
|
|
307
|
-
|
|
562
|
+
// Claude uses skills format: .claude/skills/are-{command}/SKILL.md
|
|
563
|
+
// OpenCode and Gemini use commands format: .{runtime}/commands/are-{command}.md
|
|
564
|
+
const filename = platform === 'claude' ? 'SKILL.md' : `are-${commandName}.md`;
|
|
565
|
+
const path = platform === 'claude'
|
|
566
|
+
? `${config.pathPrefix}are-${commandName}/${filename}`
|
|
567
|
+
: `${config.pathPrefix}${filename}`;
|
|
308
568
|
const frontmatter = buildFrontmatter(platform, commandName, command.description, command.argumentHint || undefined);
|
|
309
569
|
// Replace command prefix placeholder in help content
|
|
310
570
|
const content = command.content.replace(/COMMAND_PREFIX/g, config.commandPrefix);
|
|
@@ -340,14 +600,15 @@ export function getGeminiTemplates() {
|
|
|
340
600
|
}
|
|
341
601
|
/**
|
|
342
602
|
* Get session-end hook template for automatic documentation updates
|
|
603
|
+
* Uses ES module syntax for compatibility with ESM projects
|
|
343
604
|
*/
|
|
344
605
|
export function getHookTemplate() {
|
|
345
606
|
return `#!/usr/bin/env node
|
|
346
607
|
// .claude/hooks/are-session-end.js
|
|
347
608
|
// Triggers are update when session ends (if there are uncommitted changes)
|
|
348
609
|
|
|
349
|
-
|
|
350
|
-
|
|
610
|
+
import { execSync, spawn } from 'child_process';
|
|
611
|
+
import { existsSync, readFileSync } from 'fs';
|
|
351
612
|
|
|
352
613
|
// Check for disable flag
|
|
353
614
|
if (process.env.ARE_DISABLE_HOOK === '1') {
|
|
@@ -356,8 +617,8 @@ if (process.env.ARE_DISABLE_HOOK === '1') {
|
|
|
356
617
|
|
|
357
618
|
// Check config file for permanent disable
|
|
358
619
|
const configPath = '.agents-reverse-engineer.yaml';
|
|
359
|
-
if (
|
|
360
|
-
const config =
|
|
620
|
+
if (existsSync(configPath)) {
|
|
621
|
+
const config = readFileSync(configPath, 'utf-8');
|
|
361
622
|
if (config.includes('hook_enabled: false')) {
|
|
362
623
|
process.exit(0);
|
|
363
624
|
}
|
|
@@ -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,EAAE
|
|
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,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA8GA;KACV;IAED,MAAM,EAAE;QACN,WAAW,EAAE,sDAAsD;QACnE,YAAY,EAAE,yCAAyC;QACvD,OAAO,EAAE;;;;;;;;;;;;;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