@ftrdotdev/pi-qrspi 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ftrdotdev/pi-qrspi",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "homepage": "https://github.com/felixnorden/pi-mono/blob/main/packages/qrspi/README.md",
5
5
  "bugs": {
6
6
  "url": "https://github.com/felixnorden/pi-mono/issues"
@@ -0,0 +1,33 @@
1
+ # Planning Workflow
2
+
3
+ Guides structured software planning through reusable templates. Covers design concepts, implementation plans with vertical slices, and agent configuration. Use when starting a new feature, designing a solution before implementation, producing a phased plan for a build agent, or when the user mentions planning, design phase, implementation plan, QRSPI, or vertical slices.
4
+
5
+ ## What it does
6
+
7
+ The skill turns a new feature into a sequence of planning artifacts a build agent can execute without ambiguity. Templates enforce order: design decisions before structure, structure before implementation tasks, and each phase independently verifiable. Implementation plans decompose work into vertical slices, units of change that deliver one complete observable behavior end-to-end.
8
+
9
+ ## What problem it solves
10
+
11
+ Planning without order produces plans that cannot be verified incrementally. The skill enforces one core constraint across all templates: no implementation detail in the design phase, no design decisions in the plan phase, no new behavior in a verification gate. Horizontal slicing, grouping changes by technical layer, is the primary anti-pattern because it produces no working software until the final phase.
12
+
13
+ ## How it is structured
14
+
15
+ ```
16
+ skills/planning-workflow/
17
+ ├── SKILL.md # instructions agents load
18
+ └── templates/
19
+ ├── research.md # research document schema and summary format
20
+ ├── design-concept.md # design phase template
21
+ ├── outline.md # structure outline component schema
22
+ ├── plan.md # implementation plan with vertical slices
23
+ ├── iterate.md # surgical revision workflow
24
+ └── session-summary.md # orchestrated session summary format
25
+ ```
26
+
27
+ ## How to use it
28
+
29
+ Run the skill when starting a new feature, designing a solution before implementation, producing a phased plan for a build agent, or when the user mentions planning, design phase, implementation plan, QRSPI, or vertical slices.
30
+
31
+ A QRSPI session follows the phases Q, R, D, S, P, I, one at a time. Every phase ends at a human checkpoint. An orchestrator runs the session, relays user answers, and previews each artifact. Phase agents load only the current phase's template and write the artifact to .qrspi/<kind>/<slug>.md. Load relevant skills before authoring any Tests First section. A plan requires an approved design concept; if none exists, complete the Design phase first.
32
+
33
+ See SKILL.md for the full agent-facing instructions.
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: planning-workflow
3
- description: Guides structured software planning through reusable templates. Covers design concept authoring, implementation plan authoring with vertical slices, and agent configuration. Use when starting a new feature, designing a solution before implementation, producing a phased plan for a build agent, or when the user mentions planning, design phase, implementation plan, QRSPI, or vertical slices.
3
+ description: Guides structured software planning through reusable templates. Covers design concepts, implementation plans with vertical slices, and agent configuration. Use when starting a new feature, designing a solution before implementation, producing a phased plan for a build agent, or when the user mentions planning, design phase, implementation plan, QRSPI, or vertical slices.
4
4
  ---
5
5
 
6
6
  # Planning Workflow
7
7
 
8
- Planning produces artifacts that a build agent can execute without ambiguity. The templates in this skill enforce the discipline that separates planning from implementation: design decisions are made before structure is committed, structure is committed before implementation is tasked, and each implementation phase is independently verifiable.
8
+ Planning produces artifacts a build agent can execute without ambiguity. The templates enforce order: design decisions before structure, structure before implementation tasks, and each phase independently verifiable.
9
9
 
10
10
  The core constraint across all templates: **no implementation detail in the design phase, no design decisions in the plan phase, no new behavior in a verification gate.**
11
11
 
@@ -13,7 +13,7 @@ The core constraint across all templates: **no implementation detail in the desi
13
13
 
14
14
  ## Vertical Slicing
15
15
 
16
- All implementation plans produced with this skill decompose work into **vertical slices** — units of change that deliver one complete, observable behavior end-to-end, from the outermost interface to the innermost dependency.
16
+ All implementation plans produced with this skill decompose work into **vertical slices**: units of change that deliver one complete, observable behavior end-to-end, from the outermost interface to the innermost dependency.
17
17
 
18
18
  A vertical slice is not a layer (not "implement the database layer"). It is a behavior (e.g., "a user can place an order and receive a confirmation").
19
19
 
@@ -23,18 +23,22 @@ Each slice:
23
23
  - Delivers something demonstrable at its verification gate
24
24
  - Can be deployed or rolled back independently of other slices
25
25
 
26
- **IMPORTANT**: Horizontal slicing — grouping changes by technical layer across multiple behaviors — is the primary anti-pattern. A plan where Phase 1 is "all models", Phase 2 is "all services", Phase 3 is "all controllers" cannot be verified incrementally and produces no working software until the final phase.
26
+ **IMPORTANT**: Horizontal slicing, grouping changes by technical layer across multiple behaviors, is the primary anti-pattern. A plan where Phase 1 is "all models", Phase 2 is "all services", Phase 3 is "all controllers" cannot be verified incrementally and produces no working software until the final phase.
27
27
 
28
- For TDD integration within each slice, load relevant skills before authoring the Tests First section of any phase.
28
+ Load the test-writing skill (test doubles, Arrange/Act/Assert, red-green-refactor) before authoring any Tests First section. If no such skill exists, the Tests First blocks in the plan template are the minimum contract.
29
29
 
30
30
  ---
31
31
 
32
32
  ## Session Structure (Orchestrated)
33
33
 
34
- A QRSPI session runs with one orchestrator and per-phase agents. One phase at a time; every phase ends at a human checkpoint. The orchestrator never drafts artifacts — phase agents do that in fresh contexts, so exploration and drafting stay out of the orchestrator's context.
34
+ A QRSPI session runs with one orchestrator and per-phase agents. One phase at a time; every phase ends at a human checkpoint. The orchestrator never drafts artifacts. Phase agents draft in fresh contexts, keeping exploration and drafting out of the orchestrator's context.
35
35
 
36
36
  **Orchestrator owns**: the Q phase, launching each phase agent, relaying user answers (Design phase), previewing each artifact to the user at its checkpoint, approving or denying advancement, coordinating Iterate, and producing the session summary.
37
37
 
38
+ **Q phase**: runs first, before Research, owned by the orchestrator (the main agent).
39
+
40
+ The orchestrator asks the user the scope questions directly. These answers define the scope goal statement. The design artifact takes its problem statement from the scope goal; the research topic also comes from Q.
41
+
38
42
  **Phase agent owns**: loading the current phase's template, reading the prior artifacts, drafting and writing the artifact to `.qrspi/<kind>/<slug>.md`, and returning the inline summary.
39
43
 
40
44
  **Phase agent rules**:
@@ -42,9 +46,9 @@ A QRSPI session runs with one orchestrator and per-phase agents. One phase at a
42
46
  - Load only the template for the current phase. Do not draft artifacts for other phases.
43
47
  - Do not ask the user questions directly. Return clarifying questions, design options, or unresolved decisions in your final output; the orchestrator relays them.
44
48
  - Convert unresolved ambiguities into explicit assumptions in the artifact (Open Questions / Decisions Required sections) rather than blocking.
45
- - The package extension stamps the `YYYYMMDD-` prefix and the frontmatter on your write; write to `.qrspi/<kind>/<slug>.md` and let it normalize.
49
+ - Write to `.qrspi/<kind>/YYYYMMDD-{slug}.md` and include any frontmatter the template specifies.
46
50
 
47
- **Artifact visibility**: the orchestrator previews each artifact to the user after the phase agent writes it — full content, stamped frontmatter included — using a user-facing preview tool so the artifact never enters the orchestrator's context. Fall back to `read` only if no user-facing preview tool exists. Approving blind is not part of this workflow.
51
+ **Artifact visibility**: the orchestrator previews each artifact to the user after the phase agent writes it, full content and frontmatter included, using a user-facing preview tool so the artifact never enters the orchestrator's context. Fall back to `read` only if no user-facing preview tool exists. Do not approve blind.
48
52
 
49
53
  ---
50
54
 
@@ -74,4 +78,4 @@ P — Plan → templates/plan.md
74
78
  I — Iterate → templates/iterate.md
75
79
  ```
76
80
 
77
- A design concept must exist and be approved before a plan is authored. If the design concept is absent, pause and complete the design phase first.
81
+ A plan requires an approved design concept. If none exists, complete the Design phase first.
@@ -4,18 +4,17 @@
4
4
 
5
5
  **Constraints**:
6
6
 
7
- - Usually 150–250 lines — no hard minimum or maximum; the real constraint is completeness, not length
7
+ - Usually 150–250 lines (no hard cap); the real constraint is completeness, not length
8
8
  - No file paths, no function names, no pseudo-code, no code blocks
9
- - Architecture and boundaries only — no implementation detail
9
+ - Architecture and boundaries only. No implementation detail.
10
10
  - Stop when the solution shape is unambiguous; do not pad
11
- - Status remains `draft` until the orchestrator or user confirms approval
12
11
 
13
12
  ## How to Produce This Document
14
13
 
15
14
  1. Read the research document silently. Do not summarise it back.
16
- 2. Identify what is still ambiguous about the solution shape. Use `question` — maximum 3 questions at once. Do not proceed until ambiguities are resolved.
15
+ 2. Identify what is still ambiguous about the solution shape. Return up to 3 questions in your output for the orchestrator to relay. Do not proceed until the orchestrator returns the answers.
17
16
  3. Present 2–3 distinct design options. For each state: what it optimises for, what it gives up, and which constraints from the scope it satisfies.
18
- 4. Use `question`: "Does this direction feel right, or should we adjust?"
17
+ 4. Return the direction question ("Does this direction feel right, or should we adjust?") for the orchestrator to relay.
19
18
  5. Once direction is agreed, write the document using the schema below.
20
19
  6. Write to `<worktree-root>/.qrspi/designs/YYYYMMDD-{slug}.md`.
21
20
  7. Return the artifact path and a one-paragraph summary of the chosen direction.
@@ -38,7 +37,7 @@
38
37
 
39
38
  ## Problem Statement
40
39
 
41
- {What we are solving, in the engineer's own terms. Taken directly from the scope goal — do not reframe or interpret. 2–4 sentences.}
40
+ {What we are solving, in the engineer's own terms. Taken directly from the scope goal; do not reframe or interpret. 2–4 sentences.}
42
41
 
43
42
  ---
44
43
 
@@ -64,9 +63,9 @@
64
63
 
65
64
  ## Solution Shape
66
65
 
67
- {High-level description of the solution: components, their responsibilities, the boundaries between them, and the primary data or control flow. Written as prose — no code, no file paths.}
66
+ {High-level description of the solution: components, their responsibilities, the boundaries between them, and the primary data or control flow. Written as prose; no code, no file paths.}
68
67
 
69
- {Each paragraph covers one component or one significant boundary. A boundary is a point where ownership or technology changes — between services, between infrastructure and domain logic, between synchronous and asynchronous processing.}
68
+ {Each paragraph covers one component or one significant boundary. A boundary is a point where ownership or technology changes: between services, between infrastructure and domain logic, between synchronous and asynchronous processing.}
70
69
 
71
70
  {End with a statement of the observable outputs: what a user or caller sees when the solution is working correctly.}
72
71
 
@@ -84,7 +83,7 @@
84
83
 
85
84
  ## What This Explicitly Does Not Do
86
85
 
87
- {List behaviors, integrations, or concerns that are out of scope for this solution. Be specific — "no pagination" is better than "limited scope". Each item prevents scope creep during the outline and plan phases.}
86
+ {List behaviors, integrations, or concerns that are out of scope for this solution. Be specific: "no pagination" is better than "limited scope". Each item prevents scope creep during the outline and plan phases.}
88
87
 
89
88
  - {Excluded behavior or concern}
90
89
  - {Excluded behavior or concern}
@@ -93,7 +92,7 @@
93
92
 
94
93
  ## Open Questions for the Outline Phase
95
94
 
96
- {Questions the structure outline must resolve before a plan can be produced. These are structural unknowns — unknowns about component interfaces, sequencing constraints, or external dependencies — not design unknowns. Design unknowns should have been resolved before this document was written.}
95
+ {Structural unknowns the outline must resolve before planning: component interfaces, sequencing constraints, external dependencies. Design is closed.}
97
96
 
98
97
  - {e.g., Does the notification component own its retry logic or delegate to infrastructure?}
99
98
  - {e.g., What is the wire format between the gateway and the processing service?}
@@ -1,13 +1,13 @@
1
1
  # Iterate Template
2
2
 
3
- **Usage**: Used during the QRSPI Iterate (I) phase when an existing plan needs revision. Updates only the affected slices — never regenerates the full plan. Load relevant skills (e.g., TDD or engineering-related topics) alongside this template.
3
+ **Usage**: Used during the QRSPI Iterate (I) phase to revise an existing plan. Updates only the affected slices; never regenerates the full plan. Load the test-writing skill (see the plan template) when you must regenerate a Tests First section.
4
4
 
5
5
  **Constraints**:
6
6
 
7
- - Never regenerate the full plan for a partial change — surgical edits only
7
+ - Never regenerate the full plan for a partial change; make surgical edits only
8
8
  - If the feedback requires a new slice, add it; do not repurpose an existing slice to absorb new behavior
9
- - Re-verify any Quality Gate for all modified slices before saving
10
- - If two or more rounds of iteration have been applied to the same slice, flag it: repeated revision signals a design ambiguity that should be resolved at the D or S phase rather than patched incrementally
9
+ - Re-verify every Verification Gate for modified slices before saving
10
+ - If two or more rounds of iteration hit the same slice, flag it: repeated revision signals a design ambiguity; resolve it at the D or S phase, not by patching
11
11
 
12
12
  ---
13
13
 
@@ -15,17 +15,17 @@
15
15
 
16
16
  1. Read the existing plan, outline, and research documents silently.
17
17
  2. Identify which slices the feedback implicates. State them explicitly before making any changes.
18
- 3. Check whether the feedback implies a **design change** — a change to solution shape, component boundaries, or technology choices. If it does, stop and return:
18
+ 3. Check whether the feedback implies a **design change**: a change to solution shape, component boundaries, or technology choices. If it does, stop and return:
19
19
  ```
20
20
  This feedback requires a design change. Return to the D phase before revising the plan.
21
21
  Reason: {specific design decision affected}
22
22
  ```
23
- 4. For each implicated slice, rewrite it completely. Leave all other slices verbatim.
23
+ 4. For each implicated slice, rewrite it completely, regenerating its Tests First section and Verification Gate for the new behavior. Leave all other slices verbatim.
24
24
  5. Add a revision note to the plan header:
25
25
  ```
26
26
  Revised: {YYYY-MM-DD} — {one-line summary of what changed}
27
27
  ```
28
- 6. Write the revised plan to the same path, overwriting the original.
28
+ 6. Write the revised plan to the same path.
29
29
  7. Return the output below.
30
30
 
31
31
  ---
@@ -7,16 +7,16 @@ No implementation detail; this is architecture, not tactics.
7
7
 
8
8
  **Constraints**:
9
9
 
10
- - Usually under 350 lines — no hard cap; the real constraint is that every line earns its place
10
+ - Usually under 350 lines (no hard cap); every line must earn its place
11
11
  - No file paths, no function signatures, no pseudo-code
12
12
  - Every component declaration must map to at least one vertical slice in the subsequent plan
13
- - Sequencing constraints must state the _reason_, not just the dependency — the reason determines whether components can be partially parallelised
13
+ - Sequencing constraints must state the _reason_, not just the dependency. The reason determines whether components can be parallelised
14
14
  - If the design concept has unresolved open questions that affect structure, stop and flag them before writing
15
15
 
16
16
  ## How to Produce This Document
17
17
 
18
18
  1. Read the design concept and research document silently.
19
- 2. Identify `Decisions Required Before Planning` implied by the design concept's open questions. For each: resolve from the research document if possible; use `question` if human input is required.
19
+ 2. Identify `Decisions Required Before Planning` implied by the design concept's open questions. For each: resolve from the research document if possible; otherwise return a decision request for the orchestrator to relay, or record it as an explicit assumption in the artifact.
20
20
  3. Write the document using the schema below.
21
21
  4. Write to `<worktree-root>/.qrspi/outlines/YYYYMMDD-{slug}.md`.
22
22
  5. Return the artifact path and a one-paragraph summary of the component structure.
@@ -42,8 +42,8 @@ status: draft
42
42
 
43
43
  ### {Component name}
44
44
 
45
- **Responsibility**: {one sentence — what this component owns}
46
- **Interface**: {what it exposes — inputs, outputs, events emitted; no implementation detail}
45
+ **Responsibility**: {one sentence stating what this component owns}
46
+ **Interface**: {what it exposes: inputs, outputs, events emitted; no implementation detail}
47
47
  **Dependencies**: {other components it calls or receives from; external dependencies it crosses}
48
48
 
49
49
  ### {Next component}
@@ -62,7 +62,7 @@ status: draft
62
62
 
63
63
  ## Sequencing Constraints
64
64
 
65
- {Which components must exist — or have their interface defined — before others can be built. This feeds directly into the vertical slice ordering in the plan.}
65
+ {Which components must exist, or have their interface defined, before others can be built. This feeds the vertical slice ordering in the plan.}
66
66
 
67
67
  | Component | Depends on | Reason |
68
68
  | ----------- | ----------------- | ------ |
@@ -72,7 +72,7 @@ status: draft
72
72
 
73
73
  ## Decisions Required Before Planning
74
74
 
75
- {Structural unknowns the planner must either resolve or state as explicit assumptions. These are not design questions — design is closed. These are questions about how the structure maps to implementation.}
75
+ {Structural unknowns the planner must resolve or state as explicit assumptions. Design is closed; these concern how structure maps to implementation.}
76
76
 
77
77
  - {e.g., Does the notification component own its retry logic or delegate it to the queue infrastructure?}
78
78
  - {e.g., What is the wire format at the gateway boundary?}
@@ -1,19 +1,19 @@
1
1
  # Implementation Plan Template
2
2
 
3
- **Usage**: Produced during the QRSPI Plan (P) phase. Load `skill:tdd` before authoring any "Tests First" section. Each phase is a vertical slice — one complete, observable behavior end-to-end. Build Agent executes phases in order; each Verification Gate must pass before the next phase begins.
3
+ **Usage**: Produced during the QRSPI Plan (P) phase. Before authoring any "Tests First" section, load the test-writing skill — the one covering test doubles, Arrange/Act/Assert, and the red-green-refactor loop. Load it once at the start of the plan; it applies to every slice below. If no such skill is loaded, the Tests First blocks below are the minimum contract. Each phase is a vertical slice: one complete, observable behavior end-to-end. Build Agent executes phases in order; each Verification Gate must pass before the next phase begins.
4
4
 
5
5
  **Constraints**:
6
6
 
7
- - Usually ~1,000 lines in total (prose plus code samples) — guidance, not a hard cap; the real constraints are self-containment and per-slice verification gates
8
- - Code samples are illustrative (locate insertion point, show pattern) — not complete implementations
7
+ - Usually ~1,000 lines in total (prose plus code samples), not a hard cap; the real constraints are self-containment and per-slice verification gates
8
+ - Code samples are illustrative (locate insertion point, show pattern), not complete implementations
9
9
  - Each phase must deliver something demonstrable at its verification gate
10
- - No phase may be a technical layer (e.g., "implement all models") — each phase is a behavior
10
+ - No phase may be a technical layer (e.g., "implement all models"); each phase is a behavior
11
11
  - In verification gates, use tools over bash commands where available
12
12
 
13
13
  ## How to Produce This Document
14
14
 
15
- 1. Read the design concept and structure/outline silently.
16
- 2. If more exploration is needed, read the research document and look for answers before exploring further.
15
+ 1. Read the design concept and outline silently.
16
+ 2. If more exploration is needed, look for answers in the research document first.
17
17
  3. Write the document using the schema below.
18
18
  4. Write to `<worktree-root>/.qrspi/plans/YYYYMMDD-{slug}.md`.
19
19
  5. Return the artifact path and a one-paragraph summary of the plan.
@@ -27,13 +27,13 @@
27
27
  **Status**: ready
28
28
  **Design concept**: {path to design concept artifact}
29
29
  **Research artifact**: {path to research artifact}
30
- **Issue**: {link — omit if no issue is referenced}
30
+ **Issue**: {link; omit if no issue is referenced}
31
31
 
32
32
  ---
33
33
 
34
34
  ## Overview
35
35
 
36
- {What we are implementing and why — 2–4 sentences. Reference the design concept by name, not by repeating its content.}
36
+ {What we are implementing and why, in 2–4 sentences. Reference the design concept by name, not by repeating its content.}
37
37
 
38
38
  ## Skills Consulted
39
39
 
@@ -50,7 +50,7 @@
50
50
 
51
51
  ## Desired End State
52
52
 
53
- {Specification of the completed feature and how to verify it is correct from the outside — what a caller or user observes.}
53
+ {Specification of the completed feature and how to verify it is correct from the outside: what a caller or user observes.}
54
54
 
55
55
  ## Slice Order Rationale
56
56
 
@@ -66,16 +66,16 @@
66
66
 
67
67
  ### What this slice delivers
68
68
 
69
- {One paragraph: what Build Agent will be able to demonstrate at the end of this slice. Written as an observable outcome — what a caller sees, not what code was written.}
69
+ {One paragraph: what Build Agent can demonstrate at the end of this slice. Written as an observable outcome: what a caller sees, not what code was written.}
70
70
 
71
71
  ### Tests First (Red)
72
72
 
73
- {Before writing any implementation, Build Agent writes these tests. They must fail at the start of this slice for the right behavioral reason — not a compilation error.}
73
+ {Before writing any implementation, Build Agent writes these tests. They must fail at the start of this slice for the right behavioral reason, not a compilation error.}
74
74
 
75
- Load `skill:tdd` → `references/test-doubles.md` and `assets/test-template.md` for double selection and scaffold.
75
+ Use the test-writing skill loaded at the top of this plan for double selection and test scaffold. If none was loaded, follow the test-structure block below.
76
76
 
77
77
  - **{Test name following "subject does what when condition" convention}**
78
- - Arrange: {what to set up — subject, doubles, inputs}
78
+ - Arrange: {what to set up: subject, doubles, inputs}
79
79
  - Act: {what to invoke}
80
80
  - Assert: {what observable outcome to verify}
81
81
 
@@ -133,7 +133,7 @@ Automated:
133
133
 
134
134
  Manual:
135
135
 
136
- - [ ] {Observable behavior to confirm from the outside — what a caller or user sees}
136
+ - [ ] {Observable behavior to confirm from the outside: what a caller or user sees}
137
137
 
138
138
  ---
139
139
 
@@ -1,12 +1,12 @@
1
1
  # Research Document Template
2
2
 
3
3
  **Usage**: Produced during the QRSPI Research (R) phase by the Research Agent.
4
- Plan Agent reads this before entering the Design phase.
5
- Do not suggest improvements, critique, or plan — document only what exists.
4
+ Plan Agent reads this before the Design phase.
5
+ Document only what exists. Do not suggest improvements, critique, or plan.
6
6
 
7
7
  **Constraints**:
8
8
 
9
- - Document prose: ~100 words per subsection as a guide (not a hard cap), excluding the **Research Question** and **Summary** sections
9
+ - Document prose: ~100 words per subsection (guide, not a hard cap), excluding the **Research Question** and **Summary** sections
10
10
  - Detailed Findings:
11
11
  - succinct prose, sacrifice grammar for concision
12
12
  - one line per sentence
@@ -28,7 +28,6 @@ git_commit: { hash }
28
28
  branch: { branch }
29
29
  repository: { repo name }
30
30
  topic: "{topic}"
31
- subagents_used: [{ roles invoked: locator | analyzer | pattern-finder }]
32
31
  skills_consulted: [{ skill names loaded, or "none" }]
33
32
  status: complete
34
33
  ---
@@ -37,11 +36,11 @@ status: complete
37
36
 
38
37
  ## Research Question
39
38
 
40
- {Original topic as stated — verbatim, not reframed.}
39
+ {Original topic verbatim, not reframed.}
41
40
 
42
41
  ## Summary
43
42
 
44
- {3–5 sentences: key components, their connections, and what matters for planning. Written for Plan Agent — what does a planner need to know about this area before designing a solution?}
43
+ {3–5 sentences: key components, their connections, what matters for planning. Written for Plan Agent: what must a planner know before designing a solution?}
45
44
 
46
45
  ## Detailed Findings
47
46
 
@@ -51,7 +50,7 @@ status: complete
51
50
 
52
51
  ## Key Patterns
53
52
 
54
- {Conventions with file:line examples. Omit this section entirely if Pattern Finder was not invoked.}
53
+ {Conventions with file:line examples. Omit this section if Pattern Finder was not invoked.}
55
54
 
56
55
  ## Code References
57
56
 
@@ -1,6 +1,6 @@
1
1
  # Session Summary Template
2
2
 
3
- **Usage**: Output by the QRSPI orchestration command after all phases are approved. Provides a single reference point for all artifact paths produced in the session.
3
+ **Usage**: Produced by the orchestrator after all phases are approved. Lists all artifact paths produced in the session.
4
4
 
5
5
  ---
6
6
 
@@ -0,0 +1,36 @@
1
+ # Test-Driven Development
2
+
3
+ Guides test-driven development of software components using the red-green-refactor loop. Covers test doubles, dependency injection, test structure, and naming.
4
+
5
+ ## What it does
6
+
7
+ Leads a development cycle in three phases: write a failing test (red), write the minimum implementation to pass it (green), and refactor structure without adding behavior. Explains two schools of unit testing, the London school and the Chicago school, and picks London as the default. Covers test doubles, dependency injection, test structure, and test naming through a main file and three reference files.
8
+
9
+ ## What problem it solves
10
+
11
+ Tests written before implementation force the interface to be designed from the caller's perspective. Painful test setup signals a design problem: too many dependencies, too many responsibilities, or the wrong abstraction boundary. The skill gives a rule for where to mock, so doubles do not couple to implementation details. It also keeps the loop diagnostic: a failing test must fail for the right reason, and refactors must never mix in new behavior.
12
+
13
+ ## How it is structured
14
+
15
+ ```
16
+ skills/tdd/
17
+ ├── SKILL.md # the instruction file agents load
18
+ ├── assets/
19
+ │ └── test-template.md # concrete scaffold for a test suite
20
+ └── references/
21
+ ├── test-doubles.md # stub, spy, fake, mock, dummy taxonomy
22
+ ├── dependency-injection.md # constructor, argument, and factory injection
23
+ └── test-patterns.md # naming, fixtures, assertions, test pyramid
24
+ ```
25
+
26
+ ## How to use it
27
+
28
+ Use it when writing new features test-first, adding tests to existing code, designing a component's interface through tests, or when the user mentions TDD, unit tests, mocks, stubs, or test structure.
29
+
30
+ Run one TDD cycle at a time, and track it with the workflow checklist: write one failing test and confirm it fails for the right reason, write the minimum generalization to pass all tests, checkpoint before touching structure, refactor structure only, and stop to write a test if refactoring reveals a missing case. Read the reference files on demand: test doubles when choosing a double, dependency injection when the arrange section is complex, and test patterns when naming tests or structuring fixtures.
31
+
32
+ ## Provenance
33
+
34
+ Vendored from the npm package @ftrdotdev/pi-qrspi.
35
+
36
+ See SKILL.md for the full agent-facing instructions.