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
feat(map): put the panel in the content column and name cogit on every page
Erenec008e06a6f9
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex de45d92..d41dbfe 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,13 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).## [Unreleased]+### Changed+- The panel uses the map's centred 8-of-12 column, and every page names the product: "cogit" with its slogan "Cogito, ergo commit." opens the top bar, and on a served map it leads back to the panel.+### Fixed- The git hooks work without a `cogit` on PATH (a plugin-only install): the hook block falls back to the CLI that installed it, run with `node`, and does nothing — no "command not found" — when neither is there; each prompt points an existing block at the current CLI, so a plugin update does not break it. `cogit hooks install` adds or refreshes the blocks by hand.- The `Thought:` trailer is added in every project, also when the record stays out of git, so `blame` and `show <sha>` follow the exact link locally; only the record staging follows the commit policy. `init`, `cogit config git` and the rename migration install the hooks for both policies.- The first code commit carries `.cogit/project.json` and `.cogit/.gitignore` with the session record, so a clone gets the project and the local-state rules, not only the sessions.- `cogit show <sha>` for a commit whose thought is not recorded yet names that thought instead of "no recorded thought"; `cogit open` no longer reuses a map server of another cogit version (the server's health reports its version and an outdated one is asked to stop); the minimap hides on a narrow map instead of covering the messages; the setting reads "Record every N turns".-## [0.12.0] - 2026-10-26### Added- The record format is now an open contract: `docs/format.md` documents the `.cogit/` layout, the session file and events log, the canonical message id, parents/links/branches, the conversation store, `HEAD`, the `Thought:` trailer and schema versioning, with JSON Schemas generated from the zod schemas into `docs/schema/` (`npm run schemas`; a test fails when they drift). Everything Claude Code-specific — finding and reading transcripts, parsing hook payloads, the record skill's slash name and permission rule, transcript retention — now sits behind an `AgentAdapter` in `packages/cli/src/agents/` with one implementation, `claude`; no behaviour change.diff --git a/packages/template/src/App.tsx b/packages/template/src/App.tsxindex 82804f8..826bdbc 100644--- a/packages/template/src/App.tsx+++ b/packages/template/src/App.tsx@@ -7,6 +7,7 @@ import {searchLineage,stepHitIndex,} from "../../cli/src/view/search.js";+import { Brand } from "./Brand.js";import { formatTime } from "./format.js";import { Graph } from "./Graph.js";import { type MapSearchState, SearchBox } from "./MapSearch.js";@@ -53,6 +54,7 @@ export function App({ model }: { model: LineageViewModel }) {<main className="map-page"><div className="page-head"><div className="page-bar">+ <Brand /><ProjectSwitcher model={model} /><SearchBox value={query} state={search} onQuery={change} onStep={move} onClear={clear} /><SettingsButton settings={model.settings} />diff --git a/packages/template/src/Brand.tsx b/packages/template/src/Brand.tsxnew file mode 100644index 0000000..d3d1a4f--- /dev/null+++ b/packages/template/src/Brand.tsx@@ -0,0 +1,24 @@+import { isLivePage } from "./data.js";++/**+ * The product name in the top bar of every page. On a map served by the local+ * server it leads back to the panel; elsewhere it is plain text.+ */+export function Brand({ home = false }: { home?: boolean }) {+ const label = (+ <>+ cogit<span className="brand-tagline">Cogito, ergo commit.</span>+ </>+ );+ if (home || !isLivePage())+ return (+ <span className="brand" aria-label="cogit">+ {label}+ </span>+ );+ return (+ <a className="brand" href="/" aria-label="cogit: all projects">+ {label}+ </a>+ );+}diff --git a/packages/template/src/Panel.tsx b/packages/template/src/Panel.tsxindex 2e34d42..9768167 100644--- a/packages/template/src/Panel.tsx+++ b/packages/template/src/Panel.tsx@@ -1,4 +1,5 @@import type { PanelProject, PanelViewModel } from "../../cli/src/view/model.js";+import { Brand } from "./Brand.js";import { isLivePage } from "./data.js";import { formatTime } from "./format.js";import { SettingsButton } from "./SettingsModal.js";@@ -14,7 +15,10 @@ function mapHref(project: PanelProject): string | null {export function Panel({ model }: { model: PanelViewModel }) {return (- <main>+ <main className="panel-page">+ <div className="page-bar">+ <Brand home />+ </div><header className="project"><div><h1>Projects</h1>diff --git a/packages/template/src/styles.css b/packages/template/src/styles.cssindex 00e25c0..8d6a5c2 100644--- a/packages/template/src/styles.css+++ b/packages/template/src/styles.css@@ -112,6 +112,45 @@ main {padding: 32px 24px 64px;}+/* The panel uses the same centred 8-of-12 column as the map. */+main.panel-page {+ width: 66.667%;+ margin-right: auto;+ margin-left: auto;+ padding-right: 0;+ padding-left: 0;+}++.panel-page .page-bar {+ margin-bottom: 20px;+}++/* The product name, first in the top bar of every page. */+.brand {+ display: inline-flex;+ flex: none;+ flex-direction: column;+ align-self: center;+ color: var(--text);+ font-size: 20px;+ font-weight: 700;+ letter-spacing: -0.02em;+ line-height: 1.1;+ text-decoration: none;+}++.brand-tagline {+ color: var(--muted);+ font-size: 11px;+ font-style: italic;+ font-weight: 400;+ letter-spacing: 0;+}++a.brand:hover .brand-tagline {+ color: var(--text);+}+/* The map page: head on top, map fills the rest of the window. */main.map-page {display: flex;@@ -159,6 +198,12 @@ main.map-page {.map-page .lineage-map {width: 100%;}++ main.panel-page {+ width: 100%;+ padding-right: 16px;+ padding-left: 16px;+ }}/* The head spans the window like the map below it. */diff --git a/packages/template/test/brand.test.ts b/packages/template/test/brand.test.tsnew file mode 100644index 0000000..306c962--- /dev/null+++ b/packages/template/test/brand.test.ts@@ -0,0 +1,30 @@+import { createElement } from "react";+import { renderToStaticMarkup } from "react-dom/server";+import { afterEach, describe, expect, it } from "vitest";+import { Brand } from "../src/Brand.js";++/** A stand-in document: only the live-page meta lookup is read. */+function fakeDocument(live: boolean): void {+ (globalThis as { document?: unknown }).document = {+ querySelector: () => (live ? {} : null),+ };+}++describe("Brand", () => {+ afterEach(() => {+ delete (globalThis as { document?: unknown }).document;+ });++ it("names the product with its slogan on the panel, as plain text", () => {+ const html = renderToStaticMarkup(createElement(Brand, { home: true }));+ expect(html).toContain('<span class="brand" aria-label="cogit">cogit');+ expect(html).toContain("Cogito, ergo commit.");+ });++ it("leads back to the panel from a served map, not from a file", () => {+ fakeDocument(true);+ expect(renderToStaticMarkup(createElement(Brand))).toContain('<a class="brand" href="/"');+ fakeDocument(false);+ expect(renderToStaticMarkup(createElement(Brand))).toContain('<span class="brand"');+ });+});diff --git a/packages/template/test/layout.test.ts b/packages/template/test/layout.test.tsindex d576893..650ddef 100644--- a/packages/template/test/layout.test.ts+++ b/packages/template/test/layout.test.ts@@ -76,6 +76,12 @@ describe("map layout (Story 9.2)", () => {expect(narrow).toMatch(/\.map-page \.page-head,[\s\S]*?width:\s*100%/);});+ it("puts the panel in the same 8-of-12 column", () => {+ expect(value("main.panel-page", "width")).toBe("66.667%");+ const narrow = css.match(/@media \(max-width: 1100px\)\s*\{([\s\S]*?)\n\}/)?.[1] ?? "";+ expect(narrow).toMatch(/main\.panel-page\s*\{[^}]*width:\s*100%[^}]*padding-right:\s*16px/);+ });+it("gives the page one scroller: the map fills the rest of the window", () => {expect(value("html, body, #root", "height")).toBe("100%");expect(declarations("body:has(.map-page)")).toMatch(/overflow:\s*hidden/);diff --git a/packages/template/test/panel.test.ts b/packages/template/test/panel.test.tsindex 6b63990..7f7b32b 100644--- a/packages/template/test/panel.test.ts+++ b/packages/template/test/panel.test.ts@@ -31,5 +31,7 @@ describe("Panel", () => {expect(html).toContain("Settings");expect(html).not.toContain('aria-label="Settings"');expect(html).not.toContain("Read-only; change them with");+ expect(html).toContain('<main class="panel-page">');+ expect(html).toContain('class="brand"');});});