bigpowers 2.85.2 → 2.86.1

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 (136) hide show
  1. package/.agents/skills/develop-tdd/SKILL.md +11 -1
  2. package/.agents/skills/diagnose-root/SKILL.md +1 -1
  3. package/.agents/skills/enforce-first/SKILL.md +13 -0
  4. package/.agents/skills/gate-trace/SKILL.md +4 -0
  5. package/.agents/skills/migrate-spec/SKILL.md +3 -3
  6. package/.agents/skills/plan-work/SKILL.md +1 -1
  7. package/.agents/skills/smoke-test/SKILL.md +39 -24
  8. package/.agents/skills/trace-requirement/SKILL.md +1 -1
  9. package/.agents/skills/validate-contracts/SKILL.md +26 -58
  10. package/.agents/skills/validate-fix/SKILL.md +46 -5
  11. package/.codebuddy/skills/develop-tdd/SKILL.md +11 -1
  12. package/.codebuddy/skills/diagnose-root/SKILL.md +1 -1
  13. package/.codebuddy/skills/enforce-first/SKILL.md +13 -0
  14. package/.codebuddy/skills/gate-trace/SKILL.md +4 -0
  15. package/.codebuddy/skills/migrate-spec/SKILL.md +3 -3
  16. package/.codebuddy/skills/plan-work/SKILL.md +1 -1
  17. package/.codebuddy/skills/smoke-test/SKILL.md +39 -24
  18. package/.codebuddy/skills/trace-requirement/SKILL.md +1 -1
  19. package/.codebuddy/skills/validate-contracts/SKILL.md +26 -58
  20. package/.codebuddy/skills/validate-fix/SKILL.md +46 -5
  21. package/.codex/skills/develop-tdd/SKILL.md +11 -1
  22. package/.codex/skills/diagnose-root/SKILL.md +1 -1
  23. package/.codex/skills/enforce-first/SKILL.md +13 -0
  24. package/.codex/skills/gate-trace/SKILL.md +4 -0
  25. package/.codex/skills/migrate-spec/SKILL.md +3 -3
  26. package/.codex/skills/plan-work/SKILL.md +1 -1
  27. package/.codex/skills/smoke-test/SKILL.md +39 -24
  28. package/.codex/skills/trace-requirement/SKILL.md +1 -1
  29. package/.codex/skills/validate-contracts/SKILL.md +26 -58
  30. package/.codex/skills/validate-fix/SKILL.md +46 -5
  31. package/.hermes/skills/develop-tdd/SKILL.md +11 -1
  32. package/.hermes/skills/diagnose-root/SKILL.md +1 -1
  33. package/.hermes/skills/enforce-first/SKILL.md +13 -0
  34. package/.hermes/skills/gate-trace/SKILL.md +4 -0
  35. package/.hermes/skills/migrate-spec/SKILL.md +3 -3
  36. package/.hermes/skills/plan-work/SKILL.md +1 -1
  37. package/.hermes/skills/smoke-test/SKILL.md +39 -24
  38. package/.hermes/skills/trace-requirement/SKILL.md +1 -1
  39. package/.hermes/skills/validate-contracts/SKILL.md +26 -58
  40. package/.hermes/skills/validate-fix/SKILL.md +46 -5
  41. package/.kilocode/rules/develop-tdd.md +11 -1
  42. package/.kilocode/rules/diagnose-root.md +1 -1
  43. package/.kilocode/rules/enforce-first.md +13 -0
  44. package/.kilocode/rules/gate-trace.md +4 -0
  45. package/.kilocode/rules/migrate-spec.md +3 -3
  46. package/.kilocode/rules/plan-work.md +1 -1
  47. package/.kilocode/rules/smoke-test.md +39 -24
  48. package/.kilocode/rules/trace-requirement.md +1 -1
  49. package/.kilocode/rules/validate-contracts.md +26 -58
  50. package/.kilocode/rules/validate-fix.md +46 -5
  51. package/.mimocode/skills/develop-tdd/SKILL.md +11 -1
  52. package/.mimocode/skills/diagnose-root/SKILL.md +1 -1
  53. package/.mimocode/skills/enforce-first/SKILL.md +13 -0
  54. package/.mimocode/skills/gate-trace/SKILL.md +4 -0
  55. package/.mimocode/skills/migrate-spec/SKILL.md +3 -3
  56. package/.mimocode/skills/plan-work/SKILL.md +1 -1
  57. package/.mimocode/skills/smoke-test/SKILL.md +39 -24
  58. package/.mimocode/skills/trace-requirement/SKILL.md +1 -1
  59. package/.mimocode/skills/validate-contracts/SKILL.md +26 -58
  60. package/.mimocode/skills/validate-fix/SKILL.md +46 -5
  61. package/.pi/package.json +1 -1
  62. package/.pi/prompts/develop-tdd.md +11 -1
  63. package/.pi/prompts/diagnose-root.md +1 -1
  64. package/.pi/prompts/enforce-first.md +13 -0
  65. package/.pi/prompts/gate-trace.md +4 -0
  66. package/.pi/prompts/migrate-spec.md +3 -3
  67. package/.pi/prompts/plan-work.md +1 -1
  68. package/.pi/prompts/smoke-test.md +39 -24
  69. package/.pi/prompts/trace-requirement.md +1 -1
  70. package/.pi/prompts/validate-contracts.md +26 -58
  71. package/.pi/prompts/validate-fix.md +46 -5
  72. package/.pi/skills/develop-tdd/SKILL.md +11 -1
  73. package/.pi/skills/diagnose-root/SKILL.md +1 -1
  74. package/.pi/skills/enforce-first/SKILL.md +13 -0
  75. package/.pi/skills/gate-trace/SKILL.md +4 -0
  76. package/.pi/skills/migrate-spec/SKILL.md +3 -3
  77. package/.pi/skills/plan-work/SKILL.md +1 -1
  78. package/.pi/skills/smoke-test/SKILL.md +39 -24
  79. package/.pi/skills/trace-requirement/SKILL.md +1 -1
  80. package/.pi/skills/validate-contracts/SKILL.md +26 -58
  81. package/.pi/skills/validate-fix/SKILL.md +46 -5
  82. package/.trae/skills/develop-tdd/SKILL.md +11 -1
  83. package/.trae/skills/diagnose-root/SKILL.md +1 -1
  84. package/.trae/skills/enforce-first/SKILL.md +13 -0
  85. package/.trae/skills/gate-trace/SKILL.md +4 -0
  86. package/.trae/skills/migrate-spec/SKILL.md +3 -3
  87. package/.trae/skills/plan-work/SKILL.md +1 -1
  88. package/.trae/skills/smoke-test/SKILL.md +39 -24
  89. package/.trae/skills/trace-requirement/SKILL.md +1 -1
  90. package/.trae/skills/validate-contracts/SKILL.md +26 -58
  91. package/.trae/skills/validate-fix/SKILL.md +46 -5
  92. package/.windsurf/rules/develop-tdd.md +11 -1
  93. package/.windsurf/rules/diagnose-root.md +1 -1
  94. package/.windsurf/rules/enforce-first.md +13 -0
  95. package/.windsurf/rules/gate-trace.md +4 -0
  96. package/.windsurf/rules/migrate-spec.md +3 -3
  97. package/.windsurf/rules/plan-work.md +1 -1
  98. package/.windsurf/rules/smoke-test.md +39 -24
  99. package/.windsurf/rules/trace-requirement.md +1 -1
  100. package/.windsurf/rules/validate-contracts.md +26 -58
  101. package/.windsurf/rules/validate-fix.md +46 -5
  102. package/.zcode/skills/develop-tdd/SKILL.md +11 -1
  103. package/.zcode/skills/diagnose-root/SKILL.md +1 -1
  104. package/.zcode/skills/enforce-first/SKILL.md +13 -0
  105. package/.zcode/skills/gate-trace/SKILL.md +4 -0
  106. package/.zcode/skills/migrate-spec/SKILL.md +3 -3
  107. package/.zcode/skills/plan-work/SKILL.md +1 -1
  108. package/.zcode/skills/smoke-test/SKILL.md +39 -24
  109. package/.zcode/skills/trace-requirement/SKILL.md +1 -1
  110. package/.zcode/skills/validate-contracts/SKILL.md +26 -58
  111. package/.zcode/skills/validate-fix/SKILL.md +46 -5
  112. package/CHANGELOG.md +21 -0
  113. package/SKILL-INDEX.md +24 -24
  114. package/package.json +1 -1
  115. package/scripts/generate-skill-index.sh +1 -1
  116. package/scripts/lib/__pycache__/link_utils.cpython-312.pyc +0 -0
  117. package/scripts/lib/__pycache__/srp_engine_links.cpython-312.pyc +0 -0
  118. package/scripts/run-gate-trace-verify.sh +35 -0
  119. package/scripts/run-skill-verify.sh +97 -10
  120. package/scripts/validate-contracts.sh +58 -0
  121. package/scripts/verify-generalize-sweep.sh +55 -0
  122. package/scripts/verify-tdd-red-commit.sh +91 -0
  123. package/skills/develop-tdd/SKILL.md +13 -1
  124. package/skills/diagnose-root/SKILL.md +1 -1
  125. package/skills/enforce-first/SKILL.md +14 -0
  126. package/skills/gate-trace/SKILL.md +5 -0
  127. package/skills/migrate-spec/SKILL.md +3 -3
  128. package/skills/plan-work/SKILL.md +1 -1
  129. package/skills/security-review/fixtures/CWE-fail-open-verify-negative.sh +5 -0
  130. package/skills/security-review/fixtures/CWE-fail-open-verify-positive.sh +5 -0
  131. package/skills/smoke-test/SKILL.md +40 -24
  132. package/skills/trace-requirement/SKILL.md +1 -1
  133. package/skills/validate-contracts/SKILL.md +27 -58
  134. package/skills/validate-fix/REFERENCE-generalize-fix.md +31 -0
  135. package/skills/validate-fix/SKILL.md +14 -5
  136. package/skills-lock.json +10 -10
