bigpowers 2.85.2 → 2.86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/.agents/skills/develop-tdd/SKILL.md +11 -1
  2. package/.agents/skills/enforce-first/SKILL.md +13 -0
  3. package/.agents/skills/gate-trace/SKILL.md +4 -0
  4. package/.agents/skills/smoke-test/SKILL.md +39 -24
  5. package/.agents/skills/validate-contracts/SKILL.md +26 -58
  6. package/.agents/skills/validate-fix/SKILL.md +46 -5
  7. package/.codebuddy/skills/develop-tdd/SKILL.md +11 -1
  8. package/.codebuddy/skills/enforce-first/SKILL.md +13 -0
  9. package/.codebuddy/skills/gate-trace/SKILL.md +4 -0
  10. package/.codebuddy/skills/smoke-test/SKILL.md +39 -24
  11. package/.codebuddy/skills/validate-contracts/SKILL.md +26 -58
  12. package/.codebuddy/skills/validate-fix/SKILL.md +46 -5
  13. package/.codex/skills/develop-tdd/SKILL.md +11 -1
  14. package/.codex/skills/enforce-first/SKILL.md +13 -0
  15. package/.codex/skills/gate-trace/SKILL.md +4 -0
  16. package/.codex/skills/smoke-test/SKILL.md +39 -24
  17. package/.codex/skills/validate-contracts/SKILL.md +26 -58
  18. package/.codex/skills/validate-fix/SKILL.md +46 -5
  19. package/.hermes/skills/develop-tdd/SKILL.md +11 -1
  20. package/.hermes/skills/enforce-first/SKILL.md +13 -0
  21. package/.hermes/skills/gate-trace/SKILL.md +4 -0
  22. package/.hermes/skills/smoke-test/SKILL.md +39 -24
  23. package/.hermes/skills/validate-contracts/SKILL.md +26 -58
  24. package/.hermes/skills/validate-fix/SKILL.md +46 -5
  25. package/.kilocode/rules/develop-tdd.md +11 -1
  26. package/.kilocode/rules/enforce-first.md +13 -0
  27. package/.kilocode/rules/gate-trace.md +4 -0
  28. package/.kilocode/rules/smoke-test.md +39 -24
  29. package/.kilocode/rules/validate-contracts.md +26 -58
  30. package/.kilocode/rules/validate-fix.md +46 -5
  31. package/.mimocode/skills/develop-tdd/SKILL.md +11 -1
  32. package/.mimocode/skills/enforce-first/SKILL.md +13 -0
  33. package/.mimocode/skills/gate-trace/SKILL.md +4 -0
  34. package/.mimocode/skills/smoke-test/SKILL.md +39 -24
  35. package/.mimocode/skills/validate-contracts/SKILL.md +26 -58
  36. package/.mimocode/skills/validate-fix/SKILL.md +46 -5
  37. package/.pi/package.json +1 -1
  38. package/.pi/prompts/develop-tdd.md +11 -1
  39. package/.pi/prompts/enforce-first.md +13 -0
  40. package/.pi/prompts/gate-trace.md +4 -0
  41. package/.pi/prompts/smoke-test.md +39 -24
  42. package/.pi/prompts/validate-contracts.md +26 -58
  43. package/.pi/prompts/validate-fix.md +46 -5
  44. package/.pi/skills/develop-tdd/SKILL.md +11 -1
  45. package/.pi/skills/enforce-first/SKILL.md +13 -0
  46. package/.pi/skills/gate-trace/SKILL.md +4 -0
  47. package/.pi/skills/smoke-test/SKILL.md +39 -24
  48. package/.pi/skills/validate-contracts/SKILL.md +26 -58
  49. package/.pi/skills/validate-fix/SKILL.md +46 -5
  50. package/.trae/skills/develop-tdd/SKILL.md +11 -1
  51. package/.trae/skills/enforce-first/SKILL.md +13 -0
  52. package/.trae/skills/gate-trace/SKILL.md +4 -0
  53. package/.trae/skills/smoke-test/SKILL.md +39 -24
  54. package/.trae/skills/validate-contracts/SKILL.md +26 -58
  55. package/.trae/skills/validate-fix/SKILL.md +46 -5
  56. package/.windsurf/rules/develop-tdd.md +11 -1
  57. package/.windsurf/rules/enforce-first.md +13 -0
  58. package/.windsurf/rules/gate-trace.md +4 -0
  59. package/.windsurf/rules/smoke-test.md +39 -24
  60. package/.windsurf/rules/validate-contracts.md +26 -58
  61. package/.windsurf/rules/validate-fix.md +46 -5
  62. package/.zcode/skills/develop-tdd/SKILL.md +11 -1
  63. package/.zcode/skills/enforce-first/SKILL.md +13 -0
  64. package/.zcode/skills/gate-trace/SKILL.md +4 -0
  65. package/.zcode/skills/smoke-test/SKILL.md +39 -24
  66. package/.zcode/skills/validate-contracts/SKILL.md +26 -58
  67. package/.zcode/skills/validate-fix/SKILL.md +46 -5
  68. package/CHANGELOG.md +13 -0
  69. package/SKILL-INDEX.md +24 -24
  70. package/package.json +1 -1
  71. package/scripts/generate-skill-index.sh +1 -1
  72. package/scripts/lib/__pycache__/link_utils.cpython-312.pyc +0 -0
  73. package/scripts/lib/__pycache__/srp_engine_links.cpython-312.pyc +0 -0
  74. package/scripts/run-gate-trace-verify.sh +35 -0
  75. package/scripts/validate-contracts.sh +58 -0
  76. package/scripts/verify-generalize-sweep.sh +55 -0
  77. package/scripts/verify-tdd-red-commit.sh +91 -0
  78. package/skills/develop-tdd/SKILL.md +13 -1
  79. package/skills/enforce-first/SKILL.md +14 -0
  80. package/skills/gate-trace/SKILL.md +5 -0
  81. package/skills/security-review/fixtures/CWE-fail-open-verify-negative.sh +5 -0
  82. package/skills/security-review/fixtures/CWE-fail-open-verify-positive.sh +5 -0
  83. package/skills/smoke-test/SKILL.md +40 -24
  84. package/skills/validate-contracts/SKILL.md +27 -58
  85. package/skills/validate-fix/REFERENCE-generalize-fix.md +31 -0
  86. package/skills/validate-fix/SKILL.md +14 -5
  87. package/skills-lock.json +6 -6
