@dommaker/harness 1.15.0 → 2.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/CHANGELOG.md +28 -0
- package/bin/harness.js +6 -0
- package/dist/agents/lifecycle.d.ts.map +1 -1
- package/dist/agents/lifecycle.js +3 -6
- package/dist/agents/lifecycle.js.map +1 -1
- package/dist/cli/command-contract.d.ts +10 -13
- package/dist/cli/command-contract.d.ts.map +1 -1
- package/dist/cli/command-contract.js +6 -0
- package/dist/cli/command-contract.js.map +1 -1
- package/dist/cli/commands/acceptance.d.ts.map +1 -1
- package/dist/cli/commands/acceptance.js +8 -7
- package/dist/cli/commands/acceptance.js.map +1 -1
- package/dist/cli/commands/command.d.ts.map +1 -1
- package/dist/cli/commands/command.js +5 -5
- package/dist/cli/commands/command.js.map +1 -1
- package/dist/cli/commands/constraints-disable.d.ts +7 -11
- package/dist/cli/commands/constraints-disable.d.ts.map +1 -1
- package/dist/cli/commands/constraints-disable.js +8 -80
- package/dist/cli/commands/constraints-disable.js.map +1 -1
- package/dist/cli/commands/constraints-pack-proposal.d.ts +7 -20
- package/dist/cli/commands/constraints-pack-proposal.d.ts.map +1 -1
- package/dist/cli/commands/constraints-pack-proposal.js +21 -129
- package/dist/cli/commands/constraints-pack-proposal.js.map +1 -1
- package/dist/cli/commands/constraints-reactivate.d.ts +8 -20
- package/dist/cli/commands/constraints-reactivate.d.ts.map +1 -1
- package/dist/cli/commands/constraints-reactivate.js +11 -105
- package/dist/cli/commands/constraints-reactivate.js.map +1 -1
- package/dist/cli/commands/constraints-retire.d.ts +11 -67
- package/dist/cli/commands/constraints-retire.d.ts.map +1 -1
- package/dist/cli/commands/constraints-retire.js +20 -196
- package/dist/cli/commands/constraints-retire.js.map +1 -1
- package/dist/cli/commands/constraints.d.ts +6 -9
- package/dist/cli/commands/constraints.d.ts.map +1 -1
- package/dist/cli/commands/constraints.js +7 -21
- package/dist/cli/commands/constraints.js.map +1 -1
- package/dist/cli/commands/contract.d.ts.map +1 -1
- package/dist/cli/commands/contract.js +20 -10
- package/dist/cli/commands/contract.js.map +1 -1
- package/dist/cli/commands/definitions.d.ts.map +1 -1
- package/dist/cli/commands/definitions.js +13 -12
- package/dist/cli/commands/definitions.js.map +1 -1
- package/dist/cli/commands/init/ci-platform.d.ts +35 -0
- package/dist/cli/commands/init/ci-platform.d.ts.map +1 -0
- package/dist/cli/commands/init/ci-platform.js +59 -0
- package/dist/cli/commands/init/ci-platform.js.map +1 -0
- package/dist/cli/commands/init/ci-wiring.d.ts +20 -0
- package/dist/cli/commands/init/ci-wiring.d.ts.map +1 -0
- package/dist/cli/commands/init/ci-wiring.js +72 -0
- package/dist/cli/commands/init/ci-wiring.js.map +1 -0
- package/dist/cli/commands/init/git-hooks.d.ts +15 -0
- package/dist/cli/commands/init/git-hooks.d.ts.map +1 -0
- package/dist/{tools/paths.js → cli/commands/init/git-hooks.js} +25 -12
- package/dist/cli/commands/init/git-hooks.js.map +1 -0
- package/dist/cli/commands/init/governance.d.ts +14 -0
- package/dist/cli/commands/init/governance.d.ts.map +1 -0
- package/dist/cli/commands/init/governance.js +132 -0
- package/dist/cli/commands/init/governance.js.map +1 -0
- package/dist/cli/commands/{init.d.ts → init/index.d.ts} +13 -14
- package/dist/cli/commands/init/index.d.ts.map +1 -0
- package/dist/cli/commands/init/index.js +148 -0
- package/dist/cli/commands/init/index.js.map +1 -0
- package/dist/cli/commands/init/output-style.d.ts +19 -0
- package/dist/cli/commands/init/output-style.d.ts.map +1 -0
- package/dist/cli/commands/init/output-style.js +110 -0
- package/dist/cli/commands/init/output-style.js.map +1 -0
- package/dist/cli/commands/init/presets.d.ts +26 -0
- package/dist/cli/commands/init/presets.d.ts.map +1 -0
- package/dist/cli/commands/init/presets.js +104 -0
- package/dist/cli/commands/init/presets.js.map +1 -0
- package/dist/cli/commands/init/snippets.d.ts +18 -0
- package/dist/cli/commands/init/snippets.d.ts.map +1 -0
- package/dist/cli/commands/init/snippets.js +49 -0
- package/dist/cli/commands/init/snippets.js.map +1 -0
- package/dist/cli/commands/knowledge/audit.d.ts +30 -0
- package/dist/cli/commands/knowledge/audit.d.ts.map +1 -0
- package/dist/cli/commands/knowledge/audit.js +114 -0
- package/dist/cli/commands/knowledge/audit.js.map +1 -0
- package/dist/cli/commands/knowledge/decay.d.ts +19 -0
- package/dist/cli/commands/knowledge/decay.d.ts.map +1 -0
- package/dist/cli/commands/knowledge/decay.js +48 -0
- package/dist/cli/commands/knowledge/decay.js.map +1 -0
- package/dist/cli/commands/knowledge/health.d.ts +36 -0
- package/dist/cli/commands/knowledge/health.d.ts.map +1 -0
- package/dist/cli/commands/knowledge/health.js +172 -0
- package/dist/cli/commands/knowledge/health.js.map +1 -0
- package/dist/cli/commands/knowledge/import.d.ts +26 -0
- package/dist/cli/commands/knowledge/import.d.ts.map +1 -0
- package/dist/cli/commands/knowledge/import.js +63 -0
- package/dist/cli/commands/knowledge/import.js.map +1 -0
- package/dist/cli/commands/knowledge/index.d.ts +25 -0
- package/dist/cli/commands/knowledge/index.d.ts.map +1 -0
- package/dist/cli/commands/knowledge/index.js +84 -0
- package/dist/cli/commands/knowledge/index.js.map +1 -0
- package/dist/cli/commands/knowledge/list.d.ts +25 -0
- package/dist/cli/commands/knowledge/list.d.ts.map +1 -0
- package/dist/cli/commands/knowledge/list.js +60 -0
- package/dist/cli/commands/knowledge/list.js.map +1 -0
- package/dist/cli/commands/knowledge/migrate.d.ts +21 -0
- package/dist/cli/commands/knowledge/migrate.d.ts.map +1 -0
- package/dist/cli/commands/knowledge/migrate.js +48 -0
- package/dist/cli/commands/knowledge/migrate.js.map +1 -0
- package/dist/cli/commands/knowledge/search.d.ts +32 -0
- package/dist/cli/commands/knowledge/search.d.ts.map +1 -0
- package/dist/cli/commands/knowledge/search.js +73 -0
- package/dist/cli/commands/knowledge/search.js.map +1 -0
- package/dist/cli/commands/knowledge/shared.d.ts +14 -0
- package/dist/cli/commands/knowledge/shared.d.ts.map +1 -0
- package/dist/cli/commands/knowledge/shared.js +6 -0
- package/dist/cli/commands/knowledge/shared.js.map +1 -0
- package/dist/cli/commands/knowledge/snapshot.d.ts +18 -0
- package/dist/cli/commands/knowledge/snapshot.d.ts.map +1 -0
- package/dist/cli/commands/knowledge/snapshot.js +34 -0
- package/dist/cli/commands/knowledge/snapshot.js.map +1 -0
- package/dist/cli/commands/knowledge/stats.d.ts +26 -0
- package/dist/cli/commands/knowledge/stats.d.ts.map +1 -0
- package/dist/cli/commands/knowledge/stats.js +132 -0
- package/dist/cli/commands/knowledge/stats.js.map +1 -0
- package/dist/cli/commands/knowledge/sync-rag.d.ts +19 -0
- package/dist/cli/commands/knowledge/sync-rag.d.ts.map +1 -0
- package/dist/cli/commands/knowledge/sync-rag.js +77 -0
- package/dist/cli/commands/knowledge/sync-rag.js.map +1 -0
- package/dist/cli/commands/knowledge-view.d.ts +2 -1
- package/dist/cli/commands/knowledge-view.d.ts.map +1 -1
- package/dist/cli/commands/knowledge-view.js +2 -2
- package/dist/cli/commands/knowledge-view.js.map +1 -1
- package/dist/cli/commands/passes-gate.d.ts.map +1 -1
- package/dist/cli/commands/passes-gate.js +12 -2
- package/dist/cli/commands/passes-gate.js.map +1 -1
- package/dist/cli/commands/performance.js.map +1 -1
- package/dist/cli/commands/release.d.ts +2 -2
- package/dist/cli/commands/release.d.ts.map +1 -1
- package/dist/cli/commands/release.js +15 -43
- package/dist/cli/commands/release.js.map +1 -1
- package/dist/cli/commands/review.d.ts.map +1 -1
- package/dist/cli/commands/review.js +3 -2
- package/dist/cli/commands/review.js.map +1 -1
- package/dist/cli/commands/scaffold-templates.d.ts +7 -0
- package/dist/cli/commands/scaffold-templates.d.ts.map +1 -1
- package/dist/cli/commands/scaffold-templates.js +21 -1
- package/dist/cli/commands/scaffold-templates.js.map +1 -1
- package/dist/cli/commands/security.d.ts.map +1 -1
- package/dist/cli/commands/security.js +7 -8
- package/dist/cli/commands/security.js.map +1 -1
- package/dist/cli/commands/spec-baseline-check.d.ts.map +1 -1
- package/dist/cli/commands/spec-baseline-check.js +6 -5
- package/dist/cli/commands/spec-baseline-check.js.map +1 -1
- package/dist/cli/commands/status.js +2 -2
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/sync-docs/agents-syncer.js +31 -55
- package/dist/cli/commands/sync-docs/agents-syncer.js.map +1 -1
- package/dist/cli/commands/sync-docs/capabilities-syncer.d.ts.map +1 -1
- package/dist/cli/commands/sync-docs/capabilities-syncer.js +18 -12
- package/dist/cli/commands/sync-docs/capabilities-syncer.js.map +1 -1
- package/dist/cli/commands/sync-docs/compact.d.ts +9 -0
- package/dist/cli/commands/sync-docs/compact.d.ts.map +1 -0
- package/dist/cli/commands/sync-docs/compact.js +73 -0
- package/dist/cli/commands/sync-docs/compact.js.map +1 -0
- package/dist/cli/commands/sync-docs/context-syncer.d.ts +13 -0
- package/dist/cli/commands/sync-docs/context-syncer.d.ts.map +1 -1
- package/dist/cli/commands/sync-docs/context-syncer.js +40 -29
- package/dist/cli/commands/sync-docs/context-syncer.js.map +1 -1
- package/dist/cli/commands/sync-docs/gate.d.ts +27 -0
- package/dist/cli/commands/sync-docs/gate.d.ts.map +1 -0
- package/dist/cli/commands/sync-docs/gate.js +72 -0
- package/dist/cli/commands/sync-docs/gate.js.map +1 -0
- package/dist/cli/commands/sync-docs/index.d.ts +13 -27
- package/dist/cli/commands/sync-docs/index.d.ts.map +1 -1
- package/dist/cli/commands/sync-docs/index.js +19 -503
- package/dist/cli/commands/sync-docs/index.js.map +1 -1
- package/dist/cli/commands/sync-docs/main-flow.d.ts +37 -0
- package/dist/cli/commands/sync-docs/main-flow.d.ts.map +1 -0
- package/dist/cli/commands/sync-docs/main-flow.js +485 -0
- package/dist/cli/commands/sync-docs/main-flow.js.map +1 -0
- package/dist/cli/commands/sync-docs/project-reader.d.ts +6 -1
- package/dist/cli/commands/sync-docs/project-reader.d.ts.map +1 -1
- package/dist/cli/commands/sync-docs/project-reader.js +16 -25
- package/dist/cli/commands/sync-docs/project-reader.js.map +1 -1
- package/dist/cli/commands/validate.d.ts.map +1 -1
- package/dist/cli/commands/validate.js +7 -0
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/gate-command.d.ts +1 -1
- package/dist/cli/gate-command.d.ts.map +1 -1
- package/dist/cli/gate-command.js +1 -1
- package/dist/cli/gate-command.js.map +1 -1
- package/dist/completion-checkers/glob-match.d.ts +1 -1
- package/dist/completion-checkers/glob-match.d.ts.map +1 -1
- package/dist/completion-checkers/glob-match.js +3 -38
- package/dist/completion-checkers/glob-match.js.map +1 -1
- package/dist/context/index.d.ts +2 -5
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +2 -9
- package/dist/context/index.js.map +1 -1
- package/dist/context/session-manager.d.ts +2 -8
- package/dist/context/session-manager.d.ts.map +1 -1
- package/dist/context/session-manager.js +31 -61
- package/dist/context/session-manager.js.map +1 -1
- package/dist/context/types.d.ts +2 -26
- package/dist/context/types.d.ts.map +1 -1
- package/dist/core/config-files.d.ts +21 -0
- package/dist/core/config-files.d.ts.map +1 -0
- package/dist/core/config-files.js +75 -0
- package/dist/core/config-files.js.map +1 -0
- package/dist/core/constraint-lifecycle.d.ts +127 -0
- package/dist/core/constraint-lifecycle.d.ts.map +1 -0
- package/dist/core/constraint-lifecycle.js +306 -0
- package/dist/core/constraint-lifecycle.js.map +1 -0
- package/dist/core/constraints/capabilities-parser.d.ts +2 -1
- package/dist/core/constraints/capabilities-parser.d.ts.map +1 -1
- package/dist/core/constraints/capabilities-parser.js +4 -6
- package/dist/core/constraints/capabilities-parser.js.map +1 -1
- package/dist/core/constraints/checker.d.ts +9 -1
- package/dist/core/constraints/checker.d.ts.map +1 -1
- package/dist/core/constraints/checker.js +18 -0
- package/dist/core/constraints/checker.js.map +1 -1
- package/dist/core/constraints/checkers/no-completion-without-verification.d.ts +6 -1
- package/dist/core/constraints/checkers/no-completion-without-verification.d.ts.map +1 -1
- package/dist/core/constraints/checkers/no-completion-without-verification.js +17 -1
- package/dist/core/constraints/checkers/no-completion-without-verification.js.map +1 -1
- package/dist/core/constraints/checkers/no-hardcoded-credentials.d.ts +0 -2
- package/dist/core/constraints/checkers/no-hardcoded-credentials.d.ts.map +1 -1
- package/dist/core/constraints/checkers/no-hardcoded-credentials.js +0 -5
- package/dist/core/constraints/checkers/no-hardcoded-credentials.js.map +1 -1
- package/dist/core/constraints/checkers/templated/exec.d.ts.map +1 -1
- package/dist/core/constraints/checkers/templated/exec.js +1 -0
- package/dist/core/constraints/checkers/templated/exec.js.map +1 -1
- package/dist/core/constraints/checkers/templated/file-exists.js +2 -2
- package/dist/core/constraints/checkers/templated/file-exists.js.map +1 -1
- package/dist/core/constraints/checkers/templated/glob.d.ts +2 -3
- package/dist/core/constraints/checkers/templated/glob.d.ts.map +1 -1
- package/dist/core/constraints/checkers/templated/glob.js +4 -40
- package/dist/core/constraints/checkers/templated/glob.js.map +1 -1
- package/dist/core/constraints/construction-sites.d.ts +56 -0
- package/dist/core/constraints/construction-sites.d.ts.map +1 -0
- package/dist/core/constraints/construction-sites.js +75 -0
- package/dist/core/constraints/construction-sites.js.map +1 -0
- package/dist/core/constraints/context-builder.d.ts.map +1 -1
- package/dist/core/constraints/context-builder.js +13 -34
- package/dist/core/constraints/context-builder.js.map +1 -1
- package/dist/core/constraints/definitions/guidelines.d.ts.map +1 -1
- package/dist/core/constraints/definitions/guidelines.js +18 -0
- package/dist/core/constraints/definitions/guidelines.js.map +1 -1
- package/dist/core/constraints/definitions/iron-laws.d.ts.map +1 -1
- package/dist/core/constraints/definitions/iron-laws.js +0 -16
- package/dist/core/constraints/definitions/iron-laws.js.map +1 -1
- package/dist/core/constraints/doc-freshness/runner.d.ts.map +1 -1
- package/dist/core/constraints/doc-freshness/runner.js +192 -221
- package/dist/core/constraints/doc-freshness/runner.js.map +1 -1
- package/dist/core/constraints/git-evidence.d.ts.map +1 -1
- package/dist/core/constraints/git-evidence.js +2 -0
- package/dist/core/constraints/git-evidence.js.map +1 -1
- package/dist/core/constraints/index.d.ts +0 -2
- package/dist/core/constraints/index.d.ts.map +1 -1
- package/dist/core/constraints/index.js +1 -4
- package/dist/core/constraints/index.js.map +1 -1
- package/dist/core/constraints/injection-writer.d.ts +1 -0
- package/dist/core/constraints/injection-writer.d.ts.map +1 -1
- package/dist/core/constraints/injection-writer.js +3 -6
- package/dist/core/constraints/injection-writer.js.map +1 -1
- package/dist/core/constraints/meta.d.ts +18 -0
- package/dist/core/constraints/meta.d.ts.map +1 -0
- package/dist/core/constraints/meta.js +31 -0
- package/dist/core/constraints/meta.js.map +1 -0
- package/dist/core/constraints/pack-proposal.d.ts +66 -0
- package/dist/core/constraints/pack-proposal.d.ts.map +1 -0
- package/dist/core/constraints/pack-proposal.js +181 -0
- package/dist/core/constraints/pack-proposal.js.map +1 -0
- package/dist/core/constraints/usage-report.d.ts +3 -1
- package/dist/core/constraints/usage-report.d.ts.map +1 -1
- package/dist/core/constraints/usage-report.js +3 -1
- package/dist/core/constraints/usage-report.js.map +1 -1
- package/dist/core/effective-constraints.d.ts +6 -6
- package/dist/core/effective-constraints.d.ts.map +1 -1
- package/dist/core/effective-constraints.js +6 -6
- package/dist/core/effective-constraints.js.map +1 -1
- package/dist/core/index.d.ts +3 -6
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/project-config-loader.d.ts +3 -1
- package/dist/core/project-config-loader.d.ts.map +1 -1
- package/dist/core/project-config-loader.js +6 -6
- package/dist/core/project-config-loader.js.map +1 -1
- package/dist/core/spec/validator.d.ts +1 -1
- package/dist/core/spec/validator.d.ts.map +1 -1
- package/dist/core/spec/validator.js +41 -36
- package/dist/core/spec/validator.js.map +1 -1
- package/dist/core/validators/check-handlers/command.d.ts.map +1 -1
- package/dist/core/validators/check-handlers/command.js +49 -8
- package/dist/core/validators/check-handlers/command.js.map +1 -1
- package/dist/core/validators/check-handlers/http.d.ts.map +1 -1
- package/dist/core/validators/check-handlers/http.js +6 -4
- package/dist/core/validators/check-handlers/http.js.map +1 -1
- package/dist/core/validators/check-handlers/output.d.ts +1 -1
- package/dist/core/validators/check-handlers/output.d.ts.map +1 -1
- package/dist/core/validators/check-handlers/output.js +2 -1
- package/dist/core/validators/check-handlers/output.js.map +1 -1
- package/dist/core/validators/passes-gate.d.ts +2 -1
- package/dist/core/validators/passes-gate.d.ts.map +1 -1
- package/dist/core/validators/passes-gate.js +25 -30
- package/dist/core/validators/passes-gate.js.map +1 -1
- package/dist/gates/acceptance.d.ts +37 -18
- package/dist/gates/acceptance.d.ts.map +1 -1
- package/dist/gates/acceptance.js +129 -97
- package/dist/gates/acceptance.js.map +1 -1
- package/dist/gates/checker-gate.d.ts +2 -1
- package/dist/gates/checker-gate.d.ts.map +1 -1
- package/dist/gates/checker-gate.js +2 -1
- package/dist/gates/checker-gate.js.map +1 -1
- package/dist/gates/command.d.ts +3 -20
- package/dist/gates/command.d.ts.map +1 -1
- package/dist/gates/command.js +2 -35
- package/dist/gates/command.js.map +1 -1
- package/dist/gates/contract.d.ts +11 -2
- package/dist/gates/contract.d.ts.map +1 -1
- package/dist/gates/contract.js +57 -62
- package/dist/gates/contract.js.map +1 -1
- package/dist/gates/definitions.d.ts +1 -1
- package/dist/gates/definitions.d.ts.map +1 -1
- package/dist/gates/definitions.js +1 -1
- package/dist/gates/definitions.js.map +1 -1
- package/dist/gates/performance.d.ts +1 -1
- package/dist/gates/performance.d.ts.map +1 -1
- package/dist/gates/performance.js +18 -8
- package/dist/gates/performance.js.map +1 -1
- package/dist/gates/registry.d.ts.map +1 -1
- package/dist/gates/registry.js +7 -3
- package/dist/gates/registry.js.map +1 -1
- package/dist/gates/review.d.ts.map +1 -1
- package/dist/gates/review.js +16 -2
- package/dist/gates/review.js.map +1 -1
- package/dist/gates/security.d.ts +5 -1
- package/dist/gates/security.d.ts.map +1 -1
- package/dist/gates/security.js +57 -63
- package/dist/gates/security.js.map +1 -1
- package/dist/gates/types.d.ts +12 -72
- package/dist/gates/types.d.ts.map +1 -1
- package/dist/gates/types.js +5 -1
- package/dist/gates/types.js.map +1 -1
- package/dist/index.d.ts +23 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -65
- package/dist/index.js.map +1 -1
- package/dist/knowledge/audit-dimensions.d.ts +45 -0
- package/dist/knowledge/audit-dimensions.d.ts.map +1 -0
- package/dist/knowledge/audit-dimensions.js +144 -0
- package/dist/knowledge/audit-dimensions.js.map +1 -0
- package/dist/knowledge/audit-rules.d.ts +41 -0
- package/dist/knowledge/audit-rules.d.ts.map +1 -0
- package/dist/knowledge/audit-rules.js +269 -0
- package/dist/knowledge/audit-rules.js.map +1 -0
- package/dist/knowledge/audit-scoring.d.ts +6 -60
- package/dist/knowledge/audit-scoring.d.ts.map +1 -1
- package/dist/knowledge/audit-scoring.js +8 -391
- package/dist/knowledge/audit-scoring.js.map +1 -1
- package/dist/knowledge/audit.d.ts +6 -3
- package/dist/knowledge/audit.d.ts.map +1 -1
- package/dist/knowledge/audit.js +9 -6
- package/dist/knowledge/audit.js.map +1 -1
- package/dist/knowledge/import.d.ts.map +1 -1
- package/dist/knowledge/import.js +5 -4
- package/dist/knowledge/import.js.map +1 -1
- package/dist/knowledge/index-generator.d.ts +2 -0
- package/dist/knowledge/index-generator.d.ts.map +1 -1
- package/dist/knowledge/index-generator.js +43 -50
- package/dist/knowledge/index-generator.js.map +1 -1
- package/dist/knowledge/index.d.ts +5 -5
- package/dist/knowledge/index.d.ts.map +1 -1
- package/dist/knowledge/index.js +4 -5
- package/dist/knowledge/index.js.map +1 -1
- package/dist/knowledge/ingest.d.ts +21 -5
- package/dist/knowledge/ingest.d.ts.map +1 -1
- package/dist/knowledge/ingest.js +12 -9
- package/dist/knowledge/ingest.js.map +1 -1
- package/dist/knowledge/lifecycle.d.ts.map +1 -1
- package/dist/knowledge/lifecycle.js +17 -22
- package/dist/knowledge/lifecycle.js.map +1 -1
- package/dist/knowledge/query.d.ts +2 -2
- package/dist/knowledge/query.d.ts.map +1 -1
- package/dist/knowledge/query.js +19 -22
- package/dist/knowledge/query.js.map +1 -1
- package/dist/knowledge/reference-tracker.d.ts.map +1 -1
- package/dist/knowledge/reference-tracker.js +14 -17
- package/dist/knowledge/reference-tracker.js.map +1 -1
- package/dist/knowledge/store.d.ts.map +1 -1
- package/dist/knowledge/store.js +17 -36
- package/dist/knowledge/store.js.map +1 -1
- package/dist/knowledge/token-estimate.d.ts +14 -0
- package/dist/knowledge/token-estimate.d.ts.map +1 -0
- package/dist/knowledge/token-estimate.js +31 -0
- package/dist/knowledge/token-estimate.js.map +1 -0
- package/dist/monitoring/analyzer-base.d.ts +0 -8
- package/dist/monitoring/analyzer-base.d.ts.map +1 -1
- package/dist/monitoring/analyzer-base.js +0 -20
- package/dist/monitoring/analyzer-base.js.map +1 -1
- package/dist/monitoring/index.d.ts +2 -7
- package/dist/monitoring/index.d.ts.map +1 -1
- package/dist/monitoring/index.js +2 -9
- package/dist/monitoring/index.js.map +1 -1
- package/dist/monitoring/trace-analyzer.d.ts +2 -6
- package/dist/monitoring/trace-analyzer.d.ts.map +1 -1
- package/dist/monitoring/trace-analyzer.js +9 -16
- package/dist/monitoring/trace-analyzer.js.map +1 -1
- package/dist/monitoring/traces.d.ts +14 -10
- package/dist/monitoring/traces.d.ts.map +1 -1
- package/dist/monitoring/traces.js +47 -49
- package/dist/monitoring/traces.js.map +1 -1
- package/dist/pretool-use-hook.d.ts +1 -1
- package/dist/pretool-use-hook.d.ts.map +1 -1
- package/dist/pretool-use-hook.js +14 -21
- package/dist/pretool-use-hook.js.map +1 -1
- package/dist/release/integrity.d.ts.map +1 -1
- package/dist/release/integrity.js +8 -10
- package/dist/release/integrity.js.map +1 -1
- package/dist/sdd/index-generator.d.ts.map +1 -1
- package/dist/sdd/index-generator.js +4 -0
- package/dist/sdd/index-generator.js.map +1 -1
- package/dist/test-setup/jsonl-fake-fs.d.ts +1 -1
- package/dist/test-setup/jsonl-fake-fs.js +1 -1
- package/dist/types/checkpoint.d.ts +8 -8
- package/dist/types/checkpoint.d.ts.map +1 -1
- package/dist/types/command-io.d.ts +19 -0
- package/dist/types/command-io.d.ts.map +1 -0
- package/dist/types/command-io.js +3 -0
- package/dist/types/command-io.js.map +1 -0
- package/dist/types/gate.d.ts +72 -0
- package/dist/types/gate.d.ts.map +1 -0
- package/dist/types/gate.js +13 -0
- package/dist/types/gate.js.map +1 -0
- package/dist/utils/attempt.d.ts +22 -0
- package/dist/utils/attempt.d.ts.map +1 -0
- package/dist/utils/attempt.js +40 -0
- package/dist/utils/attempt.js.map +1 -0
- package/dist/utils/detect-source-roots.d.ts.map +1 -1
- package/dist/utils/detect-source-roots.js +42 -51
- package/dist/utils/detect-source-roots.js.map +1 -1
- package/dist/utils/file-walk.d.ts +2 -1
- package/dist/utils/file-walk.d.ts.map +1 -1
- package/dist/utils/file-walk.js +3 -8
- package/dist/utils/file-walk.js.map +1 -1
- package/dist/utils/glob-match.d.ts +10 -0
- package/dist/utils/glob-match.d.ts.map +1 -0
- package/dist/utils/glob-match.js +47 -0
- package/dist/utils/glob-match.js.map +1 -0
- package/dist/utils/jsonl.d.ts +1 -1
- package/dist/utils/jsonl.js +1 -1
- package/dist/utils/package-json.d.ts +49 -0
- package/dist/utils/package-json.d.ts.map +1 -0
- package/dist/utils/package-json.js +78 -0
- package/dist/utils/package-json.js.map +1 -0
- package/dist/utils/package-version.d.ts +5 -2
- package/dist/utils/package-version.d.ts.map +1 -1
- package/dist/utils/package-version.js +8 -11
- package/dist/utils/package-version.js.map +1 -1
- package/dist/utils/yaml-edit.d.ts +26 -0
- package/dist/utils/yaml-edit.d.ts.map +1 -0
- package/dist/utils/yaml-edit.js +98 -0
- package/dist/utils/yaml-edit.js.map +1 -0
- package/package.json +2 -7
- package/src/CONTEXT.md +14 -6
- package/src/__tests__/acceptance-gate.test.ts +25 -55
- package/src/__tests__/contract-gate.test.ts +1 -1
- package/src/__tests__/effective-constraints.test.ts +16 -0
- package/src/__tests__/install-precommit-hook.test.ts +61 -0
- package/src/__tests__/iron-laws.test.ts +5 -5
- package/src/__tests__/layering.test.ts +3 -4
- package/src/__tests__/no-studio-references.test.ts +13 -5
- package/src/__tests__/pretool-use-hook.test.ts +3 -3
- package/src/__tests__/public-exports.test.ts +196 -42
- package/src/__tests__/public-type-surface.test.ts +22 -72
- package/src/__tests__/public-value-surface.test.ts +7 -38
- package/src/__tests__/skip-semantics.test.ts +5 -4
- package/src/__tests__/trace-analyzer-extra.test.ts +1 -13
- package/src/agents/CONTEXT.md +4 -4
- package/src/agents/lifecycle.ts +3 -5
- package/src/cli/__tests__/command-contract.test.ts +18 -0
- package/src/cli/__tests__/gate-command.test.ts +1 -1
- package/src/cli/command-contract.ts +12 -9
- package/src/cli/commands/CONTEXT.md +13 -13
- package/src/cli/commands/__tests__/check.test.ts +1 -1
- package/src/cli/commands/__tests__/command.test.ts +2 -2
- package/src/cli/commands/__tests__/constraints-retire.test.ts +5 -3
- package/src/cli/commands/__tests__/init-governance-io.test.ts +7 -2
- package/src/cli/commands/__tests__/init.test.ts +1 -1
- package/src/cli/commands/__tests__/knowledge-audit-threshold.test.ts +14 -8
- package/src/cli/commands/__tests__/knowledge-flywheel-consistency.test.ts +2 -1
- package/src/cli/commands/__tests__/knowledge-view.test.ts +29 -19
- package/src/cli/commands/__tests__/knowledge.test.ts +6 -2
- package/src/cli/commands/__tests__/numeric-flag-assembly.test.ts +1 -1
- package/src/cli/commands/__tests__/passes-gate.test.ts +100 -24
- package/src/cli/commands/__tests__/project-path-anchoring.test.ts +3 -6
- package/src/cli/commands/__tests__/project-path-convention.test.ts +3 -35
- package/src/cli/commands/__tests__/registry.test.ts +3 -2
- package/src/cli/commands/__tests__/release.test.ts +24 -2
- package/src/cli/commands/__tests__/report-false-green.test.ts +10 -6
- package/src/cli/commands/__tests__/sync-docs-construction-sites.test.ts +175 -0
- package/src/cli/commands/__tests__/validate.test.ts +49 -0
- package/src/cli/commands/acceptance.ts +10 -9
- package/src/cli/commands/command.ts +2 -1
- package/src/cli/commands/constraints-disable.ts +8 -59
- package/src/cli/commands/constraints-pack-proposal.ts +26 -121
- package/src/cli/commands/constraints-reactivate.ts +22 -113
- package/src/cli/commands/constraints-retire.ts +32 -271
- package/src/cli/commands/constraints.ts +6 -30
- package/src/cli/commands/contract.ts +29 -14
- package/src/cli/commands/definitions.ts +13 -12
- package/src/cli/commands/init/ci-platform.ts +66 -0
- package/src/cli/commands/init/ci-wiring.ts +48 -0
- package/src/cli/commands/init/git-hooks.ts +31 -0
- package/src/cli/commands/init/governance.ts +127 -0
- package/src/cli/commands/init/index.ts +156 -0
- package/src/cli/commands/init/output-style.ts +82 -0
- package/src/cli/commands/init/presets.ts +105 -0
- package/src/cli/commands/init/snippets.ts +57 -0
- package/src/cli/commands/knowledge/audit.ts +155 -0
- package/src/cli/commands/knowledge/decay.ts +57 -0
- package/src/cli/commands/knowledge/health.ts +176 -0
- package/src/cli/commands/knowledge/import.ts +82 -0
- package/src/cli/commands/knowledge/index.ts +60 -0
- package/src/cli/commands/knowledge/list.ts +73 -0
- package/src/cli/commands/knowledge/migrate.ts +61 -0
- package/src/cli/commands/knowledge/search.ts +93 -0
- package/src/cli/commands/knowledge/shared.ts +13 -0
- package/src/cli/commands/knowledge/snapshot.ts +38 -0
- package/src/cli/commands/knowledge/stats.ts +112 -0
- package/src/cli/commands/knowledge/sync-rag.ts +48 -0
- package/src/cli/commands/knowledge-view.ts +3 -2
- package/src/cli/commands/passes-gate.ts +14 -2
- package/src/cli/commands/performance.ts +2 -2
- package/src/cli/commands/release.ts +16 -11
- package/src/cli/commands/review.ts +5 -4
- package/src/cli/commands/scaffold-templates.ts +23 -0
- package/src/cli/commands/security.ts +11 -12
- package/src/cli/commands/spec-baseline-check.ts +6 -7
- package/src/cli/commands/status.ts +2 -2
- package/src/cli/commands/sync-docs/__tests__/construction-site-count.test.ts +49 -0
- package/src/cli/commands/sync-docs/agents-syncer.ts +28 -47
- package/src/cli/commands/sync-docs/capabilities-syncer.ts +18 -11
- package/src/cli/commands/sync-docs/compact.ts +35 -0
- package/src/cli/commands/sync-docs/context-syncer.ts +52 -26
- package/src/cli/commands/sync-docs/gate.ts +78 -0
- package/src/cli/commands/sync-docs/index.ts +21 -549
- package/src/cli/commands/sync-docs/main-flow.ts +549 -0
- package/src/cli/commands/sync-docs/project-reader.ts +26 -24
- package/src/cli/commands/validate.ts +7 -0
- package/src/cli/gate-command.ts +2 -2
- package/src/completion-checkers/CONTEXT.md +3 -3
- package/src/completion-checkers/glob-match.ts +3 -35
- package/src/context/CONTEXT.md +7 -10
- package/src/context/__tests__/session-manager.test.ts +18 -7
- package/src/context/index.ts +1 -9
- package/src/context/session-manager.ts +34 -60
- package/src/context/types.ts +2 -22
- package/src/core/CONTEXT.md +10 -5
- package/src/core/__tests__/config-files.test.ts +88 -0
- package/src/core/__tests__/constraint-lifecycle.test.ts +255 -0
- package/src/core/__tests__/constraints-meta.test.ts +26 -0
- package/src/core/__tests__/pack-proposal.test.ts +95 -0
- package/src/core/config-files.ts +39 -0
- package/src/core/constraint-lifecycle.ts +435 -0
- package/src/core/constraints/__tests__/check-cache.test.ts +0 -7
- package/src/core/constraints/__tests__/collect-constraints.test.ts +25 -0
- package/src/core/constraints/__tests__/construction-sites.test.ts +147 -0
- package/src/core/constraints/__tests__/context-reconcile.test.ts +16 -16
- package/src/core/constraints/__tests__/trace-injection.test.ts +14 -15
- package/src/core/constraints/__tests__/usage-report.test.ts +9 -0
- package/src/core/constraints/capabilities-parser.ts +4 -6
- package/src/core/constraints/checker.ts +20 -1
- package/src/core/constraints/checkers/__tests__/no-completion-without-verification.test.ts +22 -3
- package/src/core/constraints/checkers/__tests__/no-hardcoded-credentials.test.ts +56 -41
- package/src/core/constraints/checkers/no-completion-without-verification.ts +16 -1
- package/src/core/constraints/checkers/no-hardcoded-credentials.ts +0 -5
- package/src/core/constraints/checkers/templated/exec.ts +1 -0
- package/src/core/constraints/checkers/templated/file-exists.ts +2 -2
- package/src/core/constraints/checkers/templated/glob.ts +3 -36
- package/src/core/constraints/construction-sites.ts +95 -0
- package/src/core/constraints/context-builder.ts +11 -28
- package/src/core/constraints/definitions/guidelines.ts +19 -0
- package/src/core/constraints/definitions/iron-laws.ts +0 -17
- package/src/core/constraints/doc-freshness/runner.ts +221 -242
- package/src/core/constraints/git-evidence.ts +2 -0
- package/src/core/constraints/index.ts +0 -4
- package/src/core/constraints/injection-writer.ts +3 -6
- package/src/core/constraints/meta.ts +40 -0
- package/src/core/constraints/pack-proposal.ts +179 -0
- package/src/core/constraints/usage-report.ts +3 -1
- package/src/core/effective-constraints.ts +6 -6
- package/src/core/index.ts +0 -15
- package/src/core/project-config-loader.ts +6 -5
- package/src/core/spec/__tests__/validator.test.ts +65 -13
- package/src/core/spec/validator.ts +50 -40
- package/src/core/validators/__tests__/command-success-output.test.ts +56 -0
- package/src/core/validators/__tests__/passes-gate-counts.test.ts +52 -0
- package/src/core/validators/check-handlers/command.ts +53 -10
- package/src/core/validators/check-handlers/http.ts +8 -6
- package/src/core/validators/check-handlers/output.ts +7 -6
- package/src/core/validators/passes-gate.ts +31 -32
- package/src/gates/CONTEXT.md +22 -14
- package/src/gates/__tests__/acceptance-types-single-source.test.ts +22 -19
- package/src/gates/__tests__/acceptance.test.ts +72 -99
- package/src/gates/__tests__/command-single-predicate.test.ts +1 -1
- package/src/gates/__tests__/command.test.ts +24 -25
- package/src/gates/__tests__/decision.test.ts +35 -0
- package/src/gates/__tests__/gate-interface.test.ts +2 -5
- package/src/gates/__tests__/performance.test.ts +3 -3
- package/src/gates/__tests__/security.test.ts +7 -19
- package/src/gates/acceptance.ts +176 -131
- package/src/gates/checker-gate.ts +2 -1
- package/src/gates/command.ts +4 -38
- package/src/gates/contract.ts +86 -79
- package/src/gates/definitions.ts +2 -2
- package/src/gates/performance.ts +35 -19
- package/src/gates/registry.ts +7 -4
- package/src/gates/review.ts +38 -10
- package/src/gates/security.ts +94 -81
- package/src/gates/types.ts +23 -77
- package/src/hooks/CONTEXT.md +1 -1
- package/src/index.ts +57 -98
- package/src/knowledge/CONTEXT.md +14 -10
- package/src/knowledge/__tests__/audit-labels.test.ts +3 -3
- package/src/knowledge/__tests__/audit-scoring.test.ts +9 -7
- package/src/knowledge/__tests__/ingest.test.ts +17 -17
- package/src/knowledge/__tests__/store.test.ts +4 -6
- package/src/knowledge/__tests__/token-estimate.test.ts +54 -0
- package/src/knowledge/audit-dimensions.ts +190 -0
- package/src/knowledge/audit-rules.ts +335 -0
- package/src/knowledge/audit-scoring.ts +7 -495
- package/src/knowledge/audit.ts +9 -11
- package/src/knowledge/import.ts +7 -6
- package/src/knowledge/index-generator.ts +48 -53
- package/src/knowledge/index.ts +5 -5
- package/src/knowledge/ingest.ts +27 -12
- package/src/knowledge/lifecycle.ts +17 -19
- package/src/knowledge/query.ts +20 -20
- package/src/knowledge/reference-tracker.ts +14 -16
- package/src/knowledge/store.ts +17 -32
- package/src/knowledge/token-estimate.ts +27 -0
- package/src/monitoring/CONTEXT.md +6 -8
- package/src/monitoring/__tests__/prune-trace-logs.test.ts +76 -0
- package/src/monitoring/__tests__/traces.test.ts +1 -17
- package/src/monitoring/analyzer-base.ts +0 -18
- package/src/monitoring/index.ts +2 -7
- package/src/monitoring/trace-analyzer.ts +12 -17
- package/src/monitoring/traces.ts +59 -57
- package/src/pretool-use-hook.ts +28 -23
- package/src/release/CONTEXT.md +2 -2
- package/src/release/__tests__/integrity.test.ts +3 -7
- package/src/release/integrity.ts +8 -11
- package/src/sdd/index-generator.ts +4 -0
- package/src/test-setup/jsonl-fake-fs.ts +1 -1
- package/src/types/checkpoint.ts +8 -8
- package/src/types/command-io.ts +14 -0
- package/src/types/gate.ts +77 -0
- package/src/utils/__tests__/attempt.test.ts +94 -0
- package/src/utils/__tests__/glob-match.test.ts +52 -0
- package/src/utils/__tests__/jsonl-skip-disposition.test.ts +0 -1
- package/src/utils/__tests__/package-json.test.ts +58 -0
- package/src/utils/__tests__/package-version.test.ts +21 -2
- package/src/utils/__tests__/yaml-edit.test.ts +62 -0
- package/src/utils/attempt.ts +35 -0
- package/src/utils/detect-source-roots.ts +38 -44
- package/src/utils/file-walk.ts +3 -7
- package/src/utils/glob-match.ts +41 -0
- package/src/utils/jsonl.ts +1 -1
- package/src/utils/package-json.ts +61 -0
- package/src/utils/package-version.ts +8 -10
- package/src/utils/yaml-edit.ts +67 -0
- package/dist/cli/commands/init.d.ts.map +0 -1
- package/dist/cli/commands/init.js +0 -517
- package/dist/cli/commands/init.js.map +0 -1
- package/dist/cli/commands/knowledge.d.ts +0 -169
- package/dist/cli/commands/knowledge.d.ts.map +0 -1
- package/dist/cli/commands/knowledge.js +0 -700
- package/dist/cli/commands/knowledge.js.map +0 -1
- package/dist/context/knowledge-injector.d.ts +0 -51
- package/dist/context/knowledge-injector.d.ts.map +0 -1
- package/dist/context/knowledge-injector.js +0 -129
- package/dist/context/knowledge-injector.js.map +0 -1
- package/dist/context/token-budget.d.ts +0 -115
- package/dist/context/token-budget.d.ts.map +0 -1
- package/dist/context/token-budget.js +0 -200
- package/dist/context/token-budget.js.map +0 -1
- package/dist/gates/index.d.ts +0 -44
- package/dist/gates/index.d.ts.map +0 -1
- package/dist/gates/index.js +0 -85
- package/dist/gates/index.js.map +0 -1
- package/dist/gates/runner.d.ts +0 -30
- package/dist/gates/runner.d.ts.map +0 -1
- package/dist/gates/runner.js +0 -38
- package/dist/gates/runner.js.map +0 -1
- package/dist/knowledge/primitives/code-structure.d.ts +0 -37
- package/dist/knowledge/primitives/code-structure.d.ts.map +0 -1
- package/dist/knowledge/primitives/code-structure.js +0 -185
- package/dist/knowledge/primitives/code-structure.js.map +0 -1
- package/dist/monitoring/context-tracker.d.ts +0 -38
- package/dist/monitoring/context-tracker.d.ts.map +0 -1
- package/dist/monitoring/context-tracker.js +0 -153
- package/dist/monitoring/context-tracker.js.map +0 -1
- package/dist/tools/definitions/core/code/fingerprint.sh +0 -273
- package/dist/tools/definitions/core/code/fingerprint.yml +0 -72
- package/dist/tools/definitions/core/code/parse.yml +0 -68
- package/dist/tools/definitions/core/code/register-language.sh +0 -475
- package/dist/tools/definitions/core/code/register-language.yml +0 -74
- package/dist/tools/definitions/core/docker/build.yml +0 -73
- package/dist/tools/definitions/core/docker/run.yml +0 -81
- package/dist/tools/definitions/core/file/copy.yml +0 -88
- package/dist/tools/definitions/core/file/read.yml +0 -69
- package/dist/tools/definitions/core/file/write.yml +0 -75
- package/dist/tools/definitions/core/git/branch.yml +0 -61
- package/dist/tools/definitions/core/git/cleanup-worktree.yml +0 -50
- package/dist/tools/definitions/core/git/clone.yml +0 -69
- package/dist/tools/definitions/core/git/commit.yml +0 -65
- package/dist/tools/definitions/core/git/push.yml +0 -79
- package/dist/tools/definitions/core/git/worktree.yml +0 -96
- package/dist/tools/definitions/core/notification/notify.sh +0 -152
- package/dist/tools/definitions/core/notification/notify.yml +0 -59
- package/dist/tools/definitions/core/npm/build.yml +0 -75
- package/dist/tools/definitions/core/npm/install.yml +0 -58
- package/dist/tools/definitions/core/npm/test.yml +0 -75
- package/dist/tools/definitions/core/validation/check-reuse.yml +0 -170
- package/dist/tools/definitions/core/validation/validate-handlers.yml +0 -118
- package/dist/tools/definitions/core/validation/validate-readme-stats.yml +0 -155
- package/dist/tools/definitions/core/validation/validate-yaml-syntax.yml +0 -134
- package/dist/tools/definitions/ext/browser/browser-automate.sh +0 -255
- package/dist/tools/definitions/ext/browser/browser-automate.yml +0 -166
- package/dist/tools/definitions/ext/browser/browser-close.sh +0 -104
- package/dist/tools/definitions/ext/browser/browser-close.yml +0 -54
- package/dist/tools/definitions/ext/browser/browser-mcp-debug.sh +0 -682
- package/dist/tools/definitions/ext/browser/browser-mcp-debug.yml +0 -167
- package/dist/tools/definitions/ext/browser/browser-start.sh +0 -101
- package/dist/tools/definitions/ext/browser/browser-start.yml +0 -61
- package/dist/tools/definitions/registry.json +0 -795
- package/dist/tools/definitions/std/README.md +0 -350
- package/dist/tools/definitions/std/analysis/analyze-codebase.yml +0 -72
- package/dist/tools/definitions/std/analysis/analyze-diff.yml +0 -182
- package/dist/tools/definitions/std/analysis/analyze-git-diff.yml +0 -70
- package/dist/tools/definitions/std/analysis/analyze-impact.yml +0 -78
- package/dist/tools/definitions/std/analysis/analyze-requirements.yml +0 -105
- package/dist/tools/definitions/std/analysis/brainstorm-options.yml +0 -106
- package/dist/tools/definitions/std/analysis/build-graph.yml +0 -154
- package/dist/tools/definitions/std/analysis/clarify-requirements.yml +0 -90
- package/dist/tools/definitions/std/analysis/detect-context.yml +0 -109
- package/dist/tools/definitions/std/analysis/detect-layers.yml +0 -125
- package/dist/tools/definitions/std/analysis/generate-tour.yml +0 -102
- package/dist/tools/definitions/std/analysis/search-enhance.yml +0 -105
- package/dist/tools/definitions/std/backlog/add.yml +0 -51
- package/dist/tools/definitions/std/backlog/decide.yml +0 -39
- package/dist/tools/definitions/std/backlog/github-sync.yml +0 -161
- package/dist/tools/definitions/std/backlog/list.yml +0 -53
- package/dist/tools/definitions/std/backlog/load.yml +0 -46
- package/dist/tools/definitions/std/backlog/resolve.yml +0 -37
- package/dist/tools/definitions/std/backlog/update.yml +0 -42
- package/dist/tools/definitions/std/bugfix/diagnose.yml +0 -68
- package/dist/tools/definitions/std/bugfix/fix.yml +0 -66
- package/dist/tools/definitions/std/bugfix/verify.yml +0 -69
- package/dist/tools/definitions/std/constraint/check-decomposition.yml +0 -103
- package/dist/tools/definitions/std/constraint/check-feature-list.yml +0 -77
- package/dist/tools/definitions/std/constraint/check-progress.yml +0 -97
- package/dist/tools/definitions/std/constraint/generate-report.yml +0 -147
- package/dist/tools/definitions/std/deploy/commit-push.yml +0 -33
- package/dist/tools/definitions/std/deploy/deploy-backend.yml +0 -37
- package/dist/tools/definitions/std/deploy/deploy-frontend.yml +0 -37
- package/dist/tools/definitions/std/deploy/rollback.yml +0 -148
- package/dist/tools/definitions/std/design/analyze-architecture-impact.yml +0 -113
- package/dist/tools/definitions/std/design/design-api.yml +0 -55
- package/dist/tools/definitions/std/design/design-architecture.yml +0 -97
- package/dist/tools/definitions/std/design/design-db.yml +0 -81
- package/dist/tools/definitions/std/design/generate-spec.yml +0 -182
- package/dist/tools/definitions/std/development/develop-api.yml +0 -85
- package/dist/tools/definitions/std/development/develop-backend.yml +0 -88
- package/dist/tools/definitions/std/development/develop-frontend.yml +0 -87
- package/dist/tools/definitions/std/development/develop-shared-types.yml +0 -74
- package/dist/tools/definitions/std/development/develop-task.yml +0 -122
- package/dist/tools/definitions/std/development/develop-tests.yml +0 -76
- package/dist/tools/definitions/std/development/execute-batch.yml +0 -152
- package/dist/tools/definitions/std/development/fix-issues.yml +0 -100
- package/dist/tools/definitions/std/development/implement-task.yml +0 -124
- package/dist/tools/definitions/std/development/review-fix-cycle.yml +0 -232
- package/dist/tools/definitions/std/evolution/implement.yml +0 -124
- package/dist/tools/definitions/std/evolution/prioritize.yml +0 -111
- package/dist/tools/definitions/std/evolution/report-gap.yml +0 -165
- package/dist/tools/definitions/std/file/read.yml +0 -21
- package/dist/tools/definitions/std/governance/aggregate-opinions.sh +0 -201
- package/dist/tools/definitions/std/governance/aggregate-opinions.yml +0 -78
- package/dist/tools/definitions/std/governance/audit-task.yml +0 -177
- package/dist/tools/definitions/std/governance/cast-vote.yml +0 -128
- package/dist/tools/definitions/std/governance/collect-issues.yml +0 -16
- package/dist/tools/definitions/std/governance/create-signed-document.yml +0 -23
- package/dist/tools/definitions/std/governance/create-voting-session.yml +0 -100
- package/dist/tools/definitions/std/governance/define-stance.sh +0 -243
- package/dist/tools/definitions/std/governance/define-stance.yml +0 -81
- package/dist/tools/definitions/std/governance/generate-review-report.yml +0 -23
- package/dist/tools/definitions/std/governance/impeach.yml +0 -178
- package/dist/tools/definitions/std/governance/multi-stance-review.yml +0 -153
- package/dist/tools/definitions/std/governance/prepare-artifact.yml +0 -20
- package/dist/tools/definitions/std/governance/review-spec-approval.yml +0 -262
- package/dist/tools/definitions/std/governance/rollback.yml +0 -185
- package/dist/tools/definitions/std/governance/stance-review.yml +0 -148
- package/dist/tools/definitions/std/governance/track-effect.yml +0 -198
- package/dist/tools/definitions/std/governance/vote-tally.yml +0 -143
- package/dist/tools/definitions/std/patch/execute.yml +0 -51
- package/dist/tools/definitions/std/planning/generate-tasks.yml +0 -36
- package/dist/tools/definitions/std/planning/load-tasks.yml +0 -44
- package/dist/tools/definitions/std/planning/split-batch.yml +0 -480
- package/dist/tools/definitions/std/planning/split-tasks.yml +0 -358
- package/dist/tools/definitions/std/planning/update-tasks.yml +0 -51
- package/dist/tools/definitions/std/planning/validate-tasks.yml +0 -46
- package/dist/tools/definitions/std/project/decide-next-workflow.yml +0 -38
- package/dist/tools/definitions/std/project/load-state.yml +0 -31
- package/dist/tools/definitions/std/project/save-state.yml +0 -32
- package/dist/tools/definitions/std/quality/check-quality.yml +0 -241
- package/dist/tools/definitions/std/quality/debug-systematic.yml +0 -163
- package/dist/tools/definitions/std/quality/handle-feedback.yml +0 -108
- package/dist/tools/definitions/std/quality/review-code.yml +0 -128
- package/dist/tools/definitions/std/quality/review-spec.yml +0 -140
- package/dist/tools/definitions/std/quality/review-task.yml +0 -190
- package/dist/tools/definitions/std/quality/run-tests.yml +0 -80
- package/dist/tools/definitions/std/quick/analyze.yml +0 -56
- package/dist/tools/definitions/std/quick/implement.yml +0 -67
- package/dist/tools/definitions/std/quick/verify.yml +0 -71
- package/dist/tools/definitions/std/verification/verify_completion.yml +0 -113
- package/dist/tools/definitions/std/verification/wait-condition.yml +0 -107
- package/dist/tools/index.d.ts +0 -5
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -10
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/paths.d.ts +0 -9
- package/dist/tools/paths.d.ts.map +0 -1
- package/dist/tools/paths.js.map +0 -1
- package/src/__tests__/token-budget.test.ts +0 -252
- package/src/cli/commands/init.ts +0 -604
- package/src/cli/commands/knowledge.ts +0 -820
- package/src/context/__tests__/knowledge-injector.test.ts +0 -178
- package/src/context/__tests__/token-budget.test.ts +0 -258
- package/src/context/knowledge-injector.ts +0 -175
- package/src/context/token-budget.ts +0 -222
- package/src/gates/__tests__/runner.test.ts +0 -81
- package/src/gates/index.ts +0 -98
- package/src/gates/runner.ts +0 -57
- package/src/knowledge/primitives/__tests__/code-structure-degrade.test.ts +0 -24
- package/src/knowledge/primitives/__tests__/code-structure.test.ts +0 -120
- package/src/knowledge/primitives/code-structure.ts +0 -185
- package/src/monitoring/__tests__/context-tracker.test.ts +0 -180
- package/src/monitoring/context-tracker.ts +0 -136
- package/src/tools/CONTEXT.md +0 -24
- package/src/tools/__tests__/registry.test.ts +0 -221
- package/src/tools/definitions/core/code/fingerprint.sh +0 -273
- package/src/tools/definitions/core/code/fingerprint.yml +0 -72
- package/src/tools/definitions/core/code/parse.yml +0 -68
- package/src/tools/definitions/core/code/register-language.sh +0 -475
- package/src/tools/definitions/core/code/register-language.yml +0 -74
- package/src/tools/definitions/core/docker/build.yml +0 -73
- package/src/tools/definitions/core/docker/run.yml +0 -81
- package/src/tools/definitions/core/file/copy.yml +0 -88
- package/src/tools/definitions/core/file/read.yml +0 -69
- package/src/tools/definitions/core/file/write.yml +0 -75
- package/src/tools/definitions/core/git/branch.yml +0 -61
- package/src/tools/definitions/core/git/cleanup-worktree.yml +0 -50
- package/src/tools/definitions/core/git/clone.yml +0 -69
- package/src/tools/definitions/core/git/commit.yml +0 -65
- package/src/tools/definitions/core/git/push.yml +0 -79
- package/src/tools/definitions/core/git/worktree.yml +0 -96
- package/src/tools/definitions/core/notification/notify.sh +0 -152
- package/src/tools/definitions/core/notification/notify.yml +0 -59
- package/src/tools/definitions/core/npm/build.yml +0 -75
- package/src/tools/definitions/core/npm/install.yml +0 -58
- package/src/tools/definitions/core/npm/test.yml +0 -75
- package/src/tools/definitions/core/validation/check-reuse.yml +0 -170
- package/src/tools/definitions/core/validation/validate-handlers.yml +0 -118
- package/src/tools/definitions/core/validation/validate-readme-stats.yml +0 -155
- package/src/tools/definitions/core/validation/validate-yaml-syntax.yml +0 -134
- package/src/tools/definitions/ext/browser/browser-automate.sh +0 -255
- package/src/tools/definitions/ext/browser/browser-automate.yml +0 -166
- package/src/tools/definitions/ext/browser/browser-close.sh +0 -104
- package/src/tools/definitions/ext/browser/browser-close.yml +0 -54
- package/src/tools/definitions/ext/browser/browser-mcp-debug.sh +0 -682
- package/src/tools/definitions/ext/browser/browser-mcp-debug.yml +0 -167
- package/src/tools/definitions/ext/browser/browser-start.sh +0 -101
- package/src/tools/definitions/ext/browser/browser-start.yml +0 -61
- package/src/tools/definitions/registry.json +0 -795
- package/src/tools/definitions/std/README.md +0 -350
- package/src/tools/definitions/std/analysis/analyze-codebase.yml +0 -72
- package/src/tools/definitions/std/analysis/analyze-diff.yml +0 -182
- package/src/tools/definitions/std/analysis/analyze-git-diff.yml +0 -70
- package/src/tools/definitions/std/analysis/analyze-impact.yml +0 -78
- package/src/tools/definitions/std/analysis/analyze-requirements.yml +0 -105
- package/src/tools/definitions/std/analysis/brainstorm-options.yml +0 -106
- package/src/tools/definitions/std/analysis/build-graph.yml +0 -154
- package/src/tools/definitions/std/analysis/clarify-requirements.yml +0 -90
- package/src/tools/definitions/std/analysis/detect-context.yml +0 -109
- package/src/tools/definitions/std/analysis/detect-layers.yml +0 -125
- package/src/tools/definitions/std/analysis/generate-tour.yml +0 -102
- package/src/tools/definitions/std/analysis/search-enhance.yml +0 -105
- package/src/tools/definitions/std/backlog/add.yml +0 -51
- package/src/tools/definitions/std/backlog/decide.yml +0 -39
- package/src/tools/definitions/std/backlog/github-sync.yml +0 -161
- package/src/tools/definitions/std/backlog/list.yml +0 -53
- package/src/tools/definitions/std/backlog/load.yml +0 -46
- package/src/tools/definitions/std/backlog/resolve.yml +0 -37
- package/src/tools/definitions/std/backlog/update.yml +0 -42
- package/src/tools/definitions/std/bugfix/diagnose.yml +0 -68
- package/src/tools/definitions/std/bugfix/fix.yml +0 -66
- package/src/tools/definitions/std/bugfix/verify.yml +0 -69
- package/src/tools/definitions/std/constraint/check-decomposition.yml +0 -103
- package/src/tools/definitions/std/constraint/check-feature-list.yml +0 -77
- package/src/tools/definitions/std/constraint/check-progress.yml +0 -97
- package/src/tools/definitions/std/constraint/generate-report.yml +0 -147
- package/src/tools/definitions/std/deploy/commit-push.yml +0 -33
- package/src/tools/definitions/std/deploy/deploy-backend.yml +0 -37
- package/src/tools/definitions/std/deploy/deploy-frontend.yml +0 -37
- package/src/tools/definitions/std/deploy/rollback.yml +0 -148
- package/src/tools/definitions/std/design/analyze-architecture-impact.yml +0 -113
- package/src/tools/definitions/std/design/design-api.yml +0 -55
- package/src/tools/definitions/std/design/design-architecture.yml +0 -97
- package/src/tools/definitions/std/design/design-db.yml +0 -81
- package/src/tools/definitions/std/design/generate-spec.yml +0 -182
- package/src/tools/definitions/std/development/develop-api.yml +0 -85
- package/src/tools/definitions/std/development/develop-backend.yml +0 -88
- package/src/tools/definitions/std/development/develop-frontend.yml +0 -87
- package/src/tools/definitions/std/development/develop-shared-types.yml +0 -74
- package/src/tools/definitions/std/development/develop-task.yml +0 -122
- package/src/tools/definitions/std/development/develop-tests.yml +0 -76
- package/src/tools/definitions/std/development/execute-batch.yml +0 -152
- package/src/tools/definitions/std/development/fix-issues.yml +0 -100
- package/src/tools/definitions/std/development/implement-task.yml +0 -124
- package/src/tools/definitions/std/development/review-fix-cycle.yml +0 -232
- package/src/tools/definitions/std/evolution/implement.yml +0 -124
- package/src/tools/definitions/std/evolution/prioritize.yml +0 -111
- package/src/tools/definitions/std/evolution/report-gap.yml +0 -165
- package/src/tools/definitions/std/file/read.yml +0 -21
- package/src/tools/definitions/std/governance/aggregate-opinions.sh +0 -201
- package/src/tools/definitions/std/governance/aggregate-opinions.yml +0 -78
- package/src/tools/definitions/std/governance/audit-task.yml +0 -177
- package/src/tools/definitions/std/governance/cast-vote.yml +0 -128
- package/src/tools/definitions/std/governance/collect-issues.yml +0 -16
- package/src/tools/definitions/std/governance/create-signed-document.yml +0 -23
- package/src/tools/definitions/std/governance/create-voting-session.yml +0 -100
- package/src/tools/definitions/std/governance/define-stance.sh +0 -243
- package/src/tools/definitions/std/governance/define-stance.yml +0 -81
- package/src/tools/definitions/std/governance/generate-review-report.yml +0 -23
- package/src/tools/definitions/std/governance/impeach.yml +0 -178
- package/src/tools/definitions/std/governance/multi-stance-review.yml +0 -153
- package/src/tools/definitions/std/governance/prepare-artifact.yml +0 -20
- package/src/tools/definitions/std/governance/review-spec-approval.yml +0 -262
- package/src/tools/definitions/std/governance/rollback.yml +0 -185
- package/src/tools/definitions/std/governance/stance-review.yml +0 -148
- package/src/tools/definitions/std/governance/track-effect.yml +0 -198
- package/src/tools/definitions/std/governance/vote-tally.yml +0 -143
- package/src/tools/definitions/std/patch/execute.yml +0 -51
- package/src/tools/definitions/std/planning/generate-tasks.yml +0 -36
- package/src/tools/definitions/std/planning/load-tasks.yml +0 -44
- package/src/tools/definitions/std/planning/split-batch.yml +0 -480
- package/src/tools/definitions/std/planning/split-tasks.yml +0 -358
- package/src/tools/definitions/std/planning/update-tasks.yml +0 -51
- package/src/tools/definitions/std/planning/validate-tasks.yml +0 -46
- package/src/tools/definitions/std/project/decide-next-workflow.yml +0 -38
- package/src/tools/definitions/std/project/load-state.yml +0 -31
- package/src/tools/definitions/std/project/save-state.yml +0 -32
- package/src/tools/definitions/std/quality/check-quality.yml +0 -241
- package/src/tools/definitions/std/quality/debug-systematic.yml +0 -163
- package/src/tools/definitions/std/quality/handle-feedback.yml +0 -108
- package/src/tools/definitions/std/quality/review-code.yml +0 -128
- package/src/tools/definitions/std/quality/review-spec.yml +0 -140
- package/src/tools/definitions/std/quality/review-task.yml +0 -190
- package/src/tools/definitions/std/quality/run-tests.yml +0 -80
- package/src/tools/definitions/std/quick/analyze.yml +0 -56
- package/src/tools/definitions/std/quick/implement.yml +0 -67
- package/src/tools/definitions/std/quick/verify.yml +0 -71
- package/src/tools/definitions/std/verification/verify_completion.yml +0 -113
- package/src/tools/definitions/std/verification/wait-condition.yml +0 -107
- package/src/tools/index.ts +0 -5
- package/src/tools/paths.ts +0 -15
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
# audit-task.yml - 任务审计步骤
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 类型: 治理类步骤
|
|
4
|
-
# 执行方式: Agent(auditor 角色)
|
|
5
|
-
# 用途: 审计特定任务的执行质量
|
|
6
|
-
# 核心理念: 独立审计,发现异常,追溯原因
|
|
7
|
-
# ============================================================================
|
|
8
|
-
|
|
9
|
-
name: audit-task
|
|
10
|
-
stage: govern
|
|
11
|
-
description: 审计特定任务的执行质量
|
|
12
|
-
category: governance
|
|
13
|
-
version: 1.0.0
|
|
14
|
-
|
|
15
|
-
# Agent 配置
|
|
16
|
-
agent: codex
|
|
17
|
-
temperature: 0.3 # 低温度,保证一致性
|
|
18
|
-
|
|
19
|
-
# 工具引用
|
|
20
|
-
tools:
|
|
21
|
-
- file-read
|
|
22
|
-
- git/log
|
|
23
|
-
- git/diff
|
|
24
|
-
- analysis/analyze-code
|
|
25
|
-
|
|
26
|
-
# 输入定义
|
|
27
|
-
inputs:
|
|
28
|
-
task_id:
|
|
29
|
-
type: string
|
|
30
|
-
description: 要审计的任务 ID
|
|
31
|
-
required: true
|
|
32
|
-
|
|
33
|
-
project_path:
|
|
34
|
-
type: path
|
|
35
|
-
description: 项目路径
|
|
36
|
-
required: true
|
|
37
|
-
|
|
38
|
-
audit_depth:
|
|
39
|
-
type: string
|
|
40
|
-
description: 审计深度
|
|
41
|
-
enum: [quick, standard, deep]
|
|
42
|
-
default: standard
|
|
43
|
-
|
|
44
|
-
focus_areas:
|
|
45
|
-
type: array
|
|
46
|
-
description: 重点审计领域
|
|
47
|
-
default: [quality, process, compliance]
|
|
48
|
-
items:
|
|
49
|
-
type: string
|
|
50
|
-
enum: [quality, process, compliance, security, performance]
|
|
51
|
-
|
|
52
|
-
# 审计检查项
|
|
53
|
-
audit_checks:
|
|
54
|
-
quality:
|
|
55
|
-
- name: 代码质量
|
|
56
|
-
checks:
|
|
57
|
-
- 是否遵循编码规范
|
|
58
|
-
- 是否有充分的测试覆盖
|
|
59
|
-
- 是否有明显的 bug 或问题
|
|
60
|
-
- name: 文档完整性
|
|
61
|
-
checks:
|
|
62
|
-
- 是否更新了相关文档
|
|
63
|
-
- 注释是否清晰
|
|
64
|
-
- 提交信息是否规范
|
|
65
|
-
|
|
66
|
-
process:
|
|
67
|
-
- name: 流程合规
|
|
68
|
-
checks:
|
|
69
|
-
- 是否按工作流步骤执行
|
|
70
|
-
- 是否跳过了必做步骤
|
|
71
|
-
- 是否通过了必要的审核
|
|
72
|
-
- name: 签署文档
|
|
73
|
-
checks:
|
|
74
|
-
- 是否有必要的签署记录
|
|
75
|
-
- 签署是否完整
|
|
76
|
-
- 是否有遗漏的审核环节
|
|
77
|
-
|
|
78
|
-
compliance:
|
|
79
|
-
- name: 约束遵守
|
|
80
|
-
checks:
|
|
81
|
-
- 是否遵守约束级别要求
|
|
82
|
-
- 是否在权限范围内操作
|
|
83
|
-
- 是否有越权行为
|
|
84
|
-
|
|
85
|
-
# Agent Prompt
|
|
86
|
-
prompt: |
|
|
87
|
-
你是审计官(Auditor),独立于项目团队,负责监督。
|
|
88
|
-
|
|
89
|
-
## 你的职责
|
|
90
|
-
- 发现执行中的问题
|
|
91
|
-
- 追溯问题根源
|
|
92
|
-
- 评估严重程度
|
|
93
|
-
- 提出改进建议
|
|
94
|
-
|
|
95
|
-
## 你的立场
|
|
96
|
-
- 独立客观,不受项目进度影响
|
|
97
|
-
- 严谨细致,不放过细节
|
|
98
|
-
- 公正公平,不偏袒任何角色
|
|
99
|
-
|
|
100
|
-
## 禁止行为
|
|
101
|
-
- 参与项目开发
|
|
102
|
-
- 修改代码或文档
|
|
103
|
-
- 影响项目进度决策
|
|
104
|
-
|
|
105
|
-
## 审计任务
|
|
106
|
-
审计任务: {{task_id}}
|
|
107
|
-
项目路径: {{project_path}}
|
|
108
|
-
审计深度: {{audit_depth}}
|
|
109
|
-
重点领域: {{focus_areas}}
|
|
110
|
-
|
|
111
|
-
## 输出格式
|
|
112
|
-
|
|
113
|
-
```yaml
|
|
114
|
-
audit_result:
|
|
115
|
-
task_id: {{task_id}}
|
|
116
|
-
|
|
117
|
-
findings:
|
|
118
|
-
- category: quality/process/compliance
|
|
119
|
-
severity: critical/major/minor/suggestion
|
|
120
|
-
description: 问题描述
|
|
121
|
-
evidence:
|
|
122
|
-
- 证据1
|
|
123
|
-
- 证据2
|
|
124
|
-
recommendation: 改进建议
|
|
125
|
-
|
|
126
|
-
statistics:
|
|
127
|
-
issues_found: N
|
|
128
|
-
critical: N
|
|
129
|
-
major: N
|
|
130
|
-
minor: N
|
|
131
|
-
suggestion: N
|
|
132
|
-
|
|
133
|
-
overall_assessment: pass/warn/fail
|
|
134
|
-
|
|
135
|
-
impeachment_required: true/false
|
|
136
|
-
impeachment_reason: 如果需要弹劾,说明原因
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
# 输出定义
|
|
140
|
-
outputs:
|
|
141
|
-
- name: audit_result
|
|
142
|
-
type: object
|
|
143
|
-
description: 审计结果
|
|
144
|
-
|
|
145
|
-
- name: findings
|
|
146
|
-
type: array
|
|
147
|
-
description: 审计发现列表
|
|
148
|
-
items:
|
|
149
|
-
type: object
|
|
150
|
-
properties:
|
|
151
|
-
category:
|
|
152
|
-
type: string
|
|
153
|
-
severity:
|
|
154
|
-
type: string
|
|
155
|
-
description:
|
|
156
|
-
type: string
|
|
157
|
-
evidence:
|
|
158
|
-
type: array
|
|
159
|
-
recommendation:
|
|
160
|
-
type: string
|
|
161
|
-
|
|
162
|
-
- name: overall_assessment
|
|
163
|
-
type: string
|
|
164
|
-
enum: [pass, warn, fail]
|
|
165
|
-
|
|
166
|
-
- name: impeachment_required
|
|
167
|
-
type: boolean
|
|
168
|
-
|
|
169
|
-
- name: impeachment_reason
|
|
170
|
-
type: string
|
|
171
|
-
|
|
172
|
-
# 元数据
|
|
173
|
-
metadata:
|
|
174
|
-
tags:
|
|
175
|
-
- governance
|
|
176
|
-
- audit
|
|
177
|
-
- quality
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# cast-vote.yml - 投票步骤
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 类型: 治理类步骤
|
|
4
|
-
# 执行方式: 内置处理器
|
|
5
|
-
# 用途: 角色对进化建议/审计报告进行投票
|
|
6
|
-
# 核心理念: 每人一票,Owner 有否决权
|
|
7
|
-
# ============================================================================
|
|
8
|
-
|
|
9
|
-
name: cast-vote
|
|
10
|
-
stage: govern
|
|
11
|
-
description: 角色对进化建议/审计报告进行投票
|
|
12
|
-
category: governance
|
|
13
|
-
version: 1.0.0
|
|
14
|
-
|
|
15
|
-
# 执行配置
|
|
16
|
-
execute:
|
|
17
|
-
type: builtin
|
|
18
|
-
handler: governance/cast-vote
|
|
19
|
-
|
|
20
|
-
# 输入定义
|
|
21
|
-
inputs:
|
|
22
|
-
voting_session_id:
|
|
23
|
-
type: string
|
|
24
|
-
description: 投票会话 ID
|
|
25
|
-
required: true
|
|
26
|
-
|
|
27
|
-
voter_id:
|
|
28
|
-
type: string
|
|
29
|
-
description: 投票者 ID(角色 ID 或 'owner')
|
|
30
|
-
required: true
|
|
31
|
-
|
|
32
|
-
voter_type:
|
|
33
|
-
type: string
|
|
34
|
-
description: 投票者类型
|
|
35
|
-
enum: [role, user]
|
|
36
|
-
default: role
|
|
37
|
-
|
|
38
|
-
vote:
|
|
39
|
-
type: string
|
|
40
|
-
description: 投票选择
|
|
41
|
-
enum: [approve, reject, abstain]
|
|
42
|
-
required: true
|
|
43
|
-
|
|
44
|
-
reason:
|
|
45
|
-
type: string
|
|
46
|
-
description: 投票理由
|
|
47
|
-
required: false
|
|
48
|
-
|
|
49
|
-
weight:
|
|
50
|
-
type: string
|
|
51
|
-
description: 投票权重
|
|
52
|
-
enum: [normal, heavy, veto]
|
|
53
|
-
default: normal
|
|
54
|
-
|
|
55
|
-
# 投票规则
|
|
56
|
-
voting_rules:
|
|
57
|
-
# 权重映射
|
|
58
|
-
weight_values:
|
|
59
|
-
normal: 1
|
|
60
|
-
heavy: 2
|
|
61
|
-
veto: 999999 # 否决权视为无限权重
|
|
62
|
-
|
|
63
|
-
# 默认权重分配
|
|
64
|
-
default_weights:
|
|
65
|
-
auditor: normal
|
|
66
|
-
architect: normal
|
|
67
|
-
decider: normal
|
|
68
|
-
owner: veto
|
|
69
|
-
|
|
70
|
-
# 禁止行为
|
|
71
|
-
forbidden:
|
|
72
|
-
- 不能投自己的票(角色不能对自己相关的建议投票)
|
|
73
|
-
- 不能重复投票
|
|
74
|
-
- 不能修改已投的票
|
|
75
|
-
|
|
76
|
-
# 输出定义
|
|
77
|
-
outputs:
|
|
78
|
-
- name: vote_recorded
|
|
79
|
-
type: boolean
|
|
80
|
-
description: 投票是否成功记录
|
|
81
|
-
|
|
82
|
-
- name: vote_id
|
|
83
|
-
type: string
|
|
84
|
-
description: 投票记录 ID
|
|
85
|
-
|
|
86
|
-
- name: session_status
|
|
87
|
-
type: string
|
|
88
|
-
description: 投票会话当前状态
|
|
89
|
-
|
|
90
|
-
- name: current_statistics
|
|
91
|
-
type: object
|
|
92
|
-
description: 当前投票统计
|
|
93
|
-
properties:
|
|
94
|
-
approve_count:
|
|
95
|
-
type: number
|
|
96
|
-
reject_count:
|
|
97
|
-
type: number
|
|
98
|
-
abstain_count:
|
|
99
|
-
type: number
|
|
100
|
-
total_voters:
|
|
101
|
-
type: number
|
|
102
|
-
remaining_voters:
|
|
103
|
-
type: number
|
|
104
|
-
|
|
105
|
-
# 错误处理
|
|
106
|
-
errors:
|
|
107
|
-
VOTER_NOT_PARTICIPANT:
|
|
108
|
-
message: "投票者不在参与者列表中"
|
|
109
|
-
severity: error
|
|
110
|
-
|
|
111
|
-
ALREADY_VOTED:
|
|
112
|
-
message: "该投票者已投过票"
|
|
113
|
-
severity: error
|
|
114
|
-
|
|
115
|
-
SESSION_CLOSED:
|
|
116
|
-
message: "投票会话已关闭"
|
|
117
|
-
severity: error
|
|
118
|
-
|
|
119
|
-
CONFLICT_OF_INTEREST:
|
|
120
|
-
message: "投票者与投票事项存在利益冲突"
|
|
121
|
-
severity: error
|
|
122
|
-
|
|
123
|
-
# 元数据
|
|
124
|
-
metadata:
|
|
125
|
-
tags:
|
|
126
|
-
- governance
|
|
127
|
-
- voting
|
|
128
|
-
- decision-making
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# collect-issues.yml - 收集问题
|
|
2
|
-
id: governance/collect-issues
|
|
3
|
-
stage: govern
|
|
4
|
-
name: 收集问题
|
|
5
|
-
description: 从审核意见中收集问题列表
|
|
6
|
-
|
|
7
|
-
inputs:
|
|
8
|
-
- name: opinions
|
|
9
|
-
type: array
|
|
10
|
-
required: true
|
|
11
|
-
|
|
12
|
-
outputs:
|
|
13
|
-
- name: issues
|
|
14
|
-
type: array
|
|
15
|
-
- name: suggestions
|
|
16
|
-
type: array
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# create-signed-document.yml - 创建签署文档
|
|
2
|
-
id: governance/create-signed-document
|
|
3
|
-
stage: govern
|
|
4
|
-
name: 创建签署文档
|
|
5
|
-
description: 创建带签名的审核文档
|
|
6
|
-
|
|
7
|
-
inputs:
|
|
8
|
-
- name: document_type
|
|
9
|
-
type: string
|
|
10
|
-
required: true
|
|
11
|
-
- name: content
|
|
12
|
-
type: string
|
|
13
|
-
required: true
|
|
14
|
-
- name: signers
|
|
15
|
-
type: array
|
|
16
|
-
required: true
|
|
17
|
-
- name: metadata
|
|
18
|
-
type: object
|
|
19
|
-
required: false
|
|
20
|
-
|
|
21
|
-
outputs:
|
|
22
|
-
- name: document
|
|
23
|
-
type: object
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
# create-voting-session.yml - 创建投票会话
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 类型: 治理类步骤
|
|
4
|
-
# 执行方式: 内置处理器
|
|
5
|
-
# 用途: 创建新的投票会话
|
|
6
|
-
# ============================================================================
|
|
7
|
-
|
|
8
|
-
name: create-voting-session
|
|
9
|
-
stage: govern
|
|
10
|
-
description: 创建新的投票会话
|
|
11
|
-
category: governance
|
|
12
|
-
version: 1.0.0
|
|
13
|
-
|
|
14
|
-
# 执行配置
|
|
15
|
-
execute:
|
|
16
|
-
type: builtin
|
|
17
|
-
handler: governance/create-voting-session
|
|
18
|
-
|
|
19
|
-
# 输入定义
|
|
20
|
-
inputs:
|
|
21
|
-
topic:
|
|
22
|
-
type: string
|
|
23
|
-
description: 投票主题
|
|
24
|
-
required: true
|
|
25
|
-
|
|
26
|
-
description:
|
|
27
|
-
type: string
|
|
28
|
-
description: 详细描述
|
|
29
|
-
required: false
|
|
30
|
-
|
|
31
|
-
related_item_id:
|
|
32
|
-
type: string
|
|
33
|
-
description: 关联的项目 ID(进化建议/审计报告)
|
|
34
|
-
required: true
|
|
35
|
-
|
|
36
|
-
related_item_type:
|
|
37
|
-
type: string
|
|
38
|
-
description: 关联项目类型
|
|
39
|
-
enum: [evolution, audit, impeachment]
|
|
40
|
-
required: true
|
|
41
|
-
|
|
42
|
-
participants:
|
|
43
|
-
type: array
|
|
44
|
-
description: 参与者列表
|
|
45
|
-
items:
|
|
46
|
-
type: object
|
|
47
|
-
properties:
|
|
48
|
-
id:
|
|
49
|
-
type: string
|
|
50
|
-
type:
|
|
51
|
-
type: string
|
|
52
|
-
enum: [role, user]
|
|
53
|
-
weight:
|
|
54
|
-
type: string
|
|
55
|
-
enum: [normal, heavy, veto]
|
|
56
|
-
required:
|
|
57
|
-
type: boolean
|
|
58
|
-
required: true
|
|
59
|
-
|
|
60
|
-
config:
|
|
61
|
-
type: object
|
|
62
|
-
description: 投票配置
|
|
63
|
-
properties:
|
|
64
|
-
method:
|
|
65
|
-
type: string
|
|
66
|
-
enum: [simple_majority, absolute_majority, unanimous, super_majority]
|
|
67
|
-
threshold:
|
|
68
|
-
type: number
|
|
69
|
-
duration_minutes:
|
|
70
|
-
type: number
|
|
71
|
-
min_participants:
|
|
72
|
-
type: number
|
|
73
|
-
quorum:
|
|
74
|
-
type: number
|
|
75
|
-
required: true
|
|
76
|
-
|
|
77
|
-
# 输出定义
|
|
78
|
-
outputs:
|
|
79
|
-
- name: voting_session_id
|
|
80
|
-
type: string
|
|
81
|
-
description: 投票会话 ID
|
|
82
|
-
|
|
83
|
-
- name: status
|
|
84
|
-
type: string
|
|
85
|
-
enum: [pending, voting, completed, cancelled]
|
|
86
|
-
description: 会话状态
|
|
87
|
-
|
|
88
|
-
- name: voting_ends_at
|
|
89
|
-
type: number
|
|
90
|
-
description: 投票截止时间(时间戳)
|
|
91
|
-
|
|
92
|
-
- name: participant_count
|
|
93
|
-
type: number
|
|
94
|
-
description: 参与者数量
|
|
95
|
-
|
|
96
|
-
# 元数据
|
|
97
|
-
metadata:
|
|
98
|
-
tags:
|
|
99
|
-
- governance
|
|
100
|
-
- voting
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# define-stance.sh - 立场注入工具
|
|
3
|
-
# ============================================================================
|
|
4
|
-
# 功能:根据立场 ID 返回对应的 prompt 和约束
|
|
5
|
-
# 用途:三省六部制核心工具,引导 Agent 以特定立场思考
|
|
6
|
-
# ============================================================================
|
|
7
|
-
|
|
8
|
-
set -e
|
|
9
|
-
|
|
10
|
-
# 参数
|
|
11
|
-
STANCE_ID="${1:-}"
|
|
12
|
-
TASK="${2:-}"
|
|
13
|
-
INPUT_CONTENT="${3:-}"
|
|
14
|
-
CONTEXT="${4:-}"
|
|
15
|
-
|
|
16
|
-
# 颜色输出
|
|
17
|
-
RED='\033[0;31m'
|
|
18
|
-
GREEN='\033[0;32m'
|
|
19
|
-
YELLOW='\033[1;33m'
|
|
20
|
-
NC='\033[0m'
|
|
21
|
-
|
|
22
|
-
log_info() { echo -e "${GREEN}[INFO]${NC} $1"; }
|
|
23
|
-
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
|
|
24
|
-
|
|
25
|
-
# 显示帮助
|
|
26
|
-
show_help() {
|
|
27
|
-
cat << EOF
|
|
28
|
-
立场注入工具
|
|
29
|
-
|
|
30
|
-
用法:
|
|
31
|
-
$0 <stance_id> [task] [input_content] [context]
|
|
32
|
-
|
|
33
|
-
参数:
|
|
34
|
-
stance_id 立场 ID(见下方列表)
|
|
35
|
-
task 当前任务描述
|
|
36
|
-
input_content 输入内容
|
|
37
|
-
context 上下文信息
|
|
38
|
-
|
|
39
|
-
立场列表:
|
|
40
|
-
|
|
41
|
-
决策类:
|
|
42
|
-
critic 挑刺者(评审专家)- 找问题、提风险
|
|
43
|
-
supporter 支持者(方案策划)- 找亮点、推方案
|
|
44
|
-
decider 决策者(项目负责人)- 平衡风险与收益
|
|
45
|
-
|
|
46
|
-
执行类:
|
|
47
|
-
planner 规划者 - 制定计划、分解任务
|
|
48
|
-
executor 执行者(开发工程师)- 实现功能
|
|
49
|
-
tester 测试者 - 验证功能、发现 Bug
|
|
50
|
-
|
|
51
|
-
专业类:
|
|
52
|
-
architect 架构师 - 设计系统架构
|
|
53
|
-
security 安全专家 - 安全评估
|
|
54
|
-
performance 性能专家 - 性能优化
|
|
55
|
-
|
|
56
|
-
审计:
|
|
57
|
-
auditor 审计官 - 合规检查
|
|
58
|
-
|
|
59
|
-
输出:
|
|
60
|
-
JSON 格式的立场信息和注入 prompt
|
|
61
|
-
|
|
62
|
-
示例:
|
|
63
|
-
$0 critic "审核方案" "架构设计方案"
|
|
64
|
-
$0 architect "设计架构" "需求文档"
|
|
65
|
-
EOF
|
|
66
|
-
exit 0
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
# 检查参数
|
|
70
|
-
if [[ "$1" == "-h" || "$1" == "--help" || -z "$STANCE_ID" ]]; then
|
|
71
|
-
show_help
|
|
72
|
-
fi
|
|
73
|
-
|
|
74
|
-
# 立场定义
|
|
75
|
-
declare -A STANCES
|
|
76
|
-
|
|
77
|
-
# 决策类
|
|
78
|
-
STANCES["critic"]='{
|
|
79
|
-
"id": "critic",
|
|
80
|
-
"name": "Critic",
|
|
81
|
-
"nameZh": "挑刺者",
|
|
82
|
-
"category": "decision",
|
|
83
|
-
"description": "评审专家,职责是找出问题和风险",
|
|
84
|
-
"injected_prompt": "你是评审专家(Critic),你的核心职责是挑刺和找问题。你需要在方案中发现潜在风险、设计缺陷、实现问题。你的立场是:宁可错杀一千,不可放过一个隐患。",
|
|
85
|
-
"forbidden_actions": ["批准方案", "忽视风险", "简化问题"],
|
|
86
|
-
"focus_areas": ["潜在问题", "风险评估", "边界条件", "失败场景"],
|
|
87
|
-
"review_criteria": ["完整性", "可行性", "安全性", "可维护性"]
|
|
88
|
-
}'
|
|
89
|
-
|
|
90
|
-
STANCES["supporter"]='{
|
|
91
|
-
"id": "supporter",
|
|
92
|
-
"name": "Supporter",
|
|
93
|
-
"nameZh": "支持者",
|
|
94
|
-
"category": "decision",
|
|
95
|
-
"description": "方案策划,职责是发现亮点和推动方案",
|
|
96
|
-
"injected_prompt": "你是方案策划(Supporter),你的核心职责是发现方案的亮点和价值。你需要找出方案的优势、创新点、可行性证据。你的立场是:寻找支持方案的理由,帮助方案通过审核。",
|
|
97
|
-
"forbidden_actions": ["否定方案", "忽视亮点", "制造障碍"],
|
|
98
|
-
"focus_areas": ["方案优势", "创新点", "价值证明", "成功案例"],
|
|
99
|
-
"review_criteria": ["价值", "创新性", "可行性", "性价比"]
|
|
100
|
-
}'
|
|
101
|
-
|
|
102
|
-
STANCES["decider"]='{
|
|
103
|
-
"id": "decider",
|
|
104
|
-
"name": "Decider",
|
|
105
|
-
"nameZh": "决策者",
|
|
106
|
-
"category": "decision",
|
|
107
|
-
"description": "项目负责人,职责是平衡风险与收益做出决策",
|
|
108
|
-
"injected_prompt": "你是决策者(Decider),你的核心职责是平衡风险与收益,做出最终决策。你需要综合考虑各方意见,评估资源约束、时间约束、团队能力。你的立场是:在充分信息基础上做出最优决策。",
|
|
109
|
-
"forbidden_actions": ["盲目批准", "情绪化决策", "忽视风险"],
|
|
110
|
-
"focus_areas": ["风险收益平衡", "资源约束", "时间约束", "团队能力"],
|
|
111
|
-
"review_criteria": ["风险可控", "资源充足", "时间合理", "能力匹配"]
|
|
112
|
-
}'
|
|
113
|
-
|
|
114
|
-
# 执行类
|
|
115
|
-
STANCES["planner"]='{
|
|
116
|
-
"id": "planner",
|
|
117
|
-
"name": "Planner",
|
|
118
|
-
"nameZh": "规划者",
|
|
119
|
-
"category": "execution",
|
|
120
|
-
"description": "制定计划、分解任务",
|
|
121
|
-
"injected_prompt": "你是规划者(Planner),你的核心职责是制定执行计划和分解任务。你需要将大目标拆解为可执行的步骤,考虑依赖关系和并行可能。你的立场是:计划要清晰、完整、可执行。",
|
|
122
|
-
"forbidden_actions": ["忽略依赖", "模糊任务", "无时间估算"],
|
|
123
|
-
"focus_areas": ["任务分解", "依赖关系", "并行机会", "里程碑"],
|
|
124
|
-
"review_criteria": ["任务清晰", "依赖明确", "可执行性", "时间合理"]
|
|
125
|
-
}'
|
|
126
|
-
|
|
127
|
-
STANCES["executor"]='{
|
|
128
|
-
"id": "executor",
|
|
129
|
-
"name": "Executor",
|
|
130
|
-
"nameZh": "执行者",
|
|
131
|
-
"category": "execution",
|
|
132
|
-
"description": "开发工程师,职责是实现功能",
|
|
133
|
-
"injected_prompt": "你是执行者(Executor),你的核心职责是实现功能代码。你需要考虑代码质量、可维护性、性能。你的立场是:写出高质量、可维护的代码。",
|
|
134
|
-
"forbidden_actions": ["写烂代码", "忽略测试", "跳过文档"],
|
|
135
|
-
"focus_areas": ["代码质量", "可维护性", "性能", "测试覆盖"],
|
|
136
|
-
"review_criteria": ["代码规范", "测试通过", "文档完整", "性能达标"]
|
|
137
|
-
}'
|
|
138
|
-
|
|
139
|
-
STANCES["tester"]='{
|
|
140
|
-
"id": "tester",
|
|
141
|
-
"name": "Tester",
|
|
142
|
-
"nameZh": "测试者",
|
|
143
|
-
"category": "execution",
|
|
144
|
-
"description": "验证功能、发现 Bug",
|
|
145
|
-
"injected_prompt": "你是测试者(Tester),你的核心职责是验证功能和发现 Bug。你需要设计测试用例、执行测试、报告问题。你的立场是:确保功能正确、质量达标。",
|
|
146
|
-
"forbidden_actions": ["跳过测试", "忽视边界", "模糊报告"],
|
|
147
|
-
"focus_areas": ["功能验证", "边界测试", "性能测试", "回归测试"],
|
|
148
|
-
"review_criteria": ["功能正确", "覆盖完整", "Bug 清晰", "回归通过"]
|
|
149
|
-
}'
|
|
150
|
-
|
|
151
|
-
# 专业类
|
|
152
|
-
STANCES["architect"]='{
|
|
153
|
-
"id": "architect",
|
|
154
|
-
"name": "Architect",
|
|
155
|
-
"nameZh": "架构师",
|
|
156
|
-
"category": "professional",
|
|
157
|
-
"description": "设计系统架构",
|
|
158
|
-
"injected_prompt": "你是架构师(Architect),你的核心职责是设计系统架构。你需要考虑可扩展性、可维护性、性能、安全。你的立场是:架构要稳定、灵活、易维护。",
|
|
159
|
-
"forbidden_actions": ["过度设计", "忽视约束", "技术炫技"],
|
|
160
|
-
"focus_areas": ["架构设计", "技术选型", "扩展性", "可维护性"],
|
|
161
|
-
"review_criteria": ["架构清晰", "技术合理", "扩展性好", "文档完整"]
|
|
162
|
-
}'
|
|
163
|
-
|
|
164
|
-
STANCES["security"]='{
|
|
165
|
-
"id": "security",
|
|
166
|
-
"name": "Security",
|
|
167
|
-
"nameZh": "安全专家",
|
|
168
|
-
"category": "professional",
|
|
169
|
-
"description": "安全评估",
|
|
170
|
-
"injected_prompt": "你是安全专家(Security),你的核心职责是评估系统安全性。你需要发现安全漏洞、评估风险、提出安全建议。你的立场是:安全第一,风险可控。",
|
|
171
|
-
"forbidden_actions": ["忽视漏洞", "弱化风险", "跳过评估"],
|
|
172
|
-
"focus_areas": ["安全漏洞", "风险评估", "合规检查", "安全建议"],
|
|
173
|
-
"review_criteria": ["无高危漏洞", "风险可控", "合规达标", "防护完善"]
|
|
174
|
-
}'
|
|
175
|
-
|
|
176
|
-
STANCES["performance"]='{
|
|
177
|
-
"id": "performance",
|
|
178
|
-
"name": "Performance",
|
|
179
|
-
"nameZh": "性能专家",
|
|
180
|
-
"category": "professional",
|
|
181
|
-
"description": "性能优化",
|
|
182
|
-
"injected_prompt": "你是性能专家(Performance),你的核心职责是优化系统性能。你需要发现性能瓶颈、提出优化方案、验证优化效果。你的立场是:性能要达标、资源要高效。",
|
|
183
|
-
"forbidden_actions": ["忽视瓶颈", "过度优化", "无基准测试"],
|
|
184
|
-
"focus_areas": ["性能瓶颈", "优化方案", "基准测试", "资源利用"],
|
|
185
|
-
"review_criteria": ["性能达标", "瓶颈消除", "资源高效", "稳定运行"]
|
|
186
|
-
}'
|
|
187
|
-
|
|
188
|
-
# 审计
|
|
189
|
-
STANCES["auditor"]='{
|
|
190
|
-
"id": "auditor",
|
|
191
|
-
"name": "Auditor",
|
|
192
|
-
"nameZh": "审计官",
|
|
193
|
-
"category": "audit",
|
|
194
|
-
"description": "合规检查",
|
|
195
|
-
"injected_prompt": "你是审计官(Auditor),你的核心职责是检查合规性。你需要验证流程合规、文档完整、标准达标。你的立场是:合规是底线,必须严格执行。",
|
|
196
|
-
"forbidden_actions": ["放宽标准", "忽视流程", "跳过检查"],
|
|
197
|
-
"focus_areas": ["流程合规", "文档完整", "标准达标", "问题追踪"],
|
|
198
|
-
"review_criteria": ["流程合规", "文档完整", "标准达标", "问题闭环"]
|
|
199
|
-
}'
|
|
200
|
-
|
|
201
|
-
# 获取立场信息
|
|
202
|
-
STANCE_JSON="${STANCES[$STANCE_ID]}"
|
|
203
|
-
|
|
204
|
-
if [[ -z "$STANCE_JSON" ]]; then
|
|
205
|
-
log_error "未知的立场 ID: $STANCE_ID"
|
|
206
|
-
cat << EOF
|
|
207
|
-
{
|
|
208
|
-
"success": false,
|
|
209
|
-
"error": "Unknown stance ID: $STANCE_ID",
|
|
210
|
-
"supported_stances": ["critic", "supporter", "decider", "planner", "executor", "tester", "architect", "security", "performance", "auditor"]
|
|
211
|
-
}
|
|
212
|
-
EOF
|
|
213
|
-
exit 1
|
|
214
|
-
fi
|
|
215
|
-
|
|
216
|
-
# 构建完整 prompt
|
|
217
|
-
INJECTED_PROMPT=$(echo "$STANCE_JSON" | jq -r '.injected_prompt')
|
|
218
|
-
|
|
219
|
-
FULL_PROMPT="$INJECTED_PROMPT"
|
|
220
|
-
|
|
221
|
-
if [[ -n "$TASK" ]]; then
|
|
222
|
-
FULL_PROMPT="$FULL_PROMPT\n\n## 当前任务\n$TASK"
|
|
223
|
-
fi
|
|
224
|
-
|
|
225
|
-
if [[ -n "$INPUT_CONTENT" ]]; then
|
|
226
|
-
FULL_PROMPT="$FULL_PROMPT\n\n## 输入内容\n$INPUT_CONTENT"
|
|
227
|
-
fi
|
|
228
|
-
|
|
229
|
-
if [[ -n "$CONTEXT" ]]; then
|
|
230
|
-
FULL_PROMPT="$FULL_PROMPT\n\n## 上下文\n$CONTEXT"
|
|
231
|
-
fi
|
|
232
|
-
|
|
233
|
-
# 输出结果
|
|
234
|
-
cat << EOF
|
|
235
|
-
{
|
|
236
|
-
"success": true,
|
|
237
|
-
"stance_id": "$STANCE_ID",
|
|
238
|
-
"stance": $STANCE_JSON,
|
|
239
|
-
"injected_prompt": $(echo "$FULL_PROMPT" | jq -Rs .),
|
|
240
|
-
"forbidden_actions": $(echo "$STANCE_JSON" | jq '.forbidden_actions'),
|
|
241
|
-
"focus_areas": $(echo "$STANCE_JSON" | jq '.focus_areas')
|
|
242
|
-
}
|
|
243
|
-
EOF
|