Git for the intent behind agent-written code. Records what your coding agent decided and why, and links every commit to it.
JavaScript ai-codingclaudeclaude-codeclaude-code-pluginclicoding-agentsdeveloper-toolsgitllmtypescript
docs: a gallery of the map, a Shape and Tasks
Eren5f5b05e26dd8
diff --git a/README.md b/README.mdindex b844663..65b1855 100644--- a/README.md+++ b/README.md@@ -6,13 +6,26 @@ Git remembers what changed. cogit remembers why.<p align="center"><img src="docs/images/cogit-descartes.jpg" width="360" alt="René Descartes with git branches running through his hair"><br><i>Cogito, ergo commit.</i></p>-<img src="docs/images/demo.gif" alt="cogit open shows the map; a session's card explains the work, its Shape draws the flow, the Tasks list holds what was left undone, and cogit why answers for a line of code">-cogit records every message you send to an AI coding agent as a *thought commit*: what youasked, what came of it, and the message it answered. Your code commits point back to thethought behind them, so `git log` tells you what changed and cogit tells you why. It works withClaude Code today.+<img src="docs/images/map.png" alt="The map: sessions as a git graph, each with its messages, branches, commit chips and a left off here marker">++*Your sessions as a git graph — one row per message, the decision behind it, and where you left+off.*++<img src="docs/images/shape.png" alt="A message opened on its Shape tab: a flowchart of what the change does, under the tabs Intent, Shape and Code">++*A message that landed commits opens as Intent, Shape and Code: why it happened, a picture of+what the change does, and the diff.*++<img src="docs/images/tasks.png" alt="The Tasks panel: suggested items with Accept and Dismiss, open items with Done, and a Done section">++*Tasks — what your sessions left undone, drafted when a session closes. You accept, dismiss or+close each one.*+## What it does- **Every message becomes a thought commit**: the question, the outcome, the decisions withdiff --git a/docs/guide/map.md b/docs/guide/map.mdindex faa8b7d..225f9ef 100644--- a/docs/guide/map.md+++ b/docs/guide/map.md@@ -19,10 +19,7 @@ The panel lists every project `cogit init` set up on this machine. A project whowas deleted or moved stays as a card marked "missing"; `cogit config prune` removes those(`--dry-run` lists them first).-<picture>- <source media="(prefers-color-scheme: dark)" srcset="../images/map-dark.png">- <img src="../images/map-light.png" alt="The map: sessions as branches, each message's commits and where the work left off">-</picture>+<img src="../images/map.png" alt="The map: sessions as branches, each message's commits and where the work left off">## Sessions and branchesdiff --git a/docs/images/map.png b/docs/images/map.pngnew file mode 100644index 0000000..151d40aBinary files /dev/null and b/docs/images/map.png differdiff --git a/docs/images/shape.png b/docs/images/shape.pngnew file mode 100644index 0000000..799aa86Binary files /dev/null and b/docs/images/shape.png differdiff --git a/docs/images/tasks.png b/docs/images/tasks.pngnew file mode 100644index 0000000..95b8ad7Binary files /dev/null and b/docs/images/tasks.png differdiff --git a/packages/cli/test/plugin-manifest.test.ts b/packages/cli/test/plugin-manifest.test.tsindex 9008a94..0aafa1e 100644--- a/packages/cli/test/plugin-manifest.test.ts+++ b/packages/cli/test/plugin-manifest.test.ts@@ -60,12 +60,14 @@ describe("plugin packaging", () => {it("keeps a README that shows the map and points at the guide and licence", async () => {const readme = await readFile(new URL("../../../README.md", import.meta.url), "utf8");- // The demo recording; the per-theme screenshots stay in the map guide.- expect(readme).toContain('src="docs/images/demo.gif"');+ // The feature gallery: the map, a message's Shape and the Tasks panel.+ for (const shot of ["map.png", "shape.png", "tasks.png"]) {+ expect(readme).toContain(`src="docs/images/${shot}"`);+ }expect(readme).toContain("(docs/guide/getting-started.md)");expect(readme).toContain("(LICENSE)");// A relative image only renders when the file it names is in the repository.- for (const image of ["demo.gif", "map-dark.png", "map-light.png"]) {+ for (const image of ["map.png", "shape.png", "tasks.png"]) {await expect(access(new URL(`../../../docs/images/${image}`, import.meta.url)),).resolves.toBeUndefined();diff --git a/packages/template/src/fixture.ts b/packages/template/src/fixture.tsindex c80a504..b144878 100644--- a/packages/template/src/fixture.ts+++ b/packages/template/src/fixture.ts@@ -95,21 +95,32 @@ export const fixture: LineageViewModel = {alternatives: [{ option: "fetch the JSON", why: "breaks over file://" }],}),message("m4", "Build the dev fixture", "m3", "2026-10-24T09:41:00.000Z", {- summary: "Three sessions in start order.",+ summary: "Three sessions in start order, enough to exercise every branch shape.",+ decidedBy: "agreed",+ alternatives: [+ {+ option: "ship the fixture as a separate JSON file",+ why: "the map has to stay one file",+ },+ { option: "mock the model in the tests instead", why: "it never draws the real graph" },+ ],commits: ["1a2b3c4", "9f8e7d6"],shape: {by: "side",commits: ["1a2b3c4", "9f8e7d6"],tools: [- {- kind: "pseudo",- valid: true,- text: "1. Read the fixture data\n2. Render the map from it\n3. Keep the page offline",- },{kind: "mermaid",valid: true,- text: "flowchart TD\n Fixture[fixture.ts] --> Map[App.tsx]\n Map --> DOM[cogit-data element]",+ text: [+ "flowchart TD",+ " F[fixture.ts] --> S[Three sessions, in start order]",+ " S --> L[Lay out the git rows]",+ " L --> G[Draw the graph]",+ " G --> C{Every message placed?}",+ " C -- yes --> R[Render the map]",+ " C -- no --> L",+ ].join("\n"),},],},@@ -313,6 +324,42 @@ export const fixture: LineageViewModel = {],},],+ // Story 15.1: the Tasks list, as the distiller writes it after a session.+ captures: [+ {+ id: "c1a2b3c4d",+ text: "Pick the graph layout that survives 500 nodes",+ state: "suggested",+ source: { sessionId: "fixture-template" },+ createdAt: "2026-10-24T11:42:00.000Z",+ updatedAt: "2026-10-24T11:42:00.000Z",+ },+ {+ id: "c2b3c4d5e",+ text: "Write the resume command copy fallback",+ state: "suggested",+ source: { sessionId: "fixture-template" },+ createdAt: "2026-10-24T10:20:00.000Z",+ updatedAt: "2026-10-24T10:20:00.000Z",+ },+ {+ id: "c3c4d5e6f",+ text: "Define what counts as an active session",+ state: "open",+ source: { sessionId: "fixture-unassigned" },+ createdAt: "2026-10-19T18:00:00.000Z",+ updatedAt: "2026-10-21T09:00:00.000Z",+ },+ {+ id: "c4d5e6f70",+ text: "Add the turn counter to the status card",+ state: "done",+ source: { sessionId: "fixture-capture" },+ createdAt: "2026-10-20T16:30:00.000Z",+ updatedAt: "2026-10-21T10:00:00.000Z",+ closedAt: "2026-10-21T10:00:00.000Z",+ },+ ],// Story 8.12: the switcher's data, as `build` collects it from the registry.switcher: [{