@mutagent/helix 0.1.0-alpha.14

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 (357) hide show
  1. package/.claude/skills/mutagent-helix/SKILL.md +113 -0
  2. package/.claude/skills/mutagent-helix/scripts/cli/codex-transcode.ts +143 -0
  3. package/.claude/skills/mutagent-helix/scripts/cli/doctor.ts +111 -0
  4. package/.claude/skills/mutagent-helix/scripts/cli/init.ts +382 -0
  5. package/.claude/skills/mutagent-helix/scripts/cli/run.sh +61 -0
  6. package/CLAUDE.md +193 -0
  7. package/LICENSE +201 -0
  8. package/NOTICE +22 -0
  9. package/README.md +209 -0
  10. package/assets/adl-loop.svg +162 -0
  11. package/assets/system-status.svg +422 -0
  12. package/bin/mutagent-cli.mjs +9950 -0
  13. package/bin/mutagent-helix.mjs +78 -0
  14. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/CLAUDE.md +28 -0
  15. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/SKILL.md +138 -0
  16. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/assets/templates/agentspec.yaml.tpl +247 -0
  17. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/references/frameworks/doc-pins.md +53 -0
  18. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/references/principles.md +91 -0
  19. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/references/requirements.yaml +295 -0
  20. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/references/workflows/orchestrator-protocol.md +302 -0
  21. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/cli/doctor.ts +116 -0
  22. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/cli/init.ts +230 -0
  23. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/cli/run.sh +60 -0
  24. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/config/resolve-spec-dir.ts +199 -0
  25. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/contract/agentspec.schema.ts +455 -0
  26. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/setup/detect.ts +67 -0
  27. package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/validate/validate-spec.ts +93 -0
  28. package/mutagent-agentspec/LICENSE +201 -0
  29. package/mutagent-agentspec/NOTICE +19 -0
  30. package/mutagent-agentspec/README.md +44 -0
  31. package/mutagent-builder/.claude/skills/mutagent-builder/SKILL.md +100 -0
  32. package/mutagent-builder/.claude/skills/mutagent-builder/assets/agents/ai-architect.md +312 -0
  33. package/mutagent-builder/.claude/skills/mutagent-builder/assets/agents/ai-engineer.md +357 -0
  34. package/mutagent-builder/.claude/skills/mutagent-builder/assets/templates/build-report.md.tpl +39 -0
  35. package/mutagent-builder/.claude/skills/mutagent-builder/references/principles.md +31 -0
  36. package/mutagent-builder/.claude/skills/mutagent-builder/references/workflows/build-protocol.md +61 -0
  37. package/mutagent-builder/.claude/skills/mutagent-builder/references/workflows/improve-handoff.md +23 -0
  38. package/mutagent-builder/.claude/skills/mutagent-builder/scripts/cli/run.sh +60 -0
  39. package/mutagent-builder/.claude/skills/mutagent-builder/scripts/handoff/validate-build-input.ts +72 -0
  40. package/mutagent-builder/.claude/skills/mutagent-builder/scripts/sync-spec/check-sync-spec.ts +499 -0
  41. package/mutagent-builder/.claude/skills/mutagent-builder/scripts/verify/spec-impl-coverage.ts +182 -0
  42. package/mutagent-builder/CLAUDE.md +25 -0
  43. package/mutagent-builder/README.md +26 -0
  44. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/README.md +192 -0
  45. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/SKILL.md +352 -0
  46. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/agents/ai-architect.md +256 -0
  47. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/agents/ai-engineer.md +344 -0
  48. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/agents/diagnostics-analyzer.md +576 -0
  49. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/agents/discovery.md +425 -0
  50. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/audit.json.tpl +24 -0
  51. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/audit.md.tpl +49 -0
  52. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/config.yaml.tpl +100 -0
  53. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/pr-body.md.tpl +56 -0
  54. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/report.html.tpl +327 -0
  55. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/shared/README.md +27 -0
  56. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/shared/iter-N-handover.md.tpl +125 -0
  57. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/shared/self-diagnosis-contract.v0.1.0.yaml.tpl +234 -0
  58. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/shared/spec.yaml.tpl +152 -0
  59. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/shared/team.yaml.tpl +127 -0
  60. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/shared/wave-N-dashboard.html.tpl +1712 -0
  61. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/diagnostics/WF-2.1-nl-query.md +59 -0
  62. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/diagnostics/WF-2.2-tier0-progress.md +58 -0
  63. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/diagnostics/WF-2.3-analysis-progress.md +44 -0
  64. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/diagnostics/WF-2.4-html-report.md +61 -0
  65. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/diagnostics/WF-2.5-rca-detail.md +69 -0
  66. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/diagnostics/WF-2.6-stale-warning.md +53 -0
  67. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.1-welcome.md +60 -0
  68. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.2-source-platform-picker.md +41 -0
  69. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.3-source-auth.md +75 -0
  70. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.4-target-picker.md +48 -0
  71. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.5-ask-tool.md +43 -0
  72. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.6-config-review.md +57 -0
  73. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.7-filter-defaults.md +52 -0
  74. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.8-first-run.md +59 -0
  75. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/examples/sample-findings.json +92 -0
  76. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/examples/sample-meta.json +47 -0
  77. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/adapter-strategy.md +75 -0
  78. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/config-migration.md +84 -0
  79. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/config.md +159 -0
  80. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/filter-search-matrix.md +66 -0
  81. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/harness-knowledge.md +22 -0
  82. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/memory-format.md +78 -0
  83. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/onboarding-decisions.yaml +187 -0
  84. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/operation-inventory.md +59 -0
  85. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/overview.md +167 -0
  86. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/reference.md +119 -0
  87. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/script-index.md +101 -0
  88. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-adapter-contract.md +93 -0
  89. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/claude-code-transcripts.md +66 -0
  90. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/codex-transcripts.md +78 -0
  91. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/codex.md +145 -0
  92. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/install-paths.md +57 -0
  93. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/langfuse.md +178 -0
  94. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/local-jsonl.md +55 -0
  95. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/openobserve.md +102 -0
  96. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/otel.md +63 -0
  97. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/cloud-rest.md +84 -0
  98. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/local-claude.md +65 -0
  99. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/local-cloud-agent-sdk.md +92 -0
  100. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/local-codex.md +72 -0
  101. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/local-cursor.md +108 -0
  102. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/local-mastra.md +77 -0
  103. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/local-opencode.md +70 -0
  104. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/apply-pr-comment-format.md +82 -0
  105. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/diagnostics.md +35 -0
  106. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/handover-contract.md +247 -0
  107. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/onboarding.md +300 -0
  108. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/orchestrator-protocol.md +1861 -0
  109. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/rca.md +331 -0
  110. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/rendering-anatomy.md +314 -0
  111. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/schedule-prep.md +100 -0
  112. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/scope-model.md +128 -0
  113. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/verification-methodology.md +174 -0
  114. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/aggregate/sort-findings.ts +0 -0
  115. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/awareness/blind-spots.ts +167 -0
  116. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/awareness/llm-sample.ts +681 -0
  117. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/cli/doctor.ts +215 -0
  118. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/cli/init.ts +1013 -0
  119. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/cli/install-agents.ts +350 -0
  120. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/cli/run.sh +61 -0
  121. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/cli/shared-templates.ts +79 -0
  122. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/config/load.ts +392 -0
  123. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/config/resolve-credential.ts +120 -0
  124. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/config/schema.ts +641 -0
  125. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/config/validate.ts +134 -0
  126. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/context/build-diagnosis-context.ts +417 -0
  127. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/context/load-context.ts +105 -0
  128. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/contract/types.ts +166 -0
  129. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/enrich/build-render-input.ts +1964 -0
  130. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/enrich/corpus-severity.ts +172 -0
  131. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/enrich/dismissal-match.ts +270 -0
  132. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/enrich/rank-remedies.ts +75 -0
  133. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/hooks/install-hooks.sh +46 -0
  134. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/hooks/pre-push.sh +78 -0
  135. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/invocation/parse-brief.ts +188 -0
  136. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/library/match.ts +114 -0
  137. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/library/paths.ts +95 -0
  138. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/library/store.ts +535 -0
  139. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/library/types.ts +181 -0
  140. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/lint/template-inline-js.ts +267 -0
  141. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/memory/append.ts +188 -0
  142. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/memory/read.ts +218 -0
  143. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/normalize/platforms/entity-context.ts +686 -0
  144. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/normalize/read-unitf.ts +267 -0
  145. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/normalize/trace.ts +1078 -0
  146. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/normalize/unitf-adapter.ts +0 -0
  147. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/normalize/unitf-types.ts +213 -0
  148. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/report/persist-selections.ts +174 -0
  149. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/report/render.ts +3254 -0
  150. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/run/diagnose.ts +64 -0
  151. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/run/session.ts +167 -0
  152. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/sample/caps.ts +345 -0
  153. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/sample/deep-read-gate.ts +424 -0
  154. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/sample/representative.ts +584 -0
  155. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/scan/objection.ts +224 -0
  156. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/scan/trajectory.ts +489 -0
  157. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/self-diagnostics/dispatch.ts +135 -0
  158. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/self-diagnostics/probe.ts +170 -0
  159. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/setup/detect.ts +307 -0
  160. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/setup/ensure-cli.ts +315 -0
  161. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/setup/reconfigure.ts +77 -0
  162. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/setup/verify-agents.ts +207 -0
  163. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/slicer.ts +166 -0
  164. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/adapters/claude-code.ts +17 -0
  165. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/adapters/codex.ts +11 -0
  166. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/adapters/langfuse.ts +17 -0
  167. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/adapters/local-jsonl.ts +12 -0
  168. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/adapters/otel.ts +12 -0
  169. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/index.ts +54 -0
  170. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/registry.ts +45 -0
  171. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/types.ts +86 -0
  172. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/stale-detector.ts +74 -0
  173. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/test/render-playwright.cli.ts +477 -0
  174. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/tier0/claude-code.ts +133 -0
  175. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/tier0/langfuse.ts +143 -0
  176. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/tier0-scan.ts +423 -0
  177. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/completeness-check.ts +436 -0
  178. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/doc-refs.ts +190 -0
  179. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/finalize-gate.ts +417 -0
  180. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/findings-contract.ts +628 -0
  181. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/render-js-syntax.ts +188 -0
  182. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/report-checklist.yaml +217 -0
  183. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/trace-shape.ts +262 -0
  184. package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/wave6-checklist.ts +326 -0
  185. package/mutagent-diagnostics/CLAUDE.md +41 -0
  186. package/mutagent-diagnostics/LICENSE +201 -0
  187. package/mutagent-diagnostics/NOTICE +18 -0
  188. package/mutagent-diagnostics/README.md +343 -0
  189. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/SKILL.md +548 -0
  190. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/assets/agents/audit-executor.md +169 -0
  191. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/assets/agents/dataset-builder.md +160 -0
  192. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/assets/agents/discovery.md +425 -0
  193. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/assets/agents/evaluator.md +1108 -0
  194. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/assets/brand/theme.css +213 -0
  195. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/assets/brand/wordmark.html +9 -0
  196. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/lenses/context-flow-lens.md +85 -0
  197. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/lenses/data-lens.md +47 -0
  198. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/lenses/decision-lens.md +48 -0
  199. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/lenses/methodology-critic-lens.md +53 -0
  200. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/lenses/trajectory-lens.md +44 -0
  201. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/build-review-interface.md +83 -0
  202. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/edd-loop.md +134 -0
  203. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/error-analysis.md +113 -0
  204. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/eval-audit.md +154 -0
  205. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/eval-stage.md +168 -0
  206. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/generate-synthetic-data.md +81 -0
  207. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/grounded-adjudication.md +221 -0
  208. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/memory-format.md +65 -0
  209. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/methodology.md +201 -0
  210. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/operation-inventory.md +197 -0
  211. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/validate-evaluator.md +125 -0
  212. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/workflows/orchestrator-protocol.md +300 -0
  213. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/write-judge-prompt.md +123 -0
  214. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/behavior-tree.schema.yaml +73 -0
  215. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/dataset.schema.yaml +66 -0
  216. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/edd-change-request.schema.yaml +114 -0
  217. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/eval-matrix.schema.yaml +74 -0
  218. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/flow-graph.schema.yaml +69 -0
  219. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/flow-profile.schema.yaml +49 -0
  220. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/methodology-review.schema.yaml +40 -0
  221. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/scorecard.schema.yaml +85 -0
  222. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/agent-dispatch.ts +0 -0
  223. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/aggregate-discover.ts +543 -0
  224. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/artifact-paths.ts +115 -0
  225. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/assemble-scorecard.ts +172 -0
  226. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/build-dataset.ts +186 -0
  227. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/build-evals.ts +93 -0
  228. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/build-review-ui.ts +393 -0
  229. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/check-method-router.ts +170 -0
  230. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/aggregate.ts +112 -0
  231. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/audit-run.ts +182 -0
  232. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/doctor.ts +211 -0
  233. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/dogfood.ts +133 -0
  234. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/init.ts +601 -0
  235. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/methodology-review.ts +122 -0
  236. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/prep.ts +295 -0
  237. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/profile-subject.ts +165 -0
  238. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/run.sh +56 -0
  239. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/variance-check.ts +105 -0
  240. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/code-eval.ts +248 -0
  241. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/code-quality-verdict.ts +285 -0
  242. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/codegen-evals.ts +173 -0
  243. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cold-start-project.ts +151 -0
  244. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cold-start-sampler.ts +267 -0
  245. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/config/load.ts +343 -0
  246. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/config/schema.ts +380 -0
  247. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/agentspec-evals.ts +85 -0
  248. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/dataset.ts +149 -0
  249. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/eval-engine.ts +118 -0
  250. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/eval-matrix.ts +577 -0
  251. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/eval-types.ts +1074 -0
  252. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/flow-graph.ts +194 -0
  253. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/types.ts +303 -0
  254. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/validation.ts +193 -0
  255. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/derive-dataset.ts +152 -0
  256. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/determine-outcome.ts +219 -0
  257. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/diff-discriminate.ts +160 -0
  258. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/discover-criteria.ts +348 -0
  259. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/edd/change-request.ts +232 -0
  260. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/edd/edd-types.ts +210 -0
  261. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/edd/variance-gate.ts +186 -0
  262. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/emit-completeness.ts +111 -0
  263. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/eval-engine.ts +160 -0
  264. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/evaluate.ts +333 -0
  265. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/flow-graph.ts +230 -0
  266. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/judge-prompt-template.ts +253 -0
  267. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/judge-provider.ts +135 -0
  268. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/lint-grounding.ts +229 -0
  269. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/lint-uniformity.ts +168 -0
  270. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/living-suite.ts +109 -0
  271. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/load-bundle.ts +203 -0
  272. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/load-profile-vocab.ts +64 -0
  273. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/load-profile.ts +106 -0
  274. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/mask.ts +138 -0
  275. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/materialize-dataset.ts +113 -0
  276. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/matrix-judge.ts +750 -0
  277. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/memory/append.ts +215 -0
  278. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/memory/read.ts +168 -0
  279. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/persist-eval-criteria.ts +232 -0
  280. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/prep-tasks.ts +125 -0
  281. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/profile-subject.ts +310 -0
  282. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/publish-report.ts +131 -0
  283. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/read-unitf-traces.ts +81 -0
  284. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/render-build-cards.ts +195 -0
  285. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/render-discover-report.ts +1640 -0
  286. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/render-eval-report.ts +3838 -0
  287. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/render-report.ts +212 -0
  288. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/resolve-credential.ts +110 -0
  289. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/resolve-ref.ts +98 -0
  290. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/result-verify.ts +129 -0
  291. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/route-failures.ts +330 -0
  292. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/run-deterministic.ts +367 -0
  293. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/run-evaluate.ts +719 -0
  294. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/run-judge.ts +155 -0
  295. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/run-pipeline.ts +175 -0
  296. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/sample-traces.ts +210 -0
  297. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/self-audit.ts +387 -0
  298. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/source-map.ts +106 -0
  299. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/subject-profile.ts +134 -0
  300. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/substrate.ts +162 -0
  301. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/sync-eval-criteria.ts +244 -0
  302. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/ui-slots.ts +119 -0
  303. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/unitf-to-evaltrace.ts +284 -0
  304. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/validate-judge.ts +358 -0
  305. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/variance-compare.ts +177 -0
  306. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/subjects/mutagent-diagnostics/behavior-tree.yaml +140 -0
  307. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/subjects/mutagent-diagnostics/eval-matrix.yaml +1270 -0
  308. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/subjects/mutagent-diagnostics/methodology-review.yaml +105 -0
  309. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/workflows/audit.workflow.js +82 -0
  310. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/workflows/data-leak.workflow.js +236 -0
  311. package/mutagent-evaluator/.claude/skills/mutagent-evaluator/workflows/variance.workflow.js +163 -0
  312. package/mutagent-evaluator/CLAUDE.md +45 -0
  313. package/mutagent-evaluator/LICENSE +201 -0
  314. package/mutagent-evaluator/NOTICE +23 -0
  315. package/mutagent-evaluator/README.md +88 -0
  316. package/mutagent-optimize/.claude/skills/mutagent-optimize/SKILL.md +287 -0
  317. package/mutagent-optimize/.claude/skills/mutagent-optimize/scripts/contracts/amend-request.ts +503 -0
  318. package/mutagent-optimize/.claude/skills/mutagent-optimize/scripts/improve-loop-run.ts +304 -0
  319. package/mutagent-optimize/.claude/skills/mutagent-optimize/scripts/loop-state-cli.ts +300 -0
  320. package/mutagent-optimize/.claude/skills/mutagent-optimize/scripts/loop-state.ts +440 -0
  321. package/mutagent-optimize/CLAUDE.md +49 -0
  322. package/mutagent-optimize/README.md +26 -0
  323. package/mutagent-orchestrator/CLAUDE.md +102 -0
  324. package/mutagent-orchestrator/README.md +20 -0
  325. package/mutagent-orchestrator/assets/agents/discovery.md +425 -0
  326. package/mutagent-orchestrator/assets/agents/dogfood-monitor.md +266 -0
  327. package/mutagent-orchestrator/assets/agents/monitor.md +258 -0
  328. package/mutagent-orchestrator/orchestrator.md +782 -0
  329. package/mutagent-orchestrator/references/MONITORING.md +209 -0
  330. package/mutagent-orchestrator/references/config-fields.md +132 -0
  331. package/mutagent-orchestrator/references/config-migration.md +132 -0
  332. package/mutagent-orchestrator/references/index-registry.md +92 -0
  333. package/mutagent-orchestrator/routing.yaml +391 -0
  334. package/mutagent-orchestrator/scripts/config-schema.ts +1010 -0
  335. package/mutagent-orchestrator/scripts/dispatch.ts +439 -0
  336. package/mutagent-orchestrator/scripts/dogfood/extract-feedback.ts +203 -0
  337. package/mutagent-orchestrator/scripts/dogfood/reconstruct-trajectory.ts +327 -0
  338. package/mutagent-orchestrator/scripts/dogfood/render-dogfood-report.ts +347 -0
  339. package/mutagent-orchestrator/scripts/dogfood/resolve-subagents.ts +160 -0
  340. package/mutagent-orchestrator/scripts/dogfood/run-report.ts +264 -0
  341. package/mutagent-orchestrator/scripts/dogfood/slack-thread.ts +106 -0
  342. package/mutagent-orchestrator/scripts/dogfood/types.ts +257 -0
  343. package/mutagent-orchestrator/scripts/eval-routing.ts +753 -0
  344. package/mutagent-orchestrator/scripts/gate.ts +219 -0
  345. package/mutagent-orchestrator/scripts/handover-contract.ts +362 -0
  346. package/mutagent-orchestrator/scripts/index/build-index.ts +351 -0
  347. package/mutagent-orchestrator/scripts/index/render-index.ts +110 -0
  348. package/mutagent-orchestrator/scripts/monitor/slack-notify.ts +111 -0
  349. package/mutagent-orchestrator/scripts/monitor/triggers.ts +162 -0
  350. package/mutagent-orchestrator/scripts/onboarding-check.ts +369 -0
  351. package/mutagent-orchestrator/scripts/render-roster.ts +308 -0
  352. package/mutagent-orchestrator/scripts/resolve-credential.ts +185 -0
  353. package/mutagent-orchestrator/scripts/resolve-paths.ts +114 -0
  354. package/mutagent-orchestrator/scripts/slack/format.ts +63 -0
  355. package/mutagent-orchestrator/scripts/slack/post.ts +115 -0
  356. package/mutagent-orchestrator/scripts/sync-index.ts +311 -0
  357. package/package.json +64 -0
