@sun-asterisk/sungen 3.2.34 → 3.3.0-alpha.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/dist/basis/anchor-grammar.d.ts +32 -0
- package/dist/basis/anchor-grammar.d.ts.map +1 -0
- package/dist/basis/anchor-grammar.js +82 -0
- package/dist/basis/anchor-grammar.js.map +1 -0
- package/dist/basis/anchor-hash.d.ts +6 -0
- package/dist/basis/anchor-hash.d.ts.map +1 -0
- package/dist/basis/anchor-hash.js +28 -0
- package/dist/basis/anchor-hash.js.map +1 -0
- package/dist/basis/bm51-tables.d.ts +20 -0
- package/dist/basis/bm51-tables.d.ts.map +1 -0
- package/dist/basis/bm51-tables.js +71 -0
- package/dist/basis/bm51-tables.js.map +1 -0
- package/dist/basis/extract-spec-anchors.d.ts +39 -0
- package/dist/basis/extract-spec-anchors.d.ts.map +1 -0
- package/dist/basis/extract-spec-anchors.js +81 -0
- package/dist/basis/extract-spec-anchors.js.map +1 -0
- package/dist/basis/migration-sentinel.d.ts +47 -0
- package/dist/basis/migration-sentinel.d.ts.map +1 -0
- package/dist/basis/migration-sentinel.js +219 -0
- package/dist/basis/migration-sentinel.js.map +1 -0
- package/dist/basis/spec-frontmatter.d.ts +18 -0
- package/dist/basis/spec-frontmatter.d.ts.map +1 -0
- package/dist/basis/spec-frontmatter.js +55 -0
- package/dist/basis/spec-frontmatter.js.map +1 -0
- package/dist/basis/spec-sections.d.ts +18 -0
- package/dist/basis/spec-sections.d.ts.map +1 -0
- package/dist/basis/spec-sections.js +27 -0
- package/dist/basis/spec-sections.js.map +1 -0
- package/dist/basis/test-basis-schema.d.ts +28 -0
- package/dist/basis/test-basis-schema.d.ts.map +1 -0
- package/dist/basis/test-basis-schema.js +141 -0
- package/dist/basis/test-basis-schema.js.map +1 -0
- package/dist/capabilities/registry.d.ts +15 -0
- package/dist/capabilities/registry.d.ts.map +1 -1
- package/dist/capabilities/registry.js.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +9 -4
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/capability.d.ts.map +1 -1
- package/dist/cli/commands/capability.js +6 -2
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/contract-derive-command.d.ts +10 -0
- package/dist/cli/commands/contract-derive-command.d.ts.map +1 -0
- package/dist/cli/commands/contract-derive-command.js +99 -0
- package/dist/cli/commands/contract-derive-command.js.map +1 -0
- package/dist/cli/commands/contract.d.ts +17 -0
- package/dist/cli/commands/contract.d.ts.map +1 -0
- package/dist/cli/commands/contract.js +162 -0
- package/dist/cli/commands/contract.js.map +1 -0
- package/dist/cli/commands/defect.d.ts +7 -0
- package/dist/cli/commands/defect.d.ts.map +1 -0
- package/dist/cli/commands/defect.js +68 -0
- package/dist/cli/commands/defect.js.map +1 -0
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +87 -10
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +3 -1
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/journey.d.ts.map +1 -1
- package/dist/cli/commands/journey.js +41 -13
- package/dist/cli/commands/journey.js.map +1 -1
- package/dist/cli/commands/next.d.ts +8 -0
- package/dist/cli/commands/next.d.ts.map +1 -1
- package/dist/cli/commands/next.js +64 -6
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/triage.d.ts +7 -0
- package/dist/cli/commands/triage.d.ts.map +1 -0
- package/dist/cli/commands/triage.js +98 -0
- package/dist/cli/commands/triage.js.map +1 -0
- package/dist/cli/commands/update.d.ts +11 -0
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +31 -6
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +24 -33
- package/dist/cli/index.js.map +1 -1
- package/dist/contract/approve-contract.d.ts +31 -0
- package/dist/contract/approve-contract.d.ts.map +1 -0
- package/dist/contract/approve-contract.js +87 -0
- package/dist/contract/approve-contract.js.map +1 -0
- package/dist/contract/assertion-matcher-vocabulary.d.ts +24 -0
- package/dist/contract/assertion-matcher-vocabulary.d.ts.map +1 -0
- package/dist/contract/assertion-matcher-vocabulary.js +100 -0
- package/dist/contract/assertion-matcher-vocabulary.js.map +1 -0
- package/dist/contract/build-contract-verdict.d.ts +32 -0
- package/dist/contract/build-contract-verdict.d.ts.map +1 -0
- package/dist/contract/build-contract-verdict.js +123 -0
- package/dist/contract/build-contract-verdict.js.map +1 -0
- package/dist/contract/build-trace-conformance.d.ts +18 -0
- package/dist/contract/build-trace-conformance.d.ts.map +1 -0
- package/dist/contract/build-trace-conformance.js +153 -0
- package/dist/contract/build-trace-conformance.js.map +1 -0
- package/dist/contract/classify-contract-change.d.ts +23 -0
- package/dist/contract/classify-contract-change.d.ts.map +1 -0
- package/dist/contract/classify-contract-change.js +98 -0
- package/dist/contract/classify-contract-change.js.map +1 -0
- package/dist/contract/classify-contract-unit.d.ts +18 -0
- package/dist/contract/classify-contract-unit.d.ts.map +1 -0
- package/dist/contract/classify-contract-unit.js +49 -0
- package/dist/contract/classify-contract-unit.js.map +1 -0
- package/dist/contract/classify-trace-conformance.d.ts +32 -0
- package/dist/contract/classify-trace-conformance.d.ts.map +1 -0
- package/dist/contract/classify-trace-conformance.js +117 -0
- package/dist/contract/classify-trace-conformance.js.map +1 -0
- package/dist/contract/contract-git.d.ts +24 -0
- package/dist/contract/contract-git.d.ts.map +1 -0
- package/dist/contract/contract-git.js +144 -0
- package/dist/contract/contract-git.js.map +1 -0
- package/dist/contract/contract-hash.d.ts +7 -0
- package/dist/contract/contract-hash.d.ts.map +1 -0
- package/dist/contract/contract-hash.js +38 -0
- package/dist/contract/contract-hash.js.map +1 -0
- package/dist/contract/contract-report-file.d.ts +4 -0
- package/dist/contract/contract-report-file.d.ts.map +1 -0
- package/dist/contract/contract-report-file.js +60 -0
- package/dist/contract/contract-report-file.js.map +1 -0
- package/dist/contract/contract-schema.d.ts +71 -0
- package/dist/contract/contract-schema.d.ts.map +1 -0
- package/dist/contract/contract-schema.js +102 -0
- package/dist/contract/contract-schema.js.map +1 -0
- package/dist/contract/contract-units.d.ts +12 -0
- package/dist/contract/contract-units.d.ts.map +1 -0
- package/dist/contract/contract-units.js +96 -0
- package/dist/contract/contract-units.js.map +1 -0
- package/dist/contract/contracts-lock-file.d.ts +24 -0
- package/dist/contract/contracts-lock-file.d.ts.map +1 -0
- package/dist/contract/contracts-lock-file.js +140 -0
- package/dist/contract/contracts-lock-file.js.map +1 -0
- package/dist/contract/data-normalize.d.ts +10 -0
- package/dist/contract/data-normalize.d.ts.map +1 -0
- package/dist/contract/data-normalize.js +110 -0
- package/dist/contract/data-normalize.js.map +1 -0
- package/dist/contract/derive-free-feature.d.ts +30 -0
- package/dist/contract/derive-free-feature.d.ts.map +1 -0
- package/dist/contract/derive-free-feature.js +145 -0
- package/dist/contract/derive-free-feature.js.map +1 -0
- package/dist/contract/field-semantic-redaction.d.ts +21 -0
- package/dist/contract/field-semantic-redaction.d.ts.map +1 -0
- package/dist/contract/field-semantic-redaction.js +118 -0
- package/dist/contract/field-semantic-redaction.js.map +1 -0
- package/dist/contract/free-feature-blocks.d.ts +10 -0
- package/dist/contract/free-feature-blocks.d.ts.map +1 -0
- package/dist/contract/free-feature-blocks.js +94 -0
- package/dist/contract/free-feature-blocks.js.map +1 -0
- package/dist/contract/lock-secret-guard.d.ts +22 -0
- package/dist/contract/lock-secret-guard.d.ts.map +1 -0
- package/dist/contract/lock-secret-guard.js +134 -0
- package/dist/contract/lock-secret-guard.js.map +1 -0
- package/dist/contract/lock-vs-git-head.d.ts +26 -0
- package/dist/contract/lock-vs-git-head.d.ts.map +1 -0
- package/dist/contract/lock-vs-git-head.js +28 -0
- package/dist/contract/lock-vs-git-head.js.map +1 -0
- package/dist/contract/normalize-contract-step.d.ts +21 -0
- package/dist/contract/normalize-contract-step.d.ts.map +1 -0
- package/dist/contract/normalize-contract-step.js +70 -0
- package/dist/contract/normalize-contract-step.js.map +1 -0
- package/dist/contract/normalize-feature-steps.d.ts +7 -0
- package/dist/contract/normalize-feature-steps.d.ts.map +1 -0
- package/dist/contract/normalize-feature-steps.js +127 -0
- package/dist/contract/normalize-feature-steps.js.map +1 -0
- package/dist/contract/oracle-strength.d.ts +12 -0
- package/dist/contract/oracle-strength.d.ts.map +1 -0
- package/dist/contract/oracle-strength.js +88 -0
- package/dist/contract/oracle-strength.js.map +1 -0
- package/dist/contract/project-contract-blockers.d.ts +10 -0
- package/dist/contract/project-contract-blockers.d.ts.map +1 -0
- package/dist/contract/project-contract-blockers.js +73 -0
- package/dist/contract/project-contract-blockers.js.map +1 -0
- package/dist/contract/record-contract-approval.d.ts +21 -0
- package/dist/contract/record-contract-approval.d.ts.map +1 -0
- package/dist/contract/record-contract-approval.js +98 -0
- package/dist/contract/record-contract-approval.js.map +1 -0
- package/dist/contract/render-free-gherkin.d.ts +40 -0
- package/dist/contract/render-free-gherkin.d.ts.map +1 -0
- package/dist/contract/render-free-gherkin.js +141 -0
- package/dist/contract/render-free-gherkin.js.map +1 -0
- package/dist/contract/render-trace-sentence.d.ts +20 -0
- package/dist/contract/render-trace-sentence.d.ts.map +1 -0
- package/dist/contract/render-trace-sentence.js +109 -0
- package/dist/contract/render-trace-sentence.js.map +1 -0
- package/dist/contract/render-trace-target.d.ts +14 -0
- package/dist/contract/render-trace-target.d.ts.map +1 -0
- package/dist/contract/render-trace-target.js +70 -0
- package/dist/contract/render-trace-target.js.map +1 -0
- package/dist/contract/resolve-unit-trace-identities.d.ts +8 -0
- package/dist/contract/resolve-unit-trace-identities.d.ts.map +1 -0
- package/dist/contract/resolve-unit-trace-identities.js +78 -0
- package/dist/contract/resolve-unit-trace-identities.js.map +1 -0
- package/dist/contract/trace/collect-trace-evidence.d.ts +33 -0
- package/dist/contract/trace/collect-trace-evidence.d.ts.map +1 -0
- package/dist/contract/trace/collect-trace-evidence.js +161 -0
- package/dist/contract/trace/collect-trace-evidence.js.map +1 -0
- package/dist/contract/trace/identity-cache.d.ts +19 -0
- package/dist/contract/trace/identity-cache.d.ts.map +1 -0
- package/dist/contract/trace/identity-cache.js +104 -0
- package/dist/contract/trace/identity-cache.js.map +1 -0
- package/dist/contract/trace/select-final-attempt.d.ts +27 -0
- package/dist/contract/trace/select-final-attempt.d.ts.map +1 -0
- package/dist/contract/trace/select-final-attempt.js +116 -0
- package/dist/contract/trace/select-final-attempt.js.map +1 -0
- package/dist/contract/trace/snapshot-html-renderer.d.ts +31 -0
- package/dist/contract/trace/snapshot-html-renderer.d.ts.map +1 -0
- package/dist/contract/trace/snapshot-html-renderer.js +172 -0
- package/dist/contract/trace/snapshot-html-renderer.js.map +1 -0
- package/dist/contract/trace/snapshot-resolver.d.ts +21 -0
- package/dist/contract/trace/snapshot-resolver.d.ts.map +1 -0
- package/dist/contract/trace/snapshot-resolver.js +65 -0
- package/dist/contract/trace/snapshot-resolver.js.map +1 -0
- package/dist/contract/trace/snapshot-store.d.ts +66 -0
- package/dist/contract/trace/snapshot-store.d.ts.map +1 -0
- package/dist/contract/trace/snapshot-store.js +173 -0
- package/dist/contract/trace/snapshot-store.js.map +1 -0
- package/dist/contract/trace/target-identity.d.ts +74 -0
- package/dist/contract/trace/target-identity.d.ts.map +1 -0
- package/dist/contract/trace/target-identity.js +68 -0
- package/dist/contract/trace/target-identity.js.map +1 -0
- package/dist/contract/trace/test-step-join.d.ts +65 -0
- package/dist/contract/trace/test-step-join.d.ts.map +1 -0
- package/dist/contract/trace/test-step-join.js +80 -0
- package/dist/contract/trace/test-step-join.js.map +1 -0
- package/dist/contract/trace/trace-binding.d.ts +21 -0
- package/dist/contract/trace/trace-binding.d.ts.map +1 -0
- package/dist/contract/trace/trace-binding.js +88 -0
- package/dist/contract/trace/trace-binding.js.map +1 -0
- package/dist/contract/trace/trace-file-reader.d.ts +35 -0
- package/dist/contract/trace/trace-file-reader.d.ts.map +1 -0
- package/dist/contract/trace/trace-file-reader.js +155 -0
- package/dist/contract/trace/trace-file-reader.js.map +1 -0
- package/dist/contract/trace/trace-fingerprint.d.ts +22 -0
- package/dist/contract/trace/trace-fingerprint.d.ts.map +1 -0
- package/dist/contract/trace/trace-fingerprint.js +96 -0
- package/dist/contract/trace/trace-fingerprint.js.map +1 -0
- package/dist/contract/trace/trace-identity-resolution.d.ts +26 -0
- package/dist/contract/trace/trace-identity-resolution.d.ts.map +1 -0
- package/dist/contract/trace/trace-identity-resolution.js +84 -0
- package/dist/contract/trace/trace-identity-resolution.js.map +1 -0
- package/dist/contract/trace/trace-run-record.d.ts +27 -0
- package/dist/contract/trace/trace-run-record.d.ts.map +1 -0
- package/dist/contract/trace/trace-run-record.js +115 -0
- package/dist/contract/trace/trace-run-record.js.map +1 -0
- package/dist/contract/trace/trace-steps.d.ts +19 -0
- package/dist/contract/trace/trace-steps.d.ts.map +1 -0
- package/dist/contract/trace/trace-steps.js +79 -0
- package/dist/contract/trace/trace-steps.js.map +1 -0
- package/dist/contract/trace/trace-zip-limits.d.ts +41 -0
- package/dist/contract/trace/trace-zip-limits.d.ts.map +1 -0
- package/dist/contract/trace/trace-zip-limits.js +48 -0
- package/dist/contract/trace/trace-zip-limits.js.map +1 -0
- package/dist/contract/trace/trace-zip-reader.d.ts +10 -0
- package/dist/contract/trace/trace-zip-reader.d.ts.map +1 -0
- package/dist/contract/trace/trace-zip-reader.js +186 -0
- package/dist/contract/trace/trace-zip-reader.js.map +1 -0
- package/dist/contract/verify-approval-decisions.d.ts +5 -0
- package/dist/contract/verify-approval-decisions.d.ts.map +1 -0
- package/dist/contract/verify-approval-decisions.js +104 -0
- package/dist/contract/verify-approval-decisions.js.map +1 -0
- package/dist/decisions/append-decision.d.ts +12 -0
- package/dist/decisions/append-decision.d.ts.map +1 -0
- package/dist/decisions/append-decision.js +73 -0
- package/dist/decisions/append-decision.js.map +1 -0
- package/dist/decisions/confirmed-decision-commands.d.ts +30 -0
- package/dist/decisions/confirmed-decision-commands.d.ts.map +1 -0
- package/dist/decisions/confirmed-decision-commands.js +172 -0
- package/dist/decisions/confirmed-decision-commands.js.map +1 -0
- package/dist/decisions/decision-file.d.ts +31 -0
- package/dist/decisions/decision-file.d.ts.map +1 -0
- package/dist/decisions/decision-file.js +139 -0
- package/dist/decisions/decision-file.js.map +1 -0
- package/dist/decisions/decision-identity.d.ts +12 -0
- package/dist/decisions/decision-identity.d.ts.map +1 -0
- package/dist/decisions/decision-identity.js +78 -0
- package/dist/decisions/decision-identity.js.map +1 -0
- package/dist/decisions/decision-integrity-check.d.ts +12 -0
- package/dist/decisions/decision-integrity-check.d.ts.map +1 -0
- package/dist/decisions/decision-integrity-check.js +102 -0
- package/dist/decisions/decision-integrity-check.js.map +1 -0
- package/dist/decisions/decision-schema.d.ts +42 -0
- package/dist/decisions/decision-schema.d.ts.map +1 -0
- package/dist/decisions/decision-schema.js +75 -0
- package/dist/decisions/decision-schema.js.map +1 -0
- package/dist/decisions/decision-source.d.ts +2 -0
- package/dist/decisions/decision-source.d.ts.map +1 -0
- package/dist/decisions/decision-source.js +18 -0
- package/dist/decisions/decision-source.js.map +1 -0
- package/dist/decisions/exclusive-file-create.d.ts +3 -0
- package/dist/decisions/exclusive-file-create.d.ts.map +1 -0
- package/dist/decisions/exclusive-file-create.js +84 -0
- package/dist/decisions/exclusive-file-create.js.map +1 -0
- package/dist/decisions/git-head-trust.d.ts +7 -0
- package/dist/decisions/git-head-trust.d.ts.map +1 -0
- package/dist/decisions/git-head-trust.js +76 -0
- package/dist/decisions/git-head-trust.js.map +1 -0
- package/dist/decisions/human-confirmation.d.ts +33 -0
- package/dist/decisions/human-confirmation.d.ts.map +1 -0
- package/dist/decisions/human-confirmation.js +155 -0
- package/dist/decisions/human-confirmation.js.map +1 -0
- package/dist/decisions/legacy-waiver-migration.d.ts +31 -0
- package/dist/decisions/legacy-waiver-migration.d.ts.map +1 -0
- package/dist/decisions/legacy-waiver-migration.js +170 -0
- package/dist/decisions/legacy-waiver-migration.js.map +1 -0
- package/dist/decisions/read-decisions.d.ts +19 -0
- package/dist/decisions/read-decisions.d.ts.map +1 -0
- package/dist/decisions/read-decisions.js +90 -0
- package/dist/decisions/read-decisions.js.map +1 -0
- package/dist/decisions/viewpoint-baseline-adapter.d.ts +7 -0
- package/dist/decisions/viewpoint-baseline-adapter.d.ts.map +1 -0
- package/dist/decisions/viewpoint-baseline-adapter.js +109 -0
- package/dist/decisions/viewpoint-baseline-adapter.js.map +1 -0
- package/dist/decisions/waiver-decisions.d.ts +24 -0
- package/dist/decisions/waiver-decisions.d.ts.map +1 -0
- package/dist/decisions/waiver-decisions.js +46 -0
- package/dist/decisions/waiver-decisions.js.map +1 -0
- package/dist/exporters/csv-exporter.d.ts +4 -0
- package/dist/exporters/csv-exporter.d.ts.map +1 -1
- package/dist/exporters/csv-exporter.js +1 -1
- package/dist/exporters/csv-exporter.js.map +1 -1
- package/dist/exporters/feature-parser.d.ts +8 -0
- package/dist/exporters/feature-parser.d.ts.map +1 -1
- package/dist/exporters/feature-parser.js +12 -0
- package/dist/exporters/feature-parser.js.map +1 -1
- package/dist/exporters/matrix/build.d.ts +3 -0
- package/dist/exporters/matrix/build.d.ts.map +1 -1
- package/dist/exporters/matrix/build.js +59 -19
- package/dist/exporters/matrix/build.js.map +1 -1
- package/dist/exporters/matrix/carry-manual-results.d.ts +19 -0
- package/dist/exporters/matrix/carry-manual-results.d.ts.map +1 -1
- package/dist/exporters/matrix/carry-manual-results.js +76 -6
- package/dist/exporters/matrix/carry-manual-results.js.map +1 -1
- package/dist/exporters/matrix/export.d.ts +8 -2
- package/dist/exporters/matrix/export.d.ts.map +1 -1
- package/dist/exporters/matrix/export.js +16 -3
- package/dist/exporters/matrix/export.js.map +1 -1
- package/dist/exporters/matrix/gates.d.ts +6 -1
- package/dist/exporters/matrix/gates.d.ts.map +1 -1
- package/dist/exporters/matrix/gates.js +57 -128
- package/dist/exporters/matrix/gates.js.map +1 -1
- package/dist/exporters/matrix/render-csv.d.ts.map +1 -1
- package/dist/exporters/matrix/render-csv.js +4 -1
- package/dist/exporters/matrix/render-csv.js.map +1 -1
- package/dist/exporters/matrix/render-gate-overrides-sheet.d.ts +13 -0
- package/dist/exporters/matrix/render-gate-overrides-sheet.d.ts.map +1 -0
- package/dist/exporters/matrix/render-gate-overrides-sheet.js +44 -0
- package/dist/exporters/matrix/render-gate-overrides-sheet.js.map +1 -0
- package/dist/exporters/matrix/render-xlsx.d.ts +1 -0
- package/dist/exporters/matrix/render-xlsx.d.ts.map +1 -1
- package/dist/exporters/matrix/render-xlsx.js +6 -0
- package/dist/exporters/matrix/render-xlsx.js.map +1 -1
- package/dist/exporters/matrix/types.d.ts +9 -1
- package/dist/exporters/matrix/types.d.ts.map +1 -1
- package/dist/exporters/matrix/types.js.map +1 -1
- package/dist/exporters/playwright-report-parser.d.ts.map +1 -1
- package/dist/exporters/playwright-report-parser.js +1 -0
- package/dist/exporters/playwright-report-parser.js.map +1 -1
- package/dist/exporters/scenario-merger.d.ts.map +1 -1
- package/dist/exporters/scenario-merger.js +2 -0
- package/dist/exporters/scenario-merger.js.map +1 -1
- package/dist/exporters/types.d.ts +5 -0
- package/dist/exporters/types.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.js +13 -0
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/graph/evaluate-graph.d.ts +21 -0
- package/dist/graph/evaluate-graph.d.ts.map +1 -0
- package/dist/graph/evaluate-graph.js +49 -0
- package/dist/graph/evaluate-graph.js.map +1 -0
- package/dist/graph/locate-finding.d.ts +20 -0
- package/dist/graph/locate-finding.d.ts.map +1 -0
- package/dist/graph/locate-finding.js +137 -0
- package/dist/graph/locate-finding.js.map +1 -0
- package/dist/graph/node-decl.d.ts +59 -0
- package/dist/graph/node-decl.d.ts.map +1 -0
- package/dist/graph/node-decl.js +8 -0
- package/dist/graph/node-decl.js.map +1 -0
- package/dist/graph/nodes/core-node-catalog.d.ts +7 -0
- package/dist/graph/nodes/core-node-catalog.d.ts.map +1 -0
- package/dist/graph/nodes/core-node-catalog.js +13 -0
- package/dist/graph/nodes/core-node-catalog.js.map +1 -0
- package/dist/graph/nodes/test-case-contract-nodes.d.ts +19 -0
- package/dist/graph/nodes/test-case-contract-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/test-case-contract-nodes.js +56 -0
- package/dist/graph/nodes/test-case-contract-nodes.js.map +1 -0
- package/dist/graph/nodes/test-case-nodes.d.ts +26 -0
- package/dist/graph/nodes/test-case-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/test-case-nodes.js +66 -0
- package/dist/graph/nodes/test-case-nodes.js.map +1 -0
- package/dist/graph/nodes/unit-audit-nodes.d.ts +18 -0
- package/dist/graph/nodes/unit-audit-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/unit-audit-nodes.js +95 -0
- package/dist/graph/nodes/unit-audit-nodes.js.map +1 -0
- package/dist/graph/nodes/unit-contract-node.d.ts +20 -0
- package/dist/graph/nodes/unit-contract-node.d.ts.map +1 -0
- package/dist/graph/nodes/unit-contract-node.js +81 -0
- package/dist/graph/nodes/unit-contract-node.js.map +1 -0
- package/dist/graph/nodes/unit-design-nodes.d.ts +14 -0
- package/dist/graph/nodes/unit-design-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/unit-design-nodes.js +90 -0
- package/dist/graph/nodes/unit-design-nodes.js.map +1 -0
- package/dist/graph/nodes/unit-execution-nodes.d.ts +16 -0
- package/dist/graph/nodes/unit-execution-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/unit-execution-nodes.js +79 -0
- package/dist/graph/nodes/unit-execution-nodes.js.map +1 -0
- package/dist/graph/test-case-identity.d.ts +13 -0
- package/dist/graph/test-case-identity.d.ts.map +1 -0
- package/dist/graph/test-case-identity.js +106 -0
- package/dist/graph/test-case-identity.js.map +1 -0
- package/dist/graph/test-case-results.d.ts +11 -0
- package/dist/graph/test-case-results.d.ts.map +1 -0
- package/dist/graph/test-case-results.js +137 -0
- package/dist/graph/test-case-results.js.map +1 -0
- package/dist/graph/test-case-satisfied.d.ts +25 -0
- package/dist/graph/test-case-satisfied.d.ts.map +1 -0
- package/dist/graph/test-case-satisfied.js +51 -0
- package/dist/graph/test-case-satisfied.js.map +1 -0
- package/dist/graph/test-case-state-shape.d.ts +67 -0
- package/dist/graph/test-case-state-shape.d.ts.map +1 -0
- package/dist/graph/test-case-state-shape.js +3 -0
- package/dist/graph/test-case-state-shape.js.map +1 -0
- package/dist/graph/test-case-states.d.ts +9 -0
- package/dist/graph/test-case-states.d.ts.map +1 -0
- package/dist/graph/test-case-states.js +116 -0
- package/dist/graph/test-case-states.js.map +1 -0
- package/dist/graph/unit-artifact-probes.d.ts +19 -0
- package/dist/graph/unit-artifact-probes.d.ts.map +1 -0
- package/dist/graph/unit-artifact-probes.js +133 -0
- package/dist/graph/unit-artifact-probes.js.map +1 -0
- package/dist/graph/unit-state-facts.d.ts +43 -0
- package/dist/graph/unit-state-facts.d.ts.map +1 -0
- package/dist/graph/unit-state-facts.js +87 -0
- package/dist/graph/unit-state-facts.js.map +1 -0
- package/dist/harness/audit.d.ts +11 -0
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +34 -9
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/catalog/gate-rules.yaml +647 -0
- package/dist/harness/counted-assertions.d.ts +2 -0
- package/dist/harness/counted-assertions.d.ts.map +1 -0
- package/dist/harness/counted-assertions.js +38 -0
- package/dist/harness/counted-assertions.js.map +1 -0
- package/dist/harness/defect-draft.d.ts +14 -0
- package/dist/harness/defect-draft.d.ts.map +1 -0
- package/dist/harness/defect-draft.js +143 -0
- package/dist/harness/defect-draft.js.map +1 -0
- package/dist/harness/defects.d.ts +24 -0
- package/dist/harness/defects.d.ts.map +1 -0
- package/dist/harness/defects.js +118 -0
- package/dist/harness/defects.js.map +1 -0
- package/dist/harness/gates/audit-gate-terms.d.ts +41 -0
- package/dist/harness/gates/audit-gate-terms.d.ts.map +1 -0
- package/dist/harness/gates/audit-gate-terms.js +72 -0
- package/dist/harness/gates/audit-gate-terms.js.map +1 -0
- package/dist/harness/gates/audit-gate-verdict.d.ts +31 -0
- package/dist/harness/gates/audit-gate-verdict.d.ts.map +1 -0
- package/dist/harness/gates/audit-gate-verdict.js +101 -0
- package/dist/harness/gates/audit-gate-verdict.js.map +1 -0
- package/dist/harness/gates/audit-input-hash.d.ts +4 -0
- package/dist/harness/gates/audit-input-hash.d.ts.map +1 -0
- package/dist/harness/gates/audit-input-hash.js +96 -0
- package/dist/harness/gates/audit-input-hash.js.map +1 -0
- package/dist/harness/gates/audit-report-verification.d.ts +32 -0
- package/dist/harness/gates/audit-report-verification.d.ts.map +1 -0
- package/dist/harness/gates/audit-report-verification.js +207 -0
- package/dist/harness/gates/audit-report-verification.js.map +1 -0
- package/dist/harness/gates/decisions-hash.d.ts +13 -0
- package/dist/harness/gates/decisions-hash.d.ts.map +1 -0
- package/dist/harness/gates/decisions-hash.js +72 -0
- package/dist/harness/gates/decisions-hash.js.map +1 -0
- package/dist/harness/gates/delivery-checklist.d.ts +21 -0
- package/dist/harness/gates/delivery-checklist.d.ts.map +1 -0
- package/dist/harness/gates/delivery-checklist.js +128 -0
- package/dist/harness/gates/delivery-checklist.js.map +1 -0
- package/dist/harness/gates/delivery-decision-gate.d.ts +29 -0
- package/dist/harness/gates/delivery-decision-gate.d.ts.map +1 -0
- package/dist/harness/gates/delivery-decision-gate.js +91 -0
- package/dist/harness/gates/delivery-decision-gate.js.map +1 -0
- package/dist/harness/gates/delivery-decision-step.d.ts +16 -0
- package/dist/harness/gates/delivery-decision-step.d.ts.map +1 -0
- package/dist/harness/gates/delivery-decision-step.js +71 -0
- package/dist/harness/gates/delivery-decision-step.js.map +1 -0
- package/dist/harness/gates/gate-override-report.d.ts +59 -0
- package/dist/harness/gates/gate-override-report.d.ts.map +1 -0
- package/dist/harness/gates/gate-override-report.js +86 -0
- package/dist/harness/gates/gate-override-report.js.map +1 -0
- package/dist/harness/gates/gate-override-scope.d.ts +18 -0
- package/dist/harness/gates/gate-override-scope.d.ts.map +1 -0
- package/dist/harness/gates/gate-override-scope.js +98 -0
- package/dist/harness/gates/gate-override-scope.js.map +1 -0
- package/dist/harness/gates/gate-override-validation.d.ts +25 -0
- package/dist/harness/gates/gate-override-validation.d.ts.map +1 -0
- package/dist/harness/gates/gate-override-validation.js +81 -0
- package/dist/harness/gates/gate-override-validation.js.map +1 -0
- package/dist/harness/gates/gate-rule-catalog.d.ts +24 -0
- package/dist/harness/gates/gate-rule-catalog.d.ts.map +1 -0
- package/dist/harness/gates/gate-rule-catalog.js +112 -0
- package/dist/harness/gates/gate-rule-catalog.js.map +1 -0
- package/dist/harness/gates/gate-terms.d.ts +33 -0
- package/dist/harness/gates/gate-terms.d.ts.map +1 -0
- package/dist/harness/gates/gate-terms.js +41 -0
- package/dist/harness/gates/gate-terms.js.map +1 -0
- package/dist/harness/gates/in-run-decision-check.d.ts +21 -0
- package/dist/harness/gates/in-run-decision-check.d.ts.map +1 -0
- package/dist/harness/gates/in-run-decision-check.js +138 -0
- package/dist/harness/gates/in-run-decision-check.js.map +1 -0
- package/dist/harness/gates/journey-gate-inputs.d.ts +37 -0
- package/dist/harness/gates/journey-gate-inputs.d.ts.map +1 -0
- package/dist/harness/gates/journey-gate-inputs.js +81 -0
- package/dist/harness/gates/journey-gate-inputs.js.map +1 -0
- package/dist/harness/gates/migrated-waiver-review.d.ts +6 -0
- package/dist/harness/gates/migrated-waiver-review.d.ts.map +1 -0
- package/dist/harness/gates/migrated-waiver-review.js +116 -0
- package/dist/harness/gates/migrated-waiver-review.js.map +1 -0
- package/dist/harness/gates/resolve-rule.d.ts +59 -0
- package/dist/harness/gates/resolve-rule.d.ts.map +1 -0
- package/dist/harness/gates/resolve-rule.js +41 -0
- package/dist/harness/gates/resolve-rule.js.map +1 -0
- package/dist/harness/gates/unit-gate-overrides.d.ts +25 -0
- package/dist/harness/gates/unit-gate-overrides.d.ts.map +1 -0
- package/dist/harness/gates/unit-gate-overrides.js +122 -0
- package/dist/harness/gates/unit-gate-overrides.js.map +1 -0
- package/dist/harness/journey.d.ts +24 -1
- package/dist/harness/journey.d.ts.map +1 -1
- package/dist/harness/journey.js +114 -23
- package/dist/harness/journey.js.map +1 -1
- package/dist/harness/manifest.d.ts +12 -0
- package/dist/harness/manifest.d.ts.map +1 -1
- package/dist/harness/manifest.js +73 -45
- package/dist/harness/manifest.js.map +1 -1
- package/dist/harness/next-step.d.ts +37 -6
- package/dist/harness/next-step.d.ts.map +1 -1
- package/dist/harness/next-step.js +34 -174
- package/dist/harness/next-step.js.map +1 -1
- package/dist/harness/parse.d.ts +25 -0
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +38 -13
- package/dist/harness/parse.js.map +1 -1
- package/dist/harness/script-check.d.ts.map +1 -1
- package/dist/harness/script-check.js +29 -6
- package/dist/harness/script-check.js.map +1 -1
- package/dist/harness/sensors.d.ts +14 -3
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +64 -44
- package/dist/harness/sensors.js.map +1 -1
- package/dist/harness/triage-signals.d.ts +20 -0
- package/dist/harness/triage-signals.d.ts.map +1 -0
- package/dist/harness/triage-signals.js +30 -0
- package/dist/harness/triage-signals.js.map +1 -0
- package/dist/harness/triage-unit.d.ts +23 -0
- package/dist/harness/triage-unit.d.ts.map +1 -0
- package/dist/harness/triage-unit.js +142 -0
- package/dist/harness/triage-unit.js.map +1 -0
- package/dist/harness/triage.d.ts +28 -0
- package/dist/harness/triage.d.ts.map +1 -0
- package/dist/harness/triage.js +99 -0
- package/dist/harness/triage.js.map +1 -0
- package/dist/harness/viewpoint-ledger.d.ts.map +1 -1
- package/dist/harness/viewpoint-ledger.js +2 -1
- package/dist/harness/viewpoint-ledger.js.map +1 -1
- package/dist/hooks/bash-write-targets.d.ts +15 -0
- package/dist/hooks/bash-write-targets.d.ts.map +1 -0
- package/dist/hooks/bash-write-targets.js +173 -0
- package/dist/hooks/bash-write-targets.js.map +1 -0
- package/dist/hooks/claude-hook-entry.d.ts +11 -0
- package/dist/hooks/claude-hook-entry.d.ts.map +1 -0
- package/dist/hooks/claude-hook-entry.js +137 -0
- package/dist/hooks/claude-hook-entry.js.map +1 -0
- package/dist/hooks/claude-transcript-turn.d.ts +11 -0
- package/dist/hooks/claude-transcript-turn.d.ts.map +1 -0
- package/dist/hooks/claude-transcript-turn.js +143 -0
- package/dist/hooks/claude-transcript-turn.js.map +1 -0
- package/dist/hooks/guard-delivery-contract-rule.d.ts +10 -0
- package/dist/hooks/guard-delivery-contract-rule.d.ts.map +1 -0
- package/dist/hooks/guard-delivery-contract-rule.js +152 -0
- package/dist/hooks/guard-delivery-contract-rule.js.map +1 -0
- package/dist/hooks/guard-protected-paths.d.ts +9 -0
- package/dist/hooks/guard-protected-paths.d.ts.map +1 -0
- package/dist/hooks/guard-protected-paths.js +106 -0
- package/dist/hooks/guard-protected-paths.js.map +1 -0
- package/dist/hooks/guard-rules.d.ts +37 -0
- package/dist/hooks/guard-rules.d.ts.map +1 -0
- package/dist/hooks/guard-rules.js +61 -0
- package/dist/hooks/guard-rules.js.map +1 -0
- package/dist/hooks/guard-tty-spoof-rule.d.ts +15 -0
- package/dist/hooks/guard-tty-spoof-rule.d.ts.map +1 -0
- package/dist/hooks/guard-tty-spoof-rule.js +21 -0
- package/dist/hooks/guard-tty-spoof-rule.js.map +1 -0
- package/dist/hooks/hand-back-core.d.ts +37 -0
- package/dist/hooks/hand-back-core.d.ts.map +1 -0
- package/dist/hooks/hand-back-core.js +115 -0
- package/dist/hooks/hand-back-core.js.map +1 -0
- package/dist/hooks/hook-cli-command.d.ts +9 -0
- package/dist/hooks/hook-cli-command.d.ts.map +1 -0
- package/dist/hooks/hook-cli-command.js +46 -0
- package/dist/hooks/hook-cli-command.js.map +1 -0
- package/dist/hooks/hook-registry.d.ts +10 -0
- package/dist/hooks/hook-registry.d.ts.map +1 -0
- package/dist/hooks/hook-registry.js +24 -0
- package/dist/hooks/hook-registry.js.map +1 -0
- package/dist/hooks/hook-result-contract.d.ts +50 -0
- package/dist/hooks/hook-result-contract.d.ts.map +1 -0
- package/dist/hooks/hook-result-contract.js +80 -0
- package/dist/hooks/hook-result-contract.js.map +1 -0
- package/dist/hooks/hook-toggles.d.ts +10 -0
- package/dist/hooks/hook-toggles.d.ts.map +1 -0
- package/dist/hooks/hook-toggles.js +107 -0
- package/dist/hooks/hook-toggles.js.map +1 -0
- package/dist/hooks/pre-tool-guard-hook.d.ts +10 -0
- package/dist/hooks/pre-tool-guard-hook.d.ts.map +1 -0
- package/dist/hooks/pre-tool-guard-hook.js +105 -0
- package/dist/hooks/pre-tool-guard-hook.js.map +1 -0
- package/dist/hooks/session-start-unit-state-hook.d.ts +13 -0
- package/dist/hooks/session-start-unit-state-hook.d.ts.map +1 -0
- package/dist/hooks/session-start-unit-state-hook.js +55 -0
- package/dist/hooks/session-start-unit-state-hook.js.map +1 -0
- package/dist/hooks/stop-next-step-hook.d.ts +16 -0
- package/dist/hooks/stop-next-step-hook.d.ts.map +1 -0
- package/dist/hooks/stop-next-step-hook.js +42 -0
- package/dist/hooks/stop-next-step-hook.js.map +1 -0
- package/dist/hooks/sungen-project-root.d.ts +19 -0
- package/dist/hooks/sungen-project-root.d.ts.map +1 -0
- package/dist/hooks/sungen-project-root.js +130 -0
- package/dist/hooks/sungen-project-root.js.map +1 -0
- package/dist/orchestrator/ai-skills/command-partial-includes.d.ts +15 -0
- package/dist/orchestrator/ai-skills/command-partial-includes.d.ts.map +1 -0
- package/dist/orchestrator/ai-skills/command-partial-includes.js +106 -0
- package/dist/orchestrator/ai-skills/command-partial-includes.js.map +1 -0
- package/dist/orchestrator/ai-skills/commands.d.ts +5 -1
- package/dist/orchestrator/ai-skills/commands.d.ts.map +1 -1
- package/dist/orchestrator/ai-skills/commands.js +16 -6
- package/dist/orchestrator/ai-skills/commands.js.map +1 -1
- package/dist/orchestrator/ai-skills/golden-skills.test.js +29 -0
- package/dist/orchestrator/ai-skills/golden-skills.test.js.map +1 -1
- package/dist/orchestrator/claude-hooks-install.d.ts +27 -0
- package/dist/orchestrator/claude-hooks-install.d.ts.map +1 -0
- package/dist/orchestrator/claude-hooks-install.js +203 -0
- package/dist/orchestrator/claude-hooks-install.js.map +1 -0
- package/dist/orchestrator/lockstep-version.d.ts +15 -5
- package/dist/orchestrator/lockstep-version.d.ts.map +1 -1
- package/dist/orchestrator/lockstep-version.js +30 -17
- package/dist/orchestrator/lockstep-version.js.map +1 -1
- package/dist/orchestrator/project-initializer.d.ts +6 -0
- package/dist/orchestrator/project-initializer.d.ts.map +1 -1
- package/dist/orchestrator/project-initializer.js +23 -0
- package/dist/orchestrator/project-initializer.js.map +1 -1
- package/dist/orchestrator/screen-manager.d.ts.map +1 -1
- package/dist/orchestrator/screen-manager.js +4 -2
- package/dist/orchestrator/screen-manager.js.map +1 -1
- package/dist/orchestrator/templates/ai-src/commands/add-api.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/add-flow.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/add-screen.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/create-data-test.md +1 -0
- package/dist/orchestrator/templates/ai-src/commands/create-test.md +14 -16
- package/dist/orchestrator/templates/ai-src/commands/dashboard.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/delivery.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/design.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/feedback.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/locale.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/review.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/run-test.md +14 -10
- package/dist/orchestrator/templates/ai-src/config/claude.md +20 -7
- package/dist/orchestrator/templates/ai-src/config/copilot.md +20 -7
- package/dist/orchestrator/templates/ai-src/partials/hand-back-rule.claude.md +20 -0
- package/dist/orchestrator/templates/ai-src/partials/hand-back-rule.codex.md +20 -0
- package/dist/orchestrator/templates/ai-src/partials/hand-back-rule.copilot.md +20 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-api-coverage-model/SKILL.md +1 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-capture-mobile/SKILL.md +3 -3
- package/dist/orchestrator/templates/ai-src/skills/sungen-data-factory/SKILL.md +9 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +2 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +1 -1
- package/dist/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md +2 -0
- package/dist/orchestrator/templates/claude-hooks/sungen-hook.cjs +64 -0
- package/dist/utils/safe-yaml-parse.d.ts +8 -0
- package/dist/utils/safe-yaml-parse.d.ts.map +1 -0
- package/dist/utils/safe-yaml-parse.js +51 -0
- package/dist/utils/safe-yaml-parse.js.map +1 -0
- package/package.json +3 -3
- package/src/basis/anchor-grammar.ts +83 -0
- package/src/basis/anchor-hash.ts +27 -0
- package/src/basis/bm51-tables.ts +65 -0
- package/src/basis/extract-spec-anchors.ts +95 -0
- package/src/basis/migration-sentinel.ts +175 -0
- package/src/basis/spec-frontmatter.ts +68 -0
- package/src/basis/spec-sections.ts +35 -0
- package/src/basis/test-basis-schema.ts +81 -0
- package/src/capabilities/registry.ts +16 -0
- package/src/cli/commands/audit.ts +9 -4
- package/src/cli/commands/capability.ts +4 -2
- package/src/cli/commands/contract-derive-command.ts +60 -0
- package/src/cli/commands/contract.ts +130 -0
- package/src/cli/commands/defect.ts +49 -0
- package/src/cli/commands/delivery.ts +85 -13
- package/src/cli/commands/generate.ts +3 -1
- package/src/cli/commands/journey.ts +39 -14
- package/src/cli/commands/next.ts +60 -8
- package/src/cli/commands/triage.ts +57 -0
- package/src/cli/commands/update.ts +35 -8
- package/src/cli/index.ts +24 -30
- package/src/contract/approve-contract.ts +94 -0
- package/src/contract/assertion-matcher-vocabulary.ts +93 -0
- package/src/contract/build-contract-verdict.ts +108 -0
- package/src/contract/build-trace-conformance.ts +100 -0
- package/src/contract/classify-contract-change.ts +92 -0
- package/src/contract/classify-contract-unit.ts +47 -0
- package/src/contract/classify-trace-conformance.ts +116 -0
- package/src/contract/contract-git.ts +106 -0
- package/src/contract/contract-hash.ts +34 -0
- package/src/contract/contract-report-file.ts +25 -0
- package/src/contract/contract-schema.ts +137 -0
- package/src/contract/contract-units.ts +52 -0
- package/src/contract/contracts-lock-file.ts +97 -0
- package/src/contract/data-normalize.ts +66 -0
- package/src/contract/derive-free-feature.ts +110 -0
- package/src/contract/field-semantic-redaction.ts +80 -0
- package/src/contract/free-feature-blocks.ts +56 -0
- package/src/contract/lock-secret-guard.ts +95 -0
- package/src/contract/lock-vs-git-head.ts +38 -0
- package/src/contract/normalize-contract-step.ts +74 -0
- package/src/contract/normalize-feature-steps.ts +93 -0
- package/src/contract/oracle-strength.ts +80 -0
- package/src/contract/project-contract-blockers.ts +36 -0
- package/src/contract/record-contract-approval.ts +70 -0
- package/src/contract/render-free-gherkin.ts +113 -0
- package/src/contract/render-trace-sentence.ts +98 -0
- package/src/contract/render-trace-target.ts +68 -0
- package/src/contract/resolve-unit-trace-identities.ts +35 -0
- package/src/contract/trace/collect-trace-evidence.ts +109 -0
- package/src/contract/trace/identity-cache.ts +61 -0
- package/src/contract/trace/select-final-attempt.ts +70 -0
- package/src/contract/trace/snapshot-html-renderer.ts +136 -0
- package/src/contract/trace/snapshot-resolver.ts +66 -0
- package/src/contract/trace/snapshot-store.ts +151 -0
- package/src/contract/trace/target-identity.ts +104 -0
- package/src/contract/trace/test-step-join.ts +103 -0
- package/src/contract/trace/trace-binding.ts +56 -0
- package/src/contract/trace/trace-file-reader.ts +123 -0
- package/src/contract/trace/trace-fingerprint.ts +68 -0
- package/src/contract/trace/trace-identity-resolution.ts +74 -0
- package/src/contract/trace/trace-run-record.ts +74 -0
- package/src/contract/trace/trace-steps.ts +88 -0
- package/src/contract/trace/trace-zip-limits.ts +73 -0
- package/src/contract/trace/trace-zip-reader.ts +127 -0
- package/src/contract/verify-approval-decisions.ts +60 -0
- package/src/decisions/append-decision.ts +35 -0
- package/src/decisions/confirmed-decision-commands.ts +128 -0
- package/src/decisions/decision-file.ts +93 -0
- package/src/decisions/decision-identity.ts +73 -0
- package/src/decisions/decision-integrity-check.ts +61 -0
- package/src/decisions/decision-schema.ts +76 -0
- package/src/decisions/decision-source.ts +14 -0
- package/src/decisions/exclusive-file-create.ts +42 -0
- package/src/decisions/git-head-trust.ts +32 -0
- package/src/decisions/human-confirmation.ts +114 -0
- package/src/decisions/legacy-waiver-migration.ts +135 -0
- package/src/decisions/read-decisions.ts +61 -0
- package/src/decisions/viewpoint-baseline-adapter.ts +74 -0
- package/src/decisions/waiver-decisions.ts +56 -0
- package/src/exporters/csv-exporter.ts +5 -1
- package/src/exporters/feature-parser.ts +12 -0
- package/src/exporters/matrix/build.ts +62 -18
- package/src/exporters/matrix/carry-manual-results.ts +70 -7
- package/src/exporters/matrix/export.ts +17 -2
- package/src/exporters/matrix/gates.ts +62 -129
- package/src/exporters/matrix/render-csv.ts +4 -1
- package/src/exporters/matrix/render-gate-overrides-sheet.ts +50 -0
- package/src/exporters/matrix/render-xlsx.ts +6 -0
- package/src/exporters/matrix/types.ts +9 -1
- package/src/exporters/playwright-report-parser.ts +1 -0
- package/src/exporters/scenario-merger.ts +2 -1
- package/src/exporters/types.ts +5 -0
- package/src/generators/test-generator/code-generator.ts +13 -0
- package/src/graph/evaluate-graph.ts +62 -0
- package/src/graph/locate-finding.ts +93 -0
- package/src/graph/node-decl.ts +65 -0
- package/src/graph/nodes/core-node-catalog.ts +15 -0
- package/src/graph/nodes/test-case-contract-nodes.ts +69 -0
- package/src/graph/nodes/test-case-nodes.ts +68 -0
- package/src/graph/nodes/unit-audit-nodes.ts +95 -0
- package/src/graph/nodes/unit-contract-node.ts +82 -0
- package/src/graph/nodes/unit-design-nodes.ts +88 -0
- package/src/graph/nodes/unit-execution-nodes.ts +77 -0
- package/src/graph/test-case-identity.ts +75 -0
- package/src/graph/test-case-results.ts +90 -0
- package/src/graph/test-case-satisfied.ts +55 -0
- package/src/graph/test-case-state-shape.ts +62 -0
- package/src/graph/test-case-states.ts +84 -0
- package/src/graph/unit-artifact-probes.ts +77 -0
- package/src/graph/unit-state-facts.ts +112 -0
- package/src/harness/audit.ts +46 -11
- package/src/harness/catalog/gate-rules.yaml +647 -0
- package/src/harness/counted-assertions.ts +33 -0
- package/src/harness/defect-draft.ts +115 -0
- package/src/harness/defects.ts +94 -0
- package/src/harness/gates/audit-gate-terms.ts +80 -0
- package/src/harness/gates/audit-gate-verdict.ts +78 -0
- package/src/harness/gates/audit-input-hash.ts +55 -0
- package/src/harness/gates/audit-report-verification.ts +173 -0
- package/src/harness/gates/decisions-hash.ts +42 -0
- package/src/harness/gates/delivery-checklist.ts +120 -0
- package/src/harness/gates/delivery-decision-gate.ts +111 -0
- package/src/harness/gates/delivery-decision-step.ts +73 -0
- package/src/harness/gates/gate-override-report.ts +114 -0
- package/src/harness/gates/gate-override-scope.ts +66 -0
- package/src/harness/gates/gate-override-validation.ts +75 -0
- package/src/harness/gates/gate-rule-catalog.ts +82 -0
- package/src/harness/gates/gate-terms.ts +59 -0
- package/src/harness/gates/in-run-decision-check.ts +99 -0
- package/src/harness/gates/journey-gate-inputs.ts +89 -0
- package/src/harness/gates/migrated-waiver-review.ts +68 -0
- package/src/harness/gates/resolve-rule.ts +94 -0
- package/src/harness/gates/unit-gate-overrides.ts +99 -0
- package/src/harness/journey.ts +122 -27
- package/src/harness/manifest.ts +69 -45
- package/src/harness/next-step.ts +60 -170
- package/src/harness/parse.ts +40 -13
- package/src/harness/script-check.ts +27 -6
- package/src/harness/sensors.ts +73 -47
- package/src/harness/triage-signals.ts +46 -0
- package/src/harness/triage-unit.ts +113 -0
- package/src/harness/triage.ts +127 -0
- package/src/harness/viewpoint-ledger.ts +2 -2
- package/src/hooks/bash-write-targets.ts +109 -0
- package/src/hooks/claude-hook-entry.ts +85 -0
- package/src/hooks/claude-transcript-turn.ts +96 -0
- package/src/hooks/guard-delivery-contract-rule.ts +110 -0
- package/src/hooks/guard-protected-paths.ts +70 -0
- package/src/hooks/guard-rules.ts +98 -0
- package/src/hooks/guard-tty-spoof-rule.ts +31 -0
- package/src/hooks/hand-back-core.ts +106 -0
- package/src/hooks/hook-cli-command.ts +17 -0
- package/src/hooks/hook-registry.ts +24 -0
- package/src/hooks/hook-result-contract.ts +114 -0
- package/src/hooks/hook-toggles.ts +66 -0
- package/src/hooks/pre-tool-guard-hook.ts +67 -0
- package/src/hooks/session-start-unit-state-hook.ts +54 -0
- package/src/hooks/stop-next-step-hook.ts +37 -0
- package/src/hooks/sungen-project-root.ts +80 -0
- package/src/orchestrator/ai-skills/command-partial-includes.ts +72 -0
- package/src/orchestrator/ai-skills/commands.ts +22 -8
- package/src/orchestrator/ai-skills/golden-skills.test.ts +23 -0
- package/src/orchestrator/claude-hooks-install.ts +168 -0
- package/src/orchestrator/lockstep-version.ts +28 -15
- package/src/orchestrator/project-initializer.ts +21 -0
- package/src/orchestrator/screen-manager.ts +3 -1
- package/src/orchestrator/templates/ai-src/commands/add-api.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/add-flow.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/add-screen.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/create-data-test.md +1 -0
- package/src/orchestrator/templates/ai-src/commands/create-test.md +14 -16
- package/src/orchestrator/templates/ai-src/commands/dashboard.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/delivery.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/design.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/feedback.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/locale.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/review.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/run-test.md +14 -10
- package/src/orchestrator/templates/ai-src/config/claude.md +20 -7
- package/src/orchestrator/templates/ai-src/config/copilot.md +20 -7
- package/src/orchestrator/templates/ai-src/partials/hand-back-rule.claude.md +20 -0
- package/src/orchestrator/templates/ai-src/partials/hand-back-rule.codex.md +20 -0
- package/src/orchestrator/templates/ai-src/partials/hand-back-rule.copilot.md +20 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-api-coverage-model/SKILL.md +1 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-capture-mobile/SKILL.md +3 -3
- package/src/orchestrator/templates/ai-src/skills/sungen-data-factory/SKILL.md +9 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +2 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +1 -1
- package/src/orchestrator/templates/ai-src/skills/sungen-harness-audit/SKILL.md +2 -0
- package/src/orchestrator/templates/claude-hooks/sungen-hook.cjs +64 -0
- package/src/utils/safe-yaml-parse.ts +44 -0
package/src/harness/journey.ts
CHANGED
|
@@ -17,8 +17,16 @@ import * as path from 'path';
|
|
|
17
17
|
import * as crypto from 'crypto';
|
|
18
18
|
import { reportSlug } from './unit-paths';
|
|
19
19
|
import { readTextFile } from './read-text';
|
|
20
|
+
import { assertNoPendingMigration } from '../basis/migration-sentinel';
|
|
21
|
+
import { commitWaiverSync, planWaiverSync, recordWaiver, untrustedWaiverText } from '../decisions/legacy-waiver-migration';
|
|
22
|
+
import { DecisionConflictError } from '../decisions/append-decision';
|
|
23
|
+
import { resolveRule } from './gates/resolve-rule';
|
|
24
|
+
import { applyAuditOverrides, decisionFindingText, DecisionGateFinding, ignoredOverrideText, journeyDecisionFindings, readJourneyAudit, unitOverrides } from './gates/journey-gate-inputs';
|
|
25
|
+
import { IN_RUN_RULE, uncommittedReleaseDecisions } from './gates/in-run-decision-check';
|
|
26
|
+
import { PROJECT_SCOPE } from '../decisions/decision-file';
|
|
20
27
|
|
|
21
|
-
|
|
28
|
+
/** `overridden`: the audit recorded a gate-override on the obligation's rule (OES-11.2) — accepted like a waiver. */
|
|
29
|
+
export type ObStatus = 'satisfied' | 'needs-work' | 'pending' | 'waived' | 'overridden';
|
|
22
30
|
|
|
23
31
|
export interface Obligation {
|
|
24
32
|
id: string;
|
|
@@ -26,6 +34,7 @@ export interface Obligation {
|
|
|
26
34
|
status: ObStatus;
|
|
27
35
|
detail: string;
|
|
28
36
|
waivedReason?: string; // S2 — set when the QA explicitly waived this obligation
|
|
37
|
+
overriddenBy?: string; // P0 — the gate-override decision the audit applied to this obligation's rule
|
|
29
38
|
}
|
|
30
39
|
|
|
31
40
|
/** S5 — a parsed anchor so an IDE can jump straight to what needs review. */
|
|
@@ -42,6 +51,10 @@ export interface JourneyReport {
|
|
|
42
51
|
obligations: Obligation[];
|
|
43
52
|
needsYou: ReviewItem[]; // S5 — the review queue: human-judgment findings, each with an anchor
|
|
44
53
|
nextSuggested: string;
|
|
54
|
+
/** T3 — set when an audit report exists but does not count (stale or untrusted). */
|
|
55
|
+
auditNotCounted?: string;
|
|
56
|
+
/** Decision files that do not verify, edited committed entries, rejected overrides — hard, block the gate. */
|
|
57
|
+
decisionFindings?: DecisionGateFinding[];
|
|
45
58
|
}
|
|
46
59
|
|
|
47
60
|
function readJSON(p: string): any {
|
|
@@ -74,7 +87,11 @@ const SAT = 0.8; // axis at/above this = satisfied (below = needs-work)
|
|
|
74
87
|
|
|
75
88
|
function computeFresh(projectRoot: string, unit: string): JourneyReport {
|
|
76
89
|
const slug = reportSlug(unit);
|
|
77
|
-
|
|
90
|
+
// T3: the report is an output — read through the checks; stale or untrusted counts as never audited.
|
|
91
|
+
const read = readJourneyAudit(projectRoot, unit);
|
|
92
|
+
const notCountedReason = read.notCountedReason;
|
|
93
|
+
// The verifier checked the top-level keys and types; nested fields are read defensively below, as before.
|
|
94
|
+
const audit = read.audit as any;
|
|
78
95
|
const phases = readLedgerPhases(path.join(projectRoot, '.sungen', 'ledger', `${slug}.jsonl`));
|
|
79
96
|
|
|
80
97
|
const from: string[] = [];
|
|
@@ -89,10 +106,11 @@ function computeFresh(projectRoot: string, unit: string): JourneyReport {
|
|
|
89
106
|
|
|
90
107
|
if (!audit) {
|
|
91
108
|
// Nothing measured yet — the journey hasn't really begun.
|
|
92
|
-
obligations.push({ id: 'OB-create', title: 'Generate test cases', status: 'pending', detail: 'No audit report yet — run /sungen:create-test.' });
|
|
109
|
+
obligations.push({ id: 'OB-create', title: 'Generate test cases', status: 'pending', detail: notCountedReason ?? 'No audit report yet — run /sungen:create-test.' });
|
|
93
110
|
return {
|
|
94
|
-
unit, generatedFrom: from, youAreHere, phasesDone: phases, gateStatus: null, score: null,
|
|
95
|
-
|
|
111
|
+
unit, generatedFrom: from, youAreHere, phasesDone: phases, gateStatus: null, score: null, obligations, needsYou,
|
|
112
|
+
nextSuggested: notCountedReason ?? 'Run `/sungen:create-test ' + unit + '` to begin.',
|
|
113
|
+
...(notCountedReason ? { auditNotCounted: notCountedReason } : {}),
|
|
96
114
|
};
|
|
97
115
|
}
|
|
98
116
|
|
|
@@ -116,6 +134,8 @@ function computeFresh(projectRoot: string, unit: string): JourneyReport {
|
|
|
116
134
|
status: autoPending ? 'needs-work' : 'satisfied',
|
|
117
135
|
detail: autoPending ? `${audit.automatableManual.automatable} @manual scenario(s) a driver could automate` : 'no capability-pending automatable cases',
|
|
118
136
|
});
|
|
137
|
+
// What the audit already applied — never re-applied here, and only while that override is in force.
|
|
138
|
+
const ignored = applyAuditOverrides(obligations, audit, unitOverrides(projectRoot, unit).inForce);
|
|
119
139
|
|
|
120
140
|
// Needs-you: the review queue. Prefer PRECISE per-scenario anchors from audit's structured
|
|
121
141
|
// depth data — each shallow business-critical scenario carries its own VP id — over regex-parsing
|
|
@@ -128,6 +148,7 @@ function computeFresh(projectRoot: string, unit: string): JourneyReport {
|
|
|
128
148
|
anchor: extractAnchor(s.name),
|
|
129
149
|
});
|
|
130
150
|
}
|
|
151
|
+
for (const g of ignored) needsYou.push({ text: ignoredOverrideText(g), anchor: {} });
|
|
131
152
|
const haveStructuredDepth = shallowBC.length > 0;
|
|
132
153
|
for (const f of (audit.findings || [])) {
|
|
133
154
|
if (!isHumanFinding(f)) continue;
|
|
@@ -143,7 +164,7 @@ function computeFresh(projectRoot: string, unit: string): JourneyReport {
|
|
|
143
164
|
});
|
|
144
165
|
|
|
145
166
|
// Next suggested = first non-satisfied obligation; if all satisfied but run-test not done → run.
|
|
146
|
-
const firstGap = obligations.find((o) => o.status !== 'satisfied' && o.id !== 'OB-signoff');
|
|
167
|
+
const firstGap = obligations.find((o) => o.status !== 'satisfied' && o.status !== 'overridden' && o.id !== 'OB-signoff');
|
|
147
168
|
let nextSuggested: string;
|
|
148
169
|
if (firstGap) nextSuggested = `Repair "${firstGap.title}" (${firstGap.detail}).`;
|
|
149
170
|
else if (!ran('run')) nextSuggested = `Quality satisfied — run \`/sungen:run-test ${unit}\`.`;
|
|
@@ -158,9 +179,9 @@ function computeFresh(projectRoot: string, unit: string): JourneyReport {
|
|
|
158
179
|
|
|
159
180
|
// ---------------- S2: writable lifecycle — persisted waivers + reconcile ----------------
|
|
160
181
|
|
|
161
|
-
|
|
162
|
-
interface Signoff { by?: string; at: string; auditHashAtSignoff: string; } // S5
|
|
163
|
-
interface JourneyState { unit: string; auditHash: string; waivers: Record<string,
|
|
182
|
+
// Waivers live in the decision layer (DOS-13.5); this file keeps a dual-written copy for one release.
|
|
183
|
+
interface Signoff { by?: string; at: string; auditHashAtSignoff: string; } // S5 — stays here in P0
|
|
184
|
+
interface JourneyState { unit: string; auditHash: string; waivers: Record<string, unknown>; signoff?: Signoff; }
|
|
164
185
|
|
|
165
186
|
function statePath(projectRoot: string, slug: string): string {
|
|
166
187
|
return path.join(projectRoot, '.sungen', 'journey', `${slug}.state.json`);
|
|
@@ -176,9 +197,14 @@ function saveState(p: string, s: JourneyState): void {
|
|
|
176
197
|
fs.writeFileSync(p, JSON.stringify(s, null, 2), 'utf-8');
|
|
177
198
|
}
|
|
178
199
|
|
|
200
|
+
/** An obligation that does not block: met, waived by a human, or overridden by the audit's gate-override. */
|
|
201
|
+
const accepted = (s: ObStatus): boolean => s === 'satisfied' || s === 'waived' || s === 'overridden';
|
|
202
|
+
|
|
179
203
|
/** Recompute nextSuggested AFTER waivers are applied (a waived obligation is not a gap). */
|
|
180
204
|
function computeNext(r: JourneyReport, unit: string): string {
|
|
181
|
-
const
|
|
205
|
+
const bad = r.decisionFindings?.[0];
|
|
206
|
+
if (bad) return `Resolve ${r.decisionFindings!.length} decision problem(s) first — ${bad.rule} on ${bad.path}.`;
|
|
207
|
+
const gap = r.obligations.find((o) => !accepted(o.status) && o.id !== 'OB-signoff');
|
|
182
208
|
if (gap) return `Repair "${gap.title}" (${gap.detail}).`;
|
|
183
209
|
if (!r.phasesDone.some((s) => s === 'run' || s.startsWith('run'))) return `Quality satisfied — run \`/sungen:run-test ${unit}\`.`;
|
|
184
210
|
return `All obligations satisfied/waived — review the ${r.needsYou.length} queued item(s), then sign off & deliver.`;
|
|
@@ -190,16 +216,25 @@ function computeNext(r: JourneyReport, unit: string): string {
|
|
|
190
216
|
* - an active waiver (evidence unchanged) sets status='waived' (carries the reason);
|
|
191
217
|
* - a STALE waiver (audit changed since it was waived) is re-surfaced for re-decision (anti-amnesia).
|
|
192
218
|
* Then persist the current evidence cursor.
|
|
219
|
+
* Waivers in force come from the decision layer; legacy waivers that match git HEAD are imported once,
|
|
220
|
+
* others are UNTRUSTED (not counted, listed for a human), and the result is dual-written back.
|
|
221
|
+
* A read-only checkout gets the same board without throwing.
|
|
193
222
|
*/
|
|
194
223
|
export function runJourney(projectRoot: string, unit: string): JourneyReport {
|
|
195
224
|
const slug = reportSlug(unit);
|
|
225
|
+
assertNoPendingMigration(projectRoot, slug);
|
|
196
226
|
const report = computeFresh(projectRoot, unit);
|
|
197
227
|
const sp = statePath(projectRoot, slug);
|
|
198
228
|
const state = loadState(sp) || { unit, auditHash: '', waivers: {} };
|
|
199
229
|
const curHash = auditHashOf(projectRoot, slug);
|
|
230
|
+
const sync = planWaiverSync(projectRoot, unit, slug, sp, state.waivers);
|
|
231
|
+
for (const u of sync.untrusted) {
|
|
232
|
+
const title = report.obligations.find((o) => o.id === u.obligation)?.title ?? u.obligation;
|
|
233
|
+
report.needsYou.unshift({ text: untrustedWaiverText(unit, slug, title, u), anchor: { vpId: u.obligation } });
|
|
234
|
+
}
|
|
200
235
|
|
|
201
236
|
for (const ob of report.obligations) {
|
|
202
|
-
const w =
|
|
237
|
+
const w = sync.waivers[ob.id];
|
|
203
238
|
if (!w) continue;
|
|
204
239
|
if (w.auditHashAtWaive === curHash) {
|
|
205
240
|
ob.status = 'waived';
|
|
@@ -220,8 +255,21 @@ export function runJourney(projectRoot: string, unit: string): JourneyReport {
|
|
|
220
255
|
report.needsYou.unshift({ text: `⚠️ Sign-off is STALE (suite changed since ${state.signoff.at}) — re-review and sign off again.`, anchor: { vpId: 'OB-signoff' } });
|
|
221
256
|
}
|
|
222
257
|
}
|
|
258
|
+
// Phase-03 carry-over: a decision that does not verify is a FINDING the gate blocks on, not a crash.
|
|
259
|
+
const decisionFindings = journeyDecisionFindings(projectRoot, unitOverrides(projectRoot, unit));
|
|
260
|
+
const next: JourneyState = { unit, auditHash: curHash, waivers: sync.stateWaivers, signoff: state.signoff };
|
|
261
|
+
try {
|
|
262
|
+
commitWaiverSync(projectRoot, unit, slug, sync, sp, JSON.stringify(next, null, 2));
|
|
263
|
+
} catch (err) {
|
|
264
|
+
if (!(err instanceof DecisionConflictError)) throw err;
|
|
265
|
+
const rel = path.relative(projectRoot, err.path).split(path.sep).join('/');
|
|
266
|
+
if (!decisionFindings.some((f) => f.path === rel)) decisionFindings.push({ rule: 'decision.mutated', path: rel, message: err.message });
|
|
267
|
+
}
|
|
268
|
+
if (decisionFindings.length) {
|
|
269
|
+
report.decisionFindings = decisionFindings;
|
|
270
|
+
for (const f of [...decisionFindings].reverse()) report.needsYou.unshift({ text: decisionFindingText(f), anchor: { file: f.path } });
|
|
271
|
+
}
|
|
223
272
|
report.nextSuggested = computeNext(report, unit);
|
|
224
|
-
saveState(sp, { unit, auditHash: curHash, waivers: state.waivers, signoff: state.signoff });
|
|
225
273
|
return report;
|
|
226
274
|
}
|
|
227
275
|
|
|
@@ -234,16 +282,14 @@ export function waive(projectRoot: string, unit: string, obId: string, reason: s
|
|
|
234
282
|
throw new Error('A reason is required to waive (anti-amnesia: a waiver must record WHY). Use --reason "...".');
|
|
235
283
|
}
|
|
236
284
|
const slug = reportSlug(unit);
|
|
237
|
-
const fresh =
|
|
285
|
+
const fresh = runJourney(projectRoot, unit); // stops on a pending migration; imports legacy waivers first
|
|
238
286
|
const valid = fresh.obligations.map((o) => o.id);
|
|
239
287
|
if (!valid.includes(obId)) {
|
|
240
288
|
throw new Error(`Unknown obligation "${obId}". Valid: ${valid.join(', ')}`);
|
|
241
289
|
}
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
saveState(sp, state);
|
|
246
|
-
return runJourney(projectRoot, unit);
|
|
290
|
+
const given = { reason: reason.trim(), at: new Date().toISOString(), auditHashAtWaive: auditHashOf(projectRoot, slug) };
|
|
291
|
+
recordWaiver(projectRoot, unit, obId, given); // DOS-13.5: the decision layer is the record …
|
|
292
|
+
return runJourney(projectRoot, unit); // … and runJourney dual-writes it to the legacy file
|
|
247
293
|
}
|
|
248
294
|
|
|
249
295
|
/**
|
|
@@ -253,7 +299,10 @@ export function waive(projectRoot: string, unit: string, obId: string, reason: s
|
|
|
253
299
|
*/
|
|
254
300
|
export function signoff(projectRoot: string, unit: string, by?: string): JourneyReport {
|
|
255
301
|
const before = runJourney(projectRoot, unit);
|
|
256
|
-
const blockers = before.obligations.filter((o) => o.id !== 'OB-signoff' && o.status
|
|
302
|
+
const blockers = before.obligations.filter((o) => o.id !== 'OB-signoff' && !accepted(o.status));
|
|
303
|
+
if (before.decisionFindings?.length) {
|
|
304
|
+
throw new Error(`Cannot sign off — ${before.decisionFindings.length} decision problem(s): ${before.decisionFindings.map((f) => `${f.rule} ${f.path}`).join(', ')}.`);
|
|
305
|
+
}
|
|
257
306
|
if (blockers.length) {
|
|
258
307
|
throw new Error(`Cannot sign off — still open: ${blockers.map((b) => b.id).join(', ')}. Fix, or waive each with a reason, first.`);
|
|
259
308
|
}
|
|
@@ -265,7 +314,24 @@ export function signoff(projectRoot: string, unit: string, by?: string): Journey
|
|
|
265
314
|
return runJourney(projectRoot, unit);
|
|
266
315
|
}
|
|
267
316
|
|
|
268
|
-
const
|
|
317
|
+
const UNWRITABLE = new Set(['EACCES', 'EROFS', 'ENOSPC', 'EPERM']);
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Write a DERIVED journey file (board, report, roll-up). Best-effort by contract (DOS-13.3): a read-only
|
|
321
|
+
* or full checkout still shows the board — the file is skipped and null returned; any other error throws.
|
|
322
|
+
*/
|
|
323
|
+
export function writeJourneyFileBestEffort(file: string, text: string): string | null {
|
|
324
|
+
try {
|
|
325
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
326
|
+
fs.writeFileSync(file, text, 'utf-8');
|
|
327
|
+
return file;
|
|
328
|
+
} catch (err) {
|
|
329
|
+
if (UNWRITABLE.has((err as NodeJS.ErrnoException)?.code ?? '')) return null;
|
|
330
|
+
throw err;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const ICON: Record<ObStatus, string> = { satisfied: '✅', 'needs-work': '⚠️ ', pending: '⏳', waived: '🚫', overridden: '🔓' };
|
|
269
335
|
|
|
270
336
|
export function renderJourneyBoard(r: JourneyReport): string {
|
|
271
337
|
const L: string[] = [];
|
|
@@ -308,6 +374,10 @@ export interface GateVerdict {
|
|
|
308
374
|
required: string[];
|
|
309
375
|
blockers: { id: string; title: string; detail: string }[];
|
|
310
376
|
waivedCredit: { id: string; title: string }[]; // required obligations accepted via an explicit waiver
|
|
377
|
+
/** Required obligations accepted because the audit applied a gate-override to their rule. */
|
|
378
|
+
overriddenCredit?: { id: string; title: string; by: string }[];
|
|
379
|
+
/** The phase rule itself was lowered by this gate-override: the open obligations do not halt. */
|
|
380
|
+
phaseOverriddenBy?: string;
|
|
311
381
|
}
|
|
312
382
|
|
|
313
383
|
const PHASE_REQUIRED: Record<GatePhase, string[]> = {
|
|
@@ -319,23 +389,48 @@ const PHASE_REQUIRED: Record<GatePhase, string[]> = {
|
|
|
319
389
|
deliver: ['OB-spec', 'OB-coverage', 'OB-depth', 'OB-trace', 'OB-automation', 'OB-signoff'],
|
|
320
390
|
};
|
|
321
391
|
|
|
392
|
+
/** The catalog rule each phase boundary halts by (OES-11.2): soft, so a reasoned override may lower it. */
|
|
393
|
+
const PHASE_RULE: Record<GatePhase, string> = { create: 'journey.phase-create', run: 'journey.phase-run', deliver: 'journey.phase-deliver' };
|
|
394
|
+
|
|
322
395
|
export function runGate(projectRoot: string, unit: string, phase: GatePhase): GateVerdict {
|
|
323
396
|
const r = runJourney(projectRoot, unit);
|
|
324
397
|
const required = PHASE_REQUIRED[phase];
|
|
325
|
-
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
-
|
|
398
|
+
// T3: a unit never audited (or whose report does not count) is never clean — OB-create blocks every phase.
|
|
399
|
+
const reqObs = r.obligations.filter((o) => required.includes(o.id) || o.id === 'OB-create');
|
|
400
|
+
const asBlocker = (o: Obligation) => ({ id: o.id, title: o.title, detail: o.detail });
|
|
401
|
+
// Never audited is not something a lowered phase rule may wave through (review M4).
|
|
402
|
+
const neverAudited = reqObs.filter((o) => o.id === 'OB-create' && !accepted(o.status)).map(asBlocker);
|
|
403
|
+
const open = reqObs.filter((o) => o.id !== 'OB-create' && !accepted(o.status)).map(asBlocker);
|
|
404
|
+
const overrides = unitOverrides(projectRoot, unit);
|
|
405
|
+
// Decision problems are hard rules: no phase override lowers them. At the release boundary an
|
|
406
|
+
// override, waiver or approval git HEAD does not hold is refused too (decision.in-run, review H1).
|
|
407
|
+
const scopes = [PROJECT_SCOPE, ...(overrides.unitScope ? [overrides.unitScope] : [])];
|
|
408
|
+
const hard = [
|
|
409
|
+
...(r.decisionFindings ?? []).filter((f) => resolveRule(f.rule).blocking)
|
|
410
|
+
.map((f) => ({ id: f.rule, title: 'Decision integrity', detail: `${f.path} — ${f.message}` })),
|
|
411
|
+
...(phase === 'deliver' && resolveRule(IN_RUN_RULE).blocking ? uncommittedReleaseDecisions(projectRoot, scopes) : [])
|
|
412
|
+
.map((d) => ({ id: IN_RUN_RULE, title: 'Decision not reviewed', detail: `${d.kind} ${d.id} (${d.path}) — ${d.why.join('; ')}` })),
|
|
413
|
+
...neverAudited,
|
|
414
|
+
];
|
|
415
|
+
const phaseRule = resolveRule(PHASE_RULE[phase], overrides.context);
|
|
416
|
+
const blockers = [...hard, ...open];
|
|
417
|
+
const halt = hard.length > 0 || (open.length > 0 && phaseRule.blocking);
|
|
329
418
|
const waivedCredit = reqObs.filter((o) => o.status === 'waived').map((o) => ({ id: o.id, title: o.title }));
|
|
330
|
-
|
|
419
|
+
const overriddenCredit = reqObs.filter((o) => o.status === 'overridden').map((o) => ({ id: o.id, title: o.title, by: o.overriddenBy ?? '' }));
|
|
420
|
+
return {
|
|
421
|
+
unit, phase, status: halt ? 'halt' : 'pass', required, blockers, waivedCredit,
|
|
422
|
+
...(overriddenCredit.length ? { overriddenCredit } : {}),
|
|
423
|
+
...(open.length && phaseRule.overriddenBy ? { phaseOverriddenBy: phaseRule.overriddenBy } : {}),
|
|
424
|
+
};
|
|
331
425
|
}
|
|
332
426
|
|
|
333
427
|
export function renderGate(v: GateVerdict): string {
|
|
334
428
|
const L: string[] = [];
|
|
335
429
|
L.push('');
|
|
336
430
|
L.push(`━━━ Gate: ${v.unit} @ phase "${v.phase}" → ${v.status === 'pass' ? '✅ PASS' : '⛔ HALT'} ━━━`);
|
|
431
|
+
if (v.phaseOverriddenBy) L.push(` Phase rule lowered by ${v.phaseOverriddenBy}: open obligations are advisory (decision problems still block).`);
|
|
337
432
|
if (v.blockers.length) {
|
|
338
|
-
L.push(' Blocking obligations (must be satisfied or explicitly waived):');
|
|
433
|
+
L.push(v.phaseOverriddenBy ? ' Open obligations:' : ' Blocking obligations (must be satisfied or explicitly waived):');
|
|
339
434
|
for (const b of v.blockers) L.push(` • ${b.id} ${b.title} — ${b.detail}`);
|
|
340
435
|
L.push(' → Self-correct (repair / run-test), or `sungen journey --screen ' + v.unit + ' --waive <OB> --reason "..."` if accepted.');
|
|
341
436
|
} else {
|
|
@@ -388,7 +483,7 @@ export function rollupJourney(projectRoot: string): UnitSummary[] {
|
|
|
388
483
|
const r = runJourney(projectRoot, unit);
|
|
389
484
|
const signedOff = r.obligations.find((o) => o.id === 'OB-signoff')?.status === 'satisfied';
|
|
390
485
|
const obligationsOpen = r.obligations.filter(
|
|
391
|
-
(o) => o.id !== 'OB-signoff' && o.status
|
|
486
|
+
(o) => o.id !== 'OB-signoff' && !accepted(o.status),
|
|
392
487
|
).length;
|
|
393
488
|
return {
|
|
394
489
|
unit, kind, score: r.score, gateStatus: r.gateStatus, youAreHere: r.youAreHere,
|
package/src/harness/manifest.ts
CHANGED
|
@@ -6,20 +6,33 @@
|
|
|
6
6
|
* scenario: keep / regenerate / retire — so the orchestrator regenerates only the
|
|
7
7
|
* parts whose spec changed (stable + cheap), and never silently drifts.
|
|
8
8
|
*
|
|
9
|
+
* Schema 2 (DOS-12.3, red-team #1): each entry names its `hashAlgo`. Section entries keep `sha1-12`
|
|
10
|
+
* and the fuzzy `matchSection` — changing either would make every manifest on disk read "changed".
|
|
11
|
+
* Only item anchors (`<docId>#<itemId>` in a `# --- Section: … ---` comment) use `sha256-12` + exact
|
|
12
|
+
* ids. A manifest WITHOUT `schema` is compared as is (its sections are sha1-12) and upgraded on save.
|
|
9
13
|
* Deterministic. Manifest lives at .sungen/manifest/<screen>.json.
|
|
10
14
|
*/
|
|
11
15
|
import * as fs from 'fs';
|
|
12
16
|
import * as path from 'path';
|
|
13
|
-
import { createHash } from 'crypto';
|
|
14
17
|
import { featureFilesFor, reportSlug } from './unit-paths';
|
|
15
18
|
import { readTextFile } from './read-text';
|
|
19
|
+
import { vpCodeOf } from './parse';
|
|
20
|
+
import { HashAlgo, sectionHash } from '../basis/anchor-hash';
|
|
21
|
+
import { isItemAnchorId } from '../basis/anchor-grammar';
|
|
22
|
+
import { extractSpecAnchors } from '../basis/extract-spec-anchors';
|
|
23
|
+
import { normalizeSectionName as norm, readSpecSectionBlocks } from '../basis/spec-sections';
|
|
24
|
+
import { assertNoPendingMigration, withMigrationSentinel } from '../basis/migration-sentinel';
|
|
25
|
+
|
|
26
|
+
export const MANIFEST_SCHEMA = 2;
|
|
16
27
|
|
|
17
28
|
export interface SpecSection { name: string; hash: string }
|
|
18
|
-
export interface ManifestEntry { scenario: string; vpCode?: string; section: string; specHash: string }
|
|
29
|
+
export interface ManifestEntry { scenario: string; vpCode?: string; section: string; specHash: string; hashAlgo?: HashAlgo }
|
|
19
30
|
export interface Manifest {
|
|
31
|
+
schema?: number; // absent = written before schema 2 → silent re-baseline
|
|
20
32
|
screen: string;
|
|
21
33
|
builtAt: string;
|
|
22
|
-
specSections: Record<string, string>; // section name →
|
|
34
|
+
specSections: Record<string, string>; // section name → sha1-12 (snapshot at build time)
|
|
35
|
+
specItems?: Record<string, string>; // item anchor → sha256-12 (schema 2, BM-51 specs with a docId)
|
|
23
36
|
entries: ManifestEntry[]; // scenario ↔ section ↔ hash
|
|
24
37
|
}
|
|
25
38
|
|
|
@@ -32,13 +45,6 @@ export interface ChangePlan {
|
|
|
32
45
|
summary: { keep: number; regenerate: number; retire: number; newSections: number };
|
|
33
46
|
}
|
|
34
47
|
|
|
35
|
-
function norm(s: string): string {
|
|
36
|
-
return s.replace(/\(Tier[^)]*\)/i, '').replace(/[#*-]/g, '').trim().toLowerCase().replace(/\s+/g, ' ');
|
|
37
|
-
}
|
|
38
|
-
function shortHash(s: string): string {
|
|
39
|
-
return createHash('sha1').update(s).digest('hex').slice(0, 12);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
48
|
const NO_SPEC = '(no-spec-link)';
|
|
43
49
|
|
|
44
50
|
/**
|
|
@@ -60,21 +66,17 @@ function matchSection(featureSection: string, specNames: string[]): string | nul
|
|
|
60
66
|
/** Parse spec.md into hashable sections (## and ### headings; "Section:" prefix stripped). */
|
|
61
67
|
export function parseSpecSections(specPath: string): SpecSection[] {
|
|
62
68
|
if (!fs.existsSync(specPath)) return [];
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
} else if (cur) {
|
|
73
|
-
cur.body.push(line);
|
|
74
|
-
}
|
|
69
|
+
return readSpecSectionBlocks(readTextFile(specPath).split('\n')).map((s) => ({ name: norm(s.name), hash: sectionHash(s.body) }));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Item anchors a scenario can be linked to exactly: unambiguous §4.1 items and their §4.2 rows. */
|
|
73
|
+
function parseSpecItems(specPath: string): Record<string, string> {
|
|
74
|
+
if (!fs.existsSync(specPath)) return {};
|
|
75
|
+
const out: Record<string, string> = {};
|
|
76
|
+
for (const a of extractSpecAnchors(readTextFile(specPath), { repo: '.', sha: 'WORKTREE', path: 'spec.md' }).anchors) {
|
|
77
|
+
if (a.kind !== 'section' && a.confidence === 'EXTRACTED') out[a.id] = a.hash;
|
|
75
78
|
}
|
|
76
|
-
|
|
77
|
-
return sections.map((s) => ({ name: norm(s.name), hash: shortHash(s.body.join('\n').trim()) }));
|
|
79
|
+
return out;
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
/** Parse feature into scenario → section mapping using `# --- Section: X ---` comments. */
|
|
@@ -86,12 +88,11 @@ function parseFeatureSections(featurePath: string): { scenario: string; vpCode?:
|
|
|
86
88
|
for (const raw of lines) {
|
|
87
89
|
const line = raw.trim();
|
|
88
90
|
const sc = line.match(/^#\s*-{2,}\s*Section:\s*(.*?)\s*-{2,}\s*$/i);
|
|
89
|
-
if (sc) { section = norm(sc[1]); continue; }
|
|
91
|
+
if (sc) { section = isItemAnchorId(sc[1].trim()) ? sc[1].trim() : norm(sc[1]); continue; }
|
|
90
92
|
const s = line.match(/^Scenario:\s*(.*)$/);
|
|
91
93
|
if (s) {
|
|
92
94
|
const name = s[1].trim();
|
|
93
|
-
|
|
94
|
-
out.push({ scenario: name, vpCode: code, section });
|
|
95
|
+
out.push({ scenario: name, vpCode: vpCodeOf(name).vpCode, section });
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
return out;
|
|
@@ -100,44 +101,55 @@ function parseFeatureSections(featurePath: string): { scenario: string; vpCode?:
|
|
|
100
101
|
export function buildManifest(screenDir: string, screenName: string): Manifest {
|
|
101
102
|
const specPath = path.join(screenDir, 'requirements', 'spec.md');
|
|
102
103
|
const featureFiles = featureFilesFor(screenDir, screenName);
|
|
103
|
-
const specSections = parseSpecSections(specPath);
|
|
104
104
|
const specMap: Record<string, string> = {};
|
|
105
|
-
for (const s of
|
|
105
|
+
for (const s of parseSpecSections(specPath)) specMap[s.name] = s.hash;
|
|
106
|
+
const specItems = parseSpecItems(specPath);
|
|
106
107
|
|
|
107
108
|
const specNames = Object.keys(specMap);
|
|
108
|
-
const
|
|
109
|
-
|
|
109
|
+
const entries: ManifestEntry[] = featureFiles.flatMap(parseFeatureSections).map((f) => {
|
|
110
|
+
const base = { scenario: f.scenario, vpCode: f.vpCode };
|
|
111
|
+
if (isItemAnchorId(f.section)) {
|
|
112
|
+
const hash = specItems[f.section];
|
|
113
|
+
return hash ? { ...base, section: f.section, specHash: hash, hashAlgo: 'sha256-12' as HashAlgo } : { ...base, section: f.section, specHash: NO_SPEC };
|
|
114
|
+
}
|
|
110
115
|
const matched = matchSection(f.section, specNames);
|
|
111
|
-
return
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
section: matched ?? f.section, // canonical spec section when matched
|
|
115
|
-
specHash: matched ? specMap[matched] : NO_SPEC,
|
|
116
|
-
};
|
|
116
|
+
return matched
|
|
117
|
+
? { ...base, section: matched, specHash: specMap[matched], hashAlgo: 'sha1-12' as HashAlgo } // canonical spec section when matched
|
|
118
|
+
: { ...base, section: f.section, specHash: NO_SPEC };
|
|
117
119
|
});
|
|
118
120
|
|
|
119
121
|
return {
|
|
122
|
+
schema: MANIFEST_SCHEMA,
|
|
120
123
|
screen: screenName,
|
|
121
124
|
builtAt: new Date().toISOString(),
|
|
122
125
|
specSections: specMap,
|
|
126
|
+
...(Object.keys(specItems).length ? { specItems } : {}),
|
|
123
127
|
entries,
|
|
124
128
|
};
|
|
125
129
|
}
|
|
126
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Compare a stored manifest — legacy or schema 2 — with the spec now. Read-only: it never rewrites
|
|
133
|
+
* the manifest. A legacy entry has no `hashAlgo` and is a section entry hashed sha1-12, exactly what
|
|
134
|
+
* the current code computes, so real drift since the legacy build reads `regenerate` and nothing reads
|
|
135
|
+
* "changed" merely because the format moved on.
|
|
136
|
+
*/
|
|
127
137
|
export function diffManifest(screenDir: string, screenName: string, manifest: Manifest): ChangePlan {
|
|
138
|
+
assertNoPendingMigration(process.cwd(), reportSlug(screenName));
|
|
128
139
|
const specPath = path.join(screenDir, 'requirements', 'spec.md');
|
|
129
|
-
const current = parseSpecSections(specPath);
|
|
130
140
|
const currentMap: Record<string, string> = {};
|
|
131
|
-
for (const s of
|
|
141
|
+
for (const s of parseSpecSections(specPath)) currentMap[s.name] = s.hash;
|
|
142
|
+
const currentItems = manifest.entries.some((e) => e.hashAlgo === 'sha256-12') ? parseSpecItems(specPath) : {};
|
|
132
143
|
|
|
133
144
|
const scenarios = manifest.entries.map((e) => {
|
|
134
145
|
let change: ChangeKind; let reason: string;
|
|
146
|
+
const what = e.hashAlgo === 'sha256-12' ? 'spec item' : 'spec section';
|
|
135
147
|
if (e.specHash === NO_SPEC) { change = 'keep'; reason = 'not linked to a spec section (manual/cross-cutting)'; }
|
|
136
148
|
else {
|
|
137
|
-
const now = currentMap[e.section];
|
|
138
|
-
if (now === undefined) { change = 'retire'; reason =
|
|
139
|
-
else if (now !== e.specHash) { change = 'regenerate'; reason =
|
|
140
|
-
else { change = 'keep'; reason =
|
|
149
|
+
const now = e.hashAlgo === 'sha256-12' ? currentItems[e.section] : currentMap[e.section];
|
|
150
|
+
if (now === undefined) { change = 'retire'; reason = `${what} "${e.section}" no longer exists`; }
|
|
151
|
+
else if (now !== e.specHash) { change = 'regenerate'; reason = `${what} "${e.section}" changed (${e.specHash} → ${now})`; }
|
|
152
|
+
else { change = 'keep'; reason = `${what} unchanged`; }
|
|
141
153
|
}
|
|
142
154
|
return { scenario: e.scenario, section: e.section, change, reason };
|
|
143
155
|
});
|
|
@@ -167,9 +179,21 @@ export function loadManifest(screenName: string): Manifest | null {
|
|
|
167
179
|
const p = manifestPath(screenName);
|
|
168
180
|
return fs.existsSync(p) ? JSON.parse(readTextFile(p)) : null;
|
|
169
181
|
}
|
|
170
|
-
|
|
171
|
-
|
|
182
|
+
/** The manifest on disk at `p`, or null when absent or unreadable (then a save is a plain write). */
|
|
183
|
+
function loadManifestFile(p: string): Manifest | null {
|
|
184
|
+
try { return fs.existsSync(p) ? JSON.parse(readTextFile(p)) : null; } catch { return null; }
|
|
185
|
+
}
|
|
186
|
+
function writeManifest(p: string, m: Manifest): void {
|
|
172
187
|
fs.mkdirSync(path.dirname(p), { recursive: true });
|
|
173
188
|
fs.writeFileSync(p, JSON.stringify(m, null, 2), 'utf-8');
|
|
189
|
+
}
|
|
190
|
+
/** Write a built manifest. Replacing a legacy (schema-less) file is the upgrade to schema 2, done under the sentinel. */
|
|
191
|
+
export function saveManifest(m: Manifest): string {
|
|
192
|
+
const slug = reportSlug(m.screen);
|
|
193
|
+
assertNoPendingMigration(process.cwd(), slug);
|
|
194
|
+
const p = manifestPath(m.screen);
|
|
195
|
+
const upgrading = m.schema === MANIFEST_SCHEMA && (loadManifestFile(p)?.schema ?? MANIFEST_SCHEMA) !== MANIFEST_SCHEMA;
|
|
196
|
+
if (upgrading) withMigrationSentinel(process.cwd(), m.screen, slug, 'manifest upgrade to schema 2', [p], () => writeManifest(p, m));
|
|
197
|
+
else writeManifest(p, m);
|
|
174
198
|
return p;
|
|
175
199
|
}
|