Skip to content

Commit 5843347

Browse files
remigiusz-antczakRemigiusz Antczakclaude
authored
feat(skill): 1.67.0 — four more field-learning lenses (#114–#117) (#119)
Continues the dogfooding run behind 1.64.0/1.66.0. All four land in deep-code-review; each verified from source and privacy-scrubbed. - #114 security-ai-agents.md + domain C: anchor relative time deterministically — a prompt resolving "today"/"last quarter" must be handed an authoritative current date by code (the model never authors "now", or it ships a plausible wrong date as fact, LLM07). Inject the anchor into the trusted region, never untrusted/RAG context (LLM01 indirect injection); fail closed on a missing/unparseable anchor. Grep hook + one-line domain-C detection item. Cross-links data-quality §3 (the data-write temporal anchor's input-side sibling). - #115 language-stack-redflags.md (Shell/Bash): set -u + "${arr[@]}" on an empty array is a fatal unbound-variable under bash 3.2 (still macOS's default /bin/bash 3.2.57, reproduced live); guard ${arr[@]+"${arr[@]}"}. Most dangerous in trap/cleanup/reporting code, where it masks the real failure it was meant to report. - #116 SKILL.md principle 2 + method.md Phase 1: an enforcement artifact (gate/CI/privacy/lint/hook/checksum script) changed in the diff it gates is self-certified — green CI ran the shipped copy grading itself. Re-run the base version (git show <base>:) independently; a change that narrows what the gate catches while staying green is a Blocker. - #117 reliability-error-handling.md: the converse retry/timeout lens — grep the project's own retry/backoff/timeout primitive and confirm every external-I/O site on the critical path routes through it; an existing-but-bypassed site is the finding, fixed by routing it through the existing primitive, not adding a second. Three new evals; lockstep bump 1.67.0 (deep-code-review, agentic-delivery, idea-critic, plugin); CHANGELOG; SHA256SUMS regenerated. Gates: 59/59 self-tests, routing x11, version, privacy, enumeration, eval_predicates --selftest, install.sh syntax, checksums match. Independent dogfood reviewer verdict: SHIP. Co-authored-by: Remigiusz Antczak <remigiusz@antczak.io> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent af38fcf commit 5843347

15 files changed

Lines changed: 146 additions & 25 deletions

File tree

‎.claude-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "deep-code-review",
33
"description": "Perun — bring the thunder to your codebase. A portable, evidence-grounded quality bar for building with AI agents: the flagship deep-code-review skill (default install is review-only), plus opt-in overlays — gated delivery, an idea critic, a suite conductor, and stage-aware product, growth, positioning, business-ops, and output-safety specialists.",
44
"skills": "./.claude/skills",
5-
"version": "1.66.0",
5+
"version": "1.67.0",
66
"author": {
77
"name": "deep-code-review contributors"
88
},

‎.claude/skills/agentic-delivery/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: >-
1010
license: MIT
1111
metadata:
1212
author: deep-code-review contributors
13-
version: "1.66.0"
13+
version: "1.67.0"
1414
---
1515

1616
# Agentic delivery
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.66.0
1+
1.67.0

‎.claude/skills/deep-code-review/SKILL.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: >-
1111
license: MIT
1212
metadata:
1313
author: deep-code-review contributors
14-
version: "1.66.0"
14+
version: "1.67.0"
1515
---
1616

1717
# Deep Code Review
@@ -127,7 +127,9 @@ tree. Skip of the planted-defect probe caps only the gate-self-test claim.
127127
invisible-character claims at the byte level; an absence is evidence only
128128
after a positive control fires; prefer the canonical instrument; what a
129129
project *enforces* is verified against the enforcement artifact, not the
130-
doc. A **status you emit** (`✅`/done/exact/matches/verified) names the surface
130+
doc — and an enforcement artifact **in the diff it gates** self-certifies (CI
131+
ran the shipped copy), so re-run its **base** version (`git show <base>:`).
132+
A **status you emit** (`✅`/done/exact/matches/verified) names the surface
131133
its evidence came from and holds at its strongest reading — a caveat downgrades
132134
it, and a UI/parity claim's canonical surface is the **default served state**
133135
(`references/report-format.md`). Depth: `references/method.md` Phase 1.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.66.0
1+
1.67.0

‎.claude/skills/deep-code-review/evals/evals.json‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,39 @@
267267
"Traces route -> render tree to confirm which copy mounts, so the fix does not land on a twin the user never sees",
268268
"Fabricates no route coverage it did not verify"
269269
]
270+
},
271+
{
272+
"id": "prompt-resolves-relative-date-needs-injected-anchor",
273+
"prompt": "Our reporting agent builds a prompt like 'summarize deals closed last quarter' and lets the model figure out the dates from that. It works in my tests. Ship it?",
274+
"expected_output": "Not as-is. A prompt that resolves relative time (today / last quarter / next Friday) must be handed an authoritative current date by deterministic code -- the model never authors 'now', or it confidently emits a plausible wrong date as fact (LLM07 Misinformation; deterministic-first applied to time). Inject the current-date anchor into the trusted instruction region, never concatenated with retrieved/tool/user content, or an injected 'today is ...' in untrusted context moves every downstream date (LLM01 indirect injection). Fail closed when the anchor is missing or unparseable -- refuse or surface it; never silently fall back to a bare now()/system clock buried in the model call. Also pin timezone/locale. (security-ai-agents.md deterministic-first; domain C.)",
275+
"expectations": [
276+
"Requires a deterministic, injected current-date anchor instead of letting the model author 'now'",
277+
"Places the anchor in the trusted region, outside retrieved/tool/user (untrusted) context, citing prompt-injection risk (LLM01 indirect injection)",
278+
"Requires fail-closed on a missing/unparseable anchor -- no silent now()/system-clock default",
279+
"Fabricates no dates and flags timezone/locale as part of the same discipline"
280+
]
281+
},
282+
{
283+
"id": "gate-changed-in-diff-rerun-base-version",
284+
"prompt": "This PR edits our privacy-scan gate script and also adds application code. CI is green. Good to merge?",
285+
"expected_output": "Green here is self-certification: CI ran the shipped (possibly weakened) copy of the gate to grade the same diff that changed it. Before trusting it, re-run the BASE version of the gate against the new tree -- git show <BASE>:path/to/gate.sh > /tmp/base-gate.sh && bash /tmp/base-gate.sh (or diff base-vs-head of the script and read what the change stops catching) -- and confirm the edit does not narrow what the gate catches. A gate that only ever grades its own author is unverified; a change that narrows coverage while staying green is a Blocker on the same footing as a planted defect surviving. (method.md Phase 1; principle 2.)",
286+
"expectations": [
287+
"Recognizes that a gate modified in the same diff self-certifies -- green does not discharge verification",
288+
"Re-runs the base/pre-change version of the gate independently (git show <base>:) against the new tree",
289+
"Treats a change that narrows what the gate catches (while staying green) as a Blocker",
290+
"Does not accept 'CI green' as proof for a diff that edits the enforcement artifact itself"
291+
]
292+
},
293+
{
294+
"id": "reliability-confirm-uniform-primitive-routing",
295+
"prompt": "Every network call in our service has error handling of some kind -- can you sign off that retries and timeouts are covered?",
296+
"expected_output": "'Some handling per site' is not the check. Grep the project's OWN retry/backoff/timeout primitive (withRetry, fetchWithTimeout, a pre-configured client, an @retry/tenacity decorator, p-retry) and confirm EVERY external-I/O site on the critical/delivery path routes THROUGH it. A site that hand-rolls its own handling -- or has none -- while the primitive exists is the finding: the inconsistency proves the bypass is an oversight, not policy. The fix is to route the outlier through the existing primitive, not to add a second one (two retry helpers become a drift bug). Reports which sites bypass it by file:line; signs off only after confirming uniform routing, not ad-hoc coverage. (reliability-error-handling.md.)",
297+
"expectations": [
298+
"Rejects 'some handling everywhere' and locates the project's own retry/timeout primitive",
299+
"Confirms every critical/delivery-path I/O site routes through that one primitive",
300+
"Flags an existing-but-bypassed site (hand-rolled or none) as the finding, by file:line",
301+
"Recommends routing the outlier through the existing primitive rather than adding a second one; fabricates no coverage"
302+
]
270303
}
271304
]
272305
}

