@greenrenge/skills 0.2.0 → 0.3.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.
- package/README.md +27 -2
- package/bin/cli.mjs +115 -0
- package/bin/lib/onboard.mjs +12 -1
- package/bin/lib/probe.mjs +151 -0
- package/bin/lib/recipes/index.mjs +57 -0
- package/bin/lib/recipes/security-cron.mjs +1140 -0
- package/catalog.json +63 -2
- package/package.json +4 -3
- package/skills/security-remediation-epic/prompt-template.md +87 -20
- package/skills/ticket-orchestrator/SKILL.md +349 -0
- package/skills/ticket-orchestrator/references/proving-the-gates.md +63 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Proving the gates
|
|
2
|
+
|
|
3
|
+
The run's guardrails are their own authors' claims until each one is proven to fail. This is the
|
|
4
|
+
runbook that keeps them honest — mutation testing's discipline lifted from tests to gates: the
|
|
5
|
+
judge is never the author, one level up.
|
|
6
|
+
|
|
7
|
+
## The proof recipe
|
|
8
|
+
|
|
9
|
+
For every gate in the ledger below:
|
|
10
|
+
|
|
11
|
+
1. Cut a throwaway local branch (never pushed).
|
|
12
|
+
2. Plant the gate's named violation.
|
|
13
|
+
3. Run the gate; capture its verbatim **red** output.
|
|
14
|
+
4. Revert; re-run; capture the **green** output.
|
|
15
|
+
5. Save both as `.scratch/<kit>/evidence/gate-<slug>.red` and `.green` (first + last lines of
|
|
16
|
+
each run, plus the command that produced them) and log them in the ledger's *last proof* column.
|
|
17
|
+
6. Delete the branch. No planted violation ever survives the proof.
|
|
18
|
+
|
|
19
|
+
A gate that cannot be made to fail is **fixed or deleted on the spot** — a guard that never fires
|
|
20
|
+
is not a guard, it is comfort.
|
|
21
|
+
|
|
22
|
+
**REFUSE.** A check that inspected zero targets (empty dir, no facts, wrong range) is a *failed*
|
|
23
|
+
check, never a pass. Every `tools/check-*.py` enforces this by construction.
|
|
24
|
+
|
|
25
|
+
## LLM gates get both controls
|
|
26
|
+
|
|
27
|
+
Deterministic gates need the positive control (the plant). LLM gates (the `ocr` CLI, the
|
|
28
|
+
PR review bot) also need the **negative control**: run them on a known-clean diff and
|
|
29
|
+
record what they report. A reviewer that fabricates findings burns the bot's 10-turn budget as
|
|
30
|
+
effectively as one that misses them.
|
|
31
|
+
|
|
32
|
+
## The gate ledger
|
|
33
|
+
|
|
34
|
+
| Gate | Detects | Severity | Cadence | Re-prove when | Last proof |
|
|
35
|
+
|---|---|---|---|---|---|
|
|
36
|
+
| `lint` → ruff / static purity rules | banned primitives in pure core modules | fail | every run | linter config changes | logged per repo |
|
|
37
|
+
| `lint` → import-boundary contracts | import-graph violations across architecture layers | fail | every run | boundary contracts change | logged per repo |
|
|
38
|
+
| `tools/check-tickets.py` | malformed staged kits before publication | fail | every publish | the script or the scheme's ticket shape changes | ticket 05 (2026-11) |
|
|
39
|
+
| `tools/check-rules.py` | shadowed `rule.json` entries (dead rules) | fail | on rule.json change | `.opencodereview/rule.json` changes | ticket 05 (2026-11) |
|
|
40
|
+
| `tools/check-blast-radius.py` | a ticket's diff leaving its area | fork-to-report | every merge | the allowlist or area vocabulary changes | ticket 05 (2026-11) |
|
|
41
|
+
| `tools/check-facts.py` | unmapped facts, orphan markers, missing red-once | fail | every merge | the fact-marker grammar changes | ticket 05 (2026-11) |
|
|
42
|
+
| OCR gate (`ocr review`) | diff defects an LLM reviewer can see | fix-or-reject | once per run (final PR) | invocation flags change | ticket 05 (both controls) |
|
|
43
|
+
| `git check-ignore` commit probe | ignored paths staged for commit | fail | every commit/push | ignore rules change | ticket 05 (2026-11) |
|
|
44
|
+
|
|
45
|
+
## On-change trigger
|
|
46
|
+
|
|
47
|
+
Proofs re-run **when the gate changes, not on every run** — the cost control the literature
|
|
48
|
+
insists on (Jain: same sensors ~7× cost for zero acceptance delta on strong models; Böckeler:
|
|
49
|
+
3–8.5× tokens for no quality delta inside the loop; PIT scopes mutation to changed code). Fires
|
|
50
|
+
on any change to: `ml/pyproject.toml` gate config, `.opencodereview/rule.json`,
|
|
51
|
+
`tools/check-*.py`, or this skill's gate lines. Anthropic runs its own eval suite on exactly this
|
|
52
|
+
trigger (any change to CLAUDE.md, skills, or hooks).
|
|
53
|
+
|
|
54
|
+
## Deletion discipline
|
|
55
|
+
|
|
56
|
+
A gate that has not fired legitimately across a full run (or N tickets) is up for removal — SRE
|
|
57
|
+
ch. 6's rule for rarely-exercised alerting configuration. Gates earn their slot by catching real
|
|
58
|
+
things; the harvest step retires the ones that only ever pass.
|
|
59
|
+
|
|
60
|
+
## Where proofs run
|
|
61
|
+
|
|
62
|
+
Orchestrator-side, outside every worker loop — never charged to a ticket's context. The ledger's
|
|
63
|
+
*last proof* column is the memory: a proof older than the gate's last config change is stale.
|