Skip to content

chore(framework): reshape the memory bank to its own templates - #732

Merged
blafourcade merged 3 commits into
nextfrom
chore/memory-template-shape
Aug 31, 2026
Merged

blafourcade merged 3 commits into
nextfrom
chore/memory-template-shape

Conversation

@blafourcade

@blafourcade blafourcade commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Three commits: bank content, citation syntax in AGENTS.md, then the parent/child split.

Redundancy with the CLI bank

cli/ already carries its own CLAUDE.md and a full bank — architecture, testing, deployment, codebase-map, coding-assertions, project-brief, vcs, cli, auth. The root bank restated all of it, so the two drifted independently and a reader got the same subject twice, differently.

Root is now the repository-wide view and points to the child for CLI internals. Prose gave way to tables.

File Root holds Delegates to child
architecture.md stack, plugin model, firewall, gotchas layers, domain models, install flows, adapters
codebase-map.md top-level areas, entry points, packages where things live inside the CLI
testing.md what validates each surface, browser QA tiers, fixtures, naming, mocking
deployment.md workflows, release flow build, publish, self-update
coding-assertions.md repo gates CLI completion criteria
cli.md what the binary is, command groups interface and internals

Playwright

Dropped from testing.md, though aidd-dev:11-browser-qa runs the pinned @playwright/[email protected] through npx, with ffmpeg and ffprobe, producing WebM evidence. Restored under the template's Browser QA section, with the pin and the "never latest during QA" rule.

The bank content

The seven older files kept their original headings and described a repository that no longer exists:

  • testing.md said no test runner was configured, next to a cli/ running vitest, fast-check and stryker.
  • deployment.md listed three CI steps where there are eight workflows, and said the promote rebase auto-merges — false since the branch model was fixed.
  • vcs.md named renamed issue templates and omitted the cli and aidd-ui scopes.
  • codebase-map.md had no sections, only a diagram redrawing the tree.
  • project-brief.md carried an invented persona and a user-journey diagram for a CLI.

Every claim now traces to a file: lefthook.yml for the gates, cli/package.json and cli/vitest.workspace.ts for the layers, docs/ARCHITECTURE.md for the concern taxonomy, kanban/src/presentation/kanban-deps.ts for the seam between workspaces.

README.md joins the bank, its loading description corrected to the comment markers from #721.

The citation syntax

@aidd_docs/memory/x.md is resolved by Claude Code only. AGENTS.md is read by codex, cursor and opencode, none of which resolve it — inert text pointing at files the tool never opened. That target now uses the link syntax the hook already supported.

Switching it exposed a second bug: buildReference hardcoded a ../ prefix, correct only because the one file using links (.github/copilot-instructions.md) sits one level down. On a root-level AGENTS.md that prefix sends every link outside the repository. The prefix now derives from the target's own depth.

Two tests cover it; the first fails against the hardcoded prefix, verified by reverting it:

✖ AGENTS.md gets markdown links, resolvable from the repository root
ℹ pass 31  ℹ fail 1

CLAUDE.md keeps its duplicated content and its @ block, deliberately: it is the one tool that resolves imports.

Checks run locally

✅ Links: 0 broken in 694 files
✅ context imports load: none sit inside an HTML block
ℹ pass 32  ℹ fail 0        (scripts/__tests__)

Left alone

backlog.md is missing the template's ## Structure section — nothing verified to put there. The CLI bank does not follow the templates either; separate concern.

The seven older bank files carried their original headings and, in several
cases, content that no longer described the repository. testing.md said no test
runner was configured, next to a cli/ with vitest, fast-check and stryker;
deployment.md listed three CI steps where there are eight workflows; vcs.md
named issue templates that have since been renamed and omitted the cli and
aidd-ui scopes.

They now follow the section structure the project-memory skill ships in
assets/templates/memory/, and the content is written from the repository rather
than carried over: architecture states the knowledge/execution firewall and the
gotchas behind it, codebase-map points at areas and entry points instead of
redrawing the tree, coding-assertions mirrors lefthook.yml command for command,
project-brief keeps the domain vocabulary and drops the invented personas.

deployment.md also stops saying the promote rebase auto-merges; it has been a
merge commit since the branch model was fixed.
…imports

The @ form is resolved by Claude Code only. AGENTS.md is what codex, cursor and
opencode read, and none of them resolve it, so those lines were inert text
pointing at files the tool never opened.

Switching that target to the link syntax the hook already supports exposed a
second bug: buildReference hardcoded a "../" prefix, correct only because the
one file using links so far, .github/copilot-instructions.md, sits one level
down. On a root-level AGENTS.md the same prefix sends every link outside the
repository, which the link check reports as a broken local path. The prefix is
now derived from the target's own depth.

Both forms are covered: the root-level target must produce no climb, the nested
one must produce exactly one. The first test fails against the hardcoded prefix.
@blafourcade
blafourcade requested a review from a team as a code owner August 31, 2026 07:52
cli/ already carries a CLAUDE.md and a full memory bank: architecture, testing,
deployment, codebase-map, coding-assertions, project-brief, vcs and cli. The
root bank restated all of it, so the two drifted independently and a reader got
the same subject twice, differently.

Root now holds the repository-wide view and points to the child bank for CLI
internals. Prose gives way to tables: what a surface is validated by, what each
area holds, what each workflow runs.

Playwright is back in testing.md, where it belongs. It had been dropped, though
aidd-dev:11-browser-qa runs the pinned @playwright/[email protected] with ffmpeg and
ffprobe to produce WebM evidence. The template's Browser QA section is its home.
@blafourcade
blafourcade merged commit 4fb582e into next Aug 31, 2026
8 checks passed
blafourcade added a commit that referenced this pull request Sep 3, 2026
…#751)

`AGENTS.md` carried ten `@aidd_docs/…` lines. Codex, Cursor and OpenCode do not
resolve that import — it is inert text that loads nothing and reports nothing.
`update_memory.js` has written markdown links there since #732; what was missing
is anything that notices a file drifting back.

Two ways it drifts, both observed today. A machine still holding the released
2.7.0 hook rewrites the block to `@` on every session start, because that older
copy declares `at` for `AGENTS.md`. And a stale edit sitting in the index rides
into an unrelated commit, which is exactly how the wrong form reached `next`.

The check reads `TARGET_FILES` from the hook itself rather than restating it, so
the rule and the writer cannot disagree. A table it cannot parse throws: a check
that passes because it compared against nothing is worse than no check.

Tests first, then the code, then the mutation for each guard — the comparison,
the unreadable table, the stop-at-first, and what counts as a reference. All
four die, each under the test named for it.

Refs #619


Claude-Session: https://claude.ai/code/session_01VWNxk63AGKkqE8HRqHLjGp

Co-authored-by: reference-week <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
@aidd-bot aidd-bot Bot mentioned this pull request Sep 9, 2026
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.

1 participant