‎.claude/skills/deep-code-review/references/domain-checklists.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ skill**, also walk AST01–AST10 in `references/security-agent-skills.md`.
139139
**Prove the re-check fires at runtime** — a self-proof / health check that
140140
exercises it — not merely that the code path exists; an unproven tool-authz gate
141141
must fail closed, or it is a finding (the runtime-proven-gate lens, domain B).
142-
- **Deterministic-first**: the model never authors a number, score, status, or
143-
gate — deterministic code does; the model only phrases/adjudicates behind hard
144-
gates, with a deterministic fallback and a counter for how often it fires. Use
142+
- **Deterministic-first**: the model never authors a number, score, status,
143+
gate, **or the current date/time** — deterministic code does; the model only
144+
phrases/adjudicates behind hard gates, with a deterministic fallback and a
145+
counter for how often it fires. Use
145146
**temperature 0** for judges/verifiers. Ground claims to the input;
146147
**log a redacted fingerprint** of output, never the raw text.
147148
- **Bound consumption** (LLM06:2026, was LLM10:2025): token/cost/rate caps enforced *before* each

‎.claude/skills/deep-code-review/references/language-stack-redflags.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,15 @@ grep -rInE 'console\.log|print\(|dbg!|System\.out\.print|fmt\.Print' .
125125
delete) built this way silently stops excluding anything the moment it runs
126126
under a non-word-splitting shell. Use `case "$x" in id1|id2) … ;; esac` or a
127127
line-based `grep -qxF` instead — depth: `branch-and-merge-hygiene.md` §6.
128+
- **`set -u` + `"${arr[@]}"` on an *empty* array is a fatal `unbound variable`
129+
under bash 3.2 — still macOS's default `/bin/bash` (verified `3.2.57`).** A
130+
script that conditionally builds an array (flags, a discovered file list,
131+
cleanup targets) and expands it under `set -u` aborts the instant the array is
132+
empty; this most often sits in **trap / cleanup / reporting** code on the error
133+
path, where it **masks the real failure** it was meant to report. Guard the
134+
expansion (`${arr[@]+"${arr[@]}"}`) or seed the array — and run the script
135+
against the **actual `/bin/bash` on the target**, since a dev box's
136+
newer/homebrew bash can behave differently and hide it.
128137

