feat: add github-issues task backend#88
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this is needed / Motivation
VISION.md G5 ("File-first, pluggable backends") establishes that
TASKS.mdis 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 aghintegration.What changed
packages/cli/src/backend/— aTaskBackendport (types.ts) with two adapters:github-issues.ts— reads/writes viagh(open issues by marker label;priority/P0..P3labels; assignee = claim; close = complete).repotoken scope only — no GitHub Project required.tasks-md.ts— the default, reusing the parser's deterministicpickBestTask/loadAllTasksfor reads.config.ts— resolves the backend from.tasksmd.json(defaulttasks-md);--backendflag overrides.pick/listare now backend-aware; newcreate/claim/completecommands work on either backend.tasks-mdstays the default, so existing repos are unaffected (G4 preserved — the spec, not the storage, is the portable layer).Vision trace
TASKS.mdremains the default.syncmodule'sghintegration).Test plan
npm run buildclean;npm testgreen across all workspaces (cli 209, parser 84, mcp 111, lint 62).backend/*.test.ts): github-issues mapping/next/create/claim/complete (mockedgh), config resolution + precedence, tasks-md read/create/complete, priority sort.TASKS.md(pick/create/list).Follow-up
github-issues-backendTASKS.md entry).🤖 Written by an agent, not Fyodor. Ping me if this looks off.