allye-opencode 1.2.2 → 1.2.3

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.
Files changed (2) hide show
  1. package/dist/index.js +44 -39
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -447,7 +447,7 @@ Before considering product planning complete, verify:
447
447
 
448
448
  ## What Comes Next
449
449
 
450
- After items are approved and created, ask the user whether to generate a **\`planning-to-technical\`** handover (see the \`handover-protocol\` skill) for Technical Planning. Include the doc reference (if any) and every created **and** reused key \u2014 Technical Planning has no other way to know which items are which.`;
450
+ After items are approved and created, ask the user whether to generate a **\`planning-to-technical\`** handover (see the \`handover-protocol\` skill) for Technical Planning. Fill the template's \`Doc:\` line with the Discovery Doc reference if one exists upstream (or "Nenhum doc adicional" if not), and list every created **and** reused key \u2014 Technical Planning has no other way to know which items are which.`;
451
451
  var TECHNICAL_PLANNING = `# Technical Planning Workflow
452
452
 
453
453
  This skill guides you through taking a story and turning it into actionable tasks through a **Discussion Phase** \u2014 identifying gray areas, capturing decisions, and creating tasks with verifiable acceptance criteria.
@@ -466,6 +466,14 @@ Get story \u2192 Search context \u2192 Discussion Phase \u2192 Create tasks \u21
466
466
 
467
467
  ---
468
468
 
469
+ ## 0. Scope: one feature, story by story
470
+
471
+ The steps below plan **one story at a time** \u2014 but the unit Technical Planning hands to the Orchestrator is the **feature**. When the target feature has multiple stories (a \`planning-to-technical\` handover usually lists several), work through every story under that feature in sequence, one at a time, running the full workflow (Steps 1\u20136) for each before starting the next.
472
+
473
+ **Emit only ONE \`technical-to-orchestration\` handover, at the very end \u2014 after the last story in the feature is planned, never after each individual story.** That handover must cover every story and every task, grouped by wave, which is only honest once all of the feature's stories have actually been planned. If the session ends before all stories are planned, save session state (Step 6) and resume in a fresh chat \u2014 don't emit a partial feature-level handover.
474
+
475
+ ---
476
+
469
477
  ## Step 1: Get the Story
470
478
 
471
479
  Fetch the story the user wants to plan:
@@ -723,12 +731,15 @@ Before considering technical planning complete, verify:
723
731
  - [ ] Tasks are created in Allye with proper parent relationship
724
732
  - [ ] Story is moved to in_progress
725
733
  - [ ] Planning summary is saved as memory
734
+ - [ ] All of the feature's stories are planned before the \`technical-to-orchestration\` handover is emitted (see \xA70)
726
735
 
727
736
  ---
728
737
 
729
738
  ## What Comes Next
730
739
 
731
- Emit a **\`technical-to-orchestration\`** handover (see the \`handover-protocol\` skill) for the Orchestrator. Spell out the full reading list \u2014 doc, epic, feature, every story, every task, grouped by wave \u2014 and every locked architecture decision. The Orchestrator has no other context; a vague pointer here becomes its problem later.`;
740
+ **If the feature has more stories still unplanned, go back to Step 1 for the next story \u2014 no handover yet (see \xA70).**
741
+
742
+ Once the last story in the feature is planned, emit a **\`technical-to-orchestration\`** handover (see the \`handover-protocol\` skill) for the Orchestrator. Spell out the full reading list \u2014 doc, epic, feature, every story, every task, grouped by wave \u2014 and every locked architecture decision, across all the stories planned in this cycle. The Orchestrator has no other context; a vague pointer here becomes its problem later.`;
732
743
  var ORCHESTRATOR = `# Orchestrator
733
744
 
734
745
  You drive delivery. You don't plan \u2014 that already happened in Technical Planning \u2014 and you don't implement \u2014 that's Executor's job, one fresh chat at a time. You coordinate: who owns what, what's in progress, whether a story is genuinely done, and when to bring in review.
@@ -755,45 +766,36 @@ Move claimed items to \`in_progress\` (\`work_status_next\`) as work on them act
755
766
 
756
767
  ## 4. Dispatch Executor \u2014 one story at a time
757
768
 
758
- Before dispatching, do a quick completeness check on the story's tasks: does each one have concrete, verifiable acceptance criteria \u2014 something you could actually judge as met or not-met? A task like "data modeling" with no defined schema, or "handle errors" with no defined error cases, is not execution-ready. If a task looks underspecified, say so to the user now and resolve it (or route back to \`technical-planning\`) before dispatching \u2014 don't let an obviously vague task go to Executor and discover that the hard way, in either mode below.
759
-
760
- **Ask the user: automatic or manual?**
761
-
762
- - **Manual** (the original flow \u2014 default when unsure): emit a \`story-execution\` handover (\`handover-protocol\` \u2192 \`references/story-execution.md\`) scoped to exactly one story and its tasks. The user runs it in a fresh Executor chat.
763
- - **Automatic**: dispatch the \`executor\` subagent directly via the \`Agent\` tool, in this same conversation. Fill out the exact same fields \`references/story-execution.md\` defines \u2014 story, tasks with acceptance criteria copied in full, locked decisions, applicable code standards, TDD expectation \u2014 and use that filled-out content as the dispatch prompt, instead of a handover the user pastes. **Same information, same template, different transport** \u2014 automatic mode is not a lighter briefing than manual, it's the identical one delivered a different way.
769
+ Before dispatching, do a quick completeness check on the story's tasks: does each one have concrete, verifiable acceptance criteria \u2014 something you could actually judge as met or not-met? A task like "data modeling" with no defined schema, or "handle errors" with no defined error cases, is not execution-ready. If a task looks underspecified, say so to the user now and resolve it (or route back to \`technical-planning\`) before dispatching \u2014 don't let an obviously vague task go to Executor and discover that the hard way.
764
770
 
765
- Either way, the scope is identical: **exactly one story and its tasks, never a whole feature.** Too much scope in one dispatch means it starts making its own planning decisions, which isn't its job in either mode.
771
+ - emit a \`story-execution\` handover (\`handover-protocol\` \u2192 \`references/story-execution.md\`) scoped to exactly one story and its tasks. The user runs it in a fresh Executor chat.
766
772
 
767
- <!-- flagged for override: this is a genuinely new capability, not yet battle-tested against the manual flow's track record -->
768
- **Automatic mode's limit \u2014 the reason this is a choice, not a silent default:** the \`executor\` subagent cannot pause and ask a question, unlike the interactive \`execution\` skill. It follows a halt-and-report contract instead of an ask-a-question one: if a task turns out to be underspecified once it's actually being implemented (the pre-flight check above catches the obvious cases, not all of them), it reports that task back as \`\u274C blocked\` with the specific question, rather than guessing a design to fill the gap. When a dispatch comes back with a blocked task:
769
-
770
- 1. Put the exact question in front of the user yourself \u2014 you can ask, even though the subagent couldn't.
771
- 2. Once answered, re-dispatch the \`executor\` subagent for just that task with the clarification included, or offer to switch that one story to manual mode if the gap turns out to be bigger than a quick answer.
773
+ **exactly one story and its tasks, never a whole feature.** Too much scope in one dispatch means it starts making its own planning decisions, which isn't its job.
772
774
 
773
775
  ## 5. Dispatch Reviewer \u2014 automatic and parallel
774
776
 
775
777
  <!-- adapted from EveryInc/compound-engineering-plugin lfg (MIT) \u2014 verify the previous step's artifact before proceeding -->
776
- When the execution report comes back (handover, in manual mode; direct return value, in automatic mode), don't take "done" at face value \u2014 check the report actually contains what it should before acting on it: files changed listed, tasks reported per acceptance criterion, not just a blanket "finished." An incomplete report is itself a signal to ask for more detail, not something to wave through.
778
+ When the execution report comes back, don't take "done" at face value \u2014 check the report actually contains what it should before acting on it: files changed listed, tasks reported per acceptance criterion, not just a blanket "finished." An incomplete report is itself a signal to ask for more detail, not something to wave through.
777
779
 
778
- Once the report is genuinely complete, dispatch the \`reviewer\` subagent via the \`Agent\` tool \u2014 in parallel, automatically, no need to ask the user first, regardless of which mode Executor ran in. Review never needs to pause and ask anyone anything, which is what makes it always dispatch-appropriate. Pass it: the story key, the task keys, and the files changed from the execution report.
780
+ Once the report is genuinely complete, dispatch the \`reviewer\` subagent \u2014 in parallel, automatically, no need to ask the user first. Review never needs to pause and ask anyone anything, which is what makes it always dispatch-appropriate. Pass it: the story key, the task keys, and the files changed from the execution report.
779
781
 
780
782
  ## 6. React to review
781
783
 
782
784
  Reviewer returns its standard \u2705/\u26A0\uFE0F/\u274C-per-task output (unchanged from the \`review\` skill \u2014 no new format to learn).
783
785
 
784
- - **All \u2705** \u2192 proceed to the status cascade (\xA77).
785
- - **Any \u274C** \u2192 send corrections back, in whichever mode the story is running, using \`references/correction.md\`'s exact fields either way (only the failed findings, the correction-round count, the story reference \u2014 never a full re-brief of the story): emit it as a \`correction\` handover for manual mode, or use the same filled-out fields as the dispatch prompt for a re-dispatch of the \`executor\` subagent for automatic mode. Loop back to \xA75 once the next execution report arrives.
786
+ - **All \u2705** \u2192 move each approved task the rest of the way to \`done\` yourself \u2014 the Executor only advanced it as far as \`review\` \u2014 then proceed to the status cascade (\xA77).
787
+ - **Any \u274C** \u2192 the failed task simply stays at \`review\` while the correction round runs. No backward move is needed (or possible \u2014 \`work_status_next\` only moves forward, per \`allye-board-progression\`): the task never reached \`done\`, because reaching \`done\` requires your move after Reviewer \u2705. Send corrections back using \`references/correction.md\`'s exact fields (only the failed findings, the correction-round count, the story reference \u2014 never a full re-brief of the story): emit it as a \`correction\` handover. Loop back to \xA75 once the next execution report arrives.
786
788
 
787
789
  <!-- adapted from bmad-code-org/BMAD-METHOD correct-course (MIT) \u2014 structured change-impact analysis for corrections that ripple beyond one task -->
788
790
  **Before emitting a routine correction, check whether the finding is actually local.** Most \u274C findings are narrow \u2014 a missed edge case, a broken test. But if a finding suggests something baked into the technical plan itself was wrong (a data model assumption, an architecture choice that doesn't hold), don't just patch around it silently in a correction handover \u2014 that ripples into other tasks and stories that assumed the same thing. Surface it to the user explicitly before continuing; a silent local patch over a wrong foundational assumption just relocates the bug.
789
791
 
790
- **Decided (spec review, 2026-07-12): escalate after 3 failed review rounds on the same task.** Track how many correction handovers this task has already received. On the 3rd \u274C for the same task, do not emit a 4th correction handover \u2014 stop and tell the user. Two rounds of the same task failing review for different specific reasons is normal; three rounds usually means something deeper is being missed, and it's worth a human look before burning a fourth round.
792
+ **Decided (spec review, 2026-07-12): at most 2 correction handovers are ever emitted for the same task.** Track how many correction handovers this task has already received. If a task that has already received 2 correction handovers comes back \u274C again \u2014 i.e., this is the 3rd review failure on that task \u2014 do not emit a 3rd correction handover: stop and escalate to the user instead. Two correction rounds failing for different specific reasons is normal; a third failure usually means something deeper is being missed, and it's worth a human look before burning another round.
791
793
 
792
794
  ## 7. Status cascade \u2014 continuous, not just at the end
793
795
 
794
796
  Apply this at every level, as work actually completes \u2014 not once at the tail end of the whole feature:
795
797
 
796
- 1. Task reaches done (criteria met, tests pass, Reviewer \u2705) \u2192 \`work_children\` on the parent story \u2192 all done? \u2192 \`work_status_done\` the story.
798
+ 1. Reviewer returns \u2705 on a task (criteria met, tests pass) \u2192 **you** move it from \`review\` to \`done\` via \`work_status_done\` (which also records \`completed_at\`) \u2014 the Executor deliberately left it at \`review\`, and this last move is exclusively yours, made only after Reviewer \u2705 \u2192 \`work_children\` on the parent story \u2192 all done? \u2192 \`work_status_done\` the story.
797
799
  2. Story done \u2192 \`work_children\` on the parent feature \u2192 all done? \u2192 \`work_status_done\` the feature.
798
800
  3. Feature done \u2192 \`work_children\` on the parent epic \u2192 all done? \u2192 \`work_status_done\` the epic.
799
801
 
@@ -808,7 +810,7 @@ Unclear assignee, no active sprint to assign into, conflicting or unexpected sta
808
810
 
809
811
  ## 10. Memory
810
812
 
811
- Search at start (\xA71). Save session state before ending \u2014 current position in the feature (which story/wave), what's been dispatched, what's pending review, any escalations raised. If a correction round revealed something worth remembering beyond this session (a wrong assumption, a pattern), save it as its own memory in the appropriate sector, per the \`memory-protocol\` skill \u2014 don't let it live only in this session's state snapshot.`;
813
+ Search at start (\xA71). Save session state before ending \u2014 current position in the feature (which story/wave), what's been dispatched, what's pending review, any escalations raised. If a correction round revealed something worth remembering beyond this session (a wrong assumption, a pattern), save it as its own memory in the appropriate sector, per the \`allye-memory-protocol\` skill \u2014 don't let it live only in this session's state snapshot.`;
812
814
  var TECHNICAL_DEVELOPMENT = `# Technical Development Workflow
813
815
 
814
816
  This skill guides you through implementing a task with discipline: read existing code first, write tests, implement, refactor, and track progress in Allye.
@@ -822,7 +824,7 @@ Use this when the user wants to: write code, implement a task, fix a bug, add fu
822
824
  ## Workflow Overview
823
825
 
824
826
  \`\`\`
825
- Get task \u2192 Search context \u2192 Move to in_progress \u2192 Read code \u2192 TDD (Red \u2192 Green \u2192 Refactor) \u2192 Verify \u2192 Move to done \u2192 Save memory
827
+ Get task \u2192 Search context \u2192 Move to in_progress \u2192 Read code \u2192 TDD (Red \u2192 Green \u2192 Refactor) \u2192 Verify \u2192 Move to review \u2192 Save memory
826
828
  \`\`\`
827
829
 
828
830
  ---
@@ -867,7 +869,7 @@ If the task has dependencies (noted in its description), verify they're complete
867
869
  work_children(id: "{story uuid}")
868
870
  \`\`\`
869
871
 
870
- Check that prerequisite tasks are in "done" status. If they're not done, either:
872
+ Check that prerequisite tasks are in "review" or "done" status \u2014 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:
871
873
  - Pick a different task from the same wave (if available)
872
874
  - Inform the user that this task is blocked
873
875
 
@@ -1023,18 +1025,18 @@ Examples of things that need human action:
1023
1025
 
1024
1026
  ---
1025
1027
 
1026
- ## Step 7: Mark Task as Done
1028
+ ## Step 7: Move Task to Review
1027
1029
 
1028
1030
  <!-- adapted from superpowers:verification-before-completion (MIT) \u2014 evidence before assertions -->
1029
- **Evidence before assertions.** Don't mark a task done because it looks right \u2014 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."
1031
+ **Evidence before assertions.** Don't advance a task because it looks right \u2014 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."
1030
1032
 
1031
1033
  Once all acceptance criteria are verifiably met and tests pass:
1032
1034
 
1033
1035
  \`\`\`
1034
- work_status_done(id: "{task uuid}")
1036
+ work_status_next(id: "{task uuid}")
1035
1037
  \`\`\`
1036
1038
 
1037
- This sets the task to the "done" status and records \`completed_at\`.
1039
+ This advances the task forward to the "review" status. **Do NOT call \`work_status_done\` here** \u2014 passing its own tests makes a task ready for review, not done. "Done" only happens after the Reviewer returns \u2705, and that final move (\`review\` \u2192 \`done\`) is the Orchestrator's, not yours (see the \`orchestrator\` skill \xA77).
1038
1040
 
1039
1041
  ---
1040
1042
 
@@ -1066,7 +1068,7 @@ work_children(id: "{story uuid}")
1066
1068
 
1067
1069
  - If there are more tasks in the current wave \u2192 pick one
1068
1070
  - If the current wave is done \u2192 move to the next wave
1069
- - If all tasks in the story are done \u2192 emit an **\`execution-report\`** handover (see the \`handover-protocol\` skill) back to the Orchestrator
1071
+ - If every task in the story has reached \`review\` (implementation complete, awaiting Reviewer) \u2192 emit an **\`execution-report\`** handover (see the \`handover-protocol\` skill) back to the Orchestrator
1070
1072
 
1071
1073
  ---
1072
1074
 
@@ -1082,7 +1084,7 @@ For each task, verify:
1082
1084
  - [ ] TDD cycle completed (or tests written after for non-TDD-suitable tasks)
1083
1085
  - [ ] All acceptance criteria are met
1084
1086
  - [ ] Tests pass
1085
- - [ ] Task moved to done
1087
+ - [ ] Task moved to review (never directly to done \u2014 that's the Orchestrator's move after Reviewer \u2705)
1086
1088
  - [ ] Implementation memory saved (if non-trivial)
1087
1089
 
1088
1090
  ---
@@ -1219,10 +1221,11 @@ memory_save(
1219
1221
  )
1220
1222
  \`\`\`
1221
1223
 
1222
- If tasks need rework, move them back:
1224
+ If tasks need rework, set their status back explicitly. \`work_status_next\` only moves **forward** (there is no \`work_status_prev\`), so a backward move goes through \`work_update\` with an explicit status id:
1223
1225
 
1224
1226
  \`\`\`
1225
- work_status_next(id: "{task uuid}") // back to in_progress if applicable
1227
+ work_statuses() // find the id of the target status (e.g. "In Progress")
1228
+ work_update(id: "{task uuid}", work_status: "{status uuid}")
1226
1229
  \`\`\`
1227
1230
 
1228
1231
  ---
@@ -1252,7 +1255,7 @@ If you can run the test suite, do it:
1252
1255
 
1253
1256
  ## What Comes Next
1254
1257
 
1255
- If the review passes, transition to **Technical Delivery** \u2014 load the \`allye-technical-delivery\` skill.
1258
+ If the review passes, transition to **Delivery** \u2014 load the \`delivery\` skill (backend slug: \`allye-technical-delivery\`).
1256
1259
 
1257
1260
  If changes are needed, the developer addresses the findings (back to **Technical Development**), then returns here for re-review.`;
