Skip to content

feat(skills): add gates skill for verification-gate discipline - #1309

Merged
BigSimmo merged 5 commits into
mainfrom
claude/gates-skill
Jul 28, 2026
Merged

feat(skills): add gates skill for verification-gate discipline#1309
BigSimmo merged 5 commits into
mainfrom
claude/gates-skill

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Encodes this repo's verification traps as a contextually-triggered skill in .claude/skills/, alongside issues, handoff, newtask, prlanded, and run-pr.

AGENTS.md is 600+ lines and gets skimmed; a skill triggers on the relevant action instead. Every trap below is one that has already cost time in this repo.

Covers

  • False greensverify:ui exits 0 without running a single Playwright test when another worktree holds the heavy lock; a stale worktree voids downstream results (check:installed-lock-parity fails closed for this); verify:cheap stops at the first failing check; format:check is CI-required but absent from verify:cheap; piping a gate to tail masks its exit code.
  • Smallest correct gate — a table mapping change type to the gate that can actually fail. lint/typecheck/test cannot observe a markdown-only change.
  • Lease protocol — check the coordinator lease directory before any heavy run or install; never install during an exclusive lease; never kill another worktree's process.
  • Provider boundary — restates the confirmation-required gate list.
  • Third-party claims — verify ref content, not ancestry (squash merges break ancestry); absence of evidence in one place is not proof.

Docs-only: one new SKILL.md, no source or config touched.

RAG impact: no retrieval behaviour change — documentation only, no code touched.

Checks

  • prettier --check .claude/skills/gates/SKILL.md — clean
  • npm run docs:check-links — 1287 repo path references resolve

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added contributor guidance for selecting the smallest correct verification “gate,” with explicit requirements to prove checks actually ran and to report passed vs skipped gates with reasons.
    • Documented safeguards against misleading “green” results (e.g., stale worktrees, resource contention, and CI-only checks) plus rules for provider-backed commands requiring explicit confirmation.
    • Updated Playwright UI verification guidance to reflect potential admission queuing (up to 15 minutes) and timeout behavior.
    • Updated the branch review ledger with the latest merge and fix outcomes.

AGENTS.md is 600+ lines and gets skimmed. The verification traps it documents
have cost repeated time, so this encodes them as a contextually-triggered skill
alongside the existing .claude/skills/ set.
Covers the false-green traps (verify:ui exiting 0 without running a test when
the heavy lock is held; a stale worktree voiding downstream results;
verify:cheap stopping at the first failure; format:check being CI-required but
absent from verify:cheap; piped gates masking exit codes), smallest-correct-gate
selection, the run-coordinator lease protocol before installs, the provider
confirmation boundary, and why third-party fix claims need ref-content
verification rather than ancestry checks.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@supabase

supabaseBot commented Jul 28, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds repository guidance for selecting and proving verification gates, updates verify:ui timeout documentation, and records review outcomes for PRs #1306 and #1309 in the branch ledger.

Changes

Verification gates guidance

Layer / File(s)Summary
Gate selection and evidence rules
.claude/skills/gates/SKILL.md, AGENTS.md
Defines smallest-applicable gate selection, false-green detection, heavy-run lease checks, provider-backed command restrictions, decisive evidence reporting, and verify:ui timeout behavior.
Branch review records
docs/branch-review-ledger.md
Adds ledger entries documenting PR #1306’s merge outcome and PR #1309’s conflict-sync resolution, corrections, and verification status.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested labels:codex

Suggested reviewers:cursoragent, claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly summarizes the main change: adding a gates skill for verification-gate discipline.
Description check✅ PassedThe description covers the summary and verification evidence, though it does not fully match the template structure.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:887c5e5706

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread.claude/skills/gates/SKILL.md Outdated

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.claude/skills/gates/SKILL.md (1)

29-30: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Make the pipeline-status instruction shell-explicit.

${PIPESTATUS[0]} is Bash-specific. State that this requires Bash, or provide the repository-standard equivalent for other supported shells so agents do not silently lose the gate’s exit status.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.claude/skills/gates/SKILL.md around lines 29 - 30, Update the
pipeline-status guidance near the gate piping rule to explicitly identify
${PIPESTATUS[0]} as Bash-specific. State the required Bash context, or replace
it with the repository-standard status-preserving approach for any other
supported shell, while retaining the instruction to check the gate status before
piping.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/skills/gates/SKILL.md:
- Around line 27-28: Update the pipeline-status example in the gates skill
documentation to explicitly identify Bash as the required shell when using
${PIPESTATUS[0]}. Keep the existing scoped Prettier guidance unchanged.
---
Nitpick comments:
In @.claude/skills/gates/SKILL.md:
- Around line 29-30: Update the pipeline-status guidance near the gate piping
rule to explicitly identify ${PIPESTATUS[0]} as Bash-specific. State the
required Bash context, or replace it with the repository-standard
status-preserving approach for any other supported shell, while retaining the
instruction to check the gate status before piping.
🪄 Autofix (Beta)

❌ Autofix failed (check again to retry)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8169888e-8d37-42b9-8ace-54d9985a41ea

📥 Commits

Reviewing files that changed from the base of the PR and between fe09c33 and 887c5e5.

📒 Files selected for processing (1)
  • .claude/skills/gates/SKILL.md

