Skip to content

armgit / cogit

Public Imported from GitHub
0

Git for the intent behind agent-written code. Records what your coding agent decided and why, and links every commit to it.

feat(map): show the captured list as tasks

Erendf957a7652b0
diff --git a/README.md b/README.md
index 605ab0c..ca944df 100644
--- a/README.md
+++ b/README.md
@@ -25,8 +25,8 @@ Claude Code today.
- **Intent, Shape, Code**: a message that landed commits shows why it happened, a small
picture of what the change does (a diagram, a before/after or interface table, an example
or plain steps), and the diff, in one place.
-- **Captured work**: when a session ends, a small model drafts a few user-level items from
- what it left undone; you accept, dismiss or close them (`cogit captures`, and on the map).
+- **Tasks**: when a session ends, a small model drafts a few user-level items from what it
+ left undone; you accept, dismiss or close them (`cogit captures`, and on the map).
- **Pull request descriptions with the decisions**: `cogit pr` writes the goal, the
decisions and the rejected options, never the raw chat.
- **Teams share the record through git**: after a pull, your teammates' sessions are on the
diff --git a/docs/guide/map.md b/docs/guide/map.md
index 2254d8d..faa8b7d 100644
--- a/docs/guide/map.md
+++ b/docs/guide/map.md
@@ -127,10 +127,10 @@ The Files view lists every file a recorded message touched, most recently first,
count. Opening a file lists the messages that changed it; opening one of those jumps to it on
the map. In the terminal: `cogit log --file <path>` and `cogit why <path>`.
-## Captured work
+## Tasks
Working with an agent is improvised: things that would have been a plan's items get done,
-half-done or dropped along the way. The **Captured** list is a short, curated one. When a
+half-done or dropped along the way. The **Tasks** list is a short, curated one. When a
session ends, the side model reads what its record left open — the record's own pending items
first, with the open line of each branch summary and the last messages as supporting context —
and drafts at most three **user-level** items: something you asked for or the session left
@@ -139,22 +139,22 @@ is never drafted, even when an older branch line still calls it open, and the mo
invents a commit step, a test run, a status fact or a question a later message answered. A
session with nothing open costs no model call.
-Each drafted item waits in **To review** until you choose: **Accept** keeps it in **Open**,
+Each drafted item waits in **Suggested** until you choose: **Accept** keeps it in **Open**,
**Dismiss** closes it without doing it. An open item is closed with **Done**. The last ten
closed items stay under **Done (last 10)**. An item belongs to the whole session it came from,
not to one message. Clicking a session's row opens that session's card; the row also carries the
number of items the session stands for, whether it is expanded or folded. The arrow at the left
of the row is the one that opens and folds the session's messages, so the card never covers
-them. The card lists the items under **Captured work** with their state and age — read-only, so
-a stray click cannot close work; accepting, dismissing and closing stay in the Captured list. An item's source
+them. The card lists the items under **Tasks** with their state and age — read-only, so
+a stray click cannot close work; accepting, dismissing and closing stay in the Tasks list. An item's source
line in the list opens the session's **first message**. A session with no messages anchors
nowhere, and its items show only in the list. The model never reopens or rewrites an
item you already saw; closing is your act. In the terminal: `cogit captures`,
`cogit captures accept|dismiss|done <id>`, and `cogit captures distill [--session <id> | --all]
[--dry-run]` to backfill sessions by hand (`--dry-run` prints the proposals and writes nothing).
-It is not a task board: no assignment, no priority, no tracker state. The list lives in
-`.cogit/state/captures.json` on this machine and is never committed. The **Captured** button
+It is not a board: no columns, no assignment, no priority, no tracker state. The list lives in
+`.cogit/state/captures.json` on this machine and is never committed. The **Tasks** button
appears only while the setting is on and something waits or is open; with the setting off
(`cogit config set captures false`) nothing is drafted, the button hides, and items already in
the store are kept, not deleted.
diff --git a/docs/guide/settings.md b/docs/guide/settings.md
index ed67d83..3750219 100644
--- a/docs/guide/settings.md
+++ b/docs/guide/settings.md
@@ -56,13 +56,13 @@ Before the agent edits a file, it hears which options earlier thoughts tried and
For every message that landed commits, a small representation of what the change does: numbered plain-language steps or a Mermaid diagram. It sits between the record's intent (the decision, reason and rejected options) and the code (the diff), so a reviewer sees why, what and how in one place. The recorder writes it, not you; it costs one small model call per such message. Off, the map says so and nothing is written.
-### Captured work
+### Tasks
`captures` · default `true`
**A short list of what each session left undone, drafted by the side model.**
-When a session ends, the side model reads what its record left open and drafts at most three things a person would ask for, in the conversation's language. The list is yours: accept, dismiss or close each item. Sessions with nothing open cost no model call; the map's Captured button appears only while something waits or is open. Off, nothing is drafted and the list already in the store is kept, not deleted.
+When a session ends, the side model reads what its record left open and drafts at most three things a person would ask for, in the conversation's language. The list is yours: accept, dismiss or close each item. Sessions with nothing open cost no model call; the map's Tasks button appears only while something waits or is open. Off, nothing is drafted and the list already in the store is kept, not deleted.
### Language
diff --git a/packages/cli/src/view/settings.ts b/packages/cli/src/view/settings.ts
index 3f13c5a..fb9ba9e 100644
--- a/packages/cli/src/view/settings.ts
+++ b/packages/cli/src/view/settings.ts
@@ -120,13 +120,13 @@ const EDITABLE: FieldSpec[] = [
},
{
key: "captures",
- label: "Captured work",
+ label: "Tasks",
help: "A short list of what each session left undone, drafted by the side model.",
details:
"When a session ends, the side model reads what its record left open and drafts at " +
"most three things a person would ask for, in the conversation's language. The list " +
"is yours: accept, dismiss or close each item. Sessions with nothing open cost no " +
- "model call; the map's Captured button appears only while something waits or is open. " +
+ "model call; the map's Tasks button appears only while something waits or is open. " +
"Off, nothing is drafted and the list already in the store is kept, not deleted.",
kind: "boolean",
},
diff --git a/packages/template/src/CapturesView.tsx b/packages/template/src/CapturesView.tsx
index e2371ae..9a8239b 100644
--- a/packages/template/src/CapturesView.tsx
+++ b/packages/template/src/CapturesView.tsx
@@ -149,7 +149,12 @@ export function CapturesView({
onSelectSession(source.sessionId);
}}
>
- <span className="capture-text">{item.text}</span>
+ <span className="capture-text">
+ <span className="capture-task-mark" aria-hidden="true">
+ {item.state === "done" ? "✓" : "○"}
+ </span>
+ {item.text}
+ </span>
<span className="capture-meta">
<span className="capture-session">{source.sessionTitle}</span>
{source.label === undefined ? null : (
@@ -167,29 +172,28 @@ export function CapturesView({
const empty = review.length === 0 && open.length === 0 && done.length === 0;
return (
- <nav className="outline capture-view" aria-label="Captured work">
+ <nav className="outline capture-view" aria-label="Tasks">
<header className="outline-head capture-head">
- <span className="outline-title capture-title">Captured work</span>
+ <span className="outline-title capture-title">Tasks</span>
<span className="outline-badge capture-badge">{review.length + open.length}</span>
- <button
- type="button"
- className="drilldown-close"
- aria-label="Hide captured work"
- onClick={onClose}
- >
+ <button type="button" className="drilldown-close" aria-label="Hide tasks" onClick={onClose}>
×
</button>
</header>
- <p className="capture-note">A list you curate, not a plan cogit keeps.</p>
+ <p className="capture-note">What your sessions left undone — cogit drafts, you decide.</p>
{error === null ? null : <p className="muted capture-error">{error}</p>}
<div className="outline-scroll">
{empty ? (
- <p className="empty">No captured work.</p>
+ <p className="empty">
+ No tasks yet. When a session ends, cogit drafts what it left undone here.
+ </p>
) : (
<>
{review.length === 0 ? null : (
<section className="capture-section">
- <h3 className="capture-heading">To review</h3>
+ <h3 className="capture-heading">
+ Suggested <span className="capture-hint">· drafted at session close</span>
+ </h3>
<ul className="capture-list">
{review.map((item) =>
row(
diff --git a/packages/template/src/Graph.tsx b/packages/template/src/Graph.tsx
index d8d34ff..48048e4 100644
--- a/packages/template/src/Graph.tsx
+++ b/packages/template/src/Graph.tsx
@@ -670,7 +670,8 @@ function Flow({ model, search }: { model: LineageViewModel; search: MapSearchSta
const [sessionJumps, setSessionJumps] = useState(0);
const [sessionTarget, setSessionTarget] = useState<string | null>(null);
const sessionPoint = useMemo(
- () => (sessionTarget === null ? null : pointOfHit({ sessionId: sessionTarget, messageId: null })),
+ () =>
+ sessionTarget === null ? null : pointOfHit({ sessionId: sessionTarget, messageId: null }),
[sessionTarget, pointOfHit],
);
const sessionJump = useMemo(
@@ -837,14 +838,14 @@ function Flow({ model, search }: { model: LineageViewModel; search: MapSearchSta
type="button"
className="outline-button capture-button"
aria-pressed={showCaptures}
- title="A list you curate: what the sessions left undone"
+ title="Tasks: what your sessions left undone — cogit drafts, you decide"
onClick={() => {
setShowCaptures((value) => !value);
setShowFiles(false);
setShowOutline(false);
}}
>
- {showCaptures ? "Hide captured" : "Captured"}
+ {showCaptures ? "Hide tasks" : "Tasks"}
</button>
) : null}
</div>
diff --git a/packages/template/src/SidePanel.tsx b/packages/template/src/SidePanel.tsx
index f51ee96..e6903ef 100644
--- a/packages/template/src/SidePanel.tsx
+++ b/packages/template/src/SidePanel.tsx
@@ -110,7 +110,7 @@ function Field({ label, children }: { label: string; children: React.ReactNode }
}
const CAPTURE_STATE_LABEL = {
- suggested: "To review",
+ suggested: "Suggested",
open: "Open",
done: "Done",
dismissed: "Dismissed",
@@ -138,7 +138,7 @@ function CapturedWork({ items, reveal = 0 }: { items: readonly ViewCapture[]; re
return (
<section className="captured-work" ref={section}>
<h3>
- Captured work <span className="count">{shown.length}</span>
+ Tasks <span className="count">{shown.length}</span>
</h3>
<ul className="drilldown-list capture-here-list">
{shown.map((item) => {
diff --git a/packages/template/src/styles.css b/packages/template/src/styles.css
index eb96bf3..0de214f 100644
--- a/packages/template/src/styles.css
+++ b/packages/template/src/styles.css
@@ -1195,6 +1195,12 @@ body:has(.map-shell.is-expanded) {
font-size: 11px;
}
+/* A task marker, so the list reads as tasks, not as message rows. */
+.capture-task-mark {
+ margin-right: 6px;
+ color: var(--muted);
+}
+
.capture-list {
margin: 0;
padding: 0 4px;
@@ -1218,6 +1224,13 @@ body:has(.map-shell.is-expanded) {
cursor: pointer;
}
+/* The note after a section heading: same line, not a second uppercase label. */
+.capture-hint {
+ text-transform: none;
+ font-weight: 400;
+ letter-spacing: 0;
+}
+
.capture-row {
display: flex;
align-items: flex-start;
diff --git a/packages/template/test/captures-view.test.tsx b/packages/template/test/captures-view.test.tsx
index 63a23f7..69a5fdc 100644
--- a/packages/template/test/captures-view.test.tsx
+++ b/packages/template/test/captures-view.test.tsx
@@ -54,9 +54,9 @@ function render(captures: ViewCapture[] | undefined, sessionsFor = sessions): st
describe("CapturesView", () => {
it("shows the three sections with their buttons", () => {
const html = render(items);
- expect(html).toContain("Captured work");
- expect(html).toContain("A list you curate, not a plan cogit keeps.");
- expect(html).toContain("To review");
+ expect(html).toContain("Tasks");
+ expect(html).toContain("What your sessions left undone — cogit drafts, you decide.");
+ expect(html).toContain("Suggested");
expect(html).toContain("Open");
expect(html).toContain("Done (last 10)");
expect(html).toContain("decide the error format");
@@ -71,8 +71,8 @@ describe("CapturesView", () => {
});
it("is empty when nothing was drafted", () => {
- expect(render(undefined)).toContain("No captured work.");
- expect(render([item({ id: "c00000009", state: "dismissed" })])).toContain("No captured work.");
+ expect(render(undefined)).toContain("No tasks yet.");
+ expect(render([item({ id: "c00000009", state: "dismissed" })])).toContain("No tasks yet.");
});
it("opens the session's card, and only a missing session cannot be opened", () => {
@@ -88,7 +88,7 @@ describe("CapturesView", () => {
});
});
-describe("the Captured button", () => {
+describe("the Tasks button", () => {
it("shows only while the setting is on and something waits or is open", () => {
expect(capturesButtonVisible(items, true)).toBe(true);
expect(capturesButtonVisible(items, undefined)).toBe(true);
diff --git a/packages/template/test/session-git.test.ts b/packages/template/test/session-git.test.ts
index 33dbad0..b5be751 100644
--- a/packages/template/test/session-git.test.ts
+++ b/packages/template/test/session-git.test.ts
@@ -191,9 +191,9 @@ describe("the session card's Captured work (Story 15.3)", () => {
onClose: () => {},
}),
);
- expect(html).toContain("Captured work");
+ expect(html).toContain("Tasks");
expect(html).toContain("write the docs");
- expect(html).toContain("To review");
+ expect(html).toContain("Suggested");
expect(html).toContain("Open");
expect(html).toContain("Done");
// A dismissed item is closed and stays out of the card, like the list.
@@ -211,6 +211,6 @@ describe("the session card's Captured work (Story 15.3)", () => {
onClose: () => {},
}),
);
- expect(html).not.toContain("Captured work");
+ expect(html).not.toContain("Tasks");
});
});