odd-studio 3.7.5 → 3.7.7

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.
Files changed (36) hide show
  1. package/README.md +0 -3
  2. package/bin/commands/init.js +3 -41
  3. package/bin/commands/status.js +0 -3
  4. package/bin/odd-studio.js +1 -1
  5. package/codex-plugin/.codex-plugin/plugin.json +1 -1
  6. package/codex-plugin/hooks.json +25 -7
  7. package/hooks/odd-studio.sh +0 -31
  8. package/package.json +1 -2
  9. package/plugins/plugin-gates.js +104 -79
  10. package/scripts/command-definitions.js +7 -47
  11. package/scripts/hook-definitions.js +137 -0
  12. package/scripts/install-codex-commands.js +11 -3
  13. package/scripts/install-commands.js +13 -9
  14. package/scripts/setup-codex-plugin.js +7 -0
  15. package/scripts/setup-hooks.js +6 -130
  16. package/scripts/state-schema.js +2 -4
  17. package/skill/SKILL.md +50 -675
  18. package/skill/docs/build/build-protocol.md +1 -5
  19. package/skill/docs/build/confirm-protocol.md +41 -0
  20. package/skill/docs/build/export-protocol.md +45 -0
  21. package/skill/docs/chapters/chapter-10.md +2 -2
  22. package/skill/docs/chapters/chapter-11.md +3 -5
  23. package/skill/docs/chapters/chapter-12.md +2 -2
  24. package/skill/docs/chapters/chapter-14.md +8 -12
  25. package/skill/docs/runtime/build-entry.md +64 -0
  26. package/skill/docs/runtime/shared-commands.md +65 -0
  27. package/skill/docs/runtime/status-protocol.md +11 -0
  28. package/skill/docs/startup/startup-protocol.md +90 -0
  29. package/skill/odd-build/SKILL.md +6 -4
  30. package/skill/odd-debug/SKILL.md +3 -5
  31. package/skill/odd-deploy/SKILL.md +8 -3
  32. package/skill/odd-plan/SKILL.md +10 -3
  33. package/skill/odd-status/SKILL.md +3 -3
  34. package/skill/odd-swarm/SKILL.md +5 -4
  35. package/templates/.odd/state.json +1 -3
  36. package/templates/AGENTS.md +52 -190
@@ -126,11 +126,7 @@ Collect all failures from the verification run and send them in a single message
126
126
 
127
127
  When all steps pass on a single complete run, type `confirm`.
128
128
 
129
- ODD Studio runs Checkpoint a security scan of everything built in this outcome. The domain expert does not trigger this, read the results, or action any findings. It happens automatically.
130
-
131
- If Checkpoint finds no issues, ODD Studio commits the verified state, updates odd-flow memory, and presents the next outcome.
132
-
133
- If Checkpoint finds security issues, ODD Studio briefs the build agent with the findings and triggers a fix. The domain expert waits. Once the fix is complete, Checkpoint runs again. When it is clear, the outcome is committed and the next outcome is presented.
129
+ ODD Studio commits the verified state, updates odd-flow memory, and presents the next outcome.
134
130
 
135
131
  The domain expert did not write a commit message, update a status file, identify security issues, or decide what comes next. The tool handled all of that.
136
132
 
