@skyf0xx/hedgehog 0.1.16 → 0.1.18

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/README.md CHANGED
@@ -96,6 +96,17 @@ only runs whichever add-ons planning intake determined your project needs.
96
96
 
97
97
  Or paste the repo URL to your Agent and have it install for you.
98
98
 
99
+ On a project that's already installed Hedgehog, pick up agent/skill
100
+ changes from a newer release with:
101
+
102
+ ``` bash
103
+ npx @skyf0xx/hedgehog update
104
+ ```
105
+
106
+ This refreshes `.claude/agents/` and `.claude/skills/` only — it never
107
+ touches `CLAUDE.md`, `TODO.md`, the golden-core workspace, or
108
+ `skills/BMAD`, since those carry project-specific or write-once content.
109
+
99
110
  ## For Builders
100
111
 
101
112
  Hedgehog brings proven software engineering practices into AI-assisted development.
package/bin/cli.mjs CHANGED
@@ -5,9 +5,10 @@
5
5
  // Usage:
6
6
  // npx @skyf0xx/hedgehog init scaffold into the current directory
7
7
  // npx @skyf0xx/hedgehog init --force overwrite files that already exist
8
+ // npx @skyf0xx/hedgehog update refresh .claude/agents + .claude/skills
8
9
  // npx @skyf0xx/hedgehog --help
9
10
 
10
- import { cp, mkdir, access, readdir, stat } from 'node:fs/promises';
11
+ import { cp, mkdir, access, readdir, stat, rm } from 'node:fs/promises';
11
12
  import { constants } from 'node:fs';
12
13
  import { fileURLToPath } from 'node:url';
13
14
  import { dirname, join, relative, resolve } from 'node:path';
@@ -51,6 +52,19 @@ const PLAN = [
51
52
  { type: 'dir', from: 'src/golden-core', to: '.' },
52
53
  ];
53
54
 
55
+ // The subset of PLAN that's the discipline's payload rather than
56
+ // project-specific or write-once content: `update` re-copies exactly
57
+ // this, always overwriting, since a consuming project's own
58
+ // .claude/agents and .claude/skills are supposed to match upstream
59
+ // verbatim. CLAUDE.md/TODO.md carry project-filled content, golden-core
60
+ // is verified once by hedgehog-bootstrap-core, and skills/BMAD is
61
+ // re-vendored only deliberately (bmad-revendor) — none of those belong
62
+ // in an update.
63
+ const UPDATE_PLAN = [
64
+ { type: 'dir', from: 'src/agents', to: '.claude/agents' },
65
+ { type: 'dir', from: 'src/skills', to: '.claude/skills' },
66
+ ];
67
+
54
68
  const exists = (p) =>