@@ -21,6 +21,15 @@ This skill is typically invoked internally by `develop-tdd` during the test-writ
21
21
 
22
22
  See CONVENTIONS.md §Tests for the canonical F.I.R.S.T rubric definition, checklists, and fix patterns.
23
23
 
24
+ Mechanical self-check (runs before reporting audit complete):
25
+
26
+ ```bash
27
+ grep -q '## Tests (F.I.R.S.T' CONVENTIONS.md
28
+ grep -qE 'Fast|Independent|Repeatable|Self-Validating|Timely' CONVENTIONS.md
29
+ ```
30
+
31
+ Each criterion must be explicitly addressed in the audit report with pass/fail per test file reviewed.
32
+
24
33
  ## Applying the rubric
25
34
 
26
35
  For each failing criterion:
@@ -30,3 +39,7 @@ For each failing criterion:
30
39
  4. Re-run the suite to confirm it still passes
31
40
 
32
41
  Report: "F.I.R.S.T audit complete. X criteria passed, Y fixed."
42
+
43
+ ## Verify
44
+
45
+ → verify: `grep -q '## Tests (F.I.R.S.T' CONVENTIONS.md && grep -qE 'Self-Validating|Repeatable' skills/enforce-first/SKILL.md && echo OK`
@@ -86,3 +86,7 @@ gate_trace:
86
86
 
