@boyingliu01/xp-gate 0.35.17 → 0.35.18

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.
Files changed (67) hide show
  1. package/gate-12-file-hygiene.sh +26 -4
  2. package/gate-13-compiler-strictness.sh +12 -0
  3. package/gates/gate-3.ts +77 -21
  4. package/gates/gate-8.ts +39 -26
  5. package/gates/gate-9.ts +4 -4
  6. package/hooks/gate-12-file-hygiene.sh +26 -4
  7. package/hooks/gate-13-compiler-strictness.sh +12 -0
  8. package/hooks/pre-commit +75 -11
  9. package/hooks/pre-push +11 -2
  10. package/lib/__tests__/doctor.test.js +9 -0
  11. package/lib/__tests__/gate-numbering.test.js +52 -0
  12. package/lib/__tests__/gate-runner.test.js +59 -14
  13. package/lib/__tests__/shared-utils.test.js +47 -0
  14. package/lib/gate-runner.js +98 -18
  15. package/lib/mattpocock-license-verdict.json +1 -1
  16. package/lib/shared-utils.js +27 -1
  17. package/mock-policy/AGENTS.md +2 -2
  18. package/mutation/AGENTS.md +2 -2
  19. package/package.json +1 -1
  20. package/plugins/claude-code/.claude-plugin/plugin.json +1 -1
  21. package/plugins/claude-code/skills/delphi-review/AGENTS.md +2 -2
  22. package/plugins/claude-code/skills/sprint-flow/AGENTS.md +2 -2
  23. package/plugins/claude-code/skills/sprint-flow/__tests__/verify-sprint-state.test.bats +48 -0
  24. package/plugins/claude-code/skills/sprint-flow/references/definition-of-done.md +47 -0
  25. package/plugins/claude-code/skills/sprint-flow/references/phase-4-verify.md +16 -0
  26. package/plugins/claude-code/skills/sprint-flow/references/phase-5-ship.md +14 -0
  27. package/plugins/claude-code/skills/sprint-flow/scripts/verify-sprint-state.sh +14 -1
  28. package/plugins/claude-code/skills/test-specification-alignment/AGENTS.md +2 -2
  29. package/plugins/dsh/package.json +1 -1
  30. package/plugins/dsh/skills/delphi-review/AGENTS.md +2 -2
  31. package/plugins/dsh/skills/sprint-flow/AGENTS.md +2 -2
  32. package/plugins/dsh/skills/sprint-flow/__tests__/verify-sprint-state.test.bats +48 -0
  33. package/plugins/dsh/skills/sprint-flow/references/definition-of-done.md +47 -0
  34. package/plugins/dsh/skills/sprint-flow/references/phase-4-verify.md +16 -0
  35. package/plugins/dsh/skills/sprint-flow/references/phase-5-ship.md +14 -0
  36. package/plugins/dsh/skills/sprint-flow/scripts/verify-sprint-state.sh +14 -1
  37. package/plugins/dsh/skills/test-specification-alignment/AGENTS.md +2 -2
  38. package/plugins/dsh/src/delphi-findings.test.ts +32 -6
  39. package/plugins/dsh/src/exit-code.test.ts +6 -0
  40. package/plugins/opencode/package.json +1 -1
  41. package/plugins/opencode/skills/delphi-review/AGENTS.md +2 -2
  42. package/plugins/opencode/skills/sprint-flow/AGENTS.md +2 -2
  43. package/plugins/opencode/skills/sprint-flow/__tests__/verify-sprint-state.test.bats +48 -0
  44. package/plugins/opencode/skills/sprint-flow/references/definition-of-done.md +47 -0
  45. package/plugins/opencode/skills/sprint-flow/references/phase-4-verify.md +16 -0
  46. package/plugins/opencode/skills/sprint-flow/references/phase-5-ship.md +14 -0
  47. package/plugins/opencode/skills/sprint-flow/scripts/verify-sprint-state.sh +14 -1
  48. package/plugins/opencode/skills/test-specification-alignment/AGENTS.md +2 -2
  49. package/plugins/qoder/plugin.json +1 -1
  50. package/plugins/qoder/skills/delphi-review/AGENTS.md +2 -2
  51. package/plugins/qoder/skills/sprint-flow/AGENTS.md +2 -2
  52. package/plugins/qoder/skills/sprint-flow/__tests__/verify-sprint-state.test.bats +48 -0
  53. package/plugins/qoder/skills/sprint-flow/references/definition-of-done.md +47 -0
  54. package/plugins/qoder/skills/sprint-flow/references/phase-4-verify.md +16 -0
  55. package/plugins/qoder/skills/sprint-flow/references/phase-5-ship.md +14 -0
  56. package/plugins/qoder/skills/sprint-flow/scripts/verify-sprint-state.sh +14 -1
  57. package/plugins/qoder/skills/test-specification-alignment/AGENTS.md +2 -2
  58. package/principles/AGENTS.md +2 -2
  59. package/scripts/__tests__/sync-package-content.test.js +114 -46
  60. package/skills/delphi-review/AGENTS.md +2 -2
  61. package/skills/sprint-flow/AGENTS.md +2 -2
  62. package/skills/sprint-flow/__tests__/verify-sprint-state.test.bats +48 -0
  63. package/skills/sprint-flow/references/definition-of-done.md +47 -0
  64. package/skills/sprint-flow/references/phase-4-verify.md +16 -0
  65. package/skills/sprint-flow/references/phase-5-ship.md +14 -0
  66. package/skills/sprint-flow/scripts/verify-sprint-state.sh +14 -1
  67. package/skills/test-specification-alignment/AGENTS.md +2 -2
