@dommaker/harness 0.16.6 → 0.16.8
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 +15 -0
- package/README.md +54 -14
- package/bin/harness.js +56 -96
- package/dist/architecture/constraint-engine.d.ts.map +1 -1
- package/dist/architecture/constraint-engine.js +0 -4
- package/dist/architecture/constraint-engine.js.map +1 -1
- package/dist/architecture/cross-project-checker.d.ts.map +1 -1
- package/dist/architecture/cross-project-checker.js +5 -25
- package/dist/architecture/cross-project-checker.js.map +1 -1
- package/dist/cli/commands/analyze-sessions.d.ts +2 -0
- package/dist/cli/commands/analyze-sessions.d.ts.map +1 -1
- package/dist/cli/commands/analyze-sessions.js +25 -181
- package/dist/cli/commands/analyze-sessions.js.map +1 -1
- package/dist/cli/commands/check.d.ts +1 -0
- package/dist/cli/commands/check.d.ts.map +1 -1
- package/dist/cli/commands/check.js +24 -216
- package/dist/cli/commands/check.js.map +1 -1
- package/dist/cli/commands/doc-freshness-check.d.ts.map +1 -1
- package/dist/cli/commands/doc-freshness-check.js +14 -28
- package/dist/cli/commands/doc-freshness-check.js.map +1 -1
- package/dist/cli/commands/flow.d.ts.map +1 -1
- package/dist/cli/commands/flow.js +2 -1
- package/dist/cli/commands/flow.js.map +1 -1
- package/dist/cli/commands/init.js +2 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/posteval-plan.d.ts.map +1 -1
- package/dist/cli/commands/posteval-plan.js +0 -1
- package/dist/cli/commands/posteval-plan.js.map +1 -1
- package/dist/cli/commands/release.js +1 -1
- package/dist/cli/commands/release.js.map +1 -1
- package/dist/cli/commands/report.d.ts.map +1 -1
- package/dist/cli/commands/report.js +2 -0
- package/dist/cli/commands/report.js.map +1 -1
- package/dist/cli/commands/spec-baseline-check.d.ts.map +1 -1
- package/dist/cli/commands/spec-baseline-check.js +12 -23
- package/dist/cli/commands/spec-baseline-check.js.map +1 -1
- package/dist/cli/commands/sync-docs/agents-syncer.d.ts +19 -0
- package/dist/cli/commands/sync-docs/agents-syncer.d.ts.map +1 -0
- package/dist/cli/commands/sync-docs/agents-syncer.js +288 -0
- package/dist/cli/commands/sync-docs/agents-syncer.js.map +1 -0
- package/dist/cli/commands/sync-docs/capabilities-syncer.d.ts +37 -0
- package/dist/cli/commands/sync-docs/capabilities-syncer.d.ts.map +1 -0
- package/dist/cli/commands/sync-docs/capabilities-syncer.js +235 -0
- package/dist/cli/commands/sync-docs/capabilities-syncer.js.map +1 -0
- package/dist/cli/commands/sync-docs/context-syncer.d.ts +17 -0
- package/dist/cli/commands/sync-docs/context-syncer.d.ts.map +1 -0
- package/dist/cli/commands/sync-docs/context-syncer.js +143 -0
- package/dist/cli/commands/sync-docs/context-syncer.js.map +1 -0
- package/dist/cli/commands/{sync-docs.d.ts → sync-docs/index.d.ts} +9 -2
- package/dist/cli/commands/sync-docs/index.d.ts.map +1 -0
- package/dist/cli/commands/sync-docs/index.js +338 -0
- package/dist/cli/commands/sync-docs/index.js.map +1 -0
- package/dist/cli/commands/sync-docs/preserve-block.d.ts +24 -0
- package/dist/cli/commands/sync-docs/preserve-block.d.ts.map +1 -0
- package/dist/cli/commands/sync-docs/preserve-block.js +55 -0
- package/dist/cli/commands/sync-docs/preserve-block.js.map +1 -0
- package/dist/cli/commands/sync-docs/project-reader.d.ts +41 -0
- package/dist/cli/commands/sync-docs/project-reader.d.ts.map +1 -0
- package/dist/cli/commands/sync-docs/project-reader.js +183 -0
- package/dist/cli/commands/sync-docs/project-reader.js.map +1 -0
- package/dist/cli/commands/update-user-model.d.ts +2 -0
- package/dist/cli/commands/update-user-model.d.ts.map +1 -1
- package/dist/cli/commands/update-user-model.js +19 -90
- package/dist/cli/commands/update-user-model.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +3 -0
- package/dist/cli/commands/validate.d.ts.map +1 -1
- package/dist/cli/commands/validate.js +6 -39
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/session-mining/corrections.d.ts +17 -0
- package/dist/cli/session-mining/corrections.d.ts.map +1 -0
- package/dist/cli/session-mining/corrections.js +58 -0
- package/dist/cli/session-mining/corrections.js.map +1 -0
- package/dist/cli/session-mining/index.d.ts +13 -0
- package/dist/cli/session-mining/index.d.ts.map +1 -0
- package/dist/{core/spec → cli/session-mining}/index.js +9 -3
- package/dist/cli/session-mining/index.js.map +1 -0
- package/dist/cli/session-mining/text.d.ts +31 -0
- package/dist/cli/session-mining/text.d.ts.map +1 -0
- package/dist/cli/session-mining/text.js +126 -0
- package/dist/cli/session-mining/text.js.map +1 -0
- package/dist/cli/session-mining/transcript.d.ts +28 -0
- package/dist/cli/session-mining/transcript.d.ts.map +1 -0
- package/dist/cli/session-mining/transcript.js +123 -0
- package/dist/cli/session-mining/transcript.js.map +1 -0
- package/dist/constraints/lifecycle-runner.d.ts +1 -1
- package/dist/constraints/lifecycle-runner.d.ts.map +1 -1
- package/dist/context/compaction.d.ts.map +1 -1
- package/dist/context/compaction.js +2 -3
- package/dist/context/compaction.js.map +1 -1
- package/dist/context/knowledge-injector.d.ts.map +1 -1
- package/dist/context/tool-output-budget.d.ts +1 -1
- package/dist/context/tool-output-budget.d.ts.map +1 -1
- package/dist/context/tool-output-budget.js +1 -1
- package/dist/context/tool-output-budget.js.map +1 -1
- package/dist/core/constraints/capabilities-parser.d.ts +24 -0
- package/dist/core/constraints/capabilities-parser.d.ts.map +1 -0
- package/dist/core/constraints/capabilities-parser.js +95 -0
- package/dist/core/constraints/capabilities-parser.js.map +1 -0
- package/dist/core/constraints/checker.d.ts +37 -100
- package/dist/core/constraints/checker.d.ts.map +1 -1
- package/dist/core/constraints/checker.js +150 -737
- package/dist/core/constraints/checker.js.map +1 -1
- package/dist/core/constraints/checkers/always-pass.d.ts +17 -0
- package/dist/core/constraints/checkers/always-pass.d.ts.map +1 -0
- package/dist/core/constraints/checkers/always-pass.js +23 -0
- package/dist/core/constraints/checkers/always-pass.js.map +1 -0
- package/dist/core/constraints/checkers/capability-sync.d.ts +10 -0
- package/dist/core/constraints/checkers/capability-sync.d.ts.map +1 -0
- package/dist/core/constraints/checkers/capability-sync.js +60 -0
- package/dist/core/constraints/checkers/capability-sync.js.map +1 -0
- package/dist/core/constraints/checkers/context-doc-sync.d.ts +6 -0
- package/dist/core/constraints/checkers/context-doc-sync.d.ts.map +1 -0
- package/dist/core/constraints/checkers/context-doc-sync.js +35 -0
- package/dist/core/constraints/checkers/context-doc-sync.js.map +1 -0
- package/dist/core/constraints/checkers/docs-freshness.d.ts +10 -0
- package/dist/core/constraints/checkers/docs-freshness.d.ts.map +1 -0
- package/dist/core/constraints/checkers/docs-freshness.js +111 -0
- package/dist/core/constraints/checkers/docs-freshness.js.map +1 -0
- package/dist/core/constraints/checkers/guideline-flags.d.ts +9 -0
- package/dist/core/constraints/checkers/guideline-flags.d.ts.map +1 -0
- package/dist/core/constraints/checkers/guideline-flags.js +13 -0
- package/dist/core/constraints/checkers/guideline-flags.js.map +1 -0
- package/dist/core/constraints/checkers/index.d.ts +17 -0
- package/dist/core/constraints/checkers/index.d.ts.map +1 -0
- package/dist/core/constraints/checkers/index.js +82 -0
- package/dist/core/constraints/checkers/index.js.map +1 -0
- package/dist/core/constraints/checkers/iron-flags.d.ts +14 -0
- package/dist/core/constraints/checkers/iron-flags.d.ts.map +1 -0
- package/dist/core/constraints/checkers/iron-flags.js +24 -0
- package/dist/core/constraints/checkers/iron-flags.js.map +1 -0
- package/dist/core/constraints/checkers/no-any-type.d.ts +6 -0
- package/dist/core/constraints/checkers/no-any-type.d.ts.map +1 -0
- package/dist/core/constraints/checkers/no-any-type.js +42 -0
- package/dist/core/constraints/checkers/no-any-type.js.map +1 -0
- package/dist/core/constraints/checkers/no-bypass-checkpoint.d.ts +6 -0
- package/dist/core/constraints/checkers/no-bypass-checkpoint.d.ts.map +1 -0
- package/dist/core/constraints/checkers/no-bypass-checkpoint.js +40 -0
- package/dist/core/constraints/checkers/no-bypass-checkpoint.js.map +1 -0
- package/dist/core/constraints/checkers/no-excuse-patterns.d.ts +6 -0
- package/dist/core/constraints/checkers/no-excuse-patterns.d.ts.map +1 -0
- package/dist/core/constraints/checkers/no-excuse-patterns.js +25 -0
- package/dist/core/constraints/checkers/no-excuse-patterns.js.map +1 -0
- package/dist/core/constraints/checkers/no-fuzzy-completion-claim.d.ts +6 -0
- package/dist/core/constraints/checkers/no-fuzzy-completion-claim.d.ts.map +1 -0
- package/dist/core/constraints/checkers/no-fuzzy-completion-claim.js +34 -0
- package/dist/core/constraints/checkers/no-fuzzy-completion-claim.js.map +1 -0
- package/dist/core/constraints/checkers/no-performative-agreement.d.ts +8 -0
- package/dist/core/constraints/checkers/no-performative-agreement.d.ts.map +1 -0
- package/dist/core/constraints/checkers/no-performative-agreement.js +23 -0
- package/dist/core/constraints/checkers/no-performative-agreement.js.map +1 -0
- package/dist/core/constraints/checkers/no-simplification-without-approval.d.ts +6 -0
- package/dist/core/constraints/checkers/no-simplification-without-approval.d.ts.map +1 -0
- package/dist/core/constraints/checkers/no-simplification-without-approval.js +30 -0
- package/dist/core/constraints/checkers/no-simplification-without-approval.js.map +1 -0
- package/dist/core/constraints/checkers/no-test-simplification.d.ts +6 -0
- package/dist/core/constraints/checkers/no-test-simplification.d.ts.map +1 -0
- package/dist/core/constraints/checkers/no-test-simplification.js +29 -0
- package/dist/core/constraints/checkers/no-test-simplification.js.map +1 -0
- package/dist/core/constraints/checkers/test-coverage.d.ts +6 -0
- package/dist/core/constraints/checkers/test-coverage.d.ts.map +1 -0
- package/dist/core/constraints/checkers/test-coverage.js +33 -0
- package/dist/core/constraints/checkers/test-coverage.js.map +1 -0
- package/dist/core/constraints/checkers/types.d.ts +43 -0
- package/dist/core/constraints/checkers/types.d.ts.map +1 -0
- package/dist/core/constraints/checkers/types.js +23 -0
- package/dist/core/constraints/checkers/types.js.map +1 -0
- package/dist/core/constraints/checkers/yagni.d.ts +8 -0
- package/dist/core/constraints/checkers/yagni.d.ts.map +1 -0
- package/dist/core/constraints/checkers/yagni.js +96 -0
- package/dist/core/constraints/checkers/yagni.js.map +1 -0
- package/dist/core/constraints/context-builder.d.ts +67 -0
- package/dist/core/constraints/context-builder.d.ts.map +1 -0
- package/dist/core/constraints/context-builder.js +294 -0
- package/dist/core/constraints/context-builder.js.map +1 -0
- package/dist/core/constraints/definitions/guidelines.d.ts +7 -0
- package/dist/core/constraints/definitions/guidelines.d.ts.map +1 -0
- package/dist/core/constraints/definitions/guidelines.js +641 -0
- package/dist/core/constraints/definitions/guidelines.js.map +1 -0
- package/dist/core/constraints/definitions/iron-laws.d.ts +7 -0
- package/dist/core/constraints/definitions/iron-laws.d.ts.map +1 -0
- package/dist/core/constraints/definitions/iron-laws.js +322 -0
- package/dist/core/constraints/definitions/iron-laws.js.map +1 -0
- package/dist/core/constraints/definitions/tips.d.ts +7 -0
- package/dist/core/constraints/definitions/tips.d.ts.map +1 -0
- package/dist/core/constraints/definitions/tips.js +62 -0
- package/dist/core/constraints/definitions/tips.js.map +1 -0
- package/dist/core/constraints/definitions.d.ts +8 -21
- package/dist/core/constraints/definitions.d.ts.map +1 -1
- package/dist/core/constraints/definitions.js +15 -1048
- package/dist/core/constraints/definitions.js.map +1 -1
- package/dist/core/constraints/doc-freshness/runner.d.ts.map +1 -1
- package/dist/core/constraints/doc-freshness/runner.js +0 -1
- package/dist/core/constraints/doc-freshness/runner.js.map +1 -1
- package/dist/core/constraints/index.d.ts +4 -5
- package/dist/core/constraints/index.d.ts.map +1 -1
- package/dist/core/constraints/index.js +1 -16
- package/dist/core/constraints/index.js.map +1 -1
- package/dist/core/constraints/interceptor.d.ts.map +1 -1
- package/dist/core/constraints/interceptor.js.map +1 -1
- package/dist/core/index.js +0 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/project-config-loader.d.ts +6 -4
- package/dist/core/project-config-loader.d.ts.map +1 -1
- package/dist/core/project-config-loader.js +46 -13
- package/dist/core/project-config-loader.js.map +1 -1
- package/dist/core/validators/check-handlers/command.d.ts +7 -0
- package/dist/core/validators/check-handlers/command.d.ts.map +1 -0
- package/dist/core/validators/check-handlers/command.js +58 -0
- package/dist/core/validators/check-handlers/command.js.map +1 -0
- package/dist/core/validators/check-handlers/file.d.ts +10 -0
- package/dist/core/validators/check-handlers/file.d.ts.map +1 -0
- package/dist/core/validators/check-handlers/file.js +128 -0
- package/dist/core/validators/check-handlers/file.js.map +1 -0
- package/dist/core/validators/check-handlers/http.d.ts +7 -0
- package/dist/core/validators/check-handlers/http.d.ts.map +1 -0
- package/dist/core/validators/check-handlers/http.js +88 -0
- package/dist/core/validators/check-handlers/http.js.map +1 -0
- package/dist/core/validators/check-handlers/output.d.ts +15 -0
- package/dist/core/validators/check-handlers/output.d.ts.map +1 -0
- package/dist/core/validators/check-handlers/output.js +152 -0
- package/dist/core/validators/check-handlers/output.js.map +1 -0
- package/dist/core/validators/checkpoint.d.ts +4 -72
- package/dist/core/validators/checkpoint.d.ts.map +1 -1
- package/dist/core/validators/checkpoint.js +21 -400
- package/dist/core/validators/checkpoint.js.map +1 -1
- package/dist/core/validators/cso.js +1 -1
- package/dist/core/validators/cso.js.map +1 -1
- package/dist/core/validators/passes-gate.js +2 -2
- package/dist/core/validators/passes-gate.js.map +1 -1
- package/dist/dashboard/stats.d.ts.map +1 -1
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/evolution/auto-evolve.d.ts +1 -2
- package/dist/evolution/auto-evolve.d.ts.map +1 -1
- package/dist/evolution/auto-evolve.js +2 -1
- package/dist/evolution/auto-evolve.js.map +1 -1
- package/dist/failure/types.d.ts +5 -85
- package/dist/failure/types.d.ts.map +1 -1
- package/dist/failure/types.js +19 -115
- package/dist/failure/types.js.map +1 -1
- package/dist/gates/contract.d.ts.map +1 -1
- package/dist/gates/contract.js.map +1 -1
- package/dist/gates/index.d.ts.map +1 -1
- package/dist/gates/index.js.map +1 -1
- package/dist/gates/performance.js +1 -1
- package/dist/gates/performance.js.map +1 -1
- package/dist/gates/security.d.ts.map +1 -1
- package/dist/gates/security.js +1 -1
- package/dist/gates/security.js.map +1 -1
- package/dist/hooks/bootstrap.d.ts.map +1 -1
- package/dist/hooks/bootstrap.js +6 -48
- package/dist/hooks/bootstrap.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/knowledge/audit.d.ts.map +1 -1
- package/dist/knowledge/doctor.d.ts.map +1 -1
- package/dist/knowledge/doctor.js.map +1 -1
- package/dist/knowledge/import.d.ts.map +1 -1
- package/dist/knowledge/import.js +1 -1
- package/dist/knowledge/import.js.map +1 -1
- package/dist/knowledge/index-generator.d.ts.map +1 -1
- package/dist/knowledge/index-generator.js +0 -1
- package/dist/knowledge/index-generator.js.map +1 -1
- package/dist/knowledge/ingest.d.ts.map +1 -1
- package/dist/knowledge/ingest.js +1 -1
- package/dist/knowledge/ingest.js.map +1 -1
- package/dist/knowledge/lint.d.ts +1 -1
- package/dist/knowledge/lint.d.ts.map +1 -1
- package/dist/knowledge/lint.js +2 -2
- package/dist/knowledge/lint.js.map +1 -1
- package/dist/knowledge/primitives/code-structure.d.ts.map +1 -1
- package/dist/knowledge/primitives/code-structure.js +29 -12
- package/dist/knowledge/primitives/code-structure.js.map +1 -1
- package/dist/knowledge/query.d.ts.map +1 -1
- package/dist/knowledge/query.js.map +1 -1
- package/dist/knowledge/store.d.ts.map +1 -1
- package/dist/llm/adapter.d.ts +3 -3
- package/dist/llm/adapter.d.ts.map +1 -1
- package/dist/llm/adapter.js +3 -3
- package/dist/llm/adapter.js.map +1 -1
- package/dist/monitoring/analyzer-base.d.ts +50 -0
- package/dist/monitoring/analyzer-base.d.ts.map +1 -0
- package/dist/monitoring/analyzer-base.js +146 -0
- package/dist/monitoring/analyzer-base.js.map +1 -0
- package/dist/monitoring/constraint-doctor.d.ts +3 -46
- package/dist/monitoring/constraint-doctor.d.ts.map +1 -1
- package/dist/monitoring/constraint-doctor.js +11 -113
- package/dist/monitoring/constraint-doctor.js.map +1 -1
- package/dist/monitoring/constraint-evolver.d.ts +9 -63
- package/dist/monitoring/constraint-evolver.d.ts.map +1 -1
- package/dist/monitoring/constraint-evolver.js +8 -10
- package/dist/monitoring/constraint-evolver.js.map +1 -1
- package/dist/monitoring/diagnosis-rules.d.ts +18 -0
- package/dist/monitoring/diagnosis-rules.d.ts.map +1 -0
- package/dist/monitoring/diagnosis-rules.js +119 -0
- package/dist/monitoring/diagnosis-rules.js.map +1 -0
- package/dist/monitoring/knowledge-doctor.d.ts.map +1 -1
- package/dist/monitoring/knowledge-doctor.js.map +1 -1
- package/dist/monitoring/performance-analyzer.d.ts +0 -12
- package/dist/monitoring/performance-analyzer.d.ts.map +1 -1
- package/dist/monitoring/performance-analyzer.js +13 -93
- package/dist/monitoring/performance-analyzer.js.map +1 -1
- package/dist/monitoring/performance-collector.d.ts +0 -8
- package/dist/monitoring/performance-collector.d.ts.map +1 -1
- package/dist/monitoring/performance-collector.js +0 -21
- package/dist/monitoring/performance-collector.js.map +1 -1
- package/dist/monitoring/trace-analyzer.d.ts +0 -8
- package/dist/monitoring/trace-analyzer.d.ts.map +1 -1
- package/dist/monitoring/trace-analyzer.js +9 -91
- package/dist/monitoring/trace-analyzer.js.map +1 -1
- package/dist/presets/index.d.ts +1 -1
- package/dist/presets/index.d.ts.map +1 -1
- package/dist/presets/index.js +1 -4
- package/dist/presets/index.js.map +1 -1
- package/dist/presets/standard.d.ts +0 -9
- package/dist/presets/standard.d.ts.map +1 -1
- package/dist/presets/standard.js +1 -16
- package/dist/presets/standard.js.map +1 -1
- package/dist/safety/output-guardrail.d.ts +0 -1
- package/dist/safety/output-guardrail.d.ts.map +1 -1
- package/dist/safety/output-guardrail.js +0 -3
- package/dist/safety/output-guardrail.js.map +1 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/types/constraint.d.ts +5 -59
- package/dist/types/constraint.d.ts.map +1 -1
- package/dist/types/constraint.js +1 -39
- package/dist/types/constraint.js.map +1 -1
- package/dist/types/failure.d.ts +89 -0
- package/dist/types/failure.d.ts.map +1 -0
- package/dist/types/failure.js +121 -0
- package/dist/types/failure.js.map +1 -0
- package/dist/types/index.d.ts +2 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +7 -6
- package/dist/types/index.js.map +1 -1
- package/dist/types/monitoring-types.d.ts +114 -0
- package/dist/types/monitoring-types.d.ts.map +1 -0
- package/dist/types/monitoring-types.js +10 -0
- package/dist/types/monitoring-types.js.map +1 -0
- package/dist/utils/detect-source-roots.js.map +1 -1
- package/dist/utils/file-walk.d.ts +33 -0
- package/dist/utils/file-walk.d.ts.map +1 -0
- package/dist/utils/file-walk.js +89 -0
- package/dist/utils/file-walk.js.map +1 -0
- package/dist/verification/rules-based.d.ts.map +1 -1
- package/dist/verification/rules-based.js.map +1 -1
- package/package.json +3 -7
- package/src/__tests__/checker-extra.test.ts +0 -30
- package/src/__tests__/checker.test.ts +0 -33
- package/src/__tests__/checkpoint.test.ts +46 -46
- package/src/__tests__/constraint-evolver.test.ts +22 -21
- package/src/__tests__/doctor-evolver.test.ts +3 -3
- package/src/__tests__/iron-laws.test.ts +0 -27
- package/src/__tests__/presets.test.ts +1 -40
- package/src/architecture/constraint-engine.ts +0 -5
- package/src/architecture/cross-project-checker.ts +6 -24
- package/src/cli/commands/__tests__/check.test.ts +3 -1
- package/src/cli/commands/__tests__/sync-docs.test.ts +77 -0
- package/src/cli/commands/__tests__/validate.test.ts +5 -0
- package/src/cli/commands/analyze-sessions.ts +31 -185
- package/src/cli/commands/check.ts +26 -225
- package/src/cli/commands/doc-freshness-check.ts +14 -25
- package/src/cli/commands/flow.ts +5 -3
- package/src/cli/commands/init.ts +3 -3
- package/src/cli/commands/posteval-plan.ts +0 -1
- package/src/cli/commands/release.ts +1 -1
- package/src/cli/commands/report.ts +2 -0
- package/src/cli/commands/spec-baseline-check.ts +12 -19
- package/src/cli/commands/sync-docs/agents-syncer.ts +280 -0
- package/src/cli/commands/sync-docs/capabilities-syncer.ts +229 -0
- package/src/cli/commands/sync-docs/context-syncer.ts +108 -0
- package/src/cli/commands/sync-docs/index.ts +355 -0
- package/src/cli/commands/sync-docs/preserve-block.ts +59 -0
- package/src/cli/commands/sync-docs/project-reader.ts +163 -0
- package/src/cli/commands/update-user-model.ts +23 -87
- package/src/cli/commands/validate.ts +6 -40
- package/src/cli/session-mining/corrections.ts +56 -0
- package/src/cli/session-mining/index.ts +13 -0
- package/src/cli/session-mining/text.ts +117 -0
- package/src/cli/session-mining/transcript.ts +107 -0
- package/src/constraints/__tests__/lifecycle-runner.test.ts +1 -1
- package/src/constraints/lifecycle-runner.ts +1 -1
- package/src/context/compaction.ts +2 -3
- package/src/context/knowledge-injector.ts +1 -1
- package/src/context/tool-output-budget.ts +1 -1
- package/src/core/constraints/capabilities-parser.ts +70 -0
- package/src/core/constraints/checker.ts +170 -779
- package/src/core/constraints/checkers/always-pass.ts +22 -0
- package/src/core/constraints/checkers/capability-sync.ts +71 -0
- package/src/core/constraints/checkers/context-doc-sync.ts +36 -0
- package/src/core/constraints/checkers/docs-freshness.ts +116 -0
- package/src/core/constraints/checkers/guideline-flags.ts +30 -0
- package/src/core/constraints/checkers/index.ts +114 -0
- package/src/core/constraints/checkers/iron-flags.ts +62 -0
- package/src/core/constraints/checkers/no-any-type.ts +42 -0
- package/src/core/constraints/checkers/no-bypass-checkpoint.ts +40 -0
- package/src/core/constraints/checkers/no-excuse-patterns.ts +24 -0
- package/src/core/constraints/checkers/no-fuzzy-completion-claim.ts +33 -0
- package/src/core/constraints/checkers/no-performative-agreement.ts +22 -0
- package/src/core/constraints/checkers/no-simplification-without-approval.ts +29 -0
- package/src/core/constraints/checkers/no-test-simplification.ts +28 -0
- package/src/core/constraints/checkers/test-coverage.ts +35 -0
- package/src/core/constraints/checkers/types.ts +54 -0
- package/src/core/constraints/checkers/yagni.ts +65 -0
- package/src/core/constraints/context-builder.ts +262 -0
- package/src/core/constraints/definitions/guidelines.ts +668 -0
- package/src/core/constraints/definitions/iron-laws.ts +333 -0
- package/src/core/constraints/definitions/tips.ts +63 -0
- package/src/core/constraints/definitions.ts +9 -1086
- package/src/core/constraints/doc-freshness/runner.ts +2 -3
- package/src/core/constraints/index.ts +1 -27
- package/src/core/constraints/interceptor.ts +0 -2
- package/src/core/index.ts +1 -1
- package/src/core/project-config-loader.ts +49 -13
- package/src/core/validators/check-handlers/command.ts +58 -0
- package/src/core/validators/check-handlers/file.ts +104 -0
- package/src/core/validators/check-handlers/http.ts +88 -0
- package/src/core/validators/check-handlers/output.ts +165 -0
- package/src/core/validators/checkpoint.ts +32 -407
- package/src/core/validators/cso.ts +1 -1
- package/src/core/validators/passes-gate.ts +2 -2
- package/src/dashboard/stats.ts +1 -1
- package/src/dashboard/types.ts +1 -1
- package/src/evolution/__tests__/auto-evolve.test.ts +1 -2
- package/src/evolution/auto-evolve.ts +3 -3
- package/src/failure/types.ts +5 -161
- package/src/gates/contract.ts +0 -1
- package/src/gates/index.ts +0 -2
- package/src/gates/performance.ts +1 -1
- package/src/gates/security.ts +1 -3
- package/src/hooks/bootstrap.ts +6 -16
- package/src/index.ts +4 -1
- package/src/knowledge/__tests__/lifecycle.test.ts +4 -1
- package/src/knowledge/audit.ts +1 -1
- package/src/knowledge/doctor.ts +0 -1
- package/src/knowledge/import.ts +2 -2
- package/src/knowledge/index-generator.ts +0 -1
- package/src/knowledge/ingest.ts +1 -2
- package/src/knowledge/lint.ts +2 -2
- package/src/knowledge/primitives/__tests__/code-structure-degrade.test.ts +24 -0
- package/src/knowledge/primitives/code-structure.ts +36 -12
- package/src/knowledge/query.ts +0 -3
- package/src/knowledge/store.ts +1 -1
- package/src/llm/adapter.ts +3 -3
- package/src/monitoring/analyzer-base.ts +112 -0
- package/src/monitoring/constraint-doctor.ts +14 -175
- package/src/monitoring/constraint-evolver.ts +20 -92
- package/src/monitoring/diagnosis-rules.ts +132 -0
- package/src/monitoring/knowledge-doctor.ts +0 -1
- package/src/monitoring/performance-analyzer.ts +22 -72
- package/src/monitoring/performance-collector.ts +0 -22
- package/src/monitoring/trace-analyzer.ts +17 -73
- package/src/presets/__tests__/standard.test.ts +2 -17
- package/src/presets/index.ts +1 -3
- package/src/presets/standard.ts +1 -26
- package/src/safety/output-guardrail.ts +0 -4
- package/src/tools/registry.ts +1 -1
- package/src/types/__tests__/types.test.ts +1 -33
- package/src/types/constraint.ts +6 -75
- package/src/types/failure.ts +165 -0
- package/src/types/index.ts +7 -5
- package/src/types/monitoring-types.ts +150 -0
- package/src/utils/detect-source-roots.ts +1 -1
- package/src/utils/file-walk.ts +78 -0
- package/src/verification/rules-based.ts +0 -1
- package/bin/harness-knowledge-capture.js +0 -99
- package/bin/harness-knowledge-check.js +0 -164
- package/bin/harness-knowledge-track.js +0 -118
- package/dist/cli/commands/sync-docs.d.ts.map +0 -1
- package/dist/cli/commands/sync-docs.js +0 -1074
- package/dist/cli/commands/sync-docs.js.map +0 -1
- package/dist/constraints/index.d.ts +0 -4
- package/dist/constraints/index.d.ts.map +0 -1
- package/dist/constraints/index.js +0 -20
- package/dist/constraints/index.js.map +0 -1
- package/dist/core/constraints/doc-freshness/auto-fix.d.ts +0 -23
- package/dist/core/constraints/doc-freshness/auto-fix.d.ts.map +0 -1
- package/dist/core/constraints/doc-freshness/auto-fix.js +0 -59
- package/dist/core/constraints/doc-freshness/auto-fix.js.map +0 -1
- package/dist/core/constraints/prompt-injection.d.ts +0 -16
- package/dist/core/constraints/prompt-injection.d.ts.map +0 -1
- package/dist/core/constraints/prompt-injection.js +0 -69
- package/dist/core/constraints/prompt-injection.js.map +0 -1
- package/dist/core/spec/index.d.ts +0 -7
- package/dist/core/spec/index.d.ts.map +0 -1
- package/dist/core/spec/index.js.map +0 -1
- package/dist/governance/executor.d.ts +0 -45
- package/dist/governance/executor.d.ts.map +0 -1
- package/dist/governance/executor.js +0 -243
- package/dist/governance/executor.js.map +0 -1
- package/dist/governance/index.d.ts +0 -9
- package/dist/governance/index.d.ts.map +0 -1
- package/dist/governance/index.js +0 -13
- package/dist/governance/index.js.map +0 -1
- package/dist/governance/types.d.ts +0 -46
- package/dist/governance/types.d.ts.map +0 -1
- package/dist/governance/types.js +0 -9
- package/dist/governance/types.js.map +0 -1
- package/dist/tools/definitions/definitions/core/code/fingerprint.sh +0 -273
- package/dist/tools/definitions/definitions/core/code/fingerprint.yml +0 -72
- package/dist/tools/definitions/definitions/core/code/parse.yml +0 -68
- package/dist/tools/definitions/definitions/core/code/register-language.sh +0 -475
- package/dist/tools/definitions/definitions/core/code/register-language.yml +0 -74
- package/dist/tools/definitions/definitions/core/docker/build.yml +0 -73
- package/dist/tools/definitions/definitions/core/docker/run.yml +0 -81
- package/dist/tools/definitions/definitions/core/file/copy.yml +0 -88
- package/dist/tools/definitions/definitions/core/file/read.yml +0 -69
- package/dist/tools/definitions/definitions/core/file/write.yml +0 -75
- package/dist/tools/definitions/definitions/core/git/branch.yml +0 -61
- package/dist/tools/definitions/definitions/core/git/cleanup-worktree.yml +0 -50
- package/dist/tools/definitions/definitions/core/git/clone.yml +0 -69
- package/dist/tools/definitions/definitions/core/git/commit.yml +0 -65
- package/dist/tools/definitions/definitions/core/git/push.yml +0 -79
- package/dist/tools/definitions/definitions/core/git/worktree.yml +0 -96
- package/dist/tools/definitions/definitions/core/notification/notify.sh +0 -152
- package/dist/tools/definitions/definitions/core/notification/notify.yml +0 -60
- package/dist/tools/definitions/definitions/core/npm/build.yml +0 -75
- package/dist/tools/definitions/definitions/core/npm/install.yml +0 -58
- package/dist/tools/definitions/definitions/core/npm/test.yml +0 -75
- package/dist/tools/definitions/definitions/core/validation/check-reuse.yml +0 -170
- package/dist/tools/definitions/definitions/core/validation/validate-handlers.yml +0 -118
- package/dist/tools/definitions/definitions/core/validation/validate-readme-stats.yml +0 -155
- package/dist/tools/definitions/definitions/core/validation/validate-yaml-syntax.yml +0 -134
- package/dist/tools/definitions/definitions/ext/browser/browser-automate.sh +0 -255
- package/dist/tools/definitions/definitions/ext/browser/browser-automate.yml +0 -166
- package/dist/tools/definitions/definitions/ext/browser/browser-close.sh +0 -104
- package/dist/tools/definitions/definitions/ext/browser/browser-close.yml +0 -55
- package/dist/tools/definitions/definitions/ext/browser/browser-mcp-debug.sh +0 -682
- package/dist/tools/definitions/definitions/ext/browser/browser-mcp-debug.yml +0 -167
- package/dist/tools/definitions/definitions/ext/browser/browser-start.sh +0 -101
- package/dist/tools/definitions/definitions/ext/browser/browser-start.yml +0 -62
- package/dist/tools/definitions/definitions/registry.json +0 -795
- package/dist/tools/definitions/definitions/std/README.md +0 -350
- package/dist/tools/definitions/definitions/std/analysis/analyze-codebase.yml +0 -72
- package/dist/tools/definitions/definitions/std/analysis/analyze-diff.yml +0 -182
- package/dist/tools/definitions/definitions/std/analysis/analyze-git-diff.yml +0 -70
- package/dist/tools/definitions/definitions/std/analysis/analyze-impact.yml +0 -78
- package/dist/tools/definitions/definitions/std/analysis/analyze-requirements.yml +0 -105
- package/dist/tools/definitions/definitions/std/analysis/brainstorm-options.yml +0 -106
- package/dist/tools/definitions/definitions/std/analysis/build-graph.yml +0 -154
- package/dist/tools/definitions/definitions/std/analysis/clarify-requirements.yml +0 -90
- package/dist/tools/definitions/definitions/std/analysis/detect-context.yml +0 -109
- package/dist/tools/definitions/definitions/std/analysis/detect-layers.yml +0 -125
- package/dist/tools/definitions/definitions/std/analysis/generate-tour.yml +0 -102
- package/dist/tools/definitions/definitions/std/analysis/search-enhance.yml +0 -105
- package/dist/tools/definitions/definitions/std/backlog/add.yml +0 -51
- package/dist/tools/definitions/definitions/std/backlog/decide.yml +0 -39
- package/dist/tools/definitions/definitions/std/backlog/github-sync.yml +0 -161
- package/dist/tools/definitions/definitions/std/backlog/list.yml +0 -53
- package/dist/tools/definitions/definitions/std/backlog/load.yml +0 -46
- package/dist/tools/definitions/definitions/std/backlog/resolve.yml +0 -37
- package/dist/tools/definitions/definitions/std/backlog/update.yml +0 -42
- package/dist/tools/definitions/definitions/std/bugfix/diagnose.yml +0 -68
- package/dist/tools/definitions/definitions/std/bugfix/fix.yml +0 -66
- package/dist/tools/definitions/definitions/std/bugfix/verify.yml +0 -69
- package/dist/tools/definitions/definitions/std/constraint/check-decomposition.yml +0 -103
- package/dist/tools/definitions/definitions/std/constraint/check-feature-list.yml +0 -77
- package/dist/tools/definitions/definitions/std/constraint/check-progress.yml +0 -97
- package/dist/tools/definitions/definitions/std/constraint/generate-report.yml +0 -147
- package/dist/tools/definitions/definitions/std/deploy/commit-push.yml +0 -33
- package/dist/tools/definitions/definitions/std/deploy/deploy-backend.yml +0 -37
- package/dist/tools/definitions/definitions/std/deploy/deploy-frontend.yml +0 -37
- package/dist/tools/definitions/definitions/std/deploy/rollback.yml +0 -148
- package/dist/tools/definitions/definitions/std/design/analyze-architecture-impact.yml +0 -113
- package/dist/tools/definitions/definitions/std/design/design-api.yml +0 -55
- package/dist/tools/definitions/definitions/std/design/design-architecture.yml +0 -97
- package/dist/tools/definitions/definitions/std/design/design-db.yml +0 -81
- package/dist/tools/definitions/definitions/std/design/generate-spec.yml +0 -182
- package/dist/tools/definitions/definitions/std/development/develop-api.yml +0 -85
- package/dist/tools/definitions/definitions/std/development/develop-backend.yml +0 -88
- package/dist/tools/definitions/definitions/std/development/develop-frontend.yml +0 -87
- package/dist/tools/definitions/definitions/std/development/develop-shared-types.yml +0 -74
- package/dist/tools/definitions/definitions/std/development/develop-task.yml +0 -122
- package/dist/tools/definitions/definitions/std/development/develop-tests.yml +0 -76
- package/dist/tools/definitions/definitions/std/development/execute-batch.yml +0 -152
- package/dist/tools/definitions/definitions/std/development/fix-issues.yml +0 -100
- package/dist/tools/definitions/definitions/std/development/implement-task.yml +0 -124
- package/dist/tools/definitions/definitions/std/development/review-fix-cycle.yml +0 -232
- package/dist/tools/definitions/definitions/std/evolution/implement.yml +0 -125
- package/dist/tools/definitions/definitions/std/evolution/prioritize.yml +0 -112
- package/dist/tools/definitions/definitions/std/evolution/report-gap.yml +0 -166
- package/dist/tools/definitions/definitions/std/file/read.yml +0 -21
- package/dist/tools/definitions/definitions/std/governance/aggregate-opinions.sh +0 -201
- package/dist/tools/definitions/definitions/std/governance/aggregate-opinions.yml +0 -79
- package/dist/tools/definitions/definitions/std/governance/audit-task.yml +0 -178
- package/dist/tools/definitions/definitions/std/governance/cast-vote.yml +0 -129
- package/dist/tools/definitions/definitions/std/governance/collect-issues.yml +0 -16
- package/dist/tools/definitions/definitions/std/governance/create-signed-document.yml +0 -23
- package/dist/tools/definitions/definitions/std/governance/create-voting-session.yml +0 -101
- package/dist/tools/definitions/definitions/std/governance/define-stance.sh +0 -243
- package/dist/tools/definitions/definitions/std/governance/define-stance.yml +0 -82
- package/dist/tools/definitions/definitions/std/governance/generate-review-report.yml +0 -23
- package/dist/tools/definitions/definitions/std/governance/impeach.yml +0 -179
- package/dist/tools/definitions/definitions/std/governance/multi-stance-review.yml +0 -154
- package/dist/tools/definitions/definitions/std/governance/prepare-artifact.yml +0 -20
- package/dist/tools/definitions/definitions/std/governance/review-spec-approval.yml +0 -262
- package/dist/tools/definitions/definitions/std/governance/rollback.yml +0 -186
- package/dist/tools/definitions/definitions/std/governance/stance-review.yml +0 -149
- package/dist/tools/definitions/definitions/std/governance/track-effect.yml +0 -199
- package/dist/tools/definitions/definitions/std/governance/vote-tally.yml +0 -144
- package/dist/tools/definitions/definitions/std/patch/execute.yml +0 -51
- package/dist/tools/definitions/definitions/std/planning/generate-tasks.yml +0 -36
- package/dist/tools/definitions/definitions/std/planning/load-tasks.yml +0 -44
- package/dist/tools/definitions/definitions/std/planning/split-batch.yml +0 -481
- package/dist/tools/definitions/definitions/std/planning/split-tasks.yml +0 -359
- package/dist/tools/definitions/definitions/std/planning/update-tasks.yml +0 -51
- package/dist/tools/definitions/definitions/std/planning/validate-tasks.yml +0 -46
- package/dist/tools/definitions/definitions/std/project/decide-next-workflow.yml +0 -38
- package/dist/tools/definitions/definitions/std/project/load-state.yml +0 -31
- package/dist/tools/definitions/definitions/std/project/save-state.yml +0 -32
- package/dist/tools/definitions/definitions/std/quality/check-quality.yml +0 -241
- package/dist/tools/definitions/definitions/std/quality/debug-systematic.yml +0 -163
- package/dist/tools/definitions/definitions/std/quality/handle-feedback.yml +0 -108
- package/dist/tools/definitions/definitions/std/quality/review-code.yml +0 -128
- package/dist/tools/definitions/definitions/std/quality/review-spec.yml +0 -140
- package/dist/tools/definitions/definitions/std/quality/review-task.yml +0 -190
- package/dist/tools/definitions/definitions/std/quality/run-tests.yml +0 -80
- package/dist/tools/definitions/definitions/std/quick/analyze.yml +0 -56
- package/dist/tools/definitions/definitions/std/quick/implement.yml +0 -67
- package/dist/tools/definitions/definitions/std/quick/verify.yml +0 -71
- package/dist/tools/definitions/definitions/std/verification/verify_completion.yml +0 -113
- package/dist/tools/definitions/definitions/std/verification/wait-condition.yml +0 -107
- package/dist/types/iron-law.d.ts +0 -25
- package/dist/types/iron-law.d.ts.map +0 -1
- package/dist/types/iron-law.js +0 -16
- package/dist/types/iron-law.js.map +0 -1
- package/src/cli/commands/sync-docs.ts +0 -1175
- package/src/constraints/index.ts +0 -3
- package/src/core/constraints/__tests__/prompt-injection.test.ts +0 -89
- package/src/core/constraints/doc-freshness/auto-fix.ts +0 -69
- package/src/core/constraints/prompt-injection.ts +0 -73
- package/src/core/spec/index.ts +0 -7
- package/src/governance/CONTEXT.md +0 -22
- package/src/governance/__tests__/executor.test.ts +0 -249
- package/src/governance/executor.ts +0 -229
- package/src/governance/index.ts +0 -13
- package/src/governance/types.ts +0 -53
- package/src/tools/core/package.json +0 -7
- package/src/tools/core/pnpm-lock.yaml +0 -232
- package/src/types/iron-law.ts +0 -50
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
# execute-batch.yml - 批次执行
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 类型: 动态执行
|
|
4
|
-
# 用途: 执行一批任务,返回执行结果
|
|
5
|
-
# Superpowers: Phase 4 Execute - 分批执行
|
|
6
|
-
# ============================================================================
|
|
7
|
-
|
|
8
|
-
name: execute-batch
|
|
9
|
-
stage: develop
|
|
10
|
-
description: |
|
|
11
|
-
执行一批任务,每个任务调用 develop-task 步骤。
|
|
12
|
-
|
|
13
|
-
支持两种执行模式:
|
|
14
|
-
- sequential: 串行执行,每个任务完成后执行下一个
|
|
15
|
-
- parallel: 并行执行,所有任务同时执行
|
|
16
|
-
|
|
17
|
-
返回每个任务的执行结果,用于后续 review。
|
|
18
|
-
category: development
|
|
19
|
-
version: 1.0.0
|
|
20
|
-
|
|
21
|
-
# 输入定义
|
|
22
|
-
inputs:
|
|
23
|
-
- name: batch
|
|
24
|
-
type: array
|
|
25
|
-
required: true
|
|
26
|
-
description: 本批次任务列表
|
|
27
|
-
items:
|
|
28
|
-
type: object
|
|
29
|
-
properties:
|
|
30
|
-
id:
|
|
31
|
-
type: string
|
|
32
|
-
name:
|
|
33
|
-
type: string
|
|
34
|
-
description:
|
|
35
|
-
type: string
|
|
36
|
-
acceptance:
|
|
37
|
-
type: array
|
|
38
|
-
dependencies:
|
|
39
|
-
type: array
|
|
40
|
-
|
|
41
|
-
- name: batch_index
|
|
42
|
-
type: number
|
|
43
|
-
required: true
|
|
44
|
-
description: 批次索引(从 0 开始)
|
|
45
|
-
|
|
46
|
-
- name: project
|
|
47
|
-
type: object
|
|
48
|
-
required: true
|
|
49
|
-
properties:
|
|
50
|
-
path:
|
|
51
|
-
type: string
|
|
52
|
-
tech_stack:
|
|
53
|
-
type: object
|
|
54
|
-
description: 项目上下文
|
|
55
|
-
|
|
56
|
-
- name: execution_mode
|
|
57
|
-
type: string
|
|
58
|
-
enum: [sequential, parallel]
|
|
59
|
-
default: sequential
|
|
60
|
-
description: 执行模式(默认串行)
|
|
61
|
-
|
|
62
|
-
- name: previous_outputs
|
|
63
|
-
type: array
|
|
64
|
-
description: 前序批次的输出结果
|
|
65
|
-
|
|
66
|
-
# 输出定义
|
|
67
|
-
outputs:
|
|
68
|
-
- name: results
|
|
69
|
-
type: array
|
|
70
|
-
description: 每个任务的执行结果
|
|
71
|
-
items:
|
|
72
|
-
type: object
|
|
73
|
-
properties:
|
|
74
|
-
task_id:
|
|
75
|
-
type: string
|
|
76
|
-
status:
|
|
77
|
-
type: string
|
|
78
|
-
enum: [success, failed, skipped]
|
|
79
|
-
files_changed:
|
|
80
|
-
type: array
|
|
81
|
-
tests_passed:
|
|
82
|
-
type: boolean
|
|
83
|
-
commit_hash:
|
|
84
|
-
type: string
|
|
85
|
-
error:
|
|
86
|
-
type: string
|
|
87
|
-
|
|
88
|
-
- name: all_passed
|
|
89
|
-
type: boolean
|
|
90
|
-
description: 所有任务是否都成功
|
|
91
|
-
|
|
92
|
-
- name: success_count
|
|
93
|
-
type: number
|
|
94
|
-
description: 成功任务数
|
|
95
|
-
|
|
96
|
-
- name: failed_count
|
|
97
|
-
type: number
|
|
98
|
-
description: 失败任务数
|
|
99
|
-
|
|
100
|
-
- name: failed_tasks
|
|
101
|
-
type: array
|
|
102
|
-
description: 失败的任务列表
|
|
103
|
-
items:
|
|
104
|
-
type: object
|
|
105
|
-
|
|
106
|
-
# 执行配置
|
|
107
|
-
execute:
|
|
108
|
-
type: dynamic
|
|
109
|
-
step_template:
|
|
110
|
-
step: development/develop-task
|
|
111
|
-
inputs:
|
|
112
|
-
task: "${task}"
|
|
113
|
-
project: "${inputs.project}"
|
|
114
|
-
previous_outputs: "${inputs.previous_outputs}"
|
|
115
|
-
|
|
116
|
-
# 执行模式
|
|
117
|
-
mode: "${inputs.execution_mode}" # sequential | parallel
|
|
118
|
-
|
|
119
|
-
# 并发控制(parallel 模式)
|
|
120
|
-
max_concurrent: 3
|
|
121
|
-
|
|
122
|
-
# 失败处理
|
|
123
|
-
on_failure: continue # continue | stop
|
|
124
|
-
|
|
125
|
-
# 进度回调
|
|
126
|
-
on_progress:
|
|
127
|
-
- event: task.completed
|
|
128
|
-
action: report
|
|
129
|
-
message: "任务 ${task.id} 完成"
|
|
130
|
-
|
|
131
|
-
# 前置条件
|
|
132
|
-
preconditions:
|
|
133
|
-
- condition: "${inputs.batch.length > 0}"
|
|
134
|
-
message: "批次不能为空"
|
|
135
|
-
|
|
136
|
-
- condition: "${inputs.project.path != null}"
|
|
137
|
-
message: "项目路径不能为空"
|
|
138
|
-
|
|
139
|
-
# 后置处理
|
|
140
|
-
postprocess:
|
|
141
|
-
- name: aggregate_results
|
|
142
|
-
description: 汇总执行结果
|
|
143
|
-
|
|
144
|
-
- name: generate_summary
|
|
145
|
-
description: 生成执行摘要
|
|
146
|
-
|
|
147
|
-
- name: notify_completion
|
|
148
|
-
condition: "${outputs.all_passed || outputs.failed_count > 0}"
|
|
149
|
-
message: |
|
|
150
|
-
批次 {{inputs.batch_index}} 执行完成
|
|
151
|
-
✅ 成功: {{outputs.success_count}}
|
|
152
|
-
❌ 失败: {{outputs.failed_count}}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
# fix-issues.yml - 修复 review 发现的问题
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 类型: Agent 执行
|
|
4
|
-
# 用途: 根据 review 结果修复代码问题
|
|
5
|
-
# ============================================================================
|
|
6
|
-
|
|
7
|
-
name: fix-issues
|
|
8
|
-
stage: develop
|
|
9
|
-
description: 修复 review 发现的问题
|
|
10
|
-
category: development
|
|
11
|
-
version: 1.0.0
|
|
12
|
-
|
|
13
|
-
# Agent 配置
|
|
14
|
-
agent: codex
|
|
15
|
-
temperature: 0.3
|
|
16
|
-
|
|
17
|
-
# 可用工具
|
|
18
|
-
tools:
|
|
19
|
-
- file-read
|
|
20
|
-
- file-write
|
|
21
|
-
- bash
|
|
22
|
-
- npm-test
|
|
23
|
-
|
|
24
|
-
# Prompt
|
|
25
|
-
prompt: |
|
|
26
|
-
你是开发者。请根据代码审查结果修复问题。
|
|
27
|
-
|
|
28
|
-
## 任务信息
|
|
29
|
-
|
|
30
|
-
**任务 ID**: {{task.id}}
|
|
31
|
-
**任务名称**: {{task.name}}
|
|
32
|
-
|
|
33
|
-
## 审核结果
|
|
34
|
-
|
|
35
|
-
**评分**: {{review.score}}/10
|
|
36
|
-
**是否通过**: {{review.passed}}
|
|
37
|
-
|
|
38
|
-
## 发现的问题
|
|
39
|
-
|
|
40
|
-
{{review.issues}}
|
|
41
|
-
|
|
42
|
-
## 验收标准未通过项
|
|
43
|
-
|
|
44
|
-
{{review.criteria_results}}
|
|
45
|
-
|
|
46
|
-
## 项目路径
|
|
47
|
-
|
|
48
|
-
{{project.path}}
|
|
49
|
-
|
|
50
|
-
## 修复要求
|
|
51
|
-
|
|
52
|
-
1. **逐个修复问题**:
|
|
53
|
-
- 按 severity 排序,先修 critical
|
|
54
|
-
- 每修一个,说明修复方法
|
|
55
|
-
|
|
56
|
-
2. **确保测试通过**:
|
|
57
|
-
- 修复后运行测试
|
|
58
|
-
- 如果测试失败,继续修复
|
|
59
|
-
|
|
60
|
-
3. **不要提交代码**:
|
|
61
|
-
- 本次只修复,不 commit
|
|
62
|
-
- 等待 re-review 通过后再提交
|
|
63
|
-
|
|
64
|
-
## 输出
|
|
65
|
-
|
|
66
|
-
修复完成后请报告:
|
|
67
|
-
1. 修复了哪些问题
|
|
68
|
-
2. 测试是否通过
|
|
69
|
-
3. 准备好 re-review
|
|
70
|
-
|
|
71
|
-
# 输入参数
|
|
72
|
-
inputs:
|
|
73
|
-
- name: task
|
|
74
|
-
type: object
|
|
75
|
-
required: true
|
|
76
|
-
description: 任务对象
|
|
77
|
-
|
|
78
|
-
- name: review
|
|
79
|
-
type: object
|
|
80
|
-
required: true
|
|
81
|
-
description: review 结果(来自 review-spec)
|
|
82
|
-
|
|
83
|
-
- name: project
|
|
84
|
-
type: object
|
|
85
|
-
required: true
|
|
86
|
-
description: 项目上下文
|
|
87
|
-
|
|
88
|
-
# 输出
|
|
89
|
-
outputs:
|
|
90
|
-
- name: fixes_applied
|
|
91
|
-
type: array
|
|
92
|
-
description: 应用的修复列表
|
|
93
|
-
|
|
94
|
-
- name: tests_passed
|
|
95
|
-
type: boolean
|
|
96
|
-
description: 修复后测试是否通过
|
|
97
|
-
|
|
98
|
-
- name: ready_for_review
|
|
99
|
-
type: boolean
|
|
100
|
-
description: 是否准备好 re-review
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
# implement-task.yml - 实现单个任务(不 commit)
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 类型: Agent 执行
|
|
4
|
-
# 用途: 根据任务描述实现功能,但不提交代码
|
|
5
|
-
# 输出: 实现结果,供后续 review
|
|
6
|
-
# ============================================================================
|
|
7
|
-
|
|
8
|
-
name: implement-task
|
|
9
|
-
stage: develop
|
|
10
|
-
description: 实现单个任务(不提交)
|
|
11
|
-
category: development
|
|
12
|
-
version: 1.0.0
|
|
13
|
-
|
|
14
|
-
# Agent 配置
|
|
15
|
-
agent: codex
|
|
16
|
-
temperature: 0.3
|
|
17
|
-
|
|
18
|
-
# 可用工具
|
|
19
|
-
tools:
|
|
20
|
-
- file-read
|
|
21
|
-
- file-write
|
|
22
|
-
- bash
|
|
23
|
-
- npm-test
|
|
24
|
-
|
|
25
|
-
# Prompt
|
|
26
|
-
prompt: |
|
|
27
|
-
你是一个资深开发者。请完成以下开发任务。
|
|
28
|
-
|
|
29
|
-
## 任务信息
|
|
30
|
-
|
|
31
|
-
**任务 ID**: {{task.id}}
|
|
32
|
-
**任务名称**: {{task.name}}
|
|
33
|
-
**任务描述**: {{task.description}}
|
|
34
|
-
|
|
35
|
-
## 验收标准
|
|
36
|
-
|
|
37
|
-
{{task.acceptance_criteria}}
|
|
38
|
-
|
|
39
|
-
## 项目上下文
|
|
40
|
-
|
|
41
|
-
**项目**: {{project.name}}
|
|
42
|
-
**技术栈**: {{project.tech_stack}}
|
|
43
|
-
**项目路径**: {{project.path}}
|
|
44
|
-
|
|
45
|
-
## 前置依赖
|
|
46
|
-
|
|
47
|
-
{{previous_outputs}}
|
|
48
|
-
|
|
49
|
-
## 要求
|
|
50
|
-
|
|
51
|
-
1. **TDD 流程**:
|
|
52
|
-
- 先写测试,确认测试失败
|
|
53
|
-
- 实现功能,确认测试通过
|
|
54
|
-
- 重构(如需要)
|
|
55
|
-
|
|
56
|
-
2. **代码质量**:
|
|
57
|
-
- 遵循项目现有代码风格
|
|
58
|
-
- 添加必要的注释
|
|
59
|
-
- 处理边界情况和错误
|
|
60
|
-
|
|
61
|
-
3. **不要提交代码**:
|
|
62
|
-
- 本次只实现,不 commit
|
|
63
|
-
- 等待 review 通过后再提交
|
|
64
|
-
|
|
65
|
-
## 输出
|
|
66
|
-
|
|
67
|
-
完成后请报告:
|
|
68
|
-
1. 创建/修改了哪些文件
|
|
69
|
-
2. 测试是否通过
|
|
70
|
-
3. 实现的关键逻辑
|
|
71
|
-
|
|
72
|
-
# 输入参数
|
|
73
|
-
inputs:
|
|
74
|
-
- name: task
|
|
75
|
-
type: object
|
|
76
|
-
required: true
|
|
77
|
-
properties:
|
|
78
|
-
id:
|
|
79
|
-
type: string
|
|
80
|
-
description: 任务 ID
|
|
81
|
-
name:
|
|
82
|
-
type: string
|
|
83
|
-
description: 任务名称
|
|
84
|
-
description:
|
|
85
|
-
type: string
|
|
86
|
-
description: 任务描述
|
|
87
|
-
acceptance_criteria:
|
|
88
|
-
type: array
|
|
89
|
-
description: 验收标准
|
|
90
|
-
description: 任务对象
|
|
91
|
-
|
|
92
|
-
- name: project
|
|
93
|
-
type: object
|
|
94
|
-
required: true
|
|
95
|
-
properties:
|
|
96
|
-
name:
|
|
97
|
-
type: string
|
|
98
|
-
tech_stack:
|
|
99
|
-
type: array
|
|
100
|
-
path:
|
|
101
|
-
type: string
|
|
102
|
-
description: 项目上下文
|
|
103
|
-
|
|
104
|
-
- name: previous_outputs
|
|
105
|
-
type: array
|
|
106
|
-
description: 前序任务的输出
|
|
107
|
-
|
|
108
|
-
# 输出
|
|
109
|
-
outputs:
|
|
110
|
-
- name: files_changed
|
|
111
|
-
type: array
|
|
112
|
-
description: 修改的文件列表
|
|
113
|
-
|
|
114
|
-
- name: tests_passed
|
|
115
|
-
type: boolean
|
|
116
|
-
description: 测试是否通过
|
|
117
|
-
|
|
118
|
-
- name: implementation_notes
|
|
119
|
-
type: string
|
|
120
|
-
description: 实现说明
|
|
121
|
-
|
|
122
|
-
- name: ready_for_review
|
|
123
|
-
type: boolean
|
|
124
|
-
description: 是否准备好 review
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
# review-fix-cycle.yml - Review → Fix 循环
|
|
2
|
-
# ============================================================================
|
|
3
|
-
# 类型: 复合步骤
|
|
4
|
-
# 用途: 对任务执行 review → fix → re-review 循环直到通过
|
|
5
|
-
# Superpowers: per-task review - Review 循环封装
|
|
6
|
-
# ============================================================================
|
|
7
|
-
#
|
|
8
|
-
# 使用场景:
|
|
9
|
-
# - 在工作流中需要重复执行 review → fix 循环
|
|
10
|
-
# - 避免在每个工作流中重复写循环逻辑
|
|
11
|
-
#
|
|
12
|
-
# 输入:任务 + 最大迭代次数
|
|
13
|
-
# 输出:是否通过 + 迭代次数 + 最终分数
|
|
14
|
-
# ============================================================================
|
|
15
|
-
|
|
16
|
-
name: review-fix-cycle
|
|
17
|
-
stage: develop
|
|
18
|
-
description: |
|
|
19
|
-
对任务执行 review → fix → re-review 循环,直到通过或达到最大迭代次数。
|
|
20
|
-
|
|
21
|
-
流程:
|
|
22
|
-
1. Review 任务代码
|
|
23
|
-
2. 如果通过 → 结束
|
|
24
|
-
3. 如果未通过 → Fix 问题
|
|
25
|
-
4. Re-review
|
|
26
|
-
5. 循环直到通过或达到最大迭代
|
|
27
|
-
|
|
28
|
-
这是 Superpowers per-task review 的循环封装。
|
|
29
|
-
category: development
|
|
30
|
-
version: 1.0.0
|
|
31
|
-
|
|
32
|
-
# 输入定义
|
|
33
|
-
inputs:
|
|
34
|
-
- name: task
|
|
35
|
-
type: object
|
|
36
|
-
required: true
|
|
37
|
-
description: 任务对象
|
|
38
|
-
properties:
|
|
39
|
-
id:
|
|
40
|
-
type: string
|
|
41
|
-
name:
|
|
42
|
-
type: string
|
|
43
|
-
description:
|
|
44
|
-
type: string
|
|
45
|
-
acceptance:
|
|
46
|
-
type: array
|
|
47
|
-
|
|
48
|
-
- name: project
|
|
49
|
-
type: object
|
|
50
|
-
required: true
|
|
51
|
-
description: 项目上下文
|
|
52
|
-
properties:
|
|
53
|
-
path:
|
|
54
|
-
type: string
|
|
55
|
-
tech_stack:
|
|
56
|
-
type: object
|
|
57
|
-
|
|
58
|
-
- name: max_iterations
|
|
59
|
-
type: number
|
|
60
|
-
default: 3
|
|
61
|
-
description: 最大迭代次数(默认 3 次)
|
|
62
|
-
|
|
63
|
-
- name: pass_threshold
|
|
64
|
-
type: number
|
|
65
|
-
default: 70
|
|
66
|
-
description: 通过阈值(默认 70 分)
|
|
67
|
-
|
|
68
|
-
# 输出定义
|
|
69
|
-
outputs:
|
|
70
|
-
- name: passed
|
|
71
|
-
type: boolean
|
|
72
|
-
description: 是否最终通过
|
|
73
|
-
|
|
74
|
-
- name: iterations
|
|
75
|
-
type: number
|
|
76
|
-
description: 实际迭代次数
|
|
77
|
-
|
|
78
|
-
- name: final_score
|
|
79
|
-
type: number
|
|
80
|
-
description: 最终 Review 分数
|
|
81
|
-
|
|
82
|
-
- name: issues_fixed
|
|
83
|
-
type: array
|
|
84
|
-
description: 修复的问题列表
|
|
85
|
-
|
|
86
|
-
- name: remaining_issues
|
|
87
|
-
type: array
|
|
88
|
-
description: 剩余未解决的问题
|
|
89
|
-
|
|
90
|
-
- name: history
|
|
91
|
-
type: array
|
|
92
|
-
description: 每次迭代的记录
|
|
93
|
-
items:
|
|
94
|
-
type: object
|
|
95
|
-
properties:
|
|
96
|
-
iteration:
|
|
97
|
-
type: number
|
|
98
|
-
score:
|
|
99
|
-
type: number
|
|
100
|
-
issues_found:
|
|
101
|
-
type: number
|
|
102
|
-
issues_fixed:
|
|
103
|
-
type: number
|
|
104
|
-
|
|
105
|
-
# 执行配置
|
|
106
|
-
execute:
|
|
107
|
-
type: composite
|
|
108
|
-
|
|
109
|
-
# 初始状态
|
|
110
|
-
initial_state:
|
|
111
|
-
iteration: 0
|
|
112
|
-
passed: false
|
|
113
|
-
score: 0
|
|
114
|
-
history: []
|
|
115
|
-
|
|
116
|
-
# 循环步骤
|
|
117
|
-
steps:
|
|
118
|
-
# Step 1: Review
|
|
119
|
-
- id: review
|
|
120
|
-
step: quality/review-task
|
|
121
|
-
inputs:
|
|
122
|
-
task: "${inputs.task}"
|
|
123
|
-
files_changed: "${state.current_files || initial_files}"
|
|
124
|
-
project: "${inputs.project}"
|
|
125
|
-
outputs:
|
|
126
|
-
passed: review_passed
|
|
127
|
-
score: review_score
|
|
128
|
-
issues: review_issues
|
|
129
|
-
|
|
130
|
-
# Step 2: 检查是否通过
|
|
131
|
-
- id: check-passed
|
|
132
|
-
condition: "${steps.review.review_passed == true || steps.review.review_score >= inputs.pass_threshold}"
|
|
133
|
-
action: set_state
|
|
134
|
-
state:
|
|
135
|
-
passed: true
|
|
136
|
-
final_score: "${steps.review.review_score}"
|
|
137
|
-
then: break # 跳出循环
|
|
138
|
-
|
|
139
|
-
# Step 3: 检查是否达到最大迭代
|
|
140
|
-
- id: check-max-iterations
|
|
141
|
-
condition: "${state.iteration >= inputs.max_iterations}"
|
|
142
|
-
action: set_state
|
|
143
|
-
state:
|
|
144
|
-
passed: false
|
|
145
|
-
final_score: "${steps.review.review_score}"
|
|
146
|
-
remaining_issues: "${steps.review.review_issues}"
|
|
147
|
-
then: break # 跳出循环
|
|
148
|
-
|
|
149
|
-
# Step 4: Fix 问题
|
|
150
|
-
- id: fix-issues
|
|
151
|
-
step: development/fix-issues
|
|
152
|
-
inputs:
|
|
153
|
-
issues: "${steps.review.review_issues}"
|
|
154
|
-
project: "${inputs.project}"
|
|
155
|
-
task: "${inputs.task}"
|
|
156
|
-
outputs:
|
|
157
|
-
fixes_applied: fixes
|
|
158
|
-
files_changed: fixed_files
|
|
159
|
-
|
|
160
|
-
# Step 5: 更新状态
|
|
161
|
-
- id: update-state
|
|
162
|
-
action: set_state
|
|
163
|
-
state:
|
|
164
|
-
iteration: "${state.iteration + 1}"
|
|
165
|
-
current_files: "${steps.fix-issues.fixed_files}"
|
|
166
|
-
history: |
|
|
167
|
-
${state.history + [{
|
|
168
|
-
iteration: state.iteration + 1,
|
|
169
|
-
score: steps.review.review_score,
|
|
170
|
-
issues_found: steps.review.review_issues.length,
|
|
171
|
-
issues_fixed: steps.fix-issues.fixes.length
|
|
172
|
-
}]}
|
|
173
|
-
|
|
174
|
-
# 循环条件
|
|
175
|
-
loop_condition: "${state.passed == false && state.iteration < inputs.max_iterations}"
|
|
176
|
-
|
|
177
|
-
# 前置条件
|
|
178
|
-
preconditions:
|
|
179
|
-
- condition: "${inputs.task.id != null}"
|
|
180
|
-
message: "任务 ID 不能为空"
|
|
181
|
-
|
|
182
|
-
- condition: "${inputs.max_iterations > 0}"
|
|
183
|
-
message: "最大迭代次数必须大于 0"
|
|
184
|
-
|
|
185
|
-
# 后置处理
|
|
186
|
-
postprocess:
|
|
187
|
-
- name: generate_summary
|
|
188
|
-
description: 生成执行摘要
|
|
189
|
-
|
|
190
|
-
- name: log_result
|
|
191
|
-
message: |
|
|
192
|
-
Review-Fix 循环完成
|
|
193
|
-
任务: ${inputs.task.id}
|
|
194
|
-
迭代次数: ${outputs.iterations}/${inputs.max_iterations}
|
|
195
|
-
最终分数: ${outputs.final_score}
|
|
196
|
-
结果: ${outputs.passed ? '✅ 通过' : '❌ 未通过'}
|
|
197
|
-
|
|
198
|
-
# 示例
|
|
199
|
-
example: |
|
|
200
|
-
## 在工作流中使用
|
|
201
|
-
|
|
202
|
-
```yaml
|
|
203
|
-
- id: develop-with-review
|
|
204
|
-
step: development/review-fix-cycle
|
|
205
|
-
inputs:
|
|
206
|
-
task: "${current_task}"
|
|
207
|
-
project: "${project}"
|
|
208
|
-
max_iterations: 3
|
|
209
|
-
pass_threshold: 70
|
|
210
|
-
outputs:
|
|
211
|
-
passed: task_passed
|
|
212
|
-
final_score: task_score
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
## 输出示例
|
|
216
|
-
|
|
217
|
-
```json
|
|
218
|
-
{
|
|
219
|
-
"passed": true,
|
|
220
|
-
"iterations": 2,
|
|
221
|
-
"final_score": 85,
|
|
222
|
-
"issues_fixed": [
|
|
223
|
-
{"severity": "warning", "message": "缺少错误处理"},
|
|
224
|
-
{"severity": "warning", "message": "命名不规范"}
|
|
225
|
-
],
|
|
226
|
-
"remaining_issues": [],
|
|
227
|
-
"history": [
|
|
228
|
-
{"iteration": 1, "score": 65, "issues_found": 3, "issues_fixed": 2},
|
|
229
|
-
{"iteration": 2, "score": 85, "issues_found": 1, "issues_fixed": 1}
|
|
230
|
-
]
|
|
231
|
-
}
|
|
232
|
-
```
|