@agentic-sdlc-kit/contracts 0.0.0-stage → 0.9.1
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/LICENSE +21 -0
- package/README.md +42 -2
- package/dist/agent/capability.d.ts +9 -0
- package/dist/agent/capability.d.ts.map +1 -0
- package/dist/agent/capability.js +31 -0
- package/dist/agent/capability.js.map +1 -0
- package/dist/agent/errors.d.ts +30 -0
- package/dist/agent/errors.d.ts.map +1 -0
- package/dist/agent/errors.js +62 -0
- package/dist/agent/errors.js.map +1 -0
- package/dist/agent/events.d.ts +222 -0
- package/dist/agent/events.d.ts.map +1 -0
- package/dist/agent/events.js +92 -0
- package/dist/agent/events.js.map +1 -0
- package/dist/agent/execution.d.ts +553 -0
- package/dist/agent/execution.d.ts.map +1 -0
- package/dist/agent/execution.js +229 -0
- package/dist/agent/execution.js.map +1 -0
- package/dist/agent/index.d.ts +8 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +19 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/policy.d.ts +135 -0
- package/dist/agent/policy.d.ts.map +1 -0
- package/dist/agent/policy.js +78 -0
- package/dist/agent/policy.js.map +1 -0
- package/dist/agent/provider.d.ts +82 -0
- package/dist/agent/provider.d.ts.map +1 -0
- package/dist/agent/provider.js +33 -0
- package/dist/agent/provider.js.map +1 -0
- package/dist/agent/session.d.ts +17 -0
- package/dist/agent/session.d.ts.map +1 -0
- package/dist/agent/session.js +23 -0
- package/dist/agent/session.js.map +1 -0
- package/dist/application/application-context.d.ts +512 -0
- package/dist/application/application-context.d.ts.map +1 -0
- package/dist/application/application-context.js +42 -0
- package/dist/application/application-context.js.map +1 -0
- package/dist/application/application-persistence.d.ts +846 -0
- package/dist/application/application-persistence.d.ts.map +1 -0
- package/dist/application/application-persistence.js +37 -0
- package/dist/application/application-persistence.js.map +1 -0
- package/dist/application/application-state.d.ts +89 -0
- package/dist/application/application-state.d.ts.map +1 -0
- package/dist/application/application-state.js +66 -0
- package/dist/application/application-state.js.map +1 -0
- package/dist/application/application-transitions.d.ts +23 -0
- package/dist/application/application-transitions.d.ts.map +1 -0
- package/dist/application/application-transitions.js +60 -0
- package/dist/application/application-transitions.js.map +1 -0
- package/dist/application/index.d.ts +5 -0
- package/dist/application/index.d.ts.map +1 -0
- package/dist/application/index.js +6 -0
- package/dist/application/index.js.map +1 -0
- package/dist/architecture/api-contract.d.ts +259 -0
- package/dist/architecture/api-contract.d.ts.map +1 -0
- package/dist/architecture/api-contract.js +43 -0
- package/dist/architecture/api-contract.js.map +1 -0
- package/dist/architecture/architecture-approval.d.ts +40 -0
- package/dist/architecture/architecture-approval.d.ts.map +1 -0
- package/dist/architecture/architecture-approval.js +24 -0
- package/dist/architecture/architecture-approval.js.map +1 -0
- package/dist/architecture/architecture-options.d.ts +103 -0
- package/dist/architecture/architecture-options.d.ts.map +1 -0
- package/dist/architecture/architecture-options.js +35 -0
- package/dist/architecture/architecture-options.js.map +1 -0
- package/dist/architecture/component-map.d.ts +76 -0
- package/dist/architecture/component-map.d.ts.map +1 -0
- package/dist/architecture/component-map.js +28 -0
- package/dist/architecture/component-map.js.map +1 -0
- package/dist/architecture/data-model.d.ts +252 -0
- package/dist/architecture/data-model.d.ts.map +1 -0
- package/dist/architecture/data-model.js +53 -0
- package/dist/architecture/data-model.js.map +1 -0
- package/dist/architecture/index.d.ts +8 -0
- package/dist/architecture/index.d.ts.map +1 -0
- package/dist/architecture/index.js +9 -0
- package/dist/architecture/index.js.map +1 -0
- package/dist/architecture/operational-design.d.ts +134 -0
- package/dist/architecture/operational-design.d.ts.map +1 -0
- package/dist/architecture/operational-design.js +46 -0
- package/dist/architecture/operational-design.js.map +1 -0
- package/dist/architecture/security-design.d.ts +107 -0
- package/dist/architecture/security-design.d.ts.map +1 -0
- package/dist/architecture/security-design.js +40 -0
- package/dist/architecture/security-design.js.map +1 -0
- package/dist/common/errors.d.ts +40 -0
- package/dist/common/errors.d.ts.map +1 -0
- package/dist/common/errors.js +45 -0
- package/dist/common/errors.js.map +1 -0
- package/dist/common/identifier.d.ts +12 -0
- package/dist/common/identifier.d.ts.map +1 -0
- package/dist/common/identifier.js +21 -0
- package/dist/common/identifier.js.map +1 -0
- package/dist/common/index.d.ts +4 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +5 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/result.d.ts +28 -0
- package/dist/common/result.d.ts.map +1 -0
- package/dist/common/result.js +33 -0
- package/dist/common/result.js.map +1 -0
- package/dist/evaluation/benchmark.d.ts +88 -0
- package/dist/evaluation/benchmark.d.ts.map +1 -0
- package/dist/evaluation/benchmark.js +34 -0
- package/dist/evaluation/benchmark.js.map +1 -0
- package/dist/evaluation/index.d.ts +3 -0
- package/dist/evaluation/index.d.ts.map +1 -0
- package/dist/evaluation/index.js +4 -0
- package/dist/evaluation/index.js.map +1 -0
- package/dist/evaluation/metrics.d.ts +164 -0
- package/dist/evaluation/metrics.d.ts.map +1 -0
- package/dist/evaluation/metrics.js +64 -0
- package/dist/evaluation/metrics.js.map +1 -0
- package/dist/evolution/experiment.d.ts +85 -0
- package/dist/evolution/experiment.d.ts.map +1 -0
- package/dist/evolution/experiment.js +52 -0
- package/dist/evolution/experiment.js.map +1 -0
- package/dist/evolution/improvement-hypothesis.d.ts +98 -0
- package/dist/evolution/improvement-hypothesis.d.ts.map +1 -0
- package/dist/evolution/improvement-hypothesis.js +59 -0
- package/dist/evolution/improvement-hypothesis.js.map +1 -0
- package/dist/evolution/index.d.ts +3 -0
- package/dist/evolution/index.d.ts.map +1 -0
- package/dist/evolution/index.js +4 -0
- package/dist/evolution/index.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/installer/index.d.ts +4 -0
- package/dist/installer/index.d.ts.map +1 -0
- package/dist/installer/index.js +5 -0
- package/dist/installer/index.js.map +1 -0
- package/dist/installer/install-plan.d.ts +168 -0
- package/dist/installer/install-plan.d.ts.map +1 -0
- package/dist/installer/install-plan.js +40 -0
- package/dist/installer/install-plan.js.map +1 -0
- package/dist/installer/ownership-manifest.d.ts +86 -0
- package/dist/installer/ownership-manifest.d.ts.map +1 -0
- package/dist/installer/ownership-manifest.js +34 -0
- package/dist/installer/ownership-manifest.js.map +1 -0
- package/dist/installer/package-manifest.d.ts +55 -0
- package/dist/installer/package-manifest.d.ts.map +1 -0
- package/dist/installer/package-manifest.js +46 -0
- package/dist/installer/package-manifest.js.map +1 -0
- package/dist/learning/engineering-lesson.d.ts +84 -0
- package/dist/learning/engineering-lesson.d.ts.map +1 -0
- package/dist/learning/engineering-lesson.js +47 -0
- package/dist/learning/engineering-lesson.js.map +1 -0
- package/dist/learning/engineering-memory.d.ts +66 -0
- package/dist/learning/engineering-memory.d.ts.map +1 -0
- package/dist/learning/engineering-memory.js +44 -0
- package/dist/learning/engineering-memory.js.map +1 -0
- package/dist/learning/experience-episode.d.ts +176 -0
- package/dist/learning/experience-episode.d.ts.map +1 -0
- package/dist/learning/experience-episode.js +68 -0
- package/dist/learning/experience-episode.js.map +1 -0
- package/dist/learning/experience.d.ts +68 -0
- package/dist/learning/experience.d.ts.map +1 -0
- package/dist/learning/experience.js +22 -0
- package/dist/learning/experience.js.map +1 -0
- package/dist/learning/hypothesis.d.ts +57 -0
- package/dist/learning/hypothesis.d.ts.map +1 -0
- package/dist/learning/hypothesis.js +27 -0
- package/dist/learning/hypothesis.js.map +1 -0
- package/dist/learning/index.d.ts +8 -0
- package/dist/learning/index.d.ts.map +1 -0
- package/dist/learning/index.js +9 -0
- package/dist/learning/index.js.map +1 -0
- package/dist/learning/memory.d.ts +42 -0
- package/dist/learning/memory.d.ts.map +1 -0
- package/dist/learning/memory.js +20 -0
- package/dist/learning/memory.js.map +1 -0
- package/dist/learning/promotion.d.ts +31 -0
- package/dist/learning/promotion.d.ts.map +1 -0
- package/dist/learning/promotion.js +16 -0
- package/dist/learning/promotion.js.map +1 -0
- package/dist/maintenance/bug-fix-workflow.d.ts +57 -0
- package/dist/maintenance/bug-fix-workflow.d.ts.map +1 -0
- package/dist/maintenance/bug-fix-workflow.js +100 -0
- package/dist/maintenance/bug-fix-workflow.js.map +1 -0
- package/dist/maintenance/bug-report.d.ts +62 -0
- package/dist/maintenance/bug-report.d.ts.map +1 -0
- package/dist/maintenance/bug-report.js +49 -0
- package/dist/maintenance/bug-report.js.map +1 -0
- package/dist/maintenance/index.d.ts +6 -0
- package/dist/maintenance/index.d.ts.map +1 -0
- package/dist/maintenance/index.js +7 -0
- package/dist/maintenance/index.js.map +1 -0
- package/dist/maintenance/performance-baseline.d.ts +80 -0
- package/dist/maintenance/performance-baseline.d.ts.map +1 -0
- package/dist/maintenance/performance-baseline.js +32 -0
- package/dist/maintenance/performance-baseline.js.map +1 -0
- package/dist/maintenance/refactor-contract.d.ts +158 -0
- package/dist/maintenance/refactor-contract.d.ts.map +1 -0
- package/dist/maintenance/refactor-contract.js +65 -0
- package/dist/maintenance/refactor-contract.js.map +1 -0
- package/dist/maintenance/refactor-workflow.d.ts +79 -0
- package/dist/maintenance/refactor-workflow.d.ts.map +1 -0
- package/dist/maintenance/refactor-workflow.js +100 -0
- package/dist/maintenance/refactor-workflow.js.map +1 -0
- package/dist/observer/event-schema.d.ts +49 -0
- package/dist/observer/event-schema.d.ts.map +1 -0
- package/dist/observer/event-schema.js +48 -0
- package/dist/observer/event-schema.js.map +1 -0
- package/dist/observer/index.d.ts +5 -0
- package/dist/observer/index.d.ts.map +1 -0
- package/dist/observer/index.js +6 -0
- package/dist/observer/index.js.map +1 -0
- package/dist/observer/journal.d.ts +83 -0
- package/dist/observer/journal.d.ts.map +1 -0
- package/dist/observer/journal.js +76 -0
- package/dist/observer/journal.js.map +1 -0
- package/dist/observer/retention.d.ts +25 -0
- package/dist/observer/retention.d.ts.map +1 -0
- package/dist/observer/retention.js +21 -0
- package/dist/observer/retention.js.map +1 -0
- package/dist/observer/run-summary.d.ts +260 -0
- package/dist/observer/run-summary.d.ts.map +1 -0
- package/dist/observer/run-summary.js +32 -0
- package/dist/observer/run-summary.js.map +1 -0
- package/dist/patterns/index.d.ts +2 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +3 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/patterns/pattern.d.ts +106 -0
- package/dist/patterns/pattern.d.ts.map +1 -0
- package/dist/patterns/pattern.js +69 -0
- package/dist/patterns/pattern.js.map +1 -0
- package/dist/planning/index.d.ts +2 -0
- package/dist/planning/index.d.ts.map +1 -0
- package/dist/planning/index.js +3 -0
- package/dist/planning/index.js.map +1 -0
- package/dist/planning/task.d.ts +178 -0
- package/dist/planning/task.d.ts.map +1 -0
- package/dist/planning/task.js +35 -0
- package/dist/planning/task.js.map +1 -0
- package/dist/policy/index.d.ts +2 -0
- package/dist/policy/index.d.ts.map +1 -0
- package/dist/policy/index.js +3 -0
- package/dist/policy/index.js.map +1 -0
- package/dist/policy/policy.d.ts +83 -0
- package/dist/policy/policy.d.ts.map +1 -0
- package/dist/policy/policy.js +57 -0
- package/dist/policy/policy.js.map +1 -0
- package/dist/product/index.d.ts +5 -0
- package/dist/product/index.d.ts.map +1 -0
- package/dist/product/index.js +6 -0
- package/dist/product/index.js.map +1 -0
- package/dist/product/mvp-scope.d.ts +25 -0
- package/dist/product/mvp-scope.d.ts.map +1 -0
- package/dist/product/mvp-scope.js +18 -0
- package/dist/product/mvp-scope.js.map +1 -0
- package/dist/product/product-brief.d.ts +94 -0
- package/dist/product/product-brief.d.ts.map +1 -0
- package/dist/product/product-brief.js +44 -0
- package/dist/product/product-brief.js.map +1 -0
- package/dist/product/requirements.d.ts +251 -0
- package/dist/product/requirements.d.ts.map +1 -0
- package/dist/product/requirements.js +50 -0
- package/dist/product/requirements.js.map +1 -0
- package/dist/product/traceability.d.ts +50 -0
- package/dist/product/traceability.d.ts.map +1 -0
- package/dist/product/traceability.js +20 -0
- package/dist/product/traceability.js.map +1 -0
- package/dist/project/index.d.ts +3 -0
- package/dist/project/index.d.ts.map +1 -0
- package/dist/project/index.js +4 -0
- package/dist/project/index.js.map +1 -0
- package/dist/project/project-profile.d.ts +79 -0
- package/dist/project/project-profile.d.ts.map +1 -0
- package/dist/project/project-profile.js +53 -0
- package/dist/project/project-profile.js.map +1 -0
- package/dist/project/repository-scan.d.ts +82 -0
- package/dist/project/repository-scan.d.ts.map +1 -0
- package/dist/project/repository-scan.js +29 -0
- package/dist/project/repository-scan.js.map +1 -0
- package/dist/routing/capability-registry.d.ts +87 -0
- package/dist/routing/capability-registry.d.ts.map +1 -0
- package/dist/routing/capability-registry.js +26 -0
- package/dist/routing/capability-registry.js.map +1 -0
- package/dist/routing/escalation.d.ts +25 -0
- package/dist/routing/escalation.d.ts.map +1 -0
- package/dist/routing/escalation.js +21 -0
- package/dist/routing/escalation.js.map +1 -0
- package/dist/routing/index.d.ts +5 -0
- package/dist/routing/index.d.ts.map +1 -0
- package/dist/routing/index.js +6 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/routing/routing-policy.d.ts +103 -0
- package/dist/routing/routing-policy.d.ts.map +1 -0
- package/dist/routing/routing-policy.js +32 -0
- package/dist/routing/routing-policy.js.map +1 -0
- package/dist/routing/routing-request.d.ts +63 -0
- package/dist/routing/routing-request.d.ts.map +1 -0
- package/dist/routing/routing-request.js +46 -0
- package/dist/routing/routing-request.js.map +1 -0
- package/dist/runtime-guard/action-classification.d.ts +54 -0
- package/dist/runtime-guard/action-classification.d.ts.map +1 -0
- package/dist/runtime-guard/action-classification.js +90 -0
- package/dist/runtime-guard/action-classification.js.map +1 -0
- package/dist/runtime-guard/audit-event.d.ts +98 -0
- package/dist/runtime-guard/audit-event.d.ts.map +1 -0
- package/dist/runtime-guard/audit-event.js +45 -0
- package/dist/runtime-guard/audit-event.js.map +1 -0
- package/dist/runtime-guard/index.d.ts +4 -0
- package/dist/runtime-guard/index.d.ts.map +1 -0
- package/dist/runtime-guard/index.js +5 -0
- package/dist/runtime-guard/index.js.map +1 -0
- package/dist/runtime-guard/policy-schema.d.ts +139 -0
- package/dist/runtime-guard/policy-schema.d.ts.map +1 -0
- package/dist/runtime-guard/policy-schema.js +50 -0
- package/dist/runtime-guard/policy-schema.js.map +1 -0
- package/dist/scaffolding/index.d.ts +3 -0
- package/dist/scaffolding/index.d.ts.map +1 -0
- package/dist/scaffolding/index.js +4 -0
- package/dist/scaffolding/index.js.map +1 -0
- package/dist/scaffolding/scaffold-contract.d.ts +528 -0
- package/dist/scaffolding/scaffold-contract.d.ts.map +1 -0
- package/dist/scaffolding/scaffold-contract.js +50 -0
- package/dist/scaffolding/scaffold-contract.js.map +1 -0
- package/dist/scaffolding/template-manifest.d.ts +105 -0
- package/dist/scaffolding/template-manifest.d.ts.map +1 -0
- package/dist/scaffolding/template-manifest.js +44 -0
- package/dist/scaffolding/template-manifest.js.map +1 -0
- package/dist/secret-guard/detection-rule.d.ts +33 -0
- package/dist/secret-guard/detection-rule.d.ts.map +1 -0
- package/dist/secret-guard/detection-rule.js +153 -0
- package/dist/secret-guard/detection-rule.js.map +1 -0
- package/dist/secret-guard/finding.d.ts +89 -0
- package/dist/secret-guard/finding.d.ts.map +1 -0
- package/dist/secret-guard/finding.js +87 -0
- package/dist/secret-guard/finding.js.map +1 -0
- package/dist/secret-guard/index.d.ts +5 -0
- package/dist/secret-guard/index.d.ts.map +1 -0
- package/dist/secret-guard/index.js +6 -0
- package/dist/secret-guard/index.js.map +1 -0
- package/dist/secret-guard/redaction-policy.d.ts +26 -0
- package/dist/secret-guard/redaction-policy.d.ts.map +1 -0
- package/dist/secret-guard/redaction-policy.js +30 -0
- package/dist/secret-guard/redaction-policy.js.map +1 -0
- package/dist/secret-guard/scanner-failure.d.ts +59 -0
- package/dist/secret-guard/scanner-failure.d.ts.map +1 -0
- package/dist/secret-guard/scanner-failure.js +40 -0
- package/dist/secret-guard/scanner-failure.js.map +1 -0
- package/dist/specification/index.d.ts +2 -0
- package/dist/specification/index.d.ts.map +1 -0
- package/dist/specification/index.js +3 -0
- package/dist/specification/index.js.map +1 -0
- package/dist/specification/specification.d.ts +229 -0
- package/dist/specification/specification.d.ts.map +1 -0
- package/dist/specification/specification.js +67 -0
- package/dist/specification/specification.js.map +1 -0
- package/dist/stack-pack/index.d.ts +2 -0
- package/dist/stack-pack/index.d.ts.map +1 -0
- package/dist/stack-pack/index.js +3 -0
- package/dist/stack-pack/index.js.map +1 -0
- package/dist/stack-pack/manifest.d.ts +88 -0
- package/dist/stack-pack/manifest.d.ts.map +1 -0
- package/dist/stack-pack/manifest.js +51 -0
- package/dist/stack-pack/manifest.js.map +1 -0
- package/dist/verification/index.d.ts +2 -0
- package/dist/verification/index.d.ts.map +1 -0
- package/dist/verification/index.js +3 -0
- package/dist/verification/index.js.map +1 -0
- package/dist/verification/report.d.ts +95 -0
- package/dist/verification/report.d.ts.map +1 -0
- package/dist/verification/report.js +57 -0
- package/dist/verification/report.js.map +1 -0
- package/dist/workflow/index.d.ts +3 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +4 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/next-action.d.ts +130 -0
- package/dist/workflow/next-action.d.ts.map +1 -0
- package/dist/workflow/next-action.js +92 -0
- package/dist/workflow/next-action.js.map +1 -0
- package/dist/workflow/workflow.d.ts +68 -0
- package/dist/workflow/workflow.d.ts.map +1 -0
- package/dist/workflow/workflow.js +33 -0
- package/dist/workflow/workflow.js.map +1 -0
- package/package.json +31 -3
- package/src/agent/agent.test.ts +451 -0
- package/src/agent/capability.ts +35 -0
- package/src/agent/errors.ts +69 -0
- package/src/agent/events.ts +107 -0
- package/src/agent/execution.ts +275 -0
- package/src/agent/index.ts +19 -0
- package/src/agent/policy.ts +82 -0
- package/src/agent/provider.ts +124 -0
- package/src/agent/session.ts +29 -0
- package/src/application/application-context.ts +47 -0
- package/src/application/application-persistence.ts +44 -0
- package/src/application/application-state.test.ts +107 -0
- package/src/application/application-state.ts +81 -0
- package/src/application/application-transitions.ts +71 -0
- package/src/application/index.ts +5 -0
- package/src/architecture/api-contract.ts +56 -0
- package/src/architecture/architecture-approval.ts +27 -0
- package/src/architecture/architecture-options.ts +42 -0
- package/src/architecture/architecture.test.ts +263 -0
- package/src/architecture/component-map.ts +35 -0
- package/src/architecture/data-model.ts +66 -0
- package/src/architecture/index.ts +8 -0
- package/src/architecture/operational-design.ts +55 -0
- package/src/architecture/security-design.ts +47 -0
- package/src/common/errors.test.ts +46 -0
- package/src/common/errors.ts +114 -0
- package/src/common/identifier.test.ts +51 -0
- package/src/common/identifier.ts +33 -0
- package/src/common/index.ts +4 -0
- package/src/common/result.test.ts +52 -0
- package/src/common/result.ts +50 -0
- package/src/evaluation/benchmark.ts +42 -0
- package/src/evaluation/index.ts +3 -0
- package/src/evaluation/metrics.ts +76 -0
- package/src/evolution/experiment.ts +61 -0
- package/src/evolution/improvement-hypothesis.ts +67 -0
- package/src/evolution/index.ts +3 -0
- package/src/index.test.ts +54 -0
- package/src/index.ts +53 -0
- package/src/installer/index.ts +4 -0
- package/src/installer/install-plan.ts +49 -0
- package/src/installer/ownership-manifest.ts +40 -0
- package/src/installer/package-manifest.ts +54 -0
- package/src/learning/engineering-lesson.ts +55 -0
- package/src/learning/engineering-memory.ts +51 -0
- package/src/learning/experience-episode.ts +76 -0
- package/src/learning/experience.ts +27 -0
- package/src/learning/hypothesis.ts +33 -0
- package/src/learning/index.ts +8 -0
- package/src/learning/memory.ts +25 -0
- package/src/learning/promotion.ts +19 -0
- package/src/maintenance/bug-fix-workflow.ts +119 -0
- package/src/maintenance/bug-report.ts +58 -0
- package/src/maintenance/index.ts +6 -0
- package/src/maintenance/maintenance.test.ts +219 -0
- package/src/maintenance/performance-baseline.ts +35 -0
- package/src/maintenance/refactor-contract.ts +77 -0
- package/src/maintenance/refactor-workflow.ts +121 -0
- package/src/observer/event-schema.ts +54 -0
- package/src/observer/index.ts +5 -0
- package/src/observer/journal.test.ts +73 -0
- package/src/observer/journal.ts +84 -0
- package/src/observer/retention.ts +24 -0
- package/src/observer/run-summary.ts +37 -0
- package/src/patterns/index.ts +2 -0
- package/src/patterns/pattern.ts +80 -0
- package/src/planning/index.ts +2 -0
- package/src/planning/task.ts +47 -0
- package/src/policy/index.ts +2 -0
- package/src/policy/policy.test.ts +50 -0
- package/src/policy/policy.ts +67 -0
- package/src/product/index.ts +5 -0
- package/src/product/mvp-scope.ts +21 -0
- package/src/product/product-brief.test.ts +108 -0
- package/src/product/product-brief.ts +53 -0
- package/src/product/requirements.ts +59 -0
- package/src/product/traceability.ts +25 -0
- package/src/project/index.ts +3 -0
- package/src/project/project-profile.test.ts +98 -0
- package/src/project/project-profile.ts +65 -0
- package/src/project/repository-scan.ts +34 -0
- package/src/routing/capability-registry.ts +31 -0
- package/src/routing/escalation.ts +24 -0
- package/src/routing/index.ts +5 -0
- package/src/routing/routing-policy.ts +38 -0
- package/src/routing/routing-request.ts +55 -0
- package/src/runtime-guard/action-classification.ts +99 -0
- package/src/runtime-guard/audit-event.ts +49 -0
- package/src/runtime-guard/index.ts +4 -0
- package/src/runtime-guard/policy-schema.ts +56 -0
- package/src/runtime-guard/runtime-guard.test.ts +147 -0
- package/src/scaffolding/index.ts +3 -0
- package/src/scaffolding/scaffold-contract.test.ts +107 -0
- package/src/scaffolding/scaffold-contract.ts +63 -0
- package/src/scaffolding/template-manifest.ts +52 -0
- package/src/secret-guard/detection-rule.ts +168 -0
- package/src/secret-guard/finding.ts +95 -0
- package/src/secret-guard/index.ts +5 -0
- package/src/secret-guard/redaction-policy.ts +34 -0
- package/src/secret-guard/scanner-failure.ts +47 -0
- package/src/secret-guard/secret-guard.test.ts +130 -0
- package/src/specification/index.ts +2 -0
- package/src/specification/specification.ts +79 -0
- package/src/stack-pack/index.ts +2 -0
- package/src/stack-pack/manifest.ts +60 -0
- package/src/verification/index.ts +2 -0
- package/src/verification/report.test.ts +91 -0
- package/src/verification/report.ts +62 -0
- package/src/workflow/index.ts +3 -0
- package/src/workflow/next-action.test.ts +101 -0
- package/src/workflow/next-action.ts +101 -0
- package/src/workflow/workflow.ts +49 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const EVALUATION_SCHEMA_VERSION: 1;
|
|
3
|
+
export declare const BenchmarkKindSchema: z.ZodEnum<["feature", "bug-fix", "refactor", "greenfield", "security"]>;
|
|
4
|
+
export declare const BenchmarkCaseSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
kind: z.ZodEnum<["feature", "bug-fix", "refactor", "greenfield", "security"]>;
|
|
8
|
+
fixture: z.ZodString;
|
|
9
|
+
taskPrompt: z.ZodString;
|
|
10
|
+
acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
|
|
11
|
+
heldOut: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
id: string;
|
|
14
|
+
acceptanceCriteria: string[];
|
|
15
|
+
title: string;
|
|
16
|
+
kind: "feature" | "refactor" | "security" | "bug-fix" | "greenfield";
|
|
17
|
+
fixture: string;
|
|
18
|
+
taskPrompt: string;
|
|
19
|
+
heldOut: boolean;
|
|
20
|
+
}, {
|
|
21
|
+
id: string;
|
|
22
|
+
acceptanceCriteria: string[];
|
|
23
|
+
title: string;
|
|
24
|
+
kind: "feature" | "refactor" | "security" | "bug-fix" | "greenfield";
|
|
25
|
+
fixture: string;
|
|
26
|
+
taskPrompt: string;
|
|
27
|
+
heldOut?: boolean | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const BenchmarkSuiteSchema: z.ZodObject<{
|
|
30
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
version: z.ZodString;
|
|
33
|
+
cases: z.ZodArray<z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
title: z.ZodString;
|
|
36
|
+
kind: z.ZodEnum<["feature", "bug-fix", "refactor", "greenfield", "security"]>;
|
|
37
|
+
fixture: z.ZodString;
|
|
38
|
+
taskPrompt: z.ZodString;
|
|
39
|
+
acceptanceCriteria: z.ZodArray<z.ZodString, "many">;
|
|
40
|
+
heldOut: z.ZodDefault<z.ZodBoolean>;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
id: string;
|
|
43
|
+
acceptanceCriteria: string[];
|
|
44
|
+
title: string;
|
|
45
|
+
kind: "feature" | "refactor" | "security" | "bug-fix" | "greenfield";
|
|
46
|
+
fixture: string;
|
|
47
|
+
taskPrompt: string;
|
|
48
|
+
heldOut: boolean;
|
|
49
|
+
}, {
|
|
50
|
+
id: string;
|
|
51
|
+
acceptanceCriteria: string[];
|
|
52
|
+
title: string;
|
|
53
|
+
kind: "feature" | "refactor" | "security" | "bug-fix" | "greenfield";
|
|
54
|
+
fixture: string;
|
|
55
|
+
taskPrompt: string;
|
|
56
|
+
heldOut?: boolean | undefined;
|
|
57
|
+
}>, "many">;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
schemaVersion: 1;
|
|
60
|
+
id: string;
|
|
61
|
+
version: string;
|
|
62
|
+
cases: {
|
|
63
|
+
id: string;
|
|
64
|
+
acceptanceCriteria: string[];
|
|
65
|
+
title: string;
|
|
66
|
+
kind: "feature" | "refactor" | "security" | "bug-fix" | "greenfield";
|
|
67
|
+
fixture: string;
|
|
68
|
+
taskPrompt: string;
|
|
69
|
+
heldOut: boolean;
|
|
70
|
+
}[];
|
|
71
|
+
}, {
|
|
72
|
+
schemaVersion: 1;
|
|
73
|
+
id: string;
|
|
74
|
+
version: string;
|
|
75
|
+
cases: {
|
|
76
|
+
id: string;
|
|
77
|
+
acceptanceCriteria: string[];
|
|
78
|
+
title: string;
|
|
79
|
+
kind: "feature" | "refactor" | "security" | "bug-fix" | "greenfield";
|
|
80
|
+
fixture: string;
|
|
81
|
+
taskPrompt: string;
|
|
82
|
+
heldOut?: boolean | undefined;
|
|
83
|
+
}[];
|
|
84
|
+
}>;
|
|
85
|
+
export type BenchmarkKind = z.infer<typeof BenchmarkKindSchema>;
|
|
86
|
+
export type BenchmarkCase = z.infer<typeof BenchmarkCaseSchema>;
|
|
87
|
+
export type BenchmarkSuite = z.infer<typeof BenchmarkSuiteSchema>;
|
|
88
|
+
//# sourceMappingURL=benchmark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"benchmark.d.ts","sourceRoot":"","sources":["../../src/evaluation/benchmark.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,yBAAyB,EAAG,CAAU,CAAC;AAEpD,eAAO,MAAM,mBAAmB,yEAM9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;EAY9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK/B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// packages/contracts/src/evaluation/benchmark.ts
|
|
2
|
+
//
|
|
3
|
+
// M19 evaluation contract (M19-01) and benchmark suite (M19-02). The kit
|
|
4
|
+
// evaluates itself against a stable benchmark set per RESEARCH.md §13 and
|
|
5
|
+
// the post-M7 §13 roadmap.
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
export const EVALUATION_SCHEMA_VERSION = 1;
|
|
8
|
+
export const BenchmarkKindSchema = z.enum([
|
|
9
|
+
'feature',
|
|
10
|
+
'bug-fix',
|
|
11
|
+
'refactor',
|
|
12
|
+
'greenfield',
|
|
13
|
+
'security',
|
|
14
|
+
]);
|
|
15
|
+
export const BenchmarkCaseSchema = z.object({
|
|
16
|
+
id: z.string().regex(/^[A-Z]+-[0-9]{3,}$/),
|
|
17
|
+
title: z.string().min(1),
|
|
18
|
+
kind: BenchmarkKindSchema,
|
|
19
|
+
// The fixture repository to run against.
|
|
20
|
+
fixture: z.string().min(1),
|
|
21
|
+
// The task description given to the kit.
|
|
22
|
+
taskPrompt: z.string().min(1),
|
|
23
|
+
// The acceptance criteria the result must satisfy.
|
|
24
|
+
acceptanceCriteria: z.array(z.string().min(1)).min(1),
|
|
25
|
+
// Whether this case is held-out (not used during improvement experiments).
|
|
26
|
+
heldOut: z.boolean().default(false),
|
|
27
|
+
});
|
|
28
|
+
export const BenchmarkSuiteSchema = z.object({
|
|
29
|
+
schemaVersion: z.literal(EVALUATION_SCHEMA_VERSION),
|
|
30
|
+
id: z.string(),
|
|
31
|
+
version: z.string().regex(/^\d+\.\d+\.\d+$/, 'semver'),
|
|
32
|
+
cases: z.array(BenchmarkCaseSchema),
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=benchmark.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"benchmark.js","sourceRoot":"","sources":["../../src/evaluation/benchmark.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,EAAE;AACF,yEAAyE;AACzE,0EAA0E;AAC1E,2BAA2B;AAE3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAU,CAAC;AAEpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC;IACxC,SAAS;IACT,SAAS;IACT,UAAU;IACV,YAAY;IACZ,UAAU;CACX,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC;IAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,IAAI,EAAE,mBAAmB;IACzB,yCAAyC;IACzC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,yCAAyC;IACzC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,mDAAmD;IACnD,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,2EAA2E;IAC3E,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC;IACnD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,QAAQ,CAAC;IACtD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC;CACpC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/evaluation/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/evaluation/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MetricSnapshotSchema: z.ZodObject<{
|
|
3
|
+
metric: z.ZodString;
|
|
4
|
+
value: z.ZodNumber;
|
|
5
|
+
unit: z.ZodString;
|
|
6
|
+
sampleSize: z.ZodNumber;
|
|
7
|
+
blocking: z.ZodDefault<z.ZodBoolean>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
value: number;
|
|
10
|
+
blocking: boolean;
|
|
11
|
+
metric: string;
|
|
12
|
+
unit: string;
|
|
13
|
+
sampleSize: number;
|
|
14
|
+
}, {
|
|
15
|
+
value: number;
|
|
16
|
+
metric: string;
|
|
17
|
+
unit: string;
|
|
18
|
+
sampleSize: number;
|
|
19
|
+
blocking?: boolean | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const EvaluationReportSchema: z.ZodObject<{
|
|
22
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
23
|
+
kitVersion: z.ZodString;
|
|
24
|
+
benchmarkSuiteId: z.ZodString;
|
|
25
|
+
benchmarkSuiteVersion: z.ZodString;
|
|
26
|
+
ranAt: z.ZodString;
|
|
27
|
+
metrics: z.ZodArray<z.ZodObject<{
|
|
28
|
+
metric: z.ZodString;
|
|
29
|
+
value: z.ZodNumber;
|
|
30
|
+
unit: z.ZodString;
|
|
31
|
+
sampleSize: z.ZodNumber;
|
|
32
|
+
blocking: z.ZodDefault<z.ZodBoolean>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
value: number;
|
|
35
|
+
blocking: boolean;
|
|
36
|
+
metric: string;
|
|
37
|
+
unit: string;
|
|
38
|
+
sampleSize: number;
|
|
39
|
+
}, {
|
|
40
|
+
value: number;
|
|
41
|
+
metric: string;
|
|
42
|
+
unit: string;
|
|
43
|
+
sampleSize: number;
|
|
44
|
+
blocking?: boolean | undefined;
|
|
45
|
+
}>, "many">;
|
|
46
|
+
passesReleaseGates: z.ZodBoolean;
|
|
47
|
+
blockingFailures: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
48
|
+
metric: z.ZodString;
|
|
49
|
+
value: z.ZodNumber;
|
|
50
|
+
threshold: z.ZodNumber;
|
|
51
|
+
severity: z.ZodEnum<["high", "critical"]>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
value: number;
|
|
54
|
+
severity: "high" | "critical";
|
|
55
|
+
metric: string;
|
|
56
|
+
threshold: number;
|
|
57
|
+
}, {
|
|
58
|
+
value: number;
|
|
59
|
+
severity: "high" | "critical";
|
|
60
|
+
metric: string;
|
|
61
|
+
threshold: number;
|
|
62
|
+
}>, "many">>;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
schemaVersion: 1;
|
|
65
|
+
metrics: {
|
|
66
|
+
value: number;
|
|
67
|
+
blocking: boolean;
|
|
68
|
+
metric: string;
|
|
69
|
+
unit: string;
|
|
70
|
+
sampleSize: number;
|
|
71
|
+
}[];
|
|
72
|
+
kitVersion: string;
|
|
73
|
+
benchmarkSuiteId: string;
|
|
74
|
+
benchmarkSuiteVersion: string;
|
|
75
|
+
ranAt: string;
|
|
76
|
+
passesReleaseGates: boolean;
|
|
77
|
+
blockingFailures: {
|
|
78
|
+
value: number;
|
|
79
|
+
severity: "high" | "critical";
|
|
80
|
+
metric: string;
|
|
81
|
+
threshold: number;
|
|
82
|
+
}[];
|
|
83
|
+
}, {
|
|
84
|
+
schemaVersion: 1;
|
|
85
|
+
metrics: {
|
|
86
|
+
value: number;
|
|
87
|
+
metric: string;
|
|
88
|
+
unit: string;
|
|
89
|
+
sampleSize: number;
|
|
90
|
+
blocking?: boolean | undefined;
|
|
91
|
+
}[];
|
|
92
|
+
kitVersion: string;
|
|
93
|
+
benchmarkSuiteId: string;
|
|
94
|
+
benchmarkSuiteVersion: string;
|
|
95
|
+
ranAt: string;
|
|
96
|
+
passesReleaseGates: boolean;
|
|
97
|
+
blockingFailures?: {
|
|
98
|
+
value: number;
|
|
99
|
+
severity: "high" | "critical";
|
|
100
|
+
metric: string;
|
|
101
|
+
threshold: number;
|
|
102
|
+
}[] | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
export type MetricSnapshot = z.infer<typeof MetricSnapshotSchema>;
|
|
105
|
+
export type EvaluationReport = z.infer<typeof EvaluationReportSchema>;
|
|
106
|
+
/**
|
|
107
|
+
* Compare two evaluation reports (e.g., baseline vs candidate) and produce
|
|
108
|
+
* a delta. Used by the evolution engine (M34) to decide whether a
|
|
109
|
+
* candidate improvement is actually better.
|
|
110
|
+
*/
|
|
111
|
+
export declare const ComparisonReportSchema: z.ZodObject<{
|
|
112
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
113
|
+
baseline: z.ZodString;
|
|
114
|
+
candidate: z.ZodString;
|
|
115
|
+
metricDeltas: z.ZodArray<z.ZodObject<{
|
|
116
|
+
metric: z.ZodString;
|
|
117
|
+
baselineValue: z.ZodNumber;
|
|
118
|
+
candidateValue: z.ZodNumber;
|
|
119
|
+
delta: z.ZodNumber;
|
|
120
|
+
improved: z.ZodBoolean;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
metric: string;
|
|
123
|
+
baselineValue: number;
|
|
124
|
+
candidateValue: number;
|
|
125
|
+
delta: number;
|
|
126
|
+
improved: boolean;
|
|
127
|
+
}, {
|
|
128
|
+
metric: string;
|
|
129
|
+
baselineValue: number;
|
|
130
|
+
candidateValue: number;
|
|
131
|
+
delta: number;
|
|
132
|
+
improved: boolean;
|
|
133
|
+
}>, "many">;
|
|
134
|
+
verdict: z.ZodEnum<["approved", "rejected", "needs-revision"]>;
|
|
135
|
+
reason: z.ZodString;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
schemaVersion: 1;
|
|
138
|
+
reason: string;
|
|
139
|
+
verdict: "rejected" | "approved" | "needs-revision";
|
|
140
|
+
baseline: string;
|
|
141
|
+
candidate: string;
|
|
142
|
+
metricDeltas: {
|
|
143
|
+
metric: string;
|
|
144
|
+
baselineValue: number;
|
|
145
|
+
candidateValue: number;
|
|
146
|
+
delta: number;
|
|
147
|
+
improved: boolean;
|
|
148
|
+
}[];
|
|
149
|
+
}, {
|
|
150
|
+
schemaVersion: 1;
|
|
151
|
+
reason: string;
|
|
152
|
+
verdict: "rejected" | "approved" | "needs-revision";
|
|
153
|
+
baseline: string;
|
|
154
|
+
candidate: string;
|
|
155
|
+
metricDeltas: {
|
|
156
|
+
metric: string;
|
|
157
|
+
baselineValue: number;
|
|
158
|
+
candidateValue: number;
|
|
159
|
+
delta: number;
|
|
160
|
+
improved: boolean;
|
|
161
|
+
}[];
|
|
162
|
+
}>;
|
|
163
|
+
export type ComparisonReport = z.infer<typeof ComparisonReportSchema>;
|
|
164
|
+
//# sourceMappingURL=metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/evaluation/metrics.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAY/B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBjC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// packages/contracts/src/evaluation/metrics.ts
|
|
2
|
+
//
|
|
3
|
+
// M19 metrics and evaluation report (M19-11, M19-12). Every meaningful
|
|
4
|
+
// change to workflow logic, model routing, or runtime behavior can be
|
|
5
|
+
// evaluated against a stable benchmark set.
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
export const MetricSnapshotSchema = z.object({
|
|
8
|
+
// The metric name (e.g., "acceptance-criteria-pass-rate").
|
|
9
|
+
metric: z.string().min(1),
|
|
10
|
+
// The measured value.
|
|
11
|
+
value: z.number(),
|
|
12
|
+
// The unit (e.g., "%", "ms", "count", "tokens").
|
|
13
|
+
unit: z.string().min(1),
|
|
14
|
+
// The number of benchmark cases this was averaged over.
|
|
15
|
+
sampleSize: z.number().int().positive(),
|
|
16
|
+
// Whether this metric is a primary quality gate (a failure here blocks
|
|
17
|
+
// release regardless of other metrics).
|
|
18
|
+
blocking: z.boolean().default(false),
|
|
19
|
+
});
|
|
20
|
+
export const EvaluationReportSchema = z.object({
|
|
21
|
+
schemaVersion: z.literal(1),
|
|
22
|
+
// The kit version that was evaluated.
|
|
23
|
+
kitVersion: z.string().min(1),
|
|
24
|
+
// The benchmark suite id + version.
|
|
25
|
+
benchmarkSuiteId: z.string(),
|
|
26
|
+
benchmarkSuiteVersion: z.string(),
|
|
27
|
+
// When the evaluation ran.
|
|
28
|
+
ranAt: z.string(),
|
|
29
|
+
// The metrics measured.
|
|
30
|
+
metrics: z.array(MetricSnapshotSchema),
|
|
31
|
+
// Whether the overall result passes the release quality thresholds.
|
|
32
|
+
passesReleaseGates: z.boolean(),
|
|
33
|
+
// Any blocking failures (critical security regressions, etc.).
|
|
34
|
+
blockingFailures: z
|
|
35
|
+
.array(z.object({
|
|
36
|
+
metric: z.string(),
|
|
37
|
+
value: z.number(),
|
|
38
|
+
threshold: z.number(),
|
|
39
|
+
severity: z.enum(['high', 'critical']),
|
|
40
|
+
}))
|
|
41
|
+
.default([]),
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Compare two evaluation reports (e.g., baseline vs candidate) and produce
|
|
45
|
+
* a delta. Used by the evolution engine (M34) to decide whether a
|
|
46
|
+
* candidate improvement is actually better.
|
|
47
|
+
*/
|
|
48
|
+
export const ComparisonReportSchema = z.object({
|
|
49
|
+
schemaVersion: z.literal(1),
|
|
50
|
+
baseline: z.string(), // kit version
|
|
51
|
+
candidate: z.string(), // kit version
|
|
52
|
+
metricDeltas: z.array(z.object({
|
|
53
|
+
metric: z.string(),
|
|
54
|
+
baselineValue: z.number(),
|
|
55
|
+
candidateValue: z.number(),
|
|
56
|
+
delta: z.number(),
|
|
57
|
+
// Whether the candidate improved on this metric.
|
|
58
|
+
improved: z.boolean(),
|
|
59
|
+
})),
|
|
60
|
+
// Overall verdict: did the candidate pass its guardrails?
|
|
61
|
+
verdict: z.enum(['approved', 'rejected', 'needs-revision']),
|
|
62
|
+
reason: z.string().min(1),
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=metrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../src/evaluation/metrics.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,EAAE;AACF,uEAAuE;AACvE,sEAAsE;AACtE,4CAA4C;AAE5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,2DAA2D;IAC3D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,sBAAsB;IACtB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,iDAAiD;IACjD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,wDAAwD;IACxD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvC,uEAAuE;IACvE,wCAAwC;IACxC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,sCAAsC;IACtC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,oCAAoC;IACpC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE;IACjC,2BAA2B;IAC3B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,wBAAwB;IACxB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC;IACtC,oEAAoE;IACpE,kBAAkB,EAAE,CAAC,CAAC,OAAO,EAAE;IAC/B,+DAA+D;IAC/D,gBAAgB,EAAE,CAAC;SAChB,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;KACvC,CAAC,CACH;SACA,OAAO,CAAC,EAAE,CAAC;CACf,CAAC,CAAC;AAKH;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,cAAc;IACpC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,cAAc;IACrC,YAAY,EAAE,CAAC,CAAC,KAAK,CACnB,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;QACzB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;QAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,iDAAiD;QACjD,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;KACtB,CAAC,CACH;IACD,0DAA0D;IAC1D,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;IAC3D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const EXPERIMENT_SCHEMA_VERSION: 1;
|
|
3
|
+
export declare const AutonomyLevelSchema: z.ZodEnum<["L0", "L1", "L2", "L3", "L4", "L5", "L6"]>;
|
|
4
|
+
export declare const ExperimentSpecSchema: z.ZodObject<{
|
|
5
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
hypothesisId: z.ZodString;
|
|
8
|
+
baselineKitVersion: z.ZodString;
|
|
9
|
+
candidateKitVersion: z.ZodString;
|
|
10
|
+
benchmarkSuiteId: z.ZodString;
|
|
11
|
+
benchmarkSuiteVersion: z.ZodString;
|
|
12
|
+
repetitions: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
autonomyLevel: z.ZodEnum<["L0", "L1", "L2", "L3", "L4", "L5", "L6"]>;
|
|
14
|
+
useHeldOut: z.ZodDefault<z.ZodBoolean>;
|
|
15
|
+
createdAt: z.ZodString;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
schemaVersion: 1;
|
|
18
|
+
id: string;
|
|
19
|
+
repetitions: number;
|
|
20
|
+
benchmarkSuiteId: string;
|
|
21
|
+
benchmarkSuiteVersion: string;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
hypothesisId: string;
|
|
24
|
+
baselineKitVersion: string;
|
|
25
|
+
candidateKitVersion: string;
|
|
26
|
+
autonomyLevel: "L0" | "L1" | "L2" | "L3" | "L4" | "L5" | "L6";
|
|
27
|
+
useHeldOut: boolean;
|
|
28
|
+
}, {
|
|
29
|
+
schemaVersion: 1;
|
|
30
|
+
id: string;
|
|
31
|
+
benchmarkSuiteId: string;
|
|
32
|
+
benchmarkSuiteVersion: string;
|
|
33
|
+
createdAt: string;
|
|
34
|
+
hypothesisId: string;
|
|
35
|
+
baselineKitVersion: string;
|
|
36
|
+
candidateKitVersion: string;
|
|
37
|
+
autonomyLevel: "L0" | "L1" | "L2" | "L3" | "L4" | "L5" | "L6";
|
|
38
|
+
repetitions?: number | undefined;
|
|
39
|
+
useHeldOut?: boolean | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
export type AutonomyLevel = z.infer<typeof AutonomyLevelSchema>;
|
|
42
|
+
export type ExperimentSpec = z.infer<typeof ExperimentSpecSchema>;
|
|
43
|
+
/**
|
|
44
|
+
* Promotion request (M33). When an experiment's candidate beats the
|
|
45
|
+
* baseline and passes guardrails, the engine opens a promotion request.
|
|
46
|
+
*
|
|
47
|
+
* INVARIANT (RESEARCH.md §8): promotion to production requires human
|
|
48
|
+
* approval (L5). The evolution engine MUST NOT merge its own PRs.
|
|
49
|
+
*/
|
|
50
|
+
export declare const PromotionRequestSchema: z.ZodObject<{
|
|
51
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
52
|
+
experimentId: z.ZodString;
|
|
53
|
+
hypothesisId: z.ZodString;
|
|
54
|
+
comparisonReportId: z.ZodString;
|
|
55
|
+
prRef: z.ZodString;
|
|
56
|
+
requiredAutonomyLevel: z.ZodEnum<["L0", "L1", "L2", "L3", "L4", "L5", "L6"]>;
|
|
57
|
+
approved: z.ZodDefault<z.ZodBoolean>;
|
|
58
|
+
approvedBy: z.ZodOptional<z.ZodString>;
|
|
59
|
+
approvedAt: z.ZodOptional<z.ZodString>;
|
|
60
|
+
rollbackPlan: z.ZodString;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
schemaVersion: 1;
|
|
63
|
+
approved: boolean;
|
|
64
|
+
hypothesisId: string;
|
|
65
|
+
experimentId: string;
|
|
66
|
+
comparisonReportId: string;
|
|
67
|
+
prRef: string;
|
|
68
|
+
requiredAutonomyLevel: "L0" | "L1" | "L2" | "L3" | "L4" | "L5" | "L6";
|
|
69
|
+
rollbackPlan: string;
|
|
70
|
+
approvedBy?: string | undefined;
|
|
71
|
+
approvedAt?: string | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
schemaVersion: 1;
|
|
74
|
+
hypothesisId: string;
|
|
75
|
+
experimentId: string;
|
|
76
|
+
comparisonReportId: string;
|
|
77
|
+
prRef: string;
|
|
78
|
+
requiredAutonomyLevel: "L0" | "L1" | "L2" | "L3" | "L4" | "L5" | "L6";
|
|
79
|
+
rollbackPlan: string;
|
|
80
|
+
approvedBy?: string | undefined;
|
|
81
|
+
approvedAt?: string | undefined;
|
|
82
|
+
approved?: boolean | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
export type PromotionRequest = z.infer<typeof PromotionRequestSchema>;
|
|
85
|
+
//# sourceMappingURL=experiment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experiment.d.ts","sourceRoot":"","sources":["../../src/evolution/experiment.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,yBAAyB,EAAG,CAAU,CAAC;AAEpD,eAAO,MAAM,mBAAmB,uDAAqD,CAAC;AAEtF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmB/B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// packages/contracts/src/evolution/experiment.ts
|
|
2
|
+
//
|
|
3
|
+
// M32 Evolution Lab experiment (RESEARCH.md §7). An isolated candidate
|
|
4
|
+
// test against a pinned baseline.
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export const EXPERIMENT_SCHEMA_VERSION = 1;
|
|
7
|
+
export const AutonomyLevelSchema = z.enum(['L0', 'L1', 'L2', 'L3', 'L4', 'L5', 'L6']);
|
|
8
|
+
export const ExperimentSpecSchema = z.object({
|
|
9
|
+
schemaVersion: z.literal(EXPERIMENT_SCHEMA_VERSION),
|
|
10
|
+
id: z.string(),
|
|
11
|
+
// The hypothesis this experiment tests.
|
|
12
|
+
hypothesisId: z.string(),
|
|
13
|
+
// The baseline kit version (pinned).
|
|
14
|
+
baselineKitVersion: z.string().min(1),
|
|
15
|
+
// The candidate kit version (isolated branch).
|
|
16
|
+
candidateKitVersion: z.string().min(1),
|
|
17
|
+
// The benchmark suite to run.
|
|
18
|
+
benchmarkSuiteId: z.string(),
|
|
19
|
+
benchmarkSuiteVersion: z.string(),
|
|
20
|
+
// The number of repetitions (for variance).
|
|
21
|
+
repetitions: z.number().int().min(1).max(10).default(3),
|
|
22
|
+
// The autonomy level this experiment is authorized for.
|
|
23
|
+
autonomyLevel: AutonomyLevelSchema,
|
|
24
|
+
// Whether to use held-out cases (generalization test).
|
|
25
|
+
useHeldOut: z.boolean().default(true),
|
|
26
|
+
createdAt: z.string(),
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* Promotion request (M33). When an experiment's candidate beats the
|
|
30
|
+
* baseline and passes guardrails, the engine opens a promotion request.
|
|
31
|
+
*
|
|
32
|
+
* INVARIANT (RESEARCH.md §8): promotion to production requires human
|
|
33
|
+
* approval (L5). The evolution engine MUST NOT merge its own PRs.
|
|
34
|
+
*/
|
|
35
|
+
export const PromotionRequestSchema = z.object({
|
|
36
|
+
schemaVersion: z.literal(1),
|
|
37
|
+
experimentId: z.string(),
|
|
38
|
+
hypothesisId: z.string(),
|
|
39
|
+
// The comparison report that justifies promotion.
|
|
40
|
+
comparisonReportId: z.string(),
|
|
41
|
+
// The PR that was opened (url or local path).
|
|
42
|
+
prRef: z.string().min(1),
|
|
43
|
+
// The autonomy level required to approve this promotion.
|
|
44
|
+
requiredAutonomyLevel: AutonomyLevelSchema,
|
|
45
|
+
// Whether human approval has been granted.
|
|
46
|
+
approved: z.boolean().default(false),
|
|
47
|
+
approvedBy: z.string().optional(),
|
|
48
|
+
approvedAt: z.string().optional(),
|
|
49
|
+
// Rollback plan: how to undo this promotion if it causes regressions.
|
|
50
|
+
rollbackPlan: z.string().min(1),
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=experiment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experiment.js","sourceRoot":"","sources":["../../src/evolution/experiment.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,EAAE;AACF,uEAAuE;AACvE,kCAAkC;AAElC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAU,CAAC;AAEpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAEtF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC;IACnD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,wCAAwC;IACxC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,qCAAqC;IACrC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,+CAA+C;IAC/C,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,8BAA8B;IAC9B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE;IACjC,4CAA4C;IAC5C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACvD,wDAAwD;IACxD,aAAa,EAAE,mBAAmB;IAClC,uDAAuD;IACvD,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAKH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,kDAAkD;IAClD,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC9B,8CAA8C;IAC9C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,yDAAyD;IACzD,qBAAqB,EAAE,mBAAmB;IAC1C,2CAA2C;IAC3C,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACpC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,sEAAsE;IACtE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAChC,CAAC,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const HYPOTHESIS_SCHEMA_VERSION: 1;
|
|
3
|
+
export declare const ImprovementCategorySchema: z.ZodEnum<["knowledge", "skill", "agent", "workflow", "script", "pattern", "routing", "core", "security"]>;
|
|
4
|
+
export declare const ImprovementHypothesisSchema: z.ZodObject<{
|
|
5
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
category: z.ZodEnum<["knowledge", "skill", "agent", "workflow", "script", "pattern", "routing", "core", "security"]>;
|
|
9
|
+
observedProblem: z.ZodString;
|
|
10
|
+
evidenceEpisodeIds: z.ZodArray<z.ZodString, "many">;
|
|
11
|
+
hypothesis: z.ZodString;
|
|
12
|
+
proposedChange: z.ZodString;
|
|
13
|
+
successMetric: z.ZodObject<{
|
|
14
|
+
metric: z.ZodString;
|
|
15
|
+
threshold: z.ZodNumber;
|
|
16
|
+
direction: z.ZodEnum<["higher-is-better", "lower-is-better"]>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
metric: string;
|
|
19
|
+
direction: "lower-is-better" | "higher-is-better";
|
|
20
|
+
threshold: number;
|
|
21
|
+
}, {
|
|
22
|
+
metric: string;
|
|
23
|
+
direction: "lower-is-better" | "higher-is-better";
|
|
24
|
+
threshold: number;
|
|
25
|
+
}>;
|
|
26
|
+
guardrails: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
27
|
+
metric: z.ZodString;
|
|
28
|
+
threshold: z.ZodNumber;
|
|
29
|
+
direction: z.ZodEnum<["higher-is-better", "lower-is-better"]>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
metric: string;
|
|
32
|
+
direction: "lower-is-better" | "higher-is-better";
|
|
33
|
+
threshold: number;
|
|
34
|
+
}, {
|
|
35
|
+
metric: string;
|
|
36
|
+
direction: "lower-is-better" | "higher-is-better";
|
|
37
|
+
threshold: number;
|
|
38
|
+
}>, "many">>;
|
|
39
|
+
estimatedImpact: z.ZodEnum<["low", "medium", "high"]>;
|
|
40
|
+
estimatedCost: z.ZodEnum<["low", "medium", "high"]>;
|
|
41
|
+
estimatedRisk: z.ZodEnum<["low", "medium", "high"]>;
|
|
42
|
+
priorityScore: z.ZodNumber;
|
|
43
|
+
status: z.ZodDefault<z.ZodEnum<["proposed", "experimenting", "approved", "rejected", "needs-revision"]>>;
|
|
44
|
+
createdAt: z.ZodString;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
status: "rejected" | "approved" | "needs-revision" | "proposed" | "experimenting";
|
|
47
|
+
schemaVersion: 1;
|
|
48
|
+
id: string;
|
|
49
|
+
title: string;
|
|
50
|
+
category: "pattern" | "security" | "agent" | "skill" | "core" | "workflow" | "knowledge" | "script" | "routing";
|
|
51
|
+
createdAt: string;
|
|
52
|
+
proposedChange: string;
|
|
53
|
+
hypothesis: string;
|
|
54
|
+
observedProblem: string;
|
|
55
|
+
evidenceEpisodeIds: string[];
|
|
56
|
+
successMetric: {
|
|
57
|
+
metric: string;
|
|
58
|
+
direction: "lower-is-better" | "higher-is-better";
|
|
59
|
+
threshold: number;
|
|
60
|
+
};
|
|
61
|
+
guardrails: {
|
|
62
|
+
metric: string;
|
|
63
|
+
direction: "lower-is-better" | "higher-is-better";
|
|
64
|
+
threshold: number;
|
|
65
|
+
}[];
|
|
66
|
+
estimatedImpact: "low" | "medium" | "high";
|
|
67
|
+
estimatedCost: "low" | "medium" | "high";
|
|
68
|
+
estimatedRisk: "low" | "medium" | "high";
|
|
69
|
+
priorityScore: number;
|
|
70
|
+
}, {
|
|
71
|
+
schemaVersion: 1;
|
|
72
|
+
id: string;
|
|
73
|
+
title: string;
|
|
74
|
+
category: "pattern" | "security" | "agent" | "skill" | "core" | "workflow" | "knowledge" | "script" | "routing";
|
|
75
|
+
createdAt: string;
|
|
76
|
+
proposedChange: string;
|
|
77
|
+
hypothesis: string;
|
|
78
|
+
observedProblem: string;
|
|
79
|
+
evidenceEpisodeIds: string[];
|
|
80
|
+
successMetric: {
|
|
81
|
+
metric: string;
|
|
82
|
+
direction: "lower-is-better" | "higher-is-better";
|
|
83
|
+
threshold: number;
|
|
84
|
+
};
|
|
85
|
+
estimatedImpact: "low" | "medium" | "high";
|
|
86
|
+
estimatedCost: "low" | "medium" | "high";
|
|
87
|
+
estimatedRisk: "low" | "medium" | "high";
|
|
88
|
+
priorityScore: number;
|
|
89
|
+
status?: "rejected" | "approved" | "needs-revision" | "proposed" | "experimenting" | undefined;
|
|
90
|
+
guardrails?: {
|
|
91
|
+
metric: string;
|
|
92
|
+
direction: "lower-is-better" | "higher-is-better";
|
|
93
|
+
threshold: number;
|
|
94
|
+
}[] | undefined;
|
|
95
|
+
}>;
|
|
96
|
+
export type ImprovementCategory = z.infer<typeof ImprovementCategorySchema>;
|
|
97
|
+
export type ImprovementHypothesis = z.infer<typeof ImprovementHypothesisSchema>;
|
|
98
|
+
//# sourceMappingURL=improvement-hypothesis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"improvement-hypothesis.d.ts","sourceRoot":"","sources":["../../src/evolution/improvement-hypothesis.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,yBAAyB,EAAG,CAAU,CAAC;AAEpD,eAAO,MAAM,yBAAyB,4GAUpC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCtC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|