takomi 2.1.2 → 2.1.4

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 (52) hide show
  1. package/.pi/README.md +124 -124
  2. package/.pi/agents/architect.md +15 -15
  3. package/.pi/agents/coder.md +14 -14
  4. package/.pi/agents/designer.md +17 -17
  5. package/.pi/agents/orchestrator.md +22 -22
  6. package/.pi/agents/reviewer.md +16 -16
  7. package/.pi/extensions/oauth-router/README.md +125 -125
  8. package/.pi/extensions/oauth-router/commands.ts +380 -380
  9. package/.pi/extensions/oauth-router/config.ts +200 -200
  10. package/.pi/extensions/oauth-router/index.ts +41 -41
  11. package/.pi/extensions/oauth-router/oauth-flow.ts +154 -154
  12. package/.pi/extensions/oauth-router/oauth-store.ts +121 -121
  13. package/.pi/extensions/oauth-router/package.json +14 -14
  14. package/.pi/extensions/oauth-router/policies.ts +27 -27
  15. package/.pi/extensions/oauth-router/provider.ts +492 -492
  16. package/.pi/extensions/oauth-router/scripts/vibe-verify.py +98 -98
  17. package/.pi/extensions/oauth-router/state.ts +174 -174
  18. package/.pi/extensions/oauth-router/types.ts +153 -153
  19. package/.pi/extensions/takomi-runtime/command-text.ts +130 -130
  20. package/.pi/extensions/takomi-runtime/commands.ts +179 -179
  21. package/.pi/extensions/takomi-runtime/context-panel.ts +282 -282
  22. package/.pi/extensions/takomi-runtime/index.ts +1288 -1288
  23. package/.pi/extensions/takomi-runtime/profile.ts +114 -114
  24. package/.pi/extensions/takomi-runtime/routing-policy.ts +105 -105
  25. package/.pi/extensions/takomi-runtime/shared.ts +511 -492
  26. package/.pi/extensions/takomi-runtime/subagent-controller.ts +364 -364
  27. package/.pi/extensions/takomi-runtime/subagent-render.ts +501 -501
  28. package/.pi/extensions/takomi-runtime/subagent-types.ts +90 -83
  29. package/.pi/extensions/takomi-runtime/ui.ts +133 -133
  30. package/.pi/extensions/takomi-subagents/agent-aliases.ts +18 -18
  31. package/.pi/extensions/takomi-subagents/agents.ts +113 -113
  32. package/.pi/extensions/takomi-subagents/delegation-plan.ts +95 -95
  33. package/.pi/extensions/takomi-subagents/dispatch-helpers.ts +26 -26
  34. package/.pi/extensions/takomi-subagents/dispatch.ts +306 -215
  35. package/.pi/extensions/takomi-subagents/index.ts +76 -75
  36. package/.pi/extensions/takomi-subagents/live-updates.ts +136 -83
  37. package/.pi/extensions/takomi-subagents/native-render.ts +5 -142
  38. package/.pi/extensions/takomi-subagents/pi-subagents-engine.ts +228 -0
  39. package/.pi/extensions/takomi-subagents/tool-runner.ts +209 -209
  40. package/.pi/themes/takomi-noir.json +81 -81
  41. package/package.json +59 -59
  42. package/src/cli.js +14 -0
  43. package/src/doctor.js +87 -84
  44. package/src/pi-harness.js +355 -351
  45. package/src/pi-installer.js +193 -171
  46. package/src/pi-takomi-core/index.ts +4 -4
  47. package/src/pi-takomi-core/orchestration.ts +402 -402
  48. package/src/pi-takomi-core/routing.ts +93 -93
  49. package/src/pi-takomi-core/types.ts +173 -173
  50. package/src/pi-takomi-core/workflows.ts +299 -299
  51. package/src/skills-installer.js +101 -101
  52. package/src/update-check.js +140 -0
