agent-eng 0.6.0 → 0.8.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 +17 -12
- package/package.json +1 -1
- package/src/index.js +2 -2
- package/src/init.js +49 -11
- package/src/templates/{prompts → .claude/agents}/architect.md +7 -2
- package/src/templates/{prompts → .claude/agents}/custodian.md +7 -2
- package/src/templates/{prompts → .claude/agents}/executor.md +6 -1
- package/src/templates/{prompts → .claude/agents}/planner.md +6 -1
- package/src/templates/{prompts → .claude/agents}/qa-tester.md +9 -4
- package/src/templates/{prompts → .claude/agents}/reviewer.md +6 -1
- package/src/templates/{prompts → .claude/agents}/system-architect.md +6 -1
- package/src/templates/CLAUDE.md +12 -12
- package/src/templates/orchestration.yaml +8 -8
package/README.md
CHANGED
|
@@ -8,22 +8,27 @@ Scaffold a structured agentic engineering workflow into any project. Run one com
|
|
|
8
8
|
npx agent-eng init
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
This creates the following structure in your project:
|
|
11
|
+
This creates the following structure in your project:
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
├── CLAUDE.md # Project instructions for AI agents
|
|
15
15
|
├── orchestration.yaml # Agent workflow definition (roles, outputs)
|
|
16
16
|
├── architecture.yaml # System architecture definition (components, connections)
|
|
17
|
+
├── .claude/
|
|
18
|
+
│ ├── settings.json # Claude Code project settings (MCP servers)
|
|
19
|
+
│ └── agents/ # Auto-wired Claude Code subagents — invoke via Agent tool
|
|
20
|
+
│ ├── architect.md
|
|
21
|
+
│ ├── system-architect.md
|
|
22
|
+
│ ├── planner.md
|
|
23
|
+
│ ├── executor.md
|
|
24
|
+
│ ├── qa-tester.md
|
|
25
|
+
│ ├── reviewer.md
|
|
26
|
+
│ └── custodian.md
|
|
17
27
|
├── architecture/
|
|
18
28
|
│ ├── overview.md # High-level architecture overview
|
|
19
29
|
│ └── decisions/
|
|
20
30
|
│ ├── _template.md # ADR template
|
|
21
31
|
│ └── 0001-how-we-work.md # Seed ADR: the workflow itself
|
|
22
|
-
├── prompts/
|
|
23
|
-
│ ├── architect.md # System prompt for the Architect role
|
|
24
|
-
│ ├── system-architect.md # System prompt for system architecture mapping
|
|
25
|
-
│ ├── planner.md # System prompt for the Planner role
|
|
26
|
-
│ └── reviewer.md # System prompt for the Reviewer role
|
|
27
32
|
├── specs/
|
|
28
33
|
│ └── _template.md # Feature specification template
|
|
29
34
|
├── tickets/
|
|
@@ -72,7 +77,7 @@ The scaffolded workflow separates AI-assisted engineering into five roles:
|
|
|
72
77
|
| **Executor** | Implements tickets following conventions, proposes plan first | Code and PRs |
|
|
73
78
|
| **Reviewer** | Validates code against acceptance criteria and ADRs | Approval or actionable feedback |
|
|
74
79
|
|
|
75
|
-
Each role
|
|
80
|
+
Each role is wired as a Claude Code subagent in `.claude/agents/`. Invoke them via the Agent tool (`subagent_type: "architect"`, etc.), or just describe the task — Claude will route to the right subagent based on each agent's `description` frontmatter.
|
|
76
81
|
|
|
77
82
|
## YAML Definitions
|
|
78
83
|
|
|
@@ -88,11 +93,11 @@ Defines the runtime system components, their tiers (client/service/engine/data),
|
|
|
88
93
|
|
|
89
94
|
1. **Review `CLAUDE.md`** — Customize the project instructions for your specific project
|
|
90
95
|
2. **Pick your conventions** — Keep the ones that match your stack, remove the rest
|
|
91
|
-
3. **Start with the Architect** —
|
|
92
|
-
4. **Map the system** —
|
|
93
|
-
5. **Plan the work** —
|
|
94
|
-
6. **Execute** —
|
|
95
|
-
7. **Review** —
|
|
96
|
+
3. **Start with the Architect** — Ask Claude to use the `architect` subagent to create your first ADR
|
|
97
|
+
4. **Map the system** — Use the `system-architect` subagent to create your `architecture.yaml`
|
|
98
|
+
5. **Plan the work** — Use the `planner` subagent to decompose your ADR into tickets
|
|
99
|
+
6. **Execute** — Use the `executor` subagent to implement a ticket following your conventions
|
|
100
|
+
7. **Test & Review** — Use the `qa-tester` and `reviewer` subagents to validate the work
|
|
96
101
|
|
|
97
102
|
## License
|
|
98
103
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -18,7 +18,7 @@ Examples:
|
|
|
18
18
|
agent-eng init --dir ./my-project --conventions java
|
|
19
19
|
`;
|
|
20
20
|
|
|
21
|
-
export function run(args) {
|
|
21
|
+
export async function run(args) {
|
|
22
22
|
const command = args[0];
|
|
23
23
|
|
|
24
24
|
if (!command || command === "-h" || command === "--help") {
|
|
@@ -28,7 +28,7 @@ export function run(args) {
|
|
|
28
28
|
|
|
29
29
|
if (command === "init") {
|
|
30
30
|
const options = parseInitArgs(args.slice(1));
|
|
31
|
-
init(options);
|
|
31
|
+
await init(options);
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
|
package/src/init.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { cpSync, existsSync, mkdirSync, readFileSync
|
|
1
|
+
import { appendFileSync, cpSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
2
|
+
import { createInterface } from "node:readline";
|
|
2
3
|
import { dirname, join, resolve } from "node:path";
|
|
3
4
|
import { fileURLToPath } from "node:url";
|
|
4
5
|
|
|
@@ -8,26 +9,35 @@ const TEMPLATES = join(__dirname, "templates");
|
|
|
8
9
|
const STRUCTURE = [
|
|
9
10
|
".github/workflows/notify-site.yml",
|
|
10
11
|
".claude/settings.json",
|
|
12
|
+
".claude/agents/architect.md",
|
|
13
|
+
".claude/agents/custodian.md",
|
|
14
|
+
".claude/agents/executor.md",
|
|
15
|
+
".claude/agents/planner.md",
|
|
16
|
+
".claude/agents/qa-tester.md",
|
|
17
|
+
".claude/agents/reviewer.md",
|
|
18
|
+
".claude/agents/system-architect.md",
|
|
11
19
|
"architecture/overview.md",
|
|
12
20
|
"architecture/decisions/_template.md",
|
|
13
21
|
"architecture/decisions/0001-how-we-work.md",
|
|
14
|
-
"prompts/architect.md",
|
|
15
|
-
"prompts/custodian.md",
|
|
16
|
-
"prompts/executor.md",
|
|
17
|
-
"prompts/planner.md",
|
|
18
|
-
"prompts/qa-tester.md",
|
|
19
|
-
"prompts/reviewer.md",
|
|
20
|
-
"prompts/system-architect.md",
|
|
21
22
|
"specs/_template.md",
|
|
22
23
|
"tickets/_template.md",
|
|
23
24
|
"tickets/_backlog.md",
|
|
24
25
|
"tickets/example/001-example-ticket.md",
|
|
25
26
|
"orchestration.yaml",
|
|
26
27
|
"architecture.yaml",
|
|
27
|
-
"CLAUDE.md",
|
|
28
28
|
];
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
function prompt(question) {
|
|
31
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
32
|
+
return new Promise((resolve) => {
|
|
33
|
+
rl.question(question, (answer) => {
|
|
34
|
+
rl.close();
|
|
35
|
+
resolve(answer.trim().toLowerCase());
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export async function init(options) {
|
|
31
41
|
const target = resolve(options.dir);
|
|
32
42
|
const created = [];
|
|
33
43
|
const skipped = [];
|
|
@@ -46,6 +56,34 @@ export function init(options) {
|
|
|
46
56
|
created.push(file);
|
|
47
57
|
}
|
|
48
58
|
|
|
59
|
+
// Handle CLAUDE.md separately — prompt user if it already exists
|
|
60
|
+
const claudeDest = join(target, "CLAUDE.md");
|
|
61
|
+
const claudeSrc = join(TEMPLATES, "CLAUDE.md");
|
|
62
|
+
|
|
63
|
+
if (!existsSync(claudeDest) || options.force) {
|
|
64
|
+
mkdirSync(dirname(claudeDest), { recursive: true });
|
|
65
|
+
cpSync(claudeSrc, claudeDest);
|
|
66
|
+
created.push("CLAUDE.md");
|
|
67
|
+
} else {
|
|
68
|
+
console.log("");
|
|
69
|
+
console.log("CLAUDE.md already exists.");
|
|
70
|
+
console.log(" 1) Skip — keep existing file");
|
|
71
|
+
console.log(" 2) Append — add agent-eng content to the end");
|
|
72
|
+
console.log(" 3) Replace — overwrite with agent-eng template");
|
|
73
|
+
const answer = await prompt("Choose [1/2/3] (default: 1): ");
|
|
74
|
+
|
|
75
|
+
if (answer === "2" || answer === "append") {
|
|
76
|
+
const content = readFileSync(claudeSrc, "utf8");
|
|
77
|
+
appendFileSync(claudeDest, "\n\n" + content);
|
|
78
|
+
created.push("CLAUDE.md (appended)");
|
|
79
|
+
} else if (answer === "3" || answer === "replace") {
|
|
80
|
+
cpSync(claudeSrc, claudeDest);
|
|
81
|
+
created.push("CLAUDE.md (replaced)");
|
|
82
|
+
} else {
|
|
83
|
+
skipped.push("CLAUDE.md");
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
49
87
|
for (const convention of options.conventions) {
|
|
50
88
|
const file = `conventions/${convention}.md`;
|
|
51
89
|
const dest = join(target, file);
|
|
@@ -84,7 +122,7 @@ export function init(options) {
|
|
|
84
122
|
console.log("Next steps:");
|
|
85
123
|
console.log(" 1. Review CLAUDE.md and customize for your project");
|
|
86
124
|
console.log(" 2. Pick the conventions that match your stack");
|
|
87
|
-
console.log(" 3. Start with the Architect: create your first ADR");
|
|
125
|
+
console.log(" 3. Start with the Architect subagent: ask Claude to use the 'architect' agent to create your first ADR");
|
|
88
126
|
console.log(" 4. Add the SITE_REBUILD_TOKEN secret and 'showcase' topic to enable auto site rebuilds");
|
|
89
127
|
console.log("");
|
|
90
128
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: architect
|
|
3
|
+
description: Use when the user wants to design a system, evaluate architectural alternatives, or produce an Architecture Decision Record (ADR). This agent asks clarifying questions before deciding and does not write application code.
|
|
4
|
+
tools: Read, Grep, Glob, Write, Edit, WebFetch
|
|
5
|
+
model: opus
|
|
6
|
+
---
|
|
2
7
|
|
|
3
8
|
You are an architect agent. Your role is to make design decisions and produce Architecture Decision Records (ADRs).
|
|
4
9
|
|
|
@@ -12,7 +17,7 @@ You are an architect agent. Your role is to make design decisions and produce Ar
|
|
|
12
17
|
|
|
13
18
|
## Constraints
|
|
14
19
|
|
|
15
|
-
- You have **read access** to the codebase but **do not write code**
|
|
20
|
+
- You have **read access** to the codebase but **do not write application code**
|
|
16
21
|
- You produce ADRs, not implementations
|
|
17
22
|
- You ask questions before making decisions, not after
|
|
18
23
|
- You document tradeoffs, not just the chosen path
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: custodian
|
|
3
|
+
description: Use periodically (after a batch of tickets, or when CLAUDE.md grows past 200 lines) to keep CLAUDE.md lean, current, and routed to external files. Modifies only CLAUDE.md and the files it links to.
|
|
4
|
+
tools: Read, Write, Edit, Grep, Glob
|
|
5
|
+
model: haiku
|
|
6
|
+
---
|
|
2
7
|
|
|
3
8
|
You are a custodian agent. Your role is to maintain the project's `CLAUDE.md` file — keeping it accurate, lean, and well-routed.
|
|
4
9
|
|
|
@@ -41,7 +46,7 @@ You are a custodian agent. Your role is to maintain the project's `CLAUDE.md` fi
|
|
|
41
46
|
- Business context or domain knowledge → `docs/context/<topic>.md`
|
|
42
47
|
- Style guides → `conventions/style.md` or similar
|
|
43
48
|
- API contracts or integration details → `docs/<integration>.md`
|
|
44
|
-
- Large workflow instructions →
|
|
49
|
+
- Large workflow / role instructions → `.claude/agents/<role>.md`
|
|
45
50
|
|
|
46
51
|
## Routing format
|
|
47
52
|
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: executor
|
|
3
|
+
description: Use when the user wants to implement a specific ticket. Reads the ticket, proposes a plan first, then implements following project conventions and ADRs. Verifies work end-to-end before marking done.
|
|
4
|
+
tools: Read, Write, Edit, Grep, Glob, Bash, WebFetch
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
2
7
|
|
|
3
8
|
You are an executor agent. Your role is to implement tickets by writing code that follows the project's conventions and architecture decisions.
|
|
4
9
|
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: planner
|
|
3
|
+
description: Use when the user has an ADR or spec and wants it decomposed into actionable tickets with acceptance criteria. Produces tickets in feature folders and updates the backlog.
|
|
4
|
+
tools: Read, Grep, Glob, Write, Edit
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
2
7
|
|
|
3
8
|
You are a planner agent. Your role is to decompose specs and ADRs into actionable tickets.
|
|
4
9
|
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: qa-tester
|
|
3
|
+
description: Use after a feature is implemented to write automated tests covering the acceptance criteria, edge cases, and regressions. Does not modify feature code.
|
|
4
|
+
tools: Read, Write, Edit, Grep, Glob, Bash
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
2
7
|
|
|
3
8
|
You are a QA tester agent. Your role is to write automated tests for completed features, ensuring they meet acceptance criteria and catch regressions.
|
|
4
9
|
|
|
@@ -46,9 +51,9 @@ You are a QA tester agent. Your role is to write automated tests for completed f
|
|
|
46
51
|
|
|
47
52
|
| Acceptance Criterion | Test(s) | Status |
|
|
48
53
|
|---|---|---|
|
|
49
|
-
| Criterion 1 | `should handle valid input` |
|
|
50
|
-
| Criterion 2 | `should reject empty input`, `should reject null` |
|
|
51
|
-
| Criterion 3 | `should return paginated results` |
|
|
54
|
+
| Criterion 1 | `should handle valid input` | Pass |
|
|
55
|
+
| Criterion 2 | `should reject empty input`, `should reject null` | Pass |
|
|
56
|
+
| Criterion 3 | `should return paginated results` | Pass |
|
|
52
57
|
|
|
53
58
|
### Edge Cases
|
|
54
59
|
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: reviewer
|
|
3
|
+
description: Use to review a diff or completed ticket against acceptance criteria, ADRs, and conventions. Flags issues with specific file:line references but does not fix them.
|
|
4
|
+
tools: Read, Grep, Glob, Bash
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
2
7
|
|
|
3
8
|
You are a reviewer agent. Your role is to review code changes against acceptance criteria and architectural decisions.
|
|
4
9
|
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: system-architect
|
|
3
|
+
description: Use when the user wants to map or update the runtime architecture of the project — components, tiers, connections, protocols. Produces or updates `architecture.yaml`.
|
|
4
|
+
tools: Read, Grep, Glob, Write, Edit
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
2
7
|
|
|
3
8
|
You are a system architect agent. Your role is to define and document the system architecture of a project as a structured `architecture.yaml` file.
|
|
4
9
|
|
package/src/templates/CLAUDE.md
CHANGED
|
@@ -4,17 +4,17 @@ This project uses a structured agentic engineering workflow. Before starting any
|
|
|
4
4
|
|
|
5
5
|
## Workflow
|
|
6
6
|
|
|
7
|
-
This project separates AI-assisted work into
|
|
8
|
-
|
|
9
|
-
| Role |
|
|
10
|
-
|
|
11
|
-
| **Architect** | `
|
|
12
|
-
| **System Architect** | `
|
|
13
|
-
| **Planner** | `
|
|
14
|
-
| **Executor** | `
|
|
15
|
-
| **QA Tester** | `
|
|
16
|
-
| **Reviewer** | `
|
|
17
|
-
| **Custodian** | `
|
|
7
|
+
This project separates AI-assisted work into seven roles. Each role is a Claude Code subagent in `.claude/agents/` — invoke them via the Agent tool with `subagent_type: "<name>"` (e.g., `subagent_type: "architect"`). Claude will also auto-route work to the appropriate subagent based on each agent's `description`.
|
|
8
|
+
|
|
9
|
+
| Role | Subagent | Responsibility |
|
|
10
|
+
|------|----------|----------------|
|
|
11
|
+
| **Architect** | `architect` | Analyze requirements, ask clarifying questions, produce ADRs |
|
|
12
|
+
| **System Architect** | `system-architect` | Map and document system architecture as `architecture.yaml` |
|
|
13
|
+
| **Planner** | `planner` | Decompose specs and ADRs into actionable tickets |
|
|
14
|
+
| **Executor** | `executor` | Implement tickets, verify work before requesting feedback |
|
|
15
|
+
| **QA Tester** | `qa-tester` | Write automated tests for completed features |
|
|
16
|
+
| **Reviewer** | `reviewer` | Validate code and tests against acceptance criteria and ADRs |
|
|
17
|
+
| **Custodian** | `custodian` | Keep CLAUDE.md lean (≤200 lines), current, and routed to external files |
|
|
18
18
|
|
|
19
19
|
## Sub-Agent Deployment
|
|
20
20
|
|
|
@@ -70,7 +70,7 @@ Use the Agent tool with these parameters:
|
|
|
70
70
|
- `specs/` — Feature specifications
|
|
71
71
|
- `tickets/` — Work items organized by feature folder, with `_backlog.md` as the sprint board
|
|
72
72
|
- `conventions/` — Language and framework coding standards
|
|
73
|
-
-
|
|
73
|
+
- `.claude/agents/` — Subagent definitions for each role (Architect, Planner, Executor, etc.)
|
|
74
74
|
|
|
75
75
|
## MCP Servers
|
|
76
76
|
|
|
@@ -12,7 +12,7 @@ agents:
|
|
|
12
12
|
- Specs
|
|
13
13
|
- Constraints
|
|
14
14
|
color: indigo
|
|
15
|
-
docLink: /
|
|
15
|
+
docLink: /.claude/agents/architect.md
|
|
16
16
|
|
|
17
17
|
- id: system-architect
|
|
18
18
|
kind: decision
|
|
@@ -24,7 +24,7 @@ agents:
|
|
|
24
24
|
- Component map
|
|
25
25
|
- Connection diagram
|
|
26
26
|
color: green
|
|
27
|
-
docLink: /
|
|
27
|
+
docLink: /.claude/agents/system-architect.md
|
|
28
28
|
|
|
29
29
|
- id: planner
|
|
30
30
|
kind: planning
|
|
@@ -36,7 +36,7 @@ agents:
|
|
|
36
36
|
- Milestones
|
|
37
37
|
- Criteria
|
|
38
38
|
color: indigo
|
|
39
|
-
docLink: /
|
|
39
|
+
docLink: /.claude/agents/planner.md
|
|
40
40
|
|
|
41
41
|
- id: executor
|
|
42
42
|
kind: execution
|
|
@@ -48,7 +48,7 @@ agents:
|
|
|
48
48
|
- PRs
|
|
49
49
|
- Plan docs
|
|
50
50
|
color: indigo
|
|
51
|
-
docLink: /
|
|
51
|
+
docLink: /.claude/agents/executor.md
|
|
52
52
|
|
|
53
53
|
- id: qa-tester
|
|
54
54
|
kind: validation
|
|
@@ -60,7 +60,7 @@ agents:
|
|
|
60
60
|
- Coverage report
|
|
61
61
|
- Test plan
|
|
62
62
|
color: green
|
|
63
|
-
docLink: /
|
|
63
|
+
docLink: /.claude/agents/qa-tester.md
|
|
64
64
|
|
|
65
65
|
- id: reviewer
|
|
66
66
|
kind: validation
|
|
@@ -72,7 +72,7 @@ agents:
|
|
|
72
72
|
- Approval
|
|
73
73
|
- Notes
|
|
74
74
|
color: amber
|
|
75
|
-
docLink: /
|
|
75
|
+
docLink: /.claude/agents/reviewer.md
|
|
76
76
|
|
|
77
77
|
- id: custodian
|
|
78
78
|
kind: maintenance
|
|
@@ -82,8 +82,8 @@ agents:
|
|
|
82
82
|
outputs:
|
|
83
83
|
- Updated CLAUDE.md
|
|
84
84
|
- Extracted reference files
|
|
85
|
-
color:
|
|
86
|
-
docLink: /
|
|
85
|
+
color: blue
|
|
86
|
+
docLink: /.claude/agents/custodian.md
|
|
87
87
|
|
|
88
88
|
connections:
|
|
89
89
|
- from: architect
|