Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .coldstart/notebook/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
notes/
.metrics/
index.html
.worklist.md
.worklist.json
.worklist-*.md
.worklist-*.json
.capture-instructions.md
16 changes: 16 additions & 0 deletions .coldstart/notebook/.raw/adding-a-post-to-the-coldstart-blog.jsonl

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"title":"blog posts chain via a hand-maintained circular next field","identityAliases":["blog next field","post navigation chain","next post link"],"summary":"Every blog post's `next` frontmatter field is a manually-authored pointer to another post's slug, and across the whole collection these links form exactly one closed loop (not derived from publishDate order, not validated at build time) that renders as the 'Next' link at the bottom of each post page.","steps":[{"path":"site-astro/src/content/config.ts","role":"declares `next` as an optional plain string on the blog collection schema; nothing here checks that the value is a real, existing slug"},{"path":"site-astro/src/content/blog/why-most-token-savings-tools-lie.md","role":"one link in the loop; its `next` was repointed this session to splice a newly added post in after it, instead of straight to its old target"},{"path":"site-astro/src/content/blog/how-your-own-benchmark-lies-to-you-first.md","role":"new post spliced into the loop; its own `next` was set to the old target of the post before it, so the loop closes again with one more link"}],"invariants":["the `next` chain across ALL posts must form exactly one closed loop with no missing or duplicate slug — inserting or removing a post means re-pointing the neighboring post(s) by hand, not just adding/deleting the one file","`next` values are raw slugs, unvalidated against real content-collection entries at build time — a stale slug after a rename or delete fails silently (a dead 'Next' link) rather than failing the build"],"verified":["site-astro/src/content/config.ts","site-astro/src/content/blog/why-most-token-savings-tools-lie.md","site-astro/src/content/blog/how-your-own-benchmark-lies-to-you-first.md"],"id":"blog-posts-chain-via-a-hand-maintained-circular-next-field","type":"flow","op":"put","v":1,"ts":"2026-08-08T11:38:38.740Z","head":"d68a17c3afc5","anchors":[{"path":"site-astro/src/content/config.ts","hash":"sha256:4508d7ae272e","head":"d68a17c3afc5"},{"path":"site-astro/src/content/blog/why-most-token-savings-tools-lie.md","hash":"sha256:308716b65de7","head":"d68a17c3afc5"},{"path":"site-astro/src/content/blog/how-your-own-benchmark-lies-to-you-first.md","hash":"sha256:8a4f613d59c4","head":"d68a17c3afc5"}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"summary":"The /capture-notes command: its `!`-prefixed bash line passes ${CLAUDE_SESSION_ID} to kb-elicit.mjs --manual --session, which is the proof (used this session while building an unrelated plugin) that Claude Code substitutes a command's own session id into its bash execution body even though this isn't documented for slash commands generally — see the '${CLAUDE_SESSION_ID}' flow note.","identityAliases":["capture notes command","manual capture invocation"],"incidentAliases":[],"id":"claude-commands-capture-notes-md-3f9e019a","type":"file","op":"put","anchors":[{"path":".claude/commands/capture-notes.md","hash":"sha256:c2dbcaf67055","head":"af19d7cf59b6"}],"verified":[".claude/commands/capture-notes.md"],"character":"single","v":1,"ts":"2026-08-11T04:28:44.595Z","head":"af19d7cf59b6"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"summary":"New Phase-0/1 spike for a standalone token-consumption-tracker plugin: stream-parses the current session's transcript JSONL (assistant records' message.usage) to sum real token counts, with a turn-level (not call-level) coldstart-attribution pass keyed on tool names starting with mcp__coldstart__. Derives its own transcript path deterministically — cwd-encoded (each \"/\" and \".\" replaced with \"-\", confirmed against a real ~/.claude/projects dir name) plus an exact session id passed in by the caller, never a \"most recently modified file\" guess. Validated this session: output matched a manual jq sum over this session's own live transcript exactly.","identityAliases":["token usage parser","transcript token counter","cwd path encoding"],"incidentAliases":[],"anchors":[{"path":".claude/worktrees/token-consumption-tracker/token-consumption-tracker/scripts/usage.mjs","symbols":["encodeCwd","transcriptPathFor","main"],"hash":"sha256:84a8f33b46ed","head":"af19d7cf59b6"}],"id":"claude-worktrees-token-consumption-tracker-token-consumption-4bc9d206","type":"file","op":"put","verified":[".claude/worktrees/token-consumption-tracker/token-consumption-tracker/scripts/usage.mjs"],"character":"single","v":1,"ts":"2026-08-11T04:28:44.561Z","head":"af19d7cf59b6"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"summary":"Documents the token-consumption-tracker plugin prototype's open caveats, verified this session by grepping real ~/.claude/projects/*.jsonl transcripts directly: /clear leaves no queryable trace inside the transcript JSONL (no SessionStart/clear record is ever written to the file, even though a SessionStart hook fires with source=\"clear\") even though it also confirmed /clear does not start a new transcript file — so v1 sums the whole session file rather than tracking a clear boundary, deferring a hook-based precision fix.","identityAliases":["plugin design caveats","clear boundary limitation","token tracker readme"],"incidentAliases":[],"id":"claude-worktrees-token-consumption-tracker-token-consumption-63c61af9","type":"file","op":"put","anchors":[{"path":".claude/worktrees/token-consumption-tracker/token-consumption-tracker/README.md","hash":"sha256:dc6277333e9e","head":"af19d7cf59b6"}],"verified":[".claude/worktrees/token-consumption-tracker/token-consumption-tracker/README.md"],"character":"single","v":1,"ts":"2026-08-11T04:28:44.584Z","head":"af19d7cf59b6"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"summary":"The /token-consumption slash command for the token-consumption-tracker plugin prototype. Its `!`-prefixed bash execution invokes scripts/usage.mjs with ${CLAUDE_SESSION_ID} and $(pwd) — see the '${CLAUDE_SESSION_ID}' flow note for why that substitution works despite not being documented for slash commands.","identityAliases":["token consumption command","slash command plugin"],"incidentAliases":[],"id":"claude-worktrees-token-consumption-tracker-token-consumption-72bc87ba","type":"file","op":"put","anchors":[{"path":".claude/worktrees/token-consumption-tracker/token-consumption-tracker/commands/token-consumption.md","hash":"sha256:3c855346ac97","head":"af19d7cf59b6"}],"verified":[".claude/worktrees/token-consumption-tracker/token-consumption-tracker/commands/token-consumption.md"],"character":"single","v":1,"ts":"2026-08-11T04:28:44.573Z","head":"af19d7cf59b6"}
8 changes: 8 additions & 0 deletions .coldstart/notebook/.raw/dockerfile-6651ddff.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{"summary":"Exists ONLY so MCP directory build sandboxes (Glama) can boot the server and run the introspection exchange — it is not a supported way to run coldstart, which is repo-local and needs a repository a container does not have. Two deliberate choices that look like mistakes: `npm ci --ignore-scripts` is there because the sole postinstall in the tree is @vscode/ripgrep downloading a prebuilt binary from GitHub, which network-restricted sandboxes may block — coldstart resolves a searcher at runtime and degrades to git grep/grep/Node scan, and this session confirmed a clean install leaves @vscode/ripgrep with no bin/ directory while the server still builds and answers; and `.dockerignore` excludes node_modules so the later `COPY . .` cannot clobber the modules from the npm ci layer. `npm prune --omit=dev` after the build was verified safe (53 packages dropped, all six tools still returned).","aliases":["glama build failed","no glama release","docker build sandbox","ripgrep postinstall download","ignore-scripts","npm prune omit dev broke the server","COPY clobbers node_modules"],"id":"dockerfile-6651ddff","type":"file","op":"put","anchors":[{"path":"Dockerfile","hash":"sha256:6a07ad14a17d","head":"f6e791255b01"}],"verified":["Dockerfile"],"character":"single","v":1,"ts":"2026-07-24T15:01:41.120Z","head":"f6e791255b01"}
{"summary":"unchanged","id":"dockerfile-6651ddff","type":"file","op":"put","anchors":[{"path":"Dockerfile","hash":"sha256:6a07ad14a17d","head":"8b913ea639cd"}],"verified":["Dockerfile"],"character":"single","v":1,"ts":"2026-08-01T16:48:53.243Z","head":"8b913ea639cd"}
{"summary":"Exists ONLY so MCP directory build sandboxes (Glama) can boot the server and run the introspection exchange — it is not a supported way to run coldstart, which is repo-local and needs a repository a container does not have. Two deliberate choices that look like mistakes: `npm ci --ignore-scripts` is there because the sole postinstall in the tree is @vscode/ripgrep downloading a prebuilt binary from GitHub, which network-restricted sandboxes may block — coldstart resolves a searcher at runtime and degrades to git grep/grep/Node scan, and this session confirmed a clean install leaves @vscode/ripgrep with no bin/ directory while the server still builds and answers; and `.dockerignore` excludes node_modules so the later `COPY . .` cannot clobber the modules from the npm ci layer. `npm prune --omit=dev` after the build was verified safe (53 packages dropped, all six tools still returned).","id":"dockerfile-6651ddff","type":"file","op":"put","anchors":[{"path":"Dockerfile","hash":"sha256:6a07ad14a17d","head":"8b913ea639cd"}],"verified":["Dockerfile"],"character":"single","v":1,"ts":"2026-08-01T16:49:11.893Z","head":"8b913ea639cd"}
{"target":{"kind":"alias","key":"glama build failed"},"reason":"symptom-shaped incident wording","id":"dockerfile-6651ddff","type":"file","op":"retract","v":1,"ts":"2026-08-02T17:17:07.858Z","head":"bc2fe2ab8c2d"}
{"target":{"kind":"alias","key":"no glama release"},"reason":"symptom-shaped incident wording","id":"dockerfile-6651ddff","type":"file","op":"retract","v":1,"ts":"2026-08-02T17:17:07.987Z","head":"bc2fe2ab8c2d"}
{"target":{"kind":"alias","key":"npm prune omit dev broke the server"},"reason":"describes a hypothesis verified FALSE this session, not current identity","id":"dockerfile-6651ddff","type":"file","op":"retract","v":1,"ts":"2026-08-02T17:17:08.109Z","head":"bc2fe2ab8c2d"}
{"target":{"kind":"alias","key":"COPY clobbers node_modules"},"reason":"describes a risk guarded against, not current behavior; symptom-shaped","id":"dockerfile-6651ddff","type":"file","op":"retract","v":1,"ts":"2026-08-02T17:17:08.236Z","head":"bc2fe2ab8c2d"}
{"aliasesVerified":true,"id":"dockerfile-6651ddff","type":"file","op":"put","anchors":[{"path":"Dockerfile"}],"verified":[],"v":1,"ts":"2026-08-02T18:19:44.221Z","head":"8d5cc74d3cb9"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"title":"docs pages share a hand-duplicated sidebar scrollspy script, not an import","identityAliases":["docs sidebar scrollspy script","sidebar active section highlight","duplicated docs script","docs sidebar highlight mechanism"],"incidentAliases":["last sidebar item never highlighted","sidebar highlight stuck wrong item","docs sidebar highlight bug"],"summary":"The sidebar active-section highlight script on the 4 docs pages (docs.astro, docs/navigation.astro, docs/notebook.astro, docs/under-the-hood.astro) is copy-pasted verbatim into each page's own closing <script> block, not extracted into a shared component or module — so any behavior change or bug fix has to be hand-applied to all 4 files identically. Verified this session while fixing a bug where the previous IntersectionObserver version (rootMargin '-70px 0px -70% 0px', i.e. a trigger band covering only the top ~30% of the viewport) never highlighted the LAST section's sidebar link on normal/large screens: a short last section's heading could stop being scrolled toward (footer below it, or the user simply stopping once it's comfortably in view) before its top ever crossed into that narrow band. Replaced the mechanism in all 4 files with a scroll/resize-driven position check that walks sections top-to-bottom and marks active the last one whose top has crossed a fixed offset line (70px + 30% of viewport height) — same visual trigger point as before, but not dependent on an element re-entering a band, so the last section reliably activates once scrolled to, regardless of footer height or viewport size.","steps":[{"path":"site-astro/src/pages/docs.astro","symbols":["setActive"],"role":"one of 4 duplicate copies of the scrollspy script"},{"path":"site-astro/src/pages/docs/navigation.astro","symbols":["setActive"],"role":"duplicate copy"},{"path":"site-astro/src/pages/docs/notebook.astro","symbols":["setActive"],"role":"duplicate copy"},{"path":"site-astro/src/pages/docs/under-the-hood.astro","symbols":["setActive"],"role":"duplicate copy"}],"invariants":["The script is not shared via import or component — changing scrollspy behavior means editing all 4 files identically, or a future page will silently regress.","The offset (70px + 30% of viewport height) intentionally mirrors the old IntersectionObserver's visual crossing point, so the highlight timing feels unchanged even though the mechanism is now scroll-position-based, not intersection-based."],"verified":["site-astro/src/pages/docs.astro","site-astro/src/pages/docs/navigation.astro","site-astro/src/pages/docs/notebook.astro","site-astro/src/pages/docs/under-the-hood.astro"],"id":"docs-pages-share-a-hand-duplicated-sidebar-scrollspy-script","type":"flow","op":"put","v":1,"ts":"2026-08-16T16:51:41.501Z","head":"5ddc264e056c","anchors":[{"path":"site-astro/src/pages/docs.astro","hash":"sha256:9faa0af4d67d","head":"5ddc264e056c"},{"path":"site-astro/src/pages/docs/navigation.astro","hash":"sha256:76baa0869608","head":"5ddc264e056c"},{"path":"site-astro/src/pages/docs/notebook.astro","hash":"sha256:b28346763f30","head":"5ddc264e056c"},{"path":"site-astro/src/pages/docs/under-the-hood.astro","hash":"sha256:7eeb7e9309f7","head":"5ddc264e056c"}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"summary":"CI workflow running build+test on ubuntu-latest and windows-latest (matrix added in #159, after ubuntu-only CI hid months of Windows-only bugs). Requires an explicit top-level `permissions: contents: read` block — its absence trips CodeQL's actions/missing-workflow-permissions check; the workflow only checks out/builds/tests so read-only is correct, matching the same block in verify-149-windows-hide.yml.","identityAliases":["CI workflow","GitHub Actions permissions","workflow permissions block"],"incidentAliases":["missing workflow permissions","codeql workflow alert","actions permissions warning"],"anchors":[{"path":".github/workflows/ci.yml","hash":"sha256:c93991865d01","head":"59d96aefe568"}],"id":"github-workflows-ci-yml-899ce9c2","type":"file","op":"put","verified":[".github/workflows/ci.yml"],"character":"single","v":1,"ts":"2026-08-25T16:34:51.684Z","head":"59d96aefe568"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{"summary":"Publishes the package to npm. Triggers on `release: types: [created]` — NOT on a push or a tag by itself, so a `gh release create` (or the GitHub UI 'create release' action) is what actually fires it, not `git push --tags` alone. It does NOT run the test suite before publishing (no `npm test` step) — checkout, `npm ci`, `npm run build`, then `npm publish --provenance --access public` reading `NODE_AUTH_TOKEN` from the `NPM_TOKEN` secret. `--access public` is required alongside `--provenance` or npm refuses to generate provenance for what it would otherwise create as a private/restricted scoped package.","identityAliases":["npm publish workflow","release trigger","publish to npm ci"],"incidentAliases":[],"id":"github-workflows-npm-publish-yml-af3dbc50","type":"file","op":"put","anchors":[{"path":".github/workflows/npm-publish.yml","hash":"sha256:cccb7702c319","head":"cb160c485407"}],"verified":[".github/workflows/npm-publish.yml"],"character":"single","v":1,"ts":"2026-08-02T17:09:54.937Z","head":"cb160c485407"}
{"aliasesVerified":true,"id":"github-workflows-npm-publish-yml-af3dbc50","type":"file","op":"put","anchors":[{"path":".github/workflows/npm-publish.yml"}],"verified":[],"v":1,"ts":"2026-08-02T18:19:44.232Z","head":"8d5cc74d3cb9"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{"summary":"Builds site-astro and deploys it to GitHub Pages on pushes touching site-astro/** (or this file). The actions/checkout step carries an explicit `fetch-depth: 0` that is load-bearing rather than cosmetic: astro.config.mjs derives the sitemap's <lastmod> from per-file git history, and checkout's default shallow clone would silently reduce that to one uniform date. Deploy is fail-safe — if the build errors, deploy-pages never runs and the live site is left untouched.","identityAliases":["pages deploy workflow","github pages build","site deploy ci","fetch-depth checkout"],"incidentAliases":["sitemap lastmod wrong in ci","shallow clone build"],"anchors":[{"path":".github/workflows/pages.yml","symbols":["deploy"],"hash":"sha256:273b39654c8a","head":"b9623939e7cd"}],"id":"github-workflows-pages-yml-80c02bfb","type":"file","op":"put","verified":[".github/workflows/pages.yml"],"character":"single","v":1,"ts":"2026-08-09T17:41:18.462Z","head":"b9623939e7cd"}
{"identityAliases":["pages deploy workflow","github pages build","site deploy ci","fetch-depth checkout","notebook graph regen ci"],"incidentAliases":["site notebook page stale","graph page out of date after push"],"summary":"Builds site-astro and deploys it to GitHub Pages. Beyond the site-astro build, the job now also builds the root coldstart package, runs `coldstart index --root .` to get a fresh code index for this checkout, and regenerates site-astro/src/{notebook,graph}-page.html (scripts/kb-viewer and scripts/graph-viewer build-site-page.mjs) BEFORE the astro build step, so every deploy bakes current notebook/graph content instead of relying on a manually-regenerated snapshot (see the how-the-sitemap-gets-its-lastmod-dates and how-the-site's-notebook-and-graph-pages-stay-fresh-after-a-push flows for why fetch-depth:0 and this ordering matter). The push trigger's `paths` filter was widened from just site-astro/** to also include src/**, .coldstart/notebook/**, scripts/kb-viewer/**, and scripts/graph-viewer/**, since a notebook-only or source-only push now changes deployed output too.","anchors":[{"path":".github/workflows/pages.yml","symbols":["deploy"],"hash":"sha256:d4787cf44eab","head":"d50efe68cdc6"}],"id":"github-workflows-pages-yml-80c02bfb","type":"file","op":"put","verified":[".github/workflows/pages.yml"],"character":"single","v":1,"ts":"2026-08-26T19:53:19.331Z","head":"d50efe68cdc6"}
Loading
Loading