@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/AGENT_WORKFLOW.md +129 -55
- package/CLAUDE.md +70 -45
- package/LICENSE +21 -0
- package/PLAYBOOK.md +192 -0
- package/PROJECT_BLUEPRINT.md +52 -0
- package/README.md +435 -327
- package/agents/agent-1-infra/skills.md +46 -0
- package/agents/agent-2-detectors/skills.md +38 -0
- package/agents/agent-3-generators/skills.md +43 -0
- package/agents/agent-4-commands/skills.md +37 -0
- package/dist/cli.cjs +149 -49
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +149 -49
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/add.ts +22 -15
- package/src/commands/init.ts +1 -1
- package/src/generators/playbookGenerator.ts +136 -36
- package/tests/commands/add.test.ts +1 -1
- package/tests/generators/playbookGenerator.test.ts +140 -48
package/README.md
CHANGED
|
@@ -1,327 +1,435 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
> Bootstrap
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/agentkit-cli)
|
|
6
|
-
[](./LICENSE)
|
|
7
|
-
[](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
|
|
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,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- **
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
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
|
+
[](https://www.npmjs.com/package/@patricksardinha/agentkit-cli)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
[](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 tool — by 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
|