Plan (QRSPI Step 7)
PRECONDITION: Invoke qrspi:using-qrspi skill to ensure global pipeline rules are in context. (Idempotent on session re-entry. Subagents are exempt — SUBAGENT-STOP in using-qrspi handles that.)
Announce at start: "I'm using the QRSPI Plan skill to create detailed task specs."
Overview
Break the structure into ordered, self-contained tasks following vertical slices and phases from the design. Each task spec includes exact file paths, descriptions, test expectations, dependencies, and LOC estimates. Large plans (6+ tasks) fan per-task specs out to sub-subagents.
Plan OWNS / Plan DEFERS
This section is the single source of truth for plan.md scope boundaries. It is the locked rule set the scope-reviewer dispatch loads at review time (Read by the qrspi-plan-scope-reviewer agent at runtime per its rules-loading procedure). Boundary-drift findings, scope-compliance findings, and lexical-leakage checks all run against the enumerated items here.
Length target. plan.md aggregate length sits in the 1000–2000 lines soft window once all task specs are appended for review (the Keeplii corpus averages ~52 lines per task spec; a 10-20-task phase lands inside this band). Per-task specs are intentionally short — terse bullets, no narrative preamble, no design rationale repetition. The aggregate band is a soft target, not a ceiling: reviewers should flag a plan that drifts well outside it (e.g., 200 lines for 10 tasks signals under-specification; 4000 lines signals task specs that have grown into design or implementation prose).
INVEST Negotiable framing. A plan task spec is a conversation, not a contract. Plan owns the scoping decisions and the test expectations; downstream skills (Structure, Implement, Implement-TDD) own the implementation choices that flow from those decisions. The DEFERS list below is the operational form of "Negotiable": the items deferred to later artifacts MUST stay out of plan.md — encoding a function signature or a line-by-line algorithm in a task spec turns the spec into a contract, forecloses Structure/Implement's negotiation room, and is grounds for a scope finding from the scope-reviewer.
Plan OWNS
The plan.md artifact is the only authoring location for these concerns. Every paragraph or bulleted item in plan.md must trace to one of these:
- Ordered task specs — the per-phase ordered list of tasks, each implementing exactly one observable behavior (one request handler, one use case, one user-visible change).
- Test expectations in plain language per task — behaviors, inputs/outputs, edge cases, error conditions. Plain language only; not assertion code, not
expect(...)strings. - Dependencies — explicit task-to-task ordering (
Task 3 depends on Task 1, Task 2orDependencies: none). Forward dependencies are forbidden. - LOC estimates per task —
~Nper task; the policy ceiling is 200 LOC and the target is ~100 LOC; see Task Sizing for the splitting protocol.
Plan DEFERS
The following concerns are explicitly out of plan.md scope. Each DEFERS entry names the destination artifact that owns the concern. A finding that observes any of these in plan.md is a boundary-drift finding (change_type: scope); per the INVEST Negotiable framing above, the spec's job is to set the conversation, not pre-empt the downstream skill's negotiation.
- Function signatures, type definitions, parameter shapes →
structure.md(interface contracts per file are Structure's OWNS, not Plan's). Conversation, not contract: Plan says "rate limiter middleware exposes a single Express handler"; Structure saysrateLimiter(req, res, next). - Full assertion text /
expect(...)/ test code → Implement-TDD (Implement's TDD cycle authors the failing test first). Conversation, not contract: Plan says "returns 429 when client exceeds 100 requests/minute"; Implement-TDD writesexpect(res.statusCode).toBe(429). - Line-by-line logic, control-flow detail, algorithm pseudocode → Implement (the implementation agent owns local logic decisions inside the task's bounded scope). Conversation, not contract: Plan says "increment Redis counter on each allowed request"; Implement chooses
INCRvs.EVALwith a Lua script. - Architecture decisions, key trade-offs, system diagrams →
design.md(locked upstream; Plan consumes, does not re-author). - Phasing, vertical slice authoring, roadmap maintenance, replan-gate criteria →
phasing.md/ Phasing skill. Plan consumes phase boundaries from Phasing; it does not re-decide them.
Boundary-drift signals (lexical leakage)
The following lexical patterns in plan.md indicate boundary drift from a later pipeline stage and trigger a boundary-drift finding from the scope-reviewer:
- Function signatures inline in a task spec (parenthesized parameter lists, return-type arrows) — Structure-layer leak.
expect(,assert.,assertEqual,toBe(in a Test Expectations bullet — Implement-TDD-layer leak.if/else,for,while, line-numbered logic walkthroughs — Implement-layer leak.- "trade-off", "we considered", "alternative approach" in task description — Design-layer leak.
- "phase 2 will...", "future phases", roadmap-style forward references — Phasing-layer leak.
Upstream-contract deferrals (apply-fix discipline)
A reviewer finding (most often from silent-failure, security, or coverage reviewers) can ask plan.md to add a contract direction — fail-loud, validate, halt-on-X — that contradicts an approved upstream deferral in design.md or structure.md. The plan apply-fix MUST NOT self-apply such a finding. Two valid responses:
- Defer. Record an Author Note on the affected task naming the reviewer finding ID, the upstream artifact + clause that owns the opposite-direction contract, and that re-opening the decision is a Design/Structure-phase amendment, not a plan-side workaround.
- Block. Mark the task
status: BLOCKED-on-design-amendmentand surface the upstream amendment as a separate fix-pass before plan can converge.
Signal phrases in upstream that flag a deferral fall into two grep-discipline classes:
- Narrow direction phrases (single match anywhere): "exits 0", "does not validate", "silent on no input", "fail-soft", "swallow", "log and continue", "warning only", "best-effort", "graceful fallback", "no-op on", "silently ignore", "non-fatal", "continues past".
- Broad deferral phrases (require clause proximity to the cited contract surface): "edge case", "can land later if it matters", "defer", "TBD", "stricter validation can land later". A match elsewhere in the artifact is noise; a match in the same paragraph/bullet/named-clause as the contract surface the finding cites is signal.
Apply-fix greps these in design.md/structure.md before applying any contract-direction change.
Default on grep-miss: DEFER, not apply. When the upstream grep finds nothing matching either the opposite direction or a clause-proximal deferral phrase, the upstream is ambiguous. The asymmetric blast radius — self-applied contract reversal silently corrupts approved design; a deferred direct-fix produces one extra round — makes DEFER the safe default. Never apply a contract-direction change on a first-round grep-miss.
Artifact Gating
Read config.md to determine pipeline mode. If config.md doesn't exist or has no route field, refuse to proceed and tell the user to re-run Goals. The route field is authoritative; pipeline is informational (see using-qrspi Config File).
Full pipeline (pipeline: full) — required inputs:
goals.md—status: approvedresearch/summary.md—status: approveddesign.md—status: approvedstructure.md—status: approvedphasing.md—status: approved
Quick fix (pipeline: quick) — required inputs: goals.md, research/summary.md — each status: approved. Design and Structure don't exist on quick.
If any required artifact is missing or not approved, refuse to run and name the missing artifact. Read config.md to determine whether Codex reviews are enabled.
Config Validation
Apply the Config Validation Procedure in using-qrspi/SKILL.md. Plan validates pipeline, route, second_reviewer, and (when pipeline: quick) question_budget.
<HARD-GATE>
Do NOT produce plan.md without all required artifacts approved (full: goals + research + design + structure; quick: goals + research).
Do NOT use placeholder content in task specs: no TBD, TODO, "similar to Task N", "add appropriate handling".
Every task spec must be self-contained — an implementation agent reading only that task must have everything it needs.
</HARD-GATE>
Execution Model
Subagent produces plan.md overview. For large plans (6+ tasks), per-task specs farm out to sub-subagents (one per task) to keep context manageable. Iterative with human feedback.
Phase-Scoped Content Rules
plan.md contains ONLY current-phase tasks. Each task must reference goal IDs that exist in goals.md. Tasks for goals not in the current phase must not appear. The goal_ids frontmatter list (e.g. [G1, G2] — see ID-Hygiene Contract below) must contain only IDs in goals.md.
Task Sizing
Each task implements exactly one observable behavior — one request handler, one use case, one user-visible change. The task title names exactly one feature, with no + joining feature names and no two distinct verbs joined by and.
LOC budget per task: Target ~100 LOC (matches OpenAI AGENTS.md). Policy ceiling 200 LOC — split unless sizing_exception (post-split frontmatter) or Sizing exception bullet (in-plan) names one of: schema migration, CI scaffolding, reusable primitives.
"LOC" = implementation source only (across files in Target files: excluding tests/). Test code has no ceiling but should be roughly 1.5–2× impl LOC. 100 src + 250 test = fine; 250 src needs sizing_exception or split.
Why: SWE-Bench Pro reports median patch 107 LOC / 4.1 files at ~23% frontier-model success (GPT-5, Opus 4.1). OpenAI AGENTS.md targets ~100 lines per agentic task. Our 200-LOC ceiling sits at the lower bound of Cisco/SmartBear's code-review sweet spot with margin for QRSPI scaffolding. Multi-feature titles like auth + allowlist + rename + admin are the visible symptom; the cause is bundling N request handlers into one task, re-coupling slices that vertical-slice decomposition exists to separate.
Splitting protocol. A task >200 LOC splits into N tasks at or below ~100 LOC, each implementing one handler with explicit dependency ordering. Closed exception set: schema migration, CI scaffolding, reusable primitives. Mark sizing_exception: <reason> (frontmatter, post-split) or Sizing exception bullet (in-plan), and explain in Description.
Floor — a task is too small if any hold:
- Does not traverse the layers needed for its behavior (UI-only, schema-only, mock-only, test-only)
- Produces no observable behavior change when merged alone (pure refactor with no callers, scaffold with no consumer)
- Depends on a sibling task to compile or pass tests
- Cannot be merged to main alone (must batch with peers to ship)
Failing a floor check → merge into the parent task that gives it observable behavior; do not ship sub-atomic tasks.
Schema-Migration Task Shape
A schema-migration task applies an identical mechanical change to N files of the same shape (e.g., deleting one frontmatter key from every agent file). This is the narrow exception to the LOC ceiling and file-count guidance. The full contract — eligibility, the mandatory sizing_exception: schema-migration + sizing_rationale: + structural_lint: trio, the script-path ERE, the diff-must-be-non-empty rule, and the six plan-spec defect conditions — lives in references/schema-migration-task-shape.md. Read that reference whenever authoring or reviewing such a task. The plan reviewer (agents/qrspi-plan-reviewer.md § Schema-migration exception review) enforces the same six defects.
Multi-Actor Flow Check
Multi-Actor Flow Check
Before authoring any deliverable that operationalizes a design decision involving two or more actors — where "actor" means anything that performs an operation and hands off to another: scripts, subagents, orchestrators, tools, services, protocol participants, object-call participants, workflow steps, queue producers/consumers, function callers/callees — verify that the design specifies all six choreography elements:
- Actor inventory — every participant named, with its role.
- Sequence of operations — ordered list of who-does-what; parallelism boundaries explicit.
- Per-step inputs and outputs — what each actor receives and produces at each step; where outputs are written (stdout, file path, return value, manifest entry, message).
- Consumer identification — for every output, who reads it next. Outputs with no named consumer must be removed or the consumer surfaced.
- Loud-failure paths — what happens when each step fails; where the failure surfaces; which actor catches it. Silent fallback is never the answer.
- Context-cost call-out — for any flow that crosses a context boundary (orchestrator/subagent, process, network), explicitly state what crosses vs. what stays on disk or in the other context.
If any element is missing for an in-scope decision, STOP authoring against this decision and surface a concrete diagnostic to the user. Do NOT guess the missing hand-off and continue.
Diagnostic template:
Design decision X enumerates actors A, B, C but does not specify [missing element — e.g., "what happens if B produces no output", "how A invokes B", "who reads C's output"].
Stopping before guessing.
Recommended path: trigger the Backward Loops procedure (see
using-qrspi/SKILL.md§ Backward Loops) to re-open Design via its per-decision dialogue, lock the missing element, re-review + re-approvedesign.md, then cascade forward — every dependent artifact from Design onward (Phasing if phase boundaries are affected, Structure, Plan, Parallelize if task dependencies are affected) re-runs against the updated design.
Alternative: provide explicit guidance to accept the gap with a documented assumption recorded against this decision in the deliverable. The assumption becomes the de-facto contract — name what you are choosing for the missing element.
Iron law: silently inventing a missing hand-off is a contract violation that ships half-finished features which only surface at Test or in production. Guessing-instead-of-stopping is a process failure and must be reported even if the deliverable otherwise looks complete.
Process
Plan Overview Subagent
Inputs: goals.md, research/summary.md, design.md, structure.md, prior feedback files.
Task: Break the structure into ordered tasks following vertical slices and phases.
- Pre-fanout absorption-map gate. Before drafting any per-task spec, run
scripts/design-absorption-markers.sh <design-path>and ingest the absorbed-goal redirect map (<absorbed-ID> → <absorbing-ID|"no-task">). For any goal ID present in the map, DO NOT draft a standalone task; if the original intent surfaces residual work that genuinely needs implementation, attach it to the absorbing CD's task scope, NOT to a new "post-<absorbing-ID> cleanup" wrapper task. If residual work genuinely fits nowhere in the surviving goal/CD set, halt with BLOCKED and surface the case to the user instead of manufacturing a task home. - Break structure into ordered tasks following vertical slices and phases from
design.md. - Each task spec includes: exact file paths to create/modify; description; test expectations in plain language (behaviors, inputs/outputs, edge cases, error conditions); dependencies; LOC estimate.
- No placeholders, no TBDs, no "similar to Task N" — each spec is self-contained.
PRECONDITION: skills/_shared/prompt-prose-detection.md, skills/_shared/prompt-prose-writer-addition.md, and skills/_shared/prompt-prose-test-expectations-clause.md MUST exist on disk; halt with a named diagnostic if any is missing rather than proceeding with empty include content.
Prompt prose is text authored to be loaded into an LLM's context as instructions, system prompts, agent definitions, skill definitions, reviewer rubrics, MCP tool descriptions, RAG instructions, or any equivalent LLM-consumable directive content.
Detection rule (universal). Use content semantics, not just file path or extension, as the determining signal. Ask: is the text intended to be loaded into an LLM's context at runtime as instructions? If yes, it is prompt prose, regardless of where it lives in the repo.
Path and extension as secondary signals (fast-path shortcut for qrspi-plus-internal authoring). When ALL target files match one of these globs, classify as prompt prose without further inspection:
skills/**/SKILL.mdskills/**/*.md(snippet files under a skill directory)agents/*.mdAGENTS.mdCLAUDE.md
Files outside these globs require the content-semantic test above. Other projects may carry prompts in prompts/, src/llm-instructions/, or custom layouts — the content-semantic test is universal; the glob list is qrspi-plus-internal convenience only.
Examples of prompt prose:
- A SKILL.md body that instructs an orchestrator.
- An
agents/*.mdfile defining a subagent (role, task, constraints, tools). - A
.mdfile under a project'sprompts/directory whose frontmatterdescription:indicates LLM consumption. - A verbatim system prompt embedded in any markdown file (e.g., "You are...", "Your role is...",
<HARD-GATE>blocks). - A
.txtor.jsonfile whose content is plainly an LLM instruction payload.
Examples of NOT prompt prose:
- Code documentation, README files describing features.
- Design decisions in prose form (unless a
<!-- prose-design: ... -->marker indicates a verbatim prompt-prose block within). - Research notes ABOUT prompts (this file itself is a meta-document — it IS subject to the rules per meta-acceptance, but ordinary research/explanatory content about prompts is not).
- Configuration files, test fixtures, shell scripts.
Rules file. When prompt-prose authoring or review applies, the rules live at skills/_shared/prompt-design-rules.md (resolved from the installed plugin path per host convention).
Writer-side application. When authoring or planning a deliverable, apply the detection above to the planned target content (or sub-block, for blocks within larger documents like design.md). If the target IS prompt prose, Read skills/_shared/prompt-design-rules.md (resolved from the installed plugin path per host convention) and apply R1-R7 + cross-cutting principles BEFORE drafting, not as post-write polish. The rules shape what to write; patching after the fact is a known anti-pattern. If the Read fails, do NOT proceed with authoring. Surface the error and stop.
If the target is NOT prompt prose (ordinary documentation, configuration, code, non-prompt prose), do NOT Read the rules file. Reading-without-applying is the verbosity-bias anti-pattern the rules themselves warn against — loading them into context for a deliverable they don't apply to wastes context and risks misapplication.
Test-Expectations clause for prompt-prose tasks. For tasks classified task_type: lightweight because the deliverable IS prompt prose (per the detection include above), Test Expectations cannot be RED-gate failing tests — prompt prose has no executable behavior to verify by test execution. Instead, encode rules-application as the verification mechanism using this template:
Implementer applies R1-R7 + cross-cutting principles from
skills/_shared/prompt-design-rules.md(resolved from the installed plugin path per host convention); reviewer (qrspi-code-quality-reviewerand/orqrspi-design-reviewerper surface in scope) verifies via the same content-semantic rules application; specific findings to verify: [task-specific list of R-rules or principles the deliverable must satisfy].
Other lightweight task categories (non-prompt prose, ordinary documentation, configuration) keep their existing Test-Expectations shape (presence / well-formedness / observable-behavior assertions as appropriate); only prompt-prose tasks carry the rules-application clause.
Small plans (<6 tasks): overview subagent writes the full merged plan.md directly. Large plans (6+): overview subagent writes plan.md overview only; per-task specs dispatch to sub-subagents — one per task. The fan-out shape is load-bearing for per-spec focus; a single merged-author subagent optimizes for cross-spec consistency over per-spec depth and drops edge cases.
Quick-Fix Plan Behavior
When config.md has pipeline: quick: the plan subagent receives goals.md + research/summary.md only (no design/structure) and produces a single-task plan directly — no sub-subagent dispatch, no merge/split lifecycle. The task spec derives file paths and test expectations from research findings and goals; merged plan.md carries both overview and the single spec. After approval, the task writes to tasks/task-01.md and plan.md reduces to overview-only. Review round, human gate, and approval process are identical to full pipeline.
Sub-Subagent Dispatch (Large Plans Only)
Compaction checkpoint: pre-fanout. Per-task spec-generation fan-out — one subagent per task. The orchestrator's post-fanout merge re-aggregates output into plan.md; that re-aggregation is where context saturation bites. See using-qrspi ## Compaction Checkpoints.
Call TaskCreate({ subject: "Recommend /compact (pre-fanout) — plan", description: "per-task spec fan-out merges into plan.md; user decides /compact." }).
Sub-subagent inputs: plan.md overview; relevant structure.md sections; design.md (for per-goal Acceptance blocks + vertical-slice context); skills/plan/owns-defers.md (the layer-depth clamp — without it, sub-subagents drift into Implement/Structure scope: algorithm pseudocode, regex grammar, literal-value hard-coding, line-numbered citations, exact @test counts, shebang/file-mode specifics); the three skills/_shared/prompt-prose-* shared files included at Plan Overview Subagent above (re-checked at dispatch; same PRECONDITION).
Each sub-subagent writes tasks/task-NN.md — and ONLY that file. Sub-subagents MUST NOT create or modify any implementation file (script, test, SKILL.md, agent body, etc.) the task describes; those land in Implement. After all complete, Plan appends each task file as a section to plan.md and deletes the individuals — single document is the only source of truth during review.
Per-Task Classification (`task_type` and `tier`)
Every task spec sets task_type and tier in frontmatter (the per-task model: field is retired by G22 / design.md CD-1). task_type selects the TDD or lightweight implementer dispatch chain; tier is consumed by the Tier Resolution Chain (scripts/_resolve-lib.sh), which maps the tier to a (vendor, model) pair via config.md's model_routing: block — NOT a per-invocation override.
task_type dispatch:
- Absent or
code— TDD path: whentask_type: code(or absent), the test-writer dispatches first, then the implementer, with the RED-verification gate between them. Absenttask_type:defaults to the TDD path identically. Dispatch order: test-writer → RED-verification gate → implementer. lightweight— whentask_type: lightweight, the lightweight-only dispatch fires: no test-writer, no RED gate. Dispatch order: implementer only. Implement dispatchesqrspi-implementer-lightweightdirectly.
TDD-task specs must carry an explicit dispatch-ordering note in ## Description or atop ## Test Expectations:
Dispatch order: test-writer → RED-verification gate → implementer.
Lightweight tasks omit this note.
Step 1 — Classify. Default code. Assign lightweight when the task's primary deliverable is prompt prose OR non-prompt prose / docs / config with no executable behavior to test. Apply the detection in skills/_shared/prompt-prose-detection.md (included at Plan Overview Subagent above; PRECONDITION re-asserted — halt with a named diagnostic if missing). Mixed-deliverable tasks require ALL target files to satisfy the lightweight test; otherwise default to code and split per Goal-Specificity if genuinely mixed. Prompt prose NEVER lands on the TDD path.
Step 2 — tier (run after task_type):
lightweight→tier: low. No exception.code→tier: highif any of:Target filescount > 3; any target matches a core-surface glob (skills/**/SKILL.md,skills/_shared/**,agents/qrspi-implementer*.md,agents/qrspi-implementer-lightweight*.md,skills/reviewer-protocol/**,skills/implementer-protocol/**); fix-task spawned by Replan (fix_task_retry: true); carriessizing_exception.- Otherwise →
tier: medium.
Operator override. tier: is editable before plan approval — the heuristic is a default, not a contract. Absent fields. Plans omitting task_type: and tier: are read by Implement as code with default_tier: from config.md and a one-line warning at dispatch — no hard failure.
Plan Document Structure (During Review)
The template below embeds information-mapping patterns: claim-before-evidence, one-paragraph-per-claim, scannable bullets, required structural slots (Phase / Target files / Dependencies / LOC estimate / Description / Test expectations). No brevity directives — they degrade factual reliability (Phare benchmark, Hakim). Per-task specs are short by structural design.
Evergreen-Output Rule
Any artifact in the QRSPI run directory governed by status: draft → approved frontmatter promotion (goals, design, structure, phasing, plan, parallelization, roadmap, future-goals, and any future artifact adopting this lifecycle) describes the current state of decisions. The reader is a downstream agent or future maintainer.
(Excludes by design: SKILL.md files — skills carry rule rationale legitimately; feedback/*.md — the designated home for dialogue exhaust; reviews/**/*.md — finding rationale; config.md — non-narrative.)
Litmus test (apply to every paragraph before write). Two filters, in order:
- Is the subject the decision (the thing being designed / planned / scoped)? → keep.
- Is the subject the document itself — its drafts, its history, the dialogue that produced it, "us"? → cut.
A sentence that only makes sense as a delta from a prior state is dialogue exhaust — strip it.
Permitted substantive content (do NOT confuse with dialogue exhaust):
- Chosen approach and its rationale (inline)
- Rejected alternatives and tradeoffs, where the artifact template asks for them (e.g., design.md's
## Trade-offs Considered— substantive content about the decision space, not about the document's history) - Rationale embedded inline as one parenthetical when a downstream reader needs it
Named antagonist patterns — strip on sight, substitute as shown:
| Antagonist pattern | Recognize by | Replace with |
|---|---|---|
| Session / drafting notes | "Rule X drafting note," "this collapsed from 3 to 1 because…" | Nothing — delete. If a fact matters, embed inline in the decision. |
| Version-history narration | "earlier draft said X," "previously," "originally," "pre-cleanup" | Nothing — git history holds versions. |
| Inside baseball | text addressed to "us" / "the author," meta-explanation of the document's own structure ("this section is split into A and B because…") | The decision the structure expresses — without the structural explanation. |
| Compaction-loss recovery notes | "this nuance was almost lost during…" | Nothing — if the nuance is needed, the rule itself carries it. |
| Failure-modes-prevented lists | bullets that justify why a rule exists rather than state what to do | Strengthen the rule's wording; delete the justification list. |
Decision-process history (drafts, review rounds, feedback applied, compaction recovery) lives in feedback files, review findings, PR descriptions, and git history — never in the artifact.
---
status: draft
phase_start_commit: null
test_writer_tier: null # optional: low | medium | high. When unset, per-task `tier:` drives co-escalated qrspi-test-writer dispatch (high-tier co-escalates implementer + test-writer per design.md CD-1). Set only to pin test-writer tier independent of per-task tier.
---
# Implementation Plan
## Overview
{Phase structure, task ordering, dependency graph}
## Phase N: {name}
{Tasks in this phase, ordering rationale}
### Phase N Acceptance Criteria
Per-phase criteria observable end-to-end at phase boundary (independent of any single task):
- [ ] {Criterion 1}
- [ ] {Criterion 2}
(Per-task criteria live in each `tasks/task-NN.md`'s `## Test Expectations`; this block captures cross-task observable behavior at phase end.)
---
## Task Specs
### Task 1: {name — one observable behavior; no `+` joining feature names; no two distinct verbs joined by `and`}
- **Phase:** 1
- **Target files:** {exact paths, create/modify}
- **Dependencies:** none
- **LOC estimate:** ~{N}
- **Sizing exception:** {only for legitimate bundles; reason ∈ {schema migration, CI scaffolding, reusable primitives}}
- **Description:** {observable-behavior sentence first, then context. Plain language; no function signatures (→ Structure); no pseudocode (→ Implement); no architecture rationale (→ Design).}
- **Test expectations:**
- {behavior 1 — plain language; no `expect(...)` or assertion code (→ Implement-TDD)}
- {edge case 1}
- {error condition 1}
### Task 2: {name}
...
Per-phase acceptance block authoring. Per-phase criteria trace upstream to goals.md goals but are AUTHORED in plan.md, not goals.md. The block lives directly under each ## Phase N: {name} heading. Downstream consumers (test/SKILL.md, qrspi-plan-spec-reviewer, qrspi-plan-goal-traceability-reviewer) read these to verify end-to-end observable behavior at phase boundary.
Conformance for per-task spec writer. Each spec satisfies: required-section presence; claim-line ≤ 250 chars per bullet; description paragraph ≤ 150 words; section ≤ 300 words before bullets split; no brevity directives ("be concise", "brief summary", "≤ N lines" are forbidden — see lint allowlist for legitimate length-target exceptions). The DEFERS list says what NOT to include; this says how to structure what IS.
Smoke-check requirement. Any task adding or modifying a route, page, layout, or user-facing component MUST include a smoke_checks: block per