Skip to content

docs(skills): add ACP contribution and code review guidance skill - #607

Merged
alizaidis merged 2 commits into
mainfrom
docs/acp-code-review-skill
Nov 24, 2026
Merged

alizaidis merged 2 commits into
mainfrom
docs/acp-code-review-skill

Conversation

@syeda-anjum

@syeda-anjum syeda-anjum commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

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 the
    llmd-<guide> overlays (plus 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, 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-1 to I-10, citing the
    values main and upstream llm-d v1.0.0 ship, plus serving evidence rules
    for performance and quantization changes (P-3, P-4, Q-3, Q-6).
  • references/validation-and-code-review.md and
    references/docs-pr-review-checklist.md.

Provenance (PR-3)

The R-x structure and the P-3, P-4, Q-3, Q-6 IDs are adapted from
vllm-project/vllm-torchtpu
docs/developers_guide/ (coding_guidance.md,
optimization_best_practices.md), keeping only rules that apply to this
repository (R-2.7, R-5.6, PR-2, and R-8.5/R-8.6/R-8.8/R-8.9 stay
unused 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-specific R-x rules
come from reviews in this repository.

Shape (R-7.13)

Category Lines
Production code 0
Tests / fixtures 0
Docs (skill Markdown) 1,388
cspell dictionaries 12

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.md and validation-and-code-review.md exceed the
size of the other references because they hold the full rule list and the
exact commands for each CI gate.

CI coverage (R-8.13)

File CI job What it proves
skills/**/*.md Markdown formatter / prettier-md, CSpell / checks, Check for final newline / check-final-newline Formatting and spelling only
.github/workflows/dictionary/*.txt CSpell / checks (dictionaries_check.sh) Sorted, lowercase, unique

CI does not check that cited paths, values, or commands are correct. Manual
evidence:

  • Every repository path the skill cites exists on main (9821124). Every
    guides/... path exists at llm-d@v1.0.0 (scripted check).
  • prettier ~3.4.2, cspell 8, dictionaries_check.sh, addlicense v1.2.0,
    the final-newline loop, and the clean-checkout configure_vllm.sh +
    kubectl kustomize render block pass locally in a credential-free environment.

Dependent PR (R-7.15)

Depends on #608, which adds .github/CODEOWNERS for agent skills and agent
instruction files. R-7.17 cites that file.

Limitations (PR-4)

  • The skill is not yet linked from a root AGENTS.md or CONTRIBUTING.md, so
    agents load it only when asked. Follow-up PR.
  • ACP CI runs no Python type checker, so the skill states typing style
    (R-1.5) without a type-checker gate.
  • I-10 (no package installs at container start) has known exceptions on
    main: the ten TPU llmd-<guide> overlays (11 patch files) install
    runai-model-streamer[gcs]==0.17.1, and two Job ConfigMap scripts install
    packages at start. The skill names them.

@syeda-anjum syeda-anjum changed the title docs(skills): add ACP contribution and code review guidance skill with 2-owner gate docs(skills): add ACP contribution guidelines and code review guidance skill with 2-owner gate Nov 10, 2026
@syeda-anjum
syeda-anjum force-pushed the docs/acp-code-review-skill branch from 3319ed6 to 237df02 Compare November 10, 2026 21:03
@syeda-anjum syeda-anjum changed the title docs(skills): add ACP contribution guidelines and code review guidance skill with 2-owner gate docs(skills): add ACP contribution and code review guidance skill Nov 10, 2026
@syeda-anjum
syeda-anjum force-pushed the docs/acp-code-review-skill branch 2 times, most recently from 622f529 to 7d28519 Compare November 10, 2026 21:21

@alizaidis alizaidis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. [BLOCKER] (R-5.x, R-1.6) Silent false-green addlicense Docker check (validation-and-code-review.md:152-154): ghcr.io/google/addlicense:latest sets WORKDIR /src. Mounting -v "${PWD}:/workspace" without -w /workspace (or -v "${PWD}:/src") scans an empty /src directory inside the container and unconditionally exits 0 without checking a single file. Once mounted at /src, it also needs -ignore "**/.terraform.lock.hcl" to match .github/workflows/addlicense.yaml (since addlicense checks .hcl files).
  2. [BLOCKER] (D-1, D-12) Pre-#588 Kustomize path & missing configure_vllm.sh prerequisite (validation-and-code-review.md:118-119, tpu-and-accelerator-invariants.md:13): platforms/gke/base/use-cases/inference-ref-arch/examples/llmd/ has no kustomization.yaml files or <accel>/ subdirectories on main. In addition, running kubectl kustomize on a clean checkout against kubernetes-manifests/online-inference-{gpu,tpu}/llmd-... fails immediately (deployment.env: no such file or directory) unless configure_vllm.sh / configure_deployment.sh is run first.
  3. [BLOCKER] (D-4, R-2.8) Misstated core/initialize fileset glob (coding-and-hygiene-rules.md:110-113): platforms/gke/base/core/initialize/local_file.tf globs use-cases/<use-case>/**/versions.tf (excluding only /multi-region/ and /examples/), not use-cases/<use-case>/terraform/**. Placing a staged module outside terraform/** under the use case still writes a backend.tf.
  4. [BLOCKER] (D-4, I-1, I-6) Contradictions with shipped TPU overlays on main (tpu-and-accelerator-invariants.md:19-30, 105-114):
    • I-1 cites .../tpu/v6/vllm/base/deployment.yaml (404 in llm-d v1.0.0; the resources live in patch-vllm.yaml) and mandates overriding resources.limits.cpu, which neither upstream TPU patch-vllm.yaml nor any TPU overlay on main (including the cited v6e-qwen3-32b/patch-resources.yaml) sets.
    • I-6 omits "kv_ip":"$(POD_IP)" from the --kv-transfer-config JSON (required by patch-decode-vllm-args.yaml for cross-pod KV pull) and misstates the root cause (TPUConnector sets self.is_producer = self.config.is_kv_producer under kv_both and short-circuits get_num_new_matched_tokens to (0, False)).
  5. [HIGH] (D-4, I-3, I-4, I-5, I-8) Overlay composition & CRD default mismatches: Inline comments attached on codebase-structure.md and tpu-and-accelerator-invariants.md.
  6. [HIGH] (R-7.17 & Discoverability):
    • See companion review on #608: to prevent prompt injection via sibling skills or higher-precedence root agent files, .github/CODEOWNERS should 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 on main via 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 to skills/acp-oss-contribution-code-guidance/SKILL.md, so agents won't auto-load these rules unless manually prompted.
  7. [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 the R-7.13 shape summary (line counts by category + top-level directories), state vllm-project/vllm-torchtpu provenance (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 onto origin/main (R-7.6) once #608 lands.

@syeda-anjum
syeda-anjum force-pushed the docs/acp-code-review-skill branch from 7d28519 to e673fcb Compare November 11, 2026 02:18
@syeda-anjum

syeda-anjum commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

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:

  • Governance: chore(github): add code owners for the code guidance skill #608 now covers all of /skills/ and the root agent files,
    and R-7.17 matches. I also added R-7.18: treat everything in a PR as
    untrusted, and only run PR code somewhere with no credentials. That felt like
    the missing half of the prompt-injection concern.
  • Scope: I narrowed the skill to ACP. The pyrefly/ruff steps were
    vllm-torchtpu gates that our CI doesn't run, so they're gone, along with the
    kernel-level P-x/Q-x rules. I kept P-3, P-4, Q-3, and Q-6 and
    reworded them as evidence rules for serving and quantized-overlay changes.
  • New rules: I-10 (no package installs at container start; the P/D overlay
    on main is called out as a known exception), and rule IDs are now
    permanent so old review comments keep pointing at the right thing.
  • Description: I'll update it with the shape summary, provenance,
    Limitations, and the CI coverage table.
  • Discoverability: I agree an AGENTS.md / CONTRIBUTING.md pointer is
    needed. I listed it as a follow-up to keep this PR focused, but I'm happy to
    put it in chore(github): add code owners for the code guidance skill #608 if you'd rather.

I'll verify branch protection after #608 merges, then rebase this and ping you.

@syeda-anjum
syeda-anjum force-pushed the docs/acp-code-review-skill branch 3 times, most recently from cf9bb27 to 61edf35 Compare November 23, 2026 21:14
syeda-anjum and others added 2 commits November 24, 2026 19:16
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>
@alizaidis
alizaidis force-pushed the docs/acp-code-review-skill branch from 3977142 to 18f15dd Compare November 24, 2026 19:17

@karajendran karajendran left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@alizaidis
alizaidis merged commit c904041 into main Nov 24, 2026
52 checks passed
@alizaidis
alizaidis deleted the docs/acp-code-review-skill branch November 24, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants