allye-pi 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,191 @@
1
+ ---
2
+ name: using-allye
3
+ description: Bootstrap meta-skill for AI agents using the Allye platform. Teaches when and how to use Allye MCP tools with structured workflows. Injected at session start.
4
+ version: "1.4"
5
+ category: bootstrap
6
+ ---
7
+
8
+ # Using Allye
9
+
10
+ You have access to the **Allye platform** — a project management and knowledge system with 12 MCP tools covering work items, documentation, sprints, boards, memories, skills, and more.
11
+
12
+ This skill teaches you **when and how** to use those tools effectively. It does NOT replace the tools — it gives you methodology and workflow discipline on top of them.
13
+
14
+ **What you must do:** search memories at the start of every conversation, detect which workflow phase applies, load the matching skill for that phase, and save memories before the conversation ends.
15
+
16
+ ---
17
+
18
+ ## Language
19
+
20
+ These instructions are written in English, but every response, question, suggestion, and confirmation you produce must be in the language the user is actually writing in. **The conversation itself is the primary signal, and it overrides everything else once the user has written anything** — including any `language` field on the user's profile from `initialize`. Only fall back to the profile's `language` field when there's no message yet to go by (e.g. framing your very first proactive line before the user has said anything). If the user switches language mid-conversation, follow them.
21
+
22
+ ---
23
+
24
+ ## Asking Questions
25
+
26
+ <!-- adapted from superpowers:brainstorming (MIT) — "prefer multiple choice questions when possible" -->
27
+ <HARD-GATE>
28
+ This applies in every phase — Sandbox exploration, Technical Planning's gray-area discussion, Orchestrator's assignee/status calls, Product Planning's scope forks, anywhere you'd otherwise type a question in prose. Whenever a fork has a small set of nameable options — who owns something, which of two approaches, narrow vs. broad scope, yes/no confirmations — use the `AskUserQuestion` tool instead of typing the question out in prose. It's faster to answer by picking than by typing, and its free-text "Other" option means nothing is lost versus asking in prose.
29
+
30
+ **Never bundle an open-ended sub-question with an enumerable one in the same message.** If a question has both parts — "what's driving this, and who's the audience?" — split them: ask the open part in prose, and the enumerable part (audience: internal/external/both) via `AskUserQuestion`, as two separate turns. Bundling them is what makes the whole thing read as "open-ended" and skip the tool entirely — don't let the open half smuggle the enumerable half out of a structured question.
31
+
32
+ Reserve plain conversational questions for forks that are genuinely open-ended on their own — where enumerating options would just be guessing at what the user might say (e.g. "what's driving this?", "describe the current process").
33
+ </HARD-GATE>
34
+
35
+ Note: `AskUserQuestion` inside skill-loaded contexts has known reliability issues in Claude Code itself (tracked upstream, e.g. anthropics/claude-code#29547, #30544) — it can silently return an empty answer or fall back to prose regardless of this instruction. Treat a prose fallback as a degraded but acceptable outcome, not a failure to correct mid-conversation; the underlying discipline (ask before deciding) still holds either way.
36
+
37
+ ---
38
+
39
+ ## 1. Memory First Protocol
40
+
41
+ <EXTREMELY_IMPORTANT>
42
+ At the START of every conversation, you MUST search for relevant memories before doing anything else.
43
+ At the END of every conversation, you MUST run the `memory-protocol` skill's /save process.
44
+ </EXTREMELY_IMPORTANT>
45
+
46
+ ### On conversation start
47
+
48
+ **Step 1: Initialize Allye** — Call `initialize` (action: `init`) to load user context, team info, and core documents. This is mandatory and must happen before anything else.
49
+
50
+ **Step 2: Check active team** — If the init response shows the user belongs to multiple teams and no team is active, ask the user which team they want to work with and call `team_switch` with the team name. Do not proceed until a team is selected — most tools require a team context.
51
+
52
+ **Step 3: Search for memories** using `memory_search`:
53
+
54
+ 1. `"Session State"` — find where the user left off last time
55
+ 2. `"decision {topic}"` — find previous decisions about the current topic
56
+ 3. `"{work item key}"` — find context for the specific item being discussed (e.g., "PROJ-123")
57
+
58
+ **Step 4: Greet the user** — Summarize what you know (from init + memories) before proceeding. If no memories are found, proceed normally with the context from init.
59
+
60
+ **Step 5: Note the runtime, if one was reported.** The session hook may have injected a line beginning `Agent runtime: `. If it did, the `agent-runtime` skill is available and the Orchestrator will dispatch through it. Do not load that skill now — it loads when work is about to be dispatched, which is the whole point of it being a separate skill.
61
+
62
+ ### On conversation end (and saving in general)
63
+
64
+ Follow the `memory-protocol` skill's current save process — load it if you haven't already, and don't rely on an outdated inline copy of it here. That skill is the single source of truth for:
65
+
66
+ - The **/save protocol** for session state (a 4-step process: consolidate the session into one `sector: "sessions"` memory, mine it for knowledge worth promoting to team sectors, react to each save's outcome, and promote any session todo that outlives the session)
67
+ - **When to save mid-conversation** (decisions, trade-offs, blockers, non-obvious context — each in its correct sector)
68
+ - **Tag conventions** and sector selection
69
+
70
+ One rule worth internalizing before you even load it: **always pass `sector` explicitly** — it's optional and defaults to `knowledge`, which is rarely the sector you actually want.
71
+
72
+ ---
73
+
74
+ ## 2. Skill Routing
75
+
76
+ Detect what the user needs and load the right skill. Skills are loaded on-demand — do NOT load all skills at once.
77
+
78
+ ### Handover detection (check this FIRST)
79
+
80
+ Before running the phase-detection heuristic below, check whether the user's first message contains a `## 🔄 Allye Handover` block (see the `handover-protocol` skill for the full format). If it does:
81
+
82
+ 1. Parse the `{type}` from the marker line and the `Skill to load` value.
83
+ 2. Resolve it to a backend slug if needed — handover templates always use the bare skill name, but three skills kept their original `allye-*` backend slug through the Plan 1 rename (see the "Slug" column below): `product-planning` → `allye-product-planning`, `technical-planning` → `allye-technical-planning`, `execution` → `allye-technical-development`. Every other value (`orchestrator`, `sandbox`, `handover-protocol`) already matches its backend slug directly.
84
+ 3. Load that skill directly via `skill_list`/`skill_get` with the resolved slug — skip the heuristic decision table entirely, there's no ambiguity to resolve.
85
+ 4. Treat every field in the handover as authoritative context for this session — locked decisions in particular are non-negotiable unless the user explicitly reopens them.
86
+
87
+ If no handover marker is present, fall through to the decision table below as before.
88
+
89
+ ### Decision table
90
+
91
+ | User intent | Skill to load | Slug |
92
+ |-------------|---------------|------|
93
+ | Explore ideas, research before committing to scope, think out loud, no direction chosen yet | Sandbox / Discovery | `sandbox` |
94
+ | Define product requirements, create epics/features/stories | Product Planning | `allye-product-planning` |
95
+ | Plan technical tasks for a story, discuss approach | Technical Planning | `allye-technical-planning` |
96
+ | Coordinate delivery of an already-planned feature — assign work, track status, drive tasks through review | Orchestrator | `orchestrator` |
97
+ | Implement code, write tests, develop features | Technical Development | `allye-technical-development` |
98
+ | Review code, check implementation quality | Technical Review | `allye-technical-review` |
99
+ | Finalize delivery, close story, update docs | Technical Delivery | `allye-technical-delivery` |
100
+
101
+ Three skills sit outside this table because no user request routes to them directly: `verification-loop` is loaded by `execution` when a task is being verified, `agent-runtime` by `orchestrator` when parallel work is being dispatched, and `branch-landing` by `delivery`, `orchestrator`, and `execution` when a branch's work is done. All three load on demand, from the skill that needs them.
102
+
103
+ ### How to detect the phase
104
+
105
+ - **Sandbox / Discovery** — User wants to: explore ideas, think out loud, research before deciding, hasn't committed to a direction yet
106
+ - **Product Planning** — User talks about: requirements, business needs, features, epics, user stories, product scope, MVP
107
+ - **Technical Planning** — User has a story and wants to: break it into tasks, discuss approach, evaluate options, plan implementation
108
+ - **Orchestrator** — User wants to: coordinate delivery, assign work items, track story/task status, drive review for an already-planned feature
109
+ - **Technical Development** — User wants to: write code, implement a task, fix a bug, add functionality, write tests
110
+ - **Technical Review** — User wants to: review code, check quality, validate implementation, get feedback
111
+ - **Technical Delivery** — User wants to: finish a story, merge, deploy, update documentation, close items
112
+
113
+ ### How to load a skill
114
+
115
+ Use the Allye MCP `skills` tool. `skill_list` only *lists* skills (metadata, no content) — use it to resolve the slug to an ID, then fetch the actual content with `skill_get`:
116
+
117
+ ```
118
+ 1. skill_list(query: "{skill-slug}") → find the skill and its ID
119
+ 2. skill_get(id: "{skill id}") → returns the full skill content
120
+ ```
121
+
122
+ (`skill_export` / `skill_export_merged` also return content, formatted for a specific agent — `skill_export_merged` is useful when loading several workflow skills at once.)
123
+
124
+ Then read the skill content and follow its instructions. The loaded skill takes priority over this bootstrap for the duration of that workflow.
125
+
126
+ ### When no skill matches
127
+
128
+ If the user's request doesn't match any workflow phase (e.g., general questions, quick lookups, team management), use the Allye tools directly without loading a specific skill. The tools reference in section 4 gives you a quick overview.
129
+
130
+ ---
131
+
132
+ ## 3. Workflow Gates
133
+
134
+ <HARD-GATE>
135
+ These rules are non-negotiable. Do not proceed past a gate without meeting its condition.
136
+
137
+ 1. **No implementation without tasks.** Do not write code for a story that has no tasks created. Run Technical Planning first.
138
+
139
+ 2. **No skipping the discussion phase.** When planning tasks for a story, always identify gray areas and present options to the user before creating tasks. Locked decisions must be captured as memories.
140
+
141
+ 3. **No status changes without work.** Do not move a work item to "done" (`work_status_done`) unless the actual work is completed and verified.
142
+
143
+ 4. **TDD when applicable.** If you can write `expect(fn(input)).toBe(output)` before writing `fn`, you MUST write the test first (Red → Green → Refactor). If not (UI, infra, integration), test after implementation — but always test.
144
+ </HARD-GATE>
145
+
146
+ ---
147
+
148
+ ## 4. Allye Tools Quick Reference
149
+
150
+ | Tool | What it does |
151
+ |------|-------------|
152
+ | `work_items` | Create, list, update, bulk-create work items (epics, features, stories, tasks, bugs). Move status. |
153
+ | `boards` | View boards and columns. Understand status progression. |
154
+ | `sprints` | List sprints, get active sprint, view sprint work items. |
155
+ | `docs` | Create, read, update documentation. Tree navigation. Publish and version. |
156
+ | `intelligence` | Save and search memories (semantic, embedding-based). Core of cross-session continuity. |
157
+ | `productivity` | Personal TODOs — create, list, update, delete. Stats, search, categories. |
158
+ | `skills` | List, export, install skills. `skill_export_merged` for loading workflow skills. |
159
+ | `team` | Switch active team, list teams, check current team. |
160
+ | `user_config` | Manage personal configuration documents. |
161
+ | `api_catalog` | Search and browse API endpoints documentation. |
162
+ | `initialize` | Re-initialize Allye environment and reload documents. |
163
+ | `health` | Check Allye backend health status. |
164
+
165
+ For detailed parameter reference, load the `allye-tools-quickref` skill.
166
+
167
+ ---
168
+
169
+ ## 5. Red Flags — Rationalizations to Reject
170
+
171
+ If you catch yourself thinking any of these, STOP:
172
+
173
+ | Rationalization | Why it's wrong |
174
+ |-----------------|---------------|
175
+ | "I don't need to search memories, this is a fresh conversation." | The user may have worked on this topic before. Context from past sessions prevents rework and contradictions. Always search. |
176
+ | "I'll just start coding, tasks aren't necessary for something this small." | Tasks create accountability, enable progress tracking, and force you to think before acting. Planning first, always. |
177
+ | "I'll skip the tests, the implementation is straightforward." | Straightforward code still breaks. TDD catches assumptions. Write the test. |
178
+ | "I'll move the story to done, the tasks are mostly complete." | "Mostly" is not "done". Verify all tasks are complete first. |
179
+ | "I don't need to save memories, I covered everything in the conversation." | Conversations are ephemeral. The next session starts from zero without memories. Always save state. |
180
+ | "I'll load all skills at once to be prepared." | Skills are loaded on-demand for a reason — loading everything bloats context and degrades quality. Load only what's needed. |
181
+
182
+ ---
183
+
184
+ ## 6. Subagent Instructions
185
+
186
+ <SUBAGENT-STOP>
187
+ If you are a subagent (launched via the Agent tool), do NOT load this bootstrap skill.
188
+ The parent agent has already loaded it. You should focus on your specific task.
189
+ Do NOT search for memories or save session state — the parent agent handles that.
190
+ </SUBAGENT-STOP>
191
+
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: verification-loop
3
+ description: Bounded test-fix-test loop that proves a task or story actually works. Use when implementing a task, before reporting anything as done, or when a verification command fails and needs another pass.
4
+ version: "1.0"
5
+ category: methodology
6
+ ---
7
+
8
+ # Verification Loop
9
+
10
+ <!-- adapted from mattpocock/skills diagnosing-bugs (MIT) — the tight-loop completion criterion and the loop-construction ladder -->
11
+
12
+ A task passes its own tests and still does not do what the story asked. Tasks all go green and the feature is broken. Both happen because "done" is asserted from reading code rather than observed from running it.
13
+
14
+ This skill defines the loop that observes it. A loop goes **red** on the failure, or it does not — and if it cannot go red, it is not verification, whatever else it is.
15
+
16
+ ## 1. What counts as a loop
17
+
18
+ A verification command must satisfy all four:
19
+
20
+ - [ ] **red-capable** — it catches *this specific failure*. "Runs without erroring" is not the same thing. A command that passes whether or not the acceptance criterion is met verifies nothing.
21
+ - [ ] **deterministic** — same verdict every run. A command that depends on wall-clock time, network, or unseeded randomness reports noise.
22
+ - [ ] **fast** — seconds. A four-minute command is a build; you will not iterate on it, so it will not function as a loop.
23
+ - [ ] **agent-runnable** — runs to a verdict with no human clicking. If a human must act, see §4.
24
+
25
+ ## 2. Building one
26
+
27
+ Take the first option on this ladder that works. Reach further down only when the ones above genuinely do not apply.
28
+
29
+ 1. **An existing test, narrowed** — a single test case naming the criterion. Cheapest and usually correct.
30
+ 2. **A new test at an existing seam** — prefer a seam the codebase already tests at over introducing one.
31
+ 3. **A CLI invocation with an observable exit code** — a build, a typecheck, a lint, a migration.
32
+ 4. **An HTTP call with an asserted response** — `curl` piped through `jq` to an assertion.
33
+ 5. **A script that exercises the flow and prints a verdict** — when several of the above must combine.
34
+ 6. **A human-verified procedure** — the escape hatch. See §4; it is not a loop, and declaring it changes how the story is dispatched.
35
+
36
+ ## 3. Running one
37
+
38
+ The cycle is: run → read the actual output → fix → run again.
39
+
40
+ **Read the output, do not infer it.** A command whose result you predicted rather than read has told you nothing. This is the same evidence-before-assertions rule the `execution` skill applies before advancing a task, applied per iteration.
41
+
42
+ ### The bound
43
+
44
+ <HARD-GATE>
45
+ Stop on whichever of these comes first:
46
+
47
+ 1. **Three attempts on the same failure.**
48
+ 2. **Two byte-identical outputs in a row.** Identical output is the previous attempt repeated, not a new one — this ends the loop immediately, before the third attempt.
49
+
50
+ On stopping, report `❌ blocked` carrying the command, its literal output, and what is missing. Never a summary of the output — the exact text. The reader decides what it means.
51
+ </HARD-GATE>
52
+
53
+ Three attempts is the budget for *one* failure, not for the task. A loop that fixes one criterion and then goes red on a different one starts a fresh budget: that is progress, and progress earns another three.
54
+
55
+ ## 4. When no loop exists
56
+
57
+ Some work admits no command that is red-capable, deterministic, fast, and agent-runnable at once — visual layout, infrastructure provisioning, a one-off migration against production data. Forcing one produces a command that passes unconditionally, which is worse than none: it reports green while verifying nothing.
58
+
59
+ Such a task declares, in its description:
60
+
61
+ ```
62
+ ## Verification
63
+ verification: manual
64
+ {the exact procedure a human follows, and what they should observe}
65
+ ```
66
+
67
+ That declaration carries a consequence beyond the task:
68
+
69
+ <HARD-GATE>
70
+ A task declaring `verification: manual` makes its whole story **HITL** — human in the loop. The Orchestrator does not dispatch a HITL story to an unattended runtime pane. A story whose every task has an automatable command is **AFK** and may be dispatched unattended.
71
+
72
+ The label is derived here, at planning time. It is never the Orchestrator's guess.
73
+ </HARD-GATE>
74
+
75
+ ## 5. Two granularities
76
+
77
+ **Per task**, during implementation: run that task's command after each change until it is green. Cheap and local — this is what stops a trivial failure from consuming one of the two correction rounds the Orchestrator allows.
78
+
79
+ **Per story**, before reporting anything: run the command that exercises the story's own acceptance criteria end to end. Every task green does not mean the story works; nothing else checks this.
80
+
81
+ A red story loop is reported as such even when every task is green. "All tasks passed but the story does not work" is a finding, and a valuable one — it usually means the task breakdown missed an integration.
82
+
83
+ ## 6. Relationship to TDD
84
+
85
+ Distinct disciplines, easily confused into one:
86
+
87
+ | | TDD | Verification loop |
88
+ |---|---|---|
89
+ | When | During implementation | After, before reporting |
90
+ | Unit | One behaviour | One acceptance criterion |
91
+ | Shape | Red → Green → Refactor | Run → read → fix → run |
92
+
93
+ Where TDD applies, the loop confirms the assembled whole. Where it does not — the "test after, but always test" branch of the detection heuristic in `tdd-workflow` — the loop is the only mechanism that observes the criterion at all, and that is where it earns the most.