impl-gh-issue
Skill12 starsChanged 2 months agoApache-2.0View on GitHub
Implement an AccessFlow GitHub issue end-to-end — fetch with gh, plan against docs/, follow CLAUDE.md conventions, update tests and docs, then open a PR. Trigger when the user says "implement issue #N", "work on AF-N / FE-N", or passes a GitHub issue URL/number.
- Commits and pushes
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- website/llms.txtllms.txt
- add-engineSkill
- commit-sequenceSkill
- dev-stackSkill
- parallel-agentsSkill
- prep-gh-releaseSkill
- review-gh-prSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 69
Always re-skim CLAUDE.md sections relevant to the layer you're touching (Modulith rules, validation parity, i18n, scheduled-job locking, …
- Distinctive: line 79
Follow CLAUDE.md exactly. Highlights worth re-checking before each PR:
- Very specific: line 87
When in doubt, run cd e2e && npm run stack:up && npm test locally before the PR.
- Distinctive: line 103
Website updates are mandatory — do not skip: Before opening the PR, ask explicitly: "does this change touch anything user-visible or …
- Distinctive: line 119
Before opening the PR, get a second opinion from agents that cannot edit the code — that constraint is the point, since a self-review by …
- Distinctive: line 143
This gate reports; it does not block: Do not silently act on the merged findings and move on, and do not silently ignore them either:
- Distinctive: line 153
If no reviewer returns a Blocker, say that plainly — an empty review is a real result.
- Very specific: line 166
Script: write a throwaway Playwright script in the session scratchpad — never commit it — and run it with npx -y tsx <script> from e2e/, so …
- Distinctive: line 185
Do not open the PR without the screenshots.
- Very specific: line 186
Write the body to a scratchpad file with a ## Screenshots section that references each PNG by its absolute local path, with a caption: …
- Very specific: line 188
Create the PR with one --attach per image: gh pr create --title "…" --body-file <body.md> --attach '<png>#<alt text>' --attach ….
- Very specific: line 193
Check the result with gh pr view --json body.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Implement a GitHub issue for AccessFlow
You are implementing a GitHub issue in the AccessFlow repo. CLAUDE.md is the authoritative rulebook — re-read it before writing code. This skill only adds a workflow on top.
Inputs
The user passes one of:
- An issue number:
42,AF-58,FE-10 - A full URL:
https://github.com/bablsoft/accessflow/issues/42
Resolve the numeric issue with gh issue view <n> --json number,title,body,labels,assignees,url,state.
Project map
- Docs (authoritative design):
docs/01-overview.md— product scope, goals, non-goalsdocs/02-architecture.md— system architecture and request flowdocs/03-data-model.md— entities, columns, enums, indexesdocs/04-api-spec.md— REST + WebSocket spec (update before adding endpoints)docs/05-backend.md— proxy engine, workflow state machine, AI analyzer, scheduled jobsdocs/06-frontend.md— directory layout, routing, state managementdocs/07-security.md— auth, authorization matrix, encryption rulesdocs/08-notifications.md— event types, channel configs, signed payloadsdocs/09-deployment.md— Docker Compose, Helm, env-var referencedocs/11-development.md— coding standards, testing strategy, Git workflowdocs/12-roadmap.md— milestone scopedocs/13-mcp.md— MCP server,@Toolcallbacks, user API keysdocs/14-connectors.md— connector catalog, manifests, SHA-256 pinsdocs/15-engine-sdk.md— host↔plugin contract, add-an-engine checklistdocs/16-iac.md— Terraform/OpenTofu provider, CI templates, composite Actionsdocs/17-api-governance.md— API access governance (apigov)docs/18-deployment-governance.md— deployment approval governance (deploygov)docs/19-sql-review.md— deterministic SQL review rules (sqlreview)docs/20-schema-change-governance.md— schema change governance (schemachange)docs/21-aggregate-disclosure.md— aggregate disclosure guard (design, #943)docs/22-service-accounts.md— service accounts / non-human identities (serviceaccounts, epic #867)
- Backend at
backend/— Java 25, Spring Boot 4, Spring Modulith. Modules undercom.bablsoft.accessflow.{core,proxy,workflow,ai,security,notifications,audit}. Build:mvn verify(run frombackend/— there is no Maven wrapper). - Frontend at
frontend/— React 19 + Vite + TS + Ant Design 6 + TanStack Query + Zustand. Build:npm run lint && npm run typecheck && npm run test:coverage && npm run build. - End-to-end at
e2e/— Playwright suite with its owndocker-compose.e2e.ymlthat builds backend + frontend from the working tree and seeds a deterministic admin via thebootstrapmodule. Owns auth and (over time) all critical user flows. Run:cd e2e && npm ci && npx playwright install --with-deps chromium && npm run stack:up && npm test. - Website at
website/— public marketing site, static HTML/CSS/JS, no build step. Edits land directly in HTML.website/index.html— landing page (pitch, supported databases, AI providers, auth methods, feature list, roadmap, quick-start commands, tech stack, docs chapter list, top-level URLs).website/docs/index.html— public user documentation page (deployment instructions, configuration entities — Review Plans, AI configs, datasources, OAuth, SAML, SMTP, notification channels, user creation — RBAC role matrix, operator-facing env vars).website/README.md— content-source map describing which app/docs/sections each website section is derived from; keep in sync when adding new website sections.
- README at the repo root — public-facing project overview and quick start. Keep in sync when changes affect setup, tech stack, features, project structure, or top-level documentation.
Workflow
1. Read the issue and pick docs
gh issue view <n>to load title, body, labels.- From labels and body, pick the docs to read before coding:
- DB / migration / entity →
03-data-model.md,05-backend.md - New REST or WS endpoint →
04-api-spec.md(update first),05-backend.md - Workflow / proxy / AI / scheduled job →
05-backend.md - Auth / RBAC / encryption →
07-security.md - UI page / component / store →
06-frontend.md - Notifications →
08-notifications.md - Env vars / Docker / Helm →
09-deployment.md - MCP / connectors / engine SPI / IaC →
13-mcp.md,14-connectors.md,15-engine-sdk.md,16-iac.md - API or deployment governance →
17-api-governance.md,18-deployment-governance.md - SQL review rules / rulesets / editor lint →
19-sql-review.md - Schema change sets / DDL gate / promotion / drift →
20-schema-change-governance.md - Aggregate / group-size disclosure, classification-driven routing →
21-aggregate-disclosure.md - Service accounts / API keys / MCP allow-list / rate limit / on-behalf-of →
22-service-accounts.md
- DB / migration / entity →
- Always re-skim CLAUDE.md sections relevant to the layer you're touching (Modulith rules, validation parity, i18n, scheduled-job locking, JaCoCo gate).
2. Branch
Branch names follow docs/11-development.md and CLAUDE.md:
feature/AF-<n>-<kebab-summary>for backend featuresfix/AF-<n>-<kebab-summary>for backend fixesfeature/FE-<n>-…/fix/FE-<n>-…for frontend-only work- Branch off
main(the repo currently merges PRs intomain; checkgit remote show originif unsure).
3. Implement
Follow CLAUDE.md exactly. Highlights worth re-checking before each PR:
- Backend: constructor injection,
*Entitysuffix andinternal/persistence/entity/placement, FlywayV{n}__…sql(never edit existing),@SchedulerLockon every@Scheduled, no string-concat SQL,@JsonIgnoreon encrypted fields, i18n keys inmessages.properties, ≥ 90% line coverage with a dedicated*Testper concrete class. - Frontend: TanStack Query for all server data (no
useEffectfetching), Zustand only for client state,t()for every user-visible string with the key insrc/locales/en.json, validation parity with backend Bean Validation,≥ 90%line /≥ 80%branch coverage on included modules. - End-to-end (
e2e/) — non-negotiable, per CLAUDE.md's "Do not lete2e/drift" rule. Before opening the PR, scan the diff for changes that touch user flows:- Frontend change touches a route, page, form, store, or selector that an existing Playwright spec uses? Update the spec in the same commit set. Don't merge a frontend change that you know will flip an e2e green run to red. Common drift sources: renaming an
id/aria-label/ button text used by a selector, changing the redirect target after login or logout, altering the auth-store or apiClient interface, moving the logout entry in the user menu. - Frontend change introduces a new user-facing flow (new route, auth path, user-driven mutation — submit query, approve a review, create a datasource, change a setting that has a server effect)? Add a spec under
e2e/tests/in the same PR. The default is "add a spec"; if you're skipping it, justify why in the PR description. - Backend change flips behaviour for an e2e-covered flow (login payload, refresh-cookie semantics,
bootstrapreconciler, setup-status endpoint)? Update the spec accordingly. - Pure presentational refactors (CSS-only, internal rename with no selector impact) don't need an e2e update — but verify your refactor doesn't break any selector first.
- When in doubt, run
cd e2e && npm run stack:up && npm testlocally before the PR. Thee2eCI job is the load-bearing check.
- Frontend change touches a route, page, form, store, or selector that an existing Playwright spec uses? Update the spec in the same commit set. Don't merge a frontend change that you know will flip an e2e green run to red. Common drift sources: renaming an
4. Update docs AND the website in the same change
Non-negotiable. The PR is incomplete until the matching docs/*.md, README.md, and website/ reflect what you built.
docs/*.md:
- New endpoint / payload field →
04-api-spec.md - New entity / column / enum →
03-data-model.md - New scheduled job / module rule / proxy step →
05-backend.md - New page / route / store / hook →
06-frontend.md - New env var →
09-deployment.mdand the env-var table in CLAUDE.md - New MCP tool / connector / engine SPI change / IaC surface →
13-mcp.md,14-connectors.md,15-engine-sdk.md,16-iac.md - New dependency → bump the version snapshot in CLAUDE.md (per the
feedback_dependency_versionsmemory rule).
README.md (repo root) — update when the change affects setup, tech stack versions, features, project structure, or top-level documentation.
Website updates are mandatory — do not skip. Before opening the PR, ask explicitly: "does this change touch anything user-visible or operator-visible?" If yes, update the website file(s) in the same commit set:
website/index.html— update when the change affects any of: user-facing pitch, supported databases, AI providers, authentication methods, feature list, roadmap milestones, quick-start commands, docs chapter list, tech stack versions, or top-level URLs.website/docs/index.html— update when the change affects any of: deployment instructions, configuration entities (Review Plans, AI configs, datasources, OAuth, SAML, SMTP, notification channels, user creation), the RBAC role matrix, or operator-facing env vars.website/README.md— update the content-source map when you add new website sections or change which app/docs sources they derive from.
The website has no build step — edits land directly in HTML. If you're unsure whether a change is user-visible, default to updating the website rather than skipping; a stale marketing site is a project-level rule violation (per CLAUDE.md → "Do not let website/ drift").
5. Verify locally
- Backend:
cd backend && mvn verify -Pcoverageandmvn -q test -Dtest='ApplicationModulesTest,ApiPackageDependencyTest'. - Frontend:
cd frontend && npm run lint && npm run typecheck && npm run test:coverage && npm run build. - E2E (when frontend or auth/setup/proxy backend code changed):
cd e2e && npm ci && npx playwright install --with-deps chromium && npm run stack:up && npm test && npm run stack:down. The CIe2ejob runs the same steps — fail-locally-first to keep PR turnaround tight. - For UI changes that render in a browser, use the
preview_*tools (per the harness instructions) — don't ask the user to check manually. The screenshots that go into the PR are captured separately in step 5c.
5b. Independent review (report, don't block)
Before opening the PR, get a second opinion from agents that cannot edit the code — that constraint is the point, since a self-review by the author rationalises past its own choices.
Pick the reviewers from the touched paths
(git diff --name-only $(git merge-base HEAD origin/main)...HEAD) and dispatch all of them in
a single message so they run concurrently. (If you get Agent type '…' not found, the session
predates the agent files — agents load at session start. Restart, or run the gates manually per
step 5.)
| Condition | Agent |
| always | af-verifier — maps the touched paths onto the gates that actually apply and runs them. Reports PASS / FAIL / NOT_RUN / BLOCKED per gate; treat any gate it could not run as unverified, not as fine. |
| always | af-reviewer — cross-cutting: fan-out completeness tables, "same commit set" drift (docs, website, connector pins, locale parity, backend↔frontend validation parity). |
any path under backend/ or engines/ | af-java-reviewer — CLAUDE.md backend rules + the backend/engine pattern checklists. |
any path under frontend/ or e2e/ | af-frontend-reviewer — the frontend non-negotiables + the frontend/e2e pattern checklists. |
any path under docs/ or website/, or README.md | af-content-reviewer — the prose a human actually reads: claims checked against the content-source map, readability, and the SEO surface the website tests do not cover (title/description wording, alt and anchor text, JSON-LD semantics, and whether the three modified dates are actually current rather than merely agreed). |
Merging the reports: collate all findings into one set. If two reviewers report the same
path:line defect, keep the specialist's version and drop the duplicate. On a docs/, website/,
or README.md line the two can both claim, split it by question: af-content-reviewer owns
is what was written accurate, readable, and findable; af-reviewer owns was the update made at
all — only it sees the code half that should have forced one. The overall verdict is the strictest
returned (revise > approve-with-concerns > approve).
This gate reports; it does not block. Do not silently act on the merged findings and move on, and do not silently ignore them either:
- Fix anything you agree is a genuine Blocker.
- For anything you disagree with, say so explicitly with your reasoning — a reviewer finding can be wrong, and a wrong Blocker acted on blindly is worse than no review.
- Surface the surviving Concerns to the user, and put them in the PR description under Review notes, attributing each to its reviewer, so they are visible to a human reviewer rather than lost.
If no reviewer returns a Blocker, say that plainly — an empty review is a real result.
5c. Capture UI screenshots (frontend changes only)
A human reviewer should be able to see the UI change without booting the stack. When the diff
touches anything under frontend/src/ that renders — pages, components, layouts, locales, theme —
capture screenshots of every new or visibly changed screen for the PR body. Skip this step for
test-only, types-only, or tooling-only frontend changes, and write "No UI change — no screenshots"
in the PR body instead.
- Stack: reuse the e2e stack from step 5 (
cd e2e && npm run stack:up) — frontend on:5173, seeded admine2e@accessflow.test/E2ePassword!123. Watch for the known 5173 / 8080 port collisions (see thedev-stackskill). - Script: write a throwaway Playwright script in the session scratchpad — never commit it —
and run it with
npx -y tsx <script>frome2e/, so it can importe2e/helpers/*for login and data seeding. Model it one2e/screenshots/capture.ts: headless Chromium, 1440×900 viewport, light theme set through theaf-preferenceslocalStorage key. Do not add the captures tocapture.tsorwebsite/images/docs/— that belongs to release prep. - What to capture: each new or visibly changed route with realistic seeded data (no empty tables unless the empty state is the change), plus any new modal, drawer, or tab, and new empty or error states. Add a dark-theme shot only when the change touches theming.
- Output: save the PNGs to
<scratchpad>/pr-screenshots/<issue>/NN-<slug>.png.Readeach image before using it, and re-capture any that shows a login page, a spinner, or an error toast instead of the intended screen.
6. Commit and PR
- Imperative subject ≤ 72 chars, prefixed by issue:
feat(AF-58): auto-reject queries past approval_timeout_hours(match recent history withgit log --oneline -n 5). - PR title mirrors the subject; PR body links the issue (
Closes #<n>) and lists doc files updated. - Open with
gh pr createper the harness's PR template. - Screenshots (when step 5c produced any):
- Pre-flight:
gh pr create --help | grep -q -- '--attach'. If the flag is missing, the installedghis too old. Stop and ask the user to upgrade it (e.g.brew upgrade gh). Do not open the PR without the screenshots. - Write the body to a scratchpad file with a
## Screenshotssection that references each PNG by its absolute local path, with a caption:. - Create the PR with one
--attachper image:gh pr create --title "…" --body-file <body.md> --attach '<png>#<alt text>' --attach ….ghuploads each file and replaces the matching local path in the body with the hosted URL, so pass--attachexactly the path the body references (unreferenced attachments are appended to the end of the body). Up to 50 files per command. - Check the result with
gh pr view --json body. No local path may remain; every image should be agithub.com/user-attachments/…URL.
- To add or refresh screenshots on an existing PR, use
gh pr edit <n> --body-file … --attach …(without--body-file,gh pr editkeeps the current body and appends the images).
- Pre-flight:
Definition of done
- Issue fetched and acceptance criteria extracted.
- All relevant
docs/*.mdupdated in the same commit set. README.mdupdated if the change affects setup, tech stack, features, project structure, or top-level docs.website/index.htmlupdated if the change affects the pitch, supported databases, AI providers, auth methods, features, roadmap, quick-start, docs chapter list, tech stack, or top-level URLs.website/docs/index.htmlupdated if the change affects deployment instructions, configuration entities, the RBAC role matrix, or operator-facing env vars.website/README.mdcontent-source map updated if new website sections were added.- Backend:
mvn verifygreen, includingApplicationModulesTestand JaCoCo gate. - Frontend: lint + typecheck +
test:coverage+ build all green. e2e/tests/updated to match: existing specs still pass against the change, and new user-facing flows (route, auth path, user-driven mutation) have a new spec — or the PR description states explicitly why one wasn't added. Specs ran locally vianpm run stack:up && npm testwhen the change touched frontend or auth/setup/proxy backend code.- New concrete classes / pure modules have their own test files (coverage parity rule).
af-verifier,af-reviewer, and the path-matched specialists (af-java-reviewerfor backend/engines,af-frontend-reviewerfor frontend/e2e,af-content-reviewerfor docs/website/README) ran concurrently; every Blocker from any report was fixed or explicitly rebutted with reasoning, and surviving Concerns are in the PR description under Review notes.- Frontend UI change → the PR body has a
## Screenshotssection with an uploaded image of each new or changed screen (or says why there are none). - PR opened, links the issue, and lists touched docs and website files in the description.
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
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.

