Work on a OneDev pull request
Check out the PR source branch, read the relevant context, and implement the
work.
The work may also require replies or resolutions on OneDev. Push before
publish: any reply or resolve that implies a code change is complete must
wait until the commits are on the server, so reviewers are not notified of a
change they cannot see yet.
Prerequisites
tod is installed and configured.
- The current repository is the PR's source project.
Stop on error
Run the workflow sequentially. On any command failure, missing required
output, or failed precondition, stop immediately, report the command and
error, and wait for the user. Do not continue, repair state beyond the
current step, or retry silently.
Workflow
Given a <pr-reference> (e.g. 42, #42, myproject#42, or PROJ-42):
Confirm the source project. Read the PR metadata and the project
inferred from the working directory:
tod pr get <pr-reference>
tod project current
From tod pr get, note <source-project>. The output of tod project current
must equal <source-project>. If it does not, stop and tell the user.
Check out the pull request. tod pr checkout requires a clean
working directory:
git status --porcelain
Any output means there are uncommitted changes; stop and ask the user to
commit or stash them before re-running the skill.
Then check out the PR head onto the source branch (when the PR is open
and the cwd is the source project):
tod pr checkout <pr-reference>
Verify you are on <source-branch>:
git symbolic-ref --short HEAD
Determine the work specification. The work may
come from the user's prompt directly or from feedback on OneDev:
| Work instruction source |
Primary specification |
OneDev context |
| User prompt specifies the work |
The prompt (concrete task, scope, approach, or constraints beyond naming the PR) |
Always use PR metadata and description; inspect the feedback sources identified by the prompt and any directly related discussion as supplementary context |
| Prompt only names the PR |
PR title and description |
Comments, code comments |
| Prompt generally asks to address feedback |
Applicable PR comments and code comments |
PR metadata, description |
Even when the prompt is the primary specification, do not proceed from the
prompt alone. The PR metadata and description fetched in step 1 are required
context, and any feedback source the prompt points to must be fetched in
full, including its replies. First determine the current login name:
tod get-login-name
Save the login name and match it against the author of each PR comment,
code comment and reply. Treat matching comments as your own prior context
rather than independent collaborator feedback.
| Context source |
How to inspect |
| PR comments |
tod pr get-comments <pr-reference> |
| Line-anchored code comments |
tod pr get-code-comments <pr-reference> — note id, file, line range, resolution state, and replies. |
Read the current patch to understand what the PR already changes relative
to its target:
tod pr get-patch <pr-reference>
When the patch alone is insufficient, inspect the corresponding files in
the checked-out working copy.
Inspect embedded resources. Download every linked image or file from
the PR description and discussion:
Assess, plan, and execute. Check the requested work against the current
code and behavior before deciding that a code change is needed.
- If the request is reasonable and not already implemented, summarize what
you will do, outline your approach, and then implement the change.
- If the request is already implemented, verify that conclusion and do not
make a redundant code change. Draft a response explaining the existing
implementation and the evidence you found.
- If the request is unreasonable, technically incorrect, contradictory, or
unsafe, do not force a code change merely to satisfy it. Draft a response
that clearly explains the issue and, when useful, proposes an
alternative.
In either no-code-change case, responding in the relevant PR or code-comment
is the work product. Before running any tod command that changes OneDev
state (such as adding a comment or reply, resolving a code comment, or
changing PR state), show the exact planned action and obtain explicit user
consent.
Push before publishing code-dependent updates. If a reply or resolve
relies on code being submitted — for example, "Fixed", "addressed your
feedback", or an explanation of a code change — draft it and obtain consent
now, but do not post it yet. Record the deferred action so it can be applied
only after the code has been pushed. Replies that do not depend on submitted
code, such as clarifications, questions, or disagreement, may be posted
immediately after obtaining consent.
Match the discussion channel when posting immediately or deferring an
update:
- General PR feedback →
tod pr add-comment <pr-reference> "<reply>"
- Line-anchored thread →
tod code-comment add-reply <comment-id> "<reply>"
- Concern addressed in code →
tod code-comment resolve <comment-id> --note "<why>" when appropriate
When code was changed, leave the working copy on the PR source branch with
the implementation and any deferred OneDev actions ready for a separate
submission request. No submission is needed when the outcome is only a
discussion response.
Source: theonedev/tod — distributed by TomeVault.
1---2name: work-on-pull-request3description: Implement changes for a OneDev pull request. Use when the user asks to address feedback, fix, improve, or continue PR work. Use when this capability is needed.4---56# Work on a OneDev pull request78Check out the PR source branch, read the relevant context, and implement the9work.1011The work may also require replies or resolutions on OneDev. **Push before12publish:** any reply or resolve that implies a code change is complete must13wait until the commits are on the server, so reviewers are not notified of a14change they cannot see yet.1516## Prerequisites1718- `tod` is installed and configured.19- The current repository is the PR's source project.2021## Stop on error2223Run the workflow sequentially. On any command failure, missing required24output, or failed precondition, stop immediately, report the command and25error, and wait for the user. Do not continue, repair state beyond the26current step, or retry silently.2728## Workflow2930Given a `<pr-reference>` (e.g. `42`, `#42`, `myproject#42`, or `PROJ-42`):31321. **Confirm the source project.** Read the PR metadata and the project33 inferred from the working directory:34 ```bash35 tod pr get <pr-reference>36 tod project current37 ```38 From `tod pr get`, note `<source-project>`. The output of `tod project current` 39 must equal `<source-project>`. If it does not, stop and tell the user.40412. **Check out the pull request.** `tod pr checkout` requires a clean42 working directory:43 ```bash44 git status --porcelain45 ```46 Any output means there are uncommitted changes; stop and ask the user to47 commit or stash them before re-running the skill.4849 Then check out the PR head onto the source branch (when the PR is open50 and the cwd is the source project):51 ```bash52 tod pr checkout <pr-reference>53 ```54 Verify you are on `<source-branch>`:55 ```bash56 git symbolic-ref --short HEAD57 ```58593. **Determine the work specification.** The work may60 come from the user's prompt directly or from feedback on OneDev:6162 | Work instruction source | Primary specification | OneDev context |63 |-------------------------|-----------------------|----------------|64 | User prompt specifies the work | The prompt (concrete task, scope, approach, or constraints beyond naming the PR) | Always use PR metadata and description; inspect the feedback sources identified by the prompt and any directly related discussion as supplementary context |65 | Prompt only names the PR | PR title and description | Comments, code comments |66 | Prompt generally asks to address feedback | Applicable PR comments and code comments | PR metadata, description |6768 Even when the prompt is the primary specification, do not proceed from the69 prompt alone. The PR metadata and description fetched in step 1 are required70 context, and any feedback source the prompt points to must be fetched in71 full, including its replies. First determine the current login name:72 ```bash73 tod get-login-name74 ```75 Save the login name and match it against the author of each PR comment,76 code comment and reply. Treat matching comments as your own prior context 77 rather than independent collaborator feedback.7879 | Context source | How to inspect |80 |----------------|----------------|81 | PR comments | `tod pr get-comments <pr-reference>` |82 | Line-anchored code comments | `tod pr get-code-comments <pr-reference>` — note `id`, file, line range, resolution state, and replies. |8384 Read the current patch to understand what the PR already changes relative85 to its target:86 ```bash87 tod pr get-patch <pr-reference>88 ```89 When the patch alone is insufficient, inspect the corresponding files in90 the checked-out working copy.9192 **Inspect embedded resources.** Download every linked image or file from93 the PR description and discussion:9495 - Find image and file links (`` and `[label](url)`) in every96 text source you read above.97 - For each URL, save it with the URL **exactly** as written:98 ```bash99 tod download <resource-url> <output-file>100 ```101 - Open images and read other files as needed.1021034. **Assess, plan, and execute.** Check the requested work against the current104 code and behavior before deciding that a code change is needed.105106 - If the request is reasonable and not already implemented, summarize what107 you will do, outline your approach, and then implement the change.108 - If the request is already implemented, verify that conclusion and do not109 make a redundant code change. Draft a response explaining the existing110 implementation and the evidence you found.111 - If the request is unreasonable, technically incorrect, contradictory, or112 unsafe, do not force a code change merely to satisfy it. Draft a response113 that clearly explains the issue and, when useful, proposes an114 alternative.115116 In either no-code-change case, responding in the relevant PR or code-comment117 is the work product. Before running any `tod` command that changes OneDev118 state (such as adding a comment or reply, resolving a code comment, or119 changing PR state), show the exact planned action and obtain explicit user120 consent.121122 **Push before publishing code-dependent updates.** If a reply or resolve123 relies on code being submitted — for example, "Fixed", "addressed your124 feedback", or an explanation of a code change — draft it and obtain consent125 now, but do not post it yet. Record the deferred action so it can be applied126 only after the code has been pushed. Replies that do not depend on submitted127 code, such as clarifications, questions, or disagreement, may be posted128 immediately after obtaining consent.129130 Match the discussion channel when posting immediately or deferring an131 update:132 - General PR feedback → `tod pr add-comment <pr-reference> "<reply>"`133 - Line-anchored thread → `tod code-comment add-reply <comment-id> "<reply>"`134 - Concern addressed in code → `tod code-comment resolve <comment-id> --note "<why>"` when appropriate135 136 When code was changed, leave the working copy on the PR source branch with137 the implementation and any deferred OneDev actions ready for a separate138 submission request. No submission is needed when the outcome is only a139 discussion response.140141---142> Source: [theonedev/tod](https://github.com/theonedev/tod) — distributed by [TomeVault](https://tomevault.io).143<!-- tomevault:4.0:skill_md:2026-06-15 -->