Skip to content

Feature: Add Decision Management CLI commands and MCP Tools#633

Open
abbyssoul wants to merge 4 commits into
MrLesk:mainfrom
abbyssoul:feature/decisions_crud
Open

Feature: Add Decision Management CLI commands and MCP Tools#633
abbyssoul wants to merge 4 commits into
MrLesk:mainfrom
abbyssoul:feature/decisions_crud

Conversation

@abbyssoul
Copy link
Copy Markdown

Summary

This pull request introduces first-class support for managing Architectural Decision Records (ADRs) / Decisions in Backlog.md. It provides new CLI commands for human operators and exposes comprehensive decision management capabilities to AI agents via the Model Context Protocol (MCP).

Changes Included

  1. CLI Enhancements:
  • Added decision list command with interactive TUI selection and a --plain fallback for scripts.
  • Added decision view command to quickly read a specific decision from the terminal using the scrollable viewer.
  • Standardized ID parsing by introducing DEFAULT_FILE_PREFIXES and strict regex matching, resolving edge cases with zero-padded or malformed IDs.
  1. MCP Exposure (Agent Tools):
  • Registered 5 new MCP tools to allow agents to manage decisions autonomously:
    • decision_list: List decisions with optional substring filtering.
    • decision_view: View decision metadata and raw markdown content.
    • decision_create: Create new decisions using the shared ID generator.
    • decision_update: Update existing decision content and titles.
    • decision_search: Search decisions using the shared fuzzy index.
  • Updated MCP guidelines (overview.md and overview-tools.md) so agents know when and how to link decisions as dependencies in tasks.
  1. Core Architecture & Stability:
  • Refactored parseDecision and core content stores to properly preserve and handle relative file paths and raw content.
  • Fixed an issue where the file prefix decision- was being inconsistently matched or dropped during file system operations.
  • Ensured updates safely traverse the decisions/ directory using robust glob paths and canonical ID matching to prevent duplicate files or orphaned records.

Related Tasks

List task IDs this PR closes, e.g. closes task-29.
closes BACK-465
closes BACK-466
closes BACK-467

📋 Important: All PRs must have an associated task in the backlog.

  • If no task exists, create one first using: backlog task create "Your task title"
  • Follow the task guidelines when creating tasks
  • Tasks should be atomic, testable, and well-defined with clear acceptance criteria

Task Checklist

  • I have created a corresponding task in backlog/tasks/
  • The task has clear acceptance criteria
  • I have added an implementation plan to the task
  • All acceptance criteria in the task are marked as completed

Testing

new tests have been added and pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant