task: record /delegate shared-file integration pattern in MEMORY.md

Memory Improvement Protocol per context/rules/memory.md.

Promotes one durable lesson from the /delegate run that landed
the Karpathy wiki integration: when /delegate spawns parallel
sub-agents touching a shared append-style file (CHANGELOG.md,
AGENTS.md skills table), scope each sub-agent to disjoint files
and let the orchestrator integrate the shared-file edits at
commit time. Avoids concurrent-commit clobber and silent stale-
view compose (same mechanism behind the 2026-05-19 worktree
lesson). Pattern is "fan out implementation, fan in integration."

Also promotes the pre-existing 2026-05-23 .claude/plans/ gitignore
lesson which was unstaged since PR #347; this commit lands it on
this PR's merge to development.

Daily log entries for pm-agent / ship-spec / delegate runs were
appended to memory/2026-05-24/log.md but the directory is
gitignored by the existing memory/[0-9]*/ rule, so the daily log
lives only on the local filesystem (per the established
convention; only MEMORY.md is the long-term tracked store).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
ryaneggzandClaude Opus 4.7 committed 2026-05-24 01:27:50 +00:00
1 parent ba7e925994
commit 14b6bee451
1 file changed
+2
+2
View File
@@ -13,3 +13,5 @@ Long-term lessons distilled from session experience. Append-only. See `context/r
- **2026-05-22**: When asked to install a tool via `curl … | bash` from a third-party repo, the right move was to fetch and read the script first, then re-implement the capability natively to harness skill conventions — not execute the untrusted installer (it delegated to an unreviewable `npx` Node installer that mutated agent configs across many tools). Done while shipping the `/caveman` skill (PR #336).
- **2026-05-22**: `CLAUDE.md` at the repo root is a symlink to `AGENTS.md`; the Edit tool refuses to write through it ("Refusing to write through symlink"). Edits to the orchestrator skills table / instructions must target `AGENTS.md` directly (resolve with `readlink -f CLAUDE.md`).
- **2026-05-22**: skills.lock provenance for non–mifunedev-registry skills: a vendored external skill records its real upstream commit SHA plus a `note` marking it vendored (caveman → `JuliusBrussee/caveman`); a skill authored in-tree for `mifunedev/skills` but not yet contributed records `commit: pending-upstream`, backfilled on upstream merge (reflect, PR #338).
- **2026-05-23**: `.claude/plans/` AND `.claude/specs/*` are both gitignored project-wide (`.gitignore:50-51`) — local-only working areas, zero tracked files in either. When asked to commit a plan/spec, surface the conflict instead of forcing it; the user's intent may be to make a deliberate exception. Resolution requires two changes in lockstep: (a) change the parent rule from `**/.claude/plans` to `**/.claude/plans/*` — the bare-directory form prevents git from traversing into the dir so child negations are silently no-ops; (b) add the targeted exemption (e.g. `!**/.claude/plans/karpathy-llm-wiki.md`). Encountered landing PR #347 (Karpathy LLM Wiki plan, issue #346).
- **2026-05-24**: When `/delegate` spawns parallel sub-agents that need to touch a shared append-style file (`CHANGELOG.md`, `AGENTS.md` skills table, settings.json), scope each sub-agent to disjoint files only and let the orchestrator integrate the shared-file edits at commit time. Sub-agents commit nothing; orchestrator commits per wave with all wave files plus its own shared-file additions in one atomic commit. Avoids the concurrent-commit failure mode where two sub-agents independently `git commit` against the same branch and clobber each other's CHANGELOG additions (or, in worktree-less single-checkout execution, where the second sub-agent's Edit silently composes against the pre-first-edit state — see 2026-05-19 lesson for the underlying mechanism). The pattern is "fan out implementation, fan in integration." Encountered shipping the Karpathy wiki integration (PRs #350, #351); Wave 2 (US-002 `/wiki-ingest` + US-003 `/wiki-query` in one assistant message) landed both SKILL.md files in parallel, then the single orchestrator commit included both + both CHANGELOG entries atomically.