odd-studio 1.0.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 +19 -0
- package/README.md +229 -0
- package/bin/odd-studio.js +212 -0
- package/hooks/odd-destructive-guard.sh +98 -0
- package/hooks/odd-git-safety.sh +138 -0
- package/hooks/odd-outcome-quality.sh +84 -0
- package/hooks/odd-pre-build.sh +57 -0
- package/hooks/odd-session-save.sh +38 -0
- package/hooks/odd-ui-check.sh +69 -0
- package/package.json +43 -0
- package/scripts/install-skill.js +30 -0
- package/scripts/postinstall.js +28 -0
- package/scripts/scaffold-project.js +61 -0
- package/scripts/setup-hooks.js +105 -0
- package/skill/SKILL.md +464 -0
- package/skill/docs/build/build-protocol.md +532 -0
- package/skill/docs/kb/odd-kb.md +462 -0
- package/skill/docs/planning/build-planner.md +315 -0
- package/skill/docs/planning/outcome-writer.md +328 -0
- package/skill/docs/planning/persona-architect.md +258 -0
- package/skill/docs/planning/systems-mapper.md +270 -0
- package/skill/docs/ui/accessibility.md +415 -0
- package/skill/docs/ui/component-guide.md +356 -0
- package/skill/docs/ui/design-system.md +403 -0
- package/templates/.odd/state.json +16 -0
- package/templates/CLAUDE.md +93 -0
- package/templates/docs/contract-map.md +60 -0
- package/templates/docs/outcomes/.gitkeep +0 -0
- package/templates/docs/outcomes/example-outcome.md +104 -0
- package/templates/docs/personas/.gitkeep +0 -0
- package/templates/docs/personas/example-persona.md +108 -0
- package/templates/docs/plan.md +73 -0
- package/templates/docs/ui/.gitkeep +0 -0
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
# ODD Studio — Build Protocol
|
|
2
|
+
|
|
3
|
+
The Build Protocol is the discipline that turns a well-written ODD plan into working software. Without it, builds drift. With it, every session starts from a known position, every outcome produces verified software, and every phase ends with a coherent, integrated system.
|
|
4
|
+
|
|
5
|
+
The protocol has 4 levels. They nest: sessions contain phases, phases contain outcomes, phases end with integration. You apply the right level at the right moment — you do not skip levels and you do not invent your own steps.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Level 1 — Session Protocol
|
|
10
|
+
|
|
11
|
+
### Why sessions need a protocol
|
|
12
|
+
|
|
13
|
+
Claude Code does not remember yesterday. Every time you open a new conversation, you are talking to someone who has never heard of your project. If you start typing "can you add the approval button to the teacher dashboard", you will get a response from someone who does not know what approval means in your domain, what the teacher dashboard is, or what state the code is in.
|
|
14
|
+
|
|
15
|
+
The Session Protocol solves this. It takes 3 minutes to run and saves 15 minutes of confused AI behaviour.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
### Step 1 — Re-orient Claude Code at the start of every session
|
|
20
|
+
|
|
21
|
+
Open Claude Code. Before you describe any work, paste this block and fill in the blanks:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
I am continuing work on [PROJECT NAME].
|
|
25
|
+
|
|
26
|
+
This is an Outcome-Driven Development project. My ODD plan is in [PATH TO PLAN FILE].
|
|
27
|
+
|
|
28
|
+
Please read the plan now so you understand the domain, the personas, the outcomes, and the contracts.
|
|
29
|
+
|
|
30
|
+
My last session note is below. Read it carefully.
|
|
31
|
+
|
|
32
|
+
[PASTE YOUR LAST HANDOVER NOTE HERE]
|
|
33
|
+
|
|
34
|
+
The code is in [PATH TO CODEBASE]. The current state is:
|
|
35
|
+
- Last completed outcome: [OUTCOME NAME OR "none"]
|
|
36
|
+
- Current phase: [PHASE NAME]
|
|
37
|
+
- Outstanding issues: [DESCRIBE IN DOMAIN LANGUAGE OR "none"]
|
|
38
|
+
|
|
39
|
+
Before we build anything, confirm you have read the plan and the handover note.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Do not skip the confirmation step. If Claude Code summarises what it read and the summary is wrong, correct it before proceeding.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
### Step 2 — Restore session state with Ruflo
|
|
47
|
+
|
|
48
|
+
If you are using Ruflo for swarm coordination (recommended for phases with 3+ outcomes), restore state immediately after re-orienting:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Restore the Ruflo session state for this project using:
|
|
52
|
+
- mcp__ruflo__session_restore with session key 'odd-[project-name]-session'
|
|
53
|
+
- mcp__ruflo__memory_retrieve with key 'odd-project-state'
|
|
54
|
+
|
|
55
|
+
Report back what you find.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Ruflo memory persists between sessions. It stores what agents built, what contracts were published, and what decisions were made. Claude Code reads this and resumes from where the swarm left off.
|
|
59
|
+
|
|
60
|
+
If `memory_retrieve` returns nothing, the project is starting fresh or state was not saved. Proceed with your handover note as the source of truth.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### Step 3 — The handover note system
|
|
65
|
+
|
|
66
|
+
At the end of every session, you write a handover note. It takes 15 seconds. It saves the next session from 15 minutes of confusion.
|
|
67
|
+
|
|
68
|
+
**The handover note template:**
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
SESSION NOTE — [DATE] [TIME]
|
|
72
|
+
|
|
73
|
+
Completed this session:
|
|
74
|
+
- [List outcomes or sub-tasks completed, in plain language]
|
|
75
|
+
|
|
76
|
+
State of the code:
|
|
77
|
+
- Last committed outcome: [OUTCOME NAME]
|
|
78
|
+
- Uncommitted work: [DESCRIBE OR "none"]
|
|
79
|
+
- Build is: passing / broken / partially broken
|
|
80
|
+
|
|
81
|
+
Open issues:
|
|
82
|
+
- [Describe any problem that was not resolved, in domain language]
|
|
83
|
+
- [Example: "The fee calculation rounds to the wrong decimal in the invoice preview"]
|
|
84
|
+
|
|
85
|
+
Next session should start with:
|
|
86
|
+
- [The first thing to do, described clearly]
|
|
87
|
+
- [Any Claude Code instruction that needs to be given immediately]
|
|
88
|
+
|
|
89
|
+
Anything Claude Code needs to know:
|
|
90
|
+
- [Rules discovered during this session, e.g. "Do not use server actions for the invoice endpoint — use API routes instead"]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Save this note as a text file in your project folder (e.g. `/docs/session-notes/2026-03-17.md`). You will paste the relevant note into your session start template every time.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
### Step 4 — Close a session cleanly
|
|
98
|
+
|
|
99
|
+
Before you close Claude Code, do three things in order:
|
|
100
|
+
|
|
101
|
+
**1. Commit what works.**
|
|
102
|
+
|
|
103
|
+
Ask Claude Code:
|
|
104
|
+
```
|
|
105
|
+
Commit everything that is currently verified and working. Use the format:
|
|
106
|
+
"Outcome [N] [name] — verified"
|
|
107
|
+
or if mid-outcome:
|
|
108
|
+
"WIP: [describe what is done in plain language]"
|
|
109
|
+
|
|
110
|
+
Do not commit broken code without labelling it WIP.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**2. Write your handover note.**
|
|
114
|
+
|
|
115
|
+
Fill in the template above. Do not skip this. You will not remember tomorrow what you know now.
|
|
116
|
+
|
|
117
|
+
**3. Save state to Ruflo.**
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
Save the current project state to Ruflo memory using:
|
|
121
|
+
- mcp__ruflo__memory_store with key 'odd-project-state'
|
|
122
|
+
|
|
123
|
+
Include: last completed outcome, current phase, any open issues, and the file path of today's session note.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Level 2 — Phase Protocol
|
|
129
|
+
|
|
130
|
+
### What a phase is
|
|
131
|
+
|
|
132
|
+
A phase is a group of outcomes that, taken together, produce a coherent capability. The Session Protocol tells you how to start and stop. The Phase Protocol tells you how to build a group of outcomes without the pieces colliding.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### Step 1 — Verify previous phase dependencies
|
|
137
|
+
|
|
138
|
+
Before building anything in this phase, ask:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
Read the ODD plan. List every contract this phase depends on that was built in a previous phase.
|
|
142
|
+
|
|
143
|
+
For each contract, verify:
|
|
144
|
+
1. Does the code or database schema for this contract exist?
|
|
145
|
+
2. Does it match what the plan specifies?
|
|
146
|
+
|
|
147
|
+
Report back as a table: Contract | Exists | Matches Plan | Gap (if any)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Do not start building until every dependency is confirmed. If a contract is missing or wrong, fix it before proceeding. A phase built on a false assumption will require expensive rework.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
### Step 2 — Identify shared infrastructure for this phase
|
|
155
|
+
|
|
156
|
+
Look at the outcomes in this phase. Some will share infrastructure: the same database table, the same authentication check, the same email provider, the same API endpoint.
|
|
157
|
+
|
|
158
|
+
If you try to build each outcome independently, two agents will build the same table differently. They will not connect. This is the "two architects, one door" problem.
|
|
159
|
+
|
|
160
|
+
Ask:
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
Read the outcomes in Phase [N]. Identify all shared infrastructure:
|
|
164
|
+
- Shared database tables or schemas
|
|
165
|
+
- Shared API endpoints
|
|
166
|
+
- Shared authentication logic
|
|
167
|
+
- Shared email or notification services
|
|
168
|
+
- Shared UI components used by multiple outcomes
|
|
169
|
+
|
|
170
|
+
List each shared item and which outcomes use it.
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
### Step 3 — Brief the Coordinator agent
|
|
176
|
+
|
|
177
|
+
When using Ruflo for a phase with multiple outcomes, the Coordinator agent runs first. Its job is to read all the outcome contracts and publish shared technical contracts before any building begins.
|
|
178
|
+
|
|
179
|
+
Initialise the swarm:
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
Initialise a Ruflo swarm for Phase [N] of [PROJECT NAME]:
|
|
183
|
+
mcp__ruflo__swarm_init with topology hierarchical and max-agents 6
|
|
184
|
+
|
|
185
|
+
Then spawn a Coordinator agent:
|
|
186
|
+
mcp__ruflo__agent_spawn with type hierarchical-coordinator and name "phase-[N]-coordinator"
|
|
187
|
+
|
|
188
|
+
Brief the Coordinator with:
|
|
189
|
+
- The ODD plan (attach file path)
|
|
190
|
+
- The list of outcomes in this phase
|
|
191
|
+
- The list of shared infrastructure identified above
|
|
192
|
+
- The instruction: "Read all outcome contracts. Publish shared technical contracts — database schemas, API shapes, component interfaces — to Ruflo memory before any other agent begins work."
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Wait for the Coordinator to confirm contracts are published before proceeding to parallel building.
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
### Step 4 — Verify shared infrastructure before building outcomes
|
|
200
|
+
|
|
201
|
+
After the Coordinator has published contracts:
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
Retrieve the shared contracts from Ruflo:
|
|
205
|
+
mcp__ruflo__memory_retrieve with key 'odd-phase-[N]-contracts'
|
|
206
|
+
|
|
207
|
+
Confirm the contracts match the ODD plan. If anything is missing or wrong, correct it now.
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Then proceed to Level 3 for each outcome.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
### Step 5 — After all outcomes: run Integration Protocol
|
|
215
|
+
|
|
216
|
+
When all outcomes in the phase are individually verified, run Level 4. Do not skip it. Individual outcomes that pass their own verification steps can still fail to connect.
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Level 3 — Outcome Protocol
|
|
221
|
+
|
|
222
|
+
### Step 1 — Decide whether to stage the build
|
|
223
|
+
|
|
224
|
+
Some outcomes are simple: one screen, one action, one data change. Build them in one shot.
|
|
225
|
+
|
|
226
|
+
Some outcomes involve more than 2 context shifts. A context shift is any moment where the work moves from one layer to another: from database to API, from API to UI, from UI to email notification, from one persona's view to another's.
|
|
227
|
+
|
|
228
|
+
**Rule: if an outcome has more than 2 context shifts, stage the build.**
|
|
229
|
+
|
|
230
|
+
Staging means you build in sub-steps and verify each one before moving to the next. You tell Claude Code:
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
Build this outcome in stages. First build only the data layer. Verify it. Then build the API layer. Verify it. Then build the UI.
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
This is slower but it is almost always faster overall — because a bug found at the UI layer that originates in the data layer requires rebuilding everything above it.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### Step 2 — Give Claude Code the full outcome brief
|
|
241
|
+
|
|
242
|
+
Paste all 6 fields of the outcome directly into Claude Code. Do not paraphrase. Do not summarise. The exact language in the outcome document is the specification.
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
Build the following outcome. Do not begin until you have read all 6 fields.
|
|
246
|
+
|
|
247
|
+
OUTCOME NAME: [name]
|
|
248
|
+
PERSONA: [persona name and description]
|
|
249
|
+
TRIGGER: [what causes this outcome to begin]
|
|
250
|
+
EXPERIENCE: [what the persona does and sees, in full]
|
|
251
|
+
CONTRACTS CONSUMED: [list of contracts this outcome uses as inputs]
|
|
252
|
+
CONTRACTS EXPOSED: [list of contracts this outcome produces as outputs]
|
|
253
|
+
|
|
254
|
+
Stack: Next.js App Router, TypeScript, Tailwind CSS v4, shadcn/ui, Framer Motion, PostgreSQL/Prisma, NextAuth.js.
|
|
255
|
+
|
|
256
|
+
Build the full outcome. Use the domain language throughout — file names, variable names, component names must reflect the domain, not generic terms.
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
### Step 3 — Ruflo parallel building
|
|
262
|
+
|
|
263
|
+
For outcomes that are large enough to benefit from parallelism, spawn 3 agents simultaneously after the Coordinator has published contracts:
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
Spawn three agents in parallel:
|
|
267
|
+
|
|
268
|
+
1. Backend agent (mcp__ruflo__agent_spawn, type coder, name "outcome-[N]-backend"):
|
|
269
|
+
Brief: "Implement the data layer for Outcome [N] per the shared contracts. Build: Prisma schema, database migrations, API routes or server actions. Use domain language for all names."
|
|
270
|
+
|
|
271
|
+
2. UI agent (mcp__ruflo__agent_spawn, type coder, name "outcome-[N]-ui"):
|
|
272
|
+
Brief: "Implement the UI for Outcome [N] per the shared contracts and the full outcome walkthrough. Use shadcn/ui components, Tailwind CSS v4, Framer Motion for interactions. Mobile-first. WCAG 2.1 AA."
|
|
273
|
+
|
|
274
|
+
3. QA agent (mcp__ruflo__agent_spawn, type tester, name "outcome-[N]-qa"):
|
|
275
|
+
Brief: "Write verification tests for Outcome [N]. Follow the walkthrough exactly. Return results in domain language — describe failures as '[persona] cannot [action]', not as error codes."
|
|
276
|
+
|
|
277
|
+
Sync state between agents using mcp__ruflo__coordination_sync.
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Wait for all three agents to return before running the shape check.
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
### Step 4 — Shape check
|
|
285
|
+
|
|
286
|
+
Before running a full verification walkthrough, do a fast shape check:
|
|
287
|
+
|
|
288
|
+
```
|
|
289
|
+
Check the shape of what was built for Outcome [N]:
|
|
290
|
+
1. List all files created or modified.
|
|
291
|
+
2. Confirm file names use domain language (not generic names like "form.tsx" or "handler.ts").
|
|
292
|
+
3. Confirm a test file exists for this outcome.
|
|
293
|
+
4. Confirm the Prisma schema (if applicable) uses domain field names.
|
|
294
|
+
|
|
295
|
+
Return: Pass / Needs fix for each item, with specific details.
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Fix shape issues before verifying behaviour. A correctly-shaped codebase is far easier to debug.
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
### Step 5 — Verification walkthrough
|
|
303
|
+
|
|
304
|
+
The walkthrough in your outcome document is the script for verification. Run it literally, step by step. Do not improvise.
|
|
305
|
+
|
|
306
|
+
For each step in the walkthrough:
|
|
307
|
+
|
|
308
|
+
```
|
|
309
|
+
Verify Step [N]: [copy the step text from the outcome document]
|
|
310
|
+
|
|
311
|
+
Expected: [what should happen]
|
|
312
|
+
Actual: [what actually happened]
|
|
313
|
+
Result: Pass / Fail / Missing
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Run every step even if an earlier step fails. Collect all failures before asking Claude Code to fix anything.
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
### Step 6 — Describing failures in domain language
|
|
321
|
+
|
|
322
|
+
This is where most non-technical builders struggle. They describe failures using technical terms they do not fully understand, and Claude Code misdiagnoses the problem.
|
|
323
|
+
|
|
324
|
+
**Bad failure description:**
|
|
325
|
+
"The API is returning a 500 error on the POST endpoint and the state is not updating."
|
|
326
|
+
|
|
327
|
+
**Good failure description:**
|
|
328
|
+
"When the mentor clicks Approve on a student's application, nothing changes on screen. The application stays in Pending. If I refresh the page, the application is still Pending — so the approval did not save. The success message appeared briefly but then disappeared."
|
|
329
|
+
|
|
330
|
+
The good description tells Claude Code:
|
|
331
|
+
- What persona performed the action
|
|
332
|
+
- What the action was in domain terms
|
|
333
|
+
- What should have changed
|
|
334
|
+
- What actually changed (or did not)
|
|
335
|
+
- Whether the problem is display-only or persisted to data
|
|
336
|
+
|
|
337
|
+
Always describe failures from the persona's point of view. If you saw an error message, copy it exactly. If you saw nothing, say you saw nothing.
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
### Step 7 — Re-verify the entire outcome after fixes
|
|
342
|
+
|
|
343
|
+
When Claude Code fixes a failure, re-run the entire walkthrough from step 1. Not just the step that failed.
|
|
344
|
+
|
|
345
|
+
Fixes frequently introduce new problems. A fix to the approval logic may break the notification email. A fix to the UI display may break the mobile layout. You will not catch these if you only re-run the failed step.
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
### Step 8 — Commit when verified
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
Commit this outcome. Message format:
|
|
353
|
+
"Outcome [N] [name] — verified"
|
|
354
|
+
|
|
355
|
+
Include all files related to this outcome. Do not include files from other outcomes in the same commit.
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
Save state to Ruflo:
|
|
359
|
+
|
|
360
|
+
```
|
|
361
|
+
mcp__ruflo__memory_store with key 'odd-build-state'
|
|
362
|
+
Include: outcome [N] complete, contracts exposed, date, any decisions made during build.
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## Level 4 — Integration Protocol
|
|
368
|
+
|
|
369
|
+
### When to run it
|
|
370
|
+
|
|
371
|
+
Run the Integration Protocol after all outcomes in a phase are individually verified. Do not run it after each outcome — it is designed for the seams between outcomes, and those seams only become visible when all the pieces exist.
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
### Handshake test
|
|
376
|
+
|
|
377
|
+
For every pair of outcomes where one exposes a contract and the other consumes it, run a handshake test:
|
|
378
|
+
|
|
379
|
+
```
|
|
380
|
+
Handshake test: Outcome [A] → Outcome [B]
|
|
381
|
+
|
|
382
|
+
Contract: [name the contract being passed]
|
|
383
|
+
|
|
384
|
+
Test:
|
|
385
|
+
1. Perform the action in Outcome A that produces the contract data.
|
|
386
|
+
2. Navigate to Outcome B.
|
|
387
|
+
3. Confirm the data produced in Outcome A is visible and correct in Outcome B.
|
|
388
|
+
|
|
389
|
+
Expected: [describe in domain language what should appear]
|
|
390
|
+
Actual: [what appeared]
|
|
391
|
+
Result: Pass / Fail
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
### Data flow trace
|
|
397
|
+
|
|
398
|
+
Pick your most important domain entity (the thing your system revolves around: the application, the booking, the order, the assessment). Follow it through every outcome that touches it:
|
|
399
|
+
|
|
400
|
+
```
|
|
401
|
+
Trace the [ENTITY] through all outcomes in Phase [N]:
|
|
402
|
+
|
|
403
|
+
For each outcome that touches this entity:
|
|
404
|
+
1. How does the entity enter this outcome?
|
|
405
|
+
2. What changes to it?
|
|
406
|
+
3. How does it leave this outcome?
|
|
407
|
+
4. Is the data consistent at every stage?
|
|
408
|
+
|
|
409
|
+
Report any inconsistency.
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
### Cross-persona check
|
|
415
|
+
|
|
416
|
+
If your phase involves more than one persona, verify that each persona sees what they should see and cannot see what they should not:
|
|
417
|
+
|
|
418
|
+
```
|
|
419
|
+
Cross-persona check for Phase [N]:
|
|
420
|
+
|
|
421
|
+
For each persona:
|
|
422
|
+
1. Log in as this persona (or simulate their session).
|
|
423
|
+
2. Confirm they can see everything the plan specifies they should see.
|
|
424
|
+
3. Confirm they cannot see data belonging to other personas.
|
|
425
|
+
4. Confirm they cannot perform actions reserved for other personas.
|
|
426
|
+
|
|
427
|
+
Report as: Persona | Can see [X] | Cannot see [Y] | Pass/Fail
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
### Fix failures and re-run
|
|
433
|
+
|
|
434
|
+
Describe any integration failures in domain language (same rule as outcome failures). Ask Claude Code to fix them. Then re-run the handshake tests for every outcome affected by the fix — not just the test that failed.
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
### Phase commit
|
|
439
|
+
|
|
440
|
+
```
|
|
441
|
+
Commit Phase [N] completion. Message format:
|
|
442
|
+
"Phase [N] [name] — integrated and verified"
|
|
443
|
+
|
|
444
|
+
This commit should contain only the integration fixes, not the individual outcome builds (those were committed separately).
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
Save phase state to Ruflo:
|
|
448
|
+
```
|
|
449
|
+
mcp__ruflo__memory_store with key 'odd-phase-[N]-complete'
|
|
450
|
+
Include: all outcomes completed, contracts exposed by this phase, integration test results.
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
## Common Build Problems
|
|
456
|
+
|
|
457
|
+
### "The AI built the wrong thing"
|
|
458
|
+
|
|
459
|
+
This happens when the brief was too short or used generic language. Do not say "it built the wrong thing" to Claude Code — this tells it nothing useful.
|
|
460
|
+
|
|
461
|
+
Instead, describe what you expected and what appeared:
|
|
462
|
+
|
|
463
|
+
```
|
|
464
|
+
This is not the correct build. Here is what I expected:
|
|
465
|
+
|
|
466
|
+
Persona: [name]
|
|
467
|
+
Action: [what they do]
|
|
468
|
+
Expected result: [what should appear, step by step]
|
|
469
|
+
|
|
470
|
+
What appeared instead:
|
|
471
|
+
[Describe what you see on screen or in the code]
|
|
472
|
+
|
|
473
|
+
Please read the outcome document again in full, then rebuild to match it exactly.
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
### "The build broke something that was working"
|
|
479
|
+
|
|
480
|
+
Before asking Claude Code to fix the new breakage, understand what changed:
|
|
481
|
+
|
|
482
|
+
```
|
|
483
|
+
Something that was working is now broken. Before making any changes:
|
|
484
|
+
|
|
485
|
+
1. Run git log --oneline -10 to show recent commits.
|
|
486
|
+
2. Run git diff HEAD~1 to show what changed in the last commit.
|
|
487
|
+
3. Tell me in plain language what files changed and what the changes were.
|
|
488
|
+
|
|
489
|
+
I will then describe what is now broken, and we will trace the cause.
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
Only after you understand what changed should you attempt a fix. Fixing without understanding the cause usually breaks something else.
|
|
493
|
+
|
|
494
|
+
---
|
|
495
|
+
|
|
496
|
+
### "The AI keeps making the same mistake"
|
|
497
|
+
|
|
498
|
+
If Claude Code makes the same mistake twice, the solution is a rule in CLAUDE.md, not repeated correction.
|
|
499
|
+
|
|
500
|
+
Ask:
|
|
501
|
+
```
|
|
502
|
+
You have now made this mistake twice: [describe the mistake in domain language].
|
|
503
|
+
|
|
504
|
+
Write a clear rule for CLAUDE.md that prevents this from happening again.
|
|
505
|
+
The rule should describe the correct approach, not just forbid the wrong one.
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
Then add the rule to CLAUDE.md. Claude Code reads this file at the start of every session.
|
|
509
|
+
|
|
510
|
+
---
|
|
511
|
+
|
|
512
|
+
### "Two outcomes were built at the same time and they do not connect"
|
|
513
|
+
|
|
514
|
+
This is the "two architects, one door" problem. It happens when parallel agents build overlapping things without agreeing on the shared interface first.
|
|
515
|
+
|
|
516
|
+
The fix is always the same: define the shared contract explicitly, then have both sides conform to it.
|
|
517
|
+
|
|
518
|
+
```
|
|
519
|
+
Two outcomes do not connect at [the seam point — e.g. the student record].
|
|
520
|
+
|
|
521
|
+
Please:
|
|
522
|
+
1. Show me exactly how Outcome A produces this data (the shape of what it writes or returns).
|
|
523
|
+
2. Show me exactly how Outcome B expects to receive this data (the shape it reads).
|
|
524
|
+
3. Identify the difference.
|
|
525
|
+
4. Write a shared contract definition that both can conform to.
|
|
526
|
+
5. Update both outcomes to use this shared contract.
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
Save the fixed contract to Ruflo so future agents can read it:
|
|
530
|
+
```
|
|
531
|
+
mcp__ruflo__memory_store with key 'odd-contract-[contract-name]'
|
|
532
|
+
```
|