Repository navigation
docs(skills): add ACP contribution and code review guidance skill - #607
Conversation
3319ed6 to
237df02
Compare
622f529 to
7d28519
Compare
alizaidis
left a comment
There was a problem hiding this comment.
Thanks for putting this together—codifying our GKE/TPU/GPU invariants, R-x.y hygiene standards, and D-x docs checks as a reusable skill is high-leverage.
Because coding agents and reviewers will load this skill as normative ground truth, every command, path, glob, and invariant needs to match main and upstream llm-d v1.0.0 verbatim (otherwise agents will actively reproduce stale paths or flag valid PRs). Running this PR's own Pass 0–Pass 4 and D-1–D-12 checks against 7d285192bf surfaced 4 blockers and several high-signal accuracy/governance gaps:
Summary of Blocking & High-Priority Items
[BLOCKER](R-5.x,R-1.6) Silent false-greenaddlicenseDocker check (validation-and-code-review.md:152-154):ghcr.io/google/addlicense:latestsetsWORKDIR /src. Mounting-v "${PWD}:/workspace"without-w /workspace(or-v "${PWD}:/src") scans an empty/srcdirectory inside the container and unconditionally exits0without checking a single file. Once mounted at/src, it also needs-ignore "**/.terraform.lock.hcl"to match.github/workflows/addlicense.yaml(sinceaddlicensechecks.hclfiles).[BLOCKER](D-1,D-12) Pre-#588 Kustomize path & missingconfigure_vllm.shprerequisite (validation-and-code-review.md:118-119,tpu-and-accelerator-invariants.md:13):platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/has nokustomization.yamlfiles or<accel>/subdirectories onmain. In addition, runningkubectl kustomizeon a clean checkout againstkubernetes-manifests/online-inference-{gpu,tpu}/llmd-...fails immediately (deployment.env: no such file or directory) unlessconfigure_vllm.sh/configure_deployment.shis run first.[BLOCKER](D-4,R-2.8) Misstatedcore/initializefilesetglob (coding-and-hygiene-rules.md:110-113):platforms/gke/base/core/initialize/local_file.tfglobsuse-cases/<use-case>/**/versions.tf(excluding only/multi-region/and/examples/), notuse-cases/<use-case>/terraform/**. Placing a staged module outsideterraform/**under the use case still writes abackend.tf.[BLOCKER](D-4,I-1,I-6) Contradictions with shipped TPU overlays onmain(tpu-and-accelerator-invariants.md:19-30, 105-114):I-1cites.../tpu/v6/vllm/base/deployment.yaml(404 inllm-dv1.0.0; the resources live inpatch-vllm.yaml) and mandates overridingresources.limits.cpu, which neither upstream TPUpatch-vllm.yamlnor any TPU overlay onmain(including the citedv6e-qwen3-32b/patch-resources.yaml) sets.I-6omits"kv_ip":"$(POD_IP)"from the--kv-transfer-configJSON (required bypatch-decode-vllm-args.yamlfor cross-pod KV pull) and misstates the root cause (TPUConnectorsetsself.is_producer = self.config.is_kv_producerunderkv_bothand short-circuitsget_num_new_matched_tokensto(0, False)).
[HIGH](D-4,I-3,I-4,I-5,I-8) Overlay composition & CRD default mismatches: Inline comments attached oncodebase-structure.mdandtpu-and-accelerator-invariants.md.[HIGH](R-7.17& Discoverability):- See companion review on #608: to prevent prompt injection via sibling skills or higher-precedence root agent files,
.github/CODEOWNERSshould cover all of/skills/plus root/dotfile agent instruction paths (AGENTS.md,GEMINI.md,CLAUDE.md,.gemini/,.claude/,.cursor/,.github/copilot-instructions.md), and we should confirm all 4 branch-protection flags are active onmainvia the GitHub API after #608 merges and before rebasing/merging #607. - Nothing at the repo root (
AGENTS.md/CONTRIBUTING.md) currently points coding agents or contributors toskills/acp-oss-contribution-code-guidance/SKILL.md, so agents won't auto-load these rules unless manually prompted.
- See companion review on #608: to prevent prompt injection via sibling skills or higher-precedence root agent files,
[HIGH](R-7.13,R-8.13,PR-3,PR-4) Self-compliance in PR description: Please update the PR description to follow the rules this PR introduces: add theR-7.13shape summary (line counts by category + top-level directories), statevllm-project/vllm-torchtpuprovenance (PR-3), add a Limitations section (PR-4), and name the exact CI jobs covering each file plus what CI does not execute (R-8.13). Also rebase ontoorigin/main(R-7.6) once #608 lands.
7d28519 to
e673fcb
Compare
|
Thanks for going through this so carefully, its nice to know the skill can be used to review the skill, it caught a lot. I was likely working off an old copy, which brings in proper versioning for the skill. A few other things I changed along the way:
I'll verify branch protection after #608 merges, then rebase this and ping you. |
cf9bb27 to
61edf35
Compare
Add skills/acp-oss-contribution-code-guidance, an agent skill for authoring, validating, and reviewing accelerated-platforms PRs: - SKILL.md: meta-principles, the authoring checklist, and the Pass 0 to Pass 4 review workflow with severity levels and rule IDs. - references/codebase-structure.md: repository layout, the terraservice and _shared_config symlink pattern, and how llmd-<guide> overlays (and examples/llmd-multi-region/) compose the pinned upstream llm-d v1.0.0 bases through their local base/. - references/coding-and-hygiene-rules.md: R-1.x to R-8.x and PR-1, PR-3, PR-4, structured after vllm-project/vllm-torchtpu coding guidance and kept to the rules that apply to this repository, plus lessons from recent reviews (shared helpers, asserted text substitutions, PR shape, byte-identical restructures, CI coverage), R-7.17 agent instruction ownership, and R-7.18 untrusted PR content. Rule IDs are permanent. - references/tpu-and-accelerator-invariants.md: GKE and Kustomize invariants I-1 to I-10, citing the values that main and upstream llm-d v1.0.0 ship, and the serving evidence rules for performance and quantization changes (P-3, P-4, Q-3, Q-6). - references/validation-and-code-review.md: local commands and prerequisites that match each CI gate, plus the review rubric. - references/docs-pr-review-checklist.md: D-1 to D-12 for guides and runbooks. Add the new technical terms to the cspell dictionaries. Signed-off-by: Syeda Anjum <syedaanjum@google.com>
I-10 counted the two Job scripts that install packages when their container starts but didn't name them, while the PR description says the skill names them. Name model-download/huggingface/configmap-scripts.yaml and online-inference-gpu/vllm-auto-tuning/base/configmap-scripts.yaml. Signed-off-by: Ali Zaidi <raincloud@google.com>
3977142 to
18f15dd
Compare
karajendran
left a comment
There was a problem hiding this comment.
Reviewed all six files at 18f15dd against main and llm-d v1.0.0. The cited paths resolve, the I-1 to I-10 values match the shipped overlays and upstream bases, and R-7.17 matches CODEOWNERS. Approving.
Two non-blocking notes, fine as a follow-up:
validation-and-code-review.md §1.4 lists .dev-tools/bin/cleanup_terraform.sh with the pre-PR checks. It also applies shared_config, calls gcloud storage buckets describe, and removes core/initialize/backend.tf when that call fails. Worth saying so, or moving it out of the routine list.
Pass 1 and D-2 render the PR's overlay, which runs the PR's configure*.sh. A pointer to R-7.18 there would help.
Summary
Adds
skills/acp-oss-contribution-code-guidance, the contribution, validation,and code review standard for this repository.
SKILL.md: authoring checklist and the Pass 0 to Pass 4 review workflow.references/codebase-structure.md: repository layout and how thellmd-<guide>overlays (plusexamples/llmd-multi-region/) compose thepinned upstream llm-d
v1.0.0bases through their localbase/.references/coding-and-hygiene-rules.md:R-1.xtoR-8.x,PR-1,PR-3,PR-4,R-7.17(agent instruction ownership across nested depths),R-7.18(untrusted PR content and isolated execution). Rule IDs are permanent and
never reuse reserved source-document IDs.
references/tpu-and-accelerator-invariants.md:I-1toI-10, citing thevalues
mainand upstream llm-dv1.0.0ship, plus serving evidence rulesfor performance and quantization changes (
P-3,P-4,Q-3,Q-6).references/validation-and-code-review.mdandreferences/docs-pr-review-checklist.md.Provenance (PR-3)
The
R-xstructure and theP-3,P-4,Q-3,Q-6IDs are adapted fromvllm-project/vllm-torchtpu
docs/developers_guide/(coding_guidance.md,optimization_best_practices.md), keeping only rules that apply to thisrepository (
R-2.7,R-5.6,PR-2, andR-8.5/R-8.6/R-8.8/R-8.9stayunused so source-document IDs are never reused). Kernel-level rules and
vllm-torchtpu's type-checking gates are not copied; the skill points to that
repository for its own code.
I-x,D-x, and the ACP-specificR-xrulescome from reviews in this repository.
Shape (R-7.13)
Largest files:
coding-and-hygiene-rules.md(375),validation-and-code-review.md(270),tpu-and-accelerator-invariants.md(252),
codebase-structure.md(212),SKILL.md(168),docs-pr-review-checklist.md(111).skills/: the guidance skill..github/workflows/dictionary/: cspell terms the skill uses.coding-and-hygiene-rules.mdandvalidation-and-code-review.mdexceed thesize of the other references because they hold the full rule list and the
exact commands for each CI gate.
CI coverage (R-8.13)
skills/**/*.mdprettier-md, CSpell /checks, Check for final newline /check-final-newline.github/workflows/dictionary/*.txtchecks(dictionaries_check.sh)CI does not check that cited paths, values, or commands are correct. Manual
evidence:
main(9821124). Everyguides/...path exists atllm-d@v1.0.0(scripted check).~3.4.2, cspell 8,dictionaries_check.sh, addlicensev1.2.0,the final-newline loop, and the clean-checkout
configure_vllm.sh+kubectl kustomizerender block pass locally in a credential-free environment.Dependent PR (R-7.15)
Depends on #608, which adds
.github/CODEOWNERSfor agent skills and agentinstruction files.
R-7.17cites that file.onto
mainand needs a code owner's approval on the rebased commit.Limitations (PR-4)
AGENTS.mdorCONTRIBUTING.md, soagents load it only when asked. Follow-up PR.
(
R-1.5) without a type-checker gate.I-10(no package installs at container start) has known exceptions onmain: the ten TPUllmd-<guide>overlays (11 patch files) installrunai-model-streamer[gcs]==0.17.1, and two Job ConfigMap scripts installpackages at start. The skill names them.