LLxprt Issue Workflow
End-to-end workflow for taking a GitHub issue in this repository from intake to a
green, review-clean pull request.
1. Setup
- Checkout main and pull latest from origin. Do NOT delete any files or run
git clean — just git checkout main && git pull.
- Create branch
issueNUM (e.g. issue1234).
- Use
gh to pull the issue and its comments, AND assign the issue to acoliver:
gh issue edit NUM --add-assignee acoliver.
- Always use
gh for issues/PRs/comments — never webfetch. Use proper gh command
syntax and avoid unescaped backticks in bodies/comments (they trigger shell
command substitution).
2. Research and plan
- Research the issue in the codebase using the description and comments as the
starting point.
- Create a test-first plan following dev-docs/RULES.md behavioral tests (no mock
theater). See the
typescript-test-writing skill for the distilled test rules.
- Plan documents go in
project-plans/, NEVER in dev-docs/. dev-docs/ holds
durable engineering reference material (PLAN.md, RULES.md, architecture notes);
project-plans/ holds per-issue and per-feature planning. Writing a plan to
dev-docs/plans/ is wrong — dev-docs/PLAN.md and dev-docs/PLAN-TEMPLATE.md are
the methodology you follow, not the destination you write to. This is enforced
by scripts/check-doc-placement.ts, which fails if dev-docs/plans/ exists.
- Temporary issue state belongs under project-plans/, not dev-docs/.
Scope rules
- Scope is based on functionality, not line counts. Never add line or file counts
for issue scope; if an issue contains them, ignore them.
- Do not update unrelated project-plan files owned by other issue efforts except
when required to resolve conflicts or unblock the current PR. CI, lint, test,
and formatting failures automatically authorize bounded scope expansion needed
to make the PR green; do not ask for approval based only on file or line counts.
Ask only before major functional or architectural expansions beyond the issue
scope.
3. Implement and review via subagents
- Delegate implementation to the typescriptexpert subagent with exquisite
detail. It must run the full verification cycle (below) as part of the work.
- Have deepthinker review for compliance and issue intent (it must also run the
verification cycle).
- If review fails: remediate with typescriptexpert (giving feedback, run
verification), then have deepthinker review again. Cap: at most 2
review rounds total (initial + 1 remediation). If the second round
still has findings, fix HIGH-severity items, document remaining
MEDIUM/LOW as known follow-ups in the plan, and proceed to PR.
Do NOT enter an infinite review loop.
4. Verification cycle (how AND when)
Run ALL of the following before checking in code changes, before pushing, and
before creating PRs. Fix any errors and ensure code is formatted. Re-run the
whole cycle after every remediation round:
npm run test
npm run lint
npm run typecheck
npm run format
npm run build
bun scripts/start.ts --profile-load stepfun-37 "write me a haiku and nothing else"
Notes on the smoke test (last command):
- Profile:
stepfun-37 (profile name is tracked in .llxprt/LLXPRT.md).
- There is NO scripts/start.js — only scripts/start.ts — so the runner must be
bun, not node.
- Run it as part of the verification cycle, and again whenever anything that
could affect startup changes.
5. Open code review (ocr) BEFORE pushing
Also see the open-code-review skill.
Launch detached, never in the foreground:
nohup ocr review --audience agent --timeout 20 {{args}} > /tmp/ocr_review.log 2>&1 & echo PID=$!
ALWAYS pass --timeout 20 for a guaranteed 20-minute floor (ocr's per-task
default is only 10 minutes).
NEVER run in the foreground: the shell's ~2-minute process watchdog
SIGTERM-kills the foreground process group mid-review, losing all buffered
output — a high timeout_seconds does NOT save it.
POLL and WATCH for it finishing: repeatedly read /tmp/ocr_review.log and check
the PID (ps -p $PID or kill -0 $PID) with short tool calls until the
process is DONE.
Ensure tests are NOT filtered out: ocr excludes test/spec files by default, so
rely on the global ~/.opencodereview/rule.json include patterns
(**/.test., **/.spec., /tests/) to re-include them.
If stdout is lost anyway, recover findings from
~/.opencodereview/sessions//.jsonl (grep for code_comment tool calls).
Address EVERY ocr finding: remediate with typescriptexpert, re-run the
verification cycle, and re-run ocr if changes were significant.
Cap: at most 2 OCR rounds total (initial + 1 remediation). If the
second round still has findings, fix HIGH-severity items, document
remaining MEDIUM/LOW as known follow-ups in the plan, and proceed to PR.
Do NOT enter an infinite review loop.
6. Create the PR
- Use the PR-creator skill when creating PRs if available.
- Title must include the issue number being fixed, e.g.
Adds cat pictures to every UI screen (Fixes #1234).
- Body must include
closes #NUM or fixes #NUM and exquisite detail.
7. Watch CI and address CodeRabbit
- Watch until workflows finish:
gh pr checks NUM --watch --interval 300
(5-minute interval). Give the shell tool a timeout comfortably above the
interval.
- GitHub runners usually take up to 15 minutes; loop up to 5 times max if checks
are not done, printing the current timestamp between iterations. Never make
unsourced claims about how long things have been pending — report status
factually.
- Address every CodeRabbit comment and any CI failure (using the same
subagents), run the verification cycle, add/commit/push, and watch again —
loop until all workflows pass and all CodeRabbit issues are resolved.
Evaluate each CodeRabbit issue against the actual source; never dismiss one
merely because it is labeled "nit" or "code quality", but dismiss ones that
are far outside PR scope or factual mistakes. Comment on each CodeRabbit issue
explaining the action taken and resolve it if addressed or provably invalid.
- Never assume a CI failure is "unrelated to my changes." The only exception is
proof via
gh that the same tests fail on main or other recent PRs — and even
then, fix the test if possible.
- NEVER exit to prompt telling the user workflows are still running — you must
watch, loop, fix, and watch until complete.
8. Merge
- DO NOT MERGE PRs YOURSELF. Wait until the user explicitly says to merge.
- Always report PR status (CI green, threads resolved, ready to merge) and ask
for confirmation before merging.
Gotchas
bun install --frozen-lockfile is structurally unusable in this repo: Bun
re-normalizes the lockfile on every pass and fails frozen even immediately
after a clean rm bun.lock && bun install generation. Renaming the private
root package does NOT fix it. Root cause is the monorepo structure (root
package, packages/cli, and a self-override all named @vybestack/llxprt-code,
plus file:../ workspace protocol and 26 overrides). Clean generation
(rm bun.lock && bun install) IS deterministic (byte-identical SHA across
runs, all 16 workspaces incl packages/cli). Plain bun install against the
committed lockfile works (exit 0, all 16 workspaces resolve, postinstall.cjs
Bun-guard exits 0 without triggering npm build). Therefore any Bun CI smoke
must use plain bun install, NOT --frozen-lockfile. Also: 15/16 workspaces
symlink to ../../packages/; packages/cli (@vybestack/llxprt-code) resolves
to the published npm package due to the name collision — a known out-of-scope
pre-existing issue.
- Check the current year before creating each new file; do not stamp last year
on a new file's copyright.
- This project is moving to bun/TypeScript: no new .js files or vitest/node
tests should be created. Everything is TS/Bun and a bun test.
1---2name: llxprt-issue-workflow3description: Use this skill when asked to address, fix, or work on a GitHub issue in the llxprt-code repository. Covers the complete issue lifecycle - branch setup, gh CLI usage, test-first planning, subagent delegation and review loops, the full verification cycle (including the stepfun-37 smoke test), open code review (ocr), PR creation, and CI/CodeRabbit watching.4---56# LLxprt Issue Workflow78End-to-end workflow for taking a GitHub issue in this repository from intake to a9green, review-clean pull request.1011## 1. Setup12131. Checkout main and pull latest from origin. Do NOT delete any files or run14 `git clean` — just `git checkout main && git pull`.152. Create branch `issueNUM` (e.g. `issue1234`).163. Use `gh` to pull the issue and its comments, AND assign the issue to acoliver:17 `gh issue edit NUM --add-assignee acoliver`.184. Always use `gh` for issues/PRs/comments — never webfetch. Use proper gh command19 syntax and avoid unescaped backticks in bodies/comments (they trigger shell20 command substitution).2122## 2. Research and plan2324- Research the issue in the codebase using the description and comments as the25 starting point.26- Create a test-first plan following dev-docs/RULES.md behavioral tests (no mock27 theater). See the `typescript-test-writing` skill for the distilled test rules.28- Plan documents go in `project-plans/`, NEVER in `dev-docs/`. dev-docs/ holds29 durable engineering reference material (PLAN.md, RULES.md, architecture notes);30 project-plans/ holds per-issue and per-feature planning. Writing a plan to31 dev-docs/plans/ is wrong — dev-docs/PLAN.md and dev-docs/PLAN-TEMPLATE.md are32 the methodology you follow, not the destination you write to. This is enforced33 by scripts/check-doc-placement.ts, which fails if dev-docs/plans/ exists.34- Temporary issue state belongs under project-plans/, not dev-docs/.3536### Scope rules3738- Scope is based on functionality, not line counts. Never add line or file counts39 for issue scope; if an issue contains them, ignore them.40- Do not update unrelated project-plan files owned by other issue efforts except41 when required to resolve conflicts or unblock the current PR. CI, lint, test,42 and formatting failures automatically authorize bounded scope expansion needed43 to make the PR green; do not ask for approval based only on file or line counts.44 Ask only before major functional or architectural expansions beyond the issue45 scope.4647## 3. Implement and review via subagents48491. Delegate implementation to the typescriptexpert subagent with exquisite50 detail. It must run the full verification cycle (below) as part of the work.512. Have deepthinker review for compliance and issue intent (it must also run the52 verification cycle).533. If review fails: remediate with typescriptexpert (giving feedback, run54 verification), then have deepthinker review again. **Cap: at most 255 review rounds total** (initial + 1 remediation). If the second round56 still has findings, fix HIGH-severity items, document remaining57 MEDIUM/LOW as known follow-ups in the plan, and proceed to PR.58 Do NOT enter an infinite review loop.5960## 4. Verification cycle (how AND when)6162Run ALL of the following before checking in code changes, before pushing, and63before creating PRs. Fix any errors and ensure code is formatted. Re-run the64whole cycle after every remediation round:6566```bash67npm run test68npm run lint69npm run typecheck70npm run format71npm run build72bun scripts/start.ts --profile-load stepfun-37 "write me a haiku and nothing else"73```7475Notes on the smoke test (last command):7677- Profile: `stepfun-37` (profile name is tracked in .llxprt/LLXPRT.md).78- There is NO scripts/start.js — only scripts/start.ts — so the runner must be79 `bun`, not `node`.80- Run it as part of the verification cycle, and again whenever anything that81 could affect startup changes.8283## 5. Open code review (ocr) BEFORE pushing8485Also see the `open-code-review` skill.86871. Launch detached, never in the foreground:8889 ```bash90 nohup ocr review --audience agent --timeout 20 {{args}} > /tmp/ocr_review.log 2>&1 & echo PID=$!91 ```92932. ALWAYS pass `--timeout 20` for a guaranteed 20-minute floor (ocr's per-task94 default is only 10 minutes).953. NEVER run in the foreground: the shell's ~2-minute process watchdog96 SIGTERM-kills the foreground process group mid-review, losing all buffered97 output — a high timeout_seconds does NOT save it.984. POLL and WATCH for it finishing: repeatedly read /tmp/ocr_review.log and check99 the PID (`ps -p $PID` or `kill -0 $PID`) with short tool calls until the100 process is DONE.1015. Ensure tests are NOT filtered out: ocr excludes test/spec files by default, so102 rely on the global ~/.opencodereview/rule.json include patterns103 (**/*.test.*, **/*.spec.*, **/__tests__/**) to re-include them.1046. If stdout is lost anyway, recover findings from105 ~/.opencodereview/sessions/*/*.jsonl (grep for `code_comment` tool calls).1067. Address EVERY ocr finding: remediate with typescriptexpert, re-run the107 verification cycle, and re-run ocr if changes were significant.108 **Cap: at most 2 OCR rounds total** (initial + 1 remediation). If the109 second round still has findings, fix HIGH-severity items, document110 remaining MEDIUM/LOW as known follow-ups in the plan, and proceed to PR.111 Do NOT enter an infinite review loop.112113## 6. Create the PR114115- Use the PR-creator skill when creating PRs if available.116- Title must include the issue number being fixed, e.g.117 `Adds cat pictures to every UI screen (Fixes #1234)`.118- Body must include `closes #NUM` or `fixes #NUM` and exquisite detail.119120## 7. Watch CI and address CodeRabbit1211221. Watch until workflows finish: `gh pr checks NUM --watch --interval 300`123 (5-minute interval). Give the shell tool a timeout comfortably above the124 interval.1252. GitHub runners usually take up to 15 minutes; loop up to 5 times max if checks126 are not done, printing the current timestamp between iterations. Never make127 unsourced claims about how long things have been pending — report status128 factually.1293. Address every CodeRabbit comment and any CI failure (using the same130 subagents), run the verification cycle, add/commit/push, and watch again —131 loop until all workflows pass and all CodeRabbit issues are resolved.132 Evaluate each CodeRabbit issue against the actual source; never dismiss one133 merely because it is labeled "nit" or "code quality", but dismiss ones that134 are far outside PR scope or factual mistakes. Comment on each CodeRabbit issue135 explaining the action taken and resolve it if addressed or provably invalid.1364. Never assume a CI failure is "unrelated to my changes." The only exception is137 proof via `gh` that the same tests fail on main or other recent PRs — and even138 then, fix the test if possible.1395. NEVER exit to prompt telling the user workflows are still running — you must140 watch, loop, fix, and watch until complete.141142## 8. Merge143144- DO NOT MERGE PRs YOURSELF. Wait until the user explicitly says to merge.145- Always report PR status (CI green, threads resolved, ready to merge) and ask146 for confirmation before merging.147148## Gotchas149150- `bun install --frozen-lockfile` is structurally unusable in this repo: Bun151 re-normalizes the lockfile on every pass and fails frozen even immediately152 after a clean `rm bun.lock && bun install` generation. Renaming the private153 root package does NOT fix it. Root cause is the monorepo structure (root154 package, packages/cli, and a self-override all named `@vybestack/llxprt-code`,155 plus file:../ workspace protocol and 26 overrides). Clean generation156 (`rm bun.lock && bun install`) IS deterministic (byte-identical SHA across157 runs, all 16 workspaces incl packages/cli). Plain `bun install` against the158 committed lockfile works (exit 0, all 16 workspaces resolve, postinstall.cjs159 Bun-guard exits 0 without triggering npm build). Therefore any Bun CI smoke160 must use plain `bun install`, NOT --frozen-lockfile. Also: 15/16 workspaces161 symlink to ../../packages/<x>; packages/cli (@vybestack/llxprt-code) resolves162 to the published npm package due to the name collision — a known out-of-scope163 pre-existing issue.164- Check the current year before creating each new file; do not stamp last year165 on a new file's copyright.166- This project is moving to bun/TypeScript: no new .js files or vitest/node167 tests should be created. Everything is TS/Bun and a bun test.