Skip to content

Commit 30cbfa0

Browse files
committed
feat(v0.7.0): statusline + compact + rewind + rejected + export-pr
Five additive patches, no schema changes from 0.6.x. - task-journal statusline: sub-100ms one-liner for CC statusline, format `[tj-x9rz · open: N · pending: N · stale: N]`. Lazy-bootstraps SQLite from JSONL when state file is missing (right after `create`). - task-journal rejected <topic>: cross-task rejection lookup, FTS5 with LIKE fallback for FTS-unfriendly topics. Supports --all-projects / --limit / --since. - task-journal export-pr <id>: render a task as PR-description Markdown (Summary / Changes / Why-this-approach / Verification / Affected). Reuses task_metadata + task_artifacts; no new tables. - PreCompact hook: drops a marker decision event on the most-recent open task so the post-compact agent sees a clear journal boundary. install-hooks now wires PreCompact alongside the existing four. - /rewind sentinel: when UserPromptSubmit starts with /rewind, append a single correction event and skip the classifier. Conservative — does not mass-mark prior events as rejected. Plus plugin/skills/rejected/SKILL.md wrapping the new CLI command, README updates (statusline + auto-capture sections, new CLI rows, PR-from-task example), and CHANGELOG entry. 273 tests pass; clippy --workspace --all-targets -- -D warnings clean.
1 parent 3714750 commit 30cbfa0

12 files changed

