Skip to content

docs(claude-md): require agent-memory changes to ship with their PR - #84

Merged
amondnet merged 1 commit into
mainfrom
amondnet/claude-md-agent-memory-commit-rule
Apr 14, 2026
Merged

docs(claude-md): require agent-memory changes to ship with their PR#84
amondnet merged 1 commit into
mainfrom
amondnet/claude-md-agent-memory-commit-rule

Conversation

@amondnet

@amondnet amondnet commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Strengthens the existing `.claude/agent-memory/` Gotcha in `CLAUDE.md` to explicitly require that agent-authored memory files be committed alongside the code change that produced them.
  • Prevents accidental loss of cross-session agent learnings when authors stage selectively or use `git add -A` with accidental exclusions.
  • Also flushes two `review-review-silent-failure-hunter` memory files the agent updated right after PR fix(cli): align ensureCheckout with PM-unified store layout #82 merged, so `main` reflects the current agent-memory state.

Motivation

Context: PR #82 merged with agent-memory included, but the prior note ("IS committed to git — it persists agent learnings") was a passive statement. Making it an imperative rule makes it harder to skip inadvertently.

Test plan

  • `CLAUDE.md` renders correctly on GitHub
  • `git log --stat` on the branch shows the two agent-memory files included (not left untracked)

Summary by cubic

Make committing agent-authored memory files required: update CLAUDE.md to state that any changes under .claude/agent-memory/** must ship in the same PR as the code that generated them to avoid losing cross-session learnings. Also sync the review-review-silent-failure-hunter memory files to reflect the resolved ensureCheckout fallback-ref issue and current agent-memory state.

Written for commit 965dc69. Summary will update on new commits.

Strengthen the existing `.claude/agent-memory/` Gotcha to explicitly
require that any agent-authored memory files be committed alongside
the code change that produced them. Prevents accidental loss of
cross-session agent learnings when PRs are squashed or when authors
stage selectively.

Also flushes the two silent-failure-hunter memory files that the
agent updated after PR #82 merged — keeps `main` in sync with the
current agent-memory state.
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Apr 14, 2026
@codecov

codecov Bot commented Apr 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dosubot dosubot Bot added the type:docs Documentation improvements label Apr 14, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

Auto-approved: Documentation-only changes and agent-memory updates with no impact on source code or infrastructure.

Architecture diagram
sequenceDiagram
    participant Agent as Claude Agent
    participant FS as Local File System
    participant Dev as Developer (PR Author)
    participant Git as Version Control (GitHub)

    Note over Agent,FS: During active coding/debugging session
    Agent->>FS: Perform task & identify project "gotchas"
    Agent->>FS: CHANGED: Update memory files in .claude/agent-memory/**

    Note over Dev,Git: PR Creation Process
    Dev->>FS: git add (stage code changes)
    
    alt NEW: Compliant with CLAUDE.md "MUST be committed" rule
        Dev->>FS: Stage agent-memory changes
        Dev->>Git: git commit (code + learnings)
        Git-->>Git: Session learnings persisted to main branch
    else Non-compliant (Missing memory)
        Dev->>Git: git commit (code only)
        Note right of Git: Agent learnings are lost across sessions
    end

    Note over Agent,Git: Future sessions (Persistence)
    Git->>FS: git checkout main
    Agent->>FS: Read .claude/agent-memory/
    Note over Agent: Agent remembers previous fixes (e.g. ensureCheckout)
Loading

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying ask-registry with  Cloudflare Pages  Cloudflare Pages

Latest commit: 965dc69
Status: ✅  Deploy successful!
Preview URL: https://2586b782.ask-registry.pages.dev
Branch Preview URL: https://amondnet-claude-md-agent-mem.ask-registry.pages.dev

View logs

@amondnet
amondnet merged commit 40439a6 into main Apr 14, 2026
5 checks passed
@amondnet
amondnet deleted the amondnet/claude-md-agent-memory-commit-rule branch April 14, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files. type:docs Documentation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant