chore(memory): record #394 lessons and compact the orchestrator memory index - #534
Merged
drmoisan merged 1 commit intoAug 11, 2026
Conversation
New memory: helper scripts must never be committed under a feature's evidence/ tree. feature-review's Get-ChangedLanguageSet matches on file extension alone and is path-blind, so a single 27-line duplicate-sweep.ps1 retained under evidence/baseline/ put PowerShell into the branch's changed-language set, triggered the mandatory coverage rule with no Pester test behind it, and cost a full remediation cycle on a branch whose only real change was deleting one line from a .csproj. Updated the pr_context memory with a stale-content variant: collect_pr_context returned ok:true and listed the worktree artifact paths but did not overwrite an existing hand-authored pr_context.summary.txt, leaving a summary that described a file the remediation cycle had already deleted. Check the summary's head and merge-base SHAs against git before authoring from it. Compacted MEMORY.md from 19.6KB to 13.9KB (the SessionStart hook flagged it as approaching the 24.4KB read limit). All 77 entries are preserved one-per-line with shortened hooks; no entry was dropped or merged, and no topic file lost content. Detail already lives in the topic files the index points at. Refs #394 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chore(memory): record #394 lessons and compact the orchestrator memory index
Summary
evidence/tree.pr_context.summary.txtmemory with a newly observed stale-content failure mode.MEMORY.mdfrom 19.6KB to 13.9KB. All 77 entries preserved; none dropped or merged..claude/agent-memory/orchestrator/**. No production code, no policy files, no rules.Why
Follow-up to #394 (merged as PR #533). Two findings from that run are worth persisting, and the
SessionStarthook flagged the orchestrator memory index as approaching its 24.4KB read limit.Finding 1 — helper scripts under
evidence/.feature-review'sGet-ChangedLanguageSetmatches on file extension alone and is completely path-blind. A 27-lineduplicate-sweep.ps1that the executor retained under<FEATURE>/evidence/baseline/"for reproducibility" therefore put PowerShell into the branch's changed-language set, which triggered the mandatory coverage-verification rule with no Pester test and no coverage artifact behind it. That cost a full remediation cycle (planner, executor, reaudit) on a branch whose only real change was deleting one line from a.csproj. The plan had only ever required capturing the script's output.Finding 2 — stale PR context.
collect_pr_contextreturnedok:trueand listed the worktree artifact paths, but did not overwrite an existing hand-authoredpr_context.summary.txt. The stale file still described the.ps1that remediation had already deleted, so authoring a PR body from it would have described the wrong diff.What Changed
feedback_no_helper_scripts_under_evidence.md— the rule, why it fires, and the proportionate remediation (git rmthe script; the sibling.mdartifact already carries its logic and output verbatim).pr-context-summary-unreliable-gh-and-classification.md— adds the stale-content variant alongside the existing "gh unavailable" and misclassification variants.MEMORY.md— one line per entry with shortened hooks. Detail already lives in the topic files the index points at.Verification
grep -c "^- \["..claude/agent-memory/orchestrator/.Not verified in this PR: no build or test gate applies. The diff contains zero source files.
Backward Compatibility / Migration Notes
None. Memory files are agent-facing documentation.
Risks and Mitigations
The compaction rewrites every line of
MEMORY.md, so a concurrently in-flight epic sibling that appends its own index line will conflict on this file rather than merging cleanly. This is the known.claude/agent-memory/**fan-in conflict, and the resolution is unchanged: take both sides' entries. To keep that window as small as possible this PR is deliberately tiny and is being merged immediately after creation. A resolver should keep the compacted form and re-append the sibling's line rather than restoring the long-hook version.Review Guide
Read
feedback_no_helper_scripts_under_evidence.mdfirst; theMEMORY.mddiff is mechanical hook-shortening.Follow-ups
None.
GitHub Auto-close
None.