Committee Service PR Readiness
You are checking whether local commits are shaped correctly to open as a PR
for lfx-v2-committee-service.
This skill is a PR-shape check only. Do not review implementation quality, Goa
design correctness, generated code, contract content, chart behavior, or test
coverage here. Those mechanical checks belong to /committee-service-preflight;
implementation guidance belongs to committee-service-dev.
Output: structured shape report with verdict NOT READY,
READY WITH CHANGES, or READY. No git mutations, no PR side effects.
Phase 1 - Parse arguments
Args format: [base-branch] [extra instructions].
- First token, if it looks like a ref or branch name, is the base branch.
- Default base:
origin/main.
- If the base has no slash, normalize it to
origin/<base> before comparing.
- Treat all remaining text as explanatory focus; do not expand the audit scope.
Phase 2 - Gather shape inputs
Run:
git fetch origin
git rev-parse --abbrev-ref HEAD
git diff --shortstat <base>...HEAD
git diff --name-only <base>...HEAD
git log --format='%H %s' <base>..HEAD
git log --format='%G? %h %s' <base>..HEAD
git log --format=%B <base>..HEAD
git merge-base --is-ancestor <base> HEAD; echo $?
If there are no commits between <base> and HEAD, stop with:
No commits to audit against <base> - make at least one commit on this branch.
Phase 3 - Protected-file shape check
Build the protected-file result by intersecting `git diff --name-only
cmd/committee-api/design/** - Goa API design; must be intentional and must
be paired with regenerated output when behavior changes.
gen/** - Goa-generated code; must come from make apigen, never hand edits.
charts/lfx-v2-committee-service/** - service-local deployment config.
go.mod, go.sum - dependency graph and checksums.
Makefile - build, lint, generation, and test command source of truth.
CLAUDE.md - repo workflow guidance.
.claude/skills/** - repo-local skill behavior.
docs/indexer-contract.md, docs/fga-contract.md,
docs/invite-application-flows.md - committee-owned emitted-contract and
state-machine docs.
Protected files do not automatically block a PR. Flag them so the PR body can
explain intent and request the right reviewer attention. A gen/** change
without a matching cmd/committee-api/design/** change is a blocker unless the
extra instructions explain a generated-only repair.
Phase 4 - Shape checks
Produce at most one finding per check:
{
"severity": "CRITICAL | SHOULD_FIX | NIT",
"rule": "committee-service-pr-shape/<item-id>",
"message": "...",
"suggestion": "..."
}
Checks:
- Branch name - branch should include an
LFXV2-<digits> ticket or be an
explicit maintenance branch (main, release/*, hotfix/*).
- JIRA ticket - commit subjects or bodies should include
LFXV2-<digits>.
Missing ticket is SHOULD_FIX unless the work is explicitly non-ticketed.
- Conventional commits - every commit subject should match
type(scope): description or type: description; common types are feat,
fix, docs, test, refactor, chore, build, and ci.
- Branch rebased -
git merge-base --is-ancestor <base> HEAD should return
0. If not, mark SHOULD_FIX.
- DCO and GPG - every commit should have a
Signed-off-by: trailer and a
good signature (%G? is G). Missing signoff is CRITICAL; missing or bad
GPG signature is CRITICAL unless the repo policy has been waived in the
extra instructions.
- Diff size - summarize additions/deletions. More than 800 additions is
SHOULD_FIX; more than 1500 additions is CRITICAL unless the diff is
mostly generated output from make apigen.
- Protected files - report every protected path touched and why it matters.
Phase 5 - Cross-check discipline
- Every finding must be backed by Phase 2 output.
- Do not infer code quality from filenames.
- Do not suggest implementation fixes; only suggest shape fixes such as rename
branch, amend commit message, rebase, sign commits, split PR, or document
protected-file intent in the PR body.
Phase 6 - Render the report
# Committee Service PR Readiness
**Branch:** `<current-branch>` -> `<base>`
**Commits:** N | **Additions:** +A | **Deletions:** -D
**Verdict:** NOT READY | READY WITH CHANGES | READY
## PR-shape sanity
| Check | Status | Detail |
| --- | --- | --- |
| Branch name | PASS | feat/LFXV2-1234-committee-links |
| JIRA ticket | PASS | Found LFXV2-1234 in commits |
| Conventional commits | PASS | All commits valid |
| Branch rebased | PASS | origin/main is an ancestor |
| Diff size | PASS | 342 additions |
| DCO + GPG signing | PASS | 3/3 commits signed and signed off |
| Protected files | SHOULD_FIX | docs/indexer-contract.md touched; explain contract update |
## Verdict reasoning
<one line per CRITICAL or SHOULD_FIX finding>
Verdict rules:
- NOT READY - any
CRITICAL finding.
- READY WITH CHANGES - zero
CRITICAL; one or more SHOULD_FIX findings.
- READY - zero
CRITICAL, zero SHOULD_FIX.
Companion skills
/committee-service-preflight - mechanical Go preflight. Run after this
shape check passes.
committee-service-dev - repo-local implementation conventions for Go, Goa,
NATS, contracts, charts, logging, errors, and tests.
1---2name: committee-service-pr-readiness3description: Pre-PR shape check for local lfx-v2-committee-service work. Audits branch name, JIRA reference, conventional commits, rebase status, DCO and GPG signing, total diff size, and repo-specific protected files against the target base branch. Does not audit Go code, generated output correctness, contracts, charts, or tests; run /committee-service-preflight after this shape check passes.4---56# Committee Service PR Readiness78You are checking whether **local commits are shaped correctly to open as a PR**9for `lfx-v2-committee-service`.1011This skill is a PR-shape check only. Do not review implementation quality, Goa12design correctness, generated code, contract content, chart behavior, or test13coverage here. Those mechanical checks belong to `/committee-service-preflight`;14implementation guidance belongs to `committee-service-dev`.1516**Output:** structured shape report with verdict `NOT READY`,17`READY WITH CHANGES`, or `READY`. No git mutations, no PR side effects.1819## Phase 1 - Parse arguments2021Args format: `[base-branch] [extra instructions]`.2223- First token, if it looks like a ref or branch name, is the base branch.24- Default base: `origin/main`.25- If the base has no slash, normalize it to `origin/<base>` before comparing.26- Treat all remaining text as explanatory focus; do not expand the audit scope.2728## Phase 2 - Gather shape inputs2930Run:3132```bash33git fetch origin34git rev-parse --abbrev-ref HEAD35git diff --shortstat <base>...HEAD36git diff --name-only <base>...HEAD37git log --format='%H %s' <base>..HEAD38git log --format='%G? %h %s' <base>..HEAD39git log --format=%B <base>..HEAD40git merge-base --is-ancestor <base> HEAD; echo $?41```4243If there are no commits between `<base>` and `HEAD`, stop with:4445```text46No commits to audit against <base> - make at least one commit on this branch.47```4849## Phase 3 - Protected-file shape check5051Build the protected-file result by intersecting `git diff --name-only52<base>...HEAD` with this repo-specific protected list:5354- `cmd/committee-api/design/**` - Goa API design; must be intentional and must55 be paired with regenerated output when behavior changes.56- `gen/**` - Goa-generated code; must come from `make apigen`, never hand edits.57- `charts/lfx-v2-committee-service/**` - service-local deployment config.58- `go.mod`, `go.sum` - dependency graph and checksums.59- `Makefile` - build, lint, generation, and test command source of truth.60- `CLAUDE.md` - repo workflow guidance.61- `.claude/skills/**` - repo-local skill behavior.62- `docs/indexer-contract.md`, `docs/fga-contract.md`,63 `docs/invite-application-flows.md` - committee-owned emitted-contract and64 state-machine docs.6566Protected files do not automatically block a PR. Flag them so the PR body can67explain intent and request the right reviewer attention. A `gen/**` change68without a matching `cmd/committee-api/design/**` change is a blocker unless the69extra instructions explain a generated-only repair.7071## Phase 4 - Shape checks7273Produce at most one finding per check:7475```json76{77 "severity": "CRITICAL | SHOULD_FIX | NIT",78 "rule": "committee-service-pr-shape/<item-id>",79 "message": "...",80 "suggestion": "..."81}82```8384Checks:8586- **Branch name** - branch should include an `LFXV2-<digits>` ticket or be an87 explicit maintenance branch (`main`, `release/*`, `hotfix/*`).88- **JIRA ticket** - commit subjects or bodies should include `LFXV2-<digits>`.89 Missing ticket is `SHOULD_FIX` unless the work is explicitly non-ticketed.90- **Conventional commits** - every commit subject should match91 `type(scope): description` or `type: description`; common types are `feat`,92 `fix`, `docs`, `test`, `refactor`, `chore`, `build`, and `ci`.93- **Branch rebased** - `git merge-base --is-ancestor <base> HEAD` should return94 `0`. If not, mark `SHOULD_FIX`.95- **DCO and GPG** - every commit should have a `Signed-off-by:` trailer and a96 good signature (`%G?` is `G`). Missing signoff is `CRITICAL`; missing or bad97 GPG signature is `CRITICAL` unless the repo policy has been waived in the98 extra instructions.99- **Diff size** - summarize additions/deletions. More than 800 additions is100 `SHOULD_FIX`; more than 1500 additions is `CRITICAL` unless the diff is101 mostly generated output from `make apigen`.102- **Protected files** - report every protected path touched and why it matters.103104## Phase 5 - Cross-check discipline105106- Every finding must be backed by Phase 2 output.107- Do not infer code quality from filenames.108- Do not suggest implementation fixes; only suggest shape fixes such as rename109 branch, amend commit message, rebase, sign commits, split PR, or document110 protected-file intent in the PR body.111112## Phase 6 - Render the report113114```markdown115# Committee Service PR Readiness116117**Branch:** `<current-branch>` -> `<base>`118**Commits:** N | **Additions:** +A | **Deletions:** -D119**Verdict:** NOT READY | READY WITH CHANGES | READY120121## PR-shape sanity122123| Check | Status | Detail |124| --- | --- | --- |125| Branch name | PASS | feat/LFXV2-1234-committee-links |126| JIRA ticket | PASS | Found LFXV2-1234 in commits |127| Conventional commits | PASS | All commits valid |128| Branch rebased | PASS | origin/main is an ancestor |129| Diff size | PASS | 342 additions |130| DCO + GPG signing | PASS | 3/3 commits signed and signed off |131| Protected files | SHOULD_FIX | docs/indexer-contract.md touched; explain contract update |132133## Verdict reasoning134135<one line per CRITICAL or SHOULD_FIX finding>136```137138Verdict rules:139140- **NOT READY** - any `CRITICAL` finding.141- **READY WITH CHANGES** - zero `CRITICAL`; one or more `SHOULD_FIX` findings.142- **READY** - zero `CRITICAL`, zero `SHOULD_FIX`.143144## Companion skills145146- `/committee-service-preflight` - mechanical Go preflight. Run after this147 shape check passes.148- `committee-service-dev` - repo-local implementation conventions for Go, Goa,149 NATS, contracts, charts, logging, errors, and tests.