Sync Tasks
Build an evidence-backed reconciliation report. Use the kotgent CLI for tracker reads and git plus
ordinary file inspection for repository evidence. Do not use an MCP server, SDK, direct daemon request,
or helper script.
Stay read-only
Do not run task add, task claim, task comment, task review, task done, task unlink, task move,
task dep, task delete, project init, project delete, or project restore. Do not edit repository
files. Suggested commands belong only in the report.
Treat successful task and project stdout as JSON and failure stderr as JSON. Exit 2 means this skill
built an invalid command and stderr may be plain usage text; stop and report it exactly. Never retry a
deleted-project error or restore/reinitialize a project.
Establish the project and task snapshot
- Require
git and kotgent, resolve git rev-parse --show-toplevel, and read the root
.kotgent.json. Stop if the file is missing or its id is not a UUID.
- Read both
kotgent project list and, only if needed, kotgent project list --archived. Record whether
the exact UUID is live or archived. An unknown UUID is an error. An archived project may still be read,
but label it and do not propose an automatic restore.
- Run
kotgent task list --project <project-uuid>. Select only rows whose state is exactly todo or
in_progress.
- Run
kotgent task show <ref> for every selected row. Use the full detail, including body,
dependencies, linked sessions, and activity; do not reconcile from list titles alone.
- Record HEAD, branch or detached state, and
git status --short so the report identifies its snapshot.
Inspect repository evidence in this order
- Read applicable
AGENTS.md and CLAUDE.md files first. Treat them as constraints, not backlog items.
- Find active plan and backlog files. Exclude completed, superseded, archived, or historical plans unless
they explain a mismatch.
- Inspect the implementation and tests named by tasks or plans. Use exact symbols, paths, assertions,
and observable behavior as evidence.
- Search tracked content for relevant
TODO and FIXME markers. Do not promote every marker into a
task; require a concrete match to intended repository work.
- Inspect relevant Git history with focused
git log, git show, or git blame. Use commit IDs when
history proves completion, replacement, or architectural change.
- Include relevant uncommitted and untracked work from
git status; never treat a clean HEAD as the
whole repository when the worktree contains evidence.
Match by scope, acceptance behavior, identifiers, and changed paths. Title similarity alone is not proof.
Classify the mapping
Assign every tracker task and every concrete repository-only work item exactly one primary label:
aligned: task scope and current repository intent agree.
drifted: both exist, but scope, assumptions, dependencies, or acceptance evidence disagree.
missing in repo: a kotgent task has no current repository evidence.
missing in kotgent: current repository intent has no matching active kotgent task.
duplicate: two or more active kotgent tasks represent the same work; name the canonical ref.
For each row, cite evidence as path:line, symbol/test name, task activity entry, worktree path, or commit
ID. State uncertainty instead of upgrading a weak textual similarity into a fact.
Report without applying
Report the project UUID/status and Git snapshot, then the mapping grouped by label. Include task ref,
state, concise scope, repository counterpart, evidence, and consequence. List repository-only items too.
For every proposed tracker change, print the exact supported kotgent command with concrete refs,
project UUID, body, and dependency direction. There is no CLI command to rewrite an existing title or
body; for drifted, propose a replacement add and a separately confirmed delete instead of inventing an
update command. Mutations require either a proven current kotgent pane or a supplied session ID. Never
probe IDs found in task sessions, read KOTGENT_SESSION_ID as identity, or infer the current session
from names, cwd, other environment values, or recency. If needed, use at most one ref-less
kotgent task show to prove current-pane resolution: accept
only success or the exact free-session error; this permits the implicit current-pane command form but
does not reveal an ID. If neither form is available, say session ID required rather than guessing or
printing a misleading runnable command. Do not execute any proposed command.
1---2name: sync-tasks3description: Compare active kotgent tasks with repository guidance, plans, code, tests, TODOs, and Git history, and report task/repository drift with evidence and proposed CLI commands. Use when the user asks to sync, reconcile, map, or compare the kotgent backlog with the current repository. This workflow is always read-only.4---56# Sync Tasks78Build an evidence-backed reconciliation report. Use the `kotgent` CLI for tracker reads and `git` plus9ordinary file inspection for repository evidence. Do not use an MCP server, SDK, direct daemon request,10or helper script.1112## Stay read-only1314Do not run `task add`, `task claim`, `task comment`, `task review`, `task done`, `task unlink`, `task move`,15`task dep`, `task delete`, `project init`, `project delete`, or `project restore`. Do not edit repository16files. Suggested commands belong only in the report.1718Treat successful `task` and `project` stdout as JSON and failure stderr as JSON. Exit `2` means this skill19built an invalid command and stderr may be plain usage text; stop and report it exactly. Never retry a20deleted-project error or restore/reinitialize a project.2122## Establish the project and task snapshot23241. Require `git` and `kotgent`, resolve `git rev-parse --show-toplevel`, and read the root25 `.kotgent.json`. Stop if the file is missing or its `id` is not a UUID.262. Read both `kotgent project list` and, only if needed, `kotgent project list --archived`. Record whether27 the exact UUID is live or archived. An unknown UUID is an error. An archived project may still be read,28 but label it and do not propose an automatic restore.293. Run `kotgent task list --project <project-uuid>`. Select only rows whose state is exactly `todo` or30 `in_progress`.314. Run `kotgent task show <ref>` for every selected row. Use the full detail, including body,32 dependencies, linked sessions, and activity; do not reconcile from list titles alone.335. Record HEAD, branch or detached state, and `git status --short` so the report identifies its snapshot.3435## Inspect repository evidence in this order36371. Read applicable `AGENTS.md` and `CLAUDE.md` files first. Treat them as constraints, not backlog items.382. Find active plan and backlog files. Exclude completed, superseded, archived, or historical plans unless39 they explain a mismatch.403. Inspect the implementation and tests named by tasks or plans. Use exact symbols, paths, assertions,41 and observable behavior as evidence.424. Search tracked content for relevant `TODO` and `FIXME` markers. Do not promote every marker into a43 task; require a concrete match to intended repository work.445. Inspect relevant Git history with focused `git log`, `git show`, or `git blame`. Use commit IDs when45 history proves completion, replacement, or architectural change.466. Include relevant uncommitted and untracked work from `git status`; never treat a clean HEAD as the47 whole repository when the worktree contains evidence.4849Match by scope, acceptance behavior, identifiers, and changed paths. Title similarity alone is not proof.5051## Classify the mapping5253Assign every tracker task and every concrete repository-only work item exactly one primary label:5455- `aligned`: task scope and current repository intent agree.56- `drifted`: both exist, but scope, assumptions, dependencies, or acceptance evidence disagree.57- `missing in repo`: a kotgent task has no current repository evidence.58- `missing in kotgent`: current repository intent has no matching active kotgent task.59- `duplicate`: two or more active kotgent tasks represent the same work; name the canonical ref.6061For each row, cite evidence as `path:line`, symbol/test name, task activity entry, worktree path, or commit62ID. State uncertainty instead of upgrading a weak textual similarity into a fact.6364## Report without applying6566Report the project UUID/status and Git snapshot, then the mapping grouped by label. Include task ref,67state, concise scope, repository counterpart, evidence, and consequence. List repository-only items too.6869For every proposed tracker change, print the exact supported `kotgent` command with concrete refs,70project UUID, body, and dependency direction. There is no CLI command to rewrite an existing title or71body; for `drifted`, propose a replacement add and a separately confirmed delete instead of inventing an72update command. Mutations require either a proven current kotgent pane or a supplied session ID. Never73probe IDs found in task `sessions`, read `KOTGENT_SESSION_ID` as identity, or infer the current session74from names, cwd, other environment values, or recency. If needed, use at most one ref-less75`kotgent task show` to prove current-pane resolution: accept76only success or the exact free-session error; this permits the implicit current-pane command form but77does not reveal an ID. If neither form is available, say `session ID required` rather than guessing or78printing a misleading runnable command. Do not execute any proposed command.