allye-opencode 1.2.7 → 1.3.0

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 +430 -257
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -228,8 +228,7 @@ Before creating anything, have a conversation with the user to understand:
228
228
  5. **Are there constraints?** \u2014 Timeline, tech stack, dependencies, compliance
229
229
 
230
230
  <EXTREMELY_IMPORTANT>
231
- Do NOT jump to creating work items before you understand the business context.
232
- Ask questions. Clarify ambiguities. The quality of planning depends on the quality of understanding.
231
+ Reach full understanding of the business context before creating any work item \u2014 ask questions and clarify ambiguities. The quality of planning depends on the quality of understanding.
233
232
  </EXTREMELY_IMPORTANT>
234
233
 
235
234
  <!-- adapted from bmad-code-org/BMAD-METHOD create-epics-and-stories (MIT) -->
@@ -311,19 +310,12 @@ Wait for the user to approve, modify, or add to this structure before proceeding
311
310
 
312
311
  ## Step 4: Check Board and Statuses
313
312
 
314
- Before creating items, understand the available statuses:
315
-
316
313
  \`\`\`
317
314
  work_statuses()
318
315
  board_columns()
319
316
  \`\`\`
320
317
 
321
- This ensures you know:
322
- - What status categories exist (backlog, todo, in_progress, etc.)
323
- - Which board columns are available
324
- - The correct status to assign to new items
325
-
326
- New items should typically be created in **backlog** or **todo** status.
318
+ This surfaces the available status categories and board columns, so you know the correct status for new items \u2014 typically **backlog** or **todo**.
327
319
 
328
320
  ---
329
321
 
@@ -428,7 +420,7 @@ memory_save(
428
420
  title: "Planning \u2014 {Epic name} scope and decisions",
429
421
  content: "## Scope\\n{what was included/excluded and why}\\n\\n## Key decisions\\n- {decision 1}: {rationale}\\n- {decision 2}: {rationale}\\n\\n## Hierarchy\\n{the approved structure}\\n\\n## Open questions\\n{anything deferred}",
430
422
  tags: ["planning", "decision", "{epic-key}"],
431
- work_item_id: "{epic uuid}"
423
+ sector: "decisions"
432
424
  )
433
425
  \`\`\`
434
426
 
@@ -453,9 +445,7 @@ Before considering product planning complete, verify:
453
445
  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.`;
