Collection move plan
Status: complete. All sub-efforts have landed. The kb/reference/ collection exists, ADRs have moved, the two wholesale system-doc candidates are in place, the five splits are tracked in split-plan.md, entry-point and navigation changes are live, install scaffolding ships the collection, and hardcoded path fixups are done. The tooling prerequisite was resolved by extracting the logic into commonplace.lib.relocation with cross-collection support.
Concrete plan for moving system-specific content out of kb/notes/ into a new kb/reference/ collection. Follows on from framing.md, which explored the problem space; this plan records the decisions made and lays out the sub-efforts.
Decisions
-
New collection
kb/reference/— sibling ofkb/notes/,kb/sources/,kb/tasks/,kb/work/,kb/instructions/. Holds content that describes this specific commonplace system: current state, architecture, and decision history. -
Name is
reference/, notsystem/ordocs/.reference/names the genre (information-oriented, descriptive, lookup-shaped) rather than the subject, which transfers better to installed projects and contrasts cleanly withnotes/(theory) andinstructions/(how-to).docs/is redundant with the mkdocs site as a whole;system/is overloaded in this KB. -
Uses the existing
notetype — no newsystem-doctype at first (YAGNI). If review or staleness pressures later justify a dedicated type with its own schema and gates, it can be added then. -
ADRs move with the collection —
kb/notes/adr/→kb/reference/adr/. ADRs are system-specific by nature (they record decisions about this system), so they belong inreference/rather thannotes/. Theadrtype template, instructions, and schema move tokb/reference/types/. -
kb/notes/collapses toward theory-only — after the move, the rule is: "if we renamed a type or restructured a directory tomorrow, would this file need to change?" Yes → belongs inreference/. No → stays innotes/. -
Per-note scope signal is deferred — the question of whether individual notes carry
scope: general | pattern | local(see framing.md options A–D) is a separable sub-effort. Moving the clearly system-specific content first doesn't commit either way.
Target layout
kb/reference/
README.md ← entry point: "how commonplace works today"
architecture.md ← from kb/notes/commonplace-architecture.md
type-system.md ← from kb/notes/document-classification.md
… ← more as the audit finds them
adr/ ← moved wholesale from kb/notes/adr/
002-…md … 016-…md
types/
adr.template.md ← from kb/notes/types/
adr.instructions.md
adr.schema.yaml
Three-way contract between top-level collections:
| Collection | Genre | Question it answers |
|---|---|---|
kb/notes/ |
Claims and theory | Is this true? Does it transfer? |
kb/reference/ |
Current-state description + decision history | How does our system work, and why? |
kb/instructions/ |
Imperative how-to (skills, procedures) | How do I do X? |
Tooling prerequisite: extend commonplace-relocate-note — done
All per-file moves in this plan use commonplace-relocate-note (src/commonplace/cli/relocate_note.py). The script handles git mv, rewriting inbound links across the repo, rebasing outbound links from the moved file, and updating mkdocs redirects — everything the earlier "update inbound/outbound links" bullets would otherwise have had to do manually.
Resolved: the logic was extracted into commonplace.lib.relocation (commit 458d971) with kb_root parameterised instead of a hardcoded NOTES_ROOT. A note can now be moved from any path under kb/ to any other path under kb/, including cross-collection moves like kb/notes/foo.md → kb/reference/foo.md. The CLI wrapper accepts the same --to syntax with no additional flags. A dedicated test (test_relocate_note_apply_moves_note_across_kb_collections) exercises the cross-collection scenario and passes alongside the rest of the relocate-note test suite.
Sub-efforts
These are decoupled — each can land independently.
1. Create the collection and move ADRs (mechanical)
Almost entirely find-replace. Can land first.
Directory and ADR move:
ADRs move one at a time via commonplace-relocate-note once the prerequisite extension lands. Each invocation handles the git mv, inbound link rewrites across the repo, outbound link rebase, and mkdocs redirect in one pass.
- [x]
mkdir -p kb/referenceandmkdir -p kb/reference/types(the script handles parent dirs on move, but the collection root should exist before the first invocation) - [x] Move each ADR into
kb/reference/adr/(landed manually withgit mvplus repo-wide link rewrites and index refresh; the plannedcommonplace-relocate-noteextension is still open as tooling cleanup) - [x] Move the
adrtype files (these aren't notes, so they're a plaingit mv— the script only handles files under a collection root):git mv kb/notes/types/adr.template.md kb/reference/types/adr.template.md(and.instructions.md,.schema.yaml) - [x] Manually check workshop docs referenced by the script (it updates
*.mdunder the repo root, soframing.mdandpractitioner-contract.mdshould already be covered, but verify) - [x] Rebuild indexes that cite ADRs (
document-system-index.md,architecture-index.md) — inline link rewrites should be handled by the script, but index prose referring to "ADRs inkb/notes/adr/" needs manual update - [x] Verify
git log --follow kb/reference/adr/NNN-…preserves history per file
Declare the collection to tooling and docs:
- [x] Add
referencecollection to liveqmd-collections.yml(same shape asnotes, pointing atkb/reference) - [x] Add
referencecollection tosrc/commonplace/assets/qmd-collections.yml(the template that ships with the package) - [x] Update live
AGENTS.md: - [x] Add
kb/reference/to thergexamples under## Using the KB - [x] Add an entry for
kb/reference/README.md(once written) to## Key Indexes - [x] Short prose paragraph or table row distinguishing
notes/(theory) fromreference/(current-state + decisions) frominstructions/(how-to), mirroring the three-way contract in this plan - [x] Update
AGENTS.md.template(the resolved decision is that the framework does shipkb/reference/as an installed collection, serving as the practitioner's system-documentation collection): - [x] Add
kb/reference/to thergexamples under## Using the KB - [x] Add a placeholder entry in
Key entry pointsforkb/reference/README.md - [x] Add a short three-way-contract paragraph mirroring the live
AGENTS.md:kb/notes/for transferable claims,kb/reference/for current-state + decision history of the practitioner's own system,kb/instructions/for how-to - [x] Update install scaffolding so
commonplace-initcreateskb/reference/in practitioner projects: - [x] Add
Path("kb/reference")andPath("kb/reference/types")toDEFAULT_DIRSinsrc/commonplace/cli/init_project.py - [x] Add
("kb/reference", "kb/reference")toSCAFFOLD_TREESso scaffold content underkb/reference/gets copied - [x] Create
src/commonplace/scaffold/kb/reference/types/adr.{template.md,instructions.md,schema.yaml}by pointing the scaffold at the livekb/reference/types/files (so practitioners get the current ADR type preloaded and scaffold packaging stays in sync) - [x] Create a starter
src/commonplace/scaffold/kb/reference/README.md— a short placeholder the practitioner fills in ("Current-state documentation for this project's system. Describe how your KB is organized, which conventions you've chosen, and link to ADRs."). Not to be confused with the commonplace-specifickb/reference/README.mdwritten in sub-effort 5, which describes commonplace itself. - [x] Add a test under
test/that runsinit_projectagainst a temp root and assertskb/reference/,kb/reference/types/, and the scaffold files are present - [x] Update mkdocs nav — add
reference/adr/toBrowseor a newReferencegroup - [x] Run
commonplace-validateto catch missed links
Deferred: auditing hardcoded ADR paths in skills, scripts, and src/commonplace/ beyond the files listed above (see sub-effort 6).
2. System-doc audit (judgment)
Apply the restructuring test to kb/notes/*.md:
If we renamed a type or restructured a directory tomorrow, would this file need to change?
Yes → candidate for kb/reference/. No → stays in notes/.
Candidate list:
| Source | Target | Justification | Status |
|---|---|---|---|
kb/notes/document-classification.md |
kb/reference/type-system.md |
Describes the current type inventory and migration state; would need rewriting if types or schemas change | done |
kb/notes/commonplace-architecture.md |
kb/reference/architecture.md |
Describes the repo's current directory layout and operational surface | done |
kb/notes/directory-scoped-types-are-cheaper-than-global-types.md |
kb/reference/type-loading.md (split) |
The economic argument for directory-scoped loading transfers, but the current-implementation section and concrete path claims are specific to Commonplace's present type layout | proposed-split |
kb/notes/generate-instructions-at-build-time.md |
kb/reference/instruction-generation.md (split) |
The build-time-vs-runtime-parameterisation principle transfers, but the current Commonplace skill/task generation scheme and path examples are local | proposed-split |
kb/notes/kb-goals-in-always-loaded-context-guide-inclusion-decisions.md |
kb/reference/control-plane-goals.md (split) |
The control-plane argument for always-loaded KB goals transfers, but the AGENTS template contract and install-time guidance are specific to the current Commonplace scaffold | proposed-split |
kb/notes/scenario-decomposition-drives-architecture.md |
kb/reference/scenario-architecture.md (split) |
The scenario-decomposition method transfers, but the commonplace-vs-installed-project split, escalation path, and current test-scenario artifacts are local | proposed-split |
kb/notes/files-not-database.md |
kb/reference/storage-architecture.md (split) |
The general files-vs-database argument transfers, but the current commonplace storage boundary, qmd-derived indexes, and SQLite review exception are system-specific and should be split into reference | proposed-split |
Borderline cases to weigh during the audit:
files-not-database.md— general principle, or current-state (we chose files)?backlinks.md— needs readinglinking-theory.md— needs reading- Index files (
document-system-index.md,architecture-index.md,document-system-index.md) — these point at both theory and ADRs; may need rewriting rather than moving - Any note whose title is descriptive-not-claim is a mild hint it's reference-shaped rather than theory-shaped
Audit output: extend the table above with the full candidate list before sub-effort 3 starts.
Current judgment on the explicit borderline set:
files-not-database.mdshould be split — keep the transferable files-vs-database argument inkb/notes/, and extract the current commonplace storage boundary and scoped SQLite review exception intokb/reference/storage-architecture.md.backlinks.mdstays inkb/notes/— it is a general design-space note about inbound-link visibility, not a description of a current commonplace subsystem.linking-theory.mdstays inkb/notes/— it is explicitly trying to ground link practices under a transferable theory, not document current state.architecture-index.mdanddocument-system-index.mdstay inkb/notes/and should be rewritten in place as mixed navigation pages linking theory notes to reference docs/ADRs.
Split judgment on the current candidate set:
document-classification.mdshould move wholesale — it is already a current-state taxonomy and migration summary rather than a theory note.commonplace-architecture.mdshould move wholesale — it is a repo-layout snapshot with no real transferable core once the local paths are removed.directory-scoped-types-are-cheaper-than-global-types.mdshould split — keep the general loading-economy argument inkb/notes/, extract the "Current implementation" path-specific material intokb/reference/type-loading.md.generate-instructions-at-build-time.mdshould split — keep the general frontloading/build-time-generation argument inkb/notes/, extract the current Commonplace generation/config pattern intokb/reference/instruction-generation.md.kb-goals-in-always-loaded-context-guide-inclusion-decisions.mdshould split — keep the general claim that goals belong in always-loaded control-plane context inkb/notes/, extract the current scaffold/template/install contract intokb/reference/control-plane-goals.md.scenario-decomposition-drives-architecture.mdshould split — keep the general method of deriving architecture from user-story decomposition inkb/notes/, extract the current commonplace-vs-installed-project architecture and scenario measurement surface intokb/reference/scenario-architecture.md.
3. Candidate list review gate (hard stop) — done
Before any system-doc moves happen, the agent produces the full candidate list from sub-effort 2 — the complete set of notes proposed for moving, with target path and one-line justification per row — and presents it to the user for revision. No git mv runs until the user approves the list.
The user may:
- Approve rows as-is
- Edit target paths or names
- Reject rows (they stay in
kb/notes/) - Add rows the audit missed
- Split the list into batches to land separately
The approved list is frozen into the table in sub-effort 2 with approved in the status column, and becomes the work queue for sub-effort 4.
This gate is a hard stop because each row is a judgment call: "is this system-specific, or general theory?" The agent's audit is a starting proposal, not a decision. The gate also applies to any later additions — if the audit misses notes that turn up during a move, they get added to the list and re-approved, not silently moved.
Resolved: the review gate was exercised when the sub-effort 2 candidate list was reviewed, splits were separated out into their own plan, and the two wholesale candidates (document-classification.md and commonplace-architecture.md) were approved for direct move. The five split candidates landed via the approved split-plan.md.
4. System-doc moves (after approval) — done
For each approved candidate:
- [x] Run
commonplace-relocate-note kb/notes/OLD.md --to kb/reference/NEW.md(dry-run, then--apply) — handles git mv, inbound/outbound link rewrites, and mkdocs redirect in one pass - [x] Update frontmatter if needed (remove
title-as-claimtrait; keeptype: note; adjust title if the file was renamed to a descriptive form) - [x] Verify the script's reported link updates look right in the dry-run output before applying
- [x] Run
commonplace-validateas a belt-and-braces check - [x] Mark the row
donein the sub-effort 2 table
The wholesale moves (document-classification.md → type-system.md, commonplace-architecture.md → architecture.md) landed via the relocation library, and the five split candidates landed via split-plan.md. All rows in the sub-effort 2 candidate table are marked done.
5. Entry point and navigation
- [x] Write
kb/reference/README.md— one-page tour of what's in the collection; links toarchitecture.md,type-system.md, ADR index - [x] Add a
Referencegroup to mkdocs nav with the key pages and the ADR index - [x] Update
kb/notes/tags-index.mdto cross-linkreference/where appropriate, or note thatreference/has its own entry point
6. Hardcoded path fixups (deferred cleanup)
After the directory move is stable, audit for hardcoded paths:
- [x] Search for
notes/adracrosssrc/,skills/,kb/instructions/, and agent-facing docs - [x] Search for
kb/notes/adracross the whole repo - [x] Fix any live tooling/docs that still assumed ADRs live under
notes/
This can wait until after #1 lands and smoke-test reveals any broken tooling.
Sequencing
- Tooling prerequisite: extend
commonplace-relocate-noteto accept collection roots other thankb/notes/, with a dry-run test against one ADR - Create the collection and move ADRs (sub-effort 1, mechanical, low risk, high clarity win) — ship next, including qmd and AGENTS.md updates
- System-doc audit (sub-effort 2) — agent proposes the full candidate list in one sitting
- Review gate (sub-effort 3) — user revises and approves the candidate list; hard stop before any moves
- Entry point
kb/reference/README.md+ starter system-docs (architecture.md,type-system.md) — ship as a small batch once those two rows are approved - Remaining system-doc moves (sub-effort 4) — batch by theme from the approved list
- Hardcoded path fixups (sub-effort 6) — after everything lands
Deferred / out of scope for this plan
- Per-note scope signal (framing.md options A–D)
- Broader practitioner-contract decisions about what gets installed vs. what stays in
commonplace/(covered inpractitioner-contract.md); this plan only resolves two specific questions: (1)kb/reference/ships as an installed collection, and (2) theadrtype is therefore effectively promoted from "local (ours)" to "core" status, since it ships with the installed scaffold - A dedicated
system-doctype with its own schema and review gates - Whether
kb/instructions/itself should be renamed or reorganized