@hecer/yoke 1.9.0 → 1.11.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 (153) hide show
  1. package/.claude-plugin/plugin.json +13 -13
  2. package/.codex-plugin/plugin.json +7 -7
  3. package/CHANGELOG.md +398 -358
  4. package/README.md +915 -913
  5. package/TODOS.md +5 -5
  6. package/agents/docs.toml +6 -6
  7. package/agents/implementer.toml +6 -6
  8. package/agents/reviewer.toml +6 -6
  9. package/agents/security.toml +6 -6
  10. package/bench/README.md +86 -86
  11. package/bench/RESULTS.md +35 -35
  12. package/bench/output-compaction.mjs +65 -65
  13. package/bench/result-schema.mjs +12 -12
  14. package/bench/results/claude-2026-07-27T18-03-26.json +50 -50
  15. package/bench/results/codex-unavailable-1785175418318.json +15 -15
  16. package/bench/results/gemini-2026-07-27T18-03-44.json +46 -46
  17. package/bench/run-matrix.mjs +26 -26
  18. package/bench/run.mjs +106 -106
  19. package/canon/AGENTS.md +30 -30
  20. package/canon/context/DECISIONS.md +4 -4
  21. package/canon/context/GLOSSARY.md +11 -11
  22. package/canon/context/KNOWLEDGE.md +4 -4
  23. package/canon/context/PROJECT.md +15 -15
  24. package/canon/loop/loop-spec.md +65 -65
  25. package/canon/loop/prd.schema.md +46 -40
  26. package/canon/manifest.yaml +59 -59
  27. package/canon/policy/gates.md +7 -7
  28. package/canon/policy/roles.md +9 -9
  29. package/canon/skills/ATTRIBUTION.md +99 -99
  30. package/canon/skills/authoring-prd/SKILL.md +56 -56
  31. package/canon/skills/brainstorming/SKILL.md +164 -164
  32. package/canon/skills/codebase-design/DEEPENING.md +15 -15
  33. package/canon/skills/codebase-design/DESIGN-IT-TWICE.md +12 -12
  34. package/canon/skills/codebase-design/SKILL.md +39 -39
  35. package/canon/skills/dispatching-parallel-agents/SKILL.md +182 -182
  36. package/canon/skills/document-release/SKILL.md +302 -302
  37. package/canon/skills/domain-modeling/ADR-FORMAT.md +19 -19
  38. package/canon/skills/domain-modeling/CONTEXT-FORMAT.md +39 -39
  39. package/canon/skills/domain-modeling/SKILL.md +35 -35
  40. package/canon/skills/executing-plans/SKILL.md +70 -70
  41. package/canon/skills/finishing-a-development-branch/SKILL.md +200 -200
  42. package/canon/skills/health/SKILL.md +177 -177
  43. package/canon/skills/maintaining-context/SKILL.md +34 -34
  44. package/canon/skills/minimal-code/SKILL.md +21 -21
  45. package/canon/skills/no-ai-slop/SKILL.md +103 -103
  46. package/canon/skills/no-ai-slop/eval.md +43 -43
  47. package/canon/skills/plan-ceo-review/SKILL.md +541 -541
  48. package/canon/skills/plan-eng-review/SKILL.md +362 -362
  49. package/canon/skills/receiving-code-review/SKILL.md +213 -213
  50. package/canon/skills/requesting-code-review/SKILL.md +105 -105
  51. package/canon/skills/resolving-merge-conflicts/SKILL.md +18 -18
  52. package/canon/skills/retro/SKILL.md +397 -397
  53. package/canon/skills/review/SKILL.md +246 -246
  54. package/canon/skills/ship/SKILL.md +691 -691
  55. package/canon/skills/subagent-driven-development/SKILL.md +277 -277
  56. package/canon/skills/systematic-debugging/SKILL.md +296 -296
  57. package/canon/skills/tdd/SKILL.md +371 -371
  58. package/canon/skills/unslop-ui/SKILL.md +34 -34
  59. package/canon/skills/using-git-worktrees/SKILL.md +218 -218
  60. package/canon/skills/verification-before-completion/SKILL.md +139 -139
  61. package/canon/skills/visual-verification/SKILL.md +54 -54
  62. package/canon/skills/workflow/SKILL.md +22 -22
  63. package/canon/skills/writing-for-agents/SKILL-MECHANICS.md +27 -27
  64. package/canon/skills/writing-for-agents/SKILL.md +42 -42
  65. package/canon/skills/writing-plans/SKILL.md +152 -152
  66. package/canon/skills/writing-skills/SKILL.md +655 -655
  67. package/canon/skills/yoke-retrofit/SKILL.md +26 -26
  68. package/canon/skills/yoke-workflow/SKILL.md +20 -20
  69. package/canon/tools/codex-rtk-hook.mjs +35 -35
  70. package/canon/tools/gemini-rtk-hook.mjs +25 -25
  71. package/canon/tools/graphify.md +3 -3
  72. package/canon/tools/playwright-mcp.md +3 -3
  73. package/canon/tools/rtk.md +7 -7
  74. package/canon/tools/serena.md +6 -6
  75. package/dist/agents/contracts.js +1 -1
  76. package/dist/agents/host.js +4 -0
  77. package/dist/agents/process-incarnation.js +1 -1
  78. package/dist/agents/process.js +74 -6
  79. package/dist/agents/providers.js +13 -0
  80. package/dist/agents/supervision.js +153 -0
  81. package/dist/agents/telemetry.js +33 -0
  82. package/dist/agents/windows-launch.js +80 -0
  83. package/dist/canon/manifest.js +1 -1
  84. package/dist/change/inbox.js +21 -5
  85. package/dist/cli.js +19 -10
  86. package/dist/dashboard/discovery.js +73 -0
  87. package/dist/dashboard/page.js +122 -28
  88. package/dist/dashboard/panels.js +91 -15
  89. package/dist/goals/command.js +4 -2
  90. package/dist/loop/claims.js +1 -1
  91. package/dist/loop/decision.js +2 -2
  92. package/dist/loop/git.js +12 -4
  93. package/dist/loop/loop.js +8 -4
  94. package/dist/loop/parallel-adapters.js +2 -3
  95. package/dist/loop/parallel-command.js +5 -0
  96. package/dist/loop/prd.js +3 -1
  97. package/dist/loop/reporter.js +4 -1
  98. package/dist/loop/run-command.js +11 -2
  99. package/dist/loop/runner.js +22 -26
  100. package/dist/loop/watchdog.js +87 -11
  101. package/dist/loop/worker.js +5 -3
  102. package/dist/prd/assess.js +145 -0
  103. package/dist/prd/command.js +76 -38
  104. package/dist/quality/types.js +1 -1
  105. package/dist/retrofit/config.js +11 -0
  106. package/dist/retrofit/plan.js +2 -0
  107. package/dist/retrofit/planners/claude.js +14 -14
  108. package/dist/retrofit/planners/qwen.js +73 -0
  109. package/dist/retrofit/preserve.js +2 -2
  110. package/dist/retrofit/skill-actions.js +1 -0
  111. package/dist/review/command.js +1 -1
  112. package/dist/routing/assessment.js +1 -1
  113. package/dist/routing/capability.js +25 -13
  114. package/dist/routing/contracts.js +60 -0
  115. package/dist/routing/planning.js +12 -0
  116. package/dist/routing/router.js +51 -16
  117. package/dist/setup/command.js +11 -3
  118. package/docs/BATCH-PLANNING-VALIDATION.md +67 -0
  119. package/docs/CAPABILITY-ROUTING.md +78 -50
  120. package/docs/DASHBOARD-EVOLUTION.md +33 -0
  121. package/docs/MIGRATING-TO-1.0.md +33 -33
  122. package/docs/MIGRATING-TO-1.1.md +27 -27
  123. package/docs/MIGRATING-TO-1.4.md +70 -70
  124. package/docs/PRODUCT-DIRECTION-2026-09-05.md +218 -200
  125. package/docs/PUBLISHING.md +114 -114
  126. package/docs/VERIFIED-PROJECTS-VALIDATION.md +29 -29
  127. package/docs/VERIFIED-PROJECTS.md +167 -167
  128. package/docs/WINDOWS-RUNNER-VALIDATION.md +104 -0
  129. package/docs/assets/yoke-logo.png +0 -0
  130. package/docs/community-outreach-2026-08-20.md +85 -0
  131. package/docs/launch-copy-2026-08-21.md +193 -0
  132. package/docs/superpowers/plans/2026-06-28-baustein-e-context-layer.md +981 -981
  133. package/docs/superpowers/plans/2026-06-29-baustein-f-routing.md +258 -258
  134. package/docs/superpowers/plans/2026-06-29-baustein-g-loop-observability.md +1006 -1006
  135. package/docs/superpowers/plans/2026-06-29-baustein-h-loop-robustness.md +374 -374
  136. package/docs/superpowers/plans/2026-06-30-baustein-i-visual-design-verification.md +450 -450
  137. package/docs/superpowers/plans/2026-07-02-baustein-k-zero-to-100-bootstrap.md +1024 -1024
  138. package/docs/superpowers/plans/2026-07-02-baustein-m-flow-smoke-proofs.md +574 -574
  139. package/docs/superpowers/plans/2026-08-13-gauntlet-quality-loop.md +537 -537
  140. package/docs/superpowers/plans/2026-08-16-artifact-backed-output-compaction.md +329 -329
  141. package/docs/superpowers/plans/2026-09-05-verified-projects.md +83 -83
  142. package/docs/superpowers/specs/2026-06-28-baustein-e-context-layer-design.md +146 -146
  143. package/docs/superpowers/specs/2026-06-29-baustein-f-routing-design.md +106 -106
  144. package/docs/superpowers/specs/2026-06-29-baustein-g-loop-observability-design.md +186 -186
  145. package/docs/superpowers/specs/2026-06-29-baustein-h-loop-robustness-design.md +113 -113
  146. package/docs/superpowers/specs/2026-06-30-baustein-i-visual-design-verification-design.md +98 -98
  147. package/docs/superpowers/specs/2026-07-02-baustein-k-zero-to-100-bootstrap-design.md +200 -200
  148. package/docs/superpowers/specs/2026-07-02-baustein-m-flow-smoke-proofs-design.md +155 -155
  149. package/docs/superpowers/specs/2026-08-13-gauntlet-quality-loop-design.md +422 -422
  150. package/docs/superpowers/specs/2026-08-16-artifact-backed-output-compaction-design.md +166 -166
  151. package/gemini-extension.json +6 -6
  152. package/hooks/hooks.json +19 -19
  153. package/package.json +87 -87