@@ -0,0 +1,41 @@
1
+ # Confirm Protocol
2
+
3
+ The domain expert types `confirm` when all verification steps for the current outcome have passed on a single complete run.
4
+
5
+ ## Verification gate
6
+
7
+ Before `confirm` can execute:
8
+
9
+ 1. Every numbered verification step from the session brief must have been presented in order
10
+ 2. Each step must have been tested
11
+ 3. The domain expert must have confirmed each step passes
12
+ 4. `verificationConfirmed` must be `true` in `.odd/state.json`
13
+
14
+ This is enforced by the verify gate. `verificationConfirmed` must be reset to `false` at the start of each new outcome's verification.
15
+
16
+ ## What verification looks like
17
+
18
+ - Present each verification step in order
19
+ - For browser-testable steps, use Playwright to check the UI
20
+ - For multi-user steps, note them as deferred only with explicit agreement
21
+ - For absence checks, verify the UI does not contain the element
22
+ - Report each step as PASS / FAIL / DEFERRED
23
+
24
+ ## Execute in order
25
+
26
+ 1. Commit the verified state via git with message: `feat: verified [outcome name] — [phase]`
27
+ 2. Call `mcp__odd-flow__memory_store` key `odd-outcome-[name]` with status `verified`, namespace `odd-project`
28
+ 3. Update `.odd/state.json`: mark outcome as verified and set `nextStep`
29
+ 4. Call `mcp__odd-flow__memory_store` key `odd-project-state`, namespace `odd-project`, value set to the full updated `.odd/state.json`
30
+
31
+ Then display:
32
+
33
+ ---
34
+
35
+ **[Outcome name] — verified and committed.**
36
+
37
+ **Next:** [next outcome name and one-sentence description]
38
+
39
+ Type `*build` to begin, or `*status` to see the full phase progress.
40
+
41
+ ---
@@ -0,0 +1,45 @@
1
+ # Export Protocol
2
+
3
+ Generate the IDE Session Brief. This is a standalone document that a developer or AI coding agent can use to execute a build session without needing to ask planning questions.
4
+
5
+ 1. Read `sessionBriefCount` from `.odd/state.json` (default 0 if not set).
6
+ 2. Read `docs/plan.md` to identify which phase has outcomes not yet briefed.
7
+ 3. Load all outcome files from `docs/outcomes/` for that phase.
8
+ 4. Generate `docs/session-brief-[N].md` following the Session Brief structure in `docs/planning/build-planner.md` Step 10.
9
+
10
+ The brief must include:
11
+
12
+ 1. Overview
13
+ 2. Active Personas This Phase
14
+ 3. Outcomes In Scope, with the complete six-field specification for each outcome
15
+ 4. Available From Previous Phases
16
+ 5. New Tables Required This Phase
17
+ 6. Build Sequence
18
+ 7. Known Failure Paths
19
+ 8. Not In Scope
20
+ 9. Infrastructure Notes
21
+ 10. Design System Reminder
22
+ 11. Changes From Original Plan
23
+
24
+ Validation gate before presenting the brief:
25
+
26
+ - Every outcome has its full walkthrough
27
+ - Every outcome has its complete verification checklist
28
+ - Every outcome has its contracts listed with field names
29
+ - The brief is at least 200 lines long
30
+
31
+ If the brief fails validation, regenerate it.
32
+
33
+ Present the brief to the domain expert and wait for confirmation. If they request changes, update it and re-present.
34
+
35
+ Once confirmed:
36
+
37
+ - increment `sessionBriefCount`
38
+ - update `currentBuildPhase`
39
+ - update `currentPhase` to `build`
40
+ - set `briefConfirmed: true`
41
+ - store the brief in odd-flow memory with key `odd-session-brief-[N]`, namespace `odd-project`
42
+
43
+ Then display:
44
+
45
+ `Session Brief [N] confirmed and written to docs/session-brief-[N].md. Build gate unlocked. The build can now begin.`
@@ -8,7 +8,7 @@ The Build Protocol is the repeating rhythm of every session. It is deliberately
8
8
 
9
9
  - **The tool handles the mechanics. You handle the judgment.** ODD Studio loads context from odd-flow, reads the contract map, identifies the next outcome to build, briefs the AI, waits for the result, and presents you with a verification checklist. Your job is to follow that checklist as the persona and judge whether the result is correct.
10
10
 
11
- - **The session rhythm is: /odd, *build, verify, confirm. If verification fails: *debug, then verify again.** `/odd` loads the skill and restores project state from odd-flow. `*build` starts the next outcome. You verify the result against the checklist. If it fails, `*debug` classifies the failure and keeps the fix inside the active outcome. `confirm` runs Checkpoint (a security scan of what was just built), commits the verified outcome, and advances to the next one. That is it.
11
+ - **The session rhythm is: /odd, *build, verify, confirm. If verification fails: *debug, then verify again.** `/odd` loads the skill and restores project state from odd-flow. `*build` starts the next outcome. You verify the result against the checklist. If it fails, `*debug` classifies the failure and keeps the fix inside the active outcome. `confirm` commits the verified outcome and advances to the next one. That is it.
12
12
 
13
13
  - **Re-briefing is automatic.** You do not need to remind the AI what your project is, what has been built, or what comes next. odd-flow stores all of this. ODD Studio reads it at the start of every session. If you find yourself explaining context, something is wrong with the state — not with the process.
14
14
 
@@ -22,7 +22,7 @@ The Build Protocol is the repeating rhythm of every session. It is deliberately
22
22
 
23
23
  - Building without verifying. Typing `confirm` without following the verification checklist is the fastest way to accumulate hidden defects. Every unverified outcome is a risk to every outcome that depends on it.
24
24
 
25
- - Worrying about security implementation. Checkpoint runs automatically before verification is completed and before commit. It scans for exposed secrets, missing authentication checks, insecure session shortcuts, and dangerous rendering or transport shortcuts in what was just built. If it finds something, the build returns to controlled debugging instead of drifting into ad hoc fixes.
25
+ - Worrying about security implementation before the domain behaviour is even verified. Keep security requirements in the outcomes and treat code-level warnings as implementation hygiene, not as a separate parallel workflow.
26
26
 
27
27
  - Batching multiple outcomes into one build. Each outcome has its own verification checklist for a reason. Mixing them makes it impossible to know which outcome caused a failure.
