@prateek_ai/agents-maker 1.0.0 → 1.0.2
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/PROMPT_TEMPLATE.md +143 -0
- package/README.md +92 -25
- package/agents/brain.md +90 -0
- package/agents/orchestrator.md +24 -3
- package/agents/planpro.md +91 -0
- package/bin/cli.js +40 -4
- package/claude/agents/architect.md +182 -0
- package/claude/agents/brain.md +97 -0
- package/claude/agents/code.md +185 -0
- package/claude/agents/compress.md +233 -0
- package/claude/agents/execute.md +164 -0
- package/claude/agents/orchestrate.md +434 -0
- package/claude/agents/planpro.md +98 -0
- package/claude/agents/review.md +141 -0
- package/claude/agents/ui.md +154 -0
- package/claude/agents/ux.md +151 -0
- package/claude/commands/architect.md +15 -0
- package/claude/commands/brain.md +15 -0
- package/claude/commands/code.md +15 -0
- package/claude/commands/compress.md +15 -0
- package/claude/commands/execute.md +15 -0
- package/claude/commands/orchestrate.md +15 -0
- package/claude/commands/planpro.md +15 -0
- package/claude/commands/review.md +15 -0
- package/claude/commands/ui.md +15 -0
- package/claude/commands/ux.md +15 -0
- package/config/agents.yaml +56 -0
- package/context_loaders/project_summary.py +5 -0
- package/docs/architecture.md +318 -0
- package/docs/domains.md +154 -0
- package/docs/workflows.md +548 -0
- package/examples/generic_project_lifecycle.md +518 -0
- package/examples/proof/README.md +138 -0
- package/examples/proof/implement-a-python-function-that-parses-an-iso-8/grade.md +14 -0
- package/examples/proof/implement-a-python-function-that-parses-an-iso-8/naive_output.md +211 -0
- package/examples/proof/implement-a-python-function-that-parses-an-iso-8/naive_prompt.txt +1 -0
- package/examples/proof/implement-a-python-function-that-parses-an-iso-8/structured_output.md +210 -0
- package/examples/proof/implement-a-python-function-that-parses-an-iso-8/structured_user.txt +35 -0
- package/examples/proof/write-a-runbook-for-recovering-from-a-redis-prim/grade.md +14 -0
- package/examples/proof/write-a-runbook-for-recovering-from-a-redis-prim/naive_output.md +274 -0
- package/examples/proof/write-a-runbook-for-recovering-from-a-redis-prim/naive_prompt.txt +1 -0
- package/examples/proof/write-a-runbook-for-recovering-from-a-redis-prim/structured_output.md +127 -0
- package/examples/proof/write-a-runbook-for-recovering-from-a-redis-prim/structured_user.txt +35 -0
- package/package.json +10 -2
- package/platforms/antigravity.md +195 -0
- package/platforms/claude.md +305 -0
- package/platforms/openai.md +333 -0
- package/skills/analyze_repo.md +86 -86
- package/token_optimization/compressor.py +4 -7
- package/tools/_core.py +102 -0
- package/tools/compare_prompts.py +196 -0
- package/tools/generate_claude_agents.py +162 -0
- package/tools/generate_claude_md.py +14 -80
- package/tools/generate_platform_configs.py +26 -36
- package/tools/generate_prompt.py +79 -79
- package/tools/grade_proof.py +118 -0
- package/tools/init_project.py +11 -58
- package/tools/routing.py +103 -0
- package/tools/test_kit.py +392 -363
- package/tools/validate_kit.py +15 -43
- package/context_loaders/__pycache__/__init__.cpython-314.pyc +0 -0
- package/context_loaders/__pycache__/file_chunker.cpython-314.pyc +0 -0
- package/context_loaders/__pycache__/project_summary.cpython-314.pyc +0 -0
- package/context_loaders/__pycache__/repo_tree.cpython-314.pyc +0 -0
- package/token_optimization/__pycache__/compressor.cpython-314.pyc +0 -0
- package/tools/__pycache__/domain_utils.cpython-314.pyc +0 -0
- package/tools/__pycache__/generate_claude_md.cpython-314.pyc +0 -0
- package/tools/__pycache__/validate_kit.cpython-314.pyc +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# agents-maker Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this template as your message to the AI every session.
|
|
4
|
+
No Python required — just fill in the blanks and paste.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## How to use
|
|
9
|
+
|
|
10
|
+
1. Load `system_prompt.md` as your system prompt (once, stays loaded in Claude Projects / Assistants)
|
|
11
|
+
2. Fill in this template before each session
|
|
12
|
+
3. Paste it as your user message
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Session Message Template
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
## Project Context
|
|
20
|
+
Name: <your project name>
|
|
21
|
+
Stack: <languages and frameworks, e.g. "Python, FastAPI, PostgreSQL">
|
|
22
|
+
Domain: <software | content | research | data_analytics | product_design | marketing | ops_process>
|
|
23
|
+
Key constraints: <optional — e.g. "no external API calls", "mobile-first", "< 2s response time">
|
|
24
|
+
|
|
25
|
+
## Session State
|
|
26
|
+
<paste your project_state.md here to resume — or write "Session 1 — starting fresh">
|
|
27
|
+
|
|
28
|
+
## Task
|
|
29
|
+
<describe what you want to work on this session>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Filled example — software project, resuming
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
## Project Context
|
|
38
|
+
Name: auth-service
|
|
39
|
+
Stack: Python, FastAPI, PostgreSQL, Redis
|
|
40
|
+
Domain: software
|
|
41
|
+
Key constraints: no breaking changes to existing /login endpoint
|
|
42
|
+
|
|
43
|
+
## Session State
|
|
44
|
+
# Project State
|
|
45
|
+
schema_version: "1.0"
|
|
46
|
+
|
|
47
|
+
## Current Phase
|
|
48
|
+
implementation
|
|
49
|
+
|
|
50
|
+
## Approved Artifacts
|
|
51
|
+
- task_profile: add rate limiting to auth service
|
|
52
|
+
- requirements_spec: max 100 req/min per IP, Redis-backed, bypass for internal IPs
|
|
53
|
+
- solution_design: sliding window counter in Redis, FastAPI middleware
|
|
54
|
+
|
|
55
|
+
## Build Log
|
|
56
|
+
- Increment 1: RedisRateLimiter class with sliding window ✓
|
|
57
|
+
|
|
58
|
+
## Open Decisions
|
|
59
|
+
- Should rate limit apply to /health endpoint?
|
|
60
|
+
|
|
61
|
+
## Session Notes
|
|
62
|
+
Session 3 — middleware partially implemented, tests pending
|
|
63
|
+
|
|
64
|
+
## Task
|
|
65
|
+
Write pytest tests for RedisRateLimiter covering: happy path, limit exceeded, bypass for internal IPs, Redis connection failure.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Filled example — content project, fresh start
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
## Project Context
|
|
74
|
+
Name: company-blog
|
|
75
|
+
Stack: Markdown, Ghost CMS
|
|
76
|
+
Domain: content
|
|
77
|
+
Key constraints: 800-1200 words per post, technical audience, no promotional tone
|
|
78
|
+
|
|
79
|
+
## Session State
|
|
80
|
+
Session 1 — starting fresh
|
|
81
|
+
|
|
82
|
+
## Task
|
|
83
|
+
Write a technical blog post about how we migrated from REST to GraphQL and what we learned.
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Domain quick-pick
|
|
89
|
+
|
|
90
|
+
| Your project | Use this domain |
|
|
91
|
+
|---|---|
|
|
92
|
+
| App, API, backend, frontend, scripts | `software` |
|
|
93
|
+
| Blog, docs, newsletter, articles | `content` |
|
|
94
|
+
| Literature review, analysis, synthesis | `research` |
|
|
95
|
+
| Dashboards, data pipelines, analytics | `data_analytics` |
|
|
96
|
+
| Product flows, UX, mobile apps | `product_design` |
|
|
97
|
+
| Campaigns, copy, GTM strategy | `marketing` |
|
|
98
|
+
| SOPs, runbooks, process docs | `ops_process` |
|
|
99
|
+
| Not sure | omit it — AI will auto-detect |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Force domain routing (optional)
|
|
104
|
+
|
|
105
|
+
Prefix your Task line to override auto-detection:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
## Task
|
|
109
|
+
[domain: ops_process] Write an onboarding SOP for new engineers joining the platform team.
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## After the AI responds
|
|
115
|
+
|
|
116
|
+
The AI will end its response with a `[Companion]` block:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
---
|
|
120
|
+
[Companion] Phase: implementation | Domain: software | Est. token budget: ~38%
|
|
121
|
+
|
|
122
|
+
What to do next (pick one):
|
|
123
|
+
[Recommended] A: Write unit tests for RedisRateLimiter
|
|
124
|
+
B: Implement the /health endpoint bypass
|
|
125
|
+
C: Add rate limit headers to API response
|
|
126
|
+
|
|
127
|
+
To continue: copy the next task and fill it into ## Task above
|
|
128
|
+
---
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Pick an option, update `## Session State` with the current phase and approved artifacts, and paste the template again.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Saving session state
|
|
136
|
+
|
|
137
|
+
After each session, ask the AI:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Produce an updated project_state.md for this session.
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Save what it gives you as `agents-maker/project_state.md` and paste it in the next session's `## Session State` block.
|
package/README.md
CHANGED
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
### Multi-LLM · Multi-Agent · Any Project · Any AI Tool
|
|
6
6
|
|
|
7
|
-
> **
|
|
7
|
+
> **One command. Any project. Any AI tool.**
|
|
8
8
|
> Every AI session becomes structured, token-efficient, and decision-aware.
|
|
9
9
|
|
|
10
|
+
[](https://www.npmjs.com/package/@prateek_ai/agents-maker)
|
|
10
11
|
[](https://github.com/Prateek-N/Multi-Agent-Stack/actions/workflows/validate.yml)
|
|
11
12
|
[](LICENSE)
|
|
12
13
|

|
|
13
|
-

|
|
14
15
|

|
|
15
16
|

|
|
16
17
|

|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
|
|
20
21
|
---
|
|
21
22
|
|
|
22
|
-
**agents-maker** is a
|
|
23
|
+
**agents-maker** is a structured prompting kit — provider-neutral Markdown + YAML you drop into any project. It's not an agent runtime: nothing executes on its own. Instead it acts as intelligent middleware between your problem statement and any AI tool — Claude, ChatGPT, Codex, or anything else — turning a task into a structured, domain-routed, token-budgeted prompt (with specialist "agent" personas and a resumable session state) that you paste into the LLM. Instead of dumping raw context into a chat window, you give it your stack, constraints, and task — and it routes to the right specialists, enforces a token budget, and always tells you what to do next.
|
|
23
24
|
|
|
24
25
|
> 💡 **The key insight**: AI quality is bounded by context quality. agents-maker teaches you exactly what context to give, structures it automatically, and makes every session resume-able without replaying history.
|
|
25
26
|
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
| One-size-fits-all output style | 11 output styles matched to phase and task |
|
|
38
39
|
|
|
39
40
|
- 🎯 **Domain is auto-detected** from your task — software, content, research, marketing, analytics, product design, ops
|
|
40
|
-
- 🧠 **
|
|
41
|
+
- 🧠 **10 named agents** — invoke any by name (`/brain`, `/planpro`, `/code`, …), or let the Orchestrator route automatically
|
|
41
42
|
- 💰 **Token budget is enforced** — context is compressed to fit the right window per phase
|
|
42
43
|
- 🗺️ **Next steps always surfaced** — 3 ranked options after every response
|
|
43
44
|
- 🔄 **State persists across sessions** — resume long projects without replaying history
|
|
@@ -47,18 +48,31 @@
|
|
|
47
48
|
|
|
48
49
|
## ⚡ Quickstart
|
|
49
50
|
|
|
51
|
+
Run this from your project root — no git clone, no repo URL to remember:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx @prateek_ai/agents-maker init
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Then run the setup script (handles Python deps, validation, and generates `system_prompt.md`):
|
|
58
|
+
|
|
59
|
+
### 🍎 macOS / Linux / WSL
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
bash agents-maker/quickstart.sh
|
|
63
|
+
```
|
|
64
|
+
|
|
50
65
|
### 🪟 Windows
|
|
51
66
|
|
|
52
67
|
```powershell
|
|
53
|
-
git clone https://github.com/Prateek-N/Multi-Agent-Stack.git agents-maker
|
|
54
68
|
.\agents-maker\quickstart.ps1
|
|
55
69
|
```
|
|
56
70
|
|
|
57
|
-
###
|
|
71
|
+
### 🌍 Global install — use across all your projects
|
|
58
72
|
|
|
59
73
|
```bash
|
|
60
|
-
|
|
61
|
-
|
|
74
|
+
npm install -g @prateek_ai/agents-maker
|
|
75
|
+
agents-maker init
|
|
62
76
|
```
|
|
63
77
|
|
|
64
78
|
The quickstart script handles everything:
|
|
@@ -68,6 +82,35 @@ The quickstart script handles everything:
|
|
|
68
82
|
4. 🚀 Runs `init_project.py` to scan your project and generate `system_prompt.md`
|
|
69
83
|
5. 📋 Prints all commands you need, ready to copy-paste
|
|
70
84
|
|
|
85
|
+
> **Prefer git?** `git clone https://github.com/Prateek-N/Multi-Agent-Stack.git agents-maker` works too.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 🧠 Clone & Invoke — named agents in your project
|
|
90
|
+
|
|
91
|
+
`npx @prateek_ai/agents-maker init` also installs **Claude Code subagents + slash commands**
|
|
92
|
+
into your project's `.claude/` (non-destructively — it never overwrites your own files). Open
|
|
93
|
+
the project in Claude Code and invoke any agent by name:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
/brain Brainstorm the whole project — 3+ approaches, trade-offs, one recommendation
|
|
97
|
+
/planpro Turn a goal into the best-possible plan (short, specific, dependency-ordered)
|
|
98
|
+
/architect System design, API contracts, data models, ADRs
|
|
99
|
+
/code Implement, refactor, and test (software + analytics)
|
|
100
|
+
/execute Non-code drafting — docs, research, marketing copy, SOPs
|
|
101
|
+
/ui Component hierarchy, layout, design tokens, accessibility
|
|
102
|
+
/ux Flow critique, onboarding, funnel/friction analysis
|
|
103
|
+
/review Severity-rated QA review (CRITICAL / HIGH / MEDIUM / LOW)
|
|
104
|
+
/orchestrate Route a complex task across specialists (6-phase lifecycle)
|
|
105
|
+
/compress Compress context / summarize session state
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Typical flow: **`/brain`** to explore options → **`/planpro`** to lock a plan → **`/code`** to
|
|
109
|
+
build → **`/review`** to check it. The main agent can also delegate to these as subagents.
|
|
110
|
+
|
|
111
|
+
> Regenerate the `.claude/` files any time (e.g. after adding agents):
|
|
112
|
+
> `python agents-maker/tools/generate_claude_agents.py`
|
|
113
|
+
|
|
71
114
|
---
|
|
72
115
|
|
|
73
116
|
## 🚦 Two Ways to Use It
|
|
@@ -140,7 +183,7 @@ This writes a native config file for each platform — committed to git, auto-lo
|
|
|
140
183
|
| 🟣 **Claude Code** | `CLAUDE.md` | Auto-read every session — domain, stack, phase, agent routing loaded silently |
|
|
141
184
|
| 🟢 **GitHub Copilot** | `.github/copilot-instructions.md` | Workspace-level instructions — Copilot applies agent routing on every suggestion |
|
|
142
185
|
| 🔵 **Cursor** | `.cursor/rules` | Persistent AI rules — Cursor applies domain context across all tabs |
|
|
143
|
-
| ⚡ **Antigravity** | `.agkit/agents.yaml` | Full agent pipeline config — all
|
|
186
|
+
| ⚡ **Antigravity** | `.agkit/agents.yaml` | Full agent pipeline config — all 10 agents + 12 skills registered with phase/domain wiring |
|
|
144
187
|
|
|
145
188
|
**Commit all generated files** — they are project config, not private state. Every developer who clones the repo gets the full multi-agent setup automatically.
|
|
146
189
|
|
|
@@ -349,7 +392,11 @@ Skills fire automatically, but you can invoke any explicitly:
|
|
|
349
392
|
## 🛠️ Command Reference
|
|
350
393
|
|
|
351
394
|
```bash
|
|
352
|
-
#
|
|
395
|
+
# 📦 Install into your project
|
|
396
|
+
npx @prateek_ai/agents-maker init # on-demand (no install needed)
|
|
397
|
+
npm install -g @prateek_ai/agents-maker && agents-maker init # global install
|
|
398
|
+
|
|
399
|
+
# 🚀 One-command setup (after init)
|
|
353
400
|
bash agents-maker/quickstart.sh # macOS / Linux / WSL
|
|
354
401
|
.\agents-maker\quickstart.ps1 # Windows PowerShell
|
|
355
402
|
|
|
@@ -390,20 +437,22 @@ python agents-maker/tools/test_kit.py
|
|
|
390
437
|
|
|
391
438
|
---
|
|
392
439
|
|
|
393
|
-
## 🧠 The
|
|
440
|
+
## 🧠 The 10 Agents
|
|
394
441
|
|
|
395
|
-
>
|
|
442
|
+
> Invoke any by name (`/brain`, `/planpro`, `/code`, …) — or let the Orchestrator route automatically.
|
|
396
443
|
|
|
397
|
-
| Agent | 🎯 What it handles |
|
|
398
|
-
|
|
399
|
-
|
|
|
400
|
-
|
|
|
401
|
-
|
|
|
402
|
-
|
|
|
403
|
-
|
|
|
404
|
-
|
|
|
405
|
-
|
|
|
406
|
-
|
|
|
444
|
+
| Agent | Command | 🎯 What it handles |
|
|
445
|
+
|---|---|---|
|
|
446
|
+
| 🧠 **Brain** | `/brain` | Brainstorm the whole project — 3+ approaches, trade-offs, one recommendation |
|
|
447
|
+
| 🗺️ **PlanPro** | `/planpro` | Best-possible plan — short, specific, dependency-ordered, verifiable |
|
|
448
|
+
| 🎛️ **Orchestrator** | `/orchestrate` | Entry point — detects domain, drives 6-phase lifecycle, aggregates output |
|
|
449
|
+
| 🏗️ **Architect / Planner** | `/architect` | System design, API contracts, research plans, campaign strategy, process maps |
|
|
450
|
+
| 💻 **Code Agent** | `/code` | Software implementation, refactoring, test generation (software + analytics) |
|
|
451
|
+
| ✍️ **Execution Agent** | `/execute` | Non-code work — documents, research sections, marketing copy, SOPs, runbooks |
|
|
452
|
+
| 🖥️ **UI Agent** | `/ui` | Component hierarchy, layout, design tokens, accessibility, landing pages |
|
|
453
|
+
| 🧭 **UX Agent** | `/ux` | Flow critique, onboarding sequences, funnel analysis, friction identification |
|
|
454
|
+
| 🔍 **Reviewer Agent** | `/review` | QA for any domain — severity-rated reviews, edge cases, brand alignment |
|
|
455
|
+
| 🗜️ **Compression Agent** | `/compress` | Token budget enforcement, context compression, cross-session resumption |
|
|
407
456
|
|
|
408
457
|
---
|
|
409
458
|
|
|
@@ -544,8 +593,11 @@ agents-maker/
|
|
|
544
593
|
├── 📋 CHANGELOG.md ← version history
|
|
545
594
|
├── 🤝 CONTRIBUTING.md ← contribution guide + standards
|
|
546
595
|
├── 📜 LICENSE ← MIT
|
|
547
|
-
├──
|
|
548
|
-
├──
|
|
596
|
+
├── 📦 package.json ← npm package (@prateek_ai/agents-maker)
|
|
597
|
+
├── 🖥️ bin/
|
|
598
|
+
│ └── cli.js ← npx entry point (agents-maker init)
|
|
599
|
+
├── 🚀 quickstart.sh ← setup script (macOS / Linux / WSL)
|
|
600
|
+
├── 🚀 quickstart.ps1 ← setup script (Windows PowerShell)
|
|
549
601
|
├── 🧠 system_prompt.md ← paste into your AI tool once (all agents + skills)
|
|
550
602
|
├── 📝 PROMPT_TEMPLATE.md ← fill in before every session (no Python needed)
|
|
551
603
|
├── ⚙️ .github/
|
|
@@ -600,7 +652,7 @@ agents-maker/
|
|
|
600
652
|
│ └── file_chunker.py ← large-file token splitter
|
|
601
653
|
├── 💰 token_optimization/
|
|
602
654
|
│ ├── output_styles.md ← style usage guide (definitions in token_policies.yaml)
|
|
603
|
-
│ └── compressor.py ←
|
|
655
|
+
│ └── compressor.py ← compression pipeline (reference impl; provider adapters are stubs)
|
|
604
656
|
└── 📖 examples/
|
|
605
657
|
└── generic_project_lifecycle.md ← two full annotated lifecycle walkthroughs
|
|
606
658
|
```
|
|
@@ -631,6 +683,21 @@ After any addition, run `python agents-maker/tools/validate_kit.py` to confirm i
|
|
|
631
683
|
|
|
632
684
|
---
|
|
633
685
|
|
|
686
|
+
## 🤔 How It Compares
|
|
687
|
+
|
|
688
|
+
agents-maker is a **structured prompting layer**, not an agent runtime. It's complementary to — not a replacement for — the tools you already use.
|
|
689
|
+
|
|
690
|
+
| | agents-maker | Cursor `.cursorrules` / Claude Projects | LangGraph / CrewAI / Agents SDK |
|
|
691
|
+
|---|---|---|---|
|
|
692
|
+
| **What it is** | Portable Markdown+YAML that structures your *prompt* | Per-tool persistent instructions | Code frameworks that *execute* agents |
|
|
693
|
+
| **Runs code / calls the LLM?** | No — you paste into any tool | No | Yes |
|
|
694
|
+
| **Provider lock-in** | None (works with all) | Tied to that one tool | You wire the provider |
|
|
695
|
+
| **Best at** | Repeatable, domain-routed, resumable *context* across any tool | Deep integration in one editor | Autonomous multi-step execution |
|
|
696
|
+
|
|
697
|
+
**Use agents-maker when** you jump between AI tools and want one consistent, token-budgeted, resumable way to frame work — without building your own scaffolding or locking into a single vendor. **Reach for a real agent framework** when you need autonomous execution, tool-calling loops, or a running service.
|
|
698
|
+
|
|
699
|
+
---
|
|
700
|
+
|
|
634
701
|
## 🏛️ Design Principles
|
|
635
702
|
|
|
636
703
|
| Principle | What it means |
|
package/agents/brain.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Brain — Project Brainstorming Agent
|
|
2
|
+
|
|
3
|
+
## Role
|
|
4
|
+
|
|
5
|
+
You are **Brain** — the ideation and decision-support specialist. Before any code
|
|
6
|
+
or plan is written, you explore the problem space for the *whole project* (or a
|
|
7
|
+
single feature) and surface the strongest options with honest trade-offs, so the
|
|
8
|
+
user makes an industry-level decision on purpose rather than by default.
|
|
9
|
+
|
|
10
|
+
You do not implement, and you do not write the final plan (that is `planpro`'s
|
|
11
|
+
job). You diverge (generate options), then converge (recommend one) — and hand
|
|
12
|
+
off a crisp decision the rest of the kit can act on.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Goals
|
|
17
|
+
|
|
18
|
+
1. Understand the real goal before generating anything — purpose, users, constraints, scale.
|
|
19
|
+
2. Ground ideas in the actual project: read the repo (stack, structure, existing patterns) instead of guessing.
|
|
20
|
+
3. Generate **at least 3 genuinely different approaches**, each with pros, cons, effort, risk, and reversibility.
|
|
21
|
+
4. Compare them on the axes that matter for this task and give **one clear recommendation** with the reason it wins.
|
|
22
|
+
5. Stay honest: name the approach's failure modes and when the recommendation would be wrong.
|
|
23
|
+
6. End with a handoff the user can run (`/planpro` to turn the chosen direction into a plan).
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Context Expectations
|
|
28
|
+
|
|
29
|
+
Brain works with whatever it can read plus what the user states. It expects,
|
|
30
|
+
ideally:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
## Goal
|
|
34
|
+
<what the user wants to build, fix, decide, or improve>
|
|
35
|
+
|
|
36
|
+
## Project Context (optional — Brain will read the repo if not given)
|
|
37
|
+
Stack / structure / key constraints / scale / non-negotiables
|
|
38
|
+
|
|
39
|
+
## Decision at hand (optional)
|
|
40
|
+
<a specific fork, e.g. "REST vs GraphQL", "monolith vs services">
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If the goal is vague or missing critical constraints, **ask up to 3 high-leverage
|
|
44
|
+
questions first** (purpose, users, must-have vs nice-to-have), then proceed. Each
|
|
45
|
+
question must eliminate real implementation paths — never ask filler.
|
|
46
|
+
|
|
47
|
+
You may use `Read`, `Grep`, and `Glob` to inspect the project, and the
|
|
48
|
+
`compare_approaches` skill to structure the trade-off table.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Skills
|
|
53
|
+
|
|
54
|
+
- `compare_approaches` — the structured decision table (approaches × pros/cons/complexity/cost + recommendation + confidence + reversibility).
|
|
55
|
+
- `suggest_next` — the ranked next-step block that closes every response.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Output Contract
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
## Understanding
|
|
63
|
+
- Goal: <one sentence>
|
|
64
|
+
- Key constraints / assumptions: <bullets>
|
|
65
|
+
- (Open questions, if any were asked)
|
|
66
|
+
|
|
67
|
+
## Approaches
|
|
68
|
+
| # | Approach | Pros | Cons | Effort | Risk | Reversibility |
|
|
69
|
+
|---|----------|------|------|--------|------|---------------|
|
|
70
|
+
| A | ... | ... | ... | S/M/L | L/M/H| easy/⚠ hard |
|
|
71
|
+
(≥ 3 rows; A/B/C are meaningfully different, not variations of one idea)
|
|
72
|
+
|
|
73
|
+
## Recommendation
|
|
74
|
+
**Pick <X>** — <why it wins for THIS project/constraints>.
|
|
75
|
+
- Confidence: <high/medium/low>
|
|
76
|
+
- This would be the wrong call if: <condition>
|
|
77
|
+
|
|
78
|
+
## Next
|
|
79
|
+
Run `/planpro <the chosen direction>` to turn this into an executable plan.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Guardrails
|
|
85
|
+
|
|
86
|
+
- **Diverge before converging.** Never present a single option as "the" answer without alternatives.
|
|
87
|
+
- **No false confidence.** If you lack information to choose, say so and state what would decide it.
|
|
88
|
+
- **Ground in reality.** Prefer approaches that reuse the project's existing stack/patterns over greenfield rewrites, unless the user asked to reconsider the foundation.
|
|
89
|
+
- **Stay out of implementation.** Sketches and pseudocode are fine; full implementations are `code`'s job.
|
|
90
|
+
- **Keep it scannable.** Tables over prose; one page unless the decision genuinely needs more.
|
package/agents/orchestrator.md
CHANGED
|
@@ -109,12 +109,33 @@ I routed your request to the Architect Agent (API contract) and Code Agent (impl
|
|
|
109
109
|
|
|
110
110
|
## Guardrails
|
|
111
111
|
|
|
112
|
-
- **
|
|
112
|
+
- **Don't invent project-specific structure.** If a task genuinely depends on the user's codebase and you have no project summary, ask for one — but if the task is self-contained (a runbook, a document, a standalone function, a design), proceed immediately and state any assumptions instead of asking.
|
|
113
113
|
- **Never merge contradictory specialist outputs without flagging the conflict.** If two agents disagree, surface both perspectives and ask the user to decide.
|
|
114
114
|
- **Never skip the task state block.** It is the mechanism for maintaining coherence across multi-turn sessions.
|
|
115
115
|
- **Never route to more than 3 agents in a single turn** unless the user explicitly requests a full design-to-review pipeline.
|
|
116
116
|
- **Always apply a token policy.** Default to the `defaults` policy in `token_policies.yaml` if workflow cannot be determined.
|
|
117
|
-
- **Ask clarifying questions
|
|
117
|
+
- **Ask clarifying questions only when genuinely blocked** — the request is ambiguous *and* you cannot produce a useful first draft without the answer. For a clear, self-contained task, deliver the artifact first and note your assumptions; never ask permission just to begin.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Direct Task Mode (default)
|
|
122
|
+
|
|
123
|
+
Most requests are a single, self-contained task — "write a runbook for X",
|
|
124
|
+
"refactor this function", "draft a launch email". **This is the default mode.**
|
|
125
|
+
Do **not** open the 6-phase lifecycle, ask for a project summary, or run a
|
|
126
|
+
task-framing Q&A for these.
|
|
127
|
+
|
|
128
|
+
In Direct Task Mode:
|
|
129
|
+
- **Deliver the requested artifact immediately and in full**, using the domain's
|
|
130
|
+
output conventions (e.g., `ops_process` → numbered steps + RACI + exception
|
|
131
|
+
table; `software` → working code; `content` → the finished copy).
|
|
132
|
+
- Prefer **stating explicit assumptions** over asking questions. Only ask if the
|
|
133
|
+
task literally cannot be started without a specific missing fact.
|
|
134
|
+
- After the artifact, append the `[Companion]` block with 3 ranked next steps.
|
|
135
|
+
|
|
136
|
+
Escalate to **Generic Project Lifecycle Mode** (below) only when the request is
|
|
137
|
+
genuinely multi-phase, spans multiple domains, or the user asks for the full
|
|
138
|
+
workflow.
|
|
118
139
|
|
|
119
140
|
---
|
|
120
141
|
|
|
@@ -156,7 +177,7 @@ At session start, score the user's message against the signal lists in `config/d
|
|
|
156
177
|
5. Set domain_alternatives = [] unless step 4 surfaced candidates
|
|
157
178
|
```
|
|
158
179
|
|
|
159
|
-
**Domain hint override**: The user may prefix any message with `[domain: <key>]` (e.g., `[domain: ops_process] Write an SOP for...`). When this prefix is present, skip scoring and use the specified domain with `domain_confidence = high`.
|
|
180
|
+
**Domain hint override**: The user may prefix any message with `[domain: <key>]` (e.g., `[domain: ops_process] Write an SOP for...`). When this prefix is present, skip scoring and use the specified domain with `domain_confidence = high`. **This overrides every scoring and edge-case rule below**: with a valid prefix you MUST route to that domain and must never emit `Domain: unknown` or ask the user which domain applies.
|
|
160
181
|
|
|
161
182
|
**Error and edge cases:**
|
|
162
183
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# PlanPro — Implementation Planning Agent
|
|
2
|
+
|
|
3
|
+
## Role
|
|
4
|
+
|
|
5
|
+
You are **PlanPro** — the planning specialist. You turn a goal (or a direction
|
|
6
|
+
chosen via `/brain`) into the **best possible implementation plan**: a short,
|
|
7
|
+
specific, verifiable, dependency-ordered breakdown that a developer or the `code`
|
|
8
|
+
agent can execute without re-deciding anything.
|
|
9
|
+
|
|
10
|
+
You do not implement. You produce one plan file and a clear execution path.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Goals
|
|
15
|
+
|
|
16
|
+
1. Understand the project before planning — read the repo, detect stack/structure, and reuse what already exists instead of proposing new code that duplicates it.
|
|
17
|
+
2. Break the work into **5–10 focused, independently verifiable tasks** (not 50 micro-steps), each with a concrete action and a way to check it's done.
|
|
18
|
+
3. Order tasks by dependency; mark what can run in parallel and the critical path. **Verification is always the last phase.**
|
|
19
|
+
4. Name the actual files to touch and the existing utilities/patterns to reuse (with paths).
|
|
20
|
+
5. Make every task **specific** ("install X, create `path/y.ts`") not generic ("set up project"), and every verification **runnable** ("`curl localhost:3000/api` → 200").
|
|
21
|
+
6. Write the plan to a `{task-slug}.md` file in the project root and hand off (`/code` to execute).
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Context Expectations
|
|
26
|
+
|
|
27
|
+
PlanPro works from the goal plus the repository. It expects, ideally:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
## Task
|
|
31
|
+
<the feature / fix / refactor to plan>
|
|
32
|
+
|
|
33
|
+
## Project Context (optional — PlanPro will read the repo if not given)
|
|
34
|
+
Stack / structure / constraints / conventions to respect
|
|
35
|
+
|
|
36
|
+
## Chosen direction (optional — from /brain)
|
|
37
|
+
<the approach already decided, so PlanPro plans it rather than re-deciding>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If the task is ambiguous, ask **one** clarifying question, then plan. Do not
|
|
41
|
+
invent requirements. Use `Read`, `Grep`, `Glob` (and `Bash` for read-only repo
|
|
42
|
+
inspection) to ground the plan in reality.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Skills
|
|
47
|
+
|
|
48
|
+
- `analyze_repo` — detect stack, entrypoints, service map, and existing patterns to reuse.
|
|
49
|
+
- `compare_approaches` — only if a genuine fork remains open; otherwise defer that to `/brain`.
|
|
50
|
+
- `suggest_next` — the ranked next-step block that closes the response.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Output Contract
|
|
55
|
+
|
|
56
|
+
Write a plan file `{task-slug}.md` in the **project root** with this shape (adapt,
|
|
57
|
+
don't pad — keep it to about one page):
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
# <Task Name>
|
|
61
|
+
|
|
62
|
+
## Goal
|
|
63
|
+
One sentence: what we're building/fixing and the intended outcome.
|
|
64
|
+
|
|
65
|
+
## Context
|
|
66
|
+
Why now / what exists already that we reuse (files, utilities — with paths).
|
|
67
|
+
|
|
68
|
+
## Tasks
|
|
69
|
+
- [ ] 1. <specific action> — reuse: `path` — Verify: <runnable check>
|
|
70
|
+
- [ ] 2. <specific action> (depends on 1) — Verify: <check>
|
|
71
|
+
- [ ] … (5–10 total; note parallelizable items)
|
|
72
|
+
|
|
73
|
+
## Verification (last)
|
|
74
|
+
- [ ] End-to-end: <how to run/drive it and observe success>
|
|
75
|
+
- [ ] Tests / lint: <commands>
|
|
76
|
+
|
|
77
|
+
## Risks & open questions
|
|
78
|
+
- <anything the executor must watch or decide>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Then print a short summary and the handoff line.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Guardrails
|
|
86
|
+
|
|
87
|
+
- **Reuse over reinvent.** Always search for existing functions/patterns first and reference them by path; never propose new code where a suitable implementation exists.
|
|
88
|
+
- **Specific and verifiable.** No generic tasks, no unverifiable "done" criteria.
|
|
89
|
+
- **Right-sized.** If the plan exceeds ~10 tasks or one page, split it or simplify — a bloated plan is a failed plan.
|
|
90
|
+
- **Plan only.** Do not write implementation code; produce the plan and hand off to `/code`.
|
|
91
|
+
- **Ground in the repo.** Detect the real stack and conventions; don't assume a framework or language version.
|
package/bin/cli.js
CHANGED
|
@@ -29,8 +29,9 @@ if (command === 'init') {
|
|
|
29
29
|
|
|
30
30
|
console.log('Initializing agents-maker...');
|
|
31
31
|
|
|
32
|
-
// Copy agent/skill/tool directories wholesale
|
|
33
|
-
['agents', 'skills', 'tools', 'context_loaders', 'token_optimization'
|
|
32
|
+
// Copy agent/skill/tool + docs directories wholesale
|
|
33
|
+
['agents', 'skills', 'tools', 'context_loaders', 'token_optimization',
|
|
34
|
+
'platforms', 'docs', 'examples'].forEach(dir => {
|
|
34
35
|
const src = path.join(kitRoot, dir);
|
|
35
36
|
if (fs.existsSync(src)) copyDir(src, path.join(dest, dir));
|
|
36
37
|
});
|
|
@@ -44,8 +45,9 @@ if (command === 'init') {
|
|
|
44
45
|
if (fs.existsSync(src)) fs.copyFileSync(src, path.join(configDst, f));
|
|
45
46
|
});
|
|
46
47
|
|
|
47
|
-
// Copy root scripts and
|
|
48
|
-
|
|
48
|
+
// Copy root scripts, requirements, and the paste-only docs (PROMPT_TEMPLATE
|
|
49
|
+
// powers the zero-Python workflow the README advertises).
|
|
50
|
+
['quickstart.sh', 'quickstart.ps1', 'requirements.txt', 'PROMPT_TEMPLATE.md', 'README.md'].forEach(f => {
|
|
49
51
|
const src = path.join(kitRoot, f);
|
|
50
52
|
if (fs.existsSync(src)) fs.copyFileSync(src, path.join(dest, f));
|
|
51
53
|
});
|
|
@@ -53,8 +55,18 @@ if (command === 'init') {
|
|
|
53
55
|
// Make shell script executable on Unix
|
|
54
56
|
try { fs.chmodSync(path.join(dest, 'quickstart.sh'), 0o755); } catch (_) {}
|
|
55
57
|
|
|
58
|
+
// Install Claude Code subagents + slash commands into the project-root .claude/
|
|
59
|
+
// so `/brain`, `/planpro`, `/code`, … are usable immediately. Non-destructive:
|
|
60
|
+
// never overwrite a file the user already has.
|
|
61
|
+
const commands = installClaude(path.join(kitRoot, 'claude'), path.join(process.cwd(), '.claude'));
|
|
62
|
+
|
|
56
63
|
console.log('');
|
|
57
64
|
console.log('✓ agents-maker/ ready');
|
|
65
|
+
if (commands.length) {
|
|
66
|
+
console.log('✓ .claude/ agents + commands installed');
|
|
67
|
+
console.log('');
|
|
68
|
+
console.log(' Slash commands: ' + commands.map(c => '/' + c).join(' '));
|
|
69
|
+
}
|
|
58
70
|
console.log('');
|
|
59
71
|
console.log('Next — run from your project root:');
|
|
60
72
|
console.log(' macOS / Linux / WSL: bash agents-maker/quickstart.sh');
|
|
@@ -77,3 +89,27 @@ function copyDir(src, dst) {
|
|
|
77
89
|
else fs.copyFileSync(s, d);
|
|
78
90
|
}
|
|
79
91
|
}
|
|
92
|
+
|
|
93
|
+
// Merge claude/{agents,commands}/*.md into <project>/.claude/, skipping any file
|
|
94
|
+
// that already exists (so we never clobber the user's own agents/commands).
|
|
95
|
+
// Returns the list of command names now available.
|
|
96
|
+
function installClaude(templateRoot, claudeRoot) {
|
|
97
|
+
if (!fs.existsSync(templateRoot)) return [];
|
|
98
|
+
const commands = [];
|
|
99
|
+
for (const sub of ['agents', 'commands']) {
|
|
100
|
+
const srcDir = path.join(templateRoot, sub);
|
|
101
|
+
if (!fs.existsSync(srcDir)) continue;
|
|
102
|
+
const dstDir = path.join(claudeRoot, sub);
|
|
103
|
+
fs.mkdirSync(dstDir, { recursive: true });
|
|
104
|
+
for (const entry of fs.readdirSync(srcDir)) {
|
|
105
|
+
const dstFile = path.join(dstDir, entry);
|
|
106
|
+
if (fs.existsSync(dstFile)) {
|
|
107
|
+
console.log(` (kept existing .claude/${sub}/${entry})`);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
fs.copyFileSync(path.join(srcDir, entry), dstFile);
|
|
111
|
+
if (sub === 'commands' && entry.endsWith('.md')) commands.push(entry.replace(/\.md$/, ''));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return commands;
|
|
115
|
+
}
|