Skip to content

Commit 21749a7

Browse files
docs(support): sync Deep Planning QA verification docs — plan acceptance flow, diff schema, support case (VOY-1326)
1 parent 0cf0916 commit 21749a7

5 files changed

Lines changed: 133 additions & 18 deletions

File tree

docs/api/plans.md

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Plan documents are structured, revisioned issue artifacts that represent an impl
1919
| **Revision** | Each update creates or supersedes a revision. Plan revisions can be compared with diff endpoints. |
2020
| **Review Gate** | An approval checkpoint on a plan revision. Gates are created per-revision and must be approved before the plan can be considered fully accepted. |
2121
| **Plan Status** | Overall plan status: `draft``in_review``approved``superseded`. A plan auto-transitions to `approved` when all its gates for the current revision are approved. |
22-
| **Accepted Plan Decomposition** | When a plan is approved, the agent can create child issues from it via the accepted plan decomposition workflow. |
22+
| **Accepted Plan Decomposition** | When a plan is approved, agents can request board acceptance via a `request_confirmation` interaction. Once a board user accepts, the agent can create child issues from the approved plan via the accepted plan decomposition workflow. Agents cannot accept — human board interaction is required. |
2323

2424
## Create/Update Plan Document
2525

@@ -133,6 +133,45 @@ GET /issues/{issueId}/documents/plan/revisions/{revisionId}/diff?againstRevision
133133

134134
Returns a structured diff between two plan revisions.
135135

136+
**Response**: Returns a `PlanRevisionDiff` object:
137+
138+
```json
139+
{
140+
"revision": {
141+
"id": "uuid-of-target-revision",
142+
"revisionNumber": 3
143+
},
144+
"previousRevision": {
145+
"id": "uuid-of-compared-revision",
146+
"revisionNumber": 2
147+
},
148+
"bodyDiff": [
149+
{
150+
"type": "unchanged",
151+
"value": "Step 1: Set up Redis client",
152+
"oldLineNumber": 1,
153+
"newLineNumber": 1
154+
},
155+
{
156+
"type": "added",
157+
"value": "Step 2: Create cache service",
158+
"newLineNumber": 2
159+
},
160+
{
161+
"type": "removed",
162+
"value": "Step 2: Evaluate Redis options",
163+
"oldLineNumber": 2
164+
}
165+
]
166+
}
167+
```
168+
169+
| Field | Type | Description |
170+
|---|---|---|
171+
| `revision` | `{ id, revisionNumber }` | The target revision the diff was computed for |
172+
| `previousRevision` | `{ id, revisionNumber } | null` | The revision compared against. `null` when this is the first revision. |
173+
| `bodyDiff` | `PlanBodyDiffLine[]` | Line-level diff of the plan body. Each line has `type` (`added`, `removed`, or `unchanged`), `value` (the line text), and optional `oldLineNumber`/`newLineNumber` for position tracking. |
174+
136175
## Create Plan Review Gate
137176

138177
```text
@@ -262,6 +301,19 @@ Creates child issues from an accepted (approved) plan. The `acceptedPlanRevision
262301

263302
**Response**: `201 Created` — returns the created child issues.
264303

304+
**Requirement — accepted plan confirmation**: Decomposition is only possible after a human (board user) has **accepted a plan confirmation interaction** for that exact plan revision. The flow is:
305+
306+
1. An agent creates a `request_confirmation` interaction on the issue with a target of `{ "type": "issue_document", "key": "plan", "issueId": "...", "revisionId": "..." }` — the `revisionId` must be the latest plan revision. The interaction is the explicit waiting path; the issue is moved to `in_review`.
307+
2. A **board user** accepts the confirmation via the board UI (`POST /issues/{id}/interactions/{interactionId}/accept`). **Agents cannot accept plan confirmations**`assertBoard` requires a human user. (Task watchdogs may only accept when the plan is eligible under their contract; otherwise the board decides.)
308+
3. Once accepted, agents can call this decomposition endpoint with the accepted `acceptedPlanRevisionId`.
309+
310+
If the plan revision is superseded by a newer revision before acceptance, the pending interaction expires with `outcome: "stale_target"` — create a fresh confirmation against the new revision. If a board/user comment lands while the confirmation is pending, it is superseded (`superseded_by_comment`) and must be re-created.
311+
312+
**Errors**:
313+
- `422 Unprocessable Entity``"acceptedPlanRevisionId must have an accepted plan confirmation"` — no accepted `request_confirmation` interaction targets this revision. Have a board user accept the plan confirmation first.
314+
- `422 Unprocessable Entity``"acceptedPlanRevisionId must belong to the source issue's plan document"` — the revision is not from this issue's plan document.
315+
- `409 Conflict``"Accepted-plan decomposition already exists for this revision with a different child set"` — decomposition is idempotent per revision; a retry with a different child set is rejected.
316+
265317
## Plan Lifecycle
266318