@@ -1,5 +1,7 @@
1
+ # story: e80s02
1
2
  ---
2
3
  name: smoke-test
4
+ phase: verify
3
5
  description: "Post-deploy health-check against a live URL. Validates HTTP status, response content, and critical endpoints. Runnable standalone OR as the final step of the deploy skill."
4
6
  model: sonnet
5
7
  effort: standard
@@ -11,58 +13,72 @@ effort: standard
11
13
  >
12
14
  > **HARD GATE** — A failed smoke test means the deployment is broken. Do NOT mark a deploy as successful until all smoke checks pass.
13
15
 
14
- Validate a deployed application is healthy by running a configurable set of HTTP checks against live URLs. Each check asserts:
15
- - HTTP status code (e.g., 200 for success, 404 for expected-not-found)
16
- - Response body content signal (regex or jq expression)
17
- - Response time threshold (optional)
18
-
19
- Can be run standalone for quick health checks or chained as the final step of the `deploy` skill.
16
+ 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.
20
17
 
21
18
  ## Configuration
22
19
 
23
- Smoke checks are defined in `smoke-checks.yaml` at the project root:
24
-
25
- See [REFERENCE.md](REFERENCE.md)
20
+ Smoke checks live in `smoke-checks.yaml` at the project root:
26
21
 