454
446
  var TECHNICAL_PLANNING = `# Technical Planning Workflow
455
447
 
456
- 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.
457
-
458
- Use this when the user has a story and wants to: plan tasks, discuss approach, evaluate technical options, or break down implementation work.
448
+ Turns a story into actionable tasks through a **Discussion Phase** \u2014 surfacing gray areas, capturing decisions, and writing tasks with verifiable acceptance criteria and a runnable verification command.
459
449
 
460
450
  **Never assume \u2014 always ask.** The user knows the direction they want, sometimes only after researching further. Your job is to surface the gray areas and present real options, not to quietly pick one and present it as the plan.
461
451
 
@@ -521,9 +511,9 @@ If tasks already exist, review them instead of creating new ones. The user may w
521
511
  ## Step 3: Discussion Phase
522
512
 
523
513
  <EXTREMELY_IMPORTANT>
524
- Do NOT create tasks before completing the discussion phase.
525
- The purpose of discussion is to surface ambiguity BEFORE committing to a plan.
526
- Skipping this leads to rework, wrong assumptions, and wasted effort.
514
+ Complete the discussion phase \u2014 surfacing ambiguity before committing to a plan \u2014
515
+ before creating any task. Skipping it leads to rework, wrong assumptions, and
516
+ wasted effort.
527
517
  </EXTREMELY_IMPORTANT>
528
518
 
529
519
  ### 3.1 Identify Gray Areas
@@ -582,7 +572,7 @@ memory_save(
582
572
  title: "Decision \u2014 {short description}",
583
573
  content: "## Decision\\n{what was decided}\\n\\n## Classification\\n{locked | agent-discretion}\\n\\n## Why\\n{rationale}\\n\\n## Context\\nStory: {story key}\\nGray area: {what was ambiguous}",
584
574
  tags: ["decision", "{story-key}", "{topic}"],
585
- work_item_id: "{story uuid}"
575
+ sector: "decisions"
586
576
  )
587
577
  \`\`\`
588
578
 
@@ -597,6 +587,11 @@ Before moving to task creation, confirm with the user:
597
587
  >
598
588
  > Are we good to proceed with task creation?"
599
589
 
590
+ Also state the story's derived dispatch label: **AFK** if every task got a runnable
591
+ verification command, **HITL** if any task declared \`verification: manual\`. The
592
+ Orchestrator reads this rather than guessing, so a wrong label here becomes a story
593
+ dispatched to an unattended pane that then sits waiting for a human who is not watching.
594
+
600
595
  ---
601
596
 
602
597
  ## Step 4: Create Tasks
@@ -606,7 +601,6 @@ Before moving to task creation, confirm with the user:
606
601
  Design tasks that are:
607
602
 
608
603
  - **Atomic** \u2014 Each task produces a single, verifiable outcome
609
- - **Ordered by dependency** \u2014 Independent tasks first, dependent tasks after
610
604
  - **Concrete** \u2014 No vague tasks like "set up the project" or "implement the feature"
611
605
 
612
606
  **Split by concern when a story spans them.** A story touching frontend, backend, and data modeling is usually 3+ tasks, not one \u2014 the Wave mechanic below (4.4) handles the ordering (e.g., data modeling before frontend when the payload shape is a hard dependency). These are illustrative categories, not a fixed taxonomy: decide the actual split with the user, scenario by scenario.
@@ -617,9 +611,42 @@ Design tasks that are:
617
611
  ### 4.2 Deep Work Rule
618
612
 
619
613
  <HARD-GATE>
620
- Every task MUST have verifiable acceptance criteria in its description.
621
- A task without acceptance criteria is not a task \u2014 it's a wish.
622
- Do not create tasks that cannot be objectively verified as complete.
614
+ Every task carries verifiable acceptance criteria in its description \u2014 a task
615
+ without them is not a task, it's a wish.
616
+ </HARD-GATE>
617
+
618
+ ### 4.2.1 Verification Rule
619
+
620
+ <HARD-GATE>
621
+ Every task carries a \`## Verification\` block: either a command that runs as
622
+ written, or \`verification: manual\` with the procedure. A task with neither
623
+ is not a task \u2014 a criterion nobody can check is a criterion nobody will.
624
+
625
+ Write the command while you still have the design in your head. Deferring it
626
+ to the Executor means it gets written by someone reconstructing your intent
627
+ from a description.
628
+
629
+ \`verification: manual\` is a legitimate answer for visual, infrastructure, and
630
+ one-off work \u2014 see \`verification-loop\` \xA74. It is not a shortcut for "I did not
631
+ want to think of a command": declaring it makes the whole story HITL, which
632
+ costs the Orchestrator its ability to dispatch that story unattended.
633
+ </HARD-GATE>
634
+
635
+ ### 4.2.2 No Placeholders
636
+
637
+ <HARD-GATE>
638
+ A task description contains what someone needs to do the work, not a promise to supply it
639
+ later. These are defects in a task, not shorthand:
640
+
641
+ - "TBD", "TODO", "details to follow"
642
+ - "Add appropriate error handling" \u2014 which errors, handled how?
643
+ - "Handle edge cases" \u2014 which ones? An edge case nobody named is an edge case nobody covers.
644
+ - "Similar to {other task}" \u2014 say it again here. Tasks are read in isolation and out of order.
645
+ - A criterion naming a type, function, or file that no task defines and no \`Interfaces\`
646
+ block produces.
647
+
648
+ Each of these reads as complete and defers the actual decision to whoever implements \u2014 who
649
+ has less context than you do right now, and no way to ask you.
623
650
  </HARD-GATE>
624
651
 
625
652
  ### 4.3 Task Description Template
@@ -633,8 +660,13 @@ Do not create tasks that cannot be objectively verified as complete.
633
660
  - [ ] {Criterion 2}
634
661
  - [ ] {Criterion 3}
635
662
 
636
- ## How to Verify
637
- {How to confirm this task is done \u2014 e.g., run tests, check endpoint, verify UI}
663
+ ## Verification
664
+ {The exact command, runnable as written. It must be red-capable, deterministic,
665
+ fast, and agent-runnable \u2014 see the \`verification-loop\` skill \xA71.}
666
+
667
+ {or, when no such command exists:}
668
+ verification: manual
669
+ {the exact procedure a human follows, and what they should observe}
638
670
 
639
671
  ## Files Likely Involved
640
672
  - {file/path/1}
@@ -643,10 +675,21 @@ Do not create tasks that cannot be objectively verified as complete.
643
675
  ## Dependencies
644
676
  - {Depends on TASK-XX} or "None \u2014 can be done independently"
645
677
 
678
+ ## Interfaces
679
+ **Consumes:** {names, types, and signatures this task calls that another task in this story
680
+ produces \u2014 or "Nothing from other tasks"}
681
+ **Produces:** {names, types, and signatures other tasks will call. Exact, not descriptive:
682
+ \`createSession(userId: string): Session\`, not "a session creator".}
683
+
646
684
  ## Decisions Applied
647
685
  - {Reference locked/agent-discretion decisions from discussion phase}
648
686
  \`\`\`
649
687
 
688
+ The \`Interfaces\` block exists because whoever implements a task sees **only that task**.
689
+ Dependencies tell them what must finish first; interfaces tell them what to call when it
690
+ has. Writing "a session creator" instead of the signature moves the naming decision to
691
+ whoever implements second, and they will name it something else.
692
+
650
693
  ### 4.4 Analyze Dependencies
651
694
 
652
695
  Group tasks into **waves** based on dependencies:
@@ -695,13 +738,12 @@ work_bulk_create(work_items: [
695
738
 
696
739
  ## Step 5: Move Story to In Progress
697
740
 
698
- Once tasks are created and the plan is approved:
699
-
700
741
  \`\`\`
701
742
  work_status_next(id: "{story uuid}")
702
743
  \`\`\`
703
744
 
704
- This moves the story forward in the board progression (typically from backlog/todo to in_progress).
745
+ Once tasks are created and the plan is approved, this moves the story forward in the
746
+ board progression (typically backlog/todo \u2192 in_progress).
705
747
 
706
748
  ---
707
749
 
@@ -714,8 +756,7 @@ memory_save(
714
756
  title: "Technical Plan \u2014 {STORY-KEY} {story title}",
715
757
  content: "## Story\\n{story key and title}\\n\\n## Decisions\\n{list of locked and agent-discretion decisions}\\n\\n## Task Breakdown\\n{wave structure with task keys}\\n\\n## Execution Order\\n{which tasks first, which depend on what}\\n\\n## Risks\\n{identified risks or uncertainties}",
716
758
  tags: ["planning", "technical-plan", "{story-key}"],
717
- work_item_id: "{story uuid}",
718
- sprint_id: "{sprint uuid if applicable}"
759
+ sector: "plans"
719
760
  )
720
761
  \`\`\`
721
762
 
@@ -730,6 +771,10 @@ Before considering technical planning complete, verify:
730
771
  - [ ] Gray areas were identified and discussed with the user
731
772
  - [ ] All decisions are classified (locked vs agent-discretion) and saved as memories
732
773
  - [ ] Tasks have verifiable acceptance criteria
774
+ - [ ] Every task has a \`## Verification\` block \u2014 a runnable command, or \`verification: manual\` with a procedure
775
+ - [ ] Every task's \`Interfaces\` block names exact signatures, not descriptions
776
+ - [ ] No task description contains a placeholder or an unnamed edge case
777
+ - [ ] The story's AFK/HITL label is derived and stated
733
778
  - [ ] Dependencies are mapped and wave structure is defined
734
779
  - [ ] Tasks are created in Allye with proper parent relationship
735
780
  - [ ] Story is moved to in_progress
@@ -786,28 +831,102 @@ Before dispatching, do a quick completeness check on the story's tasks: does eac
786
831
  <!-- adapted from EveryInc/compound-engineering-plugin lfg (MIT) \u2014 verify the previous step's artifact before proceeding -->
787
832
  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.
788
833
 
789
- 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 active team (id and name), the story key, the task keys, and the files changed from the execution report.
834
+ Once the report is genuinely complete, dispatch **both** \`reviewer-standards\` and
835
+ \`reviewer-spec\` \u2014 in parallel, in the same turn, automatically, without asking the user
836
+ first. Review never needs to pause and ask anyone anything, which is what makes it always
837
+ dispatch-appropriate.
838
+
839
+ Pass each the same fields: the active team (id and name), the story key, the task keys,
840
+ and the files changed from the execution report. \`reviewer-spec\` additionally gets the
841
+ per-criterion verification evidence the report carried \u2014 it reviews against that evidence,
842
+ so a report that omits it produces a review that cannot confirm anything.
790
843
 
791
844
  ## 6. React to review
792
845
 
793
- Reviewer returns its standard \u2705/\u26A0\uFE0F/\u274C-per-task output (unchanged from the \`review\` skill \u2014 no new format to learn).
846
+ Two reports arrive, one per axis. **Record both verbatim.** Never merge them, never
847
+ rerank findings across them, never resolve a disagreement between them \u2014 each axis
848
+ reviewed something the other deliberately ignored, so a disagreement is not a conflict
849
+ to settle.
850
+
851
+ The *findings* stay separate. The *decision* is single, and combines them:
852
+
853
+ | Standards | Spec | Outcome |
854
+ |---|---|---|
855
+ | \u2705 | \u2705 | Advance the task through the team's pipeline per \xA77 \u2014 one status at a time, stopping at the first gate you cannot satisfy |
856
+ | \u26A0\uFE0F only | \u2705 | Advance as above; record the warnings as a note so they are not lost |
857
+ | \u2705 | \u26A0\uFE0F only | Advance as above; record the warnings as a note |
858
+ | \u274C | any | Correction round |
859
+ | any | \u274C | Correction round |
794
860
 
795
- - **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).
796
- - **\u26A0\uFE0F warnings only, no \u274C** \u2192 a warning isn't a blocker: proceed to the status cascade (\xA77) the same as All \u2705. Don't silently discard the warnings and don't force an unnecessary correction round either \u2014 record them as a note (in the task's context, or as a memory) so they're not lost.
797
- - **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.
861
+ A \u274C on either axis triggers a correction round on its own. **One axis passing never offsets the other failing** \u2014 that offsetting is exactly the masking the split exists to
862
+ prevent. The failed task simply stays at \`review\` while the correction round runs: no
863
+ backward move is needed (or possible \u2014 \`work_status_next\` only moves forward, per
864
+ \`allye-board-progression\`), because reaching \`done\` requires your move after both axes
865
+ pass. Loop back to \xA75 once the next execution report arrives.
798
866
 
799
867
  <!-- adapted from bmad-code-org/BMAD-METHOD correct-course (MIT) \u2014 structured change-impact analysis for corrections that ripple beyond one task -->
800
868
  **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.
801
869
 
802
- **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.
870
+ The correction handover carries only the failing axis's \u274C findings, quoted literally, 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).
871
+
872
+ **Decided (spec review, 2026-07-12): at most 2 correction handovers are ever emitted for the same task.** The existing two-correction maximum counts rounds **per task**, regardless of which axis produced them: a task corrected once for standards and once for spec has used
873
+ both rounds, and a third failure escalates to the human. Two correction rounds failing for
874
+ different specific reasons is normal; a third failure usually means something deeper is
875
+ being missed, and it's worth a human look before burning another round.
803
876
 
804
877
  ## 7. Status cascade \u2014 continuous, not just at the end
805
878
 
806
- Apply this at every level, as work actually completes \u2014 not once at the tail end of the whole feature:
879
+ Both review axes clear (\xA76) \u2192 the task is ready to leave the review gate. **Where it goes next
880
+ depends on the team's pipeline, not on a status this skill can name.**
881
+
882
+ 1. **Advance one status.** \`work_status_next(id)\`. Then **read the item back** \u2014 \`work_get\` \u2014
883
+ and see where you actually landed. Do not predict: \`work_statuses()\` does not return
884
+ position or pipeline, and \`board_columns()\` does not map statuses to columns, so the next
885
+ status is not computable from the MCP surface (see \`board-progression\` \xA71).
886
+
887
+ 2. **Did you land on a done-category status?** Then the task is finished; go to step 5.
888
+
889
+ 3. **Otherwise, consult the pipeline handoff table** in the \`Allye Delivery Configuration\`
890
+ Core Document (\`user_config\`, loaded by \`initialize\`).
891
+
892
+ - **\`agent\`** \u2014 satisfy it, then return to step 1. Satisfying means running the command the
893
+ table names and reading its output, under the bound in \`verification-loop\` \xA73. Red at the
894
+ bound is a correction round, not a pass.
895
+ - **\`ci\`** \u2014 you do not act. Report that the task is waiting on the named external signal
896
+ and move to the next story; revisit when the signal arrives.
897
+ - **\`human\`**, or **any status not in the table** \u2014 stop. Name the status, say who owns it,
898
+ and leave the task exactly where it is.
807
899
 
808
- 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.
809
- 2. Story done \u2192 \`work_children\` on the parent feature \u2192 all done? \u2192 \`work_status_done\` the feature.
810
- 3. Feature done \u2192 \`work_children\` on the parent epic \u2192 all done? \u2192 \`work_status_done\` the epic.
900
+ 4. **A status you do not recognise and the table does not cover** is a stop, and also a
901
+ question: ask the user once who satisfies it, record the answer in the delivery
902
+ configuration, and continue. Never ask twice.
903
+
904
+ 5. **Cascade upward, and only upward.** \`work_children\` the parent; if **every** child is in
905
+ the done category, advance the parent the same way \u2014 one step, read back, consult the table.
906
+ A parent stops for the same reasons a child does.
907
+
908
+ <HARD-GATE>
909
+ **Never call \`work_status_done\` to leave a pipeline you cannot finish.** From four statuses
910
+ away it records "done" for work that never passed the gates between \u2014 which is exactly how a
911
+ story came to be closed with seven of its fifteen tasks still at the review gate.
912
+
913
+ Use it only when the item's next status **is** the done status. When you cannot finish, stopping
914
+ is the correct outcome, not a failure to report.
915
+ </HARD-GATE>
916
+
917
+ ## 7.2 Announce where delivery stopped
918
+
919
+ When a story's tasks are all parked at the same gate, say so once, plainly: which gate, who
920
+ owns it, and what unblocks it. Repeat it in the session-state memory (\xA710) so a resumed
921
+ Orchestrator does not rediscover the boundary by trying to cross it.
922
+
923
+ A story left open at a gate is **not** an incomplete delivery. It is delivery reporting its
924
+ true position. The failure mode this replaces \u2014 closing the story to make the board look
925
+ finished \u2014 cost a real board seven tasks' worth of untracked work.
926
+
927
+ When delivery stops at a gate, the branch stops with it \u2014 see \`branch-landing\` \xA71. Say that
928
+ explicitly in the announcement: the story is parked, and so is its code. A human reading only
929
+ the board would otherwise assume the branch already landed.
811
930
 
812
931
  ## 8. Epic completion is manual
813
932
 
@@ -823,9 +942,8 @@ Unclear assignee, no active sprint to assign into, conflicting or unexpected sta
823
942
  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, correction-round count per task (so the 2-correction-max escalation rule survives a resumed session). 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.`;
