Skip to content

feat: add github-issues task backend#88

Merged
fyodoriv merged 1 commit into
mainfrom
feat/github-issues-backend
May 29, 2026
Merged

feat: add github-issues task backend#88
fyodoriv merged 1 commit into
mainfrom
feat/github-issues-backend

Conversation

@fyodoriv
Copy link
Copy Markdown
Collaborator

Why this is needed / Motivation

VISION.md G5 ("File-first, pluggable backends") establishes that TASKS.md is the default, but the spec/parser/CLI/MCP MAY target an alternative backend. This PR delivers the first such backend — GitHub Issues — so a team already living in an issue tracker can use the tasks.md workflow (pick/list/create/claim/complete) against Issues without migrating to a file. Downstream consumers (agentbrew, dotfiles) delegate to this CLI rather than each hand-rolling a gh integration.

What changed

  • packages/cli/src/backend/ — a TaskBackend port (types.ts) with two adapters:
    • github-issues.ts — reads/writes via gh (open issues by marker label; priority/P0..P3 labels; assignee = claim; close = complete). repo token scope only — no GitHub Project required.
    • tasks-md.ts — the default, reusing the parser's deterministic pickBestTask/loadAllTasks for reads.
    • config.ts — resolves the backend from .tasksmd.json (default tasks-md); --backend flag overrides.
  • pick / list are now backend-aware; new create / claim / complete commands work on either backend.
  • spec.md — new "## Task backends" section documenting selection, the Issues mapping, and the commands.

tasks-md stays the default, so existing repos are unaffected (G4 preserved — the spec, not the storage, is the portable layer).

Vision trace

  • Vision goal: G5 "File-first, pluggable backends" — this is the first backend adapter behind the spec surface; TASKS.md remains the default.
  • User story: N/A — foundational tooling; driven by downstream consumers (agentbrew/dotfiles/oncall-hub) adopting an Issues backend.
  • Competitor prior art: N/A — extends tasks.md's own backend model (builds on the existing sync module's gh integration).

Test plan

  • npm run build clean; npm test green across all workspaces (cli 209, parser 84, mcp 111, lint 62).
  • 26 new backend tests (backend/*.test.ts): github-issues mapping/next/create/claim/complete (mocked gh), config resolution + precedence, tasks-md read/create/complete, priority sort.
  • Smoke-tested the built CLI end-to-end against a temp TASKS.md (pick/create/list).

Follow-up

  • MCP tools backend-awareness + workspace-mode cross-backend aggregation remain (tracked by the github-issues-backend TASKS.md entry).

🤖 Written by an agent, not Fyodor. Ping me if this looks off.

@fyodoriv fyodoriv merged commit 293d589 into main May 29, 2026
5 checks passed
@fyodoriv fyodoriv deleted the feat/github-issues-backend branch May 29, 2026 19:38
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