27
- Checks can also be specified inline via environment variables or CLI arguments for ad-hoc use.
28
-
29
- ### Check Schema
22
+ ```yaml
23
+ base_url: "https://example.com"
24
+ checks:
25
+ - name: "Homepage"
26
+ path: "/"
27
+ expected_status: 200
28
+ content_signal: "welcome|ok"
29
+ max_response_time_ms: 3000
30
+ ```
30
31
 
31
32
  | Field | Required | Default | Description |
32
33
  |-------|----------|---------|-------------|
33
- | `name` | Yes | — | Human-readable check name (used in report) |
34
+ | `name` | Yes | — | Human-readable check name |
34
35
  | `path` | Yes | `/` | URL path relative to base_url |
35
36
  | `method` | No | `GET` | HTTP method |
36
37
  | `expected_status` | No | `200` | Expected HTTP status code |
37
- | `content_signal` | No | — | Regex or string to find in response body |
38
- | `max_response_time_ms` | No | — | Fail if response slower than this threshold (ms) |
38
+ | `content_signal` | No | — | Regex or string in response body |
39
+ | `max_response_time_ms` | No | — | Fail if slower than threshold (ms) |
40
+
41
+ Ad-hoc single-URL mode: `DEPLOY_URL=https://host bash scripts/run-smoke.sh`
39
42
 
40
43
  ## Process
41
44
 
42
- ### 1. Load smoke checks
45
+ ### 1. Load checks
43
46
 
44
- See [REFERENCE.md](REFERENCE.md)
47
+ ```bash
48
+ SMOKE_CHECKS_FILE="${SMOKE_CHECKS_FILE:-smoke-checks.yaml}"
49
+ BASE_URL="${DEPLOY_URL:-$BASE_URL}"
50
+ test -f "$SMOKE_CHECKS_FILE" || test -n "$BASE_URL" || { echo "ERROR: no checks file or URL"; exit 1; }
51
+ ```
45
52
 
46
53
  ### 2. Run each check
47
54
 
48
- For each check in the configuration, perform an HTTP request:
55
+ ```bash
56
+ bash scripts/run-smoke.sh "${DEPLOY_URL:-}" "${SMOKE_CHECKS_FILE:-smoke-checks.yaml}"
57
+ ```
49
58
 
50
- See [REFERENCE.md](REFERENCE.md)
59
+ The runner performs curl requests per check, records pass/fail per assertion, and prints a summary.
51
60
 
52
61
  ### 3. Assert results
53
62
 
54
- See [REFERENCE.md](REFERENCE.md)
63
+ - Any HTTP status mismatch → FAIL
64
+ - Missing `content_signal` when configured → FAIL
65
+ - Response time over `max_response_time_ms` → FAIL
66
+ - Exit code non-zero → deployment not healthy
55
67
 
56
68
  ### 4. Generate report
57
69
 
58
- See [REFERENCE.md](REFERENCE.md)
70
+ Capture stdout from `run-smoke.sh` as evidence. Persist to `specs/verifications/smoke-<date>.log` for release-branch.
59
71
 
60
72
  ## Integration with deploy skill
61
73
 
62
- The `deploy` skill references `smoke-test` as its final verification step:
63
-
64
74
  ```bash
65
- # In deploy workflow — after successful deploy
66
75
  DEPLOY_URL="$DEPLOY_URL" bash scripts/run-smoke.sh
67
76
  ```
68
77
 
