@patricksardinha/agentkit-cli 0.6.0 → 0.7.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 CHANGED
@@ -40,7 +40,8 @@ You (optionally write a blueprint)
40
40
 
41
41
  AgentKit CLI (detects stack or asks you, generates the structure)
42
42
 
43
- Claude Code (discovers or reads blueprint → decomposes → executes)
43
+ Claude Code (reads blueprint or asks questions → decomposes → pauses
44
+ for skills enrichment → executes agents in sequence)
44
45
 
45
46
  Your finished project
46
47
  ```
@@ -63,7 +64,27 @@ AgentKit solves all five — including the last one, by always delegating decomp
63
64
 
64
65
  ## How It Works
65
66
 
66
- AgentKit always runs in two phases inside Claude Code. **Phase 0 always runs first**, regardless of whether you provided a blueprint. The difference is only the *source* of information.
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
+ ```
67
88
 
68
89
  ### Without blueprint — Phase 0 asks you
69
90
 
@@ -71,30 +92,27 @@ AgentKit always runs in two phases inside Claude Code. **Phase 0 always runs fir
71
92
  npx @patricksardinha/agentkit-cli init
72
93
  ```
73
94
 
74
- When Claude Code reads the generated PLAYBOOK, it starts with **Phase 0 — Project Discovery**: it asks you three questions directly in the chat and waits for your answers before decomposing anything.
95
+ Claude Code starts with **Phase 0 — Project Discovery**: it asks you three questions and waits for your answers before proposing any decomposition.
75
96
 
76
97
  ```
77
98
  Claude Code: "Before I start, I need to understand what you want to build.
78
99
 
79
100
  1. What is this project? (one sentence)
80
101
  2. What are the main features you want to build?
81
- 3. Any tech constraints or architecture preferences?
102
+ 3. Any tech constraints or architecture preferences?"
82
103
 
83
- Please answer and I'll propose an agent decomposition."
84
-
85
- You: "It's a desktop app where I log my dev sessions.
86
- Features: session logging, weekly summaries, natural language search.
87
- 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."
88
106
 
89
107
  Claude Code: "I've decomposed the project into 5 agents:
90
108
  1. Infra & Tauri Setup
91
109
  2. Data Layer (Dexie)
92
110
  3. Ollama Integration
93
- 4. RAG & Search
94
- 5. UI & Features
111
+ 4. UI & Pages
112
+ 5. RAG, Export & Release
95
113
  Should I proceed?"
96
114
 
97
- You: "Yes." ← then execution begins
115
+ You: "Yes."
98
116
  ```
99
117
 
100
118
  ### With blueprint — Phase 0 reads your file
@@ -105,18 +123,19 @@ Write a `PROJECT_BLUEPRINT.md` at the root of your project in plain language —
105
123
  npx @patricksardinha/agentkit-cli init --blueprint PROJECT_BLUEPRINT.md
106
124
  ```
107
125
 
108
- When Claude Code reads the generated PLAYBOOK, it starts with **Phase 0 — Agent Decomposition**: it reads your blueprint and proposes an agent structure before writing any code.
126
+ Claude Code starts with **Phase 0 — Agent Decomposition**: it reads your blueprint and proposes an agent structure before writing any code.
109
127
 
110
128
  ```
111
- Claude Code: "I've read PROJECT_BLUEPRINT.md and decomposed the project into 5 agents:
112
- 1. Infra & Tauri Setup
129
+ Claude Code: "I've read PROJECT_BLUEPRINT.md and decomposed the project into 6 agents:
130
+ 1. Infra & Configuration
113
131
  2. Data Layer (Dexie)
114
132
  3. Ollama Integration
115
- 4. RAG & Search
116
- 5. UI & Features
133
+ 4. UI & Pages
134
+ 5. Advanced Features (RAG, Export)
135
+ 6. Build & Release
117
136
  Should I proceed?"
118
137
 
119
- You: "Yes." ← then execution begins
138
+ You: "Yes."
120
139
  ```
121
140
 
122
141
  **A good blueprint looks like this:**