28
28
 
@@ -10,15 +10,13 @@ Automated tests confirm the code does what it was told. Verification confirms it
10
10
 
11
11
  - **Verification is done as the persona.** You are not checking as yourself — you are checking as the persona in their situation. If the persona is on a phone with limited time, verify on a phone. If the persona is a first-time user, approach the interface as if you have never seen it.
12
12
 
13
- ## What You Verify vs. What Checkpoint Verifies
13
+ ## What You Verify
14
14
 
15
- There are two kinds of correctness in a verified outcome. You are responsible for one. Checkpoint handles the other.
15
+ There are two broad kinds of correctness in a verified outcome: domain correctness and implementation hygiene. Your job is the first one.
16
16
 
17
17
  **You verify domain correctness.** Does this outcome do what the persona needs it to do? Does the email contain the right information? Does the booking flow make sense to a first-time user? Does the error message explain what went wrong in plain language? Only you can answer these questions. No tool can.
18
18
 
19
- **Checkpoint verifies security correctness.** Did the build introduce an exposed credential? Is there a path that bypasses authentication? Could an input be used to extract data it should not be able to reach? Checkpoint scans for these automatically every time you type `confirm`. You do not need to think about them. They are not part of your verification checklist.
20
-
21
- This division of labour is deliberate. You are good at judging whether something is right for your users. You are not expected to know what an injection vulnerability looks like in code. Checkpoint is good at finding those. Neither replaces the other.
19
+ Implementation hygiene still matters, but it is handled through code review, tests, and security baseline warnings during the build. It does not replace verification, and verification does not replace it.
22
20
 
23
21
  ## Three Rules of Verification
24
22
 
@@ -16,13 +16,13 @@ No new principles here. Everything has been introduced in earlier chapters. This
16
16
 
17
17
  **Step 5: Failure handling.** When you describe a failure, ODD Studio handles the fix. It re-reads the specification, makes the correction, and presents the checklist again. You verify again from the beginning — a partial re-verification does not count.
18
18
 
19
- **Step 6: confirm.** When every step passes, you type `confirm`. Before committing, ODD Studio runs Checkpoint — a security scan of what was just built. If Checkpoint finds anything, the build agent fixes it quietly and Checkpoint runs again. You see "Checkpoint clear" when it passes. ODD Studio then commits the verified outcome to git, updates odd-flow with the new project state, and advances the plan to the next outcome. The cycle is complete.
19
+ **Step 6: confirm.** When every step passes, you type `confirm`. ODD Studio commits the verified outcome to git, updates odd-flow with the new project state, and advances the plan to the next outcome. The cycle is complete.
20
20
 
21
21
  ## What You Do vs. What the Tool Does
22
22
 
23
23
  **You do:** verify the result as the persona. Describe failures in domain language. Confirm when satisfied.
24
24
 
25
- **The tool does:** load context, brief the AI, run the build, present the checklist, handle fixes, run Checkpoint, brief the build agent on any security findings, commit, update state.
25
+ **The tool does:** load context, brief the AI, run the build, present the checklist, handle fixes, commit, update state.
26
26
 
27
27
  ## Red Flags
28
28
 
@@ -22,17 +22,13 @@ The feeling that security is "too technical" is understandable but incorrect. Se
22
22
 
23
23
  - Security treated as a separate phase. Security outcomes are not an add-on. They belong in the same phase as the outcomes they constrain. The "view grades" permission outcome and the "block unauthorised grade access" prohibition outcome should be built and verified together.
24
24
 
25
- ## Checkpoint: The Security Layer You Do Not Have to Think About
25
+ ## Implementation Hygiene
26
26
 
27
27
  Domain security — who can see what, who can do what — is your responsibility. You specify it as outcomes and verify it as the persona.
28
28
 
29
- Implementation security is a different category. It covers things like: a credential accidentally left in the code by the AI, a route that can be reached without authentication because the AI made a wrong assumption, an input field that accepts data it should reject. These are not failures of specification. They are failures of implementation that you would have no way to spot by reading code or clicking through a verification checklist.
29
+ Implementation hygiene is a different category. It covers things like exposed secrets, missing authentication checks, unsafe inputs, or insecure shortcuts. These are not failures of specification. They are implementation mistakes that need disciplined review during the build.
30
30
 
31
- This is what Checkpoint handles. Every time you type `confirm`, Checkpoint scans what was just built. It looks for exposed secrets, missing authentication checks, unsafe inputs, and known vulnerability patterns. If it finds something, it briefs the build agent with specific fix instructions in plain language. The fix happens, Checkpoint scans again, and the cycle repeats until it is clean. You see one message: "Checkpoint clear." Then the outcome is committed.
32
-
33
- You do not need to understand what Checkpoint found. You do not need to review the fix. That is not your job. Your job is the domain. Checkpoint's job is the implementation layer.
34
-
35
- The result is that every committed outcome in your project has been verified twice: once by you for domain correctness, and once by Checkpoint for implementation security. Neither check replaces the other, and neither is optional.
31
+ ODD Studio keeps those concerns visible through security baseline warnings, tests, and explicit debugging when something looks wrong. Your job is still the domain. The build workflow's job is to keep implementation quality visible without replacing verification.
36
32
 
