Commit log

35848a1 refactor(mcp)!: consolidate 23 tools into 7

Click to expand commit body
BREAKING CHANGE: Tool names have changed completely.

Before (23 tools): create_task, update_task, delete_task, list_tasks,
show_task, create_note, update_note, delete_note, list_notes, show_note,
create_person, update_person, delete_person, list_people, show_person,
add_timeline_note, track_habit, list_habits, list_areas, list_goals,
list_notebooks, add_journal_entry, get_timestamp

After (7 tools):
- create: entity={task, note, person, journal}
- update: entity={task, note, person}
- delete: entity={task, note, person}
- query: entity={task, note, person, area, goal, notebook, habit}
- track_habit: standalone action
- add_timeline_note: standalone action (extracted to timeline/)
- get_timestamp: standalone utility

Benefits:
- Clearer action-based semantics for LLM tool selection
- Reduced cognitive load (7 vs 23 tools)
- Consistent entity parameter across CRUD operations
- Config-based entities (area, goal, notebook, habit) now queryable

Also fixes track_habit to accept config keys, UUIDs, or deep links
(previously only accepted UUIDs).

Assisted-by: Claude Opus 4.5 via Crush

Amolith created

8268482 feat(mcp): scaffold consolidated CRUD tools

Click to expand commit body
Add stub handlers for create, update, delete, and query tools that will
replace the 23 per-entity tools with 7 consolidated tools:

- create: task, note, person, journal
- update: task, note, person
- delete: task, note, person
- query: all entities (default-disabled fallback for resources)

Includes Entity* constants, ToolsConfig flags, and wiring in server.go.
All handlers return "not yet implemented" pending migration.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

28b2b0e fix(mcp/task): require area_id in create_task

Click to expand commit body
The Lunatask API requires an area_id when creating tasks, but the MCP
tool incorrectly documented and typed it as optional.

Assisted-by: Claude Opus 4.5 via Crush <crush@charm.land>

Amolith created

be95484 feat(mcp): add list resources and fallback tools

Click to expand commit body
Resources:
- lunatask://notes, notes/pinned, notes/recent
- lunatask://notes/{notebook}, notes/{notebook}/pinned,
  notes/{notebook}/recent
- lunatask://people, people/{relationship}

Fallback tools (default-disabled):
- list_notebooks, list_habits, list_areas, list_goals
- show_person

Default-disable list_notes and list_people tools since resources are now
the primary read interface.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

be07926 docs: update architecture in AGENTS.md

Click to expand commit body
Add existing MCP tools and resources to the architecture diagram that
were missing from the list.

Assisted-by: Claude Opus 4.5 via Crush

Amolith created

22a0076 feat(mcp): add semantic task list resources

Click to expand commit body
Add MCP resources for filtered task lists, providing semantic views like
today, overdue, now, and high-priority without requiring the generic
list_tasks tool.

Static resources:
- lunatask://tasks/all (discouraged - expensive)
- lunatask://tasks/today
- lunatask://tasks/overdue
- lunatask://tasks/next-7-days
- lunatask://tasks/high-priority
- lunatask://tasks/now
- lunatask://tasks/recent-completions

Area-scoped templates (discovered via resources/templates/list):
- lunatask://area/{area}/tasks
- lunatask://area/{area}/today
- lunatask://area/{area}/overdue
- etc.

The {area} parameter accepts config keys or UUIDs.

Also default-disables list_tasks tool since resources are now the
primary interface for task discovery.

Assisted-by: Claude Opus 4.5 via Crush

Amolith created

892a225 feat(mcp): show_note tool, default-disable reads

Click to expand commit body
Implements show_note as a default-disabled fallback for the
lunatask://note/{id} resource.

Also default-disables all "read" tools (show_task, show_note,
show_person, list_habits) since MCP resources are the primary read
interface. Tools serve as fallbacks for agents that don't support
resources.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

3959af1 feat(mcp): add tool enable/disable CLI flags

Click to expand commit body
Mutually exclusive CLI flags for runtime control over MCP tool exposure:

