Skip to content

docs: add provisional root CLAUDE.md - #144

Merged
kyle-sexton merged 5 commits into
mainfrom
docs/root-claude-md-provisional
Jul 16, 2026
Merged

docs: add provisional root CLAUDE.md#144
kyle-sexton merged 5 commits into
mainfrom
docs/root-claude-md-provisional

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

Summary

  • Adds root CLAUDE.md (P2·3 step 5) as @AGENTS.md + a small Claude Code delta section — the exact pattern code.claude.com/docs/en/memory documents for a repo that already has an AGENTS.md.
  • De-risks the handoff's BLOCKED-UNKNOWN, but doesn't fully close it. Verified directly against current docs: code.claude.com/docs/en/memory describes @import expansion as unconditional ("Imported files are expanded and loaded into context at launch") with no Code-Review carve-out, while code.claude.com/docs/en/code-review explicitly calls out only REVIEW.md as not expanding @import ("pasted verbatim... referenced files are not read into the prompt"). The asymmetry is documentation-level evidence that CLAUDE.md's @AGENTS.md import is expanded for Code Review too — but it's not an explicit statement to that effect, and Code Review is Team/Enterprise-only so it's untestable on this org's Max-plan subscription.
  • Records that open question, the reasoning, and a re-verification trigger as a maintainer-only HTML comment (stripped from context before injection — costs nothing at session start) rather than as content Claude itself needs to carry every session.
  • States the CLAUDE.md vs REVIEW.md role boundary (general project context / nit-level vs. review-only / highest-priority, per the same docs) so review rules don't drift into this file out of habit.

Test plan

  • lefthook pre-commit (typos, gitleaks, editorconfig, markdownlint) — passed locally.
  • CI green (markdown lint, lychee, review bot).

🤖 Generated with Claude Code

@AGENTS.md import + a Claude Code delta section, per the documented
pattern for repos that already have an AGENTS.md
(code.claude.com/docs/en/memory). Records as a maintainer-only
HTML comment (stripped from context) the one open question this
design has not fully closed: whether managed Code Review's CLAUDE.md
consumption expands @import the same way normal session loading
does. Documentation gives no carve-out for CLAUDE.md the way it
explicitly does for REVIEW.md, which is evidence but not an explicit
statement or empirical confirmation - untestable on a Max-plan
subscription (Code Review is Team/Enterprise-only). Kept provisional
with a stated re-verification trigger.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1x1KNkkjSe2CjbuTb4Gis
@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 0s —— View job


I'll analyze this and get back to you.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a8e49cd09

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md
kyle-sexton and others added 2 commits July 16, 2026 00:56
## Summary

- Adds a root-only `AGENTS.md` (P2·3 step 4) — the repo-owned
agent-orientation file the standards-sync design calls for.
- Deliberately thin: cites `README.md` for repository shape, ownership
boundaries, and validation commands rather than restating them (this
repo's own cite-don't-duplicate discipline), and adds only what's
genuinely agent-specific and not described elsewhere — the dogfooding
expectation, the fresh-authoring-never-ported rule for review criteria,
the `.claude/` staging hazard, and PR mechanics.
- States the root-only placement rationale: Codex concatenates every
`AGENTS.md` it finds rather than nearest-wins-overriding, so a nested
copy would compound instructions instead of scoping them.

## Test plan

