You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/plans.md
+57-2Lines changed: 57 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Plan documents are structured, revisioned issue artifacts that represent an impl
19
19
|**Revision**| Each update creates or supersedes a revision. Plan revisions can be compared with diff endpoints. |
20
20
|**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. |
21
21
|**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. |
23
23
24
24
## Create/Update Plan Document
25
25
@@ -133,6 +133,45 @@ GET /issues/{issueId}/documents/plan/revisions/{revisionId}/diff?againstRevision
133
133
134
134
Returns a structured diff between two plan revisions.
135
135
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
+
136
175
## Create Plan Review Gate
137
176
138
177
```text
@@ -262,6 +301,19 @@ Creates child issues from an accepted (approved) plan. The `acceptedPlanRevision
262
301
263
302
**Response**: `201 Created` — returns the created child issues.
264
303
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.
- Review gates keep the plan in `in_review` until all are approved
281
335
- 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
283
338
- Newer revisions supersede older ones (gates on previous revisions are auto-superseded)
Copy file name to clipboardExpand all lines: docs/releases.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Paperclip ships continuously. This page documents each release to the main branc
21
21
22
22
-**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`.
23
23
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.
25
25
26
26
-**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.
Copy file name to clipboardExpand all lines: docs/support/assessments/support-case-v0.4.0-deep-planning.md
+26-12Lines changed: 26 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Deep Planning introduces a structured plan document system that replaces ad-hoc
16
16
17
17
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`.
18
18
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.
20
20
21
21
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.
22
22
@@ -38,7 +38,7 @@ The plan UI also mounts inside the Issue Detail page when an issue has a plan do
38
38
39
39
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`.
40
40
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.
42
42
43
43
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`.
44
44
@@ -48,6 +48,8 @@ The plan UI also mounts inside the Issue Detail page when an issue has a plan do
48
48
49
49
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.
50
50
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
+
51
53
## FAQ
52
54
53
55
**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
60
62
A: Existing pending gates are auto-superseded. You need to create new gates for the updated revision.
61
63
62
64
**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.
64
73
65
74
**Q: Can I edit a milestone after creating it?**
66
75
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
87
96
3. All gates for the current revision must be `approved`
88
97
4. The `acceptedPlanRevisionId` must reference an approved revision
89
98
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
90
101
91
102
### Gates not appearing after plan update
92
103
@@ -110,14 +121,16 @@ A: No. A rejected gate means that gate's acceptance criteria were not met. The p
110
121
111
122
## Error States
112
123
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 |
121
134
122
135
## Related Documentation
123
136
@@ -135,4 +148,5 @@ A: No. A rejected gate means that gate's acceptance criteria were not met. The p
135
148
| Decomposition creates issues outside the plan's scope | High | CTO | Security/scope violation |
136
149
| Plan revision diff returns empty or wrong data | Medium | Staff Engineer | Diff computation issue |
137
150
| 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. |
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.
0 commit comments