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