Skip to content

Harden three classes from the profiles cycle - #16

Merged
dsnger merged 3 commits into
mainfrom
harden-profiles-cycle-classes
Jul 27, 2026
Merged

Harden three classes from the profiles cycle#16
dsnger merged 3 commits into
mainfrom
harden-profiles-cycle-classes

Conversation

@dsnger

@dsnger dsnger commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Runs dev-workflow:harden-finding on the three classes that recurred through the profiles work (#15). All three land as text; none reaches a mechanical rung, and each ledger row says so instead of implying otherwise.

class occurrence rung what landed
unverified-enforcement-claim 4th P prompt-standards item 11: cite the source rather than restating it (with invariant 8's exception named), and delete a mechanism claim that has needed a fourth correction
rewrite-drops-prior-condition new class 1 AGENTS.md Don't: account for a decision procedure's old conditions — kept, moved, or deliberately dropped
docs-drift 4th, new mechanism P a standing Gate-B lens in both §5 copies: "which existing statements does this diff falsify?"

Plus the new class in docs/hardening-taxonomy.md with its boundary against docs-drift drawn, three ledger rows, and 0.7.0 → 0.7.1.

Why these rungs, and two refused escalations

Both lineages' latest entries are rung-2 checks in scripts/check-invariants.sh — but each guards exactly one spelling (Target model: lines; prose count claims), and both new defects fall outside those spellings. The 2026-07-26 rows warn about precisely this by name: harden-finding compares fingerprints only, so a later in-class defect outside the guarded spelling gets proposed for a stronger rung than anything justifies, and a human validates that proposal. The reasoning is written into each row rather than the number being taken silently.

One arithmetic correction found during review: the unverified-enforcement-claim row said fifth occurrence. The 2026-07-26 row resolves the 2026-07-25 pending row rather than recording a new defect, so it is the fourth. Since the refused escalation rests on that count, the row now carries the arithmetic.

Item 11 was sharpened rather than split into a new item 13: a new numbered item ripples the checklist count through prompt-standards, the /workflow-init template and AGENTS.md invariant 11 — all pinned together by check 4b, the rung-2 hardening for a sibling class. The hardening would have broken the checker guarding its neighbour.

What the gate caught

Gate B ran 7 findings at pass 1, then 1, 1, and clean on both branches at pass 4. Three of the seven were this change committing the classes it hardens:

  • the item-11 fix landed only in the repo's docs/prompt-standards.md, leaving the inline template — the thing downstream projects actually receive — unhardened;
  • the new "cite the source" rule contradicted invariant 8, since a scaffolded template cannot point at a file the downstream reader does not have;
  • the lens and its row claimed categorically that no parity check or self-grep could reach the class, when what is true is narrower: the checks that ran are scoped to edited paths, a narrow check could pin one spelling, and no comprehensive check covers arbitrary semantic drift.

Pass 3 then found the downstream copy saying "third or fourth correction" where the authoritative one says "fourth" — neutralising incident details had quietly loosened a threshold, giving two shipped copies two different decision rules. Neither branch found that by grep; both found it by reading the copies side by side.

Verification

Full battery green — shellcheck (6 files), hook tests, check-invariants + suite (123 assertions), check-version-bump + suite (36 assertions), claude plugin validate --strict; exit 0. Findings files and per-pass artifacts are in .context/codex-reviews/.

One caveat stated rather than glossed: while confirming the threshold parity I ran a regex that did not match the repo copy's line-wrapped phrasing, so it reported disagreement on text that was already correct. Parity was confirmed by reading both copies. A check that returns a wrong answer is the verification-masks-failure class in miniature, and it is recorded here rather than left to look like a passing check.

Summary by CodeRabbit

  • New Features
    • Updated the development workflow plugin to version 0.7.1.
    • Added a “standing lens” review prompt that checks which existing statements a change invalidates.
    • Added safeguards to prevent decision-rule rewrites from dropping required prior conditions.
  • Documentation
    • Clarified PR review bot verification semantics, including rate-limit outcomes and final-head validation expectations.
    • Updated prompt standards for citing authoritative sources and preventing endlessly corrected mechanism claims.
    • Expanded hardening taxonomy and the hardening log with new drift/rewrite failure modes.

Runs dev-workflow:harden-finding on the three classes that recurred through
the risk/security/validation profiles work. All three land as text; none
reaches a mechanical rung, and each ledger row says so rather than implying
otherwise.

unverified-enforcement-claim, 4th occurrence, rung P — prompt-standards
item 11 gains two rules: where the reader can reach the authoritative source,
cite it instead of restating it (with invariant 8's self-contained-template
exception named), and delete a mechanism claim that has needed a fourth
correction rather than refining it again. From a paragraph describing the
hook's path matcher that took four consecutive Gate-B corrections, each a
subtler version of the last, and closed only when the enumeration was deleted.

rewrite-drops-prior-condition, NEW class, rung 1 — a new AGENTS.md Don't:
never replace a decision procedure without listing its old conditions and
marking each kept, moved, or deliberately dropped. Ten instances in one
cycle, one of which briefly made an eligible profile sufficient for a Gate-B
skip: a gate-off path invented by the change that exists to close one.

docs-drift, 4th occurrence with a new mechanism, rung P — a standing lens on
every Gate-B call in both §5 copies: "which existing statements does this
diff falsify?" It found a shipped command that would have let a one-line fix
skip Gate B, plus two docs teaching a rule the same change had narrowed.

Two escalations deliberately refused, with the reasoning in the rows: both
lineages' latest entries are rung-2 checks guarding one spelling each
(Target-model lines; prose count claims), and both new defects fall outside
those spellings — the over-escalation those rows warn about by name.

Gate B: 7 findings at pass 1, then 1, 1, and clean on both branches at
pass 4. Three of those findings were this change committing the classes it
hardens — the item-11 fix reaching only the repo copy, the new rule
contradicting invariant 8, and the lens claiming no check could reach the
class. Verification: full battery green — shellcheck (6 files), hook tests,
check-invariants + suite (123 assertions), check-version-bump + suite
(36 assertions), claude plugin validate --strict; exit 0.
@cursor

cursor Bot commented Jul 27, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 026ccaf0-1c1d-4d08-a840-07de812b711c

📥 Commits

Reviewing files that changed from the base of the PR and between a96203b and 85c5ce5.

📒 Files selected for processing (1)
  • docs/hardening-taxonomy.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/hardening-taxonomy.md

📝 Walkthrough

Walkthrough

The changes add Gate-B review lenses and prompt-quality rules, document new hardening categories and incidents, clarify CodeRabbit completion verification, and release the dev-workflow plugin as version 0.7.1.

Changes

Gate-B hardening

Layer / File(s) Summary
Gate-B prompt guidance
AGENTS.md, CLAUDE.md, docs/prompt-standards.md, plugins/dev-workflow/commands/workflow-init.md
Adds guidance to track prior decision conditions, identify falsified statements, cite authoritative sources, and remove repeatedly corrected mechanism claims.
Hardening taxonomy and ledger
docs/hardening-taxonomy.md, docs/hardening-log.md
Defines and records rewrite-drops-prior-condition, alongside new enforcement-claim and documentation-drift occurrences.
Review verification documentation and release metadata
docs/pr-review-bots.md, plugins/dev-workflow/.claude-plugin/plugin.json, plugins/dev-workflow/CHANGELOG.md
Clarifies status-check versus final-head verification and records the 0.7.1 plugin release.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit reviews by moonlit light,
Tracking old rules through the night.
Gate-B lenses softly glow,
Lost conditions now must show.
“Hop to 0.7.1!” we sing.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: hardening three profile-cycle classes in this documentation-focused PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 27, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds prose-based hardening guidance for three recurring documentation and review-process failure classes.

  • Adds a Gate-B lens for identifying existing statements invalidated by a change, in both the repository instructions and downstream scaffold.
  • Adds guidance and taxonomy coverage for rewrites that accidentally drop prior conditions.
  • Sharpens prompt-standard item 11 to prefer authoritative citations and delete repeatedly corrected mechanism claims.
  • Records the hardening decisions, updates the changelog, and bumps the plugin version to 0.7.1.

Confidence Score: 5/5

The PR appears safe to merge, with the repository and downstream prompt copies preserving the intended conditions while clearly stating that the new safeguards are prose-based.

The changed guidance is reachable in its intended repository and scaffolded contexts, the authoritative and downstream-neutral copies retain the same operative exception and fourth-correction threshold, and the taxonomy, ledger, changelog, and version changes remain consistent with their consumers.

Important Files Changed

Filename Overview
AGENTS.md Adds a prose rule requiring rewrites of decision procedures to account explicitly for every prior condition.
CLAUDE.md Adds the repository-facing Gate-B lens for finding statements made stale by changes elsewhere.
docs/prompt-standards.md Sharpens item 11 with authoritative-source citation guidance, a self-contained-template exception, and a fourth-correction deletion threshold.
plugins/dev-workflow/commands/workflow-init.md Adds downstream-neutral scaffolded copies of the Gate-B lens and prompt-standard guidance.
docs/hardening-taxonomy.md Defines rewrite-drops-prior-condition and distinguishes it from cross-artifact docs drift.
docs/hardening-log.md Records three hardening outcomes with their recurrence arithmetic, selected rungs, and mechanical limitations.
plugins/dev-workflow/.claude-plugin/plugin.json Bumps the plugin version from 0.7.0 to 0.7.1.
plugins/dev-workflow/CHANGELOG.md Documents the new Gate-B docs-drift lens and its instruction-backed limitations.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Repository guidance] --> B[CLAUDE.md Gate-B lens]
  A --> C[Prompt standards item 11]
  A --> D[AGENTS.md rewrite rule]
  B --> E[workflow-init inline templates]
  C --> E
  E --> F[Downstream project guidance]
  D --> G[Hardening taxonomy and ledger]
Loading

Reviews (1): Last reviewed commit: "harden: three classes from the profiles ..." | Re-trigger Greptile

…ot a hazard

Fourth occurrence (#12, #13, #15, #16 — the last observed while writing this
row): the status check passes while the comment reads "Review rate limited"
and the live head has no review record. The row now says never merge on the
check alone; the review count is the arbiter, and the verification command
runs on every merge rather than when something looks off.

Docs-only (docs/**.md), so Gate B is N/A per CLAUDE.md §5's prose exemption.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/hardening-taxonomy.md`:
- Around line 75-78: Update the rewrite-drops-prior-condition definition in the
taxonomy entry to change “one the old prose carried” to “one of the conditions
the old prose carried,” preserving the surrounding wording and aliases.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e39a751d-b0a1-4e44-92b1-a711945d8103

📥 Commits

Reviewing files that changed from the base of the PR and between 27d019b and a96203b.

📒 Files selected for processing (9)
  • AGENTS.md
  • CLAUDE.md
  • docs/hardening-log.md
  • docs/hardening-taxonomy.md
  • docs/pr-review-bots.md
  • docs/prompt-standards.md
  • plugins/dev-workflow/.claude-plugin/plugin.json
  • plugins/dev-workflow/CHANGELOG.md
  • plugins/dev-workflow/commands/workflow-init.md

Comment thread docs/hardening-taxonomy.md
PR #16 review finding: "one the old prose carried" was ambiguous; it now
reads "one of the conditions the old prose carried".

Docs-only (docs/**.md), so Gate B is N/A per CLAUDE.md §5's prose exemption.
Validated directly rather than by a finding-triage subagent — the PR edits
instruction-bearing paths, which the command's step-0 precheck routes to
manual validation.
dsnger added a commit that referenced this pull request Jul 27, 2026
Observed on #16 within one PR: head c6c1850 had the message and count 0
(unreviewed); head 85c5ce5 had the same message and count 1 (reviewed). So
the message is not the tell — the count is the only arbiter, and it must be
re-run per head, since every push moves the target.

Docs-only (docs/**.md), so Gate B is N/A per CLAUDE.md §5's prose exemption.
@dsnger
dsnger force-pushed the harden-profiles-cycle-classes branch from de04c8a to 85c5ce5 Compare July 27, 2026 12:09
@dsnger
dsnger merged commit 854868d into main Jul 27, 2026
3 checks passed
@dsnger
dsnger deleted the harden-profiles-cycle-classes branch July 27, 2026 12:12
dsnger added a commit that referenced this pull request Jul 27, 2026
Docs-only, two files, no plugin path — no version bump.

CodeRabbit leaves Wait for after five consecutive unreviewed heads (#12, #13,
#15, #16, #17 — the last with zero review records on the PR) followed by a
genuine review on #18. Real findings source, unpredictable delivery, and a
completion signal that fires regardless of whether a review happened: the
opportunistic category by this file's own definition. Wait for is now empty.

Row additions: the status check goes green whether or not a review happened,
and `@coderabbitai review` is a no-op while automatic reviews are active
(CodeRabbit's own message on #17), which retroactively explains #14's
"re-trigger produced nothing". Plan corrected to Free; "Pro Plus" was observed
on PR #1 only.

The count rule's two facts separated: the per-head count remains the arbiter of
whether a head was reviewed, for any bot; the recorded-human-decision
requirement binds only bots under Wait for, and is dormant while that list is
empty. Every head reaching a PR has already passed Gate B, so a quiet
supplementary reviewer needs no exception.

MANIFEST.md: the bare `CLAUDE.md` row resolved to the repo root and produced a
false Major on #18. Qualified to source-files/CLAUDE.md, with the three files
distinguished, and root §6 (context canary) recorded as deliberately outside
the §1–§5 template range and never to be synced into the scaffolded template.

Pre-merge diagnostic: per-head count 1 on head 2634bf2 — reviewed. One Minor
finding (drop or explicitly optionalize the re-trigger step) collected, not
actioned, per §5's Minor/Nit rule.

Gate B: N/A — every path is explanatory documentation per §5's prose rule.
Battery green at each commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant