backlog.md

repository·main·Indexed 24 days ago

https://github.com/mrlesk/backlog.md

A Markdown-native task manager and Kanban visualizer designed for Git repositories. It features a CLI for managing tasks, documentation, and architecture decisions, and is optimized for AI-assisted development via structured checkpoints and Model Context Protocol (MCP) integration. Version 1.48.0 supports terminal and web-based visualization, fuzzy search, and shell completions for Zsh, Bash, Fish, and PowerShell.

Tokens
90.3K
Snippets
172
Records
668
Agent score
87%

What's inside backlog.md

  1. Use the Backlog.md Web Interface features

    main

    The web UI provides several interactive features for managing your backlog without using the CLI:

    • Interactive Kanban Board: Drag-and-drop tasks between different statuses.
    • Task Management: Create, edit, and archive tasks using modal dialogs.
    • Search & Filter: Real-time filtering of tasks by status, assignee, or labels.
    • Markdown Support: View and edit task descriptions with rich markdown rendering.
    • Dark Mode: Built-in theme support via Tailwind CSS.
    • Responsive Design: The UI is mobile-friendly and works across different devices.
  2. Backlog.md Architecture and Source of Truth

    main

    Backlog.md is a Markdown-native task manager where task state lives in human-readable Markdown files.

    Key architectural principles:

    • Durable Substrate: Markdown is the primary storage format. Files must remain understandable with ordinary tools and useful without a hosted service.
    • Semantic Mutations: Product commands perform mutations to ensure metadata and relationships stay consistent.
    • Local-first Ownership: Users own their files; no account, hosted backend, or telemetry is required for the core workflow.
    • Deterministic Serialization: Ordering and serialization are deterministic so that Git diffs explain meaningful changes.
    • Git Integration: While Git is optional, it is used to provide reviewable evidence and history.
  3. Use the --json flag for stable CLI output

    main

    The Backlog.md CLI supports a --json flag for task list, task view, task <id> (shorthand), and search commands. This provides a versioned, curated JSON surface designed for programmatic use and AI agents, ensuring that internal TypeScript objects are not exposed.

    Behavior Rules

    • Stdout/Stderr: Successful output is a single pretty-printed JSON document followed by a newline on stdout. All errors (validation, lookup, ambiguity, or runtime) are sent to stderr with a non-zero exit code. In JSON mode, stdout remains empty on error.
    • Exclusivity: The --json flag is mutually exclusive with --plain. Using both will result in an error on stderr with exit code 1.
    • Interactivity: Using --json makes the command non-interactive and bypasss TTY auto-plain behavior.
    • Data Semantics:
      • Uses schemaVersion: 1.
      • Absent scalars are serialized as null.
      • Absent collections are serialized as [].
      • Dates are normalized to RFC 3339 UTC.
      • Paths are project-relative.
  4. Manual testing of Zsh completions

    main

    To manually test the Zsh completion script for the backlog CLI, load the completion file into your current session and then use the <TAB> key to trigger completions for various command levels.

    # 1. Load the completion
    source completions/_backlog
    
    # 2. Test completions
    backlog <TAB>
    backlog task <TAB>
    backlog task create --<TAB>
  5. Run the Backlog.md MCP server

    main

    The Backlog.md MCP implementation provides a stdio Model Context Protocol (MCP) surface, allowing local AI agents to interact with your backlog using tools for tasks, milestones, Definition of Done defaults, and documents.

    You can start the server either by running it directly from the repository using bun or by using the globally installed backlog CLI.

    # Run the stdio server from the repo
    bun run cli mcp start
    
    # Or via the globally installed CLI
    backlog mcp start
  6. Override working directory for Backlog MCP

    main

    When using an IDE that launches the Model Context Protocol (MCP) with an incorrect process working directory, you can force the correct project root using the --cwd flag with the backlog mcp start command. This flag takes precedence over environment variables.

    Use this when the MCP server cannot automatically find your Backlog project due to the host environment's current working directory.

    backlog mcp start --cwd <path>
  7. Verify task completion with objective evidence

    main

    When using the task-finalization workflow, agents are explicitly instructed to reject AC (Acceptance Criteria) checks based solely on:

    • Code presence (checking if a function exists in a file).
    • grep output (checking if a string exists in the codebase).
    • Intent (assuming the code works because it looks correct).

    Instead, agents must use objective behavior evidence. For web-based tasks, this typically involves running a Node.js/jsdom audit or a headless browser test to verify rendered elements, user interactions (like clicks), and logic (like win/draw detection).

  8. Use `backlog instructions overview` to initialize agent workflows

    main
    When working with AI agents, the recommended first step for any user request (including informational questions about task status) is to run the backlog instructions overview command. This ensures the agent loads the required workflow overview before deciding how to search, read, create, or update tasks.
    backlog instructions overview