takomi 2.1.38 → 2.1.40

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 (90) hide show
  1. package/.agents/plugins/marketplace.json +32 -0
  2. package/.pi/agents/architect.md +4 -2
  3. package/.pi/agents/designer.md +2 -0
  4. package/.pi/agents/orchestrator.md +9 -9
  5. package/.pi/prompts/design-prompt.md +3 -1
  6. package/.pi/prompts/genesis-prompt.md +2 -0
  7. package/.pi/prompts/takomi-prompt.md +10 -9
  8. package/README.md +218 -409
  9. package/assets/.agent/skills/takomi-flow/SKILL.md +244 -0
  10. package/assets/.agent/workflows/README.md +3 -3
  11. package/assets/.agent/workflows/mode-architect.md +7 -5
  12. package/assets/.agent/workflows/vibe-design.md +3 -1
  13. package/assets/.agent/workflows/vibe-genesis.md +2 -0
  14. package/assets/Takomi-Agents/custom_modes.yaml +1253 -1252
  15. package/assets/Takomi-Agents/vibe-architect.yaml +11 -6
  16. package/assets/Takomi-Agents/vibe-orchestrator.yaml +2 -2
  17. package/docs/features/TakomiFlow_Portable_Plugin.md +82 -0
  18. package/docs/takomi-flow-onboarding.md +86 -0
  19. package/docs/takomi-flow-public-distribution.md +94 -0
  20. package/package.json +19 -2
  21. package/plugins/takomi-codex/.codex-plugin/plugin.json +37 -0
  22. package/plugins/takomi-codex/assets/composer-icon.png +0 -0
  23. package/plugins/takomi-codex/assets/logo-dark.png +0 -0
  24. package/plugins/takomi-codex/assets/logo.png +0 -0
  25. package/plugins/takomi-codex/scripts/takomi-board.ps1 +197 -0
  26. package/plugins/takomi-codex/scripts/takomi-detect.ps1 +125 -0
  27. package/plugins/takomi-codex/scripts/takomi-doctor.ps1 +88 -0
  28. package/plugins/takomi-codex/scripts/takomi-harness.ps1 +52 -0
  29. package/plugins/takomi-codex/scripts/takomi-pi-dispatch.ps1 +93 -0
  30. package/plugins/takomi-codex/scripts/takomi-policy.ps1 +108 -0
  31. package/plugins/takomi-codex/skills/takomi-codex/SKILL.md +194 -0
  32. package/plugins/takomi-flow/.codex-plugin/plugin.json +36 -0
  33. package/plugins/takomi-flow/.mcp.json +11 -0
  34. package/plugins/takomi-flow/assets/capabilities.json +203 -0
  35. package/plugins/takomi-flow/assets/collection.schema.json +29 -0
  36. package/plugins/takomi-flow/assets/composer-icon.png +0 -0
  37. package/plugins/takomi-flow/assets/examples.json +94 -0
  38. package/plugins/takomi-flow/assets/logo-dark.png +0 -0
  39. package/plugins/takomi-flow/assets/logo.png +0 -0
  40. package/plugins/takomi-flow/assets/request.schema.json +91 -0
  41. package/plugins/takomi-flow/assets/result.schema.json +46 -0
  42. package/plugins/takomi-flow/assets/templates/image-request.json +17 -0
  43. package/plugins/takomi-flow/assets/templates/video-request.json +19 -0
  44. package/plugins/takomi-flow/package.json +38 -0
  45. package/plugins/takomi-flow/pnpm-lock.yaml +813 -0
  46. package/plugins/takomi-flow/references/flow-provider-contract.md +349 -0
  47. package/plugins/takomi-flow/scripts/lib/agent-plan.mjs +140 -0
  48. package/plugins/takomi-flow/scripts/lib/api.mjs +113 -0
  49. package/plugins/takomi-flow/scripts/lib/args.mjs +66 -0
  50. package/plugins/takomi-flow/scripts/lib/audit.mjs +65 -0
  51. package/plugins/takomi-flow/scripts/lib/browser.mjs +78 -0
  52. package/plugins/takomi-flow/scripts/lib/capabilities.mjs +11 -0
  53. package/plugins/takomi-flow/scripts/lib/collect.mjs +53 -0
  54. package/plugins/takomi-flow/scripts/lib/commands.mjs +192 -0
  55. package/plugins/takomi-flow/scripts/lib/doctor.mjs +77 -0
  56. package/plugins/takomi-flow/scripts/lib/examples.mjs +17 -0
  57. package/plugins/takomi-flow/scripts/lib/flow-media.mjs +39 -0
  58. package/plugins/takomi-flow/scripts/lib/flow-outcome.mjs +115 -0
  59. package/plugins/takomi-flow/scripts/lib/flow-project-session.mjs +153 -0
  60. package/plugins/takomi-flow/scripts/lib/flow-ui.mjs +204 -0
  61. package/plugins/takomi-flow/scripts/lib/generation.mjs +190 -0
  62. package/plugins/takomi-flow/scripts/lib/inspect.mjs +81 -0
  63. package/plugins/takomi-flow/scripts/lib/mcp-prompts.mjs +39 -0
  64. package/plugins/takomi-flow/scripts/lib/mcp-resources.mjs +16 -0
  65. package/plugins/takomi-flow/scripts/lib/mcp-tools.mjs +165 -0
  66. package/plugins/takomi-flow/scripts/lib/media.mjs +78 -0
  67. package/plugins/takomi-flow/scripts/lib/observe.mjs +54 -0
  68. package/plugins/takomi-flow/scripts/lib/paths.mjs +37 -0
  69. package/plugins/takomi-flow/scripts/lib/playwright-loader.mjs +23 -0
  70. package/plugins/takomi-flow/scripts/lib/prompts.mjs +72 -0
  71. package/plugins/takomi-flow/scripts/lib/report.mjs +141 -0
  72. package/plugins/takomi-flow/scripts/lib/request-validator.mjs +73 -0
  73. package/plugins/takomi-flow/scripts/lib/request.mjs +66 -0
  74. package/plugins/takomi-flow/scripts/lib/resource-files.mjs +69 -0
  75. package/plugins/takomi-flow/scripts/lib/result.mjs +31 -0
  76. package/plugins/takomi-flow/scripts/lib/review.mjs +44 -0
  77. package/plugins/takomi-flow/scripts/lib/selftest.mjs +153 -0
  78. package/plugins/takomi-flow/scripts/lib/settings-plan.mjs +44 -0
  79. package/plugins/takomi-flow/scripts/lib/templates.mjs +37 -0
  80. package/plugins/takomi-flow/scripts/lib/trusted-chrome.mjs +67 -0
  81. package/plugins/takomi-flow/scripts/lib/workflow.mjs +56 -0
  82. package/plugins/takomi-flow/scripts/mcp-server.mjs +18 -0
  83. package/plugins/takomi-flow/scripts/mcp-smoke.mjs +144 -0
  84. package/plugins/takomi-flow/scripts/takomi-flow.mjs +17 -0
  85. package/plugins/takomi-flow/skills/takomi-flow/SKILL.md +244 -0
  86. package/plugins/takomi-flow/skills/takomi-flow/agents/openai.yaml +7 -0
  87. package/scripts/install-takomi-flow.ps1 +85 -0
  88. package/src/pi-takomi-core/orchestration.ts +1 -1
  89. package/src/pi-takomi-core/workflows.ts +4 -4
  90. package/src/skills-catalog.js +11 -7
