Post-commit code-convention audit for lfx-self-serve. Audits the latest commit in the lfx-self-serve repo against the repo documented rule surface: `.claude/rules/`, the four `docs/reviews/` checklists, architecture docs, and upstream API contracts. May be launched from the LFX workspace root, but always operates in `lfx-self-serve`. Every repo-convention finding quotes a loaded source. Pass the keyword `branch` to switch to full-branch mode (audits the branch's diff against main — used for the pre-PR full-branch sweep). Renders a markdown review with Upstream API / data-layer validation and Repo conventions sections. Invoke after every commit while pre-PR, in parallel with `lfx-skills:lfx-general-code-review` and `lfx-self-serve-learnings-review`.
Post-commit code-convention audit for lfx-self-serve. Audits the latest commit in the lfx-self-serve repo against the repo documented rule surface: `.claude/rules/`, the four `docs/reviews/` checklists, architecture docs, and upstream API contracts. May be launched from the LFX workspace root, but always operates in `lfx-self-serve`. Every repo-convention finding quotes a loaded source. Pass the keyword `branch` to switch to full-branch mode (audits the branch's diff against main — used for the pre-PR full-branch sweep). Renders a markdown review with Upstream API / data-layer validation and Repo conventions sections. Invoke after every commit while pre-PR, in parallel with `lfx-skills:lfx-general-code-review` and `lfx-self-serve-learnings-review`.
LFX Self-Serve Code Reviewer
In LFX, you audit the latest commit on the LFX Self-Serve branch against the repo's documented rule surface and upstream API/data-layer contracts. Load this repo's documented rules (.claude/rules/), the four docs/reviews/ checklists, architecture docs, then walk them with cross-check discipline. Every repo-convention finding MUST quote a loaded source — drop unsourced claims to avoid inventing repo conventions.
Generic senior-review findings belong to lfx-skills:lfx-general-code-review. Empirical-pattern matches against past PR review comments belong to lfx-self-serve-learnings-review, not here.
Repository scope
This skill is owned by the lfx-self-serve repo
(.claude/skills/lfx-self-serve-code-review/), and the reviewer loading it may
be launched from the LFX workspace root or a multi-repo session. Regardless of
the current working directory, it always reviews lfx-self-serve.
If the caller provides target repo: lfx-self-serve, use that as confirmation.
If the caller provides any other target repo, abort with
INCOMPLETE - lfx-self-serve reviewer invoked for <repo>.
Before diffing, locate the lfx-self-serve repo root:
If you are already in lfx-self-serve, you are home. Use that repo root.
Otherwise, look for a sibling or child directory named lfx-self-serve.
If the repo cannot be found, abort with
INCOMPLETE - lfx-self-serve repo not found.
Inputs
Parse the caller's prompt for:
branch — OPTIONAL keyword. If present, switch to full-branch mode: audit the branch's diff against main (origin/main...HEAD) instead of just the latest commit. Used by the pre-PR full-branch sweep.
extra: <free text> — optional priority hint.
Step 1 — Compute the diff
Run all git commands from the lfx-self-serve repo root.
Default mode: git show --stat -p HEAD — audits only the latest commit (not staged / unstaged work). Use the stat block as the canonical changed-file list; abort if empty.
Full-branch mode (branch passed): git fetch origin && git diff --stat origin/main...HEAD && git diff origin/main...HEAD — the branch's diff against main, i.e., everything HEAD adds vs origin/main.
For per-file reads: git show "HEAD:<path>". If the diff is too big for context, save to /tmp/code-review-diff.patch and Read changed files individually.
Commit-level data is not your concern — signatures are checked by /lfx-self-serve-pr-readiness pre-PR; prior review comments are verified by /lfx-review-pr post-PR.
Step 2 — Convention audit
Now layer the LFX-specific conventions on top: load the docs, then walk the audit using them. Step 2.1 sets up the source-of-truth surface; Step 2.2 audits against it with cross-check discipline.
2.1 — Load reference documents
Always pull current contents — never rely on memory of these files from prior runs.
Always read (in parallel):
CLAUDE.md at the repo root
~/.claude/CLAUDE.md if it exists
Every file matching .claude/rules/*.md — Glob dynamically; never hand-maintain a list
⚠ Mandatory: the four docs/reviews/ checklists. These are the primary audit surface — each item exists because it broke a real PR on this repo. Skipping a relevant checklist invalidates the audit. If you cannot Read a required checklist, mark the report as INCOMPLETE.
Touched paths
Required checklist
apps/lfx-one/src/app/**
docs/reviews/frontend-checklist.md
apps/lfx-one/src/server/**
docs/reviews/backend-checklist.md
packages/shared/** or Snowflake SQL
docs/reviews/shared-and-sql-checklist.md
docs/**
docs/reviews/docs-checklist.md
You audit by these checklists, not against your general framework knowledge. Locate a specific checklist item, rule file entry, or architecture-doc paragraph for every Repo-conventions finding (see 2.2).
Architecture docs — load conditionally by changed-file paths:
If .claude/skills/self-serve-dev/references/ exists, also Read the relevant reference files (backend-endpoint.md for server changes, frontend-code-generation.md for frontend changes, etc.).
2.2 — Walk the audit
For each changed file:
Read the full file at the current revision — don't audit from diff alone; context matters.
Categorize — frontend component / frontend service / SSR / backend service / controller / route / shared / SQL / docs / mixed.
Walk every applicable item in the relevant docs/reviews/ checklist + every applicable rule in .claude/rules/ + the architecture docs loaded in 2.1.
Cross-check before emitting: for each candidate finding, locate the exact rule, checklist item, or architecture-doc paragraph it violates. Quote that source in the finding's _Source:_ citation. If you cannot quote the source, drop the finding — hallucinated rules are worse than missed ones. These findings go in the Repo conventions section of the Step 4 report.
Account for the full checklist surface: if you cannot account for having considered every applicable checklist item, mark the report INCOMPLETE in Step 4 rather than ship a partial report.
Skip this entirely if no files under apps/lfx-one/src/server/ were changed.
The LFX One backend is a thin proxy to external Go microservices. New or modified proxy endpoints must align with the upstream API contract.
Required for:
Any new file in services/, controllers/, or routes/
Any modified service that calls MicroserviceProxyService.proxyRequest()
Any new API path or changed request/response shape
For modifications to existing endpoints (not new ones), a lighter check is acceptable — verify the endpoint still exists rather than a full schema comparison.
gh api repos/linuxfoundation/<repo-name>/contents/gen/http/openapi3.yaml --jq '.content' | base64 -d
gh api repos/linuxfoundation/<repo-name>/contents/design --jq '.[].name'
gh api repos/linuxfoundation/<repo-name>/contents/design/<file>.go --jq '.content' | base64 -d
Upstream repo map:
Domain
Repo
Queries
lfx-v2-query-service
Projects
lfx-v2-project-service
Meetings
lfx-v2-meeting-service
Mailing Lists
lfx-v2-mailing-list-service
Committees
lfx-v2-committee-service
Voting
lfx-v2-voting-service
Surveys
lfx-v2-survey-service
Validate:
Endpoint paths and HTTP methods match upstream
Request body / query params match upstream schema (no extra fields, no missing required)
Response shape matches upstream
Query Service conventions: page_size (NOT limit), page_token for cursor pagination, filters format field:value
No fabricated endpoints — if upstream doesn't expose it, the proxy shouldn't pretend it exists
Snowflake direct SQL: every ? placeholder must have a corresponding value in the binds array, in the correct order. Bind mismatch is always Critical.
On gh api failure (404, auth, network): surface in Step 4's "Upstream API / data-layer validation" section as "Upstream API contract for <service> could not be verified — manual validation required." Treat as Important severity. Don't silently skip.
Step 4 — Render the report
Header: <commit-sha> — <subject> (default) or origin/main...HEAD (<branch-name>, N commits) (full-branch mode), plus files changed and additions / deletions.
Two sections, in order. Each findings section groups under ### Critical (N) (conf 90-100) and ### Important (N) (conf 80-89), with ### No findings if none clear the ≥80 floor.
Upstream API / data-layer validation (Step 3): verified paths, SQL bind checks, "manual validation required" flags, or "Skipped — no backend changes".