Repository navigation
Rethink decisions & todos: make them legible and worth using - #47
Merged
Merged
Conversation
…ecycle (#10) Add `journal decide` and `journal todo` dedicated capture commands, crisp `journal decisions` rendering (date · statement · citation), recent decisions in `journal today` (top 5, last 2w), and `journal done <ref> [resolution]` resolution notes. MCP `today` and `done` tools updated accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Retro: no durable lesson (merged clean / one-off). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Agent-Generated PR
Closes #10
Agent Used: Claude Code (claude-sonnet-4-6)
Complexity: high
Summary
Redesigns how
@decisionand@todoare captured, surfaced, and closed so they're first-class and worth using. Adds dedicated capture commands, crisp rendering with date/statement/citation format, proactive surfacing injournal today, and resolution notes onjournal done.Implementation Notes
docs/plans/2026-06-19-010-feature-decisions-todos-legibility-plan.md(copied fromplan/issue-10branch).internal/noteparsing — full backward compatibility; existing@decision/@todo/@doneblocks continue to parse and surface correctly.decisionsStatement()extracts the statement from the snippet by splitting onRationale:— works for both new structured entries and legacy opaque blocks (first line of collapsed body).completeTodosignature updated from(ctx, cfg, e, ref, logf)to(ctx, cfg, e, ref, resolution, logf)— TUI, CLI, and MCP callers all updated.todayReport.Decisionsis an additive JSON field — existing MCP consumers see it as an optional field, no breaking change.--supersedesflag,--activefilter) deferred as a follow-up per plan.Changes
cmd/decide.go(new) —journal decide "<statement>" [--rationale text] [--project slug]cmd/todo.go(new) —journal todo "<action>" [--project slug]cmd/listing.go—renderDecisions(),decisionsStatement(),decisionsRationale(),dateFromPath()helpers;decisionsCmdusesrenderDecisionsinstead of genericrenderResultscmd/done.go—doneCmdaccepts 1–2 args;completeTodogainsresolution stringparameter; resolution appended asResolution: <text>within the blockcmd/show.go—todayReport.Decisions []Result;gatherTodayqueries top-5 decisions from last 2w;composeTodayadds "Recent decisions" sectioncmd/mcp.go—doneInput.Resolutionfield;mcpDonepasses resolution through;donetool description updated;mcpTodaygains decisions automatically viatodayReportcmd/tui.go— updatedcompleteTodocall signatureTesting
Automated:
make test→ all green)Manual testing performed:
go build ./...)make fmt vetcleanTestDecideWriteDecisionBlock,TestTodoWritesTodoBlock,TestDecisionsStatement,TestRenderDecisionsTextMode,TestCompleteTodoWithResolutionNote,TestGatherTodayIncludesRecentDecisions,TestMCPTodayIncludesDecisions,TestMCPDoneWithResolution,TestDecisionsLegacyOpaqueBlockReview Checklist
Correctness
Code Quality
capture()reuse,autoCommitCapture, cobra command structure)Security
capture())Tests
Reviewer Notes
decisionsStatement(snippet)helper splits onRationale:to separate statement from rationale in the whitespace-collapsed snippet. This is simple and robust for structured entries; for legacy opaque blocks it just returns the whole snippet (noRationale:present).journal todayis hardcoded as14 * 24 * time.Hour— the plan didn't call for a flag, and we can add one as a follow-up.journal decideandjournal todoare distinct fromjournal todos(the listing command) — cobra handles the disambiguation correctly sincetodoandtodosare different strings.