popilot 0.2.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.
Files changed (136) hide show
  1. package/README.md +372 -0
  2. package/adapters/claude-code/.claude/commands/_domain.md.hbs +32 -0
  3. package/adapters/claude-code/.claude/commands/analytics.md.hbs +55 -0
  4. package/adapters/claude-code/.claude/commands/daily.md.hbs +301 -0
  5. package/adapters/claude-code/.claude/commands/dev.md.hbs +62 -0
  6. package/adapters/claude-code/.claude/commands/handoff.md +258 -0
  7. package/adapters/claude-code/.claude/commands/market.md +120 -0
  8. package/adapters/claude-code/.claude/commands/metrics.md +123 -0
  9. package/adapters/claude-code/.claude/commands/oscar-loop.md +436 -0
  10. package/adapters/claude-code/.claude/commands/party.md +85 -0
  11. package/adapters/claude-code/.claude/commands/plan.md +43 -0
  12. package/adapters/claude-code/.claude/commands/research.md +203 -0
  13. package/adapters/claude-code/.claude/commands/retro.md +68 -0
  14. package/adapters/claude-code/.claude/commands/save.md +440 -0
  15. package/adapters/claude-code/.claude/commands/sessions.md +139 -0
  16. package/adapters/claude-code/.claude/commands/sprint.md +106 -0
  17. package/adapters/claude-code/.claude/commands/start.md +368 -0
  18. package/adapters/claude-code/.claude/commands/strategy.md +41 -0
  19. package/adapters/claude-code/.claude/commands/task.md +220 -0
  20. package/adapters/claude-code/.claude/commands/tracking.md +116 -0
  21. package/adapters/claude-code/.claude/commands/validate.md +58 -0
  22. package/adapters/claude-code/CLAUDE.md.hbs +208 -0
  23. package/adapters/claude-code/manifest.yaml +36 -0
  24. package/bin/cli.mjs +218 -0
  25. package/lib/adapter.mjs +68 -0
  26. package/lib/doctor.mjs +161 -0
  27. package/lib/hydrate.mjs +421 -0
  28. package/lib/prompt.mjs +78 -0
  29. package/lib/scaffold.mjs +155 -0
  30. package/lib/setup-wizard.mjs +331 -0
  31. package/lib/template-engine.mjs +164 -0
  32. package/lib/yaml-lite.mjs +476 -0
  33. package/package.json +30 -0
  34. package/scaffold/.context/.secrets.yaml.example +20 -0
  35. package/scaffold/.context/WORKFLOW.md.hbs +332 -0
  36. package/scaffold/.context/agents/TEMPLATE.md +115 -0
  37. package/scaffold/.context/agents/analyst.md.hbs +362 -0
  38. package/scaffold/.context/agents/developer.md.hbs +390 -0
  39. package/scaffold/.context/agents/handoff-specialist.md.hbs +292 -0
  40. package/scaffold/.context/agents/market-researcher.md.hbs +288 -0
  41. package/scaffold/.context/agents/ollie.md +323 -0
  42. package/scaffold/.context/agents/operations.md.hbs +293 -0
  43. package/scaffold/.context/agents/orchestrator.md.hbs +434 -0
  44. package/scaffold/.context/agents/planner.md.hbs +405 -0
  45. package/scaffold/.context/agents/qa.md.hbs +409 -0
  46. package/scaffold/.context/agents/researcher.md.hbs +330 -0
  47. package/scaffold/.context/agents/sage.md +349 -0
  48. package/scaffold/.context/agents/strategist.md.hbs +339 -0
  49. package/scaffold/.context/agents/tracking-governor.md.hbs +291 -0
  50. package/scaffold/.context/agents/validator.md.hbs +365 -0
  51. package/scaffold/.context/integrations/_registry.yaml +38 -0
  52. package/scaffold/.context/integrations/providers/channel_io.yaml +38 -0
  53. package/scaffold/.context/integrations/providers/corti.yaml +203 -0
  54. package/scaffold/.context/integrations/providers/ga4.yaml +116 -0
  55. package/scaffold/.context/integrations/providers/intercom.yaml +47 -0
  56. package/scaffold/.context/integrations/providers/linear.yaml +46 -0
  57. package/scaffold/.context/integrations/providers/mixpanel.yaml +73 -0
  58. package/scaffold/.context/integrations/providers/notebooklm.yaml +74 -0
  59. package/scaffold/.context/integrations/providers/notion.yaml +129 -0
  60. package/scaffold/.context/integrations/providers/prod_db.yaml +183 -0
  61. package/scaffold/.context/oscar/workflows/multi-agent.md +82 -0
  62. package/scaffold/.context/oscar/workflows/ollie-sage.md +128 -0
  63. package/scaffold/.context/oscar/workflows/session-git.md +71 -0
  64. package/scaffold/.context/oscar/workflows/setup.md +663 -0
  65. package/scaffold/.context/oscar/workflows/tracking.md +118 -0
  66. package/scaffold/.context/project.yaml.example +102 -0
  67. package/scaffold/.context/templates/dev-guide.md +217 -0
  68. package/scaffold/.context/templates/epic-spec.md +225 -0
  69. package/scaffold/.context/templates/guardrail.md +94 -0
  70. package/scaffold/.context/templates/handoff-checklist.md +197 -0
  71. package/scaffold/.context/templates/prd.md +80 -0
  72. package/scaffold/.context/templates/retrospective.md +78 -0
  73. package/scaffold/.context/templates/screen-spec.md +714 -0
  74. package/scaffold/.context/templates/sprint-plan.md +72 -0
  75. package/scaffold/.context/templates/sprint-status.yaml +109 -0
  76. package/scaffold/.context/templates/story-v2.md +228 -0
  77. package/scaffold/.context/templates/validation-report.md +99 -0
  78. package/scaffold/.gitignore.append +7 -0
  79. package/scaffold/spec-site/env.d.ts +7 -0
  80. package/scaffold/spec-site/index.html +14 -0
  81. package/scaffold/spec-site/package.json +20 -0
  82. package/scaffold/spec-site/src/App.vue +27 -0
  83. package/scaffold/spec-site/src/assets/icons/menu/ic_ads.svg +10 -0
  84. package/scaffold/spec-site/src/assets/icons/menu/ic_ads_on.svg +10 -0
  85. package/scaffold/spec-site/src/assets/icons/menu/ic_board.svg +14 -0
  86. package/scaffold/spec-site/src/assets/icons/menu/ic_board_on.svg +14 -0
  87. package/scaffold/spec-site/src/assets/icons/menu/ic_dashboard.svg +21 -0
  88. package/scaffold/spec-site/src/assets/icons/menu/ic_dashboard_on.svg +21 -0
  89. package/scaffold/spec-site/src/assets/icons/menu/ic_pricing.svg +20 -0
  90. package/scaffold/spec-site/src/assets/icons/menu/ic_pricing_on.svg +20 -0
  91. package/scaffold/spec-site/src/assets/icons/menu/ic_store.svg +11 -0
  92. package/scaffold/spec-site/src/assets/icons/menu/ic_store_on.svg +11 -0
  93. package/scaffold/spec-site/src/components/Accordion.vue +108 -0
  94. package/scaffold/spec-site/src/components/AppHeader.vue +304 -0
  95. package/scaffold/spec-site/src/components/Badge.vue +25 -0
  96. package/scaffold/spec-site/src/components/CoachingCard.vue +112 -0
  97. package/scaffold/spec-site/src/components/MemoSidebar.vue +239 -0
  98. package/scaffold/spec-site/src/components/MockupShell.vue +100 -0
  99. package/scaffold/spec-site/src/components/RuleTable.vue +99 -0
  100. package/scaffold/spec-site/src/components/ScenarioSwitcher.vue +103 -0
  101. package/scaffold/spec-site/src/components/SpecNav.vue +26 -0
  102. package/scaffold/spec-site/src/components/SpecSection.vue +59 -0
  103. package/scaffold/spec-site/src/components/SummaryGrid.vue +39 -0
  104. package/scaffold/spec-site/src/components/VersionBadge.vue +38 -0
  105. package/scaffold/spec-site/src/composables/useActiveSection.ts +53 -0
  106. package/scaffold/spec-site/src/composables/useMemo.ts +138 -0
  107. package/scaffold/spec-site/src/composables/useRetro.ts +313 -0
  108. package/scaffold/spec-site/src/composables/useScenario.ts +43 -0
  109. package/scaffold/spec-site/src/composables/useScenarioStore.ts +102 -0
  110. package/scaffold/spec-site/src/composables/useTurso.ts +160 -0
  111. package/scaffold/spec-site/src/composables/useUser.ts +25 -0
  112. package/scaffold/spec-site/src/data/navigation.ts +59 -0
  113. package/scaffold/spec-site/src/data/types.ts +90 -0
  114. package/scaffold/spec-site/src/data/wireframeRegistry.ts +25 -0
  115. package/scaffold/spec-site/src/layouts/SplitPaneLayout.vue +79 -0
  116. package/scaffold/spec-site/src/main.ts +10 -0
  117. package/scaffold/spec-site/src/pages/IndexPage.vue +66 -0
  118. package/scaffold/spec-site/src/pages/PolicyDetail.vue +215 -0
  119. package/scaffold/spec-site/src/pages/PolicyIndex.vue +74 -0
  120. package/scaffold/spec-site/src/pages/retro/RetroActions.vue +191 -0
  121. package/scaffold/spec-site/src/pages/retro/RetroBoard.vue +192 -0
  122. package/scaffold/spec-site/src/pages/retro/RetroCard.vue +131 -0
  123. package/scaffold/spec-site/src/pages/retro/RetroHeader.vue +287 -0
  124. package/scaffold/spec-site/src/pages/retro/RetroPage.vue +178 -0
  125. package/scaffold/spec-site/src/pages/shared/NoContentPlaceholder.vue +34 -0
  126. package/scaffold/spec-site/src/pages/shared/PlaceholderContent.vue +22 -0
  127. package/scaffold/spec-site/src/pages/shared/PlaceholderSpecPanel.vue +16 -0
  128. package/scaffold/spec-site/src/pages/shared/PolicyFallback.vue +145 -0
  129. package/scaffold/spec-site/src/pages/wireframe/WireframeShell.vue +151 -0
  130. package/scaffold/spec-site/src/router.ts +85 -0
  131. package/scaffold/spec-site/src/styles/base.css +21 -0
  132. package/scaffold/spec-site/src/styles/split-pane.css +143 -0
  133. package/scaffold/spec-site/src/styles/variables.css +47 -0
  134. package/scaffold/spec-site/src/utils/markdown.ts +197 -0
  135. package/scaffold/spec-site/tsconfig.json +20 -0
  136. package/scaffold/spec-site/vite.config.ts +18 -0
