plan-tests
Skill26 starsChanged 4 months agoMITView on GitHub
Use when choosing the first failing spec for a Rails change. One minimal example opens the gate. Trigger words: first failing test, what test first, TDD, spec selection.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- danielvm-git/bigpowerstheir own version, first seen Nov 6, 2026
- grooownow/qa-pilottheir own version, first seen Oct 28, 2026
- genkovich/sddtheir own version, first seen Oct 25, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- danielvm-git/bigpowers★ 288same name
- genkovich/sdd★ 187same name
- grooownow/qa-pilot★ 6same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- apply-code-conventionsSkill
- apply-stack-conventionsSkill
- code-reviewSkill
- create-engine-installerSkill
- create-engineSkill
- document-engineSkill
- extract-engineSkill
- generate-api-collectionSkill
- implement-authorizationSkill
- implement-background-jobSkill
- implement-graphqlSkill
- implement-hotwireSkill
- load-contextSkill
- optimize-performanceSkill
- rails-featureSkill
- rails-maintenanceSkill
- rails-reviewSkill
- refactor-codeSkill
- release-engineSkill
- review-architectureSkill
- review-engineSkill
- review-migrationSkill
- security-checkSkill
- seed-databaseSkill
- setup-environmentSkill
- test-engineSkill
- test-serviceSkill
- upgrade-engineSkill
- version-apiSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
Start at the highest-value boundary that proves the behavior with the least unnecessary setup.
- Distinctive: line 51
Write one failing example: Keep it minimal; one example is enough to open the gate.
- Distinctive: line 116
When completing test planning, produce a brief structured summary and populate the full plan using assets/first_slice_template.md.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Plan Tests
Quick Reference
| Change type | First spec | Path | Why |
| API contract, params, status code, JSON shape | Request spec | spec/requests/ | Proves the real HTTP contract |
| Domain rule on a cohesive record or value object | Model spec | spec/models/ | Fast feedback on domain behavior |
| Multi-step orchestration across collaborators | Service spec | spec/services/ | Focuses on the workflow boundary |
| Enqueue/run/retry/discard behavior | Job spec | spec/jobs/ | Captures async semantics directly |
| Critical Turbo/Stimulus or browser-visible flow | System spec | spec/system/ | Use only when browser interaction is the real risk |
| Engine routing, generators, host integration | Engine spec | spec/requests/ or engine path | Normal app specs miss engine wiring — see test-engine |
| Bug fix | Reproduction spec | Where the bug is observed | Proves the fix and prevents regression |
HARD-GATE
CHECKPOINT: Test Design Review
1. Present: Show the failing spec(s) written
2. Ask:
- Does this test cover the right behavior?
- Is the boundary correct (request vs service vs model)?
- Are the most important edge cases represented?
- Is the failure reason correct (feature missing, not setup error)?
3. Confirm: Proceed after the test design meets the accepted requirements and RED is observed.Core Process
Start at the highest-value boundary that proves the behavior with the least unnecessary setup.
Steps
- Name the behavior: State the user-visible outcome or invariant to prove.
- Locate the boundary: Decide where the behavior is observed first — HTTP request, service entry point, model rule, job execution, engine integration, or external adapter. Use the Quick Reference table to map the change type to the right spec type.
- Write one failing example: Keep it minimal; one example is enough to open the gate. List additional cases as follow-up coverage.
- Suggest the path: Name the likely spec path using normal Rails conventions (e.g.
spec/requests/...,spec/services/...,spec/jobs/...,spec/models/...). - Run and validate: Confirm the failure is because the behavior is missing, not because the setup is broken.
- Hand off: Continue with the skill that fits the slice —
write-testsfor general spec writing,test-servicefor service-layer coverage, ortest-enginefor engine integration.
Examples
Good: New JSON Endpoint
# Behavior: POST /orders validates params and returns 201 with JSON payload
# First slice: request spec
# Suggested path: spec/requests/orders/create_spec.rb
RSpec.describe "POST /orders", type: :request do
let(:user) { create(:user) }
let(:valid_params) { { order: { product_id: create(:product).id, quantity: 1 } } }
before { sign_in user }
it "creates an order and returns 201" do
post orders_path, params: valid_params, as: :json
expect(response).to have_http_status(:created)
expect(response.parsed_body["id"]).to be_present
end
endGood: New Orchestration Service
# Behavior: Orders::CreateOrder validates inventory, persists, and enqueues follow-up work
# First slice: service spec
# Suggested path: spec/services/orders/create_order_spec.rb
RSpec.describe Orders::CreateOrder do
subject(:result) { described_class.call(user: user, product: product, quantity: 1) }
let(:user) { create(:user) }
let(:product) { create(:product, stock: 5) }
it "returns a successful result with the new order" do
expect(result).to be_success
expect(result.order).to be_persisted
end
endPitfalls
| Pitfall | What to do |
| Starting with a PORO spec because it is easy | Easy ≠ high-signal — choose the boundary that proves the real behavior |
| Writing three spec types before running any | Pick one slice, run it, prove the failure, then proceed |
| Defaulting to one spec type for everything | Match the spec type to the layer where the real risk lives (HTTP, domain, async, browser) |
| Jumping to system specs too early | Reserve for critical browser flows that lower layers cannot prove |
Extended Resources (Progressive Disclosure)
Load these files only when their specific content is needed:
- assets/first_slice_template.md — Use when documenting the test plan; provides a structured template for behavior, boundary decision, opening gate spec, and follow-up coverage
Output Style
When completing test planning, produce a brief structured summary and populate the full plan using assets/first_slice_template.md. The summary must cover:
- Behavior — user-visible outcome being proved
- First Slice — spec type, file path, and boundary rationale
- Opening Gate — expected RED failure message and confirmation that failure reason is "feature missing, not setup error"
- Follow-up Coverage — bulleted list of additional cases deferred from the initial gate
- Design Checkpoint — confirmation that behavior, boundary, edge cases, and failure reason are all validated
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.

