ci-routing
The canonical route-on-verdict protocol for a red CI diagnosis — fixable/flake/infra/needs-debug handling, the single-render rule, and the fix-then-re-watch loop
- License 许可
- MIT
- 所属仓库
- HigorAlves/orc
- 最近更新
- 2026-11-07
- Stars
- ★ 7
- Forks
- 0
01 前言 Front Matter
- name
- ci-routing
- description
- The canonical route-on-verdict protocol for a red CI diagnosis — fixable/flake/infra/needs-debug handling, the single-render rule, and the fix-then-re-watch loop
- when_to_use
- Use after orc-ci-investigator returns; $orc-ci Phase 3 and $orc-flow's post-open CI gate delegate here.
03 SKILL.md 正文
CI Routing
The single source of truth for acting on an orc-ci-investigator diagnosis — $orc-ci and $orc-flow's post-open CI gate both execute this protocol instead of restating it. Input: the diagnosis (verdict + evidence table + fix list), already saved verbatim to ${ORC_STATE_DIR}/<branch>/files/ci-diagnosis.md.
Single-render rule: the diagnosis is saved via Write — never echoed wholesale into conversation. It gets ONE capped rendering: the fix list + one evidence line per root cause + the file path. Every later step references the saved file; quotes are capped at 3 evidence lines.
green
Say so — one line, run ID cited. Mark the session step complete and stop.
fixable
Render the one preview (> **📋 Preview — CI fix list**: N root causes across M jobs, then the numbered <file>:<line> — <change> — clears <job> list), then the available user-question tool (or ask in chat) — one call, two questions (the landing decision is collected up front, so a green fixer report lands without a second stop):
- Apply the fix list? — Apply (dispatch
orc-code-fixerwith the fix list + diagnosis path; it applies edits, runs tests, returns a diff + test summary) / Edit the list first / This needs real debugging (jump toneeds-debug) / Abort. - After a green fixer report, land it how? (ignored unless the fixer ran and came back green) — Commit + push + re-watch (Recommended:
orc-git-commit,git push, re-watch the run until it concludes) / Commit only / Show me the diff first.
Red fixer report → discard the landing answer and return the new evidence to the investigator (it sees the failed attempt) — or offer the needs-debug hand-off. Loop until green or the user explicitly advances with red CI (logged to the digest).
flake
Quote up to 3 run-history evidence lines proving intermittency, then the available user-question tool (or ask in chat): Re-run failed jobs (gh run rerun <id> --failed, then watch) / Re-run everything / Not convinced — treat as fixable or needs-debug / Skip.
infra
No code changes to make. Surface the diagnosis path + the agent's recommendation (pin the action version, report to the platform team, wait out the outage) with its capped evidence. Offer a re-run only when the agent recommended one.
needs-debug
The failure needs root-cause work beyond the diff:
> **➡️ Next**
>
> Genuine regression — run `$orc-debug` seeded with the CI diagnosis at `.orc/<branch>/files/ci-diagnosis.md`.
the available user-question tool (or ask in chat): Start $orc-debug now (diagnosis pre-seeded as the bug description — its investigator starts from the CI evidence instead of zero) / I'll run it later / Abort.
Iron rules
- No fix without the investigator's diagnosis. The fixer only ever receives an evidence-cited fix list — never "CI is red, go fix it".
- Re-runs are gated.
gh run rerunonly after the flake evidence is shown and the user confirms. - Never
git push --force— a red pipeline is not a license for history rewrites.
04 同仓库更多 Skills
writing-plans
Write a comprehensive implementation plan of bite-sized TDD tasks that an engineer with zero codebase context could execute — exact files, code, tests, and verification steps
writing-for-agents
orc's doctrine layer for writing any document an agent consumes — skills, AGENTS.md/CLAUDE.md, reference docs
workspace-mode
Use when cwd is a parent dir holding multiple sibling git repos — defines repo auto-detection, --repos/--repo/--all-repos/--this-repo precedence, per-repo dispatch, and linked-PR mechanics.
wizard
Generate an interactive bash wizard walking a human through work only they can perform — credentials, secrets, one-off migrations
wait-what
Stop and re-pitch — the last message did not land; say it again simply, in the project's own vocabulary.
vitest
Vitest fast unit testing framework powered by Vite with Jest-compatible API