@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,134 @@
|
|
|
1
|
+
# edd-loop — the ADL ③ IMPROVE / Eval-Driven-Development loop (F18 + F19)
|
|
2
|
+
|
|
3
|
+
> **Loaded by:** the evaluator `improve` mode (`assets/agents/evaluator.md#mode-improve`). Load on demand.
|
|
4
|
+
> **Backed by:** `scripts/edd/variance-gate.ts` (F19) · `scripts/edd/change-request.ts` (F18) ·
|
|
5
|
+
> `scripts/edd/edd-types.ts` + `schemas/edd-change-request.schema.yaml` (the contract).
|
|
6
|
+
> **Sibling refs:** `grounded-adjudication.md` (every ask is grounded) · `validate-evaluator.md` (trust the judge first).
|
|
7
|
+
|
|
8
|
+
The IMPROVE stage closes the **PR-011 spec↔impl↔eval triad**. A judge that only reports is half a
|
|
9
|
+
loop; EDD drives the subject to **full green** while the evaluator stays **judge-only (EV-051)** — it
|
|
10
|
+
**REQUESTS** the `ai-engineer` to amend the Agent/AgentSpec and **re-evals**, but never
|
|
11
|
+
patches the subject itself.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## The two doctrine lines
|
|
16
|
+
|
|
17
|
+
> **F19 — VARIANCE FIRST.** *Stabilize per-case variance (run each case ~N times, default 5, until the
|
|
18
|
+
> verdict stops flapping) BEFORE measuring accuracy over the full dataset. Without stabilizing
|
|
19
|
+
> variance first, accuracy over big samples is wasted.*
|
|
20
|
+
|
|
21
|
+
> **F18 — EDD CLOSURE.** *The evaluator localizes WHERE a fix belongs (agentspec vs impl), REQUESTS
|
|
22
|
+
> the ai-engineer to amend it (over SendMessage, grounded), and re-evals what is amended — looping to
|
|
23
|
+
> full green or a bounded STOP. The evaluator never patches; the engineer never judges.*
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## F19 — the variance-first gate
|
|
28
|
+
|
|
29
|
+
After the initial `*build` + `*evaluate`, the loop's FIRST phase is **variance**, not accuracy:
|
|
30
|
+
|
|
31
|
+
1. **repeat-N** — run each case the SAME way N times (default `DEFAULT_REPEAT_N = 5`). Collect a
|
|
32
|
+
`CaseVarianceObservation { caseId, criterionId, verdicts[], trajectories? }` per case.
|
|
33
|
+
2. **gate** — `evaluateVarianceGate(observations)`:
|
|
34
|
+
- per-case spread via the already-shipped `evalScoreVariance` (EV-054) — NO new variance math.
|
|
35
|
+
- a case is **stable** iff `variance ≤ maxVariance` (default 0) **AND** it was sampled ≥ `repeatN`
|
|
36
|
+
(under-sampling never reads as stable — you cannot certify a spread you did not measure).
|
|
37
|
+
- the **gate passes** iff EVERY case is stable. An empty case set FAILS (nothing measured).
|
|
38
|
+
3. **order** — `nextPhaseAfterVariance(current, gate)` advances `build`/`variance` → `accuracy` ONLY
|
|
39
|
+
when the gate passed; otherwise it stays in `variance`. `assertVarianceStableBeforeAccuracy(gate)`
|
|
40
|
+
**THROWS** if accuracy is attempted on a flapping suite — the hard guard for the doctrine line.
|
|
41
|
+
|
|
42
|
+
Only once variance is stable does the **accuracy** phase run the suite over the full dataset.
|
|
43
|
+
|
|
44
|
+
| Knob | Default | Meaning |
|
|
45
|
+
|------|---------|---------|
|
|
46
|
+
| `repeatN` | 5 | reruns per case before the spread is certifiable |
|
|
47
|
+
| `maxVariance` | 0 | per-case eval-score variance ceiling (0 = byte-identical verdict) |
|
|
48
|
+
|
|
49
|
+
A looser `maxVariance` (e.g. `0.05`) admits a single `uncertain` among passes without flapping the
|
|
50
|
+
gate — set it per subject when an occasional principled abstain is acceptable.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## F18 — the change-request contract + the loop
|
|
55
|
+
|
|
56
|
+
When a case fails (in EITHER phase), the evaluator builds a **grounded** change-request and hands it
|
|
57
|
+
off — it does not patch:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
evaluator --(EddChangeRequest)--> ai-engineer # SendMessage
|
|
61
|
+
ai-engineer --(ChangeRequestResponse)--> evaluator # amended | rejected
|
|
62
|
+
evaluator re-evaluates (from the variance phase) → loop
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
> **User-facing terminology (dogfood H1).** `EddChangeRequest` / `ChangeRequestResponse` are INTERNAL
|
|
66
|
+
> type names — NEVER surface them to the operator. In Helix's prose the loop reads as plain language:
|
|
67
|
+
> "the evaluator sends the engineer **a fix request** with the failing cases; the engineer **amends
|
|
68
|
+
> and replies**." Show the outcome, never the symbol (INTERNALS UNDER THE HOOD).
|
|
69
|
+
|
|
70
|
+
- **`EddChangeRequest`** (`buildChangeRequest` + `validateChangeRequest`): `swing`, `subject`,
|
|
71
|
+
`remedyTarget ∈ {agentspec, impl}`, `failingCases[]` (each with the verbatim `critique` + **≥1**
|
|
72
|
+
`ref{obs,path,value}` — an ungrounded ask fails loud, GA-1), `proposedRemedy` (a HYPOTHESIS).
|
|
73
|
+
- **`agentspec`** = the DEFINITION is wrong → the engineer edits `agentspec.yaml` and **re-runs
|
|
74
|
+
`*build`** so def→impl cascades.
|
|
75
|
+
- **`impl`** = a wiring / build-faithfulness defect that does NOT change the spec.
|
|
76
|
+
- **`ChangeRequestResponse`** (`validateChangeResponse`): `amended` (→ `reEvalWarranted` ⇒ re-eval
|
|
77
|
+
from the variance phase) or `rejected` (with a mandatory `note` — never re-eval an unchanged
|
|
78
|
+
subject). There is no "trust me, skip re-eval" path: an amend ALWAYS triggers a fresh swing.
|
|
79
|
+
|
|
80
|
+
### The bounded terminator (afkloop-legal — NEVER infinite)
|
|
81
|
+
|
|
82
|
+
`decideEddLoop(state, budget)` reads ONLY observable, injected state
|
|
83
|
+
`{ phase, swing, varianceStable, accuracyMet, elapsedMs, noImprovementStreak }` and decides
|
|
84
|
+
**success-first**:
|
|
85
|
+
|
|
86
|
+
| Check | Condition | Result |
|
|
87
|
+
|-------|-----------|--------|
|
|
88
|
+
| 1 | `varianceStable && accuracyMet` | **DONE** (`full-green`) |
|
|
89
|
+
| 2 | `swing ≥ maxSwings` | **STOPPED** (`max-swings`) + convergence delta |
|
|
90
|
+
| 3 | `elapsedMs ≥ maxWallclockMs` | **STOPPED** (`max-wallclock`) |
|
|
91
|
+
| 4 | `noImprovementStreak ≥ noImprovementStreakLimit` | **STOPPED** (`no-improvement-streak`) |
|
|
92
|
+
| else | — | CONTINUE (variance phase until stable, then accuracy) |
|
|
93
|
+
|
|
94
|
+
Defaults (`DEFAULT_EDD_LOOP_BUDGET`): `maxSwings 6` · `maxWallclockMs 30min` ·
|
|
95
|
+
`noImprovementStreakLimit 2`. `elapsedMs` is **injected** (the caller measures wall-clock; the
|
|
96
|
+
controller never reads a clock) → the decision is PURE + deterministic (C-PIN).
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Assumed eval-runner interface (the clean seam — REBUILD nothing)
|
|
101
|
+
|
|
102
|
+
The EVAL engine (dataset build · the eval runner · Path A/B) is built **in parallel** (sibling
|
|
103
|
+
worktree). The `improve` mode is **additive**: it orchestrates the LOOP around the runner and assumes
|
|
104
|
+
this interface — it does not re-implement it.
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
// the runner the improve mode CONSUMES (owned by the eval engine, e.g. run-evaluate.ts):
|
|
108
|
+
runOnce(caseIds: string[]) -> Array<{
|
|
109
|
+
caseId: string;
|
|
110
|
+
criterionId: string;
|
|
111
|
+
verdict: "pass" | "fail" | "uncertain"; // OutcomeVerdict
|
|
112
|
+
trajectory: string[]; // ordered tool names (for trajectory spread)
|
|
113
|
+
}>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- **repeat-N** = `runOnce` called N times over the SAME `caseIds`; the per-rerun verdicts feed
|
|
117
|
+
`CaseVarianceObservation.verdicts[]` (+ `trajectories[]`) → `evaluateVarianceGate`.
|
|
118
|
+
- **accuracy** = `runOnce` over the FULL dataset → per-case verdicts → an accuracy ratio vs target.
|
|
119
|
+
- the runner is **C-PIN** (pinned model + temperature 0). The improve mode adds **no** provider call.
|
|
120
|
+
|
|
121
|
+
If the sibling runner exposes a different shape, adapt at the seam (map its result into
|
|
122
|
+
`CaseVarianceObservation` / the accuracy ratio) — keep the gate + loop modules untouched. The gate
|
|
123
|
+
(`variance-gate.ts`) + the loop (`change-request.ts`) are PURE and runner-agnostic by design.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Boundaries
|
|
128
|
+
|
|
129
|
+
- **Judge-only (EV-051):** the evaluator REQUESTS + re-evals; the `ai-engineer` is the ONE
|
|
130
|
+
agent allowed to amend the Agent/AgentSpec. Fixables + infra-class still route to diagnostics.
|
|
131
|
+
- **Variance-first (F19):** accuracy is never measured before the variance gate passes (assert-guarded).
|
|
132
|
+
- **Bounded (F18):** every loop path terminates within the budget; STOP reports the convergence delta.
|
|
133
|
+
- **Lockstep (PR-011):** the request names the locus, the engineer cascades def→impl, the re-eval
|
|
134
|
+
re-grounds the verdict on the amended subject — spec + impl + eval move together.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# error-analysis — mine emergent eval criteria from traces
|
|
2
|
+
|
|
3
|
+
> **Source:** absorbed from `mutagent-system/.memory/features/evals-skills-source/skills/error-analysis/SKILL.md`.
|
|
4
|
+
> **Loaded by:** `*discover-evals` (EV-041/042/052). Load on demand.
|
|
5
|
+
> **Sibling refs:** `write-judge-prompt.md` (build the judge) · `validate-evaluator.md` (calibrate it) · `grounded-adjudication.md` (the GA doctrine: bind · gather refs · typed assumptions · abstain · verify).
|
|
6
|
+
|
|
7
|
+
The foundation of every eval suite: read traces, judge ✓/✗, and let failure CATEGORIES emerge —
|
|
8
|
+
never start from a pre-defined list. The categories that emerge ARE the binary actionable criteria
|
|
9
|
+
`*build-evals` turns into judges.
|
|
10
|
+
|
|
11
|
+
## The 7-step process
|
|
12
|
+
|
|
13
|
+
1. **Collect ~100 representative traces.** Capture the FULL trace: input event, every intermediate
|
|
14
|
+
LLM call, tool uses, retrieved docs, reasoning, final output. ~100 is roughly where new traces
|
|
15
|
+
stop revealing new KINDS of failure (system-complexity dependent).
|
|
16
|
+
2. **Read each trace → judge Pass/Fail → trace the failure to its ROOT.** This is `*discover-evals`'s
|
|
17
|
+
determine-outcome step (EV-042). Run the **3 detection lenses** (below) to surface candidate
|
|
18
|
+
failures, then apply **root-not-symptom**: trace each Fail to its ROOT with judgement — NOT the
|
|
19
|
+
first visible symptom (the first wrong is often downstream of the real root). Write observations
|
|
20
|
+
**grounded by a structured ref** `{obs, path, value}`, not explanations ("SQL missed the budget
|
|
21
|
+
constraint @ obs `a1b2/tool.input.query`", not "the model probably didn't understand"); ground
|
|
22
|
+
every ABSENCE claim ("did not", "never", "no X") with a positive field check, never inferred from
|
|
23
|
+
silence. **Critical rule (sample):** "inaction can be success" — never use "took an action /
|
|
24
|
+
called a tool" as a Pass proxy. A guard-hold (the agent correctly does NOT send) is a Pass.
|
|
25
|
+
3. **Group failures into 5-10 categories** after the first 30-50 traces (don't wait for all 100 —
|
|
26
|
+
early grouping sharpens what to look for). Split notes with different root causes; group notes
|
|
27
|
+
with the same one. Each category gets a clear name + one-sentence definition. LLM-assisted
|
|
28
|
+
clustering is allowed ONLY after 30-50 human-reviewed traces — and always re-review the groupings
|
|
29
|
+
(LLMs cluster by surface similarity).
|
|
30
|
+
4. **Label every trace** against the categories — one binary column per category.
|
|
31
|
+
5. **Compute failure rates** (`category_failures / total`); sort descending. The most frequent
|
|
32
|
+
category is where to focus first.
|
|
33
|
+
6. **Decide what to do about each failure (S4 — fix-vs-eval-worthy):**
|
|
34
|
+
- **Can we just fix it?** Prompt never asked for the behavior → add the instruction. Tool missing
|
|
35
|
+
→ add the tool. Engineering bug → fix the code. If a clear fix resolves it, do that FIRST.
|
|
36
|
+
- **Is an evaluator worth the cost?** Only for failures that PERSIST after fixing AND that the
|
|
37
|
+
user will iterate on repeatedly (frequency × business impact). Critical requirements (safety,
|
|
38
|
+
compliance) warrant a judge as a regression guard even after fixing.
|
|
39
|
+
- **In this skill (EV-051): we never fix.** The evaluator FLAGS fixable-vs-eval-worthy and ROUTES
|
|
40
|
+
the fixable + infra-class failures to `mutagent-diagnostics` (e.g. sample C4 dead-channel
|
|
41
|
+
`account_number_unavailable` → WHY=`dependency-failure`, WHERE=`provider-side`). It builds
|
|
42
|
+
judges only for the genuinely eval-worthy behavioral criteria.
|
|
43
|
+
- Prefer **code-based checks** (regex / parsing / schema / tool-output flags) for anything
|
|
44
|
+
objective; reserve LLM judges for true judgment calls.
|
|
45
|
+
7. **Iterate** — expect 2-3 rounds. Merge overlapping categories, split too-broad ones, clarify
|
|
46
|
+
definitions, re-label.
|
|
47
|
+
|
|
48
|
+
## The 3 detection lenses (make them explicit)
|
|
49
|
+
|
|
50
|
+
Determination is not a single undifferentiated read — surface candidate failures through **three
|
|
51
|
+
named lenses**, and tag which lens each candidate fired on (this is what later becomes the
|
|
52
|
+
criterion's `dimension` / `class`):
|
|
53
|
+
|
|
54
|
+
| Lens | What it catches | Typical disposition |
|
|
55
|
+
|------|-----------------|---------------------|
|
|
56
|
+
| **drift / off-path** | The agent left the intended ROUTE — wrong tool, wrong order, answered a different question, ignored a constraint. A judgement call. | → **judge**-class behavioral criterion |
|
|
57
|
+
| **tool-output failure** | A tool errored, timed out, or returned unusable/empty output the agent then mis-used. | → often **code**/fixable → route to diagnostics |
|
|
58
|
+
| **missing-context** | A referent the agent NEEDED was never supplied (blank brief, dropped field, unresolved variable). This is the **BIND** detector — a term with no referent. | → typed **factual-intent** assumption; situation is indeterminate, not a fail |
|
|
59
|
+
|
|
60
|
+
The lenses are detectors, not categories — the same trace can fire more than one. Categories still
|
|
61
|
+
EMERGE from what fires (step 3); the lenses only make sure you LOOK in all three places.
|
|
62
|
+
|
|
63
|
+
## root-not-symptom (REPLACES first_thing_wrong_only)
|
|
64
|
+
|
|
65
|
+
The old `first_thing_wrong_only` rule conflated **detection** with **localization** — the first
|
|
66
|
+
*visible* wrong is frequently downstream of the real root, and its single-cascade assumption silently
|
|
67
|
+
drops independent causes. The corrected invariant:
|
|
68
|
+
|
|
69
|
+
- **KEEP:** one criterion per **ROOT** — dedup the cascade (don't mint a criterion per downstream
|
|
70
|
+
symptom of the same root).
|
|
71
|
+
- **FIX:** trace to the root with **judgement**, not the first symptom.
|
|
72
|
+
- **Multiple INDEPENDENT roots ⇒ multiple criteria** (the cascade assumption is dropped).
|
|
73
|
+
- A **causal-link claim** (root → symptom) must be **GROUNDED** — cite the edge with a ref — OR
|
|
74
|
+
surfaced as a **typed assumption**, which makes the localization **INDETERMINATE** (not a fail).
|
|
75
|
+
- **Deep recursive-why → route to `mutagent-diagnostics`.** The evaluator LOCALIZES (locus: prompt ·
|
|
76
|
+
tool · context · skill); it does not run full root-cause analysis.
|
|
77
|
+
|
|
78
|
+
## Stopping criterion (saturation)
|
|
79
|
+
|
|
80
|
+
Stop when new traces stop revealing new KINDS of failure — roughly ~100 reviewed with no new failure
|
|
81
|
+
type in the last ~20. Exact number depends on system complexity.
|
|
82
|
+
|
|
83
|
+
## Trace sampling strategies (EV-052 — the 5)
|
|
84
|
+
|
|
85
|
+
When production volume is high, use a MIX — never a single angle:
|
|
86
|
+
|
|
87
|
+
| Strategy | When | Method |
|
|
88
|
+
|----------|------|--------|
|
|
89
|
+
| **Random** | Default starting point | Sample uniformly from recent traces |
|
|
90
|
+
| **Outlier** | Surface unusual behavior | Sort by length / latency / tool-call count; review extremes |
|
|
91
|
+
| **Failure-driven** | After guardrail violations / complaints | Prioritize flagged traces |
|
|
92
|
+
| **Uncertainty** | When automated judges exist | Focus where judges disagree or have low confidence |
|
|
93
|
+
| **Stratified** | Ensure coverage across segments | Sample within each dimension (query type, segment, feature) |
|
|
94
|
+
|
|
95
|
+
Aim for a balanced ✓/✗ split (~50/50) so the criteria are mined from BOTH success and failure modes.
|
|
96
|
+
|
|
97
|
+
## Worked example — sample-email-agent (the dogfood)
|
|
98
|
+
|
|
99
|
+
The sample export carried **0 scores / 0 tags on all 1946 traces** — no label column to shortcut to,
|
|
100
|
+
so determine-outcome (EV-042) had to deep-read every trace. Emergent categories (the 8 candidate
|
|
101
|
+
criteria): C1 outbound-guard compliance · C2 goal-attainment · C3 manager-override honored · C4
|
|
102
|
+
send-failure recovery · C5 channel discipline · C6 draft→send integrity · C7 escalation
|
|
103
|
+
appropriateness · C8 memory hygiene. C4 + dead-channel were flagged fixable/infra → routed to
|
|
104
|
+
diagnostics, NOT judged. C1/C2/C3/C7 are eval-worthy behavioral judgments → judges built.
|
|
105
|
+
|
|
106
|
+
## Anti-patterns
|
|
107
|
+
|
|
108
|
+
- **Brainstorming categories before reading traces.** Read first; categorize what you find.
|
|
109
|
+
- **Starting with pre-defined categories.** A fixed list causes confirmation bias.
|
|
110
|
+
- **Generic scores as categories** ("hallucination score", "helpfulness score") — not grounded in
|
|
111
|
+
the application's actual failure modes.
|
|
112
|
+
- **Building evaluators before fixing obvious problems** (prompt gaps, missing tools, bugs).
|
|
113
|
+
- **Treating error analysis as one-time.** Re-run after every significant change.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# eval-audit — audit an eval pipeline (incl. the evaluator's OWN) for trustworthiness
|
|
2
|
+
|
|
3
|
+
> **Source:** absorbed from `mutagent-system/.memory/features/evals-skills-source/skills/eval-audit/SKILL.md`
|
|
4
|
+
> (S16 six-area diagnostic) + its meta-skill framing (S17 — *eval-of-the-eval*).
|
|
5
|
+
> **Loaded by:** `*audit` / `*self-audit` (the eval-of-the-eval mode, EV-055). Load on demand.
|
|
6
|
+
> **Sibling refs:** `error-analysis.md` (Area 1) · `write-judge-prompt.md` (Area 2) ·
|
|
7
|
+
> `validate-evaluator.md` (Area 3) · `build-review-interface.md` (Area 4) ·
|
|
8
|
+
> `generate-synthetic-data.md` (Area 5).
|
|
9
|
+
> **On-demand only:** this audit NEVER auto-fires — no cron, no monitor, no cadence
|
|
10
|
+
> (`feedback_self_diagnostics_on_demand_only`). The operator invokes it explicitly.
|
|
11
|
+
|
|
12
|
+
Inspect an LLM eval pipeline and produce a **prioritized list of problems**, each linked to a
|
|
13
|
+
concrete fix. Use it when inheriting an eval system, when unsure whether evals are trustworthy, or —
|
|
14
|
+
the **meta-skill (S17)** — to point the evaluator at **its own** eval-development artifacts:
|
|
15
|
+
*are my judges validated? is my dataset balanced? are my criteria binary + actionable? is my suite
|
|
16
|
+
living?* That eval-of-the-eval is `*self-audit` (EV-055), built on the existing `*audit` surface +
|
|
17
|
+
the `*validate` stats (it REUSES them — it does not rebuild a second auditor).
|
|
18
|
+
|
|
19
|
+
## The six diagnostic areas (S16)
|
|
20
|
+
|
|
21
|
+
Work each area: inspect the actual artifacts, decide whether the problem exists, record a finding if
|
|
22
|
+
it does. **Order findings by impact** — most impactful first. Each area maps onto a surface this
|
|
23
|
+
skill already ships, so the audit is concrete, never a generic checklist.
|
|
24
|
+
|
|
25
|
+
### 1. Error Analysis — were criteria MINED from real ✓/✗ traces, or brainstormed?
|
|
26
|
+
|
|
27
|
+
**Check:** Was systematic error analysis done on real (or synthetic) traces, with *observed*
|
|
28
|
+
failure categories — not generic labels borrowed from research ("helpfulness", "coherence",
|
|
29
|
+
"hallucination score")?
|
|
30
|
+
|
|
31
|
+
**Problem if missing/brainstormed:** evaluators built without error analysis measure generic
|
|
32
|
+
qualities instead of actual failure modes — they score well on paper and miss real problems.
|
|
33
|
+
**Fix:** `error-analysis.md` (`*discover-evals`): mine emergent BINARY ACTIONABLE categories from the
|
|
34
|
+
✓/✗ split; if no traces exist, `generate-synthetic-data.md` first.
|
|
35
|
+
**Self-audit signal:** a discovered criterion with **no `sourceTraceIds`** (no trace-grounded
|
|
36
|
+
evidence) is a brainstormed-not-observed smell — flag it.
|
|
37
|
+
|
|
38
|
+
### 2. Evaluator Design — binary? failure-mode-specific? code where possible?
|
|
39
|
+
|
|
40
|
+
**Check:** Are evaluators **binary pass/fail** (not Likert 1-5 / letter grades / un-thresholded
|
|
41
|
+
scores)? Does each LLM judge target **exactly one** failure mode (not "is this helpful?")? Are
|
|
42
|
+
**code-based checks** used for objectively-checkable criteria (format, schema, keyword,
|
|
43
|
+
constraint)? Are similarity metrics (ROUGE / BERTScore / cosine) kept OUT of generation-quality
|
|
44
|
+
scoring?
|
|
45
|
+
|
|
46
|
+
**Problem if not:** Likert scales can't be calibrated; holistic judges produce unactionable
|
|
47
|
+
verdicts; LLM judges on objective criteria waste tokens and add noise; similarity metrics measure
|
|
48
|
+
surface overlap, not correctness.
|
|
49
|
+
**Fix:** `write-judge-prompt.md` (`*build-evals`) — binary, one-failure-mode, critique-before-verdict;
|
|
50
|
+
**code before judge** (SKILL §8). The criterion class (`objective→code · subjective→judge · hybrid`,
|
|
51
|
+
SKILL §9) IS this routing.
|
|
52
|
+
**Self-audit signal:** a criterion whose verdict space is not `{Pass, Fail}` (ordinal / >2 values),
|
|
53
|
+
or an `objective`-class criterion routed to an LLM judge instead of a code-check — flag it.
|
|
54
|
+
|
|
55
|
+
### 3. Judge Validation — validated vs human labels, with TPR/TNR + a clean split?
|
|
56
|
+
|
|
57
|
+
**Check:** Are LLM judges validated against human labels (confusion matrix, **TPR/TNR** — not raw
|
|
58
|
+
accuracy / percent-agreement / Cohen's κ)? Is there a disjoint **train/dev/test** split (few-shot
|
|
59
|
+
examples NOT drawn from the measurement set)?
|
|
60
|
+
|
|
61
|
+
**Problem if not:** an unvalidated judge may silently miss failures or flag passing traces; raw
|
|
62
|
+
accuracy hides this under class imbalance (always-"Pass" scores 90% when 90% pass, catches zero
|
|
63
|
+
fails); dev/test-as-few-shot leaks and inflates alignment.
|
|
64
|
+
**Fix:** `validate-evaluator.md` (`*validate`, EV-044) — TPR/TNR, test-once, Rogan-Gladen
|
|
65
|
+
correction, bootstrap CI; `<MIN_LABELS` stays `unvalidated`+bias-corrected (never blocks).
|
|
66
|
+
**Self-audit signal:** a judge whose `ValidationResult` is **`unvalidated`**, or whose TPR/TNR is
|
|
67
|
+
**below `TARGET_TPR`/`TARGET_TNR` (0.9)**, or a split that is not disjoint — flag it (this REUSES
|
|
68
|
+
the `*validate` stats, it does not re-run validation).
|
|
69
|
+
|
|
70
|
+
### 4. Human Review Process — domain experts, full traces, natural rendering?
|
|
71
|
+
|
|
72
|
+
**Check:** Are domain experts (not generic annotators) labeling? Do reviewers see the **full trace**
|
|
73
|
+
(input · intermediate steps · tool calls · retrieved context · output), not just the final output?
|
|
74
|
+
Is data rendered **naturally** (markdown rendered, code highlighted, tables as tables) — not raw
|
|
75
|
+
JSON in spreadsheet cells?
|
|
76
|
+
|
|
77
|
+
**Problem if not:** general annotators catch formatting errors but miss domain failures; output-only
|
|
78
|
+
review hides WHERE the pipeline broke; raw formats make reviewers parse instead of judge.
|
|
79
|
+
**Fix:** `build-review-interface.md` (`*review`, EV-045) — one full trace/screen, native render,
|
|
80
|
+
Pass/Fail/Defer. **Autonomy caveat:** in an afkloop run no human labels in-browser; the UI is built +
|
|
81
|
+
DOM-smoke-tested and surfaced as an artifact.
|
|
82
|
+
**Self-audit signal:** **zero `HumanLabel`s** feeding `*validate` (so no judge CAN be validated), or
|
|
83
|
+
a review surface that renders only final outputs — flag it.
|
|
84
|
+
|
|
85
|
+
### 5. Labeled Data — enough, and balanced?
|
|
86
|
+
|
|
87
|
+
**Check:** Is there enough labeled data — ~100 traces for error-analysis saturation, **~50 Pass +
|
|
88
|
+
~50 Fail** for reliable TPR/TNR? Are sampling strategies used to find informative traces (random +
|
|
89
|
+
clustering + outlier + classification + feedback)?
|
|
90
|
+
|
|
91
|
+
**Problem if insufficient/skewed:** small or class-imbalanced sets produce unreliable rates and wide
|
|
92
|
+
CIs; a Fail-starved set can't measure TNR.
|
|
93
|
+
**Fix:** the five sampling strategies in `error-analysis.md` + `sample-traces.ts` (EV-052) selectors;
|
|
94
|
+
`generate-synthetic-data.md` (`*build-dataset`, EV-046) cartesian-expand with **deterministic
|
|
95
|
+
near-dup removal** to supplement; `*discover-dataset` (EV-047) distills a living set from labeled ✓/✗.
|
|
96
|
+
**Self-audit signal:** a dataset with **fewer than `MIN_PER_CLASS` Pass or Fail** cases, or with
|
|
97
|
+
near-duplicate cases that `build-dataset`'s Jaccard drop should have removed — flag it.
|
|
98
|
+
|
|
99
|
+
### 6. Pipeline Hygiene — re-run after change, evaluators maintained?
|
|
100
|
+
|
|
101
|
+
**Check:** Is error analysis re-run after significant changes (model switch, prompt rewrite, new
|
|
102
|
+
feature, incident)? Are judges periodically re-validated and datasets refreshed — a **living** suite,
|
|
103
|
+
not set-and-forget?
|
|
104
|
+
|
|
105
|
+
**Problem if stale:** failure modes shift after pipeline changes; evaluators built for the old
|
|
106
|
+
pipeline miss new failure types; judges degrade silently.
|
|
107
|
+
**Fix:** the **living-suite** invariant (EV-053) — `appendOnly` + `assertMonotonicGrowth`: a living
|
|
108
|
+
artifact NEVER shrinks and grows as the subject evolves; re-validate on any model change (C-PIN
|
|
109
|
+
forces it).
|
|
110
|
+
**Self-audit signal:** a suite that **shrank** (monotonic-growth violation), or a pinned `judgeModel`
|
|
111
|
+
that changed with **no subsequent re-validation** — flag it.
|
|
112
|
+
|
|
113
|
+
## No eval infrastructure
|
|
114
|
+
|
|
115
|
+
If the subject has no eval artifacts (no traces, no evaluators, no labeled data):
|
|
116
|
+
1. Start with `error-analysis.md` (`*discover-evals`) on a sample of real traces.
|
|
117
|
+
2. If no production data exists, `generate-synthetic-data.md` (`*build-dataset`) to create inputs,
|
|
118
|
+
run them through the subject, then apply error analysis to the resulting traces.
|
|
119
|
+
3. Do **not** build evaluators / judges / dashboards before error analysis is complete.
|
|
120
|
+
|
|
121
|
+
## Report format
|
|
122
|
+
|
|
123
|
+
Findings ordered by impact. For each:
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
### [Problem Title]
|
|
127
|
+
**Status:** Problem exists | OK | Cannot determine
|
|
128
|
+
[1-2 sentences — the specific problem found in THIS pipeline, not generic advice]
|
|
129
|
+
**Fix:** [concrete action → the *command / reference / skill that addresses it]
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Group under the six areas; omit areas with no problems. For `*self-audit` the "subject" IS the
|
|
133
|
+
evaluator's own eval-dev output, and the report is the eval-of-the-eval.
|
|
134
|
+
|
|
135
|
+
## How `*self-audit` (EV-055) reuses the existing surfaces — austerity
|
|
136
|
+
|
|
137
|
+
The eval-of-the-eval is NOT a second auditor. The **deterministic** Area checks (2 binary-shape,
|
|
138
|
+
3 TPR/TNR-threshold, 5 balance/redundancy, 6 monotonicity, plus the Area-1/4 grounding/label
|
|
139
|
+
counts) are pure code in `scripts/self-audit.ts` (Type A — emits **finding DATA**, no verdict prose,
|
|
140
|
+
no LLM). The **nuanced** judgments that genuinely need reasoning — *is this criterion actionable or
|
|
141
|
+
merely generic? does this judge prompt truly target one failure mode?* — are dispatched to the
|
|
142
|
+
`audit-executor` agent (`*self-audit` mode, host-runtime, **NO provider key / NO Gemini**), exactly
|
|
143
|
+
like every other Type-B judging op. The score it consumes (TPR/TNR, balance, monotonicity) comes
|
|
144
|
+
straight from `*validate` + the living-suite provenance — reused, never recomputed.
|
|
145
|
+
|
|
146
|
+
## Anti-patterns
|
|
147
|
+
|
|
148
|
+
- Running the audit as a checklist without inspecting the actual artifacts.
|
|
149
|
+
- Reporting generic advice disconnected from what was found in THIS pipeline.
|
|
150
|
+
- Recommending evaluators before error analysis is complete.
|
|
151
|
+
- Using an LLM judge for a failure a code-check can handle.
|
|
152
|
+
- Treating the audit as one-time — re-audit after significant changes (Area 6 applies to the
|
|
153
|
+
evaluator itself).
|
|
154
|
+
- Wiring `*self-audit` to a cron / monitor / cadence — it is on-demand only, ships dormant.
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# `*eval` — the ADL EVAL-stage flow
|
|
2
|
+
|
|
3
|
+
> Source: the ADL lifecycle (SPEC → BUILD → **EVAL**). Load on demand.
|
|
4
|
+
> Drives `*eval` (the entry), and is the shared contract `*build-dataset` /
|
|
5
|
+
> `*build-evals` / `*evaluate` follow. PARENT-SESSION ONLY (AskUserQuestion).
|
|
6
|
+
|
|
7
|
+
The EVAL stage turns a freshly-`*build`-ed agent + its **agentspec** into a
|
|
8
|
+
trustworthy eval suite and runs it to a GATE verdict. It is the evaluator's ADL
|
|
9
|
+
entry-point: after `*build` hands over the built agent and the agentspec, `*eval`
|
|
10
|
+
interactively derives the dataset + the eval suite FROM the spec, lets the user
|
|
11
|
+
pick the eval ENGINE, and streams wireframe cards the whole way.
|
|
12
|
+
|
|
13
|
+
This file is the operational glue; the deep mechanics live in the existing
|
|
14
|
+
spine (`error-analysis.md` · `write-judge-prompt.md` · `validate-evaluator.md` ·
|
|
15
|
+
`generate-synthetic-data.md`). It adds the ADL-specific findings F7–F22.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Inputs (from `*build`)
|
|
20
|
+
|
|
21
|
+
| Input | Shape | Used for |
|
|
22
|
+
|-------|-------|----------|
|
|
23
|
+
| the built agent | a target-framework impl (e.g. a Mastra/TS agent) OR a harness agent | the eval SUBJECT |
|
|
24
|
+
| `agentspec.definition.evals` | `{ success_criteria[], scenarios[], dataset_categories[] }` | dataset materialization (F8) + criteria |
|
|
25
|
+
| `agentspec.build` | `{ target_framework, runtime, target_eval_framework }` | the target-conditional engine fork (F9) |
|
|
26
|
+
|
|
27
|
+
The skill is **standalone** — it NEVER imports the agentspec schema. It consumes
|
|
28
|
+
a MINIMAL local slice (`scripts/contracts/agentspec-evals.ts` ·
|
|
29
|
+
`scripts/contracts/eval-engine.ts EngineTargetInput`) the caller maps from the
|
|
30
|
+
agentspec. No cross-skill import.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Step 0 — interactive offer (F15)
|
|
35
|
+
|
|
36
|
+
After `*build`, OFFER the two derivations (AskUserQuestion, parent session only):
|
|
37
|
+
|
|
38
|
+
1. **`*build-dataset`** — materialize + grow the golden dataset from the spec.
|
|
39
|
+
2. **`*build-evals`** — build the eval suite (and pick the engine).
|
|
40
|
+
|
|
41
|
+
Let the user run either/both. They are independent; `*evaluate` consumes both.
|
|
42
|
+
|
|
43
|
+
**Dataset gate (dogfood H5).** `*evaluate` REQUIRES a materialized dataset. If `*build-evals` runs
|
|
44
|
+
(or `*evaluate` is invoked) with no dataset present, do NOT dead-end — auto-route to `*build-dataset`
|
|
45
|
+
(interactive) first, then resume. Never leave the user with an eval suite and nothing to run it on.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Step 0.5 — Ground in what the agent DOES, first (dogfood H2)
|
|
50
|
+
|
|
51
|
+
BEFORE asking ANY eval-config question (engine, runtime, models), surface the SUBJECT: read the
|
|
52
|
+
agent's `jobs_to_be_done` + `scenarios` + `success_criteria` from the spec and CONFIRM with the user
|
|
53
|
+
which use-cases matter for this eval. Understand what the agent does and what "good" means for it
|
|
54
|
+
BEFORE scoping the eval target — never lead with framework/runtime config. The confirmed use-cases
|
|
55
|
+
scope everything downstream (dataset categories, judge criteria, the engine fork below).
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Step 1 — the ENGINE FORK (F7 / F9 / F14)
|
|
60
|
+
|
|
61
|
+
`*build-evals` (and the eval-impl half of `*eval`) MUST ASK the eval
|
|
62
|
+
implementation MODE before building anything. Use
|
|
63
|
+
`scripts/eval-engine.ts chooseEvalEngineOptions(target)`:
|
|
64
|
+
|
|
65
|
+
| Engine | What | Dependency (SURFACED up front) | Portable? |
|
|
66
|
+
|--------|------|--------------------------------|-----------|
|
|
67
|
+
| **Path A `native-matrix`** | mutagent native eval-matrix + LLM-judge SUB-AGENTS | **needs a Claude-Code host** to spawn judges; on a CODE-framework target ALSO needs the built agent to **emit logs/traces to a known sink** for the judge to read | NO |
|
|
68
|
+
| **Path B `code-written`** | evals in the target's OWN language (bun/TS): code-checks + LLM-judge via SDK + criteria checks | none — runs WITHOUT Claude Code | YES |
|
|
69
|
+
|
|
70
|
+
**Target-conditional (F9).** A code FRAMEWORK target (mastra · langgraph ·
|
|
71
|
+
pydantic-ai) offers BOTH engines; a `harness:*` target (`harness:claude-code`,
|
|
72
|
+
`harness:codex`) is **native-only** (no target language to write portable evals
|
|
73
|
+
into) — `assertEngineMatchesTarget` THROWS on `code-written` + harness.
|
|
74
|
+
|
|
75
|
+
**Surface the dependency BEFORE the choice (F7).** Each menu option carries
|
|
76
|
+
`requiresClaudeCode` + `requiresLogSink` + `portable` — render them in the
|
|
77
|
+
AskUserQuestion preview so a user is NEVER silently "stuck with the matrix".
|
|
78
|
+
|
|
79
|
+
**F14 — don't trap non-CC users.** `code-written` is the *recommended default*
|
|
80
|
+
for a code framework. It compiles via `scripts/codegen-evals.ts codegenEvalSuite`
|
|
81
|
+
to a self-contained suite source the user runs directly; the only LLM path is
|
|
82
|
+
THEIR provider SDK (`judgeViaSdk`), never a CC sub-agent.
|
|
83
|
+
|
|
84
|
+
`resolveEvalEngine(choice, target)` → the `EvalEnginePlan` (`engine` ·
|
|
85
|
+
`requiresClaudeCode` · `requiresLogSink` · `outputSink` · `rationale`). The plan's
|
|
86
|
+
`outputSink` is always a discoverable path (the "outputs land in a discoverable
|
|
87
|
+
sink" success-gate).
|
|
88
|
+
|
|
89
|
+
**Don't over-ask the judge model (dogfood H4).** When the user has already chosen a HOST runtime
|
|
90
|
+
(Path A / Claude-Code host), DO NOT ask which judge model to use — default the judge to **Opus** (the
|
|
91
|
+
general judge; other models may be unavailable). Derive the judge from prior answers; only ask what
|
|
92
|
+
isn't already implied by the runtime choice. Collapse the eval-config chain to the minimal
|
|
93
|
+
un-inferable set — never re-prompt for something a previous answer already determined.
|
|
94
|
+
|
|
95
|
+
> **Native-on-a-code-framework requires the log sink (F9).** If the user picks
|
|
96
|
+
> Path A for a Mastra/TS target, the built agent MUST emit logs/traces to
|
|
97
|
+
> `plan.outputSink` (CC session transcripts or a declared log file) so the judge
|
|
98
|
+
> sub-agents have something to read. Confirm this is wired before dispatching
|
|
99
|
+
> judges — otherwise the matrix has no input.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Step 2 — MATERIALIZE the dataset (F8)
|
|
104
|
+
|
|
105
|
+
`*build-dataset` MATERIALIZES real items, not just definitions. Use
|
|
106
|
+
`scripts/materialize-dataset.ts`:
|
|
107
|
+
|
|
108
|
+
- `materializeFromAgentspec(evals)` → ≥1 REAL `DatasetCase` per `dataset_category`
|
|
109
|
+
+ one per declared `edge_case` (flagged `edge_case: "true"`). The base item
|
|
110
|
+
derives from a category-tagged scenario when present, else the category
|
|
111
|
+
description ("seed, don't duplicate").
|
|
112
|
+
- `materializeToDataset(subject, evals, existing?)` → a schema-valid `Dataset`,
|
|
113
|
+
merged MONOTONICALLY (re-materializing adds no duplicates; version bumps).
|
|
114
|
+
|
|
115
|
+
These seeds are then handed to the `dataset-builder` agent for synthetic
|
|
116
|
+
expansion (`generate-synthetic-data.md`); `build-dataset.ts` dedup/merge dedups
|
|
117
|
+
any overlap. **Success gate:** a dataset with ≥1 real item per category incl.
|
|
118
|
+
edge-cases.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Step 3 — STREAM wireframe cards (F13 / F16 / F22)
|
|
123
|
+
|
|
124
|
+
Stream PROGRESS as wireframe cards for BOTH `*build-dataset` and `*build-evals`
|
|
125
|
+
(`scripts/render-build-cards.ts`):
|
|
126
|
+
|
|
127
|
+
- `renderBuildDatasetProgressCard` / `renderBuildEvalsProgressCard` — phase +
|
|
128
|
+
progress bar + counters, emitted per phase (F13/F16).
|
|
129
|
+
- After each, emit the VERBOSE entity card (F22): `renderDatasetEntityCard`
|
|
130
|
+
(per-category breakdown · version · sink) · `renderEvalsEntityCard` (engine ·
|
|
131
|
+
SURFACED CC/log-sink dependency · criteria).
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Step 4 — RUN + the SCORECARD DASHBOARD (F20)
|
|
136
|
+
|
|
137
|
+
`*evaluate` runs the suite vs the target:
|
|
138
|
+
|
|
139
|
+
- **Path A** — the existing `run-evaluate.ts` spine (PREP → dispatch
|
|
140
|
+
`#mode-judge-trajectory` → aggregate → GATE).
|
|
141
|
+
- **Path B** — run the `codegen-evals.ts` suite (no Claude Code) and read back its
|
|
142
|
+
scorecard JSON from `plan.outputSink`.
|
|
143
|
+
|
|
144
|
+
Either way, render the result as a DASHBOARD wireframe, NOT a flat dump:
|
|
145
|
+
`renderScorecardDashboard` — gate banner + per-criterion pass/fail BAR +
|
|
146
|
+
pass/fail/indeterminate split + variance + sample count (F20). (The 5-tab HTML
|
|
147
|
+
eval-report `render-eval-report.ts` is the rich artifact; the dashboard is the
|
|
148
|
+
terminal at-a-glance.)
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Success gates (the EVAL-stage definition of done)
|
|
153
|
+
|
|
154
|
+
- a dataset with **≥1 real item per category (incl. edge-cases)** — F8.
|
|
155
|
+
- the eval suite **runs and emits a scorecard dashboard** — F20.
|
|
156
|
+
- the **engine matches the target** (target-conditional gate) — F9.
|
|
157
|
+
- **Path B works without Claude Code** — F14.
|
|
158
|
+
- **outputs land in a discoverable sink** (`plan.outputSink`).
|
|
159
|
+
|
|
160
|
+
## Boundaries (held from the spine)
|
|
161
|
+
|
|
162
|
+
- **Judge-only, never fix (EV-051)** — flag + route failures to diagnostics.
|
|
163
|
+
- **Reviewer ≠ executor** — never grade a run the evaluator produced.
|
|
164
|
+
- **C-PIN** — pinned judge model + temp 0; masked scorecard byte-identical.
|
|
165
|
+
- **Standalone** — ships its own agents; no host architect/developer dependency.
|
|
166
|
+
- **Relative paths only** — every sink/path resolves relative to the installed
|
|
167
|
+
`.claude/skills/mutagent-evaluator/` layout (a fresh install lives in a
|
|
168
|
+
DIFFERENT repo); NO absolute `/Users/...` paths anywhere.
|
package/mutagent-evaluator/.claude/skills/mutagent-evaluator/references/generate-synthetic-data.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# generate-synthetic-data — bootstrap an eval dataset by dimension-based tuple generation
|
|
2
|
+
|
|
3
|
+
> **Source:** absorbed from `mutagent-system/.memory/features/evals-skills-source/skills/generate-synthetic-data/SKILL.md`.
|
|
4
|
+
> **Loaded by:** `*build-dataset` (EV-046), LLM steps executed by `assets/agents/dataset-builder.md`. Load on demand.
|
|
5
|
+
> **Sibling refs:** `error-analysis.md` (mine the criteria) · `build-review-interface.md` (label the traces) · `validate-evaluator.md` (calibrate the judge).
|
|
6
|
+
|
|
7
|
+
Create diverse, realistic test inputs that cover a subject's FAILURE space — for bootstrapping an
|
|
8
|
+
eval dataset when real traces are sparse, or for stress-testing a specific failure hypothesis. Do
|
|
9
|
+
NOT use when you already have 100+ representative real traces (use `sample-traces.ts` stratified
|
|
10
|
+
sampling instead), or when the task is collecting production logs.
|
|
11
|
+
|
|
12
|
+
## How this maps onto the evaluator (the 3-way Hybrid, EV-046)
|
|
13
|
+
|
|
14
|
+
`*build-dataset` is a **Hybrid** op with three pieces — keep them separated (operation-inventory):
|
|
15
|
+
|
|
16
|
+
| Piece | Type | Who | What |
|
|
17
|
+
|-------|------|-----|------|
|
|
18
|
+
| **Seed interview** (~10 tuples) | HITL gate | `AskUserQuestion` / chat fallback | The user confirms the seed tuples are realistic. The user's domain knowledge is what makes synthetic data trustworthy. |
|
|
19
|
+
| **Tuple gen → NL query → quality filter** | LLM-only | `assets/agents/dataset-builder.md` (host-runtime, NO provider key) | Steps 1·3·4·5 below — the reasoning. Lives in the agent def, NEVER in a script. |
|
|
20
|
+
| **Cartesian expand · dedup · schema · append** | Code-only | `scripts/build-dataset.ts` | The deterministic shape (Step 2 mechanics + Step 5 dedup gate). Holds NO prompt prose. |
|
|
21
|
+
|
|
22
|
+
**Subject-agnostic (EV-002/EV-049):** dimensions + their values come from the subject profile
|
|
23
|
+
(`subjects/<name>/`) + the seed interview, NEVER hard-coded into the engine. The same `*build-dataset`
|
|
24
|
+
runs on any subject.
|
|
25
|
+
|
|
26
|
+
## Core process
|
|
27
|
+
|
|
28
|
+
### Step 1 — Define dimensions (target failures, not arbitrary variation)
|
|
29
|
+
Dimensions are axes of variation specific to the subject. Choose them where failures are EXPECTED
|
|
30
|
+
(known failure-prone areas, existing feedback, hypotheses from traces). Start with **3**; add a
|
|
31
|
+
dimension only when initial traces reveal a failure pattern along a new axis.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Dimension 1: [Name] — [what it captures]
|
|
35
|
+
Values: [value_a, value_b, value_c, …]
|
|
36
|
+
Dimension 2: …
|
|
37
|
+
Dimension 3: …
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Step 2 — Draft ~10–20 seed tuples WITH the user (HITL gate)
|
|
41
|
+
A tuple is one combination of dimension values = one specific test case. Present the seed tuples and
|
|
42
|
+
iterate until the user confirms they reflect realistic scenarios. This is the human-in-the-loop seed
|
|
43
|
+
gate; the user knows which combinations actually occur and which are unrealistic.
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
(Dim1: value, Dim2: value, Dim3: value)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Step 3 — Generate more tuples with the LLM (dataset-builder)
|
|
50
|
+
Prompt for N more `(dim1, dim2, dim3)` combinations for the subject — avoid duplicates, vary values
|
|
51
|
+
across dimensions. **Tuple generation is a SEPARATE step from query generation** (combining them
|
|
52
|
+
produces repetitive phrasing).
|
|
53
|
+
|
|
54
|
+
### Step 4 — Convert each tuple to a natural-language query (dataset-builder)
|
|
55
|
+
A separate prompt per tuple: "given these dimension values, write a realistic query a user might
|
|
56
|
+
enter, reflecting the persona/scenario." Seed it with one hand-written example.
|
|
57
|
+
|
|
58
|
+
### Step 5 — Filter for quality (dataset-builder proposes · build-dataset dedups)
|
|
59
|
+
Discard + regenerate when phrasing is awkward/unrealistic, content doesn't match the tuple's intent,
|
|
60
|
+
or queries are too similar. Optional: rate realism 1–5, discard < 3. The **near-duplicate dedup is
|
|
61
|
+
deterministic** (`build-dataset.ts`); the realism judgment is the agent's.
|
|
62
|
+
|
|
63
|
+
### Step 6 — Run queries through the subject (OUT OF SCOPE here)
|
|
64
|
+
Running the generated queries through the subject pipeline to capture full traces is the SUBJECT's
|
|
65
|
+
harness, not the evaluator's. `*build-dataset` produces the dataset (queries + tuples + provenance);
|
|
66
|
+
the dataset is appended to the living suite via `living-suite.ts` (EV-053). **Target ~100
|
|
67
|
+
high-quality diverse cases** — the rough saturation heuristic.
|
|
68
|
+
|
|
69
|
+
## Sampling real data instead (when you have it)
|
|
70
|
+
Don't sample randomly. Use stratified sampling (`sample-traces.ts`): identify high-variance
|
|
71
|
+
dimensions → assign labels → sample from each group. Use synthetic data only to fill gaps in
|
|
72
|
+
underrepresented query types.
|
|
73
|
+
|
|
74
|
+
## Anti-patterns
|
|
75
|
+
- **Unstructured generation** ("give me test queries") → generic, repetitive, happy-path examples.
|
|
76
|
+
- **Single-step generation** (tuples + queries in one prompt) → less diverse than the two-step split.
|
|
77
|
+
- **Arbitrary dimensions** that don't target failure-prone regions → wasted test budget.
|
|
78
|
+
- **Skipping the user's tuple review** → no way to judge whether LLM tuples are realistic.
|
|
79
|
+
- **Synthetic data when no one can judge realism**, or for complex domain-specific content
|
|
80
|
+
(legal/medical) or low-resource dialects → use real data instead.
|
|
81
|
+
- **Hard-coding a subject's dimensions into a script** — they belong in the subject profile (EV-002).
|