37
33
  ## Two Types of Security Work
38
34
 
@@ -44,18 +40,18 @@ To be precise about the division:
44
40
  - Verify that direct URL access is blocked, not just hidden
45
41
  - Ensure data deletion outcomes exist wherever data is collected
46
42
 
47
- **Checkpoint's security work** (done automatically at `confirm`):
43
+ **Implementation hygiene work** (done during build and review):
48
44
  - Detect exposed credentials and secrets in code
49
45
  - Detect missing or bypassed authentication checks
50
- - Detect injection vulnerabilities and unsafe inputs
51
- - Detect known vulnerability patterns from security databases
46
+ - Detect unsafe rendering, storage, and transport shortcuts
47
+ - Fix anything suspicious before the outcome is treated as complete
52
48
 
53
- Do both. Neither is enough alone.
49
+ Do both. Neither domain verification nor implementation hygiene is enough alone.
54
50
 
55
51
  ## What This Means for You
56
52
 
57
53
  For every outcome that involves access to data or actions restricted to certain personas, write the corresponding prohibition outcome. Then verify both: check that the right persona can do the thing, and check that the wrong persona cannot.
58
54
 
59
- You already know who should see what in your system. Write it down in outcome format. Checkpoint will handle the rest of the security picture automatically.
55
+ You already know who should see what in your system. Write it down in outcome format. Then verify the boundary and keep the implementation disciplined during the build.
60
56
 
61
57
  Next: Chapter 15 shows that interface quality is a specification problem — and gives you five principles to specify it.
