Skip to content

CLAUDE.md with a heading line plus @AGENTS.md is not recognized as a pointer #116

Closed

Description

@MitchellkellerLG

Summary

A CLAUDE.md whose content is a heading line plus the import, for example:

# my-repo

@AGENTS.md

is treated as a separate memory file:

warn CLAUDE.md is a separate memory file and will NOT be updated - only AGENTS.md is optimized. To cover both, consolidate: move its content into AGENTS.md and make CLAUDE.md a pointer (a single line: @AGENTS.md).

Claude Code resolves the @AGENTS.md import identically with or without the heading, and a heading is the common convention (Claude Code's own /init and many fleets emit a title line). The pointer check could ignore leading markdown headings and blank lines before deciding the file is not a pointer.

Environment

backpass 0.1.18, Windows 11, Node 22.14.

Suggested fix

In the pointer detection, strip lines matching ^# and blank lines, then compare the remainder to @AGENTS.md.

Activity

  1. kunchenguid commented on Sep 7, 2026

    @kunchenguid
    Owner

    Speaking as Kun's firstmate: verified on latest main (4e67dcd). pointerImportPath in src/memory.js only strips blank lines and HTML comments, so a title line like # my-repo plus @AGENTS.md fails the single-line pointer check and is warned as a separate memory file. Reproduced with isPointerTo("# my-repo\n\n@AGENTS.md\n", "AGENTS.md") === false while plain @AGENTS.md is true. Claude Code resolves the import either way; recognizing leading markdown headings (and blanks) as non-instruction matches the existing pointer convention. No open PR yet — labeled ready-for-pr.

    VISION: aligns (CLAUDE.md-as-pointer; does not widen writes or lower review/evidence bars). contract-class: restore.

  2. kunchenguid commented on Sep 21, 2026

    @kunchenguid
    Owner

    Speaking as Kun's firstmate:

    Stale-restamp on latest main 74cd97a (chore release 0.1.26 #141).

    Still real / unhelped on main: pointerImportPath in src/memory.js still only strips blank lines and HTML comments, then requires a single remaining line. Reproduced on tip: isPointerTo(\"# my-repo\n\n@AGENTS.md\n\", \"AGENTS.md\") === false while plain @AGENTS.md is true. Claude Code resolves the @AGENTS.md import with or without a title heading; recognizing leading markdown headings (and blanks) as non-instruction matches the existing pointer convention. Open PRs #128 / #129 do not touch memory pointer detection. No open help PR.

    Contract-class: restore (CLAUDE.md-as-pointer is an already-specified convention; heading+import is the common emitted shape — fix restores recognition of that pointer, does not widen writes or add a new default surface).

    VISION (per rule):

    1. Evidence is the only currency — aligns (resolution/warning accuracy only; no change to quote/corroboration bars).
    2. The human owns the weights — aligns (still only writes the primary; pointer files stay non-written; no silent widen).
    3. Nothing the model says is taken on faith — aligns (mechanical pointer check on file text, not model claims).
    4. The budget is the constraint — aligns (avoids false "separate memory file" pressure that nudges duplication/growth).
    5. It reads what you already have and owns nothing — aligns (local memory files; no upload/key).
    6. Failure is loud and named — aligns (today's warn mislabels a real pointer; fixing detection names the real separate-file case instead of papering over with a weaker path).
    7. Scope — aligns (pointer detection for the existing CLAUDE.md ↔ AGENTS.md convention; does not lower review/evidence bars or widen write scope).

    Decision: leave ready-for-pr. Restamp.

  3. kunchenguid commented on Oct 6, 2026

    @kunchenguid
    Owner

    Speaking as Kun's firstmate.

    Stale-restamp on latest main 0268201 (chore release 0.1.32 #198).

    Still real and unhelped on main: pointerImportPath in src/memory.js (lines 486-501) still only strips HTML comments and blank lines, then requires exactly one remaining line, so # my-repo + blank + @AGENTS.md still fails isPointerTo and gets the separate-memory-file warning. None of the open PRs (#150, #151, #154, #163, #175, #179, #183, #201) touch src/memory.js pointer detection. Not opening a competing PR.

    Contract-class: restore (CLAUDE.md-as-pointer is the existing specified convention; heading + import is the common emitted shape; no new write surface or default).

    VISION per-rule:

    • Evidence is the only currency: aligns (warning accuracy only; no quote/corroboration change).
    • The human owns the weights: aligns (still only the primary is written; pointer files stay unwritten).
    • Nothing the model says is taken on faith: aligns (mechanical text check, no model claims).
    • The budget is the constraint: aligns (removes false pressure to duplicate content).
    • It reads what you already have and owns nothing: aligns (local files only).
    • Failure is loud and named: aligns (today's warning misnames a real pointer).
    • Scope: aligns (does not widen write scope or lower review/evidence bars).

    Leaving ready-for-pr.

  4. kunchenguid commented on Oct 20, 2026

    @kunchenguid
    Owner

    Speaking as Kun's firstmate.

    Stale-restamp on latest main c22f2ad (backpass 0.1.37).

    Still real and unhelped on main: pointerImportPath in src/memory.js (lines 515-530) still only strips HTML comments and blank lines, then requires exactly one remaining line. Re-ran it on this tip: isPointerTo("# my-repo\n\n@AGENTS.md\n", "AGENTS.md") is still false while plain @AGENTS.md is true. #217 (CLAUDE.md symlinks as pointers) landed since the last pass but doesn't cover the heading case, and no open PR touches pointer detection. Not opening a competing PR.

    Contract-class: restore (CLAUDE.md-as-pointer is the existing specified convention; heading + import is the common emitted shape; no new write surface or default).

    VISION per-rule:

    • Evidence is the only currency: aligns (warning accuracy only; no quote/corroboration change).
    • The human owns the weights: aligns (still only the primary is written; pointer files stay unwritten).
    • Nothing the model says is taken on faith: aligns (mechanical text check, no model claims).
    • The budget is the constraint: aligns (removes false pressure to duplicate content).
    • It reads what you already have and owns nothing: aligns (local files only).
    • Failure is loud and named: aligns (today's warning misnames a real pointer).
    • Scope: aligns (does not widen write scope or lower review/evidence bars).

    Leaving ready-for-pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-prIssue is in scope and ready for a PR

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions