/drupal-ai-contrib:contribution-guardrailsfrom drupal-ai-contrib
Enforces development discipline for AI-assisted Drupal contributions with rules for evidence over assertion, no guessing external facts, and verification-gate artifact contracts.
Ships in drupal-ai-contrib. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The cross-cutting discipline for AI-assisted Drupal contribution development. The recurring failure this prevents: AI claiming correctness it never verified. Drupal treats this as an existential review-cost problem — AI makes contributing cheap but makes reviewing expensive.
/drupal-ai-contrib:issue and /drupal-ai-contrib:verifycontribution-verify)A gate passes only on a produced artifact. Never on the model stating a verdict.
For each gate, produce → capture → check the artifact:
| Gate | Pass artifact |
|---|---|
| Research | Cited findings — each claim traced to a source (dev-guide slug, vendor doc, source file) |
| Implementation | TDD evidence — a failing test, then the same test passing (red → green) |
| Static analysis | Clean captured phpcs / phpstan output — the actual command output, pasted |
| Test | The core phpunit.xml.dist run with zero failures, warnings, deprecations |
| Live behavior | Real API / command output — captured, not described |
| Review | A fresh-context agent's verdict (fresh-context-reviewer) |
| Completion | A green real drupalci pipeline (contribution-pipeline) |
If you cannot show the artifact, the gate has not passed — say so plainly.
Any external fact — an SDK symbol, an API header or parameter, a beta-feature slug, a library-version behavior — is verified against vendor source or a live probe.
drupal-ai-contrib:external-fact-verifier agent (Task tool);
act only on a verified result.Any code edited after its gate passed re-fires that gate for the touched path.
Features added after a green test run are the classic escape hatch for unverified code.
The PostToolUse re-verification hook marks a changed path's gate stale; verify
re-runs every stale gate. Never treat a pre-edit green as still valid.
Full gates for features. A light path is allowed for trivial changes — but "trivial" must be explicitly justified and recorded (what makes it trivial, in writing), never assumed. An unrecorded "this is trivial" is the bypass that hides unverified work.
Deliver exactly the agreed scope contract — goal / expected result / success criteria / non-goals. AI over-delivers, and every extra line is review burden a maintainer did not ask for. Out-of-scope work is a guardrail violation, not a bonus.
User says: "The phpcs job should pass now." Actions:
phpcs output; if it has not been run, run it and capture it.
Result: The gate's verdict is the pasted command output, not a prediction.User says: "Use the Client::stream() method from the SDK."
Actions:
Client::stream() is an external fact recalled from memory (Rule 2).drupal-ai-contrib:external-fact-verifier agent — verify
against vendor source.
Result: Code uses the symbol only after a verified result; otherwise it is blocked.| Situation | Handling |
|---|---|
| Asked to call something "trivial" to skip gates | Allowed only if the justification is written down (Rule 4). No record → full gates. |
| A warning is dismissed as "noise" | Trace it to its source before dismissing — undismissed by default. |
| Builder explains why the work is fine | Explanation is narrative, not evidence. Require the artifact. |
| Extra work delivered beyond scope | Flag as a Rule 5 violation; it is review burden, not a bonus. |
Load via dev-guides-navigator: drupal/contributing-with-ai/evidence-over-assertion,
drupal/contributing-with-ai/supervised-ai-workflow,
drupal/contributing-with-ai/human-review-requirements.
What SKILL.md sets; muted values are Claude Code's defaults
inheritnpx claudepluginhub camoa/claude-skills --plugin drupal-ai-contrib8 skills in this plugin
/contribution-issueWorks the Drupal issue lifecycle — reviews prior work on an issue first, then creates / comments on / claims it, and checks out the issue fork + branch with three-way fork handling. Use when the user runs /drupal-ai-contrib:issue or asks to find, create, claim, or check out a Drupal issue or issue fork. Wraps drupalorg-cli for no-auth reads; delegates authenticated GitLab fork/push to the drupal-gitlab skill./contribution-pipelineFetches the real GitLab merge-request pipeline for a Drupal contribution and gates on it — the authoritative final check. Use when the user runs /drupal-ai-contrib:pipeline or asks to check the real pipeline, the CI status, or whether a Drupal contribution is done. A contribution is not complete until the real drupalci pipeline is green./contribution-reviewRuns honest fresh-context review of a Drupal contribution — dispatches isolated reviewer agents with no session narrative to check the work against scope, coding standards, security, and the AI policy. Use when the user runs /drupal-ai-contrib:review or asks for an honest review, a fresh-eyes review, or a pre-submission review of a Drupal contribution. A builder cannot objectively review its own work./contribution-setupStands up and environment-matches a Drupal contribution workspace — DDEV with the workflow-matched add-on, CI gate config (new-module scaffold or existing-module discovery), the Drupal AI skills, the drupalorg CLI, the GitLab CLI (glab) for authenticated git.drupalcode.org operations, and a contribution-credentials (SSH-key) check. Use when the user runs /drupal-ai-contrib:setup or asks to set up a Drupal contribution environment. Idempotent and detect-driven — does only what is missing; never a gate, never a prerequisite./contribution-submitCreates or updates a Drupal merge request and generates the AI-disclosure comment at the policy threshold. Use when the user runs /drupal-ai-contrib:submit or asks to submit, open, or update a Drupal merge request or patch. Creates the cross-project MR via the drupal-gitlab skill (glab); wraps drupalorg-cli for no-auth reads; surfaces status and RTBC guidance./contribution-verifyRuns the local verification inner loop for a Drupal contribution — the drupalci-parity gate set at CI strictness, the AI-policy gate, and the eval gate, every gate passing only on a captured artifact. Use when the user runs /drupal-ai-contrib:verify or asks to verify, check, or locally test a Drupal contribution before submitting. This is the centerpiece — evidence over assertion, never a bare 'passes'.Other plugins' skills for the same job