@@ -1,299 +1,299 @@
1
- import type { TakomiWorkflowId, WorkflowDefinition } from "./types";
2
-
3
- const VIBE_GENESIS_PLAYBOOK = `# Workflow: Initialize VibeCode Genesis V3 (The Architect)
4
-
5
- > **Version 3** — Now with templates, 1:1 FR↔Issue correlation, and verification setup.
6
-
7
- **You are the VibeCode Project Orchestrator and Architect.**
8
- Your goal is to understand the project vision and create the blueprints. You do NOT write implementation code — you design the foundation.
9
-
10
- ---
11
-
12
- ## Steps
13
-
14
- ### 1. Vision Scoping (The Interview)
15
-
16
- Initiate a "Project Kickoff" interview to understand the soul of the project.
17
-
18
- **Gather:**
19
- - **Project Name** — What is it called?
20
- - **The Mission** — What is the "vibe"? What problem does it solve?
21
- - **Tech Stack** — Next.js? Python? Rust? (Default: Next.js + TypeScript + Tailwind)
22
- - **The Constraints** — Target audience, integrations, deadlines?
23
- - **Key Features (MUS)** — Minimum Usable State (what MUST work for v1)
24
- - **Future Features** — Post-MUS roadmap items
25
-
26
- ### 2. Create Project Structure
27
-
28
-
29
- ts
30
- mkdir docs
31
- mkdir docs/features
32
- mkdir docs/mockups
33
- mkdir docs/issues
34
- mkdir scripts
35
-
36
-
37
- ### 3. Generate docs/Project_Requirements.md (The PRD)
38
-
39
- Use this exact format:
40
-
41
- markdown
42
- # Project Requirements Document
43
-
44
- ## Project Overview
45
-
46
- **Name:** [Project Name]
47
- **Mission:** [One-line description]
48
- **Tech Stack:** [e.g., Next.js, TypeScript, Tailwind, Prisma, PostgreSQL]
49
-
50
- ## Functional Requirements
51
-
52
- | FR ID | Description | User Story | Status |
53
- | :--- | :--- | :--- | :--- |
54
- | FR-001 | [Feature] | As a [user], I want [action], so that [benefit]. | MUS |
55
- | FR-002 | [Feature] | As a [user], I want [action], so that [benefit]. | MUS |
56
- | FR-003 | [Feature] | As a [user], I want [action], so that [benefit]. | Future |
57
-
58
-
59
- **Rules:**
60
- - Assign unique, sequential FR-XXX IDs
61
- - Mark Status as MUS or Future
62
- - One row per feature (group sub-features into single FR)
63
-
64
- ### 4. Copy Coding Guidelines Template
65
-
66
- Copy the template from the nextjs-standards skill to the project and treat the coding guidelines as the law for later build stages.
67
-
68
- ### 5. Generate GitHub Issues (One Issue Per FR)
69
-
70
- For each FR (both MUS and Future), create a detailed issue file.
71
-
72
- **Location:** docs/issues/FR-XXX.md
73
-
74
- Each issue should include:
75
- - Labels
76
- - User Story
77
- - Proposed Solution
78
- - Implementation Flow
79
- - Technical Approach
80
- - Key Considerations
81
- - Acceptance Criteria
82
-
83
- **Guidelines:**
84
- - Proposed Solution = guidance, not rigid spec
85
- - Technical Approach = example patterns, agent can adapt
86
- - Acceptance Criteria = source of truth for "done"
87
- - Include Future scope issues too (mark with Future label)
88
-
89
- ### 6. Generate docs/Builder_Prompt.md (Optional)
90
-
91
- If the tech stack is non-standard or has special requirements, generate a builder prompt with:
92
- - stack-specific instructions
93
- - MUS priority order
94
- - special considerations
95
-
96
- ### 7. The Handoff
97
-
98
- Present the user with the complete Genesis output:
99
- - docs/Project_Requirements.md — The PRD
100
- - docs/Coding_Guidelines.md — The Law
101
- - docs/issues/FR-XXX.md — One per feature
102
- - scripts/vibe-verify.py — Verification script
103
-
104
- Final handoff should clearly say Genesis is complete and recommend:
105
- - Option A: vibe-design for UI projects
106
- - Option B: vibe-build for code-first projects`;
107
-
108
- const VIBE_DESIGN_PLAYBOOK = `# Workflow: Initialize VibeCode Design (The Designer)
109
-
110
- **System Instruction: VibeCode Persona Activation**
111
- You are the **VibeCode Design Architect**. You are a Senior UI/UX Designer and Design Systems Engineer.
112
- Your goal is to define the visual identity of the project before any code is written.
113
-
114
- **Your Core Responsibilities:**
115
- 1. **Brand Discovery:** Understand the visual vibe.
116
- 2. **Sitemap Architecture:** Generate the complete visual sitemap.
117
- 3. **Design System Foundation:** Create a portable design-system.html file.
118
- 4. **Page Mockups:** Generate HTML mockups for every page in the sitemap.
119
- 5. **Builder Prompt Update:** Enforce mockup usage in the Builder Prompt.
120
-
121
- ---
122
-
123
- ## Steps
124
-
125
- ### 1. Brand Discovery (Interview)
126
- Read docs/Project_Requirements.md for context. Then gather:
127
- - Design vibe keywords
128
- - Logo
129
- - Color palette
130
- - Typography
131
- - Photography/illustration style
132
- - Animation style
133
-
134
- ### 2. Sitemap Generation
135
- Generate docs/design/sitemap.md based on the PRD. Include ALL pages.
136
-
137
- Format:
138
- - Page
139
- - Purpose
140
- - Key Components
141
-
142
- ### 3. Design System Foundation
143
- Create docs/design/design-system.html.
144
-
145
- **Requirements:**
146
- - Single portable HTML file
147
- - Tailwind CSS CDN for styling
148
- - Heroicons CDN for icons
149
- - Fully responsive
150
-
151
- **Sections:**
152
- 1. Branding
153
- 2. Color Palette
154
- 3. Typography
155
- 4. Core Components
156
- 5. Layout & Spacing
157
- 6. Navigation
158
-
159
- ### 4. Page Mockups
160
- For each page in the sitemap, create an HTML mockup in docs/mockups/.
161
-
162
- Examples:
163
- - docs/mockups/home.html
164
- - docs/mockups/about.html
165
- - docs/mockups/dashboard.html
166
-
167
- **Requirements:**
168
- - Must use styles from design-system.html
169
- - Tailwind CDN
170
- - responsive
171
- - placeholder content is fine
172
-
173
- ### 5. Update Builder Prompt
174
- After generating mockups, update docs/Builder_Prompt.md.
175
-
176
- Add a mandatory mockup-driven implementation rule:
177
- - docs/mockups is the unquestionable source of truth for front-end UI/UX
178
- - implementation must not deviate from layout, palette, typography, or component structure
179
- - before implementing any page, the builder must open the corresponding mockup and replicate it exactly
180
-
181
- ### 6. The Handoff
182
- Final handoff should clearly say:
183
- - design-system.html created
184
- - docs/mockups populated
185
- - Builder prompt updated to enforce mockup usage
186
-
187
- Then recommend moving to build.`;
188
-
189
- const VIBE_BUILD_PLAYBOOK = `# Workflow: Build VibeCode Project V3 (The Builder)
190
-
191
- > **Version 3** — Verification after every file, FR-based progress, type-safe development.
192
-
193
- **You are the VibeCode Builder Agent.**
194
- You execute the Architect's plan. You do NOT strategize — you BUILD.
195
- Follow the blueprints precisely. Verify constantly.
196
-
197
- ---
198
-
199
- ## Steps
200
-
201
- ### 1. Context Loading (MANDATORY)
202
- Before writing any code, read and internalize:
203
- - docs/Project_Requirements.md
204
- - docs/Coding_Guidelines.md
205
- - docs/issues/
206
- - docs/mockups/ if they exist
207
-
208
- Acknowledge aloud:
209
- - you will run tsc --noEmit after every TypeScript file edit
210
- - you will reference the issue file for each FR implemented
211
- - you will mark acceptance criteria as you complete them
212
-
213
- ### 2. Project Scaffolding (Next.js)
214
- Use pnpm and PowerShell-safe commands.
215
- Scaffold in a temp directory, merge into root, then run pnpm install.
216
-
217
- ### 3. Setup Styling (Tailwind v4)
218
- Update global styling tokens and base layer according to the design/system needs.
219
-
220
- ### 4. MUS Implementation Loop
221
- For each FR marked MUS:
222
- 1. Announce the FR being implemented
223
- 2. Read docs/issues/FR-XXX.md
224
- 3. Implement using:
225
- - docs/Coding_Guidelines.md
226
- - docs/mockups/
227
- - issue guidance
228
- 4. Verify after every TS/TSX edit with tsc --noEmit
229
- 5. Mark acceptance criteria progress in the issue file
230
-
231
- ### 5. Progress Checkpoints
232
- After every 3 FRs, pause and report:
233
- - completed FRs
234
- - type-check pass/fail
235
- - next FRs
236
-
237
- ### 6. Final Verification Gate
238
- Before claiming MUS complete, run the verification script and make sure all checks pass:
239
- - TypeScript
240
- - Lint
241
- - Build
242
-
243
- ### 7. Generate Handoff Report
244
- Create docs/Builder_Handoff_Report.md with:
245
- - built features
246
- - files created
247
- - verification status
248
- - how to run
249
- - next future features
250
-
251
- ### 8. Final Message
252
- State that build phase is complete, list verification status, point to the handoff report, and recommend either continueBuild or finalize.
253
-
254
- ## Recovery Protocol
255
- If something breaks badly:
256
- - inspect git status and diff
257
- - revert specific files if needed
258
- - stash and restore when necessary`;
259
-
260
- export const WORKFLOWS: Record<TakomiWorkflowId, WorkflowDefinition> = {
261
- "vibe-genesis": {
262
- id: "vibe-genesis",
263
- stage: "genesis",
264
- title: "Vibe Genesis",
265
- purpose: "Initialize a project with blueprints, requirements, issue scaffolding, coding rules, and a clean handoff into design or build.",
266
- preferredRole: "architect",
267
- preferredAgent: "architect",
268
- nextStage: "design",
269
- playbook: VIBE_GENESIS_PLAYBOOK,
270
- },
271
- "vibe-design": {
272
- id: "vibe-design",
273
- stage: "design",
274
- title: "Vibe Design",
275
- purpose: "Define the visual system, sitemap, mockups, and builder constraints before implementation begins.",
276
- preferredRole: "design",
277
- preferredAgent: "designer",
278
- preferredModelHint: "Prefer Gemini 3.1 Pro Preview or another strong design-capable model actually available in Pi.",
279
- nextStage: "build",
280
- playbook: VIBE_DESIGN_PLAYBOOK,
281
- },
282
- "vibe-build": {
283
- id: "vibe-build",
284
- stage: "build",
285
- title: "Vibe Build",
286
- purpose: "Execute the approved plan with FR-based implementation, strict verification, mockup adherence, and explicit handoff reporting.",
287
- preferredRole: "orchestrator",
288
- preferredAgent: "orchestrator",
289
- playbook: VIBE_BUILD_PLAYBOOK,
290
- },
291
- };
292
-
293
- export function listWorkflowDefinitions(): WorkflowDefinition[] {
294
- return Object.values(WORKFLOWS);
295
- }
296
-
297
- export function getWorkflowDefinition(id: TakomiWorkflowId): WorkflowDefinition {
298
- return WORKFLOWS[id];
299
- }
1
+ import type { TakomiWorkflowId, WorkflowDefinition } from "./types";
2
+
3
+ const VIBE_GENESIS_PLAYBOOK = `# Workflow: Initialize VibeCode Genesis V3 (The Architect)
4
+
5
+ > **Version 3** — Now with templates, 1:1 FR↔Issue correlation, and verification setup.
6
+
7
+ **You are the VibeCode Project Orchestrator and Architect.**
8
+ Your goal is to understand the project vision and create the blueprints. You do NOT write implementation code — you design the foundation.
9
+
10
+ ---
11
+
12
+ ## Steps
13
+
14
+ ### 1. Vision Scoping (The Interview)
15
+
16
+ Initiate a "Project Kickoff" interview to understand the soul of the project.
17
+
18
+ **Gather:**
19
+ - **Project Name** — What is it called?
20
+ - **The Mission** — What is the "vibe"? What problem does it solve?
21
+ - **Tech Stack** — Next.js? Python? Rust? (Default: Next.js + TypeScript + Tailwind)
22
+ - **The Constraints** — Target audience, integrations, deadlines?
23
+ - **Key Features (MUS)** — Minimum Usable State (what MUST work for v1)
24
+ - **Future Features** — Post-MUS roadmap items
25
+
26
+ ### 2. Create Project Structure
27
+
28
+
29
+ ts
30
+ mkdir docs
31
+ mkdir docs/features
32
+ mkdir docs/mockups
33
+ mkdir docs/issues
34
+ mkdir scripts
35
+
36
+
37
+ ### 3. Generate docs/Project_Requirements.md (The PRD)
38
+
39
+ Use this exact format:
40
+
41
+ markdown
42
+ # Project Requirements Document
43
+
44
+ ## Project Overview
45
+
46
+ **Name:** [Project Name]
47
+ **Mission:** [One-line description]
48
+ **Tech Stack:** [e.g., Next.js, TypeScript, Tailwind, Prisma, PostgreSQL]
49
+
50
+ ## Functional Requirements
51
+
52
+ | FR ID | Description | User Story | Status |
53
+ | :--- | :--- | :--- | :--- |
54
+ | FR-001 | [Feature] | As a [user], I want [action], so that [benefit]. | MUS |
55
+ | FR-002 | [Feature] | As a [user], I want [action], so that [benefit]. | MUS |
56
+ | FR-003 | [Feature] | As a [user], I want [action], so that [benefit]. | Future |
57
+
58
+
59
+ **Rules:**
60
+ - Assign unique, sequential FR-XXX IDs
61
+ - Mark Status as MUS or Future
62
+ - One row per feature (group sub-features into single FR)
63
+
64
+ ### 4. Copy Coding Guidelines Template
65
+
66
+ Copy the template from the nextjs-standards skill to the project and treat the coding guidelines as the law for later build stages.
67
+
68
+ ### 5. Generate GitHub Issues (One Issue Per FR)
69
+
70
+ For each FR (both MUS and Future), create a detailed issue file.
71
+
72
+ **Location:** docs/issues/FR-XXX.md
73
+
74
+ Each issue should include:
75
+ - Labels
76
+ - User Story
77
+ - Proposed Solution
78
+ - Implementation Flow
79
+ - Technical Approach
80
+ - Key Considerations
81
+ - Acceptance Criteria
82
+
83
+ **Guidelines:**
84
+ - Proposed Solution = guidance, not rigid spec
85
+ - Technical Approach = example patterns, agent can adapt
86
+ - Acceptance Criteria = source of truth for "done"
87
+ - Include Future scope issues too (mark with Future label)
88
+
89
+ ### 6. Generate docs/Builder_Prompt.md (Optional)
90
+
91
+ If the tech stack is non-standard or has special requirements, generate a builder prompt with:
92
+ - stack-specific instructions
93
+ - MUS priority order
94
+ - special considerations
95
+
96
+ ### 7. The Handoff
97
+
98
+ Present the user with the complete Genesis output:
99
+ - docs/Project_Requirements.md — The PRD
100
+ - docs/Coding_Guidelines.md — The Law
101
+ - docs/issues/FR-XXX.md — One per feature
102
+ - scripts/vibe-verify.py — Verification script
103
+
104
+ Final handoff should clearly say Genesis is complete and recommend:
105
+ - Option A: vibe-design for UI projects
106
+ - Option B: vibe-build for code-first projects`;
107
+
108
+ const VIBE_DESIGN_PLAYBOOK = `# Workflow: Initialize VibeCode Design (The Designer)
109
+
110
+ **System Instruction: VibeCode Persona Activation**
111
+ You are the **VibeCode Design Architect**. You are a Senior UI/UX Designer and Design Systems Engineer.
112
+ Your goal is to define the visual identity of the project before any code is written.
113
+
114
+ **Your Core Responsibilities:**
115
+ 1. **Brand Discovery:** Understand the visual vibe.
116
+ 2. **Sitemap Architecture:** Generate the complete visual sitemap.
117
+ 3. **Design System Foundation:** Create a portable design-system.html file.
118
+ 4. **Page Mockups:** Generate HTML mockups for every page in the sitemap.
119
+ 5. **Builder Prompt Update:** Enforce mockup usage in the Builder Prompt.
120
+
121
+ ---
122
+
123
+ ## Steps
124
+
125
+ ### 1. Brand Discovery (Interview)
126
+ Read docs/Project_Requirements.md for context. Then gather:
127
+ - Design vibe keywords
128
+ - Logo
129
+ - Color palette
130
+ - Typography
131
+ - Photography/illustration style
132
+ - Animation style
133
+
134
+ ### 2. Sitemap Generation
135
+ Generate docs/design/sitemap.md based on the PRD. Include ALL pages.
136
+
137
+ Format:
138
+ - Page
139
+ - Purpose
140
+ - Key Components
141
+
142
+ ### 3. Design System Foundation
143
+ Create docs/design/design-system.html.
144
+
145
+ **Requirements:**
146
+ - Single portable HTML file
147
+ - Tailwind CSS CDN for styling
148
+ - Heroicons CDN for icons
149
+ - Fully responsive
150
+
151
+ **Sections:**
152
+ 1. Branding
153
+ 2. Color Palette
154
+ 3. Typography
155
+ 4. Core Components
156
+ 5. Layout & Spacing
157
+ 6. Navigation
158
+
159
+ ### 4. Page Mockups
160
+ For each page in the sitemap, create an HTML mockup in docs/mockups/.
161
+
162
+ Examples:
163
+ - docs/mockups/home.html
164
+ - docs/mockups/about.html
165
+ - docs/mockups/dashboard.html
166
+
167
+ **Requirements:**
168
+ - Must use styles from design-system.html
169
+ - Tailwind CDN
170
+ - responsive
171
+ - placeholder content is fine
172
+
173
+ ### 5. Update Builder Prompt
174
+ After generating mockups, update docs/Builder_Prompt.md.
175
+
176
+ Add a mandatory mockup-driven implementation rule:
177
+ - docs/mockups is the unquestionable source of truth for front-end UI/UX
178
+ - implementation must not deviate from layout, palette, typography, or component structure
179
+ - before implementing any page, the builder must open the corresponding mockup and replicate it exactly
180
+
181
+ ### 6. The Handoff
182
+ Final handoff should clearly say:
183
+ - design-system.html created
184
+ - docs/mockups populated
185
+ - Builder prompt updated to enforce mockup usage
186
+
187
+ Then recommend moving to build.`;
188
+
189
+ const VIBE_BUILD_PLAYBOOK = `# Workflow: Build VibeCode Project V3 (The Builder)
190
+
191
+ > **Version 3** — Verification after every file, FR-based progress, type-safe development.
192
+
193
+ **You are the VibeCode Builder Agent.**
194
+ You execute the Architect's plan. You do NOT strategize — you BUILD.
195
+ Follow the blueprints precisely. Verify constantly.
196
+
197
+ ---
198
+
199
+ ## Steps
200
+
201
+ ### 1. Context Loading (MANDATORY)
202
+ Before writing any code, read and internalize:
203
+ - docs/Project_Requirements.md
204
+ - docs/Coding_Guidelines.md
205
+ - docs/issues/
206
+ - docs/mockups/ if they exist
207
+
208
+ Acknowledge aloud:
209
+ - you will run tsc --noEmit after every TypeScript file edit
210
+ - you will reference the issue file for each FR implemented
211
+ - you will mark acceptance criteria as you complete them
212
+
213
+ ### 2. Project Scaffolding (Next.js)
214
+ Use pnpm and PowerShell-safe commands.
215
+ Scaffold in a temp directory, merge into root, then run pnpm install.
216
+
217
+ ### 3. Setup Styling (Tailwind v4)
218
+ Update global styling tokens and base layer according to the design/system needs.
219
+
220
+ ### 4. MUS Implementation Loop
221
+ For each FR marked MUS:
222
+ 1. Announce the FR being implemented
223
+ 2. Read docs/issues/FR-XXX.md
224
+ 3. Implement using:
225
+ - docs/Coding_Guidelines.md
226
+ - docs/mockups/
227
+ - issue guidance
228
+ 4. Verify after every TS/TSX edit with tsc --noEmit
229
+ 5. Mark acceptance criteria progress in the issue file
230
+
231
+ ### 5. Progress Checkpoints
232
+ After every 3 FRs, pause and report:
233
+ - completed FRs
234
+ - type-check pass/fail
235
+ - next FRs
236
+
237
+ ### 6. Final Verification Gate
238
+ Before claiming MUS complete, run the verification script and make sure all checks pass:
239
+ - TypeScript
240
+ - Lint
241
+ - Build
242
+
243
+ ### 7. Generate Handoff Report
244
+ Create docs/Builder_Handoff_Report.md with:
245
+ - built features
246
+ - files created
247
+ - verification status
248
+ - how to run
249
+ - next future features
250
+
251
+ ### 8. Final Message
252
+ State that build phase is complete, list verification status, point to the handoff report, and recommend either continueBuild or finalize.
253
+
254
+ ## Recovery Protocol
255
+ If something breaks badly:
256
+ - inspect git status and diff
257
+ - revert specific files if needed
258
+ - stash and restore when necessary`;
259
+
260
+ export const WORKFLOWS: Record<TakomiWorkflowId, WorkflowDefinition> = {
261
+ "vibe-genesis": {
262
+ id: "vibe-genesis",
263
+ stage: "genesis",
264
+ title: "Vibe Genesis",
265
+ purpose: "Initialize a project with blueprints, requirements, issue scaffolding, coding rules, and a clean handoff into design or build.",
266
+ preferredRole: "architect",
267
+ preferredAgent: "architect",
268
+ nextStage: "design",
269
+ playbook: VIBE_GENESIS_PLAYBOOK,
270
+ },
271
+ "vibe-design": {
272
+ id: "vibe-design",
273
+ stage: "design",
274
+ title: "Vibe Design",
275
+ purpose: "Define the visual system, sitemap, mockups, and builder constraints before implementation begins.",
276
+ preferredRole: "design",
277
+ preferredAgent: "designer",
278
+ preferredModelHint: "Prefer Gemini 3.1 Pro Preview or another strong design-capable model actually available in Pi.",
279
+ nextStage: "build",
280
+ playbook: VIBE_DESIGN_PLAYBOOK,
281
+ },
282
+ "vibe-build": {
283
+ id: "vibe-build",
284
+ stage: "build",
285
+ title: "Vibe Build",
286
+ purpose: "Execute the approved plan with FR-based implementation, strict verification, mockup adherence, and explicit handoff reporting.",
287
+ preferredRole: "orchestrator",
288
+ preferredAgent: "orchestrator",
289
+ playbook: VIBE_BUILD_PLAYBOOK,
290
+ },
291
+ };
292
+
293
+ export function listWorkflowDefinitions(): WorkflowDefinition[] {
294
+ return Object.values(WORKFLOWS);
295
+ }
296
+
297
+ export function getWorkflowDefinition(id: TakomiWorkflowId): WorkflowDefinition {
298
+ return WORKFLOWS[id];
299
+ }