824
943
  var TECHNICAL_DEVELOPMENT = `# Technical Development Workflow
825
944
 
826
- This skill guides you through implementing a task with discipline: read existing code first, write tests, implement, refactor, and track progress in Allye.
827
-
828
- Use this when the user wants to: write code, implement a task, fix a bug, add functionality, or develop features.
945
+ Implements one task with discipline: read the existing code first, drive it with TDD,
946
+ verify it actually works, and track progress in Allye.
829
947
 
830
948
  **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 \u2014 nothing else. A \`correction\` handover carries only the failed findings, not the whole story again; fix exactly what it lists.
831
949
 
@@ -935,6 +1053,70 @@ Do not read endlessly in search of additional context. Reading is preparation, n
935
1053
 
936
1054
  ---
937
1055
 
1056
+ ## Step 4.5: Plan the Implementation
1057
+
1058
+ You have read the code and written none. This is where you state *how* you will build it,
1059
+ and check that statement against what was asked for \u2014 while being wrong still costs a
1060
+ paragraph rather than a branch.
1061
+
1062
+ ### Write the plan
1063
+
1064
+ Per task in this story:
1065
+
1066
+ - **Approach** \u2014 the shape of the change, in a sentence or two.
1067
+ - **Files** \u2014 what you will create or modify. Names, never line numbers; the tree moves.
1068
+ - **Interfaces produced** \u2014 the names, types, and signatures other tasks in this story will
1069
+ call. Whoever implements a neighbouring task sees only their own task description, so
1070
+ this is the only place they learn what to call.
1071
+ - **How each criterion goes green** \u2014 for every acceptance criterion, which step makes its
1072
+ \`## Verification\` command pass. A criterion with no step against it is the finding this
1073
+ whole exercise exists to produce.
1074
+
1075
+ Save it:
1076
+
1077
+ \`\`\`
1078
+ memory_save(
1079
+ title: "Implementation Plan \u2014 {STORY-KEY} {story title}",
1080
+ content: "## Per task\\n{approach, files, interfaces produced, criterion \u2192 step}\\n\\n## Order\\n{which task first, and why}\\n\\n## Open questions\\n{anything planning did not settle, or 'None'}",
1081
+ tags: ["plan", "implementation", "{story-key}"],
1082
+ sector: "plans"
1083
+ )
1084
+ \`\`\`
1085
+
1086
+ It outlives the session. A resumed Executor reads what was intended rather than inferring
1087
+ it from half-written code, and \`reviewer-spec\` can compare the implementation against the
1088
+ plan and not only against the criteria.
1089
+
1090
+ ### Validate it
1091
+
1092
+ <HARD-GATE>
1093
+ Three checks, run every time, before writing any code:
1094
+
1095
+ 1. **Coverage** \u2014 every acceptance criterion, in every task, has a step that produces it.
1096
+ 2. **Decisions** \u2014 every locked decision from planning is respected. A locked decision was
1097
+ chosen by the human. A plan that quietly departs from one is a defect whether or not the
1098
+ resulting code works.
1099
+ 3. **Closure** \u2014 no step depends on something the plan never defines. If a type, function,
1100
+ file, or value appears as a dependency and never as an output, the plan has a hole in it.
1101
+
1102
+ A failure is reported as \`\u274C blocked\` **before any code exists**, naming which criterion or
1103
+ decision has nothing behind it. This is the same halt-and-report contract you already carry,
1104
+ fired at the cheapest possible moment.
1105
+ </HARD-GATE>
1106
+
1107
+ ### Whether the approach is right
1108
+
1109
+ The three checks above are mechanical. Whether the approach is a *good* one is judgement,
1110
+ and who supplies it follows the story's dispatch label (see \`verification-loop\` \xA74):
1111
+
1112
+ - **AFK** \u2014 self-validation is enough. Run the three checks and proceed.
1113
+ - **HITL** \u2014 put the plan in front of the user and wait before writing anything.
1114
+ - **Either label**, if planning surfaced a decision the discussion phase never covered \u2014
1115
+ stop and raise it regardless. A decision discovered while planning is precisely the case
1116
+ the label could not have anticipated.
1117
+
1118
+ ---
1119
+
938
1120
  ## Step 5: TDD \u2014 Test-Driven Development
939
1121
 
940
1122
  <!-- full discipline lives in the tdd-workflow skill, aligned with superpowers:test-driven-development (MIT) -->
@@ -986,6 +1168,21 @@ With green tests as your safety net, improve the code:
986
1168
 
987
1169
  Run tests after every change. If a test fails, you broke something \u2014 fix it before continuing.
988
1170
 
1171
+ ### Verification Phase \u2014 run the task's loop
1172
+
1173
+ TDD proved each behaviour as you built it. This proves the **task's acceptance
1174
+ criteria**, which is a different claim.
1175
+
1176
+ Run the command from the task's \`## Verification\` block. Read its actual output.
1177
+ If it is red, fix and run it again, under the bound in \`verification-loop\` \xA73:
1178
+ three attempts on one failure, or two byte-identical outputs, whichever comes
1179
+ first. On hitting the bound, stop and carry the command and its literal output
1180
+ into your report \u2014 do not summarise the output.
1181
+
1182
+ If the task declares \`verification: manual\`, follow its procedure and record what
1183
+ you observed. You have not run a loop; say so plainly in the report rather than
1184
+ implying one passed.
1185
+
989
1186
  ### Repeat
990
1187
 
991
1188
  Write the next test for the next behavior. Continue the cycle until all acceptance criteria are met.
@@ -1042,6 +1239,10 @@ Examples of things that need human action:
1042
1239
  <!-- adapted from superpowers:verification-before-completion (MIT) \u2014 evidence before assertions -->
1043
1240
  **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."
1044
1241
 
1242
+ The task's verification command is what supplies that evidence. Advancing a task to
1243
+ \`review\` without having run it green \u2014 or without having recorded a \`verification:
1244
+ manual\` observation \u2014 is the assertion this rule exists to forbid.
1245
+
1045
1246
  Once all acceptance criteria are verifiably met and tests pass:
1046
1247
 
1047
1248
  \`\`\`
@@ -1061,8 +1262,7 @@ memory_save(
1061
1262
  title: "Implementation \u2014 {TASK-KEY} {short description}",
1062
1263
  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}",
1063
1264
  tags: ["development", "implementation", "{story-key}", "{task-key}"],
1064
- work_item_id: "{task uuid}",
1065
- sprint_id: "{sprint uuid if applicable}"
1265
+ sector: "knowledge"
1066
1266
  )
1067
1267
  \`\`\`
1068
1268
 
@@ -1076,7 +1276,16 @@ After completing a task, pick the next one from the **handover's own wave-ordere
1076
1276
 
1077
1277
  - If there are more tasks in the current wave (per the handover's list) \u2192 pick one
1078
1278
  - If the current wave is done \u2192 move to the next wave (per the handover's list)
1079
- - 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
1279
+ - If every task in the story has reached \`review\` (implementation complete, awaiting Reviewer) \u2192 **run the story loop, then** emit an **\`execution-report\`** handover (see the \`handover-protocol\` skill) back to the Orchestrator.
1280
+
1281
+ The story loop runs the story's own acceptance criteria end to end, under the same
1282
+ bound as the task loop. Every task green does not mean the story works \u2014 nothing
1283
+ else checks this, which is exactly why it runs here.
1284
+
1285
+ A red story loop is reported as red **even when every task is green**. That
1286
+ combination is a finding, not a contradiction to resolve: it usually means the task
1287
+ breakdown missed an integration, and the Orchestrator needs to see it rather than
1288
+ receive a clean report.
1080
1289
 
1081
1290
  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\`) \u2014 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 \u2014 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.
1082
1291
 
@@ -1091,9 +1300,13 @@ For each task, verify:
1091
1300
  - [ ] Dependencies are complete
1092
1301
  - [ ] Task moved to in_progress
1093
1302
  - [ ] Existing code was read before writing new code
1303
+ - [ ] An implementation plan was written and saved to the \`plans\` sector before any code
1304
+ - [ ] Coverage, decisions, and closure all checked against that plan
1094
1305
  - [ ] TDD cycle completed (or tests written after for non-TDD-suitable tasks)
1095
1306
  - [ ] All acceptance criteria are met
1096
1307
  - [ ] Tests pass
1308
+ - [ ] The task's verification command ran green, or its manual procedure was observed and recorded
1309
+ - [ ] The story loop ran green before the report was emitted
1097
1310
  - [ ] Task moved to review (never directly to done \u2014 that's the Orchestrator's move after Reviewer \u2705)
1098
1311
  - [ ] Implementation memory saved (if non-trivial)
1099
1312
 
@@ -1101,13 +1314,19 @@ For each task, verify:
1101
1314
 
1102
1315
  ## What Comes Next
1103
1316
 
1104
- 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.`;
1317
+ 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.
1318
+
1319
+ **If you are working in a git worktree**, the Orchestrator that dispatched you owns landing
1320
+ the branch \u2014 do not merge, do not remove the worktree, do not close your own pane. Name the
1321
+ branch in your \`execution-report\` so it knows what to land.
1322
+
1323
+ **If you are working directly in the main checkout** and no Orchestrator is coordinating, the
1324
+ branch is yours to finish: load the \`branch-landing\` skill once the story's tasks are through
1325
+ review.`;
1105
1326
  var TECHNICAL_REVIEW = `# Technical Review Workflow
1106
1327
 
1107
1328
  This skill guides you through reviewing implemented code with full context \u2014 the decisions made during planning, the acceptance criteria defined for each task, and the architectural constraints captured in memories.
1108
1329
 
1109
- Use this when the user wants to: review code, check implementation quality, validate against requirements, or prepare for delivery.
1110
-
1111
1330
  ---
1112
1331
 
1113
1332
  ## Workflow Overview
@@ -1143,47 +1362,41 @@ This gives you:
1143
1362
 
1144
1363
  ---
1145
1364
 
1146
- ## Step 2: Review Each Task
1147
-
1148
- For each completed task, verify:
1365
+ ## Step 2: Review Each Task \u2014 Two Axes
1149
1366
 
1150
- ### 2.1 Acceptance Criteria
1367
+ <!-- adapted from mattpocock/skills code-review (MIT) -->
1151
1368
 
1152
- Check the task description's acceptance criteria one by one:
1369
+ Review runs as two independent passes. Keep them separate on the page and separate in
1370
+ your head, and **do not reconcile them**: a change can pass one and fail the other, and
1371
+ reporting them together is what lets one hide the other.
1153
1372
 
1154
- - [ ] Is each criterion met?
1155
- - [ ] Can each criterion be verified (test, endpoint, UI)?
1156
- - [ ] Are there criteria that were silently skipped?
1373
+ > Code that follows every standard but implements the wrong thing \u2192 **Standards pass,
1374
+ > Spec fail.**
1375
+ > Code that does exactly what was asked but breaks the project's conventions \u2192 **Spec
1376
+ > pass, Standards fail.**
1157
1377
 
1158
- ### 2.2 Code Quality
1378
+ ### Axis 1 \u2014 Standards: how it is written
1159
1379
 
1160
- Review the actual code changes against these standards:
1380
+ Load team standards first (\`skill_list\` \u2192 \`skill_get\`); they override everything below.
1381
+ Then: consistency with existing patterns, security, error handling, naming, and test
1382
+ quality \u2014 do the tests assert behaviour rather than implementation, cover edge cases,
1383
+ and break for the right reasons?
1161
1384
 
1162
- | Check | What to look for |
1163
- |-------|-----------------|
1164
- | **Correctness** | Does it do what the acceptance criteria say? |
1165
- | **Consistency** | Does it follow existing patterns in the codebase? |
1166
- | **Simplicity** | Is it the simplest solution that works? No over-engineering? |
1167
- | **Test coverage** | Are there tests? Do they test behavior, not implementation details? |
1168
- | **Security** | No injection vulnerabilities, no exposed secrets, proper auth checks? |
1169
- | **Error handling** | Are failure cases handled? Are errors informative? |
1170
- | **Naming** | Are variables, functions, and files named clearly? |
1385
+ Full checklist and the baseline smells: \`agents/reviewer-standards.md\`.
1171
1386
 
1172
- ### 2.3 Decision Compliance
1387
+ ### Axis 2 \u2014 Spec: whether it is what was asked for
1173
1388
 
1174
- Check that the implementation respects the decisions from the planning phase:
1389
+ Every acceptance criterion, one at a time, against the verification evidence the
1390
+ execution report carried. A criterion reported met with no command output or observed
1391
+ procedure behind it is **unverified**, and gets reported as unverified rather than met.
1392
+ Then locked-decision compliance \u2014 any deviation is a defect \u2014 and unrequested scope.
1175
1393
 
1176
- - **Locked decisions** \u2014 Were they followed exactly? Any deviation is a defect.
1177
- - **Agent-discretion decisions** \u2014 Were they reasonable? Is the rationale documented?
1394
+ Full checklist: \`agents/reviewer-spec.md\`.
1178
1395
 
1179
- ### 2.4 Test Quality
1396
+ ### Reporting
1180
1397
 
1181
- Review the tests themselves:
1182
-
1183
- - Do tests describe behavior (what), not implementation (how)?
1184
- - Are edge cases covered?
1185
- - Can tests break for the right reasons (behavior changed) and not for the wrong ones (refactoring)?
1186
- - Are there tests that test nothing meaningful (e.g., testing that a mock returns what you told it to)?
1398
+ Two reports, never merged, never reranked. The decision that combines them belongs to
1399
+ the Orchestrator \u2014 see \`orchestrator\` \xA76.
1187
1400
 
1188
1401
  ---
1189
1402
 
@@ -1196,7 +1409,7 @@ memory_save(
1196
1409
  title: "Review \u2014 {STORY-KEY} approved",
1197
1410
  content: "## Review Summary\\nAll tasks reviewed and approved.\\n\\n## Tasks Reviewed\\n- {TASK-1}: \u2705 Criteria met, tests pass\\n- {TASK-2}: \u2705 Criteria met, tests pass\\n\\n## Notes\\n{any observations for future reference}",
1198
1411
  tags: ["review", "approved", "{story-key}"],
1199
- work_item_id: "{story uuid}"
1412
+ sector: "knowledge"
1200
1413
  )
1201
1414
  \`\`\`
1202
1415
 
@@ -1227,7 +1440,7 @@ memory_save(
1227
1440
  title: "Review \u2014 {STORY-KEY} changes requested",
1228
1441
  content: "## Findings\\n{detailed findings per task}\\n\\n## Required Changes\\n- {change 1}\\n- {change 2}\\n\\n## Approved Tasks\\n- {list of tasks that passed}",
1229
1442
  tags: ["review", "changes-requested", "{story-key}"],
1230
- work_item_id: "{story uuid}"
1443
+ sector: "knowledge"
1231
1444
  )
1232
1445
  \`\`\`
1233
1446
 
@@ -1254,11 +1467,11 @@ If you can run the test suite, do it:
1254
1467
 
1255
1468
  - [ ] Story and all tasks loaded
1256
1469
  - [ ] Planning decisions and implementation memories retrieved
1257
- - [ ] Each task reviewed against acceptance criteria
1258
- - [ ] Code quality checked (correctness, consistency, simplicity, security)
1259
- - [ ] Locked decisions verified as respected
1260
- - [ ] Tests reviewed for quality and coverage
1261
- - [ ] Findings documented and saved as memory
1470
+ - [ ] Axis 2: each task's acceptance criteria checked against its verification evidence
1471
+ - [ ] Axis 2: locked decisions verified as respected
1472
+ - [ ] Axis 1: consistency, security, error handling, and naming checked
1473
+ - [ ] Axis 1: tests reviewed for quality and coverage
1474
+ - [ ] Findings documented and saved as memory, two axes kept separate
1262
1475
  - [ ] Tests run and passing
1263
1476
 
1264
1477
  ---
@@ -1270,7 +1483,7 @@ If the review passes, transition to **Delivery** \u2014 load the \`delivery\` sk
1270
1483
  If changes are needed, the developer addresses the findings (back to **Technical Development**), then returns here for re-review.`;
