@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.
- package/.claude/skills/mutagent-helix/SKILL.md +113 -0
- package/.claude/skills/mutagent-helix/scripts/cli/codex-transcode.ts +143 -0
- package/.claude/skills/mutagent-helix/scripts/cli/doctor.ts +111 -0
- package/.claude/skills/mutagent-helix/scripts/cli/init.ts +382 -0
- package/.claude/skills/mutagent-helix/scripts/cli/run.sh +61 -0
- package/CLAUDE.md +193 -0
- package/LICENSE +201 -0
- package/NOTICE +22 -0
- package/README.md +209 -0
- package/assets/adl-loop.svg +162 -0
- package/assets/system-status.svg +422 -0
- package/bin/mutagent-cli.mjs +9950 -0
- package/bin/mutagent-helix.mjs +78 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/CLAUDE.md +28 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/SKILL.md +138 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/assets/templates/agentspec.yaml.tpl +247 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/references/frameworks/doc-pins.md +53 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/references/principles.md +91 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/references/requirements.yaml +295 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/references/workflows/orchestrator-protocol.md +302 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/cli/doctor.ts +116 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/cli/init.ts +230 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/cli/run.sh +60 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/config/resolve-spec-dir.ts +199 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/contract/agentspec.schema.ts +455 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/setup/detect.ts +67 -0
- package/mutagent-agentspec/.claude/skills/mutagent-agentspec/scripts/validate/validate-spec.ts +93 -0
- package/mutagent-agentspec/LICENSE +201 -0
- package/mutagent-agentspec/NOTICE +19 -0
- package/mutagent-agentspec/README.md +44 -0
- package/mutagent-builder/.claude/skills/mutagent-builder/SKILL.md +100 -0
- package/mutagent-builder/.claude/skills/mutagent-builder/assets/agents/ai-architect.md +312 -0
- package/mutagent-builder/.claude/skills/mutagent-builder/assets/agents/ai-engineer.md +357 -0
- package/mutagent-builder/.claude/skills/mutagent-builder/assets/templates/build-report.md.tpl +39 -0
- package/mutagent-builder/.claude/skills/mutagent-builder/references/principles.md +31 -0
- package/mutagent-builder/.claude/skills/mutagent-builder/references/workflows/build-protocol.md +61 -0
- package/mutagent-builder/.claude/skills/mutagent-builder/references/workflows/improve-handoff.md +23 -0
- package/mutagent-builder/.claude/skills/mutagent-builder/scripts/cli/run.sh +60 -0
- package/mutagent-builder/.claude/skills/mutagent-builder/scripts/handoff/validate-build-input.ts +72 -0
- package/mutagent-builder/.claude/skills/mutagent-builder/scripts/sync-spec/check-sync-spec.ts +499 -0
- package/mutagent-builder/.claude/skills/mutagent-builder/scripts/verify/spec-impl-coverage.ts +182 -0
- package/mutagent-builder/CLAUDE.md +25 -0
- package/mutagent-builder/README.md +26 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/README.md +192 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/SKILL.md +352 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/agents/ai-architect.md +256 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/agents/ai-engineer.md +344 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/agents/diagnostics-analyzer.md +576 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/agents/discovery.md +425 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/audit.json.tpl +24 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/audit.md.tpl +49 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/config.yaml.tpl +100 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/pr-body.md.tpl +56 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/report.html.tpl +327 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/shared/README.md +27 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/shared/iter-N-handover.md.tpl +125 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/shared/self-diagnosis-contract.v0.1.0.yaml.tpl +234 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/shared/spec.yaml.tpl +152 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/shared/team.yaml.tpl +127 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/templates/shared/wave-N-dashboard.html.tpl +1712 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/diagnostics/WF-2.1-nl-query.md +59 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/diagnostics/WF-2.2-tier0-progress.md +58 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/diagnostics/WF-2.3-analysis-progress.md +44 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/diagnostics/WF-2.4-html-report.md +61 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/diagnostics/WF-2.5-rca-detail.md +69 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/diagnostics/WF-2.6-stale-warning.md +53 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.1-welcome.md +60 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.2-source-platform-picker.md +41 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.3-source-auth.md +75 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.4-target-picker.md +48 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.5-ask-tool.md +43 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.6-config-review.md +57 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.7-filter-defaults.md +52 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/assets/wireframes/onboarding/WF-1.8-first-run.md +59 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/examples/sample-findings.json +92 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/examples/sample-meta.json +47 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/adapter-strategy.md +75 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/config-migration.md +84 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/config.md +159 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/filter-search-matrix.md +66 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/harness-knowledge.md +22 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/memory-format.md +78 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/onboarding-decisions.yaml +187 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/operation-inventory.md +59 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/overview.md +167 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/reference.md +119 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/script-index.md +101 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-adapter-contract.md +93 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/claude-code-transcripts.md +66 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/codex-transcripts.md +78 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/codex.md +145 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/install-paths.md +57 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/langfuse.md +178 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/local-jsonl.md +55 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/openobserve.md +102 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/source-platforms/otel.md +63 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/cloud-rest.md +84 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/local-claude.md +65 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/local-cloud-agent-sdk.md +92 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/local-codex.md +72 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/local-cursor.md +108 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/local-mastra.md +77 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/target-platforms/local-opencode.md +70 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/apply-pr-comment-format.md +82 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/diagnostics.md +35 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/handover-contract.md +247 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/onboarding.md +300 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/orchestrator-protocol.md +1861 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/rca.md +331 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/rendering-anatomy.md +314 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/schedule-prep.md +100 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/scope-model.md +128 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/references/workflows/verification-methodology.md +174 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/aggregate/sort-findings.ts +0 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/awareness/blind-spots.ts +167 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/awareness/llm-sample.ts +681 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/cli/doctor.ts +215 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/cli/init.ts +1013 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/cli/install-agents.ts +350 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/cli/run.sh +61 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/cli/shared-templates.ts +79 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/config/load.ts +392 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/config/resolve-credential.ts +120 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/config/schema.ts +641 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/config/validate.ts +134 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/context/build-diagnosis-context.ts +417 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/context/load-context.ts +105 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/contract/types.ts +166 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/enrich/build-render-input.ts +1964 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/enrich/corpus-severity.ts +172 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/enrich/dismissal-match.ts +270 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/enrich/rank-remedies.ts +75 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/hooks/install-hooks.sh +46 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/hooks/pre-push.sh +78 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/invocation/parse-brief.ts +188 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/library/match.ts +114 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/library/paths.ts +95 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/library/store.ts +535 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/library/types.ts +181 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/lint/template-inline-js.ts +267 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/memory/append.ts +188 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/memory/read.ts +218 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/normalize/platforms/entity-context.ts +686 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/normalize/read-unitf.ts +267 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/normalize/trace.ts +1078 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/normalize/unitf-adapter.ts +0 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/normalize/unitf-types.ts +213 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/report/persist-selections.ts +174 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/report/render.ts +3254 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/run/diagnose.ts +64 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/run/session.ts +167 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/sample/caps.ts +345 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/sample/deep-read-gate.ts +424 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/sample/representative.ts +584 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/scan/objection.ts +224 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/scan/trajectory.ts +489 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/self-diagnostics/dispatch.ts +135 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/self-diagnostics/probe.ts +170 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/setup/detect.ts +307 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/setup/ensure-cli.ts +315 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/setup/reconfigure.ts +77 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/setup/verify-agents.ts +207 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/slicer.ts +166 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/adapters/claude-code.ts +17 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/adapters/codex.ts +11 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/adapters/langfuse.ts +17 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/adapters/local-jsonl.ts +12 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/adapters/otel.ts +12 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/index.ts +54 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/registry.ts +45 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/source/types.ts +86 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/stale-detector.ts +74 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/test/render-playwright.cli.ts +477 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/tier0/claude-code.ts +133 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/tier0/langfuse.ts +143 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/tier0-scan.ts +423 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/completeness-check.ts +436 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/doc-refs.ts +190 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/finalize-gate.ts +417 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/findings-contract.ts +628 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/render-js-syntax.ts +188 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/report-checklist.yaml +217 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/trace-shape.ts +262 -0
- package/mutagent-diagnostics/.claude/skills/mutagent-diagnostics/scripts/validate/wave6-checklist.ts +326 -0
- package/mutagent-diagnostics/CLAUDE.md +41 -0
- package/mutagent-diagnostics/LICENSE +201 -0
- package/mutagent-diagnostics/NOTICE +18 -0
- package/mutagent-diagnostics/README.md +343 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/SKILL.md +548 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/assets/agents/audit-executor.md +169 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/assets/agents/dataset-builder.md +160 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/assets/agents/discovery.md +425 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/assets/agents/evaluator.md +1108 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/assets/brand/theme.css +213 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/assets/brand/wordmark.html +9 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/lenses/context-flow-lens.md +85 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/lenses/data-lens.md +47 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/lenses/decision-lens.md +48 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/lenses/methodology-critic-lens.md +53 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/lenses/trajectory-lens.md +44 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/build-review-interface.md +83 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/edd-loop.md +134 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/error-analysis.md +113 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/eval-audit.md +154 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/eval-stage.md +168 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/generate-synthetic-data.md +81 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/grounded-adjudication.md +221 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/memory-format.md +65 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/methodology.md +201 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/operation-inventory.md +197 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/validate-evaluator.md +125 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/workflows/orchestrator-protocol.md +300 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/write-judge-prompt.md +123 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/behavior-tree.schema.yaml +73 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/dataset.schema.yaml +66 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/edd-change-request.schema.yaml +114 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/eval-matrix.schema.yaml +74 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/flow-graph.schema.yaml +69 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/flow-profile.schema.yaml +49 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/methodology-review.schema.yaml +40 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/schemas/scorecard.schema.yaml +85 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/agent-dispatch.ts +0 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/aggregate-discover.ts +543 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/artifact-paths.ts +115 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/assemble-scorecard.ts +172 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/build-dataset.ts +186 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/build-evals.ts +93 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/build-review-ui.ts +393 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/check-method-router.ts +170 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/aggregate.ts +112 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/audit-run.ts +182 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/doctor.ts +211 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/dogfood.ts +133 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/init.ts +601 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/methodology-review.ts +122 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/prep.ts +295 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/profile-subject.ts +165 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/run.sh +56 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cli/variance-check.ts +105 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/code-eval.ts +248 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/code-quality-verdict.ts +285 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/codegen-evals.ts +173 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cold-start-project.ts +151 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/cold-start-sampler.ts +267 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/config/load.ts +343 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/config/schema.ts +380 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/agentspec-evals.ts +85 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/dataset.ts +149 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/eval-engine.ts +118 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/eval-matrix.ts +577 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/eval-types.ts +1074 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/flow-graph.ts +194 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/types.ts +303 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/contracts/validation.ts +193 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/derive-dataset.ts +152 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/determine-outcome.ts +219 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/diff-discriminate.ts +160 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/discover-criteria.ts +348 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/edd/change-request.ts +232 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/edd/edd-types.ts +210 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/edd/variance-gate.ts +186 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/emit-completeness.ts +111 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/eval-engine.ts +160 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/evaluate.ts +333 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/flow-graph.ts +230 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/judge-prompt-template.ts +253 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/judge-provider.ts +135 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/lint-grounding.ts +229 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/lint-uniformity.ts +168 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/living-suite.ts +109 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/load-bundle.ts +203 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/load-profile-vocab.ts +64 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/load-profile.ts +106 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/mask.ts +138 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/materialize-dataset.ts +113 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/matrix-judge.ts +750 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/memory/append.ts +215 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/memory/read.ts +168 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/persist-eval-criteria.ts +232 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/prep-tasks.ts +125 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/profile-subject.ts +310 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/publish-report.ts +131 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/read-unitf-traces.ts +81 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/render-build-cards.ts +195 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/render-discover-report.ts +1640 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/render-eval-report.ts +3838 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/render-report.ts +212 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/resolve-credential.ts +110 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/resolve-ref.ts +98 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/result-verify.ts +129 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/route-failures.ts +330 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/run-deterministic.ts +367 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/run-evaluate.ts +719 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/run-judge.ts +155 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/run-pipeline.ts +175 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/sample-traces.ts +210 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/self-audit.ts +387 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/source-map.ts +106 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/subject-profile.ts +134 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/substrate.ts +162 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/sync-eval-criteria.ts +244 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/ui-slots.ts +119 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/unitf-to-evaltrace.ts +284 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/validate-judge.ts +358 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/scripts/variance-compare.ts +177 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/subjects/mutagent-diagnostics/behavior-tree.yaml +140 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/subjects/mutagent-diagnostics/eval-matrix.yaml +1270 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/subjects/mutagent-diagnostics/methodology-review.yaml +105 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/workflows/audit.workflow.js +82 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/workflows/data-leak.workflow.js +236 -0
- package/mutagent-evaluator/.claude/skills/mutagent-evaluator/workflows/variance.workflow.js +163 -0
- package/mutagent-evaluator/CLAUDE.md +45 -0
- package/mutagent-evaluator/LICENSE +201 -0
- package/mutagent-evaluator/NOTICE +23 -0
- package/mutagent-evaluator/README.md +88 -0
- package/mutagent-optimize/.claude/skills/mutagent-optimize/SKILL.md +287 -0
- package/mutagent-optimize/.claude/skills/mutagent-optimize/scripts/contracts/amend-request.ts +503 -0
- package/mutagent-optimize/.claude/skills/mutagent-optimize/scripts/improve-loop-run.ts +304 -0
- package/mutagent-optimize/.claude/skills/mutagent-optimize/scripts/loop-state-cli.ts +300 -0
- package/mutagent-optimize/.claude/skills/mutagent-optimize/scripts/loop-state.ts +440 -0
- package/mutagent-optimize/CLAUDE.md +49 -0
- package/mutagent-optimize/README.md +26 -0
- package/mutagent-orchestrator/CLAUDE.md +102 -0
- package/mutagent-orchestrator/README.md +20 -0
- package/mutagent-orchestrator/assets/agents/discovery.md +425 -0
- package/mutagent-orchestrator/assets/agents/dogfood-monitor.md +266 -0
- package/mutagent-orchestrator/assets/agents/monitor.md +258 -0
- package/mutagent-orchestrator/orchestrator.md +782 -0
- package/mutagent-orchestrator/references/MONITORING.md +209 -0
- package/mutagent-orchestrator/references/config-fields.md +132 -0
- package/mutagent-orchestrator/references/config-migration.md +132 -0
- package/mutagent-orchestrator/references/index-registry.md +92 -0
- package/mutagent-orchestrator/routing.yaml +391 -0
- package/mutagent-orchestrator/scripts/config-schema.ts +1010 -0
- package/mutagent-orchestrator/scripts/dispatch.ts +439 -0
- package/mutagent-orchestrator/scripts/dogfood/extract-feedback.ts +203 -0
- package/mutagent-orchestrator/scripts/dogfood/reconstruct-trajectory.ts +327 -0
- package/mutagent-orchestrator/scripts/dogfood/render-dogfood-report.ts +347 -0
- package/mutagent-orchestrator/scripts/dogfood/resolve-subagents.ts +160 -0
- package/mutagent-orchestrator/scripts/dogfood/run-report.ts +264 -0
- package/mutagent-orchestrator/scripts/dogfood/slack-thread.ts +106 -0
- package/mutagent-orchestrator/scripts/dogfood/types.ts +257 -0
- package/mutagent-orchestrator/scripts/eval-routing.ts +753 -0
- package/mutagent-orchestrator/scripts/gate.ts +219 -0
- package/mutagent-orchestrator/scripts/handover-contract.ts +362 -0
- package/mutagent-orchestrator/scripts/index/build-index.ts +351 -0
- package/mutagent-orchestrator/scripts/index/render-index.ts +110 -0
- package/mutagent-orchestrator/scripts/monitor/slack-notify.ts +111 -0
- package/mutagent-orchestrator/scripts/monitor/triggers.ts +162 -0
- package/mutagent-orchestrator/scripts/onboarding-check.ts +369 -0
- package/mutagent-orchestrator/scripts/render-roster.ts +308 -0
- package/mutagent-orchestrator/scripts/resolve-credential.ts +185 -0
- package/mutagent-orchestrator/scripts/resolve-paths.ts +114 -0
- package/mutagent-orchestrator/scripts/slack/format.ts +63 -0
- package/mutagent-orchestrator/scripts/slack/post.ts +115 -0
- package/mutagent-orchestrator/scripts/sync-index.ts +311 -0
- package/package.json +64 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# mutagent-builder — skill nav map
|
|
2
|
+
|
|
3
|
+
`mutagent-builder` is the **ADL ② BUILD** stage. It consumes a validated `agentspec.yaml`, target root,
|
|
4
|
+
chosen framework or harness, pinned `build.runtime`, and pinned docs from `appendix.framework_docs`,
|
|
5
|
+
then implements the spec through the builder-owned `ai-engineer` / `ai-architect` pair.
|
|
6
|
+
|
|
7
|
+
## Where everything lives
|
|
8
|
+
|
|
9
|
+
| You want… | Read |
|
|
10
|
+
|---|---|
|
|
11
|
+
| The skill surface and command map | `.claude/skills/mutagent-builder/SKILL.md` |
|
|
12
|
+
| The authoritative `*build` protocol | `.claude/skills/mutagent-builder/references/workflows/build-protocol.md` |
|
|
13
|
+
| The IMPROVE / EDD handoff contract | `.claude/skills/mutagent-builder/references/workflows/improve-handoff.md` |
|
|
14
|
+
| Operative BUILD principles | `.claude/skills/mutagent-builder/references/principles.md` |
|
|
15
|
+
| The write-capable BUILD Actor | `.claude/skills/mutagent-builder/assets/agents/ai-engineer.md` |
|
|
16
|
+
| The read-only BUILD Verifier and sync-spec analyst | `.claude/skills/mutagent-builder/assets/agents/ai-architect.md` |
|
|
17
|
+
| Spec-sync freshness probe | `.claude/skills/mutagent-builder/scripts/sync-spec/check-sync-spec.ts` |
|
|
18
|
+
| Spec implementation coverage gate | `.claude/skills/mutagent-builder/scripts/verify/spec-impl-coverage.ts` |
|
|
19
|
+
|
|
20
|
+
## Boundary
|
|
21
|
+
|
|
22
|
+
- SPEC (`mutagent-agentspec`) emits and validates `agentspec.yaml`; it also owns the `*sync-spec` command (reconcile spec↔target), delegating the code-read to this package's `ai-architect #sync-spec`.
|
|
23
|
+
- BUILD (`mutagent-builder`) implements it; its `ai-architect #sync-spec` mode is the single implementation-reader — agentspec's `*sync-spec` delegates to it, and `*build` reuses it build-internally when code/content drifted ahead.
|
|
24
|
+
- EVALUATE judges; DIAGNOSE performs RCA; IMPROVE gates remedies and delegates agentspec-backed implementation work back here.
|
|
25
|
+
- ADL BUILD ownership stays in this package; no legacy builder delegation path is used.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @mutagent/builder
|
|
2
|
+
|
|
3
|
+
> **ADL ② BUILD stage.** Implements a validated `agentspec.yaml` into a target framework or harness.
|
|
4
|
+
|
|
5
|
+
`mutagent-builder` owns the executable BUILD boundary in the Agentic Development Lifecycle:
|
|
6
|
+
`spec → build → evaluate → diagnose → improve`. `mutagent-agentspec` emits and validates the
|
|
7
|
+
Definition; `mutagent-builder` consumes that Definition, updates a stale brownfield spec when gated,
|
|
8
|
+
and produces the implementation plus build report that EVALUATE judges.
|
|
9
|
+
|
|
10
|
+
## Commands
|
|
11
|
+
|
|
12
|
+
| Command | Purpose |
|
|
13
|
+
|---|---|
|
|
14
|
+
| `*build` | Implement a schema-valid `agentspec.yaml` into the target framework or harness. |
|
|
15
|
+
| `*sync-spec` | Compare implementation freshness with `agentspec.yaml`; derive/update the spec when code drifted ahead. |
|
|
16
|
+
|
|
17
|
+
## What ships
|
|
18
|
+
|
|
19
|
+
| Surface | Purpose |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `assets/agents/ai-engineer.md` | Write-capable BUILD Actor and EDD amendment implementer. |
|
|
22
|
+
| `assets/agents/ai-architect.md` | Read-only BUILD Verifier and `*sync-spec` drift analyst. |
|
|
23
|
+
| `scripts/sync-spec/check-sync-spec.ts` | Deterministic freshness probe used before brownfield BUILD. |
|
|
24
|
+
| `scripts/verify/spec-impl-coverage.ts` | Deterministic spec→implementation coverage gate. |
|
|
25
|
+
|
|
26
|
+
`mutagent-builder` is the ADL BUILD owner. Internal skill-construction loops are separate and not used for Helix BUILD routing.
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# mutagent-diagnostics — Skill Bundle
|
|
2
|
+
|
|
3
|
+
> **Audience: skill maintainers working inside this bundle.**
|
|
4
|
+
> For the end-user / install guide see the package-level
|
|
5
|
+
> [`mutagent-system/mutagent-diagnostics/README.md`](../../../README.md).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## What lives here
|
|
10
|
+
|
|
11
|
+
This directory is the skill bundle — the self-contained artifact published to GitHub Packages
|
|
12
|
+
as `@mutagent/diagnostics`. It is structured as an [agentskills.io](https://agentskills.io)
|
|
13
|
+
compliant skill, installable into any Claude Code, Codex, Cursor, or OpenCode session via
|
|
14
|
+
`pnpx @mutagent/diagnostics init`.
|
|
15
|
+
|
|
16
|
+
The canonical spec is `SKILL.md` (§0-§9, incl. §3.1 gold-standard report shape + §3.2 structured
|
|
17
|
+
contract mode). Everything else in this bundle is referenced from it.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Bundle layout
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
mutagent-diagnostics/ ← this directory
|
|
25
|
+
│
|
|
26
|
+
├── SKILL.md ← operational contract §0-§9 (≤500 lines per PR-007)
|
|
27
|
+
├── .npmignore ← strips internal/ + *.test.ts on publish
|
|
28
|
+
│
|
|
29
|
+
├── scripts/ ← Type A: pure bun scripts (deterministic, no agent reasoning)
|
|
30
|
+
│ ├── tier0-scan.ts ← static scan — free cost gate before LLM (PR-001)
|
|
31
|
+
│ ├── tier0-scan.test.ts ← unit tests [stripped on publish]
|
|
32
|
+
│ ├── slicer.ts ← dynamic-cluster slicing, cap-of-5 (PR-005, PR-017)
|
|
33
|
+
│ ├── stale-detector.ts ← hash compare before any write (PR-011)
|
|
34
|
+
│ ├── cli/
|
|
35
|
+
│ │ ├── init.ts ← pnpx entrypoint + runtime detection (PR-021)
|
|
36
|
+
│ │ ├── install-agents.ts ← idempotent agent .md installer
|
|
37
|
+
│ │ └── run.sh ← bun → pnpm → npm → npx fallback (R-014-A)
|
|
38
|
+
│ ├── config/
|
|
39
|
+
│ │ ├── schema.ts ← TypeBox schema — single source of truth (PR-009)
|
|
40
|
+
│ │ ├── load.ts ← YAML parse + env-ref resolution
|
|
41
|
+
│ │ └── validate.ts ← typed validation errors
|
|
42
|
+
│ ├── fetch/
|
|
43
|
+
│ │ ├── langfuse.ts ← Langfuse trace fetch + filter
|
|
44
|
+
│ │ ├── claude-code-transcripts.sh ← transcript discovery (bash, R-014-A)
|
|
45
|
+
│ │ └── assemble-meta.ts ← meta-context assembly
|
|
46
|
+
│ ├── normalize/
|
|
47
|
+
│ │ ├── trace.ts ← canonical types + EntityContext/SizedText/ToolInventoryEntry/Assumption (Wave-5)
|
|
48
|
+
│ │ └── platforms/ ← per-platform shape mappers (PR-016)
|
|
49
|
+
│ │ └── entity-context.ts ← shared deterministic EntityContext extractors (Wave-5 R1.7, no LLM)
|
|
50
|
+
│ ├── enrich/
|
|
51
|
+
│ │ └── build-render-input.ts ← Wave-5 R1.4 enricher → fully-populated RenderInput (Step 8.5, fail-loud)
|
|
52
|
+
│ ├── contract/
|
|
53
|
+
│ │ └── types.ts ← TypeBox SelfDiagnosisContract schema (Wave-4 structured-report mode)
|
|
54
|
+
│ ├── report/
|
|
55
|
+
│ │ ├── render.ts ← enriched RenderInput → gold-standard multi-tab HTML (PR-014/PR-029)
|
|
56
|
+
│ │ └── persist-selections.ts ← persist operator copy-back selections from the HITL gate
|
|
57
|
+
│ ├── lint/
|
|
58
|
+
│ │ └── template-inline-js.ts ← R-007-B: reject TS in HTML <script> blocks
|
|
59
|
+
│ ├── setup/
|
|
60
|
+
│ │ ├── detect.ts ← config presence + completeness check (§0)
|
|
61
|
+
│ │ └── reconfigure.ts ← re-onboarding handler
|
|
62
|
+
│ ├── tier0/
|
|
63
|
+
│ │ ├── langfuse.ts ← Langfuse-specific tier-0 patterns
|
|
64
|
+
│ │ └── claude-code.ts ← Claude Code-specific tier-0 patterns
|
|
65
|
+
│ ├── validate/ ← finding shape validators
|
|
66
|
+
│ └── self-diagnostics/ ← [INTERNAL] probe.ts · dispatch.ts
|
|
67
|
+
│
|
|
68
|
+
├── assets/
|
|
69
|
+
│ ├── agents/
|
|
70
|
+
│ │ └── diagnostics-analyzer.md ← Type B: pure_subagent_executor
|
|
71
|
+
│ │ dispatched by parent at Step 6
|
|
72
|
+
│ │ # diagnostics-apply-worker.md RETIRED (M9) — apply delegates to the shared
|
|
73
|
+
│ │ # mutagent-cli apply transport + a spawned ai-engineer (WRITE actor)
|
|
74
|
+
│ ├── templates/ ← interpolated at runtime (shipped to users)
|
|
75
|
+
│ │ ├── report.html.tpl ← gold-standard multi-tab report template (DO NOT add TS logic)
|
|
76
|
+
│ │ ├── config.yaml.tpl ← onboarding config skeleton
|
|
77
|
+
│ │ ├── pr-body.md.tpl ← apply PR description
|
|
78
|
+
│ │ ├── audit.json.tpl ← structured audit trail (PR-013)
|
|
79
|
+
│ │ └── audit.md.tpl ← human-readable audit trail (PR-013)
|
|
80
|
+
│ └── wireframes/ ← picker-UX wireframe prompts
|
|
81
|
+
│ ├── onboarding/ ← WF-1.x onboarding flows
|
|
82
|
+
│ ├── diagnostics/ ← WF-2.x diagnostics flows
|
|
83
|
+
│ └── optimization/ ← WF-3.x optimization flows
|
|
84
|
+
│
|
|
85
|
+
├── references/ ← load-on-demand docs (not pre-loaded in SKILL.md)
|
|
86
|
+
│ ├── reference.md ← entry point + architecture + full dependency graph
|
|
87
|
+
│ ├── principles.md ← PR-001..PR-043 — the audit surface for every PR
|
|
88
|
+
│ ├── operator-feedback-log.md ← append-only operator feedback on the report shape (Wave-5 R1.6)
|
|
89
|
+
│ ├── config.md ← full config schema with doc strings
|
|
90
|
+
│ ├── operation-inventory.md ← Type A/B/C classification of every operation
|
|
91
|
+
│ ├── adapter-strategy.md ← adapter Q1-Q6 locked decisions
|
|
92
|
+
│ ├── filter-search-matrix.md← per-platform Filter/Search coverage matrix
|
|
93
|
+
│ ├── harness-knowledge.md ← platform knowledge table (expandable)
|
|
94
|
+
│ ├── onboarding-decisions.yaml ← phase decisions log
|
|
95
|
+
│ ├── open-questions.md ← OQ-1..OQ-10 all resolved
|
|
96
|
+
│ ├── workflows/
|
|
97
|
+
│ │ ├── onboarding.md ← 8-phase onboarding procedure
|
|
98
|
+
│ │ ├── orchestrator-protocol.md ← inline protocol (parent session = orchestrator)
|
|
99
|
+
│ │ ├── diagnostics.md ← full diagnostic procedure + NL→filter translation
|
|
100
|
+
│ │ ├── apply-dispatch.md ← apply mechanic per target class
|
|
101
|
+
│ │ ├── apply-pr-comment-format.md ← PR-023 Diagnostic Apply PR Comment format
|
|
102
|
+
│ │ ├── rca.md ← RCA procedure + 3-dim taxonomy (WHAT/WHY/WHERE)
|
|
103
|
+
│ │ └── schedule-prep.md ← wiring scheduling post-v0.1
|
|
104
|
+
│ ├── source-platforms/ ← CLI fetch + filter examples per platform
|
|
105
|
+
│ ├── target-platforms/ ← apply recipe + hyperlinks per target type
|
|
106
|
+
│ └── internal/
|
|
107
|
+
│ └── self-diagnostics.md ← [INTERNAL] PR-022 self-RCA playbook
|
|
108
|
+
│
|
|
109
|
+
├── examples/
|
|
110
|
+
│ └── sample-findings.json ← example RCA output for reference
|
|
111
|
+
│
|
|
112
|
+
└── internal/ ← [stripped on publish via .npmignore]
|
|
113
|
+
└── templates/review/
|
|
114
|
+
├── README.md ← decision tree for choosing a template
|
|
115
|
+
├── _brand-shell.html ← empty branded scaffold (all primitives)
|
|
116
|
+
├── iteration-template.html ← rich multi-phase approval
|
|
117
|
+
├── review-template.html ← per-section lock-in + clipboard export
|
|
118
|
+
├── status-template.html ← scroll-layout progress dashboard
|
|
119
|
+
└── skill-overview-template.html ← 9-tab SKILL.md walkthrough
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Key invariants for contributors
|
|
125
|
+
|
|
126
|
+
| Principle | Rule |
|
|
127
|
+
|-----------|------|
|
|
128
|
+
| **PR-001** | `tier0-scan.ts` must run before any LLM call |
|
|
129
|
+
| **PR-004** | apply must always use a git worktree; never edit operator's checkout (now enforced by the shared `mutagent-cli apply` worktree-PR adapter; the apply-worker is retired, M9) |
|
|
130
|
+
| **PR-007** | `SKILL.md` must stay under 500 lines |
|
|
131
|
+
| **PR-009** | Config shape is owned by `scripts/config/schema.ts` (TypeBox); do not define it elsewhere |
|
|
132
|
+
| **PR-014** | `report.html.tpl` is the primary review surface; do not add destructive-action gates to the HTML itself |
|
|
133
|
+
| **PR-029** | The gold-standard report IS the product surface — `render.ts` panel functions must keep matching the `report.html.tpl` structure (CSS-class contract); template-stamp over procedural rendering |
|
|
134
|
+
| **R1 §9.3** | Fail-loud render contract — `render.ts` AND `build-render-input.ts` REFUSE (throw) when ≥3 of 4 internal shapes (`diagnosedEntity` / `bigStat` / `hourlyHeatmap` / `signalCensus`) are missing; never call the renderer on raw findings — always run the Step 8.5 enricher first |
|
|
135
|
+
| **R1.7** | Every normalizer emits a deterministic `EntityContext` at ingest (no LLM); the operator never hand-fills the entity card. Fields > 1 KB render as collapsed `ExpandableSection`; system prompt always collapsed (PII) |
|
|
136
|
+
| **R-014-A** | `.sh` scripts invoked via `exec bash`; no TS runtime required for shell operations |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Orchestrator architecture
|
|
141
|
+
|
|
142
|
+
The orchestrator is **NOT a sub-agent** — it is the parent coding-agent session following
|
|
143
|
+
`references/workflows/orchestrator-protocol.md` inline.
|
|
144
|
+
|
|
145
|
+
Sub-agents are only the leaf workers:
|
|
146
|
+
- `diagnostics-analyzer.md` — dispatched per cluster (Step 6)
|
|
147
|
+
- apply (Step 11) spawns **ai-engineer** (the WRITE actor) which shells the shared
|
|
148
|
+
`mutagent-cli apply` transport — the bespoke `diagnostics-apply-worker` is retired (M9)
|
|
149
|
+
|
|
150
|
+
This design exists because sub-agents in Claude Code/Codex cannot dispatch further sub-agents
|
|
151
|
+
or invoke `AskUserQuestion` — the parent session retains those capabilities.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Publish
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Verify .npmignore correctly strips internal/
|
|
159
|
+
npm pack --dry-run | grep internal # should be empty
|
|
160
|
+
|
|
161
|
+
# Lint + typecheck
|
|
162
|
+
bun run lint && bun run typecheck
|
|
163
|
+
|
|
164
|
+
# Test scripts
|
|
165
|
+
bun test ./.claude/skills/mutagent-diagnostics/scripts/
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Registry: GitHub Packages (restricted). Not published to public npmjs.org.
|
|
169
|
+
Version: see `../../package.json` (`metadata.version` in SKILL.md frontmatter mirrors it).
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Brand tokens
|
|
174
|
+
|
|
175
|
+
All internal review templates share the MUTAGENT brand (from `internal/templates/review/`):
|
|
176
|
+
|
|
177
|
+
```css
|
|
178
|
+
--p: #a78bfa; /* primary purple */
|
|
179
|
+
--c: #06b6d4; /* cyan secondary */
|
|
180
|
+
--g: #10b981; /* status green */
|
|
181
|
+
--y: #f59e0b; /* status yellow */
|
|
182
|
+
--r: #ef4444; /* status red */
|
|
183
|
+
--m: #f0abfc; /* magenta accents */
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Logotype gradient: `linear-gradient(135deg, #a78bfa 0%, #06b6d4 100%)`.
|
|
187
|
+
Fonts: Space Grotesk (display) + IBM Plex Mono (code). Mermaid dark theme.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
> For end-user documentation, see the package-level README at
|
|
192
|
+
> [`mutagent-system/mutagent-diagnostics/README.md`](../../../README.md).
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mutagent-diagnostics
|
|
3
|
+
description: |
|
|
4
|
+
Diagnostics-on-Tap for AI agents. Pull evidence from your agent traces, translate user feedback
|
|
5
|
+
into evidence-grounded root-cause records, surface ranked remedies, and apply approved fixes via
|
|
6
|
+
PR (local agents) or REST (cloud). First invocation: auto-detects setup and guides you through
|
|
7
|
+
onboarding (source platform, target platform, trigger rules). Subsequent invocations: dispatch
|
|
8
|
+
Orchestrator + N parallel Analyzers (≤5) against your traces, produce a gold-standard HTML report
|
|
9
|
+
(Methodology [INTERNAL] · Overview · one tab per finding · Decisions) with a rich auto-extracted
|
|
10
|
+
entity card, 6-tile big-stat row, 24h latency heatmap, signal census, per-finding assumptions
|
|
11
|
+
block, and ★-recommended remedies, let you review and copy-back markdown approval, then spawn a
|
|
12
|
+
Background agent on a Worktree to apply fixes branch-hygiene-safe. Supports
|
|
13
|
+
Langfuse, OpenTelemetry, local JSONL, Claude Code session transcripts, and Codex session
|
|
14
|
+
transcripts as sources. Apply targets (the shipped `target` enum): local coding-agent markdown
|
|
15
|
+
targets — Claude (.claude/agents/*.md), Codex, Cursor, OpenCode; local code-construct targets —
|
|
16
|
+
Mastra and Cloud Agent SDK; cloud REST; and report-only (produce the report, skip the apply gate).
|
|
17
|
+
LangGraph is a planned target (roadmap — not yet implemented). Tier 0 static
|
|
18
|
+
scan runs before LLM to bound token cost. 3-dimensional WHAT/WHY/WHERE failure taxonomy. Score
|
|
19
|
+
thresholds discovered dynamically from platform. Fully platform-portable: native AskUserQuestion
|
|
20
|
+
on Claude Code, chat-based multi-choice fallback elsewhere.
|
|
21
|
+
When the target declares a self-diagnosis-contract.yaml, diagnostics produces a STRUCTURED
|
|
22
|
+
10-category report against the declared success criteria (operational / onboarding / behavioral /
|
|
23
|
+
hitl / output / methodology / tier-performance / source-platform / target-platform / maintenance);
|
|
24
|
+
otherwise it falls back to the standard open-ended pattern-match report.
|
|
25
|
+
license: Proprietary. LICENSE.txt has complete terms.
|
|
26
|
+
compatibility: Designed for Claude Code, Codex, Cursor, OpenCode and similar coding-agent runtimes; works with git, gh CLI, jq, curl, and Bun/pnpm/npm runtimes.
|
|
27
|
+
metadata:
|
|
28
|
+
author: mutagent
|
|
29
|
+
version: "0.1.0-alpha.8"
|
|
30
|
+
# allowed-tools: OMITTED — agent uses all native tools per host runtime (operator iter-7 T5)
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
# mutagent-diagnostics
|
|
34
|
+
|
|
35
|
+
Diagnostics-on-Tap for AI agents. Invoke this skill to run a full diagnostic cycle on your agent traces.
|
|
36
|
+
|
|
37
|
+
## §0 — Setup Detection (ALWAYS runs first)
|
|
38
|
+
|
|
39
|
+
> **CWD matters.** `detect.ts` (and every other `scripts/cli/run.sh`-dispatched
|
|
40
|
+
> script) MUST be invoked from the operator's PROJECT ROOT, NOT from inside the
|
|
41
|
+
> skill install path. `detect.ts` defensively rejects invocations from any path
|
|
42
|
+
> containing `.claude/skills/` to avoid mis-detecting the skill's own
|
|
43
|
+
> `.mutagent/diagnostics/` as the operator's project config. Use absolute paths
|
|
44
|
+
> in the `Bash()` call if your shell is anywhere else.
|
|
45
|
+
|
|
46
|
+
**Lean install (W9-10):** `pnpx @mutagent/diagnostics init` installs the skill AND
|
|
47
|
+
its sub-agents in one step. Onboarding (`references/workflows/onboarding.md`)
|
|
48
|
+
configures **platforms only** — agent install is NOT a mandatory onboarding step.
|
|
49
|
+
Onboarding checks whether agents are present (skip-if-present) and offers install
|
|
50
|
+
only if missing — it never mandates or auto-installs them. Agents already present
|
|
51
|
+
→ silently skipped.
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
// PSEUDOCODE — actual execution is agent-native
|
|
55
|
+
const config = await Bash("bun scripts/cli/run.sh scripts/setup/detect.ts");
|
|
56
|
+
if (!config.complete) {
|
|
57
|
+
// → Onboarding branch (references/workflows/onboarding.md)
|
|
58
|
+
} else {
|
|
59
|
+
// → Diagnostics: load orchestrator-protocol.md and follow inline
|
|
60
|
+
// DO NOT dispatch a coordinator sub-agent (operator voice-stamp T1)
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Load `references/workflows/onboarding.md` if config missing or `--reconfigure` flag present.
|
|
65
|
+
|
|
66
|
+
**Source-platform CLI gate (onboarding, PR-021):** source platforms (Langfuse,
|
|
67
|
+
Codex, …) are usually driven via a CLI, and most clients will NOT have it
|
|
68
|
+
installed. During onboarding the skill (a) links the platform's **official CLI
|
|
69
|
+
docs** and (b) when the CLI is missing, **offers an install that the user must
|
|
70
|
+
explicitly approve first — it NEVER auto-installs**. The reusable
|
|
71
|
+
`ensure-cli(platform)` helper (`scripts/setup/ensure-cli.ts` →
|
|
72
|
+
`scripts/cli/init.ts` `ensureSourceCli`) probes PATH, shows docs + the install
|
|
73
|
+
command, then gates the install behind the platform-portable ASK (AskUserQuestion
|
|
74
|
+
on Claude Code; chat y/N fallback elsewhere). On decline → REST/file fallback +
|
|
75
|
+
record CLI absent. File-only / backend-specific sources (local-jsonl, claude-code,
|
|
76
|
+
otel) report `not-required` — nothing to install. See
|
|
77
|
+
`references/workflows/onboarding.md` Phase 2.
|
|
78
|
+
|
|
79
|
+
If config complete: load `references/workflows/orchestrator-protocol.md` and follow inline.
|
|
80
|
+
**Do NOT dispatch a coordinator sub-agent.** The parent session IS the orchestrator.
|
|
81
|
+
(Reason: sub-agents cannot dispatch other sub-agents or invoke AskUserQuestion — operator T1.)
|
|
82
|
+
|
|
83
|
+
### §0.1 — Star-commands (W9-05)
|
|
84
|
+
|
|
85
|
+
`*command` tokens are this skill's internal semantic map. `@shortcut` tokens are the
|
|
86
|
+
architech resolver (external). Never mix them.
|
|
87
|
+
|
|
88
|
+
**Resolution contract:** when you encounter a `*<name>` token, look it up in the
|
|
89
|
+
`commands:` table below. `kind: script` → call the bound script. `kind: agent-chain`
|
|
90
|
+
→ load the bound workflow file/section and run steps in order. `kind: hybrid` → call
|
|
91
|
+
script(s) for deterministic parts, reason for the rest. NEVER improvise.
|
|
92
|
+
|
|
93
|
+
| Command | Kind | Binds (relative) | Purpose |
|
|
94
|
+
|---------|------|-------------------|---------|
|
|
95
|
+
| `*diagnose` | hybrid | `orchestrator-protocol.md#step-1..11` | Full diagnostic pipeline |
|
|
96
|
+
| `*read-traces` | script | `scripts/normalize/read-unitf.ts` | Read the handed-over UniTF JSONL (+ manifest) → `TraceMetadata[]` + `EntityContext` — never fetch, never hand-parse |
|
|
97
|
+
| `*library-match` | script | `scripts/library/match.ts` | Best-effort prior consult (de-mandated W9-02; empty library → proceed fresh) |
|
|
98
|
+
| `*dispatch-analyzers` | agent-chain | `orchestrator-protocol.md#step-6 + handover-contract.md` | Fan-out ≤5 analyzers via handover contract |
|
|
99
|
+
| `*render-report` | script | `scripts/report/render.ts` | Stamp gold-standard HTML — never hand-build |
|
|
100
|
+
| `*self-diagnose` | hybrid | `references/internal/self-diagnostics.md` | Diagnose skill's own traces (PR-022) |
|
|
101
|
+
|
|
102
|
+
Full resolution contract verbatim:
|
|
103
|
+
```
|
|
104
|
+
When you encounter a *<name> token:
|
|
105
|
+
1. RESERVED — `*` marks a command. NOT prose, NOT a file path, NOT an @shortcut.
|
|
106
|
+
*command = THIS skill's semantic map (internal). @shortcut = architech resolver (external). Never mixed.
|
|
107
|
+
2. RESOLVE — look up <name> in the `commands:` block. Not found => ERROR + ask. NEVER improvise.
|
|
108
|
+
3. BINDING — read kind: + binds::
|
|
109
|
+
kind: script => binds: <relative script path> => CALL the script. Do NOT re-implement in prose.
|
|
110
|
+
kind: agent-chain => binds: <workflow file#section> => load + run the steps in order.
|
|
111
|
+
kind: hybrid => binds: both => call script(s) for deterministic parts, reason for the rest.
|
|
112
|
+
4. PRE-GATE — load any pre_gate.loads:.
|
|
113
|
+
5. EXECUTE — run compresses:/workflow steps IN ORDER. Invent nothing.
|
|
114
|
+
6. purpose:/impact: explain WHY (not executed). compresses: MAY reference other *commands (composition).
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## §1 — Triggers
|
|
118
|
+
|
|
119
|
+
Invoke me with:
|
|
120
|
+
- `mutagent-diagnostics` / `diagnose my agents` / `/mutagent-diagnostics`
|
|
121
|
+
- `diagnose <agent-name>` / `why did <agent> fail` / `analyze traces`
|
|
122
|
+
- `--reconfigure` to re-enter onboarding
|
|
123
|
+
- `pnpx @mutagent/diagnostics init` — manual CLI entry point (install + first-time setup)
|
|
124
|
+
|
|
125
|
+
## §2 — Quick-Start
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
pnpx @mutagent/diagnostics init # first-time: installs skill + runs onboarding
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
After init, invoke naturally in your coding-agent chat.
|
|
132
|
+
|
|
133
|
+
## §3 — Architecture Overview
|
|
134
|
+
|
|
135
|
+
```mermaid
|
|
136
|
+
flowchart TD
|
|
137
|
+
SKILL -->|§0 detect| BRANCH{config?}
|
|
138
|
+
BRANCH -->|missing| ONB[Onboarding]
|
|
139
|
+
BRANCH -->|present| PROTOCOL[Load orchestrator-protocol.md\nParent session follows inline]
|
|
140
|
+
PROTOCOL --> TIER0[Tier 0 static scan]
|
|
141
|
+
TIER0 --> SLICER[Dynamic-cluster slicer]
|
|
142
|
+
SLICER --> ANL[N Analyzers ≤5]
|
|
143
|
+
ANL --> RCA[RCA Layer — WHAT/WHY/WHERE]
|
|
144
|
+
RCA --> ENRICH[Step 8.5 — Build Render Input\nscripts/enrich/build-render-input.ts\ndeterministic · fail-loud]
|
|
145
|
+
ENRICH --> REPORT[Gold-standard HTML Report + copy-back]
|
|
146
|
+
REPORT --> APPLY[Spawn BG agent on Worktree]
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Full DAG: `references/reference.md`
|
|
150
|
+
|
|
151
|
+
### §3.1 — Report shape (Wave-5 gold-standard renderer)
|
|
152
|
+
|
|
153
|
+
`scripts/report/render.ts` + `assets/templates/report.html.tpl` emit the operator-approved
|
|
154
|
+
**gold-standard** report — NOT a generic 4-layer dump. Tab layout:
|
|
155
|
+
|
|
156
|
+
| Tab | Content |
|
|
157
|
+
|-----|---------|
|
|
158
|
+
| **Methodology [INTERNAL]** (`t0`) | Mermaid sequence (orchestrator → scripts → analyzers) + graded decision log + signal census. NODE-STRIPPED when `--audience client` (FU-INT-1). |
|
|
159
|
+
| **Overview** (`t1`) | Auto-extracted entity card · 6-tile big-stat row (latency p50/p95/max · cost · traces · errors) · headline callout · signal census · scan-coverage funnel · 24h latency heatmap (colour = avg latency, number = trace count) · findings summary table. |
|
|
160
|
+
| **F-NNN** (`t2..tN+1`) | One tab per finding — severity-badged story-led title · WHAT/WHY/WHERE taxonomy · Problem · Evidence · Why-chain (origin marker) · **Assumptions block** (verified / unverified / hypothesis-pending pills) · ranked remedies (★ rank-1 = green-glow `.recommended`, pre-checked). |
|
|
161
|
+
| **Decisions** (`tdecisions`) | Recommended-bundle callout + general speech-to-text feedback box + copy-decisions markdown export. |
|
|
162
|
+
|
|
163
|
+
The renderer is **fail-loud (R1 §9.3)**: it REFUSES (throws, non-zero) when ≥3 of the 4 internal
|
|
164
|
+
render shapes (`diagnosedEntity` / `bigStat` / `hourlyHeatmap` / `signalCensus`) are missing — no
|
|
165
|
+
silent placeholder. Always run the **Step 8.5 enricher** (`scripts/enrich/build-render-input.ts`)
|
|
166
|
+
first; never call the renderer on raw findings.
|
|
167
|
+
|
|
168
|
+
**Rich `EntityContext` at ingest (R1.7):** the UniTF reader
|
|
169
|
+
(`scripts/normalize/read-unitf.ts` → `unitf-adapter.ts`) projects an `EntityContext` (name · model
|
|
170
|
+
· system prompt · tool inventory with per-tool stats · input sample) from the handed-over trace's
|
|
171
|
+
`ext.agent` block alongside its `TraceBody[]` — deterministically, no LLM. (The per-tool /
|
|
172
|
+
system-prompt extractors live in the kept `scripts/normalize/platforms/entity-context.ts`; the
|
|
173
|
+
per-platform fetch/normalize adapters that USED to feed them now live in `@mutagent/tools`.)
|
|
174
|
+
The operator never hand-fills the entity card. Any field > 1 KB renders
|
|
175
|
+
inside a default-collapsed **`ExpandableSection`** (`<details class="expand">`); the system prompt is
|
|
176
|
+
ALWAYS collapsed regardless of size (PII — explicit click to view).
|
|
177
|
+
|
|
178
|
+
**Self-diagnosis report mode (PR-022/PR-025):** when `config.self_diagnostics.enabled`, the SAME
|
|
179
|
+
renderer produces a meta-report — findings cluster-grouped by `failureOrigin.what` (one tab per
|
|
180
|
+
cluster), a forced `⚙ SELF-DIAGNOSIS` banner, a skill-typed entity card (built from the skill's own
|
|
181
|
+
SKILL.md + `scripts/`), `[INTERNAL]` session prefix, and it REFUSES `--audience client` (self-diag
|
|
182
|
+
is always internal). See `references/internal/self-diagnostics.md`.
|
|
183
|
+
|
|
184
|
+
### §3.2 — Structured contract mode (Wave-4)
|
|
185
|
+
|
|
186
|
+
When the diagnosed target declares a `self-diagnosis-contract.yaml`, the renderer switches to a
|
|
187
|
+
**structured 10-category report** (`renderStructuredReport`) scoring findings against the declared
|
|
188
|
+
success criteria (pass / fail / not-applicable / pending). Targets without a contract get the
|
|
189
|
+
open-ended gold-standard report unchanged. Schema: `scripts/contract/types.ts`.
|
|
190
|
+
|
|
191
|
+
## §4 — Bill of Materials (scripts/ — Type A pure scripts)
|
|
192
|
+
|
|
193
|
+
| Script | Purpose |
|
|
194
|
+
|--------|---------|
|
|
195
|
+
| `scripts/tier0-scan.ts` | Static pattern scan — route-guess + signal count |
|
|
196
|
+
| `scripts/slicer.ts` | Dynamic-cluster slicing, cap-of-5 |
|
|
197
|
+
| `scripts/stale-detector.ts` | Hash compare for target freshness |
|
|
198
|
+
| `scripts/config/schema.ts` | TypeBox schema — config.yaml source of truth |
|
|
199
|
+
| `scripts/config/load.ts` | YAML parse + env-ref resolution |
|
|
200
|
+
| `scripts/config/validate.ts` | Schema validation + typed errors |
|
|
201
|
+
| `scripts/normalize/trace.ts` | Canonical types: TraceMetadata + TraceBody + Finding + Remedy + `EntityContext` / `SizedText` / `ToolInventoryEntry` / `Assumption` (Wave-5 R1.7/R1.3) |
|
|
202
|
+
| `scripts/normalize/read-unitf.ts` | **Trace intake** — reads the handed-over UniTF JSONL (+ manifest) from `HandoverBundle.inputs[]` → `TraceMetadata[]` + `EntityContext`; tolerant-but-visible bad-line drops; manifest warnings never abort. The skill NEVER fetches (fetch/normalize lives in `@mutagent/tools`, run via `mutagent-cli trace fetch`) |
|
|
203
|
+
| `scripts/normalize/unitf-adapter.ts` | Projects one `UnifiedTrace` → `{ metadata: TraceMetadata, messages, entity }` — the thin adapter that keeps the RCA/enrich/gate/render layer unchanged across the UniTF flip |
|
|
204
|
+
| `scripts/normalize/unitf-types.ts` | Local `UnifiedTrace` / `UnitfTraceManifest` type mirrors (+ `isUnifiedTraceLike` guard) — read-side shape contract for the JSONL |
|
|
205
|
+
| `scripts/normalize/platforms/entity-context.ts` | Shared deterministic `EntityContext` extractors (system-prompt, tool-inventory, input-sample, majority-vote name) + `buildSkillSelfEntityContext` (self-diag) — content-derived, NO LLM (Wave-5 R1.7) |
|
|
206
|
+
| `scripts/enrich/build-render-input.ts` | Deterministic enricher — (tier0, slice-plan, findings, metadata) → fully-populated `RenderInput`; aggregates 24h heatmap + big-stat + signal census; fail-loud on starved input (Wave-5 R1.4 — orchestrator Step 8.5) |
|
|
207
|
+
| `scripts/report/render.ts` | Renders the gold-standard multi-tab report (Methodology · Overview · one tab per finding · Decisions — tab count is dynamic, N findings → N tabs) from an enriched `RenderInput` (`--findings <p> --output <p> [--template <p>] [--audience client\|internal]`). Fail-loud when ≥3 of 4 internal shapes missing (R1 §9.3) |
|
|
208
|
+
| `scripts/report/persist-selections.ts` | Persist operator copy-back selections from the report HITL gate |
|
|
209
|
+
| `scripts/contract/types.ts` | TypeBox `SelfDiagnosisContract` schema — opt-in structured 10-category report mode (Wave-4) |
|
|
210
|
+
| `scripts/lint/template-inline-js.ts` | R-007-B: Walk `assets/templates/*.html`, reject TypeScript patterns in executable `<script>` blocks |
|
|
211
|
+
| `scripts/setup/detect.ts` | Config presence + completeness check; `--cli <plat>` probes a source platform's CLI via `ensure-cli` |
|
|
212
|
+
| `scripts/setup/ensure-cli.ts` | Source-platform-general CLI gate (PR-021): per-platform `CLI_SPECS` (binary + install cmd + official docs link), `planCliEnsure` decision (pure — never installs), `runCliInstall` (caller-gated — assumes approval). NEVER auto-installs |
|
|
213
|
+
| `scripts/setup/reconfigure.ts` | Re-onboarding handler |
|
|
214
|
+
| `scripts/cli/init.ts` | CLI entrypoint + runtime detection; `ensureSourceCli` approve-to-install gate + `--ensure-cli <plat>` mode (platform-portable ASK; install only on explicit approval) |
|
|
215
|
+
| `scripts/cli/doctor.ts` | Runtime probe + env validate + JSON health report (`{ runtime, env, version, errors[] }`) |
|
|
216
|
+
| `scripts/cli/run.sh` | bun→pnpm→npm fallback selector (fully portable — zero `Bun.*` API surface in scripts/cli/) |
|
|
217
|
+
| `scripts/self-diagnostics/probe.ts` | [INTERNAL] Host + session path detector |
|
|
218
|
+
| `scripts/self-diagnostics/dispatch.ts` | [INTERNAL] Self-trace → RCA dispatch |
|
|
219
|
+
|
|
220
|
+
Invoke scripts via: `Bash("scripts/cli/run.sh scripts/<name>.{ts|sh} [args]")`
|
|
221
|
+
— `.ts` files: dispatched via bun→pnpm-tsx→npx-tsx fallback chain
|
|
222
|
+
— `.sh` files: dispatched via `exec bash` (no TS runtime needed — R-014-A)
|
|
223
|
+
|
|
224
|
+
### §4.1 — Wave-6 methodology layer (R2.1–R2.6 + D1/D2)
|
|
225
|
+
|
|
226
|
+
Wave-6 fixes the diagnostic **methodology** (the renderer was already Wave-5 gold).
|
|
227
|
+
The methodology layer below is the operative surface; its design rationale is
|
|
228
|
+
maintained internally (not shipped).
|
|
229
|
+
|
|
230
|
+
| Script | Remedy | Purpose |
|
|
231
|
+
|--------|--------|---------|
|
|
232
|
+
| `scripts/sample/representative.ts` | R2.5 / R2.1 | Shared 4-bucket sampler (worst·median·best·random, 15-floor, worst-weighted) + 4-dim coverage proof (latency·score·temporal·tool-trajectory) + population-bias stats. Per-finding `coverageConfidence` (90/70 → high/med/low), WARN-only, `--accept-low-confidence`. Deterministic (no clock/random). |
|
|
233
|
+
| `scripts/sample/caps.ts` | R2.1 / D1 / PR-048 | Multi-cap `{active,value}` + **dip→ramp deep-read**: escalation rungs `50·100·250·500·1000` (50 = cheap DIP first-rung, NOT a hard ceiling), per-tier time `50:300→1000:1800` (hard ceiling 1800s), default ceiling `min(N,1000)`. max-trace + time caps ACTIVE, **cost(10) INACTIVE by default (D1)**. **Operator override:** `computeCeiling(N, override)` / CLI `--max-trace <N>` raises the ceiling ABOVE 1000 ON COMMAND (operator-explicit only, never auto). `enforceCaps` first-to-trip, SKIPS inactive caps; cap → STOP + emit + banner. Clock injected. |
|
|
234
|
+
| `scripts/sample/deep-read-gate.ts` | R2.1 | HARD-REFUSE `llmReadCount===0 && !priorSignalsRef`; priors downgrade; `--focus` does NOT exempt; auto-expand decision (<70% coverage). |
|
|
235
|
+
| `scripts/awareness/llm-sample.ts` | R2.2 | 5-trace LLM mini-sample BEFORE primary-signal pick (measurement-layer fix; NO severity weights). Fresh-only; SKIP on priors. Deterministic trace selection. |
|
|
236
|
+
| `scripts/awareness/blind-spots.ts` | R2.2 | Tier-0-measurable vs blind-spot taxonomy → Methodology Step 1.5 table (Signal·Measurable?·Checked by·Result). |
|
|
237
|
+
| `scripts/library/{paths,types,store,match}.ts` | R2.3 / D2 | Class-memory library — INDEX.md + `by-entity/<e>/{journal.md,entity.json,patterns/}`. Approved-only write, 3× prior weight, library-first Tier-0 match, `runs[].operatorInvocation` (D2). **Per-host + gitignored** (`.mutagent/diagnostics/library/` — never committed). |
|
|
238
|
+
| `scripts/invocation/parse-brief.ts` | R2.6 / W11-06 | Defensive regex parser: NL brief → `{agent?,timeWindow?,focus?,residual,scopeType,entity?}`. Never throws/drops. W11-06: adds `scopeType:'skill'\|'agent'\|null` + `entity` + `focus:` colon form + article guard. |
|
|
239
|
+
| `scripts/run/diagnose.ts` | R2.6 / D2 | ⚠️ Zone-1.5 CLI: `/mutagent-diagnostics "<brief>"` single positional arg. Stores verbatim + parsed invocation. No-focus → neutral survey; focus → 🎯 Guided. |
|
|
240
|
+
|
|
241
|
+
Methodology tab (render.ts) gains: **Step 0** (verbatim operator invocation, D2) ·
|
|
242
|
+
**Step 1.5** (awareness layer + blind-spots, R2.2) · **3 widgets** (SVG tier pie,
|
|
243
|
+
selection-rule cards, mermaid signal-selection trace, R2.4). Per-finding sampling
|
|
244
|
+
**coverage proof** (R2.5) renders below the why-chain. Focus → 🎯 Guided tab REPLACES
|
|
245
|
+
Overview (R2.6).
|
|
246
|
+
|
|
247
|
+
> ⚠️ **Zone 1.5 surfaces (Wave-6):** R2.6 adds the single-arg slash-command CLI;
|
|
248
|
+
> D1 changes the caps config to `{active,value}`. See PR description for the diff.
|
|
249
|
+
|
|
250
|
+
## §5 — Agents (assets/agents/ — Type B agent definitions)
|
|
251
|
+
|
|
252
|
+
| Agent | Class | Load |
|
|
253
|
+
|-------|-------|------|
|
|
254
|
+
| `diagnostics-analyzer.md` | pure_subagent_executor | Dispatched by parent session (Step 6 of orchestrator-protocol.md) |
|
|
255
|
+
|
|
256
|
+
Note: `diagnostics-orchestrator.md` (P2 pivot) and `diagnostics-apply-worker.md` (M9/DC-6)
|
|
257
|
+
have both been RETIRED. The orchestrator procedure is now an inline protocol loaded by the
|
|
258
|
+
parent session (`references/workflows/orchestrator-protocol.md`). Apply no longer runs a
|
|
259
|
+
bespoke worker: at the Step-11 gate the parent spawns **ai-engineer** (the WRITE actor;
|
|
260
|
+
Helix-provided from builder, vendored for standalone) which shells the SHARED
|
|
261
|
+
`mutagent-cli apply` transport (`@mutagent/tools` — worktree-PR · REST · vendor-CLI;
|
|
262
|
+
non-destructive + audited). The analyzer remains a diagnostics-owned leaf sub-agent.
|
|
263
|
+
|
|
264
|
+
## §6 — References (load on demand)
|
|
265
|
+
|
|
266
|
+
**Start here (first reading):** [`references/overview.md`](references/overview.md) — what the skill does, when to use it, quick-start, and glossary. Link to anatomy doc.
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
references/
|
|
270
|
+
overview.md # START HERE — What/when/quick-start/glossary (PRD-SO-01)
|
|
271
|
+
reference.md # Entry point + architecture + dependency graph
|
|
272
|
+
operation-inventory.md # Type A/B/C classification
|
|
273
|
+
adapter-strategy.md # Adapter Q1-Q6 locked answers
|
|
274
|
+
filter-search-matrix.md # Per-platform Filter/Search coverage matrix
|
|
275
|
+
harness-knowledge.md # Platform Knowledge Table (expandable)
|
|
276
|
+
config.md # Schema with doc strings
|
|
277
|
+
workflows/
|
|
278
|
+
onboarding.md # 8-phase onboarding
|
|
279
|
+
orchestrator-protocol.md # Inline orchestrator protocol (parent session); Step 8.5 builds the render input
|
|
280
|
+
diagnostics.md # Full diagnostic procedure + NL→filter translation
|
|
281
|
+
apply-dispatch.md # Apply mechanic (local-agent/local-code-construct/remote)
|
|
282
|
+
apply-pr-comment-format.md # PR-023/PR-030 Diagnostic Apply PR Comment format
|
|
283
|
+
rca.md # RCA layer procedure + 3-dim taxonomy
|
|
284
|
+
rendering-anatomy.md # Canonical per-finding + per-remedy panel anatomy (PRD-CC-12)
|
|
285
|
+
schedule-prep.md # How to wire scheduling post-v0.1
|
|
286
|
+
source-platforms/ # CLI fetch + filter examples per platform
|
|
287
|
+
langfuse.md # -> CLI-first explainer + empirical filter-coverage matrix (no native agent-ID; name/tags proxy) + CLI-vs-REST fallback
|
|
288
|
+
target-platforms/ # Apply recipe + hyperlinks per target type
|
|
289
|
+
internal/
|
|
290
|
+
self-diagnostics.md # [INTERNAL] PR-022 playbook
|
|
291
|
+
|
|
292
|
+
internal/ # [INTERNAL] — stripped on publish (.npmignore)
|
|
293
|
+
templates/review/ # Internal dev review templates (Kanban / Audit / skill-overview / brand-shell)
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Trace intake (post-flip):** the skill no longer owns any fetch/normalize code.
|
|
297
|
+
Traces are fetched + normalized **upstream** by `mutagent-cli trace fetch`
|
|
298
|
+
(`@mutagent/tools`), which writes a UniTF JSONL + `manifest.json`; those ride
|
|
299
|
+
into the skill via `HandoverBundle.inputs[]` and are read at Step 3.7 by
|
|
300
|
+
`scripts/normalize/read-unitf.ts`. **Standalone runs (no handover) acquire via
|
|
301
|
+
delegate-or-artifact (protocol Step 3.6, V3-9): consume a pre-staged
|
|
302
|
+
`.mutagent/traces/<id>/` artifact if present, else SPAWN the vendored
|
|
303
|
+
`discovery` sub-agent — the stage itself NEVER runs `trace fetch`/`export`
|
|
304
|
+
inline.** Run `mutagent-cli trace --help` to discover
|
|
305
|
+
the fetch/count/export surface. The `source-platforms/*` docs are now
|
|
306
|
+
platform reference material (filter coverage, quirks) for *shaping the upstream
|
|
307
|
+
CLI query* — the skill itself sees only the resulting UniTF. See
|
|
308
|
+
[`references/source-platforms/langfuse.md`](references/source-platforms/langfuse.md)
|
|
309
|
+
for the empirical **filter-coverage matrix** (Langfuse has **no native
|
|
310
|
+
agent-ID** — `trace.name` + `tags` are the agent proxy).
|
|
311
|
+
|
|
312
|
+
## §7 — Config
|
|
313
|
+
|
|
314
|
+
Config lives at: `<host>/.mutagent/config.yaml`
|
|
315
|
+
Secrets at: `<host>/.mutagentrc` (gitignored, never committed)
|
|
316
|
+
|
|
317
|
+
Load config: `Bash("scripts/cli/run.sh scripts/config/load.ts")`
|
|
318
|
+
|
|
319
|
+
Full schema: `references/config.md` and `scripts/config/schema.ts`
|
|
320
|
+
|
|
321
|
+
Key fields: `source.platform`, `target.platform`, `ask_tool.runtime`, `schedule.mode`, `trigger_rules[]`, `self_diagnostics.enabled`
|
|
322
|
+
|
|
323
|
+
**W11-07 — Scope + agent-ID identity**: `parse-brief.scopeType` ("skill"|"agent"|null) determines whether the operator named a scope directly (use it) or not (AskUserQuestion picker). `config.agents[]` is an optional cross-platform identity map that resolves a code-level agent name to its Langfuse/OTel identifiers — see `references/workflows/scope-model.md`.
|
|
324
|
+
|
|
325
|
+
## §8 — Design Principles (55 — operative subset)
|
|
326
|
+
|
|
327
|
+
Design principles + the decision log that grounds them are maintained internally
|
|
328
|
+
(Design/Build artifacts, not shipped). The principles that shape runtime behavior
|
|
329
|
+
are operative through the workflows and gates referenced above. Key ones for execution:
|
|
330
|
+
- **PR-001**: Tier 0 before LLM — run `scripts/tier0-scan.ts` before any LLM call
|
|
331
|
+
- **PR-004**: Branch hygiene — BG worktree + PR; never touch operator's checked-out branch
|
|
332
|
+
- **PR-007**: SKILL.md ≤ 500 lines — load references on demand
|
|
333
|
+
- **PR-014**: HITL via HTML copy-back primary; AskUserQuestion only for final apply gate
|
|
334
|
+
- **PR-019**: Scripts vs agent ops — see operation-inventory.md for classification
|
|
335
|
+
- **PR-022**: Self-Diagnostics [INTERNAL] — gated by `self_diagnostics.enabled: false`
|
|
336
|
+
- **PR-023**: Clipboard payloads = self-contained actionable plans (v0.3+) — every remedy embeds ActionablePlan; apply PR follows Diagnostic Apply PR Comment format (see `references/workflows/apply-pr-comment-format.md`)
|
|
337
|
+
- **PR-024**: Orchestration runs in the parent session, never a coordinator sub-agent
|
|
338
|
+
- **PR-025**: Self-diagnosis == client diagnosis — one engine, only the subject differs
|
|
339
|
+
- **PR-029**: The report IS the product surface — template-stamp over procedural rendering (the gold-standard `report.html.tpl` + `render.ts` panel functions)
|
|
340
|
+
- **PR-033**: Each finding tagged `audience: PRODUCT|META|CORE`; `--audience client` NODE-STRIPs internal nodes
|
|
341
|
+
- **PR-035**: Fresh runs MUST LLM-deep-read; caps bound the read, never skip it (`scripts/sample/deep-read-gate.ts` HARD-REFUSES `llmReadCount===0 && !priorSignalsRef`)
|
|
342
|
+
- **PR-049**: Primary signal MUST be selected by the reconciled 5-step process (failure-validity gate → impact×prevalence → deep-read corroboration); drives ONE `runMeta.primarySignal` for census·heatmap·funnel (never a frequency artifact)
|
|
343
|
+
|
|
344
|
+
## §9 — Failure Taxonomy (3 dimensions — v1 locked)
|
|
345
|
+
|
|
346
|
+
`(WHAT, WHY, WHERE)` — see `references/workflows/rca.md` for full taxonomy and finding shape.
|
|
347
|
+
|
|
348
|
+
WHAT: `wrong-output`, `missing-output`, `loop`, `latency-spike`, `cost-overshoot`, `format-violation`, `hallucination`, `user-complaint`, `low-score`, `missing-context`
|
|
349
|
+
|
|
350
|
+
WHY: `prompt-underspec`, `prompt-overspec`, `tool-misuse`, `tool-missing`, `context-overflow`, `provider-limit`, `data-staleness`, `handoff-loss`, `dependency-failure`
|
|
351
|
+
|
|
352
|
+
WHERE: `system-prompt`, `tool-definition`, `agent-config`, `routing-config`, `upstream-data`, `provider-side`, `harness-side`, `user-input`
|