@@ -1,26 +1,26 @@
1
- ---
2
- name: yoke-retrofit
3
- description: Use when asked to "retrofit", "yoke this project", or set up the Yoke harness in a project — runs the shared setup wizard and configures the same behavior for Claude, Codex, and Gemini.
4
- ---
5
-
6
- # Yoke Retrofit
7
-
8
- Set up or update Yoke through the shared `yoke setup` contract.
9
-
10
- 1. Inspect the project and identify the current host (`claude`, `codex`, or `gemini`).
11
- 2. Ask these setup questions one at a time and give a direct recommendation:
12
- - target agents (recommend the current host; use `all` for deliberately cross-agent projects),
13
- - code-graph tool,
14
- - autonomous loop on/off,
15
- - default runner (recommend the current host),
16
- - decision mode: `auto` or `critical`.
17
- 3. Recommend the code graph based on this project:
18
- - **Serena** is LSP-accurate and best for large typed codebases or systematic symbol refactors where a missed reference is costly. It needs a language server per language.
19
- - **graphify** is fast and multimodal, and is best for exploration, migration, onboarding, or mixed code and document repositories. Its graph is an index and can become stale.
20
- 4. Apply the answers without a second round of prompts:
21
- `yoke setup . --yes --host=<host> --agent=<agents> --code-graph=<choice> --runner=<runner> --decision-policy=<auto|critical> --loop|--no-loop`.
22
- A human who runs `yoke setup .` directly receives the same five terminal questions.
23
- 5. Show the generated report and backup paths. Existing files are backed up under `.yoke/backup/`; settings are merged where supported.
24
- 6. If an old generated `CLAUDE.md` or `GEMINI.md` contained project-specific instructions, restore them inside its `<!-- yoke:preserve:start -->` / `<!-- yoke:preserve:end -->` block. Preserve blocks survive every later retrofit.
25
-
26
- The generated harness includes the provider-neutral `yoke-workflow` skill. It owns the planning questions, approved-plan handoff, autonomous stories, and critical-decision resume flow.
1
+ ---
2
+ name: yoke-retrofit
3
+ description: Use when asked to "retrofit", "yoke this project", or set up the Yoke harness in a project — runs the shared setup wizard and configures the same behavior for Claude, Codex, and Gemini.
4
+ ---
5
+
6
+ # Yoke Retrofit
7
+
8
+ Set up or update Yoke through the shared `yoke setup` contract.
9
+
10
+ 1. Inspect the project and identify the current host (`claude`, `codex`, or `gemini`).
11
+ 2. Ask these setup questions one at a time and give a direct recommendation:
12
+ - target agents (recommend the current host; use `all` for deliberately cross-agent projects),
13
+ - code-graph tool,
14
+ - autonomous loop on/off,
15
+ - default runner (recommend the current host),
16
+ - decision mode: `auto` or `critical`.
17
+ 3. Recommend the code graph based on this project:
18
+ - **Serena** is LSP-accurate and best for large typed codebases or systematic symbol refactors where a missed reference is costly. It needs a language server per language.
19
+ - **graphify** is fast and multimodal, and is best for exploration, migration, onboarding, or mixed code and document repositories. Its graph is an index and can become stale.
20
+ 4. Apply the answers without a second round of prompts:
21
+ `yoke setup . --yes --host=<host> --agent=<agents> --code-graph=<choice> --runner=<runner> --decision-policy=<auto|critical> --loop|--no-loop`.
22
+ A human who runs `yoke setup .` directly receives the same five terminal questions.
23
+ 5. Show the generated report and backup paths. Existing files are backed up under `.yoke/backup/`; settings are merged where supported.
24
+ 6. If an old generated `CLAUDE.md` or `GEMINI.md` contained project-specific instructions, restore them inside its `<!-- yoke:preserve:start -->` / `<!-- yoke:preserve:end -->` block. Preserve blocks survive every later retrofit.
25
+
26
+ The generated harness includes the provider-neutral `yoke-workflow` skill. It owns the planning questions, approved-plan handoff, autonomous stories, and critical-decision resume flow.
@@ -1,20 +1,20 @@
1
- ---
2
- name: yoke-workflow
3
- description: Use when the user asks Yoke to plan and build a feature, run stories autonomously, continue a Yoke loop, or only interrupt for major decisions.
4
- ---
5
-
6
- # Yoke Workflow
7
-
8
- Provide the same interaction contract in Claude, Codex, and Gemini.
9
-
10
- 1. Read `.yoke/config.yaml`. If it is missing, offer `yoke setup . --host=<current-agent>` and run the setup flow before planning.
11
- 2. Plan before starting the loop. Inspect the project, then ask one focused question at a time only where the answer changes product behavior, scope, architecture, security, data ownership, external cost, or an irreversible choice. Include a recommended answer. Resolve routine implementation details yourself.
12
- 3. Summarize the agreed design in `.yoke/plan.md`, including goals, non-goals, constraints, and decisions. Use the `authoring-prd` skill to turn it into small stories with testable acceptance criteria. Run `yoke prd check .`.
13
- 4. Ask once for approval of the complete plan and story set. Do not begin implementation before that approval.
14
- 5. If `loop.enabled` is true, run the stories without routine follow-up questions using the configured runner. Prefer `yoke loop run . --max=5 --isolate`, report status after each batch, and continue until complete or genuinely blocked.
15
- 6. Respect `loop.decisionPolicy`:
16
- - `auto`: choose the most suitable option from the plan, current code, and established conventions. Record the interpretation and continue.
17
- - `critical`: routine ambiguity is still resolved automatically. If the loop reports a pending critical decision, run `yoke loop decision .`, present its options and recommendation to the user, ask exactly that question, then run `yoke loop answer . --choice=<id> --rationale="<answer>"`. The answer command records the decision and resumes the same story.
18
- 7. Never ask whether to run tests, review, commit, or continue to the next approved story. Those are part of the approved workflow.
19
-
20
- The user's configured commit identity is authoritative. Do not add an AI co-author unless `commit.allowCoAuthors` explicitly permits it.
1
+ ---
2
+ name: yoke-workflow
3
+ description: Use when the user asks Yoke to plan and build a feature, run stories autonomously, continue a Yoke loop, or only interrupt for major decisions.
4
+ ---
5
+
6
+ # Yoke Workflow
7
+
8
+ Provide the same interaction contract in Claude, Codex, and Gemini.
9
+
10
+ 1. Read `.yoke/config.yaml`. If it is missing, offer `yoke setup . --host=<current-agent>` and run the setup flow before planning.
11
+ 2. Plan before starting the loop. Inspect the project, then ask one focused question at a time only where the answer changes product behavior, scope, architecture, security, data ownership, external cost, or an irreversible choice. Include a recommended answer. Resolve routine implementation details yourself.
12
+ 3. Summarize the agreed design in `.yoke/plan.md`, including goals, non-goals, constraints, and decisions. Use the `authoring-prd` skill to turn it into small stories with testable acceptance criteria. Run `yoke prd check .`.
13
+ 4. Ask once for approval of the complete plan and story set. Do not begin implementation before that approval.
14
+ 5. If `loop.enabled` is true, run the stories without routine follow-up questions using the configured runner. Prefer `yoke loop run . --max=5 --isolate`, report status after each batch, and continue until complete or genuinely blocked.
15
+ 6. Respect `loop.decisionPolicy`:
16
+ - `auto`: choose the most suitable option from the plan, current code, and established conventions. Record the interpretation and continue.
17
+ - `critical`: routine ambiguity is still resolved automatically. If the loop reports a pending critical decision, run `yoke loop decision .`, present its options and recommendation to the user, ask exactly that question, then run `yoke loop answer . --choice=<id> --rationale="<answer>"`. The answer command records the decision and resumes the same story.
18
+ 7. Never ask whether to run tests, review, commit, or continue to the next approved story. Those are part of the approved workflow.
19
+
20
+ The user's configured commit identity is authoritative. Do not add an AI co-author unless `commit.allowCoAuthors` explicitly permits it.
@@ -1,36 +1,36 @@
1
1
  import { spawnSync } from 'node:child_process'