- --enabled-tools a,b,c: ignore config, enable only listed tools
- --disabled-tools x,y,z: ignore config, enable everything except listed

Tool names match the MCP tool names exactly (what the model sees).
Validates tool names against known set before starting server.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

bb0713b feat(mcp): accept keys and deeplinks for area/goal

Click to expand commit body
MCP task tools now accept config keys and lunatask:// deep links in
addition to UUIDs for area_id and goal_id parameters.

Resolution order: UUID → deep link → config key lookup.

Adds validate.AreaRef() and validate.GoalRef() functions.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

372fae1 feat(area): add workflow support for LLM guidance

Click to expand commit body
Areas now store their Lunatask workflow type (kanban, now_later, etc.).
The init wizard prompts for workflow selection with descriptions. MCP
area resource exposes workflow metadata including valid statuses, and
which fields (motivation, eisenhower, scheduling, priority) are relevant
for each workflow.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

a1e9167 feat(mcp): add person CRUD and timeline tools

Click to expand commit body
Assisted-by: Claude Sonnet 4 via Crush

Amolith created

0444063 feat(person): make last name optional

Click to expand commit body
Assisted-by: Claude Sonnet 4 via Crush

Amolith created

fc40b3f feat(mcp): add note CRUD tools

Click to expand commit body
Assisted-by: Claude Sonnet 4 via Crush

Amolith created

26a88ec feat(mcp): add add_journal_entry tool

Click to expand commit body
Assisted-by: Claude Sonnet 4 via Crush

Amolith created

d4c1e16 feat(mcp): add lunatask:// resource templates

Click to expand commit body
Add MCP resource templates for reading individual resources:
- lunatask://task/{id} - task metadata
- lunatask://note/{id} - note metadata
- lunatask://person/{id} - person metadata

LLMs can now ReadResource using the same URI format as deep links.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

8dd80fe refactor(mcp): add natural language tool outputs

Click to expand commit body
- Add human-readable text content to all tool results
- Remove duplicate ID fields; use deep_link only
- Reduces context window bloat for LLM clients
- structuredContent still available for programmatic use

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

edbac80 docs: document MCP server architecture

Click to expand commit body
Assisted-by: Claude Opus 4.5 via Crush

Amolith created

e6174c4 refactor(mcp): use go-lunatask v0.1.0-rc9.1 API

Click to expand commit body
Replace deprecated ParseDeepLink with ParseReference across all
reference-handling code. Replace local task filtering logic with
lunatask.FilterTasks in both CLI and MCP list handlers.

Extract parsing and builder application into separate helpers
(parseCreateInput, parseUpdateInput, applyToTaskBuilder,
applyToTaskUpdateBuilder) to reduce handler complexity.

Add nilerr exclusion for internal/mcp/ since MCP handlers return errors
in the result tuple rather than as Go errors.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

977ae8b feat(mcp): add MCP server mode

Click to expand commit body
Adds `lune mcp -t [stdio|sse|http]` to run lune as an MCP server,
replacing the separate lunatask-mcp-server project.

Tools:
- get_timestamp: parse natural language dates
- create_task, update_task, delete_task, list_tasks, show_task
- track_habit

Resources:
- lunatask://areas (areas and goals from config)
- lunatask://habits (habits from config)
- lunatask://notebooks (notebooks from config)

Config:
- [mcp] section with host, port, timezone
- [mcp.tools] section to enable/disable individual tools

Assisted-by: Claude Opus 4.5 via Crush <crush@charm.land>

Amolith created

f5ef0f6 feat(habit): add list subcommand

Click to expand commit body
Assisted-by: Claude Opus 4.5 via Crush

Amolith created

3b81414 refactor: inject version from main at build time

Click to expand commit body
Moves version declaration to main.go with a default of "dev", allowing
build-time injection via ldflags while keeping cmd.Execute() pure.

Assisted-by: Claude Opus 4.5 via Crush <crush@charm.land>

Amolith created

