Commit graph

16 commits

Author SHA1 Message Date
07e8c98c7c chore: prepare v0.1.0 release 2026-04-28 15:22:41 -04:00
0ad1fae213 chore: 1.0 release prep
Metadata:
- Bump dew CLI version 0.0.1 → 1.0.0
- Add repository + issue_tracker URLs to all pubspec.yaml files
- Switch inter-package path deps to versioned deps (^1.0.0)
- Remove publish_to: none from all packages
- Add MIT LICENSE to root and all packages
- Confirm all four pub.dev names available (dew, dew_core, dew_kanban, dew_mcp)

Documentation:
- Add CHANGELOG.md (Keep a Changelog format, full 1.0.0 feature history)
- Overhaul README.md (pitch, pub.dev badge, quick-start, feature sections)
- Add TUI section + full keybinding tables to docs/features/kanban.md
- Add CONTRIBUTING.md (setup, test, lint, branch strategy, command guide)

Tests:
- Add packages/cli/test/cli_test.dart (6 smoke tests)
- Add packages/kanban/test/integration_test.dart (6 TicketStore e2e tests)
- Expand packages/mcp/test/mcp_test.dart (5 tool registration tests)
- Add dew_kanban as dev dependency in packages/mcp/pubspec.yaml
- 57/57 tests passing

Code quality:
- dart format applied across all 23 changed source files
- dart analyze: zero errors, zero warnings

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-25 15:58:54 -04:00
8d787235b9 Refactor filesystem access to package:file
Replace dart:io File/Directory with package:file abstractions so that
tests can use MemoryFileSystem instead of mutating the process-global
Directory.current.

- Add file: ^7.0.1 to core and kanban dependencies
- ProjectContext.find() accepts FileSystem fs parameter
- TicketStore, KanbanInitHook, InitCommand, all kanban commands accept
  FileSystem fs (defaulting to LocalFileSystem())
- KanbanCommand and registerCommands() thread fs to subcommands
- Tests rewritten to use MemoryFileSystem() — no Directory.current mutation
- Remove dart_test.yaml (concurrency: 1 no longer needed)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 22:26:09 -04:00
037f5fde28 Four polish fixes
1. get shows milestones/labels: GetCommand._format() now shows Milestones:/Labels:
   lines when non-empty, between Created: and Links:

2. unarchive command: kanban unarchive --id <id> [--column <col>] restores a
   ticket from archive/ back to a column (default: first configured column);
   registered as 'kanban_unarchive_ticket' MCP tool (15 tools total)

3. Test isolation: add dart_test.yaml (concurrency: 1) — Directory.current is
   a process-global OS chdir(); concurrent test files in the same process
   would race. Now dart test packages/core packages/kanban passes cleanly.

4. update empty multi-option fix: --milestone '' / --label '' with empty
   strings now filters them out (treats as 'clear to empty') rather than
   writing spurious empty-string YAML list entries

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 22:10:12 -04:00
ade243e2c7 Archive command and include-archived flag (DEW-0015)
- ArchiveCommand (kanban archive --id <id>): moves ticket file from its
  current column dir to .project/kanban/archive/; attachments stay put
  (under attachments/<id>/); registered as 'kanban_archive_ticket' MCP tool
- TicketStore.list() gains includeArchived param (default false);
  archive/ dir skipped unless includeArchived=true
- ListCommand: --include-archived flag
- SearchCommand: --include-archived flag
- Test: list excludes/includes archive correctly
- 14 MCP tools; 'archive' added to expected subcommands list

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 20:07:50 -04:00
5d8451383b Column transition validation and enhanced search filters (DEW-0013, DEW-0014)
DEW-0013: Enhanced search filters (already implemented in DEW-0011 pass)
- dew kanban search already had --column/--type/--label/--milestone filters
- Closed ticket

DEW-0014: Column transition validation
- ColumnConfig gains optional allowedTransitions: List<String>
- Parsed from allowed_transitions YAML list on each column entry
- MoveCommand validates current column's allowedTransitions before moving;
  unconfigured (empty list) = all transitions allowed (existing behaviour)
- Test: transition validation integration test with constrained + unconstrained columns

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 20:05:55 -04:00
27a45e3d52 Grouped list view and ASCII board command (DEW-0012)
- ListCommand: when no --column filter, groups output by column with counts;
  with --column filter, returns flat list (no redundant column header)
- BoardCommand (kanban board): ASCII box per column in config order,
  self-sizing to longest ticket line; supports --type/--label/--milestone filters
  registered as 'kanban_board' MCP tool
