a template starter repo for sveltekit projects
0

Configure Feed

Select the types of activity you want to include in your feed.

ci: add on-demand Claude review of in-flight PRs

.github/workflows/claude-review.yml runs the project's own two-axis
review skill (.pi/skills/review/SKILL.md) against a PR via
anthropics/claude-code-action@v1. Invoked two ways: a '/review' comment
on the PR (owner/member/collaborator only) or a workflow dispatch with a
PR number. The prompt pins the skill's bindings for CI — merge-base as
the fixed point, PR body as the spec — and the report lands as a
top-level PR comment plus inline comments. Read-only on contents;
allowedTools limited to gh/git read commands and comment posting.

Requires the ANTHROPIC_API_KEY repo secret, not yet configured.

SYSTEMS_MAP.md: add .github/workflows/ to the Layout tree (omitted at
creation) and record the new GitHub-invocable seam on the process layer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

+90 -1
+88
.github/workflows/claude-review.yml
··· 1 + # On-demand review of an in-flight (WIP/draft) PR, driven by the project's 2 + # own review skill (.pi/skills/review/SKILL.md). Two ways to invoke: 3 + # 4 + # 1. Comment "/review" anywhere on the PR. 5 + # 2. gh workflow run claude-review.yml -f pr=<number> 6 + # (or the Run workflow button in the Actions tab). 7 + # 8 + # Requires the ANTHROPIC_API_KEY repo secret (or swap in 9 + # claude_code_oauth_token — see anthropics/claude-code-action docs). 10 + 11 + name: Claude review 12 + 13 + on: 14 + workflow_dispatch: 15 + inputs: 16 + pr: 17 + description: 'PR number to review' 18 + required: true 19 + type: string 20 + issue_comment: 21 + types: [created] 22 + 23 + jobs: 24 + review: 25 + if: | 26 + github.event_name == 'workflow_dispatch' || 27 + (github.event.issue.pull_request && 28 + contains(github.event.comment.body, '/review') && 29 + contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) 30 + runs-on: ubuntu-latest 31 + permissions: 32 + contents: read 33 + pull-requests: write 34 + issues: write 35 + id-token: write 36 + concurrency: 37 + group: claude-review-${{ github.event_name == 'workflow_dispatch' && inputs.pr || github.event.issue.number }} 38 + cancel-in-progress: true 39 + env: 40 + PR_NUMBER: ${{ github.event_name == 'workflow_dispatch' && inputs.pr || github.event.issue.number }} 41 + steps: 42 + - name: Checkout repository 43 + uses: actions/checkout@v6 44 + with: 45 + # Full history: the review diffs against the merge-base with main. 46 + fetch-depth: 0 47 + 48 + - name: Check out the PR branch 49 + env: 50 + GH_TOKEN: ${{ github.token }} 51 + run: | 52 + if ! [[ "$PR_NUMBER" =~ ^[0-9]+$ ]]; then 53 + echo "PR number must be numeric, got: $PR_NUMBER" >&2 54 + exit 1 55 + fi 56 + gh pr checkout "$PR_NUMBER" 57 + 58 + - name: Run the two-axis review 59 + uses: anthropics/claude-code-action@v1 60 + with: 61 + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} 62 + prompt: | 63 + REPO: ${{ github.repository }} 64 + PR NUMBER: ${{ env.PR_NUMBER }} 65 + 66 + You are reviewing an in-flight (possibly draft) PR. The PR branch 67 + is already checked out. 68 + 69 + Read .pi/skills/review/SKILL.md and execute that review process 70 + against this PR, with these bindings: 71 + 72 + - The fixed point is the branch's merge-base with origin/main — 73 + do not ask. 74 + - The PR body carries the slice-brief; treat it as the spec. If 75 + the body is empty, fall back to the skill's spec-discovery 76 + order and note the gap in the report. 77 + - Run the Standards and Spec axes per the skill: parallel 78 + sub-agents if your Agent tool is available, sequentially with 79 + the noted caveat if not. 80 + - Deliver the report as one top-level PR comment in the skill's 81 + report format, plus inline comments for findings anchored to a 82 + specific line. Do not push commits or modify the branch. 83 + 84 + This is a WIP review — the goal is early course correction, not 85 + a merge gate. Rank findings by how expensive they become if the 86 + branch continues building on them. 87 + claude_args: | 88 + --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh issue view:*),Bash(git log:*),Bash(git diff:*),Bash(git merge-base:*),Bash(git fetch:*)"
+2 -1
SYSTEMS_MAP.md
··· 29 29 │ ├── routes/ # SvelteKit pages — the placeholder a fork replaces 30 30 │ └── stories/ # Storybook stories + demo scaffolding 31 31 ├── static/ # files served as-is 32 + ├── .github/workflows/ # CI: Pages deploy, graph cleanup, on-demand Claude review 32 33 ├── .storybook/ # Storybook config 33 34 ├── .pi/ 34 35 │ ├── skills/ # the process layer; task/ is the spine ··· 82 83 83 84 For: How work happens in this repo and its forks — the rulebook, the task-process skills and prompts, the decision graph, and release conventions; independent of what the app does. 84 85 Lives at: `AGENTS.md`, `.pi/skills/` (`task` is the spine; `slice-brief`, `systems-map`, `project-plan`, `review`, `decision-graph`, `suede-kickoff` support it), `.pi/prompts/`, `.deciduous/` 85 - Seams: Forks tailor the layer through `suede-kickoff` Step 3 Thread B — issue tracker, version scheme, commit types, which skills apply. Global skills and prompts ride in from the user's environment without repo changes. 86 + Seams: Forks tailor the layer through `suede-kickoff` Step 3 Thread B — issue tracker, version scheme, commit types, which skills apply. Global skills and prompts ride in from the user's environment without repo changes. The review skill is also invocable from GitHub itself via `.github/workflows/claude-review.yml` (a `/review` PR comment or a workflow dispatch). 86 87 Fragile: `suede-kickoff` is consumed once — it deletes itself at the end of a fork's bootstrap. `.deciduous/` is per-machine (only `sync/` is committable), so the graph does not travel with a clone. `docs/` is the regenerated graph viewer — gitignored; never edit it by hand.