@@ -150,19 +169,62 @@ I also want to search my history in natural language.
150
169
  - Export via Tauri fs plugin
151
170
  ```
152
171
 
153
- ### Phase 1Execution (same in both cases)
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:
154
204
 
155
- Once you validate the decomposition, Claude Code executes each agent autonomously:
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.
216
+
217
+ ### Phase 1 — Execution
156
218
 
157
219
  ```
158
- Agent 1 → Infra & Tauri Setup
159
- reads : CLAUDE.md + agents/agent-1-infra/skills.md
220
+ Agent 1 → Infra & Configuration
221
+ reads : CLAUDE.md + agents/agent-1-infra/skills.md + any .md in that folder
160
222
  runs : npm run build
161
223
  ✅ passes → moves to Agent 2
162
224
  ❌ fails → analyzes error, fixes, retries (max 3 times)
163
225
  → after 3 failures: asks for human intervention
164
226
 
165
- Agent 2 → Data Layer (Dexie)
227
+ Agent 2 → Data Layer
166
228
  reads : CLAUDE.md + agents/agent-2-data/skills.md
167
229
  runs : npm test
168
230
  ✅ passes → moves to Agent 3
@@ -175,7 +237,7 @@ Agent N → last agent
175
237
 
176
238
  ### The one instruction
177
239
 
178
- In both cases, the instruction to give Claude Code is identical:
240
+ In all cases, the instruction to give Claude Code is identical:
179
241
 
180
242
  ```
181
243
  Read PLAYBOOK.md and execute the procedure.
@@ -191,9 +253,6 @@ If not, it asks you interactively.
191
253
 
192
254
  ### Automatic detection
193
255
 
194
- AgentKit reads `package.json`, `Cargo.toml`, `requirements.txt`, and your
195
- directory structure to identify the stack without any input from you.
196
-
197
256
  | Stack | Detected by |
198
257
  |---|---|
199
258
  | **React + Vite** | `react` in `package.json` dependencies |
@@ -205,12 +264,12 @@ directory structure to identify the stack without any input from you.
205
264
 
206
265
  ### Interactive selection (when stack is not detected)
207
266
 
208
- If the project directory is empty or the stack cannot be identified automatically
209
- (new project, unusual structure), AgentKit asks you to pick from the supported list:
267
+ If the project directory is empty or the stack cannot be identified automatically,
268
+ AgentKit asks you to pick from the supported list:
210
269
 
211
270
  ```
212
271
  ⚠ Stack not detected automatically.
213
- ? Stack not detected automatically. Please select your stack:
272
+ ? Please select your stack:
214
273
  ❯ React + Vite
215
274
  Next.js
216
275
  Tauri v2 (React + Rust)
@@ -220,15 +279,15 @@ If the project directory is empty or the stack cannot be identified automaticall
220
279
  None of the above — generate a generic CLAUDE.md to fill manually
221
280
  ```
222
281
 
223
- This covers the most common case: **starting a brand new project** from an
282
+ This is the most common case when **starting a brand new project** from an
224
283
  empty folder. You pick your stack, AgentKit generates a fully enriched `CLAUDE.md`
225
- with the right commands, conventions, and structure — as if it had detected the
226
- stack automatically.
284
+ with the right commands, conventions, and Tauri-specific rules exactly as if
285
+ it had detected the stack automatically.
227
286
 
228
287
  ### "None of the above"
229
288
 
230
289
  If your stack isn't in the list, AgentKit generates a generic `CLAUDE.md` with
231
- a clear warning at the top:
290
+ a clear warning:
232
291
 
233
292
  ```markdown
234
293
  ## ⚠️ Stack not configured
@@ -236,13 +295,10 @@ AgentKit could not detect your stack and no stack was selected.
236
295
  Before running Claude Code, fill in: Stack, Commands, Structure.