@@ -0,0 +1,64 @@
1
+ # Build Entry Protocol
2
+
3
+ When `*build` is called, execute these checks in order before beginning:
4
+
5
+ 1. Check that `planApproved` is true in `.odd/state.json`. If not, explain that the plan must be approved before building, and offer `*plan` to complete it.
6
+ 2. Check that `techStackDecided` is true. If not, explain that the technical architecture decision must be made first, and route to `*phase-plan` to complete it with Rachel.
7
+ 3. Check that `designApproachDecided` is true. If not, explain that the design approach must be decided before building, and route to `*design` to complete it with Rachel.
8
+ 4. Check that `servicesConfigured` is true. If not, run the Project Setup Protocol below before proceeding.
9
+ 5. **Model check (advisory only).** If running on Opus, display: "**Model advisory:** The build phase runs well on Sonnet — faster and cheaper. Switch with `/model` if you prefer." Do not block or repeat if already shown this session.
10
+ 6. **Phase Brief check — HARD GATE.** Read `sessionBriefCount` from `.odd/state.json` (default 0 if not set). Check whether `docs/session-brief-[sessionBriefCount].md` exists.
11
+
12
+ If the brief does NOT exist:
13
+ - Run `*export` now to generate it
14
+ - Wait for the brief to be fully written to disk
15
+ - Present it to the domain expert for review
16
+ - Wait for explicit confirmation
17
+ - Only after confirmation: set `briefConfirmed: true` in `.odd/state.json`
18
+ - Do NOT proceed until `briefConfirmed` is true
19
+ - Do NOT spawn build agents, write code, create files, or modify the codebase in any way
20
+
21
+ If the brief exists but `briefConfirmed` is not true in state:
22
+ - Present it to the domain expert
23
+ - Wait for confirmation
24
+ - Set `briefConfirmed: true` in `.odd/state.json`
25
+
26
+ 7. **Initialise the odd-flow swarm — mandatory first action.**
27
+
28
+ The swarm must be initialised before loading source files or planning build work. Execute the Swarm Initialisation section below in full, then proceed.
29
+
30
+ 8. Load `docs/build/build-protocol.md` and `docs/build/code-excellence.md` from this ODD skill tree.
31
+ 9. Confirm to the user which phase is being worked on and which outcomes are in scope.
32
+ 10. Begin the Build Protocol for the current phase.
33
+
34
+ ## Project Setup Protocol
35
+
36
+ Run when `servicesConfigured` is false.
37
+
38
+ 1. **Scaffold.** If `package.json` exists, skip to step 2. If not: scaffold into a sibling directory, then rsync across excluding `.git`, `docs/`, and `node_modules/`. Fix `package.json name` after rsync.
39
+ 2. **Install deps.** Read `testingFramework` from `.odd/state.json` (default `Vitest`). Install the chosen testing stack plus production deps.
40
+ 3. **Scaffold test harness.** Create the correct config for the chosen testing stack. For Vitest, create `vitest.config.ts`, `tests/setup.ts`, `tests/setup.test.ts`, and the `test` / `test:watch` scripts.
41
+ 4. **Generate `.env.local`.** Write placeholders with comments explaining where each real value comes from.
42
+ 5. **Wait.** Display the credential list and wait for the user to confirm they have filled everything in.
43
+ 6. **Verify.** Kill port 3000 if needed, run `npm run dev`, and translate any setup failures into plain language. Repeat until the server starts cleanly.
44
+ 7. **Mark done.** Set `servicesConfigured: true` in `.odd/state.json` and confirm the development server is running.
45
+
46
+ ## Swarm Initialisation
47
+
48
+ When `*swarm` or `*build` is called with an approved plan, execute this sequence:
49
+
50
+ 1. Store project state with `mcp__odd-flow__memory_store` key `odd-project-state`, namespace `odd-project`.
51
+ 2. Store shared contracts with `mcp__odd-flow__memory_store` key `odd-contract-map`, namespace `odd-project`.
52
+ 3. Create the phase task with `mcp__odd-flow__task_create`.
53
+ 4. Spawn the coordinator agent with `mcp__odd-flow__agent_spawn`.
54
+ 5. Spawn the backend agent with `mcp__odd-flow__agent_spawn`.
55
+ 6. Spawn the UI agent with `mcp__odd-flow__agent_spawn`.
56
+ 7. Spawn the QA agent with `mcp__odd-flow__agent_spawn`.
57
+ 8. Finalise with `mcp__odd-flow__coordination_sync`.
58
+
59
+ When `coordination_sync` succeeds in build phase, the hook activates:
60
+ - `.odd/.odd-flow-swarm-active`
61
+ - `.odd/.odd-flow-agents-ready`
62
+ - `.odd/.odd-flow-phase-synced`
63
+
64
+ Do not manually touch these markers.
@@ -0,0 +1,65 @@
1
+ # Shared Commands
2
+
3
+ ## `*persona`
4
+
5
+ Jump directly to persona work regardless of current state. Load `docs/planning/persona-architect.md` and activate Diana.
6
+
7
+ ## `*outcome`
8
+
9
+ Jump directly to outcome writing. Check that at least one approved persona exists first. Then load `docs/planning/outcome-writer.md` and activate Marcus.
10
+
11
+ ## `*contracts`
12
+
13
+ Jump directly to contract mapping. Check that at least one approved outcome exists. Then load `docs/planning/systems-mapper.md` and activate Theo.
14
+
15
+ ## `*phase-plan`
16
+
17
+ Jump directly to implementation planning. Check that contracts have been mapped. Then load `docs/planning/build-planner.md` and activate Rachel.
18
+
19
+ ## `*ui`
20
+
21
+ Load the UI excellence briefing from `docs/ui/design-system.md`.
22
+
23
+ ## `*agent`
24
+
25
+ Create a custom agent for a domain-specific concern. Collect the concern in plain language, then call `mcp__odd-flow__agent_spawn` with the custom role and instructions.
26
+
27
+ ## `*chapter [n]`
28
+
29
+ Load the requested chapter from `docs/chapters/`.
30
+
31
+ ## `*why`
32
+
33
+ Explain why the current step matters in 3 to 5 paragraphs using the current state from `.odd/state.json`.
34
+
35
+ ## `*help`
36
+
37
+ Show the ODD command list and vocabulary reminder.
38
+
39
+ ## `*kb`
40
+
41
+ Load `docs/kb/odd-kb.md` into context and confirm it is available.
42
+
43
+ ## `*reset`
44
+
45
+ Ask for confirmation before clearing state. If confirmed, clear `.odd/state.json`, overwrite odd-flow state with an empty project state, and tell the user to type `*plan` to start again.
46
+
47
+ ## Planning sequence
48
+
49
+ Enforce this sequence:
50
+
51
+ 1. Personas
52
+ 2. Outcomes
53
+ 3. Contracts
54
+ 4. Plan
55
+ 5. Stack + Design + Architecture docs
56
+ 6. Services
57
+ 7. Phase brief
58
+
59
+ ## Educational coaching
60
+
61
+ At key persona, outcome, contract, and phase milestones, briefly explain why the current step matters. Do not deliver coaching unprompted during the build phase.
62
+
63
+ ## Vocabulary enforcement
64
+
65
+ If the user uses banned vocabulary, gently correct it once and move on.
@@ -0,0 +1,11 @@
1
+ # Status Protocol
2
+
3
+ Display the full current project state. Pull from both `.odd/state.json` and odd-flow memory (`mcp__odd-flow__memory_retrieve` key `odd-project-state`). Show:
4
+
5
+ - Project name and description
6
+ - All personas (name, role, acid-test status)
7
+ - All outcomes (name, phase assignment, build status: not started / in progress / verified)
8
+ - Contract map summary (how many contracts exposed, how many consumed, any orphans)
9
+ - Master Implementation Plan summary (phases, outcomes per phase)
10
+ - Current build position (phase, outcome, last verified outcome)
11
+ - odd-flow swarm status if a swarm is active
@@ -0,0 +1,90 @@
1
+ # Startup Protocol
2
+
3
+ Before doing anything else, run this state check silently:
4
+
5
+ 1. Check whether `.odd/state.json` exists in the current working directory.
6
+ 2. Check whether `docs/plan.md` exists.
7
+ 3. Attempt to retrieve project state from odd-flow memory:
8
+ - Call `mcp__odd-flow__memory_retrieve` with key `odd-project-state`, namespace `odd-project`
9
+ 4. **Reconciliation — strict, no silent merging.** If both local and odd-flow state exist, compare them field-by-field. Specifically check `currentBuildPhase`, `currentPhase`, `briefConfirmed`, `sessionBriefCount`, `personas.length`, and `outcomes.length`. If ANY of these disagree:
10
+ - **STOP.** Do not display the welcome or status message yet.
11
+ - Show the user a side-by-side diff of the disagreeing fields (local value vs odd-flow value).
12
+ - Ask explicitly: "Local state and odd-flow state have drifted. Which should I trust as authoritative? Type `local`, `odd-flow`, or `inspect` to see the full diff."
13
+ - On `local`: store the full local `state.json` to odd-flow with `mcp__odd-flow__memory_store` and proceed.
14
+ - On `odd-flow`: write the odd-flow value to `.odd/state.json` and proceed.
15
+ - On `inspect`: print the full diff and ask again.
16
+ - Do NOT use heuristics like "richer wins" or "later phase wins" — they hide bugs. The user decides.
17
+ 5. If local exists and odd-flow does not: store local to odd-flow immediately. If odd-flow exists and local does not: write odd-flow to local immediately.
18
+
19
+ If this is a new project, display this welcome message:
20
+
21
+ ---
22
+
23
+ Welcome to ODD Studio v3.7.7.
24
+
25
+ You are about to plan and build something real — using a methodology called Outcome-Driven Development. Before we write a single line of code, we are going to get precise about three things:
26
+
27
+ **Who you are building for.** Not "users" — specific people, with specific situations, specific frustrations, and specific definitions of success. We call these Personas.
28
+
29
+ **What those people need to be able to do.** Not features, not screens — Outcomes. Each outcome is a complete piece of behaviour: what triggers it, what happens step by step, what success looks like, and what can go wrong.
30
+
31
+ **How the outcomes connect to each other.** Every outcome produces something and consumes something. We map these Contracts before we build, so the AI agents never make conflicting assumptions.
32
+
33
+ Once your personas, outcomes, and contracts are documented, we generate a Master Implementation Plan: a phased, sequenced build order that respects every dependency. Then we start building.
34
+
35
+ This process takes longer than just asking Claude to "build a platform". It is also the reason projects built this way actually work — and why projects that skip it usually get rebuilt from scratch.
36
+
37
+ Ready? Type `*plan` to begin, or `*help` to see all available commands.
38
+
39
+ ---
40
+
41
+ If this is a returning project, display this status message with real values from `.odd/state.json`:
42
+
43
+ ---
44
+
45
+ Welcome back to ODD Studio v3.7.7.
46
+
47
+ **Project:** [project.name]
48
+ **Current Phase:** [state.currentPhase]
49
+ **Last Session:** [state.lastSessionDate]
50
+
51
+ **Progress:**
52
+ - Personas: [personas.length] documented ([personas.approved] approved)
53
+ - Outcomes: [outcomes.length] written ([outcomes.approved] approved)
54
+ - Contracts: [contractsMapped ? "Mapped" : "Not yet mapped"]
55
+ - Master Plan: [planApproved ? "Approved" : "Not yet created"]
56
+ - Technical Stack: [techStackDecided ? techStack : "Not yet decided"]
57
+ - Design Approach: [designApproachDecided ? designApproach : "Not yet decided"]
58
+
59
+ **What's next:** [state.nextStep]
60
+
61
+ Type `*plan` to continue planning, `*build` to enter build mode, `*debug` to investigate a failing outcome without leaving the ODD flow, or `*status` for full detail.
62
+
63
+ ---
64
+
65
+ ## Mandatory odd-flow checkpoints
66
+
67
+ These are non-negotiable tool executions. You MUST call these odd-flow tools — not describe them, not summarise them. Actually invoke the tool at each gate.
68
+
69
+ | Gate | Tool call required | When |
70
+ |---|---|---|
71
+ | Persona approved | `mcp__odd-flow__memory_store` key `odd-persona-[name]` namespace `odd-project` | Immediately after Diana marks a persona approved |
72
+ | Outcome approved | `mcp__odd-flow__memory_store` key `odd-outcome-[name]` namespace `odd-project` | Immediately after Marcus marks an outcome approved |
73
+ | Contract map complete | `mcp__odd-flow__memory_store` key `odd-contract-map` namespace `odd-project` | Immediately after Theo completes the contract map |
74
+ | Plan approved | `mcp__odd-flow__memory_store` key `odd-plan` namespace `odd-project` | Immediately after Rachel's plan is approved |
75
+ | Design approach decided | `mcp__odd-flow__memory_store` key `odd-design-approach` namespace `odd-project` | Immediately after Rachel's design conversation completes |
76
+ | Phase brief confirmed | `mcp__odd-flow__memory_store` key `odd-session-brief-[N]` namespace `odd-project` | After domain expert confirms the phase brief, before building starts |
77
+ | State update (all stages) | Write updated `.odd/state.json` | After every persona, outcome, or plan approval |
78
+ | Session start | `mcp__odd-flow__memory_retrieve` key `odd-project-state` namespace `odd-project` | Before displaying any welcome or status message |
79
+ | Build work complete | `mcp__odd-flow__memory_store` key `odd-project-state` namespace `odd-project` | After any build, fix, or debugging work completes |
80
+ | Session end | `mcp__odd-flow__memory_store` key `odd-project-state` namespace `odd-project` | Before ending any session |
81
+
82
+ ## Session end protocol
83
+
84
+ Before any session ends — whether the user says goodbye, the context is running low, or the conversation is closing — you MUST:
85
+
86
+ 1. Read the current `.odd/state.json`
87
+ 2. Call `mcp__odd-flow__memory_store` with key `odd-project-state`, namespace `odd-project`, value set to the full contents of `.odd/state.json`
88
+ 3. Confirm to the user: "Session state saved to odd-flow."
89
+
90
+ If odd-flow is not available, continue without it and tell the user that cross-session memory will not persist this session.
@@ -41,8 +41,10 @@ retrieval:
41
41
 