78
+ ## Verify arc
79
+
80
+ Part of **★ VERIFY ★**: `verify-work` → `validate-contracts` → `smoke-test` → `run-evals` → `audit-code`
81
+
82
+ ## Verify
83
+
84
+ → 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`
@@ -1,5 +1,7 @@
1
+ # story: e80s02
1
2
  ---
2
3
  name: validate-contracts
4
+ phase: verify
3
5
  description: "Assert data shape consistency across system boundaries — live API responses against JSON Schema, key-set comparison across layers, data shape validation for migrations and exports. Catches silent data corruption before deploy."
4
6
  model: sonnet
5
7
  effort: standard
@@ -11,60 +13,30 @@ effort: standard
11
13
  >
12
14
  > **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.
13
15
 
14
- Validate that data structures stay in sync across system boundaries — front-end vs
15
- back-end, API responses vs expected schemas, config files vs code assumptions,
16
- migration output vs target shape.
16
+ 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.
17
17
 
18
18
  ## Contract types
19
19
 
20
- Three modes of validation:
21
-
22
20
  | Mode | What it catches | When to use |
23
21
  |------|----------------|-------------|
24
- | **Schema** | API response shape mismatches (missing field, wrong type) | Before every deploy, after API changes |
22
+ | **Schema** | API response shape mismatches | Before every deploy, after API changes |
25
23
  | **Key-set** | Missing/unexpected keys across two data sources | Translation files, configs, enum definitions |
26
- | **Shape** | Column type or format violations in data files | After migrations, before consuming exports |
24
+ | **Shape** | Column type or format violations | After migrations, before consuming exports |
27
25
 
28
26
  ## Contract file convention
29
27
 
30
- All contract files live in `specs/contracts/` and use YAML:
31
-
32
- See [REFERENCE.md](REFERENCE.md) for examples.
33
-
34
- ### 1. API Response Contracts (`--schema`)
28
+ All contract files live in `specs/contracts/` as YAML. See [REFERENCE.md](REFERENCE.md) for extended examples.
35
29
 
36
- Define expected API response shapes and validate live endpoints against them:
30
+ ### Key-set example
37
31
 
38
- See [REFERENCE.md](REFERENCE.md) for examples.
39
-
40
- Usage:
41
-
42
- ```bash
43
- validate-contracts --schema specs/contracts/users.schema.yaml --url https://api.example.com/users
44
- # → PASS: /api/users matches expected schema (3/3 fields, types ok)
45
- # → FAIL: /api/users — field 'email' has type null (expected string)
32
+ ```yaml
33
+ # specs/contracts/i18n-keys.yaml
34
+ sources:
35
+ reference: src/locales/en.json
36
+ target: src/messages/en.json
37
+ mode: subset
46
38
  ```
47
39
 
48
- ### 2. Key-Set Contracts (`--key-set`)
49
-
50
- Assert that two data sources share a consistent set of keys:
51
-
52
- See [REFERENCE.md](REFERENCE.md) for examples.
53
-
54
- Usage:
55
-
56
- See [REFERENCE.md](REFERENCE.md) for examples.
57
-
58
- ### 3. Data Shape Contracts (`--shape`)
59
-
60
- Validate that a data file matches expected column types and constraints:
61
-
62
- See [REFERENCE.md](REFERENCE.md) for examples.
63
-
64
- Usage:
65
-
66
- See [REFERENCE.md](REFERENCE.md) for examples.
67
-
68
40
  ## Process
69
41
 
70
42
  ### 1. Define contract
@@ -74,29 +46,20 @@ Create a YAML file in `specs/contracts/` following the schema for the mode.
74
46
  ### 2. Run validation
75
47
 
76
48
  ```bash
77
- bash scripts/validate-contracts.sh <contract-file>
49
+ bash scripts/validate-contracts.sh specs/contracts/<contract>.yaml
78
50
  ```
79
51
 
80
- The runner auto-detects the contract type from the file content (presence of `schema:`,
81
- `sources:`, or `file:` + `fields:` keys).
52
+ The runner auto-detects key-set contracts (`sources:` block). Schema and shape modes are documented in REFERENCE.md for consumer projects.
82
53
 
83
54
  ### 3. Read the report
84
55
 
85
- Output is JSON Lines (one event per line) plus a human-readable summary:
86
-
87
56
  ```
88
- {"event":"pass","check":"users.schema","detail":"3/3 fields match types"}
89
- {"event":"warn","check":"users.schema","detail":"field 'avatar' has format: uri (unexpected)"}
90
- {"event":"fail","check":"i18n-keys","detail":"missing: 2 keys in target"}
57
+ PASS: key-set contract
58
+ # or
59
+ FAIL: key-set — N keys in reference missing from target
91
60
  ```
