@alxyrgin/agent-forge 1.0.0 → 3.0.0
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 +104 -51
- package/dist/index.js +194 -51
- package/dist/index.js.map +1 -1
- package/package.json +12 -2
- package/templates/agents/documentation/gatekeeper.md.ejs +83 -0
- package/templates/agents/documentation/librarian.md.ejs +80 -0
- package/templates/agents/documentation/verifier.md.ejs +92 -0
- package/templates/agents/documentation/writer.md.ejs +189 -0
- package/templates/agents/pipeline/analyst.md.ejs +65 -0
- package/templates/agents/{core → pipeline}/architect.md.ejs +38 -1
- package/templates/agents/pipeline/developer.md.ejs +75 -0
- package/templates/agents/pipeline/inspector.md.ejs +123 -0
- package/templates/agents/pipeline/planner.md.ejs +211 -0
- package/templates/agents/pipeline/reviewer.md.ejs +158 -0
- package/templates/agents/pipeline/skeptic.md.ejs +105 -0
- package/templates/agents/pipeline/tester.md.ejs +134 -0
- package/templates/agents/planning/decomposer.md.ejs +103 -0
- package/templates/agents/planning/interviewer.md.ejs +104 -0
- package/templates/agents/planning/researcher.md.ejs +96 -0
- package/templates/agents/planning/validator.md.ejs +97 -0
- package/templates/agents/security/auditor.md.ejs +105 -0
- package/templates/agents/security/deployer.md.ejs +81 -0
- package/templates/agents/security/prompter.md.ejs +87 -0
- package/templates/agents/security/scaffolder.md.ejs +75 -0
- package/templates/hooks/protect-docs.sh.ejs +25 -0
- package/templates/memory/checkpoint.yml.ejs +21 -0
- package/templates/memory/tech-debt.md.ejs +9 -1
- package/templates/root/CLAUDE.md.ejs +228 -30
- package/templates/root/settings.json.ejs +15 -1
- package/templates/rules/agent-output-format.md.ejs +80 -0
- package/templates/rules/context-loading.md.ejs +70 -0
- package/templates/rules/development-cycle.md.ejs +163 -29
- package/templates/rules/quality-gates.md.ejs +80 -0
- package/templates/rules/rollback-protocol.md.ejs +60 -0
- package/templates/rules/shared-resources.md.ejs +73 -0
- package/templates/skills/core/code/SKILL.md.ejs +85 -0
- package/templates/skills/core/complete-task/SKILL.md.ejs +22 -9
- package/templates/skills/core/done/SKILL.md.ejs +66 -0
- package/templates/skills/core/end-session/SKILL.md.ejs +14 -6
- package/templates/skills/core/review/SKILL.md.ejs +1 -1
- package/templates/skills/core/start-session/SKILL.md.ejs +73 -10
- package/templates/skills/core/take-task/SKILL.md.ejs +279 -30
- package/templates/skills/core/test/SKILL.md.ejs +200 -0
- package/templates/skills/extra/audit-wave/SKILL.md.ejs +58 -0
- package/templates/skills/extra/dashboard/SKILL.md.ejs +64 -0
- package/templates/skills/extra/decompose/SKILL.md.ejs +72 -0
- package/templates/skills/extra/feature/SKILL.md.ejs +83 -0
- package/templates/skills/extra/interview/SKILL.md.ejs +66 -0
- package/templates/skills/extra/prompts/SKILL.md.ejs +65 -0
- package/templates/skills/extra/security/SKILL.md.ejs +77 -0
- package/templates/skills/extra/skill-master/SKILL.md.ejs +51 -0
- package/templates/skills/extra/spec/SKILL.md.ejs +111 -0
- package/templates/skills/extra/techspec/SKILL.md.ejs +97 -0
- package/templates/skills/extra/write-report/SKILL.md.ejs +26 -0
- package/templates/agents/core/analyst.md.ejs +0 -56
- package/templates/agents/core/developer.md.ejs +0 -54
- package/templates/agents/core/doc-writer.md.ejs +0 -50
- package/templates/agents/core/progress-tracker.md.ejs +0 -56
- package/templates/agents/core/reviewer.md.ejs +0 -52
- package/templates/agents/core/security-auditor.md.ejs +0 -51
- package/templates/agents/core/unit-tester.md.ejs +0 -56
- package/templates/agents/extra/acceptance-tester.md.ejs +0 -48
- package/templates/agents/extra/integration-tester.md.ejs +0 -49
- package/templates/agents/extra/planner.md.ejs +0 -89
package/README.md
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
AI-driven Development Framework for Claude Code.
|
|
4
4
|
|
|
5
|
-
Scaffold a complete development infrastructure with Memory Bank, specialized agents, skills, and development rules in any project.
|
|
5
|
+
Scaffold a complete development infrastructure with Memory Bank, specialized agents, skills, hooks, checkpoint system, and development rules in any project.
|
|
6
6
|
|
|
7
7
|
## Quick Start
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx agent-forge init
|
|
10
|
+
npx @alxyrgin/agent-forge init
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
This creates a full AI-driven development infrastructure in your project:
|
|
14
14
|
|
|
15
|
-
- **`.claude/`** — CLAUDE.md (Team Lead instructions),
|
|
16
|
-
- **`dev-infra/memory/`** —
|
|
15
|
+
- **`.claude/`** — CLAUDE.md (Team Lead instructions), 5-20 agents, 10-21 skills, 8 rules, hooks
|
|
16
|
+
- **`dev-infra/memory/`** — 9 Memory Bank files for persistent context (incl. checkpoint)
|
|
17
17
|
- **`dev-infra/tasks/`** — Task tracking system (tasks.json)
|
|
18
18
|
- **`dev-infra/sessions/`** — Session logs
|
|
19
19
|
- **`dev-infra/tests/`** — Test structure (acceptance, PMI, results)
|
|
@@ -22,7 +22,7 @@ This creates a full AI-driven development infrastructure in your project:
|
|
|
22
22
|
|
|
23
23
|
### Memory Bank
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
9 markdown files that persist context across sessions:
|
|
26
26
|
|
|
27
27
|
| File | Purpose |
|
|
28
28
|
|------|---------|
|
|
@@ -31,68 +31,112 @@ This creates a full AI-driven development infrastructure in your project:
|
|
|
31
31
|
| `project-brief.md` | Project overview, team, stack |
|
|
32
32
|
| `decisions.md` | Architectural Decision Records (ADR) |
|
|
33
33
|
| `tech-stack.md` | Technology stack details |
|
|
34
|
-
| `tech-debt.md` | Technical debt registry |
|
|
34
|
+
| `tech-debt.md` | Technical debt registry with lifecycle tracking |
|
|
35
35
|
| `patterns.md` | Code patterns and conventions |
|
|
36
36
|
| `troubleshooting.md` | Problem solutions log |
|
|
37
|
+
| `checkpoint.yml` | Recovery checkpoint for interrupted sessions |
|
|
37
38
|
|
|
38
39
|
### Agents
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
20 specialized AI agents organized in 4 categories:
|
|
41
42
|
|
|
42
|
-
|
|
|
43
|
-
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
| `reviewer` | Code quality review |
|
|
49
|
-
| `security-auditor` | Security and access control audit |
|
|
50
|
-
| `doc-writer` | Documentation generation |
|
|
51
|
-
| `progress-tracker` | Memory bank and task updates |
|
|
43
|
+
| Category | Agents | Count |
|
|
44
|
+
|----------|--------|-------|
|
|
45
|
+
| Pipeline | analyst, architect, skeptic, developer, tester, inspector, reviewer, planner | 8 |
|
|
46
|
+
| Planning | researcher, validator, interviewer, decomposer | 4 |
|
|
47
|
+
| Security | auditor, prompter, deployer, scaffolder | 4 |
|
|
48
|
+
| Documentation | librarian, writer, gatekeeper, verifier | 4 |
|
|
52
49
|
|
|
53
|
-
**
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
**Preset coverage:**
|
|
51
|
+
- **minimal** (5 agents) — analyst, developer, tester, inspector, reviewer
|
|
52
|
+
- **core** (8 agents) — full pipeline category
|
|
53
|
+
- **full** (20 agents) — all categories
|
|
56
54
|
|
|
57
55
|
### Skills (Slash Commands)
|
|
58
56
|
|
|
57
|
+
#### Core skills (all presets) — 10
|
|
58
|
+
|
|
59
59
|
| Command | Description |
|
|
60
60
|
|---------|-------------|
|
|
61
|
-
| `/start-session` | Begin work: sync repo, load context, show progress |
|
|
62
|
-
| `/end-session` | Save context, create session log, commit & push |
|
|
63
|
-
| `/take-task [id]` | Full development cycle
|
|
64
|
-
| `/complete-task [id]` | Verify task
|
|
61
|
+
| `/start-session` | Begin work: sync repo, check checkpoint, load context, show progress |
|
|
62
|
+
| `/end-session` | Save context, checkpoint, create session log, commit & push |
|
|
63
|
+
| `/take-task [id]` | Full development cycle with feature-size routing (S/M/L) |
|
|
64
|
+
| `/complete-task [id]` | Verify task, smoke test, update progress, clear checkpoint |
|
|
65
65
|
| `/status` | Show project status, deadlines, blockers |
|
|
66
66
|
| `/plan [mode]` | Plan/replan/validate tasks from documentation |
|
|
67
67
|
| `/review [file]` | Code review for file or task |
|
|
68
|
+
| `/code [task]` | Direct code generation for a specific task |
|
|
69
|
+
| `/test [target]` | Run or generate tests for a target |
|
|
70
|
+
| `/done [id]` | Quick-complete a task with minimal ceremony |
|
|
68
71
|
|
|
69
|
-
|
|
72
|
+
#### Extra skills (full preset only) — 11
|
|
70
73
|
|
|
71
|
-
|
|
74
|
+
| Command | Description |
|
|
75
|
+
|---------|-------------|
|
|
76
|
+
| `/interview` | Structured discovery interview (3 cycles, completeness >= 85%) |
|
|
77
|
+
| `/audit-wave` | Comprehensive pre-milestone audit with GO/NO-GO verdict |
|
|
78
|
+
| `/write-report` | Generate non-technical progress report for stakeholders |
|
|
79
|
+
| `/dashboard` | Project dashboard: progress, health, tech debt, activity |
|
|
80
|
+
| `/skill-master [name]` | Create a new custom skill from template |
|
|
81
|
+
| `/decompose [task]` | Break down a task into subtasks |
|
|
82
|
+
| `/feature [name]` | Scaffold a new feature end-to-end |
|
|
83
|
+
| `/security [target]` | Run security analysis on a target |
|
|
84
|
+
| `/spec [feature]` | Generate specification for a feature |
|
|
85
|
+
| `/techspec [module]` | Generate technical specification for a module |
|
|
86
|
+
| `/prompts [agent]` | Manage and optimize agent prompts |
|
|
72
87
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
88
|
+
### Feature-size Routing
|
|
89
|
+
|
|
90
|
+
Tasks are automatically classified and routed through the appropriate pipeline:
|
|
91
|
+
|
|
92
|
+
| Size | Criteria | Steps |
|
|
93
|
+
|------|----------|-------|
|
|
94
|
+
| **S** | 1 file, < 50 lines | checkpoint → code → tester+inspector → quick-review → tech-debt → fixation (6 steps) |
|
|
95
|
+
| **M** | 2-5 files, new module | checkpoint → analysis → TDD(RED) → code+tester+inspector → review → tech-debt → fixation (8 steps) |
|
|
96
|
+
| **L** | 6+ files, architecture changes | full cycle with architect, skeptic, per-feature loops, inspector, multi-round review (10 steps) |
|
|
97
|
+
|
|
98
|
+
### Checkpoint System
|
|
99
|
+
|
|
100
|
+
The checkpoint system (`dev-infra/memory/checkpoint.yml`) enables recovery after session interruptions:
|
|
101
|
+
|
|
102
|
+
- **Automatic saving** — checkpoint is updated after each pipeline step
|
|
103
|
+
- **Recovery on start** — `/start-session` detects active checkpoint and offers to resume
|
|
104
|
+
- **Cleanup on completion** — `/complete-task` clears the checkpoint
|
|
105
|
+
|
|
106
|
+
### Hooks
|
|
107
|
+
|
|
108
|
+
- **`protect-docs.sh`** — PreToolUse hook that blocks Edit/Write operations in `docs/` directory
|
|
109
|
+
- **Stop hook** — Reminds to save checkpoint and run `/end-session` before exiting
|
|
110
|
+
|
|
111
|
+
### Rules
|
|
112
|
+
|
|
113
|
+
8 development standards enforced automatically:
|
|
114
|
+
|
|
115
|
+
| Rule | Purpose |
|
|
116
|
+
|------|---------|
|
|
117
|
+
| `commit-conventions` | Commit message format and style |
|
|
118
|
+
| `development-cycle` | Feature-size routing and pipeline steps |
|
|
119
|
+
| `testing-standards` | Test coverage and quality requirements |
|
|
120
|
+
| `shared-resources` | Singleton resource registry and patterns |
|
|
121
|
+
| `context-loading` | Just-in-time context loading, anti-patterns |
|
|
122
|
+
| `agent-output-format` | JSON output standard for all agents |
|
|
123
|
+
| `quality-gates` | Verdict-based routing and quality checkpoints |
|
|
124
|
+
| `rollback-protocol` | Rollback procedures for failed deployments |
|
|
83
125
|
|
|
84
126
|
## Configuration
|
|
85
127
|
|
|
86
128
|
### Agent Presets
|
|
87
129
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
130
|
+
| Preset | Agents | Skills | Description |
|
|
131
|
+
|--------|--------|--------|-------------|
|
|
132
|
+
| **minimal** | 5 | 10 | Essentials + inspector |
|
|
133
|
+
| **core** (default) | 8 | 10 | Full development pipeline |
|
|
134
|
+
| **full** | 20 | 21 | All categories + extra skills |
|
|
91
135
|
|
|
92
136
|
### Interactive Setup
|
|
93
137
|
|
|
94
138
|
```bash
|
|
95
|
-
npx agent-forge init
|
|
139
|
+
npx @alxyrgin/agent-forge init
|
|
96
140
|
```
|
|
97
141
|
|
|
98
142
|
Prompts for:
|
|
@@ -107,7 +151,7 @@ Prompts for:
|
|
|
107
151
|
### Non-interactive
|
|
108
152
|
|
|
109
153
|
```bash
|
|
110
|
-
npx agent-forge init --yes # Use defaults
|
|
154
|
+
npx @alxyrgin/agent-forge init --yes # Use defaults
|
|
111
155
|
```
|
|
112
156
|
|
|
113
157
|
## Commands
|
|
@@ -132,24 +176,33 @@ Verifies all expected files exist and are not empty.
|
|
|
132
176
|
your-project/
|
|
133
177
|
├── .claude/
|
|
134
178
|
│ ├── CLAUDE.md # Team Lead instructions
|
|
135
|
-
│ ├── settings.json # Claude Code hooks
|
|
136
|
-
│ ├──
|
|
137
|
-
│ │
|
|
138
|
-
│
|
|
139
|
-
│ │ ├── developer
|
|
140
|
-
│ │
|
|
141
|
-
│ ├──
|
|
179
|
+
│ ├── settings.json # Claude Code hooks & env
|
|
180
|
+
│ ├── hooks/
|
|
181
|
+
│ │ └── protect-docs.sh # PreToolUse hook
|
|
182
|
+
│ ├── agents/ # 5-20 specialized agents (4 categories)
|
|
183
|
+
│ │ ├── pipeline/ # analyst, architect, skeptic, developer,
|
|
184
|
+
│ │ │ # tester, inspector, reviewer, planner
|
|
185
|
+
│ │ ├── planning/ # researcher, validator, interviewer, decomposer
|
|
186
|
+
│ │ ├── security/ # auditor, prompter, deployer, scaffolder
|
|
187
|
+
│ │ └── documentation/ # librarian, writer, gatekeeper, verifier
|
|
188
|
+
│ ├── skills/ # 10-21 slash commands
|
|
142
189
|
│ │ ├── start-session/SKILL.md
|
|
143
190
|
│ │ ├── take-task/SKILL.md
|
|
144
191
|
│ │ └── ...
|
|
145
|
-
│ └── rules/ #
|
|
192
|
+
│ └── rules/ # 8 development standards
|
|
146
193
|
│ ├── commit-conventions.md
|
|
147
194
|
│ ├── development-cycle.md
|
|
148
|
-
│
|
|
195
|
+
│ ├── testing-standards.md
|
|
196
|
+
│ ├── shared-resources.md
|
|
197
|
+
│ ├── context-loading.md
|
|
198
|
+
│ ├── agent-output-format.md
|
|
199
|
+
│ ├── quality-gates.md
|
|
200
|
+
│ └── rollback-protocol.md
|
|
149
201
|
├── dev-infra/
|
|
150
|
-
│ ├── memory/ #
|
|
202
|
+
│ ├── memory/ # 9 Memory Bank files
|
|
151
203
|
│ │ ├── active-context.md
|
|
152
204
|
│ │ ├── progress.md
|
|
205
|
+
│ │ ├── checkpoint.yml
|
|
153
206
|
│ │ └── ...
|
|
154
207
|
│ ├── tasks/
|
|
155
208
|
│ │ └── tasks.json # Task tracking
|
package/dist/index.js
CHANGED
|
@@ -181,9 +181,9 @@ async function promptProjectSetup(targetDir) {
|
|
|
181
181
|
name: "agentPreset",
|
|
182
182
|
message: "Agent preset:",
|
|
183
183
|
choices: [
|
|
184
|
-
{ name: "Core (8 agents \u2014
|
|
185
|
-
{ name: "Full (
|
|
186
|
-
{ name: "Minimal (
|
|
184
|
+
{ name: "Core (8 agents \u2014 development pipeline)", value: "core" },
|
|
185
|
+
{ name: "Full (20 agents \u2014 all categories + extra skills)", value: "full" },
|
|
186
|
+
{ name: "Minimal (5 agents \u2014 essentials + inspector)", value: "minimal" }
|
|
187
187
|
]
|
|
188
188
|
},
|
|
189
189
|
{
|
|
@@ -276,6 +276,9 @@ async function fileExists(filePath) {
|
|
|
276
276
|
async function readFile(filePath) {
|
|
277
277
|
return fs.readFile(filePath, "utf-8");
|
|
278
278
|
}
|
|
279
|
+
async function makeExecutable(filePath) {
|
|
280
|
+
await fs.chmod(filePath, 493);
|
|
281
|
+
}
|
|
279
282
|
|
|
280
283
|
// src/utils/template.ts
|
|
281
284
|
import fs2 from "fs";
|
|
@@ -302,7 +305,8 @@ var MEMORY_FILES = [
|
|
|
302
305
|
"tech-stack.md",
|
|
303
306
|
"tech-debt.md",
|
|
304
307
|
"patterns.md",
|
|
305
|
-
"troubleshooting.md"
|
|
308
|
+
"troubleshooting.md",
|
|
309
|
+
"checkpoint.yml"
|
|
306
310
|
];
|
|
307
311
|
async function generateMemoryBank(ctx, overwrite) {
|
|
308
312
|
const result = {
|
|
@@ -333,39 +337,82 @@ async function generateMemoryBank(ctx, overwrite) {
|
|
|
333
337
|
|
|
334
338
|
// src/generators/agents.ts
|
|
335
339
|
import path4 from "path";
|
|
336
|
-
var
|
|
340
|
+
var PIPELINE_AGENTS = [
|
|
337
341
|
"analyst",
|
|
338
342
|
"architect",
|
|
343
|
+
"skeptic",
|
|
339
344
|
"developer",
|
|
340
|
-
"
|
|
345
|
+
"tester",
|
|
346
|
+
"inspector",
|
|
341
347
|
"reviewer",
|
|
342
|
-
"
|
|
343
|
-
|
|
344
|
-
|
|
348
|
+
"planner"
|
|
349
|
+
];
|
|
350
|
+
var PLANNING_AGENTS = [
|
|
351
|
+
"researcher",
|
|
352
|
+
"validator",
|
|
353
|
+
"interviewer",
|
|
354
|
+
"decomposer"
|
|
355
|
+
];
|
|
356
|
+
var SECURITY_AGENTS = [
|
|
357
|
+
"auditor",
|
|
358
|
+
"prompter",
|
|
359
|
+
"deployer",
|
|
360
|
+
"scaffolder"
|
|
345
361
|
];
|
|
346
|
-
var
|
|
347
|
-
"
|
|
348
|
-
"
|
|
349
|
-
"
|
|
362
|
+
var DOCUMENTATION_AGENTS = [
|
|
363
|
+
"librarian",
|
|
364
|
+
"writer",
|
|
365
|
+
"gatekeeper",
|
|
366
|
+
"verifier"
|
|
350
367
|
];
|
|
351
368
|
var MINIMAL_AGENTS = [
|
|
352
369
|
"analyst",
|
|
353
370
|
"developer",
|
|
354
|
-
"
|
|
355
|
-
"reviewer"
|
|
371
|
+
"tester",
|
|
372
|
+
"reviewer",
|
|
373
|
+
"inspector"
|
|
374
|
+
];
|
|
375
|
+
var CORE_AGENTS = [...PIPELINE_AGENTS];
|
|
376
|
+
var FULL_AGENTS = [
|
|
377
|
+
...PIPELINE_AGENTS,
|
|
378
|
+
...PLANNING_AGENTS,
|
|
379
|
+
...SECURITY_AGENTS,
|
|
380
|
+
...DOCUMENTATION_AGENTS
|
|
356
381
|
];
|
|
382
|
+
var CATEGORY_MAP = {};
|
|
383
|
+
for (const name of PIPELINE_AGENTS) {
|
|
384
|
+
CATEGORY_MAP[name] = "pipeline";
|
|
385
|
+
}
|
|
386
|
+
for (const name of PLANNING_AGENTS) {
|
|
387
|
+
CATEGORY_MAP[name] = "planning";
|
|
388
|
+
}
|
|
389
|
+
for (const name of SECURITY_AGENTS) {
|
|
390
|
+
CATEGORY_MAP[name] = "security";
|
|
391
|
+
}
|
|
392
|
+
for (const name of DOCUMENTATION_AGENTS) {
|
|
393
|
+
CATEGORY_MAP[name] = "documentation";
|
|
394
|
+
}
|
|
395
|
+
function getAgentCategory(name) {
|
|
396
|
+
return CATEGORY_MAP[name] || "pipeline";
|
|
397
|
+
}
|
|
357
398
|
function getAgentList(preset) {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
399
|
+
let names;
|
|
400
|
+
switch (preset) {
|
|
401
|
+
case "minimal":
|
|
402
|
+
names = MINIMAL_AGENTS;
|
|
403
|
+
break;
|
|
404
|
+
case "full":
|
|
405
|
+
names = FULL_AGENTS;
|
|
406
|
+
break;
|
|
407
|
+
case "core":
|
|
408
|
+
default:
|
|
409
|
+
names = CORE_AGENTS;
|
|
410
|
+
break;
|
|
362
411
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}
|
|
368
|
-
return agents;
|
|
412
|
+
return names.map((name) => ({
|
|
413
|
+
name,
|
|
414
|
+
category: getAgentCategory(name)
|
|
415
|
+
}));
|
|
369
416
|
}
|
|
370
417
|
async function generateAgents(ctx, overwrite) {
|
|
371
418
|
const result = {
|
|
@@ -381,7 +428,7 @@ async function generateAgents(ctx, overwrite) {
|
|
|
381
428
|
for (const agent of agents) {
|
|
382
429
|
try {
|
|
383
430
|
const content = await renderTemplate(
|
|
384
|
-
`agents/${agent.
|
|
431
|
+
`agents/${agent.category}/${agent.name}.md.ejs`,
|
|
385
432
|
templateData
|
|
386
433
|
);
|
|
387
434
|
const outputPath = path4.join(ctx.targetDir, ".claude/agents", `${agent.name}.md`);
|
|
@@ -400,15 +447,43 @@ async function generateAgents(ctx, overwrite) {
|
|
|
400
447
|
|
|
401
448
|
// src/generators/skills.ts
|
|
402
449
|
import path5 from "path";
|
|
403
|
-
var
|
|
450
|
+
var CORE_SKILLS = [
|
|
404
451
|
"start-session",
|
|
405
452
|
"end-session",
|
|
406
453
|
"take-task",
|
|
407
454
|
"complete-task",
|
|
408
455
|
"status",
|
|
409
456
|
"plan",
|
|
410
|
-
"review"
|
|
457
|
+
"review",
|
|
458
|
+
"code",
|
|
459
|
+
"test",
|
|
460
|
+
"done"
|
|
461
|
+
];
|
|
462
|
+
var EXTRA_SKILLS = [
|
|
463
|
+
"interview",
|
|
464
|
+
"audit-wave",
|
|
465
|
+
"write-report",
|
|
466
|
+
"dashboard",
|
|
467
|
+
"skill-master",
|
|
468
|
+
"decompose",
|
|
469
|
+
"feature",
|
|
470
|
+
"security",
|
|
471
|
+
"spec",
|
|
472
|
+
"techspec",
|
|
473
|
+
"prompts"
|
|
411
474
|
];
|
|
475
|
+
function getSkillList(preset) {
|
|
476
|
+
const skills = [];
|
|
477
|
+
for (const name of CORE_SKILLS) {
|
|
478
|
+
skills.push({ name, dir: "core" });
|
|
479
|
+
}
|
|
480
|
+
if (preset === "full") {
|
|
481
|
+
for (const name of EXTRA_SKILLS) {
|
|
482
|
+
skills.push({ name, dir: "extra" });
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
return skills;
|
|
486
|
+
}
|
|
412
487
|
async function generateSkills(ctx, overwrite) {
|
|
413
488
|
const result = {
|
|
414
489
|
filesCreated: [],
|
|
@@ -419,13 +494,14 @@ async function generateSkills(ctx, overwrite) {
|
|
|
419
494
|
...ctx,
|
|
420
495
|
defaultBranch: "main"
|
|
421
496
|
};
|
|
422
|
-
|
|
497
|
+
const skills = getSkillList(ctx.agentPreset);
|
|
498
|
+
for (const skill of skills) {
|
|
423
499
|
try {
|
|
424
500
|
const content = await renderTemplate(
|
|
425
|
-
`skills
|
|
501
|
+
`skills/${skill.dir}/${skill.name}/SKILL.md.ejs`,
|
|
426
502
|
templateData
|
|
427
503
|
);
|
|
428
|
-
const outputPath = path5.join(ctx.targetDir, `.claude/skills/${skill}`, "SKILL.md");
|
|
504
|
+
const outputPath = path5.join(ctx.targetDir, `.claude/skills/${skill.name}`, "SKILL.md");
|
|
429
505
|
const status = await writeFileSafe(outputPath, content, overwrite);
|
|
430
506
|
if (status === "skipped") {
|
|
431
507
|
result.filesSkipped.push(outputPath);
|
|
@@ -433,7 +509,7 @@ async function generateSkills(ctx, overwrite) {
|
|
|
433
509
|
result.filesCreated.push(outputPath);
|
|
434
510
|
}
|
|
435
511
|
} catch (err) {
|
|
436
|
-
result.errors.push(`Skill ${skill}: ${err}`);
|
|
512
|
+
result.errors.push(`Skill ${skill.name}: ${err}`);
|
|
437
513
|
}
|
|
438
514
|
}
|
|
439
515
|
return result;
|
|
@@ -444,7 +520,12 @@ import path6 from "path";
|
|
|
444
520
|
var RULES = [
|
|
445
521
|
"commit-conventions",
|
|
446
522
|
"development-cycle",
|
|
447
|
-
"testing-standards"
|
|
523
|
+
"testing-standards",
|
|
524
|
+
"shared-resources",
|
|
525
|
+
"context-loading",
|
|
526
|
+
"agent-output-format",
|
|
527
|
+
"quality-gates",
|
|
528
|
+
"rollback-protocol"
|
|
448
529
|
];
|
|
449
530
|
async function generateRules(ctx, overwrite) {
|
|
450
531
|
const result = {
|
|
@@ -559,7 +640,7 @@ async function generateInfra(ctx, overwrite) {
|
|
|
559
640
|
}
|
|
560
641
|
try {
|
|
561
642
|
const manifest = {
|
|
562
|
-
version: "
|
|
643
|
+
version: "3.0.0",
|
|
563
644
|
createdAt: ctx.today,
|
|
564
645
|
projectName: ctx.projectName,
|
|
565
646
|
agentPreset: ctx.agentPreset,
|
|
@@ -595,44 +676,105 @@ function getExpectedFiles(ctx) {
|
|
|
595
676
|
"dev-infra/memory/tech-stack.md",
|
|
596
677
|
"dev-infra/memory/tech-debt.md",
|
|
597
678
|
"dev-infra/memory/patterns.md",
|
|
598
|
-
"dev-infra/memory/troubleshooting.md"
|
|
679
|
+
"dev-infra/memory/troubleshooting.md",
|
|
680
|
+
"dev-infra/memory/checkpoint.yml"
|
|
599
681
|
];
|
|
682
|
+
files.push(".claude/hooks/protect-docs.sh");
|
|
600
683
|
files.push(
|
|
601
684
|
".claude/rules/commit-conventions.md",
|
|
602
685
|
".claude/rules/development-cycle.md",
|
|
603
|
-
".claude/rules/testing-standards.md"
|
|
686
|
+
".claude/rules/testing-standards.md",
|
|
687
|
+
".claude/rules/shared-resources.md",
|
|
688
|
+
".claude/rules/context-loading.md",
|
|
689
|
+
".claude/rules/agent-output-format.md",
|
|
690
|
+
".claude/rules/quality-gates.md",
|
|
691
|
+
".claude/rules/rollback-protocol.md"
|
|
604
692
|
);
|
|
605
|
-
const
|
|
693
|
+
const coreSkills = [
|
|
606
694
|
"start-session",
|
|
607
695
|
"end-session",
|
|
608
696
|
"take-task",
|
|
609
697
|
"complete-task",
|
|
610
698
|
"status",
|
|
611
699
|
"plan",
|
|
612
|
-
"review"
|
|
700
|
+
"review",
|
|
701
|
+
"code",
|
|
702
|
+
"test",
|
|
703
|
+
"done"
|
|
704
|
+
];
|
|
705
|
+
const extraSkills = [
|
|
706
|
+
"interview",
|
|
707
|
+
"audit-wave",
|
|
708
|
+
"write-report",
|
|
709
|
+
"dashboard",
|
|
710
|
+
"skill-master",
|
|
711
|
+
"decompose",
|
|
712
|
+
"feature",
|
|
713
|
+
"security",
|
|
714
|
+
"spec",
|
|
715
|
+
"techspec",
|
|
716
|
+
"prompts"
|
|
613
717
|
];
|
|
718
|
+
const skills = ctx.agentPreset === "full" ? [...coreSkills, ...extraSkills] : coreSkills;
|
|
614
719
|
for (const skill of skills) {
|
|
615
720
|
files.push(`.claude/skills/${skill}/SKILL.md`);
|
|
616
721
|
}
|
|
617
|
-
const
|
|
722
|
+
const pipelineAgents = [
|
|
618
723
|
"analyst",
|
|
619
724
|
"architect",
|
|
725
|
+
"skeptic",
|
|
620
726
|
"developer",
|
|
621
|
-
"
|
|
727
|
+
"tester",
|
|
728
|
+
"inspector",
|
|
622
729
|
"reviewer",
|
|
623
|
-
"
|
|
624
|
-
"doc-writer",
|
|
625
|
-
"progress-tracker"
|
|
730
|
+
"planner"
|
|
626
731
|
];
|
|
627
|
-
const
|
|
628
|
-
const
|
|
629
|
-
const
|
|
732
|
+
const planningAgents = ["researcher", "validator", "interviewer", "decomposer"];
|
|
733
|
+
const securityAgents = ["auditor", "prompter", "deployer", "scaffolder"];
|
|
734
|
+
const documentationAgents = ["librarian", "writer", "gatekeeper", "verifier"];
|
|
735
|
+
const minimalAgents = ["analyst", "developer", "tester", "reviewer", "inspector"];
|
|
736
|
+
const coreAgents = [...pipelineAgents];
|
|
737
|
+
const fullAgents = [
|
|
738
|
+
...pipelineAgents,
|
|
739
|
+
...planningAgents,
|
|
740
|
+
...securityAgents,
|
|
741
|
+
...documentationAgents
|
|
742
|
+
];
|
|
743
|
+
const agents = ctx.agentPreset === "minimal" ? minimalAgents : ctx.agentPreset === "full" ? fullAgents : coreAgents;
|
|
630
744
|
for (const agent of agents) {
|
|
631
745
|
files.push(`.claude/agents/${agent}.md`);
|
|
632
746
|
}
|
|
633
747
|
return files;
|
|
634
748
|
}
|
|
635
749
|
|
|
750
|
+
// src/generators/hooks.ts
|
|
751
|
+
import path9 from "path";
|
|
752
|
+
async function generateHooks(ctx, overwrite) {
|
|
753
|
+
const result = {
|
|
754
|
+
filesCreated: [],
|
|
755
|
+
filesSkipped: [],
|
|
756
|
+
errors: []
|
|
757
|
+
};
|
|
758
|
+
const templateData = {
|
|
759
|
+
...ctx,
|
|
760
|
+
defaultBranch: "main"
|
|
761
|
+
};
|
|
762
|
+
try {
|
|
763
|
+
const content = await renderTemplate("hooks/protect-docs.sh.ejs", templateData);
|
|
764
|
+
const outputPath = path9.join(ctx.targetDir, ".claude/hooks/protect-docs.sh");
|
|
765
|
+
const status = await writeFileSafe(outputPath, content, overwrite);
|
|
766
|
+
if (status === "skipped") {
|
|
767
|
+
result.filesSkipped.push(outputPath);
|
|
768
|
+
} else {
|
|
769
|
+
result.filesCreated.push(outputPath);
|
|
770
|
+
await makeExecutable(outputPath);
|
|
771
|
+
}
|
|
772
|
+
} catch (err) {
|
|
773
|
+
result.errors.push(`Hook protect-docs.sh: ${err}`);
|
|
774
|
+
}
|
|
775
|
+
return result;
|
|
776
|
+
}
|
|
777
|
+
|
|
636
778
|
// src/generators/index.ts
|
|
637
779
|
async function generateAll(ctx, overwrite = false) {
|
|
638
780
|
const result = {
|
|
@@ -646,6 +788,7 @@ async function generateAll(ctx, overwrite = false) {
|
|
|
646
788
|
generateSkills,
|
|
647
789
|
generateRules,
|
|
648
790
|
generateMemoryBank,
|
|
791
|
+
generateHooks,
|
|
649
792
|
generateInfra
|
|
650
793
|
];
|
|
651
794
|
for (const generator of generators) {
|
|
@@ -665,7 +808,7 @@ async function generateAll(ctx, overwrite = false) {
|
|
|
665
808
|
async function initCommand(options) {
|
|
666
809
|
const targetDir = process.cwd();
|
|
667
810
|
console.log();
|
|
668
|
-
console.log(chalk.bold(" agent-forge
|
|
811
|
+
console.log(chalk.bold(" agent-forge v3.0.0"));
|
|
669
812
|
console.log(chalk.dim(" AI-driven Development Framework for Claude Code"));
|
|
670
813
|
console.log();
|
|
671
814
|
let ctx;
|
|
@@ -708,7 +851,7 @@ async function initCommand(options) {
|
|
|
708
851
|
}
|
|
709
852
|
|
|
710
853
|
// src/commands/doctor.ts
|
|
711
|
-
import
|
|
854
|
+
import path10 from "path";
|
|
712
855
|
import chalk2 from "chalk";
|
|
713
856
|
async function doctorCommand() {
|
|
714
857
|
const targetDir = process.cwd();
|
|
@@ -716,7 +859,7 @@ async function doctorCommand() {
|
|
|
716
859
|
console.log(chalk2.bold(" agent-forge doctor"));
|
|
717
860
|
console.log(chalk2.dim(" Checking project structure integrity..."));
|
|
718
861
|
console.log();
|
|
719
|
-
const manifestPath =
|
|
862
|
+
const manifestPath = path10.join(targetDir, ".claude-forge.json");
|
|
720
863
|
const manifestExists = await fileExists(manifestPath);
|
|
721
864
|
if (!manifestExists) {
|
|
722
865
|
console.log(chalk2.red(" .claude-forge.json not found"));
|
|
@@ -739,7 +882,7 @@ async function doctorCommand() {
|
|
|
739
882
|
let okCount = 0;
|
|
740
883
|
let failCount = 0;
|
|
741
884
|
for (const file of manifest.expectedFiles) {
|
|
742
|
-
const filePath =
|
|
885
|
+
const filePath = path10.join(targetDir, file);
|
|
743
886
|
const exists = await fileExists(filePath);
|
|
744
887
|
const check = {
|
|
745
888
|
name: file,
|
|
@@ -801,7 +944,7 @@ async function doctorCommand() {
|
|
|
801
944
|
|
|
802
945
|
// src/index.ts
|
|
803
946
|
var program = new Command();
|
|
804
|
-
program.name("agent-forge").description("AI-driven Development Framework for Claude Code").version("
|
|
947
|
+
program.name("agent-forge").description("AI-driven Development Framework for Claude Code").version("3.0.0");
|
|
805
948
|
program.command("init").description("Initialize AI-driven development infrastructure in the current project").option("-y, --yes", "Skip prompts and use defaults").option("--overwrite", "Overwrite existing files").action(initCommand);
|
|
806
949
|
program.command("doctor").description("Check integrity of the generated structure").action(doctorCommand);
|
|
807
950
|
program.parse();
|