5c2f27c feat(ui): support non-interactive mode, NO_COLOR

Click to expand commit body
Detect non-interactive environments (piped output, scripts, CI) and
disable colors, styles, spinners, and table borders automatically.

Detection priority:
1. NO_COLOR env var (non-empty = plain)
2. FORCE_COLOR env var (explicit override)
3. TERM=dumb (plain)
4. TTY detection via isatty (non-TTY = plain)

Config ui.color setting ("auto", "always", "never") is respected.

Also adds `lune init --generate-config` for non-interactive setup, which
writes a commented example config for manual editing.

References: lunatask://tasks/7c9f3a83-db39-4bb4-afcb-bb73646e91bb
Assisted-by: Claude Sonnet 4 via Crush

Amolith created

01e35d7 feat(ui): add spinner feedback for network calls

Click to expand commit body
Wrap all API calls with huh/spinner for immediate visual feedback.

- Add generic Spin[T] and SpinVoid helpers in internal/ui/spinner.go
- Update all commands making network calls to use the helpers
- Use proper ellipsis (…) in spinner titles

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

aa39ea8 docs(license): add 'em

Amolith created

12c5822 docs: add README

Click to expand commit body
Assisted-by: Claude Opus 4.5 via Crush

Amolith created

e75a60c chore: add SPDX headers and ignore .task

Click to expand commit body
Assisted-by: Claude Opus 4.5 via Crush

Amolith created

40ea681 refactor(deps): upgrade go-lunatask, drop deeplink

Click to expand commit body
Delete internal/deeplink/ package and simplify internal/validate/ by
delegating to new go-lunatask v0.1.0-rc10 functions: ParseDeepLink,
BuildDeepLink, ParseTaskStatus, ParseMotivation,
ParseRelationshipStrength.

Removes ~250 lines of code now provided upstream.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

a5c38a3 feat(init): auto-prompt for token in reconfigure

Click to expand commit body
When running `lune init` with an existing config but no keyring token
(e.g., after copying config to a new device), immediately prompt for the
access token before showing the configuration menu.

Also validates existing tokens and offers to replace them if ping fails.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

6afafbf docs: expand AGENTS.md with non-obvious patterns

Click to expand commit body
- Complete architecture section with all internal packages
- Document API client builder pattern
- Add gotchas: enum validation, date parsing, stdin convention,
deep links, config key lookups
- Update testing section with actual patterns
- Document init wizard navigation

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

191aa60 feat(person): implement person module

Click to expand commit body
Fully implement person commands with Lunatask API integration:
- add: create people with relationship strength and source
- list: filter by relationship/source, table and JSON output
- show: display person details (renamed from get)
- update: modify names and relationship strength
- delete: with confirmation prompt
- timeline: add notes to person's memory timeline

Register shell completions for relationship flag.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

51c1acd feat(note): implement note module

Click to expand commit body
Fully implement note commands with Lunatask API integration:
- add: create notes with notebook, content, and source support
- list: filter by notebook/source, table and JSON output
- show: display note details (renamed from get)
- update: modify name, content, notebook, date
- delete: with confirmation prompt

Add NotebookByID helper to config package. Register shell completions
for notebook flag.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

ae0f649 feat(validate): add validation for enum types

Click to expand commit body
Add validation functions that lowercase and match against known
constants for TaskStatus, Motivation, and RelationshipStrength.

Wire validation into task add/update/list to reject invalid input early
with clear error messages instead of passing bogus values to the API.

Assisted-by: Claude Opus 4 via Crush

Amolith created

a379085 feat(journal): implement add command

Click to expand commit body
Create journal entries with optional date and title. Content supports
Markdown formatting for rich text. Use "-" to read content from stdin
for multi-line input.

Assisted-by: Claude Opus 4 via Crush

Amolith created

ead719c feat(completion): add positional arg completion

Click to expand commit body
Add ValidArgsFunction for positional KEY arguments:
- area show: completes area keys
- goal show: completes goal keys

Assisted-by: Claude Opus 4 via Crush

