@sun-asterisk/sungen 3.2.35 → 3.3.0-alpha.10
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/discover.d.ts +4 -0
- package/dist/capabilities/discover.d.ts.map +1 -1
- package/dist/capabilities/discover.js +16 -2
- package/dist/capabilities/discover.js.map +1 -1
- 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/case-triage-hint.d.ts +14 -0
- package/dist/cli/case-triage-hint.d.ts.map +1 -0
- package/dist/cli/case-triage-hint.js +23 -0
- package/dist/cli/case-triage-hint.js.map +1 -0
- package/dist/cli/commands/audit.js +1 -1
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/capability.js +1 -1
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/contract-derive-command.d.ts +12 -0
- package/dist/cli/commands/contract-derive-command.d.ts.map +1 -0
- package/dist/cli/commands/contract-derive-command.js +113 -0
- package/dist/cli/commands/contract-derive-command.js.map +1 -0
- package/dist/cli/commands/contract.d.ts +20 -0
- package/dist/cli/commands/contract.d.ts.map +1 -0
- package/dist/cli/commands/contract.js +195 -0
- package/dist/cli/commands/contract.js.map +1 -0
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +109 -19
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/cli/commands/gate.d.ts.map +1 -1
- package/dist/cli/commands/gate.js +2 -1
- package/dist/cli/commands/gate.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +17 -3
- 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 +47 -17
- package/dist/cli/commands/journey.js.map +1 -1
- package/dist/cli/commands/next.d.ts +13 -0
- package/dist/cli/commands/next.d.ts.map +1 -1
- package/dist/cli/commands/next.js +98 -9
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/triage.d.ts +2 -1
- package/dist/cli/commands/triage.d.ts.map +1 -1
- package/dist/cli/commands/triage.js +45 -3
- package/dist/cli/commands/triage.js.map +1 -1
- 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 +37 -8
- 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/cli/json-error-on-exit.d.ts +34 -0
- package/dist/cli/json-error-on-exit.d.ts.map +1 -0
- package/dist/cli/json-error-on-exit.js +63 -0
- package/dist/cli/json-error-on-exit.js.map +1 -0
- package/dist/cli/project-sungen-invocation.d.ts +13 -0
- package/dist/cli/project-sungen-invocation.d.ts.map +1 -0
- package/dist/cli/project-sungen-invocation.js +95 -0
- package/dist/cli/project-sungen-invocation.js.map +1 -0
- package/dist/cli/run-command-hints.d.ts +9 -0
- package/dist/cli/run-command-hints.d.ts.map +1 -0
- package/dist/cli/run-command-hints.js +84 -0
- package/dist/cli/run-command-hints.js.map +1 -0
- package/dist/cli/waiting-for-you-block.d.ts +18 -0
- package/dist/cli/waiting-for-you-block.d.ts.map +1 -0
- package/dist/cli/waiting-for-you-block.js +22 -0
- package/dist/cli/waiting-for-you-block.js.map +1 -0
- package/dist/contract/accept-opaque-steps.d.ts +3 -0
- package/dist/contract/accept-opaque-steps.d.ts.map +1 -0
- package/dist/contract/accept-opaque-steps.js +114 -0
- package/dist/contract/accept-opaque-steps.js.map +1 -0
- package/dist/contract/approve-contract.d.ts +38 -0
- package/dist/contract/approve-contract.d.ts.map +1 -0
- package/dist/contract/approve-contract.js +93 -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 +22 -0
- package/dist/contract/build-trace-conformance.d.ts.map +1 -0
- package/dist/contract/build-trace-conformance.js +151 -0
- package/dist/contract/build-trace-conformance.js.map +1 -0
- package/dist/contract/classify-contract-change.d.ts +24 -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 +47 -0
- package/dist/contract/classify-trace-conformance.d.ts.map +1 -0
- package/dist/contract/classify-trace-conformance.js +164 -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 +92 -0
- package/dist/contract/contract-schema.d.ts.map +1 -0
- package/dist/contract/contract-schema.js +124 -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 +141 -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 +49 -0
- package/dist/contract/derive-free-feature.d.ts.map +1 -0
- package/dist/contract/derive-free-feature.js +183 -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 +75 -0
- package/dist/contract/project-contract-blockers.js.map +1 -0
- package/dist/contract/record-contract-approval.d.ts +36 -0
- package/dist/contract/record-contract-approval.d.ts.map +1 -0
- package/dist/contract/record-contract-approval.js +126 -0
- package/dist/contract/record-contract-approval.js.map +1 -0
- package/dist/contract/render-free-gherkin.d.ts +42 -0
- package/dist/contract/render-free-gherkin.d.ts.map +1 -0
- package/dist/contract/render-free-gherkin.js +147 -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 +20 -0
- package/dist/contract/resolve-unit-trace-identities.d.ts.map +1 -0
- package/dist/contract/resolve-unit-trace-identities.js +62 -0
- package/dist/contract/resolve-unit-trace-identities.js.map +1 -0
- package/dist/contract/trace/collect-trace-evidence.d.ts +44 -0
- package/dist/contract/trace/collect-trace-evidence.d.ts.map +1 -0
- package/dist/contract/trace/collect-trace-evidence.js +219 -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/read-file-once.d.ts +20 -0
- package/dist/contract/trace/read-file-once.d.ts.map +1 -0
- package/dist/contract/trace/read-file-once.js +135 -0
- package/dist/contract/trace/read-file-once.js.map +1 -0
- package/dist/contract/trace/scenario-id-claims.d.ts +11 -0
- package/dist/contract/trace/scenario-id-claims.d.ts.map +1 -0
- package/dist/contract/trace/scenario-id-claims.js +89 -0
- package/dist/contract/trace/scenario-id-claims.js.map +1 -0
- package/dist/contract/trace/select-final-attempt.d.ts +29 -0
- package/dist/contract/trace/select-final-attempt.d.ts.map +1 -0
- package/dist/contract/trace/select-final-attempt.js +119 -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 +22 -0
- package/dist/contract/trace/trace-binding.d.ts.map +1 -0
- package/dist/contract/trace/trace-binding.js +91 -0
- package/dist/contract/trace/trace-binding.js.map +1 -0
- package/dist/contract/trace/trace-file-reader.d.ts +47 -0
- package/dist/contract/trace/trace-file-reader.d.ts.map +1 -0
- package/dist/contract/trace/trace-file-reader.js +137 -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-freshness.d.ts +27 -0
- package/dist/contract/trace/trace-freshness.d.ts.map +1 -0
- package/dist/contract/trace/trace-freshness.js +146 -0
- package/dist/contract/trace/trace-freshness.js.map +1 -0
- package/dist/contract/trace/trace-identity-resolution.d.ts +28 -0
- package/dist/contract/trace/trace-identity-resolution.d.ts.map +1 -0
- package/dist/contract/trace/trace-identity-resolution.js +87 -0
- package/dist/contract/trace/trace-identity-resolution.js.map +1 -0
- package/dist/contract/trace/trace-run-record.d.ts +32 -0
- package/dist/contract/trace/trace-run-record.d.ts.map +1 -0
- package/dist/contract/trace/trace-run-record.js +135 -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 +45 -0
- package/dist/contract/trace/trace-zip-limits.d.ts.map +1 -0
- package/dist/contract/trace/trace-zip-limits.js +52 -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 +109 -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 +41 -0
- package/dist/decisions/confirmed-decision-commands.d.ts.map +1 -0
- package/dist/decisions/confirmed-decision-commands.js +190 -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 +43 -0
- package/dist/decisions/decision-schema.d.ts.map +1 -0
- package/dist/decisions/decision-schema.js +76 -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 +19 -0
- package/dist/decisions/git-head-trust.d.ts.map +1 -0
- package/dist/decisions/git-head-trust.js +128 -0
- package/dist/decisions/git-head-trust.js.map +1 -0
- package/dist/decisions/human-confirmation.d.ts +35 -0
- package/dist/decisions/human-confirmation.d.ts.map +1 -0
- package/dist/decisions/human-confirmation.js +161 -0
- package/dist/decisions/human-confirmation.js.map +1 -0
- package/dist/decisions/legacy-waiver-migration.d.ts +38 -0
- package/dist/decisions/legacy-waiver-migration.d.ts.map +1 -0
- package/dist/decisions/legacy-waiver-migration.js +179 -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 +11 -2
- package/dist/exporters/csv-exporter.d.ts.map +1 -1
- package/dist/exporters/csv-exporter.js +8 -4
- package/dist/exporters/csv-exporter.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 +10 -9
- package/dist/exporters/matrix/build.js.map +1 -1
- package/dist/exporters/matrix/export.d.ts +9 -1
- package/dist/exporters/matrix/export.d.ts.map +1 -1
- package/dist/exporters/matrix/export.js +13 -4
- 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 +3 -0
- 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 +3 -0
- package/dist/exporters/matrix/render-xlsx.js.map +1 -1
- package/dist/exporters/matrix/types.d.ts +4 -1
- package/dist/exporters/matrix/types.d.ts.map +1 -1
- package/dist/exporters/matrix/types.js.map +1 -1
- package/dist/exporters/matrix/xlsx-cells.js +1 -1
- package/dist/exporters/matrix/xlsx-cells.js.map +1 -1
- package/dist/exporters/test-data-resolver.d.ts.map +1 -1
- package/dist/exporters/test-data-resolver.js +2 -12
- package/dist/exporters/test-data-resolver.js.map +1 -1
- package/dist/exporters/xlsx-exporter.d.ts +3 -2
- package/dist/exporters/xlsx-exporter.d.ts.map +1 -1
- package/dist/exporters/xlsx-exporter.js +4 -4
- package/dist/exporters/xlsx-exporter.js.map +1 -1
- package/dist/generators/gherkin-parser/index.d.ts.map +1 -1
- package/dist/generators/gherkin-parser/index.js +0 -1
- package/dist/generators/gherkin-parser/index.js.map +1 -1
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/contain-text-assertion.hbs +1 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/fill-action.hbs +1 -13
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/contain-text-assertion.hbs +1 -9
- package/dist/generators/test-generator/code-generator.d.ts.map +1 -1
- package/dist/generators/test-generator/code-generator.js +18 -4
- package/dist/generators/test-generator/code-generator.js.map +1 -1
- package/dist/generators/test-generator/diagnostics.d.ts +3 -9
- package/dist/generators/test-generator/diagnostics.d.ts.map +1 -1
- package/dist/generators/test-generator/diagnostics.js +3 -9
- package/dist/generators/test-generator/diagnostics.js.map +1 -1
- package/dist/generators/test-generator/patterns/types.d.ts +1 -1
- package/dist/generators/test-generator/patterns/types.d.ts.map +1 -1
- package/dist/generators/test-generator/step-mapper.d.ts +0 -8
- package/dist/generators/test-generator/step-mapper.d.ts.map +1 -1
- package/dist/generators/test-generator/step-mapper.js +8 -52
- package/dist/generators/test-generator/step-mapper.js.map +1 -1
- package/dist/generators/test-generator/utils/data-resolver.d.ts +0 -16
- package/dist/generators/test-generator/utils/data-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/data-resolver.js +0 -59
- package/dist/generators/test-generator/utils/data-resolver.js.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.d.ts.map +1 -1
- package/dist/generators/test-generator/utils/selector-resolver.js +2 -10
- package/dist/generators/test-generator/utils/selector-resolver.js.map +1 -1
- package/dist/graph/board-human-actions.d.ts +5 -0
- package/dist/graph/board-human-actions.d.ts.map +1 -0
- package/dist/graph/board-human-actions.js +83 -0
- package/dist/graph/board-human-actions.js.map +1 -0
- package/dist/graph/evaluate-graph.d.ts +41 -0
- package/dist/graph/evaluate-graph.d.ts.map +1 -0
- package/dist/graph/evaluate-graph.js +77 -0
- package/dist/graph/evaluate-graph.js.map +1 -0
- package/dist/graph/human-action.d.ts +21 -0
- package/dist/graph/human-action.d.ts.map +1 -0
- package/dist/graph/human-action.js +3 -0
- package/dist/graph/human-action.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/manual-triage-decisions.d.ts +19 -0
- package/dist/graph/manual-triage-decisions.d.ts.map +1 -0
- package/dist/graph/manual-triage-decisions.js +53 -0
- package/dist/graph/manual-triage-decisions.js.map +1 -0
- package/dist/graph/node-decl.d.ts +75 -0
- package/dist/graph/node-decl.d.ts.map +1 -0
- package/dist/graph/node-decl.js +11 -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 +21 -0
- package/dist/graph/nodes/test-case-contract-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/test-case-contract-nodes.js +72 -0
- package/dist/graph/nodes/test-case-contract-nodes.js.map +1 -0
- package/dist/graph/nodes/test-case-nodes.d.ts +29 -0
- package/dist/graph/nodes/test-case-nodes.d.ts.map +1 -0
- package/dist/graph/nodes/test-case-nodes.js +95 -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 +96 -0
- package/dist/graph/nodes/unit-audit-nodes.js.map +1 -0
- package/dist/graph/nodes/unit-contract-node.d.ts +21 -0
- package/dist/graph/nodes/unit-contract-node.d.ts.map +1 -0
- package/dist/graph/nodes/unit-contract-node.js +96 -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 +91 -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 +12 -0
- package/dist/graph/test-case-results.d.ts.map +1 -0
- package/dist/graph/test-case-results.js +161 -0
- package/dist/graph/test-case-results.js.map +1 -0
- package/dist/graph/test-case-satisfied.d.ts +26 -0
- package/dist/graph/test-case-satisfied.d.ts.map +1 -0
- package/dist/graph/test-case-satisfied.js +55 -0
- package/dist/graph/test-case-satisfied.js.map +1 -0
- package/dist/graph/test-case-state-shape.d.ts +73 -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 +135 -0
- package/dist/graph/unit-artifact-probes.js.map +1 -0
- package/dist/graph/unit-results-freshness.d.ts +29 -0
- package/dist/graph/unit-results-freshness.d.ts.map +1 -0
- package/dist/graph/unit-results-freshness.js +213 -0
- package/dist/graph/unit-results-freshness.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 +14 -2
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +20 -21
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/catalog/gate-rules.yaml +647 -0
- package/dist/harness/defect-draft.d.ts.map +1 -1
- package/dist/harness/defect-draft.js +12 -2
- package/dist/harness/defect-draft.js.map +1 -1
- package/dist/harness/defects.d.ts +14 -0
- package/dist/harness/defects.d.ts.map +1 -1
- package/dist/harness/defects.js +14 -10
- package/dist/harness/defects.js.map +1 -1
- package/dist/harness/flow-check.d.ts +9 -0
- package/dist/harness/flow-check.d.ts.map +1 -1
- package/dist/harness/flow-check.js +11 -0
- package/dist/harness/flow-check.js.map +1 -1
- 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 +102 -0
- package/dist/harness/gates/audit-gate-verdict.js.map +1 -0
- package/dist/harness/gates/audit-input-hash.d.ts +6 -0
- package/dist/harness/gates/audit-input-hash.d.ts.map +1 -0
- package/dist/harness/gates/audit-input-hash.js +124 -0
- package/dist/harness/gates/audit-input-hash.js.map +1 -0
- package/dist/harness/gates/audit-report-verification.d.ts +43 -0
- package/dist/harness/gates/audit-report-verification.d.ts.map +1 -0
- package/dist/harness/gates/audit-report-verification.js +241 -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 +24 -0
- package/dist/harness/gates/delivery-checklist.d.ts.map +1 -0
- package/dist/harness/gates/delivery-checklist.js +161 -0
- package/dist/harness/gates/delivery-checklist.js.map +1 -0
- package/dist/harness/gates/delivery-decision-gate.d.ts +33 -0
- package/dist/harness/gates/delivery-decision-gate.d.ts.map +1 -0
- package/dist/harness/gates/delivery-decision-gate.js +116 -0
- package/dist/harness/gates/delivery-decision-gate.js.map +1 -0
- package/dist/harness/gates/delivery-decision-step.d.ts +19 -0
- package/dist/harness/gates/delivery-decision-step.d.ts.map +1 -0
- package/dist/harness/gates/delivery-decision-step.js +86 -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 +166 -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-import-bounds.d.ts +13 -0
- package/dist/harness/gates/migrated-waiver-import-bounds.d.ts.map +1 -0
- package/dist/harness/gates/migrated-waiver-import-bounds.js +141 -0
- package/dist/harness/gates/migrated-waiver-import-bounds.js.map +1 -0
- package/dist/harness/gates/migrated-waiver-review.d.ts +16 -0
- package/dist/harness/gates/migrated-waiver-review.d.ts.map +1 -0
- package/dist/harness/gates/migrated-waiver-review.js +114 -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 +64 -1
- package/dist/harness/journey.d.ts.map +1 -1
- package/dist/harness/journey.js +258 -34
- 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 +71 -43
- package/dist/harness/manifest.js.map +1 -1
- package/dist/harness/next-step.d.ts +58 -4
- package/dist/harness/next-step.d.ts.map +1 -1
- package/dist/harness/next-step.js +55 -204
- package/dist/harness/next-step.js.map +1 -1
- package/dist/harness/parse.d.ts +7 -0
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +18 -2
- package/dist/harness/parse.js.map +1 -1
- package/dist/harness/provenance.d.ts +29 -0
- package/dist/harness/provenance.d.ts.map +1 -1
- package/dist/harness/provenance.js +109 -9
- package/dist/harness/provenance.js.map +1 -1
- package/dist/harness/script-check.d.ts.map +1 -1
- package/dist/harness/script-check.js +22 -5
- 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 +41 -38
- package/dist/harness/sensors.js.map +1 -1
- package/dist/harness/triage-manual-classification.d.ts +32 -0
- package/dist/harness/triage-manual-classification.d.ts.map +1 -0
- package/dist/harness/triage-manual-classification.js +56 -0
- package/dist/harness/triage-manual-classification.js.map +1 -0
- package/dist/harness/unit-paths.d.ts +8 -0
- package/dist/harness/unit-paths.d.ts.map +1 -1
- package/dist/harness/unit-paths.js +23 -1
- package/dist/harness/unit-paths.js.map +1 -1
- package/dist/hooks/bash-read-only-segment.d.ts +9 -0
- package/dist/hooks/bash-read-only-segment.d.ts.map +1 -0
- package/dist/hooks/bash-read-only-segment.js +168 -0
- package/dist/hooks/bash-read-only-segment.js.map +1 -0
- package/dist/hooks/bash-write-targets.d.ts +25 -0
- package/dist/hooks/bash-write-targets.d.ts.map +1 -0
- package/dist/hooks/bash-write-targets.js +266 -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 +13 -0
- package/dist/hooks/guard-protected-paths.d.ts.map +1 -0
- package/dist/hooks/guard-protected-paths.js +116 -0
- package/dist/hooks/guard-protected-paths.js.map +1 -0
- package/dist/hooks/guard-rules.d.ts +20 -0
- package/dist/hooks/guard-rules.d.ts.map +1 -0
- package/dist/hooks/guard-rules.js +130 -0
- package/dist/hooks/guard-rules.js.map +1 -0
- package/dist/hooks/guard-tty-spoof-rule.d.ts +17 -0
- package/dist/hooks/guard-tty-spoof-rule.d.ts.map +1 -0
- package/dist/hooks/guard-tty-spoof-rule.js +22 -0
- package/dist/hooks/guard-tty-spoof-rule.js.map +1 -0
- package/dist/hooks/hand-back-core.d.ts +42 -0
- package/dist/hooks/hand-back-core.d.ts.map +1 -0
- package/dist/hooks/hand-back-core.js +128 -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 +14 -0
- package/dist/hooks/session-start-unit-state-hook.d.ts.map +1 -0
- package/dist/hooks/session-start-unit-state-hook.js +60 -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 +43 -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/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- 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 +11 -3
- package/dist/orchestrator/ai-skills/commands.js.map +1 -1
- package/dist/orchestrator/assets-drift.d.ts +5 -0
- package/dist/orchestrator/assets-drift.d.ts.map +1 -1
- package/dist/orchestrator/assets-drift.js +12 -3
- package/dist/orchestrator/assets-drift.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 +24 -0
- package/dist/orchestrator/project-initializer.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 +6 -26
- 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 +17 -16
- package/dist/orchestrator/templates/ai-src/commands/dashboard.md +2 -0
- package/dist/orchestrator/templates/ai-src/commands/delivery.md +4 -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 +4 -0
- package/dist/orchestrator/templates/ai-src/commands/run-test.md +6 -8
- 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/partials/waiting-for-you.claude.md +11 -0
- package/dist/orchestrator/templates/ai-src/partials/waiting-for-you.codex.md +11 -0
- package/dist/orchestrator/templates/ai-src/partials/waiting-for-you.copilot.md +11 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +1 -2
- package/dist/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +4 -5
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +8 -24
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +3 -4
- package/dist/orchestrator/templates/claude-hooks/sungen-hook.cjs +64 -0
- package/dist/orchestrator/templates/specs-test-data.ts +4 -22
- 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/discover.ts +15 -2
- package/src/capabilities/registry.ts +16 -0
- package/src/cli/case-triage-hint.ts +31 -0
- package/src/cli/commands/audit.ts +1 -1
- package/src/cli/commands/capability.ts +1 -1
- package/src/cli/commands/contract-derive-command.ts +72 -0
- package/src/cli/commands/contract.ts +164 -0
- package/src/cli/commands/delivery.ts +106 -19
- package/src/cli/commands/gate.ts +2 -1
- package/src/cli/commands/generate.ts +16 -3
- package/src/cli/commands/journey.ts +45 -18
- package/src/cli/commands/next.ts +92 -11
- package/src/cli/commands/triage.ts +41 -3
- package/src/cli/commands/update.ts +41 -10
- package/src/cli/index.ts +24 -30
- package/src/cli/json-error-on-exit.ts +72 -0
- package/src/cli/project-sungen-invocation.ts +59 -0
- package/src/cli/run-command-hints.ts +47 -0
- package/src/cli/waiting-for-you-block.ts +27 -0
- package/src/contract/accept-opaque-steps.ts +114 -0
- package/src/contract/approve-contract.ts +101 -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 +103 -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 +170 -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 +166 -0
- package/src/contract/contract-units.ts +52 -0
- package/src/contract/contracts-lock-file.ts +98 -0
- package/src/contract/data-normalize.ts +66 -0
- package/src/contract/derive-free-feature.ts +153 -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 +38 -0
- package/src/contract/record-contract-approval.ts +110 -0
- package/src/contract/render-free-gherkin.ts +118 -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 +58 -0
- package/src/contract/trace/collect-trace-evidence.ts +178 -0
- package/src/contract/trace/identity-cache.ts +61 -0
- package/src/contract/trace/read-file-once.ts +95 -0
- package/src/contract/trace/scenario-id-claims.ts +60 -0
- package/src/contract/trace/select-final-attempt.ts +77 -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 +104 -0
- package/src/contract/trace/trace-binding.ts +59 -0
- package/src/contract/trace/trace-file-reader.ts +144 -0
- package/src/contract/trace/trace-fingerprint.ts +68 -0
- package/src/contract/trace/trace-freshness.ts +110 -0
- package/src/contract/trace/trace-identity-resolution.ts +77 -0
- package/src/contract/trace/trace-run-record.ts +96 -0
- package/src/contract/trace/trace-steps.ts +88 -0
- package/src/contract/trace/trace-zip-limits.ts +77 -0
- package/src/contract/trace/trace-zip-reader.ts +127 -0
- package/src/contract/verify-approval-decisions.ts +64 -0
- package/src/decisions/append-decision.ts +35 -0
- package/src/decisions/confirmed-decision-commands.ts +149 -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 +77 -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 +76 -0
- package/src/decisions/human-confirmation.ts +119 -0
- package/src/decisions/legacy-waiver-migration.ts +146 -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 +12 -4
- package/src/exporters/matrix/build.ts +11 -9
- package/src/exporters/matrix/export.ts +16 -4
- package/src/exporters/matrix/gates.ts +62 -129
- package/src/exporters/matrix/render-csv.ts +3 -0
- package/src/exporters/matrix/render-gate-overrides-sheet.ts +50 -0
- package/src/exporters/matrix/render-xlsx.ts +3 -0
- package/src/exporters/matrix/types.ts +4 -1
- package/src/exporters/matrix/xlsx-cells.ts +1 -1
- package/src/exporters/test-data-resolver.ts +2 -10
- package/src/exporters/xlsx-exporter.ts +5 -4
- package/src/generators/gherkin-parser/index.ts +0 -1
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/contain-text-assertion.hbs +1 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/fill-action.hbs +1 -13
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/contain-text-assertion.hbs +1 -9
- package/src/generators/test-generator/code-generator.ts +17 -4
- package/src/generators/test-generator/diagnostics.ts +3 -9
- package/src/generators/test-generator/patterns/types.ts +0 -2
- package/src/generators/test-generator/step-mapper.ts +9 -56
- package/src/generators/test-generator/utils/data-resolver.ts +0 -53
- package/src/generators/test-generator/utils/selector-resolver.ts +2 -10
- package/src/graph/board-human-actions.ts +80 -0
- package/src/graph/evaluate-graph.ts +97 -0
- package/src/graph/human-action.ts +33 -0
- package/src/graph/locate-finding.ts +93 -0
- package/src/graph/manual-triage-decisions.ts +55 -0
- package/src/graph/node-decl.ts +83 -0
- package/src/graph/nodes/core-node-catalog.ts +15 -0
- package/src/graph/nodes/test-case-contract-nodes.ts +90 -0
- package/src/graph/nodes/test-case-nodes.ts +100 -0
- package/src/graph/nodes/unit-audit-nodes.ts +96 -0
- package/src/graph/nodes/unit-contract-node.ts +100 -0
- package/src/graph/nodes/unit-design-nodes.ts +89 -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 +111 -0
- package/src/graph/test-case-satisfied.ts +58 -0
- package/src/graph/test-case-state-shape.ts +67 -0
- package/src/graph/test-case-states.ts +84 -0
- package/src/graph/unit-artifact-probes.ts +79 -0
- package/src/graph/unit-results-freshness.ts +165 -0
- package/src/graph/unit-state-facts.ts +112 -0
- package/src/harness/audit.ts +31 -18
- package/src/harness/catalog/gate-rules.yaml +647 -0
- package/src/harness/defect-draft.ts +13 -2
- package/src/harness/defects.ts +22 -9
- package/src/harness/flow-check.ts +11 -0
- package/src/harness/gates/audit-gate-terms.ts +80 -0
- package/src/harness/gates/audit-gate-verdict.ts +79 -0
- package/src/harness/gates/audit-input-hash.ts +79 -0
- package/src/harness/gates/audit-report-verification.ts +206 -0
- package/src/harness/gates/decisions-hash.ts +42 -0
- package/src/harness/gates/delivery-checklist.ts +152 -0
- package/src/harness/gates/delivery-decision-gate.ts +139 -0
- package/src/harness/gates/delivery-decision-step.ts +89 -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 +124 -0
- package/src/harness/gates/journey-gate-inputs.ts +89 -0
- package/src/harness/gates/migrated-waiver-import-bounds.ts +103 -0
- package/src/harness/gates/migrated-waiver-review.ts +121 -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 +287 -39
- package/src/harness/manifest.ts +67 -43
- package/src/harness/next-step.ts +91 -193
- package/src/harness/parse.ts +20 -2
- package/src/harness/provenance.ts +99 -11
- package/src/harness/script-check.ts +20 -5
- package/src/harness/sensors.ts +47 -40
- package/src/harness/triage-manual-classification.ts +76 -0
- package/src/harness/unit-paths.ts +19 -0
- package/src/hooks/bash-read-only-segment.ts +130 -0
- package/src/hooks/bash-write-targets.ts +195 -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 +80 -0
- package/src/hooks/guard-rules.ts +117 -0
- package/src/hooks/guard-tty-spoof-rule.ts +34 -0
- package/src/hooks/hand-back-core.ts +118 -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 +59 -0
- package/src/hooks/stop-next-step-hook.ts +38 -0
- package/src/hooks/sungen-project-root.ts +80 -0
- package/src/index.ts +1 -2
- package/src/orchestrator/ai-skills/command-partial-includes.ts +72 -0
- package/src/orchestrator/ai-skills/commands.ts +17 -5
- package/src/orchestrator/assets-drift.ts +12 -5
- package/src/orchestrator/claude-hooks-install.ts +168 -0
- package/src/orchestrator/lockstep-version.ts +28 -15
- package/src/orchestrator/project-initializer.ts +22 -0
- package/src/orchestrator/templates/ai-src/commands/add-api.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/add-flow.md +6 -26
- 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 +17 -16
- package/src/orchestrator/templates/ai-src/commands/dashboard.md +2 -0
- package/src/orchestrator/templates/ai-src/commands/delivery.md +4 -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 +4 -0
- package/src/orchestrator/templates/ai-src/commands/run-test.md +6 -8
- 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/partials/waiting-for-you.claude.md +11 -0
- package/src/orchestrator/templates/ai-src/partials/waiting-for-you.codex.md +11 -0
- package/src/orchestrator/templates/ai-src/partials/waiting-for-you.copilot.md +11 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +1 -2
- package/src/orchestrator/templates/ai-src/skills/sungen-error-mapping/SKILL.md +4 -5
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +8 -24
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +3 -4
- package/src/orchestrator/templates/claude-hooks/sungen-hook.cjs +64 -0
- package/src/orchestrator/templates/specs-test-data.ts +4 -22
- package/src/utils/safe-yaml-parse.ts +44 -0
- package/dist/generators/test-generator/adapters/appium/templates/steps/assertions/expanded-assertion.hbs +0 -2
- package/dist/generators/test-generator/adapters/playwright/templates/steps/actions/date-picker-unsupported.hbs +0 -5
- package/dist/generators/test-generator/adapters/playwright/templates/steps/assertions/expanded-assertion.hbs +0 -12
- package/src/generators/test-generator/adapters/appium/templates/steps/assertions/expanded-assertion.hbs +0 -2
- package/src/generators/test-generator/adapters/playwright/templates/steps/actions/date-picker-unsupported.hbs +0 -5
- package/src/generators/test-generator/adapters/playwright/templates/steps/assertions/expanded-assertion.hbs +0 -12
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `sungen contract approve | check` — the Test Contract (DOS-14, phase 06a).
|
|
3
|
+
*
|
|
4
|
+
* approve --screen <u> [--scenario <id>] [--reason <text>]
|
|
5
|
+
* a human types a confirmation on a TTY; writes contracts.lock.yaml + a contract-approval
|
|
6
|
+
* decision. No TTY → refused with the exact command (exit 1).
|
|
7
|
+
* approve --screen <u> --scenario <id> --accept-opaque [--reason <text>]
|
|
8
|
+
* the same human act for the reviewed opaque trace steps of one approved free / impl:code
|
|
9
|
+
* scenario (#923): bound to each step as it reads now (accept-opaque-steps.ts).
|
|
10
|
+
* check --screen <u> [--trace] [--json]
|
|
11
|
+
* rebuilds the verdict from .feature + lock + git HEAD + recorded traces (never from a report),
|
|
12
|
+
* writes .sungen/reports/<slug>-contract.json as output (secret-scanned first). Exit 2 on a hard
|
|
13
|
+
* finding, 0 on pass or review, 1 on an error (unknown unit, untrusted lock, unparseable feature).
|
|
14
|
+
* `--trace` first asks driver-ui (a real browser) for the target identities of free / impl:code
|
|
15
|
+
* traces; without it the cached answers are used (DOS-14.5, 14.6).
|
|
16
|
+
* derive --screen <u> [--grep <re>] → contract-derive-command.ts (DOS-14.8)
|
|
17
|
+
*/
|
|
18
|
+
import { Command } from 'commander';
|
|
19
|
+
import * as fs from 'fs';
|
|
20
|
+
import * as path from 'path';
|
|
21
|
+
import { approveContract } from '../../contract/approve-contract';
|
|
22
|
+
import { buildContractVerdict, ContractVerdict } from '../../contract/build-contract-verdict';
|
|
23
|
+
import { LOW_IDENTITY_FINDING } from '../../contract/classify-trace-conformance';
|
|
24
|
+
import { contractReportPath, writeContractReport } from '../../contract/contract-report-file';
|
|
25
|
+
import { HARD_CLASSES, REVIEW_CLASSES } from '../../contract/contract-schema';
|
|
26
|
+
import { processIO } from '../../decisions/human-confirmation';
|
|
27
|
+
import { resolveContractUnit } from '../../contract/contract-units';
|
|
28
|
+
import { secretScanHits } from '../../contract/field-semantic-redaction';
|
|
29
|
+
import { resolveUnitTraceIdentities } from '../../contract/resolve-unit-trace-identities';
|
|
30
|
+
import { registerDeriveCommand } from './contract-derive-command';
|
|
31
|
+
import { withProjectInvocationInText } from '../project-sungen-invocation';
|
|
32
|
+
|
|
33
|
+
const MARK: Record<string, string> = {
|
|
34
|
+
match: '✓', strengthened: '↑', proposed: '+', 'hash-changed': '⚖', 'oracle-weakened': '✗', 'target-changed': '✗', 'assertion-lost': '✗',
|
|
35
|
+
opaque: '◐', nondeterministic: '≈', inconclusive: '?', unproven: '✗',
|
|
36
|
+
};
|
|
37
|
+
/** `contract check` judges traces with a generous deadline (the guard path keeps ~3 s). */
|
|
38
|
+
const CHECK_TRACE_BUDGET_MS = 120_000;
|
|
39
|
+
const UNPROVEN_HINT = " → free / impl:code tests need their own config (outputDir 'test-results-free', trace: 'on', the sungen run-record reporter), then a fresh run (see `sungen contract derive`).";
|
|
40
|
+
|
|
41
|
+
/** The command that recompiles a unit's spec — `sungen generate --screen|--flow|--api <unit>`. */
|
|
42
|
+
function generateCommand(unit: { name: string; dir: string }): string {
|
|
43
|
+
const kind = path.relative(path.join(process.cwd(), 'qa'), unit.dir).split(path.sep)[0];
|
|
44
|
+
return `sungen generate --${kind === 'flows' ? 'flow' : kind === 'api' ? 'api' : 'screen'} ${unit.name}`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function printVerdict(v: ContractVerdict, reportFile: string, generate: string): void {
|
|
48
|
+
// The approve / --accept-opaque / generate lines as this project runs sungen (#963).
|
|
49
|
+
const L = (line: string): void => console.log(withProjectInvocationInText(line, process.cwd()));
|
|
50
|
+
const head = v.verdict === 'pass' ? '✓ PASS' : v.verdict === 'review'
|
|
51
|
+
? '⚖ REVIEW — changed, not weaker. Exit 0 here, but review blocks `sungen delivery` until QA re-approves' : '✗ FAIL';
|
|
52
|
+
L('');
|
|
53
|
+
L(`━━━ Contract check: ${v.unit} — Gherkin vs the approved lock ━━━`);
|
|
54
|
+
L('');
|
|
55
|
+
L(` verdict: ${head}`);
|
|
56
|
+
const matched = v.scenarios.filter((s) => s.class === 'match').length;
|
|
57
|
+
for (const s of v.scenarios.filter((x) => x.class !== 'match')) {
|
|
58
|
+
L(` ${MARK[s.class] ?? '?'} ${s.id} ${s.class}${s.class === 'proposed' ? ' (no approved entry — does not block)' : ''}`);
|
|
59
|
+
for (const f of s.findings) L(` ${f.rule ? `[${f.rule}] ` : ''}${f.step ? `step ${f.step}: ` : ''}${f.detail}`);
|
|
60
|
+
if (s.trace?.hashes.length) L(` trace: ${[...new Set(s.trace.hashes)].join(', ')} (${s.trace.runs.length} run(s))`);
|
|
61
|
+
if (s.class === 'unproven') L(UNPROVEN_HINT);
|
|
62
|
+
}
|
|
63
|
+
if (matched) L(` ✓ ${matched} scenario(s) match the approved contract`);
|
|
64
|
+
const issue = (u: ContractVerdict['uncommitted'][number]): string =>
|
|
65
|
+
u.change === 'tampered' || u.change === 'unverified' ? `lock entry ${u.change}: ${u.detail}` : `lock entry ${u.change} and not committed`;
|
|
66
|
+
for (const u of v.uncommitted.slice(0, 10)) L(` ✗ ${u.id} ${issue(u)} [contract.lock-uncommitted]`);
|
|
67
|
+
if (v.uncommitted.length > 10) L(` ✗ … and ${v.uncommitted.length - 10} more lock entries that are not what QA approved and committed`);
|
|
68
|
+
for (const w of v.warnings) L(` ⚠ ${w}`);
|
|
69
|
+
L('');
|
|
70
|
+
// Only missing / refused traces: re-approving cannot help, a fresh traced run can.
|
|
71
|
+
const blocking = v.scenarios.filter((s) => HARD_CLASSES.has(s.class) || REVIEW_CLASSES.has(s.class));
|
|
72
|
+
const onlyUnproven = blocking.length > 0 && blocking.every((s) => s.class === 'unproven');
|
|
73
|
+
if (v.verdict === 'fail') {
|
|
74
|
+
L(v.uncommitted.length
|
|
75
|
+
? ' → Commit the approval (lock + decision) through review, or restore the lock from git (`git checkout -- <lock>`).'
|
|
76
|
+
: onlyUnproven ? " → Re-run the free / impl:code tests with trace: 'on', then check again."
|
|
77
|
+
: ' → Restore the approved checks in the .feature — or, if the change is intended, QA approves it on a terminal:');
|
|
78
|
+
}
|
|
79
|
+
// An opaque step is not cleared by re-approving (#923): QA reviews it, then accepts it as it reads now.
|
|
80
|
+
const acceptable = blocking.filter((s) => s.class === 'opaque' && s.trace?.opaque?.some((o) => !o.accepted)
|
|
81
|
+
&& !s.findings.some((f) => f.detail.startsWith(LOW_IDENTITY_FINDING)));
|
|
82
|
+
if (v.verdict !== 'pass' && !v.uncommitted.length && !onlyUnproven && acceptable.length < blocking.length) L(` sungen contract approve --screen ${v.unit}`);
|
|
83
|
+
for (const s of acceptable) {
|
|
84
|
+
L(` → ${s.id}: QA reviews each opaque step above (verbatim, file:line); to accept them as they read now, on a terminal:`);
|
|
85
|
+
L(` sungen contract approve --screen ${v.unit} --scenario ${s.id} --accept-opaque`);
|
|
86
|
+
}
|
|
87
|
+
// A weakened compiled scenario also leaves its spec out of step (#943): name the command that fixes the drift.
|
|
88
|
+
// (A free / impl:code scenario carries a trace summary; its test is hand-written, never regenerated.)
|
|
89
|
+
if (v.verdict === 'fail' && !v.uncommitted.length && v.scenarios.some((s) => !s.trace && HARD_CLASSES.has(s.class))) {
|
|
90
|
+
L(` → After fixing the scenario, run \`${generate}\`: until the compiled spec is regenerated, \`sungen script-check\` reports drift.`);
|
|
91
|
+
}
|
|
92
|
+
L(` Report: ${path.relative(process.cwd(), reportFile)}`);
|
|
93
|
+
L('');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function unitOrThrow(name: string | undefined): { name: string; dir: string } {
|
|
97
|
+
if (!name) throw new Error('Provide --screen <name>');
|
|
98
|
+
return resolveContractUnit(process.cwd(), name);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function registerContractCommand(program: Command): void {
|
|
102
|
+
const contract = program
|
|
103
|
+
.command('contract')
|
|
104
|
+
.description('Test Contract (DOS-14): the Gherkin QA approved is the contract — lock it (TTY) and check the .feature was not weakened');
|
|
105
|
+
|
|
106
|
+
contract
|
|
107
|
+
.command('approve')
|
|
108
|
+
.description('Lock the current Gherkin as the approved contract — a human types a confirmation on a TTY')
|
|
109
|
+
.option('-s, --screen <name>', 'Screen / flow / api unit name')
|
|
110
|
+
.option('--scenario <id>', 'Approve one scenario only (its ID, e.g. VP-LOGIN-001)')
|
|
111
|
+
.option('--reason <text>', 'Why (recorded in the contract-approval decision)')
|
|
112
|
+
.option('--accept-opaque', 'With --scenario: accept the reviewed opaque trace step(s) of one approved free / impl:code scenario')
|
|
113
|
+
.action(async (options) => {
|
|
114
|
+
try {
|
|
115
|
+
const unit = unitOrThrow(options.screen);
|
|
116
|
+
const r = await approveContract({
|
|
117
|
+
projectRoot: process.cwd(), unit: unit.name, scenario: options.scenario, reason: options.reason, acceptOpaque: options.acceptOpaque === true, io: processIO(),
|
|
118
|
+
});
|
|
119
|
+
if (r.status === 'nothing-to-approve') { console.log(`\n= Nothing to approve: every chosen scenario of ${unit.name} already matches its approved lock entry.\n`); return; }
|
|
120
|
+
if (r.status === 'nothing-to-accept') { console.log(`\n= Nothing to accept: every opaque step of ${options.scenario} is already accepted as it reads now.\n`); return; }
|
|
121
|
+
if (r.status === 'accepted') {
|
|
122
|
+
console.log(`\n✓ Accepted ${r.accepted?.length ?? 0} opaque step(s) of ${options.scenario} → ${path.relative(process.cwd(), r.lockPath)} (decision ${r.decisionId})`);
|
|
123
|
+
console.log(' Commit the lock and the decision through review, then re-run the free test with its trace: a trace older than the lock proves nothing.\n');
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
console.log(`\n✓ Approved ${r.approved.length} scenario(s)${r.removed.length ? `, removed ${r.removed.length}` : ''} → ${path.relative(process.cwd(), r.lockPath)} (decision ${r.decisionId})`);
|
|
127
|
+
console.log(' Commit the lock and the decision through review: until they are in git HEAD, `sungen contract check` reports contract.lock-uncommitted.\n');
|
|
128
|
+
} catch (error) {
|
|
129
|
+
// A refusal names the command a human runs instead: as this project runs sungen (#963).
|
|
130
|
+
console.error('Error:', error instanceof Error ? withProjectInvocationInText(error.message, process.cwd()) : error);
|
|
131
|
+
process.exit(1);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
contract
|
|
136
|
+
.command('check')
|
|
137
|
+
.description('Compare the .feature with the approved lock on the strength ladder, and the lock with git HEAD')
|
|
138
|
+
.option('-s, --screen <name>', 'Screen / flow / api unit name')
|
|
139
|
+
.option('--trace', 'Resolve free / impl:code trace target identities with @sungen/driver-ui (a real browser) first')
|
|
140
|
+
.option('--json', 'Output the verdict as JSON')
|
|
141
|
+
.action(async (options) => {
|
|
142
|
+
let unit: { name: string; dir: string } | undefined;
|
|
143
|
+
try {
|
|
144
|
+
unit = unitOrThrow(options.screen);
|
|
145
|
+
const notes = options.trace ? await resolveUnitTraceIdentities(process.cwd(), unit) : [];
|
|
146
|
+
// The CLI may take its time; the guard (contractBlockers) keeps the ~3 s default.
|
|
147
|
+
const verdict = buildContractVerdict(process.cwd(), unit, { traceBudgetMs: CHECK_TRACE_BUDGET_MS });
|
|
148
|
+
verdict.warnings.push(...notes);
|
|
149
|
+
const hits = secretScanHits(JSON.stringify(verdict, null, 2), `${unit.name}-contract.json`);
|
|
150
|
+
if (hits.length) throw new Error(`Refused to write the contract report — likely secret(s): ${hits.map((h) => `${h.where} ${h.reason}`).join('; ')}`);
|
|
151
|
+
const file = writeContractReport(process.cwd(), verdict);
|
|
152
|
+
if (options.json) console.log(JSON.stringify(verdict, null, 2));
|
|
153
|
+
else printVerdict(verdict, file, generateCommand(unit));
|
|
154
|
+
process.exit(verdict.exitCode);
|
|
155
|
+
} catch (error) {
|
|
156
|
+
// Unreadable = not run (DOS-14.0): an earlier report must not outlive the inputs it judged.
|
|
157
|
+
if (unit) fs.rmSync(contractReportPath(process.cwd(), unit.name), { force: true });
|
|
158
|
+
console.error('Error:', error instanceof Error ? error.message : error);
|
|
159
|
+
process.exit(1);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
registerDeriveCommand(contract);
|
|
164
|
+
}
|
|
@@ -17,6 +17,7 @@ import { mergeFeatureAndSpec } from '../../exporters/scenario-merger';
|
|
|
17
17
|
import {
|
|
18
18
|
buildTestCaseRows,
|
|
19
19
|
buildSummary,
|
|
20
|
+
deliverableBasename,
|
|
20
21
|
renderCsv,
|
|
21
22
|
writeCsv,
|
|
22
23
|
} from '../../exporters/csv-exporter';
|
|
@@ -41,6 +42,16 @@ import { MatrixFinding } from '../../exporters/matrix/types';
|
|
|
41
42
|
import { applyManualCarry, ManualCarryReport, PriorManualResults, readPriorManualResults } from '../../exporters/matrix/carry-manual-results';
|
|
42
43
|
import { formatTestOutcome, resultTotals } from '../../exporters/matrix/result-totals';
|
|
43
44
|
import { readCapabilities } from '../../harness/capability';
|
|
45
|
+
import { splitFeatureBlocks } from '../../contract/free-feature-blocks';
|
|
46
|
+
import { processIO } from '../../decisions/human-confirmation';
|
|
47
|
+
import { DeliveryDecisionGate } from '../../harness/gates/delivery-decision-gate';
|
|
48
|
+
import { runDeliveryDecisionStep } from '../../harness/gates/delivery-decision-step';
|
|
49
|
+
import { deliverableGateOverrides, InRunAcceptance } from '../../harness/gates/gate-override-report';
|
|
50
|
+
import { ChecklistUnit, renderChecklist, unitChecklist } from '../../harness/gates/delivery-checklist';
|
|
51
|
+
import { withProjectInvocationInText } from '../project-sungen-invocation';
|
|
52
|
+
import { freeRunCommand, freeRunHasResults, generatedSubdir, plainRunCommand } from '../run-command-hints';
|
|
53
|
+
import { isHandWritten } from '../../harness/parse';
|
|
54
|
+
import { FREE_RUN_DIR } from '../../contract/trace/trace-run-record';
|
|
44
55
|
|
|
45
56
|
const COLOR = {
|
|
46
57
|
reset: '\x1b[0m',
|
|
@@ -96,14 +107,30 @@ function makeTarget(screen: string, featureBaseName: string, kind: UnitKind): De
|
|
|
96
107
|
}
|
|
97
108
|
|
|
98
109
|
/**
|
|
99
|
-
*
|
|
100
|
-
*
|
|
110
|
+
* A derived `*.free.feature` none of whose scenarios QA has approved yet (every one still `@proposed`):
|
|
111
|
+
* a proposal, not a delivery unit — counted as one, it ended in "Not exported" (#939). Approving a
|
|
112
|
+
* scenario drops its tag (`contract approve`), and from then on the file is a unit like any other.
|
|
113
|
+
*/
|
|
114
|
+
function proposalOnly(featureFile: string): boolean {
|
|
115
|
+
if (!featureFile.endsWith('.free.feature')) return false;
|
|
116
|
+
try {
|
|
117
|
+
// No scenario block at all (empty, or not Gherkin) is not a proposal: it stays listed and the preflight names it.
|
|
118
|
+
const blocks = splitFeatureBlocks(fs.readFileSync(featureFile, 'utf8'));
|
|
119
|
+
return blocks.length > 0 && blocks.every((b) => b.proposed);
|
|
120
|
+
} catch {
|
|
121
|
+
return false; // unreadable: listed, so the preflight names the problem
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* List all `.feature` files inside a screen/flow/api unit as separate targets — a proposal-only
|
|
127
|
+
* free feature excepted. Returns empty array when the directory has no features yet.
|
|
101
128
|
*/
|
|
102
129
|
function listFeatureTargets(cwd: string, screen: string, kind: UnitKind): DeliveryTarget[] {
|
|
103
130
|
const featuresDir = path.join(cwd, 'qa', qaParent(kind), screen, 'features');
|
|
104
131
|
if (!fs.existsSync(featuresDir)) return [];
|
|
105
132
|
return fs.readdirSync(featuresDir)
|
|
106
|
-
.filter((f) => f.endsWith('.feature'))
|
|
133
|
+
.filter((f) => f.endsWith('.feature') && !proposalOnly(path.join(featuresDir, f)))
|
|
107
134
|
.map((f) => makeTarget(screen, f.slice(0, -'.feature'.length), kind))
|
|
108
135
|
.sort((a, b) => a.featureBaseName.localeCompare(b.featureBaseName));
|
|
109
136
|
}
|
|
@@ -164,8 +191,7 @@ function qaDir(cwd: string, target: DeliveryTarget): string {
|
|
|
164
191
|
// dashboard snapshot builder loads the identical contract (shared + unit merge).
|
|
165
192
|
|
|
166
193
|
function generatedDir(cwd: string, target: DeliveryTarget): string {
|
|
167
|
-
|
|
168
|
-
return path.join(cwd, 'specs', 'generated', sub);
|
|
194
|
+
return path.join(cwd, generatedSubdir(target.kind, target.screen));
|
|
169
195
|
}
|
|
170
196
|
|
|
171
197
|
// ----------------------------------------------------------------------------
|
|
@@ -228,6 +254,9 @@ export function runPreflight(cwd: string, target: DeliveryTarget): PreflightChec
|
|
|
228
254
|
const selectorsFile = path.join(base, 'selectors', `${target.featureBaseName}.yaml`);
|
|
229
255
|
const specFile = path.join(genBase, `${target.featureBaseName}.spec.ts`);
|
|
230
256
|
const resultsFile = resolveResultsPath(cwd, target);
|
|
257
|
+
// A derived `*.free.feature` is implemented by hand-written tests (DOS-14.8): no selectors, never compiled,
|
|
258
|
+
// run with the project's free-test config into its own outputDir — so its hints are that run's (#964).
|
|
259
|
+
const free = isHandWritten([], featureFile);
|
|
231
260
|
|
|
232
261
|
const featureOk = checkFeatureReal(featureFile);
|
|
233
262
|
// test-data is only REQUIRED when the feature actually references a
|
|
@@ -238,9 +267,9 @@ export function runPreflight(cwd: string, target: DeliveryTarget): PreflightChec
|
|
|
238
267
|
? checkTestDataHasVars(testDataFile)
|
|
239
268
|
: true;
|
|
240
269
|
// API units have no DOM → no selectors; the catalog (apis.yaml) is the contract. N/A, not missing.
|
|
241
|
-
const selectorsOk = target.kind === 'api' ? true : checkSelectorsHasEntries(selectorsFile, target.featureBaseName);
|
|
242
|
-
const specOk = fs.existsSync(specFile);
|
|
243
|
-
const resultsOk = resultsFile !== null;
|
|
270
|
+
const selectorsOk = target.kind === 'api' || free ? true : checkSelectorsHasEntries(selectorsFile, target.featureBaseName);
|
|
271
|
+
const specOk = free || fs.existsSync(specFile);
|
|
272
|
+
const resultsOk = free ? freeRunHasResults(cwd) : resultsFile !== null;
|
|
244
273
|
|
|
245
274
|
const label = target.isFlow ? `flow/${target.featureBaseName}` : target.featureBaseName;
|
|
246
275
|
const missing: string[] = [];
|
|
@@ -262,13 +291,15 @@ export function runPreflight(cwd: string, target: DeliveryTarget): PreflightChec
|
|
|
262
291
|
missing.push(`compiled .spec.ts missing (optional — needed to run): ${path.relative(cwd, specFile)}`);
|
|
263
292
|
suggestions.push(`sungen generate --${target.kind === 'flow' ? 'flow' : target.kind === 'api' ? 'api' : 'screen'} ${target.screen}`);
|
|
264
293
|
}
|
|
265
|
-
if (!resultsOk) {
|
|
294
|
+
if (!resultsOk && free) {
|
|
295
|
+
missing.push(`free-test results missing (optional): ${FREE_RUN_DIR}/`);
|
|
296
|
+
suggestions.push(freeRunCommand(cwd));
|
|
297
|
+
} else if (!resultsOk) {
|
|
266
298
|
const env = process.env.SUNGEN_ENV;
|
|
267
299
|
const envSuffix = env ? `.${env}` : '';
|
|
268
300
|
missing.push(`test-result${envSuffix}.json missing (optional)`);
|
|
269
301
|
const genRel = path.relative(cwd, genBase);
|
|
270
|
-
|
|
271
|
-
suggestions.push(`${envPrefix}PLAYWRIGHT_JSON_OUTPUT_NAME=${genRel}/${target.featureBaseName}-test-result.json npx playwright test ${genRel}/${target.featureBaseName}.spec.ts`);
|
|
302
|
+
suggestions.push(plainRunCommand(genRel, target.featureBaseName, env));
|
|
272
303
|
}
|
|
273
304
|
|
|
274
305
|
return {
|
|
@@ -660,7 +691,7 @@ export function matrixPathsFor(cwd: string, target: DeliveryTarget): MatrixTarge
|
|
|
660
691
|
}
|
|
661
692
|
|
|
662
693
|
function printFindings(findings: MatrixFinding[]): void {
|
|
663
|
-
const icon = { error: `${COLOR.red}✗`, review: `${COLOR.yellow}⚠`, warning: `${COLOR.gray}
|
|
694
|
+
const icon = { error: `${COLOR.red}✗`, review: `${COLOR.yellow}⚠`, warning: `${COLOR.gray}·`, info: `${COLOR.gray}i` } as const;
|
|
664
695
|
for (const f of findings) {
|
|
665
696
|
log(` ${icon[f.severity]} [Gate ${f.gate}]${COLOR.reset} ${f.ref ? `${f.ref}: ` : ''}${f.message}`);
|
|
666
697
|
}
|
|
@@ -685,9 +716,11 @@ async function exportMatrixTarget(
|
|
|
685
716
|
target: DeliveryTarget,
|
|
686
717
|
opts: { check?: boolean; preview?: boolean; format?: MatrixFormat },
|
|
687
718
|
env: EnvironmentInfo,
|
|
719
|
+
decisions?: DeliveryDecisionGate,
|
|
688
720
|
): Promise<MatrixRunSummary | 'skipped' | null> {
|
|
689
721
|
const paths = matrixPathsFor(cwd, target);
|
|
690
722
|
paths.runEnv = matrixRunEnv(cwd, target, env, paths);
|
|
723
|
+
paths.gateRules = decisions?.rulesFor(qaDir(cwd, target)); // the unit's gate-overrides apply to its matrix gates
|
|
691
724
|
|
|
692
725
|
// A feature whose scenarios are ALL @exploration probes has nothing to deliver —
|
|
693
726
|
// skip it quietly (no map required) instead of demanding a reviewed grouping for
|
|
@@ -704,6 +737,8 @@ async function exportMatrixTarget(
|
|
|
704
737
|
}
|
|
705
738
|
|
|
706
739
|
const { model, mapMissing, mapErrors } = loadMatrixModel(paths);
|
|
740
|
+
// An audit that is untrusted or FAILs never yields an official deliverable: --preview renders a DRAFT (#935).
|
|
741
|
+
if (model && decisions?.auditDraft(qaDir(cwd, target))) model.manifest.approvalState = 'draft';
|
|
707
742
|
|
|
708
743
|
if (mapMissing) {
|
|
709
744
|
log(`${COLOR.yellow}${paths.label}: no delivery map${COLOR.reset} (${path.relative(cwd, paths.mapFile)})`);
|
|
@@ -722,12 +757,15 @@ async function exportMatrixTarget(
|
|
|
722
757
|
// counted, so this line, the workbook's totals and the summary table all agree (#891). A file
|
|
723
758
|
// that cannot be read is reported where it matters — when it would be overwritten.
|
|
724
759
|
const format = opts.format ?? 'xlsx';
|
|
760
|
+
// A draft (DRAFT banner) is written to its own `…-testcases.DRAFT.<ext>`, never onto the official file (#965).
|
|
761
|
+
const draft = model.manifest.approvalState === 'draft';
|
|
725
762
|
let prior: PriorManualResults | null = null;
|
|
726
763
|
let priorError: Error | null = null;
|
|
727
764
|
try { prior = await readPriorManualResults(deliverableXlsxPath(cwd, paths.unit)); }
|
|
728
|
-
// A CSV-only export overwrites no workbook, so an unreadable one only means "nothing to carry".
|
|
729
|
-
catch (e) { if (format !== 'csv') priorError = e as Error; }
|
|
765
|
+
// A CSV-only export or a draft overwrites no official workbook, so an unreadable one only means "nothing to carry".
|
|
766
|
+
catch (e) { if (format !== 'csv' && !draft) priorError = e as Error; }
|
|
730
767
|
applyManualCarry(model, prior);
|
|
768
|
+
model.gateOverrides = deliverableGateOverrides(decisions?.overridesFor(qaDir(cwd, target)) ?? [], hasReview(model.findings), decisions?.acceptedInRun);
|
|
731
769
|
|
|
732
770
|
log(`${COLOR.bold}${paths.label}${COLOR.reset} — ${model.manifest.itemCount} delivery item(s), ${model.manifest.variantCount} coverage variant(s), review: ${model.manifest.approvalState} (design), test outcome: ${formatTestOutcome(resultTotals(model.items))}`);
|
|
733
771
|
{
|
|
@@ -775,6 +813,9 @@ async function exportMatrixTarget(
|
|
|
775
813
|
const failed = model.items.reduce((a, i) => a + i.resultCounts.failed, 0);
|
|
776
814
|
const written = [xlsxPath, csvPath].filter((p): p is string => !!p).map((p) => path.relative(cwd, p));
|
|
777
815
|
for (const rel of written) log(` ${COLOR.green}→ ${rel}${COLOR.reset}`);
|
|
816
|
+
if (draft) {
|
|
817
|
+
log(` ${COLOR.yellow}draft only — not a deliverable:${COLOR.reset} it carries the DRAFT banner, and the official ${deliverableBasename(paths.unit)} file was neither written nor changed.`);
|
|
818
|
+
}
|
|
778
819
|
if (manualCarry) printManualCarry(manualCarry);
|
|
779
820
|
return {
|
|
780
821
|
label: paths.label,
|
|
@@ -892,6 +933,20 @@ function printSummaryTable(summaries: ScreenSummary[]): void {
|
|
|
892
933
|
}
|
|
893
934
|
}
|
|
894
935
|
|
|
936
|
+
/** T6: one checklist block per delivered unit, each box from what its command says now (delivery-checklist.ts). */
|
|
937
|
+
async function printDeliveryChecklist(cwd: string, targets: DeliveryTarget[], accepted?: InRunAcceptance): Promise<void> {
|
|
938
|
+
const units = new Map<string, ChecklistUnit>();
|
|
939
|
+
for (const t of targets) {
|
|
940
|
+
const dir = qaDir(cwd, t);
|
|
941
|
+
if (!units.has(dir)) units.set(dir, { label: t.isFlow ? `flow/${t.screen}` : t.screen, unitName: t.screen, unitDir: dir, kind: t.kind, resultsPath: resolveResultsPath(cwd, t) });
|
|
942
|
+
}
|
|
943
|
+
const rows: Array<{ label: string; boxes: Awaited<ReturnType<typeof unitChecklist>> }> = [];
|
|
944
|
+
for (const u of units.values()) rows.push({ label: u.label, boxes: await unitChecklist(cwd, u, accepted) });
|
|
945
|
+
log('');
|
|
946
|
+
// Each box's fix command as this project runs sungen (#963).
|
|
947
|
+
for (const line of renderChecklist(rows)) log(withProjectInvocationInText(line, cwd));
|
|
948
|
+
}
|
|
949
|
+
|
|
895
950
|
// ----------------------------------------------------------------------------
|
|
896
951
|
// Command registration
|
|
897
952
|
// ----------------------------------------------------------------------------
|
|
@@ -908,12 +963,13 @@ export function registerDeliveryCommand(program: Command): void {
|
|
|
908
963
|
.option('--full', 'Alias of --legacy')
|
|
909
964
|
.option('--check', 'Matrix gates only — validate the delivery map, write nothing')
|
|
910
965
|
.option('--approve [ids]', 'Approve proposed groups (all, or a comma-separated id list) + stamp fingerprints')
|
|
911
|
-
.option('--preview', 'Render the matrix despite review-required findings (DRAFT
|
|
966
|
+
.option('--preview', 'Render the matrix despite review-required findings — a DRAFT (watermarked) written to <unit>-testcases.DRAFT.*, never onto the official file')
|
|
912
967
|
.option('--format <format>', 'Matrix output format: xlsx (default) | csv | both', 'xlsx')
|
|
968
|
+
.option('--accept-in-run', 'Deliver despite gate-overrides/waivers/approvals recorded during the run (decision.in-run) — a human confirms on a terminal')
|
|
913
969
|
.action(async (names: string[], options: {
|
|
914
970
|
skipPreflight?: boolean; continueOnMissing?: boolean; env?: string;
|
|
915
971
|
legacy?: boolean; full?: boolean; check?: boolean; approve?: boolean | string; preview?: boolean;
|
|
916
|
-
format?: string;
|
|
972
|
+
format?: string; acceptInRun?: boolean;
|
|
917
973
|
}) => {
|
|
918
974
|
try {
|
|
919
975
|
// Same effect as running with SUNGEN_ENV=<env> — result-file resolution,
|
|
@@ -990,6 +1046,31 @@ export function registerDeliveryCommand(program: Command): void {
|
|
|
990
1046
|
.reduce<SecretScanResult>((a, r) => ({ hits: [...a.hits, ...r.hits], unscanned: [...a.unscanned, ...r.unscanned] }), { hits: [], unscanned: [] });
|
|
991
1047
|
for (const line of formatSecretScan(secretScan)) log(line);
|
|
992
1048
|
|
|
1049
|
+
// OES-11.3–11.5: decisions that do not verify, rejected overrides, a stale audit and in-run
|
|
1050
|
+
// decisions stop the delivery before anything is written (approval only stamps the map).
|
|
1051
|
+
let decisions: DeliveryDecisionGate | undefined;
|
|
1052
|
+
// --approve only stamps a matrix map. With --legacy / --full it would skip this gate and
|
|
1053
|
+
// fall through to the export, so the combination is refused before anything is written.
|
|
1054
|
+
if (options.approve !== undefined && (options.legacy || options.full)) {
|
|
1055
|
+
console.error(`${COLOR.red}--approve applies to the matrix deliverable only${COLOR.reset} — it cannot be combined with --legacy / --full`);
|
|
1056
|
+
process.exit(1);
|
|
1057
|
+
}
|
|
1058
|
+
if (options.approve === undefined) {
|
|
1059
|
+
const gate = await runDeliveryDecisionStep({
|
|
1060
|
+
// The accept-in-run command and its refusal as this project runs sungen (#963).
|
|
1061
|
+
projectRoot: cwd, acceptInRun: !!options.acceptInRun, io: processIO(), log: (line) => log(withProjectInvocationInText(line, cwd)),
|
|
1062
|
+
// --preview / --check soften only the matrix export; --legacy has no draft mode, so it always needs one.
|
|
1063
|
+
requireTrustedAudit: !!(options.legacy || options.full) || (!options.preview && !options.check),
|
|
1064
|
+
refs: toExport.map((t) => ({ label: t.isFlow ? `flow/${t.featureBaseName}` : t.featureBaseName, unitName: t.screen, unitDir: qaDir(cwd, t), resultsPath: resolveResultsPath(cwd, t) })),
|
|
1065
|
+
argv: ['sungen', 'delivery', ...(names ?? []), ...(options.env ? ['--env', options.env] : []), ...(options.legacy || options.full ? ['--legacy'] : [])],
|
|
1066
|
+
});
|
|
1067
|
+
if (!gate) {
|
|
1068
|
+
await printDeliveryChecklist(cwd, toExport);
|
|
1069
|
+
process.exit(1);
|
|
1070
|
+
}
|
|
1071
|
+
decisions = gate;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
993
1074
|
// 3. Export
|
|
994
1075
|
const legacy = options.legacy || options.full;
|
|
995
1076
|
if (!legacy) {
|
|
@@ -1035,21 +1116,26 @@ export function registerDeliveryCommand(program: Command): void {
|
|
|
1035
1116
|
for (const target of toExport) {
|
|
1036
1117
|
const s = await exportMatrixTarget(cwd, target, {
|
|
1037
1118
|
check: options.check, preview: options.preview, format: format as MatrixFormat,
|
|
1038
|
-
}, env);
|
|
1119
|
+
}, env, decisions);
|
|
1039
1120
|
if (s === 'skipped') continue; // all-@exploration feature — neither exported nor a failure
|
|
1040
1121
|
if (s) matrixSummaries.push(s);
|
|
1041
1122
|
else notExported.push(target.isFlow ? `flow/${target.featureBaseName}` : target.featureBaseName);
|
|
1042
1123
|
}
|
|
1043
1124
|
if (matrixSummaries.length > 0 && !options.check) printMatrixSummaryTable(matrixSummaries);
|
|
1125
|
+
for (const line of decisions?.summaryLines() ?? []) log(line);
|
|
1044
1126
|
printSkipSummary(skipped, notExported);
|
|
1127
|
+
await printDeliveryChecklist(cwd, toExport, decisions?.acceptedInRun);
|
|
1045
1128
|
// A named target that produced nothing is a failure. A sweep is a failure
|
|
1046
1129
|
// only when it produced nothing at all — units still waiting for a map or
|
|
1047
1130
|
// an approval are the normal state of a live project. Preflight skips are
|
|
1048
1131
|
// not counted here: reaching this point in an explicit scope means
|
|
1049
1132
|
// --continue-on-missing was passed, which IS the opt-in to tolerate them.
|
|
1050
|
-
|
|
1133
|
+
// --check reports like its checklist: an audit box that does not hold is a non-zero exit (#935).
|
|
1134
|
+
const auditFails = (decisions?.untrustedAudits.length ?? 0) + (decisions?.failingAudits.length ?? 0);
|
|
1135
|
+
if (options.check && auditFails) log(`${COLOR.red}✗ --check: ${auditFails} unit(s) whose audit does not pass — see the audit box above.${COLOR.reset}`);
|
|
1136
|
+
const failed = (explicitScope
|
|
1051
1137
|
? notExported.length > 0
|
|
1052
|
-
: matrixSummaries.length === 0;
|
|
1138
|
+
: matrixSummaries.length === 0) || (!!options.check && auditFails > 0);
|
|
1053
1139
|
if (failed) process.exit(1);
|
|
1054
1140
|
return;
|
|
1055
1141
|
}
|
|
@@ -1064,6 +1150,7 @@ export function registerDeliveryCommand(program: Command): void {
|
|
|
1064
1150
|
// 4. Summary
|
|
1065
1151
|
printSummaryTable(summaries);
|
|
1066
1152
|
printSkipSummary(skipped, []);
|
|
1153
|
+
await printDeliveryChecklist(cwd, toExport, decisions?.acceptedInRun);
|
|
1067
1154
|
// Same rule as the matrix path: every attempted target in an explicit scope
|
|
1068
1155
|
// must have produced a file; a sweep only fails when nothing was written.
|
|
1069
1156
|
if (explicitScope ? summaries.length < toExport.length : summaries.length === 0) process.exit(1);
|
package/src/cli/commands/gate.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as path from 'path';
|
|
|
3
3
|
import * as fs from 'fs';
|
|
4
4
|
import { runGate, renderGate, GatePhase } from '../../harness/journey';
|
|
5
5
|
import { findUnitDir } from '../resolve-unit';
|
|
6
|
+
import { withProjectInvocationInText } from '../project-sungen-invocation';
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
const PHASES: GatePhase[] = ['create', 'run', 'deliver'];
|
|
@@ -24,7 +25,7 @@ export function registerGateCommand(program: Command): void {
|
|
|
24
25
|
|
|
25
26
|
const verdict = runGate(process.cwd(), name, phase);
|
|
26
27
|
if (options.json) console.log(JSON.stringify(verdict, null, 2));
|
|
27
|
-
else console.log(renderGate(verdict));
|
|
28
|
+
else console.log(withProjectInvocationInText(renderGate(verdict), process.cwd())); // waive / sign-off hints as the project runs sungen (#963)
|
|
28
29
|
|
|
29
30
|
// Exit 2 on HALT — usable in CI / the orchestration loop to block the next phase.
|
|
30
31
|
process.exit(verdict.status === 'halt' ? 2 : 0);
|
|
@@ -7,6 +7,8 @@ import { scanTestDataSecrets, formatSecretScan, type SecretScanResult } from '..
|
|
|
7
7
|
import { capabilityRegistry } from '../../capabilities/registry';
|
|
8
8
|
import { discoverAndRegisterCapabilities } from '../../capabilities/discover';
|
|
9
9
|
import { readCapabilities, writeCapabilities, driverMeta, loadDriverCatalog } from '../../harness/capability';
|
|
10
|
+
import { isHandWritten } from '../../harness/parse';
|
|
11
|
+
import { generatedSubdir, plainRunCommand } from '../run-command-hints';
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* Find .feature files recursively in a directory
|
|
@@ -20,7 +22,8 @@ function findFeatureFiles(dir: string): string[] {
|
|
|
20
22
|
const fullPath = path.join(dir, entry.name);
|
|
21
23
|
if (entry.isDirectory()) {
|
|
22
24
|
files.push(...findFeatureFiles(fullPath));
|
|
23
|
-
} else if (entry.isFile() && entry.name.endsWith('.feature')) {
|
|
25
|
+
} else if (entry.isFile() && entry.name.endsWith('.feature') && !isHandWritten([], fullPath)) {
|
|
26
|
+
// A derived `*.free.feature` is a contract for hand-written tests — never compiled (DOS-14.8).
|
|
24
27
|
files.push(fullPath);
|
|
25
28
|
}
|
|
26
29
|
}
|
|
@@ -253,8 +256,18 @@ export function registerGenerateCommand(program: Command): void {
|
|
|
253
256
|
if (shown.length < ddWarnings.length) console.log(` … and ${ddWarnings.length - shown.length} more (run with -v to list all)`);
|
|
254
257
|
}
|
|
255
258
|
|
|
256
|
-
|
|
257
|
-
|
|
259
|
+
// Never the interactive `--ui` (#939): an agent cannot drive it, and run-test is what records the results.
|
|
260
|
+
const unit = screenName || flowName || apiName;
|
|
261
|
+
const nextStep = platform === 'mobile' ? 'npm run test:mobile' : unit ? `/sungen:run-test ${unit}` : 'npx playwright test';
|
|
262
|
+
console.log(`Next step: ${nextStep}`);
|
|
263
|
+
// The plain run writes each feature's results where `sungen next` and `sungen delivery` read them (#964) —
|
|
264
|
+
// a bare `npx playwright test` wrote them to the config's default file, which neither reads.
|
|
265
|
+
if (platform !== 'mobile' && unit) {
|
|
266
|
+
const genRel = generatedSubdir(apiName ? 'api' : flowName ? 'flow' : 'screen', unit);
|
|
267
|
+
console.log(' or the plain run — it writes the results file `sungen next` and `sungen delivery` read:');
|
|
268
|
+
for (const f of featureFiles) console.log(` ${plainRunCommand(genRel, path.basename(f, '.feature'))}`);
|
|
269
|
+
}
|
|
270
|
+
console.log('');
|
|
258
271
|
} catch (error) {
|
|
259
272
|
console.error('Error:', error instanceof Error ? error.message : error);
|
|
260
273
|
process.exit(1);
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
import * as path from 'path';
|
|
3
|
-
import
|
|
4
|
-
import { runJourney, waive, signoff, renderJourneyBoard, rollupJourney, renderRollupBoard } from '../../harness/journey';
|
|
3
|
+
import { runJourney, renderJourneyBoard, rollupJourney, renderRollupBoard, writeJourneyFileBestEffort } from '../../harness/journey';
|
|
5
4
|
import { reportSlug } from '../../harness/unit-paths';
|
|
6
5
|
import { findUnitDir } from '../resolve-unit';
|
|
6
|
+
import { answerPendingMigration, decideWithConfirmation, DECIDE_KINDS, signoffWithConfirmation, waiveWithConfirmation } from '../../decisions/confirmed-decision-commands';
|
|
7
|
+
import { processIO } from '../../decisions/human-confirmation';
|
|
8
|
+
import { withProjectInvocationInText } from '../project-sungen-invocation';
|
|
7
9
|
|
|
10
|
+
const collect = (value: string, previous: string[]): string[] => [...previous, value];
|
|
8
11
|
|
|
9
12
|
export function registerJourneyCommand(program: Command): void {
|
|
10
13
|
program
|
|
@@ -12,22 +15,41 @@ export function registerJourneyCommand(program: Command): void {
|
|
|
12
15
|
.description('Durable "you are here" board (#381): obligations + what-to-review + next, synthesised read-only from the audit report + ledger already on disk.')
|
|
13
16
|
.option('-s, --screen <name>', 'Screen / flow / api unit name')
|
|
14
17
|
.option('--all', 'Roll up every unit (screens + flows + api) into one board — the serial review surface for multi-unit fan-out')
|
|
15
|
-
.option('--waive <obligation>', 'Waive an obligation (e.g. OB-coverage) — requires --reason')
|
|
16
|
-
.option('--reason <text>', '
|
|
17
|
-
.option('--
|
|
18
|
+
.option('--waive <obligation>', 'Waive an obligation (e.g. OB-coverage) — requires --reason; a human types a confirmation on a TTY')
|
|
19
|
+
.option('--reason <text>', 'Why: mandatory with --waive and --decide')
|
|
20
|
+
.option('--decide <kind>', `Record a decision (${DECIDE_KINDS.join(' | ')}) in qa/decisions/, or the unit's with --screen — a human types a confirmation on a TTY`)
|
|
21
|
+
.option('--text <text>', 'What was decided (with --decide)')
|
|
22
|
+
.option('--anchor <id>', 'Spec anchor the decision is about, e.g. SPEC-AUTH-001#A-2 (repeatable, with --decide)', collect, [])
|
|
23
|
+
.option('--payload <json>', 'Kind-specific fields as a JSON object, e.g. a gate-override\'s {"rule","severity","scope"} (with --decide)')
|
|
24
|
+
.option('--visibility <v>', 'internal (default, never exported) | client (with --decide)')
|
|
25
|
+
.option('--supersedes <id>', 'The decision this one replaces — the old entry is never edited (with --decide)')
|
|
26
|
+
.option('--signoff', 'Sign off the review queue — the single human gate (allowed only when every other obligation is satisfied/waived); a human types a confirmation on a TTY')
|
|
18
27
|
.option('--by <name>', 'Who is signing off (recorded with --signoff)')
|
|
19
28
|
.option('--json', 'Output the raw JSON report')
|
|
20
|
-
.action((options) => {
|
|
29
|
+
.action(async (options) => {
|
|
30
|
+
const io = processIO();
|
|
21
31
|
try {
|
|
32
|
+
if (options.decide) {
|
|
33
|
+
if (options.screen && !findUnitDir(options.screen)) throw new Error(`Not found: qa/screens/${options.screen}, qa/flows/${options.screen}, or qa/api/${options.screen}`);
|
|
34
|
+
const r = await decideWithConfirmation({
|
|
35
|
+
projectRoot: process.cwd(), unit: options.screen, kind: options.decide, text: options.text, reason: options.reason,
|
|
36
|
+
anchors: options.anchor, payload: options.payload, visibility: options.visibility, supersedes: options.supersedes, io,
|
|
37
|
+
});
|
|
38
|
+
if (options.json) { console.log(JSON.stringify({ status: r.status, path: path.relative(process.cwd(), r.path), entry: r.entry }, null, 2)); return; }
|
|
39
|
+
console.log(`\n${r.status === 'created' ? '✓ Recorded' : '= Already recorded'} ${r.entry.id} → ${path.relative(process.cwd(), r.path)}`);
|
|
40
|
+
console.log(' Commit it through review: a decision not yet in git HEAD is flagged at delivery (decision.in-run).\n');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
22
44
|
if (options.all) {
|
|
23
45
|
const rows = rollupJourney(process.cwd());
|
|
24
46
|
const board = renderRollupBoard(rows);
|
|
25
47
|
const outDir = path.join(process.cwd(), '.sungen', 'journey');
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
48
|
+
// Derived files: a read-only checkout still gets the board (DOS-13.3).
|
|
49
|
+
writeJourneyFileBestEffort(path.join(outDir, '_rollup.json'), JSON.stringify(rows, null, 2));
|
|
50
|
+
const written = writeJourneyFileBestEffort(path.join(outDir, '_rollup.board.md'), board);
|
|
29
51
|
if (options.json) console.log(JSON.stringify(rows, null, 2));
|
|
30
|
-
else { console.log(''); console.log(board); console.log(` Board: ${path.relative(process.cwd(),
|
|
52
|
+
else { console.log(''); console.log(board); console.log(` Board: ${written ? path.relative(process.cwd(), written) : '(not written — read-only checkout)'}`); console.log(''); }
|
|
31
53
|
return;
|
|
32
54
|
}
|
|
33
55
|
|
|
@@ -35,29 +57,34 @@ export function registerJourneyCommand(program: Command): void {
|
|
|
35
57
|
if (!name) throw new Error('Provide --screen <name> (or --all for the roll-up)');
|
|
36
58
|
if (!findUnitDir(name)) throw new Error(`Not found: qa/screens/${name}, qa/flows/${name}, or qa/api/${name}`);
|
|
37
59
|
|
|
60
|
+
// A migration killed half-way (T6): a human answers REVERT or KEEP before anything else runs.
|
|
61
|
+
const restored = await answerPendingMigration(process.cwd(), name, io);
|
|
62
|
+
if (restored) io.output.write(` Interrupted migration resolved${restored.length ? ` — restored ${restored.length} file(s)` : ' — kept the new files'}.\n`);
|
|
63
|
+
|
|
38
64
|
const report = options.waive
|
|
39
|
-
?
|
|
65
|
+
? await waiveWithConfirmation({ projectRoot: process.cwd(), unit: name, obligation: options.waive, reason: options.reason || '', io })
|
|
40
66
|
: options.signoff
|
|
41
|
-
?
|
|
67
|
+
? await signoffWithConfirmation({ projectRoot: process.cwd(), unit: name, by: options.by, io })
|
|
42
68
|
: runJourney(process.cwd(), name);
|
|
43
69
|
|
|
44
70
|
const outDir = path.join(process.cwd(), '.sungen', 'journey');
|
|
45
|
-
fs.mkdirSync(outDir, { recursive: true });
|
|
46
71
|
const slug = reportSlug(name);
|
|
47
|
-
|
|
72
|
+
// Derived files: a read-only checkout still gets the board (DOS-13.3).
|
|
73
|
+
writeJourneyFileBestEffort(path.join(outDir, `${slug}.json`), JSON.stringify(report, null, 2));
|
|
48
74
|
const board = renderJourneyBoard(report);
|
|
49
|
-
|
|
75
|
+
const written = writeJourneyFileBestEffort(path.join(outDir, `${slug}.board.md`), board);
|
|
50
76
|
|
|
51
77
|
if (options.json) {
|
|
52
78
|
console.log(JSON.stringify(report, null, 2));
|
|
53
79
|
} else {
|
|
54
80
|
console.log('');
|
|
55
|
-
console.log(board);
|
|
56
|
-
console.log(` Board: ${path.relative(process.cwd(),
|
|
81
|
+
console.log(withProjectInvocationInText(board, process.cwd()));
|
|
82
|
+
console.log(` Board: ${written ? path.relative(process.cwd(), written) : '(not written — read-only checkout)'}`);
|
|
57
83
|
console.log('');
|
|
58
84
|
}
|
|
59
85
|
} catch (error) {
|
|
60
|
-
|
|
86
|
+
// A refusal names the command a human runs instead: as this project runs sungen (#963).
|
|
87
|
+
console.error('Error:', error instanceof Error ? withProjectInvocationInText(error.message, process.cwd()) : error);
|
|
61
88
|
process.exit(1);
|
|
62
89
|
}
|
|
63
90
|
});
|