1271
1484
  var TECHNICAL_DELIVERY = `# Technical Delivery Workflow
1272
1485
 
1273
- This skill guides you through the final steps of delivering a story: verifying all tasks are complete, closing the story, updating documentation, and saving a final delivery memory.
1486
+ This skill finalizes a story after every task has passed review \u2014 closing it out, documenting what shipped, and clearing loose ends.
1274
1487
 
1275
1488
  Use this when: all tasks for a story are implemented and reviewed, and the user is ready to finalize delivery.
1276
1489
 
@@ -1293,9 +1506,15 @@ work_children(id: "{story uuid}")
1293
1506
  \`\`\`
1294
1507
 
1295
1508
  <HARD-GATE>
1296
- Do NOT close the story if any task is not in "done" status.
1297
- Every task must be completed and verified before the story can be delivered.
1298
- If tasks are incomplete, go back to Technical Development or Technical Review.
1509
+ Close the story only once every task is completed, verified, and in "done" status.
1510
+ If any task is incomplete, route back to Technical Development or Technical Review instead of closing.
1511
+
1512
+ "Done" means the **done category**, not the last status an agent could reach. On a pipeline
1513
+ with stages after review, a task parked at a gate the team satisfies by hand is not done \u2014 it
1514
+ is waiting, and the story waits with it.
1515
+
1516
+ If tasks are parked, close-out is not blocked by an oversight. It is **not yet due**. Say which
1517
+ gate they are waiting at and stop; do not close the story to tidy the board.
1299
1518
  </HARD-GATE>
1300
1519
 
1301
1520
  ### Verification checklist
@@ -1332,6 +1551,25 @@ work_status_done(id: "{feature uuid}")
1332
1551
 
1333
1552
  ---
1334
1553
 
1554
+ ## Step 2.5: Land the Code
1555
+
1556
+ The story is closed in Allye. The code is still on a branch.
1557
+
1558
+ Load the \`branch-landing\` skill and follow it. It asks how the work should land \u2014 pull
1559
+ request, local merge, or left alone \u2014 and carries the sequence that gets it there without
1560
+ losing anything.
1561
+
1562
+ <HARD-GATE>
1563
+ Do not skip this because the story is already closed. Closing the item and landing the code
1564
+ are different acts, and doing the first without the second produces the worst available
1565
+ state: a board that says delivered and a base branch that does not have the work.
1566
+
1567
+ If the story reached this skill while still parked at a pipeline gate, it should not have \u2014
1568
+ see Step 1. The branch stays where it is.
1569
+ </HARD-GATE>
1570
+
1571
+ ---
1572
+
1335
1573
  ## Step 3: Update Documentation
1336
1574
 
1337
1575
  If the delivered work introduced or changed functionality that should be documented:
@@ -1397,10 +1635,9 @@ Save a final summary of what was delivered:
1397
1635
  \`\`\`
1398
1636
  memory_save(
1399
1637
  title: "Delivered \u2014 {STORY-KEY} {story title}",
1400
- 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## Lessons learned\\n{anything worth remembering for similar work in the future}",
1638
+ 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 \u2014 or \\"not yet landed: {reason}\\"}\\n\\n## Lessons learned\\n{anything worth remembering for similar work in the future}",
1401
1639
  tags: ["delivery", "completed", "{story-key}", "{feature-key}"],
1402
- work_item_id: "{story uuid}",
1403
- sprint_id: "{sprint uuid if applicable}"
1640
+ sector: "knowledge"
1404
1641
  )
1405
1642
  \`\`\`
1406
1643
 
@@ -1410,6 +1647,7 @@ memory_save(
1410
1647
 
1411
1648
  - [ ] All tasks verified as done
1412
1649
  - [ ] Story moved to done
1650
+ - [ ] The code landed, or the reason it has not is recorded
1413
1651
  - [ ] Feature moved to done (if all stories complete)
1414
1652
  - [ ] Documentation created or updated (if applicable)
1415
1653
  - [ ] Related TODOs cleaned up
@@ -1425,13 +1663,13 @@ The story is delivered. The user can:
1425
1663
  - **Start a new initiative** \u2192 Back to Product Planning from scratch`;