42
42
  You are executing the ODD Studio `*build` command.
43
43
 
44
- Read these two files now:
45
- 1. `.claude/skills/odd/SKILL.md` — the full ODD Studio coach and build protocol
46
- 2. `.claude/skills/odd/docs/build/build-protocol.md` — the Build Protocol detail
44
+ Execute this flow:
47
45
 
48
- Then execute the `*build` protocol exactly as documented in those files, starting from the state check.
46
+ 1. Read `.claude/skills/odd/docs/runtime/build-entry.md`.
47
+ 2. Execute the build-entry checks exactly as written.
48
+ 3. Then read `.claude/skills/odd/docs/build/build-protocol.md` and execute the build flow exactly as written.
49
+
50
+ Do not spawn build agents or write source code before the brief gate passes.
@@ -47,7 +47,7 @@ You are executing the ODD Studio `*debug` command.
47
47
 
48
48
  `*debug` activates a lightweight build session optimised for debugging, hotfixes, and security remediation work. It bypasses the full 9-step swarm init that `*build` requires — there is no agent dispatch, no task creation, no swarm spawn. The orchestrator writes code directly.
49
49
 
50
- This is not a shortcut around ODD. The brief-gate, verify-gate, commit-gate, and outcome verification protocol are all still enforced. What is relaxed is the agent-token requirement in `swarm-write` — the requirement that forces every source write through a background Task agent. That requirement exists to enable parallel multi-agent outcome builds. For a single targeted fix it is pure ceremony.
50
+ This is not a shortcut around ODD. The brief gate, verify gate, and outcome verification protocol are still enforced. What is relaxed is the agent-token requirement in `swarm-write` — the requirement that forces every source write through a background Task agent. That requirement exists to enable parallel multi-agent outcome builds. For a single targeted fix it is pure ceremony.
51
51
 