267319
```text
@@ -273,13 +325,16 @@ draft ──> in_review ──> approved ──> superseded
273325
274326
plan status → approved
275327
328+
board accepts plan confirmation
329+
276330
decomposition allowed
277331
```
278332

279333
- Plans start as `draft`
280334
- Review gates keep the plan in `in_review` until all are approved
281335
- Once all gates for the current revision approve, plan auto-transitions to `approved`
282-
- Approved plans can be decomposed into child issues
336+
- `approved` alone is not enough to decompose — a board user must accept the plan confirmation (`request_confirmation` targeting the approved revision) first. Agents cannot accept; this requires human board interaction.
337+
- Once accepted, approved plans can be decomposed into child issues
283338
- Newer revisions supersede older ones (gates on previous revisions are auto-superseded)
284339

285340
## Agent Events

docs/releases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Paperclip ships continuously. This page documents each release to the main branc
2121

2222
- **Plan Review Gates** — Approval gates on plan revisions with per-milestone acceptance criteria. When all gates for the current revision approve, the plan auto-transitions to `approved`.
2323

24-
- **Approved Plan Decomposition** — Approved plans can be decomposed into child issues, creating a direct link from the approved plan to executable work items.
24+
- **Approved Plan Decomposition** — Approved plans can be decomposed into child issues after a board user accepts the plan confirmation, creating a direct link from the approved plan to executable work items. Human acceptance is required — agents cannot accept plan confirmations.
2525

2626
- **Agent Memory (pgvector)** — A durable, queryable agent memory system. Agents capture text (30-day TTL), upsert curated records, and search via hybrid semantic + full-text retrieval. Memory is scoped per-agent with shared company-wide records.
2727

docs/support/assessments/support-case-v0.4.0-deep-planning.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Deep Planning introduces a structured plan document system that replaces ad-hoc
1616

1717
3. **Review Gates** — Agents can create approval gates on plan revisions. Gates are linked to milestones and acceptance criteria. When all gates for the current revision are approved, the plan status auto-transitions to `approved`.
1818

19-
4. **Plan Decomposition** — Once a plan's gates are all approved, the agent can decompose the plan into child issues via the accepted plan decomposition workflow.
19+
4. **Plan Decomposition** — Once a plan's gates are all approved, a `request_confirmation` interaction is created targeting the plan revision. A **board user** must accept this confirmation (agents cannot accept). Once accepted, the agent can decompose the plan into child issues via the accepted plan decomposition workflow.
2020

2121
5. **Agent Wake Reasons** — Agents are woken when plans are updated (`issue_plan_updated`) and when gates are resolved (`issue_plan_gate_resolved`), enabling reactive workflows.
2222

@@ -38,7 +38,7 @@ The plan UI also mounts inside the Issue Detail page when an issue has a plan do
3838

3939
1. **"My plan disappeared / I can't find it"** — Plans live on the issue's documents with key `plan`. Check the issue detail page's plan section or use `GET /issues/{id}/documents/plan`.
4040

41-
2. **"The plan won't let me add child issues"** — Child issues via plan decomposition require the plan to be in `approved` status. All review gates for the plan's current revision must be approved. Check gate status with `GET /issues/{id}/plan/gates`.
41+
2. **"The plan won't let me add child issues"** — Child issues via plan decomposition require the plan to be in `approved` status. All review gates for the plan's current revision must be approved. Check gate status with `GET /issues/{id}/plan/gates`. Even after approval, a **board user must accept the plan confirmation interaction** (`request_confirmation` targeting the approved revision) — agents cannot accept this. Check for a pending `request_confirmation` on the issue and have a board user accept it.
4242

4343
3. **"I created gates but nothing happened"** — Gates don't auto-resolve. An agent or board must explicitly approve each gate via `PATCH /issues/{id}/plan/gates/{gateId}`. Auto-approval only happens when all gates are resolved to `approved`.
4444

@@ -48,6 +48,8 @@ The plan UI also mounts inside the Issue Detail page when an issue has a plan do
4848

4949
6. **"Old gates are gone"** — When a new plan revision is created, pending gates from previous revisions are auto-superseded. This is by design — each revision gets fresh gates.
5050

51+
7. **"The decomposition endpoint says 'acceptedPlanRevisionId must have an accepted plan confirmation'"** — A board user must accept a `request_confirmation` interaction on the issue first (targeting the plan revision). Agents cannot accept plan confirmations — only board users can. See the FAQ entry "How do I turn a plan into actual work?" below for the full flow.
52+
5153
## FAQ
5254