1426
1664
  var TDD_WORKFLOW = `# TDD Workflow
1427
1665
 
1428
- This skill defines the Test-Driven Development discipline for implementing code with Allye workflows. TDD is not about writing tests \u2014 it's about **designing code through tests**.
1666
+ TDD is not about writing tests \u2014 it's about **designing code through tests**.
1429
1667
 
1430
1668
  ---
1431
1669
 
1432
1670
  ## 1. TDD Detection Heuristic
1433
1671
 
1434
- Before implementing anything, ask yourself:
1672
+ Before implementing anything, ask:
1435
1673
 
1436
1674
  > **Can I write \`expect(fn(input)).toBe(output)\` before writing \`fn\`?**
1437
1675
 
@@ -1468,12 +1706,11 @@ The only question is whether the test comes before or after the implementation.
1468
1706
 
1469
1707
  ## 2. The Red-Green-Refactor Cycle
1470
1708
 
1471
- ### Red \u2014 Write a Failing Test
1709
+ ### Red \u2014 write a failing test
1472
1710
 
1473
- Write a test that describes the behavior you want:
1711
+ Write a test that describes the target behavior, not the implementation:
1474
1712
 
1475
1713
  \`\`\`javascript
1476
- // Good: tests WHAT, not HOW
1477
1714
  test("should return 404 when user not found", async () => {
1478
1715
  const response = await request(app).get("/users/nonexistent");
1479
1716
  expect(response.status).toBe(404);
@@ -1481,19 +1718,9 @@ test("should return 404 when user not found", async () => {
1481
1718
  });
1482
1719
  \`\`\`
1483
1720
 
1484
- \`\`\`python
1485
- # Good: tests behavior, not implementation
1486
- def test_calculate_discount_for_premium_user():
1487
- user = User(tier="premium")
1488
- order = Order(total=100.00)
1489
- assert calculate_discount(user, order) == 15.00
1490
- \`\`\`
1491
-
1492
- **Run the test. It MUST fail.** If it passes:
1493
- - The functionality already exists \u2014 don't reimplement it
1494
- - The test is wrong \u2014 it's not testing what you think
1721
+ **Run the test. It MUST fail.** If it passes, either the functionality already exists (don't reimplement it) or the test is wrong (it's not testing what you think).
1495
1722
 
1496
- ### Green \u2014 Make It Pass
1723
+ ### Green \u2014 make it pass
1497
1724
 
1498
1725
  Write the **minimum code** to make the test pass:
1499
1726
 
@@ -1508,17 +1735,11 @@ Rules for the Green phase:
1508
1735
 
1509
1736
  **Run the test. It MUST pass.**
1510
1737
 
1511
- ### Refactor \u2014 Clean Up
1738
+ ### Refactor \u2014 clean up
1512
1739
 
1513
- With green tests as your safety net:
1740
+ With green tests as your safety net: remove duplication, improve naming, simplify logic, extract functions where the code is too long, apply patterns where they genuinely help.
1514
1741
 
1515
- - Remove duplication
1516
- - Improve naming
1517
- - Simplify logic
1518
- - Extract functions if the code is too long
1519
- - Apply patterns where they genuinely help
1520
-
1521
- **Run tests after EVERY change.** If a test fails, you broke something \u2014 undo and try again.
1742
+ **Run tests after EVERY change.** A failing test means you broke something \u2014 undo and try again.
1522
1743
 
1523
1744
  ### Repeat
1524
1745
 
@@ -1526,55 +1747,12 @@ Write the next test for the next behavior. Continue the cycle until all acceptan
1526
1747
 
1527
1748
  ---
1528
1749
 
1529
- ## 3. Test Quality Guidelines
1530
-
1531
- ### Write tests that describe behavior
1532
-
1533
- \`\`\`javascript
1534
- // Bad: tests implementation details
1535
- test("should call userRepository.findById", () => { ... });
1536
-
1537
- // Good: tests observable behavior
1538
- test("should return user profile for valid ID", () => { ... });
1539
- \`\`\`
1540
-
1541
- ### One assertion per concept
1542
-
1543
- \`\`\`python
1544
- # Bad: testing multiple unrelated things
1545
- def test_user_creation():
1546
- user = create_user("alice", "alice@example.com")
1547
- assert user.name == "alice"
1548
- assert user.email == "alice@example.com"
1549
- assert user.created_at is not None
1550
- assert send_welcome_email.called # different concern!
1551
-
1552
- # Good: separate tests for separate concepts
1553
- def test_user_created_with_correct_fields():
1554
- user = create_user("alice", "alice@example.com")
1555
- assert user.name == "alice"
1556
- assert user.email == "alice@example.com"
1557
-
1558
- def test_welcome_email_sent_on_creation():
1559
- create_user("alice", "alice@example.com")
1560
- assert send_welcome_email.called
1561
- \`\`\`
1562
-
1563
- ### Test edge cases
1750
+ ## 3. Test Quality
1564
1751
 
1565
- After the happy path passes, add tests for:
1566
- - Empty inputs
1567
- - Invalid inputs
1568
- - Boundary values
1569
- - Error conditions
1570
- - Concurrent access (if applicable)
1571
-
1572
- ### Name tests clearly
1573
-
1574
- The test name should read like a specification:
1575
- - \`should return empty list when no users match filter\`
1576
- - \`should throw validation error when email is invalid\`
1577
- - \`should retry request up to 3 times on timeout\`
1752
+ - **Assert on behavior, not implementation** \u2014 \`should return user profile for valid ID\`, not \`should call userRepository.findById\`. Tests coupled to implementation break on every refactor.
1753
+ - **One assertion per concept.** A test that checks unrelated things (fields set *and* an email was sent) hides which concept broke when it fails \u2014 split into separate tests.
1754
+ - **Cover the edges** after the happy path passes: empty inputs, invalid inputs, boundary values, error conditions, concurrent access where applicable.
1755
+ - **Name tests as specifications** \u2014 \`should throw validation error when email is invalid\`, \`should retry request up to 3 times on timeout\`.
1578
1756
 
1579
1757
  ---
1580
1758
 
@@ -1596,24 +1774,9 @@ The test name should read like a specification:
1596
1774
 
1597
1775
  ## 5. Testing Patterns
1598
1776
 
1599
- ### Arrange-Act-Assert (AAA)
1600
-
1601
- \`\`\`javascript
1602
- test("should apply discount to order total", () => {
1603
- // Arrange
1604
- const order = createOrder({ total: 100, coupon: "SAVE10" });
1605
-
1606
- // Act
1607
- const result = applyDiscount(order);
1777
+ Structure each test **Arrange-Act-Assert**: set up state, perform the one action under test, assert the result.
1608
1778
 
1609
- // Assert
1610
- expect(result.total).toBe(90);
1611
- });
1612
- \`\`\`
1613
-
1614
- ### Test doubles hierarchy
1615
-
1616
- Use the simplest double that works:
1779
+ Use the simplest test double that works:
1617
1780
 
1618
1781
  | Double | When to use |
1619
1782
  |--------|-------------|
@@ -1622,15 +1785,7 @@ Use the simplest double that works:
1622
1785
  | **Mock** | Set expectations upfront. Use sparingly \u2014 prefer stubs + assertions. |
1623
1786
  | **Fake** | Lightweight implementation (e.g., in-memory DB). Use for integration tests. |
1624
1787
 
1625
- ### Boundary testing
1626
-
1627
- Test at the edges of your system, not in the middle:
1628
-
1629
- \`\`\`
1630
- [External Input] \u2192 [Your Boundary] \u2192 [Your Logic] \u2192 [Your Boundary] \u2192 [External Output]
1631
- \u2191 \u2191 \u2191
1632
- Validate here Test here Test here
1633
- \`\`\`
1788
+ Test at your system's boundaries \u2014 validate at the input boundary, assert at the output boundary \u2014 rather than reaching into the middle.
1634
1789
 
1635
1790
  ---
1636
1791
 
@@ -1645,7 +1800,7 @@ Test at the edges of your system, not in the middle:
1645
1800
  | "Tests break when I refactor" | Tests are coupled to implementation | Rewrite tests to assert on behavior, not implementation details. |`;