Comment thread.claude/skills/gates/SKILL.md
Squash-merged; remote branch auto-deleted. Records the CodeRabbit outcome
(2 of 3 findings autofixed pre-merge, third landed in #1308) and that
verify:cheap never completed past check:installed-lock-parity.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@BigSimmo
BigSimmo enabled auto-merge (squash) July 28, 2026 04:47
@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@cursoragent resolve merge conflict

@cursor

cursorBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Taking a look!

Open in WebOpen in Cursor

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Cannot run autofix: This PR has merge conflicts.

Please resolve the conflicts with the base branch and try again.

Alternatively, use @coderabbitai resolve merge conflict to automatically resolve the conflicts.

@BigSimmo

Copy link
Copy Markdown
OwnerAuthor

@cursoragent Inspect the PR and repository state, identify the root cause of every failing CI check, unresolved review comment, merge conflict, and related defect. Apply the smallest robust fix using existing project patterns and best practices, without unrelated changes. Run Bugbot and all relevant lint, type-check, test, build, and CI-equivalent commands, fix any issues found, then resolve only the review comments that are fully addressed. Summarise the root causes, changes made, validation results, and any remaining blockers.

@cursor

cursorBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

PR #1309 is cleaned up: merge conflict cleared, both review threads fixed and resolved, tip pushed at 1054ea7e.

Root causes

IssueCause
GitHub CONFLICTING/DIRTYBranch behind main; merge-tree was clean (staleness, not content conflict)
Codex P2Skill copied a stale claim: verify:ui soft-skips green under lock contention. Actual behavior: 15m queue → throw → run-playwright.mjs exits 1
CodeRabbit${PIPESTATUS[0]} is Bash-only and was not labeled as such
CI failuresNone on prior tip; checks re-running on new tip

Changes

  • .claude/skills/gates/SKILL.md — contention = wait/timeout/exit 1; Bash PIPESTATUS
  • AGENTS.md — same evidence-rule correction
  • docs/branch-review-ledger.md — closeout row

Validation

  • Bugbot: no cursor[bot] findings; confirmed Codex P2
  • prettier --check — clean
    docs link check passed: 1287 repo path references resolve.
  • check:branch-review-ledger — passed
  • Skipped lint/typecheck/test/build — docs-only; those gates cannot observe this change
  • No provider-backed gates

Review threads

Both resolved after reply: Codex 3662795163, CodeRabbit 3662804955.

Remaining

  • Hosted CI still pending on 1054ea7e (mergeable: MERGEABLE, BLOCKED until checks finish)
  • Human merge still required
Open in WebOpen in Cursor

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

⚠️Branch updated during autofix.

The branch was updated while autofix was in progress. Please try again.

cursoragentand others added 2 commits July 28, 2026 04:55
Replace the stale claim that verify:ui soft-skips green under heavy-lock
contention with the real wait/timeout/exit-1 behavior, and mark
PIPESTATUS as Bash-specific. Align the matching AGENTS.md evidence rule.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Comment thread.claude/skills/gates/SKILL.md
@BigSimmo
BigSimmo merged commit 631d90d into mainJul 28, 2026
44 checks passed
@BigSimmo
BigSimmo deleted the claude/gates-skill branch July 28, 2026 04:59

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/skills/gates/SKILL.md:
- Around line 29-30: Update the formatting guidance in the gates skill to use
the repository-local Prettier invocation via npm exec rather than npx, while
still passing only the changed files and explicitly avoiding a whole-tree
formatting command.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5b6ab810-1224-46d9-91e6-119d2fc7b1b2

📥 Commits

Reviewing files that changed from the base of the PR and between a538efd and 1054ea7.

📒 Files selected for processing (3)
  • .claude/skills/gates/SKILL.md
  • AGENTS.md
  • docs/branch-review-ledger.md

Comment on lines +29 to +30
`verify:cheap` can still fail CI on formatting. Run `npx prettier --write <changed files>` before
pushing — scoped to your files, never `prettier --write .`, which sweeps the whole tree.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
file=".claude/skills/gates/SKILL.md"echo"== line count =="
wc -l "$file"echoecho"== relevant excerpt =="
sed -n '1,120p'"$file"| cat -n
echoecho"== references to prettier/npx/install/lease =="
rg -n "npx|prettier|lease|install""$file"

Repository: BigSimmo/Database

Length of output: 8116


🏁 Script executed:

#!/bin/bashset -euo pipefail
python3 - <<'PY'import subprocess, sys, textwrap, json, os# Check npm/npx help text if available, without running repository code.for cmd in [ ["npx", "--help"], ["npm", "exec", "--help"],]: print(f"\n== {' '.join(cmd)} ==") try: out = subprocess.check_output(cmd, stderr=subprocess.STDOUT, text=True, timeout=20) print(out[:4000]) except Exception as e: print(f"ERROR: {e}")PY

Repository: BigSimmo/Database

Length of output: 3000


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"== package files mentioning prettier =="
rg -n '"prettier"|prettier' package.json package-lock.json .npmrc .claude -g 'package*.json' -g '.npmrc' -g '*.md'echoecho"== package.json excerpt =="
sed -n '1,220p' package.json | cat -n

Repository: BigSimmo/Database

Length of output: 20641


Use a local-only Prettier invocation here.npx prettier can fall back to the registry when the binary is missing; npm exec -- prettier --write <changed files> keeps it tied to the repo dependency.

🧰 Tools
🪛 SkillSpector (2.3.11)

[warning] 29: [RP1] null: npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Remediation: Pin the version: npx @scope/server@1.2.3

(MCP Rug Pull (RP1))


[warning] 42: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 43: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 46: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.claude/skills/gates/SKILL.md around lines 29 - 30, Update the formatting
guidance in the gates skill to use the repository-local Prettier invocation via
npm exec rather than npx, while still passing only the changed files and
explicitly avoiding a whole-tree formatting command.

Source: Linters/SAST tools

Sign up for freeto 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.

2 participants

@BigSimmo@cursoragent