@@ -3,6 +3,12 @@
3
3
  # Checks that sprint-state.json is valid JSON and all expected keys exist.
4
4
  #
5
5
  # Usage: bash verify-sprint-state.sh [sprint-state-dir]
6
+ #
7
+ # The expected keys are the ones `xp-gate sprint-init` actually writes (#679).
8
+ # They were previously ['sprint_id','status','current_phase','phases'] -- a schema
9
+ # this project has never written, so the check failed on every sprint the CLI
10
+ # itself had just created. A verifier that rejects its own producer's output is
11
+ # worse than no verifier: it trains people to ignore it.
6
12
 
7
13
  set -euo pipefail
8
14
 
@@ -24,12 +30,19 @@ node -e "
24
30
  const fs = require('fs');
25
31
  try {
26
32
  const data = JSON.parse(fs.readFileSync('$STATE_FILE', 'utf8'));
27
- const requiredKeys = ['sprint_id', 'status', 'current_phase', 'phases'];
33
+ // These are the keys src/npm-package/lib/sprint-init.js writes.
34
+ const requiredKeys = ['id', 'task_description', 'phase', 'status'];
28
35
  const missing = requiredKeys.filter(k => !(k in data));
29
36
  if (missing.length > 0) {
30
37
  console.error('ERROR: Missing required keys in sprint-state.json:', missing.join(', '));
31
38
  process.exit(1);
32
39
  }
40
+ // phase_history is an array by construction; a non-array here means the file
41
+ // was hand-edited or written by a different tool, which is worth failing on.
42
+ if (!Array.isArray(data.phase_history)) {
43
+ console.error('ERROR: phase_history must be an array in sprint-state.json');
44
+ process.exit(1);
45
+ }
33
46
  console.log('OK: sprint-state.json is valid with all required keys');
34
47
  } catch (e) {
35
48
  console.error('ERROR: sprint-state.json is not valid JSON:', e.message);
@@ -1,9 +1,9 @@
1
1
  # SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
2
2
 
3
3
  **Generated:** 2026-10-31
4
- **Commit:** 26a741de
4
+ **Commit:** 97e3c2ec
5
5
  **Branch:** main
6
- **Version:** 0.35.17.0
6
+ **Version:** 0.35.18.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.