git-tasksStructured, line-pinned annotations that live inside your Git repository — designed to improve team collaboration and deployment pipelines. Most context about a codebase lives outside it: in tickets, chats, PR comments that get archived, and Why it's different by design
Built for three audiences at onceHumansA VS Code extension surfaces annotations as gutter icons, hover tooltips, and a sidebar grouped by file — with an accent ring on anything assigned to you. The AI coding agentsThe schema is stable, fully documented, and machine-readable. An agent can:
all without an API key, a webhook, or an external service. The repo is the queue, the queue is the repo. CI/CD pipelinesBecause annotations are committed JSON, pipelines can treat them as first-class signals:
No bot account, no API rate limits — just a What it's forgit-tasks is for enhancing the development cycle, not for managing projects. It's the layer that captures and acts on the small-grained, code-attached context that today gets lost in chat threads, dropped TODOs, and stale review comments — and exposes it equally to the developer in their editor, the agent doing the work, and the pipeline shipping it. InstallVS Code extension
Then press This works because the repo includes CLIOnce published to npm:
During development (in the repo root):
To remove the symlink when done: TestingThe repo has a vitest suite covering the core annotation engine, the git helper, and the CLI surface most exercised by CI integrations.
What's covered:
VS Code extension surface ( Tests scaffold isolated temp repos via
A UsageVS Code
Icons in the gutter:
Issue example:
Task example:
CLI
Run Storage / schemaEach annotated source file gets its own JSON file under
Commit the CLI reference
OutputRows where How drift detection worksWhen you create an annotation, the lines covered by it are stored verbatim in Surviving PR merges and conflictsThe whole point of pinning annotations to
|
| Hook | Behavior |
|---|---|
pre-commit |
Auto-relocates drifted annotations and re-stages them; blocks the commit if anything is stale or orphan. |
post-merge |
Runs reconcile --auto --quiet after every git pull, so line shifts that landed on the remote heal locally on the next pull. |
post-checkout |
Same as post-merge, but on branch checkout. |
How this repo dogfoods git-tasks
This repository uses git-tasks on itself, so cloning it is also a working demo and a copy-pasteable template.
Seeded annotations (.git-tasks/)
Four real entries pinned to current source — every CI integration below operates on this data:
| File:line | Type | Tags | Showcases |
|---|---|---|---|
src/taskManager.ts:321 |
task | enhancement, good-first-issue, onboarding |
AI-agent + onboarding workflow (assigned to claude) |
src/taskManager.ts:533 |
comment | merge-driver, onboarding |
Annotation pinned to the line it describes — reorganising the merge driver triggers drift on this entry |
cli/commands/check.ts:54 |
task | enhancement, cli, onboarding |
AI-agent task with a concrete implementation hint |
cli/invocation.ts:14 |
issue (severity: major) |
windows, portability |
CI's --fail-on-open-severity critical --base … gate (triggers when a PR also edits this file) |
Try git-tasks list --mine, git-tasks list --tag onboarding, or git-tasks list --tag merge-driver after cloning.
Workflows (.github/workflows/)
| File | When | What it does |
|---|---|---|
ci.yml → build |
every push / PR | tsc build |
ci.yml → pre-merge-check |
PRs | git-tasks check --fail-on stale,orphan, blocks PRs that introduce open critical issues on the diff, emits GitHub Checks inline annotations for every entry on a changed file, and posts a sticky PR comment with the full report |
ci.yml → post-merge-audit |
push to main |
runs reconcile on main; fails if anything moved, signalling a contributor merged without local hooks installed |
auto-resolve.yml |
push to main |
scans the merge commit message for closes git-tasks: <id> (also gt-closes <id>) and auto-resolves the matching entries in a bot-authored follow-up commit |
weekly-report.yml |
every Monday + manual | runs git-tasks stats --sla-days 30, publishes the report to the workflow summary, fails on aged criticals, and opens / updates a tracking GitHub Issue when it does |
Local hooks (git-tasks install-hooks)
| Hook | Behavior |
|---|---|
pre-commit |
Auto-relocates drifted annotations and re-stages them; blocks the commit if anything is stale or orphan. |
post-merge |
Runs reconcile --auto --quiet after every git pull, so line shifts that landed on the remote heal locally on the next pull. |
post-checkout |
Same as post-merge, but on branch checkout. |
Replicate in your repo
git-tasks install-hooks
git-tasks install-merge-driver
cp -R <git-tasks-repo>/.github/workflows/ .github/workflows/
git add .github .gitattributes
git commit -m "ci: wire up git-tasks template"
Adjust --base origin/<your-default-branch> in ci.yml if your default isn't main.
Beyond the editor: SDLC integration ideas
Once annotations live in the repo as structured JSON, the same data file plugs into almost every stage of the development lifecycle. Each of the ideas below is a thin reader on top of .git-tasks/*.json — no new schema, no new service.
:sparkles: Five of these ideas already ship as the template wired up in this repo — see the dogfooding tables above: Checks-API inline annotations + sticky PR comment (
ci.yml), auto-resolve oncloses git-tasks: <id>(auto-resolve.yml), scheduled SLA report (weekly-report.yml), thegit-tasks diffandgit-tasks statscommands, an annotation pinned to the line it describes, and an--tag onboardingwalkthrough. Copy the workflow files and you have the same setup in your repo.
PR review (biggest visibility lift)
- Inline diff comments via the GitHub Checks Annotations API. In a CI workflow, walk every entry whose
line/endLineoverlaps the PR diff and emit::warning file=…,line=…::<text>. Each annotation then appears as an inline marker in the GitHub diff view, exactly like a linter finding. - Sticky PR comment listing annotations touching the diff, grouped by severity, posted by a workflow with
pull-requests: write. - Auto-resolve on merge. A workflow that scans the merge commit message for
closes git-tasks: <id>(orcloses gt:<id>) and updates those entries'statustoresolvedin a follow-up commit — the same UX ascloses [#123](https://github.com/ribarrat/git-tasks/issues/123)for issues. - Reconcile-drift gate. Run
git-tasks reconcile --dry-runagainst the PR branch and fail the check if the PR introduces newstaleororphanentries.
Production / on-call (biggest leverage)
- Stack-trace ↔ annotation map. A Sentry / Datadog / Honeycomb plugin (or a plain webhook) takes each error frame
(file, line, commitSHA)and reads.git-tasks/at the deployed commit. The on-call sees:"This line was annotated 6 weeks ago by bob@: 'rate-limit me when concurrency > 50'. Status: open, priority: high." Tribal knowledge becomes operational context at the exact moment it's needed.
- On-call run sheet.
git-tasks list --tag oncall-watchout --status open --jsonbecomes the live watch-list, edited by the people who own the code.
Deploy
- Gate on open criticals. Wrap your deploy script with:
Block ships that carry unresolved criticals on touched files. One CLI call, no ticket-tracker API.git-tasks check --fail-on-open-severity critical --base <last-deployed-sha> - Auto-generated release notes.
Feeds a "What was fixed" section into the release notes, grouped bygit-tasks list --status resolved --json | jq '[.[] | select(.updatedAt > "<last-tag-date>")]'typeandseverity.
Test
- Failure triage. When a test fails in CI, look up annotations on the test file and on the source under test, and surface them in the failure summary. Cuts triage time when the relevant context was already written down.
- Snapshot sentinels. Annotations tagged
snapshot-volatilepinned to known-fragile snapshot lines; a CI step auto-resolves them when the snapshot is updated in the same PR.
Planning, docs, onboarding
- Annotations that can't rot. Pin a comment to the line where a non-obvious decision or assumption lives. If someone replaces that code later, drift detection surfaces the note as
staleand forces a fresh look instead of silently lying. - Guided onboarding.
git-tasks list --tag onboardingproduces an in-codebase tour for new hires, walked through in order.
AI agents (compounds with everything else)
The schema is stable and machine-readable, so beyond the "agent picks a task and resolves it" loop, annotations become context for every agent:
- Code-review agents fetch annotations touching the diff and weigh them in the review prompt ("flag this PR if it doesn't address the open critical race-condition note on
auth.ts:42"). - Doc-writing agents prefer files with low open-annotation density as canonical examples.
- Test-generation agents prioritize files with open
severity: majorannotations. - Refactoring agents read
commitSHA+lineContentto understand the original intent before changing the line.
All of these are git-tasks list --json plus a prompt template.
Continuous improvement
- Density heatmap. Weekly report:
(file, open_issues, oldest_open_age, recent_velocity). Top-quartile files become refactor candidates. - SLA cron. A scheduled job that pings Slack: "4 critical annotations open > 30 days". The data is already in the repo; just needs the webhook.
- Post-incident annotations. After every postmortem, the owner adds a
type: issueentry at the exact line that caused the incident, tagged with the incident ID. Future readers of that line see the history.
Where to invest first
If you're picking one integration to ship next, the leverage order is roughly:
| # | Integration | Why it pays off first |
|---|---|---|
| 1 | PR review (Checks API inline comments) | Highest visibility lift; pure CI workflow change, no infra. |
| 2 | Stack-trace → annotation lookup in error monitors | Converts tribal knowledge into incident context at the moment it matters. |
| 3 | Deploy gate on open criticals | Prevents the worst class of regression with one CLI call. |
| 4 | Release-notes auto-generation | Free writeup quality; reuses data you already maintain. |
| 5 | Agent context injection | Tiny effort; compounds with every agent your team adds. |
The thread tying them together: one .git-tasks/*.json file is the input to all of them. Every new integration is a thin reader on the same source of truth, which is exactly the property that makes the in-repo design pay off.









