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.
- package/README.md +363 -0
- package/docs/install-pi.md +174 -0
- package/package.json +50 -0
- package/packages/allye-pi/src/index.ts +911 -0
- package/packages/allye-pi/tsconfig.json +13 -0
- package/skills/agent-runtime/SKILL.md +124 -0
- package/skills/agent-runtime/references/herdr.md +154 -0
- package/skills/board-progression/SKILL.md +214 -0
- package/skills/branch-landing/SKILL.md +88 -0
- package/skills/delivery/SKILL.md +187 -0
- package/skills/execution/SKILL.md +390 -0
- package/skills/handover-protocol/SKILL.md +74 -0
- package/skills/handover-protocol/references/correction.md +32 -0
- package/skills/handover-protocol/references/discovery-to-planning.md +44 -0
- package/skills/handover-protocol/references/execution-report.md +42 -0
- package/skills/handover-protocol/references/planning-to-technical.md +42 -0
- package/skills/handover-protocol/references/story-execution.md +74 -0
- package/skills/handover-protocol/references/technical-to-orchestration.md +45 -0
- package/skills/memory-protocol/SKILL.md +323 -0
- package/skills/orchestrator/SKILL.md +247 -0
- package/skills/product-planning/SKILL.md +255 -0
- package/skills/review/SKILL.md +165 -0
- package/skills/sandbox/SKILL.md +62 -0
- package/skills/setup/SKILL.md +225 -0
- package/skills/tdd-workflow/SKILL.md +144 -0
- package/skills/technical-planning/SKILL.md +352 -0
- package/skills/tools-quickref/SKILL.md +303 -0
- package/skills/using-allye/SKILL.md +191 -0
- package/skills/verification-loop/SKILL.md +93 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrator
|
|
3
|
+
description: Drives delivery of a planned feature — manages assignee, dispatches Executor for one story at a time, dispatches Reviewer in parallel, runs the correction loop, and cascades status up the work-item hierarchy. Use when a technical-to-orchestration handover arrives, or when the user wants to coordinate delivery of an already-planned feature (assign work, track status, drive tasks through review).
|
|
4
|
+
version: "1.5"
|
|
5
|
+
category: methodology
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Orchestrator
|
|
9
|
+
|
|
10
|
+
You drive delivery. You don't plan — that already happened in Technical Planning — and you don't implement — 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.
|
|
11
|
+
|
|
12
|
+
## 1. On start
|
|
13
|
+
|
|
14
|
+
If you arrived via a `technical-to-orchestration` handover (see `handover-protocol`), read it in full — it's your only context, there is no prior conversation to fall back on.
|
|
15
|
+
|
|
16
|
+
Then load the actual work. **The handover's list is an index to verify against, not a substitute for reading:**
|
|
17
|
+
|
|
18
|
+
1. **Read the full subtree under the handover's parent item.** `work_get` the parent (a feature — or an epic, when the user chose to hand over a whole epic), then walk `work_children` level by level all the way down (epic → features → stories → tasks), reading every item's description — not just its key and status. Nothing below the parent is out of scope just because the handover didn't happen to list it.
|
|
19
|
+
2. **Consult every reference the handover names.** Docs get opened via `doc_get` (locate via `doc_full_tree` if only named); suggested memory queries actually get run. A reference listed but never opened is a briefing you skipped.
|
|
20
|
+
3. **Cross-check against the handover's list.** If the subtree you loaded and the handover disagree — items in Allye missing from the handover, listed items that don't exist, wave structure that doesn't match — stop and ask before dispatching anything.
|
|
21
|
+
|
|
22
|
+
If you arrived without a handover (the user just wants to resume coordinating an in-progress feature), ask for the feature or epic key if it isn't already clear, then do the same full subtree read via `work_get`/`work_children`.
|
|
23
|
+
|
|
24
|
+
Search memories for relevant prior context (`memory_search("Session State {feature key}")`, `memory_search("decision {feature key}")`) — a delivery already in progress may have decisions and blockers recorded from earlier sessions.
|
|
25
|
+
|
|
26
|
+
## 2. Assignee
|
|
27
|
+
|
|
28
|
+
Resolve the current user's id from `initialize` (`profile.user.id`).
|
|
29
|
+
|
|
30
|
+
- **Assigning to yourself** → `work_assign_to_me`.
|
|
31
|
+
- **Assigning to someone else** → `team.team_members` to resolve their id, then `work_items.work_update(id, assignee_id: ...)`.
|
|
32
|
+
- **Not obvious who should own an item?** Ask. Don't guess between team members.
|
|
33
|
+
|
|
34
|
+
## 3. Claim and start
|
|
35
|
+
|
|
36
|
+
Move claimed items to `in_progress` (`work_status_next`) as work on them actually begins — not preemptively for the whole feature at once.
|
|
37
|
+
|
|
38
|
+
## 4. Dispatch Executor — one story at a time
|
|
39
|
+
|
|
40
|
+
Before dispatching, do a quick completeness check on the story's tasks: does each one have concrete, verifiable acceptance criteria — 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 — don't let an obviously vague task go to Executor and discover that the hard way<!-- opencode-exclude:start -->, in either mode below<!-- opencode-exclude:end -->.
|
|
41
|
+
|
|
42
|
+
<!-- opencode-exclude:start -->
|
|
43
|
+
### 4.1 Resolve the dispatch mode — do not ask when the answer is known
|
|
44
|
+
|
|
45
|
+
1. **Did the session hook report an agent runtime?** (a line beginning `Agent runtime: `).
|
|
46
|
+
If yes, load the `agent-runtime` skill and dispatch through it. This is the default —
|
|
47
|
+
do not offer the other two modes alongside it, and do not ask which to use.
|
|
48
|
+
2. **No runtime?** Then ask: manual handover, or the dispatched `executor` subagent.
|
|
49
|
+
|
|
50
|
+
The runtime wins when present because a runtime pane is a real agent process the human can
|
|
51
|
+
watch, attach to, and take over, with its own context window. That is strictly more than
|
|
52
|
+
either fallback offers.
|
|
53
|
+
<!-- opencode-exclude:end -->
|
|
54
|
+
|
|
55
|
+
<!-- opencode-exclude:start -->
|
|
56
|
+
### 4.2 Parallel dispatch — one worktree per story
|
|
57
|
+
|
|
58
|
+
<HARD-GATE>
|
|
59
|
+
**Parallel work requires worktrees. No exception.** Two concurrent stories never share a
|
|
60
|
+
checkout. Serial work stays in the main checkout — the worktree is the price of
|
|
61
|
+
parallelism, not a ritual.
|
|
62
|
+
</HARD-GATE>
|
|
63
|
+
|
|
64
|
+
Before parallelising, four things get resolved. Guessing any of them produces a failure
|
|
65
|
+
that surfaces hours later as a merge conflict or a pane waiting on a human who is not there.
|
|
66
|
+
|
|
67
|
+
1. **Story-level dependencies.** Waves order tasks *within* a story; two stories under one
|
|
68
|
+
feature can also depend on each other. Only mutually independent stories go out together.
|
|
69
|
+
|
|
70
|
+
2. **The AFK/HITL label**, which Technical Planning derived (see `verification-loop` §4).
|
|
71
|
+
**A HITL story is never dispatched to an unattended pane** — it runs serially, with the
|
|
72
|
+
human present, or it waits.
|
|
73
|
+
|
|
74
|
+
3. **Sequential shared resources, allocated by the Orchestrator, in the dispatch briefing.**
|
|
75
|
+
Migration numbers, ports, any self-incrementing id. Never instruct a pane to "check what is
|
|
76
|
+
free": two panes both checking before either writes is a race, and it has already produced
|
|
77
|
+
two stories claiming the same migration number.
|
|
78
|
+
|
|
79
|
+
Worktrees isolate *files*, not the machine. Databases, dev-server ports, and orphaned
|
|
80
|
+
processes stay shared.
|
|
81
|
+
|
|
82
|
+
4. **Concurrency.** Default to **three**. Ask before going higher. The limit is the human's
|
|
83
|
+
review bandwidth, not the machine's capacity — an unreviewed pane is not throughput.
|
|
84
|
+
|
|
85
|
+
Creating each worktree:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
git -C "$REPO" worktree add "$WT_ROOT/{STORY-KEY}/{repo}" -b feature/{story-key}-{slug} "$BASE"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`$BASE` is per-repo and comes from the delivery configuration document (see `setup`), never
|
|
92
|
+
assumed. A story spanning several repos gets one worktree per repo, sharing the branch name.
|
|
93
|
+
|
|
94
|
+
A fresh worktree inherits neither gitignored files nor installed dependencies. Copy the
|
|
95
|
+
files listed in the delivery configuration, then run the repo's install command, **before**
|
|
96
|
+
dispatching. An executor that fails on a missing `.env` reports a bug that is not one.
|
|
97
|
+
|
|
98
|
+
The pane's `--cwd` is the directory where the Allye plugin is enabled, **not** the worktree —
|
|
99
|
+
absolute worktree paths go in the briefing instead. A session started with its cwd inside a
|
|
100
|
+
worktree may not resolve plugin skills, and dies on the first `Skill` call.
|
|
101
|
+
<!-- opencode-exclude:end -->
|
|
102
|
+
|
|
103
|
+
- <!-- opencode-exclude:start -->**Manual** (the original flow — default when unsure): <!-- opencode-exclude:end -->emit a `story-execution` handover (`handover-protocol` → `references/story-execution.md`) scoped to exactly one story and its tasks. The user runs it in a fresh Executor chat.
|
|
104
|
+
<!-- opencode-exclude:start -->
|
|
105
|
+
- **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 — story, tasks with acceptance criteria copied in full, locked decisions, applicable code standards, TDD expectation — and use that filled-out content as the dispatch prompt, instead of a handover the user pastes. **Same information, same template, different transport.**
|
|
106
|
+
<!-- opencode-exclude:end -->
|
|
107
|
+
|
|
108
|
+
<!-- opencode-exclude:start -->Either way, the scope is identical: <!-- opencode-exclude:end -->**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<!-- opencode-exclude:start --> in either mode<!-- opencode-exclude:end -->.
|
|
109
|
+
|
|
110
|
+
<!-- opencode-exclude:start -->
|
|
111
|
+
<!-- flagged for override: this is a genuinely new capability, not yet battle-tested against the manual flow's track record -->
|
|
112
|
+
**Automatic mode's limit — 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 `❌ blocked` with the specific question, rather than guessing a design to fill the gap. When a dispatch comes back with a blocked task:
|
|
113
|
+
|
|
114
|
+
1. Put the exact question in front of the user yourself — you can ask, even though the subagent couldn't.
|
|
115
|
+
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.
|
|
116
|
+
<!-- opencode-exclude:end -->
|
|
117
|
+
|
|
118
|
+
## 5. Dispatch Reviewer — automatic and parallel
|
|
119
|
+
|
|
120
|
+
<!-- adapted from EveryInc/compound-engineering-plugin lfg (MIT) — verify the previous step's artifact before proceeding -->
|
|
121
|
+
When the execution report comes back<!-- opencode-exclude:start --> (handover, in manual mode; direct return value, in automatic mode)<!-- opencode-exclude:end -->, don't take "done" at face value — 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.
|
|
122
|
+
|
|
123
|
+
Once the report is genuinely complete, dispatch **both** `reviewer-standards` and
|
|
124
|
+
`reviewer-spec`<!-- opencode-exclude:start --> via the `Agent` tool<!-- opencode-exclude:end --> — in parallel, in the same turn, automatically, without asking the user
|
|
125
|
+
first. Review never needs to pause and ask anyone anything, which is what makes it always
|
|
126
|
+
dispatch-appropriate.
|
|
127
|
+
|
|
128
|
+
Pass each the same fields: the active team (id and name), the story key, the task keys,
|
|
129
|
+
and the files changed from the execution report. `reviewer-spec` additionally gets the
|
|
130
|
+
per-criterion verification evidence the report carried — it reviews against that evidence,
|
|
131
|
+
so a report that omits it produces a review that cannot confirm anything.
|
|
132
|
+
|
|
133
|
+
## 6. React to review
|
|
134
|
+
|
|
135
|
+
Two reports arrive, one per axis. **Record both verbatim.** Never merge them, never
|
|
136
|
+
rerank findings across them, never resolve a disagreement between them — each axis
|
|
137
|
+
reviewed something the other deliberately ignored, so a disagreement is not a conflict
|
|
138
|
+
to settle.
|
|
139
|
+
|
|
140
|
+
The *findings* stay separate. The *decision* is single, and combines them:
|
|
141
|
+
|
|
142
|
+
| Standards | Spec | Outcome |
|
|
143
|
+
|---|---|---|
|
|
144
|
+
| ✅ | ✅ | Advance the task through the team's pipeline per §7 — one status at a time, stopping at the first gate you cannot satisfy |
|
|
145
|
+
| ⚠️ only | ✅ | Advance as above; record the warnings as a note so they are not lost |
|
|
146
|
+
| ✅ | ⚠️ only | Advance as above; record the warnings as a note |
|
|
147
|
+
| ❌ | any | Correction round |
|
|
148
|
+
| any | ❌ | Correction round |
|
|
149
|
+
|
|
150
|
+
A ❌ on either axis triggers a correction round on its own. **One axis passing never offsets the other failing** — that offsetting is exactly the masking the split exists to
|
|
151
|
+
prevent. The failed task simply stays at `review` while the correction round runs: no
|
|
152
|
+
backward move is needed (or possible — `work_status_next` only moves forward, per
|
|
153
|
+
`allye-board-progression`), because reaching `done` requires your move after both axes
|
|
154
|
+
pass. Loop back to §5 once the next execution report arrives.
|
|
155
|
+
|
|
156
|
+
<!-- adapted from bmad-code-org/BMAD-METHOD correct-course (MIT) — structured change-impact analysis for corrections that ripple beyond one task -->
|
|
157
|
+
**Before emitting a routine correction, check whether the finding is actually local.** Most ❌ findings are narrow — 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 — 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.
|
|
158
|
+
|
|
159
|
+
The correction handover carries only the failing axis's ❌ findings, quoted literally, using `references/correction.md`'s exact fields (only the failed findings, the correction-round count, the story reference — never a full re-brief of the story)<!-- opencode-exclude:start -->: 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<!-- opencode-exclude:end -->.
|
|
160
|
+
|
|
161
|
+
**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
|
|
162
|
+
both rounds, and a third failure escalates to the human. Two correction rounds failing for
|
|
163
|
+
different specific reasons is normal; a third failure usually means something deeper is
|
|
164
|
+
being missed, and it's worth a human look before burning another round.
|
|
165
|
+
|
|
166
|
+
## 7. Status cascade — continuous, not just at the end
|
|
167
|
+
|
|
168
|
+
Both review axes clear (§6) → the task is ready to leave the review gate. **Where it goes next
|
|
169
|
+
depends on the team's pipeline, not on a status this skill can name.**
|
|
170
|
+
|
|
171
|
+
1. **Advance one status.** `work_status_next(id)`. Then **read the item back** — `work_get` —
|
|
172
|
+
and see where you actually landed. Do not predict: `work_statuses()` does not return
|
|
173
|
+
position or pipeline, and `board_columns()` does not map statuses to columns, so the next
|
|
174
|
+
status is not computable from the MCP surface (see `board-progression` §1).
|
|
175
|
+
|
|
176
|
+
2. **Did you land on a done-category status?** Then the task is finished; go to step 5.
|
|
177
|
+
|
|
178
|
+
3. **Otherwise, consult the pipeline handoff table** in the `Allye Delivery Configuration`
|
|
179
|
+
Core Document (`user_config`, loaded by `initialize`).
|
|
180
|
+
|
|
181
|
+
- **`agent`** — satisfy it, then return to step 1. Satisfying means running the command the
|
|
182
|
+
table names and reading its output, under the bound in `verification-loop` §3. Red at the
|
|
183
|
+
bound is a correction round, not a pass.
|
|
184
|
+
- **`ci`** — you do not act. Report that the task is waiting on the named external signal
|
|
185
|
+
and move to the next story; revisit when the signal arrives.
|
|
186
|
+
- **`human`**, or **any status not in the table** — stop. Name the status, say who owns it,
|
|
187
|
+
and leave the task exactly where it is.
|
|
188
|
+
|
|
189
|
+
4. **A status you do not recognise and the table does not cover** is a stop, and also a
|
|
190
|
+
question: ask the user once who satisfies it, record the answer in the delivery
|
|
191
|
+
configuration, and continue. Never ask twice.
|
|
192
|
+
|
|
193
|
+
5. **Cascade upward, and only upward.** `work_children` the parent; if **every** child is in
|
|
194
|
+
the done category, advance the parent the same way — one step, read back, consult the table.
|
|
195
|
+
A parent stops for the same reasons a child does.
|
|
196
|
+
|
|
197
|
+
<HARD-GATE>
|
|
198
|
+
**Never call `work_status_done` to leave a pipeline you cannot finish.** From four statuses
|
|
199
|
+
away it records "done" for work that never passed the gates between — which is exactly how a
|
|
200
|
+
story came to be closed with seven of its fifteen tasks still at the review gate.
|
|
201
|
+
|
|
202
|
+
Use it only when the item's next status **is** the done status. When you cannot finish, stopping
|
|
203
|
+
is the correct outcome, not a failure to report.
|
|
204
|
+
</HARD-GATE>
|
|
205
|
+
|
|
206
|
+
<!-- opencode-exclude:start -->
|
|
207
|
+
### 7.1 Merge and teardown — one story at a time
|
|
208
|
+
|
|
209
|
+
Load the `branch-landing` skill and follow it. It holds the integration decision, the
|
|
210
|
+
seven-step sequence, and the three locks that keep the sequence from losing work.
|
|
211
|
+
|
|
212
|
+
Two things specific to parallel dispatch, which that skill does not know about:
|
|
213
|
+
|
|
214
|
+
- **One story at a time, never batched.** Several stories finishing together is exactly when
|
|
215
|
+
batching is tempting and exactly when a conflict in shared wiring is most likely. Land them
|
|
216
|
+
in sequence, rebuilding between.
|
|
217
|
+
- **The pane you close is the one you created for that story.** With several open, closing the
|
|
218
|
+
wrong one destroys a running agent's session. Take the pane id from your own dispatch record,
|
|
219
|
+
never from the sidebar.
|
|
220
|
+
<!-- opencode-exclude:end -->
|
|
221
|
+
|
|
222
|
+
## 7.2 Announce where delivery stopped
|
|
223
|
+
|
|
224
|
+
When a story's tasks are all parked at the same gate, say so once, plainly: which gate, who
|
|
225
|
+
owns it, and what unblocks it. Repeat it in the session-state memory (§10) so a resumed
|
|
226
|
+
Orchestrator does not rediscover the boundary by trying to cross it.
|
|
227
|
+
|
|
228
|
+
A story left open at a gate is **not** an incomplete delivery. It is delivery reporting its
|
|
229
|
+
true position. The failure mode this replaces — closing the story to make the board look
|
|
230
|
+
finished — cost a real board seven tasks' worth of untracked work.
|
|
231
|
+
|
|
232
|
+
When delivery stops at a gate, the branch stops with it — see `branch-landing` §1. Say that
|
|
233
|
+
explicitly in the announcement: the story is parked, and so is its code. A human reading only
|
|
234
|
+
the board would otherwise assume the branch already landed.
|
|
235
|
+
|
|
236
|
+
## 8. Epic completion is manual
|
|
237
|
+
|
|
238
|
+
<!-- Decided, spec review 2026-07-12: epic close-out stays a deliberate step, not automatic -->
|
|
239
|
+
When an epic's cascade completes (step 3 above just fired), **do not automatically load the `delivery` skill.** Announce the completion to the user and ask whether to run delivery close-out now, in this same chat, or later, in a fresh chat (which `using-allye` routes to `delivery` normally). Either way, the choice is the user's — this skill only ever proposes it.
|
|
240
|
+
|
|
241
|
+
## 9. Never resolve ambiguity alone
|
|
242
|
+
|
|
243
|
+
Unclear assignee, no active sprint to assign into, conflicting or unexpected status on an item you didn't touch — any of these gets asked about, not guessed through. The Orchestrator's whole job is keeping the delivery state trustworthy; a guessed-through ambiguity undermines exactly that.
|
|
244
|
+
|
|
245
|
+
## 10. Memory
|
|
246
|
+
|
|
247
|
+
Search at start (§1). Save session state before ending — 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 — don't let it live only in this session's state snapshot.
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: product-planning
|
|
3
|
+
description: Workflow for translating business requirements into epics, features, and stories in Allye. Use when the user wants to plan a product, define scope, or create work item hierarchies.
|
|
4
|
+
version: "1.3"
|
|
5
|
+
category: methodology
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Product Planning Workflow
|
|
9
|
+
|
|
10
|
+
This skill guides you through translating business requirements into a structured work item hierarchy in Allye: **Epics → Features → Stories**.
|
|
11
|
+
|
|
12
|
+
Use this when the user talks about: requirements, business needs, product scope, MVP, new features, project kickoff, or wants to create epics/features/stories.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Workflow Overview
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Understand context → Search memories → Define hierarchy → Create items → Save decisions
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Step 0: Check for a Discovery Doc
|
|
25
|
+
|
|
26
|
+
If you arrived via a `discovery-to-planning` handover (see the `handover-protocol` skill), read the Discovery Doc it references before anything else — it already captures the approved direction, rejected alternatives, and any research findings. Treat it as established context, not something to re-derive.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Step 1: Understand the Business Context
|
|
31
|
+
|
|
32
|
+
Before creating anything, have a conversation with the user to understand:
|
|
33
|
+
|
|
34
|
+
1. **What problem are we solving?** — The business need or opportunity
|
|
35
|
+
2. **Who is it for?** — Target users or stakeholders
|
|
36
|
+
3. **What does success look like?** — Expected outcomes or metrics
|
|
37
|
+
4. **What's the scope?** — What's in and what's out (MVP vs future)
|
|
38
|
+
5. **Are there constraints?** — Timeline, tech stack, dependencies, compliance
|
|
39
|
+
|
|
40
|
+
<EXTREMELY_IMPORTANT>
|
|
41
|
+
Reach full understanding of the business context before creating any work item — ask questions and clarify ambiguities. The quality of planning depends on the quality of understanding.
|
|
42
|
+
</EXTREMELY_IMPORTANT>
|
|
43
|
+
|
|
44
|
+
<!-- adapted from bmad-code-org/BMAD-METHOD create-epics-and-stories (MIT) -->
|
|
45
|
+
Treat this as a collaboration between equal partners, not an intake form — the user knows the business, you know how to structure it. Push back on ambiguity and offer options; don't just transcribe what's said.
|
|
46
|
+
|
|
47
|
+
**If the user already has clear requirements** (e.g., a PRD, a spec, a detailed description), skip the discovery questions and move to Step 2.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Step 2: Search for Existing Context
|
|
52
|
+
|
|
53
|
+
Before creating new items, check what already exists:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
memory_search(query: "{product/project name} requirements")
|
|
57
|
+
memory_search(query: "{product/project name} architecture")
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Also check existing work items:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
work_list(query: "{product/project name}")
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**If related items exist:**
|
|
67
|
+
- Review them to avoid duplication
|
|
68
|
+
- Understand what was already planned or decided
|
|
69
|
+
- Build on top of existing structure rather than starting fresh
|
|
70
|
+
- When presenting the hierarchy in Step 3, mark each item explicitly as **reused** or **new** — never silently create a duplicate of something that already exists
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Step 3: Design the Work Item Hierarchy
|
|
75
|
+
|
|
76
|
+
Plan the hierarchy before creating items. Present it to the user for approval.
|
|
77
|
+
|
|
78
|
+
### Working vocabulary: squares and quadradinhos
|
|
79
|
+
|
|
80
|
+
When talking through the structure with the user, a "square" is a Feature-sized deliverable — a puzzle piece of the overall product; a "quadradinho" is a Story inside it. This is conversational shorthand, not a new formal type — it still resolves to the real Epic → Feature → Story hierarchy below.
|
|
81
|
+
|
|
82
|
+
### Item types and when to use them
|
|
83
|
+
|
|
84
|
+
| Type | Purpose | Example |
|
|
85
|
+
|------|---------|---------|
|
|
86
|
+
| **Epic** | Large initiative spanning multiple features. Weeks to months of work. | "User Authentication System" |
|
|
87
|
+
| **Feature** | A distinct capability within an epic. Days to weeks. | "Social Login (Google, GitHub)" |
|
|
88
|
+
| **Story** | A user-facing outcome within a feature. Hours to days. Can be implemented in one session. | "As a user, I can log in with my Google account" |
|
|
89
|
+
|
|
90
|
+
### Hierarchy rules
|
|
91
|
+
|
|
92
|
+
<!-- adapted from github/spec-kit story template language (MIT) -->
|
|
93
|
+
- An **Epic** contains **Features**
|
|
94
|
+
- A **Feature** contains **Stories**
|
|
95
|
+
- Every Story must be **independently testable and deliverable** — it produces a working increment on its own, not just alongside its siblings
|
|
96
|
+
- Stories should follow the format: "As a {role}, I can {action} so that {benefit}" (when applicable)
|
|
97
|
+
- Prioritize so that **P1 alone is a viable increment** — if only the highest-priority stories shipped, there should still be something real to show
|
|
98
|
+
|
|
99
|
+
### Present the plan
|
|
100
|
+
|
|
101
|
+
Show the user the proposed hierarchy before creating anything:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
Epic: User Authentication System
|
|
105
|
+
├── Feature: Email/Password Auth
|
|
106
|
+
│ ├── Story: User can register with email and password
|
|
107
|
+
│ ├── Story: User can log in with email and password
|
|
108
|
+
│ └── Story: User can reset password via email
|
|
109
|
+
├── Feature: Social Login
|
|
110
|
+
│ ├── Story: User can log in with Google
|
|
111
|
+
│ └── Story: User can log in with GitHub
|
|
112
|
+
└── Feature: Session Management
|
|
113
|
+
├── Story: User session persists across browser restarts
|
|
114
|
+
└── Story: User can log out from all devices
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Wait for the user to approve, modify, or add to this structure before proceeding.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Step 4: Check Board and Statuses
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
work_statuses()
|
|
125
|
+
board_columns()
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
This surfaces the available status categories and board columns, so you know the correct status for new items — typically **backlog** or **todo**.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Step 5: Create Work Items
|
|
133
|
+
|
|
134
|
+
### For the Epic (if it doesn't exist yet)
|
|
135
|
+
|
|
136
|
+
Create the top-level epic first:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
work_create(
|
|
140
|
+
work_title: "User Authentication System",
|
|
141
|
+
work_type: "epic",
|
|
142
|
+
work_category: "product",
|
|
143
|
+
work_description: "## Goal\n{business goal}\n\n## Scope\n{what's included}\n\n## Out of scope\n{what's excluded}\n\n## Success criteria\n{how we know it's done}"
|
|
144
|
+
)
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### For Features and Stories
|
|
148
|
+
|
|
149
|
+
Use `work_bulk_create` to create the full hierarchy in one call:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
work_bulk_create(work_items: [
|
|
153
|
+
{
|
|
154
|
+
"temp_id": "feat-1",
|
|
155
|
+
"title": "Email/Password Auth",
|
|
156
|
+
"item_type": "feature",
|
|
157
|
+
"work_category": "product",
|
|
158
|
+
"parent_key": "PROJ-100", // existing epic key
|
|
159
|
+
"description": "..."
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"temp_id": "story-1",
|
|
163
|
+
"title": "User can register with email and password",
|
|
164
|
+
"item_type": "story",
|
|
165
|
+
"work_category": "product",
|
|
166
|
+
"parent_temp_id": "feat-1", // references the feature above
|
|
167
|
+
"description": "..."
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"temp_id": "story-2",
|
|
171
|
+
"title": "User can log in with email and password",
|
|
172
|
+
"item_type": "story",
|
|
173
|
+
"work_category": "product",
|
|
174
|
+
"parent_temp_id": "feat-1",
|
|
175
|
+
"description": "..."
|
|
176
|
+
}
|
|
177
|
+
])
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### `work_bulk_create` rules
|
|
181
|
+
|
|
182
|
+
- Each item needs: `temp_id`, `title`, `item_type`, `work_category`
|
|
183
|
+
- Use `parent_key` to reference an existing item (e.g., an epic already in Allye)
|
|
184
|
+
- Use `parent_temp_id` to reference another item in the same batch
|
|
185
|
+
- **Maximum 50 items** per call — split into multiple calls if needed
|
|
186
|
+
- The server handles ordering and key generation automatically
|
|
187
|
+
|
|
188
|
+
### Story descriptions
|
|
189
|
+
|
|
190
|
+
Every story should have a clear description. Write acceptance criteria as concrete scenarios when the behavior has real branches — Given/When/Then makes each one independently verifiable:
|
|
191
|
+
|
|
192
|
+
<!-- adapted from github/spec-kit story template language (MIT) -->
|
|
193
|
+
```markdown
|
|
194
|
+
## User Story
|
|
195
|
+
As a {role}, I can {action} so that {benefit}.
|
|
196
|
+
|
|
197
|
+
## Acceptance Criteria
|
|
198
|
+
- [ ] Given {context}, when {action}, then {outcome}
|
|
199
|
+
- [ ] Given {context}, when {action}, then {outcome}
|
|
200
|
+
|
|
201
|
+
## Notes
|
|
202
|
+
{any additional context, constraints, or dependencies}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
As detailed as possible beats terse — a mermaid flowchart or sequence diagram is welcome in the description when it clarifies a flow (`work_description` supports it). If the story involves a screen, offer to mock it up with the Artifact tool and carry the reference into the eventual handover — don't force it when there's no screen involved.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Step 6: Set Priority and Estimates
|
|
210
|
+
|
|
211
|
+
For each story, consider setting:
|
|
212
|
+
|
|
213
|
+
- **Priority** — How urgent/important is this? (critical, high, medium, low)
|
|
214
|
+
- **Story points** — Relative complexity estimate
|
|
215
|
+
- **Sprint assignment** — If there's an active sprint, assign relevant stories
|
|
216
|
+
|
|
217
|
+
Check the active sprint:
|
|
218
|
+
```
|
|
219
|
+
sprint_active()
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Step 7: Save Planning Decisions
|
|
225
|
+
|
|
226
|
+
Save key decisions as memories for future reference:
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
memory_save(
|
|
230
|
+
title: "Planning — {Epic name} scope and decisions",
|
|
231
|
+
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}",
|
|
232
|
+
tags: ["planning", "decision", "{epic-key}"],
|
|
233
|
+
sector: "decisions"
|
|
234
|
+
)
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Workflow Checklist
|
|
240
|
+
|
|
241
|
+
Before considering product planning complete, verify:
|
|
242
|
+
|
|
243
|
+
- [ ] Business context is understood (problem, users, scope, constraints)
|
|
244
|
+
- [ ] Existing work items and memories were checked
|
|
245
|
+
- [ ] Hierarchy was presented to and approved by the user
|
|
246
|
+
- [ ] All items are created in Allye with proper parent relationships
|
|
247
|
+
- [ ] Stories have acceptance criteria in their descriptions
|
|
248
|
+
- [ ] Priority and estimates are set (if applicable)
|
|
249
|
+
- [ ] Planning decisions are saved as memories
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## What Comes Next
|
|
254
|
+
|
|
255
|
+
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 — Technical Planning has no other way to know which items are which.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Workflow for reviewing implemented code with decision context from planning. Use when the user wants to review code quality, validate implementation, or check tasks before delivery.
|
|
4
|
+
version: "1.2"
|
|
5
|
+
category: methodology
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Technical Review Workflow
|
|
9
|
+
|
|
10
|
+
This skill guides you through reviewing implemented code with full context — the decisions made during planning, the acceptance criteria defined for each task, and the architectural constraints captured in memories.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Workflow Overview
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
Get story context → Load decisions → Review each task → Document findings → Approve or request changes
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Step 1: Gather Context
|
|
23
|
+
|
|
24
|
+
### Get the story and its tasks
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
work_get(work_key: "{STORY-KEY}")
|
|
28
|
+
work_children(id: "{story uuid}")
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Load planning decisions
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
memory_search(query: "Technical Plan {story key}")
|
|
35
|
+
memory_search(query: "decision {story key}")
|
|
36
|
+
memory_search(query: "implementation {story key}")
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This gives you:
|
|
40
|
+
- The original plan and wave structure
|
|
41
|
+
- Locked decisions (non-negotiable choices by the user)
|
|
42
|
+
- Agent-discretion decisions (choices the agent made)
|
|
43
|
+
- Implementation notes from the development phase
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Step 2: Review Each Task — Two Axes
|
|
48
|
+
|
|
49
|
+
<!-- adapted from mattpocock/skills code-review (MIT) -->
|
|
50
|
+
|
|
51
|
+
Review runs as two independent passes. Keep them separate on the page and separate in
|
|
52
|
+
your head, and **do not reconcile them**: a change can pass one and fail the other, and
|
|
53
|
+
reporting them together is what lets one hide the other.
|
|
54
|
+
|
|
55
|
+
> Code that follows every standard but implements the wrong thing → **Standards pass,
|
|
56
|
+
> Spec fail.**
|
|
57
|
+
> Code that does exactly what was asked but breaks the project's conventions → **Spec
|
|
58
|
+
> pass, Standards fail.**
|
|
59
|
+
|
|
60
|
+
### Axis 1 — Standards: how it is written
|
|
61
|
+
|
|
62
|
+
Load team standards first (`skill_list` → `skill_get`); they override everything below.
|
|
63
|
+
Then: consistency with existing patterns, security, error handling, naming, and test
|
|
64
|
+
quality — do the tests assert behaviour rather than implementation, cover edge cases,
|
|
65
|
+
and break for the right reasons?
|
|
66
|
+
|
|
67
|
+
Full checklist and the baseline smells: `agents/reviewer-standards.md`.
|
|
68
|
+
|
|
69
|
+
### Axis 2 — Spec: whether it is what was asked for
|
|
70
|
+
|
|
71
|
+
Every acceptance criterion, one at a time, against the verification evidence the
|
|
72
|
+
execution report carried. A criterion reported met with no command output or observed
|
|
73
|
+
procedure behind it is **unverified**, and gets reported as unverified rather than met.
|
|
74
|
+
Then locked-decision compliance — any deviation is a defect — and unrequested scope.
|
|
75
|
+
|
|
76
|
+
Full checklist: `agents/reviewer-spec.md`.
|
|
77
|
+
|
|
78
|
+
### Reporting
|
|
79
|
+
|
|
80
|
+
Two reports, never merged, never reranked. The decision that combines them belongs to
|
|
81
|
+
the Orchestrator — see `orchestrator` §6.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Step 3: Document Findings
|
|
86
|
+
|
|
87
|
+
### If everything looks good
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
memory_save(
|
|
91
|
+
title: "Review — {STORY-KEY} approved",
|
|
92
|
+
content: "## Review Summary\nAll tasks reviewed and approved.\n\n## Tasks Reviewed\n- {TASK-1}: ✅ Criteria met, tests pass\n- {TASK-2}: ✅ Criteria met, tests pass\n\n## Notes\n{any observations for future reference}",
|
|
93
|
+
tags: ["review", "approved", "{story-key}"],
|
|
94
|
+
sector: "knowledge"
|
|
95
|
+
)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### If changes are needed
|
|
99
|
+
|
|
100
|
+
Present findings to the user clearly:
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
## Review Findings for {STORY-KEY}
|
|
104
|
+
|
|
105
|
+
### TASK-1: {title} ✅
|
|
106
|
+
All criteria met. No issues.
|
|
107
|
+
|
|
108
|
+
### TASK-2: {title} ⚠️
|
|
109
|
+
- **Issue:** {description of the problem}
|
|
110
|
+
- **Severity:** {critical | minor | suggestion}
|
|
111
|
+
- **Suggestion:** {how to fix it}
|
|
112
|
+
|
|
113
|
+
### TASK-3: {title} ❌
|
|
114
|
+
- **Issue:** Acceptance criterion #2 not met — {details}
|
|
115
|
+
- **Required action:** {what needs to change}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Save the review findings:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
memory_save(
|
|
122
|
+
title: "Review — {STORY-KEY} changes requested",
|
|
123
|
+
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}",
|
|
124
|
+
tags: ["review", "changes-requested", "{story-key}"],
|
|
125
|
+
sector: "knowledge"
|
|
126
|
+
)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
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:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
work_statuses() // find the id of the target status (e.g. "In Progress")
|
|
133
|
+
work_update(id: "{task uuid}", work_status: "{status uuid}")
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Step 4: Run Tests
|
|
139
|
+
|
|
140
|
+
If you can run the test suite, do it:
|
|
141
|
+
|
|
142
|
+
- Run all tests related to the changed code
|
|
143
|
+
- Run the full test suite if the changes could have side effects
|
|
144
|
+
- Report any failures
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Workflow Checklist
|
|
149
|
+
|
|
150
|
+
- [ ] Story and all tasks loaded
|
|
151
|
+
- [ ] Planning decisions and implementation memories retrieved
|
|
152
|
+
- [ ] Axis 2: each task's acceptance criteria checked against its verification evidence
|
|
153
|
+
- [ ] Axis 2: locked decisions verified as respected
|
|
154
|
+
- [ ] Axis 1: consistency, security, error handling, and naming checked
|
|
155
|
+
- [ ] Axis 1: tests reviewed for quality and coverage
|
|
156
|
+
- [ ] Findings documented and saved as memory, two axes kept separate
|
|
157
|
+
- [ ] Tests run and passing
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## What Comes Next
|
|
162
|
+
|
|
163
|
+
If the review passes, transition to **Delivery** — load the `delivery` skill (backend slug: `allye-technical-delivery`).
|
|
164
|
+
|
|
165
|
+
If changes are needed, the developer addresses the findings (back to **Technical Development**), then returns here for re-review.
|