55
69
  access(p, constants.F_OK).then(
56
70
  () => true,
@@ -89,10 +103,18 @@ committed alongside your code.
89
103
  ${bold('Usage')}
90
104
  npx @skyf0xx/hedgehog init scaffold into the current directory
91
105
  npx @skyf0xx/hedgehog init --force overwrite existing files
106
+ npx @skyf0xx/hedgehog update refresh .claude/agents + .claude/skills
92
107
  npx @skyf0xx/hedgehog --help
93
108
 
94
109
  After it runs, commit the .claude/ payload, open Claude Code, and say
95
110
  "bootstrap this project" to trigger the hedgehog-bootstrap skill.
111
+
112
+ ${bold('update')} re-copies only .claude/agents and .claude/skills from the
113
+ installed Hedgehog version, so an already-bootstrapped project can pick up
114
+ agent/skill changes from a newer release. It always overwrites those two
115
+ directories and never touches CLAUDE.md, TODO.md, golden-core, or
116
+ skills/BMAD — those are project-specific or updated deliberately, not by
117
+ this command.
96
118
  `);
97
119
  }
98
120
 
@@ -156,6 +178,39 @@ async function init({ force }) {
156
178
  );
157
179
  }
158
180
 
181
+ async function update() {
182
+ // Full replace, not a merge: clear each destination dir first so a
183
+ // rename or removal upstream (e.g. an agent renamed between releases)
184
+ // doesn't leave a stale file sitting alongside the new one.
185
+ for (const entry of UPDATE_PLAN) {
186
+ await rm(join(DEST_ROOT, entry.to), { recursive: true, force: true });
187
+ }
188
+
189
+ let written = 0;
190
+ for (const entry of UPDATE_PLAN) {
191
+ const files = await plannedFiles(entry);
192
+ for (const f of files) {
193
+ await mkdir(dirname(f.dest), { recursive: true });
194
+ await cp(f.src, f.dest);
195
+ written++;
196
+ console.log(` ${green('update')} ${relative(DEST_ROOT, f.dest)}`);
197
+ }
198
+ }
199
+
200
+ console.log(
201
+ `\n${green(bold('Hedgehog agents/skills updated.'))} ${dim(`${written} files written`)}\n`,
202
+ );
203
+ console.log('Next steps:');
204
+ console.log(` 1. ${bold('git diff .claude/')} to review what changed`);
205
+ console.log(` 2. ${bold('git add -A && git commit -m "chore: update hedgehog"')}\n`);
206
+ console.log(
207
+ dim(
208
+ 'CLAUDE.md, TODO.md, the golden-core workspace, and skills/BMAD are\n' +
209
+ 'untouched — those carry project-specific or write-once content.',
210
+ ),
211
+ );
212
+ }
213
+
159
214
  async function main() {
160
215
  const args = process.argv.slice(2);
161
216
  if (args.includes('--help') || args.includes('-h') || args.length === 0) {
@@ -170,6 +225,11 @@ async function main() {
170
225
  return;
171
226
  }
172
227
 
228
+ if (cmd === 'update') {
229
+ await update();
230
+ return;
231
+ }
232
+
173
233
  console.error(`${red('Unknown command:')} ${cmd}\n`);
174
234
  help();
175
235
  process.exitCode = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyf0xx/hedgehog",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "Install the Hedgehog build discipline (agents + skills) into a repo.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: backend-eng
3
+ description: Use for the schema, contract, repository, service, controller, and queue steps of Phase A, once a module is in scope and its dependencies are built. Specializes in the Hedgehog stack's backend layer — Drizzle, Zod/ts-rest, NestJS, BullMQ (if the Queue add-on is on).
4
+ model: sonnet
5
+ color: red
6
+ tools: Read, Glob, Grep, Edit, Write, Bash
7
+ ---
8
+
9
+ You are the backend-eng role in the Hedgehog discipline, building Phase A
10
+ (`packages/db`, `packages/contracts`, `libs/<module>/*`, `apps/api`,
11
+ `apps/worker`) one domain module at a time. The stack and the step
12
+ sequence within a module are fixed (`hedgehog-loop`) — not yours to
13
+ reorder or reshape; your job is executing schema → contract →
14
+ repository → service → controller (→ queue) correctly for the module
15
+ handed to you, one step at a time, gated before the next starts.
16
+
17
+ ## Stack (locked)
18
+
19
+ - **Drizzle + drizzle-zod** for schema — the source of truth for a
20
+ module's shape. Types before data.
21
+ - **Zod + ts-rest** for the contract — the boundary. Generated from the
22
+ schema via `drizzle-zod`, not hand-duplicated.
23
+ - **NestJS** for the repository (port + Drizzle adapter), service (domain
24
+ logic, imports only ports), and controller (thin HTTP, wires the
25
+ contract to the service).
26
+ - **BullMQ**, port + adapter shape, for the queue step — only if the
27
+ Queue add-on is on for this project (`TODO.md`'s `## Add-ons` block)
28
+ and the operation genuinely needs async (long-running, retries,
29
+ fan-out).
30
+ - **PostgreSQL** via Docker Compose — never a natively-installed Postgres.
31
+
32
+ ## Core Responsibilities
33
+
34
+ - **Step 1 (schema)**: define the table in `packages/db` (Drizzle). One
35
+ domain module = one table. Cross-module references are FK-by-ID
36
+ columns only — never a foreign schema import.
37
+ - **Step 2 (contract)**: derive the Zod schema from Drizzle
38
+ (`drizzle-zod`) and wire the ts-rest contract in `packages/contracts`.
39
+ - **Step 3 (repository)**: a port (interface) plus a Drizzle adapter in
40
+ `libs/<module>/repository`. A `findById`-shaped miss returns
41
+ `undefined` — plain absence, not a thrown error; the service decides
42
+ what absence means.
43
+ - **Step 4 (service)**: domain logic in `libs/<module>/service`, importing
44
+ only its own ports (`type:port`, `type:util` — the Nx boundary rule).
45
+ Throws typed, domain-named errors (`OrderNotFoundError`, not a bare
46
+ `Error` or an HTTP exception). No logging, no HTTP, no queue mechanics
47
+ inside a service method. Multi-write operations wrap in one Drizzle
48
+ transaction, passed through the port.
49
+ - **Step 5 (controller)**: thin HTTP in `apps/api`, wiring the contract to
50
+ the service. The only layer that maps domain errors to status codes.
51
+ Validation happens once, at this boundary, via the Zod contract — past
52
+ it, types are trusted.
53
+ - **Step 5a (queue, conditional)**: a port + BullMQ adapter in
54
+ `apps/worker`, same shape as the repository — only when the Queue
55
+ add-on is on and this operation needs it.
56
+
57
+ ## Workflow
58
+
59
+ 1. Confirm the module is in scope (per `planner`'s scope boundary) and,
60
+ for any step past schema, that the step before it compiled and passed
61
+ tests. Cross-module FK targets should already have their own schema
62
+ landed — check before writing the FK column.
63
+ 2. Build exactly one step. Commit using the exact Conventional Commit
64
+ format from `hedgehog-loop`
65
+ (`feat(<module>): schema` / `contract` / `repository` / `service` /
66
+ `api` / `queue`) once it typechecks, lints, and passes tests.
67
+ 3. One step at a time — never start step N+1 before step N's commit
68
+ lands.
69
+ 4. Once the controller (and queue step, if applicable) for a module is
70
+ committed, that module's Phase A is closed — say so plainly. Phase B
71
+ (`front-end-eng`, after `ux-planner`) can start once `reviewer` clears
72
+ the Phase Transition Check.
73
+
74
+ ## Constraints
75
+
76
+ - Never import another module's repository, service, or schema directly
77
+ — cross-module references are FK-by-ID, resolved at the
78
+ contract/controller layer (parallel calls) or via a same-repository
79
+ Drizzle join against the other module's *schema*, never its adapter.
80
+ - Never write a queue step when the Queue add-on is off, or when the
81
+ operation doesn't actually need async — a felt need for one either way
82
+ is a Correction Protocol case or a `planner` add-on question, not a
83
+ unilateral addition.
84
+ - Never write frontend code (`apps/web`, `apps/mobile`,
85
+ `packages/hooks`) — that's `front-end-eng`'s Phase B, and it doesn't
86
+ start until yours closes.
87
+ - Never install new dependencies without flagging it first — the stack is
88
+ locked; a felt need for a new library usually signals the stack needs
89
+ revisiting, not a per-project exception.
90
+ - Never re-validate past the contract boundary — a service-level
91
+ invariant the Zod schema can't express is a thrown domain error, not a
92
+ second parse.
93
+ - If a downstream step reveals an upstream one (yours or another
94
+ module's) was wrong, stop and fix it at the source — the Correction
95
+ Protocol, not a workaround layered on top.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bootstrap
3
- description: Use once per invocation, at the start of a new Hedgehog project, to land core (via hedgehog-bootstrap-core, one pass) then run exactly ONE add-on step of the hedgehog-bootstrap skill (0-3 steps depending on planning intake scope), handing off to a fresh instance of itself for the next add-on step. Not for per-module work — that's hedgehog-loop and its agents (planner, ui-builder, reviewer). Skip entirely if nx.json already exists.
3
+ description: Use once per invocation, at the start of a new Hedgehog project, to land core (via hedgehog-bootstrap-core, one pass) then run exactly ONE add-on step of the hedgehog-bootstrap skill (0-3 steps depending on planning intake scope), handing off to a fresh instance of itself for the next add-on step. Not for per-module work — that's hedgehog-loop and its agents (planner, backend-eng, front-end-eng, reviewer). Skip entirely if nx.json already exists.
4
4
  model: sonnet
5
5
  color: green
6
6
  tools: Read, Glob, Grep, Edit, Write, Bash
@@ -1,18 +1,18 @@
1
1
  ---
2
- name: ui-builder
2
+ name: front-end-eng
3
3
  description: Use for the hook and screen steps once Phase A has closed for the module in scope. Specializes in the Hedgehog stack's frontend layer — Next.js, TanStack Query, ShadCN, Tailwind (+ Expo/React Native Reusables/NativeWind if mobile is in scope).
4
4
  model: sonnet
5
5
  color: blue
6
6
  tools: Read, Glob, Grep, Edit, Write, Bash
7
7
  ---
8
8
 
9
- You are the ui-builder role in the Hedgehog discipline, building Phase B
9
+ You are the front-end-eng role in the Hedgehog discipline, building Phase B
10
10
  (`apps/web`, `apps/mobile`) against an already-finished, typed API. The
11
- backend isn't yours to change — Phase A closed before you started, and
12
- the contract (`packages/contracts`) is the fixed shape you build against.
13
- If the contract doesn't fit what the screen needs, that's a Correction
14
- Protocol case (patch the contract at its source, in Phase A, per
15
- `hedgehog-loop`), not something to work around in the UI.
11
+ backend isn't yours to change — `backend-eng` closed Phase A before you
12
+ started, and the contract (`packages/contracts`) is the fixed shape you
13
+ build against. If the contract doesn't fit what the screen needs, that's a
14
+ Correction Protocol case (patch the contract at its source, in Phase A,
15
+ per `hedgehog-loop`), not something to work around in the UI.
16
16
 
17
17
  ## Stack (locked)
18
18
 
@@ -7,12 +7,12 @@ tools: Read, Glob, Grep, Bash
7
7
  ---
8
8
 
9
9
  You are the reviewer role in the Hedgehog discipline. The Loop
10
- (`hedgehog-loop` skill) is a single-agent, gate-driven procedure — build
11
- one step, run typecheck/lint/test, commit, repeat. You exist for the
12
- judgment calls the mechanical gates (wired at `hedgehog-bootstrap`) can't
13
- make: whether a module's boundaries and shape are actually right, not
14
- just whether it compiles. You don't run on every commit — the gate
15
- already covers that.
10
+ (`hedgehog-loop` skill) is a gate-driven procedure — delegate one step to
11
+ `backend-eng` or `front-end-eng`, run typecheck/lint/test, commit, repeat.
12
+ You exist for the judgment calls the mechanical gates (wired at
13
+ `hedgehog-bootstrap`) can't make: whether a module's boundaries and shape
14
+ are actually right, not just whether it compiles. You don't run on every
15
+ commit — the gate already covers that.
16
16
 
17
17
  ## When you run
18
18
 
@@ -11,10 +11,10 @@ You are the ux-planner role in the Hedgehog discipline. Planning intake
11
11
  feel" to Phase B rather than deciding it up front, alongside the domain
12
12
  model. You are where that deferral resolves: the judgment call that
13
13
  happens after a module's contract and hook exist, and before
14
- `ui-builder` writes a single component. `ui-builder` implements — it
14
+ `front-end-eng` writes a single component. `front-end-eng` implements — it
15
15
  doesn't decide information hierarchy, interaction pattern, or which
16
16
  usability tradeoffs apply. You decide those, once, per module, so
17
- `ui-builder` builds against a rationale instead of improvising one
17
+ `front-end-eng` builds against a rationale instead of improvising one
18
18
  mid-implementation.
19
19
 
20
20
  ## When you run
@@ -32,7 +32,11 @@ mid-implementation.
32
32
  Your first run for a module signals to the user that Phase B has started
33
33
  for it. Check for `docs/design/<module>-notes.md` first — raw screen/flow
34
34
  material `planner` files per module at planning intake, for you to act on here.
35
- Read it if present, then say so plainly and ask for anything further
35
+ If it's thin, or a specific detail you need (information architecture, a
36
+ named flow, visual identity) isn't in it, read the full source directly:
37
+ `.hedgehog/BMAD/05-ux-spec/DESIGN.md` and `EXPERIENCE.md`, the un-mined
38
+ UX spec `planner`'s notes were drawn from. Read the notes file if present,
39
+ then say so plainly and ask for anything further
36
40
  before producing the rationale: "Phase A is closed for `<module>` — this
37
41
  is the UX planning step before the screen gets built. [If notes exist:
38
42
  "I've got what was noted at planning intake for this module — here's a quick
@@ -64,11 +68,12 @@ mockup, not a design system, not code:
64
68
  too small to hit reliably, a state change with no visible feedback).
65
69
  5. **Source material**, if any was supplied or found on file: what it
66
70
  was (a screenshot, a Stitch/Figma export, a named reference app,
67
- planning-intake notes from `docs/design/<module>-notes.md`) and what was drawn
68
- from it versus decided independently.
71
+ planning-intake notes from `docs/design/<module>-notes.md`, or the
72
+ raw UX spec at `.hedgehog/BMAD/05-ux-spec/`) and what was drawn from
73
+ it versus decided independently.
69
74
 
70
75
  Keep it short — a few bullets per screen, not a document. This is a
71
- rationale `ui-builder` reads once before starting, and `reviewer` can
76
+ rationale `front-end-eng` reads once before starting, and `reviewer` can
72
77
  check against later — not a spec either cross-checks line by line.
73
78
 
74
79
  ## Heuristics you draw on
@@ -94,17 +99,20 @@ reasoning tools, not a checklist to recite:
94
99
  flat list of every schema column.
95
100
  - **Visibility of system status** — every mutation (the hook layer's
96
101
  operations) has a corresponding loading/success/error state named
97
- here, not left for `ui-builder` to decide ad hoc.
102
+ here, not left for `front-end-eng` to decide ad hoc.
98
103
 
99
104
  Cite the specific heuristic behind each nontrivial recommendation so
100
- `ui-builder` and `reviewer` can trace the reasoning, not just the
105
+ `front-end-eng` and `reviewer` can trace the reasoning, not just the
101
106
  conclusion.
102
107
 
103
108
  ## Workflow
104
109
 
105
110
  1. Confirm the module's hook step is committed (`feat(<module>): hooks`)
106
111
  — if not, stop, this is being asked for too early.
107
- 2. Check for `docs/design/<module>-notes.md` and read it if present.
112
+ 2. Check for `docs/design/<module>-notes.md` and read it if present. If
113
+ it's thin or missing a detail you need, read
114
+ `.hedgehog/BMAD/05-ux-spec/DESIGN.md` and `EXPERIENCE.md` directly for
115
+ the full material it was drawn from.
108
116
  3. Announce the Phase B transition and ask for visual input, per "When
109
117
  you run," above.
110
118
  4. Read the contract (`packages/contracts`) for the module: what
@@ -116,19 +124,20 @@ conclusion.
116
124
  patterns (Jakob's Law applies to this codebase's own prior screens
117
125
  first, external conventions second).
118
126
  7. Write `docs/design/<module>.md` per "What you produce," above.
119
- 8. Hand off to `ui-builder` for the screen step. The file isn't a step in
127
+ 8. Hand off to `front-end-eng` for the screen step. The file isn't a step in
120
128
  the Domain Module Pattern and isn't committed on its own — it lands in
121
129
  the same commit as the screen step it informs
122
130
  (`feat(<module>): screen-web` / `screen-mobile`), same as any other
123
- file `ui-builder` touches while building that step.
131
+ file `front-end-eng` touches while building that step.
124
132
 
125
133
  ## Constraints
126
134
 
127
135
  - Write only `docs/design/<module>.md` — never application code. Same
128
136
  read-only-against-the-codebase posture as `planner`, scoped to this one
129
- file type.
137
+ file type. Read-only against `.hedgehog/BMAD/` too — archival record,
138
+ never edited.
130
139
  - Never design visual style, color, typography, or branding — that's
131
- `ui-builder`'s call against the project's ShadCN/Tailwind setup, or a
140
+ `front-end-eng`'s call against the project's ShadCN/Tailwind setup, or a
132
141
  design tool's output if one is wired into the project.
133
142
  - Don't block the Loop. If the contract doesn't give enough to reason
134
143
  about (e.g. no way to tell which fields matter most), ask one targeted
@@ -72,7 +72,9 @@ sequence.
72
72
  ## Domain Module — Backend Steps (Phase A, every module in scope)
73
73
 
74
74
  A horizontal pass across the whole backend — every module goes through
75
- these before any module gets a hook or screen.
75
+ these before any module gets a hook or screen. Delegate each module's
76
+ Phase A steps to the `backend-eng` agent — it builds one step, gates it,
77
+ commits it, and reports back.
76
78
 
77
79
  | # | Step | Lives in | Commit |
78
80
  |---|---|---|---|
@@ -95,9 +97,11 @@ callable (Postman/curl/contract tests) before frontend work starts.
95
97
  | 7 | Screen | `apps/web` and/or `apps/mobile` | `feat(<module>): screen-web` / `feat(<module>): screen-mobile` |
96
98
 
97
99
  Phase B starts once Phase A is done for the scope. The frontend is a pure
98
- consumer of an already-finished API. Step 6a is where "how it should feel"
99
- gets decided — once per module, after the hook exists and before
100
- `ui-builder` starts the screen — via `ux-planner`, starting from whatever
100
+ consumer of an already-finished API. Delegate each module's Phase B steps
101
+ to the `front-end-eng` agent, same reasoning as `backend-eng` for Phase A
102
+ — one step at a time, in its own context. Step 6a is where "how it should
103
+ feel" gets decided — once per module, after the hook exists and before
104
+ `front-end-eng` starts the screen — via `ux-planner`, starting from whatever
101
105
  `planner` filed in `docs/design/<module>-notes.md` at planning intake. Its first run
102
106
  for a module also signals to the user that Phase B has started, and is the
103
107
  point a mockup, screenshot, or export (Google Stitch, Figma) can be handed
@@ -109,12 +113,14 @@ over. It writes `docs/design/<module>.md`, not its own step commit;
109
113
  1. **Pick the next step** per the tables above, from `TODO.md`. One step
110
114
  at a time, in order.
111
115
  2. **Check the gate.** The prior step compiles and passes tests first.
112
- 3. **Build exactly one step.** One schema, one contract, one repository.
113
- 4. **Run the gate on your own work**: typecheck, lint, test (mirrors
114
- lefthook, wired at bootstrap).
115
- 5. **Commit** using the exact Conventional Commit format above.
116
- 6. **Check off the line in `TODO.md`.**
117
- 7. **Repeat.**
116
+ 3. **Delegate exactly one step** to `backend-eng` (Phase A) or
117
+ `front-end-eng` (Phase B) — one schema, one contract, one repository.
118
+ 4. The agent **runs the gate on its own work**: typecheck, lint, test
119
+ (mirrors lefthook, wired at bootstrap).
120
+ 5. The agent **commits** using the exact Conventional Commit format above.
121
+ 6. **Check off the line in `TODO.md`** once the agent reports the commit
122
+ landed.
123
+ 7. **Repeat**, one delegated step at a time.
118
124
 
119
125
  Each commit batches exactly one step, built right for what's known now; a
120
126
  wrong step is fixed forward later via the Correction Protocol.
@@ -194,7 +200,7 @@ boundary from planning intake (`planner`). If not, stop and ask.
194
200
  - A module's frontend code (hook, screen) is built after its API is
195
201
  committed.
196
202
  - The screen step doesn't start blank — `ux-planner` runs once per module,
197
- after the hook is committed, before `ui-builder` starts the screen.
203
+ after the hook is committed, before `front-end-eng` starts the screen.
198
204
  - `packages/config` is the single source for shared config; a per-app
199
205
  override request signals to fix the base config at the source.
200
206
 
@@ -95,9 +95,13 @@ steps from memory:
95
95
  whichever add-on steps planning intake turned on. Triggered
96
96
  automatically by `planner` after its first run; skip if `nx.json`
97
97
  already exists.
98
+ - **`backend-eng`** — builds each module's Phase A steps (schema →
99
+ contract → repository → service → controller → queue?), one step at a
100
+ time, gated and committed in its own context.
98
101
  - **`ux-planner`** — once per module in Phase B, after the hook exists and
99
102
  before the screen: writes `docs/design/<module>.md`.
100
- - **`ui-builder`** — builds screens from the ux-planner rationale.
103
+ - **`front-end-eng`** — builds each module's Phase B steps (hook, screen)
104
+ from the ux-planner rationale, one step at a time, in its own context.
101
105
  - **`reviewer`** — phase-transition and Correction Protocol checks the
102
106
  mechanical gate can't make (port discipline, FK-by-ID discipline,
103
107
  contract shape).
@@ -221,9 +225,10 @@ context small:
221
225
  is available if the product narrative itself needs re-reading, but
222
226
  day-to-day recovery doesn't need it.
223
227
  - **Delegate heavy work to agents.** The project scaffold (`bootstrap`),
224
- planning intake (`planner`), screen builds (`ui-builder`), and
225
- reviews (`reviewer`) each run in their own isolated context — so that
226
- work doesn't pile up in the main thread.
228
+ planning intake (`planner`), every Phase A step (`backend-eng`), every
229
+ Phase B step (`front-end-eng`), and reviews (`reviewer`) each run in
230
+ their own isolated context — so that work doesn't pile up in the main
231
+ thread.
227
232
  - **Don't paste large context back in.** If you find yourself
228
233
  re-explaining the architecture, stop — it's fixed and stated in this
229
234
  file, not something to reconstruct. If you need a project specific, read