52
52
  **When to use `*debug` instead of `*build`:**
53
53
  - Fixing a failing test suite
@@ -99,8 +99,6 @@ Call `mcp__odd-flow__memory_store`:
99
99
  - Value: full contents of `.odd/state.json`
100
100
  - upsert: true
101
101
 
102
- This single store call satisfies the `commit-gate` requirement (via `store-validate` hook) for subsequent commits in this session.
103
-
104
102
  ### Step 5 — Confirm to user
105
103
 
106
104
  Display:
@@ -110,7 +108,7 @@ Display:
110
108
  Debug session active.
111
109
 
112
110
  Source writes are unlocked. No agent dispatch required.
113
- Brief gate, verify gate, and commit gate remain enforced.
111
+ Brief gate and verify gate remain enforced.
114
112
 
115
113
  State stored to odd-flow. Ready to investigate.
116
114
 
@@ -139,7 +137,7 @@ If more than one strategy seems plausible, do not fix anything yet. Gather one m
139
137
 
140
138
  ## Fix Protocol
141
139
 
142
- After choosing the strategy, load `docs/build/debug-protocol.md` for the detailed investigation procedure for that strategy.
140
+ After choosing the strategy, load `.claude/skills/odd/docs/build/debug-protocol.md` for the detailed investigation procedure for that strategy.
143
141
 