- Test counts updated: 13 MCP tools, 'board' in subcommands list

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 20:03:55 -04:00
f89b3aa998 Add milestones and labels to Ticket model (DEW-0011)
- Ticket.milestones and Ticket.labels: List<String>, optional (default [])
- toFileContent() emits milestones:/labels: YAML lists when non-empty
- fromFileContent() parses them back; empty when absent (backwards compat)
- TicketStore.create() and update() accept milestones/labels params
- CreateCommand and UpdateCommand: --milestone/--label multi-options
- ListCommand and SearchCommand: --milestone/--label filter options
- 4 new tests: model roundtrip, store persistence, update patch, no fields when empty

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 20:01:47 -04:00
951f0d8bc8 Storage refactor: tickets in column subdirs, drop redundant column frontmatter
- TicketStore rewritten: tickets live in .project/kanban/<column>/<id>.md
- _findTicketFile() searches all column subdirs (one level deep)
- update() moves the file when column changes
- delete() cleans up attachments/<id>/ if present
- _nextNumber() scans all subdirs including archive
- Ticket.fromFileContent() now takes column as explicit parameter
- Ticket.toFileContent() drops column field (derived from path)
- _yamlQuote() added to safely quote titles containing ': '
- dew.yaml: columns changed to backlog/doing/done (alphabetical order)
- Existing tickets migrated to .project/kanban/backlog/

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 19:42:21 -04:00
08f4d5c7cf Upgrade ticket links to typed bidirectional relationships
Link types: blocks/is_blocked_by, relates_to (symmetric),
duplicates/is_duplicated_by, parent_of/child_of

- Add TicketLink(targetId, type) class and linkTypeInverses map to
  ticket.dart
- Update Ticket.links from List<String> to List<TicketLink>
- Update toFileContent/fromFileContent for new {id, type} YAML format
- Update TicketStore.linkTickets to accept a type, write the forward
  link and automatically write the inverse on the target ticket
- Update TicketStore.unlinkTickets to remove both sides
- Update LinkCommand with mandatory --type/-y option (enum of all valid
  types); describe inverse in output message
- Update GetCommand to display typed links in ticket output
- Update all tests: typed roundtrip, bidirectional store tests for
  blocks, relates_to (symmetric), parent_of/child_of, unlink both sides
- 29 tests pass, dart analyze clean

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 19:21:25 -04:00
4efa1078ea Add stats, move, link, and unlink kanban tools
- Add links field to Ticket model (YAML frontmatter list, roundtrips
  correctly; omitted from file when empty)
- Add TicketStore.linkTickets(), unlinkTickets(), and stats() methods
- Add StatsCommand (kanban_stats) — ticket counts by column and type
- Add MoveCommand (kanban_move_ticket) — validated column transition
- Add LinkCommand (kanban_link_tickets) — track ticket dependencies
- Add UnlinkCommand (kanban_unlink_tickets) — remove ticket links
- Register all 4 new subcommands in KanbanCommand (12 total)
- All 27 tests pass, dart analyze clean

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 17:10:09 -04:00
7b83572f7a Unified command-tool registration via DewToolCommand mixin
- Add DewToolCommand mixin that auto-derives MCP tool JSON Schema from
  ArgParser, eliminating the need to define CLI commands and MCP tools
  separately
- Add schemaFromArgParser() to generate JSON Schema from ArgParser options
- Add CommandRegistry.mcpTools recursive collector for all DewToolCommand
  subcommands
- Refactor all kanban subcommands to use the mixin; switch get/update/delete
  from positional rest args to --id / -i option for schema compatibility
- Promote list to a proper CLI subcommand (was MCP-only before)
- Add search, comment, and config subcommands (CLI + MCP tools)
- Add TicketStore.addComment() for non-destructive comment appending
- Simplify mcp.registerCommands() to take only CommandRegistry
- Simplify CLI entry point (no more KanbanToolProvider/McpToolRegistry)
- Delete stale files: kanban_tool_provider.dart, mcp_tool_provider.dart,
  mcp_tool_registry.dart (superseded by DewToolCommand mixin)
- Add tools/mcp_client.dart debug client for manual MCP server testing
- Update .vscode/mcp.json with correct server config

All 26 tests pass, dart analyze clean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 16:30:43 -04:00
a74bd94547 Implement MCP tool registry and kanban tool provider
- Add McpTool + McpToolProvider interface to core
- Add McpToolRegistry to mcp package (aggregates providers)
- Add DewMcpServer (MCPServer + ToolsSupport via dart_mcp 0.5.0)
- Add 'mcp serve' subcommand — starts a real stdio MCP server
- Implement KanbanToolProvider with 5 tools:
  kanban_create_ticket, kanban_list_tickets, kanban_get_ticket,
  kanban_update_ticket, kanban_delete_ticket
- Wire McpToolRegistry + KanbanToolProvider in CLI
- 26 tests passing, dart analyze clean

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 15:29:46 -04:00
a1c36f7136 Implement kanban subcommands (create, get, update, delete)
- Add ProjectContext and DewConfig models to core
- Add Ticket model with YAML frontmatter serialisation
- Add TicketStore with auto-incrementing 4-digit IDs
- Implement create/get/update/delete subcommands under KanbanCommand
- Expand tests: ProjectContext, Ticket roundtrip, TicketStore CRUD (19 total)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 14:47:25 -04:00
0723c7d996 Scaffold docs, packages, and command registration
- Flesh out docs/index.md, docs/config.md, docs/features/mcp.md,
  docs/features/kanban.md with full content and aligned tables
- Fix .markdownlint-cli2.mjs config (rules were outside 'config' key)
- Add packages/mcp as a standalone MCP server package
- Update all pubspec descriptions
- Implement DewCommand + CommandRegistry in core
- Implement KanbanCommand and McpCommand stubs with registerCommands()
- Wire CLI entry point using CommandRunner + CommandRegistry
- Add 'melos run dew' script for running the CLI from workspace root
- Update tests across core, kanban, mcp packages

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 14:29:09 -04:00
b3201fde7b chore: Initial Commit 2026-04-23 13:09:11 -04:00