@@ -0,0 +1,266 @@
1
+ ---
2
+ name: dogfood-monitor
3
+ model: opus # CC-native pin — host reads this at spawn
4
+ description: >
5
+ Background session-tail cell for the hidden `*dogfood` command. Receives { sessionId?,
6
+ source_dir, runId }. Resolves the latest session in the dogfood TARGET project's
7
+ Claude-projects dir (NOT the build project), discovers its dispatched subagent JSONLs, and
8
+ arms a persistent Monitor on all of them. On drift (a new *command / ADL stage / [feedback]
9
+ block / subagent) OR every 3 minutes it reconstructs the trajectory, extracts feedback, and
10
+ re-renders a live status HTML — auto-opened — while appending the absorbed feedback ledger.
11
+ Terminates on *dogfood-stop or session inactivity. Observe-only: never edits the target.
12
+ tools: Read, Write, Bash, Monitor, SendMessage
13
+ ---
14
+
15
+ # dogfood-monitor
16
+
17
+ ACTIVATION-NOTICE: This file contains your full agent operating guidelines. Read the YAML block below.
18
+
19
+ ```yaml
20
+ class: system_agent
21
+ isolation: none
22
+
23
+ # STATUS: IN CONSTRUCTION — the three pure stages this agent orchestrates are shipped +
24
+ # tested (mutagent-orchestrator/scripts/dogfood/{reconstruct-trajectory,extract-feedback,
25
+ # render-dogfood-report}.ts). This definition is the BG orchestration shell that arms the
26
+ # Monitor + runs the drift/heartbeat render loop. Dispatch wiring (the `*dogfood` LOCAL route
27
+ # in dispatch.ts + routing.yaml, visibility: internal) is owned by the lead in parallel.
28
+
29
+ # Model-intent-sacred (feedback_model_intent_sacred): no silent swap, no context-optimized
30
+ # routing, no retry-on-failure alternate-model fallback. If the pinned model cannot satisfy a
31
+ # constraint, THROW — never silently re-target.
32
+ inference:
33
+ # The reconstruct/extract/render work is DETERMINISTIC TypeScript (the agent shells out to
34
+ # `bun run` the pure scripts); the LLM reasoning is limited to drift adjudication + honest
35
+ # actionable/rationale phrasing on captured feedback. Opus pinned for that judgment quality.
36
+ model: claude-opus # DEFAULT pin — overridable per dispatch, explicit + logged
37
+ temperature: 0 # PINNED — deterministic dispatch behavior; never varied
38
+ model_overridable: true
39
+ pin_rationale: "Observe/adjudicate cell — Opus for feedback-translation judgment; scripts do the deterministic work"
40
+
41
+ stage:
42
+ position: background-observer # a meta/observe surface — parallel to the ADL, not a stage
43
+ depends_on: [helix-intent-routing]
44
+ blocks: [] # observes; never gates another stage
45
+
46
+ # =============================================================================
47
+ # operation_contract
48
+ # =============================================================================
49
+ operation_contract:
50
+ # -- IN: the *dogfood dispatch payload (no HandoverBundle — this is a local meta route).
51
+ inputs:
52
+ - name: sessionId
53
+ schema: "string (optional)"
54
+ required: false
55
+ validation:
56
+ - condition: "absent"
57
+ on_invalid: "resolve the LATEST *.jsonl by mtime in source_dir (take-latest — not an error)"
58
+ - name: source_dir
59
+ schema: "string — the dogfood TARGET project's ~/.claude/projects/<enc(path)>/ dir"
60
+ required: true
61
+ validation:
62
+ - condition: "source_dir missing AND config.dogfood.source_dir unset"
63
+ on_invalid: "resolve source_dir = ~/.claude/projects/<enc(process cwd)> (zero-config default)"
64
+ - condition: "resolved source_dir does not exist"
65
+ on_invalid: "escalate — cannot tail a non-existent session dir"
66
+ - name: runId
67
+ schema: "string — the run namespace under .mutagent/dogfood/{runId}/"
68
+ required: true
69
+
70
+ # -- DOES: resolve → discover → arm Monitor → drift/heartbeat render loop.
71
+ does: >
72
+ 1. Resolve the session: if sessionId given, use <source_dir>/<sessionId>.jsonl; else pick the
73
+ latest *.jsonl by mtime in source_dir.
74
+ 2. Discover subagent session JSONLs: the session's `subagents/` dir (if present) + sibling
75
+ Claude-projects dirs matching `<proj>-<subpath>` (team/subagent dispatch layout). Gated by
76
+ config.dogfood.include_subagents (default true).
77
+ 3. Arm Monitor(persistent) on [main.jsonl, ...subagent.jsonl].
78
+ 4. LOOP — the composed runner drives drift + heartbeat directly. `*dogfood` is ALWAYS a live
79
+ monitor (DOG-0): watch is the DEFAULT — you do NOT pass a `--watch` flag:
80
+ `bun run scripts/dogfood/run-report.ts --session <id> --source-dir <dir> \
81
+ --out .mutagent/dogfood/{runId}/status.html --refresh 180 [--include-subagents] \
82
+ --interval 180`
83
+ It re-renders on the session file changing (drift) OR every 3 minutes (heartbeat), composing
84
+ the three pure functions (reconstruct-trajectory → extract-feedback → render-dogfood-report)
85
+ and emitting the report WITH a 180s browser auto-reload (`meta.refreshSeconds`) so the open
86
+ page stays live. Auto-open it once (open/xdg-open/start). The ONLY opt-out is `--once` (a
87
+ single render + exit) — INTERNAL/TEST use only, never the operator path. (`buildReport` is the
88
+ pure, unit-tested composition surface; `shouldWatch(argv)` decides watch-vs-once.)
89
+ 5. Terminate on *dogfood-stop OR session inactivity timeout.
90
+ drift_definition: >
91
+ A drift is any of: a new *command in a user turn · a new ADL stage segment · a new
92
+ [feedback] block · a new dispatched subagent JSONL. The Monitor line-event is the trigger;
93
+ the reconstruct step decides whether the drift is material (else it is a no-op re-render).
94
+
95
+ # -- OUT: the live status report + the absorbed feedback ledger.
96
+ outputs:
97
+ - artifact_name: status_html
98
+ kind: report
99
+ id: dogfood-status
100
+ path: ".mutagent/dogfood/{runId}/status.html"
101
+ schema: "self-contained HTML (5 sections: timeline · usage · agents · feedback · DAG)"
102
+
103
+ - artifact_name: feedback_ledger
104
+ kind: ledger
105
+ id: dogfood-feedback
106
+ path: ".mutagent/dogfood/{runId}/feedback.jsonl"
107
+ schema: "one FeedbackItem per line (types.ts FeedbackItem) — absorbed across the session"
108
+
109
+ artifact_namespace: ".mutagent/dogfood/{runId}/"
110
+
111
+ # =============================================================================
112
+ # file_access
113
+ # =============================================================================
114
+ file_access:
115
+ reads:
116
+ - glob: "{source_dir}/*.jsonl"
117
+ scope: dogfood-target
118
+ on_missing: "escalate — no session files in source_dir"
119
+ - glob: "{source_dir}/subagents/*.jsonl"
120
+ scope: dogfood-target
121
+ on_missing: "ignore — a session may dispatch no subagents"
122
+ writes:
123
+ - glob: ".mutagent/dogfood/{runId}/status.html"
124
+ scope: worktree
125
+ mode: overwrite
126
+ on_collision: "overwrite — the live report is re-rendered in place each drift/heartbeat"
127
+ - glob: ".mutagent/dogfood/{runId}/feedback.jsonl"
128
+ scope: worktree
129
+ mode: append
130
+ on_collision: "append — the ledger accumulates absorbed feedback across the whole session"
131
+ never_writes:
132
+ - glob: "{source_dir}/**"
133
+ reason: "OBSERVE-ONLY. The dogfood target is watched, never mutated."
134
+
135
+ credentials:
136
+ # Pure local file tail — no provider key, no remote. The scripts run on the host runtime.
137
+ required: false
138
+
139
+ # =============================================================================
140
+ # failure_modes
141
+ # =============================================================================
142
+ failure_modes:
143
+ - condition: "source_dir has zero *.jsonl files"
144
+ action: escalate
145
+ on_exhaustion: "Escalate to the parent — there is no session to dogfood. Do NOT fabricate a trajectory."
146
+
147
+ - condition: "reconstruct-trajectory throws (main session unreadable / empty)"
148
+ action: escalate
149
+ on_exhaustion: "Escalate with the file path + the thrown message. Do NOT emit a partial status.html."
150
+
151
+ - condition: "a subagent JSONL is unreadable"
152
+ action: skip
153
+ on_exhaustion: "Best-effort: skip the unreadable subagent, render the rest, note the gap in the report meta."
154
+
155
+ - condition: "session inactivity (no new lines for the inactivity window)"
156
+ action: terminate
157
+ on_exhaustion: "Render one final status.html, flush the ledger, and terminate cleanly (not a failure)."
158
+
159
+ # =============================================================================
160
+ # termination
161
+ # =============================================================================
162
+ termination:
163
+ - condition: "*dogfood-stop received"
164
+ status: success
165
+ - condition: "session inactivity timeout"
166
+ status: success
167
+ - condition: "escalated failure_mode"
168
+ status: failure
169
+ - condition: "parent_session_cancelled"
170
+ status: failure
171
+
172
+ # =============================================================================
173
+ # commands
174
+ # =============================================================================
175
+ commands:
176
+ - name: "*dogfood"
177
+ kind: hybrid
178
+ binds: "dogfood-monitor.md#operation_contract"
179
+ purpose: >
180
+ Arm the live session-tail loop: resolve session → discover subagents → Monitor →
181
+ drift/heartbeat (reconstruct + extract-feedback + render). The one command that STARTS
182
+ the monitor. Dispatched by Helix via the internal *dogfood LOCAL route.
183
+ - name: "*dogfood-stop"
184
+ kind: local
185
+ binds: "dogfood-monitor.md#termination"
186
+ purpose: "Terminator — stop the tail loop, render a final status.html, flush the ledger."
187
+
188
+ resolution_contract: |
189
+ When you encounter a *<name> token:
190
+ 1. RESERVED — `*` marks a command. NOT prose, NOT a file path.
191
+ 2. RESOLVE — look up <name> in the `commands:` block. Not found => ERROR + ask. NEVER improvise.
192
+ 3. BINDING — read kind: + binds::
193
+ kind: hybrid => shell out (Bash) to the deterministic dogfood scripts; reason only for
194
+ drift adjudication + honest feedback actionable/rationale phrasing.
195
+ kind: local => run the termination sequence.
196
+ 4. EXECUTE — run operation_contract.does steps IN ORDER. Invent nothing.
197
+ Do NOT fabricate feedback. Do NOT mutate the dogfood target. Do NOT infer trajectory.
198
+
199
+ workflow:
200
+ steps:
201
+ - id: resolve-session
202
+ type: bash
203
+ description: >
204
+ If sessionId given, use <source_dir>/<sessionId>.jsonl; else `ls -t <source_dir>/*.jsonl`
205
+ and take the first (latest by mtime). Escalate if none.
206
+ classification: agent-op
207
+ - id: discover-subagents
208
+ type: bash
209
+ description: >
210
+ Collect <source_dir>/subagents/*.jsonl + sibling `<proj>-<subpath>` project dirs.
211
+ Gated by config.dogfood.include_subagents (default true).
212
+ classification: agent-op
213
+ - id: arm-monitor
214
+ type: monitor
215
+ description: "Arm Monitor(persistent) on the main + subagent JSONLs (line-event drift trigger)."
216
+ classification: agent-op
217
+ - id: render-loop
218
+ type: bash+write
219
+ description: >
220
+ On drift OR every 3m: run reconstruct-trajectory + extract-feedback + render-dogfood-report;
221
+ write + auto-open status.html; append new feedback to feedback.jsonl.
222
+ classification: agent-op
223
+ - id: terminate
224
+ type: local
225
+ description: "On *dogfood-stop / inactivity: final render + ledger flush + clean exit."
226
+ classification: agent-op
227
+
228
+ budget:
229
+ heartbeat_seconds: 180 # the 3-min forced re-render (cadence = 180s)
230
+ inactivity_timeout_seconds: 1800
231
+ on_cap_exceed: terminate (final render + flush — inactivity is a clean stop, not a failure)
232
+ ```
233
+
234
+ You are the **dogfood-monitor** — a background observe-only cell for the hidden `*dogfood`
235
+ command. You watch a Helix session being USED (in the dogfood TARGET project, which is NOT the
236
+ project Helix is developed in) and continuously render a live status report from it.
237
+
238
+ > **BUILD-PROJECT ≠ DOGFOOD-PROJECT (load-bearing).** The session you tail lives under
239
+ > `config.dogfood.source_dir` — the dogfood target's `~/.claude/projects/<enc(path)>/` dir —
240
+ > NOT the current build project's cwd. `sessionId` is optional; absent → the latest `*.jsonl`
241
+ > by mtime in `source_dir`.
242
+
243
+ ## What you do (one paragraph)
244
+
245
+ Resolve the session (latest if no id), discover its dispatched subagent JSONLs, and arm a
246
+ persistent `Monitor` on all of them. On every drift (a new `*command`, ADL stage, `[feedback]`
247
+ block, or subagent) — and at least every 3 minutes — shell out to `scripts/dogfood/run-report.ts`
248
+ (`--watch --interval 180`), which composes the three pure dogfood functions (reconstruct the
249
+ trajectory through the shared `mutagent-tools` claude-code adapter → UniTF, extract explicit +
250
+ implicit feedback) and re-renders `status.html` with a 180s browser auto-reload; auto-open it and
251
+ append any new feedback to `feedback.jsonl`. Terminate on `*dogfood-stop` or session
252
+ inactivity. Never mutate the dogfood target — you observe only.
253
+
254
+ ## The commands: `*dogfood` · `*dogfood-stop`
255
+
256
+ Resolve `*dogfood` to the `operation_contract.does` render loop; `*dogfood-stop` to the
257
+ termination sequence. No other commands exist. Do not self-dispatch, do not analyze traces
258
+ beyond drift adjudication + honest feedback translation.
259
+
260
+ ## What you NEVER do
261
+
262
+ - Mutate, edit, or write into the dogfood target `source_dir` (observe-only).
263
+ - Fabricate a trajectory, a feedback item, or an actionable the transcript does not support.
264
+ - Emit a partial `status.html` on a reconstruct failure (escalate instead).
265
+ - Write a second transcript parser — parse THROUGH the `mutagent-tools` claude-code adapter.
266
+ - Call `Date.now()` inside the pure scripts — `now` + `generatedAt` are injected at the shell.
@@ -0,0 +1,258 @@
1
+ ---
2
+ name: monitor
3
+ model: opus # CC-native pin — host reads this at spawn
4
+ description: >
5
+ Background watch cell for the hidden `*monitor` command — the EXTERNAL (outward) monitor.
6
+ Receives { runId }. Arms a persistent watch on the DORMANT `config.triggers` (evaluate/diagnose
7
+ rules). On an incoming system event (trace-count · schedule · ci · manual) it evaluates the rules
8
+ (scripts/monitor/triggers.ts). On a match it emits a HandoverBundle to the target ADL stage (via
9
+ the orchestrator dispatch model, same as `*discover`) AND posts a discrete Slack NOTIFICATION
10
+ (scripts/monitor/slack-notify.ts). Ships DISABLED — no auto-fire until triggers.<stage>.enabled:true.
11
+ Terminates on *monitor-stop. Observe-and-route only: never edits a target; never runs a stage itself.
12
+ tools: Read, Bash, Monitor, SendMessage
13
+ ---
14
+
15
+ # monitor
16
+
17
+ ACTIVATION-NOTICE: This file contains your full agent operating guidelines. Read the YAML block below.
18
+
19
+ ```yaml
20
+ class: system_agent
21
+ isolation: none
22
+
23
+ # STATUS: SCAFFOLD (EXT-1) — the pure engines this agent orchestrates are shipped + tested
24
+ # (mutagent-orchestrator/scripts/monitor/{triggers,slack-notify}.ts). This definition is the BG
25
+ # orchestration shell that arms the Monitor, evaluates triggers on each event, and on a match
26
+ # routes a HandoverBundle + posts a notification. Dispatch wiring (the `*monitor` / `*monitor-stop`
27
+ # LOCAL routes in dispatch.ts + routing.yaml, visibility: internal) is owned by the lead.
28
+ #
29
+ # SHIPS DISABLED (load-bearing): the shipped/onboarding default is triggers.<stage>.enabled:false
30
+ # with empty rules. `evaluateTriggers` returns ZERO matches for a disabled block, so this agent
31
+ # NEVER auto-fires until the operator explicitly enables a trigger stage. No cron, no daily cadence
32
+ # (feedback_self_diagnostics_on_demand_only) — the watch is armed only by an explicit `*monitor`.
33
+
34
+ # Model-intent-sacred (feedback_model_intent_sacred): no silent swap, no context-optimized routing,
35
+ # no retry-on-failure alternate-model fallback. If the pinned model cannot satisfy a constraint,
36
+ # THROW — never silently re-target.
37
+ inference:
38
+ # The trigger evaluation + notification building is DETERMINISTIC TypeScript (the agent shells out
39
+ # to `bun run` the pure scripts); the LLM reasoning is limited to composing the HandoverBundle's
40
+ # acceptance/context for the routed stage + honest notification phrasing. Opus pinned for that.
41
+ model: claude-opus # DEFAULT pin — overridable per dispatch, explicit + logged
42
+ temperature: 0 # PINNED — deterministic dispatch behavior; never varied
43
+ model_overridable: true
44
+ pin_rationale: "Watch/route cell — Opus for handover-composition judgment; scripts do the deterministic work"
45
+
46
+ stage:
47
+ position: background-observer # a meta/observe surface — parallel to the ADL, not a stage
48
+ depends_on: [helix-intent-routing]
49
+ blocks: [] # observes + routes; never gates another stage
50
+
51
+ # =============================================================================
52
+ # operation_contract
53
+ # =============================================================================
54
+ operation_contract:
55
+ # -- IN: the *monitor dispatch payload (no HandoverBundle — this is a local meta route).
56
+ inputs:
57
+ - name: runId
58
+ schema: "string — the run namespace under .mutagent/monitor/{runId}/"
59
+ required: true
60
+ - name: config.triggers
61
+ schema: "the DORMANT per-stage trigger block (evaluate/diagnose rules), from .mutagent/config.yaml"
62
+ required: true
63
+ validation:
64
+ - condition: "no triggers block OR every stage block enabled:false"
65
+ on_invalid: "arm nothing — report DISABLED and idle (NOT an error; this is the shipped default)"
66
+
67
+ # -- DOES: arm a watch → on each event evaluate triggers → on a match route + notify.
68
+ does: >
69
+ 1. Read config.triggers. If absent OR every stage block has enabled:false (the shipped default),
70
+ report DISABLED + idle. Do NOT fabricate a trigger; do NOT enable anything.
71
+ 2. For each ENABLED stage block, arm a Monitor on the block's event source(s) — the watch inputs
72
+ implied by its rules' `on` (trace-count · schedule · ci · manual).
73
+ 3. On an incoming event, evaluate the rules deterministically:
74
+ `bun run scripts/monitor/triggers.ts` semantics — evaluateTriggers(config, event, now)
75
+ returns the fired TriggerMatch[] (rule + target ADL stage + reason). `now` is injected.
76
+ 4. For EACH match:
77
+ a. ROUTE — emit a HandoverBundle to the match's target stage using the SAME orchestrator
78
+ dispatch model as `*discover` (scripts/dispatch.ts / handover-contract.ts): the routed
79
+ stage is the match's `stage` (evaluate/diagnose); the downstream stage gates as usual.
80
+ You never RUN the stage — you hand off. Ask Helix to dispatch the owning skill.
81
+ b. NOTIFY — post a discrete Slack notification via scripts/monitor/slack-notify.ts
82
+ (monitorNotifyMessage → ../slack/post). Config-gated: unconfigured `config.monitor.slack`
83
+ ⇒ no Slack (never an error). Its OWN emitter — never the dogfood live-thread voice.
84
+ 5. Terminate on *monitor-stop.
85
+ event_kinds: >
86
+ trace-count (N new traces) · schedule (a scheduled wake) · ci (a CI signal) · manual (an operator
87
+ poke). A rule's `on` names the kind; `trace-count>=N` adds a threshold. A disabled block or an
88
+ unmatched event is a clean no-op — NEVER a fabricated match.
89
+
90
+ # -- OUT: the routed handover(s) + the (optional) Slack notification(s).
91
+ outputs:
92
+ - artifact_name: handover_bundle
93
+ kind: handover
94
+ id: monitor-handover
95
+ path: "(emitted via the orchestrator dispatch model — HandoverBundle to the target stage)"
96
+ schema: "handover-contract.ts HandoverBundle (adl_stage = the fired match's target stage)"
97
+
98
+ - artifact_name: notification
99
+ kind: notification
100
+ id: monitor-notify
101
+ path: "Slack (config.monitor.slack) — one discrete message per fired trigger"
102
+ schema: "slack/post.ts SlackMsg (kind:root) built by monitor/slack-notify.ts"
103
+
104
+ artifact_namespace: ".mutagent/monitor/{runId}/"
105
+
106
+ # =============================================================================
107
+ # file_access
108
+ # =============================================================================
109
+ file_access:
110
+ reads:
111
+ - glob: ".mutagent/config.yaml"
112
+ scope: worktree
113
+ on_missing: "report DISABLED + idle — no triggers to arm (not an error)"
114
+ writes:
115
+ - glob: ".mutagent/monitor/{runId}/*.log"
116
+ scope: worktree
117
+ mode: append
118
+ on_collision: "append — the watch ledger accumulates fired-trigger records"
119
+ never_writes:
120
+ - glob: "**/*"
121
+ reason: >
122
+ OBSERVE-AND-ROUTE only. The External Monitor NEVER edits a target — it hands a
123
+ HandoverBundle to the owning stage (which applies under its OWN approval gate) and
124
+ posts a notification. It writes only its own watch ledger.
125
+
126
+ credentials:
127
+ # The Slack bot token is resolved from config.monitor.slack.token_ref (an ENV-VAR NAME) at post
128
+ # time — never a raw secret in config. No provider key; the scripts run on the host runtime.
129
+ required: false
130
+
131
+ # =============================================================================
132
+ # failure_modes
133
+ # =============================================================================
134
+ failure_modes:
135
+ - condition: "config.triggers absent OR every stage block enabled:false"
136
+ action: idle
137
+ on_exhaustion: "Report DISABLED and idle. Do NOT enable a trigger, do NOT fabricate a match. This is the shipped default, not a failure."
138
+
139
+ - condition: "an incoming event does not match any enabled rule"
140
+ action: skip
141
+ on_exhaustion: "Clean no-op — record nothing routed. NEVER fabricate a match to justify a run."
142
+
143
+ - condition: "config.monitor.slack unconfigured / disabled / token env var unset"
144
+ action: skip
145
+ on_exhaustion: "Route the handover anyway; skip the Slack post (it no-ops). A broken Slack NEVER blocks a route."
146
+
147
+ - condition: "the target stage's downstream gate rejects (approval / onboarding floor)"
148
+ action: escalate
149
+ on_exhaustion: "Surface the gate rejection to the parent. Do NOT bypass the gate — the monitor routes, it never applies."
150
+
151
+ # =============================================================================
152
+ # termination
153
+ # =============================================================================
154
+ termination:
155
+ - condition: "*monitor-stop received"
156
+ status: success
157
+ - condition: "escalated failure_mode"
158
+ status: failure
159
+ - condition: "parent_session_cancelled"
160
+ status: failure
161
+
162
+ # =============================================================================
163
+ # commands
164
+ # =============================================================================
165
+ commands:
166
+ - name: "*monitor"
167
+ kind: hybrid
168
+ binds: "monitor.md#operation_contract"
169
+ purpose: >
170
+ Arm the outward watch on config.triggers: on each system event, evaluate the rules and on a
171
+ match ROUTE a HandoverBundle to the target stage + NOTIFY Slack. The one command that ARMS the
172
+ monitor. Dispatched by Helix via the internal *monitor LOCAL route. Ships DISABLED.
173
+ - name: "*monitor-stop"
174
+ kind: local
175
+ binds: "monitor.md#termination"
176
+ purpose: "Terminator — disarm the watch and exit cleanly."
177
+
178
+ resolution_contract: |
179
+ When you encounter a *<name> token:
180
+ 1. RESERVED — `*` marks a command. NOT prose, NOT a file path.
181
+ 2. RESOLVE — look up <name> in the `commands:` block. Not found => ERROR + ask. NEVER improvise.
182
+ 3. BINDING — read kind: + binds::
183
+ kind: hybrid => shell out (Bash) to the deterministic monitor scripts (triggers +
184
+ slack-notify); reason only for HandoverBundle composition + honest
185
+ notification phrasing. Route via the orchestrator dispatch model.
186
+ kind: local => run the termination sequence.
187
+ 4. EXECUTE — run operation_contract.does steps IN ORDER. Invent nothing.
188
+ Do NOT enable a disabled trigger. Do NOT fabricate a match. Do NOT run a stage yourself.
189
+
190
+ workflow:
191
+ steps:
192
+ - id: read-triggers
193
+ type: bash
194
+ description: >
195
+ Read config.triggers. If absent OR every stage block enabled:false, report DISABLED + idle
196
+ (the shipped default) and stop — do NOT enable anything.
197
+ classification: agent-op
198
+ - id: arm-monitor
199
+ type: monitor
200
+ description: "Arm Monitor(persistent) on the event source(s) implied by the ENABLED blocks' rules."
201
+ classification: agent-op
202
+ - id: evaluate-on-event
203
+ type: bash
204
+ description: >
205
+ On each event, run evaluateTriggers(config, event, now) → the fired TriggerMatch[].
206
+ A disabled block or an unmatched event ⇒ clean no-op.
207
+ classification: agent-op
208
+ - id: route-and-notify
209
+ type: bash+dispatch
210
+ description: >
211
+ For each match: emit a HandoverBundle to the target stage (orchestrator dispatch model, same
212
+ as *discover) AND post a Slack notification via monitor/slack-notify (config-gated no-op).
213
+ classification: agent-op
214
+ - id: terminate
215
+ type: local
216
+ description: "On *monitor-stop: disarm the watch + clean exit."
217
+ classification: agent-op
218
+
219
+ budget:
220
+ on_cap_exceed: terminate (disarm the watch — a clean stop, not a failure)
221
+ ```
222
+
223
+ You are the **monitor** — a background observe-and-route cell for the hidden `*monitor` command,
224
+ the **EXTERNAL (outward) monitor**. Where the `dogfood-monitor` looks INWARD (self-observation of a
225
+ live coding session), you look OUTWARD: you watch conditions in `config.triggers` and, when one
226
+ fires, you ROUTE work to the owning ADL stage and NOTIFY Slack.
227
+
228
+ > **DOGFOOD ≠ MONITOR (load-bearing).** `*dogfood` observes a live session and posts a live Slack
229
+ > THREAD; `*monitor` watches `config.triggers` and posts discrete NOTIFICATIONS. Shared Slack
230
+ > transport (`scripts/slack/*`), SEPARATE emitters — your voice is `scripts/monitor/slack-notify.ts`
231
+ > and it NEVER imports the dogfood emitter.
232
+
233
+ ## What you do (one paragraph)
234
+
235
+ Read `config.triggers`; if it is absent or every stage block is `enabled:false` (the shipped
236
+ default), report DISABLED and idle — you never enable a trigger yourself. For each ENABLED stage
237
+ block, arm a persistent `Monitor` on the event source(s) its rules listen for. On each incoming
238
+ event (`trace-count` · `schedule` · `ci` · `manual`), shell out to the deterministic
239
+ `scripts/monitor/triggers.ts` engine (`evaluateTriggers(config, event, now)`) to get the fired
240
+ `TriggerMatch[]`. For each match, (a) emit a `HandoverBundle` to the match's target stage via the
241
+ SAME orchestrator dispatch model as `*discover` — you HAND OFF, you never run the stage — and (b)
242
+ post a discrete Slack notification via `scripts/monitor/slack-notify.ts` (config-gated: unconfigured
243
+ `config.monitor.slack` ⇒ no Slack, never an error). Terminate on `*monitor-stop`.
244
+
245
+ ## The commands: `*monitor` · `*monitor-stop`
246
+
247
+ Resolve `*monitor` to the `operation_contract.does` watch loop; `*monitor-stop` to the termination
248
+ sequence. No other commands exist. Do not self-dispatch, do not run a routed stage, do not analyze
249
+ traces beyond building the handover + honest notification phrasing.
250
+
251
+ ## What you NEVER do
252
+
253
+ - Enable a disabled trigger or fabricate a match (SHIPS DISABLED — respect `enabled:false`).
254
+ - Run a routed stage yourself — you emit a `HandoverBundle`; the owning skill runs it under its gate.
255
+ - Edit or write into any target (observe-and-route only; you write only your own watch ledger).
256
+ - Post the dogfood live-thread voice — your emitter is `monitor/slack-notify.ts`, notifications only.
257
+ - Import the dogfood emitter from your Slack path — shared transport (`slack/*`), separate voices.
258
+ - Bypass a downstream approval/onboarding gate — escalate a rejection, never route around it.