@@ -0,0 +1,332 @@
1
+ # PO Workflow
2
+
3
+ > Oscar-centric operations, agent routing, proactive alerts, etc. — see `agents/orchestrator.md`
4
+ > Session management — see `{{COMMAND_DIR}}start.md`, `save.md`
5
+
6
+ ---
7
+
8
+ ## Codebase Context Analysis
9
+
10
+ {{#if dev_scope.service_repo}}
11
+ ### Repository Separation (Important)
12
+
13
+ The Oscar system and service codebase are in **separate Git repositories**:
14
+
15
+ | Repository | Path | Contents |
16
+ |------------|------|----------|
17
+ | **Oscar System** | Current directory | Agents, context, workflows, sessions |
18
+ | **Service Code** | `~/{{dev_scope.service_repo}}/` | Frontend, backend |
19
+
20
+ **Important:**
21
+ - Codebase analysis results are stored in `.context/global/product/`
22
+ - When analyzing service code, navigate to `~/{{dev_scope.service_repo}}/`
23
+ - The two repositories have completely independent commit histories
24
+ {{/if}}
25
+
26
+ ### When Is Analysis Needed?
27
+
28
+ | Situation | Required Analysis |
29
+ |-----------|-------------------|
30
+ | Starting a new domain spec discussion | Full FE/BE analysis for that domain |
31
+ | Discussing modifications to existing features | Related component/service analysis |
32
+ | Identifying bug causes | Detailed logic analysis |
33
+ | Checking API specs | Controller/DTO analysis |
34
+
35
+ ### Storing Analysis Results
36
+
37
+ ```
38
+ .context/global/product/{domain}.md
39
+ ```
40
+
41
+ {{#if domains}}
42
+ ### Per-Domain Context Files
43
+
44
+ | Domain | Context File |
45
+ |--------|-------------|
46
+ {{#each domains}}
47
+ | **{{name}}** | `global/product/{{id}}.md` |
48
+ {{/each}}
49
+ {{/if}}
50
+
51
+ ---
52
+
53
+ ## Agent Handoff Flow
54
+
55
+ ```
56
+ 🎩 Oscar
57
+ (Routing & Coordination)
58
+
59
+ ┌─────────────────┼─────────────────┐
60
+ │ │ │
61
+ ▼ ▼ ▼
62
+ 🎯 Simon ◄──────► 📈 Danny ◄──────► 🎤 Rita
63
+ │ │
64
+ ▼ │
65
+ 📋 Penny │
66
+ │ │
67
+ ▼ │
68
+ 📊 Vicky ◄────────────┘
69
+
70
+
71
+ 🎯 Simon (next hypothesis)
72
+ ```
73
+
74
+ | From | To | Situation | Oscar's Role |
75
+ |------|-----|-----------|-------------|
76
+ | 🎯 Simon | 📋 Penny | PRD completed | Handoff check |
77
+ | 📋 Penny | 📊 Vicky | Development completed | Confirm validation readiness |
78
+ | 📊 Vicky | 🎯 Simon | Validation completed | Prompt learning summary |
79
+ | 📊 Vicky | 📈 Danny | Anomaly detected | Request deep analysis |
80
+ | 📈 Danny | 🎯 Simon | Insight discovered | Suggest strategic connection |
81
+ | 🎤 Rita | 🎯 Simon | VOC analysis done | Suggest hypothesis connection |
82
+
83
+ ---
84
+
85
+ ## Sprint Transition Workflow
86
+
87
+ At sprint end:
88
+ ```
89
+ 1. Write results.md in the current sprint folder
90
+ 2. Create new sprint folder (e.g., sprints/s{N+1}/)
91
+ 3. Initialize context.md (goals, KRs, key tasks)
92
+ 4. Move previous sprint to _archive/ if needed
93
+ ```
94
+
95
+ ---
96
+
97
+ ## Planning → Development Workflow
98
+
99
+ > Complete document hierarchy from PO detailed planning to developer handoff
100
+
101
+ ### Document Hierarchy
102
+
103
+ ```
104
+ Level 1: Sprint PRD (Sprint level)
105
+ └─→ One Question, hypothesis, OMTM
106
+ └─→ Owner: 🎯 Simon / Template: templates/prd.md
107
+
108
+ Level 2: Epic Spec (Epic level) ⭐ Core
109
+ └─→ WHY, WHAT, HOW (overview), EDGE
110
+ └─→ Owner: PO (🎯 Simon support) / Template: templates/epic-spec.md
111
+
112
+ Level 3: Story (Story level)
113
+ └─→ Based on Epic Spec, AC (Given-When-Then), task breakdown
114
+ └─→ Owner: 📋 Penny / Template: templates/story-v2.md
115
+ ```
116
+
117
+ ### Order Is Mandatory
118
+
119
+ ```
120
+ No Story writing before Epic Spec is finalized!
121
+
122
+ [Correct order]
123
+ Sprint PRD → Epic Spec (PO finalized) → Story breakdown → Development
124
+
125
+ [Prohibited]
126
+ Sprint PRD → (without Epic Spec) Story writing ❌
127
+ ```
128
+
129
+ ### 5-Stage Story Status
130
+
131
+ ```
132
+ draft → backlog → ready-for-dev → in-progress → review → done
133
+ ```
134
+
135
+ | Status | Meaning | Entry Condition |
136
+ |--------|---------|-----------------|
137
+ | `draft` | Draft (Epic Spec not finalized) | — |
138
+ | `backlog` | Epic Spec finalized | Epic Spec completed |
139
+ | `ready-for-dev` | Handoff completed | Story verification passed |
140
+ | `in-progress` | In development | — |
141
+ | `done` | Completed | 📊 Vicky validation |
142
+
143
+ ### Workflow Stages
144
+
145
+ **Phase 1: Planning (PO-led)**
146
+ 1. Write Sprint PRD (🎯 Simon)
147
+ 2. Write Epic Spec (PO) → ✅ Proceed after PO approval
148
+
149
+ **Phase 2: Handoff (📋 Penny)**
150
+ 3. Story breakdown (templates/story-v2.md)
151
+ 4. Screen spec — for UI Epics (templates/screen-spec.md)
152
+ 5. Quality verification (templates/handoff-checklist.md) → Status: ready-for-dev
153
+
154
+ **Phase 3: Development (AI Agent)**
155
+ 6. Implement story tasks in order
156
+ 7. Review & complete → done
157
+
158
+ ### Disaster Prevention Analysis (5 checks)
159
+
160
+ Must check before handoff:
161
+ 1. **Feature duplication** — Similar functionality in existing code?
162
+ 2. **Technical errors** — Library versions, API contracts
163
+ 3. **File structure** — Conventions, build process
164
+ 4. **Regression errors** — Existing tests, side effects
165
+ 5. **Implementation ambiguity** — Edge cases, error handling
166
+
167
+ ---
168
+
169
+ ## spec-site: Interactive Spec Tool
170
+
171
+ spec-site is a Vue 3 + Vite based interactive spec viewer.
172
+ It provides dynamic mockups and scenario-based specs instead of static markdown.
173
+
174
+ ### Page Addition Pattern
175
+
176
+ 1. Create `src/pages/{feature}/` folder
177
+ 2. Write 3 files:
178
+ - `{feature}Data.ts` — Scenarios, spec areas, version info
179
+ - `{Feature}Mockup.vue` — Interactive mockup
180
+ - `{Feature}SpecPanel.vue` — Spec document panel
181
+ 3. Register in `wireframeRegistry.ts`
182
+ 4. Add to `navigation.ts`
183
+
184
+ ### Layout Standard: SplitPaneLayout
185
+
186
+ Left: Interactive mockup / Right: Spec panel (draggable)
187
+
188
+ ```
189
+ ┌────────────────────────────────────────────────┐
190
+ │ AppHeader │
191
+ ├─────────────────────┬──────────────────────────┤
192
+ │ │ │
193
+ │ MockupShell │ SpecPanel │
194
+ │ (per-scenario │ (spec document) │
195
+ │ mockup) │ │
196
+ │ │ │
197
+ │ │ │
198
+ ├─────────────────────┴──────────────────────────┤
199
+ │ ScenarioSwitcher │
200
+ └────────────────────────────────────────────────┘
201
+ ```
202
+
203
+ ### Scenario System
204
+
205
+ ScenarioSwitcher enables mockup switching by user type / state.
206
+ Each scenario is defined in `{feature}Data.ts` and provided/injected via `useScenario` composable.
207
+
208
+ ### Data File Structure
209
+
210
+ ```typescript
211
+ // {feature}Data.ts
212
+ import type { Scenario, SpecArea, PageVersion } from '../data/types'
213
+
214
+ export const scenarios: Scenario<FeatureState>[] = [
215
+ { id: 'default', label: 'Default', state: { /* ... */ } },
216
+ { id: 'empty', label: 'Empty state', state: { /* ... */ } },
217
+ ]
218
+
219
+ export const specAreas: SpecArea[] = [
220
+ { id: 'layout', label: 'Layout' },
221
+ { id: 'components', label: 'Component Details' },
222
+ ]
223
+
224
+ export const version: PageVersion = {
225
+ sprint: 's1',
226
+ status: 'dev',
227
+ updatedAt: '2026-01-01'
228
+ }
229
+ ```
230
+
231
+ ### Epic Spec Integration
232
+
233
+ Epic Specs are written in markdown at `.context/sprints/s{N}/epic-specs/E-XX.md`.
234
+ They are automatically rendered on spec-site's PolicyIndex / PolicyDetail pages.
235
+
236
+ ### Retrospective Tool (RetroPage)
237
+
238
+ Turso (LibSQL) based team retrospective board. Route: `/retro`.
239
+ - Category-based cards (went well / needs improvement / action items)
240
+ - Sprint-based filtering
241
+
242
+ ---
243
+
244
+ ## Checklists
245
+
246
+ ### PRD Completeness
247
+ - [ ] One Question defined
248
+ - [ ] OMTM set
249
+ - [ ] Hypothesis/validation method clear
250
+ - [ ] Guard Rail metrics present
251
+
252
+ ### Sprint Ready
253
+ - [ ] KRs quantified
254
+ - [ ] Dev spec document linked
255
+ - [ ] Baseline data secured
256
+
257
+ ### Hypothesis Validation
258
+ - [ ] Before data collection complete
259
+ - [ ] Measurement period set
260
+ - [ ] Success/failure criteria clear
261
+
262
+ ---
263
+
264
+ ## Templates
265
+
266
+ ### Planning (PO-led)
267
+
268
+ | Template | Owner | File | Order |
269
+ |----------|-------|------|-------|
270
+ | Sprint PRD | 🎯 Simon | `templates/prd.md` | 1 |
271
+ | Epic Spec | PO | `templates/epic-spec.md` | 2 |
272
+
273
+ ### Handoff (📋 Penny-led)
274
+
275
+ | Template | File | Order |
276
+ |----------|------|-------|
277
+ | Story v2 | `templates/story-v2.md` | 3 |
278
+ | Screen Spec | `templates/screen-spec.md` | 4 |
279
+ | Handoff Checklist | `templates/handoff-checklist.md` | 5 |
280
+ | Sprint Status | `templates/sprint-status.yaml` | — |
281
+ | Dev Guide | `templates/dev-guide.md` | — |
282
+
283
+ ### Validation/Retrospective
284
+
285
+ | Template | Owner | File |
286
+ |----------|-------|------|
287
+ | Validation Report | 📊 Vicky | `templates/validation-report.md` |
288
+ | Guard Rail | 📊 Vicky | `templates/guardrail.md` |
289
+ | Retrospective | Penny + Vicky | `templates/retrospective.md` |
290
+
291
+ ---
292
+
293
+ ---
294
+
295
+ ## Document Management Tool Roles
296
+
297
+ ### spec-site — Interactive Specs + Epic Spec Viewing
298
+
299
+ | Document | Path |
300
+ |----------|------|
301
+ | Sprint documents | `.context/sprints/s{N}/` |
302
+ | Epic Specs | `.context/sprints/s{N}/epic-specs/` |
303
+ | Interactive mockups | `spec-site/src/pages/` |
304
+ | Retro board | spec-site `/retro` |
305
+ {{#if spec_site.deploy_url}}
306
+
307
+ **Deploy URL**: {{spec_site.deploy_url}}
308
+ {{/if}}
309
+
310
+ {{#if capabilities.pm_tool}}
311
+ ### PM Tool — Project Management
312
+
313
+ | Purpose | Description |
314
+ |---------|-------------|
315
+ | Kanban board | Task status tracking, assignee management |
316
+ | Sprint management | Progress, workload monitoring |
317
+ | Meeting notes / Roadmap | Meeting records, OKR |
318
+ {{/if}}
319
+
320
+ ### Metrics Data
321
+
322
+ **Location:** `.context/metrics/`
323
+
324
+ | File | Contents | Frequency |
325
+ |------|----------|-----------|
326
+ | `business.yaml` | MRR, ARPU, funnel | Monthly |
327
+ | `segments.yaml` | Per-segment metrics | Monthly |
328
+ | `team.yaml` | Team/member info | At sprint start |
329
+
330
+ ---
331
+
332
+ {{INTEGRATION_WORKFLOW_RULES}}
@@ -0,0 +1,115 @@
1
+ # Agent Prompt Universal Template v1.0
2
+
3
+ > Every agent persona file in the Oscar system must follow this template.
4
+ > Incorporates 10 quality patterns from the OMX (oh-my-codex) reference.
5
+
6
+ ---
7
+
8
+ ## Mandatory Structure (in order)
9
+
10
+ ```markdown
11
+ ---
12
+ name: "{Name}"
13
+ role: "{One-line role}"
14
+ icon: "{emoji}"
15
+ effort: "low | medium | high" # Default reasoning intensity
16
+ model_tier: "opus | sonnet | haiku" # Recommended model
17
+ read_only: true | false # Whether this agent can modify files
18
+ ---
19
+ ```
20
+
21
+ ### 1. Identity
22
+ - Name, role, icon, tagline
23
+
24
+ ### 2. Persona
25
+ - Background (2-3 sentences)
26
+ - Communication style
27
+ - Speech examples (2-3)
28
+
29
+ ### 3. Negative Scope (MANDATORY)
30
+ - "What I Do NOT Do" table: `| Task | Responsible Agent | Reason |`
31
+ - "Boundary Violations to Reject" — 3+ example requests with redirect responses
32
+ - Clear redirect phrasing when boundary is crossed
33
+
34
+ ### 4. Core Principles
35
+ - 3-5 principles (one line each)
36
+
37
+ ### 5. Success Criteria (MANDATORY)
38
+ - 5-7 measurable bullet points defining "done well"
39
+ - At least 1 must be quantitative
40
+
41
+ ### 6. Activation Triggers
42
+ - Keyword / situation matching table
43
+
44
+ ### 7. Workflow Menu
45
+ - Trigger code | Function | Deliverable
46
+
47
+ ### 8. MCP Tool Usage (if applicable)
48
+ - Per-tool: purpose, usage, constraints
49
+ - Use `{{INTEGRATION_PROMPTS}}` marker for hydration-injected content
50
+
51
+ ### 9. Handoff Protocol
52
+ - Outbound handoff: format + required fields
53
+ - Inbound handoff: verification checklist
54
+
55
+ ### 10. Failure Modes to Avoid (MANDATORY)
56
+ - Minimum 4 named anti-patterns
57
+ - Each: Name, BAD example, GOOD example, FIX one-liner
58
+
59
+ ### 11. Few-shot Examples (MANDATORY)
60
+ - Minimum 2 Good/Bad pairs
61
+ - Good: specific, evidence-based, structured response
62
+ - Bad: vague, ungrounded, unstructured response
63
+
64
+ ### 12. Final Checklist (MANDATORY)
65
+ - 5-7 Yes/No verification questions before delivering output
66
+ - If any answer is No, revise before submitting
67
+
68
+ ### 13. Evidence Principle (MANDATORY)
69
+ - "No evidence = no claim" declaration
70
+ - Definition of evidence (file:line, data, URL, etc.)
71
+ - BAD → GOOD transformation example
72
+
73
+ ### 14. Context Budget (MANDATORY)
74
+ - Files to skip
75
+ - Reading strategy by file size (200+ lines → partial read)
76
+ - Max files per turn
77
+
78
+ ### 15. Auto Context Load
79
+ - Files to load automatically on activation
80
+
81
+ ---
82
+
83
+ ## Quality Gate
84
+
85
+ | Section | Minimum Requirement | Gate |
86
+ |---------|-------------------|------|
87
+ | Negative Scope | 3+ "don't do" items with responsible agent named | Must redirect to a specific agent |
88
+ | Success Criteria | 5+ criteria | At least 1 quantitative |
89
+ | Failure Modes | 4+ anti-patterns | Each must have BAD/GOOD/FIX |
90
+ | Few-shot Examples | 2+ Good/Bad pairs | Bad must be a realistic failure, not a strawman |
91
+ | Final Checklist | 5-7 Yes/No items | Answerable without additional context |
92
+ | Evidence Principle | Declaration + 1 example | Must include BAD→GOOD transformation |
93
+ | Context Budget | 3+ rules | Must include "what to skip" guidance |
94
+
95
+ ---
96
+
97
+ ## Optional Sections (when applicable)
98
+
99
+ - **Read-Only Constraint**: For agents that must not modify files
100
+ - **Circuit Breaker**: Stop/escalation rules after 3 consecutive same-approach failures
101
+ - **Extension Modules**: References to conditionally loaded modules
102
+ - **Domain Knowledge**: Domain-specific knowledge references
103
+
104
+ ---
105
+
106
+ ## Naming Conventions
107
+
108
+ - Agent names: English first names (Oscar, Simon, Penny, ...)
109
+ - File names: `{role-english}.md.hbs` (orchestrator.md.hbs, strategist.md.hbs, ...)
110
+ - Icons: 1 emoji per agent, fixed
111
+
112
+ ---
113
+
114
+ *Version*: v1.0
115
+ *Applies to*: All 14 agents in the Oscar system