agentleFS
albertomartureloalbertomarturelo/sii/.agents/skills/review-pr/SKILL.md

review-pr

Skill19 starsChanged 7 days agoMITView on GitHub

Review a PR against the project's context (ADRs, CONVENTIONS, the linked issue's acceptance criteria) without scanning full files; report Critical / Suggestions / Nits, never auto-fix. Use when asked to review a pull request, or to self-review before opening one.

  • Reads credentials

185 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnose-ci-failures, review-delta and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • zerx-labSkill

    diagnose-ci-failures

    Diagnose CI failures for a PR using the GitHub CLI, extract error logs, and generate a plan to fix them. Use when the user asks to check CI status, pull CI issues, triage test failures, or investigate PR build failures.

    Also in 3 projects that use this

  • n24q02mSkill

    review-delta

    Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.

    Also in 3 projects that use this

  • GeiserXSkill

    docs-loop

    Use when the user asks to audit docs, check documentation for stale claims, or verify docs against the code.

    Also in 3 projects that use this

  • GeiserXSkill

    full-loop

    Drive a repository to done with sergio-loop, then keep improving it with refine-loop at a descending theta. Use only when the user explicitly invokes full-loop.

    Also in 3 projects that use this

  • n24q02mSkill

    build-graph

    Build or update the code review knowledge graph. Run this first to initialize, or let hooks keep it updated automatically.

    Also in 3 projects that use this

  • +7 more from GeiserX

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 2 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 178 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If still none, ask.

    line 12
  2. Very specific:

    Every selector / endpoint / payload constant added carries an observation citation (// observed at <URL> on <YYYY-MM-DD>).

    line 58
  3. Very specific:

    Only the login task mints a session.

    line 64
  4. Very specific:

    No MCP tool accepts a password argument.

    line 66
  5. Very specific:

    No hard-coded credentials, RUTs, passwords, cookies, tokens.

    line 73
  6. Very specific:

    No real customer PII in fixtures.

    line 76
  7. Very specific:

    No blocking patterns in async paths.

    line 82
  8. Very specific:

    Every new conditional branch / error path in @albertomarturelo/sii-core is exercised.

    line 89
  9. Very specific:

    Breaking: when it breaks a caller. Missing line = Suggestion.

    line 102
  10. Distinctive:

    NO full-file reads by default: If the diff is too narrow, NAME the file you need and explain WHY before reading.

    line 122

“Common” is measured: kept by at least 6 in 10 of the 178 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

The user passes a PR number. If not provided, infer from the current branch (gh pr status --repo albertomarturelo/sii --json number --jq '.currentBranch.number'). If still none, ask.

1. Fetch PR metadata + diff (do FIRST)

gh pr view <n> --repo albertomarturelo/sii \
  --json baseRefName,headRefName,title,body,labels,commits,closingIssuesReferences
gh pr diff <n> --repo albertomarturelo/sii
git log <base>..<head> --pretty=format:%s

2. Load context indices (do NOT read full source files)

  • CLAUDE.md, docs/CONVENTIONS.md, docs/decisions/_index.md.
  • docs/conventions/sii-wire.md when the diff touches packages/core/src/ (portal/, tasks/, auth/, adapters/), packages/cli/src/commands/, packages/mcp/src/tools/ or docs/sii-contract/. It loads on demand (ADR-033), so this review is the backstop for a change made without reading it.
  • The linked issue body (gh issue view <n>) — extract the AC checklist + the "ADRs to load" list.
  • Each ADR named in the issue under docs/decisions/NNN-*.md.

Token cost so far ~2–4k. Still no full source-file reads.

3. Cross-check the diff against this checklist

GitHub workflow

  • Branch name matches <type>/GH-<issue>-<slug> (type ∈ feature/fix/chore/docs).
  • PR body references Closes #<issue> when there is a linked issue.
  • PR title is Conventional Commits, subject ≤72 chars; all commits the same.
  • No AI attribution anywhere (commits, title, body, comments). Block on any.
  • English everywhere.

Architecture (ADR-002 / ADR-003)

  • The CLI / MCP packages import ONLY @albertomarturelo/sii-core's task layer (+ seam interfaces). No reaching past tasks into a portal/dte facade.
  • packages/core/src imports NO Node-only module (node:*, fs, playwright, a keyring lib). Side-effects go through ports. Grep the diff.
  • No hard-coded SII hostnames outside the core config module. Grep the diff for sii.cl / palena / zeusr / misiir literals.
  • Adapters are injected at a surface composition root — no service-locator / global singletons reaching into the core.

SII contract (ADR-004)

  • No third-party SII libraries. Grep the diff for cl-sii, libredte, python-sii, dansanti, or any SII-domain package. Any hit blocks merge.
  • Every selector / endpoint / payload constant added carries an observation citation (// observed at <URL> on <YYYY-MM-DD>). Missing = block.
  • Auth detection is URL-based (zeusr.sii.cl ⇒ not authenticated), not DOM-marker based. No retry after a login failure / rate-limit block.

Identity & secrets (ADR-005 / ADR-006)

  • Only the login task mints a session; domain tasks consume or raise NotAuthenticated. No implicit minting in a domain path.
  • No MCP tool accepts a password argument. Secrets/sessions reached only via the SecretStore / SessionStore ports.
  • Operate selects-never-mints; the operating RUT is validated against the operable set; the operating as: header / status visibility is present when operating ≠ self.

Credentials & PII

  • No hard-coded credentials, RUTs, passwords, cookies, tokens. Anything matching a Chilean RUT (\b\d{1,8}-[\dKk]\b) in source/fixtures must be synthetic (11111111-1, 12345670-K).
  • No real customer PII in fixtures. .gitignore still blocks *.pfx, *.p12, .env, .sii/.

TypeScript correctness

  • strict honored: no any without an inline justification; unknown + narrowing at boundaries. ESM, named exports.
  • No blocking patterns in async paths; no console.log in @albertomarturelo/sii-core (use the injected logger/audit) — console only in surface user-facing output.
  • pnpm typecheck, pnpm lint, pnpm format:check clean.

Testing

  • New logic has vitest tests (<module>.test.ts); fixtures synthetic.
  • Tests must NOT hit production SII (no real Playwright/HTTP in CI).
  • Every new conditional branch / error path in @albertomarturelo/sii-core is exercised.

Documentation (CFD — ADR-001)

  • New convention → CONVENTIONS.md (or conventions/sii-wire.md for an SII wire rule, ADR-033) updated in the SAME commit.
  • New decision → new ADR BEFORE the implementation; superseded ADRs updated.
  • ROADMAP.md reflects what shipped, in its OWN commit (status bookkeeping is never bundled with feature code). STACK.md updated if deps changed; ARCHITECTURE.md updated if the module map changed; a new SII surface adds a sii-contract/*.md. A changed CLI command / flag / error kind updates the docs/integrations/*/skill-*.md that describe it, in the same PR.
  • A user-visible change (CLI verb / flag / output field, MCP tool or result, error kind, core export) adds ONE line under ## Unreleased in the root CHANGELOG.md, starting with Breaking when it breaks a caller. Missing line = Suggestion; a breaking change without the marker = Critical (the release's bump depends on it — ADR-021 amendment). (CURRENT_STATUS.md is NOT versioned — untracked since #79; never flag it here.)

4. Output a structured report

## Critical (must fix before merge)
- <file:line> — <issue> — <concrete one-line fix> (cites ADR-NNN | CONVENTIONS)
## Suggestions (should fix)
## Nits
## Summary
- Verdict: BLOCK | APPROVE WITH SUGGESTIONS | APPROVE
- AC items: <m/n> implemented
- Architecture compliance / Test coverage / Tokens: ~<n>k (target ≤6k)

5. Do NOT auto-fix. Report only.

Hard rules

  • NO full-file reads by default. If the diff is too narrow, NAME the file you need and explain WHY before reading. Silent scope expansion is forbidden.
  • English only in the report, even when the conversation is in Spanish.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.