/fff:ci-gatesfrom fff
Generates GitHub Actions workflow templates for FFFlow projects that run level-aware quality gates (structure, correctness, coverage, maintainability) as PR checks.
Ships in fff. 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.
Provide CI workflow templates that run FFFlow's keep-honest checks as PR gates. The workflow is level-aware: more checks engage at higher levels.
At every level, the workflow invokes /audit --ci to run the active auditors and produce machine-readable output GitHub Actions can act on.
stack-init invokes this when scaffolding CI..ffflow/config.yaml — level, stack.--workflow-file <path> to override default .github/workflows/ffflow-ci.yml..github/workflows/ffflow-ci.yml written or updated.gh repo edit settings).Four gates, but only the ones active at the project's level run.
| Gate | What it checks | Active at level |
|---|---|---|
| 1. Structure | lint, format, typecheck, spec-code traceability | L0+ |
| 2. Correctness | unit tests, spec tests (if L2+) | L0+ |
| 3. Coverage | unit coverage threshold, spec coverage at L2+ | L0+ |
| 4. Maintainability | complexity budgets, mutation tests (L3) | L1+ |
/audit decides which auditors run per level; CI just orchestrates the gates.
.github/workflows/ffflow-ci.yml:
name: FFFlow CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
gate-1-structure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with: { version: 9 }
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- name: Format check
run: pnpm prettier --check .
- name: Lint
run: pnpm eslint . --max-warnings 0
- name: Typecheck
run: pnpm tsc --noEmit
gate-2-correctness:
needs: gate-1-structure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with: { version: 9 }
- uses: actions/setup-node@v4
with: { node-version: '20', cache: 'pnpm' }
- run: pnpm install --frozen-lockfile
- name: Unit tests
run: pnpm vitest run tests --reporter=junit --outputFile=unit-results.xml
- uses: actions/upload-artifact@v4
if: always()
with: { name: test-results, path: '*-results.xml' }
gate-3-coverage:
needs: gate-2-correctness
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with: { version: 9 }
- uses: actions/setup-node@v4
with: { node-version: '20', cache: 'pnpm' }
- run: pnpm install --frozen-lockfile
- name: Unit coverage
run: pnpm vitest run tests --coverage --coverage.lines=95
- uses: actions/upload-artifact@v4
if: always()
with: { name: coverage, path: coverage/ }
gate-4-maintainability:
needs: gate-3-coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with: { version: 9 }
- uses: actions/setup-node@v4
with: { node-version: '20', cache: 'pnpm' }
- run: pnpm install --frozen-lockfile
- name: FFFlow audits
run: pnpm dlx claude-code --ci /audit --ci > audit-report.json
- uses: actions/upload-artifact@v4
if: always()
with: { name: audit-report, path: audit-report.json }
Add spec tests + spec coverage to gates 2 and 3:
- name: Spec tests
run: pnpm vitest run specs --reporter=junit --outputFile=spec-results.xml
- name: Spec coverage
run: pnpm vitest run specs --coverage --coverage.lines=80
typescript-ui)When the stack includes typescript-ui, add component/interaction tests and the view-layer-purity audit to the PR gates (L2+). Storybook builds are cacheable; test-storybook runs against the built stories.
- name: Build design tokens
run: just tokens
- name: Build Storybook
run: just build-storybook
- name: Component + interaction tests
run: just test-stories # vitest browser mode + storybook-test-runner
- name: View-layer purity audit
run: /fff:audit --type ui --ci # story presence, dependency rule, token conformance,
# no unproven app import; blocking at L2/L3
At L3, add just test-visual (visual regression against the built story set) if the project opted into it.
Add mutation testing to gate 4 on a schedule (see justfile for the cadence rule — mutate is not in check-all; runs weekly here):
mutation-weekly:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
steps:
- uses: actions/checkout@v4
- run: pnpm install --frozen-lockfile
- name: Stryker
run: pnpm stryker run
- name: specdrive audit (RID)
run: pnpm specdrive audit
And in the workflow trigger:
on:
schedule:
- cron: '0 6 * * 1' # Mondays 06:00 UTC
Same structure; replace steps:
| Gate | TypeScript | Python |
|---|---|---|
| 1 | pnpm prettier --check + pnpm eslint + pnpm tsc --noEmit | uv run ruff format --check + uv run ruff check + uv run mypy src |
| 2 | pnpm vitest run tests | uv run pytest tests |
| 3 | pnpm vitest --coverage | uv run pytest --cov |
| 4 (L3 weekly, mutation) | pnpm stryker run | uv run mutmut run |
| 4 (L3 weekly, RID audit) | pnpm specdrive audit | npx specdrive audit |
The RID-audit step is the same tool on both — specdrive is a language-agnostic CLI run via npm. On a Python (or Java/Rust) project the weekly L3 job needs a Node setup step so npx specdrive resolves:
mutation-weekly: # Python L3 weekly job
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- uses: actions/setup-node@v4 # needed for npx specdrive
with: { node-version: '20' }
- run: uv sync
- name: mutmut
run: uv run mutmut run
- name: specdrive audit (RID)
run: npx specdrive audit
Require all gate jobs to pass on main. Tell the user to apply via GitHub UI or:
gh api -X PUT repos/<org>/<repo>/branches/main/protection \
-f required_status_checks='{"strict":true,"contexts":["gate-1-structure","gate-2-correctness","gate-3-coverage","gate-4-maintainability"]}'
Don't run this automatically. Branch protection is a permissions-sensitive change.
ffflow-ci.yml. Offers diff against the level-appropriate template; user confirms.audit --ci invocation lets new auditors join the gate without editing the workflow each time.low severity audit findings. Default the gate to medium or higher.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub zerotechdebt/ffflow --plugin fff38 skills in this plugin
/adopt-ffflowEnd-to-end onboarding for a new FFFlow project. Runs init-ffflow, stack-init, then hands off to plan-roadmap to phase out the work (greenfield or brownfield — roadmap figures out the right per-phase entry point). Use `--ui` to adopt FFFlow's view-layer-purity structure (the frontend sibling of hexagonal) on an already-adopted project./auditRun the FFFlow keep-honest auditors against this project. Coordinator with per-type cartridges (CLAUDE.md freshness, spec drift, characterization tests, architecture conformance, complexity/refactor signals, and L3 RID traceability). Use --type to target one; --plan to convert findings into work./autopilotMeta-skill that wraps any interactive skill for unattended execution. Reads project context to stand in for the user on routine decisions, with a decision log./characterizeFor an unspec'd codebase, walk it module-by-module to extract an evergreen spec (committed immediately) and produce a plan for characterization-test backfill./component-driven-uiView-layer purity — presentational vs. connected components, the atoms→molecules→organisms→layouts ladder, story-as-vignette doctrine, design tokens, and the decompose→story→test→integrate ordering. The frontend sibling of hexagonal-architecture. L1+ reference rulebook./contract-enforcementMocks must be anchored to verifiable contracts — typed mocks against ports, adapter tests on the same interface, OpenAPI schema generation, consumer-driven contracts. L2+ reference rulebook.