Skip to content

Add a context canary to the root CLAUDE.md - #18

Merged
dsnger merged 1 commit into
mainfrom
context-canary
Jul 27, 2026
Merged

Add a context canary to the root CLAUDE.md#18
dsnger merged 1 commit into
mainfrom
context-canary

Conversation

@dsnger

@dsnger dsnger commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Adds §6 to the repo-root CLAUDE.md: begin every conversational response by addressing the user as "Daniel."

Why it's there, stated in the rule itself: it's a context canary. The guidelines only bind while the file is in context, and nothing signals when it drops out. A per-response marker makes that visible — if the address disappears, the user reloads instead of discovering the loss through work that quietly stopped following §1–§5.

Scope is explicit and narrow: conversational responses only — never file contents, commit messages, code, or gate artifacts. §5's findings file admits no line that isn't a finding line or the terminator, and its reply is one line per branch; a greeting there is a malformed pass. The rule says so, so it can't be read as contradicting the protocol it sits beside.

Blast radius: root CLAUDE.md only — 14 lines added, one file. AGENTS.md untouched, nothing under plugins/, so no version bump and no propagation into /workflow-init's templates.

Gate B: skipped as behaviourally trivial (unprofiled, judgement call, authorized in the request); reason and battery result recorded in the commit body. Battery green — shellcheck (6 files), hook tests, invariant tests + check (123 assertions), version-bump tests + check (36 assertions), claude plugin validate . --strict.

Summary by CodeRabbit

  • Documentation
    • Added guidance for conversational responses, including a required user greeting.
    • Clarified that the greeting should not appear in files, code, commit messages, or other project artifacts.

Address the user as "Daniel" at the start of every conversational response,
so a missing address signals that CLAUDE.md has fallen out of context.

Scoped to conversational responses only: never in file contents, commit
messages, code, or gate artifacts — §5's findings file admits no line that
is not a finding or the terminator, so a canary reaching into artifacts
would produce malformed passes.

Root CLAUDE.md only. AGENTS.md is untouched and nothing under plugins/
changes, so no version bump and no propagation into scaffolded templates.

Gate B: skipped — behaviourally trivial. One prose subsection in this
repo's own discipline file; it changes no hook, checker, skill, command or
template, and ships nothing. Unprofiled story (none cited), judgement call
per §5, authorized by the user in the request.
Battery green: shellcheck (6 files), hook tests, invariant tests + check
(123 assertions), version-bump tests + check (36 assertions), and
`claude plugin validate . --strict` — all pass.
@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

📝 Walkthrough

Walkthrough

Daniel, CLAUDE.md adds a “Context Canary” section requiring conversational responses to address Daniel while excluding file contents, commits, code, and gate artifacts.

Changes

Context Canary Instruction

Layer / File(s) Summary
Context Canary rule
CLAUDE.md
Adds the conversational addressing requirement and explicitly excludes files, commit messages, code, and Codex gate artifacts, including the §5 findings-file format.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

I’m a rabbit with a canary cue,
“Daniel” starts each chat anew.
Files stay clean, commits stay bright,
Code and gates remain just right.
Hop, hop—context held in sight!

🚥 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 accurately summarizes the main change: adding a context canary to the repository-root CLAUDE.md.
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

Adds a context-canary section to the root CLAUDE.md.

  • Requires conversational responses to begin by addressing the user as “Daniel.”
  • Explains how the marker reveals loss of repository instructions from context.
  • Explicitly excludes file contents, code, commit messages, and gate artifacts.

Confidence Score: 5/5

The PR appears safe to merge with no actionable issues identified.

The documentation-only change clearly limits the canary to conversational responses and explicitly preserves the stricter formatting requirements for files, commits, code, and gate artifacts.

Important Files Changed

Filename Overview
CLAUDE.md Adds a narrowly scoped conversational context canary without changing runtime code or artifact protocols.

Reviews (1): Last reviewed commit: "Add a context canary to the root CLAUDE...." | Re-trigger Greptile

@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: 3

🤖 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 `@CLAUDE.md`:
- Around line 404-417: Remove the hardcoded “Daniel” requirement from the
reusable CLAUDE.md template, or replace it with a project-configurable user
name. Update the “Context Canary” guidance and its related explanation so
initialized projects do not address every user as Daniel, while preserving the
conversational-only scope.
- Around line 404-417: Run the mandatory Gate B review for the CLAUDE.md change,
treating it as product code despite its Markdown format. Remove or correct the
PR objective’s rationale claiming Gate B was skipped, and ensure the review
follows the required Gate B procedure.
- Around line 413-416: Update the canary scope statement in CLAUDE.md to
explicitly exclude machine-readable review artifacts alongside gate artifacts,
ensuring review output is never prefixed or modified and its required markers
and parsing format remain unchanged.
🪄 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: 23484ffa-79cc-4614-8d8c-03e9a4c577f8

📥 Commits

Reviewing files that changed from the base of the PR and between 854868d and 76b215d.

📒 Files selected for processing (1)
  • CLAUDE.md

Comment thread CLAUDE.md
Comment on lines +404 to +417
## 6. Context Canary

Begin every response to the user by addressing him as "Daniel."

**Why:** it is a context canary. These guidelines are only in force while this file is in
context, and nothing signals when it falls out. The address is a per-response marker: if
it disappears, CLAUDE.md is gone from context and the user knows to reload rather than
discovering it through work that quietly stopped following §1–§5.

**Scope: conversational responses only.** Never in file contents, commit messages, code,
or gate artifacts. §5's findings file admits no line that is not a finding line or the
terminator, and its reply is exactly one line per branch — a greeting there is a malformed
pass, so a canary that reached into artifacts would break the protocol it sits beside.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not hardcode Daniel in a reusable CLAUDE.md template.

