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.
- package/README.md +0 -3
- package/bin/commands/init.js +3 -41
- package/bin/commands/status.js +0 -3
- package/bin/odd-studio.js +1 -1
- package/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/codex-plugin/hooks.json +25 -7
- package/hooks/odd-studio.sh +0 -31
- package/package.json +1 -2
- package/plugins/plugin-gates.js +104 -79
- package/scripts/command-definitions.js +7 -47
- package/scripts/hook-definitions.js +137 -0
- package/scripts/install-codex-commands.js +11 -3
- package/scripts/install-commands.js +13 -9
- package/scripts/setup-codex-plugin.js +7 -0
- package/scripts/setup-hooks.js +6 -130
- package/scripts/state-schema.js +2 -4
- package/skill/SKILL.md +50 -675
- package/skill/docs/build/build-protocol.md +1 -5
- package/skill/docs/build/confirm-protocol.md +41 -0
- package/skill/docs/build/export-protocol.md +45 -0
- package/skill/docs/chapters/chapter-10.md +2 -2
- package/skill/docs/chapters/chapter-11.md +3 -5
- package/skill/docs/chapters/chapter-12.md +2 -2
- package/skill/docs/chapters/chapter-14.md +8 -12
- package/skill/docs/runtime/build-entry.md +64 -0
- package/skill/docs/runtime/shared-commands.md +65 -0
- package/skill/docs/runtime/status-protocol.md +11 -0
- package/skill/docs/startup/startup-protocol.md +90 -0
- package/skill/odd-build/SKILL.md +6 -4
- package/skill/odd-debug/SKILL.md +3 -5
- package/skill/odd-deploy/SKILL.md +8 -3
- package/skill/odd-plan/SKILL.md +10 -3
- package/skill/odd-status/SKILL.md +3 -3
- package/skill/odd-swarm/SKILL.md +5 -4
- package/templates/.odd/state.json +1 -3
- package/templates/AGENTS.md +52 -190
package/templates/AGENTS.md
CHANGED
|
@@ -1,173 +1,31 @@
|
|
|
1
1
|
# {{PROJECT_NAME}} — Agent Configuration
|
|
2
2
|
# Powered by ODD Studio (Outcome-Driven Development)
|
|
3
3
|
|
|
4
|
+
## Canonical Source
|
|
5
|
+
|
|
6
|
+
This file is the bootstrap, not the full method.
|
|
7
|
+
|
|
8
|
+
When ODD is activated, treat these as the authoritative instructions:
|
|
9
|
+
- `plugins/odd-studio/skills/odd/SKILL.md` in Codex
|
|
10
|
+
- `.opencode/odd/SKILL.md` in OpenCode
|
|
11
|
+
- `docs/plan.md`
|
|
12
|
+
- `docs/outcomes/`
|
|
13
|
+
- `.odd/state.json`
|
|
14
|
+
|
|
15
|
+
Do not restate the whole methodology here. Read the canonical files and execute them.
|
|
16
|
+
|
|
4
17
|
## How to Start ODD
|
|
5
18
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
When activated, read the full coaching protocol:
|
|
14
|
-
- `plugins/odd-studio/skills/odd/SKILL.md` (Codex) or `.opencode/odd/SKILL.md` (OpenCode)
|
|
15
|
-
|
|
16
|
-
Then execute the startup state check documented in that file.
|
|
17
|
-
|
|
18
|
-
## Project Context
|
|
19
|
-
This project is built using Outcome-Driven Development. All build decisions flow from the
|
|
20
|
-
outcomes documented in `docs/outcomes/` and the plan in `docs/plan.md`.
|
|
21
|
-
|
|
22
|
-
Before starting any build session, read:
|
|
23
|
-
1. `docs/plan.md` — the Master Implementation Plan
|
|
24
|
-
2. `docs/outcomes/` — all outcome documents for the current phase
|
|
25
|
-
3. `docs/architecture.md` — technical architecture (authoritative stack and infrastructure reference)
|
|
26
|
-
4. `docs/ui/design-system.md` — design system (authoritative design reference — palette, typography, components, layout)
|
|
27
|
-
5. `docs/contract-map.md` — contracts and dependency graph
|
|
28
|
-
6. `.odd/state.json` — current project state
|
|
29
|
-
|
|
30
|
-
## ODD Build Rules (Always Enforced)
|
|
31
|
-
|
|
32
|
-
### Language
|
|
33
|
-
- Describe problems and verify results in **domain language only**
|
|
34
|
-
- Never explain what code does — explain what the *user experiences*
|
|
35
|
-
- When reporting failures: "the dietary requirement I entered doesn't appear on the dashboard"
|
|
36
|
-
NOT: "the database column is null"
|
|
37
|
-
|
|
38
|
-
### Build Sequence
|
|
39
|
-
- NEVER build an outcome whose dependencies are not yet verified
|
|
40
|
-
- ALWAYS build shared infrastructure before individual outcomes
|
|
41
|
-
- ALWAYS run the full verification walkthrough before marking an outcome complete
|
|
42
|
-
- ALWAYS commit after each verified outcome with message: "Outcome [N] [name] — verified"
|
|
43
|
-
|
|
44
|
-
### Verification Standard
|
|
45
|
-
- Every outcome must be verified by walking through the verification steps in a browser
|
|
46
|
-
- Pass = works exactly as the walkthrough describes
|
|
47
|
-
- Fail = describe the failure in domain language, fix, re-verify the ENTIRE outcome
|
|
48
|
-
- An outcome is not done until every verification step passes
|
|
49
|
-
|
|
50
|
-
### Git Discipline
|
|
51
|
-
- Commit after every verified outcome (not before)
|
|
52
|
-
- Commit message format: `Outcome [N] [name] — verified` or `Phase [X] complete`
|
|
53
|
-
- Never force-push. Never commit .env files. Never skip hooks.
|
|
54
|
-
- If tests fail, fix them — never use --no-verify
|
|
55
|
-
|
|
56
|
-
### Code Excellence — The Three Laws
|
|
57
|
-
1. **Solve it, then halve it.** Write every solution twice internally. First pass: make it work. Second pass: make it minimal. Commit only the second pass.
|
|
58
|
-
2. **Every line earns its place.** No defensive code for scenarios not in the outcome. No abstractions with one implementation. No comments restating the code. No wrappers that add no logic.
|
|
59
|
-
3. **Name things so well that comments are unnecessary.** `activeStudentsInClass` needs no comment. `data` always does. When tempted to write a comment, rename the thing instead.
|
|
60
|
-
|
|
61
|
-
### Code Excellence — Quantitative Limits
|
|
62
|
-
- Function body: **25 lines max** — longer means it does more than one thing
|
|
63
|
-
- Function parameters: **4 max** — more means the design is wrong
|
|
64
|
-
- File length: **300 lines max** — elegance demands shorter files
|
|
65
|
-
- Nesting depth: **3 levels max** — flatten with early returns
|
|
66
|
-
- Components per file: **1 exported + 2 private max**
|
|
67
|
-
- Imports per file: **8 max** — more means too much coupling
|
|
68
|
-
|
|
69
|
-
### Code Excellence — Mandatory Examples
|
|
70
|
-
|
|
71
|
-
**GOOD — we write code like this:**
|
|
72
|
-
```typescript
|
|
73
|
-
const activeStudents = students.filter(s => s.isActive)
|
|
74
|
-
const sorted = activeStudents.sort((a, b) => a.name.localeCompare(b.name))
|
|
75
|
-
const displayNames = sorted.map(s => `${s.firstName} ${s.lastName}`)
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
**BAD — we never write code like this:**
|
|
79
|
-
```typescript
|
|
80
|
-
// Filter to only get active students
|
|
81
|
-
const result = students
|
|
82
|
-
.filter(student => {
|
|
83
|
-
// Check if the student is active
|
|
84
|
-
if (student.isActive === true) {
|
|
85
|
-
return true
|
|
86
|
-
}
|
|
87
|
-
return false
|
|
88
|
-
})
|
|
89
|
-
// Sort students alphabetically
|
|
90
|
-
.sort((a, b) => {
|
|
91
|
-
return a.name.localeCompare(b.name)
|
|
92
|
-
})
|
|
93
|
-
.map(student => {
|
|
94
|
-
const displayName = `${student.firstName} ${student.lastName}`
|
|
95
|
-
return displayName
|
|
96
|
-
})
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
**GOOD — direct returns, no wrapping:**
|
|
100
|
-
```typescript
|
|
101
|
-
export function canAccess(user: User): boolean {
|
|
102
|
-
return user.role === "teacher" && user.isVerified
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**BAD — unnecessary conditional, unnecessary variable:**
|
|
107
|
-
```typescript
|
|
108
|
-
export function canAccess(user: User): boolean {
|
|
109
|
-
const hasAccess = user.role === "teacher" && user.isVerified
|
|
110
|
-
if (hasAccess) {
|
|
111
|
-
return true
|
|
112
|
-
}
|
|
113
|
-
return false
|
|
114
|
-
}
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Code Excellence — Banned Patterns
|
|
118
|
-
- **"Just in case" code** — no error handling for errors that cannot occur
|
|
119
|
-
- **Abstraction-first** — no generic utilities until there are two concrete uses
|
|
120
|
-
- **Wrapper components** — if `<PrimaryButton>` just renders `<Button variant="primary">`, use `<Button variant="primary">`
|
|
121
|
-
- **Premature types** — no type definitions for structures used once in one place
|
|
122
|
-
- **Defensive copies** — no spreading or cloning when nothing mutates
|
|
123
|
-
|
|
124
|
-
### Security Baseline
|
|
125
|
-
- No hardcoded secrets, API keys, or credentials — use environment variables
|
|
126
|
-
- Validate user input at system boundaries
|
|
127
|
-
- Authenticate and authorise every protected route, action, webhook, and admin surface
|
|
128
|
-
- Verify webhooks, uploads, and third-party callbacks before trusting payloads
|
|
129
|
-
- Use secure session defaults — no localStorage auth/session tokens, no JWT-by-default shortcuts
|
|
130
|
-
- Rate-limit auth, admin, upload, payment, and public write surfaces
|
|
131
|
-
- Record audit trails for admin and security-sensitive actions
|
|
132
|
-
- Never disable TLS, CSRF, origin, or certificate verification in production code
|
|
133
|
-
- Treat any security scan finding as release-blocking until fixed
|
|
134
|
-
|
|
135
|
-
## Debugging Inside ODD
|
|
136
|
-
- Use `ODD debug` or `*debug` when verification fails or a build breaks
|
|
137
|
-
- Debugging stays inside the current outcome — it is not a free-form detour
|
|
138
|
-
- Choose an explicit debug strategy before touching code: `ui-behaviour`, `full-stack`, `auth-security`, `integration-contract`, `background-process`, or `performance-state`
|
|
139
|
-
- Reproduce first, identify the failing boundary second, fix third
|
|
140
|
-
- Never apply a “quick fix” without naming the failing boundary
|
|
141
|
-
- After a fix, return to the verification walkthrough from step one
|
|
142
|
-
|
|
143
|
-
## UI Standards (Every UI Outcome)
|
|
144
|
-
- Use shadcn/ui components as the default component library
|
|
145
|
-
- Style with Tailwind CSS — no inline styles, no hardcoded colours
|
|
146
|
-
- Every interactive element must be keyboard-navigable
|
|
147
|
-
- Every image must have meaningful alt text
|
|
148
|
-
- Every form must work without JavaScript (progressive enhancement)
|
|
149
|
-
- Verify on 375px screen width before marking any UI outcome complete
|
|
150
|
-
- WCAG 2.1 AA is the minimum accessibility standard
|
|
151
|
-
|
|
152
|
-
## Technical Stack (see docs/architecture.md for full detail)
|
|
153
|
-
_This section is populated by Rachel during Step 9 of the planning phase._
|
|
154
|
-
_Until then, the ODD defaults apply:_
|
|
155
|
-
- Frontend: Next.js (App Router) + TypeScript
|
|
156
|
-
- Styling: Tailwind CSS v4 + shadcn/ui
|
|
157
|
-
- Database: PostgreSQL via Drizzle ORM
|
|
158
|
-
- Auth: NextAuth.js
|
|
159
|
-
- Email: Resend
|
|
160
|
-
- Deployment: Vercel
|
|
161
|
-
|
|
162
|
-
## Design Approach (see docs/ui/design-system.md for full detail)
|
|
163
|
-
_This section is populated by Rachel during Step 9b of the planning phase._
|
|
19
|
+
**In Codex:** Type `use ODD`, `start ODD`, or `begin ODD`.
|
|
20
|
+
Use `ODD status` for a state check, `ODD build` to continue the build flow, and `ODD debug` to investigate a failing outcome without leaving ODD.
|
|
21
|
+
|
|
22
|
+
**In OpenCode:** Type `/odd`.
|
|
23
|
+
|
|
24
|
+
When activated, read the full coaching protocol from the skill file and execute the startup state check exactly as written.
|
|
164
25
|
|
|
165
26
|
## Session Start Protocol
|
|
27
|
+
|
|
166
28
|
Every new session begins with an explicit ODD kickoff.
|
|
167
|
-
In OpenCode, the primary entrypoint is `/odd`. In Codex, the primary triggers are `use ODD`, `start ODD`, or `begin ODD`.
|
|
168
|
-
Treat `ODD status` as the status check and `ODD build` as the build kickoff.
|
|
169
|
-
When you see one of these triggers, read the full coaching protocol from the skill file (see "How to Start ODD" above),
|
|
170
|
-
then execute the startup state check from that skill exactly as written.
|
|
171
29
|
|
|
172
30
|
Do not skip straight to persona naming or build questions.
|
|
173
31
|
|
|
@@ -184,34 +42,38 @@ If this is a returning project:
|
|
|
184
42
|
- Display the returning project status message from the skill
|
|
185
43
|
- Then continue from the appropriate ODD stage
|
|
186
44
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
45
|
+
## Non-Negotiables
|
|
46
|
+
|
|
47
|
+
- Use domain language only when describing problems, verification, and outcomes
|
|
48
|
+
- Do not build outcomes whose dependencies are not yet verified
|
|
49
|
+
- Run the full verification walkthrough before marking an outcome complete
|
|
50
|
+
- Commit only after a verified outcome with message `Outcome [N] [name] — verified`
|
|
51
|
+
- Never force-push, never skip hooks, never commit `.env` files
|
|
52
|
+
- Use `ODD debug` or `*debug` for defects inside the active outcome flow
|
|
53
|
+
- Return to verification from step one after every fix
|
|
54
|
+
|
|
55
|
+
## Build Context
|
|
56
|
+
|
|
57
|
+
Before build work, read:
|
|
58
|
+
1. `docs/plan.md`
|
|
59
|
+
2. `docs/outcomes/` for the active phase
|
|
60
|
+
3. `.odd/state.json`
|
|
61
|
+
|
|
62
|
+
If present and relevant, also read:
|
|
63
|
+
4. `docs/architecture.md`
|
|
64
|
+
5. `docs/ui/design-system.md`
|
|
65
|
+
6. `docs/contract-map.md`
|
|
205
66
|
|
|
206
67
|
## File Organisation
|
|
207
|
-
|
|
208
|
-
- `docs/
|
|
209
|
-
- `docs/
|
|
68
|
+
|
|
69
|
+
- `docs/personas/` — persona documents
|
|
70
|
+
- `docs/outcomes/` — outcome documents
|
|
71
|
+
- `docs/plan.md` — Master Implementation Plan
|
|
210
72
|
- `docs/contract-map.md` — contracts and dependency graph
|
|
211
|
-
- `docs/architecture.md` — technical architecture
|
|
212
|
-
- `docs/ui/design-system.md` — design system
|
|
213
|
-
- `docs/ui/` — UI specifications
|
|
214
|
-
- `docs/session-brief-[N].md` —
|
|
215
|
-
- `.odd/state.json` — project state
|
|
216
|
-
- `src/` —
|
|
217
|
-
- `tests/` —
|
|
73
|
+
- `docs/architecture.md` — technical architecture
|
|
74
|
+
- `docs/ui/design-system.md` — design system
|
|
75
|
+
- `docs/ui/` — UI specifications
|
|
76
|
+
- `docs/session-brief-[N].md` — build handoff briefs
|
|
77
|
+
- `.odd/state.json` — project state
|
|
78
|
+
- `src/` — source code
|
|
79
|
+
- `tests/` — tests
|