@@ -8,8 +8,8 @@ customModes:
8
8
  an excellent planner. Your goal is to gather information, understand context,
9
9
  and create detailed, actionable plans for accomplishing the user's task.
10
10
 
11
- You do NOT write implementation code - you design the solution. You create
12
- technical specifications, design system architecture, and break down complex
11
+ You do NOT write implementation code - you create the technical plan. You create
12
+ technical specifications, system architecture, and break down complex
13
13
  problems into clear steps that builders can execute.
14
14
  whenToUse: >-
15
15
  Use /vibe-architect when:
@@ -21,7 +21,7 @@ customModes:
21
21
  - Evaluating different approaches
22
22
  - Creating PRDs (Project Requirements Documents)
23
23
  - Designing APIs and data models
24
- - Creating design systems and mockups
24
+ - Creating UI/UX design handoff requirements without replacing `/vibe-design`
25
25
  groups:
26
26
  - read
27
27
  - - edit
@@ -39,7 +39,7 @@ customModes:
39
39
  │ ARCHITECT MODE PATTERN │
40
40
  ├─────────────────────────────────────────────────────────────┤
41
41
  │ │
42
- │ GATHER ──► ANALYZE ──► DESIGN ──► PLAN ──► HANDOFF
42
+ │ GATHER ──► ANALYZE ──► TECHNICAL DESIGN ──► PLAN ──► HANDOFF
43
43
  │ │ │ │ │ │ │
44
44
  │ ▼ ▼ ▼ ▼ ▼ │
45
45
  │ Requirements Context Solution Steps Builder │
@@ -139,7 +139,12 @@ customModes:
139
139
  > **Trade-offs:**
140
140
  > - [What we give up]
141
141
 
142
- ## Phase 3: Design
142
+ ## Phase 3: Technical Design
143
+
144
+ This is technical planning, not the Takomi `/vibe-design` lifecycle stage.
145
+ Use this phase for architecture, data models, API contracts, implementation plans,
146
+ and technical boundaries. Use `/vibe-design` only for UI/UX, visual systems,
147
+ user journeys, interaction flows, and mockups.
143
148
 
