Story Statement
As a developer
I want pair-process-implement slimmed: at the end of the task cycle it writes a checkpoint and invokes publish-pr in a subagent whose prompt is the handoff only, resuming from checkpoint when interrupted
So that the PR is always built on clean context (guaranteed reset inside a single execution) and interrupted work never repeats completed tasks (R4.1, R2.10, R4.2)
Where: implement session; PR produced by the subagent; checkpoint in .pair/working/checkpoints/
Epic Context
Parent Epic: Split implement: checkpoint + publish-pr #206
Status: Refined
Priority: P0 (Must-Have)
Status Workflow
- Refined: Story is detailed, estimated, and ready for development
- In Progress: Story is actively being developed
- Done: Story delivered and accepted
Acceptance Criteria
Functional Requirements
Given-When-Then Format:
-
Given all story tasks completed in an implement session
When the task cycle ends
Then implement writes the checkpoint and spawns publish-pr in a subagent passing ONLY the handoff document in the prompt — the subagent's context is the handoff, nothing else
-
Given an implement session interrupted mid-story
When implement is relaunched on the same story
Then it detects the checkpoint and resumes from the first pending task, without repeating completed tasks
-
Given a project/tool where subagent spawning is unavailable
When the PR phase is reached
Then implement degrades gracefully: checkpoint written, publish-pr invoked inline (current one-shot flow), degradation noted in output
-
Given the existing one-shot flow (no interruption, no subagent constraint)
When a story is implemented end-to-end
Then behavior is equivalent to today plus checkpoint/PR split — no regression in the 5-step task cycle
Business Rules
- Two AI macro-phases (R4.2): refinement → implementation; the boundary artifact is a checkpoint
- The subagent boundary is mechanical isolation (D23): anonymous subagent, no named role
- implement never re-does gate/PR logic — it composes publish-pr only
Edge Cases and Error Handling
- Checkpoint exists but branch missing: HALT, report divergence (checkpoint says branch X, repo has none)
- Subagent fails mid-PR: checkpoint still valid; rerun invokes publish-pr again (idempotent: updates existing PR)
- Stale checkpoint (story already Done): warn and require explicit confirmation before reuse
Definition of Done Checklist
Development Completion
Quality Assurance
Story Sizing and Sprint Readiness
Refined Story Points
Final Story Points: 5 (L)
Confidence Level: Medium
Sizing Justification: rework of the largest process skill + subagent orchestration + resume logic; confirmed L(5) — composition-heavy but both composed capabilities are siblings in this epic
Sprint Capacity Validation
Sprint Fit Assessment: yes, given siblings land first
Total Effort Assessment: fits — Yes
Dependencies and Coordination
Story Dependencies
Prerequisite Stories: checkpoint story, publish-pr story (both in this epic)
Dependent Stories: supervised automation (#212) reuses the same primitives
Shared Components: checkpoint format (contract), handoff-as-prompt pattern
Validation and Testing Strategy
Acceptance Testing Approach
Testing Methods: dogfood story on pair repo: full run, interrupted run, degraded (inline) run
Test Data Requirements: story with ≥3 tasks for meaningful interruption points
Notes and Additional Context
Refinement Session Insights: reset-by-subagent chosen because a skill cannot /clear its own context (D7); manual resume post-/clear covered by the same checkpoint
Documentation Links: R4.1, R4.2, R2.10 · Spec G5 · D7, D8, D23
Technical Analysis
Implementation Approach
Technical Strategy: modify .skills/process/implement/SKILL.md: task cycle unchanged; new closing phase = checkpoint(write) → spawn anonymous subagent with handoff-only prompt → subagent runs publish-pr; opening phase = checkpoint(resume) probe; degradation path inline
Key Components: implement SKILL.md phases, subagent invocation instructions, resume gate
Integration Points: checkpoint (both modes), publish-pr, PM tool state via mapping
Technical Risks and Mitigation
| Risk |
Impact |
Probability |
Mitigation Strategy |
| Handoff misses info the subagent needs |
High |
Medium |
publish-pr contract lists required fields; checkpoint template enforces them; E2E dogfood |
| Tool-specific subagent APIs (agnosticism R2.13) |
Medium |
Medium |
instructions phrased tool-neutrally ("fresh context execution"), degraded inline path always available |
Task Breakdown
Checklist
Dependency Graph
T1 → T2 → T3 → T4
AC Coverage
| Task |
AC1 |
AC2 |
AC3 |
AC4 |
| T1 |
✓ |
|
|
|
| T2 |
|
✓ |
|
|
| T3 |
|
|
✓ |
|
| T4 |
✓ |
✓ |
✓ |
✓ |
Story Statement
As a developer
I want
pair-process-implementslimmed: at the end of the task cycle it writes a checkpoint and invokes publish-pr in a subagent whose prompt is the handoff only, resuming from checkpoint when interruptedSo that the PR is always built on clean context (guaranteed reset inside a single execution) and interrupted work never repeats completed tasks (R4.1, R2.10, R4.2)
Where: implement session; PR produced by the subagent; checkpoint in
.pair/working/checkpoints/Epic Context
Parent Epic: Split implement: checkpoint + publish-pr #206
Status: Refined
Priority: P0 (Must-Have)
Status Workflow
Acceptance Criteria
Functional Requirements
Given-When-Then Format:
Given all story tasks completed in an implement session
When the task cycle ends
Then implement writes the checkpoint and spawns publish-pr in a subagent passing ONLY the handoff document in the prompt — the subagent's context is the handoff, nothing else
Given an implement session interrupted mid-story
When implement is relaunched on the same story
Then it detects the checkpoint and resumes from the first pending task, without repeating completed tasks
Given a project/tool where subagent spawning is unavailable
When the PR phase is reached
Then implement degrades gracefully: checkpoint written, publish-pr invoked inline (current one-shot flow), degradation noted in output
Given the existing one-shot flow (no interruption, no subagent constraint)
When a story is implemented end-to-end
Then behavior is equivalent to today plus checkpoint/PR split — no regression in the 5-step task cycle
Business Rules
Edge Cases and Error Handling
Definition of Done Checklist
Development Completion
apps/website) implement page updated (new flow)apps/pair-cli) unaffected verifiedQuality Assurance
Story Sizing and Sprint Readiness
Refined Story Points
Final Story Points: 5 (L)
Confidence Level: Medium
Sizing Justification: rework of the largest process skill + subagent orchestration + resume logic; confirmed L(5) — composition-heavy but both composed capabilities are siblings in this epic
Sprint Capacity Validation
Sprint Fit Assessment: yes, given siblings land first
Total Effort Assessment: fits — Yes
Dependencies and Coordination
Story Dependencies
Prerequisite Stories: checkpoint story, publish-pr story (both in this epic)
Dependent Stories: supervised automation (#212) reuses the same primitives
Shared Components: checkpoint format (contract), handoff-as-prompt pattern
Validation and Testing Strategy
Acceptance Testing Approach
Testing Methods: dogfood story on pair repo: full run, interrupted run, degraded (inline) run
Test Data Requirements: story with ≥3 tasks for meaningful interruption points
Notes and Additional Context
Refinement Session Insights: reset-by-subagent chosen because a skill cannot /clear its own context (D7); manual resume post-/clear covered by the same checkpoint
Documentation Links: R4.1, R4.2, R2.10 · Spec G5 · D7, D8, D23
Technical Analysis
Implementation Approach
Technical Strategy: modify
.skills/process/implement/SKILL.md: task cycle unchanged; new closing phase = checkpoint(write) → spawn anonymous subagent with handoff-only prompt → subagent runs publish-pr; opening phase = checkpoint(resume) probe; degradation path inlineKey Components: implement SKILL.md phases, subagent invocation instructions, resume gate
Integration Points: checkpoint (both modes), publish-pr, PM tool state via mapping
Technical Risks and Mitigation
Task Breakdown
Checklist
Dependency Graph
T1 → T2 → T3 → T4
AC Coverage