92
61
 
93
- Final summary:
94
-
95
- ```
96
- === Validate Contracts Summary ===
97
- Schema: 3/3 pass | Key-set: 1/1 fail | Shape: 2/2 pass
98
- FAILED: 1 contract has divergence
99
- ```
62
+ JSON Lines output for CI is planned for schema/shape modes; key-set failures exit non-zero.
100
63
 
101
64
  ### 4. Fix divergence
102
65
 
@@ -107,7 +70,13 @@ FAILED: 1 contract has divergence
107
70
  ### 5. Re-validate
108
71
 
109
72
  ```bash
110
- bash scripts/validate-contracts.sh <contract-file>
111
- # → All pass → ready to deploy
73
+ bash scripts/validate-contracts.sh specs/contracts/<contract>.yaml
112
74
  ```
113
75
 
76
+ ## Verify arc
77
+
78
+ Part of **★ VERIFY ★**: `verify-work` → `validate-contracts` → `smoke-test` → `run-evals` → `audit-code`
79
+
80
+ ## Verify
81
+
82
+ → 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`
@@ -0,0 +1,31 @@
1
+ # Generalize-fix (e80s04 / GH #98)
2
+
3
+ After local hardening in `validate-fix`, sweep the **defect class** across the codebase.
4
+
5
+ ## Steps
6
+
7
+ 1. **Classify** — name the pattern (e.g. `unscoped org query`, `fail-open verify`, `hardcoded package manager`).
8
+ 2. **Sweep** — grep for sibling instances; record `match_count` and `grep_pattern`.
9
+ 3. **Resolve** — patch all matches in this PR **or** file one tracking issue listing every remaining instance.
10
+ 4. **Artifact** — write sweep evidence before declaring done:
11
+
12
+ ```bash
13
+ cat > specs/verifications/generalize-sweep-BUG-YYYY-MM-DD-slug.json <<EOF
14
+ {
15
+ "defect_class": "fail-open-verify",
16
+ "grep_pattern": "\\\\|\\\\| echo",
17
+ "match_count": 0,
18
+ "sweep_scope": "skills/*/SKILL.md",
19
+ "patched_in_pr": [],
20
+ "tracked_issues": []
21
+ }
22
+ EOF
23
+ bash scripts/verify-generalize-sweep.sh specs/verifications/generalize-sweep-*.json
24
+ ```
25
+
26
+ ## Security classes
27
+
28
+ When the defect class is security- or gate-relevant:
29
+
30
+ - Add a row to `security-review` CWE fixture table (see `skills/security-review/SKILL.md` § CWE mapping mandate).
31
+ - If security-impact was MEDIUM+: add regression test, false-positive exclusion rule, and threat-model update (HIGH+).
@@ -1,3 +1,5 @@
1
+ # story: e80s01
2
+ # story: e80s04
1
3
  # story: e45s08
2
4
  ---
3
5
  name: validate-fix
@@ -7,7 +9,7 @@ description: Prove a fix works before declaring done — re-run the failing test
7
9
  ---
8
10
 
9
11
  # Validate Fix
10
- > **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.
12
+ > **HARD GATE** — Fix must not regress. Run full test suite and manual UAT before declaring success.
11
13
 
12
14
 
13
15
  Prove the fix works. "I think it works" is not evidence. Run the suite, show the output, then harden against recurrence.
@@ -65,10 +67,13 @@ For every bug fixed, add at least one prevention layer:
65
67
  - [ ] At least one hardening mechanism added
66
68
  - [ ] Hardening mechanism is tested
67
69
 
68
- > **Security recurrence hardening** — If the bug's security-impact assessment (from investigate-bug) was MEDIUM or higher, additionally check:
69
- > - [ ] Security regression test added (covers the exploit path)
70
- > - [ ] False-positive exclusion rule added (if applicable)
71
- > - [ ] Threat model updated (if impact was HIGH+)
70
+ ### 5b. Generalize-fix (HARD GATE — e80s04 / GH #98)
71
+
72
+ Sweep the **defect class** across the codebase after local hardening — see [REFERENCE-generalize-fix.md](REFERENCE-generalize-fix.md).
73
+
74
+ - [ ] Defect class documented (not just the one-line root cause)
75
+ - [ ] Grep sweep run and `match_count` recorded
76
+ - [ ] `verify-generalize-sweep.sh` passes on the artifact
72
77
 
73
78
  ### 6. Update the bug file and registry.yaml
74
79
 
@@ -107,3 +112,7 @@ Mechanical verification (tests passing) is only half the fix. You must prove **b
107
112
 
108
113
  Suggest next skill: `audit-code` → `commit-message`.
109
114
 
115
+ ## Verify
116
+
117
+ → 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`
118
+
package/skills-lock.json CHANGED
@@ -83,7 +83,7 @@
83
83
  },