144
149
  ### 3.1 Data Models
145
150
 
@@ -173,7 +178,7 @@ customModes:
173
178
 
174
179
  ### 3.3 Component Architecture
175
180
 
176
- Design the UI structure:
181
+ Define the technical UI/component structure:
177
182
 
178
183
  ```
179
184
  App
@@ -157,7 +157,7 @@ customModes:
157
157
  |----------|-----------|---------------|---------|
158
158
  | /vibe-primeAgent | ✅ Always | ALL tasks | Load project context |
159
159
  | /vibe-genesis | ✅ Yes | Phase 1: Planning | Generate PRD + issues |
160
- | /vibe-design | ✅ Yes | Phase 2: Design | Design system + mockups |
160
+ | /vibe-design | ✅ Yes | Phase 2: UI/UX Design | Design system + mockups |
161
161
  | /vibe-build | ✅ Yes | Phase 3: Build | Scaffold + implement |
162
162
  | /vibe-continueBuild | ⚠️ Maybe | Phase 3b | Resume incomplete builds |
163
163
  | /vibe-finalize | ✅ Yes | Phase 4: Quality | Verify + document |
@@ -705,7 +705,7 @@ customModes:
705
705
  | Work Type | Assigned Mode | Default Workflow | Default Skills |
706
706
  |-----------|---------------|------------------|----------------|
707
707
  | Architecture & Planning | `vibe-architect` | `/vibe-genesis` | `nextjs-standards` |
708
- | Design & UI | `vibe-architect` | `/vibe-design` | `ui-ux-pro-max`, `frontend-design` |
708
+ | UI/UX Design | `vibe-architect` | `/vibe-design` | `ui-ux-pro-max`, `frontend-design` |
709
709
  | Implementation | `vibe-code` | `/vibe-build` | `nextjs-standards`, `context7` |
710
710
  | AI Features | `vibe-code` | — | `ai-sdk` |
711
711
  | Debugging | `vibe-debug` | — | — |
@@ -0,0 +1,82 @@
1
+ # TakomiFlow Portable Plugin
2
+
3
+ ## Goal
4
+
5
+ Move the proven TakomiFlow Google Flow automation into this repository as the source-of-truth portable package so users and agents can install it on fresh machines, reuse existing trusted Chrome sessions, and operate through MCP when available or CLI when not.
6
+
7
+ ## Components
8
+
9
+ ### Codex Plugin
10
+
11
+ - `plugins/takomi-flow/`
12
+ - source-of-truth plugin package
13
+ - bundled skill, MCP server, CLI, schemas, prompts, and provider contract
14
+ - branded icon assets for store listing, dark mode, and composer surfaces
15
+ - browser automation scripts for trusted Chrome attach and Flow generation
16
+ - `.agents/plugins/marketplace.json`
17
+ - repo-local marketplace entry for `takomi-flow`
18
+ - `scripts/install-takomi-flow.ps1`
19
+ - optional installer for copying/registering the plugin into user/global Codex plugin paths
20
+ - `assets/.agent/skills/takomi-flow/SKILL.md`
21
+ - standalone harness-visible skill for agents that do not load Codex plugin skills
22
+ - merged install/repair and runtime workflow instructions so agents have one TakomiFlow entrypoint
23
+
24
+ ### Agent Surface
25
+
26
+ - First-run agents should run `doctor`, then check whether `http://127.0.0.1:9222` is already serving Chrome DevTools Protocol.
27
+ - If CDP is alive, agents should reuse it.
28
+ - If CDP is missing, agents should start `trusted-chrome` and ask the user to sign into Google Flow manually.
29
+ - For repeated generations, agents should reuse the current Flow project tab or pass `projectUrl`; clicking `New project` requires explicit `allowNewProject`.
30
+ - If a project chat is stale or broken, agents should recover by creating a fresh chat inside the same project before asking for manual intervention.
31
+ - Agents should prefer MCP tools when the harness supports MCP and the plugin is installed.
32
+ - Agents should offer plugin installation/repair in Codex only after user approval.
33
+ - Agents should fall back to CLI commands and standalone skill instructions when MCP or plugins are absent.
34
+
35
+ ### Runtime Surface
36
+
37
+ - CLI-first core: `node scripts/takomi-flow.mjs <command>`.
38
+ - MCP adapter: `node scripts/mcp-server.mjs`.
39
+ - Browser profile: user-local trusted Chrome profile by default.
40
+ - Outputs: run folders with `run.json`, `assets.json`, `report.md`, screenshots, downloads, and optional video frames.
41
+
42
+ ## Data Flow
43
+
44
+ 1. Agent discovers or installs the plugin from this repo.
45
+ 2. Agent runs readiness checks.
46
+ 3. Agent checks for an existing trusted Chrome CDP instance.
47
+ 4. Agent reuses the instance or launches trusted Chrome.
48
+ 5. User signs in manually when needed.
49
+ 6. Agent resolves the target project from `projectUrl` or the current project tab.
50
+ 7. Agent prepares and validates a Flow request.
51
+ 8. Agent submits only with explicit spend approval.
52
+ 9. Agent records `projectUrl`, downloads assets, catalogs outputs, and writes a report.
53
+
54
+ ## Database Schema
55
+
56
+ No database is required.
57
+
58
+ Persistent state is file-based:
59
+
60
+ - request JSON under `requests/`
61
+ - run metadata in `run.json`
62
+ - asset metadata in `assets.json`
63
+ - Markdown handoff in `report.md`
64
+
65
+ ## Install / Portability Rules
66
+
67
+ - MCP is optional, not required.
68
+ - A harness without MCP can still use the CLI and skill instructions.
69
+ - A fresh computer can bootstrap by running the repo installer or directly invoking the plugin CLI from this repo.
70
+ - Global/user writes must be explicit installer actions, not hidden side effects.
71
+ - Project URLs must be captured for every generated Flow project.
72
+ - New Flow projects are opt-in; project reuse is the default.
73
+
74
+ ## Verification
75
+
76
+ - Plugin validation should pass with the Codex plugin validator.
77
+ - Skill validation should pass with the Codex skill validator.
78
+ - MCP smoke should pass when Node dependencies are installed.
79
+ - CLI `doctor`, `capabilities`, `template`, `workflow`, `inspect`, `assets`, and `report` should work without MCP.
80
+ - Store art should resolve from `assets/logo.png`, `assets/logo-dark.png`, and `assets/composer-icon.png`.
81
+ - Store examples should show real creative workflows, not only a generic safe browser workflow prompt.
82
+ - The generated neon TakomiFlow icon is used as the plugin logo and composer icon source.
@@ -0,0 +1,86 @@
1
+ # TakomiFlow Onboarding
2
+
3
+ TakomiFlow is packaged in this repo at `plugins/takomi-flow`.
4
+
5
+ ## First Run
6
+
7
+ If all you have is a skill, use the bundled `takomi-flow` skill. It is the single front door: it can operate an already-installed plugin through MCP or CLI, install or repair the Codex plugin after user approval, or stay in skill/CLI mode for harnesses that do not support Codex plugins.
8
+
9
+ 1. Install or register the plugin:
10
+
11
+ ```powershell
12
+ ./scripts/install-takomi-flow.ps1 -InstallDependencies
13
+ ```
14
+
15
+ 2. Check the local runtime:
16
+
17
+ ```powershell
18
+ node plugins/takomi-flow/scripts/takomi-flow.mjs doctor
19
+ ```
20
+
21
+ 3. Check whether a trusted Chrome instance is already running:
22
+
23
+ ```powershell
24
+ Invoke-WebRequest http://127.0.0.1:9222/json/version -UseBasicParsing
25
+ ```
26
+
27
+ 4. If Chrome is already running on port `9222`, reuse it with:
28
+
29
+ ```powershell
30
+ --cdp-url http://127.0.0.1:9222
31
+ ```
32
+
33
+ 5. If Chrome is not running, launch it:
34
+
35
+ ```powershell
36
+ node plugins/takomi-flow/scripts/takomi-flow.mjs trusted-chrome
37
+ ```
38
+
39
+ 6. Sign into Google Flow manually in the opened browser.
40
+
41
+ 7. Run a no-spend observe before generation:
42
+
43
+ ```powershell
44
+ node plugins/takomi-flow/scripts/takomi-flow.mjs observe --allow-browser --cdp-url http://127.0.0.1:9222
45
+ ```
46
+
47
+ ## Reusing One Flow Project
48
+
49
+ For repeated generations, leave trusted Chrome open on the Flow project editor and reuse it:
50
+
51
+ ```powershell
52
+ node plugins/takomi-flow/scripts/takomi-flow.mjs workflow --kind video --prompt "cinematic lab scene" --project-url "https://labs.google/fx/tools/flow/project/..." --submit --allow-browser --allow-spend --cdp-url http://127.0.0.1:9222
53
+ ```
54
+
55
+ TakomiFlow does not click `New project` unless `--allow-new-project` is set. If a chat surface is stale or broken, it tries one fresh chat inside the same project before asking for manual help.
56
+
57
+ ## MCP Or CLI
58
+
59
+ - If the harness supports MCP, use TakomiFlow MCP tools.
60
+ - If MCP is unavailable, use the CLI commands directly.
61
+ - If a harness has neither MCP nor shell access, use the skill instructions as a handoff checklist for a human/operator.
62
+
63
+ Generation is always spend-gated. Use `--allow-spend` only after explicit approval.
64
+
65
+ ## Finding It In Codex
66
+
67
+ After this repo is installed or registered, Codex should show:
68
+
69
+ - `Takomi Codex` under the `J StaR Films Studios` marketplace section.
70
+ - `TakomiFlow` under the same marketplace section.
71
+
72
+ On the developer machine, a second `TakomiFlow` may also appear under `Personal` if `scripts/install-takomi-flow.ps1` copied the plugin into `~/plugins/takomi-flow` and registered `~/.agents/plugins/marketplace.json`. That personal entry is useful for local testing; the repo entry is the package source other people should install.
73
+
74
+ People can search for:
75
+
76
+ - `TakomiFlow`
77
+ - `Flow`
78
+ - `Google Flow`
79
+ - `image generation`
80
+ - `video generation`
81
+ - `asset pipeline`
82
+ - `Takomi`
83
+
84
+ If they only have the skill and not the plugin, search/install:
85
+
86
+ - `takomi-flow`
@@ -0,0 +1,94 @@
1
+ # TakomiFlow Public Distribution
2
+
3
+ TakomiFlow is packaged in this repo, but users need one distribution path before it can appear in their Codex Store.
4
+
5
+ ## NPM Package Strategy
6
+
7
+ Do not create a second npm package by default.
8
+
9
+ TakomiFlow should ship inside the existing `takomi` / VibeCode Protocol Suite package:
10
+
11
+ - `plugins/takomi-flow` contains the Codex plugin.
12
+ - `assets/.agent/skills/takomi-flow` contains the standalone non-plugin skill for harnesses that read bundled skills, plus the install/repair instructions for Codex plugin use.
13
+ - `scripts/install-takomi-flow.ps1` installs/registers the bundled plugin into the user's global Codex plugin location.
14
+
15
+ A separate `takomi-flow` npm package would only be useful later if TakomiFlow needs independent versioning, releases, or dependencies. For now, keeping it inside the existing suite avoids duplicated publishing, duplicated docs, and version drift.
16
+
17
+ ## Best Path
18
+
19
+ Publish or distribute the VibeCode Protocol Suite, then let users install the TakomiFlow plugin from the suite bundle.
20
+
21
+ Once they have the suite from GitHub or the published `takomi` package:
22
+
23
+ ```powershell
24
+ git clone https://github.com/JStaRFilms/VibeCode-Protocol-Suite "$HOME\Source\VibeCode-Protocol-Suite"
25
+ cd "$HOME\Source\VibeCode-Protocol-Suite"
26
+ .\scripts\install-takomi-flow.ps1 -InstallDependencies
27
+ ```
28
+
29
+ That installs:
30
+
31
+ ```text
32
+ ~/plugins/takomi-flow
33
+ ~/.agents/plugins/marketplace.json
34
+ ```
35
+
36
+ Then Codex can show TakomiFlow in the personal/store plugin list.
37
+
38
+ ## Skill-Only Bootstrap
39
+
40
+ If a user only has skills and no plugin yet, give them the bundled `takomi-flow` skill. That one skill teaches Codex or another harness how to:
41
+
42
+ 1. Check whether TakomiFlow is already installed.
43
+ 2. Clone or locate the VibeCode Protocol Suite.
44
+ 3. Run `scripts/install-takomi-flow.ps1`.
45
+ 4. Install dependencies.
46
+ 5. Verify the plugin with `doctor`.
47
+ 6. Reuse or launch trusted Chrome.
48
+
49
+ This is the lightest path when the full plugin is not installed yet, while avoiding a confusing second TakomiFlow installer skill.
50
+
51
+ ## MCP Is Optional
52
+
53
+ TakomiFlow should be useful in three tiers:
54
+
55
+ - Full Codex plugin and MCP tools when the harness supports them.
56
+ - CLI-only operation when MCP is unavailable.
57
+ - Skill-only install instructions when the plugin is missing.
58
+
59
+ The CLI entrypoint remains:
60
+
61
+ ```powershell
62
+ node "$HOME\plugins\takomi-flow\scripts\takomi-flow.mjs" <command>
63
+ ```
64
+
65
+ ## Store Search Terms
66
+
67
+ Users should be able to find it by searching:
68
+
69
+ - `TakomiFlow`
70
+ - `Takomi Flow`
71
+ - `Google Flow`
72
+ - `Flow automation`
73
+ - `image generation`
74
+ - `video generation`
75
+ - `asset pipeline`
76
+ - `Takomi`
77
+
78
+ ## Publishing Checklist
79
+
80
+ Before telling users it is public:
81
+
82
+ 1. Push this repo to GitHub.
83
+ 2. Confirm `plugins/takomi-flow` is included.
84
+ 3. Confirm `assets/.agent/skills/takomi-flow` is included.
85
+ 4. Confirm `npm pack --dry-run` includes TakomiFlow files but not `plugins/takomi-flow/node_modules`.
86
+ 5. Publish/update the existing `takomi` npm package or release archive.
87
+ 6. Test on a clean user profile:
88
+
89
+ ```powershell
90
+ .\scripts\install-takomi-flow.ps1 -InstallDependencies
91
+ node "$HOME\plugins\takomi-flow\scripts\takomi-flow.mjs" doctor
92
+ ```
93
+
94
+ 7. Open Codex Store and search `TakomiFlow`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "takomi",
3
- "version": "2.1.38",
3
+ "version": "2.1.40",
4
4
  "description": "🎯 Stop wrestling with AI. Start building with purpose. The artisan's toolkit for agent workflows, Codex skills, and original Takomi capabilities like 21st.dev integration.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,6 +10,20 @@
