pr-read-cli-interface
The contract for sdlc's PR-read CLIs — sdlc-pr-round, sdlc-pr-adjustments, sdlc-fixer-brief and sdlc-records-chain — their arguments, exit codes and output grammar. Preloaded into sdlc:theorem-based-pr-reviewer, sdlc:issue-fixer, sdlc:docs-writer and sdlc:pr-finalizer via their skills frontmatter; not invoked from the user's slash menu.
- License 许可
- GPL-3.0
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- pr-read-cli-interface
- description
- The contract for sdlc's PR-read CLIs — sdlc-pr-round, sdlc-pr-adjustments, sdlc-fixer-brief and sdlc-records-chain — their arguments, exit codes and output grammar. Preloaded into sdlc:theorem-based-pr-reviewer, sdlc:issue-fixer, sdlc:docs-writer and sdlc:pr-finalizer via their skills frontmatter; not invoked from the user's slash menu.
- user-invocable
- false
03 SKILL.md 正文
PR Read CLI Interface
Four scripts read what an sdlc run needs off a PR's reviews and comments: the round under way, the comments posted since the last round, the fixer brief, and the chain of review-detail chunks. Each reads and cuts; none of them decides what a comment means — whether an adjustment is a rejection, an override, a scope drop or a missed defect stays the caller's judgment. The markers they recognize a comment by are spelled in the scripts, so a caller that reads through them spells no marker of its own.
Invocation
sdlc-pr-round <PR_REF>
sdlc-pr-adjustments --pr <PR_REF> --round <n>
sdlc-fixer-brief [--all] <PR_REF>
sdlc-records-chain <PR_REF>
Spell each as a bare name, never by path. <PR_REF> is the PR's
canonical reference, <host>/<owner>/<repo>#<n>, as
/github-prs:pr-view <PR> --ref prints it. Any other form — a bare
number, a reference without its host, a URL — is a usage error.
Exit status
Every script shares these:
| Exit | Meaning |
|---|---|
| 0 | the script did what it says |
| 1 | a command the script ran failed, such as the gh read, and its own error is on stderr above the script's line |
| 2 | a usage error; nothing was read |
| 3 | the script's own negative outcome, named under the script below |
The scripts
sdlc-pr-round and sdlc-pr-adjustments read only a PR's pipeline
reviews, the ones review rounds posted; a code-scanning review or a
human review is never one. A review is a pipeline review when a line of
its body, any line, is the stamp <!-- sdlc:review-round <n> --> that
sdlc-agent-result-persist --mode summary writes, naming round <n>.
A review with no stamp is a pipeline review only when its body has both
a line exactly ## Verdicts and a line exactly ## Review method, as
a review posted before the stamp existed does.
sdlc-pr-round <PR_REF>
Prints one line: the number of the review round under way, from the
PR's pipeline reviews and its rounds' state. It first finds base, the
round of the newest posted review:
- When any review is stamped,
baseis the highest stamped round. - Otherwise, with
Pthe number of pipeline reviews,baseis thePth round holding a review file, or0whenPis0. A round holding a review file is onesdlc-agent-result-persist --mode roundsprints whose--mode print-reviewsucceeds, so a round with a log and no review file, such as a placeholder round 1, never becomesbase. When fewer thanProunds hold one, as on a machine without this PR's state, the script printsP + 1and stops.
It then prints the lowest round with a log above base, or base + 1
when there is none, so a round begun and not yet posted keeps its
number. A PR with no review and no state is round 1. A failed state
read exits 1. Never exits 3.
sdlc-pr-adjustments --pr <PR_REF> --round <n>
Prints the comments posted since the previous round, each verbatim, oldest first, each preceded by a line of its own:
--- comment <createdAt> ---
<the comment's body>
--round is the round under way, from 1. A comment is printed when
its createdAt is later than the cut instant, which is the first of
these that exists:
- the newest
submittedAtamong the PR's pipeline reviews; - with no pipeline review, the newest instant on any line
sdlc-agent-result-persist --mode printprints for round<n>-1, when that is round 1 or later — the script reads that round's log through that call and through nothing else, and never reads round 0's, which holds the seed generator'sspawnrecord and no review; - the PR's
createdAt, when there is no pipeline review and that log is empty, absent or round 0's.
Any other review never sets the cut, so a comment posted before a code-scanning or human review still reaches the next round.
A comment whose first line is a fixer-brief marker or a
theorem-records chunk marker, in either form sdlc-records-chain
reads, is never printed: each is sdlc's own output, not an adjustment.
Nothing printed means no comment was posted since the cut. Never exits
3.
sdlc-fixer-brief [--all] <PR_REF>
Without --all, reads the PR's most recent comment. When its first
line is the fixer-brief marker, prints its body verbatim and exits 0.
Otherwise it prints nothing on stdout and exits 3, with stderr
quoting that comment's first line — or saying the PR has no comment at
all.
With --all, prints every comment whose first line is the fixer-brief
marker, oldest first, each preceded by a --- comment <createdAt> ---
line, and exits 0 — with nothing printed when the PR carries no brief.
A marker line ending in a carriage return, as a body posted from GitHub's web form carries, still counts.
sdlc-records-chain <PR_REF>
Reads the first line of every comment for the theorem-records chunk marker:
<!-- sdlc:theorem-records <first>-<last> <i>/<N> -->
<first> and <last> are the lowest and highest round the chain
holds of those sdlc-agent-result-persist --mode rounds lists, and
<i>/<N> the chunk's 1-based position and the chain's total. With no
round log there is no listed round, and a records file the chain holds
names the range by its own round, listed or not: the seed's records
alone post as 0-0. A round
number inside the range that has no log and that the chain holds no
records for was never run. The old form,
<!-- sdlc:theorem-records <i>/<N> -->, names no rounds.
A chain is the chunks sharing one range and one total, so chunks of two
chains with the same total never combine; old-form chunks share the
range -. When at least one chain's markers cover every position 1
through N, it prints one line per such chain, ordered by its newest
chunk, oldest first, and exits 0:
complete\t<first>-<last>\t<N>
complete\t-\t<N>
\t is a tab, and the second shape is a complete old-form chain.
Otherwise it prints one partial\t<range>\t<i>/<N> line per marker
found, oldest first, <range> being <first>-<last> or -, and
exits 3; with no marker on the PR at all it prints nothing on
stdout and exits 3.
04 同仓库更多 Skills
mask-inappropriate-language
Replace inappropriate language (profanity, slurs, strong insults) in provided text or a file with asterisks, character-for-character, preserving everything else.
theorem-agents-interface
The interface between the sdlc reviewer and the theorem agents it spawns — what each double-dash brief parameter means, and what each consequence class means. Preloaded into every theorem agent (sdlc:theorem-generator, the disprover, and the verifier) via its skills frontmatter, and read by name by the sdlc:theorem-based-pr-reviewer agent for what its briefs' parameters mean; not invoked from the user's slash menu.
sdlc-config-user
Interactively create or merge-update the repo user sdlc config, `<repo-root>/.sdlc/user-config.yml` (tier 3 — this user, this repo, never committed), and add it to the repo's tracked `.gitignore`.
sdlc-config-repo
Interactively create or merge-update the shared repo sdlc config, `<repo-root>/.sdlc/repo-config.yml` (tier 2 — tracked, every user of this repo).
sdlc-config-global
Interactively create or merge-update the global user sdlc config, `$XDG_CONFIG_HOME/sdlc/user-config.yml` (tier 1 — this user, every repo on this machine).
orchestrate
Plan and orchestrate end-to-end fixes for one or more issues.