2
- import { resolve } from 'node:path'
3
- import { pathToFileURL } from 'node:url'
4
-
5
- function rtkCheck(command) {
6
- const result = spawnSync('rtk', ['hook', 'check', command], { encoding: 'utf8', timeout: 3000 })
7
- return result.status === 0 ? result.stdout.trim() : ''
8
- }
9
-
10
- export function rewriteHookInput(input, check = rtkCheck) {
11
- if (input?.tool_name !== 'Bash' && input?.toolName !== 'Bash') return null
12
- const toolInput = input.tool_input ?? input.toolInput
13
- const command = toolInput?.command
14
- if (typeof command !== 'string' || command.trim() === '') return null
15
- const rewritten = check(command)
16
- if (!rewritten || rewritten === command) return null
17
- return {
18
- hookSpecificOutput: {
19
- hookEventName: 'PreToolUse',
20
- updatedInput: { ...toolInput, command: rewritten },
21
- },
22
- }
23
- }
24
-
25
- async function main() {
26
- let raw = ''
27
- for await (const chunk of process.stdin) raw += chunk
28
- try {
29
- const output = rewriteHookInput(JSON.parse(raw))
30
- if (output) process.stdout.write(JSON.stringify(output))
31
- } catch {
32
- // Compression is an optimization. Malformed input must never block Codex.
33
- }
34
- }
35
-
36
- if (process.argv[1] && pathToFileURL(resolve(process.argv[1])).href === import.meta.url) await main()
2
+ import { resolve } from 'node:path'
3
+ import { pathToFileURL } from 'node:url'
4
+
5
+ function rtkCheck(command) {
6
+ const result = spawnSync('rtk', ['hook', 'check', command], { encoding: 'utf8', timeout: 3000 })
7
+ return result.status === 0 ? result.stdout.trim() : ''
8
+ }
9
+
10
+ export function rewriteHookInput(input, check = rtkCheck) {
11
+ if (input?.tool_name !== 'Bash' && input?.toolName !== 'Bash') return null
12
+ const toolInput = input.tool_input ?? input.toolInput
13
+ const command = toolInput?.command
14
+ if (typeof command !== 'string' || command.trim() === '') return null
15
+ const rewritten = check(command)
16
+ if (!rewritten || rewritten === command) return null
17
+ return {
18
+ hookSpecificOutput: {
19
+ hookEventName: 'PreToolUse',
20
+ updatedInput: { ...toolInput, command: rewritten },
21
+ },
22
+ }
23
+ }
24
+
25
+ async function main() {
26
+ let raw = ''
27
+ for await (const chunk of process.stdin) raw += chunk
28
+ try {
29
+ const output = rewriteHookInput(JSON.parse(raw))
30
+ if (output) process.stdout.write(JSON.stringify(output))
31
+ } catch {
32
+ // Compression is an optimization. Malformed input must never block Codex.
33
+ }
34
+ }
35
+
36
+ if (process.argv[1] && pathToFileURL(resolve(process.argv[1])).href === import.meta.url) await main()
@@ -1,25 +1,25 @@
1
- #!/usr/bin/env node
2
- // Pure BeforeTool argument adapter. Never evaluates or executes tool commands.
3
- import { readFileSync } from 'node:fs'
4
-
5
- const record = value => value !== null && typeof value === 'object' && !Array.isArray(value)
6
- try {
7
- const event = JSON.parse(readFileSync(0, 'utf8'))
8
- if (!record(event) || typeof event.tool_name !== 'string' ||
9
- (event.hook_event_name !== undefined && event.hook_event_name !== 'BeforeTool')) throw new Error('event')
10
- let response = {}
11
- if (event.tool_name === 'run_shell_command') {
12
- if (!record(event.tool_input) || typeof event.tool_input.command !== 'string' || !event.tool_input.command.trim() || event.tool_input.command.includes('\0')) throw new Error('command')
13
- const command = event.tool_input.command
14
- // Restrict rewriting to simple supported invocations. Leave shell syntax,
15
- // quoted executables, assignments and existing RTK wrappers untouched.
16
- if (!/[;&|<>`$\r\n()]/u.test(command) && /^\s*(?:git|rg|npm|npx|cargo|pytest|go|docker|kubectl)\s/u.test(command)) {
17
- const rewritten = command.trimStart().replace(/^rg\s/u, 'grep ')
18
- response = { hookSpecificOutput: { tool_input: { ...event.tool_input, command: `rtk ${rewritten}` } } }
19
- }
20
- }
21
- process.stdout.write(JSON.stringify(response) + '\n')
22
- } catch {
23
- process.stderr.write('Invalid Gemini BeforeTool hook input\n')
24
- process.exitCode = 2
25
- }
1
+ #!/usr/bin/env node
2
+ // Pure BeforeTool argument adapter. Never evaluates or executes tool commands.
3
+ import { readFileSync } from 'node:fs'
4
+
5
+ const record = value => value !== null && typeof value === 'object' && !Array.isArray(value)
6
+ try {
7
+ const event = JSON.parse(readFileSync(0, 'utf8'))
8
+ if (!record(event) || typeof event.tool_name !== 'string' ||
9
+ (event.hook_event_name !== undefined && event.hook_event_name !== 'BeforeTool')) throw new Error('event')
10
+ let response = {}
11
+ if (event.tool_name === 'run_shell_command') {
12
+ if (!record(event.tool_input) || typeof event.tool_input.command !== 'string' || !event.tool_input.command.trim() || event.tool_input.command.includes('\0')) throw new Error('command')
13
+ const command = event.tool_input.command
14
+ // Restrict rewriting to simple supported invocations. Leave shell syntax,
15
+ // quoted executables, assignments and existing RTK wrappers untouched.
16
+ if (!/[;&|<>`$\r\n()]/u.test(command) && /^\s*(?:git|rg|npm|npx|cargo|pytest|go|docker|kubectl)\s/u.test(command)) {
17
+ const rewritten = command.trimStart().replace(/^rg\s/u, 'grep ')
18
+ response = { hookSpecificOutput: { tool_input: { ...event.tool_input, command: `rtk ${rewritten}` } } }
19
+ }
20
+ }
21
+ process.stdout.write(JSON.stringify(response) + '\n')
22
+ } catch {
23
+ process.stderr.write('Invalid Gemini BeforeTool hook input\n')
24
+ process.exitCode = 2
25
+ }
@@ -1,3 +1,3 @@
1
- # Tool: graphify (code-graph)
2
-
3
- MIT, multimodal code/doc graph. Wired as an MCP server for all three agents (stdio). Prefer symbol/graph lookups over reading whole files. Caveat: heuristic edges (INFERRED/AMBIGUOUS) and a static index that can go stale — rebuild on significant changes.
1
+ # Tool: graphify (code-graph)
2
+
3
+ MIT, multimodal code/doc graph. Wired as an MCP server for all three agents (stdio). Prefer symbol/graph lookups over reading whole files. Caveat: heuristic edges (INFERRED/AMBIGUOUS) and a static index that can go stale — rebuild on significant changes.
@@ -1,3 +1,3 @@
1
- # Tool: Playwright MCP (browser / dogfooding)
2
-
3
- Microsoft Playwright MCP, Apache-2.0. Wired as an MCP server for all three agents — the only browser tool with native MCP parity across Claude/Codex/Gemini. Used for QA, dogfooding user flows, screenshots, and deploy verification.
1
+ # Tool: Playwright MCP (browser / dogfooding)
2
+
3
+ Microsoft Playwright MCP, Apache-2.0. Wired as an MCP server for all three agents — the only browser tool with native MCP parity across Claude/Codex/Gemini. Used for QA, dogfooding user flows, screenshots, and deploy verification.
@@ -1,7 +1,7 @@
1
- # Tool: rtk (token compression)
2
-
3
- Per-agent wiring (generated by Baustein B):
4
-
5
- - **Claude Code:** PreToolUse hook auto-rewrites commands (`git status` → `rtk git status`). On Windows this needs WSL; otherwise fall back to instruction mode (this file injected into CLAUDE.md telling the agent to prefix commands with `rtk`).
6
- - **Codex CLI:** inject `RTK.md` / AGENTS.md instruction.
7
- - **Gemini CLI:** no hook system — register rtk as an MCP tool or inject the GEMINI.md instruction.
1
+ # Tool: rtk (token compression)
2
+
3
+ Per-agent wiring (generated by Baustein B):
4
+
5
+ - **Claude Code:** PreToolUse hook auto-rewrites commands (`git status` → `rtk git status`). On Windows this needs WSL; otherwise fall back to instruction mode (this file injected into CLAUDE.md telling the agent to prefix commands with `rtk`).
6
+ - **Codex CLI:** inject `RTK.md` / AGENTS.md instruction.
7
+ - **Gemini CLI:** no hook system — register rtk as an MCP tool or inject the GEMINI.md instruction.
@@ -1,9 +1,9 @@
1
- # Tool: Serena (code-graph, LSP-accurate)
2
-
3
- MIT, MCP-first. The alternative to graphify, selected via `yoke retrofit --code-graph=serena`. Serena uses real language servers (LSP) for symbol-accurate, cross-file retrieval and refactoring (`find_symbol`, `find_referencing_symbols`, rename/move) — no static index that goes stale, so it will not miss a reference.
4
-
5
- Wired as an MCP server for all three agents. Best for large, strongly-typed codebases (TypeScript, Python, Go) doing systematic refactoring, where missing a caller is costly.
6
-
1
+ # Tool: Serena (code-graph, LSP-accurate)
2
+
3
+ MIT, MCP-first. The alternative to graphify, selected via `yoke retrofit --code-graph=serena`. Serena uses real language servers (LSP) for symbol-accurate, cross-file retrieval and refactoring (`find_symbol`, `find_referencing_symbols`, rename/move) — no static index that goes stale, so it will not miss a reference.
4
+
5
+ Wired as an MCP server for all three agents. Best for large, strongly-typed codebases (TypeScript, Python, Go) doing systematic refactoring, where missing a caller is costly.
6
+
7
7
  Caveat: needs one language server per language (can be fiddly on Windows for exotic languages) and requires `uv`. The launch command is a best-effort template — adjust to your install, e.g. `uvx --from git+https://github.com/oraios/serena serena-mcp-server`.