Lines changed: 1050 additions & 10 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
},
77
"metadata": {
88
"description": "Task Journal — append-only reasoning chain memory for AI-coding tasks",
9-
"version": "0.6.3"
9+
"version": "0.7.0"
1010
},
1111
"plugins": [
1212
{
1313
"name": "task-journal",
1414
"source": "./plugin",
1515
"description": "Append-only journal of AI-coding task reasoning chains. Captures hypotheses, decisions, rejections, evidence — renders compact resume packs so an agent can pick up a 2-week-old task with full context.",
16-
"version": "0.6.3",
16+
"version": "0.7.0",
1717
"author": {
1818
"name": "Digital-Threads"
1919
},

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.7.0] - 2026-05-10
11+
12+
Reasoning-chain ergonomics: surface the journal in the Claude Code
13+
statusline, capture compaction + rewind boundaries automatically, and
14+
make rejection lookup + PR-description rendering first-class CLI
15+
commands. All additive — no schema breaking changes from 0.6.x.
16+
17+
### Added
18+
- `task-journal statusline` — sub-100ms one-liner for the Claude Code
19+
statusline. Renders `[tj-x9rz · open: N · pending: N · stale: N]`
20+
using only the small `tasks` table, no FTS5 hits, no classifier
21+
calls. Hidden from `--help` (it's tooling, not a human command).
22+
Wire it via `~/.claude/settings.json` `"statusLine"`.
23+
- `task-journal rejected <topic>` — cross-task rejection lookup.
24+
FTS5 by default, LIKE fallback for FTS-unfriendly topics (e.g.
25+
`oauth-pkce`). Supports `--all-projects`, `--limit`, `--since`.
26+
Surfaces approaches that were already turned down so the agent
27+
doesn't repeat them.
28+
- `task-journal export-pr <id>` — render a task as PR-description
29+
Markdown: Summary, Changes (decisions), Why-this-approach
30+
(rejections), Verification (evidence), Affected (artifacts).
31+
Reuses existing event log + artifacts; no new tables.
32+
- PreCompact hook handler — Claude Code emits `PreCompact` before
33+
compaction; ingest-hook now drops a marker `decision` event on the
34+
most-recent open task so the post-compact agent sees a clear
35+
boundary in the journal.
36+
- `/rewind` UserPromptSubmit marker — when the user prepends `/rewind`
37+
to a prompt, ingest-hook appends a single `correction` event
38+
instead of running the classifier. Conservative — does NOT mass-mark
39+
prior events as rejected; just leaves a sentinel for pack readers.
40+
- Plugin skill `rejected.md` wrapping the new CLI command.
41+
42+
### Changed
43+
- `install-hooks` now wires a `PreCompact` event entry alongside the
44+
existing `UserPromptSubmit` / `PostToolUse` / `Stop` / `SessionStart`
45+
hooks. Re-run `task-journal install-hooks` to pick this up.
46+
1047
## [0.6.3] - 2026-05-09
1148

1249
Drop empty-text events at the hook boundary. PostToolUse for tools

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ members = [
77
]
88

99
[workspace.package]
10-
version = "0.6.3"
10+
version = "0.7.0"
1111
edition = "2021"
1212
rust-version = "1.88"
1313
license = "MIT"

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,33 @@ That's it. Restart Claude Code, start working, and the journal fills itself.
7878
- **Auto-capture via Claude Code hooks.** Every prompt, tool call, and Claude reply is classified by a small `claude -p` invocation and appended as a typed event (`finding` / `decision` / `evidence` / `rejection` / …). Hook returns in <100 ms — classification happens in the background, never blocks your session.
7979
- **Artifact extraction.** Each event scans its text for commit hashes, PR URLs, file paths, issue IDs, and branch names. Aggregated artifacts are how Task Journal links related tasks: when you start a new task touching the same issue or file, the prior task is surfaced automatically.
8080
- **Resume packs.** `task_pack` (MCP tool or CLI) renders a task into a compact Markdown briefing — Goal, Outcome, decisions, rejections, evidence, artifacts — that fits in a fresh agent's context window without dumping the raw event log.
81+
- **Auto-capture boundaries.** Beyond per-event capture, two extra hooks mark *reasoning boundaries* automatically: `PreCompact` drops a marker decision when Claude Code is about to compact, and a `/rewind`-prefixed prompt appends a single correction event so pack readers see where the user rolled back. No mass-rejection of prior events — the boundary is a sentinel, not a rewrite.
8182

8283
Source of truth is an append-only JSONL log per project. SQLite holds derived state and is fully rebuildable. Nothing is sent off-machine except the classifier prompt to your own `claude -p` (subscription) or the Anthropic API.
8384

85+
### Statusline integration
86+
87+
Show `[tj-x9rz · open: 3 · pending: 2 · stale: 1]` at the bottom of every Claude Code render. The most-recently-touched open task in the current project, plus open / queued-classifier-failure / 7-day-idle counts. Sub-100ms by design — safe to wire into the per-keystroke statusline.
88+
89+
Add to `~/.claude/settings.json`:
90+
91+
```json
92+
{
93+
"statusLine": {
94+
"type": "command",
95+
"command": "task-journal statusline"
96+
}
97+
}
98+
```
99+
100+
### PR description from a task
101+
102+
When the work is done, render the task as a PR-ready Markdown block: Summary (goal), Changes (decisions), Why-this-approach (rejections), Verification (evidence), Affected (files / commits / issues / branches / PRs).
103+
104+
```bash
105+
task-journal export-pr tj-x9rz1f | gh pr create --body-file -
106+
```
107+
84108
## Daily use (no manual commands needed)
85109

86110
With the plugin installed, the typical flow is:
@@ -127,6 +151,9 @@ task-journal pack tj-x9rz1f --mode full
127151
| `pack <id> --mode compact\|full` | Render a resume pack |
128152
| `events list [--limit N]` | List recent events |
129153
| `search <query> [--all-projects]` | Full-text search (FTS5) |
154+
| `rejected <topic> [--all-projects] [--limit N] [--since DAYS]` | Cross-task rejection lookup — surfaces approaches already turned down |
155+
| `export-pr <id>` | Render a task as PR-description Markdown |
156+
| `statusline` | One-liner for `~/.claude/settings.json` `statusLine` (sub-100ms) |
130157
| `stale [--days N]` | List open tasks idle >N days |
131158
| `reclassify <id>` | Re-extract artifacts from a task's events |
132159
| `pending list \| retry` | Inspect or retry queued classifier failures |

crates/tj-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ name = "task-journal"
1616
path = "src/main.rs"
1717

1818
[dependencies]
19-
tj-core = { package = "task-journal-core", version = "0.6.3", path = "../tj-core" }
19+
tj-core = { package = "task-journal-core", version = "0.7.0", path = "../tj-core" }
2020
anyhow = { workspace = true }
2121
clap = { workspace = true }
2222
tracing = { workspace = true }

0 commit comments

Comments
 (0)