@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,105 @@
|
|
|
1
|
+
# subjects/mutagent-diagnostics/methodology-review.yaml
|
|
2
|
+
# ============================================================================
|
|
3
|
+
# The MR-1..9 rubric for the diagnostics subject (Tab-4 — fitness, not
|
|
4
|
+
# conformance). Conforms to schemas/methodology-review.schema.yaml. The
|
|
5
|
+
# methodology-critic lens reads these items; all are advisory (never gate).
|
|
6
|
+
#
|
|
7
|
+
# MR-7/8/9 are the concrete instances of the generic engine: signal-selection,
|
|
8
|
+
# confidence-derivation, focus-determination — the highest-leverage methodology
|
|
9
|
+
# decisions for diagnostics. For ANY subject the evaluator judges sub-decisions
|
|
10
|
+
# the same way (expected-decision vs observed-decision at each behavior-tree node).
|
|
11
|
+
#
|
|
12
|
+
# NDA: synthetic identifiers only. generatedAt is a fixed sentinel (masked).
|
|
13
|
+
# ============================================================================
|
|
14
|
+
subject: mutagent-diagnostics
|
|
15
|
+
version: v1
|
|
16
|
+
generatedAt: '1970-01-01T00:00:00.000Z'
|
|
17
|
+
|
|
18
|
+
items:
|
|
19
|
+
- id: MR-1
|
|
20
|
+
title: Decision-tree fitness
|
|
21
|
+
reads: behavior-tree.yaml + run outcomes
|
|
22
|
+
how: >-
|
|
23
|
+
Judge reasons over each fork in the methodology (Step 3a scope-pick · 4.5
|
|
24
|
+
library/double-zero · 6 analyzer-count · copy-back) vs what the run
|
|
25
|
+
actually needed; flags dead / rarely-useful / mis-placed forks.
|
|
26
|
+
family: decision-tree-fitness
|
|
27
|
+
advisory: true
|
|
28
|
+
|
|
29
|
+
- id: MR-2
|
|
30
|
+
title: Data-flow efficiency
|
|
31
|
+
reads: normalize -> tier0 -> slice -> sample -> enrich -> render trace
|
|
32
|
+
how: >-
|
|
33
|
+
Scans the data pipeline for duplicated/recomputed transforms, stages that
|
|
34
|
+
could collapse or parallelize, artifacts produced-and-never-consumed.
|
|
35
|
+
family: data-flow-efficiency
|
|
36
|
+
advisory: true
|
|
37
|
+
|
|
38
|
+
- id: MR-3
|
|
39
|
+
title: Methodology fitness GIVEN the findings
|
|
40
|
+
reads: run trajectory + findings
|
|
41
|
+
how: >-
|
|
42
|
+
Was the deep-read tier / analyzer count / sampling over- or under-scaled
|
|
43
|
+
for what the findings turned out to be? Over-investigation = cost; under =
|
|
44
|
+
missed signal.
|
|
45
|
+
family: methodology-fitness
|
|
46
|
+
advisory: true
|
|
47
|
+
|
|
48
|
+
- id: MR-4
|
|
49
|
+
title: Sequence soundness
|
|
50
|
+
reads: transcript trajectory
|
|
51
|
+
how: >-
|
|
52
|
+
Reactive one-at-a-time crash patching, re-dispatch loops, redo-after-
|
|
53
|
+
failure = methodology smells that say the order/contract is wrong, not
|
|
54
|
+
just the code.
|
|
55
|
+
family: sequence-soundness
|
|
56
|
+
advisory: true
|
|
57
|
+
|
|
58
|
+
- id: MR-5
|
|
59
|
+
title: Process self-feedback
|
|
60
|
+
reads: all of the above
|
|
61
|
+
how: >-
|
|
62
|
+
Concrete, impact-ranked recommendations to restructure the methodology
|
|
63
|
+
itself (collapse a stage, drop a fork, re-order, pin a choice) — advisory.
|
|
64
|
+
family: process-self-feedback
|
|
65
|
+
advisory: true
|
|
66
|
+
|
|
67
|
+
- id: MR-6
|
|
68
|
+
title: Followed != Right
|
|
69
|
+
reads: matrix (Tab-1) vs this (Tab-4)
|
|
70
|
+
how: >-
|
|
71
|
+
A methodology can score 100% conformance (Tab-1) and still be the wrong/
|
|
72
|
+
inefficient choice; this family answers the second question independently.
|
|
73
|
+
family: conformance-vs-fitness
|
|
74
|
+
advisory: true
|
|
75
|
+
|
|
76
|
+
- id: MR-7
|
|
77
|
+
title: Signal / failure-mode SELECTION
|
|
78
|
+
reads: tier0 -> awareness -> deep-read -> reconcile chain
|
|
79
|
+
how: >-
|
|
80
|
+
Judge whether the primary signal was grounded in the RIGHT tier of
|
|
81
|
+
evidence (mechanical {loop·latency·cost} vs deep-read-evidenced failure-
|
|
82
|
+
WHAT) — not a frequency artifact or an unsupported pick. Highest-leverage
|
|
83
|
+
methodology decision: it steers everything downstream.
|
|
84
|
+
family: signal-selection
|
|
85
|
+
advisory: true
|
|
86
|
+
|
|
87
|
+
- id: MR-8
|
|
88
|
+
title: CONFIDENCE derivation
|
|
89
|
+
reads: coverageConfidence + primarySignal.confidence vs the deep-read sample
|
|
90
|
+
how: >-
|
|
91
|
+
Judge whether the confidence actually FOLLOWS from the LLM-trace evidence +
|
|
92
|
+
sample representativeness — catches 'high confidence on a 1/1/1/137
|
|
93
|
+
imbalanced sample': a number asserted, not earned.
|
|
94
|
+
family: confidence-derivation
|
|
95
|
+
advisory: true
|
|
96
|
+
|
|
97
|
+
- id: MR-9
|
|
98
|
+
title: FOCUS determination -> search-shaping
|
|
99
|
+
reads: scope/focus decision + which traces were then examined
|
|
100
|
+
how: >-
|
|
101
|
+
Because focus CHANGES the search, a wrong/early focus mis-steers every
|
|
102
|
+
downstream trace selection. Expected-focus vs observed-focus given the
|
|
103
|
+
brief + tier-0 signals.
|
|
104
|
+
family: focus-determination
|
|
105
|
+
advisory: true
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* workflows/audit.workflow.js → the 4-tab master-audit harness (Mode A)
|
|
3
|
+
* ----------------------------------------------------------------------------
|
|
4
|
+
* The harness COMPOSES the workflows the evaluator already ships — it does not
|
|
5
|
+
* rebuild what exists. It:
|
|
6
|
+
* 1. runs the DETERMINISTIC spine (scripts/cli/audit-run.ts) to produce the
|
|
7
|
+
* Tab-1 deterministic rows + the two-track scorecard + the base report;
|
|
8
|
+
* 2. dispatches the PINNED JUDGE over the Tab-1 judge rows (decision / data /
|
|
9
|
+
* trajectory lenses) against the subject behavior-tree;
|
|
10
|
+
* 3. composes Tab-2 via data-leak.workflow.js (self-contained);
|
|
11
|
+
* 4. composes Tab-3 via variance.workflow.js (self-contained);
|
|
12
|
+
* 5. composes Tab-4 via the methodology-critic lens;
|
|
13
|
+
* 6. stamps the final 4-tab HTML from the EVALUATOR's own brand asset.
|
|
14
|
+
*
|
|
15
|
+
* GENERIC: every subject-specific input is supplied via args (subject · runId ·
|
|
16
|
+
* bundleDir). Defaults are SYNTHETIC. NO production dataset is named.
|
|
17
|
+
*
|
|
18
|
+
* JUDGE-EXECUTION SEAM: the `agent()` calls dispatch the pinned judge. The
|
|
19
|
+
* deterministic spine (step 1) is fully wired and runnable standalone via
|
|
20
|
+
* `audit-run.ts`; the judge tabs are the documented seams. Run via the workflow
|
|
21
|
+
* harness, NOT standalone node.
|
|
22
|
+
*/
|
|
23
|
+
export const meta = {
|
|
24
|
+
name: 'evaluator-audit',
|
|
25
|
+
description: 'Compose the 4-tab master-audit (eval-matrix · data-leak · variance · methodology) from a subject profile + run-bundle',
|
|
26
|
+
phases: [
|
|
27
|
+
{ title: 'Deterministic spine', detail: 'audit-run.ts → Tab-1 deterministic rows + two-track scorecard' },
|
|
28
|
+
{ title: 'Judge rows', detail: 'pinned judge over Tab-1 trace-cross-ref / trajectory-diff rows' },
|
|
29
|
+
{ title: 'Compose tabs', detail: 'data-leak (Tab-2) · variance (Tab-3) · methodology (Tab-4)' },
|
|
30
|
+
{ title: 'Render', detail: 'stamp the 4-tab HTML from the evaluator brand' },
|
|
31
|
+
],
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let A = args
|
|
35
|
+
if (typeof A === 'string') { try { A = JSON.parse(A) } catch (e) { A = {} } }
|
|
36
|
+
A = A || {}
|
|
37
|
+
|
|
38
|
+
const SUBJECT = A.subject || 'sample-agent'
|
|
39
|
+
const RUN_ID = A.runId || '<run-id>'
|
|
40
|
+
const BUNDLE_DIR = A.bundleDir || '<run-bundle-dir>'
|
|
41
|
+
const PKG = A.pkgRoot || '.' // the evaluator package root
|
|
42
|
+
const GEN = A.generatedAt || '1970-01-01T00:00:00.000Z'
|
|
43
|
+
const STYLEREF = `${PKG}/assets/brand/theme.css`
|
|
44
|
+
|
|
45
|
+
// ── Phase 1 — deterministic spine (fully wired script) ──────────────────────
|
|
46
|
+
phase('Deterministic spine')
|
|
47
|
+
const spine = await agent(
|
|
48
|
+
`Run the DETERMINISTIC spine for the master audit. Use Bash:\n` +
|
|
49
|
+
` bash ${PKG}/scripts/cli/run.sh ${PKG}/scripts/cli/audit-run.ts ${RUN_ID} --subject ${SUBJECT} --bundle-dir ${BUNDLE_DIR} --subjects-root ${PKG}/subjects --generated-at ${GEN}\n` +
|
|
50
|
+
`This writes the master-audit under the unified evaluator reports root: .mutagent/evaluator/reports/<runId>/master-audit.html + master-audit.scorecard.json (two-track GATE+TREND). Return the parsed JSON the script prints (subject, runId, criteria, deterministicRows, judgeRows, gateRunPass, scorecard, report).`,
|
|
51
|
+
{ label: 'spine:audit-run', phase: 'Deterministic spine' },
|
|
52
|
+
)
|
|
53
|
+
log(`spine: ${spine && spine.criteria} criteria, ${spine && spine.deterministicRows} deterministic + ${spine && spine.judgeRows} judge rows; gateRunPass=${spine && spine.gateRunPass}`)
|
|
54
|
+
|
|
55
|
+
// ── Phase 2 — pinned judge over the Tab-1 judge rows ────────────────────────
|
|
56
|
+
phase('Judge rows')
|
|
57
|
+
const judge = await agent(
|
|
58
|
+
`PINNED JUDGE (model id + temperature=0, recorded; mask output). Read ${PKG}/subjects/${SUBJECT}/behavior-tree.yaml and the run-bundle at ${BUNDLE_DIR}. For each Tab-1 judge row (checkMethod trace-cross-ref or trajectory-diff in ${PKG}/subjects/${SUBJECT}/eval-matrix.yaml), apply the matching lens:\n` +
|
|
59
|
+
` - decision rows → ${PKG}/lenses/decision-lens.md\n` +
|
|
60
|
+
` - data rows → ${PKG}/lenses/data-lens.md\n` +
|
|
61
|
+
` - trajectory rows → ${PKG}/lenses/trajectory-lens.md\n` +
|
|
62
|
+
`Compare expected-decision vs observed-decision at each behavior-tree node. Emit one masked verdict per row (pass/fail + evidence + rationale). NEVER fabricate — an unobservable decision is a fail, not a pass.`,
|
|
63
|
+
{ label: 'judge:tab1', phase: 'Judge rows' },
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
// ── Phase 3 — compose Tab-2, Tab-3, Tab-4 ──────────────────────────────────
|
|
67
|
+
phase('Compose tabs')
|
|
68
|
+
const tab2 = await workflow({ scriptPath: `${PKG}/workflows/data-leak.workflow.js`, args: { subjectRoot: A.subjectRoot, bundleDirs: [BUNDLE_DIR], outDir: `${BUNDLE_DIR}/audit`, styleRef: STYLEREF, generatedAt: GEN } })
|
|
69
|
+
const tab3 = await workflow({ scriptPath: `${PKG}/workflows/variance.workflow.js`, args: { subjectPath: A.subjectRoot, label: RUN_ID, mode: A.varianceMode || 'full' } })
|
|
70
|
+
const tab4 = await agent(
|
|
71
|
+
`Tab-4 methodology critic (ADVISORY, not pass/fail; pinned + masked). Run ${PKG}/lenses/methodology-critic-lens.md over: ${PKG}/subjects/${SUBJECT}/behavior-tree.yaml + ${PKG}/subjects/${SUBJECT}/methodology-review.yaml + the run trajectory at ${BUNDLE_DIR}. Emit ranked process self-feedback (MR-1..9). Write the Tab-4 HTML fragment to ${BUNDLE_DIR}/audit/tab4-methodology.html using the evaluator brand (${STYLEREF}). Return { written, mrFindings }.`,
|
|
72
|
+
{ label: 'compose:tab4', phase: 'Compose tabs' },
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
// ── Phase 4 — final render (inline the tab fragments into the base report) ──
|
|
76
|
+
phase('Render')
|
|
77
|
+
const render = await agent(
|
|
78
|
+
`Stamp the FINAL 4-tab master-audit HTML. Use Bash to read the base report at ${spine && spine.report}, inline the three composed fragments (${BUNDLE_DIR}/audit/tab2-data-leak.html, the Tab-3 fragment from the variance workflow, ${BUNDLE_DIR}/audit/tab4-methodology.html) into panels t2/t3/t4, and overwrite ${spine && spine.report}. The brand (dark theme + MUTAGENT wordmark) comes from ${PKG}/assets/brand/theme.css — already embedded by the base renderer. Verify: 4 tab buttons, every panel non-empty, NO client identity in the output. Return { report, tabs: 4, ok }.`,
|
|
79
|
+
{ label: 'render:final', phase: 'Render' },
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
return { subject: SUBJECT, runId: RUN_ID, spine, judge, tab2, tab3, tab4, render }
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* workflows/data-leak.workflow.js → Tab-2 (Data-Leak)
|
|
3
|
+
* ----------------------------------------------------------------------------
|
|
4
|
+
* SELF-CONTAINED port of the mdiag-master-audit workflow (taken IN, not
|
|
5
|
+
* referenced). Audits a run-bundle for OPERATIONAL / CONTRACT-BOUNDARY +
|
|
6
|
+
* UI/render + DATA-CORRECTNESS leaks — data a component produces that the next
|
|
7
|
+
* component's contract drops, OR a renderer slot with no producer.
|
|
8
|
+
*
|
|
9
|
+
* GENERIC + subject-agnostic: every subject-specific path is supplied via args
|
|
10
|
+
* (subjectRoot · bundleDirs · styleRef). Defaults are SYNTHETIC (sample-agent /
|
|
11
|
+
* sample-email-agent / sample-tenant) — NO production dataset is named (design
|
|
12
|
+
* decision #10). The original client identities (and any /Users home paths) have
|
|
13
|
+
* been scrubbed.
|
|
14
|
+
*
|
|
15
|
+
* JUDGE-EXECUTION SEAM: the `agent(...)` / `parallel(...)` / `phase(...)` calls
|
|
16
|
+
* are the workflow-harness DSL (Workflow({scriptPath})). They dispatch the
|
|
17
|
+
* pinned judge. This file is the deterministic harness around those seams; the
|
|
18
|
+
* judge does the reading. Run via the workflow harness, NOT standalone node.
|
|
19
|
+
*/
|
|
20
|
+
export const meta = {
|
|
21
|
+
name: 'evaluator-data-leak',
|
|
22
|
+
description:
|
|
23
|
+
'Self-contained data-leak audit of a run-bundle + agent context-flow (operational/contract-boundary · UI/render · data-correctness+signal-selection · context-flow EV-028/029) → Tab-2 graph',
|
|
24
|
+
phases: [
|
|
25
|
+
{ title: 'Audit dimensions', detail: 'parallel: operational/contract-boundary · UI/render · data-correctness+signal-selection · context-flow (EV-028/029)' },
|
|
26
|
+
{ title: 'Synthesize', detail: 'merge leaks → master list + Tab-2 HTML fragment' },
|
|
27
|
+
],
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ── Params: synthetic defaults, overridable via args ──────────────────────────
|
|
31
|
+
let A = args
|
|
32
|
+
if (typeof A === 'string') { try { A = JSON.parse(A) } catch (e) { A = {} } }
|
|
33
|
+
A = A || {}
|
|
34
|
+
|
|
35
|
+
// SUBJECT root + the run-bundle(s) under audit — supplied by the harness. The
|
|
36
|
+
// defaults are SYNTHETIC placeholders, never a real client path.
|
|
37
|
+
const SUBJECT = A.subjectRoot || '<subject-skill-root>'
|
|
38
|
+
const REPORTS = A.bundleDirs || ['<run-bundle-dir>']
|
|
39
|
+
const OUT = A.outDir || '<audit-out-dir>'
|
|
40
|
+
const STYLEREF = A.styleRef || '<brand-style-ref>' // evaluator's own assets/brand/theme.css
|
|
41
|
+
const GEN = A.generatedAt || '1970-01-01T00:00:00Z' // injected; masked for byte-identity
|
|
42
|
+
|
|
43
|
+
// ── Agent context-flow inputs (EV-028/029) — SUBJECT-AGNOSTIC, supplied ──────
|
|
44
|
+
// The deterministic flow-graph(s) (EV-032) + expected-flow (EV-037) the
|
|
45
|
+
// context-flow dimension reasons over. `contextFlowCandidates` is the
|
|
46
|
+
// deterministic PREP bundle (scripts/flow-graph.ts: unthreaded outputs = EV-028
|
|
47
|
+
// candidates · lossy handoffs = EV-029 candidates) the judge ADJUDICATES. All
|
|
48
|
+
// names come from these structures — NEVER a subject constant in the prompt.
|
|
49
|
+
const FLOWGRAPHS = A.flowGraphs || [] // EV-032 graphs for the audited traces
|
|
50
|
+
const EXPECTEDFLOW = A.expectedFlow || { dispatchToolNames: [], edges: [], expectedUiSlots: [] }
|
|
51
|
+
const CFCANDIDATES = A.contextFlowCandidates || [] // per-trace contextFlowCandidates output
|
|
52
|
+
const CFLENS = A.contextFlowLens || '<context-flow-lens-ref>' // lenses/context-flow-lens.md
|
|
53
|
+
// Profile-supplied expected-UI-slot list (EV-039/040) — de-hardcodes the
|
|
54
|
+
// diagnostics-specific renderer slots into a subject-agnostic list.
|
|
55
|
+
const UISLOTS = (EXPECTEDFLOW.expectedUiSlots && EXPECTEDFLOW.expectedUiSlots.length)
|
|
56
|
+
? EXPECTEDFLOW.expectedUiSlots
|
|
57
|
+
: (A.expectedUiSlots || [])
|
|
58
|
+
// Deterministic EV-039 audit (scripts/ui-slots.ts auditUiSlots) per bundle:
|
|
59
|
+
// { computedNotRendered, orphanSlots, findings } — the HTML-artifact missing-data
|
|
60
|
+
// case made first-class. The judge ADJUDICATES these + the EV-040 faithfulness.
|
|
61
|
+
const UISLOTAUDIT = A.uiSlotAudit || []
|
|
62
|
+
|
|
63
|
+
const LEAK_SCHEMA = {
|
|
64
|
+
type: 'object',
|
|
65
|
+
additionalProperties: false,
|
|
66
|
+
properties: {
|
|
67
|
+
dimension: { type: 'string' },
|
|
68
|
+
summary: { type: 'string' },
|
|
69
|
+
leaks: {
|
|
70
|
+
type: 'array',
|
|
71
|
+
items: {
|
|
72
|
+
type: 'object',
|
|
73
|
+
additionalProperties: false,
|
|
74
|
+
properties: {
|
|
75
|
+
id: { type: 'string', description: 'short id e.g. OP-1 / UI-2 / DC-3' },
|
|
76
|
+
title: { type: 'string' },
|
|
77
|
+
locus: { type: 'string', enum: ['C2C', 'UI'], description: 'C2C=lost between components; UI=produced but not drawn' },
|
|
78
|
+
cls: { type: 'string', enum: ['A', 'B'], description: 'A=contract too narrow; B=producer not run/threaded' },
|
|
79
|
+
producer: { type: 'string', description: 'the component/script that should emit it' },
|
|
80
|
+
whyNotProduced: { type: 'string' },
|
|
81
|
+
formalStructure: { type: 'string', enum: ['none', 'partial', 'exists'], description: 'is a schema/contract defined for this handoff?' },
|
|
82
|
+
severity: { type: 'string', enum: ['HIGH', 'MED', 'LOW'] },
|
|
83
|
+
whatsLost: { type: 'string' },
|
|
84
|
+
evidence: { type: 'string', description: 'file:line or command output proving it' },
|
|
85
|
+
},
|
|
86
|
+
required: ['id', 'title', 'locus', 'cls', 'producer', 'whyNotProduced', 'formalStructure', 'severity', 'whatsLost', 'evidence'],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
required: ['dimension', 'summary', 'leaks'],
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
phase('Audit dimensions')
|
|
94
|
+
|
|
95
|
+
const REPLIST = REPORTS.join(' , ')
|
|
96
|
+
|
|
97
|
+
// The three audit dimensions. Prompts are GENERIC: they reference the SUBJECT
|
|
98
|
+
// root + the run-bundle(s) supplied in args, and name only the canonical
|
|
99
|
+
// pipeline stages (normalize → tier0 → slice → sample → enrich → render) and the
|
|
100
|
+
// well-known artifact shapes — never a client-specific path or dataset.
|
|
101
|
+
const DIMS = [
|
|
102
|
+
{
|
|
103
|
+
key: 'operational',
|
|
104
|
+
prompt: `You are auditing the SUBJECT skill (root: ${SUBJECT}) for OPERATIONAL / CONTRACT-BOUNDARY data leaks — data a component produces that the next component's contract drops, OR a renderer slot with no producer. READ-ONLY (grep/read; never edit).
|
|
105
|
+
|
|
106
|
+
Run these concrete checks and emit ONE leak per real finding (ground each in an actual grep/read — no speculation). SUBJECT-AGNOSTIC: where a check names slots, use the PROFILE-SUPPLIED expected-UI-slot list below, NOT any hardcoded name. Checks 2-6 apply when the SUBJECT is a data-pipeline (skip the ones that don't map to this subject's shape).
|
|
107
|
+
|
|
108
|
+
EXPECTED-UI-SLOTS (EV-037, profile-supplied):
|
|
109
|
+
${JSON.stringify(UISLOTS, null, 2)}
|
|
110
|
+
|
|
111
|
+
1. For EACH expected-UI-slot the renderer dereferences, grep the orchestrator protocol + scripts for a step that PRODUCES/threads it. If none → leak (cls B, locus UI, formalStructure exists).
|
|
112
|
+
2. Read the Finding/Remedy/Assumption interfaces — are required fields (rationale/whyWorks/applyTarget/applyInstructions/assumptions) OPTIONAL? If yes → leak (cls A, formalStructure partial).
|
|
113
|
+
3. Is there a findings-contract / required-field validator? If absent → leak (cls B, formalStructure none — the enabler).
|
|
114
|
+
4. grep the enricher for the fail-loud threshold ('missing.length >= N'). If N>=3 → single-section silent-drop leak (cite the line).
|
|
115
|
+
5. grep the platform normalizer for an 'import.meta.main' CLI entrypoint. If absent → the extractor has no CLI transport → leak.
|
|
116
|
+
6. Read the signal-census builder — does it rank candidate signals by frequency only (severity unused)? If yes → signal-selection leak.
|
|
117
|
+
|
|
118
|
+
Return the LEAK_SCHEMA object with dimension="operational".`,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
key: 'ui-render',
|
|
122
|
+
prompt: `You are auditing the GENERATED HTML artifact(s) in the run-bundle(s) for UI/render data-leaks — the operator's FIRST-CLASS "HTML-artifact missing-data" case: a value the agent COMPUTED that is ABSENT from the HTML it produced is a missing-data leak. Bundle dirs: ${REPLIST}. READ-ONLY. SUBJECT-AGNOSTIC — the slots to check come from the PROFILE-SUPPLIED expected-UI-slot list, NOT any hardcoded slot name.
|
|
123
|
+
|
|
124
|
+
EXPECTED-UI-SLOTS (EV-037, profile-supplied — the slots the subject's HTML SHOULD render):
|
|
125
|
+
${JSON.stringify(UISLOTS, null, 2)}
|
|
126
|
+
|
|
127
|
+
DETERMINISTIC EV-039 AUDIT (scripts/ui-slots.ts auditUiSlots, per bundle — { computedNotRendered, orphanSlots, findings }). ADJUDICATE these (they are CANDIDATES; confirm + severity):
|
|
128
|
+
${JSON.stringify(UISLOTAUDIT, null, 2)}
|
|
129
|
+
|
|
130
|
+
Checks (ground EACH in a read of the artifact — emit one leak per real finding):
|
|
131
|
+
1. computed-but-not-rendered (EV-039): for each slot in computedNotRendered (and any expected-UI-slot you can confirm was computed in the trace/runMeta/intermediate output yet does NOT appear in the HTML) → leak (locus UI, cls B, formalStructure=exists). This is the operator's exact case.
|
|
132
|
+
2. orphan slot (EV-039): for each slot in orphanSlots (the HTML references the slot but NO producer computed it) → drawn-but-empty leak (locus UI).
|
|
133
|
+
3. render defect: grep each report HTML for an inline-JS split-regex with a raw CR byte inside the literal — that SyntaxError kills the copy/clipboard export → leak (HIGH).
|
|
134
|
+
HTML-ONLY PATH (first-class, no longer a mere fallback): if a <dir> has the published HTML but NO intermediate render-input file, audit the RENDERED values directly — read the HTML's drawn values for each expected-UI-slot. Note in evidence that you audited the published HTML.
|
|
135
|
+
|
|
136
|
+
Return LEAK_SCHEMA with dimension="ui-render".`,
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
key: 'data-correctness',
|
|
140
|
+
prompt: `You are auditing DATA-CORRECTNESS — rendered-value FAITHFULNESS (EV-040): for ANY subject's HTML artifact, is a value present in BOTH the computed data AND the rendered HTML the SAME value, or was it ALTERED / TRUNCATED / re-derived in the UI? Primary bundle dir: ${REPORTS[0]}. READ-ONLY. SUBJECT-AGNOSTIC — spot-check the PROFILE-SUPPLIED expected-UI-slots, NOT hardcoded slot names.
|
|
141
|
+
|
|
142
|
+
EXPECTED-UI-SLOTS (EV-037, profile-supplied):
|
|
143
|
+
${JSON.stringify(UISLOTS, null, 2)}
|
|
144
|
+
|
|
145
|
+
DETERMINISTIC EV-039 AUDIT (auditUiSlots — `faithful` findings already mean computed==rendered verbatim; focus your judgment on the NUANCED EV-040 cases the deterministic check can't settle — truncation, rounding, unit-swap, re-derivation):
|
|
146
|
+
${JSON.stringify(UISLOTAUDIT, null, 2)}
|
|
147
|
+
|
|
148
|
+
Checks (ground EACH in a read of the computed source + the rendered artifact):
|
|
149
|
+
1. Faithfulness (EV-040): for each expected-UI-slot present in BOTH the computed data (trace/runMeta/intermediate) AND the HTML, compare the two values VERBATIM. Identical → note faithful (NO leak). Altered / truncated / rounded / re-derived ad hoc instead of threaded from the script-of-record → leak (locus UI).
|
|
150
|
+
2. Scope-skew: if a rendered aggregate (a count/rate/average) is computed over a small worst-N slice but presented as whole-population → scope-skew leak (cite the slice size vs the population).
|
|
151
|
+
3. Silent drop: a computed value that is null/absent in the HTML while the rest of the artifact implies it should be present → entity/section silent-drop leak.
|
|
152
|
+
HTML-ONLY PATH (first-class): if no intermediate computed file exists, audit faithfulness from the published HTML + any run stamps directly; note you audited the rendered values.
|
|
153
|
+
|
|
154
|
+
Return LEAK_SCHEMA with dimension="data-correctness".`,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
key: 'context-flow',
|
|
158
|
+
prompt: `You are auditing the SUBJECT agent's CONTEXT-FLOW (EV-028 tool-result threading + EV-029 sub-agent handoff completeness). Score over the DETERMINISTIC flow-graph (EV-032) + expected-flow (EV-037) supplied below — NOT a raw trace. Follow the context-flow lens at ${CFLENS} (read it). READ-ONLY. SUBJECT-AGNOSTIC: every tool/slot name comes from these structures — invent none.
|
|
159
|
+
|
|
160
|
+
The flow-graph generalizes the v1 data-pipeline leak SHAPE to an AGENT: an unthreaded tool result is the agent analogue of a runMeta slot a renderer dereferences with no producer; a lossy sub-agent handoff is the analogue of a contract field dropped at a component boundary.
|
|
161
|
+
|
|
162
|
+
Adjudicate the CANDIDATES (these are candidates — decide which are TRUE leaks + severity; a fully-threaded, expectation-meeting graph yields ZERO leaks):
|
|
163
|
+
1. EV-028 — for each candidate in contextFlowCandidates[].unthreadedOutputs {node,name,slot}: was the dropped producer slot one a later step NEEDED (and silently re-derived / proceeded without)? → leak (locus C2C, cls B). A legitimate side-effect/log with no consumer → NOT a leak.
|
|
164
|
+
2. EV-029 — for each contextFlowCandidates[].lossyHandoffs {fromTool,toTool,slot?}: confirm the expected producer→consumer threading is genuinely absent in flowGraph.edges (not merely renamed). An incomplete dispatch brief that handed a child stale/missing context → leak (locus C2C, cls B). Cite the dispatch node + missing slot.
|
|
165
|
+
Severity HIGH when the dropped/incomplete context changed the agent's action; ground EVERY leak in flow-graph node ids + slot names (evidence field).
|
|
166
|
+
|
|
167
|
+
EXPECTED-FLOW (EV-037):
|
|
168
|
+
${JSON.stringify(EXPECTEDFLOW, null, 2)}
|
|
169
|
+
|
|
170
|
+
FLOW-GRAPHS (EV-032, one per audited trace):
|
|
171
|
+
${JSON.stringify(FLOWGRAPHS, null, 2)}
|
|
172
|
+
|
|
173
|
+
DETERMINISTIC CANDIDATES (per trace):
|
|
174
|
+
${JSON.stringify(CFCANDIDATES, null, 2)}
|
|
175
|
+
|
|
176
|
+
Return LEAK_SCHEMA with dimension="context-flow".`,
|
|
177
|
+
},
|
|
178
|
+
]
|
|
179
|
+
|
|
180
|
+
const dimResultsRaw = await parallel(
|
|
181
|
+
DIMS.map((d) => () => agent(d.prompt, { label: `audit:${d.key}`, phase: 'Audit dimensions', schema: LEAK_SCHEMA })),
|
|
182
|
+
)
|
|
183
|
+
const dimResults = (dimResultsRaw || []).filter(Boolean)
|
|
184
|
+
|
|
185
|
+
const allLeaks = dimResults.flatMap((r) => (r.leaks || []).map((l) => ({ ...l, dimension: r.dimension })))
|
|
186
|
+
log(`collected ${allLeaks.length} leaks across ${dimResults.length} dimensions`)
|
|
187
|
+
|
|
188
|
+
// ── Metrics (deterministic — human-level observability) ──
|
|
189
|
+
const tally = (key) => allLeaks.reduce((m, l) => ((m[l[key]] = (m[l[key]] || 0) + 1), m), {})
|
|
190
|
+
const metrics = {
|
|
191
|
+
totalLeaks: allLeaks.length,
|
|
192
|
+
dimensions: dimResults.length,
|
|
193
|
+
bySeverity: tally('severity'),
|
|
194
|
+
byLocus: tally('locus'),
|
|
195
|
+
byClass: tally('cls'),
|
|
196
|
+
byFormalStructure: tally('formalStructure'),
|
|
197
|
+
byDimension: tally('dimension'),
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
phase('Synthesize')
|
|
201
|
+
|
|
202
|
+
const merged = JSON.stringify({ generatedAt: GEN, dimensions: dimResults.map((r) => ({ dimension: r.dimension, summary: r.summary })), leaks: allLeaks }, null, 2)
|
|
203
|
+
const metricsJson = JSON.stringify(metrics, null, 2)
|
|
204
|
+
|
|
205
|
+
// The synthesizer renders the Tab-2 fragment using the EVALUATOR's own brand
|
|
206
|
+
// (assets/brand/theme.css — supplied as STYLEREF). NDA: NO client name in the
|
|
207
|
+
// rendered output. The fragment is a <section> the audit.workflow.js inlines.
|
|
208
|
+
const synth = await agent(
|
|
209
|
+
`Render the Tab-2 (Data-Leak) HTML fragment for the master-audit report. Use the EVALUATOR brand stylesheet at ${STYLEREF} (dark theme + MUTAGENT tokens) — do NOT invent new styling. NO client identity in the output (synthetic names only).
|
|
210
|
+
|
|
211
|
+
WRITE the fragment to ${OUT}/tab2-data-leak.html. It MUST contain, populated from THIS run's data:
|
|
212
|
+
1. A section header "Data-Leak Graph" + a one-line verdict on the headline leaks.
|
|
213
|
+
2. A METRICS row of stat tiles (.big-stat) using the EXACT numbers from the metrics JSON (total leaks, HIGH/MED/LOW, C2C/UI, by dimension).
|
|
214
|
+
3. A bird's-eye PIPELINE SPINE (raw → normalize → tier0 → slicer → wave6 → analyzer → aggregate → validator → enrich → render) with each leak as a RED-DASHED leaf off its producing stage.
|
|
215
|
+
4. The master leak table — columns: ID · Dimension · Locus(C2C/UI) · Producer · Why not produced · Formal structure · What's lost · Sev. One row per leak.
|
|
216
|
+
5. A per-dimension detail subsection — ONE subsection per dimension actually present in the merged leak JSON (operational · ui-render · data-correctness · context-flow · any others) — listing each leak with file:line (or flow-graph node:slot) evidence + proposed fix.
|
|
217
|
+
|
|
218
|
+
METRICS JSON (use exact numbers):
|
|
219
|
+
${metricsJson}
|
|
220
|
+
|
|
221
|
+
MERGED LEAK JSON:
|
|
222
|
+
${merged}
|
|
223
|
+
|
|
224
|
+
Return JSON: { written, leakCount, sections }.`,
|
|
225
|
+
{
|
|
226
|
+
label: 'synthesize:tab2',
|
|
227
|
+
phase: 'Synthesize',
|
|
228
|
+
schema: {
|
|
229
|
+
type: 'object', additionalProperties: false,
|
|
230
|
+
properties: { written: { type: 'string' }, leakCount: { type: 'number' }, sections: { type: 'number' } },
|
|
231
|
+
required: ['written', 'leakCount', 'sections'],
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
return { dimensions: dimResults.length, totalLeaks: allLeaks.length, metrics, synth }
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* workflows/variance.workflow.js → Tab-3 (Variance Trend)
|
|
3
|
+
* ----------------------------------------------------------------------------
|
|
4
|
+
* SELF-CONTAINED port of the variance-deviance-audit workflow (taken IN, not
|
|
5
|
+
* referenced). Audits the SUBJECT for inter-run variance, MECE across
|
|
6
|
+
* SKILL / AGENT / COMMAND scopes, and produces the 15-dim determinism trend.
|
|
7
|
+
*
|
|
8
|
+
* GENERIC + subject-agnostic: the subject path + prior-report are supplied via
|
|
9
|
+
* args. Defaults are SYNTHETIC placeholders — NO production dataset / client is
|
|
10
|
+
* named (design decision #10). The original hardcoded /Users home path + client
|
|
11
|
+
* priors have been scrubbed to synthetic equivalents.
|
|
12
|
+
*
|
|
13
|
+
* COORDINATOR ROLE (executor ≠ reviewer): this workflow is run by the variance
|
|
14
|
+
* coordinator, a role distinct from the audit executors. It obeys C-PIN (the
|
|
15
|
+
* judge is pinned) and the byte-identity masking contract.
|
|
16
|
+
*
|
|
17
|
+
* JUDGE-EXECUTION SEAM: `agent()` / `parallel()` / `phase()` are the workflow-
|
|
18
|
+
* harness DSL; they dispatch the pinned judge. The DETERMINISTIC 15-dim diff
|
|
19
|
+
* itself is also available fully-wired as scripts/variance-compare.ts — this
|
|
20
|
+
* workflow adds the MECE defect catalog + adversarial critique on top. Run via
|
|
21
|
+
* the workflow harness, NOT standalone node.
|
|
22
|
+
*/
|
|
23
|
+
export const meta = {
|
|
24
|
+
name: 'evaluator-variance',
|
|
25
|
+
description:
|
|
26
|
+
'Reproducible variance audit — MECE SKILL/AGENT/COMMAND defect catalog + 15-dim determinism trend → Tab-3',
|
|
27
|
+
phases: [
|
|
28
|
+
{ title: 'Resolve', detail: 'resolve live subject path + prior artifacts at run time' },
|
|
29
|
+
{ title: 'Catalog', detail: 'parallel defect catalog per scope vs LIVE source' },
|
|
30
|
+
{ title: 'Reconcile', detail: 'MECE dedupe + cross-scope root-cause matrix' },
|
|
31
|
+
{ title: 'Critique', detail: 'adversarial completeness — missing variance sources' },
|
|
32
|
+
{ title: 'Synthesize', detail: 'assemble + render the Tab-3 fragment (15-dim trend)' },
|
|
33
|
+
],
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
let cfg = {}
|
|
37
|
+
if (args && typeof args === 'object') cfg = args
|
|
38
|
+
else if (typeof args === 'string' && args.trim()) { try { cfg = JSON.parse(args) } catch (e) { cfg = {} } }
|
|
39
|
+
const MODE = cfg.mode === 'validate' ? 'validate' : 'full'
|
|
40
|
+
const LABEL = cfg.label || 'ondemand'
|
|
41
|
+
|
|
42
|
+
// ── Phase 0 — Resolve live targets (robust to worktree drift) ───────────────
|
|
43
|
+
phase('Resolve')
|
|
44
|
+
const RESOLVE_SCHEMA = {
|
|
45
|
+
type: 'object', additionalProperties: false,
|
|
46
|
+
required: ['subjectPath', 'subjectPathOk', 'gitCommit', 'priorReportPath', 'priorReportOk', 'reproducible', 'notes'],
|
|
47
|
+
properties: {
|
|
48
|
+
subjectPath: { type: 'string' }, subjectPathOk: { type: 'boolean' },
|
|
49
|
+
gitCommit: { type: 'string' },
|
|
50
|
+
priorReportPath: { type: 'string' }, priorReportOk: { type: 'boolean' },
|
|
51
|
+
reproducible: { type: 'boolean' }, notes: { type: 'string' },
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
const resolved = await agent(
|
|
55
|
+
`Resolve the LIVE audit targets for the SUBJECT variance audit. Use Bash.\n` +
|
|
56
|
+
`1) subjectPath: ${cfg.subjectPath ? `use "${cfg.subjectPath}"` : 'resolve the subject skill/agent root supplied by the harness'}. Confirm its orchestrator-protocol + a platform normalizer exist (subjectPathOk).\n` +
|
|
57
|
+
`2) gitCommit: \`git -C <subjectPath> rev-parse --short HEAD\` (else "unknown").\n` +
|
|
58
|
+
`3) priorReportPath: ${cfg.priorReport ? `use "${cfg.priorReport}"` : 'newest prior variance report supplied by the harness, if any'}; set priorReportOk.\n` +
|
|
59
|
+
`4) reproducible = subjectPathOk && both key files exist. notes = anything that would make a re-run diverge.\nReturn ONLY the structured result.`,
|
|
60
|
+
{ label: 'resolve', phase: 'Resolve', schema: RESOLVE_SCHEMA },
|
|
61
|
+
)
|
|
62
|
+
log(`Resolve: subject ${resolved.subjectPathOk ? 'OK' : 'MISSING'} @ ${resolved.gitCommit} | prior ${resolved.priorReportOk ? 'found' : 'none'} | reproducible=${resolved.reproducible}`)
|
|
63
|
+
|
|
64
|
+
if (MODE === 'validate') {
|
|
65
|
+
return {
|
|
66
|
+
mode: 'validate', reproducible: resolved.reproducible,
|
|
67
|
+
subjectPath: resolved.subjectPath, gitCommit: resolved.gitCommit,
|
|
68
|
+
priorReportPath: resolved.priorReportPath, notes: resolved.notes,
|
|
69
|
+
message: resolved.reproducible
|
|
70
|
+
? 'REPRODUCIBLE — live subject + prior artifacts resolved. Re-run with {mode:"full"} to regenerate the trend.'
|
|
71
|
+
: 'NOT reproducible right now — see notes.',
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (!resolved.reproducible) {
|
|
75
|
+
log('Aborting full run — targets not resolvable.')
|
|
76
|
+
return { aborted: true, reason: resolved.notes }
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const SUBJECT = resolved.subjectPath
|
|
80
|
+
|
|
81
|
+
// Regression priors are GENERIC variance archetypes (NOT client findings). The
|
|
82
|
+
// original client-specific priors have been scrubbed to synthetic determinism
|
|
83
|
+
// archetypes so the workflow ships zero NDA content.
|
|
84
|
+
const PRIORS = `
|
|
85
|
+
PRIOR-RUN ARCHETYPES (re-VERIFY each against LIVE source at ${SUBJECT}; status CONFIRMED/FIXED/CHANGED; then find NEW). Synthetic archetypes, NOT a source of truth — live source wins.
|
|
86
|
+
[SKILL] no streaming large-file ingest (OOM risk); handover-contract names-only (no full Finding/Remedy/Assumption JSON-schema); completeness-gate misses the renderer's full deref contract; runMeta/awareness assembly is prose not a script.
|
|
87
|
+
[COMMAND] latency-unit heuristic short-circuits before the span guard; ingest can't stream; unguarded sessionId/escapeBadge dereferences in the renderer; sampler weak worst-bucket weighting with overstated confidence.
|
|
88
|
+
[AGENT] sample-n + analyzer-count recalled from memory not a rule; runMeta/stamps hand-shaped (wrong field names) → render crashes patched reactively; analyzer prompts boolean-coerced fields + no AssumptionSchema.
|
|
89
|
+
[CRITIC] no model/temperature/seed pin (dominant); cwd/timestamp/random unpinned; shared /tmp + existence-only gates (race/stale); no deterministic finding sort; apply-worker unaudited.
|
|
90
|
+
`
|
|
91
|
+
|
|
92
|
+
const DEFECT_SCHEMA = {
|
|
93
|
+
type: 'object', additionalProperties: false, required: ['scopeSummary', 'defects'],
|
|
94
|
+
properties: {
|
|
95
|
+
scopeSummary: { type: 'string' },
|
|
96
|
+
defects: { type: 'array', items: { type: 'object', additionalProperties: false,
|
|
97
|
+
required: ['id','scope','title','locus','class','expected','observed','varianceMechanism','severity','status','evidence','meceNote','remedy','verification'],
|
|
98
|
+
properties: {
|
|
99
|
+
id: { type: 'string' }, scope: { type: 'string', enum: ['SKILL','AGENT','COMMAND'] },
|
|
100
|
+
title: { type: 'string' }, locus: { type: 'string' },
|
|
101
|
+
class: { type: 'string', enum: ['missing-determinism','code-bug','prose-vs-script-gap','schema-contract-gap','agent-discretion','reactive-improvisation','gate-coverage-gap','capability-gap'] },
|
|
102
|
+
expected: { type: 'string' }, observed: { type: 'string' }, varianceMechanism: { type: 'string' },
|
|
103
|
+
severity: { type: 'string', enum: ['P1','P2','P3'] },
|
|
104
|
+
status: { type: 'string', enum: ['CONFIRMED','FIXED','CHANGED','NEW'] },
|
|
105
|
+
evidence: { type: 'string' }, meceNote: { type: 'string' }, remedy: { type: 'string' }, verification: { type: 'string' },
|
|
106
|
+
} } },
|
|
107
|
+
},
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
phase('Catalog')
|
|
111
|
+
const scopes = [
|
|
112
|
+
{ key: 'SKILL', brief: "the SUBJECT's DESIGN/SPEC layer: protocol prose, handover-contract, references, templates, config schema, gate COVERAGE, renderer DESIGN, missing scripts. NOT raw code bugs (COMMAND) nor agent judgment (AGENT)." },
|
|
113
|
+
{ key: 'AGENT', brief: "the AGENT ACTORS' runtime BEHAVIOR: judgment calls, improvisation, hand-shaping, protocol deviation, reactive fixes. NOT the code bug (COMMAND) nor the missing spec (SKILL)." },
|
|
114
|
+
{ key: 'COMMAND', brief: "the COMMANDS/SCRIPTS/CLIs themselves: scripts/*.ts, bash/jq, validators as CODE. CODE BUGS / implementation flaws in a runnable unit. NOT the design gap (SKILL) nor the agent workaround (AGENT)." },
|
|
115
|
+
]
|
|
116
|
+
const catalogs = await parallel(scopes.map(s => () =>
|
|
117
|
+
agent(
|
|
118
|
+
`You are the ${s.key}-scope auditor for a MECE master audit on INTER-RUN VARIANCE in the SUBJECT (live source at ${SUBJECT}, commit ${resolved.gitCommit}).\nSCOPE: ${s.brief}\n${PRIORS}\nTASK: Read the LIVE source for YOUR scope. Re-verify each prior archetype in your scope vs live source (status CONFIRMED/FIXED/CHANGED), then find NEW defects. Produce a VERBOSE, MUTUALLY-EXCLUSIVE, COLLECTIVELY-EXHAUSTIVE catalog for YOUR scope. Every defect: concrete varianceMechanism + determinism remedy + verification. ids ${s.key}-01.. . Stay strictly in scope; cross-ref via meceNote.`,
|
|
119
|
+
{ label: `catalog:${s.key}`, phase: 'Catalog', schema: DEFECT_SCHEMA, agentType: 'Explore' },
|
|
120
|
+
).then(r => ({ scope: s.key, ...r })),
|
|
121
|
+
))
|
|
122
|
+
const valid = catalogs.filter(Boolean)
|
|
123
|
+
log(`Cataloged ${valid.reduce((n,c)=>n+(c.defects?.length||0),0)} defects across ${valid.length} scopes`)
|
|
124
|
+
|
|
125
|
+
phase('Reconcile')
|
|
126
|
+
const RECON_SCHEMA = {
|
|
127
|
+
type: 'object', additionalProperties: false, required: ['defects','rootCauseMatrix','meceAttestation','exhaustivenessGaps'],
|
|
128
|
+
properties: {
|
|
129
|
+
defects: { type: 'array', items: { type: 'object' } },
|
|
130
|
+
rootCauseMatrix: { type: 'array', items: { type: 'object', additionalProperties: false, required: ['rootCause','skillDefect','agentDefect','commandDefect','note'], properties: { rootCause:{type:'string'}, skillDefect:{type:'string'}, agentDefect:{type:'string'}, commandDefect:{type:'string'}, note:{type:'string'} } } },
|
|
131
|
+
meceAttestation: { type: 'string' }, exhaustivenessGaps: { type: 'array', items: { type: 'string' } },
|
|
132
|
+
},
|
|
133
|
+
}
|
|
134
|
+
const reconciled = await agent(
|
|
135
|
+
`MECE reconciliation auditor. 3 scope catalogs:\n${JSON.stringify(valid, null, 2)}\nMerge into ONE master list: every defect in EXACTLY ONE scope (code bug→COMMAND; missing/ambiguous spec→SKILL; agent judgment/improvisation→AGENT). Same root cause may spawn one defect per scope — keep all, link in rootCauseMatrix with honest '—'. Carry each defect's status. Renumber ids. Produce rootCauseMatrix, meceAttestation, exhaustivenessGaps.`,
|
|
136
|
+
{ label: 'reconcile', phase: 'Reconcile', schema: RECON_SCHEMA },
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
phase('Critique')
|
|
140
|
+
const CRIT_SCHEMA = {
|
|
141
|
+
type: 'object', additionalProperties: false, required: ['missingDefects','boundaryIssues','verdict'],
|
|
142
|
+
properties: {
|
|
143
|
+
missingDefects: { type: 'array', items: { type: 'object', additionalProperties: false, required: ['scope','title','varianceMechanism','remedy'], properties: { scope:{type:'string'}, title:{type:'string'}, varianceMechanism:{type:'string'}, remedy:{type:'string'} } } },
|
|
144
|
+
boundaryIssues: { type: 'array', items: { type: 'string' } }, verdict: { type: 'string' },
|
|
145
|
+
},
|
|
146
|
+
}
|
|
147
|
+
const critique = await agent(
|
|
148
|
+
`ADVERSARIAL completeness critic. Goal: minimise inter-run variance. Reconciled set:\n${JSON.stringify(reconciled, null, 2)}\nFind MISSING variance/deviance: LLM non-determinism (temperature/model drift/seed), environment (cwd/clock/file-order), analyzer parallelism races, prompt-cache effects, sampling determinism, silent gate bypasses, partial-failure recovery, apply-worker path, scope-boundary violations. Be skeptical + specific.`,
|
|
149
|
+
{ label: 'critique', phase: 'Critique', schema: CRIT_SCHEMA },
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
phase('Synthesize')
|
|
153
|
+
// Render the Tab-3 fragment using the EVALUATOR's own brand. The 15-dim trend is
|
|
154
|
+
// the byte-identity scorecard (scripts/variance-compare.ts is the deterministic
|
|
155
|
+
// engine for the diff; this workflow adds the MECE catalog narrative). NDA: NO
|
|
156
|
+
// client identity in the rendered output.
|
|
157
|
+
const synth = await agent(
|
|
158
|
+
`Render the Tab-3 (Variance Trend) HTML fragment for the master-audit report. Use the EVALUATOR brand (dark theme + MUTAGENT tokens). NO client identity (synthetic names only). Run label: ${LABEL}; subject commit: ${resolved.gitCommit}.\n` +
|
|
159
|
+
`INPUTS — reconciled:\n${JSON.stringify(reconciled, null, 2)}\nCritique (FOLD IN):\n${JSON.stringify(critique, null, 2)}\n` +
|
|
160
|
+
`The fragment MUST contain: (1) a header "Variance Trend — Track-2" + the variance thesis + top-3 determinism controls; (2) the fixed 15-dimension determinism scorecard table (dimension · measure · target · divergence) — mark not-evaluated where the run-pair lacked the input; (3) the MECE SKILL/AGENT/COMMAND defect table; (4) the cross-scope root-cause matrix; (5) a Determinism Control Plan (controls grouped, mapped to defects). After writing, reply with: section count + defect count + path.`,
|
|
161
|
+
{ label: 'synthesize:tab3', phase: 'Synthesize' },
|
|
162
|
+
)
|
|
163
|
+
return { label: LABEL, gitCommit: resolved.gitCommit, defectCount: (reconciled.defects||[]).length, gaps: (critique.missingDefects||[]).length, synth }
|