237
296
  ```
238
297
 
239
- You fill in the missing sections, then give Claude Code the usual instruction.
240
-
241
298
  ### Adding a new stack
242
299
 
243
- The supported stack list grows with each release. If your stack isn't supported
244
- yet, see the **Contributing** section adding a new template takes less than
245
- 30 minutes.
300
+ See the **Contributing** section adding a new template takes less than 30 minutes
301
+ and makes it available to all AgentKit users.
246
302
 
247
303
  ---
248
304
 
@@ -254,40 +310,29 @@ my-project/
254
310
 
255
311
  ├── CLAUDE.md ← generated: conventions, stack, rules
256
312
  ├── AGENT_WORKFLOW.md ← placeholder: Claude Code fills this in Phase 0
257
- ├── PLAYBOOK.md ← generated: Phase 0 + Phase 1 execution engine
313
+ ├── PLAYBOOK.md ← generated: Phase 0 + pause + Phase 1
314
+ ├── README.md ← generated: project doc (skipped if already exists)
258
315
 
259
- └── agents/ ← generated: per-agent skill folders
316
+ └── agents/ ← created by Claude Code after Phase 0 validation
260
317
  ├── agent-1-infra/
261
- │ └── skills.md ← fill in infra-specific context
318
+ │ └── skills.md ← enrich before typing "proceed"
262
319
  ├── agent-2-data/
263
- │ └── skills.md ← fill in data-specific context
320
+ │ └── skills.md
264
321
  └── agent-3-features/
265
- └── skills.md ← fill in feature-specific context
322
+ └── skills.md
266
323
  ```
267
324
 
268
- **`CLAUDE.md`** — the standing brief for every agent. Covers stack, conventions, forbidden patterns, commands, and definition of done. Read by every agent at the start of their session.
325
+ **`CLAUDE.md`** — the standing brief for every agent. Covers stack, conventions, forbidden patterns, commands, and definition of done.
269
326
 
270
327
  **`AGENT_WORKFLOW.md`** — starts as a placeholder. Claude Code fills it during Phase 0. Becomes the single source of truth for the project roadmap.
271
328
 
272
- **`PLAYBOOK.md`** — the execution engine. Phase 0 is always present (Discovery or Decomposition depending on whether a blueprint was provided). Phase 1 contains the agent execution loop with retry logic and human escalation.
329
+ **`PLAYBOOK.md`** — the execution engine. Contains Phase 0, the skills enrichment pause, and Phase 1 with retry logic and human escalation.
273
330
 
274
- **`agents/agent-N-slug/skills.md`** — per-agent context files. Auto-generated as templates. Only the relevant agent reads its own file — bounded context by design. Add any `.md` files alongside `skills.md` and the agent reads those too.
331
+ **`README.md`** — generated automatically if no README.md exists yet.
332
+ Contains the project name, goal and features extracted from the blueprint, the tech stack, getting started commands, and a reference to the AgentKit workflow. If a README.md already exists in your project, AgentKit skips
333
+ it and warns you — your existing doc is never overwritten.
275
334
 
276
- ---
277
-
278
- ## Optionally Enrich the Skills Files
279
-
280
- Before running Claude Code, drop context-specific `.md` files into any agent's folder:
281
-
282
- ```
283
- agents/
284
- ├── agent-3-ollama/
285
- │ ├── skills.md ← auto-generated template
286
- │ └── ollama-api-reference.md ← you add this: Ollama API docs
287
- └── agent-4-rag/
288
- ├── skills.md
289
- └── cosine-similarity-example.md ← you add this: algorithm reference
290
- ```
335
+ **`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.
291
336
 
292
337
  ---
293
338
 
@@ -310,7 +355,8 @@ Then in Claude Code:
310
355
  Read PLAYBOOK.md and execute only the agents that haven't been completed yet.
311
356
  ```
312
357
 
313
- Phase 0 only ever runs once — during the initial `agentkit init`. Iterations go straight to execution.
358
+ Phase 0 and the skills enrichment pause only run once — during the initial
359
+ `agentkit init`. Iterations go straight to execution.
314
360
 
315
361
  ---
316
362
 
@@ -318,31 +364,31 @@ Phase 0 only ever runs once — during the initial `agentkit init`. Iterations g
318
364
 
319
365
  ### No AI in the tool — by design
320
366
 