5355
**Q: How do I create a plan?**
@@ -60,7 +62,14 @@ A: Create gates on `POST /issues/{issueId}/plan/gates`. Each gate targets a mile
6062
A: Existing pending gates are auto-superseded. You need to create new gates for the updated revision.
6163

6264
**Q: How do I turn a plan into actual work?**
63-
A: Once the plan is `approved`, use `POST /issues/{issueId}/accepted-plan-decompositions` to create child issues. This replaces the previous decomposition workflow.
65+
A: The full flow:
66+
1. Create a plan document via `POST /issues/{issueId}/documents/plan`
67+
2. Create review gates via `POST /issues/{issueId}/plan/gates`
68+
3. Have gates approved via `PATCH /issues/{issueId}/plan/gates/{gateId}` until all are approved — the plan auto-transitions to `approved`
69+
4. The agent creates a `request_confirmation` interaction on the issue (targeting the approved plan revision) — this is the explicit waiting path, and the issue moves to `in_review`
70+
5. A **board user** accepts the confirmation via the board UI — **agents cannot accept plan confirmations**
71+
6. Once accepted, use `POST /issues/{issueId}/accepted-plan-decompositions` to create child issues
72+
This replaces the previous ad-hoc decomposition workflow.
6473

6574
**Q: Can I edit a milestone after creating it?**
6675
A: Milestones are part of `planMetadata`. You update them by creating a new plan revision with updated milestones. Each revision has its own snapshot of milestones.
@@ -87,6 +96,8 @@ A: No. A rejected gate means that gate's acceptance criteria were not met. The p
8796
3. All gates for the current revision must be `approved`
8897
4. The `acceptedPlanRevisionId` must reference an approved revision
8998
5. If gates exist but aren't approved, resolve them first
99+
6. **Check for an accepted plan confirmation**: Even if the plan is `approved`, a board user must accept a `request_confirmation` interaction targeting the plan revision first. Agents cannot accept — the board must. Look for a pending `request_confirmation` on the issue with kind `request_confirmation` and target `{ type: "issue_document", key: "plan" }`. If none exists, create one; if it's pending, have a board user accept it via the board UI.
100+
7. If the endpoint returns `422: "acceptedPlanRevisionId must have an accepted plan confirmation"`, this confirms the acceptance step is missing
90101

91102
### Gates not appearing after plan update
92103

@@ -110,14 +121,16 @@ A: No. A rejected gate means that gate's acceptance criteria were not met. The p
110121

111122
## Error States
112123

113-
| Error | User sees | Root cause | Recovery |
114-
|---|---|---|---|
115-
| 409 Conflict on plan update | "Stale baseRevisionId" | `baseRevisionId` doesn't match latest revision | Fetch current plan doc to get latest revision ID |
116-
| 404 on plan GET | "Plan document not found" | No plan exists on this issue | Create one with POST |
117-
| Gate not resolving | Unexpected error | Gate already superseded or doesn't exist | List gates to verify state |
118-
| Decomposition fails | 400 error | Plan not approved or revision mismatch | Check plan status and gates |
119-
| Gate creation fails | Missing issue | Issue ID not found | Verify issue exists |
120-
| 403 on agent actions | Forbidden | Agent trying to access another agent's scope | Use correct agent authentication |
124+
|| Error | User sees | Root cause | Recovery |
125+
|---|---|---|---|---|
126+
|| 409 Conflict on plan update | "Stale baseRevisionId" | `baseRevisionId` doesn't match latest revision | Fetch current plan doc to get latest revision ID |
127+
|| 404 on plan GET | "Plan document not found" | No plan exists on this issue | Create one with POST |
128+
|| Gate not resolving | Unexpected error | Gate already superseded or doesn't exist | List gates to verify state |
129+
|| Decomposition fails | 400 error | Plan not approved or revision mismatch | Check plan status and gates |
130+
|| Decomposition fails | 422: "acceptedPlanRevisionId must have an accepted plan confirmation" | No accepted `request_confirmation` interaction targets this revision | Have a board user accept the plan confirmation first via the board UI |
131+
|| Decomposition fails | 422: "acceptedPlanRevisionId must belong to the source issue's plan document" | Revision is from a different issue's plan | Use the correct revision ID from the target issue's plan document |
132+
|| Gate creation fails | Missing issue | Issue ID not found | Verify issue exists |
133+
|| 403 on agent actions | Forbidden | Agent trying to access another agent's scope | Use correct agent authentication |
121134