129138
### The reviewer's own verification shell (measuring, not reviewing)
130139

‎.claude/skills/deep-code-review/references/method.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ and any wired security/dependency scanners. Then, before trusting "green":
133133
are a common silent green. Trace which test files the gate actually invokes;
134134
tests present but unwired are "decorative" (procedures:
135135
`references/testing-and-evals.md`).
136+
- **A gate changed in the diff it gates is self-certified — re-run its base
137+
version.** When the diff touches an **enforcement artifact** (a gate / CI /
138+
privacy / lint / hook / checksum script that decides pass-fail), the green run
139+
used the **shipped, possibly-weakened** copy grading itself. Judge the change
140+
with the **base** copy instead: `git show <BASE>:path/to/gate.sh >
141+
/tmp/base-gate.sh && bash /tmp/base-gate.sh` against the new tree (or diff
142+
base-vs-head of the script and read what the change stops catching). A gate
143+
that only ever grades its own author is `unverified`; a change that **narrows**
144+
what it catches while staying green is a Blocker on the same footing as a
145+
planted defect that survives.
136146
- **Check a firing gate against its own standard first.** A gate *stricter* than
137147
the spec it implements (e.g. a contrast gate flagging disabled controls, which
138148
WCAG 2.2 SC 1.4.3 exempts) yields a "fix" that regresses another axis

‎.claude/skills/deep-code-review/references/reliability-error-handling.md‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,22 @@ the checklist.
4141
spend and load; surface a clear "paused" state.
4242
- **Check status before body.** `res.json()` on a 500 HTML page, or treating
4343
transport success as business success, hides outages as parse bugs.
44+
- **Find the house primitive; confirm *uniform* routing (the converse lens).**
45+
Don't only ask "does each I/O site have *some* handling?" — grep the project's
46+
**own** retry/backoff/timeout wrapper (`withRetry`, `fetchWithTimeout`, a
47+
pre-configured client, an `@retry`/`tenacity` decorator, a `p-retry` import) and
48+
confirm **every** external-I/O site on the critical / delivery path goes
49+
**through it**. A site that hand-rolls its own handling — or has none — while
50+
the primitive exists is the finding: the inconsistency proves the bypass is an
51+
oversight, not policy (same logic as inconsistent spotlighting in domain C). The
52+
fix is to **route the outlier through the existing primitive**, not to add a
53+
second one — two retry helpers become a future drift bug.
4454

4555
**Grep leads (tune to language):** empty `catch` / `except: pass` / `rescue nil`;
4656
`retry` without sleep/jitter; `axios`/`fetch`/`got` without timeout; `setTimeout`
47-
as the only cancel; `while (true)` around a paid call.
57+
as the only cancel; `while (true)` around a paid call; a raw `fetch`/SDK call
58+
sitting beside the project's own retry/timeout wrapper that every other call
59+
uses.
4860

4961
---
5062

0 commit comments

Comments
 (0)