@dommaker/harness 3.0.0 → 4.0.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/dist/agents/index.d.ts +0 -1
- package/dist/agents/index.js +0 -1
- package/dist/agents/lifecycle.d.ts +0 -1
- package/dist/agents/lifecycle.js +0 -1
- package/dist/agents/types.d.ts +0 -1
- package/dist/agents/types.js +0 -1
- package/dist/bootstrap/bootstrap.d.ts +0 -1
- package/dist/bootstrap/bootstrap.js +0 -1
- package/dist/bootstrap/index.d.ts +0 -1
- package/dist/bootstrap/index.js +0 -1
- package/dist/cli/command-contract.d.ts +0 -1
- package/dist/cli/command-contract.js +0 -1
- package/dist/cli/commands/__tests__/gate-decision.d.ts +0 -1
- package/dist/cli/commands/__tests__/gate-decision.js +0 -1
- package/dist/cli/commands/acceptance.d.ts +0 -1
- package/dist/cli/commands/acceptance.js +3 -3
- package/dist/cli/commands/check.d.ts +0 -1
- package/dist/cli/commands/check.js +0 -1
- package/dist/cli/commands/command.d.ts +0 -1
- package/dist/cli/commands/command.js +0 -1
- package/dist/cli/commands/constraints-disable.d.ts +0 -1
- package/dist/cli/commands/constraints-disable.js +0 -1
- package/dist/cli/commands/constraints-pack-proposal.d.ts +0 -1
- package/dist/cli/commands/constraints-pack-proposal.js +0 -1
- package/dist/cli/commands/constraints-reactivate.d.ts +0 -1
- package/dist/cli/commands/constraints-reactivate.js +0 -1
- package/dist/cli/commands/constraints-report.d.ts +0 -1
- package/dist/cli/commands/constraints-report.js +4 -4
- package/dist/cli/commands/constraints-retire.d.ts +0 -1
- package/dist/cli/commands/constraints-retire.js +0 -1
- package/dist/cli/commands/constraints.d.ts +0 -1
- package/dist/cli/commands/constraints.js +0 -1
- package/dist/cli/commands/contract.d.ts +0 -1
- package/dist/cli/commands/contract.js +4 -4
- package/dist/cli/commands/definitions.d.ts +0 -1
- package/dist/cli/commands/definitions.js +0 -1
- package/dist/cli/commands/failure.d.ts +0 -1
- package/dist/cli/commands/failure.js +0 -1
- package/dist/cli/commands/init/ci-platform.d.ts +0 -1
- package/dist/cli/commands/init/ci-platform.js +0 -1
- package/dist/cli/commands/init/ci-wiring.d.ts +0 -1
- package/dist/cli/commands/init/ci-wiring.js +0 -1
- package/dist/cli/commands/init/git-hooks.d.ts +0 -1
- package/dist/cli/commands/init/git-hooks.js +0 -1
- package/dist/cli/commands/init/governance.d.ts +0 -1
- package/dist/cli/commands/init/governance.js +0 -1
- package/dist/cli/commands/init/index.d.ts +0 -1
- package/dist/cli/commands/init/index.js +2 -3
- package/dist/cli/commands/init/output-style.d.ts +0 -1
- package/dist/cli/commands/init/output-style.js +0 -1
- package/dist/cli/commands/init/presets.d.ts +0 -1
- package/dist/cli/commands/init/presets.js +0 -1
- package/dist/cli/commands/init/snippets.d.ts +0 -1
- package/dist/cli/commands/init/snippets.js +0 -1
- package/dist/cli/commands/knowledge/audit.d.ts +0 -1
- package/dist/cli/commands/knowledge/audit.js +0 -1
- package/dist/cli/commands/knowledge/decay.d.ts +0 -1
- package/dist/cli/commands/knowledge/decay.js +0 -1
- package/dist/cli/commands/knowledge/health.d.ts +0 -1
- package/dist/cli/commands/knowledge/health.js +0 -1
- package/dist/cli/commands/knowledge/import.d.ts +0 -1
- package/dist/cli/commands/knowledge/import.js +12 -1
- package/dist/cli/commands/knowledge/index.d.ts +0 -1
- package/dist/cli/commands/knowledge/index.js +0 -1
- package/dist/cli/commands/knowledge/list.d.ts +0 -1
- package/dist/cli/commands/knowledge/list.js +18 -1
- package/dist/cli/commands/knowledge/search.d.ts +0 -1
- package/dist/cli/commands/knowledge/search.js +0 -1
- package/dist/cli/commands/knowledge/shared.d.ts +0 -1
- package/dist/cli/commands/knowledge/shared.js +0 -1
- package/dist/cli/commands/knowledge/snapshot.d.ts +0 -1
- package/dist/cli/commands/knowledge/snapshot.js +0 -1
- package/dist/cli/commands/knowledge/stats.d.ts +0 -1
- package/dist/cli/commands/knowledge/stats.js +4 -9
- package/dist/cli/commands/knowledge/store-access.d.ts +0 -1
- package/dist/cli/commands/knowledge/store-access.js +0 -1
- package/dist/cli/commands/knowledge-view.d.ts +0 -1
- package/dist/cli/commands/knowledge-view.js +0 -1
- package/dist/cli/commands/passes-gate.d.ts +0 -1
- package/dist/cli/commands/passes-gate.js +5 -42
- package/dist/cli/commands/performance.d.ts +0 -1
- package/dist/cli/commands/performance.js +0 -1
- package/dist/cli/commands/release.d.ts +0 -1
- package/dist/cli/commands/release.js +2 -2
- package/dist/cli/commands/report.d.ts +0 -1
- package/dist/cli/commands/report.js +0 -1
- package/dist/cli/commands/review.d.ts +0 -1
- package/dist/cli/commands/review.js +4 -4
- package/dist/cli/commands/scaffold-templates.d.ts +0 -1
- package/dist/cli/commands/scaffold-templates.js +1 -2
- package/dist/cli/commands/scaffold.d.ts +0 -1
- package/dist/cli/commands/scaffold.js +0 -1
- package/dist/cli/commands/sdd.d.ts +0 -1
- package/dist/cli/commands/sdd.js +0 -1
- package/dist/cli/commands/security.d.ts +0 -1
- package/dist/cli/commands/security.js +2 -2
- package/dist/cli/commands/spec/validator.d.ts +3 -1
- package/dist/cli/commands/spec/validator.js +12 -13
- package/dist/cli/commands/spec-baseline-check.d.ts +0 -1
- package/dist/cli/commands/spec-baseline-check.js +22 -5
- package/dist/cli/commands/spec.d.ts +0 -1
- package/dist/cli/commands/spec.js +0 -1
- package/dist/cli/commands/status.d.ts +0 -1
- package/dist/cli/commands/status.js +0 -1
- package/dist/cli/commands/sync-docs/agents-syncer.d.ts +0 -1
- package/dist/cli/commands/sync-docs/agents-syncer.js +0 -1
- package/dist/cli/commands/sync-docs/capabilities-syncer.d.ts +0 -1
- package/dist/cli/commands/sync-docs/capabilities-syncer.js +2 -2
- package/dist/cli/commands/sync-docs/compact.d.ts +0 -1
- package/dist/cli/commands/sync-docs/compact.js +0 -1
- package/dist/cli/commands/sync-docs/context-syncer.d.ts +0 -1
- package/dist/cli/commands/sync-docs/context-syncer.js +0 -1
- package/dist/cli/commands/sync-docs/gate.d.ts +0 -1
- package/dist/cli/commands/sync-docs/gate.js +0 -1
- package/dist/cli/commands/sync-docs/head-gate.d.ts +0 -1
- package/dist/cli/commands/sync-docs/head-gate.js +0 -1
- package/dist/cli/commands/sync-docs/index.d.ts +0 -1
- package/dist/cli/commands/sync-docs/index.js +0 -1
- package/dist/cli/commands/sync-docs/main-flow.d.ts +0 -1
- package/dist/cli/commands/sync-docs/main-flow.js +0 -1
- package/dist/cli/commands/sync-docs/preserve-block.d.ts +0 -1
- package/dist/cli/commands/sync-docs/preserve-block.js +0 -1
- package/dist/cli/commands/sync-docs/project-reader.d.ts +0 -1
- package/dist/cli/commands/sync-docs/project-reader.js +0 -1
- package/dist/cli/commands/sync-docs/sync-output.d.ts +0 -1
- package/dist/cli/commands/sync-docs/sync-output.js +62 -47
- package/dist/cli/commands/sync-docs/sync-state.d.ts +0 -1
- package/dist/cli/commands/sync-docs/sync-state.js +0 -1
- package/dist/cli/commands/sync-docs/sync-writes.d.ts +0 -1
- package/dist/cli/commands/sync-docs/sync-writes.js +0 -1
- package/dist/cli/commands/validate.d.ts +0 -1
- package/dist/cli/commands/validate.js +5 -3
- package/dist/cli/gate-command.d.ts +0 -1
- package/dist/cli/gate-command.js +2 -2
- package/dist/cli/state-io.d.ts +0 -1
- package/dist/cli/state-io.js +0 -1
- package/dist/completion-checkers/classify.d.ts +0 -1
- package/dist/completion-checkers/classify.js +0 -1
- package/dist/completion-checkers/contract-presence.d.ts +0 -1
- package/dist/completion-checkers/contract-presence.js +0 -1
- package/dist/completion-checkers/glob-match.d.ts +0 -1
- package/dist/completion-checkers/glob-match.js +0 -1
- package/dist/completion-checkers/index.d.ts +0 -1
- package/dist/completion-checkers/index.js +0 -1
- package/dist/completion-checkers/phase-format.d.ts +0 -1
- package/dist/completion-checkers/phase-format.js +0 -1
- package/dist/completion-checkers/tdd-chain.d.ts +0 -1
- package/dist/completion-checkers/tdd-chain.js +0 -1
- package/dist/completion-checkers/types.d.ts +0 -1
- package/dist/completion-checkers/types.js +0 -1
- package/dist/context/index.d.ts +0 -1
- package/dist/context/index.js +0 -1
- package/dist/context/session-manager.d.ts +0 -1
- package/dist/context/session-manager.js +0 -1
- package/dist/context/types.d.ts +0 -1
- package/dist/context/types.js +0 -1
- package/dist/core/app-constraints-loader.d.ts +0 -1
- package/dist/core/app-constraints-loader.js +3 -3
- package/dist/core/constraint-lifecycle.d.ts +0 -1
- package/dist/core/constraint-lifecycle.js +0 -1
- package/dist/core/constraints/capabilities-parser.d.ts +0 -1
- package/dist/core/constraints/capabilities-parser.js +0 -1
- package/dist/core/constraints/capabilities-reconcile.d.ts +0 -1
- package/dist/core/constraints/capabilities-reconcile.js +0 -1
- package/dist/core/constraints/check-cache.d.ts +0 -1
- package/dist/core/constraints/check-cache.js +0 -1
- package/dist/core/constraints/checker.d.ts +0 -2
- package/dist/core/constraints/checker.js +1 -4
- package/dist/core/constraints/checkers/capability-sync.d.ts +0 -1
- package/dist/core/constraints/checkers/capability-sync.js +2 -2
- package/dist/core/constraints/checkers/context-doc-sync.d.ts +0 -1
- package/dist/core/constraints/checkers/context-doc-sync.js +0 -1
- package/dist/core/constraints/checkers/docs-freshness.d.ts +0 -1
- package/dist/core/constraints/checkers/docs-freshness.js +2 -2
- package/dist/core/constraints/checkers/governance-presence.d.ts +0 -1
- package/dist/core/constraints/checkers/governance-presence.js +0 -1
- package/dist/core/constraints/checkers/index.d.ts +0 -1
- package/dist/core/constraints/checkers/index.js +0 -1
- package/dist/core/constraints/checkers/no-completion-without-verification.d.ts +0 -1
- package/dist/core/constraints/checkers/no-completion-without-verification.js +2 -2
- package/dist/core/constraints/checkers/no-hardcoded-credentials.d.ts +0 -1
- package/dist/core/constraints/checkers/no-hardcoded-credentials.js +0 -1
- package/dist/core/constraints/checkers/no-test-simplification.d.ts +0 -1
- package/dist/core/constraints/checkers/no-test-simplification.js +2 -2
- package/dist/core/constraints/checkers/templated/exec.d.ts +0 -1
- package/dist/core/constraints/checkers/templated/exec.js +0 -1
- package/dist/core/constraints/checkers/templated/file-exists.d.ts +3 -2
- package/dist/core/constraints/checkers/templated/file-exists.js +14 -40
- package/dist/core/constraints/checkers/templated/glob.d.ts +0 -1
- package/dist/core/constraints/checkers/templated/glob.js +0 -1
- package/dist/core/constraints/checkers/templated/index.d.ts +0 -1
- package/dist/core/constraints/checkers/templated/index.js +0 -1
- package/dist/core/constraints/checkers/templated/regex-scan.d.ts +0 -1
- package/dist/core/constraints/checkers/templated/regex-scan.js +2 -2
- package/dist/core/constraints/checkers/types.d.ts +0 -1
- package/dist/core/constraints/checkers/types.js +0 -1
- package/dist/core/constraints/construction-sites.d.ts +0 -1
- package/dist/core/constraints/construction-sites.js +0 -1
- package/dist/core/constraints/context-builder.d.ts +0 -1
- package/dist/core/constraints/context-builder.js +0 -1
- package/dist/core/constraints/context-reconcile.d.ts +0 -1
- package/dist/core/constraints/context-reconcile.js +0 -1
- package/dist/core/constraints/definitions/errors.d.ts +0 -1
- package/dist/core/constraints/definitions/errors.js +0 -1
- package/dist/core/constraints/definitions/warnings.d.ts +0 -1
- package/dist/core/constraints/definitions/warnings.js +0 -1
- package/dist/core/constraints/definitions.d.ts +1 -6
- package/dist/core/constraints/definitions.js +0 -11
- package/dist/core/constraints/doc-freshness/check-changelog-version.d.ts +8 -0
- package/dist/core/constraints/doc-freshness/check-changelog-version.js +39 -0
- package/dist/core/constraints/doc-freshness/check-context-docs.d.ts +8 -0
- package/dist/core/constraints/doc-freshness/check-context-docs.js +32 -0
- package/dist/core/constraints/doc-freshness/check-doc-dir.d.ts +8 -0
- package/dist/core/constraints/doc-freshness/check-doc-dir.js +138 -0
- package/dist/core/constraints/doc-freshness/check-doc-regex-count.d.ts +16 -0
- package/dist/core/constraints/doc-freshness/check-doc-regex-count.js +131 -0
- package/dist/core/constraints/doc-freshness/runner.d.ts +8 -21
- package/dist/core/constraints/doc-freshness/runner.js +19 -313
- package/dist/core/constraints/find-constraint.d.ts +0 -1
- package/dist/core/constraints/find-constraint.js +0 -1
- package/dist/core/constraints/git-evidence.d.ts +0 -1
- package/dist/core/constraints/git-evidence.js +0 -1
- package/dist/core/constraints/governance-accessors.d.ts +0 -1
- package/dist/core/constraints/governance-accessors.js +0 -1
- package/dist/core/constraints/index.d.ts +2 -3
- package/dist/core/constraints/index.js +1 -4
- package/dist/core/constraints/injection-writer.d.ts +0 -13
- package/dist/core/constraints/injection-writer.js +0 -16
- package/dist/core/constraints/meta.d.ts +0 -1
- package/dist/core/constraints/meta.js +0 -1
- package/dist/core/constraints/pack-proposal.d.ts +0 -1
- package/dist/core/constraints/pack-proposal.js +5 -5
- package/dist/core/constraints/run-env.d.ts +0 -1
- package/dist/core/constraints/run-env.js +1 -2
- package/dist/core/constraints/triggers.d.ts +0 -1
- package/dist/core/constraints/triggers.js +0 -1
- package/dist/core/constraints/usage-report.d.ts +0 -12
- package/dist/core/constraints/usage-report.js +0 -16
- package/dist/core/effective-constraints.d.ts +0 -1
- package/dist/core/effective-constraints.js +0 -1
- package/dist/core/effective-set.d.ts +0 -1
- package/dist/core/effective-set.js +0 -1
- package/dist/core/project-config-loader.d.ts +0 -1
- package/dist/core/project-config-loader.js +0 -1
- package/dist/core/retired-constraints.d.ts +0 -1
- package/dist/core/retired-constraints.js +0 -1
- package/dist/core/spec/baseline-check.d.ts +5 -1
- package/dist/core/spec/baseline-check.js +0 -1
- package/dist/core/validators/check-handlers/command.d.ts +3 -4
- package/dist/core/validators/check-handlers/command.js +7 -22
- package/dist/core/validators/check-handlers/fail-result.d.ts +11 -0
- package/dist/core/validators/check-handlers/fail-result.js +15 -0
- package/dist/core/validators/check-handlers/file.d.ts +5 -6
- package/dist/core/validators/check-handlers/file.js +12 -33
- package/dist/core/validators/check-handlers/http.d.ts +3 -4
- package/dist/core/validators/check-handlers/http.js +7 -22
- package/dist/core/validators/check-handlers/output.d.ts +5 -6
- package/dist/core/validators/check-handlers/output.js +8 -28
- package/dist/core/validators/checkpoint.d.ts +7 -1
- package/dist/core/validators/checkpoint.js +66 -7
- package/dist/core/validators/cso.d.ts +0 -1
- package/dist/core/validators/cso.js +0 -1
- package/dist/core/validators/index.d.ts +1 -2
- package/dist/core/validators/index.js +1 -3
- package/dist/core/validators/passes-gate.d.ts +0 -5
- package/dist/core/validators/passes-gate.js +2 -9
- package/dist/core/validators/test-output.d.ts +0 -1
- package/dist/core/validators/test-output.js +0 -1
- package/dist/failure/classifier.d.ts +1 -2
- package/dist/failure/classifier.js +0 -1
- package/dist/failure/error-types.d.ts +48 -5
- package/dist/failure/error-types.js +5 -4
- package/dist/failure/index.d.ts +1 -2
- package/dist/failure/index.js +3 -3
- package/dist/failure/recorder.d.ts +1 -2
- package/dist/failure/recorder.js +0 -1
- package/dist/gates/acceptance.d.ts +0 -36
- package/dist/gates/acceptance.js +5 -59
- package/dist/gates/blacklist-rules.d.ts +12 -0
- package/dist/gates/blacklist-rules.js +227 -0
- package/dist/gates/command.d.ts +1 -5
- package/dist/gates/command.js +5 -219
- package/dist/gates/contract.d.ts +0 -1
- package/dist/gates/contract.js +0 -1
- package/dist/gates/coverage.d.ts +13 -0
- package/dist/gates/coverage.js +63 -0
- package/dist/gates/decision.d.ts +0 -1
- package/dist/gates/decision.js +0 -1
- package/dist/gates/definitions.d.ts +4 -4
- package/dist/gates/definitions.js +4 -4
- package/dist/gates/performance.d.ts +0 -1
- package/dist/gates/performance.js +6 -12
- package/dist/gates/review.d.ts +22 -1
- package/dist/gates/review.js +4 -3
- package/dist/gates/security.d.ts +0 -1
- package/dist/gates/security.js +10 -2
- package/dist/gates/tasks-file.d.ts +41 -0
- package/dist/gates/tasks-file.js +63 -0
- package/dist/gates/types.d.ts +0 -1
- package/dist/gates/types.js +2 -2
- package/dist/index.d.ts +7 -9
- package/dist/index.js +4 -18
- package/dist/knowledge/audit-dimensions.d.ts +0 -1
- package/dist/knowledge/audit-dimensions.js +0 -1
- package/dist/knowledge/audit-rules.d.ts +0 -1
- package/dist/knowledge/audit-rules.js +0 -1
- package/dist/knowledge/audit-scoring.d.ts +0 -1
- package/dist/knowledge/audit-scoring.js +0 -1
- package/dist/knowledge/audit.d.ts +0 -1
- package/dist/knowledge/audit.js +0 -1
- package/dist/knowledge/cold-start.d.ts +0 -1
- package/dist/knowledge/cold-start.js +8 -7
- package/dist/knowledge/flywheel-metrics.d.ts +0 -1
- package/dist/knowledge/flywheel-metrics.js +0 -1
- package/dist/knowledge/index-generator.d.ts +0 -1
- package/dist/knowledge/index-generator.js +8 -9
- package/dist/knowledge/index.d.ts +0 -1
- package/dist/knowledge/index.js +0 -1
- package/dist/knowledge/ingest.d.ts +0 -1
- package/dist/knowledge/ingest.js +0 -1
- package/dist/knowledge/lifecycle.d.ts +0 -1
- package/dist/knowledge/lifecycle.js +0 -1
- package/dist/knowledge/query.d.ts +0 -1
- package/dist/knowledge/query.js +0 -1
- package/dist/knowledge/store.d.ts +0 -1
- package/dist/knowledge/store.js +14 -11
- package/dist/knowledge/token-estimate.d.ts +0 -1
- package/dist/knowledge/token-estimate.js +0 -1
- package/dist/knowledge/tree-walker.d.ts +0 -1
- package/dist/knowledge/tree-walker.js +0 -1
- package/dist/knowledge/types.d.ts +0 -1
- package/dist/knowledge/types.js +0 -1
- package/dist/monitoring/index.d.ts +1 -2
- package/dist/monitoring/index.js +1 -3
- package/dist/monitoring/trace-analyzer.d.ts +0 -1
- package/dist/monitoring/trace-analyzer.js +32 -6
- package/dist/monitoring/traces.d.ts +0 -15
- package/dist/monitoring/traces.js +1 -17
- package/dist/presets/index.d.ts +0 -1
- package/dist/presets/index.js +0 -1
- package/dist/presets/standard.d.ts +0 -1
- package/dist/presets/standard.js +0 -1
- package/dist/pretool-use-hook.d.ts +0 -1
- package/dist/pretool-use-hook.js +0 -1
- package/dist/release/index.d.ts +0 -1
- package/dist/release/index.js +0 -1
- package/dist/release/integrity.d.ts +0 -1
- package/dist/release/integrity.js +0 -1
- package/dist/sdd/index-generator.d.ts +0 -2
- package/dist/sdd/index-generator.js +2 -5
- package/dist/types/checkpoint.d.ts +105 -33
- package/dist/types/checkpoint.js +0 -1
- package/dist/types/command-definition.d.ts +0 -1
- package/dist/types/command-definition.js +0 -1
- package/dist/types/command-io.d.ts +0 -1
- package/dist/types/command-io.js +0 -1
- package/dist/types/constraint.d.ts +0 -1
- package/dist/types/constraint.js +0 -1
- package/dist/types/cso.d.ts +0 -1
- package/dist/types/cso.js +0 -1
- package/dist/types/failure.d.ts +5 -53
- package/dist/types/failure.js +5 -9
- package/dist/types/gate.d.ts +0 -1
- package/dist/types/gate.js +0 -1
- package/dist/types/passes-gate.d.ts +10 -4
- package/dist/types/passes-gate.js +0 -1
- package/dist/types/project-config.d.ts +0 -1
- package/dist/types/project-config.js +0 -1
- package/dist/types/spec.d.ts +0 -7
- package/dist/types/spec.js +0 -1
- package/dist/types/trace.d.ts +0 -1
- package/dist/types/trace.js +0 -1
- package/dist/utils/attempt.d.ts +0 -1
- package/dist/utils/attempt.js +0 -1
- package/dist/utils/clip.d.ts +0 -1
- package/dist/utils/clip.js +0 -1
- package/dist/utils/date.d.ts +10 -0
- package/dist/utils/date.js +18 -0
- package/dist/utils/detect-source-roots.d.ts +0 -1
- package/dist/utils/detect-source-roots.js +0 -1
- package/dist/utils/diff-parse.d.ts +0 -1
- package/dist/utils/diff-parse.js +0 -1
- package/dist/utils/error.d.ts +10 -0
- package/dist/utils/error.js +15 -0
- package/dist/utils/exec.d.ts +0 -1
- package/dist/utils/exec.js +0 -1
- package/dist/utils/file-walk.d.ts +12 -3
- package/dist/utils/file-walk.js +20 -3
- package/dist/utils/frontmatter.d.ts +0 -1
- package/dist/utils/frontmatter.js +4 -4
- package/dist/utils/glob-match.d.ts +0 -1
- package/dist/utils/glob-match.js +0 -1
- package/dist/utils/guards.d.ts +0 -1
- package/dist/utils/guards.js +0 -1
- package/dist/utils/json-doc.d.ts +13 -0
- package/dist/utils/json-doc.js +54 -0
- package/dist/utils/jsonl.d.ts +0 -1
- package/dist/utils/jsonl.js +0 -1
- package/dist/utils/log-rotate.d.ts +0 -1
- package/dist/utils/log-rotate.js +0 -1
- package/dist/utils/numeric-flag.d.ts +0 -1
- package/dist/utils/numeric-flag.js +0 -1
- package/dist/utils/package-json.d.ts +0 -1
- package/dist/utils/package-json.js +0 -1
- package/dist/utils/package-version.d.ts +0 -1
- package/dist/utils/package-version.js +0 -1
- package/dist/utils/text.d.ts +18 -0
- package/dist/utils/text.js +26 -0
- package/dist/utils/yaml-edit.d.ts +2 -3
- package/dist/utils/yaml-edit.js +4 -5
- package/dist/utils/yaml.d.ts +13 -0
- package/dist/utils/yaml.js +19 -0
- package/package.json +2 -21
- package/CHANGELOG.md +0 -601
- package/dist/agents/index.d.ts.map +0 -1
- package/dist/agents/index.js.map +0 -1
- package/dist/agents/lifecycle.d.ts.map +0 -1
- package/dist/agents/lifecycle.js.map +0 -1
- package/dist/agents/types.d.ts.map +0 -1
- package/dist/agents/types.js.map +0 -1
- package/dist/bootstrap/bootstrap.d.ts.map +0 -1
- package/dist/bootstrap/bootstrap.js.map +0 -1
- package/dist/bootstrap/index.d.ts.map +0 -1
- package/dist/bootstrap/index.js.map +0 -1
- package/dist/cli/command-contract.d.ts.map +0 -1
- package/dist/cli/command-contract.js.map +0 -1
- package/dist/cli/commands/__tests__/gate-decision.d.ts.map +0 -1
- package/dist/cli/commands/__tests__/gate-decision.js.map +0 -1
- package/dist/cli/commands/acceptance.d.ts.map +0 -1
- package/dist/cli/commands/acceptance.js.map +0 -1
- package/dist/cli/commands/check.d.ts.map +0 -1
- package/dist/cli/commands/check.js.map +0 -1
- package/dist/cli/commands/command.d.ts.map +0 -1
- package/dist/cli/commands/command.js.map +0 -1
- package/dist/cli/commands/constraints-disable.d.ts.map +0 -1
- package/dist/cli/commands/constraints-disable.js.map +0 -1
- package/dist/cli/commands/constraints-pack-proposal.d.ts.map +0 -1
- package/dist/cli/commands/constraints-pack-proposal.js.map +0 -1
- package/dist/cli/commands/constraints-reactivate.d.ts.map +0 -1
- package/dist/cli/commands/constraints-reactivate.js.map +0 -1
- package/dist/cli/commands/constraints-report.d.ts.map +0 -1
- package/dist/cli/commands/constraints-report.js.map +0 -1
- package/dist/cli/commands/constraints-retire.d.ts.map +0 -1
- package/dist/cli/commands/constraints-retire.js.map +0 -1
- package/dist/cli/commands/constraints.d.ts.map +0 -1
- package/dist/cli/commands/constraints.js.map +0 -1
- package/dist/cli/commands/contract.d.ts.map +0 -1
- package/dist/cli/commands/contract.js.map +0 -1
- package/dist/cli/commands/definitions.d.ts.map +0 -1
- package/dist/cli/commands/definitions.js.map +0 -1
- package/dist/cli/commands/failure.d.ts.map +0 -1
- package/dist/cli/commands/failure.js.map +0 -1
- package/dist/cli/commands/init/ci-platform.d.ts.map +0 -1
- package/dist/cli/commands/init/ci-platform.js.map +0 -1
- package/dist/cli/commands/init/ci-wiring.d.ts.map +0 -1
- package/dist/cli/commands/init/ci-wiring.js.map +0 -1
- package/dist/cli/commands/init/git-hooks.d.ts.map +0 -1
- package/dist/cli/commands/init/git-hooks.js.map +0 -1
- package/dist/cli/commands/init/governance.d.ts.map +0 -1
- package/dist/cli/commands/init/governance.js.map +0 -1
- package/dist/cli/commands/init/index.d.ts.map +0 -1
- package/dist/cli/commands/init/index.js.map +0 -1
- package/dist/cli/commands/init/output-style.d.ts.map +0 -1
- package/dist/cli/commands/init/output-style.js.map +0 -1
- package/dist/cli/commands/init/presets.d.ts.map +0 -1
- package/dist/cli/commands/init/presets.js.map +0 -1
- package/dist/cli/commands/init/snippets.d.ts.map +0 -1
- package/dist/cli/commands/init/snippets.js.map +0 -1
- package/dist/cli/commands/knowledge/audit.d.ts.map +0 -1
- package/dist/cli/commands/knowledge/audit.js.map +0 -1
- package/dist/cli/commands/knowledge/decay.d.ts.map +0 -1
- package/dist/cli/commands/knowledge/decay.js.map +0 -1
- package/dist/cli/commands/knowledge/health.d.ts.map +0 -1
- package/dist/cli/commands/knowledge/health.js.map +0 -1
- package/dist/cli/commands/knowledge/import.d.ts.map +0 -1
- package/dist/cli/commands/knowledge/import.js.map +0 -1
- package/dist/cli/commands/knowledge/index.d.ts.map +0 -1
- package/dist/cli/commands/knowledge/index.js.map +0 -1
- package/dist/cli/commands/knowledge/list.d.ts.map +0 -1
- package/dist/cli/commands/knowledge/list.js.map +0 -1
- package/dist/cli/commands/knowledge/search.d.ts.map +0 -1
- package/dist/cli/commands/knowledge/search.js.map +0 -1
- package/dist/cli/commands/knowledge/shared.d.ts.map +0 -1
- package/dist/cli/commands/knowledge/shared.js.map +0 -1
- package/dist/cli/commands/knowledge/snapshot.d.ts.map +0 -1
- package/dist/cli/commands/knowledge/snapshot.js.map +0 -1
- package/dist/cli/commands/knowledge/stats.d.ts.map +0 -1
- package/dist/cli/commands/knowledge/stats.js.map +0 -1
- package/dist/cli/commands/knowledge/store-access.d.ts.map +0 -1
- package/dist/cli/commands/knowledge/store-access.js.map +0 -1
- package/dist/cli/commands/knowledge-view.d.ts.map +0 -1
- package/dist/cli/commands/knowledge-view.js.map +0 -1
- package/dist/cli/commands/passes-gate.d.ts.map +0 -1
- package/dist/cli/commands/passes-gate.js.map +0 -1
- package/dist/cli/commands/performance.d.ts.map +0 -1
- package/dist/cli/commands/performance.js.map +0 -1
- package/dist/cli/commands/release.d.ts.map +0 -1
- package/dist/cli/commands/release.js.map +0 -1
- package/dist/cli/commands/report.d.ts.map +0 -1
- package/dist/cli/commands/report.js.map +0 -1
- package/dist/cli/commands/review.d.ts.map +0 -1
- package/dist/cli/commands/review.js.map +0 -1
- package/dist/cli/commands/scaffold-templates.d.ts.map +0 -1
- package/dist/cli/commands/scaffold-templates.js.map +0 -1
- package/dist/cli/commands/scaffold.d.ts.map +0 -1
- package/dist/cli/commands/scaffold.js.map +0 -1
- package/dist/cli/commands/sdd.d.ts.map +0 -1
- package/dist/cli/commands/sdd.js.map +0 -1
- package/dist/cli/commands/security.d.ts.map +0 -1
- package/dist/cli/commands/security.js.map +0 -1
- package/dist/cli/commands/spec/validator.d.ts.map +0 -1
- package/dist/cli/commands/spec/validator.js.map +0 -1
- package/dist/cli/commands/spec-baseline-check.d.ts.map +0 -1
- package/dist/cli/commands/spec-baseline-check.js.map +0 -1
- package/dist/cli/commands/spec.d.ts.map +0 -1
- package/dist/cli/commands/spec.js.map +0 -1
- package/dist/cli/commands/status.d.ts.map +0 -1
- package/dist/cli/commands/status.js.map +0 -1
- package/dist/cli/commands/sync-docs/agents-syncer.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/agents-syncer.js.map +0 -1
- package/dist/cli/commands/sync-docs/capabilities-syncer.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/capabilities-syncer.js.map +0 -1
- package/dist/cli/commands/sync-docs/compact.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/compact.js.map +0 -1
- package/dist/cli/commands/sync-docs/context-syncer.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/context-syncer.js.map +0 -1
- package/dist/cli/commands/sync-docs/gate.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/gate.js.map +0 -1
- package/dist/cli/commands/sync-docs/head-gate.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/head-gate.js.map +0 -1
- package/dist/cli/commands/sync-docs/index.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/index.js.map +0 -1
- package/dist/cli/commands/sync-docs/main-flow.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/main-flow.js.map +0 -1
- package/dist/cli/commands/sync-docs/preserve-block.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/preserve-block.js.map +0 -1
- package/dist/cli/commands/sync-docs/project-reader.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/project-reader.js.map +0 -1
- package/dist/cli/commands/sync-docs/sync-output.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/sync-output.js.map +0 -1
- package/dist/cli/commands/sync-docs/sync-state.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/sync-state.js.map +0 -1
- package/dist/cli/commands/sync-docs/sync-writes.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs/sync-writes.js.map +0 -1
- package/dist/cli/commands/validate.d.ts.map +0 -1
- package/dist/cli/commands/validate.js.map +0 -1
- package/dist/cli/gate-command.d.ts.map +0 -1
- package/dist/cli/gate-command.js.map +0 -1
- package/dist/cli/state-io.d.ts.map +0 -1
- package/dist/cli/state-io.js.map +0 -1
- package/dist/completion-checkers/classify.d.ts.map +0 -1
- package/dist/completion-checkers/classify.js.map +0 -1
- package/dist/completion-checkers/contract-presence.d.ts.map +0 -1
- package/dist/completion-checkers/contract-presence.js.map +0 -1
- package/dist/completion-checkers/glob-match.d.ts.map +0 -1
- package/dist/completion-checkers/glob-match.js.map +0 -1
- package/dist/completion-checkers/index.d.ts.map +0 -1
- package/dist/completion-checkers/index.js.map +0 -1
- package/dist/completion-checkers/phase-format.d.ts.map +0 -1
- package/dist/completion-checkers/phase-format.js.map +0 -1
- package/dist/completion-checkers/tdd-chain.d.ts.map +0 -1
- package/dist/completion-checkers/tdd-chain.js.map +0 -1
- package/dist/completion-checkers/types.d.ts.map +0 -1
- package/dist/completion-checkers/types.js.map +0 -1
- package/dist/context/index.d.ts.map +0 -1
- package/dist/context/index.js.map +0 -1
- package/dist/context/session-manager.d.ts.map +0 -1
- package/dist/context/session-manager.js.map +0 -1
- package/dist/context/types.d.ts.map +0 -1
- package/dist/context/types.js.map +0 -1
- package/dist/core/app-constraints-loader.d.ts.map +0 -1
- package/dist/core/app-constraints-loader.js.map +0 -1
- package/dist/core/config-files.d.ts +0 -21
- package/dist/core/config-files.d.ts.map +0 -1
- package/dist/core/config-files.js +0 -75
- package/dist/core/config-files.js.map +0 -1
- package/dist/core/constraint-lifecycle.d.ts.map +0 -1
- package/dist/core/constraint-lifecycle.js.map +0 -1
- package/dist/core/constraints/capabilities-parser.d.ts.map +0 -1
- package/dist/core/constraints/capabilities-parser.js.map +0 -1
- package/dist/core/constraints/capabilities-reconcile.d.ts.map +0 -1
- package/dist/core/constraints/capabilities-reconcile.js.map +0 -1
- package/dist/core/constraints/check-cache.d.ts.map +0 -1
- package/dist/core/constraints/check-cache.js.map +0 -1
- package/dist/core/constraints/checker.d.ts.map +0 -1
- package/dist/core/constraints/checker.js.map +0 -1
- package/dist/core/constraints/checkers/capability-sync.d.ts.map +0 -1
- package/dist/core/constraints/checkers/capability-sync.js.map +0 -1
- package/dist/core/constraints/checkers/context-doc-sync.d.ts.map +0 -1
- package/dist/core/constraints/checkers/context-doc-sync.js.map +0 -1
- package/dist/core/constraints/checkers/docs-freshness.d.ts.map +0 -1
- package/dist/core/constraints/checkers/docs-freshness.js.map +0 -1
- package/dist/core/constraints/checkers/governance-presence.d.ts.map +0 -1
- package/dist/core/constraints/checkers/governance-presence.js.map +0 -1
- package/dist/core/constraints/checkers/index.d.ts.map +0 -1
- package/dist/core/constraints/checkers/index.js.map +0 -1
- package/dist/core/constraints/checkers/no-completion-without-verification.d.ts.map +0 -1
- package/dist/core/constraints/checkers/no-completion-without-verification.js.map +0 -1
- package/dist/core/constraints/checkers/no-hardcoded-credentials.d.ts.map +0 -1
- package/dist/core/constraints/checkers/no-hardcoded-credentials.js.map +0 -1
- package/dist/core/constraints/checkers/no-test-simplification.d.ts.map +0 -1
- package/dist/core/constraints/checkers/no-test-simplification.js.map +0 -1
- package/dist/core/constraints/checkers/templated/exec.d.ts.map +0 -1
- package/dist/core/constraints/checkers/templated/exec.js.map +0 -1
- package/dist/core/constraints/checkers/templated/file-exists.d.ts.map +0 -1
- package/dist/core/constraints/checkers/templated/file-exists.js.map +0 -1
- package/dist/core/constraints/checkers/templated/glob.d.ts.map +0 -1
- package/dist/core/constraints/checkers/templated/glob.js.map +0 -1
- package/dist/core/constraints/checkers/templated/index.d.ts.map +0 -1
- package/dist/core/constraints/checkers/templated/index.js.map +0 -1
- package/dist/core/constraints/checkers/templated/regex-scan.d.ts.map +0 -1
- package/dist/core/constraints/checkers/templated/regex-scan.js.map +0 -1
- package/dist/core/constraints/checkers/types.d.ts.map +0 -1
- package/dist/core/constraints/checkers/types.js.map +0 -1
- package/dist/core/constraints/construction-sites.d.ts.map +0 -1
- package/dist/core/constraints/construction-sites.js.map +0 -1
- package/dist/core/constraints/context-builder.d.ts.map +0 -1
- package/dist/core/constraints/context-builder.js.map +0 -1
- package/dist/core/constraints/context-reconcile.d.ts.map +0 -1
- package/dist/core/constraints/context-reconcile.js.map +0 -1
- package/dist/core/constraints/definitions/errors.d.ts.map +0 -1
- package/dist/core/constraints/definitions/errors.js.map +0 -1
- package/dist/core/constraints/definitions/warnings.d.ts.map +0 -1
- package/dist/core/constraints/definitions/warnings.js.map +0 -1
- package/dist/core/constraints/definitions.d.ts.map +0 -1
- package/dist/core/constraints/definitions.js.map +0 -1
- package/dist/core/constraints/doc-freshness/runner.d.ts.map +0 -1
- package/dist/core/constraints/doc-freshness/runner.js.map +0 -1
- package/dist/core/constraints/find-constraint.d.ts.map +0 -1
- package/dist/core/constraints/find-constraint.js.map +0 -1
- package/dist/core/constraints/git-evidence.d.ts.map +0 -1
- package/dist/core/constraints/git-evidence.js.map +0 -1
- package/dist/core/constraints/governance-accessors.d.ts.map +0 -1
- package/dist/core/constraints/governance-accessors.js.map +0 -1
- package/dist/core/constraints/index.d.ts.map +0 -1
- package/dist/core/constraints/index.js.map +0 -1
- package/dist/core/constraints/injection-writer.d.ts.map +0 -1
- package/dist/core/constraints/injection-writer.js.map +0 -1
- package/dist/core/constraints/meta.d.ts.map +0 -1
- package/dist/core/constraints/meta.js.map +0 -1
- package/dist/core/constraints/pack-proposal.d.ts.map +0 -1
- package/dist/core/constraints/pack-proposal.js.map +0 -1
- package/dist/core/constraints/run-env.d.ts.map +0 -1
- package/dist/core/constraints/run-env.js.map +0 -1
- package/dist/core/constraints/triggers.d.ts.map +0 -1
- package/dist/core/constraints/triggers.js.map +0 -1
- package/dist/core/constraints/usage-report.d.ts.map +0 -1
- package/dist/core/constraints/usage-report.js.map +0 -1
- package/dist/core/effective-constraints.d.ts.map +0 -1
- package/dist/core/effective-constraints.js.map +0 -1
- package/dist/core/effective-set.d.ts.map +0 -1
- package/dist/core/effective-set.js.map +0 -1
- package/dist/core/index.d.ts +0 -16
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -42
- package/dist/core/index.js.map +0 -1
- package/dist/core/project-config-loader.d.ts.map +0 -1
- package/dist/core/project-config-loader.js.map +0 -1
- package/dist/core/retired-constraints.d.ts.map +0 -1
- package/dist/core/retired-constraints.js.map +0 -1
- package/dist/core/spec/baseline-check.d.ts.map +0 -1
- package/dist/core/spec/baseline-check.js.map +0 -1
- package/dist/core/validators/check-handlers/command.d.ts.map +0 -1
- package/dist/core/validators/check-handlers/command.js.map +0 -1
- package/dist/core/validators/check-handlers/file.d.ts.map +0 -1
- package/dist/core/validators/check-handlers/file.js.map +0 -1
- package/dist/core/validators/check-handlers/http.d.ts.map +0 -1
- package/dist/core/validators/check-handlers/http.js.map +0 -1
- package/dist/core/validators/check-handlers/output.d.ts.map +0 -1
- package/dist/core/validators/check-handlers/output.js.map +0 -1
- package/dist/core/validators/checkpoint.d.ts.map +0 -1
- package/dist/core/validators/checkpoint.js.map +0 -1
- package/dist/core/validators/cso.d.ts.map +0 -1
- package/dist/core/validators/cso.js.map +0 -1
- package/dist/core/validators/index.d.ts.map +0 -1
- package/dist/core/validators/index.js.map +0 -1
- package/dist/core/validators/passes-gate.d.ts.map +0 -1
- package/dist/core/validators/passes-gate.js.map +0 -1
- package/dist/core/validators/test-output.d.ts.map +0 -1
- package/dist/core/validators/test-output.js.map +0 -1
- package/dist/failure/classifier.d.ts.map +0 -1
- package/dist/failure/classifier.js.map +0 -1
- package/dist/failure/error-types.d.ts.map +0 -1
- package/dist/failure/error-types.js.map +0 -1
- package/dist/failure/index.d.ts.map +0 -1
- package/dist/failure/index.js.map +0 -1
- package/dist/failure/recorder.d.ts.map +0 -1
- package/dist/failure/recorder.js.map +0 -1
- package/dist/gates/acceptance.d.ts.map +0 -1
- package/dist/gates/acceptance.js.map +0 -1
- package/dist/gates/command.d.ts.map +0 -1
- package/dist/gates/command.js.map +0 -1
- package/dist/gates/contract.d.ts.map +0 -1
- package/dist/gates/contract.js.map +0 -1
- package/dist/gates/decision.d.ts.map +0 -1
- package/dist/gates/decision.js.map +0 -1
- package/dist/gates/definitions.d.ts.map +0 -1
- package/dist/gates/definitions.js.map +0 -1
- package/dist/gates/performance.d.ts.map +0 -1
- package/dist/gates/performance.js.map +0 -1
- package/dist/gates/registry.d.ts +0 -32
- package/dist/gates/registry.d.ts.map +0 -1
- package/dist/gates/registry.js +0 -91
- package/dist/gates/registry.js.map +0 -1
- package/dist/gates/review.d.ts.map +0 -1
- package/dist/gates/review.js.map +0 -1
- package/dist/gates/security.d.ts.map +0 -1
- package/dist/gates/security.js.map +0 -1
- package/dist/gates/types.d.ts.map +0 -1
- package/dist/gates/types.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/knowledge/audit-dimensions.d.ts.map +0 -1
- package/dist/knowledge/audit-dimensions.js.map +0 -1
- package/dist/knowledge/audit-rules.d.ts.map +0 -1
- package/dist/knowledge/audit-rules.js.map +0 -1
- package/dist/knowledge/audit-scoring.d.ts.map +0 -1
- package/dist/knowledge/audit-scoring.js.map +0 -1
- package/dist/knowledge/audit.d.ts.map +0 -1
- package/dist/knowledge/audit.js.map +0 -1
- package/dist/knowledge/cold-start.d.ts.map +0 -1
- package/dist/knowledge/cold-start.js.map +0 -1
- package/dist/knowledge/flywheel-metrics.d.ts.map +0 -1
- package/dist/knowledge/flywheel-metrics.js.map +0 -1
- package/dist/knowledge/index-generator.d.ts.map +0 -1
- package/dist/knowledge/index-generator.js.map +0 -1
- package/dist/knowledge/index.d.ts.map +0 -1
- package/dist/knowledge/index.js.map +0 -1
- package/dist/knowledge/ingest.d.ts.map +0 -1
- package/dist/knowledge/ingest.js.map +0 -1
- package/dist/knowledge/lifecycle.d.ts.map +0 -1
- package/dist/knowledge/lifecycle.js.map +0 -1
- package/dist/knowledge/query.d.ts.map +0 -1
- package/dist/knowledge/query.js.map +0 -1
- package/dist/knowledge/store.d.ts.map +0 -1
- package/dist/knowledge/store.js.map +0 -1
- package/dist/knowledge/token-estimate.d.ts.map +0 -1
- package/dist/knowledge/token-estimate.js.map +0 -1
- package/dist/knowledge/tree-walker.d.ts.map +0 -1
- package/dist/knowledge/tree-walker.js.map +0 -1
- package/dist/knowledge/types.d.ts.map +0 -1
- package/dist/knowledge/types.js.map +0 -1
- package/dist/monitoring/analyzer-base.d.ts +0 -29
- package/dist/monitoring/analyzer-base.d.ts.map +0 -1
- package/dist/monitoring/analyzer-base.js +0 -48
- package/dist/monitoring/analyzer-base.js.map +0 -1
- package/dist/monitoring/index.d.ts.map +0 -1
- package/dist/monitoring/index.js.map +0 -1
- package/dist/monitoring/trace-analyzer.d.ts.map +0 -1
- package/dist/monitoring/trace-analyzer.js.map +0 -1
- package/dist/monitoring/traces.d.ts.map +0 -1
- package/dist/monitoring/traces.js.map +0 -1
- package/dist/presets/index.d.ts.map +0 -1
- package/dist/presets/index.js.map +0 -1
- package/dist/presets/standard.d.ts.map +0 -1
- package/dist/presets/standard.js.map +0 -1
- package/dist/pretool-use-hook.d.ts.map +0 -1
- package/dist/pretool-use-hook.js.map +0 -1
- package/dist/release/index.d.ts.map +0 -1
- package/dist/release/index.js.map +0 -1
- package/dist/release/integrity.d.ts.map +0 -1
- package/dist/release/integrity.js.map +0 -1
- package/dist/sdd/index-generator.d.ts.map +0 -1
- package/dist/sdd/index-generator.js.map +0 -1
- package/dist/test-setup/jsonl-fake-fs.d.ts +0 -30
- package/dist/test-setup/jsonl-fake-fs.d.ts.map +0 -1
- package/dist/test-setup/jsonl-fake-fs.js +0 -49
- package/dist/test-setup/jsonl-fake-fs.js.map +0 -1
- package/dist/test-setup/mkdtemp-cleanup.d.ts +0 -9
- package/dist/test-setup/mkdtemp-cleanup.d.ts.map +0 -1
- package/dist/test-setup/mkdtemp-cleanup.js +0 -90
- package/dist/test-setup/mkdtemp-cleanup.js.map +0 -1
- package/dist/test-setup/project-fixture.d.ts +0 -48
- package/dist/test-setup/project-fixture.d.ts.map +0 -1
- package/dist/test-setup/project-fixture.js +0 -106
- package/dist/test-setup/project-fixture.js.map +0 -1
- package/dist/types/checkpoint.d.ts.map +0 -1
- package/dist/types/checkpoint.js.map +0 -1
- package/dist/types/command-definition.d.ts.map +0 -1
- package/dist/types/command-definition.js.map +0 -1
- package/dist/types/command-io.d.ts.map +0 -1
- package/dist/types/command-io.js.map +0 -1
- package/dist/types/constraint.d.ts.map +0 -1
- package/dist/types/constraint.js.map +0 -1
- package/dist/types/cso.d.ts.map +0 -1
- package/dist/types/cso.js.map +0 -1
- package/dist/types/failure.d.ts.map +0 -1
- package/dist/types/failure.js.map +0 -1
- package/dist/types/gate.d.ts.map +0 -1
- package/dist/types/gate.js.map +0 -1
- package/dist/types/passes-gate.d.ts.map +0 -1
- package/dist/types/passes-gate.js.map +0 -1
- package/dist/types/project-config.d.ts.map +0 -1
- package/dist/types/project-config.js.map +0 -1
- package/dist/types/spec.d.ts.map +0 -1
- package/dist/types/spec.js.map +0 -1
- package/dist/types/trace.d.ts.map +0 -1
- package/dist/types/trace.js.map +0 -1
- package/dist/utils/attempt.d.ts.map +0 -1
- package/dist/utils/attempt.js.map +0 -1
- package/dist/utils/clip.d.ts.map +0 -1
- package/dist/utils/clip.js.map +0 -1
- package/dist/utils/detect-source-roots.d.ts.map +0 -1
- package/dist/utils/detect-source-roots.js.map +0 -1
- package/dist/utils/diff-parse.d.ts.map +0 -1
- package/dist/utils/diff-parse.js.map +0 -1
- package/dist/utils/exec.d.ts.map +0 -1
- package/dist/utils/exec.js.map +0 -1
- package/dist/utils/file-walk.d.ts.map +0 -1
- package/dist/utils/file-walk.js.map +0 -1
- package/dist/utils/frontmatter.d.ts.map +0 -1
- package/dist/utils/frontmatter.js.map +0 -1
- package/dist/utils/glob-match.d.ts.map +0 -1
- package/dist/utils/glob-match.js.map +0 -1
- package/dist/utils/guards.d.ts.map +0 -1
- package/dist/utils/guards.js.map +0 -1
- package/dist/utils/jsonl.d.ts.map +0 -1
- package/dist/utils/jsonl.js.map +0 -1
- package/dist/utils/log-rotate.d.ts.map +0 -1
- package/dist/utils/log-rotate.js.map +0 -1
- package/dist/utils/numeric-flag.d.ts.map +0 -1
- package/dist/utils/numeric-flag.js.map +0 -1
- package/dist/utils/package-json.d.ts.map +0 -1
- package/dist/utils/package-json.js.map +0 -1
- package/dist/utils/package-version.d.ts.map +0 -1
- package/dist/utils/package-version.js.map +0 -1
- package/dist/utils/yaml-edit.d.ts.map +0 -1
- package/dist/utils/yaml-edit.js.map +0 -1
- package/src/CONTEXT.md +0 -64
- package/src/__tests__/acceptance-gate.test.ts +0 -339
- package/src/__tests__/app-constraints-loader.test.ts +0 -301
- package/src/__tests__/checker-extra.test.ts +0 -303
- package/src/__tests__/checker-primitives-sdk.test.ts +0 -55
- package/src/__tests__/checker.test.ts +0 -118
- package/src/__tests__/checkpoint.test.ts +0 -700
- package/src/__tests__/context-files-resolution.test.ts +0 -131
- package/src/__tests__/contract-gate.test.ts +0 -268
- package/src/__tests__/cso-validator.test.ts +0 -197
- package/src/__tests__/detect-source-roots.test.ts +0 -99
- package/src/__tests__/effective-constraints.test.ts +0 -114
- package/src/__tests__/error-classifier.test.ts +0 -263
- package/src/__tests__/exec-checker-full-chain.test.ts +0 -118
- package/src/__tests__/exec.test.ts +0 -55
- package/src/__tests__/failure-recorder.test.ts +0 -277
- package/src/__tests__/install-precommit-hook.test.ts +0 -61
- package/src/__tests__/iron-laws.test.ts +0 -221
- package/src/__tests__/layering.test.ts +0 -345
- package/src/__tests__/no-studio-references.test.ts +0 -62
- package/src/__tests__/passes-gate-check.test.ts +0 -154
- package/src/__tests__/passes-gate.test.ts +0 -171
- package/src/__tests__/performance-gate.test.ts +0 -54
- package/src/__tests__/pretool-use-hook.test.ts +0 -289
- package/src/__tests__/project-config-loader-extra.test.ts +0 -172
- package/src/__tests__/project-config-loader.test.ts +0 -141
- package/src/__tests__/public-exports.test.ts +0 -368
- package/src/__tests__/public-type-surface.test.ts +0 -305
- package/src/__tests__/public-value-surface.test.ts +0 -147
- package/src/__tests__/retired-constraints.test.ts +0 -99
- package/src/__tests__/review-gate.test.ts +0 -73
- package/src/__tests__/security-gate.test.ts +0 -67
- package/src/__tests__/skip-semantics.test.ts +0 -285
- package/src/__tests__/sub-barrels-explicit.test.ts +0 -87
- package/src/__tests__/test-fixture-hygiene.test.ts +0 -53
- package/src/__tests__/trace-analyzer-extra.test.ts +0 -101
- package/src/__tests__/trace-analyzer.test.ts +0 -182
- package/src/__tests__/trace-collector.test.ts +0 -206
- package/src/__tests__/traces.test.ts +0 -294
- package/src/__tests__/usage-report-public-export.test.ts +0 -21
- package/src/agents/CONTEXT.md +0 -19
- package/src/agents/__tests__/lifecycle.test.ts +0 -97
- package/src/agents/index.ts +0 -10
- package/src/agents/lifecycle.ts +0 -86
- package/src/agents/types.ts +0 -26
- package/src/bootstrap/CONTEXT.md +0 -24
- package/src/bootstrap/__tests__/bootstrap.test.ts +0 -155
- package/src/bootstrap/bootstrap.ts +0 -106
- package/src/bootstrap/index.ts +0 -11
- package/src/cli/__tests__/command-contract.test.ts +0 -188
- package/src/cli/__tests__/gate-command.test.ts +0 -162
- package/src/cli/__tests__/state-io.test.ts +0 -50
- package/src/cli/command-contract.ts +0 -111
- package/src/cli/commands/CONTEXT.md +0 -83
- package/src/cli/commands/__tests__/acceptance.test.ts +0 -186
- package/src/cli/commands/__tests__/bin-exit-mapping.test.ts +0 -122
- package/src/cli/commands/__tests__/check-read-count.test.ts +0 -159
- package/src/cli/commands/__tests__/check-skip-output.test.ts +0 -123
- package/src/cli/commands/__tests__/check.test.ts +0 -600
- package/src/cli/commands/__tests__/command-gate-dead-options.test.ts +0 -62
- package/src/cli/commands/__tests__/command.test.ts +0 -180
- package/src/cli/commands/__tests__/constraints-disable.test.ts +0 -229
- package/src/cli/commands/__tests__/constraints-pack-proposal.test.ts +0 -141
- package/src/cli/commands/__tests__/constraints-reactivate.test.ts +0 -210
- package/src/cli/commands/__tests__/constraints-report-json-flag.test.ts +0 -101
- package/src/cli/commands/__tests__/constraints-report.test.ts +0 -457
- package/src/cli/commands/__tests__/constraints-retire.test.ts +0 -532
- package/src/cli/commands/__tests__/context-syncer.test.ts +0 -141
- package/src/cli/commands/__tests__/contract.test.ts +0 -151
- package/src/cli/commands/__tests__/failure.test.ts +0 -196
- package/src/cli/commands/__tests__/gate-decision.ts +0 -30
- package/src/cli/commands/__tests__/init-dead-options.test.ts +0 -50
- package/src/cli/commands/__tests__/init-governance-io.test.ts +0 -98
- package/src/cli/commands/__tests__/init-ondisk.test.ts +0 -859
- package/src/cli/commands/__tests__/init.test.ts +0 -479
- package/src/cli/commands/__tests__/knowledge-audit-threshold.test.ts +0 -152
- package/src/cli/commands/__tests__/knowledge-flywheel-consistency.test.ts +0 -109
- package/src/cli/commands/__tests__/knowledge-tone-mapping.test.ts +0 -244
- package/src/cli/commands/__tests__/knowledge-view.test.ts +0 -719
- package/src/cli/commands/__tests__/knowledge.test.ts +0 -414
- package/src/cli/commands/__tests__/numeric-flag-assembly.test.ts +0 -369
- package/src/cli/commands/__tests__/passes-gate-dead-options.test.ts +0 -158
- package/src/cli/commands/__tests__/passes-gate.test.ts +0 -334
- package/src/cli/commands/__tests__/performance.test.ts +0 -102
- package/src/cli/commands/__tests__/pre-push-hook.test.ts +0 -181
- package/src/cli/commands/__tests__/project-path-anchoring.test.ts +0 -250
- package/src/cli/commands/__tests__/project-path-convention.test.ts +0 -260
- package/src/cli/commands/__tests__/registry.test.ts +0 -327
- package/src/cli/commands/__tests__/release.test.ts +0 -334
- package/src/cli/commands/__tests__/report-app-constraints.test.ts +0 -67
- package/src/cli/commands/__tests__/report-extra.test.ts +0 -79
- package/src/cli/commands/__tests__/report-false-green.test.ts +0 -50
- package/src/cli/commands/__tests__/report.test.ts +0 -111
- package/src/cli/commands/__tests__/review.test.ts +0 -162
- package/src/cli/commands/__tests__/scaffold.test.ts +0 -495
- package/src/cli/commands/__tests__/security-default-scan.test.ts +0 -75
- package/src/cli/commands/__tests__/security.test.ts +0 -242
- package/src/cli/commands/__tests__/spec-baseline-check.test.ts +0 -236
- package/src/cli/commands/__tests__/spec-baseline-index-cap.test.ts +0 -131
- package/src/cli/commands/__tests__/spec-baseline-read-count.test.ts +0 -325
- package/src/cli/commands/__tests__/spec.test.ts +0 -215
- package/src/cli/commands/__tests__/status-analysis-wiring.test.ts +0 -68
- package/src/cli/commands/__tests__/status-extra.test.ts +0 -163
- package/src/cli/commands/__tests__/status-skipped-lines.test.ts +0 -72
- package/src/cli/commands/__tests__/status.test.ts +0 -235
- package/src/cli/commands/__tests__/sync-docs-agents.test.ts +0 -638
- package/src/cli/commands/__tests__/sync-docs-construction-sites.test.ts +0 -175
- package/src/cli/commands/__tests__/sync-docs-context-drift.test.ts +0 -232
- package/src/cli/commands/__tests__/sync-docs-gate.test.ts +0 -154
- package/src/cli/commands/__tests__/sync-docs-module-order.test.ts +0 -111
- package/src/cli/commands/__tests__/sync-docs-read-count.test.ts +0 -192
- package/src/cli/commands/__tests__/sync-docs-table-layout.test.ts +0 -259
- package/src/cli/commands/__tests__/sync-docs.test.ts +0 -691
- package/src/cli/commands/__tests__/validate.test.ts +0 -195
- package/src/cli/commands/acceptance.ts +0 -118
- package/src/cli/commands/check.ts +0 -291
- package/src/cli/commands/command.ts +0 -106
- package/src/cli/commands/constraints-disable.ts +0 -94
- package/src/cli/commands/constraints-pack-proposal.ts +0 -79
- package/src/cli/commands/constraints-reactivate.ts +0 -112
- package/src/cli/commands/constraints-report.ts +0 -224
- package/src/cli/commands/constraints-retire.ts +0 -309
- package/src/cli/commands/constraints.ts +0 -30
- package/src/cli/commands/contract.ts +0 -187
- package/src/cli/commands/definitions.ts +0 -346
- package/src/cli/commands/failure.ts +0 -137
- package/src/cli/commands/init/ci-platform.ts +0 -66
- package/src/cli/commands/init/ci-wiring.ts +0 -48
- package/src/cli/commands/init/git-hooks.ts +0 -31
- package/src/cli/commands/init/governance.ts +0 -127
- package/src/cli/commands/init/index.ts +0 -156
- package/src/cli/commands/init/output-style.ts +0 -82
- package/src/cli/commands/init/presets.ts +0 -105
- package/src/cli/commands/init/snippets.ts +0 -57
- package/src/cli/commands/knowledge/audit.ts +0 -155
- package/src/cli/commands/knowledge/decay.ts +0 -57
- package/src/cli/commands/knowledge/health.ts +0 -180
- package/src/cli/commands/knowledge/import.ts +0 -82
- package/src/cli/commands/knowledge/index.ts +0 -60
- package/src/cli/commands/knowledge/list.ts +0 -73
- package/src/cli/commands/knowledge/search.ts +0 -92
- package/src/cli/commands/knowledge/shared.ts +0 -13
- package/src/cli/commands/knowledge/snapshot.ts +0 -38
- package/src/cli/commands/knowledge/stats.ts +0 -112
- package/src/cli/commands/knowledge/store-access.ts +0 -40
- package/src/cli/commands/knowledge-view.ts +0 -182
- package/src/cli/commands/passes-gate.ts +0 -167
- package/src/cli/commands/performance.ts +0 -92
- package/src/cli/commands/release.ts +0 -234
- package/src/cli/commands/report.ts +0 -145
- package/src/cli/commands/review.ts +0 -134
- package/src/cli/commands/scaffold-templates.ts +0 -377
- package/src/cli/commands/scaffold.ts +0 -291
- package/src/cli/commands/sdd.ts +0 -46
- package/src/cli/commands/security.ts +0 -240
- package/src/cli/commands/spec/__tests__/validator.test.ts +0 -417
- package/src/cli/commands/spec/validator.ts +0 -353
- package/src/cli/commands/spec-baseline-check.ts +0 -229
- package/src/cli/commands/spec.ts +0 -175
- package/src/cli/commands/status.ts +0 -162
- package/src/cli/commands/sync-docs/__tests__/construction-site-count.test.ts +0 -49
- package/src/cli/commands/sync-docs/__tests__/context-export-surface.test.ts +0 -102
- package/src/cli/commands/sync-docs/__tests__/module-descriptions.test.ts +0 -196
- package/src/cli/commands/sync-docs/agents-syncer.ts +0 -274
- package/src/cli/commands/sync-docs/capabilities-syncer.ts +0 -329
- package/src/cli/commands/sync-docs/compact.ts +0 -36
- package/src/cli/commands/sync-docs/context-syncer.ts +0 -241
- package/src/cli/commands/sync-docs/gate.ts +0 -78
- package/src/cli/commands/sync-docs/head-gate.ts +0 -87
- package/src/cli/commands/sync-docs/index.ts +0 -52
- package/src/cli/commands/sync-docs/main-flow.ts +0 -109
- package/src/cli/commands/sync-docs/preserve-block.ts +0 -59
- package/src/cli/commands/sync-docs/project-reader.ts +0 -211
- package/src/cli/commands/sync-docs/sync-output.ts +0 -218
- package/src/cli/commands/sync-docs/sync-state.ts +0 -327
- package/src/cli/commands/sync-docs/sync-writes.ts +0 -49
- package/src/cli/commands/validate.ts +0 -117
- package/src/cli/gate-command.ts +0 -87
- package/src/cli/state-io.ts +0 -60
- package/src/completion-checkers/CONTEXT.md +0 -25
- package/src/completion-checkers/__tests__/contract-presence.test.ts +0 -44
- package/src/completion-checkers/__tests__/phase-format.test.ts +0 -60
- package/src/completion-checkers/__tests__/tdd-chain.test.ts +0 -99
- package/src/completion-checkers/classify.ts +0 -47
- package/src/completion-checkers/contract-presence.ts +0 -40
- package/src/completion-checkers/glob-match.ts +0 -22
- package/src/completion-checkers/index.ts +0 -28
- package/src/completion-checkers/phase-format.ts +0 -48
- package/src/completion-checkers/tdd-chain.ts +0 -63
- package/src/completion-checkers/types.ts +0 -84
- package/src/context/CONTEXT.md +0 -20
- package/src/context/__tests__/session-manager.test.ts +0 -169
- package/src/context/index.ts +0 -16
- package/src/context/session-manager.ts +0 -185
- package/src/context/types.ts +0 -35
- package/src/core/CONTEXT.md +0 -43
- package/src/core/__tests__/config-files.test.ts +0 -88
- package/src/core/__tests__/constraint-lifecycle.test.ts +0 -255
- package/src/core/__tests__/constraints-meta.test.ts +0 -26
- package/src/core/__tests__/effective-set.test.ts +0 -56
- package/src/core/__tests__/pack-proposal.test.ts +0 -95
- package/src/core/app-constraints-loader.ts +0 -162
- package/src/core/config-files.ts +0 -39
- package/src/core/constraint-lifecycle.ts +0 -426
- package/src/core/constraints/__tests__/capabilities-reconcile.test.ts +0 -200
- package/src/core/constraints/__tests__/capability-counts.test.ts +0 -94
- package/src/core/constraints/__tests__/check-cache.test.ts +0 -98
- package/src/core/constraints/__tests__/collect-constraints.test.ts +0 -116
- package/src/core/constraints/__tests__/construction-sites.test.ts +0 -147
- package/src/core/constraints/__tests__/context-reconcile.test.ts +0 -246
- package/src/core/constraints/__tests__/git-evidence.test.ts +0 -225
- package/src/core/constraints/__tests__/injection-writer.test.ts +0 -178
- package/src/core/constraints/__tests__/run-env.test.ts +0 -262
- package/src/core/constraints/__tests__/trace-injection.test.ts +0 -76
- package/src/core/constraints/__tests__/triggers.test.ts +0 -71
- package/src/core/constraints/__tests__/usage-report.test.ts +0 -181
- package/src/core/constraints/capabilities-parser.ts +0 -213
- package/src/core/constraints/capabilities-reconcile.ts +0 -190
- package/src/core/constraints/check-cache.ts +0 -102
- package/src/core/constraints/checker.ts +0 -408
- package/src/core/constraints/checkers/__tests__/capability-sync.test.ts +0 -292
- package/src/core/constraints/checkers/__tests__/check-outcome.test.ts +0 -172
- package/src/core/constraints/checkers/__tests__/context-doc-sync.test.ts +0 -90
- package/src/core/constraints/checkers/__tests__/docs-freshness-degraded.test.ts +0 -91
- package/src/core/constraints/checkers/__tests__/docs-freshness.test.ts +0 -129
- package/src/core/constraints/checkers/__tests__/exec-checker.test.ts +0 -99
- package/src/core/constraints/checkers/__tests__/fixtures/public-repo-sanitization.mjs +0 -40
- package/src/core/constraints/checkers/__tests__/governance-presence.test.ts +0 -182
- package/src/core/constraints/checkers/__tests__/input-contract.test.ts +0 -111
- package/src/core/constraints/checkers/__tests__/no-completion-without-verification.test.ts +0 -228
- package/src/core/constraints/checkers/__tests__/no-hardcoded-credentials.test.ts +0 -232
- package/src/core/constraints/checkers/__tests__/no-test-simplification.test.ts +0 -182
- package/src/core/constraints/checkers/__tests__/templated-checkers.test.ts +0 -181
- package/src/core/constraints/checkers/__tests__/templates-registry.test.ts +0 -79
- package/src/core/constraints/checkers/__tests__/three-state-consistency.test.ts +0 -158
- package/src/core/constraints/checkers/capability-sync.ts +0 -134
- package/src/core/constraints/checkers/context-doc-sync.ts +0 -42
- package/src/core/constraints/checkers/docs-freshness.ts +0 -156
- package/src/core/constraints/checkers/governance-presence.ts +0 -60
- package/src/core/constraints/checkers/index.ts +0 -142
- package/src/core/constraints/checkers/no-completion-without-verification.ts +0 -141
- package/src/core/constraints/checkers/no-hardcoded-credentials.ts +0 -185
- package/src/core/constraints/checkers/no-test-simplification.ts +0 -118
- package/src/core/constraints/checkers/templated/exec.ts +0 -133
- package/src/core/constraints/checkers/templated/file-exists.ts +0 -75
- package/src/core/constraints/checkers/templated/glob.ts +0 -13
- package/src/core/constraints/checkers/templated/index.ts +0 -13
- package/src/core/constraints/checkers/templated/regex-scan.ts +0 -113
- package/src/core/constraints/checkers/types.ts +0 -239
- package/src/core/constraints/construction-sites.ts +0 -95
- package/src/core/constraints/context-builder.ts +0 -119
- package/src/core/constraints/context-reconcile.ts +0 -200
- package/src/core/constraints/definitions/errors.ts +0 -69
- package/src/core/constraints/definitions/warnings.ts +0 -108
- package/src/core/constraints/definitions.ts +0 -59
- package/src/core/constraints/doc-freshness/__tests__/runner.test.ts +0 -576
- package/src/core/constraints/doc-freshness/runner.ts +0 -471
- package/src/core/constraints/find-constraint.ts +0 -24
- package/src/core/constraints/git-evidence.ts +0 -138
- package/src/core/constraints/governance-accessors.ts +0 -74
- package/src/core/constraints/index.ts +0 -52
- package/src/core/constraints/injection-writer.ts +0 -164
- package/src/core/constraints/meta.ts +0 -40
- package/src/core/constraints/pack-proposal.ts +0 -168
- package/src/core/constraints/run-env.ts +0 -151
- package/src/core/constraints/triggers.ts +0 -38
- package/src/core/constraints/usage-report.ts +0 -361
- package/src/core/effective-constraints.ts +0 -93
- package/src/core/effective-set.ts +0 -40
- package/src/core/index.ts +0 -80
- package/src/core/project-config-loader.ts +0 -163
- package/src/core/retired-constraints.ts +0 -77
- package/src/core/spec/baseline-check.ts +0 -300
- package/src/core/validators/__tests__/command-success-output.test.ts +0 -56
- package/src/core/validators/__tests__/http-retry-sleep.test.ts +0 -231
- package/src/core/validators/__tests__/passes-gate-counts.test.ts +0 -52
- package/src/core/validators/__tests__/passes-gate.test.ts +0 -70
- package/src/core/validators/__tests__/test-output.test.ts +0 -372
- package/src/core/validators/check-handlers/command.ts +0 -101
- package/src/core/validators/check-handlers/file.ts +0 -147
- package/src/core/validators/check-handlers/http.ts +0 -101
- package/src/core/validators/check-handlers/output.ts +0 -166
- package/src/core/validators/checkpoint.ts +0 -141
- package/src/core/validators/cso.ts +0 -113
- package/src/core/validators/index.ts +0 -23
- package/src/core/validators/passes-gate.ts +0 -292
- package/src/core/validators/test-output.ts +0 -128
- package/src/failure/CONTEXT.md +0 -27
- package/src/failure/__tests__/recorder.test.ts +0 -169
- package/src/failure/classifier.ts +0 -116
- package/src/failure/error-types.ts +0 -122
- package/src/failure/index.ts +0 -37
- package/src/failure/recorder.ts +0 -138
- package/src/gates/CONTEXT.md +0 -47
- package/src/gates/__tests__/acceptance-types-single-source.test.ts +0 -71
- package/src/gates/__tests__/acceptance.test.ts +0 -498
- package/src/gates/__tests__/command-single-predicate.test.ts +0 -90
- package/src/gates/__tests__/command.test.ts +0 -239
- package/src/gates/__tests__/contract.test.ts +0 -73
- package/src/gates/__tests__/decision.test.ts +0 -35
- package/src/gates/__tests__/gate-interface.test.ts +0 -180
- package/src/gates/__tests__/performance.test.ts +0 -254
- package/src/gates/__tests__/registry.test.ts +0 -87
- package/src/gates/__tests__/review.test.ts +0 -278
- package/src/gates/__tests__/security-default-scan.test.ts +0 -100
- package/src/gates/__tests__/security.test.ts +0 -288
- package/src/gates/__tests__/test-verdict-consistency.test.ts +0 -140
- package/src/gates/acceptance.ts +0 -494
- package/src/gates/command.ts +0 -414
- package/src/gates/contract.ts +0 -215
- package/src/gates/decision.ts +0 -27
- package/src/gates/definitions.ts +0 -186
- package/src/gates/performance.ts +0 -243
- package/src/gates/registry.ts +0 -108
- package/src/gates/review.ts +0 -196
- package/src/gates/security.ts +0 -211
- package/src/gates/types.ts +0 -208
- package/src/index.ts +0 -368
- package/src/knowledge/CONTEXT.md +0 -63
- package/src/knowledge/__tests__/audit-labels.test.ts +0 -47
- package/src/knowledge/__tests__/audit-scoring.test.ts +0 -232
- package/src/knowledge/__tests__/audit-write-count.test.ts +0 -131
- package/src/knowledge/__tests__/audit.test.ts +0 -737
- package/src/knowledge/__tests__/flywheel-metrics.test.ts +0 -135
- package/src/knowledge/__tests__/import.test.ts +0 -420
- package/src/knowledge/__tests__/index-generator.test.ts +0 -388
- package/src/knowledge/__tests__/ingest-validate-entry.test.ts +0 -235
- package/src/knowledge/__tests__/ingest.test.ts +0 -529
- package/src/knowledge/__tests__/lifecycle.test.ts +0 -1040
- package/src/knowledge/__tests__/query.test.ts +0 -336
- package/src/knowledge/__tests__/store.test.ts +0 -863
- package/src/knowledge/__tests__/token-estimate.test.ts +0 -54
- package/src/knowledge/__tests__/tree-walker.test.ts +0 -124
- package/src/knowledge/audit-dimensions.ts +0 -190
- package/src/knowledge/audit-rules.ts +0 -339
- package/src/knowledge/audit-scoring.ts +0 -101
- package/src/knowledge/audit.ts +0 -149
- package/src/knowledge/cold-start.ts +0 -454
- package/src/knowledge/flywheel-metrics.ts +0 -71
- package/src/knowledge/index-generator.ts +0 -230
- package/src/knowledge/index.ts +0 -40
- package/src/knowledge/ingest.ts +0 -412
- package/src/knowledge/lifecycle.ts +0 -457
- package/src/knowledge/query.ts +0 -253
- package/src/knowledge/store.ts +0 -493
- package/src/knowledge/token-estimate.ts +0 -27
- package/src/knowledge/tree-walker.ts +0 -29
- package/src/knowledge/types.ts +0 -169
- package/src/monitoring/CONTEXT.md +0 -28
- package/src/monitoring/__tests__/prune-trace-logs.test.ts +0 -76
- package/src/monitoring/__tests__/skipped-lines-report.test.ts +0 -165
- package/src/monitoring/__tests__/trace-file-anchoring.test.ts +0 -80
- package/src/monitoring/__tests__/traces.test.ts +0 -195
- package/src/monitoring/analyzer-base.ts +0 -45
- package/src/monitoring/index.ts +0 -10
- package/src/monitoring/trace-analyzer.ts +0 -236
- package/src/monitoring/traces.ts +0 -316
- package/src/presets/__tests__/standard.test.ts +0 -65
- package/src/presets/index.ts +0 -12
- package/src/presets/standard.ts +0 -71
- package/src/pretool-use-hook.ts +0 -167
- package/src/release/CONTEXT.md +0 -24
- package/src/release/__tests__/barrel.test.ts +0 -60
- package/src/release/__tests__/integrity.test.ts +0 -162
- package/src/release/index.ts +0 -2
- package/src/release/integrity.ts +0 -138
- package/src/sdd/__tests__/index-generator.test.ts +0 -221
- package/src/sdd/index-generator.ts +0 -113
- package/src/test-setup/__tests__/jsonl-fake-fs.test.ts +0 -98
- package/src/test-setup/__tests__/mkdtemp-cleanup.test.ts +0 -45
- package/src/test-setup/__tests__/project-fixture.test.ts +0 -178
- package/src/test-setup/jsonl-fake-fs.ts +0 -59
- package/src/test-setup/mkdtemp-cleanup.ts +0 -83
- package/src/test-setup/project-fixture.ts +0 -87
- package/src/types/__tests__/types.test.ts +0 -53
- package/src/types/checkpoint.ts +0 -180
- package/src/types/command-definition.ts +0 -85
- package/src/types/command-io.ts +0 -14
- package/src/types/constraint.ts +0 -247
- package/src/types/cso.ts +0 -37
- package/src/types/failure.ts +0 -67
- package/src/types/gate.ts +0 -77
- package/src/types/passes-gate.ts +0 -130
- package/src/types/project-config.ts +0 -251
- package/src/types/spec.ts +0 -87
- package/src/types/trace.ts +0 -233
- package/src/utils/__tests__/attempt.test.ts +0 -94
- package/src/utils/__tests__/file-walk.test.ts +0 -54
- package/src/utils/__tests__/frontmatter.test.ts +0 -206
- package/src/utils/__tests__/glob-match.test.ts +0 -52
- package/src/utils/__tests__/jsonl-bounded-read.test.ts +0 -106
- package/src/utils/__tests__/jsonl-skip-disposition.test.ts +0 -174
- package/src/utils/__tests__/jsonl.test.ts +0 -234
- package/src/utils/__tests__/numeric-flag.test.ts +0 -80
- package/src/utils/__tests__/package-json.test.ts +0 -58
- package/src/utils/__tests__/package-version.test.ts +0 -116
- package/src/utils/__tests__/yaml-edit.test.ts +0 -62
- package/src/utils/attempt.ts +0 -35
- package/src/utils/clip.ts +0 -12
- package/src/utils/detect-source-roots.ts +0 -90
- package/src/utils/diff-parse.ts +0 -80
- package/src/utils/exec.ts +0 -16
- package/src/utils/file-walk.ts +0 -103
- package/src/utils/frontmatter.ts +0 -121
- package/src/utils/glob-match.ts +0 -41
- package/src/utils/guards.ts +0 -8
- package/src/utils/jsonl.ts +0 -276
- package/src/utils/log-rotate.ts +0 -43
- package/src/utils/numeric-flag.ts +0 -86
- package/src/utils/package-json.ts +0 -61
- package/src/utils/package-version.ts +0 -25
- package/src/utils/yaml-edit.ts +0 -67
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 脚手架模板数据(harness#132)
|
|
3
|
-
*
|
|
4
|
-
* 受管文件的正文正本,纯数据 + 纯渲染,零 IO、零上色——落盘语义与文案在
|
|
5
|
-
* `scaffold.ts` 的 plan 里,本模块只回答「这个文件的内容是什么」。
|
|
6
|
-
*
|
|
7
|
-
* 刻意留在代码内而不落 `templates/` 目录:`templates/` 无运行时消费者
|
|
8
|
-
* (harness 自身不读它),发布完整性清单(`release/integrity.ts`)也不覆盖它。
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import * as path from 'path';
|
|
12
|
-
import * as yaml from 'js-yaml';
|
|
13
|
-
import type { Checkpoint } from '../../types/checkpoint';
|
|
14
|
-
import type { CiPlatform } from '../../types/project-config';
|
|
15
|
-
|
|
16
|
-
/** Git pre-commit 片段(#103:打印片段与落盘 hook 的唯一正本) */
|
|
17
|
-
export const PRE_COMMIT_SNIPPET = `
|
|
18
|
-
echo "🔍 Running harness checks..."
|
|
19
|
-
|
|
20
|
-
# Harness 约束检查
|
|
21
|
-
npx @dommaker/harness check --staged
|
|
22
|
-
if [ $? -ne 0 ]; then
|
|
23
|
-
echo "❌ Iron law check failed"
|
|
24
|
-
exit 1
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
echo "✅ All checks passed"
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
/** 落盘的 pre-commit hook = shebang + 说明行 + 共享片段 */
|
|
31
|
-
export function renderPreCommitHook(): string {
|
|
32
|
-
return `#!/bin/sh
|
|
33
|
-
# Harness pre-commit hook
|
|
34
|
-
${PRE_COMMIT_SNIPPET}`;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Git pre-push 片段(harness#144;#103:打印片段与落盘 hook 的唯一正本)
|
|
39
|
-
*
|
|
40
|
-
* 三道决定都写在这段正文里,不再由代码补:
|
|
41
|
-
* - **整仓全量**:`check` 不带 `--staged`,加一道 `validate`——它拦的是
|
|
42
|
-
* `git commit --no-verify` 绕过 pre-commit 的内容,重复是设计使然;
|
|
43
|
-
* - **不做增量**:不解析 pre-push 从 stdin 收到的 `<local_ref> <local_oid>
|
|
44
|
-
* <remote_ref> <remote_oid>` 清单,无论推什么整仓过一遍;子进程也不给它读;
|
|
45
|
-
* - **不内建逃生机制**:没有环境变量开关、没有超时、没有「慢则降级」,
|
|
46
|
-
* 唯一的口子是 git 原生 `git push --no-verify`。
|
|
47
|
-
*/
|
|
48
|
-
export const PRE_PUSH_SNIPPET = `
|
|
49
|
-
echo "🔍 Running harness pre-push checks (whole repo)..."
|
|
50
|
-
|
|
51
|
-
# 分工:pre-commit 查暂存的(增量、快反馈),pre-push 查整仓的(全量、兜底)。
|
|
52
|
-
# 同一次改动跑两遍是设计使然——这道拦的是 git commit --no-verify 绕出去的内容。
|
|
53
|
-
# 本地 hook 只是自检与提醒,真正的门禁在服务端 CI;逃生口只有 git 原生 push --no-verify。
|
|
54
|
-
# 不解析 pre-push 从 stdin 收到的 ref 清单,子进程一律不给它读(< /dev/null)。
|
|
55
|
-
npx @dommaker/harness check < /dev/null
|
|
56
|
-
if [ $? -ne 0 ]; then
|
|
57
|
-
echo "❌ Iron law check failed"
|
|
58
|
-
exit 1
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
npx @dommaker/harness validate < /dev/null
|
|
62
|
-
if [ $? -ne 0 ]; then
|
|
63
|
-
echo "❌ Validate failed"
|
|
64
|
-
exit 1
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
echo "✅ All pre-push checks passed"
|
|
68
|
-
`;
|
|
69
|
-
|
|
70
|
-
/** 落盘的 pre-push hook = shebang + 说明行 + 共享片段 */
|
|
71
|
-
export function renderPrePushHook(): string {
|
|
72
|
-
return `#!/bin/sh
|
|
73
|
-
# Harness pre-push hook
|
|
74
|
-
${PRE_PUSH_SNIPPET}`;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// ── GitLab CI(harness#143):与 GH 版对仗的接线形状 ──────────────────────
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* GitLab 任务的触发条件(决议 ⑥:用 `rules:` 不用过时的 `only:`)
|
|
81
|
-
*
|
|
82
|
-
* MR 事件 + main/master 分支 push,与 GH 版 `on:` 段一一对应。三个任务各自带一份
|
|
83
|
-
* ——GitLab 的 `default:` 不支持 `rules`,自建实例版本参差,不赌语法糖。
|
|
84
|
-
*/
|
|
85
|
-
const GITLAB_RULES = ` rules:
|
|
86
|
-
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
87
|
-
- if: $CI_COMMIT_BRANCH == "main"
|
|
88
|
-
- if: $CI_COMMIT_BRANCH == "master"
|
|
89
|
-
`;
|
|
90
|
-
|
|
91
|
-
/** `.gitlab-ci.yml` 文件头:harness 只拥有其下的 `harness-*` 任务 */
|
|
92
|
-
const GITLAB_CI_HEADER = `# 由 harness init 生成 —— 以下 harness-* 任务是 harness 的 CI 接线
|
|
93
|
-
# 门禁真正生效还需在 GitLab 侧开分支保护:pipeline 成功才允许合并
|
|
94
|
-
|
|
95
|
-
image: node:20
|
|
96
|
-
|
|
97
|
-
stages:
|
|
98
|
-
- test
|
|
99
|
-
|
|
100
|
-
`;
|
|
101
|
-
|
|
102
|
-
/** GitLab harness-check 任务(`--print-snippets` 打印的 job 片段即此份) */
|
|
103
|
-
export const GITLAB_CI_SNIPPET = `harness-check:
|
|
104
|
-
stage: test
|
|
105
|
-
script:
|
|
106
|
-
- npm ci
|
|
107
|
-
- npx @dommaker/harness check
|
|
108
|
-
- npx @dommaker/harness validate
|
|
109
|
-
- npx @dommaker/harness passes-gate
|
|
110
|
-
${GITLAB_RULES}`;
|
|
111
|
-
|
|
112
|
-
/** harness 拥有的 GitLab 任务全集(治理档在场时含治理任务)——落盘正文与冲突片段共用 */
|
|
113
|
-
export function renderGitLabCiJobs(governanceLevel?: string): string {
|
|
114
|
-
return governanceLevel
|
|
115
|
-
? `${GITLAB_CI_SNIPPET}\n${renderGovernanceWorkflow(governanceLevel, 'gitlab')}`
|
|
116
|
-
: GITLAB_CI_SNIPPET;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/** `.gitlab-ci.yml` 落盘全文正本(= 文件头 + harness 拥有的任务) */
|
|
120
|
-
export function renderGitLabCiFile(governanceLevel?: string): string {
|
|
121
|
-
return `${GITLAB_CI_HEADER}${renderGitLabCiJobs(governanceLevel)}`;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/** harness-check.yml 全文(落盘正文,冲突时打印的也是这一份) */
|
|
125
|
-
export const HARNESS_CHECK_WORKFLOW = `name: Harness Check
|
|
126
|
-
|
|
127
|
-
on:
|
|
128
|
-
push:
|
|
129
|
-
branches: [main, master]
|
|
130
|
-
pull_request:
|
|
131
|
-
branches: [main, master]
|
|
132
|
-
|
|
133
|
-
jobs:
|
|
134
|
-
harness-check:
|
|
135
|
-
runs-on: ubuntu-latest
|
|
136
|
-
|
|
137
|
-
steps:
|
|
138
|
-
- uses: actions/checkout@v4
|
|
139
|
-
|
|
140
|
-
- name: Setup Node.js
|
|
141
|
-
uses: actions/setup-node@v4
|
|
142
|
-
with:
|
|
143
|
-
node-version: '20'
|
|
144
|
-
|
|
145
|
-
- name: Install dependencies
|
|
146
|
-
run: npm ci
|
|
147
|
-
|
|
148
|
-
- name: Run harness check
|
|
149
|
-
run: npx @dommaker/harness check
|
|
150
|
-
|
|
151
|
-
- name: Run harness validate
|
|
152
|
-
run: npx @dommaker/harness validate
|
|
153
|
-
|
|
154
|
-
- name: Run harness passes-gate
|
|
155
|
-
run: npx @dommaker/harness passes-gate
|
|
156
|
-
`;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* GitHub Actions job 片段(`init --print-snippets` 的片段视图,harness#153)
|
|
160
|
-
*
|
|
161
|
-
* 由上面的落盘正本裁出 `jobs:` 段之后的一切,**不是第二份手抄文本**——它曾独立存在并
|
|
162
|
-
* 少掉 `validate` / `passes-gate` 两道门禁,照抄的用户拿到比同版本 `harness init` 弱一半
|
|
163
|
-
* 的 CI(#103 判据的第三种形态)。形状与 GitLab 侧对仗:打印的是正本的 job 段。
|
|
164
|
-
*/
|
|
165
|
-
export const GITHUB_ACTIONS_SNIPPET = HARNESS_CHECK_WORKFLOW.slice(
|
|
166
|
-
HARNESS_CHECK_WORKFLOW.indexOf(' harness-check:'),
|
|
167
|
-
);
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* 治理 CI 面正文
|
|
171
|
-
*
|
|
172
|
-
* `minimal` 档不带 docs 新鲜度检查(其余档位带,且失败不阻断)。平台只改变接线形状,
|
|
173
|
-
* 三条命令与档位语义一致(harness#143):GitLab 侧的「失败不阻断」= `allow_failure: true`,
|
|
174
|
-
* 且因每个任务都是全新容器,docs 检查单列一个任务而非 GH 的一个 step。
|
|
175
|
-
*/
|
|
176
|
-
export function renderGovernanceWorkflow(level: string, platform: CiPlatform): string {
|
|
177
|
-
if (platform === 'gitlab') {
|
|
178
|
-
const docsJob = level === 'minimal'
|
|
179
|
-
? ''
|
|
180
|
-
: `
|
|
181
|
-
harness-docs-freshness:
|
|
182
|
-
stage: test
|
|
183
|
-
script:
|
|
184
|
-
- npm ci
|
|
185
|
-
- npx @dommaker/harness sync-docs --check
|
|
186
|
-
${GITLAB_RULES} allow_failure: true
|
|
187
|
-
`;
|
|
188
|
-
return `harness-governance:
|
|
189
|
-
stage: test
|
|
190
|
-
script:
|
|
191
|
-
- npm ci
|
|
192
|
-
- npx @dommaker/harness check
|
|
193
|
-
- npx @dommaker/harness passes-gate
|
|
194
|
-
${GITLAB_RULES}${docsJob}`;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
const docsCheckStep = level !== 'minimal'
|
|
198
|
-
? `
|
|
199
|
-
- name: Check docs freshness
|
|
200
|
-
run: npx @dommaker/harness sync-docs --check
|
|
201
|
-
continue-on-error: true`
|
|
202
|
-
: '';
|
|
203
|
-
|
|
204
|
-
return `name: Harness Governance
|
|
205
|
-
|
|
206
|
-
on:
|
|
207
|
-
push:
|
|
208
|
-
branches: [main, master]
|
|
209
|
-
pull_request:
|
|
210
|
-
branches: [main, master]
|
|
211
|
-
|
|
212
|
-
jobs:
|
|
213
|
-
governance:
|
|
214
|
-
runs-on: ubuntu-latest
|
|
215
|
-
|
|
216
|
-
steps:
|
|
217
|
-
- uses: actions/checkout@v4
|
|
218
|
-
|
|
219
|
-
- name: Setup Node.js
|
|
220
|
-
uses: actions/setup-node@v4
|
|
221
|
-
with:
|
|
222
|
-
node-version: '20'
|
|
223
|
-
|
|
224
|
-
- name: Install dependencies
|
|
225
|
-
run: npm ci
|
|
226
|
-
|
|
227
|
-
- name: Constraint check
|
|
228
|
-
run: npx @dommaker/harness check
|
|
229
|
-
|
|
230
|
-
- name: Quality gate
|
|
231
|
-
run: npx @dommaker/harness passes-gate
|
|
232
|
-
${docsCheckStep}
|
|
233
|
-
`;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/** CHANGELOG.md 正文(`format` 来自治理配置的 changelog.format) */
|
|
237
|
-
export function renderChangelog(format: string): string {
|
|
238
|
-
return format === 'keep-a-changelog'
|
|
239
|
-
? `# Changelog
|
|
240
|
-
|
|
241
|
-
All notable changes to this project will be documented in this file.
|
|
242
|
-
|
|
243
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
244
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
245
|
-
|
|
246
|
-
## [Unreleased]
|
|
247
|
-
|
|
248
|
-
### Added
|
|
249
|
-
- Initial project setup with harness governance
|
|
250
|
-
|
|
251
|
-
---
|
|
252
|
-
|
|
253
|
-
> 此文件可由 \`harness sync-docs\` 辅助维护
|
|
254
|
-
`
|
|
255
|
-
: `# Changelog
|
|
256
|
-
|
|
257
|
-
## [Unreleased]
|
|
258
|
-
|
|
259
|
-
- Initial project setup with harness governance
|
|
260
|
-
|
|
261
|
-
---
|
|
262
|
-
|
|
263
|
-
> 此文件可由 \`harness sync-docs\` 辅助维护
|
|
264
|
-
`;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/** 目录 CONTEXT.md 骨架正文(`dir` 是相对项目根的目录路径) */
|
|
268
|
-
export function renderContextDoc(dir: string): string {
|
|
269
|
-
const dirName = path.basename(dir);
|
|
270
|
-
return `# ${dirName}
|
|
271
|
-
|
|
272
|
-
> 此文件描述 ${dir} 目录的职责和上下文
|
|
273
|
-
> 请阅读本目录的源代码,然后填写以下各节。
|
|
274
|
-
> 如果使用 AI 编码助手,将本文件内容作为 prompt 请求它分析并填写。
|
|
275
|
-
|
|
276
|
-
## 职责
|
|
277
|
-
|
|
278
|
-
<!-- 本目录的核心职责是什么 -->
|
|
279
|
-
|
|
280
|
-
## 核心导出
|
|
281
|
-
|
|
282
|
-
<!-- 本目录对外暴露的主要模块/函数 -->
|
|
283
|
-
|
|
284
|
-
## 依赖关系
|
|
285
|
-
|
|
286
|
-
<!-- 本目录依赖哪些其他模块,谁依赖本目录 -->
|
|
287
|
-
|
|
288
|
-
## 注意事项
|
|
289
|
-
|
|
290
|
-
<!-- 开发时需要注意的约束或约定 -->
|
|
291
|
-
`;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* 默认检查点列表
|
|
296
|
-
*
|
|
297
|
-
* 注:no-console 检查点已移除(工单 23/24)——CLI 产品 src/ 必然有合法 console 输出,
|
|
298
|
-
* 且旧配置 expected:'' 语义恒错;output_* 族修复为真正执行 config.command 后该检查会恒失败。
|
|
299
|
-
*/
|
|
300
|
-
export const DEFAULT_CHECKPOINTS: Checkpoint[] = [
|
|
301
|
-
{
|
|
302
|
-
id: 'build-success',
|
|
303
|
-
name: '构建成功',
|
|
304
|
-
checks: [
|
|
305
|
-
{
|
|
306
|
-
id: 'build-command',
|
|
307
|
-
type: 'command_success',
|
|
308
|
-
config: { command: 'npm run build' },
|
|
309
|
-
message: '构建命令必须成功执行',
|
|
310
|
-
},
|
|
311
|
-
],
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
id: 'test-pass',
|
|
315
|
-
name: '测试通过',
|
|
316
|
-
checks: [
|
|
317
|
-
{
|
|
318
|
-
id: 'test-command',
|
|
319
|
-
type: 'command_success',
|
|
320
|
-
config: { command: 'npm test' },
|
|
321
|
-
message: '测试命令必须成功执行',
|
|
322
|
-
},
|
|
323
|
-
],
|
|
324
|
-
},
|
|
325
|
-
];
|
|
326
|
-
|
|
327
|
-
/** 检查点文件的相对路径约定(validate 的缺省读取面与 init 的落盘面同一处) */
|
|
328
|
-
export const DEFAULT_CHECKPOINT_FILE = '.harness/checkpoints.yml';
|
|
329
|
-
|
|
330
|
-
/** checkpoints.yml 正文 */
|
|
331
|
-
export function renderCheckpoints(): string {
|
|
332
|
-
return yaml.dump({ checkpoints: DEFAULT_CHECKPOINTS }, { indent: 2 });
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
/** 默认 Resolutions(RKB — 约束 → 已知解法映射) */
|
|
336
|
-
const DEFAULT_RESOLUTIONS = {
|
|
337
|
-
no_completion_without_verification: {
|
|
338
|
-
title: 'commit message 缺少验证证据',
|
|
339
|
-
fix: '在 commit message body 中附上验证输出:\n`npx @dommaker/harness check --staged` | `npx @dommaker/harness validate` | `npm test -- --coverage`\n确认全部通过后重新 commit。',
|
|
340
|
-
},
|
|
341
|
-
capability_sync: {
|
|
342
|
-
title: '缺少 CAPABILITIES.md',
|
|
343
|
-
fix: '在项目根目录创建 CAPABILITIES.md,列出所有模块能力清单。运行 `npx @dommaker/harness sync-docs` 可自动生成模板。',
|
|
344
|
-
},
|
|
345
|
-
context_doc_sync: {
|
|
346
|
-
title: '关键目录缺少 CONTEXT.md',
|
|
347
|
-
fix: '在 required_dirs 目录下创建 CONTEXT.md。运行 `npx @dommaker/harness sync-docs` 可自动生成模板。',
|
|
348
|
-
},
|
|
349
|
-
};
|
|
350
|
-
|
|
351
|
-
/** resolutions.json 正文 */
|
|
352
|
-
export function renderResolutions(): string {
|
|
353
|
-
return JSON.stringify(DEFAULT_RESOLUTIONS, null, 2);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
// ── CLAUDE.md Output Style 段(ADR-0001:init 只写标记区间内,标记外只读)─────
|
|
357
|
-
|
|
358
|
-
/** Output Style 段标记(区间外只读;replaceStandaloneRange 的 begin/end) */
|
|
359
|
-
export const OUTPUT_STYLE_START = '<!-- HARNESS_OUTPUT_STYLE_START -->';
|
|
360
|
-
export const OUTPUT_STYLE_END = '<!-- HARNESS_OUTPUT_STYLE_END -->';
|
|
361
|
-
|
|
362
|
-
/** Output Style 段正文(逐字节冻结面:init 落盘与幂等替换的唯一正本) */
|
|
363
|
-
export const OUTPUT_STYLE_BODY = [
|
|
364
|
-
'Terse like caveman. Technical substance exact. Only fluff die.',
|
|
365
|
-
'Drop: articles, filler (just/really/basically), pleasantries (sure/certainly/happy to), hedging.',
|
|
366
|
-
'Fragments OK. Short synonyms. Code blocks unchanged. Error messages quoted exact.',
|
|
367
|
-
'Pattern: [thing] [action] [reason]. [next step].',
|
|
368
|
-
'No sycophantic openers/closing fluff. No emojis or em-dashes.',
|
|
369
|
-
'Read existing files before writing. Don\'t re-read unless changed.',
|
|
370
|
-
'Skip files over 100KB unless required.',
|
|
371
|
-
'Don\'t guess APIs, versions, flags, commit SHAs, or package names. Verify before asserting.',
|
|
372
|
-
].join('\n');
|
|
373
|
-
|
|
374
|
-
/** 渲染带标记的 Output Style 段(含 `## Output Style` 标题,以换行结尾) */
|
|
375
|
-
export function renderOutputStyleSection(): string {
|
|
376
|
-
return `${OUTPUT_STYLE_START}\n## Output Style\n\n${OUTPUT_STYLE_BODY}\n${OUTPUT_STYLE_END}\n`;
|
|
377
|
-
}
|
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 脚手架落盘模块(harness#132,架构评审候选3)
|
|
3
|
-
*
|
|
4
|
-
* 一个决策只写一次:受管文件(managed file — harness 模板拥有正本、用户也可能
|
|
5
|
-
* 持有的落盘文件)在不在场、在场时算跳过还是算请用户手工合并、要不要建父目录、
|
|
6
|
-
* 打什么颜色的哪句话,全部收在本模块。此前这段判定复印在 init 6 处 + validate 2 处。
|
|
7
|
-
*
|
|
8
|
-
* 三态:
|
|
9
|
-
* - `created` 不在场 → 落盘模板正文
|
|
10
|
-
* - `exists` 在场 → 灰字告知跳过(**不细分内容是否等于模板**,内容比较是独立特性)
|
|
11
|
-
* - `manual` 在场 → 打印片段请用户手工合并
|
|
12
|
-
*
|
|
13
|
-
* 纪律:本模块不持有覆盖/跳过策略——「哪些文件要落」由命令层翻成 plan 列表传进来,
|
|
14
|
-
* 本模块只见 plan;模板正文住在 `scaffold-templates.ts`。
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import * as path from 'path';
|
|
18
|
-
import chalk from 'chalk';
|
|
19
|
-
import * as nodeFs from 'fs/promises';
|
|
20
|
-
import type { CiPlatform } from '../../types/project-config';
|
|
21
|
-
import { log, type CommandIO } from '../command-contract';
|
|
22
|
-
import {
|
|
23
|
-
DEFAULT_CHECKPOINT_FILE,
|
|
24
|
-
HARNESS_CHECK_WORKFLOW,
|
|
25
|
-
PRE_COMMIT_SNIPPET,
|
|
26
|
-
PRE_PUSH_SNIPPET,
|
|
27
|
-
renderChangelog,
|
|
28
|
-
renderCheckpoints,
|
|
29
|
-
renderContextDoc,
|
|
30
|
-
renderGitLabCiFile,
|
|
31
|
-
renderGitLabCiJobs,
|
|
32
|
-
renderGovernanceWorkflow,
|
|
33
|
-
renderPreCommitHook,
|
|
34
|
-
renderPrePushHook,
|
|
35
|
-
renderResolutions,
|
|
36
|
-
} from './scaffold-templates';
|
|
37
|
-
|
|
38
|
-
/** 三态判定结果 */
|
|
39
|
-
export type ScaffoldOutcome = 'created' | 'exists' | 'manual';
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* 落盘注入面(缺省 node fs;测试注入内存替身即可断言「真写出了什么内容」)
|
|
43
|
-
*/
|
|
44
|
-
export interface ScaffoldFileSystem {
|
|
45
|
-
exists(target: string): Promise<boolean>;
|
|
46
|
-
mkdir(dir: string): Promise<void>;
|
|
47
|
-
writeFile(target: string, content: string): Promise<void>;
|
|
48
|
-
chmod(target: string, mode: number): Promise<void>;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export const nodeScaffoldFs: ScaffoldFileSystem = {
|
|
52
|
-
async exists(target) {
|
|
53
|
-
try {
|
|
54
|
-
await nodeFs.access(target);
|
|
55
|
-
return true;
|
|
56
|
-
} catch {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
async mkdir(dir) {
|
|
61
|
-
await nodeFs.mkdir(dir, { recursive: true });
|
|
62
|
-
},
|
|
63
|
-
async writeFile(target, content) {
|
|
64
|
-
await nodeFs.writeFile(target, content, 'utf-8');
|
|
65
|
-
},
|
|
66
|
-
async chmod(target, mode) {
|
|
67
|
-
await nodeFs.chmod(target, mode);
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* 在场处置:
|
|
73
|
-
* - `skip` harness 不再主张这份正文,灰字告知即可
|
|
74
|
-
* - `merge` 用户可能持有自己的内容,打印片段(与落盘正文同源)请其手工合并
|
|
75
|
-
*/
|
|
76
|
-
export type OnPresent =
|
|
77
|
-
| { outcome: 'skip'; notice: string }
|
|
78
|
-
| {
|
|
79
|
-
outcome: 'merge';
|
|
80
|
-
notice: string;
|
|
81
|
-
/** 提示与指引之间的灰字补充行(如冲突来源清单) */
|
|
82
|
-
detail?: string[];
|
|
83
|
-
instruction: string;
|
|
84
|
-
snippet: string;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
/** 一个受管文件 = 三态判定所需的全部数据 */
|
|
88
|
-
export interface ManagedFile {
|
|
89
|
-
/** 落盘目标(绝对路径) */
|
|
90
|
-
target: string;
|
|
91
|
-
/** harness 拥有的模板正文 */
|
|
92
|
-
content: string;
|
|
93
|
-
/** 落盘态绿字 */
|
|
94
|
-
created: string;
|
|
95
|
-
/** 在场态处置 */
|
|
96
|
-
onPresent: OnPresent;
|
|
97
|
-
/** 在场判定覆写,缺省 = target 自身在场(冲突面可以宽于 target,如 CI 配置目录) */
|
|
98
|
-
present?: () => Promise<boolean>;
|
|
99
|
-
/** 落盘权限位(Git hook 需要可执行位) */
|
|
100
|
-
mode?: number;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* 落一个受管文件:判定 → 建目录 → 写盘 → 上色打印
|
|
105
|
-
*/
|
|
106
|
-
export async function writeManagedFile(
|
|
107
|
-
file: ManagedFile,
|
|
108
|
-
io: CommandIO,
|
|
109
|
-
fs: ScaffoldFileSystem = nodeScaffoldFs,
|
|
110
|
-
): Promise<ScaffoldOutcome> {
|
|
111
|
-
const present = file.present ? await file.present() : await fs.exists(file.target);
|
|
112
|
-
|
|
113
|
-
if (!present) {
|
|
114
|
-
await fs.mkdir(path.dirname(file.target));
|
|
115
|
-
await fs.writeFile(file.target, file.content);
|
|
116
|
-
if (file.mode !== undefined) await fs.chmod(file.target, file.mode);
|
|
117
|
-
log(io, chalk.green(file.created));
|
|
118
|
-
return 'created';
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (file.onPresent.outcome === 'skip') {
|
|
122
|
-
log(io, chalk.gray(file.onPresent.notice));
|
|
123
|
-
return 'exists';
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
log(io, chalk.yellow(file.onPresent.notice));
|
|
127
|
-
for (const line of file.onPresent.detail ?? []) {
|
|
128
|
-
log(io, chalk.gray(line));
|
|
129
|
-
}
|
|
130
|
-
log(io, chalk.gray(file.onPresent.instruction));
|
|
131
|
-
log(io);
|
|
132
|
-
log(io, chalk.cyan(file.onPresent.snippet));
|
|
133
|
-
return 'manual';
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/** 按顺序落一组受管文件 */
|
|
137
|
-
export async function runPlan(
|
|
138
|
-
plan: readonly ManagedFile[],
|
|
139
|
-
io: CommandIO,
|
|
140
|
-
fs: ScaffoldFileSystem = nodeScaffoldFs,
|
|
141
|
-
): Promise<ScaffoldOutcome[]> {
|
|
142
|
-
const outcomes: ScaffoldOutcome[] = [];
|
|
143
|
-
for (const file of plan) {
|
|
144
|
-
outcomes.push(await writeManagedFile(file, io, fs));
|
|
145
|
-
}
|
|
146
|
-
return outcomes;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// ── 站点:init 的 7 处 + 原住 validate 的 2 处 ──────────────────────────
|
|
150
|
-
|
|
151
|
-
/** .git/hooks/pre-commit(冲突片段 = 落盘正文去掉 shebang 头,逐字同源) */
|
|
152
|
-
export function preCommitHookFile(projectPath: string): ManagedFile {
|
|
153
|
-
return {
|
|
154
|
-
target: path.join(projectPath, '.git', 'hooks', 'pre-commit'),
|
|
155
|
-
content: renderPreCommitHook(),
|
|
156
|
-
created: '✅ 已创建 .git/hooks/pre-commit',
|
|
157
|
-
mode: 0o755,
|
|
158
|
-
onPresent: {
|
|
159
|
-
outcome: 'merge',
|
|
160
|
-
notice: '⚠️ .git/hooks/pre-commit 已存在',
|
|
161
|
-
instruction: '💡 请手动添加以下内容到文件末尾:',
|
|
162
|
-
snippet: PRE_COMMIT_SNIPPET,
|
|
163
|
-
},
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* .git/hooks/pre-push(harness#144 的第 9 站点,冲突片段与落盘正文逐字同源)
|
|
169
|
-
*
|
|
170
|
-
* 与 pre-commit 的分工:那道查暂存的(增量、快反馈),这道查整仓的(全量、兜底)。
|
|
171
|
-
* 本地 hook 是自检与提醒,门禁真正的落点仍是服务端 CI。
|
|
172
|
-
*/
|
|
173
|
-
export function prePushHookFile(projectPath: string): ManagedFile {
|
|
174
|
-
return {
|
|
175
|
-
target: path.join(projectPath, '.git', 'hooks', 'pre-push'),
|
|
176
|
-
content: renderPrePushHook(),
|
|
177
|
-
created: '✅ 已创建 .git/hooks/pre-push',
|
|
178
|
-
mode: 0o755,
|
|
179
|
-
onPresent: {
|
|
180
|
-
outcome: 'merge',
|
|
181
|
-
notice: '⚠️ .git/hooks/pre-push 已存在',
|
|
182
|
-
instruction: '💡 请手动添加以下内容到文件末尾:',
|
|
183
|
-
snippet: PRE_PUSH_SNIPPET,
|
|
184
|
-
},
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* 服务端 CI 门禁站点(平台维度,harness#143)
|
|
190
|
-
*
|
|
191
|
-
* - `github` → `.github/workflows/harness-check.yml`;冲突判定宽于 target 自身:
|
|
192
|
-
* 工作流目录里已有任何 CI 配置就算冲突,片段是完整 workflow 正文(打印的即落盘的,#103 判据)
|
|
193
|
-
* - `gitlab` → `.gitlab-ci.yml`;冲突面就是该文件自身在场,片段是 harness 拥有的任务正文。
|
|
194
|
-
* GitLab 没有「第二个 CI 文件位」,所以 `-g` 档的治理任务并入同一份正文
|
|
195
|
-
* ——这也是 `governanceLevel` 只对 gitlab 形有意义的原因(GH 侧治理站是独立的
|
|
196
|
-
* `governanceWorkflowFile`)。
|
|
197
|
-
*
|
|
198
|
-
* `none`(不接线)不进来:那是命令层的 plan 里没有这个站点,scaffold 不持有跳过策略。
|
|
199
|
-
*/
|
|
200
|
-
export function harnessCheckCiFile(
|
|
201
|
-
projectPath: string,
|
|
202
|
-
platform: CiPlatform,
|
|
203
|
-
existingCiWorkflows: string[],
|
|
204
|
-
governanceLevel?: string,
|
|
205
|
-
): ManagedFile {
|
|
206
|
-
if (platform === 'gitlab') {
|
|
207
|
-
const content = renderGitLabCiFile(governanceLevel);
|
|
208
|
-
return {
|
|
209
|
-
target: path.join(projectPath, '.gitlab-ci.yml'),
|
|
210
|
-
content,
|
|
211
|
-
created: '✅ 已创建 .gitlab-ci.yml',
|
|
212
|
-
onPresent: {
|
|
213
|
-
outcome: 'merge',
|
|
214
|
-
notice: '⚠️ .gitlab-ci.yml 已存在',
|
|
215
|
-
instruction: '💡 请手动添加以下内容到文件中:',
|
|
216
|
-
snippet: renderGitLabCiJobs(governanceLevel),
|
|
217
|
-
},
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
const target = path.join(projectPath, '.github', 'workflows', 'harness-check.yml');
|
|
222
|
-
return {
|
|
223
|
-
target,
|
|
224
|
-
content: HARNESS_CHECK_WORKFLOW,
|
|
225
|
-
created: '✅ 已创建 .github/workflows/harness-check.yml',
|
|
226
|
-
present: async () => existingCiWorkflows.length > 0,
|
|
227
|
-
onPresent: {
|
|
228
|
-
outcome: 'merge',
|
|
229
|
-
notice: '⚠️ 检测到已存在的 CI 配置:',
|
|
230
|
-
detail: existingCiWorkflows.map(f => ` - .github/workflows/${f}`),
|
|
231
|
-
instruction: '💡 请手动添加以下内容到 jobs 中:',
|
|
232
|
-
snippet: HARNESS_CHECK_WORKFLOW,
|
|
233
|
-
},
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/** .harness/checkpoints.yml 示例(原住 validate.ts,路径约定与 validate 共用) */
|
|
238
|
-
export function checkpointsFile(projectPath: string): ManagedFile {
|
|
239
|
-
const target = path.join(projectPath, DEFAULT_CHECKPOINT_FILE);
|
|
240
|
-
return {
|
|
241
|
-
target,
|
|
242
|
-
content: renderCheckpoints(),
|
|
243
|
-
created: `✅ 已创建示例检查点文件: ${target}`,
|
|
244
|
-
onPresent: { outcome: 'skip', notice: 'checkpoints.yml 已存在,跳过' },
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/** .harness/resolutions.json(RKB 狗粮 — 约束 → 已知解法映射,原住 validate.ts) */
|
|
249
|
-
export function resolutionsFile(projectPath: string): ManagedFile {
|
|
250
|
-
const target = path.join(projectPath, '.harness', 'resolutions.json');
|
|
251
|
-
return {
|
|
252
|
-
target,
|
|
253
|
-
content: renderResolutions(),
|
|
254
|
-
created: `✅ 已创建 Resolutions 文件: ${target}`,
|
|
255
|
-
onPresent: { outcome: 'skip', notice: 'resolutions.json 已存在,跳过' },
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/** CHANGELOG.md 骨架 */
|
|
260
|
-
export function changelogFile(projectPath: string, format: string): ManagedFile {
|
|
261
|
-
return {
|
|
262
|
-
target: path.join(projectPath, 'CHANGELOG.md'),
|
|
263
|
-
content: renderChangelog(format),
|
|
264
|
-
created: '✅ 已创建 CHANGELOG.md',
|
|
265
|
-
onPresent: { outcome: 'skip', notice: 'CHANGELOG.md 已存在' },
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/** `<dir>/CONTEXT.md` 骨架 */
|
|
270
|
-
export function contextDocFile(projectPath: string, dir: string): ManagedFile {
|
|
271
|
-
return {
|
|
272
|
-
target: path.join(projectPath, dir, 'CONTEXT.md'),
|
|
273
|
-
content: renderContextDoc(dir),
|
|
274
|
-
created: `✅ 已创建 ${dir}/CONTEXT.md`,
|
|
275
|
-
onPresent: { outcome: 'skip', notice: `${dir}/CONTEXT.md 已存在` },
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* .github/workflows/harness-governance.yml(治理 CI 面,仅 github 形)
|
|
281
|
-
*
|
|
282
|
-
* gitlab 形的治理任务并入 `.gitlab-ci.yml`(见 `harnessCheckCiFile`),无本站点。
|
|
283
|
-
*/
|
|
284
|
-
export function governanceWorkflowFile(projectPath: string, level: string): ManagedFile {
|
|
285
|
-
return {
|
|
286
|
-
target: path.join(projectPath, '.github', 'workflows', 'harness-governance.yml'),
|
|
287
|
-
content: renderGovernanceWorkflow(level, 'github'),
|
|
288
|
-
created: '✅ 已创建 .github/workflows/harness-governance.yml',
|
|
289
|
-
onPresent: { outcome: 'skip', notice: 'harness-governance.yml 已存在' },
|
|
290
|
-
};
|
|
291
|
-
}
|