8
8
 
9
9
  Yoke disables Serena's automatic web-dashboard launch in generated MCP configurations. The
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export const AgentSchema = z.enum(['claude', 'codex', 'gemini']);
2
+ export const AgentSchema = z.enum(['claude', 'codex', 'gemini', 'qwen']);
3
3
  export const PermissionProfileSchema = z.enum(['safe', 'unsafe', 'read-only']);
4
4
  export const ModelSelectionSchema = z.object({
5
5
  model: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/).optional(),
@@ -7,12 +7,16 @@ export function detectHostAgent(env = process.env) {
7
7
  return 'claude';
8
8
  if (env.GEMINI_CLI)
9
9
  return 'gemini';
10
+ if (env.QWEN_CLI)
11
+ return 'qwen';
10
12
  if (env.CODEX_HOME)
11
13
  return 'codex';
12
14
  if (env.CLAUDE_CONFIG_DIR)
13
15
  return 'claude';
14
16
  if (env.GEMINI_CLI_HOME)
15
17
  return 'gemini';
18
+ if (env.QWEN_CLI_HOME)
19
+ return 'qwen';
16
20
  return undefined;
17
21
  }
18
22
  export function resolveRunnerAgent(config, explicit, host) {
@@ -1,5 +1,5 @@
1
1
  import { execFileSync } from 'node:child_process';
2
- const queryProcessIdentity = (command, args, options) => execFileSync(command, args, { stdio: 'pipe', ...options }).toString();
2
+ const queryProcessIdentity = (command, args, options) => execFileSync(command, args, { stdio: 'pipe', timeout: 5000, windowsHide: true, ...options }).toString();
3
3
  export function processIncarnation(pid, platform = process.platform, query = queryProcessIdentity) {
4
4
  try {
5
5
  if (platform === 'win32') {
@@ -4,35 +4,64 @@ import { killProcessTreeForCleanup } from '../loop/watchdog.js';
4
4
  import { createProviderProcessRecord, filesystemProviderProcessRecordAdapter, } from './process-record.js';
5
5
  import { createBoundedOutput, createTelemetryAccumulator } from './process-streams.js';
6
6
  import { processIncarnation } from './process-incarnation.js';
7
+ import { prepareWindowsInvocation, resolveWindowsCommand } from './windows-launch.js';
8
+ import { createSupervision, supervisionLimits, assertPreviousProvidersStopped } from './supervision.js';
7
9
  function cancellationReason(signal) {
8
10
  return typeof signal.reason === 'string' && signal.reason.length > 0
9
11
  ? signal.reason
10
12
  : 'provider process cancellation requested';
11
13
  }
12
14
  export function providerSpawnOptions(invocation, platform = process.platform) {
13
- const windowsCommandShim = !/[\\/]/u.test(invocation.command) || /\.(?:bat|cmd)$/iu.test(invocation.command);
15
+ const resolved = platform === 'win32' ? resolveWindowsCommand(invocation.command, invocation.args) : invocation;
14
16
  return {
15
- command: invocation.command,
16
- args: invocation.args,
17
+ command: resolved.command,
18
+ args: resolved.args,
17
19
  cwd: invocation.cwd,
18
- shell: platform === 'win32' && windowsCommandShim,
20
+ shell: false,
19
21
  detached: platform !== 'win32',
20
22
  };
21
23
  }
22
24
  export function startProviderProcess(agent, invocation, options = {}) {
23
- const spawnOptions = providerSpawnOptions(invocation);
25
+ let failure = () => { };
26
+ let progress = () => { };
27
+ const limits = supervisionLimits(invocation.cwd);
28
+ const supervision = createSupervision(invocation.cwd, reason => failure(reason), () => progress(), options.attempt);
29
+ let prepared;
30
+ try {
31
+ assertPreviousProvidersStopped(invocation.cwd);
32
+ prepared = process.platform === 'win32' ? prepareWindowsInvocation(invocation) : { command: invocation.command, args: invocation.args, env: process.env };
33
+ }
34
+ catch (error) {
35
+ const message = error.message;
36
+ supervision.stop(message);
37
+ return { pid: undefined, invocation, recordPath: '', cancel: () => false, completion: Promise.resolve({ kind: 'spawn-failed', error: message, invocation, pid: undefined, stdout: '', stderr: '', stdoutTruncated: false, stderrTruncated: false, telemetry: { usageAvailable: false } }) };
38
+ }
39
+ const spawnOptions = { ...prepared, cwd: invocation.cwd, shell: false, detached: process.platform !== 'win32' };
24
40
  const child = spawn(spawnOptions.command, [...spawnOptions.args], {
25
41
  cwd: spawnOptions.cwd,
26
42
  shell: spawnOptions.shell,
27
43
  stdio: ['pipe', 'pipe', 'pipe'],
28
44
  detached: spawnOptions.detached,
45
+ env: prepared.env,
46
+ windowsHide: true,
29
47
  });
30
48
  const targetDir = resolve(invocation.cwd);
31
49
  const pid = child.pid;
32
50
  const startedAt = pid === undefined ? `unverified:${new Date().toISOString()}` : processIncarnation(pid) ?? `unverified:${new Date().toISOString()}`;
51
+ supervision.start(pid, 'shell' in prepared ? prepared.shell : undefined, startedAt.startsWith('unverified:') ? undefined : startedAt);
33
52
  const record = createProviderProcessRecord(targetDir, pid ?? 0, options.workerId, startedAt);
34
53
  const recordAdapter = options.recordAdapter ?? filesystemProviderProcessRecordAdapter;
35
- const terminateProcessTree = options.terminateProcessTree ?? ((processPid) => killProcessTreeForCleanup(processPid));
54
+ const terminateProcessTree = options.terminateProcessTree ?? ((processPid) => {
55
+ try {
56
+ process.kill(processPid, 0);
57
+ }
58
+ catch {
59
+ return true;
60
+ }
61
+ if (startedAt.startsWith('unverified:') || processIncarnation(processPid) !== startedAt)
62
+ return false;
63
+ return killProcessTreeForCleanup(processPid);
64
+ });
36
65
  let recordPublished = false;
37
66
  const stdout = createBoundedOutput(options.outputLimitBytes ?? 1_048_576);
38
67
  const stderr = createBoundedOutput(options.outputLimitBytes ?? 1_048_576);
@@ -42,6 +71,9 @@ export function startProviderProcess(agent, invocation, options = {}) {
42
71
  let termination;
43
72
  let idleTimer;
44
73
  let forceTimer;
74
+ let totalTimer;
75
+ let progressTimer;
76
+ let completionTimer;
45
77
  let recordFailure;
46
78
  let terminationConfirmed = false;
47
79
  let settled = false;
@@ -58,6 +90,12 @@ export function startProviderProcess(agent, invocation, options = {}) {
58
90
  clearTimeout(idleTimer);
59
91
  if (forceTimer)
60
92
  clearTimeout(forceTimer);
93
+ if (totalTimer)
94
+ clearTimeout(totalTimer);
95
+ if (progressTimer)
96
+ clearTimeout(progressTimer);
97
+ if (completionTimer)
98
+ clearTimeout(completionTimer);
61
99
  idleTimer = undefined;
62
100
  forceTimer = undefined;
63
101
  };
@@ -66,6 +104,7 @@ export function startProviderProcess(agent, invocation, options = {}) {
66
104
  return;
67
105
  settled = true;
68
106
  clearTimers();
107
+ supervision.stop(termination?.reason ?? (result.kind === 'succeeded' ? 'provider-exited' : 'provider-failed'), !termination || terminationConfirmed);
69
108
  options.signal?.removeEventListener('abort', onAbort);
70
109
  if (!termination || terminationConfirmed)
71
110
  removeRecord();
@@ -81,6 +120,9 @@ export function startProviderProcess(agent, invocation, options = {}) {
81
120
  telemetry: telemetry.finish(),
82
121
  });
83
122
  const finalize = (exitCode) => {
123
+ if (settled)
124
+ return;
125
+ supervision.flush();
84
126
  // Windows can emit close before taskkill's process-tree state is observable.
85
127
  // Reconfirm here so successful termination does not leave a stale ownership record.
86
128
  if (termination && pid !== undefined && !terminationConfirmed) {
@@ -114,6 +156,21 @@ export function startProviderProcess(agent, invocation, options = {}) {
114
156
  forceTimer = setTimeout(() => {
115
157
  if (pid !== undefined && !settled)
116
158
  terminationConfirmed = terminateProcessTree(pid, true);
159
+ // Allow close/pipe draining to confirm termination before the bounded fallback.
160
+ if (!settled)
161
+ completionTimer = setTimeout(() => {
162
+ if (settled)
163
+ return;
164
+ // A killer's return value is not an observed process exit.
165
+ if (pid !== undefined) {
166
+ try {
167
+ process.kill(pid, 0);
168
+ terminationConfirmed = false;
169
+ }
170
+ catch { /* exited */ }
171
+ }
172
+ finalize(null);
173
+ }, 5000);
117
174
  }, terminationGraceMs);
118
175
  return true;
119
176
  };
@@ -140,8 +197,16 @@ export function startProviderProcess(agent, invocation, options = {}) {
140
197
  stderr.append(text);
141
198
  }
142
199
  options.onOutput?.({ stream, text });
200
+ supervision.output(stream, text);
143
201
  armIdleTimer();
144
202
  };
203
+ failure = reason => { terminate({ kind: 'cancelled', reason }); };
204
+ progress = () => {
205
+ if (progressTimer)
206
+ clearTimeout(progressTimer);
207
+ if ((options.progressTimeoutMs ?? limits.progressMs) > 0)
208
+ progressTimer = setTimeout(() => terminate({ kind: 'timed-out', reason: 'provider-progress-timeout' }), options.progressTimeoutMs ?? limits.progressMs);
209
+ };
145
210
  child.stdout?.on('data', chunk => { onOutput('stdout', chunk); });
146
211
  child.stderr?.on('data', chunk => { onOutput('stderr', chunk); });
147
212
  child.stdin?.on('error', () => { });
@@ -178,5 +243,8 @@ export function startProviderProcess(agent, invocation, options = {}) {
178
243
  else
179
244
  options.signal?.addEventListener('abort', onAbort, { once: true });
180
245
  armIdleTimer();
246
+ if ((options.totalTimeoutMs ?? limits.totalMs) > 0)
247
+ totalTimer = setTimeout(() => terminate({ kind: 'timed-out', reason: 'provider-total-timeout' }), options.totalTimeoutMs ?? limits.totalMs);
248
+ progress();
181
249
  return handle;
182
250
  }
@@ -17,6 +17,13 @@ const argsFor = (agent, permissions) => {
17
17
  // Automatic review already selects workspace-write and conflicts with --sandbox.
18
18
  return ['exec', '--approve-for-me', '--json'];
19
19
  }
20
+ // Qwen CLI is a Gemini fork with similar arguments
21
+ if (agent === 'qwen') {
22
+ if (permissions === 'unsafe')
23
+ return ['--yolo', '--output-format', 'stream-json'];
24
+ const approval = permissions === 'read-only' ? 'plan' : 'auto_edit';
25
+ return ['--approval-mode', approval, '--sandbox', '--output-format', 'stream-json'];
26
+ }
20
27
  if (permissions === 'unsafe')
21
28
  return ['--yolo', '--output-format', 'stream-json'];
22
29
  const approval = permissions === 'read-only' ? 'plan' : 'auto_edit';
@@ -30,6 +37,12 @@ export function buildProviderInvocation(agent, prompt, cwd, permissions = 'safe'
30
37
  throw new Error('Gemini does not support the reasoningEffort selection');
31
38
  if (agent === 'gemini' && parsedSelection.nativeMultiAgent === true)
32
39
  throw new Error('Gemini does not support enabling the nativeMultiAgent selection');
40
+ if (agent === 'qwen' && parsedSelection.bare)
41
+ throw new Error('Qwen does not support the bare startup selection');
42
+ if (agent === 'qwen' && parsedSelection.reasoningEffort)
43
+ throw new Error('Qwen does not support the reasoningEffort selection');
44
+ if (agent === 'qwen' && parsedSelection.nativeMultiAgent === true)
45
+ throw new Error('Qwen does not support enabling the nativeMultiAgent selection');
33
46
  const args = argsFor(agent, permissions);
34
47
  if (output.schemaFile !== undefined || output.jsonSchema !== undefined) {
35
48
  if (agent === 'codex' && output.schemaFile && output.jsonSchema === undefined) {