allye-pi 1.5.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.
@@ -0,0 +1,187 @@
1
+ ---
2
+ name: delivery
3
+ description: Workflow for finalizing a story after all tasks pass review. Verifies completeness, closes the story, updates documentation, and cleans up. Use when all tasks are done and reviewed.
4
+ version: "1.4"
5
+ category: methodology
6
+ ---
7
+
8
+ # Technical Delivery Workflow
9
+
10
+ This skill finalizes a story after every task has passed review — closing it out, documenting what shipped, and clearing loose ends.
11
+
12
+ Use this when: all tasks for a story are implemented and reviewed, and the user is ready to finalize delivery.
13
+
14
+ ---
15
+
16
+ ## Workflow Overview
17
+
18
+ ```
19
+ Verify all tasks done → Close story → Update documentation → Clean up TODOs → Save delivery memory
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Step 1: Verify All Tasks Are Complete
25
+
26
+ Check that every task under the story is done:
27
+
28
+ ```
29
+ work_children(id: "{story uuid}")
30
+ ```
31
+
32
+ <HARD-GATE>
33
+ Close the story only once every task is completed, verified, and in "done" status.
34
+ If any task is incomplete, route back to Technical Development or Technical Review instead of closing.
35
+
36
+ "Done" means the **done category**, not the last status an agent could reach. On a pipeline
37
+ with stages after review, a task parked at a gate the team satisfies by hand is not done — it
38
+ is waiting, and the story waits with it.
39
+
40
+ If tasks are parked, close-out is not blocked by an oversight. It is **not yet due**. Say which
41
+ gate they are waiting at and stop; do not close the story to tidy the board.
42
+ </HARD-GATE>
43
+
44
+ ### Verification checklist
45
+
46
+ For each task, confirm:
47
+ - [ ] Status is "done"
48
+ - [ ] Acceptance criteria are met
49
+ - [ ] Tests pass
50
+ - [ ] Review is approved (no outstanding change requests)
51
+
52
+ ---
53
+
54
+ ## Step 2: Close the Story
55
+
56
+ Move the story to done:
57
+
58
+ ```
59
+ work_status_done(id: "{story uuid}")
60
+ ```
61
+
62
+ This sets the story's status to the "done" category and records `completed_at`.
63
+
64
+ If the story is part of a feature, check if the feature is now complete:
65
+
66
+ ```
67
+ work_children(id: "{feature uuid}")
68
+ ```
69
+
70
+ If all stories under the feature are done, close the feature too:
71
+
72
+ ```
73
+ work_status_done(id: "{feature uuid}")
74
+ ```
75
+
76
+ ---
77
+
78
+ ## Step 2.5: Land the Code
79
+
80
+ The story is closed in Allye. The code is still on a branch.
81
+
82
+ Load the `branch-landing` skill and follow it. It asks how the work should land — pull
83
+ request, local merge, or left alone — and carries the sequence that gets it there without
84
+ losing anything.
85
+
86
+ <HARD-GATE>
87
+ Do not skip this because the story is already closed. Closing the item and landing the code
88
+ are different acts, and doing the first without the second produces the worst available
89
+ state: a board that says delivered and a base branch that does not have the work.
90
+
91
+ If the story reached this skill while still parked at a pipeline gate, it should not have —
92
+ see Step 1. The branch stays where it is.
93
+ </HARD-GATE>
94
+
95
+ ---
96
+
97
+ ## Step 3: Update Documentation
98
+
99
+ If the delivered work introduced or changed functionality that should be documented:
100
+
101
+ ### Check existing docs
102
+
103
+ ```
104
+ memory_search(query: "documentation {feature/story key}")
105
+ doc_full_tree()
106
+ ```
107
+
108
+ ### Create or update documentation
109
+
110
+ **For new functionality:**
111
+
112
+ ```
113
+ doc_create(
114
+ doc_title: "{Feature Name}",
115
+ doc_type: "page",
116
+ doc_emoji: "📄",
117
+ doc_content: "## Overview\n{what this feature does}\n\n## Usage\n{how to use it}\n\n## Technical Details\n{relevant implementation details}\n\n## API Reference\n{endpoints, parameters, responses — if applicable}",
118
+ doc_parent_id: "{parent folder uuid if applicable}"
119
+ )
120
+ ```
121
+
122
+ **For updates to existing functionality:**
123
+
124
+ ```
125
+ doc_update(
126
+ id: "{doc uuid}",
127
+ doc_content: "{updated content}"
128
+ )
129
+ ```
130
+
131
+ ### When to skip documentation
132
+
133
+ Not everything needs docs. Skip if:
134
+ - The change is purely internal (refactoring, performance, tests)
135
+ - The change is self-evident from the code
136
+ - Documentation would duplicate what's in the code
137
+
138
+ ---
139
+
140
+ ## Step 4: Clean Up TODOs
141
+
142
+ Check for any TODOs that were created during development:
143
+
144
+ ```
145
+ todo_list()
146
+ ```
147
+
148
+ For each TODO related to this story:
149
+ - If it's done → mark as complete: `todo_update(id: "{todo uuid}", status: "completed")`
150
+ - If it's no longer relevant → delete: `todo_delete(id: "{todo uuid}")`
151
+ - If it's a future task → leave it, but make sure it's not blocking delivery
152
+
153
+ ---
154
+
155
+ ## Step 5: Save Delivery Memory
156
+
157
+ Save a final summary of what was delivered:
158
+
159
+ ```
160
+ memory_save(
161
+ title: "Delivered — {STORY-KEY} {story title}",
162
+ content: "## What was delivered\n{summary of the feature/change}\n\n## Tasks completed\n- {TASK-1}: {title}\n- {TASK-2}: {title}\n- {TASK-3}: {title}\n\n## Key decisions\n{important decisions from planning and implementation}\n\n## Documentation\n{what was documented, or 'No documentation needed'}\n\n## Where the code landed\n{branch name, and the merge commit or PR reference, and the base it landed on — or \"not yet landed: {reason}\"}\n\n## Lessons learned\n{anything worth remembering for similar work in the future}",
163
+ tags: ["delivery", "completed", "{story-key}", "{feature-key}"],
164
+ sector: "knowledge"
165
+ )
166
+ ```
167
+
168
+ ---
169
+
170
+ ## Workflow Checklist
171
+
172
+ - [ ] All tasks verified as done
173
+ - [ ] Story moved to done
174
+ - [ ] The code landed, or the reason it has not is recorded
175
+ - [ ] Feature moved to done (if all stories complete)
176
+ - [ ] Documentation created or updated (if applicable)
177
+ - [ ] Related TODOs cleaned up
178
+ - [ ] Delivery memory saved
179
+
180
+ ---
181
+
182
+ ## What Comes Next
183
+
184
+ The story is delivered. The user can:
185
+ - **Pick another story** → Back to Technical Planning (`allye-technical-planning`)
186
+ - **Plan more features** → Back to Product Planning (`allye-product-planning`)
187
+ - **Start a new initiative** → Back to Product Planning from scratch
@@ -0,0 +1,390 @@
1
+ ---
2
+ name: execution
3
+ description: Workflow for implementing tasks with TDD discipline, read-first rule, and wave execution. Use when the user wants to write code, implement a task, or develop features.
4
+ version: "1.5"
5
+ category: methodology
6
+ ---
7
+
8
+ # Technical Development Workflow
9
+
10
+ Implements one task with discipline: read the existing code first, drive it with TDD,
11
+ verify it actually works, and track progress in Allye.
12
+
13
+ **Scope, if you arrived via a `story-execution` or `correction` handover (see `handover-protocol`):** read only the one story and its tasks named in the handover — nothing else. A `correction` handover carries only the failed findings, not the whole story again; fix exactly what it lists.
14
+
15
+ ---
16
+
17
+ ## Workflow Overview
18
+
19
+ ```
20
+ Get task → Search context → Move to in_progress → Read code → TDD (Red → Green → Refactor) → Verify → Move to review → Save memory
21
+ ```
22
+
23
+ ---
24
+
25
+ ## Step 1: Get the Task and Context
26
+
27
+ Fetch the task you're about to implement:
28
+
29
+ ```
30
+ work_get(work_key: "{TASK-KEY}")
31
+ ```
32
+
33
+ Read its description carefully — it should contain:
34
+ - What to implement
35
+ - Acceptance criteria
36
+ - Files likely involved
37
+ - Dependencies on other tasks
38
+ - Decisions from the discussion phase
39
+
40
+ ### Search for relevant memories
41
+
42
+ ```
43
+ memory_search(query: "{task key} context")
44
+ memory_search(query: "decision {story key}")
45
+ memory_search(query: "Technical Plan {story key}")
46
+ ```
47
+
48
+ If session state or decision memories are found, optionally traverse the graph for richer context:
49
+ ```
50
+ memory_graph(memory_id: "{id}", depth: 2)
51
+ ```
52
+
53
+ **Pay special attention to locked decisions** — these were explicitly chosen by the user during the discussion phase and are non-negotiable.
54
+
55
+ ---
56
+
57
+ ## Step 2: Check Dependencies
58
+
59
+ If the task has dependencies (noted in its description), verify they're complete:
60
+
61
+ ```
62
+ work_children(id: "{story uuid}")
63
+ ```
64
+
65
+ Check that prerequisite tasks are in "review" or "done" status — either means their implementation is complete (tasks you finished earlier in this story sit at `review` until the Reviewer approves them). If a prerequisite hasn't reached at least `review`, either:
66
+ - Pick a different task from the same wave (if available)
67
+ - Inform the user that this task is blocked
68
+
69
+ ### Wave Execution
70
+
71
+ If there are multiple independent tasks (same wave), they can be done in any order. Tasks with dependencies must follow the sequence defined in the technical plan.
72
+
73
+ ---
74
+
75
+ ## Step 3: Move Task to In Progress
76
+
77
+ Signal that work has started:
78
+
79
+ ```
80
+ work_status_next(id: "{task uuid}")
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Step 4: Read First
86
+
87
+ <EXTREMELY_IMPORTANT>
88
+ Read existing code BEFORE writing any new code.
89
+ The task description lists files likely involved — read them all.
90
+ Understand the current state before changing it.
91
+
92
+ This is not optional. Writing code without reading the context leads to:
93
+ - Duplicating existing functionality
94
+ - Breaking existing patterns
95
+ - Inconsistent code style
96
+ - Missed constraints
97
+ </EXTREMELY_IMPORTANT>
98
+
99
+ ### What to read
100
+
101
+ 1. **Files listed in the task description** — The planning phase identified these
102
+ 2. **Related test files** — Understand existing test patterns
103
+ 3. **Shared utilities and helpers** — Don't reinvent what already exists
104
+ 4. **Configuration files** — If the task involves config changes
105
+
106
+ ### Analysis Paralysis Guard
107
+
108
+ <HARD-GATE>
109
+ This checkpoint applies to exploratory reads beyond what the task already named — reading every file the task itself points you to (see "What to read" above) is still mandatory, not capped by this count.
110
+
111
+ If you have read 5+ files *beyond those named/implied by the task* without writing any code, STOP and ask yourself:
112
+
113
+ 1. **Do I have enough context to start?** → If yes, start writing. Perfect understanding is not required.
114
+ 2. **Am I blocked by missing information?** → If yes, tell the user what's blocking you.
115
+
116
+ Do not read endlessly in search of additional context. Reading is preparation, not implementation.
117
+ </HARD-GATE>
118
+
119
+ ---
120
+
121
+ ## Step 4.5: Plan the Implementation
122
+
123
+ You have read the code and written none. This is where you state *how* you will build it,
124
+ and check that statement against what was asked for — while being wrong still costs a
125
+ paragraph rather than a branch.
126
+
127
+ ### Write the plan
128
+
129
+ Per task in this story:
130
+
131
+ - **Approach** — the shape of the change, in a sentence or two.
132
+ - **Files** — what you will create or modify. Names, never line numbers; the tree moves.
133
+ - **Interfaces produced** — the names, types, and signatures other tasks in this story will
134
+ call. Whoever implements a neighbouring task sees only their own task description, so
135
+ this is the only place they learn what to call.
136
+ - **How each criterion goes green** — for every acceptance criterion, which step makes its
137
+ `## Verification` command pass. A criterion with no step against it is the finding this
138
+ whole exercise exists to produce.
139
+
140
+ Save it:
141
+
142
+ ```
143
+ memory_save(
144
+ title: "Implementation Plan — {STORY-KEY} {story title}",
145
+ content: "## Per task\n{approach, files, interfaces produced, criterion → step}\n\n## Order\n{which task first, and why}\n\n## Open questions\n{anything planning did not settle, or 'None'}",
146
+ tags: ["plan", "implementation", "{story-key}"],
147
+ sector: "plans"
148
+ )
149
+ ```
150
+
151
+ It outlives the session. A resumed Executor reads what was intended rather than inferring
152
+ it from half-written code, and `reviewer-spec` can compare the implementation against the
153
+ plan and not only against the criteria.
154
+
155
+ ### Validate it
156
+
157
+ <HARD-GATE>
158
+ Three checks, run every time, before writing any code:
159
+
160
+ 1. **Coverage** — every acceptance criterion, in every task, has a step that produces it.
161
+ 2. **Decisions** — every locked decision from planning is respected. A locked decision was
162
+ chosen by the human. A plan that quietly departs from one is a defect whether or not the
163
+ resulting code works.
164
+ 3. **Closure** — no step depends on something the plan never defines. If a type, function,
165
+ file, or value appears as a dependency and never as an output, the plan has a hole in it.
166
+
167
+ A failure is reported as `❌ blocked` **before any code exists**, naming which criterion or
168
+ decision has nothing behind it. This is the same halt-and-report contract you already carry,
169
+ fired at the cheapest possible moment.
170
+ </HARD-GATE>
171
+
172
+ ### Whether the approach is right
173
+
174
+ The three checks above are mechanical. Whether the approach is a *good* one is judgement,
175
+ and who supplies it follows the story's dispatch label (see `verification-loop` §4):
176
+
177
+ - **AFK** — self-validation is enough. Run the three checks and proceed.
178
+ - **HITL** — put the plan in front of the user and wait before writing anything.
179
+ - **Either label**, if planning surfaced a decision the discussion phase never covered —
180
+ stop and raise it regardless. A decision discovered while planning is precisely the case
181
+ the label could not have anticipated.
182
+
183
+ ---
184
+
185
+ ## Step 5: TDD — Test-Driven Development
186
+
187
+ <!-- full discipline lives in the tdd-workflow skill, aligned with superpowers:test-driven-development (MIT) -->
188
+
189
+ ### Should I use TDD for this task?
190
+
191
+ Apply the **TDD Detection Heuristic**:
192
+
193
+ > Can I write `expect(fn(input)).toBe(output)` before writing `fn`?
194
+
195
+ - **Yes** → TDD is mandatory. Follow Red → Green → Refactor.
196
+ - **No** (UI, infrastructure, integration, configuration) → Write tests after implementation, but always write tests.
197
+
198
+ ### Red Phase — Write the Failing Test
199
+
200
+ Write a test that describes the expected behavior:
201
+
202
+ ```
203
+ // Test describes WHAT, not HOW
204
+ test("should return user by email", () => {
205
+ const user = getUserByEmail("test@example.com");
206
+ expect(user.name).toBe("Test User");
207
+ });
208
+ ```
209
+
210
+ Run the test. Confirm it **fails**. If it passes, either:
211
+ - The functionality already exists (check before implementing)
212
+ - The test is wrong (it's not testing what you think)
213
+
214
+ ### Green Phase — Make It Pass
215
+
216
+ Write the **minimum code** to make the test pass. No more, no less.
217
+
218
+ Rules:
219
+ - Don't add features the test doesn't require
220
+ - Don't optimize prematurely
221
+ - Don't handle edge cases not covered by tests (write more tests first)
222
+
223
+ Run the test. Confirm it **passes**.
224
+
225
+ ### Refactor Phase — Clean Up
226
+
227
+ With green tests as your safety net, improve the code:
228
+
229
+ - Remove duplication
230
+ - Improve naming
231
+ - Simplify logic
232
+ - Extract functions if needed
233
+
234
+ Run tests after every change. If a test fails, you broke something — fix it before continuing.
235
+
236
+ ### Verification Phase — run the task's loop
237
+
238
+ TDD proved each behaviour as you built it. This proves the **task's acceptance
239
+ criteria**, which is a different claim.
240
+
241
+ Run the command from the task's `## Verification` block. Read its actual output.
242
+ If it is red, fix and run it again, under the bound in `verification-loop` §3:
243
+ three attempts on one failure, or two byte-identical outputs, whichever comes
244
+ first. On hitting the bound, stop and carry the command and its literal output
245
+ into your report — do not summarise the output.
246
+
247
+ If the task declares `verification: manual`, follow its procedure and record what
248
+ you observed. You have not run a loop; say so plainly in the report rather than
249
+ implying one passed.
250
+
251
+ ### Repeat
252
+
253
+ Write the next test for the next behavior. Continue the cycle until all acceptance criteria are met.
254
+
255
+ ---
256
+
257
+ ## Step 6: Checkpoints
258
+
259
+ ### `human-verify` Checkpoint
260
+
261
+ After completing the task, if it has **visual or behavioral impact** that the user should see:
262
+
263
+ > "I've completed {task description}. Here's what changed:
264
+ > - {change 1}
265
+ > - {change 2}
266
+ >
267
+ > Would you like to verify this before I move on?"
268
+
269
+ ### `decision` Checkpoint
270
+
271
+ **If uncertain which path to take, STOP and ask — never proceed on assumption.** If during implementation you encounter a choice not covered by the discussion phase:
272
+
273
+ > "I found a decision point not covered in planning:
274
+ > {describe the options}
275
+ >
276
+ > Which approach do you prefer?"
277
+
278
+ Save the decision as a memory once resolved.
279
+
280
+ ### Automation-First Rule
281
+
282
+ <HARD-GATE>
283
+ If you CAN automate something, you MUST automate it.
284
+ Only ask for human intervention when it's genuinely impossible to proceed without it.
285
+
286
+ Examples of things to automate (don't ask):
287
+ - Running tests
288
+ - Formatting code
289
+ - Installing dependencies
290
+ - Creating files and directories
291
+ - Applying migrations
292
+
293
+ Examples of things that need human action:
294
+ - Approving a deployment to production
295
+ - Providing API keys or credentials
296
+ - Verifying visual design matches expectations
297
+ - Confirming business logic interpretation
298
+ </HARD-GATE>
299
+
300
+ ---
301
+
302
+ ## Step 7: Move Task to Review
303
+
304
+ <!-- adapted from superpowers:verification-before-completion (MIT) — evidence before assertions -->
305
+ **Evidence before assertions.** Don't advance a task because it looks right — run the tests, read the actual output, and confirm each acceptance criterion against that output before proceeding. "Should work" is not the same as "ran and passed."
306
+
307
+ The task's verification command is what supplies that evidence. Advancing a task to
308
+ `review` without having run it green — or without having recorded a `verification:
309
+ manual` observation — is the assertion this rule exists to forbid.
310
+
311
+ Once all acceptance criteria are verifiably met and tests pass:
312
+
313
+ ```
314
+ work_status_next(id: "{task uuid}")
315
+ ```
316
+
317
+ This advances the task forward to the "review" status. **Do NOT call `work_status_done` here** — passing its own tests makes a task ready for review, not done. "Done" only happens after the Reviewer returns ✅, and that final move (`review` → `done`) is the Orchestrator's, not yours (see the `orchestrator` skill §7).
318
+
319
+ ---
320
+
321
+ ## Step 8: Save Implementation Memory
322
+
323
+ Save context that would be useful for future tasks or sessions:
324
+
325
+ ```
326
+ memory_save(
327
+ title: "Implementation — {TASK-KEY} {short description}",
328
+ content: "## What was done\n{summary of changes}\n\n## Key decisions during implementation\n{any new decisions made}\n\n## Files changed\n- {file 1}\n- {file 2}\n\n## Gotchas\n{anything surprising or non-obvious encountered}\n\n## Tests\n{what was tested, any notable test patterns}",
329
+ tags: ["development", "implementation", "{story-key}", "{task-key}"],
330
+ sector: "knowledge"
331
+ )
332
+ ```
333
+
334
+ Only save if there's genuinely useful context. Don't save trivial implementations — the code is its own documentation.
335
+
336
+ ---
337
+
338
+ ## Step 9: Pick Next Task
339
+
340
+ After completing a task, pick the next one from the **handover's own wave-ordered task list** — not from a live API call. The `story-execution` handover already contains every task across every wave for the whole story, so it's the authoritative scope; going back to the API for *new* tasks would risk pulling in tasks added to the story after the handover was dispatched, which are out of scope (see line ~14).
341
+
342
+ - If there are more tasks in the current wave (per the handover's list) → pick one
343
+ - If the current wave is done → move to the next wave (per the handover's list)
344
+ - If every task in the story has reached `review` (implementation complete, awaiting Reviewer) → **run the story loop, then** emit an **`execution-report`** handover (see the `handover-protocol` skill) back to the Orchestrator.
345
+
346
+ The story loop runs the story's own acceptance criteria end to end, under the same
347
+ bound as the task loop. Every task green does not mean the story works — nothing
348
+ else checks this, which is exactly why it runs here.
349
+
350
+ A red story loop is reported as red **even when every task is green**. That
351
+ combination is a finding, not a contradiction to resolve: it usually means the task
352
+ breakdown missed an integration, and the Orchestrator needs to see it rather than
353
+ receive a clean report.
354
+
355
+ Use `work_children(id: "{story uuid}")` only to **verify/check the status** of tasks already in the handover's list (e.g. confirming a dependency reached `review`) — never to discover new tasks to work on. If `work_children` reveals a task under this story that is **not** in the handover's task list, do not execute it — it wasn't in scope when the handover was dispatched. Instead, note it as an open question ("Open questions") in the `execution-report` handover so the Orchestrator can decide whether to bring it into scope.
356
+
357
+ ---
358
+
359
+ ## Workflow Checklist
360
+
361
+ For each task, verify:
362
+
363
+ - [ ] Task was read and understood (description, acceptance criteria, dependencies)
364
+ - [ ] Relevant memories and decisions were searched
365
+ - [ ] Dependencies are complete
366
+ - [ ] Task moved to in_progress
367
+ - [ ] Existing code was read before writing new code
368
+ - [ ] An implementation plan was written and saved to the `plans` sector before any code
369
+ - [ ] Coverage, decisions, and closure all checked against that plan
370
+ - [ ] TDD cycle completed (or tests written after for non-TDD-suitable tasks)
371
+ - [ ] All acceptance criteria are met
372
+ - [ ] Tests pass
373
+ - [ ] The task's verification command ran green, or its manual procedure was observed and recorded
374
+ - [ ] The story loop ran green before the report was emitted
375
+ - [ ] Task moved to review (never directly to done — that's the Orchestrator's move after Reviewer ✅)
376
+ - [ ] Implementation memory saved (if non-trivial)
377
+
378
+ ---
379
+
380
+ ## What Comes Next
381
+
382
+ Emit the `execution-report` handover: files changed, tests added, status per acceptance criterion (not a blanket "done"), any new decisions made along the way, and any open questions. The Orchestrator decides from there whether to dispatch Reviewer or, if this is a `correction` round, loop back with more specific findings.
383
+
384
+ **If you are working in a git worktree**, the Orchestrator that dispatched you owns landing
385
+ the branch — do not merge, do not remove the worktree, do not close your own pane. Name the
386
+ branch in your `execution-report` so it knows what to land.
387
+
388
+ **If you are working directly in the main checkout** and no Orchestrator is coordinating, the
389
+ branch is yours to finish: load the `branch-landing` skill once the story's tasks are through
390
+ review.
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: handover-protocol
3
+ description: The shared contract for handing off context between Allye workflow phases as copy-pasted chat text. Use when a phase skill is ending and needs to brief a fresh chat for the next phase (Planning, Technical Planning, Orchestrator, Executor), or when a fresh chat opens with a pasted handover and needs to detect which skill to load.
4
+ version: "1.3"
5
+ category: methodology
6
+ ---
7
+
8
+ # Handover Protocol
9
+
10
+ A handover is how context moves between Allye workflow phases without carrying a chat's full history forward. Each phase runs in its own fresh, lean-context conversation; when it finishes, it emits a handover — a block of chat text the user reads, approves, and pastes as the first message of the next chat. The next chat's bootstrap detects the marker and loads the right skill automatically.
11
+
12
+ **A handover is never saved as a memory or a file.** The Allye doc and work items it references are the durable record — the handover text itself is a disposable transport vehicle, copied by hand in both directions (including Orchestrator ↔ Executor's correction loop).
13
+
14
+ <!-- adapted from humanlayer/humanlayer create_handoff/resume_handoff (Apache-2.0) — the discipline that a handoff must be complete enough that the receiving chat needs nothing else -->
15
+
16
+ ## 1. The shared marker
17
+
18
+ Every handover starts with the same one-line marker and ends with the same reminder. Everything between them is specific to the handover's type — see §2.
19
+
20
+ ```markdown
21
+ ## 🔄 Allye Handover — {type}
22
+ **Skill to load:** {skill-slug}
23
+
24
+ ...type-specific body — see references/{type}.md...
25
+
26
+ ---
27
+ If anything is unclear, STOP and ask — don't proceed on a guess.
28
+ ```
29
+
30
+ The bootstrap skill (`using-allye`) scans the first message of every fresh conversation for the `## 🔄 Allye Handover` line. When found, it parses `{type}` and `Skill to load`, loads that skill directly, and skips its own phase-detection heuristic. See `using-allye`'s "Handover detection" step.
31
+
32
+ **Templates in this skill and in `references/` are written in English — that's the source, not the output.** When actually generating a handover for the user, follow the plugin's language principle same as everywhere else: respond in the user's language. Section headers (`### Objective`, `### Required reading`, etc.) and body prose get written in whatever language the conversation is in — a Portuguese-speaking user gets `### Objetivo`, `### Leitura obrigatória`, and so on. **Only two things stay fixed in every language**, because auto-detection parses them literally: the `## 🔄 Allye Handover — {type}` marker line and the `**Skill to load:**` field name. Never translate those two.
33
+
34
+ ## 2. The catalog
35
+
36
+ Six types. Each is a distinct handoff with its own objective and field set — not a generic form filled in differently. Full templates live in `references/`.
37
+
38
+ | Type | Transition | Objective | Template |
39
+ |---|---|---|---|
40
+ | `discovery-to-planning` | Sandbox → Planning | Turn the approved direction into a deliverable structure | `references/discovery-to-planning.md` |
41
+ | `planning-to-technical` | Planning → Tech Planning | Technically detail the approved squares | `references/planning-to-technical.md` |
42
+ | `technical-to-orchestration` | Tech Planning → Orchestrator | Drive delivery of the planned scope (feature, or a whole epic) | `references/technical-to-orchestration.md` |
43
+ | `story-execution` | Orchestrator → Executor | Implement exactly one story | `references/story-execution.md` |
44
+ | `execution-report` | Executor → Orchestrator | Return the implementation result | `references/execution-report.md` |
45
+ | `correction` | Orchestrator → Executor | Fix specific review findings | `references/correction.md` |
46
+
47
+ **Neither reviewer axis ever receives a handover.** `reviewer-standards` and `reviewer-spec` are both invoked<!-- opencode-exclude:start --> via the `Agent` tool<!-- opencode-exclude:end --> with a constructed prompt (story + tasks + files changed), dispatched by the Orchestrator — not by a pasted handover.
48
+
49
+ <!-- opencode-exclude:start -->
50
+ **Executor is reachable both ways.** In manual mode it receives `story-execution`/`correction` handovers as documented above. In automatic mode (Orchestrator's choice, offered per story) it's dispatched via the `Agent` tool instead, the same way the reviewer axes are — see `agents/executor.md`. Either way the content is the same; only the transport differs.
51
+ <!-- opencode-exclude:end -->
52
+
53
+ ## 3. Writing a good handover (mandatory checklist)
54
+
55
+ <!-- adapted from humanlayer/humanlayer create_handoff (Apache-2.0) and EveryInc/compound-engineering-plugin artifact_readiness contracts (MIT) -->
56
+
57
+ Before emitting any handover, confirm:
58
+
59
+ - **Concrete keys, not vague pointers.** "The story we discussed" is not acceptable — write the actual `STORY-KEY`. The receiving chat has zero memory of this conversation.
60
+ - **References carry an explicit read instruction, not just keys.** The handover must tell the receiver to actually fetch and read what it lists — work items via `work_get`/`work_children` (the entire subtree under the parent, when the handover is scoped to a parent item like a feature or epic), docs via `doc_get`. A key list without a "read all of this" instruction invites skimming, and the receiving chat has no other way to know reading is mandatory.
61
+ - **Locked decisions are carried forward, verbatim.** If a decision was locked in this phase, restate it in the handover — don't make the next chat re-derive or, worse, re-litigate it.
62
+ - **Scope matches the type.** `story-execution` carries exactly one story; `correction` carries only the failed findings, not the whole story again. Padding a handover with everything "just in case" defeats the purpose of a lean next chat.
63
+ - **The reminder line is never dropped.** Every handover ends with the "stop and ask" line — it's the single most important sentence in this whole protocol.
64
+ <!-- adapted from mattpocock/skills triage AGENT-BRIEF (MIT) — durability of handoff artifacts -->
65
+ - **Name interfaces and contracts, not file paths and line numbers.** Write "the `SkillConfig`
66
+ type gains an optional `schedule` field", never "open `src/types/skill.ts` and edit line 42."
67
+ A handover can be read hours later, by a different agent, in a worktree where the tree has
68
+ already moved — a line number is wrong by then and a contract is not. The one exception is a
69
+ snippet that encodes a decision more precisely than prose can (a schema, a state machine, a
70
+ type shape); include it, trimmed to the decision.
71
+
72
+ ## 4. Auto-detection (implemented in `using-allye`)
73
+
74
+ Detection logic lives in `using-allye`'s bootstrap (checked before its phase-detection table), not duplicated here — see `skills/using-allye/SKILL.md` §2. This skill defines the *contract*; `using-allye` implements the *routing*.
@@ -0,0 +1,32 @@
1
+ # Handover: correction
2
+
3
+ **Emitted by:** `orchestrator`
4
+ **Received by:** `execution` (the same Executor chat/session that produced the original implementation, when possible)
5
+ **Objective:** Fix specific review findings — this handover is deliberately narrow. It never re-briefs the whole story; that would defeat the point of a lean, targeted correction pass.
6
+
7
+ ## Before emitting, confirm
8
+
9
+ - Only the ❌ findings are included — ✅ and ⚠️ items are not corrections, don't pad this handover with them.
10
+ - The correction round number is tracked — per spec §6.4, at most **2** correction handovers are ever emitted for the same task. If the 2nd correction round's review also comes back ❌ (i.e., the 3rd review failure on that task), the Orchestrator does not emit a 3rd correction handover — it stops and escalates to the human instead.
11
+ - Each finding is quoted from the Reviewer's actual output, not paraphrased — paraphrasing risks losing precision about what exactly needs to change.
12
+
13
+ ## Template
14
+
15
+ ```markdown
16
+ ## 🔄 Allye Handover — correction
17
+ **Skill to load:** execution
18
+
19
+ ### Objective
20
+ Fix the review findings below in {STORY-KEY} — nothing more.
21
+
22
+ ### Findings to fix (❌ only)
23
+ - {TASK-KEY}: "{reviewer finding, quoted literally}"
24
+ - {TASK-KEY}: "{reviewer finding, quoted literally}"
25
+
26
+ ### Correction round
27
+ This is correction attempt {N} for this story.
28
+ {If N is greater than 2, the Orchestrator shouldn't be emitting this handover — the max is 2 correction handovers per task; a 3rd review failure escalates to the user instead of producing a 3rd handover. See skills/orchestrator.}
29
+
30
+ ---
31
+ Fix ONLY what's listed above — don't redo the whole story. If anything is unclear, STOP and ask — don't proceed on a guess.
32
+ ```