1258
1261
  var TECHNICAL_DELIVERY = `# Technical Delivery Workflow
@@ -1371,7 +1374,7 @@ todo_list()
1371
1374
  \`\`\`
1372
1375
 
1373
1376
  For each TODO related to this story:
1374
- - If it's done \u2192 mark as complete: \`todo_update(id: "{todo uuid}", todo_completed: true)\`
1377
+ - If it's done \u2192 mark as complete: \`todo_update(id: "{todo uuid}", status: "completed")\`
1375
1378
  - If it's no longer relevant \u2192 delete: \`todo_delete(id: "{todo uuid}")\`
1376
1379
  - If it's a future task \u2192 leave it, but make sure it's not blocking delivery
1377
1380
 
@@ -1782,10 +1785,11 @@ backlog \u2192 todo \u2192 in_progress \u2192 review \u2192 done
1782
1785
 
1783
1786
  Tasks are the most granular:
1784
1787
  \`\`\`
1785
- todo \u2192 in_progress \u2192 done
1788
+ todo \u2192 in_progress \u2192 review \u2192 done
1786
1789
  \`\`\`
1787
1790
  - \`in_progress\`: actively being implemented
1788
- - \`done\`: acceptance criteria met, tests pass
1791
+ - \`review\`: acceptance criteria met, tests pass \u2014 the Executor advances the task here (\`work_status_next\`) and no further; the task now awaits the Reviewer
1792
+ - \`done\`: Reviewer returned \u2705 \u2014 the **Orchestrator** makes this final move (\`work_status_done\`), never the Executor. If the Reviewer returns \u274C, the task simply stays at \`review\` while a correction round runs (no backward move exists or is needed)
1789
1793
 
1790
1794
  ### Bug
1791
1795
 
@@ -1802,6 +1806,7 @@ todo \u2192 in_progress \u2192 testing \u2192 done
1802
1806
  | Mistake | Why it's wrong | Do this instead |
1803
1807
  |---------|---------------|-----------------|
1804
1808
  | Moving story to done before all tasks are done | Misrepresents progress | Check \`work_children\` first \u2014 all tasks must be done |
1809
+ | Marking a task done as soon as its own tests pass | Done requires Reviewer approval, not just green tests | \`work_status_next\` to \`review\`; the Orchestrator moves it to done after Reviewer \u2705 |
1805
1810
  | Skipping statuses with repeated \`work_status_next\` | Loses tracking fidelity | Only advance when the work for that status is actually complete |
1806
1811
  | Moving to in_progress without planning | No tasks = no accountability | Run Technical Planning first, create tasks, then advance |
1807
1812
  | Forgetting to check board structure | Different teams may have different progressions | Always check \`board_columns\` if unsure about available statuses |
@@ -1986,7 +1991,7 @@ Generate a complete handoff using the shared marker format \u2014 same shape Cla
1986
1991
 
1987
1992
  \`\`\`
1988
1993
  ## \uD83D\uDD04 Allye Handover \u2014 technical-to-orchestration
1989
- **Skill a carregar:** allye-orchestrator
1994
+ **Skill a carregar:** orchestrator
1990
1995
 
1991
1996
  ### Objetivo
1992
1997
  Conduzir a entrega de {FEATURE-KEY} \u2014 {feature title}
@@ -2070,7 +2075,7 @@ Generate a handoff scoped to exactly ONE story and its tasks \u2014 never a whol
2070
2075
 
2071
2076
  \`\`\`
2072
2077
  ## \uD83D\uDD04 Allye Handover \u2014 story-execution
2073
- **Skill a carregar:** allye-build
2078
+ **Skill a carregar:** execution
2074
2079
 
2075
2080
  ### Story
2076
2081
  {STORY-KEY} \u2014 {title}, with acceptance criteria copied in full
@@ -2104,7 +2109,7 @@ Review returns its standard \u2705/\u26A0\uFE0F/\u274C-per-task output.
2104
2109
 
2105
2110
  \`\`\`
2106
2111
  ## \uD83D\uDD04 Allye Handover \u2014 correction
2107
- **Skill a carregar:** allye-build
2112
+ **Skill a carregar:** execution
2108
2113
 
2109
2114
  ### Achados a corrigir (\u274C apenas)
2110
2115
  - {TASK-KEY}: "{finding, quoted literally}"
@@ -2205,7 +2210,7 @@ When all tasks in the current story are done \u2014 or you've hit a genuine bloc
2205
2210
 
2206
2211
  \`\`\`
2207
2212
  ## \uD83D\uDD04 Allye Handover \u2014 execution-report
2208
- **Skill a carregar:** allye-orchestrator
2213
+ **Skill a carregar:** orchestrator
2209
2214
 
2210
2215
  ### Story implementada
2211
2216
  {STORY-KEY} \u2014 {title}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allye-opencode",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Allye multi-agent plugin for OpenCode — planning, building, reviewing, and delivering with structured workflows",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",