@nusoft/nuos-build-catalogue 0.21.0 → 0.22.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/dist/commands/init.js
CHANGED
|
@@ -51,7 +51,7 @@ const PROTOCOL_DESCRIPTIONS = {
|
|
|
51
51
|
'end-of-session': 'Capture what happened, update state, write session log, commit',
|
|
52
52
|
'wu-new': 'File a new work unit through a guided plain-English conversation',
|
|
53
53
|
'persona-new': 'File a new persona by walking the seven dimensions conversationally',
|
|
54
|
-
'plan-orientation': 'Phase A of planning — project description, personas, the horizon map',
|
|
54
|
+
'plan-orientation': 'Phase A of planning — project description, tech stack, personas, the horizon map',
|
|
55
55
|
'build-wu': 'Orchestrate a swarm of agents to build one work unit end-to-end',
|
|
56
56
|
};
|
|
57
57
|
const TOOLS = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nusoft/nuos-build-catalogue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "NuOS build-catalogue tooling: semantic search (WU 110) + migration runner that lifts markdown artefacts into JSON-backed workflow records (WU 111, Phase G).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,6 +19,7 @@ Also read:
|
|
|
19
19
|
- The contracts it touches (`docs/build/contracts/`)
|
|
20
20
|
- The architecture files for any modules involved (`docs/build/architecture/`)
|
|
21
21
|
- The relevant design-system pieces if the work unit ships a UI surface
|
|
22
|
+
- `methodfile.json`'s `techStack` section — if `techStack.defined` is `true`, extract the fields now; you'll inject them into every agent prompt in Step 4
|
|
22
23
|
- Run `nuos-catalogue search "<work unit title or outcome>"` to find related prior work
|
|
23
24
|
|
|
24
25
|
Before spawning any agents, search the cross-agent memory for relevant prior findings:
|
|
@@ -61,6 +62,20 @@ Skip steps when context allows — implementation-only WUs skip the architect; b
|
|
|
61
62
|
|
|
62
63
|
Use Claude Code's **Task tool**. Each spawn names the agent (`subagent_type`), the model (from `methodfile.json`'s `swarm.models` block — usually leave as default), and the precise input.
|
|
63
64
|
|
|
65
|
+
**Technical context injection:** If `techStack.defined` is `true` in `methodfile.json`, every agent spawn prompt must open with a "Technical context" block:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
**Technical context (from methodfile.json):**
|
|
69
|
+
- Languages: [languages]
|
|
70
|
+
- Frontend: [frontend]
|
|
71
|
+
- Backend: [backend]
|
|
72
|
+
- Database: [database]
|
|
73
|
+
- Deployment: [deployment]
|
|
74
|
+
- External services: [externalServices]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Omit `null` fields. If `techStack.defined` is `false` or the section is absent, note it in the swarm audit entry and suggest the operator define the stack (`/plan-orientation` or edit `methodfile.json` directly) before the next swarm run — agents generating code without a known stack default to generic patterns that often need rework.
|
|
78
|
+
|
|
64
79
|
**Spawn in parallel where possible.** If two agents can work independently (e.g. tester writing tests while reviewer reads design), spawn them in the same message. Sequential when an agent's output is the next agent's input (architect → coder).
|
|
65
80
|
|
|
66
81
|
For each spawn:
|
|
@@ -141,7 +156,7 @@ Every decision made by any agent during the swarm MUST land in the catalogue bef
|
|
|
141
156
|
|
|
142
157
|
## Cost guidance
|
|
143
158
|
|
|
144
|
-
A typical full-feature swarm spawning architect (Opus, ~30 min) + coder (Sonnet, ~1 hr) + tester (Sonnet, ~30 min) + reviewer (Sonnet, ~15 min)
|
|
159
|
+
A typical full-feature swarm spawning architect (Opus, ~30 min) + coder (Sonnet, ~1 hr) + tester (Sonnet, ~30 min) + reviewer (Sonnet, ~15 min) consumes substantially less of the operator's coding-tool plan budget than running the same work as a continuous Opus conversation. The 80/20 split — heavy reasoning for design and debugging only, lighter models for implementation and verification — is the lever. If a single work unit's swarm is consuming an unusual share of the day's plan budget, surface that to the operator before continuing; the WU is probably bigger than scoped.
|
|
145
160
|
|
|
146
161
|
---
|
|
147
162
|
|
|
@@ -158,16 +173,6 @@ If the reviewer returns REQUEST CHANGES, re-spawn the coder ONCE to address the
|
|
|
158
173
|
|
|
159
174
|
Don't loop indefinitely. A third reviewer rejection is a signal — the work unit's design, contract, or acceptance criteria need clarification, not more code.
|
|
160
175
|
|
|
161
|
-
### Cost ceiling per work unit
|
|
162
|
-
|
|
163
|
-
If the estimated cost (per the swarm audit) is exceeding **£10** for a single work unit:
|
|
164
|
-
|
|
165
|
-
- STOP the swarm
|
|
166
|
-
- Surface the cost trajectory to the operator
|
|
167
|
-
- Recommend either splitting the work unit into smaller pieces, or accepting the higher cost with their explicit go-ahead
|
|
168
|
-
|
|
169
|
-
This is a soft ceiling — the operator can authorise more. The point is to make cost visible before it accumulates invisibly.
|
|
170
|
-
|
|
171
176
|
### Time ceiling per agent
|
|
172
177
|
|
|
173
178
|
If a single agent's run is taking substantially longer than its rough budget (architect >1 hr, coder >2 hrs, tester >1 hr, reviewer >30 min):
|
|
@@ -45,7 +45,43 @@ Listen. Don't interrupt. When they're done, summarise back in 2-3 sentences in y
|
|
|
45
45
|
|
|
46
46
|
When the description is settled, **write it into `STATE.md`'s "What is currently in flight" section** — replacing the placeholder. Keep their voice; don't make it sound corporate. Show them the file path and confirm it's saved.
|
|
47
47
|
|
|
48
|
-
## Step 3 —
|
|
48
|
+
## Step 3 — Tech stack (5 min)
|
|
49
|
+
|
|
50
|
+
Now ask what they're building it with:
|
|
51
|
+
|
|
52
|
+
> "Before we meet the people your project is for — quickly, what are you building it with? Language, framework, database, where it'll run. If you know already, brilliant. If you haven't decided, just say so and we'll note it as an open question."
|
|
53
|
+
|
|
54
|
+
Listen and capture what they give you. Common patterns:
|
|
55
|
+
- *"Next.js, PostgreSQL, deployed on Vercel"* → frontend + database + deployment all filled
|
|
56
|
+
- *"React Native with Firebase"* → frontend + database/backend filled
|
|
57
|
+
- *"Not sure yet"* → set `defined: false`, file a Q-NNN
|
|
58
|
+
|
|
59
|
+
**Write the result to `methodfile.json` now**, under the `techStack` section:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"techStack": {
|
|
64
|
+
"defined": true,
|
|
65
|
+
"languages": ["TypeScript"],
|
|
66
|
+
"frontend": "Next.js 15 (App Router)",
|
|
67
|
+
"backend": "Next.js API Routes / Server Actions",
|
|
68
|
+
"database": "PostgreSQL (Supabase)",
|
|
69
|
+
"deployment": "Vercel",
|
|
70
|
+
"externalServices": ["Stripe"],
|
|
71
|
+
"notes": null
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Fill in what you know; set unknown fields to `null`. If nothing is settled, set `defined: false`, leave all fields null, and file a Q-NNN open question: *"Tech stack not yet decided — revisit before Phase B."*
|
|
77
|
+
|
|
78
|
+
Show the operator the updated `methodfile.json` and confirm it saved. Tell them:
|
|
79
|
+
|
|
80
|
+
> *"This means every agent we spawn later will know what it's building against — language, framework, where it runs. Just a few fields, but it prevents a lot of wrong output later."*
|
|
81
|
+
|
|
82
|
+
**Drift discipline:** partial information is fine and still valuable. An operator who says *"definitely Next.js, not sure about the database yet"* should have `frontend: "Next.js"`, `database: null`, `defined: true`. Partial is better than undefined.
|
|
83
|
+
|
|
84
|
+
## Step 4 — One persona, then one or two more (15-20 min)
|
|
49
85
|
|
|
50
86
|
Tell the operator what's coming:
|
|
51
87
|
|
|
@@ -59,7 +95,7 @@ When P001 is filed, surface it and ask:
|
|
|
59
95
|
|
|
60
96
|
If yes, run `/persona-new` again. Aim for **1-3 total** — more than 3 in Phase A usually means the project is overscoped; file the rest as open questions and revisit later.
|
|
61
97
|
|
|
62
|
-
## Step
|
|
98
|
+
## Step 5 — Map 1: The Horizon (8-10 min)
|
|
63
99
|
|
|
64
100
|
When the personas are filed, transition:
|
|
65
101
|
|
|
@@ -75,7 +111,7 @@ Use the template at `docs/build/maps/01-template.md`. Walk through its sections
|
|
|
75
111
|
|
|
76
112
|
Write the map to `docs/build/maps/01-the-horizon.md`. Show them the file path and confirm.
|
|
77
113
|
|
|
78
|
-
## Step
|
|
114
|
+
## Step 6 — Open questions (2 min)
|
|
79
115
|
|
|
80
116
|
Pass over the conversation looking for anything the operator wasn't sure about. For each:
|
|
81
117
|
|
|
@@ -84,7 +120,7 @@ Pass over the conversation looking for anything the operator wasn't sure about.
|
|
|
84
120
|
|
|
85
121
|
> "I noticed a few things you weren't sure about yet — [list]. I've filed them as open questions so we'll come back to them. Two of them affect Phase B (Architecture), so we'll definitely hit them next session."
|
|
86
122
|
|
|
87
|
-
## Step
|
|
123
|
+
## Step 7 — Close (2 min)
|
|
88
124
|
|
|
89
125
|
Update STATE.md:
|
|
90
126
|
|
|
@@ -96,6 +132,7 @@ Then tell the operator what they now have:
|
|
|
96
132
|
|
|
97
133
|
> "You've got your first catalogue substrate:
|
|
98
134
|
>
|
|
135
|
+
> - **Tech stack** defined in `methodfile.json` — (or flagged as an open question if not yet settled)
|
|
99
136
|
> - **[N] personas** in `docs/build/personas/` — these anchor every later decision
|
|
100
137
|
> - **Map 1** at `docs/build/maps/01-the-horizon.md` — the whole-project picture
|
|
101
138
|
> - **[N] open questions** in `docs/build/open-questions/` — these are what we'll resolve as planning continues
|
|
@@ -42,6 +42,8 @@ For infrastructure work, persona / trigger / walkthrough are marked `N/A — inf
|
|
|
42
42
|
|
|
43
43
|
## Step 4 — File the work unit
|
|
44
44
|
|
|
45
|
+
Before writing the file, check `methodfile.json`'s `techStack.defined`. If it's `false` or the field is absent, tell the operator: *"I notice the tech stack isn't defined yet — that normally happens during Phase A planning. Want to define it now, or shall I file an open question?"* Either way, continue filing the work unit. If `defined` is `true`, the acceptance criteria may reference the stack where relevant (e.g. *"renders correctly with Next.js App Router SSR"*).
|
|
46
|
+
|
|
45
47
|
1. **Number it.** Scan `docs/build/work-units/` and `docs/build/work-units/done/` for the highest existing 3-digit prefix; new number is max + 1.
|
|
46
48
|
2. **Slugify the title.** Lowercase; dashes for spaces; no special characters; cap at 60 chars.
|
|
47
49
|
3. **Write the file** at `docs/build/work-units/NNN-slug.md`. Use `001-template-simple.md` for the simple shape, `001-template-full.md` for the full shape.
|
|
@@ -9,6 +9,16 @@
|
|
|
9
9
|
"tagline": "{{PROJECT_TAGLINE}}",
|
|
10
10
|
"domain": "{{PROJECT_DOMAIN}}"
|
|
11
11
|
},
|
|
12
|
+
"techStack": {
|
|
13
|
+
"defined": false,
|
|
14
|
+
"languages": [],
|
|
15
|
+
"frontend": null,
|
|
16
|
+
"backend": null,
|
|
17
|
+
"database": null,
|
|
18
|
+
"deployment": null,
|
|
19
|
+
"externalServices": [],
|
|
20
|
+
"notes": null
|
|
21
|
+
},
|
|
12
22
|
"catalogue": {
|
|
13
23
|
"root": "docs/build/",
|
|
14
24
|
"registers": {
|