321
- Integrating an LLM into AgentKit would mean choosing a provider, managing API keys, adding costs, and coupling the tool to a specific model that will become outdated. Instead, AgentKit is purely structural — it generates files that any LLM can read and act on. The intelligence lives in Claude Code (or whatever tool you use), not in AgentKit.
367
+ 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.
322
368
 
323
369
  ### Stack detection first, interactive fallback
324
370
 
325
- AgentKit tries to detect your stack automatically. If it can't — because the project is empty or uses an uncommon structure — it asks you interactively rather than generating something useless. The goal is always a `CLAUDE.md` that Claude Code can actually use, not a generic placeholder that needs manual editing.
371
+ 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.
326
372
 
327
373
  ### Phase 0 always runs — with or without blueprint
328
374
 
329
- The key insight: most developers don't know how to optimally decompose a project into agents. AgentKit solves this by always delegating 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 — that's Claude Code's job.
375
+ 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.
330
376
 
331
- ### You write intent, Claude Code writes structure
377
+ ### The skills enrichment pause is intentional
332
378
 
333
- Whether you write a blueprint or answer questions in chat, you describe *what* you want to build, not *how*. The decomposition into agents which layer goes first, what the success criteria should be is always decided by Claude Code during Phase 0.
379
+ 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.
334
380
 
335
- ### Phase 0 runs once, iterations skip it
381
+ ### Phase 0 and the pause run once, iterations skip both
336
382
 
337
- Phase 0 is only present in the PLAYBOOK generated by `agentkit init`. When you run `agentkit add --feature`, the regenerated PLAYBOOK goes straight to Phase 1 — the initial planning is done, you're just adding to it.
383
+ When you run `agentkit add --feature`, the regenerated PLAYBOOK goes straight to execution — the planning and enrichment are already done.
338
384
 
339
385
  ### Bounded context per agent
340
386
 
341
- Each agent reads only `CLAUDE.md` and its own `skills.md`. An infrastructure agent doesn't see your business logic. A features agent doesn't see your CI/CD configuration. This produces better output and prevents agents from making decisions outside their scope.
387
+ 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.
342
388
 
343
389
  ### Verifiable success criteria
344
390
 
345
- Every agent ends with a runnable check — not a goal, a gate. The PLAYBOOK enforces them. You always know exactly which agents have succeeded and which haven't.
391
+ Every agent ends with a runnable check — not a goal, a gate. The PLAYBOOK enforces them.
346
392
 
347
393
  ---
348
394
 
@@ -352,68 +398,42 @@ This CLI was built using the exact workflow it generates.
352
398
 
353
399
  ### A note on honesty
354
400
 
355
- The `CLAUDE.md`, `AGENT_WORKFLOW.md`, and `PLAYBOOK.md` files at the root of
356
- this repo are **illustrative** — they were written after the fact to show what
357
- AgentKit would have generated had it existed at the start of this project.
358
- This is the inherent bootstrapping paradox: you can't use a tool to build itself
359
- before the tool exists.
401
+ The `CLAUDE.md`, `AGENT_WORKFLOW.md`, and `PLAYBOOK.md` at the root of this repo
402
+ are **illustrative** — written after the fact to show what AgentKit would have
403
+ generated. This is the bootstrapping paradox: you can't use a tool to build itself
404
+ before it exists.
360
405
 
361
- `PROJECT_BLUEPRINT.md` however is **genuine** — it reflects the actual vision
362
- of the project from the beginning, including the Phase 0 decomposition principle
363
- that was central to the design.
364
-
365
- These four files serve as a concrete, real-world example of what AgentKit
366
- generates — on the same project rather than a separate demo repo. When you
367
- use AgentKit on your own project, the files it generates will follow exactly
368
- this structure.
406
+ `PROJECT_BLUEPRINT.md` is **genuine** — it reflects the actual vision from the
407
+ start, including the Phase 0 and skills enrichment principles.
369
408
 
370
409
  ### How it would have worked
371
410
 
