From bytheslice
Install the quality line every pie passes through before going on display — wire CI/CD, E2E testing, design-system compliance, and visual-regression gates. Run once before /sell-slice; also invocable standalone on any project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/bytheslice:final-quality-checkThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- skills/final-quality-check/SKILL.md -->
This skill is the orchestrator for the CI/CD baseline. It does not write workflows itself — it dispatches eight specialized agents that each own one slice of the scaffold work. The orchestrator's job is detection, sequencing, user-input gating, and walking the completion checklist.
This skill runs in one of two modes, auto-detected at startup:
docs/plans/00_master_checklist.md at the project root. Adds CI/CD + E2E + design-system-compliance + visual-regression baseline to any project. Runs end-to-end, exits. No checklist coordination.## Prep section. On completion, flip the [ ] Quality line installed row to [x] and surface: "Quality line ready. Next prep step: /open-the-shop."Honor an explicit --standalone or --sequential flag if passed; otherwise auto-detect from disk state.
| File | Purpose |
|---|---|
| references/scaffold-artifact-templates.md | Verbatim file templates for every CI/CD artifact (workflows, husky hook, PR template, regex sweep script, etc.). Every implementer agent reads this before writing. |
| references/prd-ci-cd-checklist.md | Project-wide runtime guardrails, not scaffold-time setup. Master-checklist updates, CI gate alignment, deterministic pipelines, slice-per-PR rule, failure-artifact upload — these apply to every agent on every PR. Sub-block G of Phase 3 appends this content into the project rules file (CLAUDE.md / AGENTS.md) so every later stage skill picks it up automatically. |
Each agent lives in its own file under ./agents/. Read the file before dispatching.
| Phase | Agent file | Model | Effort | Mode |
|---|---|---|---|---|
| 0 | agents/scaffold-discovery.md | haiku | medium | readonly |
| 0 | agents/framework-detector.md | haiku | low | readonly |
| 3A | agents/e2e-installer.md | sonnet | medium | write |
| 3B | agents/workflow-writer.md | sonnet | medium | write |
| 3C | agents/husky-installer.md | haiku | low | write |
| 3E | agents/lint-config-writer.md | haiku | low | write |
| 3F | agents/branch-protection-writer.md | haiku | low | write |
| 4 | agents/local-gates-runner.md | sonnet | medium | write |
The PR template (Phase 3D) is small enough that the orchestrator writes it directly from the templates file — no agent is needed.
main, OR explicit user OK to proceed dirty.gh CLI installed and authenticated (needed for PR + branch protection).pnpm preferred) installed.| State | Action |
|---|---|
| Fully built (every scaffold artifact present and CI green) | Stop. Report "baseline already in place". Recommend /bytheslice:sell-slice for the next slice. |
| Partially built (some artifacts present, others missing) | Run discovery, dispatch only the agents that fill the gaps; never overwrite existing artifacts without surfacing to the user. |
Not yet started (clean repo, no .github/workflows/) | Run the full pipeline end-to-end. |
scaffold-discovery reports already_present_scaffold_artifacts; the orchestrator uses that list to decide which Phase 3 sub-blocks to dispatch.
Dispatch in one batch:
scaffold-discovery — package manager, framework, monorepo tooling, existing workflows, DB presenceframework-detector — E2E framework choice + target appsBefore any write, switch to Plan Mode and ask up to 5 focused questions:
main?@feature, @regression-core, @visual, full)?Always provide a recommended answer in available options.
Wait for answers before continuing.
chore/final-quality-check.main / master.Each sub-block dispatches its agent, waits for the structured return, and commits before moving to the next.
| Block | Agent | What it produces |
|---|---|---|
| A | e2e-installer | Playwright installed, scripts in package.json, baseline @feature/@regression-core/@visual specs, tests/visual/baselines/ |
| B | workflow-writer | .github/workflows/{ci,e2e,e2e-coverage,design-system-compliance,db-schema-drift}.yml |
| C | husky-installer | .husky/pre-push with the canonical gate chain |
| D | (orchestrator direct) | .github/pull_request_template.md from the templates file |
| E | lint-config-writer | eslint-plugin-tailwindcss config additions, .stylelintrc.json, .gitignore updates |
| F | branch-protection-writer | scripts/setup-branch-protection.sh (executable) |
| G | (orchestrator direct) | Project rules file (CLAUDE.md / AGENTS.md) "CI/CD Operational Rules" section populated from references/prd-ci-cd-checklist.md |
After each sub-block A–F, run a spec-compliance + code-quality review pass (reuse sell-slice/agents/spec-reviewer.md and sell-slice/agents/quality-reviewer.md). Fix findings before moving to the next sub-block. Sub-block G is a deterministic file write and does not need a review pass.
The orchestrator (no subagent dispatch — this is a small, deterministic write similar to sub-block D's PR template):
cook-pizzas ran first, the file already exists at CLAUDE.md or AGENTS.md per Q12, with a placeholder section labeled "CI/CD Operational Rules — populated by final-quality-check" written by the rules-assembler agent.references/prd-ci-cd-checklist.md (preserving the [ ] checkbox format verbatim — these are runtime gates the user and every agent walk on every PR, not one-time scaffold checks).cook-pizzas and ran /final-quality-check directly as an escape hatch), append a new section to the project rules file:
<!-- bytheslice: ci-cd-operational-rules-start -->
## CI/CD Operational Rules
These rules govern how master-checklist updates, CI gates, and PR shape interact across every ByTheSlice run. They apply to every agent on every PR — not only to the one-time CI/CD scaffolding.
<!-- contents of references/prd-ci-cd-checklist.md, verbatim -->
<!-- bytheslice: ci-cd-operational-rules-end -->
destructive_operation rather than overwritten silently.CLAUDE.md nor AGENTS.md exists at the project root, create CLAUDE.md with just this section plus a one-line precedence header. Surface to the user that a fuller rules file should ideally be assembled by /cook-pizzas.Dispatch local-gates-runner to run lint, typecheck, design-system check, unit/integration, and all three E2E suites. The first run also generates initial visual baselines.
If any gate fails, fix on the same branch before proceeding. The Husky pre-push hook will enforce these on push automatically.
chore/final-quality-check to remote.git-commit-push-pr / new-branch-and-pr skill if available; otherwise gh pr create. PR description must list every artifact created.main: git checkout main && git pull --ff-only origin main.git branch -d chore/final-quality-check.git push origin --delete chore/final-quality-check.git status is clean on main.scripts/setup-branch-protection.sh to enable required status checks on main.[x].After Phase 6, report:
sell-slice).scripts/setup-branch-protection.sh once to enable required status checks on main.main / master. Always use chore/final-quality-check.[x].type: ci-cd stage by sell-slice, this skill is the entire stage. After completion, mark the stage Completed in docs/plans/00_master_checklist.md../agents/*.md. This SKILL.md is workflow only — never inline subagent prompts here.Follow this skill whenever the user:
/final-quality-check (escape hatch)sell-slice reach a type: ci-cd stage in the master checklist (auto-dispatch)If the repo already has the baseline, stop and recommend /bytheslice:sell-slice instead.
Run this checklist at the end of every run. Do not consider the scaffold "done" until every box is [x].
[ ] .husky/pre-push exists and is executable (includes check:design-system in gate chain).
[ ] .github/pull_request_template.md exists with E2E attestation, design-system-compliance, and visual-diff checklist items.
[ ] .github/workflows/ci.yml exists (full job order: typecheck → lint → design-system-compliance → unit tests → integration tests → @feature → @regression-core → @visual → db-schema-drift if applicable → build).
[ ] .github/workflows/design-system-compliance.yml exists (regex sweep → eslint-plugin-tailwindcss → stylelint).
[ ] .github/workflows/e2e.yml exists (@feature + @regression-core + @visual jobs with artifact upload on failure).
[ ] .github/workflows/e2e-coverage.yml exists (path-diff job named E2E / coverage-check; blocks on unreviewed visual diffs).
[ ] .github/workflows/db-schema-drift.yml exists IF project has DB, is absent if no DB detected.
[ ] scripts/setup-branch-protection.sh exists and is executable (includes all new required checks).
[ ] .eslintrc.json (or equivalent) has eslint-plugin-tailwindcss config additions.
[ ] .stylelintrc.json exists with CSS-file token checks.
[ ] .gitignore excludes playwright-report/, test-results/, .playwright/, and Vizzly diff artifacts.
[ ] Project rules file (CLAUDE.md or AGENTS.md) has a "CI/CD Operational Rules" section populated verbatim from references/prd-ci-cd-checklist.md, delimited by the <!-- bytheslice: ci-cd-operational-rules-{start,end} --> markers, so every later stage skill picks up the runtime guardrails automatically.
[ ] package.json (root) has scripts: test:e2e, test:e2e:feature, test:e2e:regression, test:e2e:visual, check:design-system.
[ ] At least one @feature-tagged smoke spec exists.
[ ] At least one @regression-core-tagged sentinel spec exists.
[ ] Canary @visual tests exist — one per viewport (375 / 768 / 1280 / 1920).
[ ] tests/visual/baselines/ directory is committed (may be empty on first scaffold; Vizzly populates on first run).
[ ] Playwright (or detected E2E framework) is installed and lockfile updated.
[ ] If a monorepo task runner exists (turbo.json / nx.json), the new E2E tasks are wired into it.
[ ] pnpm lint (or detected equivalent) passes.
[ ] pnpm typecheck passes.
[ ] pnpm check:design-system passes.
[ ] pnpm test (unit/integration) passes.
[ ] pnpm test:e2e:feature passes locally.
[ ] pnpm test:e2e:regression passes locally.
[ ] pnpm test:e2e:visual passes locally (baselines generated or confirmed up-to-date).
[ ] Husky pre-push hook fires on push (verify with a dry-run or trial push).
[ ] All work happened on branch chore/final-quality-check — never on main.
[ ] PR opened via git-commit-push-pr / new-branch-and-pr skill or gh pr create.
[ ] PR description lists every artifact created.
[ ] PR is targeted at main and is not draft.
[ ] All required GitHub Actions checks have completed (no pending / queued).
[ ] Every required check is green. No skipped checks counted as passing.
[ ] If any check failed: read failing job logs, patch on chore/final-quality-check, push, repeat until all checks pass.
[ ] Final CI run reflects the latest commit on the PR head, not a stale SHA.
Only after CI is fully green and the PR is merged.
[ ] PR merged into main.
[ ] Local main updated: git checkout main && git pull --ff-only origin main.
[ ] Confirm scaffold commits are present on main (git log --oneline | head).
[ ] Local chore/final-quality-check branch deleted: git branch -d chore/final-quality-check.
[ ] Remote chore/final-quality-check deleted: git push origin --delete chore/final-quality-check (skip if auto-deleted).
[ ] If a worktree was used: git worktree remove <path> and git worktree prune.
[ ] Final git status shows clean tree on main.
[ ] User reminded once to run scripts/setup-branch-protection.sh.
[ ] If invoked as a type: ci-cd stage by sell-slice, docs/plans/00_master_checklist.md row flipped to Completed.
The scaffold is delivered only when:
main with a clean working tree.main.npx claudepluginhub steve-piece/bytheslice --plugin bythesliceCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.