buildanything 1.0.1 → 1.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/.claude-plugin/plugin.json +1 -1
- package/bin/setup.js +37 -3
- package/commands/build.md +182 -12
- package/hooks/hooks.json +27 -0
- package/hooks/session-start +47 -0
- package/package.json +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buildanything",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "One command to build an entire product. 73 specialist agents orchestrated into a full engineering pipeline — from idea to shipped, tested, reviewed code.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Sujit"
|
package/bin/setup.js
CHANGED
|
@@ -5,6 +5,14 @@ const { execFileSync } = require("child_process");
|
|
|
5
5
|
const REPO = "sujitmeka/buildanything";
|
|
6
6
|
const MARKETPLACE = "buildanything-marketplace";
|
|
7
7
|
const PLUGIN = "buildanything";
|
|
8
|
+
const OFFICIAL_MARKETPLACE = "claude-plugins-official";
|
|
9
|
+
|
|
10
|
+
const OFFICIAL_PLUGINS = [
|
|
11
|
+
{ name: "feature-dev", desc: "code-architect, code-explorer, code-reviewer" },
|
|
12
|
+
{ name: "pr-review-toolkit", desc: "silent-failure-hunter, code-simplifier, type-design-analyzer" },
|
|
13
|
+
{ name: "code-review", desc: "final code review passes" },
|
|
14
|
+
{ name: "commit-commands", desc: "clean git commits" },
|
|
15
|
+
];
|
|
8
16
|
|
|
9
17
|
function run(command, args) {
|
|
10
18
|
try {
|
|
@@ -31,7 +39,7 @@ function main() {
|
|
|
31
39
|
}
|
|
32
40
|
console.log(` Found Claude Code ${version}`);
|
|
33
41
|
|
|
34
|
-
// Add marketplace
|
|
42
|
+
// Add marketplace and install buildanything
|
|
35
43
|
console.log(` Adding marketplace from ${REPO}...`);
|
|
36
44
|
const addResult = run("claude", ["plugin", "marketplace", "add", REPO]);
|
|
37
45
|
if (addResult === null) {
|
|
@@ -42,7 +50,6 @@ function main() {
|
|
|
42
50
|
}
|
|
43
51
|
console.log(" Marketplace added.");
|
|
44
52
|
|
|
45
|
-
// Install plugin
|
|
46
53
|
console.log(` Installing ${PLUGIN} plugin...`);
|
|
47
54
|
const installResult = run("claude", [
|
|
48
55
|
"plugin",
|
|
@@ -57,12 +64,39 @@ function main() {
|
|
|
57
64
|
);
|
|
58
65
|
process.exit(1);
|
|
59
66
|
}
|
|
67
|
+
console.log(" buildanything installed.\n");
|
|
68
|
+
|
|
69
|
+
// Install official companion plugins
|
|
70
|
+
console.log(" Installing companion plugins from official marketplace...");
|
|
71
|
+
const installed = [];
|
|
72
|
+
const skipped = [];
|
|
73
|
+
|
|
74
|
+
for (const plugin of OFFICIAL_PLUGINS) {
|
|
75
|
+
const fullName = `${plugin.name}@${OFFICIAL_MARKETPLACE}`;
|
|
76
|
+
process.stdout.write(` ${plugin.name} (${plugin.desc})... `);
|
|
77
|
+
const result = run("claude", ["plugin", "install", fullName]);
|
|
78
|
+
if (result === null) {
|
|
79
|
+
console.log("skipped (may already be installed)");
|
|
80
|
+
skipped.push(plugin.name);
|
|
81
|
+
} else {
|
|
82
|
+
console.log("installed");
|
|
83
|
+
installed.push(plugin.name);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
60
86
|
|
|
61
87
|
console.log(
|
|
62
|
-
"\n
|
|
88
|
+
"\n Setup complete! Start Claude Code and use:\n" +
|
|
63
89
|
" /buildanything:build <your idea> — full product pipeline\n" +
|
|
64
90
|
" /buildanything:idea-sweep <your idea> — parallel research sweep\n"
|
|
65
91
|
);
|
|
92
|
+
|
|
93
|
+
if (installed.length > 0) {
|
|
94
|
+
console.log(` Companion plugins installed: ${installed.join(", ")}`);
|
|
95
|
+
}
|
|
96
|
+
if (skipped.length > 0) {
|
|
97
|
+
console.log(` Already installed: ${skipped.join(", ")}`);
|
|
98
|
+
}
|
|
99
|
+
console.log();
|
|
66
100
|
}
|
|
67
101
|
|
|
68
102
|
main();
|
package/commands/build.md
CHANGED
|
@@ -5,6 +5,78 @@ argument-hint: "Path to brainstorming doc or describe what we're building"
|
|
|
5
5
|
|
|
6
6
|
# /build — NEXUS-Sprint Pipeline
|
|
7
7
|
|
|
8
|
+
## PROCESS INTEGRITY — READ THIS FIRST
|
|
9
|
+
|
|
10
|
+
<HARD-GATE>
|
|
11
|
+
You are an ORCHESTRATOR. You coordinate specialist agents. You do NOT write implementation code yourself.
|
|
12
|
+
|
|
13
|
+
If you are about to write implementation code directly — STOP. That is a violation of this process. Dispatch to a specialist agent instead.
|
|
14
|
+
|
|
15
|
+
This gate is non-negotiable. No exceptions. No "just this one quick fix." No "it's faster if I do it myself."
|
|
16
|
+
</HARD-GATE>
|
|
17
|
+
|
|
18
|
+
**Resuming after context compaction?** If your context was recently compacted or you are continuing a previous session:
|
|
19
|
+
1. Read `docs/plans/.build-state.md` to recover your phase, step, and progress
|
|
20
|
+
2. Re-read THIS file completely — you are reading it now
|
|
21
|
+
3. Check the TodoWrite list for task progress
|
|
22
|
+
4. Resume from the saved state, not from scratch
|
|
23
|
+
5. Do NOT skip ahead or fall back to default coding behavior
|
|
24
|
+
|
|
25
|
+
### Rationalization Prevention
|
|
26
|
+
|
|
27
|
+
If you catch yourself thinking any of these, you are drifting from the process:
|
|
28
|
+
|
|
29
|
+
| Thought | Reality |
|
|
30
|
+
|---------|---------|
|
|
31
|
+
| "It's faster if I just write this myself" | You are an orchestrator. Dispatch to an agent. Speed is not your job — coordination is. |
|
|
32
|
+
| "This is too small for a subagent" | Every implementation task goes through an agent. No exceptions. Small tasks still need the Dev→QA loop. |
|
|
33
|
+
| "I'll skip the code review for this one" | Every task gets reviewed. The code-reviewer agent exists for a reason. |
|
|
34
|
+
| "The quality gate is obvious, I'll just proceed" | Present it to the user. Quality gates require explicit user approval. |
|
|
35
|
+
| "I already know what to build, I'll skip architecture" | Phase 1 is mandatory. The architecture step catches design mistakes before they become code. |
|
|
36
|
+
| "Tests aren't needed for this part" | Every task has acceptance criteria and tests. The Evidence Collector verifies. |
|
|
37
|
+
| "I'll clean this up later" | The Harden phase (Phase 4) exists for this. Don't skip steps — follow the process. |
|
|
38
|
+
| "Context was compacted, I'll just keep coding" | STOP. Re-read this file. Check .build-state.md. Reload the process. |
|
|
39
|
+
|
|
40
|
+
### Process Flowchart
|
|
41
|
+
|
|
42
|
+
```dot
|
|
43
|
+
digraph build_pipeline {
|
|
44
|
+
rankdir=TB;
|
|
45
|
+
node [shape=box];
|
|
46
|
+
|
|
47
|
+
start [label="User invokes /build" shape=ellipse];
|
|
48
|
+
p1 [label="Phase 1: Architecture & Planning\n(Backend Architect + UX Architect +\nSecurity Engineer + code-architect +\nSprint Prioritizer + Senior PM)"];
|
|
49
|
+
gate1 [label="Quality Gate 1\nUser approves architecture?" shape=diamond];
|
|
50
|
+
p2 [label="Phase 2: Foundation\n(DevOps Automator + Frontend Dev\nor Backend Architect)"];
|
|
51
|
+
gate2 [label="Quality Gate 2\nBuilds? Tests pass? Lint clean?" shape=diamond];
|
|
52
|
+
p3 [label="Phase 3: Build — Dev↔QA Loops\nFor EACH task:\nAgent implements → Evidence Collector\nverifies → code-reviewer reviews"];
|
|
53
|
+
retry [label="Retry (max 3)\nFeedback to dev agent" shape=box];
|
|
54
|
+
escalate [label="Escalate to user\nafter 3 failures" shape=box];
|
|
55
|
+
p4 [label="Phase 4: Harden\n(API Tester + Perf Benchmarker +\nAccessibility Auditor + Security Engineer +\ncode-simplifier + Reality Checker)"];
|
|
56
|
+
gate4 [label="Quality Gate 4\nReality Checker: PRODUCTION READY?" shape=diamond];
|
|
57
|
+
p5 [label="Phase 5: Ship\n(Technical Writer + final commit)"];
|
|
58
|
+
done [label="BUILD COMPLETE" shape=ellipse];
|
|
59
|
+
|
|
60
|
+
start -> p1;
|
|
61
|
+
p1 -> gate1;
|
|
62
|
+
gate1 -> p2 [label="approved"];
|
|
63
|
+
gate1 -> p1 [label="changes requested"];
|
|
64
|
+
p2 -> gate2;
|
|
65
|
+
gate2 -> p3 [label="pass"];
|
|
66
|
+
gate2 -> p2 [label="fix"];
|
|
67
|
+
p3 -> retry [label="task fails"];
|
|
68
|
+
retry -> p3 [label="< 3 retries"];
|
|
69
|
+
retry -> escalate [label="3 retries"];
|
|
70
|
+
p3 -> p4 [label="all tasks complete"];
|
|
71
|
+
p4 -> gate4;
|
|
72
|
+
gate4 -> p5 [label="PRODUCTION READY"];
|
|
73
|
+
gate4 -> p4 [label="NEEDS WORK"];
|
|
74
|
+
p5 -> done;
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
8
80
|
You are the **Agents Orchestrator** running a NEXUS-Sprint pipeline. Your job is to take a brainstormed idea and build it into a working, tested, production-quality product — coordinating specialist agents the way a VP of Engineering at Meta or Google would run a product team.
|
|
9
81
|
|
|
10
82
|
**This is NOT brainstorming. Brainstorming is done. This is execution.**
|
|
@@ -13,11 +85,37 @@ Input: $ARGUMENTS
|
|
|
13
85
|
|
|
14
86
|
## Operating Principles
|
|
15
87
|
|
|
88
|
+
- **You are an orchestrator.** You dispatch work to specialist agents. You do NOT write implementation code yourself. Your job is coordination, synthesis, and quality enforcement.
|
|
16
89
|
- **Phase gates are mandatory.** Do not advance to the next phase until the current phase passes its quality gate. Present phase output to the user for approval before advancing.
|
|
17
90
|
- **Dev↔QA loops are mandatory.** Every implementation task gets tested. Failed tasks loop back to the developer agent with specific feedback. Max 3 retries per task before escalation to the user.
|
|
18
|
-
- **
|
|
91
|
+
- **Fresh agents per task.** Each task gets a fresh subagent to prevent context pollution from previous tasks. Do not reuse a subagent across multiple implementation tasks.
|
|
92
|
+
- **Parallelism within phases.** Agents within the same step run in parallel via the Agent tool. Phases run sequentially.
|
|
19
93
|
- **Real code, real tests, real commits.** This pipeline writes actual files, runs actual tests, and makes actual git commits. It does not produce documents about code.
|
|
20
94
|
- **Evidence-based quality.** The Reality Checker defaults to NEEDS WORK. The Evidence Collector requires proof. Do not self-approve.
|
|
95
|
+
- **TodoWrite for progress tracking.** Use TodoWrite to create and update a task checklist at the start of Phase 3. This is your primary progress tracker — it survives context compaction better than memory alone.
|
|
96
|
+
- **State persistence.** After completing each step, update `docs/plans/.build-state.md` with your current phase, step, task progress, and agent usage. This file is your recovery point if context is compacted.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Phase 0: Initialize
|
|
101
|
+
|
|
102
|
+
Before starting any work:
|
|
103
|
+
|
|
104
|
+
1. **Create a TodoWrite checklist** with the 5 phases:
|
|
105
|
+
- [ ] Phase 1: Architecture & Planning
|
|
106
|
+
- [ ] Phase 2: Foundation
|
|
107
|
+
- [ ] Phase 3: Build (will expand into per-task items later)
|
|
108
|
+
- [ ] Phase 4: Harden
|
|
109
|
+
- [ ] Phase 5: Ship
|
|
110
|
+
|
|
111
|
+
2. **Write initial state** to `docs/plans/.build-state.md`:
|
|
112
|
+
```
|
|
113
|
+
Phase: 0 — Initializing
|
|
114
|
+
Input: [user's build request]
|
|
115
|
+
Started: [timestamp]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
3. Proceed to Phase 1.
|
|
21
119
|
|
|
22
120
|
---
|
|
23
121
|
|
|
@@ -25,7 +123,9 @@ Input: $ARGUMENTS
|
|
|
25
123
|
|
|
26
124
|
**Goal**: Define the technical architecture, component structure, UX foundation, and sprint task list. No code yet — just the blueprint.
|
|
27
125
|
|
|
28
|
-
|
|
126
|
+
<HARD-GATE>
|
|
127
|
+
Quality Gate: User MUST approve the architecture and task list before any code is written. Do not proceed to Phase 2 without explicit user approval. "Looks good" counts. Silence does not.
|
|
128
|
+
</HARD-GATE>
|
|
29
129
|
|
|
30
130
|
### Step 1.1 — Codebase Understanding (if existing project)
|
|
31
131
|
|
|
@@ -58,13 +158,23 @@ Launch **Sprint Prioritizer** with the Architecture Document:
|
|
|
58
158
|
- Define acceptance criteria for each task — what "done" looks like, what tests must pass
|
|
59
159
|
- Identify dependencies between tasks — what must be built first
|
|
60
160
|
- Estimate relative complexity (S/M/L) for each task
|
|
161
|
+
- **Include the architectural rationale** — WHY this task exists, which part of the architecture it implements
|
|
61
162
|
|
|
62
163
|
Then launch **Senior Project Manager** to validate the task list:
|
|
63
164
|
- Confirm realistic scope — remove anything that isn't in the brainstorming spec
|
|
64
165
|
- Verify no missing tasks — every component from the architecture has implementation tasks
|
|
65
166
|
- Ensure task descriptions are specific enough that a developer agent can execute without ambiguity
|
|
66
167
|
|
|
67
|
-
Save the task list to `docs/plans/sprint-tasks.md`.
|
|
168
|
+
Save the task list to `docs/plans/sprint-tasks.md`. The file MUST include this header:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
# Sprint Tasks — buildanything pipeline
|
|
172
|
+
# PROCESS: Execute each task using build.md Phase 3 Dev→QA loops.
|
|
173
|
+
# DO NOT implement tasks directly. Dispatch to specialist agents.
|
|
174
|
+
# If you lost context, re-read: commands/build.md
|
|
175
|
+
#
|
|
176
|
+
# Each task MUST go through: Implement (agent) → Verify (Evidence Collector) → Review (code-reviewer)
|
|
177
|
+
```
|
|
68
178
|
|
|
69
179
|
### Quality Gate 1
|
|
70
180
|
|
|
@@ -75,7 +185,18 @@ Present to the user:
|
|
|
75
185
|
|
|
76
186
|
Ask: **"Architecture and sprint plan ready. Approve to start building, or flag changes?"**
|
|
77
187
|
|
|
78
|
-
|
|
188
|
+
<HARD-GATE>
|
|
189
|
+
DO NOT PROCEED WITHOUT USER APPROVAL. Wait for explicit confirmation.
|
|
190
|
+
</HARD-GATE>
|
|
191
|
+
|
|
192
|
+
**Save state:** Write `docs/plans/.build-state.md`:
|
|
193
|
+
```
|
|
194
|
+
Phase: 1 COMPLETE — awaiting user approval
|
|
195
|
+
Tasks: [total] planned
|
|
196
|
+
Agents used: Backend Architect, UX Architect, Security Engineer, code-architect, Sprint Prioritizer, Senior Project Manager
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Update TodoWrite: mark Phase 1 complete.
|
|
79
200
|
|
|
80
201
|
---
|
|
81
202
|
|
|
@@ -118,12 +239,34 @@ Run these checks:
|
|
|
118
239
|
|
|
119
240
|
If any fail, fix before proceeding. Present status to user.
|
|
120
241
|
|
|
242
|
+
**Save state:** Update `docs/plans/.build-state.md`:
|
|
243
|
+
```
|
|
244
|
+
Phase: 2 COMPLETE
|
|
245
|
+
Foundation: scaffolded, builds clean, tests pass
|
|
246
|
+
Next: Phase 3 — Dev↔QA loops
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Update TodoWrite: mark Phase 2 complete.
|
|
250
|
+
|
|
121
251
|
---
|
|
122
252
|
|
|
123
253
|
## Phase 3: Build — Dev↔QA Loops
|
|
124
254
|
|
|
255
|
+
<HARD-GATE>
|
|
256
|
+
SENTINEL CHECK — Before starting Phase 3, verify ALL of these:
|
|
257
|
+
- Phase 1 quality gate passed (user approved architecture)
|
|
258
|
+
- Phase 2 quality gate passed (project builds, tests pass)
|
|
259
|
+
- You are dispatching to agents, not coding directly
|
|
260
|
+
- `docs/plans/.build-state.md` exists and is current
|
|
261
|
+
- TodoWrite has Phases 1 and 2 marked complete
|
|
262
|
+
|
|
263
|
+
If ANY check fails, STOP and resolve before continuing.
|
|
264
|
+
</HARD-GATE>
|
|
265
|
+
|
|
125
266
|
**Goal**: Implement every task from the Sprint Task List. Each task goes through a Dev→Test→Review loop. This is where the actual product gets built.
|
|
126
267
|
|
|
268
|
+
**First:** Expand the TodoWrite list — add each task from sprint-tasks.md as a separate todo item under Phase 3.
|
|
269
|
+
|
|
127
270
|
**For EACH task in the Sprint Task List, execute this loop:**
|
|
128
271
|
|
|
129
272
|
### Step 3.1 — Implement
|
|
@@ -134,6 +277,8 @@ Select the right developer agent based on task type:
|
|
|
134
277
|
- **AI Engineer** — ML features, model integration, data pipelines
|
|
135
278
|
- **Rapid Prototyper** — Quick integrations, glue code, utility functions
|
|
136
279
|
|
|
280
|
+
**Launch a FRESH agent for each task.** Do not reuse agents across tasks — this prevents context pollution.
|
|
281
|
+
|
|
137
282
|
The developer agent receives:
|
|
138
283
|
- The specific task description and acceptance criteria from the Sprint Task List
|
|
139
284
|
- The Architecture Document for context
|
|
@@ -158,15 +303,10 @@ Launch **code-reviewer** (Claude Code agent) to review the implementation:
|
|
|
158
303
|
- Adherence to project conventions from the Architecture Document
|
|
159
304
|
- Code quality — is it simple, DRY, readable?
|
|
160
305
|
|
|
161
|
-
Launch **silent-failure-hunter** (Claude Code agent) to check:
|
|
162
|
-
- Silent failures in catch blocks
|
|
163
|
-
- Inadequate error handling
|
|
164
|
-
- Missing edge cases
|
|
165
|
-
|
|
166
306
|
### Step 3.4 — Loop Decision
|
|
167
307
|
|
|
168
308
|
**IF Evidence Collector = PASS AND code-reviewer finds no critical issues:**
|
|
169
|
-
- Mark task as complete in
|
|
309
|
+
- Mark task as complete in TodoWrite
|
|
170
310
|
- Move to next task
|
|
171
311
|
- Reset retry counter
|
|
172
312
|
|
|
@@ -185,7 +325,11 @@ Launch **silent-failure-hunter** (Claude Code agent) to check:
|
|
|
185
325
|
|
|
186
326
|
### Progress Tracking
|
|
187
327
|
|
|
188
|
-
After each task completes
|
|
328
|
+
After each task completes:
|
|
329
|
+
|
|
330
|
+
1. Update TodoWrite: mark the task complete.
|
|
331
|
+
|
|
332
|
+
2. Report to user:
|
|
189
333
|
```
|
|
190
334
|
Task [X/total]: [task name] — COMPLETE
|
|
191
335
|
Tests: [pass count] passing
|
|
@@ -193,13 +337,24 @@ Task [X/total]: [task name] — COMPLETE
|
|
|
193
337
|
Next: [next task name]
|
|
194
338
|
```
|
|
195
339
|
|
|
340
|
+
3. **Save state** — Update `docs/plans/.build-state.md`:
|
|
341
|
+
```
|
|
342
|
+
Phase: 3 IN PROGRESS
|
|
343
|
+
Current task: [X+1]/[total] — [next task name]
|
|
344
|
+
Completed: [list of completed tasks]
|
|
345
|
+
Retry counter: 0
|
|
346
|
+
Agents used this phase: [list]
|
|
347
|
+
```
|
|
348
|
+
|
|
196
349
|
---
|
|
197
350
|
|
|
198
351
|
## Phase 4: Harden
|
|
199
352
|
|
|
200
353
|
**Goal**: The full product is built. Now stress-test it. This phase finds the bugs, performance issues, security holes, and accessibility failures that task-level QA misses.
|
|
201
354
|
|
|
202
|
-
|
|
355
|
+
<HARD-GATE>
|
|
356
|
+
Quality Gate: Reality Checker must approve before this phase passes. The Reality Checker defaults to NEEDS WORK and requires overwhelming evidence for approval. Do NOT self-approve.
|
|
357
|
+
</HARD-GATE>
|
|
203
358
|
|
|
204
359
|
### Step 4.1 — Integration Testing (Parallel)
|
|
205
360
|
|
|
@@ -249,6 +404,14 @@ Present to the user:
|
|
|
249
404
|
5. Accessibility audit results
|
|
250
405
|
6. Any items the Reality Checker flagged as NEEDS WORK
|
|
251
406
|
|
|
407
|
+
**Save state:** Update `docs/plans/.build-state.md`:
|
|
408
|
+
```
|
|
409
|
+
Phase: 4 COMPLETE
|
|
410
|
+
Reality Checker: [verdict]
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
Update TodoWrite: mark Phase 4 complete.
|
|
414
|
+
|
|
252
415
|
---
|
|
253
416
|
|
|
254
417
|
## Phase 5: Ship
|
|
@@ -292,3 +455,10 @@ Files Modified: [count]
|
|
|
292
455
|
|
|
293
456
|
Remaining Items: [any NEEDS WORK items from Reality Checker]
|
|
294
457
|
```
|
|
458
|
+
|
|
459
|
+
Update TodoWrite: mark Phase 5 and all items complete.
|
|
460
|
+
|
|
461
|
+
**Save final state:** Update `docs/plans/.build-state.md`:
|
|
462
|
+
```
|
|
463
|
+
Phase: 5 COMPLETE — BUILD DONE
|
|
464
|
+
```
|
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "startup|resume|clear|compact",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "'${CLAUDE_PLUGIN_ROOT}/hooks/session-start'",
|
|
10
|
+
"async": false
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"PreCompact": [
|
|
16
|
+
{
|
|
17
|
+
"matcher": "",
|
|
18
|
+
"hooks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "prompt",
|
|
21
|
+
"prompt": "ORCHESTRATOR STATE SAVE — Context is about to be compacted. If you are running the /buildanything:build pipeline, you MUST do these things NOW before your context is lost:\n\n1. Use TodoWrite to update all task statuses (complete, in-progress, pending)\n2. Write `docs/plans/.build-state.md` with: current phase, step, task progress, retry counter, agents used, pending quality gate results\n3. The next thing that will happen after compaction is the SessionStart hook will fire and re-inject your orchestrator identity. But you MUST save state NOW or your progress tracking is lost."
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# buildanything: SessionStart hook
|
|
3
|
+
# Re-injects orchestrator identity after context compaction, resume, or clear.
|
|
4
|
+
# Modeled after superpowers' session-start pattern.
|
|
5
|
+
|
|
6
|
+
# Check if a build pipeline is active by looking for .build-state.md
|
|
7
|
+
BUILD_STATE=""
|
|
8
|
+
if [ -f "docs/plans/.build-state.md" ]; then
|
|
9
|
+
BUILD_STATE=$(cat "docs/plans/.build-state.md")
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
# If no active build, just provide a minimal reminder
|
|
13
|
+
if [ -z "$BUILD_STATE" ]; then
|
|
14
|
+
CONTEXT="buildanything plugin is installed. Use /buildanything:build to start a full product pipeline, or /buildanything:idea-sweep for parallel research."
|
|
15
|
+
else
|
|
16
|
+
# Active build detected — re-inject full orchestrator context
|
|
17
|
+
read -r -d '' CONTEXT << 'ORCHESTRATOR'
|
|
18
|
+
BUILDANYTHING ORCHESTRATOR — ACTIVE BUILD DETECTED
|
|
19
|
+
|
|
20
|
+
You are the Agents Orchestrator running a NEXUS-Sprint pipeline. You are NOT a solo developer. You coordinate specialist agents.
|
|
21
|
+
|
|
22
|
+
CRITICAL RULES:
|
|
23
|
+
1. You do NOT write implementation code yourself — you dispatch to specialist agents
|
|
24
|
+
2. You follow phase gates — no advancing without quality gate approval
|
|
25
|
+
3. Every task goes through Dev→Test→Review loops
|
|
26
|
+
4. You must re-read commands/build.md if you are unsure of the process
|
|
27
|
+
|
|
28
|
+
YOUR CURRENT STATE (from docs/plans/.build-state.md):
|
|
29
|
+
ORCHESTRATOR
|
|
30
|
+
|
|
31
|
+
CONTEXT="${CONTEXT}
|
|
32
|
+
${BUILD_STATE}
|
|
33
|
+
|
|
34
|
+
NEXT ACTIONS:
|
|
35
|
+
1. Re-read commands/build.md to reload the full orchestrator process
|
|
36
|
+
2. Resume from the phase and step indicated in your state above
|
|
37
|
+
3. Use TodoWrite to track task progress
|
|
38
|
+
4. Dispatch work to specialist agents — do not implement directly"
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# Output as additional_context for Claude Code
|
|
42
|
+
# JSON-escape the context
|
|
43
|
+
ESCAPED=$(printf '%s' "$CONTEXT" | python3 -c 'import sys,json; print(json.dumps(sys.stdin.read()))')
|
|
44
|
+
|
|
45
|
+
cat << EOF
|
|
46
|
+
{"additional_context": ${ESCAPED}}
|
|
47
|
+
EOF
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buildanything",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "One command to build an entire product. 73 specialist agents orchestrated into a full engineering pipeline for Claude Code.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"buildanything": "./bin/setup.js"
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
".claude-plugin/",
|
|
32
32
|
"agents/",
|
|
33
33
|
"commands/",
|
|
34
|
+
"hooks/",
|
|
34
35
|
"README.md"
|
|
35
36
|
]
|
|
36
37
|
}
|