@patricksardinha/agentkit-cli 0.5.2 → 0.6.1
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 +202 -145
- package/dist/cli.cjs +33 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +33 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/src/generators/playbookGenerator.ts +34 -1
- package/tests/generators/playbookGenerator.test.ts +24 -0
package/README.md
CHANGED
|
@@ -29,22 +29,19 @@ This is a deliberate choice. AgentKit is a **structural tool** — it generates
|
|
|
29
29
|
- **You** — you optionally write a `PROJECT_BLUEPRINT.md` describing what you want to build
|
|
30
30
|
- **Claude Code** — it either reads your blueprint or asks you questions, decomposes the project into specialized agents, then executes them in sequence
|
|
31
31
|
|
|
32
|
-
This separation means AgentKit works with any LLM and never becomes outdated
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- **
|
|
36
|
-
provider (Anthropic, OpenAI, etc.)
|
|
37
|
-
- **Local models via Ollama** are free to run, but require a machine with
|
|
38
|
-
sufficient RAM and ideally a dedicated GPU — a standard laptop may
|
|
39
|
-
struggle with larger models
|
|
32
|
+
This separation means AgentKit works with any LLM and never becomes outdated as AI models improve. The tool itself costs nothing to run — but be aware:
|
|
33
|
+
|
|
34
|
+
- **Claude Code or any hosted LLM** requires a paid subscription to the provider (Anthropic, OpenAI, etc.)
|
|
35
|
+
- **Local models via Ollama** are free to run, but require a machine with sufficient RAM and ideally a dedicated GPU — a standard laptop may struggle with larger models
|
|
40
36
|
- **AgentKit itself** has no cost, no API key, and no usage limits
|
|
41
37
|
|
|
42
38
|
```
|
|
43
39
|
You (optionally write a blueprint)
|
|
44
40
|
↓
|
|
45
|
-
AgentKit CLI (generates the structure)
|
|
41
|
+
AgentKit CLI (detects stack or asks you, generates the structure)
|
|
46
42
|
↓
|
|
47
|
-
Claude Code (
|
|
43
|
+
Claude Code (reads blueprint or asks questions → decomposes → pauses
|
|
44
|
+
for skills enrichment → executes agents in sequence)
|
|
48
45
|
↓
|
|
49
46
|
Your finished project
|
|
50
47
|
```
|
|
@@ -67,7 +64,27 @@ AgentKit solves all five — including the last one, by always delegating decomp
|
|
|
67
64
|
|
|
68
65
|
## How It Works
|
|
69
66
|
|
|
70
|
-
AgentKit always runs in
|
|
67
|
+
AgentKit always runs in three phases inside Claude Code. The full flow looks like this:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
Phase 0 — Decomposition or Discovery
|
|
71
|
+
Claude Code reads your blueprint (or asks you 3 questions)
|
|
72
|
+
→ proposes a list of agents
|
|
73
|
+
→ waits for your validation
|
|
74
|
+
↓
|
|
75
|
+
Skills Enrichment pause
|
|
76
|
+
Claude Code creates agents/agent-N-slug/ folders
|
|
77
|
+
→ announces what folders were created
|
|
78
|
+
→ waits for you to add context files (API docs, schemas, etc.)
|
|
79
|
+
→ you type "proceed" when ready
|
|
80
|
+
↓
|
|
81
|
+
Phase 1 — Execution
|
|
82
|
+
Claude Code executes each agent in sequence
|
|
83
|
+
→ validates success criterion after each one
|
|
84
|
+
→ retries on failure (max 3)
|
|
85
|
+
→ escalates to human if blocked
|
|
86
|
+
→ 🎉 announces completion
|
|
87
|
+
```
|
|
71
88
|
|
|
72
89
|
### Without blueprint — Phase 0 asks you
|
|
73
90
|
|
|
@@ -75,30 +92,27 @@ AgentKit always runs in two phases inside Claude Code. **Phase 0 always runs fir
|
|
|
75
92
|
npx @patricksardinha/agentkit-cli init
|
|
76
93
|
```
|
|
77
94
|
|
|
78
|
-
|
|
95
|
+
Claude Code starts with **Phase 0 — Project Discovery**: it asks you three questions and waits for your answers before proposing any decomposition.
|
|
79
96
|
|
|
80
97
|
```
|
|
81
98
|
Claude Code: "Before I start, I need to understand what you want to build.
|
|
82
99
|
|
|
83
100
|
1. What is this project? (one sentence)
|
|
84
101
|
2. What are the main features you want to build?
|
|
85
|
-
3. Any tech constraints or architecture preferences?
|
|
102
|
+
3. Any tech constraints or architecture preferences?"
|
|
86
103
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
You: "It's a desktop app where I log my dev sessions.
|
|
90
|
-
Features: session logging, weekly summaries, natural language search.
|
|
91
|
-
Constraints: Tauri v2, all local, no cloud, Ollama for AI."
|
|
104
|
+
You: "A desktop app for logging dev sessions, with Tauri v2,
|
|
105
|
+
local RAG via Ollama, no cloud."
|
|
92
106
|
|
|
93
107
|
Claude Code: "I've decomposed the project into 5 agents:
|
|
94
108
|
1. Infra & Tauri Setup
|
|
95
109
|
2. Data Layer (Dexie)
|
|
96
110
|
3. Ollama Integration
|
|
97
|
-
4.
|
|
98
|
-
5.
|
|
111
|
+
4. UI & Pages
|
|
112
|
+
5. RAG, Export & Release
|
|
99
113
|
Should I proceed?"
|
|
100
114
|
|
|
101
|
-
You: "Yes."
|
|
115
|
+
You: "Yes."
|
|
102
116
|
```
|
|
103
117
|
|
|
104
118
|
### With blueprint — Phase 0 reads your file
|
|
@@ -109,18 +123,19 @@ Write a `PROJECT_BLUEPRINT.md` at the root of your project in plain language —
|
|
|
109
123
|
npx @patricksardinha/agentkit-cli init --blueprint PROJECT_BLUEPRINT.md
|
|
110
124
|
```
|
|
111
125
|
|
|
112
|
-
|
|
126
|
+
Claude Code starts with **Phase 0 — Agent Decomposition**: it reads your blueprint and proposes an agent structure before writing any code.
|
|
113
127
|
|
|
114
128
|
```
|
|
115
|
-
Claude Code: "I've read PROJECT_BLUEPRINT.md and decomposed the project into
|
|
116
|
-
1. Infra &
|
|
129
|
+
Claude Code: "I've read PROJECT_BLUEPRINT.md and decomposed the project into 6 agents:
|
|
130
|
+
1. Infra & Configuration
|
|
117
131
|
2. Data Layer (Dexie)
|
|
118
132
|
3. Ollama Integration
|
|
119
|
-
4.
|
|
120
|
-
5.
|
|
133
|
+
4. UI & Pages
|
|
134
|
+
5. Advanced Features (RAG, Export)
|
|
135
|
+
6. Build & Release
|
|
121
136
|
Should I proceed?"
|
|
122
137
|
|
|
123
|
-
You: "Yes."
|
|
138
|
+
You: "Yes."
|
|
124
139
|
```
|
|
125
140
|
|
|
126
141
|
**A good blueprint looks like this:**
|
|
@@ -154,19 +169,62 @@ I also want to search my history in natural language.
|
|
|
154
169
|
- Export via Tauri fs plugin
|
|
155
170
|
```
|
|
156
171
|
|
|
157
|
-
###
|
|
172
|
+
### Skills Enrichment pause — between Phase 0 and Phase 1
|
|
173
|
+
|
|
174
|
+
This is the key moment where you can inject project-specific knowledge
|
|
175
|
+
into individual agents — **before they start writing code**.
|
|
176
|
+
|
|
177
|
+
After you validate the decomposition, Claude Code creates all agent folders
|
|
178
|
+
and pauses:
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
Claude Code: "Agent folders created under agents/:
|
|
182
|
+
- agents/agent-1-infra-scaffold/skills.md
|
|
183
|
+
- agents/agent-2-data-dexie/skills.md
|
|
184
|
+
- agents/agent-3-ollama-service/skills.md
|
|
185
|
+
- agents/agent-4-ui-pages/skills.md
|
|
186
|
+
- agents/agent-5-features-rag-export/skills.md
|
|
187
|
+
- agents/agent-6-build-release/skills.md
|
|
188
|
+
|
|
189
|
+
You can now enrich any skills.md with additional context:
|
|
190
|
+
- API documentation
|
|
191
|
+
- Database schemas
|
|
192
|
+
- Algorithm references
|
|
193
|
+
- Business conventions
|
|
194
|
+
- Any project-specific knowledge
|
|
195
|
+
|
|
196
|
+
Add .md files directly in the relevant agent folder —
|
|
197
|
+
I will read everything in agents/agent-{N}-{slug}/ before
|
|
198
|
+
starting that agent.
|
|
199
|
+
|
|
200
|
+
Type 'proceed' when you're ready and I'll start Phase 1."
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
You can then drop any context files into the agent folders:
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
agents/
|
|
207
|
+
├── agent-3-ollama-service/
|
|
208
|
+
│ ├── skills.md ← auto-generated empty template
|
|
209
|
+
│ └── ollama-api-reference.md ← you add this before typing "proceed"
|
|
210
|
+
├── agent-5-features-rag-export/
|
|
211
|
+
│ ├── skills.md
|
|
212
|
+
│ └── cosine-similarity.md ← algorithm reference for the RAG agent
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
When you're done, type `proceed` and Phase 1 begins.
|
|
158
216
|
|
|
159
|
-
|
|
217
|
+
### Phase 1 — Execution
|
|
160
218
|
|
|
161
219
|
```
|
|
162
|
-
Agent 1 → Infra &
|
|
163
|
-
reads : CLAUDE.md + agents/agent-1-infra/skills.md
|
|
164
|
-
runs : npm run
|
|
220
|
+
Agent 1 → Infra & Configuration
|
|
221
|
+
reads : CLAUDE.md + agents/agent-1-infra/skills.md + any .md in that folder
|
|
222
|
+
runs : npm run build
|
|
165
223
|
✅ passes → moves to Agent 2
|
|
166
224
|
❌ fails → analyzes error, fixes, retries (max 3 times)
|
|
167
225
|
→ after 3 failures: asks for human intervention
|
|
168
226
|
↓
|
|
169
|
-
Agent 2 → Data Layer
|
|
227
|
+
Agent 2 → Data Layer
|
|
170
228
|
reads : CLAUDE.md + agents/agent-2-data/skills.md
|
|
171
229
|
runs : npm test
|
|
172
230
|
✅ passes → moves to Agent 3
|
|
@@ -179,7 +237,7 @@ Agent N → last agent
|
|
|
179
237
|
|
|
180
238
|
### The one instruction
|
|
181
239
|
|
|
182
|
-
In
|
|
240
|
+
In all cases, the instruction to give Claude Code is identical:
|
|
183
241
|
|
|
184
242
|
```
|
|
185
243
|
Read PLAYBOOK.md and execute the procedure.
|
|
@@ -187,6 +245,63 @@ Read PLAYBOOK.md and execute the procedure.
|
|
|
187
245
|
|
|
188
246
|
---
|
|
189
247
|
|
|
248
|
+
## Stack Detection
|
|
249
|
+
|
|
250
|
+
AgentKit automatically reads your project directory to detect the stack.
|
|
251
|
+
If it can identify your framework, it generates a `CLAUDE.md` immediately.
|
|
252
|
+
If not, it asks you interactively.
|
|
253
|
+
|
|
254
|
+
### Automatic detection
|
|
255
|
+
|
|
256
|
+
| Stack | Detected by |
|
|
257
|
+
|---|---|
|
|
258
|
+
| **React + Vite** | `react` in `package.json` dependencies |
|
|
259
|
+
| **Next.js** | `next` in `package.json` dependencies |
|
|
260
|
+
| **Tauri v2** | `src-tauri/` directory present |
|
|
261
|
+
| **FastAPI** | `fastapi` in `requirements.txt` |
|
|
262
|
+
| **Express** | `express` in `package.json` dependencies |
|
|
263
|
+
| **Node.js** | `package.json` exists (generic fallback) |
|
|
264
|
+
|
|
265
|
+
### Interactive selection (when stack is not detected)
|
|
266
|
+
|
|
267
|
+
If the project directory is empty or the stack cannot be identified automatically,
|
|
268
|
+
AgentKit asks you to pick from the supported list:
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
⚠ Stack not detected automatically.
|
|
272
|
+
? Please select your stack:
|
|
273
|
+
❯ React + Vite
|
|
274
|
+
Next.js
|
|
275
|
+
Tauri v2 (React + Rust)
|
|
276
|
+
FastAPI (Python)
|
|
277
|
+
Express (Node.js)
|
|
278
|
+
Node.js (generic)
|
|
279
|
+
None of the above — generate a generic CLAUDE.md to fill manually
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
This is the most common case when **starting a brand new project** from an
|
|
283
|
+
empty folder. You pick your stack, AgentKit generates a fully enriched `CLAUDE.md`
|
|
284
|
+
with the right commands, conventions, and Tauri-specific rules — exactly as if
|
|
285
|
+
it had detected the stack automatically.
|
|
286
|
+
|
|
287
|
+
### "None of the above"
|
|
288
|
+
|
|
289
|
+
If your stack isn't in the list, AgentKit generates a generic `CLAUDE.md` with
|
|
290
|
+
a clear warning:
|
|
291
|
+
|
|
292
|
+
```markdown
|
|
293
|
+
## ⚠️ Stack not configured
|
|
294
|
+
AgentKit could not detect your stack and no stack was selected.
|
|
295
|
+
Before running Claude Code, fill in: Stack, Commands, Structure.
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### Adding a new stack
|
|
299
|
+
|
|
300
|
+
See the **Contributing** section — adding a new template takes less than 30 minutes
|
|
301
|
+
and makes it available to all AgentKit users.
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
190
305
|
## The Generated Files
|
|
191
306
|
|
|
192
307
|
```
|
|
@@ -195,40 +310,24 @@ my-project/
|
|
|
195
310
|
│
|
|
196
311
|
├── CLAUDE.md ← generated: conventions, stack, rules
|
|
197
312
|
├── AGENT_WORKFLOW.md ← placeholder: Claude Code fills this in Phase 0
|
|
198
|
-
├── PLAYBOOK.md ← generated: Phase 0 + Phase 1
|
|
313
|
+
├── PLAYBOOK.md ← generated: Phase 0 + pause + Phase 1
|
|
199
314
|
│
|
|
200
|
-
└── agents/ ←
|
|
315
|
+
└── agents/ ← created by Claude Code after Phase 0 validation
|
|
201
316
|
├── agent-1-infra/
|
|
202
|
-
│ └── skills.md ←
|
|
317
|
+
│ └── skills.md ← enrich before typing "proceed"
|
|
203
318
|
├── agent-2-data/
|
|
204
|
-
│ └── skills.md
|
|
319
|
+
│ └── skills.md
|
|
205
320
|
└── agent-3-features/
|
|
206
|
-
└── skills.md
|
|
321
|
+
└── skills.md
|
|
207
322
|
```
|
|
208
323
|
|
|
209
|
-
**`CLAUDE.md`** — the standing brief for every agent. Covers stack, conventions, forbidden patterns, commands, and definition of done.
|
|
324
|
+
**`CLAUDE.md`** — the standing brief for every agent. Covers stack, conventions, forbidden patterns, commands, and definition of done.
|
|
210
325
|
|
|
211
326
|
**`AGENT_WORKFLOW.md`** — starts as a placeholder. Claude Code fills it during Phase 0. Becomes the single source of truth for the project roadmap.
|
|
212
327
|
|
|
213
|
-
**`PLAYBOOK.md`** — the execution engine. Phase 0
|
|
328
|
+
**`PLAYBOOK.md`** — the execution engine. Contains Phase 0, the skills enrichment pause, and Phase 1 with retry logic and human escalation.
|
|
214
329
|
|
|
215
|
-
**`agents/agent-N-slug
|
|
216
|
-
|
|
217
|
-
---
|
|
218
|
-
|
|
219
|
-
## Optionally Enrich the Skills Files
|
|
220
|
-
|
|
221
|
-
Before running Claude Code, drop context-specific `.md` files into any agent's folder:
|
|
222
|
-
|
|
223
|
-
```
|
|
224
|
-
agents/
|
|
225
|
-
├── agent-3-ollama/
|
|
226
|
-
│ ├── skills.md ← auto-generated template
|
|
227
|
-
│ └── ollama-api-reference.md ← you add this: Ollama API docs
|
|
228
|
-
└── agent-4-rag/
|
|
229
|
-
├── skills.md
|
|
230
|
-
└── cosine-similarity-example.md ← you add this: algorithm reference
|
|
231
|
-
```
|
|
330
|
+
**`agents/agent-N-slug/`** — created by Claude Code after Phase 0 validation. Drop any `.md` files here during the enrichment pause — the agent will read them before starting.
|
|
232
331
|
|
|
233
332
|
---
|
|
234
333
|
|
|
@@ -251,21 +350,8 @@ Then in Claude Code:
|
|
|
251
350
|
Read PLAYBOOK.md and execute only the agents that haven't been completed yet.
|
|
252
351
|
```
|
|
253
352
|
|
|
254
|
-
Phase 0 only
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
## Supported Stacks
|
|
259
|
-
|
|
260
|
-
| Stack | Detected by | Template enrichment |
|
|
261
|
-
|---|---|---|
|
|
262
|
-
| **React** | `react` in `package.json` | TypeScript/JS, Vite, testing |
|
|
263
|
-
| **Next.js** | `next` in `package.json` | App Router, Tailwind, Prisma |
|
|
264
|
-
| **Tauri** | `src-tauri/` directory | Rust/JS boundary, IPC, plugins |
|
|
265
|
-
| **FastAPI** | `fastapi` in `requirements.txt` | Python, Pydantic, async |
|
|
266
|
-
| **Express** | `express` in `package.json` | REST, middleware, auth |
|
|
267
|
-
| **Node.js** | `package.json` (generic) | Scripts, modules, CI/CD |
|
|
268
|
-
| **Unknown** | fallback | Generic editable workflow |
|
|
353
|
+
Phase 0 and the skills enrichment pause only run once — during the initial
|
|
354
|
+
`agentkit init`. Iterations go straight to execution.
|
|
269
355
|
|
|
270
356
|
---
|
|
271
357
|
|
|
@@ -273,27 +359,31 @@ Phase 0 only ever runs once — during the initial `agentkit init`. Iterations g
|
|
|
273
359
|
|
|
274
360
|
### No AI in the tool — by design
|
|
275
361
|
|
|
276
|
-
Integrating an LLM into AgentKit would mean choosing a provider, managing API keys, adding costs, and coupling the tool to a specific model
|
|
362
|
+
Integrating an LLM into AgentKit would mean choosing a provider, managing API keys, adding costs, and coupling the tool to a specific model. Instead, AgentKit is purely structural — it generates files that any LLM can read and act on.
|
|
363
|
+
|
|
364
|
+
### Stack detection first, interactive fallback
|
|
365
|
+
|
|
366
|
+
AgentKit tries to detect your stack automatically. If it can't, it asks you interactively rather than generating something useless. The goal is always a `CLAUDE.md` that Claude Code can actually use.
|
|
277
367
|
|
|
278
368
|
### Phase 0 always runs — with or without blueprint
|
|
279
369
|
|
|
280
|
-
|
|
370
|
+
Most developers don't know how to optimally decompose a project into agents. AgentKit always delegates decomposition to Claude Code. With a blueprint, Claude Code reads the file. Without one, it asks you three questions. Either way, you never have to think about agents yourself.
|
|
281
371
|
|
|
282
|
-
###
|
|
372
|
+
### The skills enrichment pause is intentional
|
|
283
373
|
|
|
284
|
-
|
|
374
|
+
Between decomposition and execution, there's a window where you know exactly which agents will run but none of them have started yet. This is the right moment to inject project-specific knowledge — API docs, schemas, algorithm references. AgentKit formalizes this window as an explicit pause rather than leaving it to chance.
|
|
285
375
|
|
|
286
|
-
### Phase 0
|
|
376
|
+
### Phase 0 and the pause run once, iterations skip both
|
|
287
377
|
|
|
288
|
-
|
|
378
|
+
When you run `agentkit add --feature`, the regenerated PLAYBOOK goes straight to execution — the planning and enrichment are already done.
|
|
289
379
|
|
|
290
380
|
### Bounded context per agent
|
|
291
381
|
|
|
292
|
-
Each agent reads only `CLAUDE.md` and its own
|
|
382
|
+
Each agent reads only `CLAUDE.md` and its own folder. An infrastructure agent doesn't see your business logic. A features agent doesn't see your CI/CD configuration.
|
|
293
383
|
|
|
294
384
|
### Verifiable success criteria
|
|
295
385
|
|
|
296
|
-
Every agent ends with a runnable check — not a goal, a gate. The PLAYBOOK enforces them.
|
|
386
|
+
Every agent ends with a runnable check — not a goal, a gate. The PLAYBOOK enforces them.
|
|
297
387
|
|
|
298
388
|
---
|
|
299
389
|
|
|
@@ -301,73 +391,43 @@ Every agent ends with a runnable check — not a goal, a gate. The PLAYBOOK enfo
|
|
|
301
391
|
|
|
302
392
|
This CLI was built using the exact workflow it generates.
|
|
303
393
|
|
|
304
|
-
### A
|
|
305
|
-
|
|
306
|
-
The `CLAUDE.md`, `AGENT_WORKFLOW.md`, and `PLAYBOOK.md` files at the root of
|
|
307
|
-
this repo are **illustrative** — they were written after the fact to show what
|
|
308
|
-
AgentKit would have generated had it existed at the start of this project.
|
|
309
|
-
This is the inherent bootstrapping paradox: you can't use a tool to build itself
|
|
310
|
-
before the tool exists.
|
|
394
|
+
### A note on honesty
|
|
311
395
|
|
|
312
|
-
`
|
|
313
|
-
|
|
314
|
-
|
|
396
|
+
The `CLAUDE.md`, `AGENT_WORKFLOW.md`, and `PLAYBOOK.md` at the root of this repo
|
|
397
|
+
are **illustrative** — written after the fact to show what AgentKit would have
|
|
398
|
+
generated. This is the bootstrapping paradox: you can't use a tool to build itself
|
|
399
|
+
before it exists.
|
|
315
400
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
use AgentKit on your own project, the files it generates will follow exactly
|
|
319
|
-
this structure.
|
|
401
|
+
`PROJECT_BLUEPRINT.md` is **genuine** — it reflects the actual vision from the
|
|
402
|
+
start, including the Phase 0 and skills enrichment principles.
|
|
320
403
|
|
|
321
404
|
### How it would have worked
|
|
322
405
|
|
|
323
406
|
```
|
|
324
|
-
Step 1 — Write PROJECT_BLUEPRINT.md
|
|
325
|
-
Described the CLI's features, constraints, and architecture in plain language.
|
|
326
|
-
No agents, no layers — just intent.
|
|
327
|
-
|
|
407
|
+
Step 1 — Write PROJECT_BLUEPRINT.md
|
|
328
408
|
Step 2 — npx agentkit init --blueprint PROJECT_BLUEPRINT.md
|
|
329
|
-
AgentKit detects: Node.js + TypeScript stack
|
|
330
|
-
Generates: CLAUDE.md, AGENT_WORKFLOW.md (placeholder), PLAYBOOK.md, agents/
|
|
331
|
-
|
|
332
409
|
Step 3 — "Read PLAYBOOK.md and execute the procedure."
|
|
333
410
|
|
|
334
|
-
Phase 0
|
|
335
|
-
Claude Code reads PROJECT_BLUEPRINT.md.
|
|
336
|
-
Proposes 4 agents, waits for validation.
|
|
411
|
+
Phase 0: Claude Code proposes 4 agents → human validates
|
|
337
412
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
2. Detectors
|
|
341
|
-
3. Generators & Templates
|
|
342
|
-
4. Commands CLI
|
|
343
|
-
Should I proceed?"
|
|
344
|
-
|
|
345
|
-
Human: "Yes."
|
|
346
|
-
|
|
347
|
-
Phase 1 — Execution
|
|
348
|
-
|
|
349
|
-
Agent 1 · Infra & Setup
|
|
350
|
-
skills : agents/agent-1-infra/skills.md
|
|
351
|
-
runs : npm run build ✅
|
|
352
|
-
|
|
353
|
-
Agent 2 · Detectors
|
|
354
|
-
skills : agents/agent-2-detectors/skills.md
|
|
355
|
-
runs : npm test ✅
|
|
356
|
-
|
|
357
|
-
Agent 3 · Generators & Templates
|
|
358
|
-
skills : agents/agent-3-generators/skills.md
|
|
359
|
-
runs : npm test ✅
|
|
360
|
-
|
|
361
|
-
Agent 4 · Commands CLI
|
|
362
|
-
skills : agents/agent-4-commands/skills.md
|
|
363
|
-
runs : npm run build && node dist/cli.js --help ✅
|
|
413
|
+
Skills pause: Claude Code creates agents/ folders → human adds
|
|
414
|
+
skills context → types "proceed"
|
|
364
415
|
|
|
416
|
+
Phase 1:
|
|
417
|
+
Agent 1 · Infra & Setup → npm run build ✅
|
|
418
|
+
Agent 2 · Detectors → npm test ✅
|
|
419
|
+
Agent 3 · Generators → npm test ✅
|
|
420
|
+
Agent 4 · Commands CLI → node dist/cli.js --help ✅
|
|
365
421
|
🎉 Workflow complete
|
|
366
422
|
```
|
|
367
423
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
424
|
+
### Real-world example
|
|
425
|
+
|
|
426
|
+
AgentKit was also used to build **DevLog Desktop** — a Tauri v2 desktop app
|
|
427
|
+
with local RAG via Ollama. The full `PROJECT_BLUEPRINT.md`, `CLAUDE.md`,
|
|
428
|
+
`AGENT_WORKFLOW.md`, and `PLAYBOOK.md` from that project are available at
|
|
429
|
+
[github.com/patricksardinha/devlog-desktop](https://github.com/patricksardinha/devlog-desktop)
|
|
430
|
+
as a concrete reference of what AgentKit generates on a real project.
|
|
371
431
|
|
|
372
432
|
---
|
|
373
433
|
|
|
@@ -387,7 +447,7 @@ agentkit-cli/
|
|
|
387
447
|
│ ├── generators/
|
|
388
448
|
│ │ ├── claudeMdGenerator.ts
|
|
389
449
|
│ │ ├── workflowGenerator.ts
|
|
390
|
-
│ │ ├── playbookGenerator.ts ← Phase 0
|
|
450
|
+
│ │ ├── playbookGenerator.ts ← Phase 0 + skills pause + Phase 1
|
|
391
451
|
│ │ └── skillsGenerator.ts
|
|
392
452
|
│ ├── templates/
|
|
393
453
|
│ │ ├── react.ts
|
|
@@ -401,14 +461,10 @@ agentkit-cli/
|
|
|
401
461
|
│ └── logger.ts
|
|
402
462
|
├── tests/
|
|
403
463
|
├── agents/
|
|
404
|
-
│ ├── agent-1-infra/
|
|
405
|
-
│
|
|
406
|
-
│ ├── agent-
|
|
407
|
-
│
|
|
408
|
-
│ ├── agent-3-generators/
|
|
409
|
-
│ │ └── skills.md
|
|
410
|
-
│ └── agent-4-commands/
|
|
411
|
-
│ └── skills.md
|
|
464
|
+
│ ├── agent-1-infra/skills.md
|
|
465
|
+
│ ├── agent-2-detectors/skills.md
|
|
466
|
+
│ ├── agent-3-generators/skills.md
|
|
467
|
+
│ └── agent-4-commands/skills.md
|
|
412
468
|
├── PROJECT_BLUEPRINT.md
|
|
413
469
|
├── CLAUDE.md
|
|
414
470
|
├── AGENT_WORKFLOW.md
|
|
@@ -425,8 +481,9 @@ To add a new stack template:
|
|
|
425
481
|
|
|
426
482
|
1. Create `src/templates/your-stack.ts` — export `claudeMd(stack)` and `workflow(stack)`
|
|
427
483
|
2. Add detection in `src/detectors/stackDetector.ts`
|
|
428
|
-
3.
|
|
429
|
-
4.
|
|
484
|
+
3. Add the stack to the interactive selection list in `src/commands/init.ts`
|
|
485
|
+
4. Register in `src/generators/claudeMdGenerator.ts` and `workflowGenerator.ts`
|
|
486
|
+
5. Add fixtures in `tests/detectors/` and tests in `tests/generators/`
|
|
430
487
|
|
|
431
488
|
---
|
|
432
489
|
|
package/dist/cli.cjs
CHANGED
|
@@ -685,6 +685,38 @@ Wait for confirmation before moving to Phase 1.
|
|
|
685
685
|
|
|
686
686
|
---
|
|
687
687
|
|
|
688
|
+
`;
|
|
689
|
+
const betweenPhase = `## Between Phase 0 and Phase 1 \u2014 Skills Enrichment
|
|
690
|
+
|
|
691
|
+
Once the decomposition is validated, before writing any code:
|
|
692
|
+
|
|
693
|
+
1. Create all agent folders and empty skills files:
|
|
694
|
+
For each agent in your decomposition, create:
|
|
695
|
+
- agents/agent-{N}-{slug}/skills.md (empty for now)
|
|
696
|
+
|
|
697
|
+
2. Announce to the user:
|
|
698
|
+
"Agent folders created under agents/.
|
|
699
|
+
|
|
700
|
+
You can now enrich any skills.md with additional context
|
|
701
|
+
before I start executing:
|
|
702
|
+
- API documentation
|
|
703
|
+
- Database schemas
|
|
704
|
+
- Algorithm references
|
|
705
|
+
- Business conventions
|
|
706
|
+
- Any project-specific knowledge
|
|
707
|
+
|
|
708
|
+
Add .md files directly in the relevant agent folder \u2014
|
|
709
|
+
I will read everything in agents/agent-{N}-{slug}/ before
|
|
710
|
+
starting that agent.
|
|
711
|
+
|
|
712
|
+
Type 'proceed' (or any message) when you're ready
|
|
713
|
+
and I'll start Phase 1."
|
|
714
|
+
|
|
715
|
+
3. Wait for the user's message before starting Phase 1.
|
|
716
|
+
Do not start Agent 1 until the user explicitly responds.
|
|
717
|
+
|
|
718
|
+
---
|
|
719
|
+
|
|
688
720
|
`;
|
|
689
721
|
return `# PLAYBOOK.md \u2014 ${projectName}
|
|
690
722
|
|
|
@@ -715,7 +747,7 @@ After each agent:
|
|
|
715
747
|
|
|
716
748
|
---
|
|
717
749
|
|
|
718
|
-
${phase0}## Phase 1 \u2014 Execution
|
|
750
|
+
${phase0}${betweenPhase}## Phase 1 \u2014 Execution
|
|
719
751
|
|
|
720
752
|
${agentBlocks}
|
|
721
753
|
|