Amolith created

25de5a2 feat(task): implement update command

Click to expand commit body
Full task update with fluent builder pattern from go-lunatask. Supports
name, area, goal, status, note, priority, estimate, motivation,
eisenhower (via --important/--urgent), and schedule.

Add dupl linter exclusion for cmd/ since TaskBuilder and
TaskUpdateBuilder share method signatures but differ in type.

Assisted-by: Claude Opus 4 via Crush

Amolith created

538461b refactor(task): use string-based priority flag

Click to expand commit body
Replace int priority flag (-2 to 2) with string values (lowest, low,
normal, high, highest) using lunatask.ParsePriority. Add shell
completion for priority values.

Assisted-by: Claude Opus 4 via Crush

Amolith created

fd5b955 refactor(config): use ~/.config/lune as config dir

Click to expand commit body
Assisted-by: Claude Sonnet 4 via Crush

Amolith created

6b9b9ee refactor(task): use dateutil for schedule parsing

Click to expand commit body
Natural language dates now supported for --schedule flag.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

ce6e66f feat(habit): implement track command

Click to expand commit body
Uses go-dateparser for natural language date input (e.g., "yesterday",
"2 days ago", "March 5"). Adds internal/dateutil package for reuse.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

1342923 fix(task): remove duplicate init in delete

Click to expand commit body
Assisted-by: Claude Sonnet 4 via Crush

Amolith created

1ee2888 refactor: let Cobra handle error display

Click to expand commit body
Remove redundant ui.Error calls outside cmd/init/. Errors are now
returned directly to Cobra for consistent display. ui.Success is still
used for explicit success confirmations.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

85fdc39 feat(task): implement delete command

Click to expand commit body
Prompts for confirmation using huh unless --force is specified. Returns
error to Cobra rather than printing custom error message.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

bc97d84 feat(task): implement show command

Click to expand commit body
Displays task metadata including status, area/goal (resolved to names
from config when available), scheduling dates, and attributes like
priority, estimate, progress, motivation, and eisenhower quadrant.

Adds AreaByID and GoalByID helpers to config package for name
resolution. Upgrades go-lunatask to v0.1.0-rc9 for Priority type
support.

Assisted-by: Claude Sonnet 4 via Crush

Amolith created

3201482 refactor(task): rename get to show for consistency

Click to expand commit body
Assisted-by: Claude Sonnet 4 via Crush

Amolith created

4f6020f fix(goal): show area in no-goals msg when default

Click to expand commit body
Assisted-by: Claude Sonnet 4 via Crush

Amolith created

7a481ba feat(goal): add list and show commands

Click to expand commit body
- list: table/JSON output, defaults to config's default area
- show: full details with ID, deeplink, task count
- Auto-detects area if goal key is unique, prompts for --area on
  collision

Assisted-by: Claude Opus 4.5 via Crush

Amolith created

cc25d60 feat(area): add list and show commands

Click to expand commit body
- list: table/JSON output with goal preview
- show: full details with ID, deeplink, goals, task counts

Uses H1/H2 headings for visual hierarchy.

Assisted-by: Claude Opus 4.5 via Crush

Amolith created

b4fdc57 feat(task): implement add command

Click to expand commit body
Supports all task metadata flags:
- area/goal (resolved from config keys)
- status, priority, estimate, motivation
- important/urgent (Eisenhower matrix)
- schedule date, note

Name and note support stdin via "-".

Assisted-by: Claude Opus 4.5 via Crush

Amolith created

351587d feat(stats): add TaskCounter for task counts

Click to expand commit body
Provides reusable helpers to count uncompleted tasks by area or goal ID
with lazy loading of task list.

Assisted-by: Claude Opus 4.5 via Crush

Amolith created

0bbb38b refactor(config): add goal lookup across areas

Click to expand commit body
Adds GoalMatch type and FindGoalsByKey helper for collision detection.
Also adds json tags to config structs for JSON output.

Assisted-by: Claude Opus 4.5 via Crush

Amolith created