@patricksardinha/agentkit-cli 0.1.0 → 0.2.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 CHANGED
@@ -1,55 +1,55 @@
1
- # Agent Workflow — AgentKit CLI
2
-
3
- ## Vue d'ensemble
4
- Ce projet est construit par 4 agents spécialisés en séquence.
5
- Chaque agent a un périmètre strict, des inputs définis, et un
6
- critère de succès vérifiable avant de passer au suivant.
7
-
8
- ## Phase 1 — Foundation
9
-
10
- ### Agent 1 · Infra & Setup
11
- Périmètre : scaffolding du projet Node.js/TS, configuration build
12
- Lit : CLAUDE.md section Stack
13
- Produit :
14
- - package.json (commander, inquirer, chalk, ora, tsup)
15
- - tsconfig.json + tsup.config.ts
16
- - .github/workflows/release.yml (npm publish on v*)
17
- - vitest.config.ts
18
- - src/utils/logger.ts
19
- Critère : npm run build passe, structure src/ conforme à CLAUDE.md
20
-
21
- ### Agent 2 · Detectors
22
- Dépend de : Agent 1
23
- Périmètre : détection automatique de la stack d'un projet cible
24
- Produit :
25
- - src/detectors/stackDetector.ts
26
- → détecte : React, Next.js, Tauri, Python/FastAPI, Node/Express
27
- → lit package.json, requirements.txt, src-tauri/
28
- - src/detectors/gitDetector.ts
29
- → vérifie si le dossier est un repo git
30
- - tests/detectors/stackDetector.test.ts
31
- Critère : npm test passe sur des fixtures de projets types
32
-
33
- ## Phase 2 — Generators (parallélisables)
34
-
35
- ### Agent 3 · Generators
36
- Dépend de : Agent 2 (pour stackDetector)
37
- Périmètre : génération des fichiers CLAUDE.md et AGENT_WORKFLOW.md
38
- Produit :
39
- - src/generators/claudeMdGenerator.ts
40
- → prend StackInfo, retourne string CLAUDE.md adapté
41
- - src/generators/workflowGenerator.ts
42
- → prend StackInfo, retourne string AGENT_WORKFLOW.md adapté
43
- - src/templates/ (un template par stack détectée)
44
- - tests/generators/*.test.ts
45
- Critère : génère des fichiers valides pour chaque stack supportée
46
-
47
- ### Agent 4 · Commands CLI
48
- Dépend de : Agent 2 + Agent 3
49
- Périmètre : wiring des commandes CLI avec commander.js
50
- Produit :
51
- - src/commands/init.ts → npx agentkit init
52
- - src/commands/add.ts → npx agentkit add agent
53
- - src/commands/status.ts → npx agentkit status
54
- - src/cli.ts → entry point
1
+ # Agent Workflow — AgentKit CLI
2
+
3
+ ## Vue d'ensemble
4
+ Ce projet est construit par 4 agents spécialisés en séquence.
5
+ Chaque agent a un périmètre strict, des inputs définis, et un
6
+ critère de succès vérifiable avant de passer au suivant.
7
+
8
+ ## Phase 1 — Foundation
9
+
10
+ ### Agent 1 · Infra & Setup
11
+ Périmètre : scaffolding du projet Node.js/TS, configuration build
12
+ Lit : CLAUDE.md section Stack
13
+ Produit :
14
+ - package.json (commander, inquirer, chalk, ora, tsup)
15
+ - tsconfig.json + tsup.config.ts
16
+ - .github/workflows/release.yml (npm publish on v*)
17
+ - vitest.config.ts
18
+ - src/utils/logger.ts
19
+ Critère : npm run build passe, structure src/ conforme à CLAUDE.md
20
+
21
+ ### Agent 2 · Detectors
22
+ Dépend de : Agent 1
23
+ Périmètre : détection automatique de la stack d'un projet cible
24
+ Produit :
25
+ - src/detectors/stackDetector.ts
26
+ → détecte : React, Next.js, Tauri, Python/FastAPI, Node/Express
27
+ → lit package.json, requirements.txt, src-tauri/
28
+ - src/detectors/gitDetector.ts
29
+ → vérifie si le dossier est un repo git
30
+ - tests/detectors/stackDetector.test.ts
31
+ Critère : npm test passe sur des fixtures de projets types
32
+
33
+ ## Phase 2 — Generators (parallélisables)
34
+
35
+ ### Agent 3 · Generators
36
+ Dépend de : Agent 2 (pour stackDetector)
37
+ Périmètre : génération des fichiers CLAUDE.md et AGENT_WORKFLOW.md
38
+ Produit :
39
+ - src/generators/claudeMdGenerator.ts
40
+ → prend StackInfo, retourne string CLAUDE.md adapté
41
+ - src/generators/workflowGenerator.ts
42
+ → prend StackInfo, retourne string AGENT_WORKFLOW.md adapté
43
+ - src/templates/ (un template par stack détectée)
44
+ - tests/generators/*.test.ts
45
+ Critère : génère des fichiers valides pour chaque stack supportée
46
+
47
+ ### Agent 4 · Commands CLI
48
+ Dépend de : Agent 2 + Agent 3
49
+ Périmètre : wiring des commandes CLI avec commander.js
50
+ Produit :
51
+ - src/commands/init.ts → npx agentkit init
52
+ - src/commands/add.ts → npx agentkit add agent
53
+ - src/commands/status.ts → npx agentkit status
54
+ - src/cli.ts → entry point
55
55
  Critère : npx agentkit --help affiche toutes les commandes
package/CLAUDE.md CHANGED
@@ -1,45 +1,45 @@
1
- # CLAUDE.md — AgentKit CLI
2
-
3
- ## Rôle de ce fichier
4
- Ce fichier est lu par tous les agents Claude Code avant toute action.
5
- Il définit les conventions, la stack, et les règles du projet.
6
-
7
- ## Projet
8
- Nom : agentkit-cli
9
- Type : CLI npm open-source (Node.js + TypeScript)
10
- Objectif : Scaffolder des workflows multi-agents Claude Code
11
- Public : Développeurs fullstack qui utilisent Claude Code
12
- Registry : npm (npx agentkit init)
13
-
14
- ## Stack
15
- - Runtime : Node.js 20+, TypeScript 5
16
- - CLI : commander.js + inquirer.js + chalk + ora
17
- - Build : tsup (ESM + CJS dual output)
18
- - Tests : Vitest
19
- - CI/CD : GitHub Actions → npm publish on tag v*
20
-
21
- ## Structure des fichiers
22
- src/
23
- cli.ts ← entry point (commander setup)
24
- commands/ ← une commande = un fichier
25
- generators/ ← logique de génération des fichiers
26
- detectors/ ← détection de stack (package.json, etc.)
27
- templates/ ← templates CLAUDE.md, AGENT_WORKFLOW.md
28
- utils/ ← helpers partagés
29
- tests/ ← Vitest, miroir de src/
30
-
31
- ## Règles absolues
32
- 1. Chaque commande dans src/commands/ est indépendante
33
- 2. Les templates dans src/templates/ sont des fonctions TS, pas des fichiers .md statiques
34
- 3. Tout output CLI passe par src/utils/logger.ts (jamais console.log direct)
35
- 4. Chaque fichier généré doit avoir un test dans tests/generators/
36
- 5. Zéro dépendance non listée ici sans discussion
37
-
38
- ## Conventions de commit
39
- feat: / fix: / test: / docs: / chore: / release:
40
-
41
- ## Critères de succès (Definition of Done)
42
- - npx agentkit init fonctionne sur un repo vide
43
- - npx agentkit init détecte automatiquement React, Next.js, Tauri, Python
44
- - npm test passe sans erreur
1
+ # CLAUDE.md — AgentKit CLI
2
+
3
+ ## Rôle de ce fichier
4
+ Ce fichier est lu par tous les agents Claude Code avant toute action.
5
+ Il définit les conventions, la stack, et les règles du projet.
6
+
7
+ ## Projet
8
+ Nom : agentkit-cli
9
+ Type : CLI npm open-source (Node.js + TypeScript)
10
+ Objectif : Scaffolder des workflows multi-agents Claude Code
11
+ Public : Développeurs fullstack qui utilisent Claude Code
12
+ Registry : npm (npx agentkit init)
13
+
14
+ ## Stack
15
+ - Runtime : Node.js 20+, TypeScript 5
16
+ - CLI : commander.js + inquirer.js + chalk + ora
17
+ - Build : tsup (ESM + CJS dual output)
18
+ - Tests : Vitest
19
+ - CI/CD : GitHub Actions → npm publish on tag v*
20
+
21
+ ## Structure des fichiers
22
+ src/
23
+ cli.ts ← entry point (commander setup)
24
+ commands/ ← une commande = un fichier
25
+ generators/ ← logique de génération des fichiers
26
+ detectors/ ← détection de stack (package.json, etc.)
27
+ templates/ ← templates CLAUDE.md, AGENT_WORKFLOW.md
28
+ utils/ ← helpers partagés
29
+ tests/ ← Vitest, miroir de src/
30
+
31
+ ## Règles absolues
32
+ 1. Chaque commande dans src/commands/ est indépendante
33
+ 2. Les templates dans src/templates/ sont des fonctions TS, pas des fichiers .md statiques
34
+ 3. Tout output CLI passe par src/utils/logger.ts (jamais console.log direct)
35
+ 4. Chaque fichier généré doit avoir un test dans tests/generators/
36
+ 5. Zéro dépendance non listée ici sans discussion
37
+
38
+ ## Conventions de commit
39
+ feat: / fix: / test: / docs: / chore: / release:
40
+
41
+ ## Critères de succès (Definition of Done)
42
+ - npx agentkit init fonctionne sur un repo vide
43
+ - npx agentkit init détecte automatiquement React, Next.js, Tauri, Python
44
+ - npm test passe sans erreur
45
45
  - npx tsc --noEmit passe sans erreur
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Patrick Sardinha
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,327 +1,354 @@
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 project ready 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 Workflowmy-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
+ ```
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 agent brief
27
+ ├── AGENT_WORKFLOW.md roadmap
28
+ ├── PLAYBOOK.md ← execution guide
29
+ └── agents/ ← per-agent skills
30
+ ├── agent-1-infra/
31
+ ├── agent-2-auth/
32
+ └── agent-3-features/
33
+ ```
34
+
35
+ You open Claude Code, type one instruction, and it runs the entire workflow autonomously.
36
+
37
+ ---
38
+
39
+ ## The Problem It Solves
40
+
41
+ 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:
42
+
43
+ - **Context gets polluted** — one agent accumulates unrelated concerns
44
+ - **No reusability** — you re-explain conventions on every project
45
+ - **No parallelism** — everything is sequential without a coordination layer
46
+ - **No audit trail** — no document captures decisions made
47
+ - **Manual orchestration** — you have to manage agent transitions yourself
48
+
49
+ AgentKit introduces a **structured orchestration layer** that solves all five problems.
50
+
51
+ ---
52
+
53
+ ## How It Works
54
+
55
+ ```
56
+ ┌─────────────────────────────────────────────────────────────────┐
57
+ Step 1 — You run: npx agentkit init --blueprint BLUEPRINT.md
58
+ └─────────────────────────┬───────────────────────────────────────┘
59
+
60
+
61
+ ┌─────────────────────────────────────────────────────────────────┐
62
+ AgentKit CLI
63
+
64
+ 1. Scans the project directory
65
+ → reads package.json, Cargo.toml, requirements.txt…
66
+
67
+ 2. Detects the stack
68
+ │ → React · Next.js · Tauri · FastAPI · Express · Node │
69
+ → TypeScript? Tailwind? Prisma? Testing setup? │
70
+ │ │
71
+ │ 3. Reads your blueprint (optional) │
72
+ parses features, requirements, architecture notes
73
+ → generates agents tailored to YOUR features
74
+
75
+ 4. Generates the orchestration layer
76
+ CLAUDE.md (conventions, stack, rules)
77
+ → AGENT_WORKFLOW.md (agents, scope, dependencies)
78
+ PLAYBOOK.md (autonomous execution guide)
79
+ → agents/agent-N-*/ (per-agent skills folders)
80
+ └─────────────────────────┬───────────────────────────────────────┘
81
+
82
+
83
+ ┌─────────────────────────────────────────────────────────────────┐
84
+ Step 2 You open Claude Code and type ONE instruction:
85
+ │ │
86
+ │ "Read PLAYBOOK.md and execute the procedure." │
87
+ │ │
88
+ │ Claude Code then runs autonomously: │
89
+ │ │
90
+ │ Agent 1 Infra & Setup │
91
+ │ runs: npm run build │
92
+ │ ✅ passes moves to Agent 2 │
93
+ │ ❌ fails → analyzes error, fixes, retries (max 3x) │
94
+ │ ↓ │
95
+ │ Agent 2 → Auth & Data Layer │
96
+ │ runs: npm test │
97
+ │ ✅ passes moves to Agent 3 │
98
+ │ ↓ │
99
+ │ Agent 3 Features │
100
+ │ runs: npm test │
101
+ │ ✅ passes → moves to Agent 4 │
102
+ │ ↓ │
103
+ │ Agent 4 → Docs & Deploy │
104
+ │ ✅ 🎉 Workflow complete │
105
+ └─────────────────────────────────────────────────────────────────┘
106
+ ```
107
+
108
+ ### The generated files
109
+
110
+ **`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.
111
+
112
+ **`AGENT_WORKFLOW.md`** — the project roadmap broken into agent-sized tasks. Each entry specifies scope, dependencies, deliverables, and a verifiable success criterion.
113
+
114
+ **`PLAYBOOK.md`** the key innovation. A single file that Claude Code reads and executes as a complete autonomous workflow. Includes agent prompts, success criteria, retry logic, correction instructions, and human escalation rules. You don't manage agent transitions — Claude Code does.
115
+
116
+ **`agents/agent-N-slug/`** — per-agent skill folders. Drop any `.md` files here (API docs, DB schemas, business conventions) and the relevant agent will read them before starting its work.
117
+
118
+ ---
119
+
120
+ ## Quickstart
121
+
122
+ ```bash
123
+ # In any project directory
124
+ npx @patricksardinha/agentkit-cli init
125
+
126
+ # With a blueprint for feature-specific agents
127
+ npx @patricksardinha/agentkit-cli init --blueprint PROJECT_BLUEPRINT.md
128
+
129
+ # Add a new feature to an existing project
130
+ npx @patricksardinha/agentkit-cli add --feature "add PDF export system"
131
+
132
+ # Check workflow status
133
+ npx @patricksardinha/agentkit-cli status
134
+ ```
135
+
136
+ Then open Claude Code and type:
137
+ ```
138
+ Read PLAYBOOK.md and execute the procedure.
139
+ ```
140
+
141
+ ---
142
+
143
+ ## The Blueprint File
144
+
145
+ The `--blueprint` flag transforms AgentKit from a generic scaffold tool into a project-specific orchestrator.
146
+
147
+ Without a blueprint, AgentKit generates standard agents based on your stack (Components, Hooks, Pages, Tests for React). With a blueprint, it reads your feature requirements and generates agents tailored to exactly what you want to build.
148
+
149
+ **Example `PROJECT_BLUEPRINT.md`:**
150
+
151
+ ```markdown
152
+ # My App — Blueprint
153
+
154
+ ## Features
155
+ - Email/password authentication with Supabase
156
+ - Dashboard with D3 charts (revenue, users, conversion)
157
+ - PDF export of reports
158
+ - Dark/light theme
159
+
160
+ ## Tech constraints
161
+ - Must work offline (IndexedDB for local data)
162
+ - Tauri desktop build for Windows
163
+ - French and English i18n
164
+
165
+ ## Architecture notes
166
+ - Supabase for auth + reference data
167
+ - Dexie for local user data
168
+ - No Redux Context API only
169
+ ```
170
+
171
+ **What AgentKit generates from this blueprint:**
172
+
173
+ ```markdown
174
+ ## Agent 1 · Infra & Tauri Setup
175
+ Scope : Vite + React + Tauri + Tailwind, i18n config
176
+ Criteria : npm run dev opens without error
177
+
178
+ ## Agent 2 · Auth & Supabase
179
+ Scope : Supabase client, email/password auth, bypass mode
180
+ Criteria : login/logout functional, npm test passes
181
+
182
+ ## Agent 3 · Local Data Layer
183
+ Scope : Dexie schema, sync service, offline support
184
+ Criteria : useLiveQuery returns data, npm test passes
185
+
186
+ ## Agent 4 · Dashboard & D3 Charts
187
+ Scope : chart components, data hooks, mock data
188
+ Criteria : charts render, npm test passes
189
+
190
+ ## Agent 5 · PDF Export
191
+ Scope : PDF generation from dashboard data
192
+ Criteria : export produces valid PDF, npm test passes
193
+
194
+ ## Agent 6 · Desktop & CI/CD
195
+ Scope : Tauri build, GitHub Actions, release workflow
196
+ Criteria : npm run tauri:build produces installer
197
+ ```
198
+
199
+ ---
200
+
201
+ ## Per-Agent Skills
202
+
203
+ Each agent gets its own folder under `agents/`. Drop any `.md` files there API documentation, database schemas, business conventions, examples — and the agent reads them before starting.
204
+
205
+ ```
206
+ agents/
207
+ ├── agent-2-auth/
208
+ │ ├── skills.md ← auto-generated template
209
+ │ └── supabase-schema.md ← you add this: your actual DB schema
210
+ ├── agent-4-dashboard/
211
+ │ ├── skills.md
212
+ │ └── chart-specs.md ← you add this: exact chart requirements
213
+ ```
214
+
215
+ The `skills.md` template generated by AgentKit:
216
+
217
+ ```markdown
218
+ # Skills Agent 2 · Auth & Supabase
219
+
220
+ > This file is read by Agent 2 before starting its work.
221
+ > Fill in what's relevant for your project.
222
+
223
+ ## Technical context (fill in)
224
+ - Supabase URL :
225
+ - Tables involved :
226
+ - Expected RLS :
227
+
228
+ ## Reference documentation (optional)
229
+ <!-- paste API docs, schemas, examples here -->
230
+
231
+ ## Project-specific conventions (optional)
232
+ <!-- e.g. "always use useSession(), never useUser()" -->
233
+ ```
234
+
235
+ ---
236
+
237
+ ## Handling Future Iterations
238
+
239
+ When you want to add a feature to an already-built project:
240
+
241
+ ```bash
242
+ npx @patricksardinha/agentkit-cli add --feature "add CSV export to the dashboard"
243
+ ```
244
+
245
+ AgentKit:
246
+ 1. Reads your existing `AGENT_WORKFLOW.md` to find the last agent number
247
+ 2. Appends a new agent block scoped to the new feature
248
+ 3. Creates `agents/agent-N-csv-export/skills.md`
249
+ 4. Regenerates `PLAYBOOK.md` with the new agent included
250
+
251
+ Then in Claude Code:
252
+ ```
253
+ Read PLAYBOOK.md and execute only the agents that haven't been completed yet.
254
+ ```
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
+ Stack detection is additive — TypeScript, Tailwind, Prisma, and testing setup are detected on top of the primary framework and enrich all generated files accordingly.
271
+
272
+ ---
273
+
274
+ ## Design Philosophy
275
+
276
+ ### Why a PLAYBOOK.md instead of manual prompting?
277
+
278
+ Without AgentKit, a developer using Claude Code has to write a prompt for Agent 1, wait and validate, write a prompt for Agent 2, handle failures manually, and repeat for every agent. With `PLAYBOOK.md`, you write one instruction. Claude Code handles agent transitions, validates success criteria, retries on failure, and asks for human input only when genuinely blocked.
279
+
280
+ ### Why per-agent skills instead of one big context?
281
+
282
+ Each agent should only know what it needs. An infrastructure agent doesn't need your business logic conventions. A features agent doesn't need your CI/CD configuration. Bounded context produces better output and prevents agents from making decisions outside their scope.
283
+
284
+ ### Why verifiable success criteria?
285
+
286
+ Every agent ends with a runnable check (`npm test`, `cargo build`, `npm run build`). These aren't goals — they're gates. The PLAYBOOK enforces them. You always know exactly which agents have succeeded and which haven't.
287
+
288
+ ---
289
+
290
+ ## Meta: AgentKit Was Built With AgentKit
291
+
292
+ This CLI was built using the exact workflow it generates. The `CLAUDE.md`, `AGENT_WORKFLOW.md`, and `PLAYBOOK.md` at the root of this repo drove the entire build process — written first, executed against, not added after the fact.
293
+
294
+ ```
295
+ Agent 1 · Infra & Setup → success: npm run build passes
296
+ Agent 2 · Detectors success: npm test passes on fixtures
297
+ Agent 3 · Generators → success: valid files for each stack
298
+ Agent 4 · Commands CLI → success: npx agentkit --help works
299
+ ```
300
+
301
+ ---
302
+
303
+ ## Project Structure
304
+
305
+ ```
306
+ agentkit-cli/
307
+ ├── src/
308
+ ├── cli.ts
309
+ │ ├── commands/
310
+ │ │ ├── init.ts ← npx agentkit init [--blueprint]
311
+ │ │ ├── add.ts ← npx agentkit add --feature
312
+ │ │ └── status.ts ← npx agentkit status
313
+ │ ├── detectors/
314
+ │ │ ├── stackDetector.ts
315
+ │ │ └── gitDetector.ts
316
+ │ ├── generators/
317
+ │ │ ├── claudeMdGenerator.ts
318
+ │ │ ├── workflowGenerator.ts
319
+ │ │ ├── playbookGenerator.ts PLAYBOOK.md with full exec logic
320
+ │ │ └── skillsGenerator.ts ← agents/agent-N-slug/ folders
321
+ │ ├── templates/
322
+ │ │ ├── react.ts
323
+ │ │ ├── nextjs.ts
324
+ │ │ ├── tauri.ts
325
+ │ │ ├── fastapi.ts
326
+ │ │ ├── express.ts
327
+ │ │ ├── node.ts
328
+ │ │ └── unknown.ts
329
+ │ └── utils/
330
+ │ └── logger.ts
331
+ ├── tests/
332
+ ├── CLAUDE.md
333
+ ├── AGENT_WORKFLOW.md
334
+ ├── PLAYBOOK.md
335
+ ├── package.json
336
+ └── tsup.config.ts
337
+ ```
338
+
339
+ ---
340
+
341
+ ## Contributing
342
+
343
+ To add a new stack template:
344
+
345
+ 1. Create `src/templates/your-stack.ts` — export `claudeMd(stack)` and `workflow(stack)`
346
+ 2. Add detection in `src/detectors/stackDetector.ts`
347
+ 3. Register in both generators
348
+ 4. Add fixtures in `tests/detectors/` and tests in `tests/generators/`
349
+
350
+ ---
351
+
352
+ ## License
353
+
354
+ MIT — © 2026 Patrick Sardinha
package/dist/cli.cjs CHANGED
File without changes
package/dist/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patricksardinha/agentkit-cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },