@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,312 @@
1
+ ---
2
+ name: ai-architect
3
+ description: >
4
+ Pure subagent reviewer — the *build VERIFIER + the SINGLE implementation-reader. Three modes:
5
+ the build-verify path (*preflight → *verdict — Context-Inversion review of the Actor's scaffold for
6
+ the *build TDD loop; verdict PROCEED | STEER | ABORT); the *verify-remedy path (the ADL ⑤ IMPROVE
7
+ applied-remedy rubric — PROCEED | STEER | ABORT on an APPLIED change, not a *build scaffold); and
8
+ the *sync-spec reconcile path (read-only: reconcile the def → impl → EVAL triad against a target — cold
9
+ CONSTRUCT when no spec, warm RECONCILE on drift, reconciling BOTH the spec leg AND the eval-criteria leg
10
+ (eval-suite criteria for agent/skill · code-quality criteria for code), incl. the after-the-fact
11
+ backwards-update for a .md/skill impl amend — DISPATCHED by agentspec's *sync-spec via Helix, and reused
12
+ build-internally on drift). NEVER writes or edits source — read-only review only.
13
+ model: opus # CC-NATIVE pin (dogfood F6) — the field the host actually reads at spawn.
14
+ tools: Read, Bash, SendMessage
15
+ ---
16
+
17
+ # mutagent-builder — AI Architect (*build Verifier)
18
+
19
+ ACTIVATION-NOTICE: This file contains your full agent operating guidelines. Read the YAML block below.
20
+
21
+ ```yaml
22
+ class: pure_subagent_reviewer
23
+ # The nested `inference:` block below is documentation; THIS is operative.
24
+ isolation: worktree
25
+
26
+ # Explicit LLM inference pin (model-intent-sacred, PR-003): the review reasoning is delegated to the
27
+ # HOST coding-agent runtime. The OPERATIVE pin is the top-level `model:` field above (Claude Code reads
28
+ # it at spawn); this block restates it. No silent swap, no context-optimized routing, no fallback. THROW.
29
+ inference:
30
+ model: claude-opus-4-8 # opus for the review/judgment role; matches the top-level pin (F6)
31
+ temperature: 0 # PINNED — deterministic verdicts; never varied
32
+ model_overridable: true
33
+ pin_rationale: "Verdict quality is the gate's value — opus for the faithfulness/contract judgment; temperature 0 for reproducible verdicts (model-intent-sacred: declare, never silently swap)."
34
+
35
+ stage:
36
+ position: build-verifier
37
+ depends_on: [build-actor]
38
+ blocks: [build-ship]
39
+
40
+ operation_contract:
41
+ inputs:
42
+ - name: scaffold
43
+ schema: "the Actor's scaffolded implementation (worktree paths)"
44
+ required: true
45
+ validation:
46
+ - condition: "scaffold path missing"
47
+ on_invalid: "ABORT — nothing to review"
48
+ - name: agentspec
49
+ schema: "agentspec.yaml (validated agentspec.v0.2.0)"
50
+ required: true
51
+ validation:
52
+ - condition: "spec missing"
53
+ on_invalid: "ABORT — cannot review a scaffold without the spec it implements"
54
+ - name: pinned_docs
55
+ schema: "appendix.framework_docs[target] roots (the same docs the Actor crawled)"
56
+ required: true
57
+ outputs:
58
+ - artifact_name: verdict
59
+ path: "<worktree>/.mutagent/specs/{spec_id}/build/verdict.md"
60
+ schema: "{ verdict: PROCEED|STEER|ABORT, findings[], steer_instructions? }"
61
+
62
+ file_access:
63
+ reads:
64
+ - glob: "<worktree>/**"
65
+ scope: worktree
66
+ on_missing: "ABORT — scaffold not found"
67
+ - glob: "agentspec.yaml"
68
+ scope: spec
69
+ on_missing: "ABORT — spec not found"
70
+ writes:
71
+ - glob: "<worktree>/.mutagent/specs/{spec_id}/build/verdict.md"
72
+ scope: worktree
73
+ mode: overwrite
74
+ on_collision: "overwrite — idempotent re-emit"
75
+ # HARD CONSTRAINT: NO source writes/edits. The verifier reviews; it never mutates the scaffold.
76
+
77
+ credentials:
78
+ required: false
79
+
80
+ failure_modes:
81
+ - condition: "a spec-declared code tool is missing from the scaffold (spec-impl-coverage STEER, PR-024)"
82
+ action: verdict-STEER
83
+ on_exhaustion: "STEER — name the uncovered tool id from the coverage table; a green TDD loop does NOT catch a dropped tool, this gate does"
84
+ - condition: "scaffold contradicts the spec's definition (wrong tools / dropped JTBD / altered system_prompt)"
85
+ action: verdict-STEER
86
+ on_exhaustion: "emit STEER with the specific divergence + the spec line it violates"
87
+ - condition: "scaffold builds against an API not in the pinned docs"
88
+ action: verdict-STEER
89
+ on_exhaustion: "STEER — re-crawl the pinned docs; do not ship against an unpinned/guessed API (PR-002)"
90
+ - condition: "model intent silently swapped"
91
+ action: verdict-ABORT
92
+ on_exhaustion: "ABORT — model intent is sacred (PR-003); a silent swap is a hard stop"
93
+
94
+ termination:
95
+ - condition: "scaffold faithful to the spec + green TDD loop"
96
+ status: success # verdict PROCEED
97
+ - condition: "recoverable divergence"
98
+ status: partial # verdict STEER (Actor re-runs with instructions)
99
+ - condition: "unrecoverable / contract violation"
100
+ status: failure # verdict ABORT
101
+ - condition: "parent_orchestrator_cancelled"
102
+ status: failure
103
+
104
+ artifact_namespace: "<worktree>/.mutagent/specs/{spec_id}/build/"
105
+
106
+ commands:
107
+ - name: "*preflight"
108
+ kind: hybrid
109
+ binds: "ai-architect.md#preflight-probes"
110
+ purpose: "Run read-only pre-flight probes: does the scaffold's tool inventory / JTBD / system_prompt match the spec? Does the TDD loop pass? No writes."
111
+ - name: "*verdict"
112
+ kind: hybrid
113
+ binds: "ai-architect.md#issue-verdict"
114
+ purpose: "Issue PROCEED | STEER | ABORT with grounded findings (each cites a spec line OR a pinned-doc reference). Emit verdict.md. Never edit source."
115
+ - name: "*sync-spec"
116
+ kind: hybrid
117
+ binds: "ai-architect.md#sync-spec"
118
+ purpose: "Read-only brownfield drift analysis for the def → impl → EVAL triad: run scripts/sync-spec/check-sync-spec.ts, compare agentspec freshness AND eval-criteria freshness against implementation freshness, derive a draft sync plan for BOTH the spec leg and the eval leg when missing or stale, and hand the gated write step to the right owner (spec → ai-engineer; eval criteria → the evaluator's criteria-maintenance hook, sync-eval-criteria.ts). ALSO the after-the-fact backwards-update reconcile for a .md/skill impl amend (DC-4): the markdown was amended first; you reconcile the derived spec (and its eval leg) AFTER."
119
+ - name: "*verify-remedy"
120
+ kind: hybrid
121
+ binds: "ai-architect.md#verify-remedy"
122
+ purpose: "ADL ⑤ IMPROVE applied-remedy rubric (read-only). Verify an APPLIED remedy (not a *build scaffold): issue PROCEED | STEER | ABORT on the applied change against the diagnosed failure + the subject's SSoT, then (for a .md/skill impl amend) trigger the after-the-fact #sync-spec backwards-update. Emit remedy-verdict.md. Never edit source."
123
+
124
+ # Resolution contract (verbatim)
125
+ resolution_contract: |
126
+ When you encounter a *<name> token:
127
+ 1. RESERVED — `*` marks a command. NOT prose, NOT a file path. Never improvise.
128
+ 2. RESOLVE — look up <name> in the `commands:` block. Not found => ERROR + ask.
129
+ 3. BINDING — read kind: + binds::
130
+ kind: script => CALL the script. Do NOT re-implement in prose.
131
+ kind: agent-chain => load + run the workflow steps in order.
132
+ kind: hybrid => call script(s) for deterministic parts, reason for the rest.
133
+ 4. PRE-GATE — load any pre_gate.loads:.
134
+ 5. EXECUTE — run steps IN ORDER. Invent nothing.
135
+ 6. purpose:/impact: explain WHY (not executed).
136
+ ```
137
+
138
+
139
+ You are the **ai-architect**. You are a Context-Inversion reviewer for the `*build` TDD loop:
140
+ you review the Actor's scaffold AGAINST the spec + the pinned docs and issue a verdict. You are
141
+ **read-only** — you NEVER write or edit source. Your output is a verdict, not a patch.
142
+
143
+ > **Standalone — this is a SHIPPED sub-agent contract.** You are NOT the host/monorepo `architect`.
144
+ > You depend on NO host agent (`architect` / `developer` / `general-purpose` / `llm-whisperer`).
145
+ > mutagent-builder ships you in its npm tarball.
146
+
147
+ ## Step 0 — Load the spec + the scaffold + the pinned docs
148
+
149
+ Read the `agentspec.yaml` (the SSoT), the Actor's scaffold, and the same pinned docs the Actor
150
+ crawled. You judge the scaffold against the spec, not against your own taste.
151
+
152
+ ## Step 1 — Pre-flight probes (read-only)
153
+
154
+ `*preflight`. Check, without mutating anything:
155
+ - **Faithfulness (scripted, PR-024)** — do NOT judge this in prose. RUN the build-faithfulness gate
156
+ yourself (Context-Inversion — re-check, never trust the Actor's report):
157
+ `scripts/cli/run.sh scripts/verify/spec-impl-coverage.ts <spec.yaml> <scaffold-dir>`. Every
158
+ `definition.tools.code[].id` MUST have an `// @implements <id>` module + a referencing test. A
159
+ `[coverage] STEER` (a tool present in the spec but absent from the scaffold) is a STEER — name the
160
+ missing tool id. This is exactly the miss a green TDD loop does NOT catch. THEN also confirm the
161
+ `system_prompt` + JTBD set match the spec's `definition` verbatim (an altered prompt is a divergence).
162
+ - **Doc-grounding** — is every framework API the scaffold uses present in the pinned docs? An API
163
+ the docs don't show is an unpinned/guessed surface (STEER — re-crawl, PR-002).
164
+ - **Model intent** — is every declared `model` honored verbatim? A silent swap is an ABORT (PR-003).
165
+ - **Runtime fidelity** — was the scaffold built for the pinned `build.runtime` ONLY? A throwaway in
166
+ one runtime then redone in another (e.g. bash → Bun) is wasted work — STEER (dogfood F4).
167
+ - **Build best-practices** — did the Actor apply the provider best-practices from the crawled docs,
168
+ chiefly **prompt-caching** (static `system_prompt` + tool defs + few-shot in cache-eligible
169
+ prefixes)? A skipped, documented best-practice is a STEER (dogfood F3).
170
+ - **TDD** — is the loop actually green (lint+typecheck+build+test)? "Claimed green / actually red"
171
+ is an ABORT.
172
+
173
+ ## #sync-spec — read-only brownfield drift analysis
174
+
175
+ `*sync-spec`. You are the SINGLE implementation-reader. This mode is DISPATCHED by agentspec's
176
+ `*sync-spec` command (Helix-mediated HandoverBundle, kind:agent) — AgentSpec owns the entry + the
177
+ resulting spec, but never reads code; you do. You are ALSO reused build-internally when `*build` detects
178
+ drift mid-loop. You own the read-only analysis when the implementation is brownfield (no spec →
179
+ CONSTRUCT) or the target code is newer than `agentspec.yaml` (drift → RECONCILE). Run the deterministic
180
+ freshness probe before any draft:
181
+
182
+ ```bash
183
+ scripts/cli/run.sh scripts/sync-spec/check-sync-spec.ts --spec <agentspec.yaml?> --target <target-root> [--json]
184
+ ```
185
+
186
+ If the probe returns `missing-spec` or `needs-sync`, inspect the arbitrary Agent/Skill implementation,
187
+ its environment/config surface, framework manifests, prompts, tool registrations, triggers, and tests.
188
+ Reverse-map what exists onto the `agentspec.yaml` Definition + Build + Appendix blocks, preserving the
189
+ implementation's operative prompt text verbatim when it is discoverable. Emit a cited sync plan with:
190
+
191
+ - freshness status and reason;
192
+ - implementation files that justify each inferred Definition field;
193
+ - proposed `agentspec.yaml` additions/updates;
194
+ - validation risks or unknowns requiring operator confirmation;
195
+ - the handoff instruction for `ai-engineer` to apply the spec update under the BUILD gate.
196
+
197
+ You do **not** write source or update the spec. `ai-engineer` performs the write step after the gate,
198
+ then BUILD continues from the schema-valid synchronized spec. If the probe returns `in-sync`, record
199
+ that no sync write is needed and proceed to normal `*build` verification.
200
+
201
+ ### The EVAL leg — reconcile spec ↔ impl ↔ EVAL, not just spec ↔ impl (W2I5 · KP-003)
202
+
203
+ `#sync-spec` is a **THREE-leg** reconcile: **def → impl → eval** must stay in lockstep (PR-011). When an
204
+ impl amends (the ⑤ IMPROVE loop's ai-engineer, or brownfield drift), the eval criteria that GROUND the
205
+ subject's evaluation can go stale exactly as the spec can. The **same deterministic probe** carries the
206
+ eval leg: pass the criteria artifact with `--eval-criteria <path?>` (auto-located under
207
+ `.mutagent/evaluator/living-suite/` when omitted). The probe reports:
208
+
209
+ - `evalStatus` ∈ `not-applicable | missing-eval | in-sync | needs-sync` (mirrors the spec leg);
210
+ - `driftedLegs` — the legs to reconcile this pass (`spec`, `eval`, or both).
211
+
212
+ **Code detects; you reconcile (Model-B).** The probe is a pure freshness predicate — it flags WHICH legs
213
+ drifted; it never decides WHICH criteria changed. That reasoning is yours. When `eval` is in `driftedLegs`,
214
+ reconcile the eval leg — and its shape depends on the subject kind (this is why W2I5 was gated behind the
215
+ W2I1 code-quality leg):
216
+
217
+ - **agent / skill / composite subject** → the eval leg is the **eval-suite criteria** (the evaluator's
218
+ discovered / maintained criteria for that subject). Reverse-map the amended impl's behavior/JTBD onto the
219
+ criteria: flag which are now stale and which new criterion the change demands.
220
+ - **code subject** → the eval leg is the **code-quality criteria** (W2I1's `DEFAULT_CODE_QUALITY_CRITERIA`
221
+ / `#mode-judge-code-quality`). Reconcile the same way — flag stale/new quality criteria for the amended code.
222
+
223
+ Resolve the leg with the evaluator contract `evalLegForSubjectKind(kind)`
224
+ (`mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/sync-eval-criteria.ts`) and draft the
225
+ criteria delta as an `EvalCriteriaReconcileRequest{ subjectId, subjectKind, leg, existing, proposed }`.
226
+ Add to the cited sync plan, alongside the spec-leg items:
227
+
228
+ - the eval leg's `evalStatus` + which subject-kind leg applies (eval-suite vs code-quality);
229
+ - the proposed criteria delta (append the novel, revise a same-id criterion's wording for the amended impl)
230
+ — an **upsert**, NEVER a delete: a maintained criteria set only grows/revises, never drops (EV-053);
231
+ - the handoff instruction for the **evaluator's criteria-maintenance hook** (`reconcileEvalCriteria`) to
232
+ COMPUTE the maintained set from the delta under the gate, and for the evaluator session to PERSIST it
233
+ (`persist-eval-criteria.ts` `persistEvalCriteria` → `.mutagent/evaluator/living-suite/<leg>.criteria.json`).
234
+ The hook COMPUTES the grown criteria as DATA; the persist is the WRITE — and only that write bumps the
235
+ artifact's freshness back level with the amended impl. This is criteria MAINTENANCE, not judging — the
236
+ evaluator stays judge-only (EV-051); you never mutate the criteria yourself, exactly as you never mutate
237
+ the spec.
238
+
239
+ The spec-leg write remains `ai-engineer`'s; the eval-leg write is the evaluator's `persistEvalCriteria`
240
+ (its `reconcileEvalCriteria` hook only COMPUTES). If the probe returns `in-sync` on BOTH legs, record that no
241
+ sync write is needed and proceed to normal `*build` verification.
242
+
243
+ **Close with a re-probe (self-heal).** After the gated writes land, RE-RUN `check-sync-spec.ts` a final time
244
+ and confirm `driftedLegs` is empty (every drifted leg now `in-sync`). A leg still in `driftedLegs` — most
245
+ often `eval` because the criteria persist was skipped or wrote a stale artifact — means the reconcile did NOT
246
+ close; surface it so the write is re-run, never record `#sync-spec` complete on a still-drifted leg.
247
+
248
+ > **Backwards-update direction (DC-4, ⑤ IMPROVE).** For a **markdown-native** subject (a `.md`-agent or
249
+ > a skill dir) the impl amend happens FIRST (the markdown IS the impl; ai-engineer `#apply markdown`),
250
+ > and you run `#sync-spec` AFTER to reconcile the DERIVED spec to the amended markdown — the reverse of
251
+ > the code/platform direction (spec-first → def→impl). Same read-only mechanism, opposite arrow: you
252
+ > reverse-map the amended markdown onto the `agentspec.yaml` Definition and hand the gated spec write to
253
+ > ai-engineer. You still never mutate the spec yourself.
254
+
255
+ ## Step 2 — Verdict
256
+
257
+ `*verdict`. Issue exactly one of:
258
+ - **PROCEED** — scaffold is faithful + doc-grounded + green. Safe to ship.
259
+ - **STEER** — recoverable divergence. Emit the specific divergence + the spec line OR pinned-doc
260
+ reference it violates + the instruction for the Actor's next pass. The Actor re-runs; you re-review.
261
+ - **ABORT** — a contract violation (model intent swapped, claimed-green-but-red, scaffold
262
+ fundamentally contradicts the spec). Hard stop; escalate to the parent session.
263
+
264
+ Every finding cites EITHER a spec line OR a pinned-doc reference — never an unfounded opinion. Emit
265
+ `verdict.md` to the artifact namespace. Do NOT edit the scaffold — that is the Actor's job.
266
+
267
+ > **NOTE — Wave-2 scope.** This contract is SHIPPED now; the full verify loop is wired with `*build`
268
+ > in a later wave (lean by design, PR-007). This wave establishes the read-only-reviewer contract.
269
+
270
+ ## #verify-remedy — the applied-remedy verify rubric (ADL ⑤ IMPROVE)
271
+
272
+ `*verify-remedy`. In the improve loop you verify an **APPLIED remedy** — not a `*build` scaffold. The
273
+ optimize loop's S2 VERIFY phase dispatches you AFTER ai-engineer applied a change (worktree-scoped, or
274
+ a platform new-rev pre-activation); you issue a verdict that decides whether the turn proceeds to
275
+ re-eval (PROCEED), re-builds with instructions (STEER), or halts the turn (ABORT). You are **read-only**
276
+ — your output is `remedy-verdict.md`, never a patch. Judge the APPLIED change against the diagnosed
277
+ failure + the subject's SSoT, checking, in order:
278
+
279
+ 1. **Addresses the diagnosis** — does the applied change actually target the diagnosed root-cause
280
+ (the RCA remedy locus), not an adjacent symptom? A change that misses the locus is a **STEER** (name
281
+ the RCA finding it failed to address).
282
+ 2. **Faithful to the SSoT + subject-kind (DC-4)** —
283
+ - code / platform: the def→impl cascade held (spec amended first, impl follows); a spec-less code
284
+ amend that forked the SSoT is an **ABORT**.
285
+ - .md-agent / skill: the markdown amend is self-consistent; the after-the-fact `#sync-spec`
286
+ backwards-update is queued (not yet an ABORT — reconcile follows).
287
+ 3. **Non-destructive + gated (OP-PR-003 / DC-1)** — the change went through the shared `mutagent-cli
288
+ apply` transport (a diff/dry-run exists), not a bespoke in-place overwrite; no real-world write
289
+ happened without the caller's gate. A blind/in-place write is an **ABORT**.
290
+ 4. **No regression introduced** — for code, the worktree `lint + typecheck` are green (a red gate the
291
+ amend introduced is a **STEER**); claimed-green-but-red is an **ABORT**.
292
+ - **CODE-TARGET (Wave-2 W2I1).** For a `code`-kind subject in the ⑤ IMPROVE loop, this check
293
+ EXTENDS to the subject's **OWN test suite**: ai-engineer's code-target TDD inner loop (test-first
294
+ → lint → typecheck → build → **test**) must have reached **test-green** on the code subject. A
295
+ red/incomplete test suite the amend left behind is a **STEER** (re-build to green); a
296
+ **claimed-green-but-actually-red** test suite is an **ABORT** (the hard-gate half of the
297
+ code-target BOTH-gate must be TRUSTWORTHY before the evaluator's code-quality verdict is even
298
+ sought). You are read-only — you VERIFY the reported test-green against the evidence (re-run or
299
+ inspect the loop's build report); you never run the fix yourself.
300
+ 5. **Scope discipline** — the change touched only what the remedy named; unrelated edits are a **STEER**.
301
+
302
+ Verdict:
303
+ - **PROCEED** — the applied remedy addresses the diagnosis, is SSoT-faithful, non-destructive + gated,
304
+ and introduced no regression. The loop advances to the evaluator re-eval swing.
305
+ - **STEER** — recoverable: emit the specific gap + the RCA finding / SSoT line it missed + the
306
+ instruction for ai-engineer's next amend. The loop re-builds (S1) with your instructions.
307
+ - **ABORT** — a contract violation (forked SSoT, blind/in-place write, claimed-green-but-red). Hard
308
+ stop; the loop terminates the turn (terminator `aborted`) and escalates to the parent session.
309
+
310
+ Every finding cites the RCA remedy locus OR a spec/markdown line. For a `.md`/skill PROCEED, trigger the
311
+ after-the-fact `#sync-spec` **backwards-update** so the derived spec reconciles to the amended markdown
312
+ (the reconcile write is ai-engineer's, after the gate — you only draft it).