@vedprakash-m/tenet 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +104 -2
- package/dist/cli.d.ts +53 -0
- package/dist/cli.js +389 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/bless.d.ts +2 -0
- package/dist/commands/bless.js +27 -0
- package/dist/commands/bless.js.map +1 -0
- package/dist/commands/board.d.ts +32 -0
- package/dist/commands/board.js +31 -0
- package/dist/commands/board.js.map +1 -0
- package/dist/commands/check.d.ts +2 -0
- package/dist/commands/check.js +35 -0
- package/dist/commands/check.js.map +1 -0
- package/dist/commands/context.d.ts +45 -0
- package/dist/commands/context.js +49 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/doctor.d.ts +8 -0
- package/dist/commands/doctor.js +47 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/fix.d.ts +2 -0
- package/dist/commands/fix.js +25 -0
- package/dist/commands/fix.js.map +1 -0
- package/dist/commands/index.d.ts +12 -0
- package/dist/commands/index.js +13 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/init.d.ts +11 -0
- package/dist/commands/init.js +215 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/onboard.d.ts +45 -0
- package/dist/commands/onboard.js +66 -0
- package/dist/commands/onboard.js.map +1 -0
- package/dist/commands/remove.d.ts +8 -0
- package/dist/commands/remove.js +56 -0
- package/dist/commands/remove.js.map +1 -0
- package/dist/commands/split.d.ts +2 -0
- package/dist/commands/split.js +20 -0
- package/dist/commands/split.js.map +1 -0
- package/dist/commands/upgrade.d.ts +8 -0
- package/dist/commands/upgrade.js +69 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/commands/verify.d.ts +33 -0
- package/dist/commands/verify.js +147 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/context/index.d.ts +61 -0
- package/dist/context/index.js +401 -0
- package/dist/context/index.js.map +1 -0
- package/dist/core/clock.d.ts +3 -0
- package/dist/core/clock.js +16 -0
- package/dist/core/clock.js.map +1 -0
- package/dist/core/commands.d.ts +38 -0
- package/dist/core/commands.js +2 -0
- package/dist/core/commands.js.map +1 -0
- package/dist/core/fs.d.ts +7 -0
- package/dist/core/fs.js +97 -0
- package/dist/core/fs.js.map +1 -0
- package/dist/core/git.d.ts +11 -0
- package/dist/core/git.js +223 -0
- package/dist/core/git.js.map +1 -0
- package/dist/core/hash.d.ts +6 -0
- package/dist/core/hash.js +123 -0
- package/dist/core/hash.js.map +1 -0
- package/dist/core/messages.d.ts +276 -0
- package/dist/core/messages.js +289 -0
- package/dist/core/messages.js.map +1 -0
- package/dist/core/output.d.ts +22 -0
- package/dist/core/output.js +78 -0
- package/dist/core/output.js.map +1 -0
- package/dist/core/schema.d.ts +14 -0
- package/dist/core/schema.js +138 -0
- package/dist/core/schema.js.map +1 -0
- package/dist/core/yaml.d.ts +1 -0
- package/dist/core/yaml.js +16 -0
- package/dist/core/yaml.js.map +1 -0
- package/dist/install/doctor.d.ts +3 -0
- package/dist/install/doctor.js +365 -0
- package/dist/install/doctor.js.map +1 -0
- package/dist/install/environment.d.ts +4 -0
- package/dist/install/environment.js +47 -0
- package/dist/install/environment.js.map +1 -0
- package/dist/install/hosts.d.ts +5 -0
- package/dist/install/hosts.js +105 -0
- package/dist/install/hosts.js.map +1 -0
- package/dist/install/init.d.ts +2 -0
- package/dist/install/init.js +80 -0
- package/dist/install/init.js.map +1 -0
- package/dist/install/integrity.d.ts +24 -0
- package/dist/install/integrity.js +200 -0
- package/dist/install/integrity.js.map +1 -0
- package/dist/install/manifest.d.ts +27 -0
- package/dist/install/manifest.js +276 -0
- package/dist/install/manifest.js.map +1 -0
- package/dist/install/preflight.d.ts +3 -0
- package/dist/install/preflight.js +558 -0
- package/dist/install/preflight.js.map +1 -0
- package/dist/install/remove.d.ts +2 -0
- package/dist/install/remove.js +668 -0
- package/dist/install/remove.js.map +1 -0
- package/dist/install/types.d.ts +303 -0
- package/dist/install/types.js +2 -0
- package/dist/install/types.js.map +1 -0
- package/dist/install/upgrade.d.ts +2 -0
- package/dist/install/upgrade.js +307 -0
- package/dist/install/upgrade.js.map +1 -0
- package/dist/install/writes.d.ts +15 -0
- package/dist/install/writes.js +1200 -0
- package/dist/install/writes.js.map +1 -0
- package/dist/mcp/index.d.ts +13 -0
- package/dist/mcp/index.js +437 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/onboard/assignment.d.ts +22 -0
- package/dist/onboard/assignment.js +102 -0
- package/dist/onboard/assignment.js.map +1 -0
- package/dist/onboard/bless.d.ts +104 -0
- package/dist/onboard/bless.js +729 -0
- package/dist/onboard/bless.js.map +1 -0
- package/dist/onboard/card.d.ts +31 -0
- package/dist/onboard/card.js +175 -0
- package/dist/onboard/card.js.map +1 -0
- package/dist/onboard/findings.d.ts +3 -0
- package/dist/onboard/findings.js +185 -0
- package/dist/onboard/findings.js.map +1 -0
- package/dist/onboard/inventory.d.ts +21 -0
- package/dist/onboard/inventory.js +302 -0
- package/dist/onboard/inventory.js.map +1 -0
- package/dist/onboard/preflight.d.ts +32 -0
- package/dist/onboard/preflight.js +156 -0
- package/dist/onboard/preflight.js.map +1 -0
- package/dist/onboard/refresh.d.ts +28 -0
- package/dist/onboard/refresh.js +65 -0
- package/dist/onboard/refresh.js.map +1 -0
- package/dist/policy/errors.d.ts +12 -0
- package/dist/policy/errors.js +25 -0
- package/dist/policy/errors.js.map +1 -0
- package/dist/policy/index.d.ts +4 -0
- package/dist/policy/index.js +4 -0
- package/dist/policy/index.js.map +1 -0
- package/dist/policy/kit.d.ts +12 -0
- package/dist/policy/kit.js +162 -0
- package/dist/policy/kit.js.map +1 -0
- package/dist/policy/load.d.ts +15 -0
- package/dist/policy/load.js +415 -0
- package/dist/policy/load.js.map +1 -0
- package/dist/policy/selectors.d.ts +2 -0
- package/dist/policy/selectors.js +43 -0
- package/dist/policy/selectors.js.map +1 -0
- package/dist/policy/types.d.ts +40 -0
- package/dist/policy/types.js +2 -0
- package/dist/policy/types.js.map +1 -0
- package/dist/reports/acceptance.d.ts +2 -0
- package/dist/reports/acceptance.js +79 -0
- package/dist/reports/acceptance.js.map +1 -0
- package/dist/reports/declared.d.ts +6 -0
- package/dist/reports/declared.js +114 -0
- package/dist/reports/declared.js.map +1 -0
- package/dist/reports/errors.d.ts +8 -0
- package/dist/reports/errors.js +12 -0
- package/dist/reports/errors.js.map +1 -0
- package/dist/reports/index.d.ts +8 -0
- package/dist/reports/index.js +8 -0
- package/dist/reports/index.js.map +1 -0
- package/dist/reports/items.d.ts +6 -0
- package/dist/reports/items.js +85 -0
- package/dist/reports/items.js.map +1 -0
- package/dist/reports/read-types.d.ts +7 -0
- package/dist/reports/read-types.js +2 -0
- package/dist/reports/read-types.js.map +1 -0
- package/dist/reports/read.d.ts +3 -0
- package/dist/reports/read.js +96 -0
- package/dist/reports/read.js.map +1 -0
- package/dist/reports/registry.d.ts +32 -0
- package/dist/reports/registry.js +372 -0
- package/dist/reports/registry.js.map +1 -0
- package/dist/reports/scan.d.ts +23 -0
- package/dist/reports/scan.js +406 -0
- package/dist/reports/scan.js.map +1 -0
- package/dist/reports/tags.d.ts +4 -0
- package/dist/reports/tags.js +53 -0
- package/dist/reports/tags.js.map +1 -0
- package/dist/reports/types.d.ts +90 -0
- package/dist/reports/types.js +2 -0
- package/dist/reports/types.js.map +1 -0
- package/dist/reports/weakening.d.ts +5 -0
- package/dist/reports/weakening.js +260 -0
- package/dist/reports/weakening.js.map +1 -0
- package/dist/sdk.d.ts +8 -0
- package/dist/sdk.js +8 -0
- package/dist/sdk.js.map +1 -0
- package/dist/specs/anchors.d.ts +44 -0
- package/dist/specs/anchors.js +171 -0
- package/dist/specs/anchors.js.map +1 -0
- package/dist/specs/check.d.ts +19 -0
- package/dist/specs/check.js +656 -0
- package/dist/specs/check.js.map +1 -0
- package/dist/specs/citations.d.ts +5 -0
- package/dist/specs/citations.js +65 -0
- package/dist/specs/citations.js.map +1 -0
- package/dist/specs/deltas.d.ts +10 -0
- package/dist/specs/deltas.js +110 -0
- package/dist/specs/deltas.js.map +1 -0
- package/dist/specs/fix.d.ts +11 -0
- package/dist/specs/fix.js +583 -0
- package/dist/specs/fix.js.map +1 -0
- package/dist/specs/flags.d.ts +25 -0
- package/dist/specs/flags.js +100 -0
- package/dist/specs/flags.js.map +1 -0
- package/dist/specs/ladder.d.ts +13 -0
- package/dist/specs/ladder.js +105 -0
- package/dist/specs/ladder.js.map +1 -0
- package/dist/specs/parse.d.ts +58 -0
- package/dist/specs/parse.js +565 -0
- package/dist/specs/parse.js.map +1 -0
- package/dist/specs/sections.d.ts +2 -0
- package/dist/specs/sections.js +36 -0
- package/dist/specs/sections.js.map +1 -0
- package/dist/specs/split.d.ts +8 -0
- package/dist/specs/split.js +264 -0
- package/dist/specs/split.js.map +1 -0
- package/dist/specs/touched.d.ts +11 -0
- package/dist/specs/touched.js +376 -0
- package/dist/specs/touched.js.map +1 -0
- package/dist/types/generated.d.ts +547 -0
- package/dist/types/generated.js +4 -0
- package/dist/types/generated.js.map +1 -0
- package/dist/verify/bundle.d.ts +104 -0
- package/dist/verify/bundle.js +212 -0
- package/dist/verify/bundle.js.map +1 -0
- package/dist/verify/card.d.ts +7 -0
- package/dist/verify/card.js +105 -0
- package/dist/verify/card.js.map +1 -0
- package/dist/verify/forge.d.ts +56 -0
- package/dist/verify/forge.js +173 -0
- package/dist/verify/forge.js.map +1 -0
- package/dist/verify/record.d.ts +63 -0
- package/dist/verify/record.js +539 -0
- package/dist/verify/record.js.map +1 -0
- package/dist/verify/records.d.ts +33 -0
- package/dist/verify/records.js +107 -0
- package/dist/verify/records.js.map +1 -0
- package/dist/verify/run-checks.d.ts +22 -0
- package/dist/verify/run-checks.js +149 -0
- package/dist/verify/run-checks.js.map +1 -0
- package/dist/views/specs-board.d.ts +43 -0
- package/dist/views/specs-board.js +427 -0
- package/dist/views/specs-board.js.map +1 -0
- package/kit/CHANGELOG.md +42 -0
- package/kit/README.md +18 -0
- package/kit/TENET.md +83 -0
- package/kit/agents/drafter.md +78 -0
- package/kit/agents/spec-reviewer.md +75 -0
- package/kit/defaults/tenet.yaml +25 -0
- package/kit/hooks/pre-commit +7 -0
- package/kit/packs/minimal/pack.yaml +54 -0
- package/kit/practices/default.md +6 -0
- package/kit/schemas/agent-card.json +280 -0
- package/kit/schemas/assignment.json +128 -0
- package/kit/schemas/board.json +563 -0
- package/kit/schemas/bundle.json +148 -0
- package/kit/schemas/finding.json +59 -0
- package/kit/schemas/interview.json +48 -0
- package/kit/schemas/inventory.json +409 -0
- package/kit/schemas/lock.json +37 -0
- package/kit/schemas/manifest-local.json +31 -0
- package/kit/schemas/manifest.json +109 -0
- package/kit/schemas/pack.json +190 -0
- package/kit/schemas/packet.json +94 -0
- package/kit/schemas/proof-card.json +526 -0
- package/kit/schemas/results/bless.json +14 -0
- package/kit/schemas/results/board.json +169 -0
- package/kit/schemas/results/check.json +42 -0
- package/kit/schemas/results/context.json +169 -0
- package/kit/schemas/results/doctor.json +22 -0
- package/kit/schemas/results/fix.json +33 -0
- package/kit/schemas/results/init.json +102 -0
- package/kit/schemas/results/mcp.json +173 -0
- package/kit/schemas/results/onboard.json +72 -0
- package/kit/schemas/results/remove.json +34 -0
- package/kit/schemas/results/split.json +21 -0
- package/kit/schemas/results/upgrade.json +23 -0
- package/kit/schemas/results/verify.json +34 -0
- package/kit/schemas/spec-front-matter.json +218 -0
- package/kit/schemas/tenet-yaml.json +356 -0
- package/kit/schemas/test-report.json +77 -0
- package/kit/skills/draft-specs/SKILL.md +38 -0
- package/kit/skills/review-with-findings/SKILL.md +21 -0
- package/kit/skills/work-a-change/SKILL.md +30 -0
- package/kit/templates/agents-block.md +47 -0
- package/kit/templates/design.md +43 -0
- package/kit/templates/escalation.md +34 -0
- package/kit/templates/experience.md +33 -0
- package/kit/templates/intent.md +56 -0
- package/kit/templates/plan.md +35 -0
- package/kit/templates/pull-request.md +25 -0
- package/kit/templates/requirements.md +43 -0
- package/kit/templates/vision.md +69 -0
- package/kit/workflows/existing-ci-step.yml +83 -0
- package/kit/workflows/tenet-tests.yml +88 -0
- package/kit/workflows/tenet.yml +87 -0
- package/package.json +67 -4
- package/pkg/conformance/alg-02/README.md +18 -0
- package/pkg/conformance/alg-02/n01-duplicate-slug/expected.json +5 -0
- package/pkg/conformance/alg-02/n01-duplicate-slug/input.json +5 -0
- package/pkg/conformance/alg-02/n02-ambiguous-rename/expected.json +12 -0
- package/pkg/conformance/alg-02/n02-ambiguous-rename/input.json +20 -0
- package/pkg/conformance/alg-02/n03-missing-front/expected.json +12 -0
- package/pkg/conformance/alg-02/n03-missing-front/input.json +5 -0
- package/pkg/conformance/alg-02/n04-invalid-origin/expected.json +4 -0
- package/pkg/conformance/alg-02/n04-invalid-origin/input.json +9 -0
- package/pkg/conformance/alg-02/p01-leading-preamble/expected.json +15 -0
- package/pkg/conformance/alg-02/p01-leading-preamble/input.json +5 -0
- package/pkg/conformance/alg-02/p02-four-backtick-fence/expected.json +11 -0
- package/pkg/conformance/alg-02/p02-four-backtick-fence/input.json +5 -0
- package/pkg/conformance/alg-02/p03-unicode-and-empty-slug/expected.json +14 -0
- package/pkg/conformance/alg-02/p03-unicode-and-empty-slug/input.json +5 -0
- package/pkg/conformance/alg-02/p04-normalized-bodies/expected.json +6 -0
- package/pkg/conformance/alg-02/p04-normalized-bodies/input.json +7 -0
- package/pkg/conformance/alg-02/p05-rename-digest/expected.json +10 -0
- package/pkg/conformance/alg-02/p05-rename-digest/input.json +16 -0
- package/pkg/conformance/alg-02/p06-requirement-prefix/expected.json +14 -0
- package/pkg/conformance/alg-02/p06-requirement-prefix/input.json +7 -0
- package/pkg/conformance/alg-03/README.md +20 -0
- package/pkg/conformance/alg-03/n01-ambiguous-relocation/expected.json +3 -0
- package/pkg/conformance/alg-03/n01-ambiguous-relocation/input.json +8 -0
- package/pkg/conformance/alg-03/n02-missing-source/expected.json +5 -0
- package/pkg/conformance/alg-03/n02-missing-source/input.json +12 -0
- package/pkg/conformance/alg-03/n03-edited-intent/expected.json +5 -0
- package/pkg/conformance/alg-03/n03-edited-intent/input.json +14 -0
- package/pkg/conformance/alg-03/n04-unblessed-stale-metadata/expected.json +3 -0
- package/pkg/conformance/alg-03/n04-unblessed-stale-metadata/input.json +12 -0
- package/pkg/conformance/alg-03/n05-ambiguous-moved-anchor/expected.json +5 -0
- package/pkg/conformance/alg-03/n05-ambiguous-moved-anchor/input.json +14 -0
- package/pkg/conformance/alg-03/p01-path-anchor/expected.json +8 -0
- package/pkg/conformance/alg-03/p01-path-anchor/input.json +15 -0
- package/pkg/conformance/alg-03/p02-peer-test-anchor/expected.json +8 -0
- package/pkg/conformance/alg-03/p02-peer-test-anchor/input.json +15 -0
- package/pkg/conformance/alg-03/p03-doc-anchor/expected.json +8 -0
- package/pkg/conformance/alg-03/p03-doc-anchor/input.json +15 -0
- package/pkg/conformance/alg-03/p04-unique-relocation/expected.json +4 -0
- package/pkg/conformance/alg-03/p04-unique-relocation/input.json +8 -0
- package/pkg/conformance/alg-03/p05-clean-moved-anchor/expected.json +3 -0
- package/pkg/conformance/alg-03/p05-clean-moved-anchor/input.json +14 -0
- package/pkg/conformance/alg-03/p06-owner-precedence/expected.json +5 -0
- package/pkg/conformance/alg-03/p06-owner-precedence/input.json +7 -0
- package/pkg/conformance/alg-03/p07-owner-last-match/expected.json +6 -0
- package/pkg/conformance/alg-03/p07-owner-last-match/input.json +6 -0
- package/pkg/conformance/alg-04/README.md +19 -0
- package/pkg/conformance/alg-04/n01-missing-file/expected.json +10 -0
- package/pkg/conformance/alg-04/n01-missing-file/input.json +6 -0
- package/pkg/conformance/alg-04/n02-backward-range/expected.json +10 -0
- package/pkg/conformance/alg-04/n02-backward-range/input.json +8 -0
- package/pkg/conformance/alg-04/n03-missing-heading/expected.json +10 -0
- package/pkg/conformance/alg-04/n03-missing-heading/input.json +8 -0
- package/pkg/conformance/alg-04/n04-reversed-test-segments/expected.json +10 -0
- package/pkg/conformance/alg-04/n04-reversed-test-segments/input.json +8 -0
- package/pkg/conformance/alg-04/n05-out-of-range/expected.json +10 -0
- package/pkg/conformance/alg-04/n05-out-of-range/input.json +8 -0
- package/pkg/conformance/alg-04/p01-single-line/expected.json +3 -0
- package/pkg/conformance/alg-04/p01-single-line/input.json +8 -0
- package/pkg/conformance/alg-04/p02-full-range/expected.json +3 -0
- package/pkg/conformance/alg-04/p02-full-range/input.json +8 -0
- package/pkg/conformance/alg-04/p03-doc-heading/expected.json +3 -0
- package/pkg/conformance/alg-04/p03-doc-heading/input.json +8 -0
- package/pkg/conformance/alg-04/p04-nested-test/expected.json +3 -0
- package/pkg/conformance/alg-04/p04-nested-test/input.json +8 -0
- package/pkg/conformance/alg-04/p05-python-test/expected.json +3 -0
- package/pkg/conformance/alg-04/p05-python-test/input.json +8 -0
- package/pkg/conformance/alg-04/p06-go-test/expected.json +3 -0
- package/pkg/conformance/alg-04/p06-go-test/input.json +8 -0
- package/pkg/conformance/alg-08/cases.json +263 -0
- package/pkg/conformance/alg-09/cases.json +95 -0
- package/pkg/conformance/alg-10/README.md +24 -0
- package/pkg/conformance/alg-10/n01-no-blessed-material/expected.json +7 -0
- package/pkg/conformance/alg-10/n01-no-blessed-material/input.json +23 -0
- package/pkg/conformance/alg-10/n02-rejected-section/expected.json +7 -0
- package/pkg/conformance/alg-10/n02-rejected-section/input.json +24 -0
- package/pkg/conformance/alg-10/n03-broken-blessed-copy/expected.json +7 -0
- package/pkg/conformance/alg-10/n03-broken-blessed-copy/input.json +27 -0
- package/pkg/conformance/alg-10/n04-local-omitted/expected.json +12 -0
- package/pkg/conformance/alg-10/n04-local-omitted/input.json +27 -0
- package/pkg/conformance/alg-10/n05-over-budget-explicit-id/expected.json +10 -0
- package/pkg/conformance/alg-10/n05-over-budget-explicit-id/input.json +26 -0
- package/pkg/conformance/alg-10/n06-unknown-method/expected.json +11 -0
- package/pkg/conformance/alg-10/n06-unknown-method/input.json +32 -0
- package/pkg/conformance/alg-10/p01-path-admitted/expected.json +14 -0
- package/pkg/conformance/alg-10/p01-path-admitted/input.json +26 -0
- package/pkg/conformance/alg-10/p02-retry-once-source-changed/expected.json +15 -0
- package/pkg/conformance/alg-10/p02-retry-once-source-changed/input.json +26 -0
- package/pkg/conformance/alg-10/p03-id-and-path-deduplicate/expected.json +13 -0
- package/pkg/conformance/alg-10/p03-id-and-path-deduplicate/input.json +30 -0
- package/pkg/conformance/alg-10/p04-include-draft-with-blessing/expected.json +17 -0
- package/pkg/conformance/alg-10/p04-include-draft-with-blessing/input.json +27 -0
- package/pkg/conformance/alg-10/p05-no-inputs-global-and-index/expected.json +16 -0
- package/pkg/conformance/alg-10/p05-no-inputs-global-and-index/input.json +21 -0
- package/pkg/conformance/alg-10/p06-checked-policy-rule/expected.json +20 -0
- package/pkg/conformance/alg-10/p06-checked-policy-rule/input.json +26 -0
- package/pkg/conformance/alg-10/p07-mcp-session/expected.json +60 -0
- package/pkg/conformance/alg-10/p07-mcp-session/input.json +65 -0
- package/pkg/conformance/alg-10/p08-applies-to-prose/expected.json +12 -0
- package/pkg/conformance/alg-10/p08-applies-to-prose/input.json +25 -0
- package/pkg/conformance/alg-10/p09-global-beyond-reserve/expected.json +14 -0
- package/pkg/conformance/alg-10/p09-global-beyond-reserve/input.json +27 -0
- package/pkg/conformance/alg-10/p10-query-case-insensitive/expected.json +11 -0
- package/pkg/conformance/alg-10/p10-query-case-insensitive/input.json +23 -0
- package/pkg/conformance/alg-11/README.md +29 -0
- package/pkg/conformance/alg-11/n01-no-commits-refused/expected.json +11 -0
- package/pkg/conformance/alg-11/n01-no-commits-refused/input.json +13 -0
- package/pkg/conformance/alg-11/n02-secrets-and-env-skipped/expected.json +153 -0
- package/pkg/conformance/alg-11/n02-secrets-and-env-skipped/input.json +20 -0
- package/pkg/conformance/alg-11/n03-generated-vendored-and-tests-excluded-from-size/expected.json +171 -0
- package/pkg/conformance/alg-11/n03-generated-vendored-and-tests-excluded-from-size/input.json +22 -0
- package/pkg/conformance/alg-11/n04-binary-oversize-and-onboard-exclude-skipped/expected.json +137 -0
- package/pkg/conformance/alg-11/n04-binary-oversize-and-onboard-exclude-skipped/input.json +20 -0
- package/pkg/conformance/alg-11/n05-uncommitted-worktree-source-ignored/expected.json +124 -0
- package/pkg/conformance/alg-11/n05-uncommitted-worktree-source-ignored/input.json +17 -0
- package/pkg/conformance/alg-11/p01-small-one-file-service/expected.json +145 -0
- package/pkg/conformance/alg-11/p01-small-one-file-service/input.json +18 -0
- package/pkg/conformance/alg-11/p02-four-codeowners-areas-separate/expected.json +255 -0
- package/pkg/conformance/alg-11/p02-four-codeowners-areas-separate/input.json +17 -0
- package/pkg/conformance/alg-11/p03-twenty-thousand-lines-separate/expected.json +169 -0
- package/pkg/conformance/alg-11/p03-twenty-thousand-lines-separate/input.json +14 -0
- package/pkg/conformance/alg-11/p04-merge-small-unit-into-neighbor/expected.json +186 -0
- package/pkg/conformance/alg-11/p04-merge-small-unit-into-neighbor/input.json +15 -0
- package/pkg/conformance/alg-11/p05-layout-override/expected.json +128 -0
- package/pkg/conformance/alg-11/p05-layout-override/input.json +14 -0
- package/pkg/conformance/alg-11/p06-cli-kind-and-instruction-files/expected.json +154 -0
- package/pkg/conformance/alg-11/p06-cli-kind-and-instruction-files/input.json +18 -0
- package/pkg/conformance/alg-11/p07-local-test-report-in-observations/expected.json +131 -0
- package/pkg/conformance/alg-11/p07-local-test-report-in-observations/input.json +17 -0
- package/pkg/conformance/alg-11/p08-first-findings-all-four-kinds/expected.json +207 -0
- package/pkg/conformance/alg-11/p08-first-findings-all-four-kinds/input.json +20 -0
- package/pkg/conformance/alg-14/README.md +21 -0
- package/pkg/conformance/alg-14/n01-draft-implements/expected.json +3 -0
- package/pkg/conformance/alg-14/n01-draft-implements/input.json +12 -0
- package/pkg/conformance/alg-14/n02-outside-replacement/expected.json +8 -0
- package/pkg/conformance/alg-14/n02-outside-replacement/input.json +12 -0
- package/pkg/conformance/alg-14/n03-insertion-at-end/expected.json +8 -0
- package/pkg/conformance/alg-14/n03-insertion-at-end/input.json +12 -0
- package/pkg/conformance/alg-14/n04-same-owner-different-rule/expected.json +3 -0
- package/pkg/conformance/alg-14/n04-same-owner-different-rule/input.json +16 -0
- package/pkg/conformance/alg-14/n05-missing-implements/expected.json +3 -0
- package/pkg/conformance/alg-14/n05-missing-implements/input.json +12 -0
- package/pkg/conformance/alg-14/p01-implements-first/expected.json +8 -0
- package/pkg/conformance/alg-14/p01-implements-first/input.json +14 -0
- package/pkg/conformance/alg-14/p02-overlapping-replacement/expected.json +8 -0
- package/pkg/conformance/alg-14/p02-overlapping-replacement/input.json +12 -0
- package/pkg/conformance/alg-14/p03-interior-insertion/expected.json +8 -0
- package/pkg/conformance/alg-14/p03-interior-insertion/input.json +12 -0
- package/pkg/conformance/alg-14/p04-text-changed/expected.json +8 -0
- package/pkg/conformance/alg-14/p04-text-changed/input.json +10 -0
- package/pkg/conformance/alg-14/p05-same-folder/expected.json +8 -0
- package/pkg/conformance/alg-14/p05-same-folder/input.json +14 -0
- package/pkg/conformance/alg-14/p06-codeowners-priority/expected.json +8 -0
- package/pkg/conformance/alg-14/p06-codeowners-priority/input.json +18 -0
- package/pkg/conformance/alg-14/p07-same-area-cap/expected.json +44 -0
- package/pkg/conformance/alg-14/p07-same-area-cap/input.json +14 -0
- package/pkg/conformance/alg-14/p08-deleted-document/expected.json +8 -0
- package/pkg/conformance/alg-14/p08-deleted-document/input.json +13 -0
- package/pkg/conformance/board/README.md +19 -0
- package/pkg/conformance/board/n01-no-specifications/expected.json +8 -0
- package/pkg/conformance/board/n01-no-specifications/expected.md +1 -0
- package/pkg/conformance/board/n01-no-specifications/input.json +19 -0
- package/pkg/conformance/board/n02-broken-citation/expected.json +14 -0
- package/pkg/conformance/board/n02-broken-citation/expected.md +1 -0
- package/pkg/conformance/board/n02-broken-citation/input.json +24 -0
- package/pkg/conformance/board/n03-untested-requirement/expected.json +12 -0
- package/pkg/conformance/board/n03-untested-requirement/expected.md +1 -0
- package/pkg/conformance/board/n03-untested-requirement/input.json +23 -0
- package/pkg/conformance/board/n04-over-budget/expected.json +14 -0
- package/pkg/conformance/board/n04-over-budget/expected.md +1 -0
- package/pkg/conformance/board/n04-over-budget/input.json +20 -0
- package/pkg/conformance/board/p01-fresh-draft/expected.json +22 -0
- package/pkg/conformance/board/p01-fresh-draft/expected.md +2 -0
- package/pkg/conformance/board/p01-fresh-draft/input.json +20 -0
- package/pkg/conformance/board/p02-half-blessed/expected.json +34 -0
- package/pkg/conformance/board/p02-half-blessed/expected.md +3 -0
- package/pkg/conformance/board/p02-half-blessed/input.json +25 -0
- package/pkg/conformance/board/p03-sources-changed/expected.json +18 -0
- package/pkg/conformance/board/p03-sources-changed/expected.md +2 -0
- package/pkg/conformance/board/p03-sources-changed/input.json +24 -0
- package/pkg/conformance/board/p04-clean-all/expected.json +17 -0
- package/pkg/conformance/board/p04-clean-all/expected.md +1 -0
- package/pkg/conformance/board/p04-clean-all/input.json +25 -0
- package/pkg/conformance/board/p05-clean-default/expected.json +7 -0
- package/pkg/conformance/board/p05-clean-default/expected.md +1 -0
- package/pkg/conformance/board/p05-clean-default/input.json +25 -0
- package/pkg/conformance/board/p06-edited-only/expected.json +18 -0
- package/pkg/conformance/board/p06-edited-only/expected.md +2 -0
- package/pkg/conformance/board/p06-edited-only/input.json +23 -0
- package/pkg/conformance/board/p07-ux-part-2/expected.json +47 -0
- package/pkg/conformance/board/p07-ux-part-2/expected.md +7 -0
- package/pkg/conformance/board/p07-ux-part-2/input.json +26 -0
- package/pkg/conformance/card/README.md +34 -0
- package/pkg/conformance/card/n01-no-acceptance-block/expected.json +62 -0
- package/pkg/conformance/card/n01-no-acceptance-block/expected.md +7 -0
- package/pkg/conformance/card/n01-no-acceptance-block/input.json +94 -0
- package/pkg/conformance/card/n02-malformed-acceptance-block/expected.json +64 -0
- package/pkg/conformance/card/n02-malformed-acceptance-block/expected.md +8 -0
- package/pkg/conformance/card/n02-malformed-acceptance-block/input.json +99 -0
- package/pkg/conformance/card/n03-report-missing-not-checked/expected.json +85 -0
- package/pkg/conformance/card/n03-report-missing-not-checked/expected.md +9 -0
- package/pkg/conformance/card/n03-report-missing-not-checked/input.json +97 -0
- package/pkg/conformance/card/n04-nonzero-exit-after-passing-report/expected.json +84 -0
- package/pkg/conformance/card/n04-nonzero-exit-after-passing-report/expected.md +8 -0
- package/pkg/conformance/card/n04-nonzero-exit-after-passing-report/input.json +99 -0
- package/pkg/conformance/card/n05-bundle-refused-and-records-not-kept/expected.json +83 -0
- package/pkg/conformance/card/n05-bundle-refused-and-records-not-kept/expected.md +8 -0
- package/pkg/conformance/card/n05-bundle-refused-and-records-not-kept/input.json +98 -0
- package/pkg/conformance/card/n06-policy-load-failure-fallback/expected.json +93 -0
- package/pkg/conformance/card/n06-policy-load-failure-fallback/expected.md +9 -0
- package/pkg/conformance/card/n06-policy-load-failure-fallback/input.json +105 -0
- package/pkg/conformance/card/p01-clean-pass-success/expected.json +93 -0
- package/pkg/conformance/card/p01-clean-pass-success/expected.md +8 -0
- package/pkg/conformance/card/p01-clean-pass-success/input.json +101 -0
- package/pkg/conformance/card/p02-no-blessed-intent-badge/expected.json +62 -0
- package/pkg/conformance/card/p02-no-blessed-intent-badge/expected.md +5 -0
- package/pkg/conformance/card/p02-no-blessed-intent-badge/input.json +92 -0
- package/pkg/conformance/card/p03-matrix-shards-and-retry-merge/expected.json +93 -0
- package/pkg/conformance/card/p03-matrix-shards-and-retry-merge/expected.md +8 -0
- package/pkg/conformance/card/p03-matrix-shards-and-retry-merge/input.json +137 -0
- package/pkg/conformance/card/p04-blessings-changed-and-requirement-deltas/expected.json +122 -0
- package/pkg/conformance/card/p04-blessings-changed-and-requirement-deltas/expected.md +11 -0
- package/pkg/conformance/card/p04-blessings-changed-and-requirement-deltas/input.json +102 -0
- package/pkg/conformance/card/p05-workflow-and-protected-surfaces-would-block/expected.json +88 -0
- package/pkg/conformance/card/p05-workflow-and-protected-surfaces-would-block/expected.md +8 -0
- package/pkg/conformance/card/p05-workflow-and-protected-surfaces-would-block/input.json +101 -0
- package/pkg/conformance/card/p06-test-weakening-would-block/expected.json +99 -0
- package/pkg/conformance/card/p06-test-weakening-would-block/expected.md +8 -0
- package/pkg/conformance/card/p06-test-weakening-would-block/input.json +101 -0
- package/pkg/conformance/card/p07-only-skipped-cases/expected.json +80 -0
- package/pkg/conformance/card/p07-only-skipped-cases/expected.md +7 -0
- package/pkg/conformance/card/p07-only-skipped-cases/input.json +99 -0
- package/pkg/conformance/card/p08-coverage-not-confirmed/expected.json +80 -0
- package/pkg/conformance/card/p08-coverage-not-confirmed/expected.md +7 -0
- package/pkg/conformance/card/p08-coverage-not-confirmed/input.json +99 -0
- package/pkg/conformance/check/README.md +26 -0
- package/pkg/conformance/check/n01-missing-citation-file/expected.json +15 -0
- package/pkg/conformance/check/n01-missing-citation-file/input.json +25 -0
- package/pkg/conformance/check/n02-citation-out-of-range/expected.json +15 -0
- package/pkg/conformance/check/n02-citation-out-of-range/input.json +26 -0
- package/pkg/conformance/check/n03-missing-citation-heading/expected.json +15 -0
- package/pkg/conformance/check/n03-missing-citation-heading/input.json +26 -0
- package/pkg/conformance/check/n04-missing-citation-test/expected.json +15 -0
- package/pkg/conformance/check/n04-missing-citation-test/input.json +26 -0
- package/pkg/conformance/check/n05-changed-blessed-copy/expected.json +12 -0
- package/pkg/conformance/check/n05-changed-blessed-copy/input.json +29 -0
- package/pkg/conformance/check/n06-missing-blessed-copy/expected.json +12 -0
- package/pkg/conformance/check/n06-missing-blessed-copy/input.json +27 -0
- package/pkg/conformance/check/n07-two-blessed-ids/expected.json +12 -0
- package/pkg/conformance/check/n07-two-blessed-ids/input.json +32 -0
- package/pkg/conformance/check/n08-uncovered-vision/expected.json +8 -0
- package/pkg/conformance/check/n08-uncovered-vision/input.json +27 -0
- package/pkg/conformance/check/n09-ci-budget-crossing/expected.json +13 -0
- package/pkg/conformance/check/n09-ci-budget-crossing/input.json +47 -0
- package/pkg/conformance/check/n10-kit-edited/expected.json +12 -0
- package/pkg/conformance/check/n10-kit-edited/input.json +31 -0
- package/pkg/conformance/check/n11-lock-version-mismatch/expected.json +13 -0
- package/pkg/conformance/check/n11-lock-version-mismatch/input.json +31 -0
- package/pkg/conformance/check/n12-local-budget-warning/expected.json +10 -0
- package/pkg/conformance/check/n12-local-budget-warning/input.json +29 -0
- package/pkg/conformance/check/p01-covered-vision/expected.json +6 -0
- package/pkg/conformance/check/p01-covered-vision/input.json +29 -0
- package/pkg/conformance/check/p02-path-citation/expected.json +6 -0
- package/pkg/conformance/check/p02-path-citation/input.json +26 -0
- package/pkg/conformance/check/p03-doc-and-test-citations/expected.json +6 -0
- package/pkg/conformance/check/p03-doc-and-test-citations/input.json +27 -0
- package/pkg/conformance/check/p04-valid-blessed-copy/expected.json +6 -0
- package/pkg/conformance/check/p04-valid-blessed-copy/input.json +30 -0
- package/pkg/conformance/check/p05-unique-across-documents/expected.json +6 -0
- package/pkg/conformance/check/p05-unique-across-documents/input.json +32 -0
- package/pkg/conformance/check/p06-matching-lock-and-kit/expected.json +6 -0
- package/pkg/conformance/check/p06-matching-lock-and-kit/input.json +31 -0
- package/pkg/conformance/install/.gitattributes +1 -0
- package/pkg/conformance/install/README.md +40 -0
- package/pkg/conformance/install/environment.json +29 -0
- package/pkg/conformance/install/n01-git-executable-missing/args.json +17 -0
- package/pkg/conformance/install/n01-git-executable-missing/before/README.md +1 -0
- package/pkg/conformance/install/n02-not-a-git-repository/args.json +15 -0
- package/pkg/conformance/install/n02-not-a-git-repository/before/README.md +1 -0
- package/pkg/conformance/install/n02-not-a-git-repository/expected/01-init/result.json +4 -0
- package/pkg/conformance/install/n03-remove-recorded-parent-path/args.json +14 -0
- package/pkg/conformance/install/n03-remove-recorded-parent-path/before/.tenet/manifest.json +12 -0
- package/pkg/conformance/install/n03-remove-recorded-parent-path/before/README.md +1 -0
- package/pkg/conformance/install/n03-remove-recorded-parent-path/before/tenet.yaml +1 -0
- package/pkg/conformance/install/n03-remove-recorded-parent-path/expected/01-remove/result.json +4 -0
- package/pkg/conformance/install/n04-init-symlink-outside/args.json +22 -0
- package/pkg/conformance/install/n04-init-symlink-outside/before/package-lock.json +15 -0
- package/pkg/conformance/install/n04-init-symlink-outside/before/package.json +11 -0
- package/pkg/conformance/install/n04-init-symlink-outside/before/src/retry.ts +1 -0
- package/pkg/conformance/install/n04-init-symlink-outside/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/n04-init-symlink-outside/expected/01-init/result.json +4 -0
- package/pkg/conformance/install/n05-conflicting-created-workflow/args.json +12 -0
- package/pkg/conformance/install/n05-conflicting-created-workflow/before/.github/workflows/tenet.yml +3 -0
- package/pkg/conformance/install/n05-conflicting-created-workflow/before/package-lock.json +15 -0
- package/pkg/conformance/install/n05-conflicting-created-workflow/before/package.json +11 -0
- package/pkg/conformance/install/n05-conflicting-created-workflow/before/src/retry.ts +1 -0
- package/pkg/conformance/install/n05-conflicting-created-workflow/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/n05-conflicting-created-workflow/expected/01-init/result.json +4 -0
- package/pkg/conformance/install/n06-interrupted-plan-drift/args.json +27 -0
- package/pkg/conformance/install/n06-interrupted-plan-drift/before/AGENTS.md +1 -0
- package/pkg/conformance/install/n06-interrupted-plan-drift/before/package-lock.json +15 -0
- package/pkg/conformance/install/n06-interrupted-plan-drift/before/package.json +11 -0
- package/pkg/conformance/install/n06-interrupted-plan-drift/before/src/retry.ts +1 -0
- package/pkg/conformance/install/n06-interrupted-plan-drift/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/n07-doctor-missing-lock/args.json +11 -0
- package/pkg/conformance/install/n07-doctor-missing-lock/before/README.md +1 -0
- package/pkg/conformance/install/n07-doctor-missing-lock/before/tenet.yaml +2 -0
- package/pkg/conformance/install/n07-doctor-missing-lock/expected/01-doctor/tree/README.md +1 -0
- package/pkg/conformance/install/n07-doctor-missing-lock/expected/01-doctor/tree/tenet.yaml +2 -0
- package/pkg/conformance/install/n08-preflight-declined/args.json +14 -0
- package/pkg/conformance/install/n08-preflight-declined/before/AGENTS.md +1 -0
- package/pkg/conformance/install/n08-preflight-declined/before/package-lock.json +15 -0
- package/pkg/conformance/install/n08-preflight-declined/before/package.json +11 -0
- package/pkg/conformance/install/n08-preflight-declined/before/src/retry.ts +1 -0
- package/pkg/conformance/install/n08-preflight-declined/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/n08-preflight-declined/expected/01-init/tree/AGENTS.md +1 -0
- package/pkg/conformance/install/n08-preflight-declined/expected/01-init/tree/package-lock.json +15 -0
- package/pkg/conformance/install/n08-preflight-declined/expected/01-init/tree/package.json +11 -0
- package/pkg/conformance/install/n08-preflight-declined/expected/01-init/tree/src/retry.ts +1 -0
- package/pkg/conformance/install/n08-preflight-declined/expected/01-init/tree/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p01-empty/args.json +15 -0
- package/pkg/conformance/install/p01-empty/before/.gitkeep +0 -0
- package/pkg/conformance/install/p02-node-vitest/args.json +12 -0
- package/pkg/conformance/install/p02-node-vitest/before/.nvmrc +1 -0
- package/pkg/conformance/install/p02-node-vitest/before/package-lock.json +15 -0
- package/pkg/conformance/install/p02-node-vitest/before/package.json +11 -0
- package/pkg/conformance/install/p02-node-vitest/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p02-node-vitest/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p03-node-existing-ci/args.json +12 -0
- package/pkg/conformance/install/p03-node-existing-ci/before/.github/workflows/ci.yml +10 -0
- package/pkg/conformance/install/p03-node-existing-ci/before/package-lock.json +15 -0
- package/pkg/conformance/install/p03-node-existing-ci/before/package.json +11 -0
- package/pkg/conformance/install/p03-node-existing-ci/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p03-node-existing-ci/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p04-node-matrix/args.json +12 -0
- package/pkg/conformance/install/p04-node-matrix/before/.github/workflows/ci.yml +13 -0
- package/pkg/conformance/install/p04-node-matrix/before/package-lock.json +15 -0
- package/pkg/conformance/install/p04-node-matrix/before/package.json +11 -0
- package/pkg/conformance/install/p04-node-matrix/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p04-node-matrix/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p05-python-pytest/args.json +12 -0
- package/pkg/conformance/install/p05-python-pytest/before/.python-version +1 -0
- package/pkg/conformance/install/p05-python-pytest/before/requirements.txt +1 -0
- package/pkg/conformance/install/p05-python-pytest/before/tests/test_retry.py +2 -0
- package/pkg/conformance/install/p06-go/args.json +12 -0
- package/pkg/conformance/install/p06-go/before/go.mod +3 -0
- package/pkg/conformance/install/p06-go/before/retry_test.go +5 -0
- package/pkg/conformance/install/p07-existing-agents-md/args.json +12 -0
- package/pkg/conformance/install/p07-existing-agents-md/before/AGENTS.md +7 -0
- package/pkg/conformance/install/p07-existing-agents-md/before/package-lock.json +15 -0
- package/pkg/conformance/install/p07-existing-agents-md/before/package.json +11 -0
- package/pkg/conformance/install/p07-existing-agents-md/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p07-existing-agents-md/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p08-existing-mcp/args.json +12 -0
- package/pkg/conformance/install/p08-existing-mcp/before/.mcp.json +18 -0
- package/pkg/conformance/install/p08-existing-mcp/before/CLAUDE.md +1 -0
- package/pkg/conformance/install/p08-existing-mcp/before/package-lock.json +15 -0
- package/pkg/conformance/install/p08-existing-mcp/before/package.json +11 -0
- package/pkg/conformance/install/p08-existing-mcp/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p08-existing-mcp/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/args.json +33 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/.gitattributes +1 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/.github/pull_request_template.md +1 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/.mcp.json +18 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/AGENTS.md +3 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/CLAUDE.md +3 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/package-lock.json +15 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/package.json +11 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/tenet/intent.md +3 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/.gitattributes +1 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/.github/pull_request_template.md +1 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/.mcp.json +18 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/AGENTS.md +3 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/CLAUDE.md +3 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/package-lock.json +15 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/package.json +11 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/src/retry.ts +1 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/tenet/intent.md +3 -0
- package/pkg/conformance/install/p09-init-repeat-upgrade-remove/expected/04-remove/tree/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/args.json +24 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/before/.mcp.json +18 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/before/CLAUDE.md +1 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/before/package-lock.json +15 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/before/package.json +11 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/before/tenet/intent.md +1 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/.mcp.json +16 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/CLAUDE.md +1 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/package-lock.json +15 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/package.json +11 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/src/retry.ts +1 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/tenet/intent.md +1 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/tenet.yaml +2 -0
- package/pkg/conformance/install/p10-remove-keeps-user-edits/expected/02-remove/tree/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p11-interrupted-install-resumes/args.json +24 -0
- package/pkg/conformance/install/p11-interrupted-install-resumes/before/.mcp.json +18 -0
- package/pkg/conformance/install/p11-interrupted-install-resumes/before/CLAUDE.md +1 -0
- package/pkg/conformance/install/p11-interrupted-install-resumes/before/package-lock.json +15 -0
- package/pkg/conformance/install/p11-interrupted-install-resumes/before/package.json +11 -0
- package/pkg/conformance/install/p11-interrupted-install-resumes/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p11-interrupted-install-resumes/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p12-windows-local-host/args.json +26 -0
- package/pkg/conformance/install/p12-windows-local-host/before/.vscode/mcp.json +10 -0
- package/pkg/conformance/install/p12-windows-local-host/before/CLAUDE.md +1 -0
- package/pkg/conformance/install/p12-windows-local-host/before/package-lock.json +15 -0
- package/pkg/conformance/install/p12-windows-local-host/before/package.json +11 -0
- package/pkg/conformance/install/p12-windows-local-host/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p12-windows-local-host/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p13-existing-ci-with-services/args.json +12 -0
- package/pkg/conformance/install/p13-existing-ci-with-services/before/.github/workflows/ci.yml +16 -0
- package/pkg/conformance/install/p13-existing-ci-with-services/before/package-lock.json +15 -0
- package/pkg/conformance/install/p13-existing-ci-with-services/before/package.json +11 -0
- package/pkg/conformance/install/p13-existing-ci-with-services/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p13-existing-ci-with-services/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p14-reusable-workflow/args.json +12 -0
- package/pkg/conformance/install/p14-reusable-workflow/before/.github/workflows/ci.yml +5 -0
- package/pkg/conformance/install/p14-reusable-workflow/before/.github/workflows/reusable.yml +10 -0
- package/pkg/conformance/install/p14-reusable-workflow/before/package-lock.json +15 -0
- package/pkg/conformance/install/p14-reusable-workflow/before/package.json +11 -0
- package/pkg/conformance/install/p14-reusable-workflow/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p14-reusable-workflow/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p15-non-github-forge/args.json +15 -0
- package/pkg/conformance/install/p15-non-github-forge/before/package-lock.json +15 -0
- package/pkg/conformance/install/p15-non-github-forge/before/package.json +11 -0
- package/pkg/conformance/install/p15-non-github-forge/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p15-non-github-forge/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p16-vendor-fresh-clone/args.json +20 -0
- package/pkg/conformance/install/p16-vendor-fresh-clone/before/package-lock.json +15 -0
- package/pkg/conformance/install/p16-vendor-fresh-clone/before/package.json +11 -0
- package/pkg/conformance/install/p16-vendor-fresh-clone/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p16-vendor-fresh-clone/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p17-upgrade-pins-and-policy/args.json +24 -0
- package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/.cursor/mcp.json +10 -0
- package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/.mcp.json +18 -0
- package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/CLAUDE.md +1 -0
- package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/package-lock.json +15 -0
- package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/package.json +11 -0
- package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p17-upgrade-pins-and-policy/before/test/retry.test.ts +3 -0
- package/pkg/conformance/install/p18-accepted-reporter-edit/args.json +15 -0
- package/pkg/conformance/install/p18-accepted-reporter-edit/before/.github/workflows/ci.yml +9 -0
- package/pkg/conformance/install/p18-accepted-reporter-edit/before/package-lock.json +15 -0
- package/pkg/conformance/install/p18-accepted-reporter-edit/before/package.json +11 -0
- package/pkg/conformance/install/p18-accepted-reporter-edit/before/src/retry.ts +1 -0
- package/pkg/conformance/install/p18-accepted-reporter-edit/before/test/retry.test.ts +3 -0
- package/pkg/conformance/scenarios/README.md +34 -0
- package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/kit/TENET.md +3 -0
- package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/src/retry.ts +3 -0
- package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/tenet/blessed/tenet__intent.md/requirements.md +1 -0
- package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/tenet/blessed/tenet__intent.md/requirements.md.anchors.json +10 -0
- package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/tenet/intent.md +7 -0
- package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/tenet.lock +7 -0
- package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/tenet.yaml +20 -0
- package/pkg/conformance/scenarios/s01-tagged-test-never-ran/before/test/retry.test.ts +2 -0
- package/pkg/conformance/scenarios/s01-tagged-test-never-ran/expected/04-card.md +9 -0
- package/pkg/conformance/scenarios/s01-tagged-test-never-ran/expected/04-verify.json +92 -0
- package/pkg/conformance/scenarios/s01-tagged-test-never-ran/steps.json +88 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/kit/TENET.md +3 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/src/retry.ts +6 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/tenet/blessed/tenet__intent.md/requirements.md +2 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/tenet/blessed/tenet__intent.md/requirements.md.anchors.json +15 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/tenet/intent.md +8 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/tenet.lock +7 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/tenet.yaml +20 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/before/test/retry.test.ts +2 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/expected/04-card.md +9 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/expected/04-verify.json +92 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/expected/05-card.md +10 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/expected/05-verify.json +107 -0
- package/pkg/conformance/scenarios/s02-implements-changed-same-commit/steps.json +101 -0
- package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/before/kit/TENET.md +3 -0
- package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/before/tenet/intent.md +7 -0
- package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/before/tenet.lock +7 -0
- package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/before/tenet.yaml +24 -0
- package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/expected/01-gate-fixture.json +48 -0
- package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/expected/02-check.json +106 -0
- package/pkg/conformance/scenarios/s03-advisory-and-enforced-failure/steps.json +79 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/kit/TENET.md +3 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/src/retry.ts +3 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/blessed/tenet__specs__prd.md/requirements.md +1 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/blessed/tenet__specs__prd.md/requirements.md.anchors.json +7 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/blessed/tenet__vision.md/vision.md +1 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/blessed/tenet__vision.md/vision.md.anchors.json +1 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/specs/plan.md +7 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/specs/prd.md +7 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/specs/tech-spec.md +7 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/specs/ux-spec.md +7 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet/vision.md +7 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet.lock +7 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/before/tenet.yaml +20 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/expected/02-board.json +72 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/expected/03-context.json +46 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/expected/04-mcp.json +71 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/expected/05-bless.json +13 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/expected/06-context-sdk.json +38 -0
- package/pkg/conformance/scenarios/s04-reject-edit-to-blessed-section/steps.json +98 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/kit/TENET.md +3 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/src/checkout/pay.ts +1 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/blessed/tenet__specs__prd.md/requirements.md +3 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/blessed/tenet__specs__prd.md/requirements.md.anchors.json +5 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/blessed/tenet__vision.md/vision.md +1 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/blessed/tenet__vision.md/vision.md.anchors.json +1 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/specs/plan.md +7 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/specs/prd.md +9 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/specs/tech-spec.md +7 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/specs/ux-spec.md +7 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet/vision.md +7 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet.lock +7 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/before/tenet.yaml +20 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/expected/01-context-tight.json +54 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/expected/02-mcp.json +79 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/expected/03-context-explicit.json +52 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/expected/04-context-zero.json +17 -0
- package/pkg/conformance/scenarios/s05-global-rule-budget-pressure/steps.json +79 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/CODEOWNERS +2 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/kit/TENET.md +3 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/src/api/handler.ts +2007 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/src/billing/charge.ts +2007 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/src/shared/http.ts +3 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/tenet/blessed/tenet__intent.md/requirements.md +2 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/tenet/blessed/tenet__intent.md/requirements.md.anchors.json +11 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/tenet/intent.md +8 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/tenet.lock +7 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/before/tenet.yaml +20 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/expected/01-onboard-initial.json +240 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/expected/05-onboard-refresh.json +252 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/expected/06-card.md +8 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/expected/06-verify.json +77 -0
- package/pkg/conformance/scenarios/s06-change-to-shared-helper/steps.json +122 -0
- package/pkg/conformance/scenarios/s07-install-interrupted-part-way/before/.mcp.json +10 -0
- package/pkg/conformance/scenarios/s07-install-interrupted-part-way/before/AGENTS.md +3 -0
- package/pkg/conformance/scenarios/s07-install-interrupted-part-way/before/package.json +11 -0
- package/pkg/conformance/scenarios/s07-install-interrupted-part-way/before/src/index.ts +1 -0
- package/pkg/conformance/scenarios/s07-install-interrupted-part-way/before/test/index.test.ts +2 -0
- package/pkg/conformance/scenarios/s07-install-interrupted-part-way/expected/01-interrupted-init.json +4 -0
- package/pkg/conformance/scenarios/s07-install-interrupted-part-way/expected/02-init-resume.json +75 -0
- package/pkg/conformance/scenarios/s07-install-interrupted-part-way/expected/03-doctor.json +40 -0
- package/pkg/conformance/scenarios/s07-install-interrupted-part-way/expected/04-remove.json +44 -0
- package/pkg/conformance/scenarios/s07-install-interrupted-part-way/steps.json +56 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/kit/TENET.md +3 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/src/retry.ts +3 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/blessed/tenet__specs__prd.md/requirements.md +1 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/blessed/tenet__specs__prd.md/requirements.md.anchors.json +7 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/blessed/tenet__vision.md/vision.md +1 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/blessed/tenet__vision.md/vision.md.anchors.json +1 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/specs/plan.md +7 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/specs/prd.md +7 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/specs/tech-spec.md +7 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/specs/ux-spec.md +7 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet/vision.md +7 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet.lock +7 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/before/tenet.yaml +20 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/expected/02-context-clean.json +38 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/expected/04-context-drift.json +40 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/expected/05-bless.json +13 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/expected/05-log-entry.json +15 -0
- package/pkg/conformance/scenarios/s08-blessing-fresh-clone-squash-merge/steps.json +80 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/kit/TENET.md +3 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/src/retry.ts +3 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/blessed/tenet__specs__prd.md/checkout-retries.md +1 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/blessed/tenet__specs__prd.md/checkout-retries.md.anchors.json +5 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/blessed/tenet__vision.md/vision.md +1 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/blessed/tenet__vision.md/vision.md.anchors.json +1 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/specs/plan.md +7 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/specs/prd.md +7 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/specs/tech-spec.md +7 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/specs/ux-spec.md +7 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet/vision.md +7 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet.lock +7 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/tenet.yaml +20 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/before/test/retry.test.ts +2 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/expected/02-fix.json +34 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/expected/03-check.json +14 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/expected/04-board.json +56 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/expected/05-context.json +38 -0
- package/pkg/conformance/scenarios/s09-renamed-heading/steps.json +58 -0
- package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/kit/TENET.md +3 -0
- package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/src/retry.ts +3 -0
- package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/tenet/blessed/tenet__intent.md/requirements.md +1 -0
- package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/tenet/blessed/tenet__intent.md/requirements.md.anchors.json +7 -0
- package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/tenet/intent.md +7 -0
- package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/tenet.lock +7 -0
- package/pkg/conformance/scenarios/s10-pr-closed-without-merging/before/tenet.yaml +20 -0
- package/pkg/conformance/scenarios/s10-pr-closed-without-merging/expected/04-card.md +8 -0
- package/pkg/conformance/scenarios/s10-pr-closed-without-merging/expected/04-verify.json +77 -0
- package/pkg/conformance/scenarios/s10-pr-closed-without-merging/expected/05-verify-closed.json +6 -0
- package/pkg/conformance/scenarios/s10-pr-closed-without-merging/steps.json +108 -0
- package/pkg/conformance/scenarios/s11-readme-walkthrough/before/README.md +3 -0
- package/pkg/conformance/scenarios/s11-readme-walkthrough/before/package.json +8 -0
- package/pkg/conformance/scenarios/s11-readme-walkthrough/before/src/retry.ts +3 -0
- package/pkg/conformance/scenarios/s11-readme-walkthrough/before/test/retry.test.ts +2 -0
- package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/01-init.json +75 -0
- package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/02-onboard-inventory.json +141 -0
- package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/06-card.md +7 -0
- package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/06-onboard-card.json +10 -0
- package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/07-bless.json +13 -0
- package/pkg/conformance/scenarios/s11-readme-walkthrough/expected/08-remove.json +57 -0
- package/pkg/conformance/scenarios/s11-readme-walkthrough/steps.json +93 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/.claude/settings.json +1 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/.github/workflows/ci.yml +8 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/CODEOWNERS +1 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/README.md +3 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/docs/adr/0001-retries.md +1 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/docs/adr/0002-timeouts.md +1 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/docs/architecture.md +3 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/package.json +11 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/src/retry.ts +6 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/before/test/checkout.retry.test.ts +4 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/01-init.json +103 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/02-onboard-inventory.json +233 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/06-card.md +9 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/06-onboard-card.json +10 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/07-bless.json +13 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/expected/08-board.json +34 -0
- package/pkg/conformance/scenarios/s12-ux-walkthrough-existing/steps.json +98 -0
- package/pkg/conformance/scenarios/s13-ux-walkthrough-new/before/.gitkeep +0 -0
- package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/01-init.json +82 -0
- package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/04-onboard-inventory.json +188 -0
- package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/05-card.md +12 -0
- package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/05-onboard-card.json +10 -0
- package/pkg/conformance/scenarios/s13-ux-walkthrough-new/expected/06-bless.json +13 -0
- package/pkg/conformance/scenarios/s13-ux-walkthrough-new/steps.json +76 -0
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { lstat, mkdir, readFile, readdir, rename } from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { parse, stringify } from "yaml";
|
|
5
|
+
import { writeAtomic } from "../core/fs.js";
|
|
6
|
+
import { catFileBatch, git } from "../core/git.js";
|
|
7
|
+
import { jcs } from "../core/hash.js";
|
|
8
|
+
import { loadPolicy } from "../policy/index.js";
|
|
9
|
+
import { citationParts, relocate } from "./anchors.js";
|
|
10
|
+
import { flags, matchRenamed } from "./flags.js";
|
|
11
|
+
import { ladder } from "./ladder.js";
|
|
12
|
+
import { itemLine, parseDoc, sectionLocation } from "./parse.js";
|
|
13
|
+
function portable(value) {
|
|
14
|
+
return value.replaceAll("\\", "/").replace(/\/+/g, "/").replace(/^(?:\.\/)+/, "");
|
|
15
|
+
}
|
|
16
|
+
function readSyncReader(cwd) {
|
|
17
|
+
return (filename) => {
|
|
18
|
+
try {
|
|
19
|
+
return readFileSync(path.join(cwd, ...portable(filename).split("/")), "utf8");
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function splitFront(text) {
|
|
27
|
+
const normalized = text.replaceAll("\r\n", "\n").replaceAll("\r", "\n");
|
|
28
|
+
const match = /^---\n([\s\S]*?)\n---(?:\n|$)/.exec(normalized);
|
|
29
|
+
if (!match?.[1])
|
|
30
|
+
return { front: null, body: normalized };
|
|
31
|
+
const parsed = parse(match[1]);
|
|
32
|
+
const record = parsed && typeof parsed === "object" && !Array.isArray(parsed)
|
|
33
|
+
? parsed
|
|
34
|
+
: null;
|
|
35
|
+
const tenet = record?.tenet;
|
|
36
|
+
const sections = record?.sections;
|
|
37
|
+
if (!record || !tenet || typeof tenet !== "object" || Array.isArray(tenet)) {
|
|
38
|
+
return { front: null, body: normalized };
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
front: {
|
|
42
|
+
...record,
|
|
43
|
+
tenet: tenet,
|
|
44
|
+
sections: sections && typeof sections === "object" && !Array.isArray(sections)
|
|
45
|
+
? sections
|
|
46
|
+
: {},
|
|
47
|
+
},
|
|
48
|
+
body: normalized.slice(match[0].length),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function compose(front, body) {
|
|
52
|
+
return `---\n${stringify(front, { lineWidth: 0 }).trimEnd()}\n---\n${body.replace(/^\n/, "")}`;
|
|
53
|
+
}
|
|
54
|
+
function inferredDoc(filename) {
|
|
55
|
+
const name = path.posix.basename(filename, ".md");
|
|
56
|
+
const allowed = new Set(["intent", "vision", "requirements", "design", "experience", "plan", "prd", "tech-spec", "ux-spec"]);
|
|
57
|
+
if (allowed.has(name))
|
|
58
|
+
return name;
|
|
59
|
+
if (filename.includes("/prd/"))
|
|
60
|
+
return "prd";
|
|
61
|
+
if (filename.includes("/tech-spec/"))
|
|
62
|
+
return "tech-spec";
|
|
63
|
+
if (filename.includes("/plan/"))
|
|
64
|
+
return "plan";
|
|
65
|
+
return "requirements";
|
|
66
|
+
}
|
|
67
|
+
function docOwner(policy, filename) {
|
|
68
|
+
const relative = filename.startsWith(`${policy.paths.records}/`)
|
|
69
|
+
? filename.slice(policy.paths.records.length + 1)
|
|
70
|
+
: filename;
|
|
71
|
+
return policy.specs.documents.find((document) => document.path === relative)?.owner ?? "Owner";
|
|
72
|
+
}
|
|
73
|
+
function docLevel(policy, filename) {
|
|
74
|
+
const relative = filename.startsWith(`${policy.paths.records}/`)
|
|
75
|
+
? filename.slice(policy.paths.records.length + 1)
|
|
76
|
+
: filename;
|
|
77
|
+
return policy.specs.documents.find((document) => document.path === relative)?.level ?? "L2";
|
|
78
|
+
}
|
|
79
|
+
function frontFor(entry, current, policy, head) {
|
|
80
|
+
const front = current ?? {
|
|
81
|
+
tenet: {
|
|
82
|
+
spec: 1,
|
|
83
|
+
doc: inferredDoc(entry.path),
|
|
84
|
+
level: docLevel(policy, entry.path),
|
|
85
|
+
version: "0.1",
|
|
86
|
+
owner: docOwner(policy, entry.path),
|
|
87
|
+
},
|
|
88
|
+
sections: {},
|
|
89
|
+
};
|
|
90
|
+
if (typeof front.tenet.drafted_from !== "string" || front.tenet.drafted_from === "") {
|
|
91
|
+
front.tenet.drafted_from = head;
|
|
92
|
+
}
|
|
93
|
+
return front;
|
|
94
|
+
}
|
|
95
|
+
function occurrences(entries, prefix) {
|
|
96
|
+
const result = [];
|
|
97
|
+
const counts = new Map();
|
|
98
|
+
for (const entry of entries) {
|
|
99
|
+
for (const section of entry.doc.sections) {
|
|
100
|
+
for (const item of [...section.vision_items, ...section.requirements]) {
|
|
101
|
+
const line = itemLine(item);
|
|
102
|
+
if (line === null || !item.id.startsWith(`${prefix}-`))
|
|
103
|
+
continue;
|
|
104
|
+
const key = `${entry.path}\0${item.id}`;
|
|
105
|
+
const occurrenceIndex = counts.get(key) ?? 0;
|
|
106
|
+
counts.set(key, occurrenceIndex + 1);
|
|
107
|
+
result.push({
|
|
108
|
+
id: item.id,
|
|
109
|
+
path: entry.path,
|
|
110
|
+
line,
|
|
111
|
+
state: section.state,
|
|
112
|
+
signature: jcs(item),
|
|
113
|
+
occurrenceIndex,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return result;
|
|
119
|
+
}
|
|
120
|
+
function idNumber(id) {
|
|
121
|
+
const match = /-(\d+)$/.exec(id);
|
|
122
|
+
return match?.[1] ? Number.parseInt(match[1], 10) : 0;
|
|
123
|
+
}
|
|
124
|
+
async function otherBranchOccurrences(cwd, prefix, pathspecs) {
|
|
125
|
+
const currentCommit = (await git(["rev-parse", "HEAD"], { cwd }).catch(() => "")).trim();
|
|
126
|
+
const refsText = await git(["for-each-ref", "--format=%(refname)%09%(objectname)%09%(committerdate:unix)", "refs/heads", "refs/remotes"], { cwd }).catch(() => "");
|
|
127
|
+
const currentRef = (await git(["symbolic-ref", "--quiet", "HEAD"], { cwd }).catch(() => "")).trim();
|
|
128
|
+
const refs = refsText.split("\n").flatMap((line) => {
|
|
129
|
+
const [ref, commit, timestamp] = line.split("\t");
|
|
130
|
+
return !ref || !commit || !timestamp || ref === currentRef || commit === currentCommit || ref.endsWith("/HEAD")
|
|
131
|
+
? []
|
|
132
|
+
: [{ ref, timestamp: Number.parseInt(timestamp, 10) }];
|
|
133
|
+
});
|
|
134
|
+
const result = [];
|
|
135
|
+
for (const { ref, timestamp } of refs) {
|
|
136
|
+
const listing = await git(["ls-tree", "-r", "-z", "--name-only", ref, "--", ...pathspecs], { cwd }).catch(() => "");
|
|
137
|
+
const paths = listing.split("\0").filter((filename) => filename.endsWith(".md"));
|
|
138
|
+
if (paths.length === 0)
|
|
139
|
+
continue;
|
|
140
|
+
const blobs = await catFileBatch(ref, paths, { cwd });
|
|
141
|
+
for (const filename of paths) {
|
|
142
|
+
const contents = blobs.get(filename)?.toString("utf8");
|
|
143
|
+
if (contents === undefined)
|
|
144
|
+
continue;
|
|
145
|
+
const doc = parseDoc(filename, contents, { prefix });
|
|
146
|
+
if (!doc.front)
|
|
147
|
+
continue;
|
|
148
|
+
for (const section of doc.sections) {
|
|
149
|
+
for (const item of [...section.vision_items, ...section.requirements]) {
|
|
150
|
+
result.push({
|
|
151
|
+
id: item.id,
|
|
152
|
+
path: filename,
|
|
153
|
+
line: itemLine(item) ?? 1,
|
|
154
|
+
state: section.state,
|
|
155
|
+
signature: jcs(item),
|
|
156
|
+
authoredAt: timestamp,
|
|
157
|
+
occurrenceIndex: 0,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return result;
|
|
164
|
+
}
|
|
165
|
+
async function markdownBelow(cwd, relativeRoot) {
|
|
166
|
+
const root = path.join(cwd, ...relativeRoot.split("/"));
|
|
167
|
+
let entries;
|
|
168
|
+
try {
|
|
169
|
+
entries = await readdir(root, { withFileTypes: true });
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
if (error.code === "ENOENT")
|
|
173
|
+
return [];
|
|
174
|
+
throw error;
|
|
175
|
+
}
|
|
176
|
+
const files = [];
|
|
177
|
+
for (const entry of entries) {
|
|
178
|
+
const filename = path.posix.join(relativeRoot, entry.name);
|
|
179
|
+
if (entry.isDirectory())
|
|
180
|
+
files.push(...await markdownBelow(cwd, filename));
|
|
181
|
+
else if (entry.isFile() && entry.name.endsWith(".md"))
|
|
182
|
+
files.push(filename);
|
|
183
|
+
}
|
|
184
|
+
return files;
|
|
185
|
+
}
|
|
186
|
+
async function activeDocumentPaths(cwd, policy) {
|
|
187
|
+
const intent = portable(path.posix.join(policy.paths.records, "intent.md"));
|
|
188
|
+
let configured = false;
|
|
189
|
+
try {
|
|
190
|
+
const raw = parse(await readFile(path.join(cwd, "tenet.yaml"), "utf8"));
|
|
191
|
+
if (raw && typeof raw === "object" && !Array.isArray(raw)) {
|
|
192
|
+
const specs = raw.specs;
|
|
193
|
+
configured = Boolean(specs &&
|
|
194
|
+
typeof specs === "object" &&
|
|
195
|
+
Array.isArray(specs.documents) &&
|
|
196
|
+
(specs.documents.length > 0));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
catch {
|
|
200
|
+
// loadPolicy reports the canonical configuration diagnostic.
|
|
201
|
+
}
|
|
202
|
+
if (!configured) {
|
|
203
|
+
try {
|
|
204
|
+
if ((await lstat(path.join(cwd, ...intent.split("/")))).isFile()) {
|
|
205
|
+
const roots = [intent, intent.replace(/\.md$/, "")];
|
|
206
|
+
return {
|
|
207
|
+
files: [...new Set([intent, ...await markdownBelow(cwd, roots[1] ?? "intent")])],
|
|
208
|
+
roots,
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
catch (error) {
|
|
213
|
+
if (error.code !== "ENOENT")
|
|
214
|
+
throw error;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const base = policy.specs.documents.map((document) => portable(path.posix.join(policy.paths.records, document.path)));
|
|
218
|
+
const roots = [...base, ...base.map((filename) => filename.replace(/\.md$/, ""))];
|
|
219
|
+
const files = [...base];
|
|
220
|
+
for (const root of roots.slice(base.length))
|
|
221
|
+
files.push(...await markdownBelow(cwd, root));
|
|
222
|
+
return { files: [...new Set(files)], roots: [...new Set(roots)] };
|
|
223
|
+
}
|
|
224
|
+
function bodyLines(text) {
|
|
225
|
+
return text.replaceAll("\r\n", "\n").replaceAll("\r", "\n").split("\n");
|
|
226
|
+
}
|
|
227
|
+
function lineScope(section) {
|
|
228
|
+
return section.level === "L0" ||
|
|
229
|
+
section.slug === "vision" ||
|
|
230
|
+
/\bvision\b/i.test(section.heading) ||
|
|
231
|
+
section.slug === "requirements" ||
|
|
232
|
+
/\brequirements?\b/i.test(section.heading);
|
|
233
|
+
}
|
|
234
|
+
function assignMissingIds(text, doc, prefix, nextRequirement, nextVision) {
|
|
235
|
+
const lines = bodyLines(text);
|
|
236
|
+
for (const section of doc.sections) {
|
|
237
|
+
if (!lineScope(section))
|
|
238
|
+
continue;
|
|
239
|
+
const location = sectionLocation(section);
|
|
240
|
+
const vision = section.level === "L0" || section.slug === "vision" || /\bvision\b/i.test(section.heading);
|
|
241
|
+
for (let index = 0; index < section.text.replace(/\n$/, "").split("\n").length; index += 1) {
|
|
242
|
+
const physical = location.start + index;
|
|
243
|
+
const source = lines[physical - 1] ?? "";
|
|
244
|
+
if (!/^\s*[-*+]\s+(?:\[[ xX]\]\s+)?/.test(source))
|
|
245
|
+
continue;
|
|
246
|
+
const cleaned = source.trim().replace(/^[-*+]\s+(?:\[[ xX]\]\s+)?/, "");
|
|
247
|
+
const expected = vision ? /^V-(?:[A-Z]+)?\d+\b/ : new RegExp(`^${prefix}-\\d+\\b`);
|
|
248
|
+
if (expected.test(cleaned))
|
|
249
|
+
continue;
|
|
250
|
+
const id = vision ? `V-${nextVision()}` : `${prefix}-${nextRequirement()}`;
|
|
251
|
+
lines[physical - 1] = source.replace(/^(\s*[-*+]\s+(?:\[[ xX]\]\s+)?)/, `$1${id} `);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return lines.join("\n");
|
|
255
|
+
}
|
|
256
|
+
function replaceId(text, line, from, to) {
|
|
257
|
+
const lines = bodyLines(text);
|
|
258
|
+
const index = line - 1;
|
|
259
|
+
const current = lines[index];
|
|
260
|
+
if (current !== undefined)
|
|
261
|
+
lines[index] = current.replace(from, to);
|
|
262
|
+
return lines.join("\n");
|
|
263
|
+
}
|
|
264
|
+
function normalizeCitation(cite) {
|
|
265
|
+
const trimmed = cite.trim();
|
|
266
|
+
const parsed = citationParts(trimmed);
|
|
267
|
+
if (!parsed)
|
|
268
|
+
return trimmed;
|
|
269
|
+
const cleanPath = portable(parsed.path);
|
|
270
|
+
if (parsed.kind === "path")
|
|
271
|
+
return `${cleanPath}:${parsed.start}${parsed.end === parsed.start ? "" : `-${parsed.end}`}`;
|
|
272
|
+
if (parsed.kind === "doc")
|
|
273
|
+
return `doc: ${cleanPath}#${parsed.slug}`;
|
|
274
|
+
return `test: ${cleanPath} > ${parsed.segments.join(" > ")}`;
|
|
275
|
+
}
|
|
276
|
+
function replaceOccurrenceId(text, occurrence, to, prefix) {
|
|
277
|
+
const parsed = parseDoc(occurrence.path, text, { prefix });
|
|
278
|
+
const candidates = parsed.sections
|
|
279
|
+
.flatMap((section) => [...section.vision_items, ...section.requirements])
|
|
280
|
+
.filter((item) => item.id === occurrence.id && jcs(item) === occurrence.signature);
|
|
281
|
+
const target = candidates[occurrence.occurrenceIndex ?? 0] ?? candidates[0];
|
|
282
|
+
const line = target ? itemLine(target) : occurrence.line;
|
|
283
|
+
if (line === null)
|
|
284
|
+
return text;
|
|
285
|
+
return replaceId(text, line, occurrence.id, to);
|
|
286
|
+
}
|
|
287
|
+
function movedCitation(cite, anchors, read) {
|
|
288
|
+
const parsed = citationParts(cite);
|
|
289
|
+
if (parsed?.kind !== "path")
|
|
290
|
+
return normalizeCitation(cite);
|
|
291
|
+
const rawHash = anchors[cite];
|
|
292
|
+
if (typeof rawHash !== "string")
|
|
293
|
+
return normalizeCitation(cite);
|
|
294
|
+
const file = read(parsed.path);
|
|
295
|
+
if (file === null)
|
|
296
|
+
return normalizeCitation(cite);
|
|
297
|
+
const moved = relocate({ hash: rawHash, line_count: parsed.end - parsed.start + 1 }, file);
|
|
298
|
+
if (!("start" in moved))
|
|
299
|
+
return normalizeCitation(cite);
|
|
300
|
+
return `${portable(parsed.path)}:${moved.start}${moved.end === moved.start ? "" : `-${moved.end}`}`;
|
|
301
|
+
}
|
|
302
|
+
function normalizeCitationsInBody(text, anchors, read) {
|
|
303
|
+
return text.replace(/\bcites:\s*([^;}]+)/g, (_whole, raw) => {
|
|
304
|
+
const values = raw.split(",").map((value) => {
|
|
305
|
+
const oldCitation = value.trim();
|
|
306
|
+
const next = movedCitation(oldCitation, anchors, read);
|
|
307
|
+
if (next !== oldCitation && Object.hasOwn(anchors, oldCitation)) {
|
|
308
|
+
anchors[next] = anchors[oldCitation];
|
|
309
|
+
delete anchors[oldCitation];
|
|
310
|
+
}
|
|
311
|
+
return next;
|
|
312
|
+
});
|
|
313
|
+
return `cites: ${values.join(", ")}`;
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
function moveRenames(front, sections) {
|
|
317
|
+
const matches = matchRenamed(front, sections);
|
|
318
|
+
const moved = [];
|
|
319
|
+
for (const item of matches.renamed) {
|
|
320
|
+
const old = front.sections[item.from];
|
|
321
|
+
if (!old)
|
|
322
|
+
continue;
|
|
323
|
+
front.sections[item.to] = old;
|
|
324
|
+
delete front.sections[item.from];
|
|
325
|
+
moved.push({ from: item.from, to: item.to });
|
|
326
|
+
}
|
|
327
|
+
return moved;
|
|
328
|
+
}
|
|
329
|
+
function planBlessedCopyMoves(front, moved) {
|
|
330
|
+
const changes = [];
|
|
331
|
+
for (const item of moved) {
|
|
332
|
+
const metadata = front.sections[item.to];
|
|
333
|
+
if (!metadata || typeof metadata.blessed_copy !== "string")
|
|
334
|
+
continue;
|
|
335
|
+
const oldCopy = portable(metadata.blessed_copy);
|
|
336
|
+
const newCopy = `${path.posix.dirname(oldCopy)}/${item.to}.md`;
|
|
337
|
+
metadata.blessed_copy = newCopy;
|
|
338
|
+
if (oldCopy !== newCopy) {
|
|
339
|
+
changes.push({
|
|
340
|
+
from: oldCopy,
|
|
341
|
+
to: newCopy,
|
|
342
|
+
sidecarFrom: `${oldCopy}.anchors.json`,
|
|
343
|
+
sidecarTo: `${newCopy}.anchors.json`,
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
return changes;
|
|
348
|
+
}
|
|
349
|
+
async function requireFile(filename, cwd) {
|
|
350
|
+
const absolute = path.join(cwd, ...portable(filename).split("/"));
|
|
351
|
+
try {
|
|
352
|
+
if (!(await lstat(absolute)).isFile())
|
|
353
|
+
throw new Error(`${filename} is not a file`);
|
|
354
|
+
}
|
|
355
|
+
catch (error) {
|
|
356
|
+
if (error.code === "ENOENT") {
|
|
357
|
+
throw new Error(`Blessed copy move source ${filename} is missing.`, { cause: error });
|
|
358
|
+
}
|
|
359
|
+
throw error;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
async function requireAbsent(filename, cwd) {
|
|
363
|
+
const absolute = path.join(cwd, ...portable(filename).split("/"));
|
|
364
|
+
try {
|
|
365
|
+
await lstat(absolute);
|
|
366
|
+
}
|
|
367
|
+
catch (error) {
|
|
368
|
+
if (error.code === "ENOENT")
|
|
369
|
+
return;
|
|
370
|
+
throw error;
|
|
371
|
+
}
|
|
372
|
+
throw new Error(`Blessed copy move destination ${filename} already exists.`);
|
|
373
|
+
}
|
|
374
|
+
async function applyBlessedCopyMoves(moves, cwd, dryRun) {
|
|
375
|
+
if (dryRun || moves.length === 0)
|
|
376
|
+
return;
|
|
377
|
+
for (const move of moves) {
|
|
378
|
+
await requireFile(move.from, cwd);
|
|
379
|
+
await requireFile(move.sidecarFrom, cwd);
|
|
380
|
+
await requireAbsent(move.to, cwd);
|
|
381
|
+
await requireAbsent(move.sidecarTo, cwd);
|
|
382
|
+
}
|
|
383
|
+
const completed = [];
|
|
384
|
+
try {
|
|
385
|
+
for (const move of moves) {
|
|
386
|
+
await mkdir(path.join(cwd, ...path.posix.dirname(move.to).split("/")), { recursive: true });
|
|
387
|
+
const from = path.join(cwd, ...move.from.split("/"));
|
|
388
|
+
const to = path.join(cwd, ...move.to.split("/"));
|
|
389
|
+
const sidecarFrom = path.join(cwd, ...move.sidecarFrom.split("/"));
|
|
390
|
+
const sidecarTo = path.join(cwd, ...move.sidecarTo.split("/"));
|
|
391
|
+
await rename(from, to);
|
|
392
|
+
try {
|
|
393
|
+
await rename(sidecarFrom, sidecarTo);
|
|
394
|
+
}
|
|
395
|
+
catch (error) {
|
|
396
|
+
await rename(to, from).catch(() => undefined);
|
|
397
|
+
throw error;
|
|
398
|
+
}
|
|
399
|
+
completed.push(move);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
catch (error) {
|
|
403
|
+
for (const move of completed.toReversed()) {
|
|
404
|
+
await rename(path.join(cwd, ...move.sidecarTo.split("/")), path.join(cwd, ...move.sidecarFrom.split("/")));
|
|
405
|
+
await rename(path.join(cwd, ...move.to.split("/")), path.join(cwd, ...move.from.split("/")));
|
|
406
|
+
}
|
|
407
|
+
throw error;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
function setSections(front, doc, cwd) {
|
|
411
|
+
const read = readSyncReader(cwd);
|
|
412
|
+
for (const section of doc.sections) {
|
|
413
|
+
const metadata = front.sections[section.slug] ?? {};
|
|
414
|
+
const anchors = metadata.anchors && typeof metadata.anchors === "object" && !Array.isArray(metadata.anchors)
|
|
415
|
+
? metadata.anchors
|
|
416
|
+
: {};
|
|
417
|
+
const updated = {
|
|
418
|
+
...metadata,
|
|
419
|
+
state: metadata.state ?? "draft",
|
|
420
|
+
digest: section.digest,
|
|
421
|
+
flags: flags(section, read),
|
|
422
|
+
};
|
|
423
|
+
if (Object.keys(anchors).length > 0)
|
|
424
|
+
updated.anchors = anchors;
|
|
425
|
+
front.sections[section.slug] = updated;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
function removeOrphans(front, doc) {
|
|
429
|
+
const present = new Set(doc.sections.map((section) => section.slug));
|
|
430
|
+
for (const slug of Object.keys(front.sections)) {
|
|
431
|
+
if (!present.has(slug))
|
|
432
|
+
delete front.sections[slug];
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
export async function fix(options = {}) {
|
|
436
|
+
const cwd = path.resolve(options.cwd ?? process.cwd());
|
|
437
|
+
const policy = await loadPolicy({ cwd });
|
|
438
|
+
const prefix = policy.specs.id_prefix;
|
|
439
|
+
const activePaths = await activeDocumentPaths(cwd, policy);
|
|
440
|
+
const discovered = await ladder({ cwd, files: activePaths.files });
|
|
441
|
+
const known = new Map(discovered.map((entry) => [entry.path, entry]));
|
|
442
|
+
const active = new Set(activePaths.files);
|
|
443
|
+
for (const document of policy.specs.documents) {
|
|
444
|
+
const filename = portable(path.posix.join(policy.paths.records, document.path));
|
|
445
|
+
if (!active.has(filename))
|
|
446
|
+
continue;
|
|
447
|
+
if (known.has(filename))
|
|
448
|
+
continue;
|
|
449
|
+
try {
|
|
450
|
+
const text = await readFile(path.join(cwd, ...filename.split("/")), "utf8");
|
|
451
|
+
known.set(filename, {
|
|
452
|
+
path: filename,
|
|
453
|
+
level: document.level,
|
|
454
|
+
doc: parseDoc(filename, text, { prefix }),
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
catch (error) {
|
|
458
|
+
if (error.code !== "ENOENT")
|
|
459
|
+
throw error;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
const entries = [...known.values()].sort((left, right) => left.path.localeCompare(right.path));
|
|
463
|
+
const requirementIds = occurrences(entries, prefix).filter((item) => item.id.startsWith(`${prefix}-`));
|
|
464
|
+
const visionCounts = new Map();
|
|
465
|
+
const visionIds = entries.flatMap((entry) => entry.doc.sections.flatMap((section) => section.vision_items.flatMap((item) => {
|
|
466
|
+
const key = `${entry.path}\0${item.id}`;
|
|
467
|
+
const occurrenceIndex = visionCounts.get(key) ?? 0;
|
|
468
|
+
visionCounts.set(key, occurrenceIndex + 1);
|
|
469
|
+
const line = itemLine(item);
|
|
470
|
+
return line === null ? [] : [{
|
|
471
|
+
id: item.id,
|
|
472
|
+
path: entry.path,
|
|
473
|
+
line,
|
|
474
|
+
state: section.state,
|
|
475
|
+
signature: jcs(item),
|
|
476
|
+
occurrenceIndex,
|
|
477
|
+
}];
|
|
478
|
+
})));
|
|
479
|
+
const branchIds = await otherBranchOccurrences(cwd, prefix, activePaths.roots);
|
|
480
|
+
let nextRequirement = Math.max(0, ...requirementIds.map((item) => idNumber(item.id)), ...branchIds.filter((item) => item.id.startsWith(`${prefix}-`)).map((item) => idNumber(item.id))) + 1;
|
|
481
|
+
let nextVision = Math.max(0, ...visionIds.map((item) => idNumber(item.id)), ...branchIds.filter((item) => item.id.startsWith("V-")).map((item) => idNumber(item.id))) + 1;
|
|
482
|
+
const head = (await git(["rev-parse", "HEAD"], { cwd }).catch(() => "")).trim();
|
|
483
|
+
const headTime = Number.parseInt((await git(["show", "-s", "--format=%ct", head || "HEAD"], { cwd }).catch(() => "0")).trim(), 10) || 0;
|
|
484
|
+
const perFile = new Map();
|
|
485
|
+
const copyMoves = [];
|
|
486
|
+
for (const entry of entries) {
|
|
487
|
+
const original = await readFile(path.join(cwd, ...entry.path.split("/")), "utf8");
|
|
488
|
+
const { front, body } = splitFront(original);
|
|
489
|
+
let text = front ? original : body;
|
|
490
|
+
text = assignMissingIds(text, parseDoc(entry.path, text, { prefix }), prefix, () => nextRequirement++, () => nextVision++);
|
|
491
|
+
let parsedAfterIds = parseDoc(entry.path, text, { prefix });
|
|
492
|
+
for (const problem of parsedAfterIds.problems) {
|
|
493
|
+
if (problem.code !== "TN-SPEC-DUP-ID" || problem.line === null)
|
|
494
|
+
continue;
|
|
495
|
+
const duplicate = parsedAfterIds.sections.find((candidate) => {
|
|
496
|
+
const start = sectionLocation(candidate).start;
|
|
497
|
+
return problem.line !== null && problem.line >= start &&
|
|
498
|
+
problem.line < start + candidate.text.replace(/\n$/, "").split("\n").length;
|
|
499
|
+
});
|
|
500
|
+
if (duplicate?.state === "blessed")
|
|
501
|
+
continue;
|
|
502
|
+
const match = /Duplicate specification ID ([A-Z][A-Z0-9]*(?:-[A-Z]+)?-\d+)\./.exec(problem.message);
|
|
503
|
+
const id = match?.[1];
|
|
504
|
+
if (!id)
|
|
505
|
+
continue;
|
|
506
|
+
text = replaceId(text, problem.line, id, id.startsWith("V-") ? `V-${nextVision++}` : `${prefix}-${nextRequirement++}`);
|
|
507
|
+
}
|
|
508
|
+
parsedAfterIds = parseDoc(entry.path, text, { prefix });
|
|
509
|
+
const completeFront = frontFor(entry, front, policy, head || "working-tree");
|
|
510
|
+
const renamed = moveRenames(completeFront, parsedAfterIds.sections);
|
|
511
|
+
copyMoves.push(...planBlessedCopyMoves(completeFront, renamed));
|
|
512
|
+
let bodyAfter = front ? splitFront(text).body : text;
|
|
513
|
+
const read = readSyncReader(cwd);
|
|
514
|
+
for (const section of parsedAfterIds.sections) {
|
|
515
|
+
const metadata = completeFront.sections[section.slug] ?? {};
|
|
516
|
+
const anchors = metadata.anchors && typeof metadata.anchors === "object" && !Array.isArray(metadata.anchors)
|
|
517
|
+
? metadata.anchors
|
|
518
|
+
: {};
|
|
519
|
+
bodyAfter = normalizeCitationsInBody(bodyAfter, anchors, read);
|
|
520
|
+
}
|
|
521
|
+
const reparsed = parseDoc(entry.path, compose(completeFront, bodyAfter), { prefix });
|
|
522
|
+
removeOrphans(completeFront, reparsed);
|
|
523
|
+
setSections(completeFront, reparsed, cwd);
|
|
524
|
+
perFile.set(entry.path, compose(completeFront, bodyAfter));
|
|
525
|
+
}
|
|
526
|
+
const byId = new Map();
|
|
527
|
+
for (const occurrence of [...requirementIds, ...visionIds]) {
|
|
528
|
+
const list = byId.get(occurrence.id) ?? [];
|
|
529
|
+
list.push(occurrence);
|
|
530
|
+
byId.set(occurrence.id, list);
|
|
531
|
+
}
|
|
532
|
+
for (const [id, list] of [...byId.entries()].sort(([left], [right]) => left.localeCompare(right))) {
|
|
533
|
+
if (list.length < 2)
|
|
534
|
+
continue;
|
|
535
|
+
const blessed = list.filter((item) => item.state === "blessed");
|
|
536
|
+
if (blessed.length > 0) {
|
|
537
|
+
for (const occurrence of list.filter((item) => item.state !== "blessed")) {
|
|
538
|
+
const text = perFile.get(occurrence.path);
|
|
539
|
+
if (!text)
|
|
540
|
+
continue;
|
|
541
|
+
perFile.set(occurrence.path, replaceOccurrenceId(text, occurrence, id.startsWith("V-") ? `V-${nextVision++}` : `${prefix}-${nextRequirement++}`, prefix));
|
|
542
|
+
}
|
|
543
|
+
continue;
|
|
544
|
+
}
|
|
545
|
+
const ordered = [...list].sort((left, right) => left.path.localeCompare(right.path) || left.line - right.line);
|
|
546
|
+
for (const occurrence of ordered.slice(1)) {
|
|
547
|
+
const text = perFile.get(occurrence.path);
|
|
548
|
+
if (!text)
|
|
549
|
+
continue;
|
|
550
|
+
perFile.set(occurrence.path, replaceOccurrenceId(text, occurrence, id.startsWith("V-") ? `V-${nextVision++}` : `${prefix}-${nextRequirement++}`, prefix));
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
for (const occurrence of [...requirementIds, ...visionIds]) {
|
|
554
|
+
if (occurrence.state === "blessed")
|
|
555
|
+
continue;
|
|
556
|
+
const conflicting = branchIds.filter((item) => item.id === occurrence.id && item.signature !== occurrence.signature);
|
|
557
|
+
const otherBlessed = conflicting.some((item) => item.state === "blessed");
|
|
558
|
+
const currentIsNewer = headTime >= Math.max(...conflicting.map((item) => item.authoredAt ?? 0));
|
|
559
|
+
if (conflicting.length === 0 || (!otherBlessed && !currentIsNewer))
|
|
560
|
+
continue;
|
|
561
|
+
const text = perFile.get(occurrence.path);
|
|
562
|
+
if (!text)
|
|
563
|
+
continue;
|
|
564
|
+
perFile.set(occurrence.path, replaceOccurrenceId(text, occurrence, occurrence.id.startsWith("V-") ? `V-${nextVision++}` : `${prefix}-${nextRequirement++}`, prefix));
|
|
565
|
+
}
|
|
566
|
+
await applyBlessedCopyMoves(copyMoves, cwd, Boolean(options.dryRun));
|
|
567
|
+
const changes = copyMoves.map((move) => ({
|
|
568
|
+
path: move.to,
|
|
569
|
+
action: "move-blessed-copy",
|
|
570
|
+
}));
|
|
571
|
+
for (const entry of entries) {
|
|
572
|
+
const filename = entry.path;
|
|
573
|
+
const before = await readFile(path.join(cwd, ...filename.split("/")), "utf8");
|
|
574
|
+
const candidate = perFile.get(filename);
|
|
575
|
+
if (candidate === undefined || candidate === before)
|
|
576
|
+
continue;
|
|
577
|
+
changes.push({ path: filename, action: "repair" });
|
|
578
|
+
if (!options.dryRun)
|
|
579
|
+
await writeAtomic(path.join(cwd, ...filename.split("/")), candidate);
|
|
580
|
+
}
|
|
581
|
+
return { changes };
|
|
582
|
+
}
|
|
583
|
+
//# sourceMappingURL=fix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fix.js","sourceRoot":"","sources":["../../src/specs/fix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,E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M;YAAE,MAAM,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAC5F,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SpecSection } from "./parse.js";
|
|
2
|
+
export { relocate } from "./anchors.js";
|
|
3
|
+
type Reader = (path: string) => string | null;
|
|
4
|
+
type FlagSection = SpecSection | Record<string, unknown>;
|
|
5
|
+
export declare function flags(section: FlagSection, readFile: Reader): Array<"edited" | "sources-changed">;
|
|
6
|
+
type Front = {
|
|
7
|
+
sections?: Record<string, {
|
|
8
|
+
digest?: string | null;
|
|
9
|
+
blessed_digest?: string | null;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export declare function matchRenamed(front: Front | Record<string, unknown>, sections: Array<{
|
|
13
|
+
slug: string;
|
|
14
|
+
digest: string;
|
|
15
|
+
}>): {
|
|
16
|
+
renamed: Array<{
|
|
17
|
+
from: string;
|
|
18
|
+
to: string;
|
|
19
|
+
digest: string;
|
|
20
|
+
}>;
|
|
21
|
+
ambiguous: Array<{
|
|
22
|
+
from: string;
|
|
23
|
+
candidates: string[];
|
|
24
|
+
}>;
|
|
25
|
+
};
|