bigpowers 2.90.2 → 2.91.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/build-epic/SKILL.md +1 -1
- package/.agents/skills/commit-message/SKILL.md +1 -0
- package/.agents/skills/guard-git/SKILL.md +7 -2
- package/.agents/skills/release-branch/SKILL.md +4 -5
- package/.agents/skills/run-planning/SKILL.md +6 -1
- package/.agents/skills/verify-work/SKILL.md +2 -1
- package/.cline/skills/build-epic/SKILL.md +1 -1
- package/.cline/skills/commit-message/SKILL.md +1 -0
- package/.cline/skills/guard-git/SKILL.md +7 -2
- package/.cline/skills/release-branch/SKILL.md +4 -5
- package/.cline/skills/run-planning/SKILL.md +6 -1
- package/.cline/skills/verify-work/SKILL.md +2 -1
- package/.codebuddy/skills/build-epic/SKILL.md +1 -1
- package/.codebuddy/skills/commit-message/SKILL.md +1 -0
- package/.codebuddy/skills/guard-git/SKILL.md +7 -2
- package/.codebuddy/skills/release-branch/SKILL.md +4 -5
- package/.codebuddy/skills/run-planning/SKILL.md +6 -1
- package/.codebuddy/skills/verify-work/SKILL.md +2 -1
- package/.codex/skills/build-epic/SKILL.md +1 -1
- package/.codex/skills/commit-message/SKILL.md +1 -0
- package/.codex/skills/guard-git/SKILL.md +7 -2
- package/.codex/skills/release-branch/SKILL.md +4 -5
- package/.codex/skills/run-planning/SKILL.md +6 -1
- package/.codex/skills/verify-work/SKILL.md +2 -1
- package/.copilot/skills/build-epic/SKILL.md +1 -1
- package/.copilot/skills/commit-message/SKILL.md +1 -0
- package/.copilot/skills/guard-git/SKILL.md +7 -2
- package/.copilot/skills/release-branch/SKILL.md +4 -5
- package/.copilot/skills/run-planning/SKILL.md +6 -1
- package/.copilot/skills/verify-work/SKILL.md +2 -1
- package/.cursor/rules/build-epic.mdc +1 -1
- package/.cursor/rules/commit-message.mdc +1 -0
- package/.cursor/rules/guard-git.mdc +7 -2
- package/.cursor/rules/release-branch.mdc +4 -5
- package/.cursor/rules/run-planning.mdc +6 -1
- package/.cursor/rules/verify-work.mdc +2 -1
- package/.gemini/extensions/bigpowers/commands/prompts/build-epic.md +1 -1
- package/.gemini/extensions/bigpowers/commands/prompts/commit-message.md +1 -0
- package/.gemini/extensions/bigpowers/commands/prompts/guard-git.md +7 -2
- package/.gemini/extensions/bigpowers/commands/prompts/release-branch.md +4 -5
- package/.gemini/extensions/bigpowers/commands/prompts/run-planning.md +6 -1
- package/.gemini/extensions/bigpowers/commands/prompts/verify-work.md +2 -1
- package/.gemini/extensions/bigpowers/gemini-extension.json +1 -1
- package/.gemini/extensions/bigpowers/skills/build-epic/SKILL.md +1 -1
- package/.gemini/extensions/bigpowers/skills/commit-message/SKILL.md +1 -0
- package/.gemini/extensions/bigpowers/skills/guard-git/SKILL.md +7 -2
- package/.gemini/extensions/bigpowers/skills/release-branch/SKILL.md +4 -5
- package/.gemini/extensions/bigpowers/skills/run-planning/SKILL.md +6 -1
- package/.gemini/extensions/bigpowers/skills/verify-work/SKILL.md +2 -1
- package/.hermes/skills/build-epic/SKILL.md +1 -1
- package/.hermes/skills/commit-message/SKILL.md +1 -0
- package/.hermes/skills/guard-git/SKILL.md +7 -2
- package/.hermes/skills/release-branch/SKILL.md +4 -5
- package/.hermes/skills/run-planning/SKILL.md +6 -1
- package/.hermes/skills/verify-work/SKILL.md +2 -1
- package/.kilocode/rules/build-epic.md +1 -1
- package/.kilocode/rules/commit-message.md +1 -0
- package/.kilocode/rules/guard-git.md +7 -2
- package/.kilocode/rules/release-branch.md +4 -5
- package/.kilocode/rules/run-planning.md +6 -1
- package/.kilocode/rules/verify-work.md +2 -1
- package/.mimocode/skills/build-epic/SKILL.md +1 -1
- package/.mimocode/skills/commit-message/SKILL.md +1 -0
- package/.mimocode/skills/guard-git/SKILL.md +7 -2
- package/.mimocode/skills/release-branch/SKILL.md +4 -5
- package/.mimocode/skills/run-planning/SKILL.md +6 -1
- package/.mimocode/skills/verify-work/SKILL.md +2 -1
- package/.opencode/skills/build-epic/SKILL.md +1 -1
- package/.opencode/skills/commit-message/SKILL.md +1 -0
- package/.opencode/skills/guard-git/SKILL.md +7 -2
- package/.opencode/skills/release-branch/SKILL.md +4 -5
- package/.opencode/skills/run-planning/SKILL.md +6 -1
- package/.opencode/skills/verify-work/SKILL.md +2 -1
- package/.pi/package.json +1 -1
- package/.pi/prompts/build-epic.md +1 -1
- package/.pi/prompts/commit-message.md +1 -0
- package/.pi/prompts/guard-git.md +7 -2
- package/.pi/prompts/release-branch.md +4 -5
- package/.pi/prompts/run-planning.md +6 -1
- package/.pi/prompts/verify-work.md +2 -1
- package/.pi/skills/build-epic/SKILL.md +1 -1
- package/.pi/skills/commit-message/SKILL.md +1 -0
- package/.pi/skills/guard-git/SKILL.md +7 -2
- package/.pi/skills/release-branch/SKILL.md +4 -5
- package/.pi/skills/run-planning/SKILL.md +6 -1
- package/.pi/skills/verify-work/SKILL.md +2 -1
- package/.qwen/skills/build-epic/SKILL.md +1 -1
- package/.qwen/skills/commit-message/SKILL.md +1 -0
- package/.qwen/skills/guard-git/SKILL.md +7 -2
- package/.qwen/skills/release-branch/SKILL.md +4 -5
- package/.qwen/skills/run-planning/SKILL.md +6 -1
- package/.qwen/skills/verify-work/SKILL.md +2 -1
- package/.trae/skills/build-epic/SKILL.md +1 -1
- package/.trae/skills/commit-message/SKILL.md +1 -0
- package/.trae/skills/guard-git/SKILL.md +7 -2
- package/.trae/skills/release-branch/SKILL.md +4 -5
- package/.trae/skills/run-planning/SKILL.md +6 -1
- package/.trae/skills/verify-work/SKILL.md +2 -1
- package/.windsurf/rules/build-epic.md +1 -1
- package/.windsurf/rules/commit-message.md +1 -0
- package/.windsurf/rules/guard-git.md +7 -2
- package/.windsurf/rules/release-branch.md +4 -5
- package/.windsurf/rules/run-planning.md +6 -1
- package/.windsurf/rules/verify-work.md +2 -1
- package/.zcode/skills/build-epic/SKILL.md +1 -1
- package/.zcode/skills/commit-message/SKILL.md +1 -0
- package/.zcode/skills/guard-git/SKILL.md +7 -2
- package/.zcode/skills/release-branch/SKILL.md +4 -5
- package/.zcode/skills/run-planning/SKILL.md +6 -1
- package/.zcode/skills/verify-work/SKILL.md +2 -1
- package/CHANGELOG.md +15 -0
- package/extensions/omp-hooks.ts +197 -58
- package/hooks/pre/bash.sh +54 -7
- package/hooks/pre-tool-use.sh +72 -12
- package/package.json +2 -1
- package/scripts/convert-legado.sh +1 -0
- package/scripts/lib/__pycache__/atomic_write.cpython-310.pyc +0 -0
- package/scripts/lib/__pycache__/link_utils.cpython-310.pyc +0 -0
- package/scripts/lib/__pycache__/srp_engine_links.cpython-310.pyc +0 -0
- package/scripts/lib/__pycache__/srp_engine_okf.cpython-310.pyc +0 -0
- package/scripts/lib/assert-epic-gate.sh +32 -0
- package/scripts/lib/assert-planning-artifacts.sh +65 -0
- package/scripts/lib/git-argv.py +168 -0
- package/scripts/lib/golden-suite-gates.sh +2 -0
- package/scripts/omp-guard-probe.ts +46 -0
- package/scripts/test-generated-path-hook.sh +57 -0
- package/scripts/test-guard-git-normalize.sh +189 -0
- package/scripts/test-test-lock-hook.sh +100 -0
- package/scripts/validate-doctrine.sh +4 -4
- package/scripts/verify-adversarial.sh +146 -0
- package/scripts/verify-tdd-red-commit.sh +39 -1
- package/skills/build-epic/SKILL.md +1 -1
- package/skills/commit-message/SKILL.md +1 -0
- package/skills/guard-git/SKILL.md +7 -2
- package/skills/release-branch/SKILL.md +4 -5
- package/skills/run-planning/SKILL.md +6 -1
- package/skills/verify-work/SKILL.md +2 -1
- package/skills-lock.json +6 -6
- package/tests/test-artifact-assertions.sh +86 -0
- package/tests/test-verify-adversarial.sh +27 -0
|
@@ -66,7 +66,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
|
|
|
66
66
|
After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
|
|
67
67
|
|
|
68
68
|
1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
|
|
69
|
-
2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
69
|
+
2. **Pass (exit 0):** All checklist sections pass → run `bash scripts/lib/assert-epic-gate.sh advance` to mechanically confirm the audit pass, then advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
70
70
|
3. **Fail (exit 1):** One or more checklist sections fail → **reset `epic_cycle.current_step` to `4`** (develop-tdd) and add the failing section IDs to `completed_steps` as `"1,2,3,4,5,6(fail: ...)"`. Record `epic_cycle.audit_result: fail` in `state.yaml`. Do NOT advance past step 6 until audit passes.
|
|
71
71
|
4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
|
|
72
72
|
5. **Enforce F.I.R.S.T:** After audit-code passes, run `enforce-first --quick` on new/modified tests. Append F.I.R.S.T violations (if any) to the audit report. Failing F.I.R.S.T criteria trigger the same loop-back to step 4.
|
|
@@ -36,6 +36,7 @@ description: "Reviews working-tree changes, then drafts a Conventional Commits t
|
|
|
36
36
|
|
|
37
37
|
## Checklist before finalizing
|
|
38
38
|
|
|
39
|
+
- [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
|
|
39
40
|
- [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
|
|
40
41
|
- [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
|
|
41
42
|
- [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
|
|
@@ -12,7 +12,8 @@ Installs a shared hook that blocks destructive git operations and enforces workf
|
|
|
12
12
|
|
|
13
13
|
## What gets blocked/enforced
|
|
14
14
|
|
|
15
|
-
- **Safety**:
|
|
15
|
+
- **Safety**: force push (`-f`, `--force`, `+refspec`), `reset` with `--hard`, `clean` with any `-f*`, `branch -D` / `--delete --force`, `checkout`/`restore` that discard work (`-f`, `.` pathspec).
|
|
16
|
+
- **Argv, not substrings**: the hook tokenizes each command, strips git's global options (`-C <path>`, `-c k=v`, `--no-pager`, `--git-dir=…`) and judges the `(subcommand, arguments)` pair — so `git -C repo reset -q --hard` is blocked, while `git push --force-with-lease` is allowed. Rules live in `scripts/lib/git-argv.py`, mirrored in `extensions/omp-hooks.ts`; `scripts/test-guard-git-normalize.sh` fails if the two disagree.
|
|
16
17
|
- **Discipline**: Blocks direct commits or pushes to protected branches (`main`, `master`) unless `GIT_BIGPOWERS_LAND=1` (set only by `scripts/land-branch.sh`).
|
|
17
18
|
- **Allows**: `git push origin <feature-branch>` for backup/CI; solo land push to `main` only inside `land-branch.sh`.
|
|
18
19
|
- **Standardization**: Enforces [Conventional Commits](https://www.conventionalcommits.org/) for all `git commit` commands.
|
|
@@ -37,7 +38,11 @@ Installs a shared hook that blocks destructive git operations and enforces workf
|
|
|
37
38
|
|
|
38
39
|
## Customization
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
The rule table lives in `scripts/lib/git-argv.py` (shell hooks) and is mirrored in `extensions/omp-hooks.ts`. Add a rule to both and a row to `specs/verifications/fixtures/guard-git-normalize.yaml`.
|
|
42
|
+
|
|
43
|
+
The TS side is judged through `evaluateBashCall()` — the single pure function the `tool_call` handler calls — so the fixture covers **every** rule (destructive argv, protected-branch push, Conventional Commits), not just the argv table. The gate (`bash scripts/test-guard-git-normalize.sh`) runs both implementations with `GIT_BIGPOWERS_LAND` unset and fails if they disagree, so a verdict can never depend on the developer's shell.
|
|
44
|
+
|
|
45
|
+
Protected-branch rules answer differently on `main` than on a feature branch, so a row that touches commit/push semantics states its `branch:` and both sides are run in it (the shell hook in a throwaway repo checked out on that branch). A row without `branch:` is judged on a feature branch. Do not pin the branch inside either implementation — that is what made the gate pass on PRs and fail on `main`.
|
|
41
46
|
|
|
42
47
|
## Advanced
|
|
43
48
|
|
|
@@ -56,13 +56,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
|
|
|
56
56
|
### 2a. Security gate
|
|
57
57
|
|
|
58
58
|
- [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
|
|
59
|
-
- [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Run `gate-trace
|
|
62
|
+
- [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
|
|
63
|
+
- [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
|
|
64
|
+
- [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
|
|
66
65
|
|
|
67
66
|
> **Adversarial refute framing (e45s32):** The final pre-merge check is **refute, not rubber-stamp**. Before declaring ready, actively try to disprove traceability completeness — missing story tags, absent verify evidence, stale security review. Only proceed when refutation fails.
|
|
68
67
|
|
|
@@ -62,7 +62,12 @@ if written:
|
|
|
62
62
|
- `plan-release` — sequence epics by WSJF
|
|
63
63
|
- `slice-tasks` — cut vertical slices
|
|
64
64
|
|
|
65
|
-
4. **
|
|
65
|
+
4. **Mechanical artifact assertion before status update (HARD GATE — Issue #183):**
|
|
66
|
+
Before marking any workflow key `status: done`, run:
|
|
67
|
+
```bash
|
|
68
|
+
bash scripts/lib/assert-planning-artifacts.sh <workflow-key>
|
|
69
|
+
```
|
|
70
|
+
If the artifact assertion fails, do NOT advance status. Remediate missing output files before continuing. On success, set `status: done` for that workflow key in `planning-status.yaml`.
|
|
66
71
|
|
|
67
72
|
5. **Advance** — Set `state.yaml` `active_flow: planning` while in this chain. When all required keys are done, set `handoff.next_skill` to `plan-work`.
|
|
68
73
|
|
|
@@ -62,7 +62,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
|
|
|
62
62
|
5a. **Blind-spot check** — run `bash scripts/check-blind-spots.sh`. This detects structural quality gaps (verify-gap, test-gap, stale-tag, etc.) beyond percentage coverage. If any HIGH-severity findings exist → **block the verify-work PASS gate**. Findings are written to `specs/blind-spots.json`. MEDIUM/LOW findings warn but don't block.
|
|
63
63
|
5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
|
|
64
64
|
|
|
65
|
-
5b. **NFR Evidence Gate** (P0 only) —
|
|
65
|
+
5b. **NFR Evidence Gate** (P0 only) — Go/no-go on Performance, Reliability, Operability against `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`. Evidence written to `specs/verifications/NFR-eNNsYY.json`. FAIL blocks gate.
|
|
66
|
+
5c. **Adversarial Defect Mutation Gate (HARD GATE — e86 / ab-20)** — `bash scripts/verify-adversarial.sh`. Boundary fuzzing & parameter injection against modified interfaces. Crashes or failures block PASS gate; evidence in `specs/verifications/ADVERSARIAL_LATEST.yaml`.
|
|
66
67
|
6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
|
|
67
68
|
7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
|
|
68
69
|
|
|
@@ -66,7 +66,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
|
|
|
66
66
|
After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
|
|
67
67
|
|
|
68
68
|
1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
|
|
69
|
-
2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
69
|
+
2. **Pass (exit 0):** All checklist sections pass → run `bash scripts/lib/assert-epic-gate.sh advance` to mechanically confirm the audit pass, then advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
70
70
|
3. **Fail (exit 1):** One or more checklist sections fail → **reset `epic_cycle.current_step` to `4`** (develop-tdd) and add the failing section IDs to `completed_steps` as `"1,2,3,4,5,6(fail: ...)"`. Record `epic_cycle.audit_result: fail` in `state.yaml`. Do NOT advance past step 6 until audit passes.
|
|
71
71
|
4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
|
|
72
72
|
5. **Enforce F.I.R.S.T:** After audit-code passes, run `enforce-first --quick` on new/modified tests. Append F.I.R.S.T violations (if any) to the audit report. Failing F.I.R.S.T criteria trigger the same loop-back to step 4.
|
|
@@ -36,6 +36,7 @@ description: "Reviews working-tree changes, then drafts a Conventional Commits t
|
|
|
36
36
|
|
|
37
37
|
## Checklist before finalizing
|
|
38
38
|
|
|
39
|
+
- [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
|
|
39
40
|
- [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
|
|
40
41
|
- [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
|
|
41
42
|
- [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
|
|
@@ -12,7 +12,8 @@ Installs a shared hook that blocks destructive git operations and enforces workf
|
|
|
12
12
|
|
|
13
13
|
## What gets blocked/enforced
|
|
14
14
|
|
|
15
|
-
- **Safety**:
|
|
15
|
+
- **Safety**: force push (`-f`, `--force`, `+refspec`), `reset` with `--hard`, `clean` with any `-f*`, `branch -D` / `--delete --force`, `checkout`/`restore` that discard work (`-f`, `.` pathspec).
|
|
16
|
+
- **Argv, not substrings**: the hook tokenizes each command, strips git's global options (`-C <path>`, `-c k=v`, `--no-pager`, `--git-dir=…`) and judges the `(subcommand, arguments)` pair — so `git -C repo reset -q --hard` is blocked, while `git push --force-with-lease` is allowed. Rules live in `scripts/lib/git-argv.py`, mirrored in `extensions/omp-hooks.ts`; `scripts/test-guard-git-normalize.sh` fails if the two disagree.
|
|
16
17
|
- **Discipline**: Blocks direct commits or pushes to protected branches (`main`, `master`) unless `GIT_BIGPOWERS_LAND=1` (set only by `scripts/land-branch.sh`).
|
|
17
18
|
- **Allows**: `git push origin <feature-branch>` for backup/CI; solo land push to `main` only inside `land-branch.sh`.
|
|
18
19
|
- **Standardization**: Enforces [Conventional Commits](https://www.conventionalcommits.org/) for all `git commit` commands.
|
|
@@ -37,7 +38,11 @@ Installs a shared hook that blocks destructive git operations and enforces workf
|
|
|
37
38
|
|
|
38
39
|
## Customization
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
The rule table lives in `scripts/lib/git-argv.py` (shell hooks) and is mirrored in `extensions/omp-hooks.ts`. Add a rule to both and a row to `specs/verifications/fixtures/guard-git-normalize.yaml`.
|
|
42
|
+
|
|
43
|
+
The TS side is judged through `evaluateBashCall()` — the single pure function the `tool_call` handler calls — so the fixture covers **every** rule (destructive argv, protected-branch push, Conventional Commits), not just the argv table. The gate (`bash scripts/test-guard-git-normalize.sh`) runs both implementations with `GIT_BIGPOWERS_LAND` unset and fails if they disagree, so a verdict can never depend on the developer's shell.
|
|
44
|
+
|
|
45
|
+
Protected-branch rules answer differently on `main` than on a feature branch, so a row that touches commit/push semantics states its `branch:` and both sides are run in it (the shell hook in a throwaway repo checked out on that branch). A row without `branch:` is judged on a feature branch. Do not pin the branch inside either implementation — that is what made the gate pass on PRs and fail on `main`.
|
|
41
46
|
|
|
42
47
|
## Advanced
|
|
43
48
|
|
|
@@ -56,13 +56,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
|
|
|
56
56
|
### 2a. Security gate
|
|
57
57
|
|
|
58
58
|
- [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
|
|
59
|
-
- [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Run `gate-trace
|
|
62
|
+
- [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
|
|
63
|
+
- [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
|
|
64
|
+
- [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
|
|
66
65
|
|
|
67
66
|
> **Adversarial refute framing (e45s32):** The final pre-merge check is **refute, not rubber-stamp**. Before declaring ready, actively try to disprove traceability completeness — missing story tags, absent verify evidence, stale security review. Only proceed when refutation fails.
|
|
68
67
|
|
|
@@ -62,7 +62,12 @@ if written:
|
|
|
62
62
|
- `plan-release` — sequence epics by WSJF
|
|
63
63
|
- `slice-tasks` — cut vertical slices
|
|
64
64
|
|
|
65
|
-
4. **
|
|
65
|
+
4. **Mechanical artifact assertion before status update (HARD GATE — Issue #183):**
|
|
66
|
+
Before marking any workflow key `status: done`, run:
|
|
67
|
+
```bash
|
|
68
|
+
bash scripts/lib/assert-planning-artifacts.sh <workflow-key>
|
|
69
|
+
```
|
|
70
|
+
If the artifact assertion fails, do NOT advance status. Remediate missing output files before continuing. On success, set `status: done` for that workflow key in `planning-status.yaml`.
|
|
66
71
|
|
|
67
72
|
5. **Advance** — Set `state.yaml` `active_flow: planning` while in this chain. When all required keys are done, set `handoff.next_skill` to `plan-work`.
|
|
68
73
|
|
|
@@ -62,7 +62,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
|
|
|
62
62
|
5a. **Blind-spot check** — run `bash scripts/check-blind-spots.sh`. This detects structural quality gaps (verify-gap, test-gap, stale-tag, etc.) beyond percentage coverage. If any HIGH-severity findings exist → **block the verify-work PASS gate**. Findings are written to `specs/blind-spots.json`. MEDIUM/LOW findings warn but don't block.
|
|
63
63
|
5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
|
|
64
64
|
|
|
65
|
-
5b. **NFR Evidence Gate** (P0 only) —
|
|
65
|
+
5b. **NFR Evidence Gate** (P0 only) — Go/no-go on Performance, Reliability, Operability against `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`. Evidence written to `specs/verifications/NFR-eNNsYY.json`. FAIL blocks gate.
|
|
66
|
+
5c. **Adversarial Defect Mutation Gate (HARD GATE — e86 / ab-20)** — `bash scripts/verify-adversarial.sh`. Boundary fuzzing & parameter injection against modified interfaces. Crashes or failures block PASS gate; evidence in `specs/verifications/ADVERSARIAL_LATEST.yaml`.
|
|
66
67
|
6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
|
|
67
68
|
7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
|
|
68
69
|
|
|
@@ -66,7 +66,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
|
|
|
66
66
|
After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
|
|
67
67
|
|
|
68
68
|
1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
|
|
69
|
-
2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
69
|
+
2. **Pass (exit 0):** All checklist sections pass → run `bash scripts/lib/assert-epic-gate.sh advance` to mechanically confirm the audit pass, then advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
70
70
|
3. **Fail (exit 1):** One or more checklist sections fail → **reset `epic_cycle.current_step` to `4`** (develop-tdd) and add the failing section IDs to `completed_steps` as `"1,2,3,4,5,6(fail: ...)"`. Record `epic_cycle.audit_result: fail` in `state.yaml`. Do NOT advance past step 6 until audit passes.
|
|
71
71
|
4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
|
|
72
72
|
5. **Enforce F.I.R.S.T:** After audit-code passes, run `enforce-first --quick` on new/modified tests. Append F.I.R.S.T violations (if any) to the audit report. Failing F.I.R.S.T criteria trigger the same loop-back to step 4.
|
|
@@ -36,6 +36,7 @@ description: "Reviews working-tree changes, then drafts a Conventional Commits t
|
|
|
36
36
|
|
|
37
37
|
## Checklist before finalizing
|
|
38
38
|
|
|
39
|
+
- [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
|
|
39
40
|
- [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
|
|
40
41
|
- [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
|
|
41
42
|
- [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
|
|
@@ -12,7 +12,8 @@ Installs a shared hook that blocks destructive git operations and enforces workf
|
|
|
12
12
|
|
|
13
13
|
## What gets blocked/enforced
|
|
14
14
|
|
|
15
|
-
- **Safety**:
|
|
15
|
+
- **Safety**: force push (`-f`, `--force`, `+refspec`), `reset` with `--hard`, `clean` with any `-f*`, `branch -D` / `--delete --force`, `checkout`/`restore` that discard work (`-f`, `.` pathspec).
|
|
16
|
+
- **Argv, not substrings**: the hook tokenizes each command, strips git's global options (`-C <path>`, `-c k=v`, `--no-pager`, `--git-dir=…`) and judges the `(subcommand, arguments)` pair — so `git -C repo reset -q --hard` is blocked, while `git push --force-with-lease` is allowed. Rules live in `scripts/lib/git-argv.py`, mirrored in `extensions/omp-hooks.ts`; `scripts/test-guard-git-normalize.sh` fails if the two disagree.
|
|
16
17
|
- **Discipline**: Blocks direct commits or pushes to protected branches (`main`, `master`) unless `GIT_BIGPOWERS_LAND=1` (set only by `scripts/land-branch.sh`).
|
|
17
18
|
- **Allows**: `git push origin <feature-branch>` for backup/CI; solo land push to `main` only inside `land-branch.sh`.
|
|
18
19
|
- **Standardization**: Enforces [Conventional Commits](https://www.conventionalcommits.org/) for all `git commit` commands.
|
|
@@ -37,7 +38,11 @@ Installs a shared hook that blocks destructive git operations and enforces workf
|
|
|
37
38
|
|
|
38
39
|
## Customization
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
The rule table lives in `scripts/lib/git-argv.py` (shell hooks) and is mirrored in `extensions/omp-hooks.ts`. Add a rule to both and a row to `specs/verifications/fixtures/guard-git-normalize.yaml`.
|
|
42
|
+
|
|
43
|
+
The TS side is judged through `evaluateBashCall()` — the single pure function the `tool_call` handler calls — so the fixture covers **every** rule (destructive argv, protected-branch push, Conventional Commits), not just the argv table. The gate (`bash scripts/test-guard-git-normalize.sh`) runs both implementations with `GIT_BIGPOWERS_LAND` unset and fails if they disagree, so a verdict can never depend on the developer's shell.
|
|
44
|
+
|
|
45
|
+
Protected-branch rules answer differently on `main` than on a feature branch, so a row that touches commit/push semantics states its `branch:` and both sides are run in it (the shell hook in a throwaway repo checked out on that branch). A row without `branch:` is judged on a feature branch. Do not pin the branch inside either implementation — that is what made the gate pass on PRs and fail on `main`.
|
|
41
46
|
|
|
42
47
|
## Advanced
|
|
43
48
|
|
|
@@ -56,13 +56,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
|
|
|
56
56
|
### 2a. Security gate
|
|
57
57
|
|
|
58
58
|
- [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
|
|
59
|
-
- [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Run `gate-trace
|
|
62
|
+
- [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
|
|
63
|
+
- [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
|
|
64
|
+
- [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
|
|
66
65
|
|
|
67
66
|
> **Adversarial refute framing (e45s32):** The final pre-merge check is **refute, not rubber-stamp**. Before declaring ready, actively try to disprove traceability completeness — missing story tags, absent verify evidence, stale security review. Only proceed when refutation fails.
|
|
68
67
|
|
|
@@ -62,7 +62,12 @@ if written:
|
|
|
62
62
|
- `plan-release` — sequence epics by WSJF
|
|
63
63
|
- `slice-tasks` — cut vertical slices
|
|
64
64
|
|
|
65
|
-
4. **
|
|
65
|
+
4. **Mechanical artifact assertion before status update (HARD GATE — Issue #183):**
|
|
66
|
+
Before marking any workflow key `status: done`, run:
|
|
67
|
+
```bash
|
|
68
|
+
bash scripts/lib/assert-planning-artifacts.sh <workflow-key>
|
|
69
|
+
```
|
|
70
|
+
If the artifact assertion fails, do NOT advance status. Remediate missing output files before continuing. On success, set `status: done` for that workflow key in `planning-status.yaml`.
|
|
66
71
|
|
|
67
72
|
5. **Advance** — Set `state.yaml` `active_flow: planning` while in this chain. When all required keys are done, set `handoff.next_skill` to `plan-work`.
|
|
68
73
|
|
|
@@ -62,7 +62,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
|
|
|
62
62
|
5a. **Blind-spot check** — run `bash scripts/check-blind-spots.sh`. This detects structural quality gaps (verify-gap, test-gap, stale-tag, etc.) beyond percentage coverage. If any HIGH-severity findings exist → **block the verify-work PASS gate**. Findings are written to `specs/blind-spots.json`. MEDIUM/LOW findings warn but don't block.
|
|
63
63
|
5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
|
|
64
64
|
|
|
65
|
-
5b. **NFR Evidence Gate** (P0 only) —
|
|
65
|
+
5b. **NFR Evidence Gate** (P0 only) — Go/no-go on Performance, Reliability, Operability against `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`. Evidence written to `specs/verifications/NFR-eNNsYY.json`. FAIL blocks gate.
|
|
66
|
+
5c. **Adversarial Defect Mutation Gate (HARD GATE — e86 / ab-20)** — `bash scripts/verify-adversarial.sh`. Boundary fuzzing & parameter injection against modified interfaces. Crashes or failures block PASS gate; evidence in `specs/verifications/ADVERSARIAL_LATEST.yaml`.
|
|
66
67
|
6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
|
|
67
68
|
7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
|
|
68
69
|
|
|
@@ -66,7 +66,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
|
|
|
66
66
|
After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
|
|
67
67
|
|
|
68
68
|
1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
|
|
69
|
-
2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
69
|
+
2. **Pass (exit 0):** All checklist sections pass → run `bash scripts/lib/assert-epic-gate.sh advance` to mechanically confirm the audit pass, then advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
70
70
|
3. **Fail (exit 1):** One or more checklist sections fail → **reset `epic_cycle.current_step` to `4`** (develop-tdd) and add the failing section IDs to `completed_steps` as `"1,2,3,4,5,6(fail: ...)"`. Record `epic_cycle.audit_result: fail` in `state.yaml`. Do NOT advance past step 6 until audit passes.
|
|
71
71
|
4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
|
|
72
72
|
5. **Enforce F.I.R.S.T:** After audit-code passes, run `enforce-first --quick` on new/modified tests. Append F.I.R.S.T violations (if any) to the audit report. Failing F.I.R.S.T criteria trigger the same loop-back to step 4.
|
|
@@ -36,6 +36,7 @@ description: "Reviews working-tree changes, then drafts a Conventional Commits t
|
|
|
36
36
|
|
|
37
37
|
## Checklist before finalizing
|
|
38
38
|
|
|
39
|
+
- [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
|
|
39
40
|
- [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
|
|
40
41
|
- [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
|
|
41
42
|
- [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
|
|
@@ -12,7 +12,8 @@ Installs a shared hook that blocks destructive git operations and enforces workf
|
|
|
12
12
|
|
|
13
13
|
## What gets blocked/enforced
|
|
14
14
|
|
|
15
|
-
- **Safety**:
|
|
15
|
+
- **Safety**: force push (`-f`, `--force`, `+refspec`), `reset` with `--hard`, `clean` with any `-f*`, `branch -D` / `--delete --force`, `checkout`/`restore` that discard work (`-f`, `.` pathspec).
|
|
16
|
+
- **Argv, not substrings**: the hook tokenizes each command, strips git's global options (`-C <path>`, `-c k=v`, `--no-pager`, `--git-dir=…`) and judges the `(subcommand, arguments)` pair — so `git -C repo reset -q --hard` is blocked, while `git push --force-with-lease` is allowed. Rules live in `scripts/lib/git-argv.py`, mirrored in `extensions/omp-hooks.ts`; `scripts/test-guard-git-normalize.sh` fails if the two disagree.
|
|
16
17
|
- **Discipline**: Blocks direct commits or pushes to protected branches (`main`, `master`) unless `GIT_BIGPOWERS_LAND=1` (set only by `scripts/land-branch.sh`).
|
|
17
18
|
- **Allows**: `git push origin <feature-branch>` for backup/CI; solo land push to `main` only inside `land-branch.sh`.
|
|
18
19
|
- **Standardization**: Enforces [Conventional Commits](https://www.conventionalcommits.org/) for all `git commit` commands.
|
|
@@ -37,7 +38,11 @@ Installs a shared hook that blocks destructive git operations and enforces workf
|
|
|
37
38
|
|
|
38
39
|
## Customization
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
The rule table lives in `scripts/lib/git-argv.py` (shell hooks) and is mirrored in `extensions/omp-hooks.ts`. Add a rule to both and a row to `specs/verifications/fixtures/guard-git-normalize.yaml`.
|
|
42
|
+
|
|
43
|
+
The TS side is judged through `evaluateBashCall()` — the single pure function the `tool_call` handler calls — so the fixture covers **every** rule (destructive argv, protected-branch push, Conventional Commits), not just the argv table. The gate (`bash scripts/test-guard-git-normalize.sh`) runs both implementations with `GIT_BIGPOWERS_LAND` unset and fails if they disagree, so a verdict can never depend on the developer's shell.
|
|
44
|
+
|
|
45
|
+
Protected-branch rules answer differently on `main` than on a feature branch, so a row that touches commit/push semantics states its `branch:` and both sides are run in it (the shell hook in a throwaway repo checked out on that branch). A row without `branch:` is judged on a feature branch. Do not pin the branch inside either implementation — that is what made the gate pass on PRs and fail on `main`.
|
|
41
46
|
|
|
42
47
|
## Advanced
|
|
43
48
|
|
|
@@ -56,13 +56,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
|
|
|
56
56
|
### 2a. Security gate
|
|
57
57
|
|
|
58
58
|
- [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
|
|
59
|
-
- [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Run `gate-trace
|
|
62
|
+
- [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
|
|
63
|
+
- [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
|
|
64
|
+
- [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
|
|
66
65
|
|
|
67
66
|
> **Adversarial refute framing (e45s32):** The final pre-merge check is **refute, not rubber-stamp**. Before declaring ready, actively try to disprove traceability completeness — missing story tags, absent verify evidence, stale security review. Only proceed when refutation fails.
|
|
68
67
|
|
|
@@ -62,7 +62,12 @@ if written:
|
|
|
62
62
|
- `plan-release` — sequence epics by WSJF
|
|
63
63
|
- `slice-tasks` — cut vertical slices
|
|
64
64
|
|
|
65
|
-
4. **
|
|
65
|
+
4. **Mechanical artifact assertion before status update (HARD GATE — Issue #183):**
|
|
66
|
+
Before marking any workflow key `status: done`, run:
|
|
67
|
+
```bash
|
|
68
|
+
bash scripts/lib/assert-planning-artifacts.sh <workflow-key>
|
|
69
|
+
```
|
|
70
|
+
If the artifact assertion fails, do NOT advance status. Remediate missing output files before continuing. On success, set `status: done` for that workflow key in `planning-status.yaml`.
|
|
66
71
|
|
|
67
72
|
5. **Advance** — Set `state.yaml` `active_flow: planning` while in this chain. When all required keys are done, set `handoff.next_skill` to `plan-work`.
|
|
68
73
|
|
|
@@ -62,7 +62,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
|
|
|
62
62
|
5a. **Blind-spot check** — run `bash scripts/check-blind-spots.sh`. This detects structural quality gaps (verify-gap, test-gap, stale-tag, etc.) beyond percentage coverage. If any HIGH-severity findings exist → **block the verify-work PASS gate**. Findings are written to `specs/blind-spots.json`. MEDIUM/LOW findings warn but don't block.
|
|
63
63
|
5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
|
|
64
64
|
|
|
65
|
-
5b. **NFR Evidence Gate** (P0 only) —
|
|
65
|
+
5b. **NFR Evidence Gate** (P0 only) — Go/no-go on Performance, Reliability, Operability against `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`. Evidence written to `specs/verifications/NFR-eNNsYY.json`. FAIL blocks gate.
|
|
66
|
+
5c. **Adversarial Defect Mutation Gate (HARD GATE — e86 / ab-20)** — `bash scripts/verify-adversarial.sh`. Boundary fuzzing & parameter injection against modified interfaces. Crashes or failures block PASS gate; evidence in `specs/verifications/ADVERSARIAL_LATEST.yaml`.
|
|
66
67
|
6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
|
|
67
68
|
7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
|
|
68
69
|
|
|
@@ -66,7 +66,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
|
|
|
66
66
|
After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
|
|
67
67
|
|
|
68
68
|
1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
|
|
69
|
-
2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
69
|
+
2. **Pass (exit 0):** All checklist sections pass → run `bash scripts/lib/assert-epic-gate.sh advance` to mechanically confirm the audit pass, then advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
70
70
|
3. **Fail (exit 1):** One or more checklist sections fail → **reset `epic_cycle.current_step` to `4`** (develop-tdd) and add the failing section IDs to `completed_steps` as `"1,2,3,4,5,6(fail: ...)"`. Record `epic_cycle.audit_result: fail` in `state.yaml`. Do NOT advance past step 6 until audit passes.
|
|
71
71
|
4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
|
|
72
72
|
5. **Enforce F.I.R.S.T:** After audit-code passes, run `enforce-first --quick` on new/modified tests. Append F.I.R.S.T violations (if any) to the audit report. Failing F.I.R.S.T criteria trigger the same loop-back to step 4.
|
|
@@ -36,6 +36,7 @@ description: "Reviews working-tree changes, then drafts a Conventional Commits t
|
|
|
36
36
|
|
|
37
37
|
## Checklist before finalizing
|
|
38
38
|
|
|
39
|
+
- [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
|
|
39
40
|
- [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
|
|
40
41
|
- [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
|
|
41
42
|
- [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
|
|
@@ -12,7 +12,8 @@ Installs a shared hook that blocks destructive git operations and enforces workf
|
|
|
12
12
|
|
|
13
13
|
## What gets blocked/enforced
|
|
14
14
|
|
|
15
|
-
- **Safety**:
|
|
15
|
+
- **Safety**: force push (`-f`, `--force`, `+refspec`), `reset` with `--hard`, `clean` with any `-f*`, `branch -D` / `--delete --force`, `checkout`/`restore` that discard work (`-f`, `.` pathspec).
|
|
16
|
+
- **Argv, not substrings**: the hook tokenizes each command, strips git's global options (`-C <path>`, `-c k=v`, `--no-pager`, `--git-dir=…`) and judges the `(subcommand, arguments)` pair — so `git -C repo reset -q --hard` is blocked, while `git push --force-with-lease` is allowed. Rules live in `scripts/lib/git-argv.py`, mirrored in `extensions/omp-hooks.ts`; `scripts/test-guard-git-normalize.sh` fails if the two disagree.
|
|
16
17
|
- **Discipline**: Blocks direct commits or pushes to protected branches (`main`, `master`) unless `GIT_BIGPOWERS_LAND=1` (set only by `scripts/land-branch.sh`).
|
|
17
18
|
- **Allows**: `git push origin <feature-branch>` for backup/CI; solo land push to `main` only inside `land-branch.sh`.
|
|
18
19
|
- **Standardization**: Enforces [Conventional Commits](https://www.conventionalcommits.org/) for all `git commit` commands.
|
|
@@ -37,7 +38,11 @@ Installs a shared hook that blocks destructive git operations and enforces workf
|
|
|
37
38
|
|
|
38
39
|
## Customization
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
The rule table lives in `scripts/lib/git-argv.py` (shell hooks) and is mirrored in `extensions/omp-hooks.ts`. Add a rule to both and a row to `specs/verifications/fixtures/guard-git-normalize.yaml`.
|
|
42
|
+
|
|
43
|
+
The TS side is judged through `evaluateBashCall()` — the single pure function the `tool_call` handler calls — so the fixture covers **every** rule (destructive argv, protected-branch push, Conventional Commits), not just the argv table. The gate (`bash scripts/test-guard-git-normalize.sh`) runs both implementations with `GIT_BIGPOWERS_LAND` unset and fails if they disagree, so a verdict can never depend on the developer's shell.
|
|
44
|
+
|
|
45
|
+
Protected-branch rules answer differently on `main` than on a feature branch, so a row that touches commit/push semantics states its `branch:` and both sides are run in it (the shell hook in a throwaway repo checked out on that branch). A row without `branch:` is judged on a feature branch. Do not pin the branch inside either implementation — that is what made the gate pass on PRs and fail on `main`.
|
|
41
46
|
|
|
42
47
|
## Advanced
|
|
43
48
|
|
|
@@ -56,13 +56,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
|
|
|
56
56
|
### 2a. Security gate
|
|
57
57
|
|
|
58
58
|
- [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
|
|
59
|
-
- [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Run `gate-trace
|
|
62
|
+
- [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
|
|
63
|
+
- [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
|
|
64
|
+
- [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
|
|
66
65
|
|
|
67
66
|
> **Adversarial refute framing (e45s32):** The final pre-merge check is **refute, not rubber-stamp**. Before declaring ready, actively try to disprove traceability completeness — missing story tags, absent verify evidence, stale security review. Only proceed when refutation fails.
|
|
68
67
|
|
|
@@ -62,7 +62,12 @@ if written:
|
|
|
62
62
|
- `plan-release` — sequence epics by WSJF
|
|
63
63
|
- `slice-tasks` — cut vertical slices
|
|
64
64
|
|
|
65
|
-
4. **
|
|
65
|
+
4. **Mechanical artifact assertion before status update (HARD GATE — Issue #183):**
|
|
66
|
+
Before marking any workflow key `status: done`, run:
|
|
67
|
+
```bash
|
|
68
|
+
bash scripts/lib/assert-planning-artifacts.sh <workflow-key>
|
|
69
|
+
```
|
|
70
|
+
If the artifact assertion fails, do NOT advance status. Remediate missing output files before continuing. On success, set `status: done` for that workflow key in `planning-status.yaml`.
|
|
66
71
|
|
|
67
72
|
5. **Advance** — Set `state.yaml` `active_flow: planning` while in this chain. When all required keys are done, set `handoff.next_skill` to `plan-work`.
|
|
68
73
|
|
|
@@ -62,7 +62,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
|
|
|
62
62
|
5a. **Blind-spot check** — run `bash scripts/check-blind-spots.sh`. This detects structural quality gaps (verify-gap, test-gap, stale-tag, etc.) beyond percentage coverage. If any HIGH-severity findings exist → **block the verify-work PASS gate**. Findings are written to `specs/blind-spots.json`. MEDIUM/LOW findings warn but don't block.
|
|
63
63
|
5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
|
|
64
64
|
|
|
65
|
-
5b. **NFR Evidence Gate** (P0 only) —
|
|
65
|
+
5b. **NFR Evidence Gate** (P0 only) — Go/no-go on Performance, Reliability, Operability against `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`. Evidence written to `specs/verifications/NFR-eNNsYY.json`. FAIL blocks gate.
|
|
66
|
+
5c. **Adversarial Defect Mutation Gate (HARD GATE — e86 / ab-20)** — `bash scripts/verify-adversarial.sh`. Boundary fuzzing & parameter injection against modified interfaces. Crashes or failures block PASS gate; evidence in `specs/verifications/ADVERSARIAL_LATEST.yaml`.
|
|
66
67
|
6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
|
|
67
68
|
7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
|
|
68
69
|
|
|
@@ -65,7 +65,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
|
|
|
65
65
|
After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
|
|
66
66
|
|
|
67
67
|
1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
|
|
68
|
-
2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
68
|
+
2. **Pass (exit 0):** All checklist sections pass → run `bash scripts/lib/assert-epic-gate.sh advance` to mechanically confirm the audit pass, then advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
69
69
|
3. **Fail (exit 1):** One or more checklist sections fail → **reset `epic_cycle.current_step` to `4`** (develop-tdd) and add the failing section IDs to `completed_steps` as `"1,2,3,4,5,6(fail: ...)"`. Record `epic_cycle.audit_result: fail` in `state.yaml`. Do NOT advance past step 6 until audit passes.
|
|
70
70
|
4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
|
|
71
71
|
5. **Enforce F.I.R.S.T:** After audit-code passes, run `enforce-first --quick` on new/modified tests. Append F.I.R.S.T violations (if any) to the audit report. Failing F.I.R.S.T criteria trigger the same loop-back to step 4.
|
|
@@ -35,6 +35,7 @@ alwaysApply: false
|
|
|
35
35
|
|
|
36
36
|
## Checklist before finalizing
|
|
37
37
|
|
|
38
|
+
- [ ] **Audit pass confirmed (HARD GATE — Issue #182):** In active epic flow, `bash scripts/lib/assert-epic-gate.sh commit` passes.
|
|
38
39
|
- [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
|
|
39
40
|
- [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
|
|
40
41
|
- [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
|
|
@@ -11,7 +11,8 @@ Installs a shared hook that blocks destructive git operations and enforces workf
|
|
|
11
11
|
|
|
12
12
|
## What gets blocked/enforced
|
|
13
13
|
|
|
14
|
-
- **Safety**:
|
|
14
|
+
- **Safety**: force push (`-f`, `--force`, `+refspec`), `reset` with `--hard`, `clean` with any `-f*`, `branch -D` / `--delete --force`, `checkout`/`restore` that discard work (`-f`, `.` pathspec).
|
|
15
|
+
- **Argv, not substrings**: the hook tokenizes each command, strips git's global options (`-C <path>`, `-c k=v`, `--no-pager`, `--git-dir=…`) and judges the `(subcommand, arguments)` pair — so `git -C repo reset -q --hard` is blocked, while `git push --force-with-lease` is allowed. Rules live in `scripts/lib/git-argv.py`, mirrored in `extensions/omp-hooks.ts`; `scripts/test-guard-git-normalize.sh` fails if the two disagree.
|
|
15
16
|
- **Discipline**: Blocks direct commits or pushes to protected branches (`main`, `master`) unless `GIT_BIGPOWERS_LAND=1` (set only by `scripts/land-branch.sh`).
|
|
16
17
|
- **Allows**: `git push origin <feature-branch>` for backup/CI; solo land push to `main` only inside `land-branch.sh`.
|
|
17
18
|
- **Standardization**: Enforces [Conventional Commits](https://www.conventionalcommits.org/) for all `git commit` commands.
|
|
@@ -36,7 +37,11 @@ Installs a shared hook that blocks destructive git operations and enforces workf
|
|
|
36
37
|
|
|
37
38
|
## Customization
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
The rule table lives in `scripts/lib/git-argv.py` (shell hooks) and is mirrored in `extensions/omp-hooks.ts`. Add a rule to both and a row to `specs/verifications/fixtures/guard-git-normalize.yaml`.
|
|
41
|
+
|
|
42
|
+
The TS side is judged through `evaluateBashCall()` — the single pure function the `tool_call` handler calls — so the fixture covers **every** rule (destructive argv, protected-branch push, Conventional Commits), not just the argv table. The gate (`bash scripts/test-guard-git-normalize.sh`) runs both implementations with `GIT_BIGPOWERS_LAND` unset and fails if they disagree, so a verdict can never depend on the developer's shell.
|
|
43
|
+
|
|
44
|
+
Protected-branch rules answer differently on `main` than on a feature branch, so a row that touches commit/push semantics states its `branch:` and both sides are run in it (the shell hook in a throwaway repo checked out on that branch). A row without `branch:` is judged on a feature branch. Do not pin the branch inside either implementation — that is what made the gate pass on PRs and fail on `main`.
|
|
40
45
|
|
|
41
46
|
## Advanced
|
|
42
47
|
|
|
@@ -55,13 +55,12 @@ git log main...HEAD --format="%B" | grep -qiE 'co[- ]authored[- ]by' && echo "
|
|
|
55
55
|
### 2a. Security gate
|
|
56
56
|
|
|
57
57
|
- [ ] `specs/security/REVIEW.md` exists and is fresh (matches current branch diff)
|
|
58
|
-
- [ ] No unresolved HIGH findings with confidence ≥ 8 (or all documented in `specs/security/EXCEPTIONS.md` with sign-off rationale)
|
|
59
58
|
|
|
60
|
-
|
|
59
|
+
### 2b. Audit-code & Traceability gates (HARD GATES — Issue #182)
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
Run `gate-trace
|
|
61
|
+
- [ ] Run `bash scripts/lib/assert-epic-gate.sh release` (asserts `specs/AUDIT_LATEST.md` passed; blocks release on failure).
|
|
62
|
+
- [ ] No unresolved HIGH security findings with confidence ≥ 8 (or documented in `specs/security/EXCEPTIONS.md`).
|
|
63
|
+
- [ ] Run `gate-trace`. FAIL blocks merge; CONCERNS requires explicit override in `specs/state.yaml`. WAIVED if no matrix available.
|
|
65
64
|
|
|
66
65
|
> **Adversarial refute framing (e45s32):** The final pre-merge check is **refute, not rubber-stamp**. Before declaring ready, actively try to disprove traceability completeness — missing story tags, absent verify evidence, stale security review. Only proceed when refutation fails.
|
|
67
66
|
|
|
@@ -61,7 +61,12 @@ if written:
|
|
|
61
61
|
- `plan-release` — sequence epics by WSJF
|
|
62
62
|
- `slice-tasks` — cut vertical slices
|
|
63
63
|
|
|
64
|
-
4. **
|
|
64
|
+
4. **Mechanical artifact assertion before status update (HARD GATE — Issue #183):**
|
|
65
|
+
Before marking any workflow key `status: done`, run:
|
|
66
|
+
```bash
|
|
67
|
+
bash scripts/lib/assert-planning-artifacts.sh <workflow-key>
|
|
68
|
+
```
|
|
69
|
+
If the artifact assertion fails, do NOT advance status. Remediate missing output files before continuing. On success, set `status: done` for that workflow key in `planning-status.yaml`.
|
|
65
70
|
|
|
66
71
|
5. **Advance** — Set `state.yaml` `active_flow: planning` while in this chain. When all required keys are done, set `handoff.next_skill` to `plan-work`.
|
|
67
72
|
|
|
@@ -61,7 +61,8 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
|
|
|
61
61
|
5a. **Blind-spot check** — run `bash scripts/check-blind-spots.sh`. This detects structural quality gaps (verify-gap, test-gap, stale-tag, etc.) beyond percentage coverage. If any HIGH-severity findings exist → **block the verify-work PASS gate**. Findings are written to `specs/blind-spots.json`. MEDIUM/LOW findings warn but don't block.
|
|
62
62
|
5a2. **Completeness critic (e45s05)** — `bash scripts/lib/completeness-critic.sh`. **BLOCKER** aborts merge gate; WARNING → gaps loop; FILLED = evidence only.
|
|
63
63
|
|
|
64
|
-
5b. **NFR Evidence Gate** (P0 only) —
|
|
64
|
+
5b. **NFR Evidence Gate** (P0 only) — Go/no-go on Performance, Reliability, Operability against `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`. Evidence written to `specs/verifications/NFR-eNNsYY.json`. FAIL blocks gate.
|
|
65
|
+
5c. **Adversarial Defect Mutation Gate (HARD GATE — e86 / ab-20)** — `bash scripts/verify-adversarial.sh`. Boundary fuzzing & parameter injection against modified interfaces. Crashes or failures block PASS gate; evidence in `specs/verifications/ADVERSARIAL_LATEST.yaml`.
|
|
65
66
|
6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
|
|
66
67
|
7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
|
|
67
68
|
|
|
@@ -65,7 +65,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
|
|
|
65
65
|
After step 5 (verify-work) completes successfully, step 6 runs `audit-code` automatically in `--gate` mode:
|
|
66
66
|
|
|
67
67
|
1. **Run audit:** Invoke `audit-code --gate` on the complete diff for this story.
|
|
68
|
-
2. **Pass (exit 0):** All checklist sections pass → advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
68
|
+
2. **Pass (exit 0):** All checklist sections pass → run `bash scripts/lib/assert-epic-gate.sh advance` to mechanically confirm the audit pass, then advance to step 7 (commit-message). Record `epic_cycle.audit_result: pass` in `state.yaml`.
|
|
69
69
|
3. **Fail (exit 1):** One or more checklist sections fail → **reset `epic_cycle.current_step` to `4`** (develop-tdd) and add the failing section IDs to `completed_steps` as `"1,2,3,4,5,6(fail: ...)"`. Record `epic_cycle.audit_result: fail` in `state.yaml`. Do NOT advance past step 6 until audit passes.
|
|
70
70
|
4. **Audit artifact:** Full audit report saved to `specs/verifications/AUDIT-<epic>-<story>.md` regardless of pass/fail, for reviewer traceability.
|
|
71
71
|
5. **Enforce F.I.R.S.T:** After audit-code passes, run `enforce-first --quick` on new/modified tests. Append F.I.R.S.T violations (if any) to the audit report. Failing F.I.R.S.T criteria trigger the same loop-back to step 4.
|