DocsThe state of a project
The state of a project
desk state (MCP tool state) reads GitHub, git and the owner's prompts, and prints what is open and what to do first. An agent that starts or continues work reads it before it does anything else. The skill desk-continue tells the agent how.
What it reads
| Source | What it gives |
|---|---|
gh pr list (open) |
Each open PR: the branch, the author, the checks, the issues that it links, and the rules of desk merge that hold or do not hold. |
gh issue list (open) |
Each open issue: the type and the priority from the header of the body, the questions that wait for the owner, and the PR that links it. |
| Comments of the last 14 days | The feedback of the owner ("Feedback of the owner") on an issue or a PR that is open. |
gh pr list (merged) |
The PRs merged lately. |
All PRs with their bodies (pullRequests("all") of the Forge) |
The merged PRs that close an open issue with a closing word, and the merged PRs with a title like an open issue. |
| The comments of an issue with questions | Whether the owner answered, and the short routes that the decision of the owner recorded. |
git worktree list |
Each worktree: the branch, the commits ahead of the base, the tracked files with a change, and the open PR of the branch. |
| The transcripts of the AI client | The newest prompts of the owner in this repository (--limit, default 5). |
| The files of the repository config | The register of the owner's requests (review.requirements.register) and the names of the instruction files. |
The feedback is found by its heading "Feedback of the owner", as on an issue, so anyone who can comment on the repository can write it. desk feedback writes it only for words that the owner typed.
A source that fails is named in the section "Not read". The rest of the state is still shown, and the agent does not take a missing list for an empty one.
The order of "Do first"
owner-feedback: feedback of the owner in the last 14 days. It wins over the body of the issue.worktree: a worktree that holds commits or changes that no open PR has. The agent continues there.pr: an open PR that a rule ofdesk mergestops. The item names the step: an independent review of the current head, a fix, a decision on an open finding, the section "Owner's request", or the checks.merge: an open PR for which every rule holds. The agent runsdesk merge --pr <n>when the owner asks.issue: an open issue with no PR and no worktree, by the Priority of its header: High before Medium before Low, then by number. An issue with no Priority comes last.
An issue that does not follow the format of the repository (desk issue audit) keeps its rank, and its item says "not ready". The agent fixes the issue first. The section "Issues that do not follow the format" lists them.
An issue with questions that the owner has not answered keeps its rank. Its item says "issue, blocked on a decision", and the agent does not build what it blocks. The list shows at most 6 such items, so that work that is free stays in the list. The section "Waiting for the owner" lists all of them. The section "Not ranked" lists the open issues that have no Priority in the header.
A short route that the owner chose (the record "Short route of the owner" in a decision comment) is due when the date in its "Revisit when" fact has come. Its item says "issue, short route due", it comes before the other issues, and it names the debt: the agent opens the issue for the right route and puts the question to the owner again. A fact with no date is kept and is not checked.
A row is stale when a merged PR closes the open issue with a closing word (Closes #n, Fixes #n, Resolves #n; refs #n closes nothing). The issue keeps its rank, its item says "issue, stale" and names the PR, and the agent checks the Done when and closes the issue with the evidence. A merged PR whose title shares most words with the title of an open issue is listed as "possible, not verified" and changes no rank. The section "Stale rows" lists both. A repository on the desk server lists no stale rows yet: its Forge gives no PR bodies in pullRequests.
Dependencies and claims (#119)
An issue depends on another issue through the line **Blocked by:** #3, #12 of its body, under the header line. desk issue block --issue <n> --by <m> adds m to the line, and desk issue unblock removes it; both work on GitHub and on the desk server. An issue whose work a session reported done (## Work done, desk issue done) ranks after the ready issues as "reported done, waits for validation"; after issue.stallDays without a validator (3 by default; 0 turns the guard off) it comes back among the work to do, and the close sweep validates and closes it. A dependency on the issue itself, or one that closes a cycle, is refused. While a dependency is open, the item of the issue says "issue, waits on another issue", names it in waitsOn, and comes after the ready issues. A dependency that is not among the open issues is closed, so it counts as done.
A claim says that an agent session works on an open issue. It is a record of the desk server (table issue_claims): the identity, the holder and the expiry. The holder is the id of the work folder, because the agents of a repository can share one identity; outside a work folder, --as <name> names the session.
desk issue claim --issue <n> [--hours <h>]claims it for 4 hours by default (0.25 to 72). A second claim of the same holder renews it. A live claim of another holder is refused with its holder and its expiry.desk issue release --issue <n>removes the claim of this holder. A close of the issue removes its claim.- In
desk state, an issue that this work folder claimed comes first among the issues ("issue, claimed by this session"). An issue that another session claimed comes after the ready issues ("issue, claimed by another session"), and the agent takes the next one. The item of a ready issue says to claim it first. - A repository on GitHub has no claims:
desk issue claimsays that a claim needs the desk server.
The list has 12 items at most. The quotes rule of desk merge reads the owner's prompts, and that takes seconds. The state checks it only for a PR that every other rule lets through.
With chat-recall
The state says what is open now. chat-recall says what was said. The skill desk-continue calls recall_smart_resume and recall_user_prompts when the tools exist, and takes the intent from them. When they are missing, the section "The newest prompts of the owner" of the state is the source.
Commands
desk state: the text for an agent.desk state --json: the same data. The fields arerepo,waiting,unranked,feedback,prs,issues,worktrees,merged,prompts,register,instructions,errorsandnext. An issue hasblockedBy(its open dependencies) andclaim; an item ofnexthaswaitsOnandclaimed(mineorother).desk state --repo <owner/repo>: another repository on GitHub. The worktrees and the prompts are those of the current checkout.