odd-studio 3.3.8 → 3.4.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/bin/odd-studio.js +1 -1
- package/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/hooks/odd-studio.sh +58 -4
- package/package.json +1 -1
- package/scripts/setup-hooks.js +14 -0
- package/skill/SKILL.md +3 -3
package/bin/odd-studio.js
CHANGED
|
@@ -15,7 +15,7 @@ import { registerUninstall } from './commands/uninstall.js';
|
|
|
15
15
|
const __filename = fileURLToPath(import.meta.url);
|
|
16
16
|
const __dirname = path.dirname(__filename);
|
|
17
17
|
const require = createRequire(import.meta.url);
|
|
18
|
-
const pkg = require('../package.json'); // v3.
|
|
18
|
+
const pkg = require('../package.json'); // v3.4.0
|
|
19
19
|
|
|
20
20
|
const PACKAGE_ROOT = path.resolve(__dirname, '..');
|
|
21
21
|
const deps = { PACKAGE_ROOT, print };
|
package/hooks/odd-studio.sh
CHANGED
|
@@ -165,7 +165,13 @@ swarm-write)
|
|
|
165
165
|
fi
|
|
166
166
|
|
|
167
167
|
# Gate 2: Agent token must exist (short-lived, created by Task agents)
|
|
168
|
+
# Exception: allow the main conversation to write config/infrastructure files
|
|
169
|
+
# (package.json, .env, drizzle.config, tsconfig, etc.) during project setup
|
|
168
170
|
if ! marker_valid ".odd/.odd-flow-agent-token" 120; then
|
|
171
|
+
# Allow config and infrastructure files without agent token
|
|
172
|
+
if echo "$FILE_PATH" | grep -qE '(package\.json|\.env|tsconfig|next\.config|postcss\.config|tailwind\.config|drizzle\.config|vitest\.config|eslint\.config|\.gitignore|docker-compose|Dockerfile|vercel\.config|vercel\.ts)'; then
|
|
173
|
+
exit 0
|
|
174
|
+
fi
|
|
169
175
|
echo "ODD STUDIO [swarm-write]: Source writes blocked — no agent token." >&2
|
|
170
176
|
echo "Source code must be written by Task agents, not the main conversation." >&2
|
|
171
177
|
echo "Task agents run: touch .odd/.odd-flow-agent-token before writing." >&2
|
|
@@ -225,7 +231,7 @@ confirm-gate)
|
|
|
225
231
|
NEW_CONTENT=$(echo "$INPUT" | jq -r '.tool_input.new_string // .tool_input.content // empty')
|
|
226
232
|
echo "$NEW_CONTENT" | grep -qE '"briefConfirmed"\s*:\s*true' || exit 0
|
|
227
233
|
|
|
228
|
-
if [ ! -f ".odd/.odd-flow-brief-stored" ]; then
|
|
234
|
+
if [ ! -f ".odd/.odd-flow-brief-stored" ] && [ ! -f ".odd/.odd-flow-state-ready" ]; then
|
|
229
235
|
echo "ODD STUDIO [confirm-gate]: Brief not stored in odd-flow memory. Store it first." >&2
|
|
230
236
|
exit 2
|
|
231
237
|
fi
|
|
@@ -331,6 +337,47 @@ session-save)
|
|
|
331
337
|
exit 0
|
|
332
338
|
;;
|
|
333
339
|
|
|
340
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
341
|
+
# PostToolUse: Write|Edit state.json — blocks phase transition without Steps 9, 9b, 9d
|
|
342
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
343
|
+
plan-complete-gate)
|
|
344
|
+
[ "$TOOL_NAME" = "Write" ] || [ "$TOOL_NAME" = "Edit" ] || exit 0
|
|
345
|
+
|
|
346
|
+
# Only intercept writes to state.json
|
|
347
|
+
echo "$FILE_PATH" | grep -q 'state\.json' || exit 0
|
|
348
|
+
|
|
349
|
+
# Check if new content changes currentPhase to "build"
|
|
350
|
+
NEW_CONTENT=$(echo "$INPUT" | jq -r '.tool_input.new_string // .tool_input.content // empty')
|
|
351
|
+
echo "$NEW_CONTENT" | grep -qE '"currentPhase"[[:space:]]*:[[:space:]]*"build"' || exit 0
|
|
352
|
+
|
|
353
|
+
# Verify all planning steps are complete
|
|
354
|
+
TECH_STACK=$(echo "$NEW_CONTENT" | grep -oE '"techStackDecided"[[:space:]]*:[[:space:]]*(true|false)' | grep -c 'true' || echo 0)
|
|
355
|
+
DESIGN=$(echo "$NEW_CONTENT" | grep -oE '"designApproachDecided"[[:space:]]*:[[:space:]]*(true|false)' | grep -c 'true' || echo 0)
|
|
356
|
+
ARCH_DOC=$(echo "$NEW_CONTENT" | grep -oE '"architectureDocGenerated"[[:space:]]*:[[:space:]]*(true|false)' | grep -c 'true' || echo 0)
|
|
357
|
+
|
|
358
|
+
if [ "$TECH_STACK" -eq 0 ] || [ "$DESIGN" -eq 0 ] || [ "$ARCH_DOC" -eq 0 ]; then
|
|
359
|
+
echo "" >&2
|
|
360
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" >&2
|
|
361
|
+
echo "ODD STUDIO [plan-complete-gate]: PHASE TRANSITION BLOCKED" >&2
|
|
362
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" >&2
|
|
363
|
+
echo "" >&2
|
|
364
|
+
echo " Cannot transition to build phase without completing planning:" >&2
|
|
365
|
+
echo "" >&2
|
|
366
|
+
[ "$TECH_STACK" -eq 0 ] && echo " ❌ Step 9: Technical architecture not decided (techStackDecided)" >&2
|
|
367
|
+
[ "$DESIGN" -eq 0 ] && echo " ❌ Step 9b: Design approach not decided (designApproachDecided)" >&2
|
|
368
|
+
[ "$ARCH_DOC" -eq 0 ] && echo " ❌ Step 9d: Architecture docs not generated (architectureDocGenerated)" >&2
|
|
369
|
+
echo "" >&2
|
|
370
|
+
echo " Run *plan to continue with Rachel (Step 9, 9b, 9d)." >&2
|
|
371
|
+
echo "" >&2
|
|
372
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" >&2
|
|
373
|
+
echo "" >&2
|
|
374
|
+
exit 2
|
|
375
|
+
fi
|
|
376
|
+
|
|
377
|
+
# All checks passed — allow the transition
|
|
378
|
+
exit 0
|
|
379
|
+
;;
|
|
380
|
+
|
|
334
381
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
335
382
|
# PostToolUse: mcp__odd-flow__memory_store — creates ready marker
|
|
336
383
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -339,13 +386,20 @@ store-validate)
|
|
|
339
386
|
[ "$CURRENT_PHASE" = "build" ] || exit 0
|
|
340
387
|
|
|
341
388
|
KEY=$(echo "$INPUT" | jq -r '.tool_input.key // empty')
|
|
342
|
-
[ "$KEY" = "odd-project-state" ] || exit 0
|
|
343
389
|
|
|
344
390
|
SUCCESS=$(echo "$INPUT" | jq -r '.tool_response.success // false' 2>/dev/null || echo "false")
|
|
345
391
|
[ "$SUCCESS" = "true" ] || exit 0
|
|
346
392
|
|
|
347
|
-
|
|
348
|
-
|
|
393
|
+
# Create the right marker based on what was stored
|
|
394
|
+
case "$KEY" in
|
|
395
|
+
odd-project-state)
|
|
396
|
+
touch .odd/.odd-flow-state-ready 2>/dev/null
|
|
397
|
+
rm -f .odd/.odd-flow-state-dirty 2>/dev/null
|
|
398
|
+
;;
|
|
399
|
+
odd-session-brief-*)
|
|
400
|
+
touch .odd/.odd-flow-brief-stored 2>/dev/null
|
|
401
|
+
;;
|
|
402
|
+
esac
|
|
349
403
|
exit 0
|
|
350
404
|
;;
|
|
351
405
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odd-studio",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Outcome-Driven Development for AI coding agents — a planning and build harness for domain experts building serious software with AI. Works with Claude Code, OpenCode, and Codex.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
package/scripts/setup-hooks.js
CHANGED
|
@@ -50,6 +50,20 @@ const GATES = [
|
|
|
50
50
|
],
|
|
51
51
|
},
|
|
52
52
|
// ── PostToolUse ─────────────────────────────────────────────────────────
|
|
53
|
+
{
|
|
54
|
+
event: 'PostToolUse',
|
|
55
|
+
matcher: 'Write',
|
|
56
|
+
gates: [
|
|
57
|
+
{ name: 'plan-complete-gate', timeout: 5, status: 'ODD plan complete gate...' },
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
event: 'PostToolUse',
|
|
62
|
+
matcher: 'Edit',
|
|
63
|
+
gates: [
|
|
64
|
+
{ name: 'plan-complete-gate', timeout: 5, status: 'ODD plan complete gate...' },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
53
67
|
{
|
|
54
68
|
event: 'PostToolUse',
|
|
55
69
|
matcher: 'Bash',
|
package/skill/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "odd"
|
|
3
|
-
version: "3.
|
|
3
|
+
version: "3.4.0"
|
|
4
4
|
description: "Outcome-Driven Development planning and build coach. Use /odd to start or resume an ODD project — building personas, writing outcomes, mapping contracts, creating a Master Implementation Plan, and directing a odd-flow-powered build. Designed for domain experts who are not developers. Works with Claude Code, OpenCode, and Codex."
|
|
5
5
|
metadata:
|
|
6
6
|
priority: 10
|
|
@@ -96,7 +96,7 @@ Display this when no existing state is found:
|
|
|
96
96
|
|
|
97
97
|
---
|
|
98
98
|
|
|
99
|
-
Welcome to ODD Studio v3.
|
|
99
|
+
Welcome to ODD Studio v3.4.0.
|
|
100
100
|
|
|
101
101
|
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:
|
|
102
102
|
|
|
@@ -120,7 +120,7 @@ Display this when existing state is found. Replace the bracketed values with act
|
|
|
120
120
|
|
|
121
121
|
---
|
|
122
122
|
|
|
123
|
-
Welcome back to ODD Studio v3.
|
|
123
|
+
Welcome back to ODD Studio v3.4.0.
|
|
124
124
|
|
|
125
125
|
**Project:** [project.name]
|
|
126
126
|
**Current Phase:** [state.currentPhase]
|