10
10
  "bin",
11
11
  "src",
12
12
  "assets",
13
+ "docs/takomi-flow-onboarding.md",
14
+ "docs/takomi-flow-public-distribution.md",
15
+ "docs/features/TakomiFlow_Portable_Plugin.md",
16
+ "plugins/takomi-codex",
17
+ "plugins/takomi-flow/.codex-plugin",
18
+ "plugins/takomi-flow/.mcp.json",
19
+ "plugins/takomi-flow/assets",
20
+ "plugins/takomi-flow/package.json",
21
+ "plugins/takomi-flow/pnpm-lock.yaml",
22
+ "plugins/takomi-flow/references",
23
+ "plugins/takomi-flow/scripts",
24
+ "plugins/takomi-flow/skills",
25
+ ".agents/plugins/marketplace.json",
26
+ "scripts/install-takomi-flow.ps1",
13
27
  ".pi/README.md",
14
28
  ".pi/agents",
15
29
  ".pi/extensions",
@@ -26,7 +40,10 @@
26
40
  "test": "npm run test:typecheck && npm run test:regressions && npm run test:skills",
27
41
  "test:typecheck": "tsc --noEmit",
28
42
  "test:regressions": "node scripts/test-regressions.js",
29
- "test:skills": "node scripts/test-skill-selection.js"
43
+ "test:skills": "node scripts/test-skill-selection.js",
44
+ "takomi-flow:doctor": "node plugins/takomi-flow/scripts/takomi-flow.mjs doctor",
45
+ "takomi-flow:selftest": "node plugins/takomi-flow/scripts/takomi-flow.mjs selftest",
46
+ "takomi-flow:mcp-smoke": "node plugins/takomi-flow/scripts/mcp-smoke.mjs"
30
47
  },
