@agentic-sdlc-kit/contracts 0.0.0-stage → 0.8.0
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 +78 -0
- package/dist/installer/ownership-manifest.d.ts.map +1 -0
- package/dist/installer/ownership-manifest.js +30 -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 +109 -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 +85 -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 +36 -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 +115 -0
- package/src/secret-guard/finding.ts +93 -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,130 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const NEXT_ACTION_SCHEMA_VERSION: 1;
|
|
3
|
+
/** What the driver must do next to make progress on this run. */
|
|
4
|
+
export declare const NextRequiredActionSchema: z.ZodEnum<["feature.start", "task.red", "task.green", "task.refactor", "feature.verify", "run.completed"]>;
|
|
5
|
+
export type NextRequiredAction = z.infer<typeof NextRequiredActionSchema>;
|
|
6
|
+
/**
|
|
7
|
+
* A reference to an advisory lesson surfaced by the learning loop.
|
|
8
|
+
* `advisory: true` is a literal, not a flag: the type system carries the
|
|
9
|
+
* promise that a lesson is advice, never authority.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LessonRefSchema: z.ZodObject<{
|
|
12
|
+
lessonId: z.ZodString;
|
|
13
|
+
summary: z.ZodString;
|
|
14
|
+
advisory: z.ZodLiteral<true>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
lessonId: string;
|
|
17
|
+
summary: string;
|
|
18
|
+
advisory: true;
|
|
19
|
+
}, {
|
|
20
|
+
lessonId: string;
|
|
21
|
+
summary: string;
|
|
22
|
+
advisory: true;
|
|
23
|
+
}>;
|
|
24
|
+
export type LessonRef = z.infer<typeof LessonRefSchema>;
|
|
25
|
+
/**
|
|
26
|
+
* Execution constraints the kit will enforce on the next phase
|
|
27
|
+
* verification. Bounded by default; a host may not raise them beyond
|
|
28
|
+
* what the phase runner enforces (core.workflows feature-workflow,
|
|
29
|
+
* ProcessVerificationRunner).
|
|
30
|
+
*/
|
|
31
|
+
export declare const NextActionConstraintsSchema: z.ZodObject<{
|
|
32
|
+
/** Phase verification timeout (default 60_000 ms, runTddPhase). */
|
|
33
|
+
timeoutMs: z.ZodNumber;
|
|
34
|
+
/** Output capture bound (default 10 MiB, ProcessVerificationRunner). */
|
|
35
|
+
maxOutputBytes: z.ZodNumber;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
timeoutMs: number;
|
|
38
|
+
maxOutputBytes: number;
|
|
39
|
+
}, {
|
|
40
|
+
timeoutMs: number;
|
|
41
|
+
maxOutputBytes: number;
|
|
42
|
+
}>;
|
|
43
|
+
export type NextActionConstraints = z.infer<typeof NextActionConstraintsSchema>;
|
|
44
|
+
export declare const NextActionSchema: z.ZodObject<{
|
|
45
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
46
|
+
/** The feature run this action belongs to (one run per feature id). */
|
|
47
|
+
featureId: z.ZodString;
|
|
48
|
+
status: z.ZodEnum<["pending", "in_progress", "blocked", "completed", "failed"]>;
|
|
49
|
+
/** Target task of the next action; absent for run-level actions. */
|
|
50
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
51
|
+
/** TDD phase the target task is in; present iff taskId is present. */
|
|
52
|
+
phase: z.ZodOptional<z.ZodEnum<["red", "green", "refactor"]>>;
|
|
53
|
+
requiredAction: z.ZodEnum<["feature.start", "task.red", "task.green", "task.refactor", "feature.verify", "run.completed"]>;
|
|
54
|
+
/**
|
|
55
|
+
* The task's own verification command from the plan (ADR-0018 P1).
|
|
56
|
+
* Empty when the next action is not task-scoped (feature.start,
|
|
57
|
+
* feature.verify, run.completed) — the profile commands govern there.
|
|
58
|
+
*/
|
|
59
|
+
verificationCommand: z.ZodArray<z.ZodString, "many">;
|
|
60
|
+
/** The literal CLI invocation that executes the required action. */
|
|
61
|
+
nextInvocation: z.ZodString;
|
|
62
|
+
/** Questions the kit is waiting on a human to answer. Honest, possibly empty. */
|
|
63
|
+
blockingQuestions: z.ZodArray<z.ZodString, "many">;
|
|
64
|
+
/** Advisory lessons (ADVISORY ONLY — never authority; ADR-0021 §4). */
|
|
65
|
+
advisoryLessons: z.ZodArray<z.ZodObject<{
|
|
66
|
+
lessonId: z.ZodString;
|
|
67
|
+
summary: z.ZodString;
|
|
68
|
+
advisory: z.ZodLiteral<true>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
lessonId: string;
|
|
71
|
+
summary: string;
|
|
72
|
+
advisory: true;
|
|
73
|
+
}, {
|
|
74
|
+
lessonId: string;
|
|
75
|
+
summary: string;
|
|
76
|
+
advisory: true;
|
|
77
|
+
}>, "many">;
|
|
78
|
+
constraints: z.ZodObject<{
|
|
79
|
+
/** Phase verification timeout (default 60_000 ms, runTddPhase). */
|
|
80
|
+
timeoutMs: z.ZodNumber;
|
|
81
|
+
/** Output capture bound (default 10 MiB, ProcessVerificationRunner). */
|
|
82
|
+
maxOutputBytes: z.ZodNumber;
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
84
|
+
timeoutMs: number;
|
|
85
|
+
maxOutputBytes: number;
|
|
86
|
+
}, {
|
|
87
|
+
timeoutMs: number;
|
|
88
|
+
maxOutputBytes: number;
|
|
89
|
+
}>;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
status: "failed" | "blocked" | "pending" | "in_progress" | "completed";
|
|
92
|
+
schemaVersion: 1;
|
|
93
|
+
featureId: string;
|
|
94
|
+
requiredAction: "feature.start" | "task.red" | "task.green" | "task.refactor" | "feature.verify" | "run.completed";
|
|
95
|
+
verificationCommand: string[];
|
|
96
|
+
nextInvocation: string;
|
|
97
|
+
blockingQuestions: string[];
|
|
98
|
+
advisoryLessons: {
|
|
99
|
+
lessonId: string;
|
|
100
|
+
summary: string;
|
|
101
|
+
advisory: true;
|
|
102
|
+
}[];
|
|
103
|
+
constraints: {
|
|
104
|
+
timeoutMs: number;
|
|
105
|
+
maxOutputBytes: number;
|
|
106
|
+
};
|
|
107
|
+
taskId?: string | undefined;
|
|
108
|
+
phase?: "refactor" | "red" | "green" | undefined;
|
|
109
|
+
}, {
|
|
110
|
+
status: "failed" | "blocked" | "pending" | "in_progress" | "completed";
|
|
111
|
+
schemaVersion: 1;
|
|
112
|
+
featureId: string;
|
|
113
|
+
requiredAction: "feature.start" | "task.red" | "task.green" | "task.refactor" | "feature.verify" | "run.completed";
|
|
114
|
+
verificationCommand: string[];
|
|
115
|
+
nextInvocation: string;
|
|
116
|
+
blockingQuestions: string[];
|
|
117
|
+
advisoryLessons: {
|
|
118
|
+
lessonId: string;
|
|
119
|
+
summary: string;
|
|
120
|
+
advisory: true;
|
|
121
|
+
}[];
|
|
122
|
+
constraints: {
|
|
123
|
+
timeoutMs: number;
|
|
124
|
+
maxOutputBytes: number;
|
|
125
|
+
};
|
|
126
|
+
taskId?: string | undefined;
|
|
127
|
+
phase?: "refactor" | "red" | "green" | undefined;
|
|
128
|
+
}>;
|
|
129
|
+
export type NextAction = z.infer<typeof NextActionSchema>;
|
|
130
|
+
//# sourceMappingURL=next-action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-action.d.ts","sourceRoot":"","sources":["../../src/workflow/next-action.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,0BAA0B,EAAG,CAAU,CAAC;AAErD,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,4GAanC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;EAI1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B;IACtC,mEAAmE;;IAEnE,wEAAwE;;;;;;;;EAExE,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,gBAAgB;;IAE3B,uEAAuE;;;IAGvE,oEAAoE;;IAEpE,sEAAsE;;;IAGtE;;;;OAIG;;IAEH,oEAAoE;;IAEpE,iFAAiF;;IAEjF,uEAAuE;;;;;;;;;;;;;;;QA3BvE,mEAAmE;;QAEnE,wEAAwE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BxE,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// packages/contracts/src/workflow/next-action.ts
|
|
2
|
+
//
|
|
3
|
+
// Host-driven agent protocol (ADR-0021): the `kit next` primitive.
|
|
4
|
+
//
|
|
5
|
+
// Tier C hosts (Cursor, AGY, CI, any terminal-capable agent) drive the
|
|
6
|
+
// kit through the CLI rather than being driven by it (that is the
|
|
7
|
+
// ADR-0019 provider direction). `kit next --json` is their ONLY required
|
|
8
|
+
// entry point: a bounded, machine-readable answer to "what is the next
|
|
9
|
+
// action, against what target, under which constraints?".
|
|
10
|
+
//
|
|
11
|
+
// Protocol rules (ADR-0021 §2):
|
|
12
|
+
// - The payload is bounded. An agent never needs to read prose docs to
|
|
13
|
+
// make progress; every field it needs to act is present.
|
|
14
|
+
// - `verificationCommand` is the TASK'S OWN command from the plan
|
|
15
|
+
// (ADR-0018 P1) — empty when the next action is not task-scoped.
|
|
16
|
+
// - `advisoryLessons` are ADVISORY ONLY. A lesson never authorizes an
|
|
17
|
+
// action and never satisfies a phase invariant; the evidence gate in
|
|
18
|
+
// core.workflows.feature-workflow is the sole authority (mirrors the
|
|
19
|
+
// model-router invariant: the router cannot be the authority for
|
|
20
|
+
// security).
|
|
21
|
+
// - `blockingQuestions` is honest: an empty array means "the kit is
|
|
22
|
+
// not waiting on a human", not "no question could ever matter".
|
|
23
|
+
// Tier C has no approval surface today; absence of an approval UI is
|
|
24
|
+
// a capability downgrade, never a policy bypass (SECURITY.md §3.1).
|
|
25
|
+
//
|
|
26
|
+
// This schema is a wire contract: any host may parse it. Breaking
|
|
27
|
+
// changes require a new schemaVersion (CONTRACTS.md §9).
|
|
28
|
+
import { z } from 'zod';
|
|
29
|
+
import { WorkflowStatusSchema } from './workflow.js';
|
|
30
|
+
export const NEXT_ACTION_SCHEMA_VERSION = 1;
|
|
31
|
+
/** What the driver must do next to make progress on this run. */
|
|
32
|
+
export const NextRequiredActionSchema = z.enum([
|
|
33
|
+
/** No run state exists for this feature — start one. */
|
|
34
|
+
'feature.start',
|
|
35
|
+
/** Write the failing test for `taskId`, then run its red phase. */
|
|
36
|
+
'task.red',
|
|
37
|
+
/** Implement `taskId` minimally, then run its green phase. */
|
|
38
|
+
'task.green',
|
|
39
|
+
/** Refactor `taskId` (behavior preserved), then run its refactor phase. */
|
|
40
|
+
'task.refactor',
|
|
41
|
+
/** All tasks completed — audit the evidence chain and run final verification. */
|
|
42
|
+
'feature.verify',
|
|
43
|
+
/** The run passed final verification; nothing further is required. */
|
|
44
|
+
'run.completed',
|
|
45
|
+
]);
|
|
46
|
+
/**
|
|
47
|
+
* A reference to an advisory lesson surfaced by the learning loop.
|
|
48
|
+
* `advisory: true` is a literal, not a flag: the type system carries the
|
|
49
|
+
* promise that a lesson is advice, never authority.
|
|
50
|
+
*/
|
|
51
|
+
export const LessonRefSchema = z.object({
|
|
52
|
+
lessonId: z.string().min(1),
|
|
53
|
+
summary: z.string().min(1),
|
|
54
|
+
advisory: z.literal(true),
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* Execution constraints the kit will enforce on the next phase
|
|
58
|
+
* verification. Bounded by default; a host may not raise them beyond
|
|
59
|
+
* what the phase runner enforces (core.workflows feature-workflow,
|
|
60
|
+
* ProcessVerificationRunner).
|
|
61
|
+
*/
|
|
62
|
+
export const NextActionConstraintsSchema = z.object({
|
|
63
|
+
/** Phase verification timeout (default 60_000 ms, runTddPhase). */
|
|
64
|
+
timeoutMs: z.number().int().positive(),
|
|
65
|
+
/** Output capture bound (default 10 MiB, ProcessVerificationRunner). */
|
|
66
|
+
maxOutputBytes: z.number().int().positive(),
|
|
67
|
+
});
|
|
68
|
+
export const NextActionSchema = z.object({
|
|
69
|
+
schemaVersion: z.literal(NEXT_ACTION_SCHEMA_VERSION),
|
|
70
|
+
/** The feature run this action belongs to (one run per feature id). */
|
|
71
|
+
featureId: z.string().min(1),
|
|
72
|
+
status: WorkflowStatusSchema,
|
|
73
|
+
/** Target task of the next action; absent for run-level actions. */
|
|
74
|
+
taskId: z.string().optional(),
|
|
75
|
+
/** TDD phase the target task is in; present iff taskId is present. */
|
|
76
|
+
phase: z.enum(['red', 'green', 'refactor']).optional(),
|
|
77
|
+
requiredAction: NextRequiredActionSchema,
|
|
78
|
+
/**
|
|
79
|
+
* The task's own verification command from the plan (ADR-0018 P1).
|
|
80
|
+
* Empty when the next action is not task-scoped (feature.start,
|
|
81
|
+
* feature.verify, run.completed) — the profile commands govern there.
|
|
82
|
+
*/
|
|
83
|
+
verificationCommand: z.array(z.string()),
|
|
84
|
+
/** The literal CLI invocation that executes the required action. */
|
|
85
|
+
nextInvocation: z.string().min(1),
|
|
86
|
+
/** Questions the kit is waiting on a human to answer. Honest, possibly empty. */
|
|
87
|
+
blockingQuestions: z.array(z.string()),
|
|
88
|
+
/** Advisory lessons (ADVISORY ONLY — never authority; ADR-0021 §4). */
|
|
89
|
+
advisoryLessons: z.array(LessonRefSchema),
|
|
90
|
+
constraints: NextActionConstraintsSchema,
|
|
91
|
+
});
|
|
92
|
+
//# sourceMappingURL=next-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-action.js","sourceRoot":"","sources":["../../src/workflow/next-action.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,EAAE;AACF,mEAAmE;AACnE,EAAE;AACF,uEAAuE;AACvE,kEAAkE;AAClE,yEAAyE;AACzE,uEAAuE;AACvE,0DAA0D;AAC1D,EAAE;AACF,gCAAgC;AAChC,yEAAyE;AACzE,6DAA6D;AAC7D,oEAAoE;AACpE,qEAAqE;AACrE,wEAAwE;AACxE,yEAAyE;AACzE,yEAAyE;AACzE,qEAAqE;AACrE,iBAAiB;AACjB,sEAAsE;AACtE,oEAAoE;AACpE,yEAAyE;AACzE,wEAAwE;AACxE,EAAE;AACF,kEAAkE;AAClE,yDAAyD;AAEzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAU,CAAC;AAErD,iEAAiE;AACjE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC7C,wDAAwD;IACxD,eAAe;IACf,mEAAmE;IACnE,UAAU;IACV,8DAA8D;IAC9D,YAAY;IACZ,2EAA2E;IAC3E,eAAe;IACf,iFAAiF;IACjF,gBAAgB;IAChB,sEAAsE;IACtE,eAAe;CAChB,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CAC1B,CAAC,CAAC;AAGH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,mEAAmE;IACnE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACtC,wEAAwE;IACxE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC;IACpD,uEAAuE;IACvE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,MAAM,EAAE,oBAAoB;IAC5B,oEAAoE;IACpE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,sEAAsE;IACtE,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;IACtD,cAAc,EAAE,wBAAwB;IACxC;;;;OAIG;IACH,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACxC,oEAAoE;IACpE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,iFAAiF;IACjF,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACtC,uEAAuE;IACvE,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;IACzC,WAAW,EAAE,2BAA2B;CACzC,CAAC,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { RunId, TaskId } from '../common/identifier.js';
|
|
3
|
+
import type { CheckStatus } from '../verification/report.js';
|
|
4
|
+
export declare const WorkflowModeSchema: z.ZodEnum<["app", "feature", "fix", "refactor"]>;
|
|
5
|
+
export type WorkflowMode = z.infer<typeof WorkflowModeSchema>;
|
|
6
|
+
export declare const WorkflowStatusSchema: z.ZodEnum<["pending", "in_progress", "blocked", "completed", "failed"]>;
|
|
7
|
+
export type WorkflowStatus = z.infer<typeof WorkflowStatusSchema>;
|
|
8
|
+
export declare const WorkflowTransitionSchema: z.ZodEnum<["start", "block", "resume", "complete", "fail"]>;
|
|
9
|
+
export type WorkflowTransition = z.infer<typeof WorkflowTransitionSchema>;
|
|
10
|
+
export declare const TaskHistoryEntrySchema: z.ZodObject<{
|
|
11
|
+
taskId: z.ZodString;
|
|
12
|
+
status: z.ZodEnum<["passed", "failed", "skipped", "blocked"]>;
|
|
13
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
status: "passed" | "failed" | "skipped" | "blocked";
|
|
16
|
+
taskId: string;
|
|
17
|
+
evidence?: string[] | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
status: "passed" | "failed" | "skipped" | "blocked";
|
|
20
|
+
taskId: string;
|
|
21
|
+
evidence?: string[] | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const WorkflowStateSchema: z.ZodObject<{
|
|
24
|
+
runId: z.ZodString;
|
|
25
|
+
mode: z.ZodEnum<["app", "feature", "fix", "refactor"]>;
|
|
26
|
+
status: z.ZodEnum<["pending", "in_progress", "blocked", "completed", "failed"]>;
|
|
27
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
28
|
+
currentTaskId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
taskHistory: z.ZodArray<z.ZodObject<{
|
|
30
|
+
taskId: z.ZodString;
|
|
31
|
+
status: z.ZodEnum<["passed", "failed", "skipped", "blocked"]>;
|
|
32
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
status: "passed" | "failed" | "skipped" | "blocked";
|
|
35
|
+
taskId: string;
|
|
36
|
+
evidence?: string[] | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
status: "passed" | "failed" | "skipped" | "blocked";
|
|
39
|
+
taskId: string;
|
|
40
|
+
evidence?: string[] | undefined;
|
|
41
|
+
}>, "many">;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
status: "failed" | "blocked" | "pending" | "in_progress" | "completed";
|
|
44
|
+
runId: string;
|
|
45
|
+
mode: "app" | "feature" | "fix" | "refactor";
|
|
46
|
+
taskHistory: {
|
|
47
|
+
status: "passed" | "failed" | "skipped" | "blocked";
|
|
48
|
+
taskId: string;
|
|
49
|
+
evidence?: string[] | undefined;
|
|
50
|
+
}[];
|
|
51
|
+
startedAt?: string | undefined;
|
|
52
|
+
currentTaskId?: string | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
status: "failed" | "blocked" | "pending" | "in_progress" | "completed";
|
|
55
|
+
runId: string;
|
|
56
|
+
mode: "app" | "feature" | "fix" | "refactor";
|
|
57
|
+
taskHistory: {
|
|
58
|
+
status: "passed" | "failed" | "skipped" | "blocked";
|
|
59
|
+
taskId: string;
|
|
60
|
+
evidence?: string[] | undefined;
|
|
61
|
+
}[];
|
|
62
|
+
startedAt?: string | undefined;
|
|
63
|
+
currentTaskId?: string | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
export type WorkflowState = z.infer<typeof WorkflowStateSchema>;
|
|
66
|
+
export type TaskHistoryEntry = z.infer<typeof TaskHistoryEntrySchema>;
|
|
67
|
+
export type { RunId, TaskId, CheckStatus };
|
|
68
|
+
//# sourceMappingURL=workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/workflow/workflow.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,eAAO,MAAM,kBAAkB,kDAAgD,CAAC;AAChF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,oBAAoB,yEAM/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB,6DAA2D,CAAC;AACjG,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAIjC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGtE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// packages/contracts/src/workflow/workflow.ts
|
|
2
|
+
//
|
|
3
|
+
// Workflow mode, status, state, and transitions.
|
|
4
|
+
//
|
|
5
|
+
// The state machine in core.workflows.engine enforces the transition table
|
|
6
|
+
// in docs/workflows/WORKFLOWS.md §2. No transition may turn `failed` back
|
|
7
|
+
// into `completed` without a new run.
|
|
8
|
+
//
|
|
9
|
+
// See docs/contracts/CONTRACTS.md §3.
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
export const WorkflowModeSchema = z.enum(['app', 'feature', 'fix', 'refactor']);
|
|
12
|
+
export const WorkflowStatusSchema = z.enum([
|
|
13
|
+
'pending',
|
|
14
|
+
'in_progress',
|
|
15
|
+
'blocked',
|
|
16
|
+
'completed',
|
|
17
|
+
'failed',
|
|
18
|
+
]);
|
|
19
|
+
export const WorkflowTransitionSchema = z.enum(['start', 'block', 'resume', 'complete', 'fail']);
|
|
20
|
+
export const TaskHistoryEntrySchema = z.object({
|
|
21
|
+
taskId: z.string(),
|
|
22
|
+
status: z.enum(['passed', 'failed', 'skipped', 'blocked']),
|
|
23
|
+
evidence: z.array(z.string()).optional(),
|
|
24
|
+
});
|
|
25
|
+
export const WorkflowStateSchema = z.object({
|
|
26
|
+
runId: z.string(),
|
|
27
|
+
mode: WorkflowModeSchema,
|
|
28
|
+
status: WorkflowStatusSchema,
|
|
29
|
+
startedAt: z.string().optional(),
|
|
30
|
+
currentTaskId: z.string().optional(),
|
|
31
|
+
taskHistory: z.array(TaskHistoryEntrySchema),
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/workflow/workflow.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,2EAA2E;AAC3E,0EAA0E;AAC1E,sCAAsC;AACtC,EAAE;AACF,sCAAsC;AAEtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AAGhF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC;IACzC,SAAS;IACT,aAAa;IACb,SAAS;IACT,WAAW;IACX,QAAQ;CACT,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;AAGjG,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAC1D,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,oBAAoB;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC;CAC7C,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentic-sdlc-kit/contracts",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "Shared contracts (types + zod schemas) for the Agentic SDLC Kit. Depends on nothing.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"src"
|
|
19
|
+
],
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"zod": "^3.23.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"typescript": "^5.5.0",
|
|
25
|
+
"vitest": "^2.0.0"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc -p tsconfig.json",
|
|
29
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
30
|
+
"test": "vitest run",
|
|
31
|
+
"test:contract": "vitest run src/**/*.test.ts",
|
|
32
|
+
"clean": "rm -rf dist *.tsbuildinfo"
|
|
33
|
+
}
|
|
6
34
|
}
|