122135
## Related Documentation
123136

@@ -135,4 +148,5 @@ A: No. A rejected gate means that gate's acceptance criteria were not met. The p
135148
| Decomposition creates issues outside the plan's scope | High | CTO | Security/scope violation |
136149
| Plan revision diff returns empty or wrong data | Medium | Staff Engineer | Diff computation issue |
137150
| Agent not woken on plan update or gate resolve | Medium | Staff Engineer | Wake reason may not be delivered |
138-
| Milestone acceptance criteria lost on revision | Medium | Founding Engineer | Milestone snapshot fidelity issue |
151+
| Milestone acceptance criteria lost on revision | Medium | Founding Engineer | Milestone snapshot fidelity issue |
152+
| Decomposition fails with 422: "acceptedPlanRevisionId must have an accepted plan confirmation" | Low | First line support (guide board user) | No accepted plan confirmation exists for this revision. This is by design — agents cannot accept; a board user must accept the `request_confirmation` interaction. Guide the board user to the board UI to accept the pending confirmation or create one if missing. |

docs/support/heartbeat-log.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,3 +988,46 @@ Documentation updates **required** for RC-3. The Phase 5 Plan Board UI surface w
988988
- **VOY-1265 QA findings** → any UI behavior deltas worth a support note
989989
- **PostHog cron deployment to VPS-1** → SOP goes from final to operational; may generate first PostHog error issues for triage
990990
- **COO request for documentation health report** — available on demand
991+
992+
## 2026-08-17 — Heartbeat: Deep Planning QA verification (VOY-1212) — docs synced
993+
994+
### What was done
995+
996+
1. **Diff assessment of VOY-1326 task** — QA verification of Deep Planning Workstream A (VOY-1212) is complete. Verified the 9 backend API endpoints shipping in v0.4.0-alpha. Analyzed the codebase for documentation gaps.
997+
998+
2. **Gap identified: Plan acceptance flow undocumented** — The decomposition endpoint (`POST /issues/:id/accepted-plan-decompositions`) requires an accepted `request_confirmation` interaction targeting the plan revision. Agents cannot accept this — `assertBoard` requires a human user. This flow was entirely absent from customer-facing documentation.
999+
1000+
3. **`docs/api/plans.md` updated**:
1001+
- **Accepted Plan Decomposition** — Added full acceptance flow: agent creates `request_confirmation` → board user accepts → decomposition allowed. Documented the three error responses (422 for missing confirmation, 422 for wrong revision, 409 for idempotency conflict). Updated Key Concepts, Plan Lifecycle, and the decomposition section.
1002+
- **Diff Plan Revisions** — Added explicit response schema (`{ revision, previousRevision, bodyDiff }`) with JSON example, field descriptions, and line-level diff type documentation.
1003+
1004+
4. **`docs/support/assessments/support-case-v0.4.0-deep-planning.md` updated**:
1005+
- Added confusion point #7 for the "accepted plan confirmation" error
1006+
- Updated FAQ "How do I turn a plan into actual work?" with the full 6-step flow
1007+
- Updated troubleshooting for decomposition with acceptance flow checks
1008+
- Updated Error States and Escalation Path with the new 422 error
1009+
- Updated Feature Overview to reflect human acceptance requirement
1010+
1011+
5. **`docs/support/releases/v0.4.0-alpha-deep-planning.md` updated**:
1012+
- Added acceptance flow to Support Notes
1013+
- Updated "Approved Plan Decomposition" highlights to note human acceptance requirement
1014+
- Added decomposition 422 to Support Escalation Path
1015+
1016+
6. **`docs/releases.md` updated** — "Approved Plan Decomposition" highlight now notes human acceptance requirement.
1017+
1018+
### Current state
1019+
1020+
| Metric | Status |
1021+
|---|---|
1022+
| Open support issues (VOY-1326) | 1 — actively working |
1023+
| Pending KB articles | 0 |
1024+
| Pending feature assessments | 5 (planned backlog) |
1025+
| Release notes currency | Up to date through v0.4.0-alpha-rc.4 |
1026+
| Docs synced with live code | ✅ Deep Planning QA verification (VOY-1212) — all 9 endpoints, schemas, acceptance flow documented |
1027+
| Product dev server | UP (port 3100 healthy) |
1028+
1029+
### Next triggers to watch for
1030+
1031+
- **v0.4.0 release to main** → final release notes refresh for v0.4.0 (stable)
1032+
- **PostHog error monitoring (VOY-999) reaching production** → finalize SOP from draft
1033+
- **COO request for documentation health report** — available on demand

0 commit comments

Comments
 (0)