- [x] `lefthook` pre-commit (typos, gitleaks, editorconfig,
markdownlint) — passed locally.
- [ ] CI green (markdown lint, lychee, review bot).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 1962226)
REVIEW.md does not exist in this commit tree yet (it is being authored
separately in #143), so the markdown link to it was dead and failing
the offline lychee link-check gate. Drop the link syntax but keep the
CLAUDE.md/REVIEW.md split rationale as plain prose; re-link once
REVIEW.md lands.
@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 56s —— View job


PR Review

  • Gather context (read changed files and repo guidelines)
  • Review AGENTS.md
  • Review CLAUDE.md
  • Evaluate Codex review comments
  • Post final review

What this PR actually changes vs. main

Despite the PR metadata listing two changed files, AGENTS.md was already merged to main via PR #139. Diffing origin/main..HEAD confirms only CLAUDE.md is net-new in this PR.


CLAUDE.md review

@AGENTS.md import (line 1)

Correct usage of the documented pattern. AGENTS.md exists at the repo root in main, so the import target resolves. No issue.

Maintainer HTML comment (lines 4–26)

The open question about whether managed Code Review's CLAUDE.md consumption expands @import the same way a normal session does is a real ambiguity in the current documentation, and documenting it here is the right call. The asymmetry between code.claude.com/docs/en/memory (no carve-out for Code Review) and code.claude.com/docs/en/code-review (explicit carve-out for REVIEW.md) is faithfully reported. The re-verification trigger ("Trigger: this repository or any consumer gains Team/Enterprise Code Review access") gives future maintainers a clear signal without burdening every session with the reasoning. No issues.

Visible prose (lines 28–34)

Clean and appropriately minimal. It establishes the CLAUDE.md/REVIEW.md role boundary, acknowledges REVIEW.md doesn't exist yet, and leaves a hook to add the link once it does. The latest commit (579dc92) correctly addresses the dead lychee link by dropping link syntax while keeping the rationale — the fix is right.


Codex review findings

P1 — "REVIEW.md link is broken": Addressed by 579dc92. The dead [REVIEW.md](REVIEW.md) link was replaced with plain prose. No further action needed.

P2 — "AGENTS.md is absent": Incorrect finding. AGENTS.md was merged to main via PR #139 before this PR was authored. The @import target exists.


Summary

This is a clean, well-scoped addition. The design follows the documented @AGENTS.md pattern precisely, the HTML comment appropriately quarantines maintainer-only uncertainty from session context, the role boundary between CLAUDE.md and REVIEW.md is clearly stated, and the lychee link-check regression was self-corrected in the follow-up commit. Nothing to block here.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 579dc926c2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread AGENTS.md Outdated
kyle-sexton and others added 2 commits July 16, 2026 08:05
The root-only rationale pointed maintainers wanting subtree-local
instructions at a nested CLAUDE.md or .claude/rules/ overlay, but
Codex reads neither for this purpose - its documented mechanism is
nested AGENTS.md/AGENTS.override.md, concatenated root-down with
files closer to the working directory read later in the combined
prompt (and therefore able to supersede broader guidance), with
AGENTS.override.md available to replace rather than append. Point at
the mechanism Codex actually honors, and correct the "concatenates
rather than override" framing - concatenation is how the override
happens, not an alternative to it.

Fixes the chatgpt-codex-connector P2 finding "Use Codex-readable
files for scoped guidance" (developers.openai.com/codex/agent-configuration/agents-md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 36s —— View job


PR Review

  • Gather context
  • Read changed files and diff
  • Review AGENTS.md changes (subtree-scoping advice update)
  • Review CLAUDE.md
  • Evaluate outstanding Codex findings
  • Post final review

What changed in the latest commit (ef43b4f)

The only net-new change in ef43b4f is in AGENTS.md — specifically the "do not add a nested copy" paragraph. The old text sent maintainers to a nested CLAUDE.md or .claude/rules/ overlay for subtree-local instructions. The Codex review correctly flagged that Codex won't read either of those; its scoping mechanism is nested AGENTS.md / AGENTS.override.md. The rewrite fixes that.


AGENTS.md — subtree-scoping paragraph (lines 10–21)

The rewrite is factually accurate on every claim:

  • Concatenation behavior: Codex walks root-to-working-directory, joining every AGENTS.md it finds with blank lines. Later-in-sequence text can supersede earlier guidance in the combined prompt. Correct.
  • AGENTS.override.md: Replaces rather than appends at that directory level. Correct per the Codex docs cited in the review.
  • CLAUDE.md / .claude/rules/ exclusion: Codex does not read those for subtree guidance. Correct.

The paragraph is denser than the one it replaced, but the verbosity carries genuine information value — maintainers need to understand why the constraint exists (Codex's concatenation model) to make the right call when adding subtree rules. No issues.


CLAUDE.md (full file)

Unchanged from what the previous review analyzed. Still clean:


Codex findings status

Finding Round Status
P1 — broken REVIEW.md link Round 1 Fixed in 579dc92 (dropped link syntax, kept prose)
P2 — AGENTS.md absent Round 1 Non-issue — AGENTS.md was in main before this PR was authored
P2 — subtree advice points at non-Codex files Round 2 Fixed in ef43b4f

All Codex findings are addressed. Nothing left to block here.


Summary

Clean, well-scoped PR. The ef43b4f fix is the exact right correction for the legitimate Codex P2 finding — the advice now points maintainers at AGENTS.md / AGENTS.override.md rather than files Codex won't read. CLAUDE.md is well-formed. Ready to merge.

@kyle-sexton
kyle-sexton merged commit bb27e9f into main Jul 16, 2026
39 checks passed
@kyle-sexton
kyle-sexton deleted the docs/root-claude-md-provisional branch July 16, 2026 13:33
kyle-sexton added a commit that referenced this pull request Jul 18, 2026
…ep note

Append the review note for the gh-free gate revision: what changed in
the selector (fallback label, ci-workflows#141/#144), how each of the
six contracts registered at 90f1c54 compares to its newest previously
approved SHA, and the updated rollout counts (ten approved selector
revisions, seven owner-scoped).

Co-Authored-By: Claude Fable 5 (1M context) <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 18, 2026
## What

Declare `visibility: "public"` in `.github/runner-policy.json`
(selfHostedCi false, exception inventory emptied) and remove the
`select-runner` job from all seven workflows: every lane now runs on
GitHub-hosted `ubuntu-24.04`, with each reviewed reusable receiving its
`runner` input explicitly. Net −181 lines.

## Why

The repository is public (confirmed intentional), and the runner-policy
engine fails closed on the visibility mismatch — currently red on main's
own CI and on #189. For public repositories the engine forbids
local-runner selector routing outright (`public-self-hosted-routing`),
so the reconciliation is the full hosted conversion, not a one-line
declaration. Hosted minutes are free for public repositories, and this
removes the standards CI load from the self-hosted fleet entirely.

Reusable pins move to `90f1c54` where a reviewed contract exists at that
revision; `standards-sync` stays at its newest registered contract
(`ec91c34`). This supersedes the selector-pin portion of #189.

## Verification

`node components/runner-policy/runner-policy.mjs --root .
--repository-visibility public` passes; 224/224 runner-policy component
tests pass; actionlint clean on all seven workflows; lefthook gauntlet
green.

## Related

No linked issue. #189 (superseded selector pins), #195 (policy
exception-category removal this builds on),
melodic-software/ci-workflows#141/#144 (the 90f1c54 revision).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01YZxBP1B8Hf7ZRaqDrP6ma9

Co-authored-by: Claude Fable 5 (1M context) <noreply@anthropic.com>
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