87
87
  Gate: READY → next: release-branch (final step before merge)
88
88
  Writes: state.yaml handoff.next_skill = release-branch
89
+
90
+ ## Verify
91
+
92
+ → verify: `test -x scripts/run-gate-trace-verify.sh && bash scripts/run-gate-trace-verify.sh --self-test && echo OK`
@@ -58,7 +58,7 @@ List every artifact found matching the detected framework. Present the list to t
58
58
 
59
59
  See [REFERENCE.md](REFERENCE.md) — `Detected: GSD...`
60
60
 
61
- → verify: `find . -maxdepth 4 \( -name "ROADMAP.md" -o -name "spec.md" -o -name "prd.md" -o -name "REQUIREMENTS.md" \) 2>/dev/null | grep -v ".git" | head -15`
61
+ → verify: `test -d specs && test -w specs`
62
62
 
63
63
  ### Step 3 — Transform (one artifact at a time, show diffs)
64
64
 
@@ -94,9 +94,9 @@ See [REFERENCE.md — REQUIREMENTS_TRACE.yaml format](./REFERENCE.md#requirement
94
94
 
95
95
  > **HARD GATE** — Never overwrite an existing `specs/` file without explicit user confirmation. Merge into it if it exists; don't clobber.
96
96
  >
97
- > → verify: `git diff --name-only HEAD -- specs/ 2>/dev/null | head -20`
97
+ > → verify: `git rev-parse --git-dir >/dev/null 2>&1 && test -d specs`
98
98
 
99
- → verify: `ls specs/*.md 2>/dev/null | head -15`
99
+ → verify: `test -d specs && [ "$(ls specs/*.md specs/*.yaml 2>/dev/null | wc -l | tr -d " ")" -gt 0 ]`
100
100
 
101
101
  ### Step 4 — Generate state.yaml
102
102
 
@@ -84,7 +84,7 @@ After writing capsule tasks, suggest `kickoff-branch` (if not already on a featu
84
84
 
85
85
  ## Verify
86
86
 
87
- → verify: `test -f scripts/lib/plan-consistency-check.sh && bash scripts/lib/plan-consistency-check.sh specs/epics/e45-quality-core/ 2>&1 | head -5`
87
+ → verify: `test -f scripts/lib/plan-consistency-check.sh && EPIC=$(ls -d specs/epics/*/ 2>/dev/null | grep -v archive | sort | head -1) && test -n "$EPIC" && bash scripts/lib/plan-consistency-check.sh "$EPIC" >/dev/null 2>&1`
88
88
 
89
89
 
90
90
 
@@ -10,61 +10,76 @@ description: "Post-deploy health-check against a live URL. Validates HTTP status
10
10
  >
11
11
  > **HARD GATE** — A failed smoke test means the deployment is broken. Do NOT mark a deploy as successful until all smoke checks pass.
12
12
 
13
- Validate a deployed application is healthy by running a configurable set of HTTP checks against live URLs. Each check asserts:
14
- - HTTP status code (e.g., 200 for success, 404 for expected-not-found)
15
- - Response body content signal (regex or jq expression)
16
- - Response time threshold (optional)
17
-
18
- Can be run standalone for quick health checks or chained as the final step of the `deploy` skill.
13
+ Validate a deployed application is healthy by running HTTP checks against live URLs. Each check asserts HTTP status, optional body signal (regex), and optional response-time threshold.
19
14
 
20
15
  ## Configuration
21
16
 
22
- Smoke checks are defined in `smoke-checks.yaml` at the project root:
23
-
24
- See [REFERENCE.md](REFERENCE.md)
25
-
26
- Checks can also be specified inline via environment variables or CLI arguments for ad-hoc use.
17
+ Smoke checks live in `smoke-checks.yaml` at the project root:
27
18
 
28
- ### Check Schema
19
+ ```yaml
20
+ base_url: "https://example.com"
21
+ checks:
22
+ - name: "Homepage"
23
+ path: "/"
24
+ expected_status: 200
25
+ content_signal: "welcome|ok"
26
+ max_response_time_ms: 3000
27
+ ```
29
28
 
30
29
  | Field | Required | Default | Description |
31
30
  |-------|----------|---------|-------------|
32
- | `name` | Yes | — | Human-readable check name (used in report) |
31
+ | `name` | Yes | — | Human-readable check name |
33
32
  | `path` | Yes | `/` | URL path relative to base_url |
34
33
  | `method` | No | `GET` | HTTP method |
35
34
  | `expected_status` | No | `200` | Expected HTTP status code |
36
- | `content_signal` | No | — | Regex or string to find in response body |
37
- | `max_response_time_ms` | No | — | Fail if response slower than this threshold (ms) |
35
+ | `content_signal` | No | — | Regex or string in response body |
36
+ | `max_response_time_ms` | No | — | Fail if slower than threshold (ms) |
37
+
38
+ Ad-hoc single-URL mode: `DEPLOY_URL=https://host bash scripts/run-smoke.sh`
38
39
 
39
40
  ## Process
40
41
 
41
- ### 1. Load smoke checks
42
+ ### 1. Load checks
42
43
 
43
- See [REFERENCE.md](REFERENCE.md)
44
+ ```bash
45
+ SMOKE_CHECKS_FILE="${SMOKE_CHECKS_FILE:-smoke-checks.yaml}"
46
+ BASE_URL="${DEPLOY_URL:-$BASE_URL}"
47
+ test -f "$SMOKE_CHECKS_FILE" || test -n "$BASE_URL" || { echo "ERROR: no checks file or URL"; exit 1; }
48
+ ```
44
49
 
45
50
  ### 2. Run each check
46
51
 
47
- For each check in the configuration, perform an HTTP request:
52
+ ```bash
53
+ bash scripts/run-smoke.sh "${DEPLOY_URL:-}" "${SMOKE_CHECKS_FILE:-smoke-checks.yaml}"
54
+ ```
48
55
 
49
- See [REFERENCE.md](REFERENCE.md)
56
+ The runner performs curl requests per check, records pass/fail per assertion, and prints a summary.
50
57
 
51
58
  ### 3. Assert results
52
59
 
53
- See [REFERENCE.md](REFERENCE.md)
60
+ - Any HTTP status mismatch → FAIL
61
+ - Missing `content_signal` when configured → FAIL
62
+ - Response time over `max_response_time_ms` → FAIL
63
+ - Exit code non-zero → deployment not healthy
54
64
 
55
65
  ### 4. Generate report
56
66
 
57
- See [REFERENCE.md](REFERENCE.md)
67
+ Capture stdout from `run-smoke.sh` as evidence. Persist to `specs/verifications/smoke-<date>.log` for release-branch.
58
68
 
59
69
  ## Integration with deploy skill
60
70
 
61
- The `deploy` skill references `smoke-test` as its final verification step:
62
-
63
71
  ```bash
64
- # In deploy workflow — after successful deploy
65
72
  DEPLOY_URL="$DEPLOY_URL" bash scripts/run-smoke.sh
66
73
  ```
67
74
 
75
+ ## Verify arc
76
+
77
+ Part of **★ VERIFY ★**: `verify-work` → `validate-contracts` → `smoke-test` → `run-evals` → `audit-code`
78
+
79
+ ## Verify
80
+
81
+ → verify: `test -x scripts/run-smoke.sh && grep -q 'run-smoke.sh' skills/smoke-test/SKILL.md && grep -qv 'See \[REFERENCE.md\]' skills/smoke-test/SKILL.md && echo OK`
82
+
68
83
  ---
69
84
 
70
85
  # Smoke Test — Reference
@@ -32,7 +32,7 @@ Look for `// story: X.Y` or `# story: X.Y` comments in source files and tests:
32
32
  grep -rn "story: " . --include="*.ts" --include="*.js" --include="*.py" --include="*.sh" | grep -v node_modules
33
33
  ```
34
34
 
35
- → verify: `grep -rn "story: " . --include="*.ts" --include="*.sh" | wc -l`
35
+ → verify: `[ "$(grep -rl "story: " . --include="*.ts" --include="*.sh" --include="*.py" 2>/dev/null | wc -l | tr -d " ")" -gt 0 ]`
36
36
 
37
37
  ### 3. Build the matrix
38
38
 
@@ -10,60 +10,30 @@ description: "Assert data shape consistency across system boundaries — live AP
10
10
  >
11
11
  > **HARD GATE** — Contract files MUST be version-controlled alongside code. Outdated contracts are worse than no contracts. If a contract hasn't been reviewed in 30 days, flag it as stale.
12
12
 
13
- Validate that data structures stay in sync across system boundaries — front-end vs
14
- back-end, API responses vs expected schemas, config files vs code assumptions,
15
- migration output vs target shape.
13
+ Validate that data structures stay in sync across system boundaries — front-end vs back-end, API responses vs expected schemas, config files vs code assumptions, migration output vs target shape.
16
14
 
17
15
  ## Contract types
18
16
 
19
- Three modes of validation:
20
-
21
17
  | Mode | What it catches | When to use |
22
18
  |------|----------------|-------------|
23
- | **Schema** | API response shape mismatches (missing field, wrong type) | Before every deploy, after API changes |
19
+ | **Schema** | API response shape mismatches | Before every deploy, after API changes |
24
20
  | **Key-set** | Missing/unexpected keys across two data sources | Translation files, configs, enum definitions |
25
- | **Shape** | Column type or format violations in data files | After migrations, before consuming exports |
21
+ | **Shape** | Column type or format violations | After migrations, before consuming exports |
26
22
 
27
23
  ## Contract file convention
28
24
 
29
- All contract files live in `specs/contracts/` and use YAML:
30
-
31
- See [REFERENCE.md](REFERENCE.md) for examples.
32
-
33
- ### 1. API Response Contracts (`--schema`)
34
-
35
- Define expected API response shapes and validate live endpoints against them:
25
+ All contract files live in `specs/contracts/` as YAML. See [REFERENCE.md](REFERENCE.md) for extended examples.
36
26
 
37
- See [REFERENCE.md](REFERENCE.md) for examples.
27
+ ### Key-set example
38
28
 
39
- Usage:
40
-
41
- ```bash
42
- validate-contracts --schema specs/contracts/users.schema.yaml --url https://api.example.com/users
43
- # → PASS: /api/users matches expected schema (3/3 fields, types ok)
44
- # → FAIL: /api/users — field 'email' has type null (expected string)
29
+ ```yaml
30
+ # specs/contracts/i18n-keys.yaml
31
+ sources:
32
+ reference: src/locales/en.json
33
+ target: src/messages/en.json
34
+ mode: subset
45
35
  ```
46
36
 
47
- ### 2. Key-Set Contracts (`--key-set`)
48
-
49
- Assert that two data sources share a consistent set of keys:
50
-
51
- See [REFERENCE.md](REFERENCE.md) for examples.
52
-
53
- Usage:
54
-
55
- See [REFERENCE.md](REFERENCE.md) for examples.
56
-
57
- ### 3. Data Shape Contracts (`--shape`)
58
-
59
- Validate that a data file matches expected column types and constraints:
60
-
61
- See [REFERENCE.md](REFERENCE.md) for examples.
62
-
63
- Usage:
64
-
65
- See [REFERENCE.md](REFERENCE.md) for examples.
66
-
67
37
  ## Process
68
38
 
69
39
  ### 1. Define contract
@@ -73,29 +43,20 @@ Create a YAML file in `specs/contracts/` following the schema for the mode.
73
43
  ### 2. Run validation
74
44
 
75
45
  ```bash
76
- bash scripts/validate-contracts.sh <contract-file>
46
+ bash scripts/validate-contracts.sh specs/contracts/<contract>.yaml
77
47
  ```
78
48
 
79
- The runner auto-detects the contract type from the file content (presence of `schema:`,
80
- `sources:`, or `file:` + `fields:` keys).
49
+ The runner auto-detects key-set contracts (`sources:` block). Schema and shape modes are documented in REFERENCE.md for consumer projects.
81
50
 
82
51
  ### 3. Read the report
83
52
 
84
- Output is JSON Lines (one event per line) plus a human-readable summary:
85
-
86
53
  ```
87
- {"event":"pass","check":"users.schema","detail":"3/3 fields match types"}
88
- {"event":"warn","check":"users.schema","detail":"field 'avatar' has format: uri (unexpected)"}
89
- {"event":"fail","check":"i18n-keys","detail":"missing: 2 keys in target"}
54
+ PASS: key-set contract
55
+ # or
56
+ FAIL: key-set — N keys in reference missing from target
90
57
  ```
91
58
 
92
- Final summary:
93
-
94
- ```
95
- === Validate Contracts Summary ===
96
- Schema: 3/3 pass | Key-set: 1/1 fail | Shape: 2/2 pass
97
- FAILED: 1 contract has divergence
98
- ```
59
+ JSON Lines output for CI is planned for schema/shape modes; key-set failures exit non-zero.
99
60
 
100
61
  ### 4. Fix divergence
101
62
 
@@ -106,10 +67,17 @@ FAILED: 1 contract has divergence
106
67
  ### 5. Re-validate
107
68
 
108
69
  ```bash
109
- bash scripts/validate-contracts.sh <contract-file>
110
- # → All pass → ready to deploy
70
+ bash scripts/validate-contracts.sh specs/contracts/<contract>.yaml
111
71
  ```
112
72
 
73
+ ## Verify arc
74
+
75
+ Part of **★ VERIFY ★**: `verify-work` → `validate-contracts` → `smoke-test` → `run-evals` → `audit-code`
76
+
77
+ ## Verify
78
+
79
+ → verify: `test -x scripts/validate-contracts.sh && bash scripts/validate-contracts.sh --self-test && grep -q 'validate-contracts.sh' skills/validate-contracts/SKILL.md && echo OK`
80
+
113
81
  ---
114
82
 
115
83
  # Validate Contracts — Reference
@@ -5,7 +5,7 @@ description: "Prove a fix works before declaring done — re-run the failing tes
5
5
  ---
6
6
 
7
7
  # Validate Fix
8
- > **HARD GATE** — **HARD GATE** — Fix must not regress. Run full test suite and manual UAT before declaring success. A fix that passes tests but breaks something else is a failure.
8
+ > **HARD GATE** — Fix must not regress. Run full test suite and manual UAT before declaring success.
9
9
 
10
10
 
11
11
  Prove the fix works. "I think it works" is not evidence. Run the suite, show the output, then harden against recurrence.
@@ -63,10 +63,13 @@ For every bug fixed, add at least one prevention layer:
63
63
  - [ ] At least one hardening mechanism added
64
64
  - [ ] Hardening mechanism is tested
65
65
 
66
- > **Security recurrence hardening** — If the bug's security-impact assessment (from investigate-bug) was MEDIUM or higher, additionally check:
67
- > - [ ] Security regression test added (covers the exploit path)
68
- > - [ ] False-positive exclusion rule added (if applicable)
69
- > - [ ] Threat model updated (if impact was HIGH+)
66
+ ### 5b. Generalize-fix (HARD GATE — e80s04 / GH #98)
67
+
68
+ Sweep the **defect class** across the codebase after local hardening — see [REFERENCE-generalize-fix.md](REFERENCE-generalize-fix.md).
69
+
70
+ - [ ] Defect class documented (not just the one-line root cause)
71
+ - [ ] Grep sweep run and `match_count` recorded
72
+ - [ ] `verify-generalize-sweep.sh` passes on the artifact
70
73
 
71
74
  ### 6. Update the bug file and registry.yaml
72
75
 
@@ -104,3 +107,41 @@ Mechanical verification (tests passing) is only half the fix. You must prove **b
104
107
  - **The verify command from specs/bugs/BUG-*.md or the active epic task `verify` field must pass**
105
108
 
106
109
  Suggest next skill: `audit-code` → `commit-message`.
110
+
111
+ ## Verify
112
+
113
+ → verify: `grep -q 'generalize-fix' skills/validate-fix/SKILL.md && test -x scripts/verify-generalize-sweep.sh && bash scripts/verify-generalize-sweep.sh --self-test && echo OK`
114
+
115
+ ---
116
+
117
+ # Generalize-fix (e80s04 / GH #98)
118
+
119
+ After local hardening in `validate-fix`, sweep the **defect class** across the codebase.
120
+
121
+ ## Steps
122
+
123
+ 1. **Classify** — name the pattern (e.g. `unscoped org query`, `fail-open verify`, `hardcoded package manager`).
124
+ 2. **Sweep** — grep for sibling instances; record `match_count` and `grep_pattern`.
125
+ 3. **Resolve** — patch all matches in this PR **or** file one tracking issue listing every remaining instance.
126
+ 4. **Artifact** — write sweep evidence before declaring done:
127
+
128
+ ```bash
129
+ cat > specs/verifications/generalize-sweep-BUG-YYYY-MM-DD-slug.json <<EOF
130
+ {
131
+ "defect_class": "fail-open-verify",
132
+ "grep_pattern": "\\\\|\\\\| echo",
133
+ "match_count": 0,
134
+ "sweep_scope": "skills/*/SKILL.md",
135
+ "patched_in_pr": [],
136
+ "tracked_issues": []
137
+ }
138
+ EOF
139
+ bash scripts/verify-generalize-sweep.sh specs/verifications/generalize-sweep-*.json
140
+ ```
141
+
142
+ ## Security classes
143
+
144
+ When the defect class is security- or gate-relevant:
145
+
146
+ - Add a row to `security-review` CWE fixture table (see `skills/security-review/SKILL.md` § CWE mapping mandate).
147
+ - If security-impact was MEDIUM+: add regression test, false-positive exclusion rule, and threat-model update (HIGH+).
@@ -55,7 +55,13 @@ GREEN: Write minimal code to pass → test passes → commit: feat(<scope>): ..
55
55
  REFACTOR (optional): clean up → commit: refactor(<scope>): ...
56
56
  ```
57
57
 
58
- > **Two-commit red/green policy (HARD GATE — e45s08)** — Each behavior cycle requires **two separate commits**: (1) test-only commit that fails in CI (RED), then (2) implementation commit that makes it pass (GREEN). Never combine test + fix in one commit. Show `git log -2 --oneline` as evidence before proceeding to the next behavior.
58
+ > **Two-commit red/green policy (HARD GATE — e45s08)** — Each behavior cycle requires **two separate commits**: (1) test-only commit that fails in CI (RED), then (2) implementation commit that makes it pass (GREEN). Never combine test + fix in one commit. Before proceeding, run the mechanical RED isolation check:
59
+
60
+ ```bash
61
+ bash scripts/verify-tdd-red-commit.sh
62
+ ```
63
+
64
+ Show `git log -2 --oneline` **and** the script output as evidence. If the test-only commit passes in isolation, the RED gate is violated — stop and fix before GREEN.
59
65
 
60
66
  > **tasks.yaml ledger (e45s06)** — After each task's `verify:` exits 0, update `eNNsYY-tasks.yaml`: set that task's `status: passing`. Story-level `status: passing` only when all tasks pass.
61
67
 
@@ -119,6 +125,10 @@ Writes: state.yaml handoff.next_skill = verify-work
119
125
 
120
126
  At story completion, if the story was sized with BCP Plus (13-dimension breakdown), log the `bcp_plus.total` alongside the standard `bcps:` count in the story's tasks.yaml. The breakdown is available from the epic capsule's `bcp_plus_breakdown` field. See `docs/references/bcp-plus.md` for the full methodology and NFR Gate pattern.
121
127
 
128
+ ## Verify
129
+
130
+ → verify: `test -x scripts/verify-tdd-red-commit.sh && bash scripts/verify-tdd-red-commit.sh --self-test && grep -q 'verify-tdd-red-commit' skills/develop-tdd/SKILL.md && echo OK`
131
+
122
132
 
123
133
  <!-- story: e02s04 -->
124
134
 
@@ -21,4 +21,4 @@ Four phases — do not skip. Update the active `specs/bugs/BUG-*.md` file at eac
21
21
 
22
22
  ## Verify
23
23
 
24
- → verify: `BUG_FILE=$(ls -t specs/bugs/BUG-*.md 2>/dev/null | head -1); test -n "$BUG_FILE" && [ "$(grep -cE 'Reproduce|Isolate|Hypothesize|Verify' "$BUG_FILE")" -ge 4 ]`
24
+ → verify: `[ "$(grep -lE 'Reproduce' specs/bugs/BUG-*.md 2>/dev/null | grep -cv "\.okf\.md$")" -ge 1 ]`
@@ -21,6 +21,15 @@ This skill is typically invoked internally by `develop-tdd` during the test-writ
21
21
 
22
22
  See CONVENTIONS.md §Tests for the canonical F.I.R.S.T rubric definition, checklists, and fix patterns.
23
23
 
24
+ Mechanical self-check (runs before reporting audit complete):
25
+
26
+ ```bash
27
+ grep -q '## Tests (F.I.R.S.T' CONVENTIONS.md
28
+ grep -qE 'Fast|Independent|Repeatable|Self-Validating|Timely' CONVENTIONS.md
29
+ ```
30
+
31
+ Each criterion must be explicitly addressed in the audit report with pass/fail per test file reviewed.
32
+
24
33
  ## Applying the rubric
25
34
 
26
35
  For each failing criterion:
@@ -30,3 +39,7 @@ For each failing criterion:
30
39
  4. Re-run the suite to confirm it still passes
31
40
 
32
41
  Report: "F.I.R.S.T audit complete. X criteria passed, Y fixed."
42
+
43
+ ## Verify
44
+
45
+ → verify: `grep -q '## Tests (F.I.R.S.T' CONVENTIONS.md && grep -qE 'Self-Validating|Repeatable' skills/enforce-first/SKILL.md && echo OK`
@@ -86,3 +86,7 @@ gate_trace:
86
86
 
87
87
  Gate: READY → next: release-branch (final step before merge)
88
88
  Writes: state.yaml handoff.next_skill = release-branch
89
+
90
+ ## Verify
91
+
92
+ → verify: `test -x scripts/run-gate-trace-verify.sh && bash scripts/run-gate-trace-verify.sh --self-test && echo OK`
@@ -58,7 +58,7 @@ List every artifact found matching the detected framework. Present the list to t
58
58
 
59
59
  See [REFERENCE.md](REFERENCE.md) — `Detected: GSD...`
60
60
 
61
- → verify: `find . -maxdepth 4 \( -name "ROADMAP.md" -o -name "spec.md" -o -name "prd.md" -o -name "REQUIREMENTS.md" \) 2>/dev/null | grep -v ".git" | head -15`
61
+ → verify: `test -d specs && test -w specs`
62
62
 
63
63
  ### Step 3 — Transform (one artifact at a time, show diffs)
64
64
 
@@ -94,9 +94,9 @@ See [REFERENCE.md — REQUIREMENTS_TRACE.yaml format](./REFERENCE.md#requirement
94
94
 
95
95
  > **HARD GATE** — Never overwrite an existing `specs/` file without explicit user confirmation. Merge into it if it exists; don't clobber.
96
96
  >
97
- > → verify: `git diff --name-only HEAD -- specs/ 2>/dev/null | head -20`
97
+ > → verify: `git rev-parse --git-dir >/dev/null 2>&1 && test -d specs`
98
98
 
99
- → verify: `ls specs/*.md 2>/dev/null | head -15`
99
+ → verify: `test -d specs && [ "$(ls specs/*.md specs/*.yaml 2>/dev/null | wc -l | tr -d " ")" -gt 0 ]`
100
100
 
101
101
  ### Step 4 — Generate state.yaml
102
102
 
@@ -84,7 +84,7 @@ After writing capsule tasks, suggest `kickoff-branch` (if not already on a featu
84
84
 
85
85
  ## Verify
86
86
 
87
- → verify: `test -f scripts/lib/plan-consistency-check.sh && bash scripts/lib/plan-consistency-check.sh specs/epics/e45-quality-core/ 2>&1 | head -5`
87
+ → verify: `test -f scripts/lib/plan-consistency-check.sh && EPIC=$(ls -d specs/epics/*/ 2>/dev/null | grep -v archive | sort | head -1) && test -n "$EPIC" && bash scripts/lib/plan-consistency-check.sh "$EPIC" >/dev/null 2>&1`
88
88
 
89
89
 
90
90
 
@@ -10,61 +10,76 @@ description: "Post-deploy health-check against a live URL. Validates HTTP status
10
10
  >
11
11
  > **HARD GATE** — A failed smoke test means the deployment is broken. Do NOT mark a deploy as successful until all smoke checks pass.
12
12
 
13
- Validate a deployed application is healthy by running a configurable set of HTTP checks against live URLs. Each check asserts:
14
- - HTTP status code (e.g., 200 for success, 404 for expected-not-found)
15
- - Response body content signal (regex or jq expression)
16
- - Response time threshold (optional)
17
-
18
- Can be run standalone for quick health checks or chained as the final step of the `deploy` skill.
13
+ Validate a deployed application is healthy by running HTTP checks against live URLs. Each check asserts HTTP status, optional body signal (regex), and optional response-time threshold.
19
14
 
20
15
  ## Configuration
21
16
 
22
- Smoke checks are defined in `smoke-checks.yaml` at the project root:
23
-
24
- See [REFERENCE.md](REFERENCE.md)
25
-
26
- Checks can also be specified inline via environment variables or CLI arguments for ad-hoc use.
17
+ Smoke checks live in `smoke-checks.yaml` at the project root:
27
18
 
28
- ### Check Schema
19
+ ```yaml
20
+ base_url: "https://example.com"
21
+ checks:
22
+ - name: "Homepage"
23
+ path: "/"
24
+ expected_status: 200
25
+ content_signal: "welcome|ok"
26
+ max_response_time_ms: 3000
27
+ ```
29
28
 
30
29
  | Field | Required | Default | Description |
31
30
  |-------|----------|---------|-------------|
32
- | `name` | Yes | — | Human-readable check name (used in report) |
31
+ | `name` | Yes | — | Human-readable check name |
33
32
  | `path` | Yes | `/` | URL path relative to base_url |
34
33
  | `method` | No | `GET` | HTTP method |
35
34
  | `expected_status` | No | `200` | Expected HTTP status code |
36
- | `content_signal` | No | — | Regex or string to find in response body |
37
- | `max_response_time_ms` | No | — | Fail if response slower than this threshold (ms) |
35
+ | `content_signal` | No | — | Regex or string in response body |
36
+ | `max_response_time_ms` | No | — | Fail if slower than threshold (ms) |
37
+
38
+ Ad-hoc single-URL mode: `DEPLOY_URL=https://host bash scripts/run-smoke.sh`
38
39
 
39
40
  ## Process
40
41
 
41
- ### 1. Load smoke checks
42
+ ### 1. Load checks
42
43
 
43
- See [REFERENCE.md](REFERENCE.md)
44
+ ```bash
45
+ SMOKE_CHECKS_FILE="${SMOKE_CHECKS_FILE:-smoke-checks.yaml}"
46
+ BASE_URL="${DEPLOY_URL:-$BASE_URL}"
47
+ test -f "$SMOKE_CHECKS_FILE" || test -n "$BASE_URL" || { echo "ERROR: no checks file or URL"; exit 1; }
48
+ ```
44
49
 
45
50
  ### 2. Run each check
46
51
 
47
- For each check in the configuration, perform an HTTP request:
52
+ ```bash
53
+ bash scripts/run-smoke.sh "${DEPLOY_URL:-}" "${SMOKE_CHECKS_FILE:-smoke-checks.yaml}"
54
+ ```
48
55
 
49
- See [REFERENCE.md](REFERENCE.md)
56
+ The runner performs curl requests per check, records pass/fail per assertion, and prints a summary.
50
57
 
51
58
  ### 3. Assert results
52
59
 
53
- See [REFERENCE.md](REFERENCE.md)
60
+ - Any HTTP status mismatch → FAIL
61
+ - Missing `content_signal` when configured → FAIL
62
+ - Response time over `max_response_time_ms` → FAIL
63
+ - Exit code non-zero → deployment not healthy
54
64
 
55
65
  ### 4. Generate report
56
66
 
57
- See [REFERENCE.md](REFERENCE.md)
67
+ Capture stdout from `run-smoke.sh` as evidence. Persist to `specs/verifications/smoke-<date>.log` for release-branch.
58
68
 
59
69
  ## Integration with deploy skill
60
70
 
61
- The `deploy` skill references `smoke-test` as its final verification step:
62
-
63
71
  ```bash
64
- # In deploy workflow — after successful deploy
65
72
  DEPLOY_URL="$DEPLOY_URL" bash scripts/run-smoke.sh
66
73
  ```
67
74
 
75
+ ## Verify arc
76
+
77
+ Part of **★ VERIFY ★**: `verify-work` → `validate-contracts` → `smoke-test` → `run-evals` → `audit-code`
78
+
79
+ ## Verify
80
+
81
+ → verify: `test -x scripts/run-smoke.sh && grep -q 'run-smoke.sh' skills/smoke-test/SKILL.md && grep -qv 'See \[REFERENCE.md\]' skills/smoke-test/SKILL.md && echo OK`
82
+
68
83
  ---
69
84
 
70
85
  # Smoke Test — Reference
@@ -32,7 +32,7 @@ Look for `// story: X.Y` or `# story: X.Y` comments in source files and tests:
32
32
  grep -rn "story: " . --include="*.ts" --include="*.js" --include="*.py" --include="*.sh" | grep -v node_modules
33
33
  ```
34
34
 
35
- → verify: `grep -rn "story: " . --include="*.ts" --include="*.sh" | wc -l`
35
+ → verify: `[ "$(grep -rl "story: " . --include="*.ts" --include="*.sh" --include="*.py" 2>/dev/null | wc -l | tr -d " ")" -gt 0 ]`
36
36
 
37
37
  ### 3. Build the matrix
38
38