84
84
  "develop-tdd": {
85
85
  "description": "Test-driven development with red-green-refactor loop using vertical slices. Use for features (epic tasks) or bugs (specs/bugs/BUG-*.md).",
86
- "sha256": "91928da1d9757094",
86
+ "sha256": "8b3934e2291b863d",
87
87
  "path": "skills/develop-tddSKILL.md"
88
88
  },
89
89
  "diagnose-root": {
@@ -113,7 +113,7 @@
113
113
  },
114
114
  "enforce-first": {
115
115
  "description": "Apply the F.I.R.S.T test quality rubric (per CONVENTIONS.md §Tests) to a test suite or individual tests. Use when develop-tdd is writing tests, when test quality needs to be checked, or when user mentions F.I.R.S.T or \"test quality\".",
116
- "sha256": "64cde2c5f741c77f",
116
+ "sha256": "1ec1183ee6377917",
117
117
  "path": "skills/enforce-firstSKILL.md"
118
118
  },
119
119
  "evolve-skill": {
@@ -143,7 +143,7 @@
143
143
  },
144
144
  "gate-trace": {
145
145
  "description": "\"Deterministic traceability quality gate — reads coverage matrix + blind-spot data, applies decision rules with oracle confidence downgrade, emits PASS/CONCERNS/FAIL/WAIVED verdict. Use before release-branch to gate merges on traceability.\"",
146
- "sha256": "dd52baa85ff939e8",
146
+ "sha256": "87e0c49ff90ec34c",
147
147
  "path": "skills/gate-traceSKILL.md"
148
148
  },
149
149
  "generate-allure-report": {
@@ -333,7 +333,7 @@
333
333
  },
334
334
  "smoke-test": {
335
335
  "description": "\"Post-deploy health-check against a live URL. Validates HTTP status, response content, and critical endpoints. Runnable standalone OR as the final step of the deploy skill.\"",
336
- "sha256": "664c11f36df51da8",
336
+ "sha256": "f75e9e57d4003209",
337
337
  "path": "skills/smoke-testSKILL.md"
338
338
  },
339
339
  "spike-prototype": {
@@ -368,12 +368,12 @@
368
368
  },
369
369
  "validate-contracts": {
370
370
  "description": "\"Assert data shape consistency across system boundaries — live API responses against JSON Schema, key-set comparison across layers, data shape validation for migrations and exports. Catches silent data corruption before deploy.\"",
371
- "sha256": "7d944527859c3c14",
371
+ "sha256": "d93c9ae2953ac457",
372
372
  "path": "skills/validate-contractsSKILL.md"
373
373
  },
374
374
  "validate-fix": {
375
375
  "description": "Prove a fix works before declaring done — re-run the failing test, run the full suite, typecheck, lint, and harden against recurrence. Use after implementing a bug fix, when user says \"is this fixed?\", or before closing an investigation.",
376
- "sha256": "e3a38b117a7f3b2d",
376
+ "sha256": "f94972af3fd48e3e",
377
377
  "path": "skills/validate-fixSKILL.md"
378
378
  },
379
379
  "verify-work": {