1646
1801
  var BOARD_PROGRESSION = `# Board Progression
1647
1802
 
1648
- This skill defines how to correctly move work items between statuses using Allye boards. Understanding board progression prevents incorrect status transitions and ensures accurate project tracking.
1803
+ How to move work items between statuses on Allye boards, correctly.
1649
1804
 
1650
1805
  ---
1651
1806
 
@@ -1660,22 +1815,51 @@ The MCP client can only **confirm** 4 status categories \u2014 \`work_statuses()
1660
1815
  | \`done\` | Completed and verified |
1661
1816
  | \`cancelled\` | Will not be done |
1662
1817
 
1663
- That's the only taxonomy the MCP client source guarantees. Specific status **names** (e.g. "Backlog", "Todo", "In Progress", "Testing", "Review", "Deploying", "Done") are team-configurable \`WorkflowStatus\` records mapped onto those 4 categories via board columns \u2014 they are not enumerable or guaranteed from the client code alone, and a given team's board may use different names or skip some of them.
1818
+ That's the only taxonomy the MCP client source guarantees. Specific status **names** are team-configurable \`WorkflowStatus\` records mapped onto those 4 categories via board columns \u2014 not enumerable or guaranteed from the client code alone, and a given team's board may use different names or skip some of them.
1664
1819
 
1665
- With that caveat, the finer-grained progression below is a common, practical convention (not something the client confirms) that this skill assumes as its default working model, because most teams do configure something like it:
1820
+ ### The team's pipeline is data. Read it.
1666
1821
 
1667
- | Status name (convention) | Meaning |
1668
- |----------|---------|
1669
- | \`backlog\` | Not yet planned \u2014 sitting in the backlog |
1670
- | \`todo\` | Planned and ready to start |
1671
- | \`in_progress\` | Actively being worked on |
1672
- | \`testing\` | Implementation done, being tested |
1673
- | \`review\` | Code review in progress |
1674
- | \`deploying\` | Being deployed to an environment |
1675
- | \`done\` | Completed and verified |
1676
- | \`cancelled\` | Will not be done |
1822
+ Allye is multi-tenant. Four presets ship \u2014 Solo, Startup, Standard, Enterprise \u2014 and every
1823
+ team customises from there, so **there is no status list to memorise and no ordering to
1824
+ assume.** A skill that names a status has guessed about somebody else's board.
1825
+
1826
+ Only three things are stable enough to build a rule on:
1827
+
1828
+ | Stable | Why |
1829
+ |---|---|
1830
+ | The four categories: \`proposed\`, \`in_progress\`, \`done\`, \`cancelled\` | A schema enum. Every status maps to exactly one. |
1831
+ | The three pipelines: \`product\`, \`engineering\`, \`shared\` | A schema enum. \`product\` carries epics and features; \`engineering\` carries stories and below; \`shared\` holds the terminal states. |
1832
+ | The board's own ordering | Whatever it is, it is what \`work_status_next\` walks. |
1677
1833
 
1678
- Each team can customize their board with different columns and map statuses to columns as they see fit. Before relying on any specific status name, check \`work_statuses()\` (categories + actual names for the team) and \`board_columns()\` (which columns exist on the board in question).
1834
+ Discover the rest:
1835
+
1836
+ \`\`\`
1837
+ work_statuses() \u2192 every status the team has, grouped by category, in position order
1838
+ board_columns() \u2192 the columns of a specific board
1839
+ \`\`\`
1840
+
1841
+ **Two things \`work_statuses()\` does not tell you today**, and planning around them is the
1842
+ difference between a working transition and a surprised one:
1843
+
1844
+ - **\`position\`, \`pipeline\`, and \`description\` are not returned.** They exist on the record \u2014
1845
+ the seed writes all three \u2014 but the MCP formatter emits only name, key, id, and colour.
1846
+ - **\`board_columns()\` returns names and ids only** \u2014 no status-to-column mapping and no
1847
+ ordering. The visible subset a given board shows cannot be reconstructed from it.
1848
+
1849
+ Together these mean **you cannot reliably predict the next status.** So do not:
1850
+
1851
+ <HARD-GATE>
1852
+ Move one status at a time, then **read back** the status you actually landed on. Never
1853
+ assume a transition took you where you expected, and never chain several moves on a
1854
+ prediction. One extra read per transition costs nothing next to a cascade that silently
1855
+ skipped four gates.
1856
+ </HARD-GATE>
1857
+
1858
+ For reference only, these are the eighteen statuses the presets seed \u2014 **an example of one
1859
+ tenant's configuration, not a list to code against**: \`idea\`, \`researching\`, \`designing\`,
1860
+ \`specifying\`, \`backlog\`, \`todo\`, \`in_progress\`, \`code_review\`, \`security_scan\`, \`qa_testing\`,
1861
+ \`doc_review\`, \`deploy_staging\`, \`qa_staging\`, \`deploy_preprod\`, \`qa_preprod\`, \`deploy_prod\`,
1862
+ \`done\`, \`cancelled\`.
1679
1863
 
1680
1864
  ---
1681
1865
 
@@ -1705,12 +1889,7 @@ Each team can customize their board with different columns and map statuses to c
1705
1889
  work_status_next(id: "{work item uuid}")
1706
1890
  \`\`\`
1707
1891
 
1708
- Use this for **forward progression** through the workflow:
1709
- - Backlog \u2192 Todo (item is planned)
1710
- - Todo \u2192 In Progress (work starts)
1711
- - In Progress \u2192 Testing (implementation done)
1712
- - Testing \u2192 Review (tests pass)
1713
- - Review \u2192 Done (review approved)
1892
+ Use it for **forward progression**, one status at a time, as each step's work actually finishes \u2014 how progression differs by pipeline and item type is in \xA75.
1714
1893
 
1715
1894
  ### When NOT to use
1716
1895
 
@@ -1749,6 +1928,32 @@ Verify all acceptance criteria before marking an item as done.
1749
1928
 
1750
1929
  ---
1751
1930
 
1931
+ ## 3.1 Where an agent's authority ends
1932
+
1933
+ > **An agent drives everything that is verification. It stops at the first gate that changes
1934
+ > the world outside the repository.**
1935
+
1936
+ Deploying does that. Verifying does not. The rule survives renaming because it describes what
1937
+ a gate *is*, not what it is called \u2014 which is the only kind of rule that works when every
1938
+ team configures its own statuses.
1939
+
1940
+ In practice, on the seeded presets: reviewing, scanning, testing, and updating docs are all
1941
+ verification and all satisfiable by an agent. Every deploy stage, and any validation
1942
+ performed in a deployed environment, is not.
1943
+
1944
+ <HARD-GATE>
1945
+ \`work_status_done\` is **not** the exit from a pipeline an agent cannot finish. Calling it
1946
+ from four statuses away records "done" for work that never passed the gates in between.
1947
+
1948
+ Use it only when the item's next status **is** the done status. Otherwise stop at the last
1949
+ gate you satisfied and say plainly which gate is next and who owns it.
1950
+ </HARD-GATE>
1951
+
1952
+ An unrecognised status is treated as a stop, not a pass. Ask once who satisfies it, record
1953
+ the answer in the team's delivery configuration, and never ask again.
1954
+
1955
+ ---
1956
+
1752
1957
  ## 4. Checking Available Statuses
1753
1958
 
1754
1959
  Before moving items, understand what statuses exist:
@@ -1773,52 +1978,20 @@ Returns the board's columns for the given \`board_id\` \u2014 each rendered as \
1773
1978
 
1774
1979
  ## 5. Progression Patterns by Item Type
1775
1980
 
1776
- ### Epic
1777
-
1778
- Epics typically move through few statuses:
1779
- \`\`\`
1780
- backlog \u2192 in_progress \u2192 done
1781
- \`\`\`
1782
- - Move to \`in_progress\` when the first feature starts
1783
- - Move to \`done\` when ALL features are complete
1784
-
1785
- ### Feature
1981
+ Progression differs by pipeline, not only by type. **Epics and features live on the \`product\`
1982
+ pipeline; stories, bugs, hotfixes, tasks, spikes, and subtasks live on \`engineering\`.** A
1983
+ cascade from task to epic therefore crosses pipelines, and the statuses available on each side
1984
+ are different sets.
1786
1985
 
1787
- Features follow the epic pattern:
1788
- \`\`\`
1789
- backlog \u2192 in_progress \u2192 done
1790
- \`\`\`
1791
- - Move to \`in_progress\` when the first story starts
1792
- - Move to \`done\` when ALL stories are complete
1986
+ What holds regardless of the team's configuration:
1793
1987
 
1794
- ### Story
1795
-
1796
- Stories follow the full progression:
1797
- \`\`\`
1798
- backlog \u2192 todo \u2192 in_progress \u2192 review \u2192 done
1799
- \`\`\`
1800
- - \`todo\`: planned and ready to start (tasks created)
1801
- - \`in_progress\`: at least one task is being worked on
1802
- - \`review\`: all tasks done, story-level review in progress
1803
- - \`done\`: review passed, delivered
1804
-
1805
- ### Task
1806
-
1807
- Tasks are the most granular:
1808
- \`\`\`
1809
- todo \u2192 in_progress \u2192 review \u2192 done
1810
- \`\`\`
1811
- - \`in_progress\`: actively being implemented
1812
- - \`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
1813
- - \`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)
1814
-
1815
- ### Bug
1816
-
1817
- Bugs follow a similar path to tasks:
1818
- \`\`\`
1819
- todo \u2192 in_progress \u2192 testing \u2192 done
1820
- \`\`\`
1821
- - \`testing\`: fix implemented, verifying it resolves the issue
1988
+ - **Parents move because children moved.** A story advances when its tasks do; a feature when
1989
+ its stories do; an epic when its features do. Never the other way round.
1990
+ - **A parent never reaches the done category while any child is outside it.** This is the one
1991
+ rule that failed in practice: a story closed with seven of fifteen tasks still mid-pipeline,
1992
+ because closing it was the only exit the flow offered. Stopping is the exit.
1993
+ - **The Executor advances a task only to the first review gate.** The move past that is the
1994
+ Orchestrator's, after review clears \u2014 see \`orchestrator\` \xA76.
1822
1995
 
1823
1996
  ---
1824
1997
 
@@ -1827,7 +2000,7 @@ todo \u2192 in_progress \u2192 testing \u2192 done
1827
2000
  | Mistake | Why it's wrong | Do this instead |
1828
2001
  |---------|---------------|-----------------|
1829
2002
  | Moving story to done before all tasks are done | Misrepresents progress | Check \`work_children\` first \u2014 all tasks must be done |
1830
- | 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 |
2003
+ | Marking a task done as soon as its own tests pass | Done requires review approval, not just green tests | \`work_status_next\` once, to the first review gate, and stop; the Orchestrator carries it from there \u2014 see \xA73.1 |
1831
2004
  | Skipping statuses with repeated \`work_status_next\` | Loses tracking fidelity | Only advance when the work for that status is actually complete |
1832
2005
  | Moving to in_progress without planning | No tasks = no accountability | Run Technical Planning first, create tasks, then advance |
1833
2006
  | Forgetting to check board structure | Different teams may have different progressions | Always check \`board_columns\` if unsure about available statuses |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allye-opencode",
3
- "version": "1.2.7",
3
+ "version": "1.3.0",
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",