31
48
  "repository": {
32
49
  "type": "git",
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "takomi-codex",
3
+ "version": "0.1.0+codex.20260628231636",
4
+ "description": "Takomi orchestration, policy, and roadbook adapter for Codex.",
5
+ "author": {
6
+ "name": "J StaR Films Studios"
7
+ },
8
+ "license": "ISC",
9
+ "keywords": [
10
+ "takomi",
11
+ "codex",
12
+ "orchestration",
13
+ "pi",
14
+ "roadbooks"
15
+ ],
16
+ "skills": "./skills/",
17
+ "interface": {
18
+ "displayName": "Takomi Codex",
19
+ "shortDescription": "Use Takomi lifecycle orchestration inside Codex.",
20
+ "longDescription": "Takomi Codex brings Takomi's Genesis, Design, Build, review, policy, and markdown roadbook workflows into Codex while adapting to local Pi/Takomi runtime state when present.",
21
+ "developerName": "J StaR Films Studios",
22
+ "category": "Productivity",
23
+ "capabilities": [
24
+ "Write",
25
+ "Interactive"
26
+ ],
27
+ "defaultPrompt": [
28
+ "Use Takomi to plan this feature.",
29
+ "Create a Takomi roadbook for this work.",
30
+ "Inspect the local Takomi runtime."
31
+ ],
32
+ "brandColor": "#18CFE4",
33
+ "composerIcon": "./assets/composer-icon.png",
34
+ "logo": "./assets/logo.png",
35
+ "logoDark": "./assets/logo-dark.png"
36
+ }
37
+ }
@@ -0,0 +1,197 @@
1
+ param(
2
+ [ValidateSet("create", "show", "add-task", "update-task", "complete-task", "summary")]
3
+ [string]$Action = "show",
4
+ [string]$Root,
5
+ [string]$SessionId,
6
+ [string]$Title = "Takomi Codex Session",
7
+ [string]$TaskId,
8
+ [string]$TaskTitle,
9
+ [string]$Objective,
10
+ [ValidateSet("pending", "in-progress", "completed", "blocked")]
11
+ [string]$Status,
12
+ [string]$Notes
13
+ )
14
+
15
+ $ErrorActionPreference = "Stop"
16
+
17
+ function Get-DefaultRoot {
18
+ $pluginRoot = Split-Path -Parent $PSScriptRoot
19
+ $pluginsRoot = Split-Path -Parent $pluginRoot
20
+ return Split-Path -Parent $pluginsRoot
21
+ }
22
+
23
+ function New-SafeSlug([string]$Text) {
24
+ $value = ($Text ?? "task").ToLowerInvariant()
25
+ $value = $value -replace "[^a-z0-9]+", "-"
26
+ $value = $value.Trim("-")
27
+ if (-not $value) { return "task" }
28
+ return $value.Substring(0, [Math]::Min(48, $value.Length))
29
+ }
30
+
31
+ function New-SessionId {
32
+ return "orch-" + (Get-Date -Format "yyyyMMdd-HHmmss")
33
+ }
34
+
35
+ function Get-BoardRoot([string]$ProjectRoot) {
36
+ return Join-Path $ProjectRoot "docs\tasks\orchestrator-sessions"
37
+ }
38
+
39
+ function Get-SessionRoot([string]$ProjectRoot, [string]$Id) {
40
+ return Join-Path (Get-BoardRoot $ProjectRoot) $Id
41
+ }
42
+
43
+ function Assert-SafeId([string]$Value, [string]$Name) {
44
+ if ($Value -notmatch "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$") {
45
+ throw "$Name must use only letters, numbers, hyphen, or underscore."
46
+ }
47
+ }
48
+
49
+ function Ensure-SessionFolders([string]$PathValue) {
50
+ foreach ($folder in @("", "pending", "in-progress", "completed", "blocked")) {
51
+ $target = if ($folder) { Join-Path $PathValue $folder } else { $PathValue }
52
+ New-Item -ItemType Directory -Force -Path $target | Out-Null
53
+ }
54
+ }
55
+
56
+ function Get-TaskPath([string]$SessionRoot, [string]$Folder, [string]$Id, [string]$TaskName) {
57
+ $slug = New-SafeSlug $TaskName
58
+ return Join-Path (Join-Path $SessionRoot $Folder) "$Id`_$slug.task.md"
59
+ }
60
+
61
+ function Find-TaskFile([string]$SessionRoot, [string]$Id) {
62
+ foreach ($folder in @("pending", "in-progress", "completed", "blocked")) {
63
+ $dir = Join-Path $SessionRoot $folder
64
+ $match = Get-ChildItem -LiteralPath $dir -Filter "$Id`_*.task.md" -ErrorAction SilentlyContinue | Select-Object -First 1
65
+ if ($match) { return $match.FullName }
66
+ }
67
+ return $null
68
+ }
69
+
70
+ function Write-MasterPlan([string]$PathValue, [string]$Name) {
71
+ $text = @"
72
+ # $Name
73
+
74
+ ## Goal
75
+
76
+ Define the work, route it through Takomi, and keep progress visible.
77
+
78
+ ## Context Intake
79
+
80
+ - Project requirements reviewed: pending
81
+ - Feature docs reviewed: pending
82
+ - Runtime policy reviewed: pending
83
+
84
+ ## Execution Mode
85
+
86
+ - Direct Codex work when sufficient
87
+ - Markdown roadbook for coordination
88
+ - Pi/Takomi or multi-agent/subagent delegation only when useful and available
89
+ - User-owned Codex threads only when explicitly requested or recommended and approved
90
+
91
+ ## Tasks
92
+
93
+ | Task | Status | Notes |
94
+ | --- | --- | --- |
95
+
96
+ ## Verification
97
+
98
+ - [ ] Required docs updated
99
+ - [ ] Implementation verified
100
+ - [ ] Summary written
101
+ "@
102
+ Set-Content -LiteralPath (Join-Path $PathValue "master_plan.md") -Value $text -Encoding UTF8
103
+ }
104
+
105
+ $projectRoot = if ($Root) { $Root } else { Get-DefaultRoot }
106
+ $projectRoot = (Resolve-Path -LiteralPath $projectRoot).Path
107
+
108
+ if (-not $SessionId -and $Action -eq "create") { $SessionId = New-SessionId }
109
+ if (-not $SessionId) {
110
+ $boardRoot = Get-BoardRoot $projectRoot
111
+ $latest = Get-ChildItem -LiteralPath $boardRoot -Directory -ErrorAction SilentlyContinue |
112
+ Sort-Object LastWriteTime -Descending |
113
+ Select-Object -First 1
114
+ if ($latest) { $SessionId = $latest.Name }
115
+ }
116
+ if (-not $SessionId) { throw "SessionId is required. Use -Action create first." }
117
+ Assert-SafeId $SessionId "SessionId"
118
+
119
+ $sessionRoot = Get-SessionRoot $projectRoot $SessionId
120
+
121
+ switch ($Action) {
122
+ "create" {
123
+ Ensure-SessionFolders $sessionRoot
124
+ if (-not (Test-Path -LiteralPath (Join-Path $sessionRoot "master_plan.md"))) {
125
+ Write-MasterPlan $sessionRoot $Title
126
+ }
127
+ Write-Output "Created Takomi roadbook: $sessionRoot"
128
+ Write-Output "SessionId: $SessionId"
129
+ }
130
+ "show" {
131
+ if (-not (Test-Path -LiteralPath $sessionRoot)) { throw "Roadbook not found: $sessionRoot" }
132
+ Write-Output "Takomi roadbook: $sessionRoot"
133
+ foreach ($folder in @("pending", "in-progress", "completed", "blocked")) {
134
+ $count = @(Get-ChildItem -LiteralPath (Join-Path $sessionRoot $folder) -Filter "*.task.md" -ErrorAction SilentlyContinue).Count
135
+ Write-Output " $folder`: $count"
136
+ }
137
+ }
138
+ "add-task" {
139
+ if (-not $TaskTitle) { throw "TaskTitle is required." }
140
+ Ensure-SessionFolders $sessionRoot
141
+ $existing = Get-ChildItem -LiteralPath (Join-Path $sessionRoot "pending") -Filter "*.task.md" -ErrorAction SilentlyContinue
142
+ if (-not $TaskId) { $TaskId = ("T{0:000}" -f ($existing.Count + 1)) }
143
+ Assert-SafeId $TaskId "TaskId"
144
+ $taskPath = Get-TaskPath $sessionRoot "pending" $TaskId $TaskTitle
145
+ $text = @"
146
+ # $TaskId - $TaskTitle
147
+
148
+ ## Objective
149
+
150
+ $($Objective ?? $TaskTitle)
151
+
152
+ ## Agent Setup
153
+
154
+ - Follow the Takomi Codex skill.
155
+ - Load relevant project docs and policies before implementation.
156
+ - Update this task file with outcome notes.
157
+
158
+ ## Definition Of Done
159
+
160
+ - [ ] Scope completed
161
+ - [ ] Docs updated where needed
162
+ - [ ] Verification recorded
163
+
164
+ ## Notes
165
+
166
+ $Notes
167
+ "@
168
+ Set-Content -LiteralPath $taskPath -Value $text -Encoding UTF8
169
+ Write-Output "Added task: $taskPath"
170
+ }
171
+ "update-task" {
172
+ if (-not $TaskId) { throw "TaskId is required." }
173
+ if (-not $Status) { $Status = "in-progress" }
174
+ Assert-SafeId $TaskId "TaskId"
175
+ $taskPath = Find-TaskFile $sessionRoot $TaskId
176
+ if (-not $taskPath) { throw "Task not found: $TaskId" }
177
+ $target = Join-Path (Join-Path $sessionRoot $Status) (Split-Path -Leaf $taskPath)
178
+ if ($taskPath -ne $target) { Move-Item -LiteralPath $taskPath -Destination $target -Force }
179
+ if ($Notes) { Add-Content -LiteralPath $target -Value "`n## Update $(Get-Date -Format s)`n`n$Notes" -Encoding UTF8 }
180
+ Write-Output "Updated task $TaskId -> $Status"
181
+ }
182
+ "complete-task" {
183
+ & $PSCommandPath -Action update-task -Root $projectRoot -SessionId $SessionId -TaskId $TaskId -Status completed -Notes $Notes
184
+ }
185
+ "summary" {
186
+ Ensure-SessionFolders $sessionRoot
187
+ $summary = Join-Path $sessionRoot "Orchestrator_Summary.md"
188
+ $lines = @("# Orchestrator Summary", "", "Session: $SessionId", "", "## Task Counts", "")
189
+ foreach ($folder in @("pending", "in-progress", "completed", "blocked")) {
190
+ $count = @(Get-ChildItem -LiteralPath (Join-Path $sessionRoot $folder) -Filter "*.task.md" -ErrorAction SilentlyContinue).Count
191
+ $lines += "- $folder`: $count"
192
+ }
193
+ $lines += @("", "## Notes", "", ($Notes ?? "No summary notes recorded."))
194
+ Set-Content -LiteralPath $summary -Value $lines -Encoding UTF8
195
+ Write-Output "Wrote summary: $summary"
196
+ }
197
+ }