MANIFEST.md and plugins/dev-workflow/commands/workflow-init.md identify this file as scaffolded project content, so initialized projects may apply this rule to users who are not Daniel. Make the name project-configurable or keep this canary out of the shared template.

🤖 Prompt for 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.

In `@CLAUDE.md` around lines 404 - 417, Remove the hardcoded “Daniel” requirement
from the reusable CLAUDE.md template, or replace it with a project-configurable
user name. Update the “Context Canary” guidance and its related explanation so
initialized projects do not address every user as Daniel, while preserving the
conversational-only scope.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Run the mandatory Gate B review for this change.

The supplied guidelines classify CLAUDE.md as product code requiring full Gate B review even when it is Markdown. The PR objective’s “Gate B was skipped” rationale contradicts that requirement.

🤖 Prompt for 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.

In `@CLAUDE.md` around lines 404 - 417, Run the mandatory Gate B review for the
CLAUDE.md change, treating it as product code despite its Markdown format.
Remove or correct the PR objective’s rationale claiming Gate B was skipped, and
ensure the review follows the required Gate B procedure.

Source: Coding guidelines

Comment thread CLAUDE.md
Comment on lines +413 to +416
**Scope: conversational responses only.** Never in file contents, commit messages, code,
or gate artifacts. §5's findings file admits no line that is not a finding line or the
terminator, and its reply is exactly one line per branch — a greeting there is a malformed
pass, so a canary that reached into artifacts would break the protocol it sits beside.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Exclude review artifacts from the canary scope.

The scope excludes gate artifacts but not machine-readable review artifacts. Prefixing review output with “Daniel” can violate the review protocol’s required markers and parsing format. Add review artifacts explicitly to the exclusions.

🤖 Prompt for 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.

In `@CLAUDE.md` around lines 413 - 416, Update the canary scope statement in
CLAUDE.md to explicitly exclude machine-readable review artifacts alongside gate
artifacts, ensuring review output is never prefixed or modified and its required
markers and parsing format remain unchanged.

Source: Learnings

@dsnger
dsnger merged commit 4ce6148 into main Jul 27, 2026
3 checks passed
@dsnger
dsnger deleted the context-canary branch July 27, 2026 16:34
@dsnger

dsnger commented Jul 27, 2026

Copy link
Copy Markdown
Owner Author

Dispositions for the three CodeRabbit findings (head 76b215d, per-head count 1 — genuinely reviewed).

1. "Do not hardcode Daniel in a reusable CLAUDE.md template" — dismissed for this PR, but the underlying hazard is real and is being surfaced separately.

The claim rests on MANIFEST.md:14 labelling CLAUDE.md a "/workflow-init template (project file)". That label is misleading: invariant 8 keeps /workflow-init's templates inline in the command body, so the scaffolded CLAUDE.md is a separate copy living inside plugins/dev-workflow/commands/workflow-init.md, not a read of this file. This diff touched one file and did not change that copy, and §2.1 of the command scaffolds §1–§5 by name — §6 falls outside that range, so nothing propagates today. Verified, not assumed.

What is real: root and template are near-duplicates maintained by hand, and a future parity sync reading root as the source could carry §6 across. That is a drift risk in MANIFEST.md's wording and the sync practice, not a defect in this change — and the request explicitly scoped templates out pending discussion.

2. "Run the mandatory Gate B review" — dismissed, with the rule quoted correctly.

CodeRabbit is right that §5 classifies CLAUDE.md as product, not prose ("Prompts are not prose: CLAUDE.md and AGENTS.md themselves … fire full Gate B"). But §5 also carries the triviality skip ("Skip ONLY trivial changes"), and for an unprofiled story that is a judgement call. Daniel made it explicitly in the request, and both the reason and the battery result are in the commit body, which is what §5 requires of a skip. The finding reads the classification rule without the skip provision that sits beside it.

3. "Exclude review artifacts from the canary scope" — dismissed as already covered.

The scope reads "never in file contents, commit messages, code, or gate artifacts". Review artifacts under .context/codex-reviews/ are file contents; they are covered by the first term and named again by the fourth. Adding a fifth synonym would not change what the rule permits.

dsnger added a commit that referenced this pull request Jul 27, 2026
The count rule carried two facts fused into one sentence. They separate:

1. The per-head count is the arbiter of whether a head was reviewed —
   unchanged, and the diagnostic for any bot. Routing a bot opportunistically
   does not make its review record less readable or the answer less true.
2. "Merge only on an explicit recorded human decision" binds only bots under
   Wait for. An absent review from an opportunistic bot blocks nothing and
   needs no exception: every head reaching a PR has already passed Gate B,
   the workflow's actual cross-model review, and the PR bots are a
   supplementary third instance. Requiring a recorded exception whenever a
   supplementary reviewer stayed quiet would reimpose as ceremony the
   blocking that opportunistic routing removed.

The clause is dormant, not retired — Wait for is empty, so nothing triggers
it; promote a bot back and it reactivates unchanged for that bot. The #12#18
history and the #14 precedent stay as the record of when it was live: a real
requirement under the routing of its time.

Four sentences elsewhere attached a merge consequence to a `0` and are
corrected to state the routing dependency: the scope paragraph above the
completion-signal list, the "decides whether you may merge" bullet, "`0`
means do not merge", and the "run it on every merge" lead-in to the query.

Gate B: N/A — the only staged path is explanatory documentation
(docs/pr-review-bots.md) per §5's prose rule.
Battery green: shellcheck (6 files), hook tests, invariant tests + check
(123 assertions), version-bump tests + check (36 assertions),
`claude plugin validate . --strict`.
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