@patricksardinha/agentkit-cli 0.6.0 → 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.
Files changed (2) hide show
  1. package/README.md +142 -131
  2. package/package.json +1 -1
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
+ ```
154
202
 
155
- Once you validate the decomposition, Claude Code executes each agent autonomously:
203
+ You can then drop any context files into the agent folders:
156
204
 
157
205
  ```
158
- Agent 1 → Infra & Tauri Setup
159
- reads : CLAUDE.md + agents/agent-1-infra/skills.md
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
218
+
219
+ ```
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,24 @@ 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
258
314
 
259
- └── agents/ ← generated: per-agent skill folders
315
+ └── agents/ ← created by Claude Code after Phase 0 validation
260
316
  ├── agent-1-infra/
261
- │ └── skills.md ← fill in infra-specific context
317
+ │ └── skills.md ← enrich before typing "proceed"
262
318
  ├── agent-2-data/
263
- │ └── skills.md ← fill in data-specific context
319
+ │ └── skills.md
264
320
  └── agent-3-features/
265
- └── skills.md ← fill in feature-specific context
321
+ └── skills.md
266
322
  ```
267
323
 
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.
324
+ **`CLAUDE.md`** — the standing brief for every agent. Covers stack, conventions, forbidden patterns, commands, and definition of done.
269
325
 
270
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.
271
327
 
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.
328
+ **`PLAYBOOK.md`** — the execution engine. Contains Phase 0, the skills enrichment pause, and Phase 1 with retry logic and human escalation.
273
329
 
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.
275
-
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
- ```
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.
291
331
 
292
332
  ---
293
333
 
@@ -310,7 +350,8 @@ Then in Claude Code:
310
350
  Read PLAYBOOK.md and execute only the agents that haven't been completed yet.
311
351
  ```
312
352
 
313
- Phase 0 only ever runs once — during the initial `agentkit init`. Iterations go straight to execution.
353
+ Phase 0 and the skills enrichment pause only run once — during the initial
354
+ `agentkit init`. Iterations go straight to execution.
314
355
 
315
356
  ---
316
357
 
@@ -318,31 +359,31 @@ Phase 0 only ever runs once — during the initial `agentkit init`. Iterations g
318
359
 
319
360
  ### No AI in the tool — by design
320
361
 
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.
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.
322
363
 
323
364
  ### Stack detection first, interactive fallback
324
365
 
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.
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.
326
367
 
327
368
  ### Phase 0 always runs — with or without blueprint
328
369
 
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.
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.
330
371
 
331
- ### You write intent, Claude Code writes structure
372
+ ### The skills enrichment pause is intentional
332
373
 
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.
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.
334
375
 
335
- ### Phase 0 runs once, iterations skip it
376
+ ### Phase 0 and the pause run once, iterations skip both
336
377
 
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.
378
+ When you run `agentkit add --feature`, the regenerated PLAYBOOK goes straight to execution — the planning and enrichment are already done.
338
379
 
339
380
  ### Bounded context per agent
340
381
 
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.
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.
342
383
 
343
384
  ### Verifiable success criteria
344
385
 
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.
386
+ Every agent ends with a runnable check — not a goal, a gate. The PLAYBOOK enforces them.
346
387
 
347
388
  ---
348
389
 
@@ -352,68 +393,42 @@ This CLI was built using the exact workflow it generates.
352
393
 
353
394
  ### A note on honesty
354
395
 
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.
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.
360
400
 
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.
401
+ `PROJECT_BLUEPRINT.md` is **genuine** — it reflects the actual vision from the
402
+ start, including the Phase 0 and skills enrichment principles.
369
403
 
370
404
  ### How it would have worked
371
405
 
372
406
  ```
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
-
407
+ Step 1 — Write PROJECT_BLUEPRINT.md
377
408
  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
409
  Step 3 — "Read PLAYBOOK.md and execute the procedure."
382
410
 
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 ✅
411
+ Phase 0: Claude Code proposes 4 agents → human validates
401
412
 
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 ✅
413
+ Skills pause: Claude Code creates agents/ folders → human adds
414
+ skills context → types "proceed"
413
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 ✅
414
421
  🎉 Workflow complete
415
422
  ```
416
423
 
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.
431
+
417
432
  ---
418
433
 
419
434
  ## Project Structure
@@ -432,7 +447,7 @@ agentkit-cli/
432
447
  │ ├── generators/
433
448
  │ │ ├── claudeMdGenerator.ts
434
449
  │ │ ├── workflowGenerator.ts
435
- │ │ ├── playbookGenerator.ts ← Phase 0 (Discovery or Decomposition) + Phase 1
450
+ │ │ ├── playbookGenerator.ts ← Phase 0 + skills pause + Phase 1
436
451
  │ │ └── skillsGenerator.ts
437
452
  │ ├── templates/
438
453
  │ │ ├── react.ts
@@ -446,14 +461,10 @@ agentkit-cli/
446
461
  │ └── logger.ts
447
462
  ├── tests/
448
463
  ├── 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
464
+ │ ├── agent-1-infra/skills.md
465
+ ├── agent-2-detectors/skills.md
466
+ │ ├── agent-3-generators/skills.md
467
+ │ └── agent-4-commands/skills.md
457
468
  ├── PROJECT_BLUEPRINT.md
458
469
  ├── CLAUDE.md
459
470
  ├── AGENT_WORKFLOW.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patricksardinha/agentkit-cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },