@patricksardinha/agentkit-cli 0.1.0 → 0.3.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
@@ -1,327 +1,435 @@
1
- # AgentKit CLI
2
-
3
- > Bootstrap your projects with an AI-native orchestration layer — like `create vite@latest`, but for agentic development with Claude Code.
4
-
5
- [![npm version](https://img.shields.io/npm/v/agentkit-cli)](https://www.npmjs.com/package/agentkit-cli)
6
- [![license](https://img.shields.io/npm/l/agentkit-cli)](./LICENSE)
7
- [![built with Claude Code](https://img.shields.io/badge/built%20with-Claude%20Code-7c3aed)](https://claude.ai/code)
8
-
9
- ---
10
-
11
- ## What is AgentKit?
12
-
13
- When you run `npm create vite@latest`, it scaffolds a complete React (or Vue, Svelte…) project in seconds — giving you a working structure you can build on immediately instead of configuring everything from scratch.
14
-
15
- **AgentKit does the same thing, but for AI-native development.**
16
-
17
- It scaffolds the *orchestration layer* that sits on top of any project: the files that tell Claude Code **who** to be, **what** to build, and **how** to divide the work across specialized agents.
18
-
19
- ```
20
- Without AgentKit With AgentKit
21
- ──────────────── ──────────────────────────────
22
- my-project/ my-project/
23
- ├── src/ ├── src/
24
- ├── package.json ├── package.json
25
- └── README.md ├── README.md
26
- ├── CLAUDE.md ← generated
27
- └── AGENT_WORKFLOW.md ← generated
28
- ```
29
-
30
- You open Claude Code, and instead of spending the first 30 minutes explaining your stack and conventions, you just say: **"Read CLAUDE.md and AGENT_WORKFLOW.md, then run Agent 1."**
31
-
32
- ---
33
-
34
- ## The Problem It Solves
35
-
36
- Most developers using Claude Code today work with a single, long-running conversation. They describe what they want, Claude builds it, they correct, they prompt again. This works — but it has limits:
37
-
38
- - **Context gets polluted**one agent accumulates unrelated concerns
39
- - **No reusability** — you re-explain conventions on every project
40
- - **No parallelism** everything is sequential because there's no coordination layer
41
- - **No audit trail** — no document captures the decisions made
42
-
43
- AgentKit introduces a **structured orchestration layer** that solves all four problems. Your project gets two new files — `CLAUDE.md` and `AGENT_WORKFLOW.md` — that act as standing instructions for a team of specialized agents.
44
-
45
- ---
46
-
47
- ## How It Works
48
-
49
- ```
50
- ┌─────────────────────────────────────────────────────────────────┐
51
- │ Developer runs: npx agentkit init │
52
- └─────────────────────────┬───────────────────────────────────────┘
53
-
54
-
55
- ┌─────────────────────────────────────────────────────────────────┐
56
- │ AgentKit CLI │
57
- │ │
58
- │ 1. Scans the project directory │
59
- │ → reads package.json, Cargo.toml, requirements.txt… │
60
- │ │
61
- │ 2. Detects the stack │
62
- │ → React · Next.js · Tauri · FastAPI · Express · Node │
63
- │ → TypeScript? Tailwind? Prisma? Testing setup? │
64
- │ │
65
- │ 3. Generates adapted files │
66
- │ → CLAUDE.md (conventions, stack, commands, rules) │
67
- │ → AGENT_WORKFLOW.md (agents, scope, success criteria) │
68
- └─────────────────────────┬───────────────────────────────────────┘
69
-
70
-
71
- ┌─────────────────────────────────────────────────────────────────┐
72
- │ Your projectready for agentic development │
73
- │ │
74
- │ Developer opens Claude Code and runs agents one by one: │
75
- │ │
76
- │ Agent 1 → Infra & Setup (success: project builds) │
77
- │ ↓ │
78
- │ Agent 2 Core Feature A (success: tests pass) │
79
- │ ↓ │
80
- │ Agent 3 → Core Feature B (success: tests pass) │
81
- │ ↓ │
82
- │ Agent 4 → Docs & Deploy (success: CI/CD green) │
83
- │ │
84
- Human validates each success criterion before the next agent. │
85
- └─────────────────────────────────────────────────────────────────┘
86
- ```
87
-
88
- ### The two generated files
89
-
90
- **`CLAUDE.md`** the standing brief for every agent. It answers:
91
- - What is this project and what stack does it use?
92
- - What are the absolute rules (naming conventions, forbidden patterns, testing requirements)?
93
- - What commands exist and what do they do?
94
- - What does "done" look like?
95
-
96
- **`AGENT_WORKFLOW.md`** the project roadmap, broken into agent-sized tasks. Each agent entry specifies:
97
- - Its scope (what it touches)
98
- - Its dependencies (which agent must finish first)
99
- - Its deliverables (what files it produces)
100
- - Its success criterion (a verifiable, runnable check)
101
-
102
- ---
103
-
104
- ## Quickstart
105
-
106
- ```bash
107
- # In any project directory (empty or existing)
108
- npx agentkit init
109
- ```
110
-
111
- That's it. AgentKit detects your stack and writes the two files.
112
-
113
- ```bash
114
- # Add a new specialized agent to an existing workflow
115
- npx agentkit add agent
116
-
117
- # Check the status of your agent workflow
118
- npx agentkit status
119
- ```
120
-
121
- ---
122
-
123
- ## Supported Stacks
124
-
125
- | Stack | Detected by | Template features |
126
- |---|---|---|
127
- | **React** | `react` in `package.json` | TypeScript/JS, Vite, testing setup |
128
- | **Next.js** | `next` in `package.json` | App Router, Tailwind, Prisma (if present) |
129
- | **Tauri** | `src-tauri/` directory | Rust backend, IPC commands, Tauri plugins |
130
- | **FastAPI** | `fastapi` in `requirements.txt` | Python, Pydantic, async patterns |
131
- | **Express** | `express` in `package.json` | REST API, middleware, auth patterns |
132
- | **Node.js** | `package.json` (generic) | Scripts, modules, CI/CD |
133
- | **Unknown** | fallback | Generic workflow, manually editable |
134
-
135
- Stack detection is additive — extras like TypeScript, Tailwind, and Prisma are detected on top of the primary framework and enrich the generated templates accordingly.
136
-
137
- ---
138
-
139
- ## Example Output
140
-
141
- ### For a React + TypeScript project
142
-
143
- `npx agentkit init` in a React/TypeScript/Vite project generates:
144
-
145
- ```markdown
146
- # CLAUDE.md my-app
147
-
148
- ## Stack
149
- - Framework : React (TypeScript)
150
- - Language : TypeScript
151
- - Build : Vite
152
-
153
- ## Commands
154
- - `npm run dev` — development server
155
- - `npm run build` — production build
156
- - `npm test` — run tests
157
-
158
- ## Structure
159
- src/
160
- components/ ← UI components (PascalCase)
161
- hooks/ ← custom hooks (prefix: use*)
162
- pages/ ← page-level components
163
- utils/ ← shared helpers
164
-
165
- ## Conventions
166
- 1. Components in PascalCase
167
- 2. Hooks prefixed with `use`
168
- 3. Props interfaces named `*Props`
169
- 4. All console output through a centralized logger
170
- ```
171
-
172
- ```markdown
173
- # Agent Workflow — my-app
174
-
175
- ## Agents
176
-
177
- ### Agent 1 · Components
178
- Scope : reusable UI components
179
- Delivers : src/components/
180
- Criteria : components documented and tested
181
-
182
- ### Agent 2 · State & Hooks
183
- Scope : state management, custom hooks
184
- Delivers : src/hooks/
185
- Criteria : hooks unit-tested
186
-
187
- ### Agent 3 · Pages & Routing
188
- Scope : page assembly, react-router
189
- Delivers : src/pages/
190
- Criteria : navigation working
191
-
192
- ### Agent 4 · Tests & CI
193
- Scope : test coverage, CI configuration
194
- Delivers : tests/, .github/workflows/
195
- Criteria : npm test passes
196
- ```
197
-
198
- ### For a Tauri project (more complex detection)
199
-
200
- A project with `src-tauri/` gets a richer workflow that accounts for the Rust/JS boundary, IPC commands, plugin permissions, and the dual build system:
201
-
202
- ```markdown
203
- # Agent Workflow — my-desktop-app
204
-
205
- ### Agent 1 · Rust Commands
206
- Scope : Tauri commands (IPC), permissions
207
- Delivers : src-tauri/src/commands.rs, tauri.conf.json
208
- Criteria : `cargo build` passes
209
-
210
- ### Agent 2 · Frontend UI
211
- Scope : TypeScript UI, IPC integration
212
- Delivers : src/components/, src/utils/
213
- Criteria : IPC calls functional
214
-
215
- ### Agent 3 · Build & Packaging
216
- Scope : build config, icons, installers
217
- Delivers : src-tauri/tauri.conf.json, icons/
218
- Criteria : `npm run tauri build` produces a bundle
219
-
220
- ### Agent 4 · Tests
221
- Scope : Rust tests + frontend tests
222
- Delivers : src-tauri/tests/, tests/
223
- Criteria : `cargo test` + `npm test` pass
224
- ```
225
-
226
- ---
227
-
228
- ## Design Philosophy
229
-
230
- ### Why not just use a prompt template?
231
-
232
- A prompt template lives in your head (or your notes). It gets copy-pasted, drifts between projects, and is lost the moment you close the conversation.
233
-
234
- `CLAUDE.md` and `AGENT_WORKFLOW.md` are **project artifacts**. They live in the repo, they're versioned, they're readable by every agent in every session, and they can be reviewed in a pull request like any other code.
235
-
236
- ### Why separate agents instead of one big conversation?
237
-
238
- Each agent has a **bounded context** — it only knows what it needs to know. This has three effects:
239
-
240
- 1. **Better output** an agent focused solely on testing isn't distracted by infrastructure concerns
241
- 2. **Human checkpoints** — you validate a success criterion before the next agent starts, catching errors early
242
- 3. **Parallelism** — once dependencies are met, agents that don't depend on each other can run simultaneously
243
-
244
- ### Why verifiable success criteria?
245
-
246
- Every agent in `AGENT_WORKFLOW.md` ends with a criterion like `npm test passes` or `cargo build passes`. These aren't goals — they're **gates**. If the criterion isn't met, you don't prompt the next agent. This makes the workflow deterministic and auditable.
247
-
248
- ---
249
-
250
- ## Meta: How AgentKit Was Built
251
-
252
- AgentKit CLI was built using the same workflow it generates.
253
-
254
- The repo contains a `CLAUDE.md` and `AGENT_WORKFLOW.md` that describe how to build the CLI itself. Four specialized agents were used in sequence:
255
-
256
- ```
257
- Agent 1 · Infra & Setup
258
- package.json, tsconfig, tsup, vitest, GitHub Actions
259
- → success: npm run build passes
260
-
261
- Agent 2 · Detectors
262
- src/detectors/stackDetector.ts, gitDetector.ts
263
- success: npm test passes on project fixtures
264
-
265
- Agent 3 · Generators & Templates
266
- src/generators/, src/templates/ (one per stack)
267
- success: valid files generated for each supported stack
268
-
269
- Agent 4 · Commands CLI
270
- → src/commands/init.ts, add.ts, status.ts, src/cli.ts
271
- → success: npx agentkit --help shows all commands
272
- ```
273
-
274
- The `CLAUDE.md` and `AGENT_WORKFLOW.md` at the root of this repo are the exact files that drove this build process. They are not documentation added after the fact they are the source of truth that was written first and executed against.
275
-
276
- ---
277
-
278
- ## Project Structure
279
-
280
- ```
281
- agentkit-cli/
282
- ├── src/
283
- │ ├── cli.ts ← entry point (commander.js)
284
- │ ├── commands/
285
- │ │ ├── init.ts ← npx agentkit init
286
- │ │ ├── add.ts ← npx agentkit add agent
287
- │ │ └── status.ts ← npx agentkit status
288
- │ ├── detectors/
289
- │ │ ├── stackDetector.ts ← reads package.json, Cargo.toml, etc.
290
- │ │ └── gitDetector.ts ← checks for .git directory
291
- │ ├── generators/
292
- │ │ ├── claudeMdGenerator.ts ← routes to the right template
293
- │ │ └── workflowGenerator.ts ← routes to the right template
294
- │ ├── templates/
295
- │ │ ├── react.ts ← React/Vite template
296
- │ │ ├── nextjs.ts ← Next.js App Router template
297
- │ │ ├── tauri.ts ← Tauri v2 template
298
- │ │ ├── fastapi.ts ← FastAPI template
299
- │ │ ├── express.ts ← Express.js template
300
- │ │ ├── node.ts ← generic Node.js template
301
- │ │ └── unknown.ts ← fallback for unknown stacks
302
- │ └── utils/
303
- │ └── logger.ts ← chalk + ora output helpers
304
- ├── tests/
305
- ├── CLAUDE.md ← agent brief for this repo
306
- ├── AGENT_WORKFLOW.md agent workflow for this repo
307
- ├── package.json
308
- ├── tsconfig.json
309
- └── tsup.config.ts
310
- ```
311
-
312
- ---
313
-
314
- ## Contributing
315
-
316
- Pull requests are welcome. If you add a new stack template:
317
-
318
- 1. Create `src/templates/your-stack.ts` export `claudeMd(stack)` and `workflow(stack)`
319
- 2. Add detection logic in `src/detectors/stackDetector.ts`
320
- 3. Register the new case in `src/generators/claudeMdGenerator.ts` and `workflowGenerator.ts`
321
- 4. Add fixtures in `tests/detectors/` and tests in `tests/generators/`
322
-
323
- ---
324
-
325
- ## License
326
-
327
- MIT — © 2026
1
+ # @patricksardinha/agentkit-cli
2
+
3
+ > Bootstrap any project with an AI-native orchestration layer — like `create vite@latest`, but for agentic development with Claude Code.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@patricksardinha/agentkit-cli)](https://www.npmjs.com/package/@patricksardinha/agentkit-cli)
6
+ [![license](https://img.shields.io/npm/l/@patricksardinha/agentkit-cli)](./LICENSE)
7
+ [![built with Claude Code](https://img.shields.io/badge/built%20with-Claude%20Code-7c3aed)](https://claude.ai/code)
8
+
9
+ ---
10
+
11
+ ## What is AgentKit?
12
+
13
+ When you run `npm create vite@latest`, it scaffolds a complete React project in seconds — giving you a working structure you can build on immediately instead of configuring everything from scratch.
14
+
15
+ **AgentKit does the same thing, but for AI-native development.**
16
+
17
+ It scaffolds the *orchestration layer* that sits on top of any project: the files that tell Claude Code **who** to be, **what** to build, **how** to divide the work across specialized agents, and **exactly what to do** — step by step, without you having to prompt each agent manually.
18
+
19
+ You open Claude Code, type one instruction, and it runs the entire workflow autonomously.
20
+
21
+ ---
22
+
23
+ ## Core Design Principle — No AI Inside the Tool
24
+
25
+ AgentKit contains **no AI**. No API calls, no LLM integration, no costs, no API key required.
26
+
27
+ This is a deliberate choice. AgentKit is a **structural tool** — it generates the scaffolding, the rules, and the execution framework. The intelligence comes from two places:
28
+
29
+ - **You** — you optionally write a `PROJECT_BLUEPRINT.md` describing what you want to build
30
+ - **Claude Code** it either reads your blueprint or asks you questions, decomposes the project into specialized agents, then executes them in sequence
31
+
32
+ This separation means AgentKit works with any LLM and never becomes outdated
33
+ as AI models improve. The tool itself costs nothing to run — but be aware:
34
+
35
+ - **Claude Code or any hosted LLM** requires a paid subscription to the
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
40
+ - **AgentKit itself** has no cost, no API key, and no usage limits
41
+
42
+ ```
43
+ You (optionally write a blueprint)
44
+
45
+ AgentKit CLI (generates the structure)
46
+
47
+ Claude Code (discovers or reads blueprint → decomposes → executes)
48
+
49
+ Your finished project
50
+ ```
51
+
52
+ ---
53
+
54
+ ## The Problem It Solves
55
+
56
+ Most developers using Claude Code today work with a single, long-running conversation. They describe what they want, Claude builds it, they correct, they prompt again. This works — but it has limits:
57
+
58
+ - **Context gets polluted** — one agent accumulates unrelated concerns
59
+ - **No reusability** you re-explain conventions on every project
60
+ - **No audit trail** — no document captures decisions made
61
+ - **Manual orchestration** — you have to manage agent transitions yourself
62
+ - **Poor decomposition** most developers don't know how to split work into optimal agents
63
+
64
+ AgentKit solves all five — including the last one, by always delegating decomposition to Claude Code, whether or not you provide a blueprint.
65
+
66
+ ---
67
+
68
+ ## How It Works
69
+
70
+ 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.
71
+
72
+ ### Without blueprint Phase 0 asks you
73
+
74
+ ```bash
75
+ npx @patricksardinha/agentkit-cli init
76
+ ```
77
+
78
+ 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.
79
+
80
+ ```
81
+ Claude Code: "Before I start, I need to understand what you want to build.
82
+
83
+ 1. What is this project? (one sentence)
84
+ 2. What are the main features you want to build?
85
+ 3. Any tech constraints or architecture preferences?
86
+
87
+ Please answer and I'll propose an agent decomposition."
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."
92
+
93
+ Claude Code: "I've decomposed the project into 5 agents:
94
+ 1. Infra & Tauri Setup
95
+ 2. Data Layer (Dexie)
96
+ 3. Ollama Integration
97
+ 4. RAG & Search
98
+ 5. UI & Features
99
+ Should I proceed?"
100
+
101
+ You: "Yes." ← then execution begins
102
+ ```
103
+
104
+ ### With blueprint — Phase 0 reads your file
105
+
106
+ Write a `PROJECT_BLUEPRINT.md` at the root of your project in plain language — just describe what you want to build. No agents, no structure, no technical layers required.
107
+
108
+ ```bash
109
+ npx @patricksardinha/agentkit-cli init --blueprint PROJECT_BLUEPRINT.md
110
+ ```
111
+
112
+ 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.
113
+
114
+ ```
115
+ Claude Code: "I've read PROJECT_BLUEPRINT.md and decomposed the project into 5 agents:
116
+ 1. Infra & Tauri Setup
117
+ 2. Data Layer (Dexie)
118
+ 3. Ollama Integration
119
+ 4. RAG & Search
120
+ 5. UI & Features
121
+ Should I proceed?"
122
+
123
+ You: "Yes." ← then execution begins
124
+ ```
125
+
126
+ **A good blueprint looks like this:**
127
+
128
+ ```markdown
129
+ # DevLog Desktop Blueprint
130
+
131
+ ## Goal
132
+ A desktop app where I log my dev sessions as I work.
133
+ At the end of the week it generates a summary I can paste into my standup.
134
+ I also want to search my history in natural language.
135
+
136
+ ## Features
137
+ - Create a session: what I worked on, how long, blockers encountered
138
+ - Weekly summary generated automatically from local history
139
+ - Natural language search across all past sessions (RAG)
140
+ - Export summaries as markdown for standups
141
+ - Dark/light theme, minimal UI
142
+
143
+ ## Tech constraints
144
+ - Desktop app — Tauri v2 (Windows first)
145
+ - All data stays local — no cloud, no auth required
146
+ - React 19 + TypeScript + Tailwind v4
147
+ - Dexie for local storage (IndexedDB)
148
+ - Ollama for local AI (summaries + embeddings) — no API key
149
+
150
+ ## Architecture notes
151
+ - No Supabase — bypass auth entirely
152
+ - RAG: generate embeddings with nomic-embed-text, store in Dexie,
153
+ search by cosine similarity
154
+ - Export via Tauri fs plugin
155
+ ```
156
+
157
+ ### Phase 1 — Execution (same in both cases)
158
+
159
+ Once you validate the decomposition, Claude Code executes each agent autonomously:
160
+
161
+ ```
162
+ Agent 1 → Infra & Tauri Setup
163
+ reads : CLAUDE.md + agents/agent-1-infra/skills.md
164
+ runs : npm run tauri:dev
165
+ passes → moves to Agent 2
166
+ fails → analyzes error, fixes, retries (max 3 times)
167
+ after 3 failures: asks for human intervention
168
+
169
+ Agent 2 Data Layer (Dexie)
170
+ reads : CLAUDE.md + agents/agent-2-data/skills.md
171
+ runs : npm test
172
+ ✅ passes → moves to Agent 3
173
+
174
+ ...
175
+
176
+ Agent N → last agent
177
+ 🎉 Workflow complete
178
+ ```
179
+
180
+ ### The one instruction
181
+
182
+ In both cases, the instruction to give Claude Code is identical:
183
+
184
+ ```
185
+ Read PLAYBOOK.md and execute the procedure.
186
+ ```
187
+
188
+ ---
189
+
190
+ ## The Generated Files
191
+
192
+ ```
193
+ my-project/
194
+ ├── PROJECT_BLUEPRINT.md ← your input (untouched, optional)
195
+
196
+ ├── CLAUDE.md ← generated: conventions, stack, rules
197
+ ├── AGENT_WORKFLOW.md ← placeholder: Claude Code fills this in Phase 0
198
+ ├── PLAYBOOK.md ← generated: Phase 0 + Phase 1 execution engine
199
+
200
+ └── agents/ ← generated: per-agent skill folders
201
+ ├── agent-1-infra/
202
+ │ └── skills.md ← fill in infra-specific context
203
+ ├── agent-2-data/
204
+ │ └── skills.md ← fill in data-specific context
205
+ └── agent-3-features/
206
+ └── skills.md ← fill in feature-specific context
207
+ ```
208
+
209
+ **`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.
210
+
211
+ **`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
+
213
+ **`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.
214
+
215
+ **`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.
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
+ ```
232
+
233
+ ---
234
+
235
+ ## Handling Future Iterations
236
+
237
+ When you want to add a feature to an already-built project:
238
+
239
+ ```bash
240
+ npx @patricksardinha/agentkit-cli add --feature "add CSV export to the dashboard"
241
+ ```
242
+
243
+ AgentKit:
244
+ 1. Reads your existing `AGENT_WORKFLOW.md` to find the last agent number
245
+ 2. Appends a new agent block scoped to the new feature
246
+ 3. Creates `agents/agent-N-csv-export/skills.md`
247
+ 4. Regenerates `PLAYBOOK.md` **without Phase 0** — the initial decomposition is already done
248
+
249
+ Then in Claude Code:
250
+ ```
251
+ Read PLAYBOOK.md and execute only the agents that haven't been completed yet.
252
+ ```
253
+
254
+ Phase 0 only ever runs once during the initial `agentkit init`. Iterations go straight to execution.
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 |
269
+
270
+ ---
271
+
272
+ ## Design Philosophy
273
+
274
+ ### No AI in the toolby design
275
+
276
+ 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.
277
+
278
+ ### Phase 0 always runs — with or without blueprint
279
+
280
+ 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.
281
+
282
+ ### You write intent, Claude Code writes structure
283
+
284
+ 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.
285
+
286
+ ### Phase 0 runs once, iterations skip it
287
+
288
+ 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.
289
+
290
+ ### Bounded context per agent
291
+
292
+ 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.
293
+
294
+ ### Verifiable success criteria
295
+
296
+ 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.
297
+
298
+ ---
299
+
300
+ ## Meta: AgentKit Was Built With AgentKit
301
+
302
+ This CLI was built using the exact workflow it generates.
303
+
304
+ ### A little note
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.
311
+
312
+ `PROJECT_BLUEPRINT.md` however is **genuine** — it reflects the actual vision
313
+ of the project from the beginning, including the Phase 0 decomposition principle
314
+ that was central to the design.
315
+
316
+ These four files serve as a concrete, real-world example of what AgentKit
317
+ generates — on the same project rather than a separate demo repo. When you
318
+ use AgentKit on your own project, the files it generates will follow exactly
319
+ this structure.
320
+
321
+ ### How it would have worked
322
+
323
+ ```
324
+ Step 1 — Write PROJECT_BLUEPRINT.md (genuine)
325
+ Described the CLI's features, constraints, and architecture in plain language.
326
+ No agents, no layers — just intent.
327
+
328
+ 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
+ Step 3 — "Read PLAYBOOK.md and execute the procedure."
333
+
334
+ Phase 0 — Decomposition
335
+ Claude Code reads PROJECT_BLUEPRINT.md.
336
+ Proposes 4 agents, waits for validation.
337
+
338
+ "I have decomposed the project into 4 agents:
339
+ 1. Infra & Setup
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 ✅
364
+
365
+ 🎉 Workflow complete
366
+ ```
367
+
368
+ The `CLAUDE.md`, `AGENT_WORKFLOW.md`, and `PLAYBOOK.md` in this repo show
369
+ exactly what each file looks like after AgentKit generates it and Claude Code
370
+ fills it in. Use them as a reference when writing your own `PROJECT_BLUEPRINT.md`.
371
+
372
+ ---
373
+
374
+ ## Project Structure
375
+
376
+ ```
377
+ agentkit-cli/
378
+ ├── src/
379
+ │ ├── cli.ts
380
+ │ ├── commands/
381
+ │ │ ├── init.ts ← npx agentkit init [--blueprint]
382
+ │ │ ├── add.ts ← npx agentkit add --feature
383
+ │ │ └── status.ts ← npx agentkit status
384
+ │ ├── detectors/
385
+ │ │ ├── stackDetector.ts
386
+ │ │ └── gitDetector.ts
387
+ │ ├── generators/
388
+ │ │ ├── claudeMdGenerator.ts
389
+ │ │ ├── workflowGenerator.ts
390
+ │ │ ├── playbookGenerator.ts ← Phase 0 (Discovery or Decomposition) + Phase 1
391
+ │ │ └── skillsGenerator.ts
392
+ │ ├── templates/
393
+ │ │ ├── react.ts
394
+ │ │ ├── nextjs.ts
395
+ │ │ ├── tauri.ts
396
+ │ │ ├── fastapi.ts
397
+ │ │ ├── express.ts
398
+ │ │ ├── node.ts
399
+ │ │ └── unknown.ts
400
+ │ └── utils/
401
+ │ └── logger.ts
402
+ ├── tests/
403
+ ├── agents/
404
+ │ ├── agent-1-infra/
405
+ │ │ └── skills.md
406
+ │ ├── agent-2-detectors/
407
+ │ │ └── skills.md
408
+ │ ├── agent-3-generators/
409
+ │ │ └── skills.md
410
+ │ └── agent-4-commands/
411
+ │ └── skills.md
412
+ ├── PROJECT_BLUEPRINT.md
413
+ ├── CLAUDE.md
414
+ ├── AGENT_WORKFLOW.md
415
+ ├── PLAYBOOK.md
416
+ ├── package.json
417
+ └── tsup.config.ts
418
+ ```
419
+
420
+ ---
421
+
422
+ ## Contributing
423
+
424
+ To add a new stack template:
425
+
426
+ 1. Create `src/templates/your-stack.ts` — export `claudeMd(stack)` and `workflow(stack)`
427
+ 2. Add detection in `src/detectors/stackDetector.ts`
428
+ 3. Register in `src/generators/claudeMdGenerator.ts` and `workflowGenerator.ts`
429
+ 4. Add fixtures in `tests/detectors/` and tests in `tests/generators/`
430
+
431
+ ---
432
+
433
+ ## License
434
+
435
+ MIT — © 2026 Patrick Sardinha