144
142
  When the fix is complete:
145
143
 
@@ -8,7 +8,12 @@ description: "ODD Studio deploy command. Verify all outcomes are confirmed, then
8
8
 
9
9
  You are executing the ODD Studio `*deploy` command.
10
10
 
11
- Read this file now:
12
- - `.claude/skills/odd/SKILL.md` — the full ODD Studio coach
11
+ Execute this flow:
13
12
 
14
- Then execute the `*deploy` protocol exactly as documented, starting from the state check.
13
+ 1. Read `.odd/state.json` and confirm:
14
+ - all outcomes in the current phase are verified
15
+ - the git working tree is clean
16
+ - the domain expert confirms they are ready to deploy
17
+ 2. If any outcome is unverified, display which ones remain and route to `*status`.
18
+ 3. If all outcomes are verified, run `vercel --prod`.
19
+ 4. After deployment, display the production URL, update deployment fields in `.odd/state.json`, and store the deployment record in odd-flow memory.
@@ -43,7 +43,14 @@ retrieval:
43
43
 
44
44
  You are executing the ODD Studio `*plan` command.
45
45
 
46
- Read this file now:
47
- - `.claude/skills/odd/SKILL.md` — the full ODD Studio coach and planning protocol
46
+ Execute this flow:
48
47
 
49
- Then execute the `*plan` protocol exactly as documented, starting from the state check.
48
+ 1. Read `.odd/state.json`.
49
+ 2. Route to the next incomplete planning stage:
50
+ - no personas: `.claude/skills/odd/docs/planning/persona-architect.md`
51
+ - personas exist, no outcomes: `.claude/skills/odd/docs/planning/outcome-writer.md`
52
+ - outcomes exist, contracts not mapped: `.claude/skills/odd/docs/planning/systems-mapper.md`
53
+ - contracts mapped, plan not approved: `.claude/skills/odd/docs/planning/build-planner.md`
54
+ - plan approved, architecture/design docs incomplete: `.claude/skills/odd/docs/planning/build-planner.md`
55
+ 3. Announce the stage and why it is next before loading the stage document.
56
+ 4. Follow the selected planning document exactly.
@@ -40,7 +40,7 @@ retrieval:
40
40
 
41
41
  You are executing the ODD Studio `*status` command.
42
42
 
43
- Read this file now:
44
- - `.claude/skills/odd/SKILL.md` — the full ODD Studio coach
43
+ Execute this flow:
45
44
 
46
- Then execute the `*status` protocol exactly as documented, starting from the state check.
45
+ 1. Read `.claude/skills/odd/docs/runtime/status-protocol.md`.
46
+ 2. Execute the status protocol exactly as written.
@@ -8,8 +8,9 @@ description: "ODD Studio swarm command. Build all independent outcomes in the cu
8
8
 
9
9
  You are executing the ODD Studio `*swarm` command.
10
10
 
11
- Read these two files now:
12
- 1. `.claude/skills/odd/SKILL.md` — the full ODD Studio coach and build protocol
13
- 2. `.claude/skills/odd/docs/build/build-protocol.md` — the Build Protocol detail
11
+ Execute this flow:
14
12
 
15
- Then execute the `*swarm` protocol exactly as documented in those files, starting from the state check.
13
+ 1. Read `.claude/skills/odd/docs/runtime/build-entry.md`.
14
+ 2. Execute the build-entry checks and swarm initialisation exactly as written.
15
+ 3. Then read `.claude/skills/odd/docs/build/build-protocol.md`.
16
+ 4. Execute the swarm build path for independent outcomes in the current phase.
@@ -20,6 +20,7 @@
20
20
  "sessionBriefCount": 0,
21
21
  "briefConfirmed": false,
22
22
  "verificationConfirmed": false,
23
+ "debugSession": false,
23
24
  "swarmActive": false,
24
25
  "buildPhase": null,
25
26
  "currentBuildPhase": null,
@@ -28,9 +29,6 @@
28
29
  "debugTarget": null,
29
30
  "debugSummary": null,
30
31
  "debugStartedAt": null,
31
- "checkpointStatus": "unknown",
32
- "lastCheckpointAt": null,
33
- "checkpointFindings": 0,
34
32
  "securityBaselineVersion": "2026-04-12",
35
33
  "notes": ""
36
34
  }