Skip to content

chore(agents): retire CLAUDE.md — AGENTS.md is the sole rulebook (#286) - #727

Merged
github-actions[bot] merged 3 commits into
mainfrom
feat/org-readme-agents
Sep 28, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
feat/org-readme-agents

Conversation

@aitrawog

@aitrawog aitrawog commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Retire the CLAUDE.md surface in the charly repo so AGENTS.md is the sole,
harness-neutral rulebook (umbrella campaign #286, charly leg), and repair the
non-runtime scripts/validate-agent-config.py so it validates that single
rulebook.

This head resolves the pr-validator BLOCK from the previous head 100f8a5f
(which itself resolved the blocks on d2830c7e).

Content of the change:

  • git rm CLAUDE.md (the repo-root symlink to AGENTS.md).
  • git mv charly/CLAUDE.md charly/AGENTS.md and repointed the nested signpost
    at the repo-root AGENTS.md.
  • Swept every live CLAUDE.md token to AGENTS.md, except historical
    CHANGELOG/** and the CLAUDE_CODE_* env-var identifiers (left verbatim):
    AGENTS.md (dispatcher rows + removed the "documented surfaces" symlink
    bullet), README.md, VISION.md (kept — reference rename only),
    PROGRAM/nfpm-packaging-north-star.md, PROGRAM/pi-integration.md,
    .pi/README.md, .claude/workflows/{audit-deploy-configs,triage-check-failure}.js,
    charly/.golangci.yml, charly/import_purity_test.go, charly/main.go,
    charly/no_kind_switch_in_kernel_test.go, charly/provider_bench_test.go.
    VISION/LIBERATION/GRIEVANCES meaning is unchanged beyond the reference rename.
  • Rewrote scripts/validate-agent-config.py to validate ONLY the single
    AGENTS.md rulebook: dropped adapter_path/adapter and the
    adapter-vs-generic dispatcher comparison; made rulebook_contract_errors
    single-document; the core-Go-gate loop validates only AGENTS.md; removed the
    orphaned plugins gitlink/developer-profile checks and the plugins/**
    markdown/attribution scans (the plugins subtree was removed in feat(marketplace): de-submodule plugins — standalone marketplace + native harness loading #382).

Validator BLOCK resolutions

  • d2830c7e verdict, block 1 (A3/A2 class/tier) — reclassified honestly:
    the diff is a documentation sweep + comment-only Go/JS/YAML edits + a
    substantive non-runtime rewrite of scripts/validate-agent-config.py, so the
    class is code+config+docs and the tier is analysed on a live system.
    documentation reviewed is forbidden once code/config changed.
  • d2830c7e verdict, block 2 (R5/R1 stale docstring) — the module docstring
    no longer claims "the generated per-harness developer profiles" (this PR
    deletes validate_developer_profiles and its call).
  • d2830c7e verdict, block 3 (R3/R4 marker narrowing) — the forbidden list
    now holds only harness-specific CONFIG identifiers
    (CODEX_HOME, .codex, ~/.kimi-code). Harness names (Claude Code,
    Codex, Kimi Code) are legitimate in the neutral rulebook's R0 prose,
    proven by the pasted grep. This is a class rule (names allowed, config
    identifiers forbidden), not ad-hoc deletion.
  • 100f8a5f verdict, block 1 (R5/B14(a) orphaned SKILL_REF) — the
    module-level SKILL_REF regex is deleted; the regex is now scoped inside
    dispatcher(), its only production consumer (the adapter/generic comparison
    that was its other caller is gone). The now-invalid SKILL_REF self-test
    assertions are removed, the meta-test comment is updated, and the unused
    json import is dropped. An AST scan confirms no remaining orphaned
    module-level defs or imports.

How tested

Final tree = current origin/main 1b3edd06 + this branch, HEAD d1a1b8d4.
git fetch origin showed origin/main was already the rebase base, so no
update-branch was needed. Every non-runtime standard on the final committed
tree:

$ python3 scripts/validate-agent-config.py --self-test
agent configuration validator self-test passed
exit=0

$ python3 scripts/validate-agent-config.py
validated 82 R0 dispatcher rows, shared policy contract, and attribution templates
exit=0

$ git grep -n CLAUDE -- ':!CHANGELOG'
.claude/settings.json:33:    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
PROGRAM/pi-integration.md:37:| Agent teams | `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` has built-in orchestrator/teammate | pi-subagents package provides equivalent | ✅ Equivalent via pi-subagents |
exit=0   # ONLY the allowed CLAUDE_CODE_* env-var identifiers remain

$ git grep -nE 'Codex|Claude Code|Kimi Code' -- AGENTS.md
AGENTS.md:21:repo (Claude Code's `charly-plugins` marketplace, pi's `git:` package, Kimi's
AGENTS.md:22:plugin, Codex's catalog); otherwise read the corresponding
exit=0   # harness names legitimately present (R0 loading prose); "Kimi Code" absent

$ git grep -nE 'CODEX_HOME|\.codex|~/\.kimi-code' -- AGENTS.md
exit=1   # harness-config identifiers absent => the config-only forbidden list passes

$ grep -n 'SKILL_REF' scripts/validate-agent-config.py
exit=1   # no matches: the orphaned module-level symbol is gone

# AST orphan scan over scripts/validate-agent-config.py
$ python3 - <<'PY'
import ast, pathlib
tree = ast.parse(pathlib.Path("scripts/validate-agent-config.py").read_text())
defined = {t.id: n.lineno for n in tree.body if isinstance(n, ast.Assign)
           for t in n.targets if isinstance(t, ast.Name)}
defined.update({n.name: n.lineno for n in tree.body if isinstance(n, ast.FunctionDef)})
used = {n.id for n in ast.walk(tree) if isinstance(n, ast.Name)}
print("unreferenced module-level defs:", [n for n in defined if n not in used])
imports = [(a.asname or a.name.split('.')[0], n.lineno)
           for n in tree.body if isinstance(n, ast.Import) for a in n.names]
imports += [(a.asname or a.name, n.lineno)
            for n in tree.body if isinstance(n, ast.ImportFrom) for a in n.names]
print("unreferenced imports:", [n for n, _ in imports if n not in used and n != 'annotations'])
PY
unreferenced module-level defs: []
unreferenced imports: []

$ gofmt -l charly/main.go charly/import_purity_test.go charly/no_kind_switch_in_kernel_test.go charly/provider_bench_test.go
exit=0   # empty output

$ go -C charly build ./...
exit=0   # comment-only Go edits do not break compilation

$ git status --short
# empty (clean worktree)

$ git diff --stat origin/main..HEAD
 .claude/workflows/audit-deploy-configs.js |   2 +-
 .claude/workflows/triage-check-failure.js |   2 +-
 .pi/README.md                             |   4 +-
 AGENTS.md                                 |   6 +-
 CLAUDE.md                                 |   1 -
 PROGRAM/nfpm-packaging-north-star.md      |   4 +-
 PROGRAM/pi-integration.md                 |   6 +-
 README.md                                 |   5 +-
 VISION.md                                 |  26 +--
 charly/.golangci.yml                      |   2 +-
 charly/{CLAUDE.md => AGENTS.md}           |   2 +-
 charly/import_purity_test.go              |   2 +-
 charly/main.go                            |   4 +-
 charly/no_kind_switch_in_kernel_test.go   |   4 +-
 charly/provider_bench_test.go             |   2 +-
 scripts/validate-agent-config.py          | 318 ++++--------------------------
 16 files changed, 75 insertions(+), 315 deletions(-)

Rulebook compliance

Umbrella rules 1–11:

  1. Never edit inside a submodule — HOW: all edits are in this session's
    worktree of the charly repo and land as a PR to the owning repo; the
    umbrella's tracked charly submodule checkout is untouched.
  2. Git op rule (git -C <absolute-path>) — HOW: every git action ran via
    git -C /…/.worktrees/org-readme-agents/charly; no unrooted git.
  3. No nested go.work — N/A: no go.work added or changed.
  4. Session roots at the umbrella; edits in a session worktree — HOW: work in
    the existing .worktrees/org-readme-agents/charly worktree on
    feat/org-readme-agents.
  5. Pin discipline — N/A: no gitlink or pin changed; only repo-internal files.
  6. Policy B (distro- == charly gitlinks)* — N/A: no distro-*/gitlink change.
  7. Read the subrepo rulebook first — HOW: charly/AGENTS.md (R0–R10) and
    /charly-internals:git-workflow were read before any action.
  8. Harness config: shared core plus deliberate forks — N/A for parity: no
    byte-identical gate script or settings fork touched; the
    .claude/workflows/*.js and .pi/README.md edits are prose-reference
    renames only.
  9. Session-scoped ownership — HOW: only this session's branch/worktree were
    touched; no other session's files, branch, or worktree.
  10. Before ANY update push, read live state AND write the body — HOW: read
    PR chore(agents): retire CLAUDE.md — AGENTS.md is the sole rulebook (#286) #727 comments/reviews and issue chore(spec): pin spec at the empty-lock-file fix, carrying three cutovers #286 live state, then rewrote this body
    for head d1a1b8d4 before the push.
  11. Todo ledger & interruption safety — N/A: single coherent change carried
    through; no in-flight item dropped on interruption (the fixes continue the
    same branch/PR).

charly R1–R10:

  • R1 — RCA every anomaly. HOW: each validator block was root-caused (tier
    mismatch; stale docstring from the deleted function; class-inconsistent marker
    list; the SKILL_REF symbol's remaining consumer is dispatcher()) and fixed
    at the root — no flake/retry classification.
  • R2 — Finish the whole cutover. HOW: every live CLAUDE.md reference was
    swept in this change, and the validator's own orphaned plugins refs (from
    feat(marketplace): de-submodule plugins — standalone marketplace + native harness loading #382), its stale docstring, and its orphaned SKILL_REF/json were swept in
    the same change.
  • R3 — No duplication. HOW: one canonical rulebook (AGENTS.md); the
    validator's now-dead plugins/developer-profile machinery is deleted, and the
    skill-ref regex lives in its single consumer dispatcher().
  • R4 — No workarounds. HOW: no sleeps/retries/magic; the marker list is
    narrowed by a stated class rule (config identifiers forbidden, harness names
    allowed) proven by git grep, not by deleting the failing strings.
  • R4a — Fix the product first; docs never route around a defect. N/A: no
    code-vs-doc contradiction; the prose was updated to the new single-rulebook
    reality, not to hide a defect.
  • R5 — Delete legacy completely. HOW: git grep CLAUDE returns only the
    allowed env-var identifiers; CLAUDE.md, its nested twin, the stale validator
    docstring/marker entries, and the orphaned SKILL_REF/json are gone in the
    same change; an AST scan confirms no orphans remain.
  • R6 — Preserve user work and Git safety. HOW: git status checked; no
    reset/force-push/hook-bypass; append-only commits; no direct push to main.
  • R7 — Prove behavior, not compilation. HOW: the changed non-runtime path
    (the validator) was executed live with retained output (--self-test + the
    full run), plus gofmt/go build.
  • R7a — Live or skip, never fake a live service. N/A: this change crosses no
    live-service boundary; no mock/stub/fake was introduced — the script ran
    against the real repository.
  • R8 — Preserve emitted artifacts. HOW: the changed script is the
    standards/emitted-artifact checker; its output shape is unchanged and no
    emitted artifact was altered.
  • R9 — Binary equals source. N/A: no charly binary was built, stamped, or
    installed for this docs/tooling change.
  • R10 — Fresh disposable proof. HOW: class = docs/comment-only +
    non-runtime tooling, so no runtime bed applies; every non-runtime standard
    (validator self-test + full run, git grep sweep, AST orphan scan, gofmt,
    go build) ran on the final committed tree (d1a1b8d4), zero warnings.

Change classification

  • Class: code + config + documentation — one PR that sweeps CLAUDE.md
    across prose/comment surfaces and rewrites the non-runtime
    scripts/validate-agent-config.py.
  • Gate: non-runtime standards — validator self-test + full run,
    git grep sweep (CLAUDE + marker names), AST orphan scan, gofmt -l empty,
    go build ./... clean. No runtime bed applies.
  • Attribution tier: analysed on a live system — the changed validator path
    ran live with retained output and go build is clean; documentation reviewed
    is forbidden because the diff changes a script, and there is no fresh-rebuild
    runtime target to earn fully tested and validated.
  • Note on history: the first commit d2830c7e carries the superseded
    documentation reviewed trailer; it cannot be amended because the branch is
    already pushed and force-push is forbidden. This branch's later commits carry
    the corrected tier, and the validator composes the squash-merge trailer from
    this body.

Refs #286

Agent: org-readme-agents · session ses_org-readme-agents
Assisted-by: opencode deepseek-v4.1-flash (analysed on a live system)

Retire the CLAUDE.md surface across the charly repo: AGENTS.md is now the
single, harness-neutral rulebook.

- git rm the repo-root CLAUDE.md symlink.
- git mv charly/CLAUDE.md -> charly/AGENTS.md and repoint the nested signpost
  at the repo-root AGENTS.md.
- Sweep every live CLAUDE.md reference to AGENTS.md: AGENTS.md (dispatcher rows
  + the documented-surfaces bullet), README.md, VISION.md (kept; reference
  rename only), PROGRAM/nfpm-packaging-north-star.md, PROGRAM/pi-integration.md,
  .pi/README.md, .claude/workflows/{audit-deploy-configs,triage-check-failure}.js,
  charly/.golangci.yml, charly/import_purity_test.go, charly/main.go,
  charly/no_kind_switch_in_kernel_test.go, charly/provider_bench_test.go.
- Rewrite scripts/validate-agent-config.py to validate ONLY the single
  AGENTS.md rulebook: drop adapter_path/adapter and the adapter-vs-generic
  dispatcher comparison; make rulebook_contract_errors single-document;
  validate only AGENTS.md in the core Go gate.
- Complete the validator's de-submodule adaptation: the plugins subtree was
  removed in #382, so drop the orphaned plugins gitlink/developer-profile
  checks and the plugins markdown/attribution scans that could no longer
  resolve. Narrow FORBIDDEN_GENERIC_RULEBOOK_MARKERS to harness-config
  identifiers (CODEX_HOME/.codex/Kimi Code/~/.kimi-code) so the sole rulebook
  may name its consumer harnesses in R0 prose, as it does.

Refs #286

Assisted-by: opencode deepseek-v4.1-flash (documentation reviewed)
@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: d2830c7ef89d2b96e4ad95d8cedb728559cfe035 (branch: feat/org-readme-agents)

Change class: documentation sweep + comment-only Go/JS/YAML edits, plus a substantive non-comment rewrite of the non-runtime scripts/validate-agent-config.py — so not "documentation-only" as claimed.

Comment thread: 0 comments — no comment dispositions apply.

Blocks

  1. A3/A2 — change-class/tier mismatch. The body classifies the diff as documentation-only and sets the tier documentation reviewed, but scripts/validate-agent-config.py is not documentation: it removes plugins_gitlink_commit / plugins_setup_prerequisite / validate_developer_profiles, changes rulebook_contract_errors's signature, rewrites main(), and drops the SKILL_REF cross-reference loop (diff +32/-259). A3 allows documentation reviewed only when the whole diff is *.md / comment-only / an all-doc submodule bump and forbids it when code or config also changed. Fix: reclassify (the script is code/config tooling) and set a tier the pasted proof actually supports, or split the validator repair into its own change with its own evidence.

  2. R5/R1 — outdated claim not swept in the same commit. scripts/validate-agent-config.py:2-3 now reads:

    """Check the single canonical agent rulebook and the generated per-harness
    developer profiles."""
    

    but this same PR deletes validate_developer_profiles (and its main() call), so the script no longer checks developer profiles. The false present-tense claim was left in place — an R5 sweep miss and an R1 doc/code divergence. Fix: drop "and the generated per-harness developer profiles", or restore the check.

  3. R3/R4 + B14(d) — ad-hoc guardrail narrowing with an unverified justification. FORBIDDEN_GENERIC_RULEBOOK_MARKERS is weakened by deleting the harness names "Codex" and "Claude Code", while keeping the equally-a-harness-name "Kimi Code". The stated rationale ("narrowed the list to harness-config identifiers") does not match the result — a harness name was kept — so the narrowing reads as "remove exactly the entries that were failing", not a principled fix. The body asserts AGENTS.md "legitimately names [Codex/Claude Code] in its R0 loading prose" but pastes no command output for that claim, and the AGENTS.md hunks in this diff show only the two go-quality/strict-policy rows. Fix: paste the executed git grep -nE 'Codex|Claude Code|Kimi Code' AGENTS.md output proving the names are legitimately present and that "Kimi Code" is not, or restore the markers.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

…lidator sweep

Address the three blocks from the pr-validator verdict on head d2830c7:

- A3/A2 change-class/tier: reclassify honestly. The diff is a documentation
  sweep + comment-only Go/JS/YAML edits + a substantive non-runtime rewrite of
  scripts/validate-agent-config.py, so the class is code+config+docs and the
  tier is `analysed on a live system` (the changed validator ran live with
  retained output and `go build` is clean; no fresh-rebuild runtime target
  exists). `documentation reviewed` is forbidden once code/config changed.
- R5/R1 stale docstring: the parent commit deleted validate_developer_profiles
  and its call, so the module docstring no longer claims "the generated
  per-harness developer profiles".
- R3/R4 + B14(d) marker narrowing: FORBIDDEN_GENERIC_RULEBOOK_MARKERS now holds
  only harness-specific CONFIG identifiers (CODEX_HOME, .codex, ~/.kimi-code).
  The harness *names* (Claude Code, Codex, Kimi Code) are not config leaks:
  AGENTS.md is the single harness-neutral rulebook and legitimately names its
  consumer harnesses in its R0 loading prose. `git grep -nE
  'Codex|Claude Code|Kimi Code' -- AGENTS.md` proves the names present (lines
  21-22); the config identifiers are absent. The class rule (names allowed,
  config identifiers forbidden) replaces the ad-hoc deletion.

Refs #286

Assisted-by: opencode deepseek-v4.1-flash (analysed on a live system)
@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 100f8a5fcd753e8319693a9082b02d7185875c08 (branch: feat/org-readme-agents)

Change class: documentation/comment sweep plus a substantive rewrite of the non-runtime tooling script scripts/validate-agent-config.py (code + config + docs). No runtime bed applies.

Security screen: PASS — no secrets/exfil, no new deps, no weakened landing/force-push/branch-protection gate; the FORBIDDEN_GENERIC_RULEBOOK_MARKERS narrowing is a harness-neutrality lint, not an enumerated guardrail, so no T4 sign-off is triggered.

Comment dispositions (1 comment):

  • #5867816571 (@github-actions[bot], head d2830c7e) — stale-superseded: all three findings re-derived against the CURRENT diff and are now resolved. (1) tier/class is honest (analysed on a live system; class = code+config+docs, so documentation reviewed is correctly withdrawn); (2) the module docstring no longer claims "the generated per-harness developer profiles"; (3) the forbidden list is now config-identifiers-only with the git grep evidence pasted. No surviving finding.

Blocks

  1. R5 / B14(a) — orphaned dead code left inside the file this PR rewrites. scripts/validate-agent-config.py deletes the only consumer of SKILL_REF — the for plugin, name in SKILL_REF.findall(text): … loop in main() — together with the known / known_plugins sets that loop validated against, but retains the module-level definition at ~line 18:
    SKILL_REF = re.compile(
        r"/charly-([a-z][a-z0-9-]*):([a-z][a-z0-9-]*)(?![A-Za-z0-9_-])"
    )
    With the known-skills set gone, the regex can no longer perform its purpose, so it is now a zero-use (live-looking) symbol in a file this PR rewrites — exactly the proven-dead code in a touched module that B14(a) blocks on, and an R5 sweep miss. It also directly contradicts the body's R3 claim that "the validator's now-dead plugins/developer-profile machinery … is deleted" (the SKILL_REF skill-reference machinery is not). The PR supplies no proof of SKILL_REF's liveness, and the burden is on the PR. Fix: delete SKILL_REF in this same commit (and confirm no sibling orphans — e.g. imports now used only by the removed functions — remain), then re-run python3 scripts/validate-agent-config.py --self-test.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

…KILL_REF

Address the pr-validator BLOCK on head 100f8a5: with the adapter/generic
dispatcher comparison gone, the module-level SKILL_REF regex was named as an
orphaned dead symbol in a file this PR rewrites. Scope the regex to
dispatcher() — its only production consumer — and delete the module-level
constant plus its now-invalid self_test assertions. Drop the unused `json`
import and update the meta-test comment (R5 sweep; no sibling orphans remain).
`--self-test` and the full validator both pass.

Refs #286

Assisted-by: opencode deepseek-v4.1-flash (analysed on a live system)
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: d1a1b8d42f6d8fd3f0e2ab785eea006ee69d95a6 (branch: feat/org-readme-agents)

Change class: docs/comment sweep + non-runtime Python tooling rewrite (code + config + docs) — no runtime bed applies.

Security screen: PASS — no secrets/exfil, no new deps/pins, no weakened landing/force-push/branch-protection gate. The validator edits remove only checks that were dead against the plugins/ subtree removed in #382 (adapter-vs-generic parity, plugins gitlink/developer-profile, plugins/** attribution paths, the SKILL_REF cross-ref loop) and narrow FORBIDDEN_GENERIC_RULEBOOK_MARKERS to config identifiers — a harness-neutrality lint, not an enumerated guardrail, so no T4 sign-off is triggered.

Checklist: All applicable rules PASS or NA.
Comments: #5867816571 (head d2830c7e) — stale-superseded (class/tier reclassified to code+config+docs / analysed on a live system; module docstring no longer claims developer profiles; marker list now config-only with the git grep evidence pasted — all three re-derived and resolved against the current diff). #5868310760 (head 100f8a5f) — stale-superseded (SKILL_REF module-level def deleted and scoped into dispatcher(); git grep SKILL_REF → exit 1; AST orphan scan consistent — no surviving finding).

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

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.

2 participants