project-notes
A personal, separate git repo (~/notes, remote git@github.com:nli33/notes.git) holding
per-project research/debugging notes that are tangential to what each host repo is actually for
(so they don't pollute that repo's history for other collaborators). One subdirectory per project,
symlinked into that project's checkout as notes/.
What to write
The point of this repo: let future-you (or an agent) retrospectively reconstruct why the code
looks the way it does, without re-deriving it from a diff. Prioritize, roughly in this order:
- Design decisions and tradeoffs — why this approach over the alternatives considered, what
was traded away, what would make you revisit the choice.
- Research/investigation results — what was tried, what was found, especially negative
results (a dead end not recorded gets re-tried later).
- Bugs and debugging — root cause, the fixes attempted that didn't work and why (not just
the one that did), and how the bug was actually diagnosed.
- Development process/history — the sequence major work happened in, when a plan changed
mid-stream and why.
- Anything not obvious from reading the code — a hidden constraint, a workaround for a
specific issue, a decision that would look arbitrary out of context.
Don't log routine/mechanical changes (a rename, a formatting pass) — only what carries real
context. Full conventions (file structure, splitting large files, git workflow) live in
~/notes/README.md — read it before writing content.
Setting up notes for a project
Determine <Project> — the directory name to use under ~/notes. If the user supplied one, use
it. Otherwise default to the project's identity rather than the local checkout path: the repo name
from git remote get-url origin, or failing that the package/manifest name. If that disagrees
with the checkout dirname and neither is clearly authoritative, ask — awkward to rename later.
Then:
mkdir -p ~/notes/<Project> (don't re-init ~/notes if ~/notes/.git already exists).
- If
~/notes/<Project>/README.md doesn't exist, create a short index (purpose + a
file — what it covers table once there are files); match an existing project dir's style.
- Symlink it in, computing the real relative path rather than assuming siblings:
cd <repo> && ln -s "$(python3 -c "import os; print(os.path.relpath(os.path.expanduser('~/notes/<Project>'), '.'))")" notes
Verify with readlink notes / ls notes.
- Add
notes (no trailing slash — notes/ won't match a symlink) to <repo>/.gitignore.
- Don't commit/push the symlink itself, and don't add a "read notes first" pointer to the user's
global
CLAUDE.md — the user points agents to notes/ explicitly when relevant.
git add/commit/push inside ~/notes (not <repo>) after content changes.
Using notes in an existing project
If <repo>/notes already exists as a symlink, just read/write through it normally.
1---2name: project-notes3description: Set up or use the centralized ~/notes project-notes repo for a code project — links a project's tangential research/debugging notes into it via a gitignored symlink, kept out of the host repo's own git history. Use when the user asks to "set up notes"/"link notes" for a repo, when starting a new notes/ folder for exploratory work, or when a project's notes have grown large and need splitting.4---56# project-notes78A personal, separate git repo (`~/notes`, remote `git@github.com:nli33/notes.git`) holding9per-project research/debugging notes that are tangential to what each host repo is actually for10(so they don't pollute that repo's history for other collaborators). One subdirectory per project,11symlinked into that project's checkout as `notes/`.1213## What to write1415The point of this repo: let future-you (or an agent) retrospectively reconstruct *why* the code16looks the way it does, without re-deriving it from a diff. Prioritize, roughly in this order:1718- **Design decisions and tradeoffs** — why this approach over the alternatives considered, what19 was traded away, what would make you revisit the choice.20- **Research/investigation results** — what was tried, what was found, especially negative21 results (a dead end not recorded gets re-tried later).22- **Bugs and debugging** — root cause, the fixes attempted that *didn't* work and why (not just23 the one that did), and how the bug was actually diagnosed.24- **Development process/history** — the sequence major work happened in, when a plan changed25 mid-stream and why.26- **Anything not obvious from reading the code** — a hidden constraint, a workaround for a27 specific issue, a decision that would look arbitrary out of context.2829Don't log routine/mechanical changes (a rename, a formatting pass) — only what carries real30context. Full conventions (file structure, splitting large files, git workflow) live in31`~/notes/README.md` — read it before writing content.3233## Setting up notes for a project3435Determine `<Project>` — the directory name to use under `~/notes`. If the user supplied one, use36it. Otherwise default to the project's identity rather than the local checkout path: the repo name37from `git remote get-url origin`, or failing that the package/manifest name. If that disagrees38with the checkout dirname and neither is clearly authoritative, ask — awkward to rename later.3940Then:41421. `mkdir -p ~/notes/<Project>` (don't re-init `~/notes` if `~/notes/.git` already exists).432. If `~/notes/<Project>/README.md` doesn't exist, create a short index (purpose + a44 `file — what it covers` table once there are files); match an existing project dir's style.453. Symlink it in, computing the real relative path rather than assuming siblings:46 ```bash47 cd <repo> && ln -s "$(python3 -c "import os; print(os.path.relpath(os.path.expanduser('~/notes/<Project>'), '.'))")" notes48 ```49 Verify with `readlink notes` / `ls notes`.504. Add `notes` (no trailing slash — `notes/` won't match a symlink) to `<repo>/.gitignore`.515. Don't commit/push the symlink itself, and don't add a "read notes first" pointer to the user's52 global `CLAUDE.md` — the user points agents to `notes/` explicitly when relevant.536. `git add`/`commit`/`push` inside `~/notes` (not `<repo>`) after content changes.5455## Using notes in an existing project5657If `<repo>/notes` already exists as a symlink, just read/write through it normally.