/** * Backlog Tools - File-based project backlog management * * Provides backlog_read and backlog_write tools for managing project backlogs. * Uses a JSON file stored in .compilr/backlog.json (or backlog.json in project root). * * Features: * - Read with filters (status, type, search, limit) * - Write/update individual items or full backlog * - Support for common item types (feature, bug, chore, spike) * - Priority levels (critical, high, medium, low) */ import type { Tool } from '../types.js'; /** * Status of a backlog item */ export type BacklogStatus = 'backlog' | 'in-progress' | 'done' | 'blocked'; /** * Type of backlog item */ export type BacklogItemType = 'feature' | 'bug' | 'chore' | 'spike'; /** * Priority level */ export type BacklogPriority = 'critical' | 'high' | 'medium' | 'low'; /** * A backlog item */ export interface BacklogItem { /** Unique identifier (e.g., "FEAT-001", "BUG-002") */ id: string; /** Type of item */ type: BacklogItemType; /** Short title */ title: string; /** Detailed description (optional) */ description?: string; /** Current status */ status: BacklogStatus; /** Priority level (optional, defaults to medium) */ priority?: BacklogPriority; /** Acceptance criteria (optional) */ acceptanceCriteria?: string[]; /** Dependencies on other items (optional) */ dependencies?: string[]; /** Labels/tags (optional) */ labels?: string[]; /** Created timestamp */ createdAt?: string; /** Last updated timestamp */ updatedAt?: string; } /** * Input parameters for backlog_read tool */ export interface BacklogReadInput { /** Get a specific item by ID */ id?: string; /** Filter by status */ status?: BacklogStatus; /** Filter by type */ type?: BacklogItemType; /** Search in title and description */ search?: string; /** Filter by priority */ priority?: BacklogPriority; /** Maximum items to return (default: 20) */ limit?: number; } /** * Result from backlog_read */ export interface BacklogReadResult { items: BacklogItem[]; total: number; filtered: number; } /** * Input parameters for backlog_write tool */ export interface BacklogWriteInput { /** Action to perform */ action: 'add' | 'update' | 'delete' | 'replace'; /** Item to add or update (required for add/update) */ item?: Partial; /** Item ID to delete (required for delete) */ deleteId?: string; /** Full list of items (required for replace action) */ items?: BacklogItem[]; } /** * Result from backlog_write */ export interface BacklogWriteResult { success: boolean; action: string; itemId?: string; itemCount?: number; } /** * Read backlog items with optional filters */ export declare const backlogReadTool: Tool; /** * Write/update backlog items */ export declare const backlogWriteTool: Tool; /** * Options for creating custom backlog tools */ export interface BacklogToolOptions { /** Custom base path for backlog file */ basePath?: string; } /** * Create backlog tools with custom options */ export declare function createBacklogTools(_options?: BacklogToolOptions): { backlogRead: Tool; backlogWrite: Tool; };