372
411
  ```
373
- Step 1 — Write PROJECT_BLUEPRINT.md (genuine)
374
- Described the CLI's features, constraints, and architecture in plain language.
375
- No agents, no layers — just intent.
376
-
412
+ Step 1 — Write PROJECT_BLUEPRINT.md
377
413
  Step 2 — npx agentkit init --blueprint PROJECT_BLUEPRINT.md
378
- AgentKit detects: Node.js + TypeScript stack
379
- Generates: CLAUDE.md, AGENT_WORKFLOW.md (placeholder), PLAYBOOK.md, agents/
380
-
381
414
  Step 3 — "Read PLAYBOOK.md and execute the procedure."
382
415
 
383
- Phase 0 Decomposition
384
- Claude Code reads PROJECT_BLUEPRINT.md.
385
- Proposes 4 agents, waits for validation.
386
-
387
- "I have decomposed the project into 4 agents:
388
- 1. Infra & Setup
389
- 2. Detectors
390
- 3. Generators & Templates
391
- 4. Commands CLI
392
- Should I proceed?"
393
-
394
- Human: "Yes."
395
-
396
- Phase 1 — Execution
397
-
398
- Agent 1 · Infra & Setup
399
- skills : agents/agent-1-infra/skills.md
400
- runs : npm run build ✅
416
+ Phase 0: Claude Code proposes 4 agents → human validates
401
417
 
402
- Agent 2 · Detectors
403
- skills : agents/agent-2-detectors/skills.md
404
- runs : npm test ✅
405
-
406
- Agent 3 · Generators & Templates
407
- skills : agents/agent-3-generators/skills.md
408
- runs : npm test ✅
409
-
410
- Agent 4 · Commands CLI
411
- skills : agents/agent-4-commands/skills.md
412
- runs : npm run build && node dist/cli.js --help ✅
418
+ Skills pause: Claude Code creates agents/ folders → human adds
419
+ skills context → types "proceed"
413
420
 
421
+ Phase 1:
422
+ Agent 1 · Infra & Setup → npm run build ✅
423
+ Agent 2 · Detectors → npm test ✅
424
+ Agent 3 · Generators → npm test ✅
425
+ Agent 4 · Commands CLI → node dist/cli.js --help ✅
414
426
  🎉 Workflow complete
415
427
  ```
416
428
 
429
+ ### Real-world example
430
+
431
+ AgentKit was also used to build **DevLog Desktop** — a Tauri v2 desktop app
432
+ with local RAG via Ollama. The full `PROJECT_BLUEPRINT.md`, `CLAUDE.md`,
433
+ `AGENT_WORKFLOW.md`, and `PLAYBOOK.md` from that project are available at
434
+ [github.com/patricksardinha/devlog-desktop](https://github.com/patricksardinha/devlog-desktop)
435
+ as a concrete reference of what AgentKit generates on a real project.
436
+
417
437
  ---
418
438
 
419
439
  ## Project Structure
@@ -432,7 +452,7 @@ agentkit-cli/
432
452
  │ ├── generators/
433
453
  │ │ ├── claudeMdGenerator.ts
434
454
  │ │ ├── workflowGenerator.ts
435
- │ │ ├── playbookGenerator.ts ← Phase 0 (Discovery or Decomposition) + Phase 1
455
+ │ │ ├── playbookGenerator.ts ← Phase 0 + skills pause + Phase 1
436
456
  │ │ └── skillsGenerator.ts
437
457
  │ ├── templates/
438
458
  │ │ ├── react.ts
@@ -446,14 +466,10 @@ agentkit-cli/
446
466
  │ └── logger.ts
447
467
  ├── tests/
448
468
  ├── agents/
449
- │ ├── agent-1-infra/
450
- │ └── skills.md
451
- │ ├── agent-2-detectors/
452
- └── skills.md
453
- │ ├── agent-3-generators/
454
- │ │ └── skills.md
455
- │ └── agent-4-commands/
456
- │ └── skills.md
469
+ │ ├── agent-1-infra/skills.md
470
+ ├── agent-2-detectors/skills.md
471
+ │ ├── agent-3-generators/skills.md
472
+ │ └── agent-4-commands/skills.md
457
473
  ├── PROJECT_BLUEPRINT.md
458
474
  ├── CLAUDE.md
459
475
  ├── AGENT_WORKFLOW.md