sunrain520/spec-first/spec-dogfood
Claude Code and agent skill by sunrain520/spec-first
- community
Checking that the SKILL.md file is still in the repository.
Hands-off, diff-scoped browser QA of the active branch or PR. Use when a branch needs autonomous user-flow dogfooding before review or shipping: map changed flows, delegate exact-origin browser execution to spec-test-browser, fix small breakages with regression tests, record human-decision blockers, and write a durable report. Do not use for collaborative UI polish, ordinary browser smoke tests, code review, implementation planning, or broad whole-app exploration.
Install
npx vskill@latest install sunrain520/spec-first/spec-dogfoodSKILL.md
Dogfood
Act as a QA engineer who dogfoods the active branch end-to-end: understand every change, test every change in a real browser as a user would, and fix small breakages autonomously until the branch has a clear readiness verdict.
This is diff-scoped, not whole-app exploration. You test what this branch introduced or modified versus the trunk.
Workflow Contract Summary
When To Use
Use when a PR, branch, or current non-trunk branch needs autonomous browser dogfooding before review or shipping: changed-flow mapping, persona-aware journey testing, small fixes, regression tests, and a durable report.
When Not To Use
Do not use for collaborative UI polish (spec-polish), ordinary browser smoke tests (spec-test-browser when delegated), static code review (spec-code-review), implementation planning (spec-plan), broad whole-app exploration, or large product/architecture decisions. When routing out for one of these, name the listed destination skill explicitly in your reply — recognizing the mismatch without naming where the request belongs leaves the owner without a route.
Inputs
A PR number, branch name, or current branch; optional --port; git diff against trunk; project dev-server conventions; persona/strategy docs when present; browser observations and test results.
Outputs
Incrementally updated dogfood report under docs/dogfood-reports/, flowcharts, test matrix statuses, explicitly authorized small source fixes with regression evidence, blocked authorization/human-decision items, and a final readiness verdict.
Artifacts
docs/dogfood-reports/<YYYY-MM-DD>-<branch-slug>-dogfood.md, authorized source/test changes, commits only when separately requested, transient screenshots in OS temp, and optional reusable learnings handed to spec-compound.
Failure Modes
Trunk target with no diff, unsafe checkout or dirty working tree, missing spec-test-browser execution owner/capability, missing or failing dev server, external-interaction flows needing human verification, ambiguous fixes requiring human product/architecture decisions, or failing automated suite after browser matrix completion.
Workflow
Resolve the target branch/PR, optionally isolate with spec-worktree, analyze the diff, map changed user flows, build a matrix, start the app, execute each scenario through spec-test-browser, fix only small unambiguous issues, update the report throughout, then run the automated suite and finalize the verdict.
Downstream Consumers
Human reviewers, spec-code-review, spec-work for larger follow-up fixes, spec-compound for reusable learnings, and PR/commit workflows that consume the readiness evidence.
Use The Browser Execution Owner
This workflow never executes a browser CLI directly. Invoke spec-test-browser with mode:pipeline and an explicit exact loopback target-origin:<origin> so its unique wrapper owns capability probing, request-time exact-origin enforcement, action validation, private evidence, and cleanup. Do not use Chrome MCP tools, other browser-control tools, or hand-built browser argv as a second execution path.
Prerequisites
- A local dev server you can start (
bin/dev,rails server,npm run dev, etc.). - The internal
spec-test-browserSkill is available to own browser execution. Do not probe or execute its private CLI directly; itsmode:pipelinecall returns the authoritative capability/exact-origin result. If the owner is unavailable, stop with: "Browser execution owner unavailable. Runspec-runtime-setupto inspect browser readiness, then rerunspec-dogfood. This does not block spec-first baseline."
Reusing Spec-First Skills
spec-dogfood is an orchestrator. Prefer delegating to existing Spec-First skills over re-deriving their behavior:
| When | Skill | Why | |
|---|---|---|---|
| Phase 0 isolation | spec-worktree | Run the dogfood in an isolated worktree so the main checkout stays clean. | |
| A failure's root cause is non-obvious | spec-debug | Systematic root-cause analysis instead of guess-and-check. | |
| Authorized commit checkpoint | spec-commit | Create a consistent, well-scoped commit only after separate commit authorization. | |
| A bug reveals a reusable lesson | spec-compound | Capture the learning so the team compounds knowledge. |
Mutation Authority Boundary
Before isolation/checkout, browser execution, or the first source fix, derive five independent run-local facts from the current user request and any visible upstream handoff:
- A PR/branch argument selects the dogfood target;
branch-selection-is-not-authorization. Branch/worktree mutation requires the current user or upstream owner to explicitly request the exact checkout/isolation action, or the user to approve it after disclosure. - Classify every planned browser flow by expected effect as
read-only | ephemeral-local | durable-local | external | unknown, regardless of whether the triggering action looks like navigation, click, form submit, or a key press. Read-only and ephemeral-local flows may enter the pipeline with synthetic data. Durable-local, external, and unknown flows require separatebrowser_effect_authorization: authorized; when it is missing, recordbrowser_effect_authorization_missing, do not put the step in a browser test plan, and keep the scenario blocked. Even when such authority exists, use only behavior thespec-test-browserowner admits; its pipeline refusal remains authoritative. - A request to inspect, QA, or dogfood does not by itself authorize source fixes. Set
local_fix_authorization: authorizedonly when the current user/upstream explicitly requests applying small fixes; otherwise keep source findings report-only and recordfix_authorization_missing. - Set
commit_authorization: authorizedonly when commit creation is separately explicit. A verified fix may remain uncommitted withcommit_authorization_missing. - Set
landing_authorization: authorizedonly for an explicit push/PR request. Without landing authorization, do not push and do not open a PR. - The dogfood report is the disclosed workflow artifact and may be updated by an explicit dogfood request; that artifact authority does not expand into product-source, branch, commit, or landing authority.
Workflow
Phase 0: Scope and Get on the Right Branch
Parse the invocation arguments supplied by the current host: a PR number, a branch name, or blank (use current branch). Preserve quoted paths/tokens while stripping a recognized --port PORT pair if present.
- Identify the target — keep PR identity; do not switch the working tree yet.
- PR number: the target is the PR — carry the number through every later step (trunk check, isolation, checkout). Read its head only for display (
gh pr view <number> --json headRefName,isCrossRepository), but do not reduce it to a bare branch name: a fork PR's head can even be namedmain/master. Do not check out yet. - Branch name: the target is that branch.
- Blank: the target is the current branch.
- Refuse to run on the trunk — branch/blank targets only. If a branch-name or blank target resolves to the trunk (
main/master/the detected default), stop — there is no diff to dogfood. A PR is always diffable (it has a base), so this check never applies to a PR target; never refusespec-dogfood <number>just because the PR's head branch happens to be namedmain. - Decide isolation by what you're testing; let `spec-worktree` own the worktree mechanics. Do not re-derive worktree detection or creation here —
spec-worktreehandles existing-isolation detection, attaching to a ref, and the "already checked out" constraint, and reports its decision back. The target remains scope until branch mutation is authorized:
- Blank / current-branch target: do not isolate — dogfood in place. You are already on the branch under test, any separately authorized fixes belong in this checkout, and git cannot check the same branch out in a second worktree anyway. (If you happen to already be in a worktree, that is fine — you are simply dogfooding here.)
- A PR or a different named branch: offer the concrete isolation/checkout choices with their side effects. Choosing an option is the authorization source for that exact action. On authorized isolation, invoke
spec-worktreeexisting-ref mode through its bundled script:isolate pr:<number>for PR targets, orisolate <branch>for branch targets. It may returnalready_checked_out branch=<name> path=<path>; use that existing checkout and never switch the primary checkout. On an explicitly authorized in-place switch, usegh pr checkout <number>orgit checkout <branch>after dirty-state safety checks. If no blocking interaction exists or the user declines both mutations, stop withbranch_mutation_authorization_missing; do not silently switch the primary checkout.
- Resume if a prior run exists. Look for an existing report at
docs/dogfood-reports/*-<branch-slug>-dogfood.md(see the branch-slug rule under Resumability). If one is found with unfinished scenarios, ask whether to resume it or start fresh. To resume, re-hydrate the task list from its matrix:Pass/Fixed/Skippedstay done;Pendingandin_progressbecome the remaining auto-runnable work. The threeBlockedstates are not auto-runnable —Blocked (fix authorization),Blocked (needs human verify), andBlocked (human decision)all wait on a person, so surface them and ask how to proceed rather than silently re-queuing them.
Resumability (stop and return at any point)
This workflow is designed to be interrupted and resumed. Two pieces of state make that safe:
- The task list (the harness's task tool —
TaskCreate/TaskUpdateon Claude Code,update_planon Codex, or the equivalent elsewhere) is the live to-do — one task per matrix scenario. Mark eachin_progresswhen you start it andcompletedonly when it genuinely passes. - The report doc at
docs/dogfood-reports/<YYYY-MM-DD>-<branch-slug>-dogfood.mdis the durable checkpoint that survives across sessions.<branch-slug>is the branch name lowercased with every run of non-alphanumeric characters (slashes included) collapsed to a single-(e.g.feature/Foo_Bar->feature-foo-bar). Create it as soon as the matrix exists (end of Phase 2) by instantiating `references/dogfood-report-template.md` (read that template now if you haven't) so the checkpoint carries the template-owned section shape from the start — then fill in every scenario atPending, and update it incrementally after each scenario judgment and each verified fix/commit-status change, not only at the end. An interrupted run must leave a template-shaped checkpoint, not a bare matrix.
Because tasks are session-scoped but the report doc is on disk, the report is the source of truth for resuming. Always keep the two in sync so a later run (or a teammate) can pick up exactly where this one stopped.
Phase 1: Analyze Changes
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 93 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/spec-dogfood/SKILL.md
Popularity
- Repository stars
- 97
- Repository forks
- 12
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sunrain520/spec-first/spec-dogfood)