arcane-cli 0.14.0 → 0.15.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/LICENSE +21 -21
- package/README.md +253 -253
- package/dist/assets/.arcane/agents/agent-policies-template.md +414 -414
- package/dist/assets/.arcane/governance/agent-policies.md +414 -414
- package/dist/assets/.arcane/governance/agent-work-queue-model.md +61 -61
- package/dist/assets/.arcane/governance/cicd-standards.md +227 -227
- package/dist/assets/.arcane/governance/development-methodology.md +384 -384
- package/dist/assets/.arcane/governance/git-conventions.md +759 -759
- package/dist/assets/.arcane/governance/naming-conventions.md +142 -142
- package/dist/assets/.arcane/governance/new-business-setup.md +182 -182
- package/dist/assets/.arcane/governance/portable-bootstrap.md +101 -101
- package/dist/assets/.arcane/governance/product-excellence-standards.md +211 -211
- package/dist/assets/.arcane/governance/testing-standards.md +158 -158
- package/dist/assets/.arcane/governance/universal-agent-rules.md +108 -108
- package/dist/assets/.arcane/image-prompts/adelaide-image-prompt.md +140 -140
- package/dist/assets/.arcane/image-prompts/alexander-image-prompt.md +138 -138
- package/dist/assets/.arcane/image-prompts/bess-image-prompt.md +139 -139
- package/dist/assets/.arcane/image-prompts/circe-image-prompt.md +143 -143
- package/dist/assets/.arcane/image-prompts/custodio-image-prompt.md +140 -140
- package/dist/assets/.arcane/image-prompts/iris-image-prompt.md +139 -139
- package/dist/assets/.arcane/image-prompts/kellar-image-prompt.md +141 -141
- package/dist/assets/.arcane/image-prompts/lafayette-image-prompt.md +140 -140
- package/dist/assets/.arcane/image-prompts/lince-image-prompt.md +142 -142
- package/dist/assets/.arcane/image-prompts/mercurio-image-prompt.md +140 -140
- package/dist/assets/.arcane/image-prompts/merlin-image-prompt.md +139 -139
- package/dist/assets/.arcane/image-prompts/prospero-image-prompt.md +141 -141
- package/dist/assets/.arcane.json +5 -0
- package/dist/assets/.claude/commands/spell-enchant.md +9 -9
- package/dist/assets/.github/agents/adelaide.agent.md +44 -44
- package/dist/assets/.github/agents/alexander.agent.md +43 -43
- package/dist/assets/.github/agents/bess.agent.md +42 -42
- package/dist/assets/.github/agents/circe.agent.md +43 -43
- package/dist/assets/.github/agents/custodio.agent.md +44 -44
- package/dist/assets/.github/agents/iris.agent.md +43 -43
- package/dist/assets/.github/agents/kellar.agent.md +43 -43
- package/dist/assets/.github/agents/lafayette.agent.md +42 -42
- package/dist/assets/.github/agents/lince.agent.md +43 -43
- package/dist/assets/.github/agents/mercurio.agent.md +43 -43
- package/dist/assets/.github/agents/merlin.agent.md +44 -44
- package/dist/assets/.github/agents/prospero.agent.md +43 -43
- package/dist/assets/.github/prompts/spell-close-session.prompt.md +17 -5
- package/dist/assets/.github/prompts/spell-commit-work.prompt.md +24 -6
- package/dist/assets/.github/prompts/spell-create-pull-request.prompt.md +12 -3
- package/dist/assets/.github/prompts/spell-enchant.prompt.md +385 -385
- package/dist/assets/.github/prompts/spell-feedback.prompt.md +113 -113
- package/dist/assets/.github/prompts/spell-full-cycle.prompt.md +202 -201
- package/dist/assets/.github/prompts/spell-implement.prompt.md +101 -101
- package/dist/assets/.github/prompts/spell-open-session.prompt.md +20 -5
- package/dist/assets/.github/prompts/spell-scope.prompt.md +263 -263
- package/dist/assets/agents/architecture-lead.yaml +61 -61
- package/dist/assets/agents/collaborator.yaml +59 -59
- package/dist/assets/agents/devops.yaml +60 -60
- package/dist/assets/agents/frontend-dev.yaml +60 -60
- package/dist/assets/agents/fullstack-dev.yaml +59 -59
- package/dist/assets/agents/marketing-strategist.yaml +60 -60
- package/dist/assets/agents/mobile-dev.yaml +59 -59
- package/dist/assets/agents/operations-comms.yaml +58 -58
- package/dist/assets/agents/orchestrator.yaml +60 -60
- package/dist/assets/agents/qa-lead.yaml +60 -60
- package/dist/assets/agents/research-analyst.yaml +59 -59
- package/dist/assets/agents/security-ops.yaml +61 -61
- package/dist/index.js +346 -9
- package/dist/index.js.map +1 -1
- package/package.json +72 -72
- package/dist/assets/.claude/commands/spell-eas-ios-deploy.md +0 -9
- package/dist/assets/.github/prompts/spell-eas-ios-deploy.prompt.md +0 -183
|
@@ -1,263 +1,263 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Spell — Scope
|
|
3
|
-
description: Analyze a large PRD — scope it, split into epics, check architecture and security implications, estimate effort, and produce an execution plan with agent assignments
|
|
4
|
-
argument-hint: "Path to PRD or paste PRD content (e.g., 'Analyze PRD.md for {BUSINESS_NAME} mobile app')"
|
|
5
|
-
agent: agent
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Executive Summary
|
|
9
|
-
|
|
10
|
-
- This spell takes a PRD of any size and produces an actionable execution plan.
|
|
11
|
-
- It assesses scope, splits into sprint-sized epics, identifies architecture/security decisions needed, and maps agents to work.
|
|
12
|
-
- Use this before `spell-architect` when the PRD is too large for a single Spell Loop cycle. (Formerly `spell-assess`.)
|
|
13
|
-
- Output: `execution-plan.md` — ordered epics with dependency graph, risk flags, ADR candidates, and agent assignments.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
Analyze the provided PRD and produce a scoped execution plan.
|
|
18
|
-
|
|
19
|
-
Use these files for context. Each is optional — if a file is missing, proceed with the stated fallback and note the gap in the output's Open Questions:
|
|
20
|
-
|
|
21
|
-
- [governance/development-methodology.md](../../governance/development-methodology.md) — Spell Loop methodology, story sizing rules, and the canonical **ADO Hierarchy Rules**. *Fallback: if missing, use the default sizing of 4–8 right-sized stories per cycle described below and skip external-tracker hierarchy mapping.*
|
|
22
|
-
- [governance/testing-standards.md](../../governance/testing-standards.md) — Testing frameworks per stack. *Fallback: if missing, flag test strategy as an open question.*
|
|
23
|
-
- [governance/cicd-standards.md](../../governance/cicd-standards.md) — Pipeline requirements. *Fallback: if missing, omit pipeline considerations.*
|
|
24
|
-
- [DECISIONS.md](../../DECISIONS.md) — Existing ADRs to check against. *Fallback: if missing, treat all architecture decisions as new candidates.*
|
|
25
|
-
- [security/threat-model.md](../../security/threat-model.md) — Active threat model. *Fallback: if missing, apply OWASP Top 10 as the baseline.*
|
|
26
|
-
- [agents/agent-policies.md](../../agents/agent-policies.md) — Agent roster, power levels, capabilities. *Fallback: if missing, assign work by role label (architecture, backend, frontend, mobile, QA, DevOps, research) instead of named personas.*
|
|
27
|
-
- [naming-conventions.md](../../naming-conventions.md) — Agent roster and role-to-persona mapping. *Fallback: if missing, refer to roles by their generic label.*
|
|
28
|
-
- [project.md](../../project.md) — Project goals and business context. *Fallback: if missing, derive context from the PRD itself.*
|
|
29
|
-
- [governance/product-excellence-standards.md](../../governance/product-excellence-standards.md) — PRD Quality Scorecard and scoring rubric. *Fallback: if missing, skip the Quality Quick-Check (section 1.5) and note that it was skipped.*
|
|
30
|
-
|
|
31
|
-
> **Roster by reference.** This spell maps work to **roles** (architecture, backend, frontend, mobile, QA, DevOps, research, marketing). Resolve each role to a concrete agent persona via `agents/agent-policies.md` / `naming-conventions.md` at run time — do not assume a fixed set of persona names.
|
|
32
|
-
|
|
33
|
-
> **Placeholder resolution.** `{ADO_ORG}`, `{ADO_PROJECT}`, `{BUSINESS_NAME}`, and any other `{UPPER_SNAKE}` token resolve from `.arcane.json` or the PRD frontmatter; if a value is unset, ask rather than assuming a default.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Workflow
|
|
38
|
-
|
|
39
|
-
### 1. PRD Intake
|
|
40
|
-
|
|
41
|
-
Accept the PRD from one of these input sources:
|
|
42
|
-
|
|
43
|
-
| Source | Format | How to fetch |
|
|
44
|
-
|--------|--------|--------------|
|
|
45
|
-
| **File path** | `PRD.md` or any markdown file | Read the file directly |
|
|
46
|
-
| **Pasted content** | Inline text in the prompt | Use as-is |
|
|
47
|
-
| **External tracker work item ID** (external mode) | `#507` or `507` with org name | Detect the provider (see tracking settings below) and fetch the item's title, description, and acceptance criteria via that provider's CLI/API. For ADO: `az boards work-item show --id {id} --org https://dev.azure.com/{ADO_ORG} --output json` and extract `System.Description`, `Microsoft.VSTS.Common.AcceptanceCriteria`, and `System.Title` |
|
|
48
|
-
|
|
49
|
-
If the input is an external work item ID:
|
|
50
|
-
1. Confirm the org/account: `{ADO_ORG}` — resolve from `.arcane.json` / PRD frontmatter; ask if unset.
|
|
51
|
-
2. Fetch the item via the detected provider (for ADO: `az boards work-item show`).
|
|
52
|
-
3. If the work item has child items, fetch those too — they may contain additional requirements.
|
|
53
|
-
4. Combine all content into a single PRD view before proceeding.
|
|
54
|
-
|
|
55
|
-
Resolve tracking settings from PRD frontmatter (preferred) or ask:
|
|
56
|
-
- `tracking_mode: internal | external`
|
|
57
|
-
- `external_provider: ado | jira | other`
|
|
58
|
-
|
|
59
|
-
If unset and ADO context already exists, default to `external` + `ado` for backward compatibility.
|
|
60
|
-
|
|
61
|
-
If `tracking_mode=external` and `external_provider=ado`, resolve template/type availability before splitting epics (resolve `{ADO_ORG}` / `{ADO_PROJECT}` from `.arcane.json` / PRD frontmatter; ask if unset):
|
|
62
|
-
```bash
|
|
63
|
-
az devops project show --org https://dev.azure.com/{ADO_ORG} --project {ADO_PROJECT} --query "capabilities.processTemplate.templateName" --output tsv
|
|
64
|
-
az boards work-item-type list --org https://dev.azure.com/{ADO_ORG} --project {ADO_PROJECT} --output json --query "[].name"
|
|
65
|
-
```
|
|
66
|
-
For non-ADO providers, detect the provider from `external_provider` and resolve its equivalent item types instead.
|
|
67
|
-
|
|
68
|
-
Read the full PRD. Extract:
|
|
69
|
-
- **Feature name** and business context
|
|
70
|
-
- **Target repo** and tech stack
|
|
71
|
-
- **Total requirement count** (Must Have / Should Have / Won't Have)
|
|
72
|
-
- **Total acceptance criteria count**
|
|
73
|
-
- **Dependencies** on external services, APIs, or decisions
|
|
74
|
-
|
|
75
|
-
### 1.5. Quality Quick-Check
|
|
76
|
-
|
|
77
|
-
Before proceeding to scope assessment, run a quick quality audit against the PRD Quality Scorecard in `governance/product-excellence-standards.md`. Score each dimension (Requirements, UX, Accessibility, Performance, Security, Responsive, Competitive) as Bronze / Silver / Gold.
|
|
78
|
-
|
|
79
|
-
If any dimension scores **Bronze**, recommend:
|
|
80
|
-
> 💡 **Quality recommendation:** This PRD scores Bronze on [dimensions]. Consider running `spell-enchant` to enhance the PRD before continuing with assessment and architecture. `spell-enchant` will conduct competitive research (research role) and marketing review (marketing role), and proactively add missing quality requirements.
|
|
81
|
-
|
|
82
|
-
This is a recommendation, not a gate — the user decides whether to enchant first or proceed directly. Include the scorecard results in the execution plan output regardless.
|
|
83
|
-
|
|
84
|
-
### 2. Scope Assessment
|
|
85
|
-
|
|
86
|
-
Evaluate the PRD against Spell Loop sizing rules:
|
|
87
|
-
- Each Spell Loop cycle = **1-2 weeks of agent work** = **4-8 right-sized stories**
|
|
88
|
-
- A right-sized story: one file change, one endpoint, one component, one migration
|
|
89
|
-
- Flag anything that violates story sizing: "Build the entire dashboard", "Add authentication", "Refactor the API layer"
|
|
90
|
-
|
|
91
|
-
Classify the PRD:
|
|
92
|
-
|
|
93
|
-
| Classification | Criteria | Action |
|
|
94
|
-
|---------------|----------|--------|
|
|
95
|
-
| **Single cycle** | ≤ 8 stories, no cross-cutting concerns | Proceed directly to `spell-architect` |
|
|
96
|
-
| **Multi-cycle** | 9-30 stories, clear epic boundaries | Split into epics, each gets its own Spell Loop run |
|
|
97
|
-
| **Program-scale** | 30+ stories, multiple subsystems, cross-team concerns | Split into phases with milestone gates between them |
|
|
98
|
-
|
|
99
|
-
### 3. Epic Splitting (if multi-cycle or program-scale)
|
|
100
|
-
|
|
101
|
-
Break the PRD into epics. Each epic must be:
|
|
102
|
-
- **Self-contained** — shippable independently (no half-built features)
|
|
103
|
-
- **Sprint-sized** — 4-8 stories per epic
|
|
104
|
-
- **Dependency-ordered** — infrastructure before API before UI before polish
|
|
105
|
-
|
|
106
|
-
For each epic, define:
|
|
107
|
-
```markdown
|
|
108
|
-
### Epic N: [Name]
|
|
109
|
-
**Stories (estimated):** [count]
|
|
110
|
-
**Dependencies:** [prior epics or external]
|
|
111
|
-
**Tech stack:** [frameworks, platforms]
|
|
112
|
-
**Primary role:** [backend / frontend / mobile / full-stack — resolve to a persona via `agent-policies` / `naming-conventions`]
|
|
113
|
-
**Risk level:** Low / Medium / High
|
|
114
|
-
**Sprint estimate:** [1 or 2 cycles]
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### 3.5. External Tracker Mapping (external mode)
|
|
118
|
-
|
|
119
|
-
Only applies when `tracking_mode=external`. Skip entirely for internal mode.
|
|
120
|
-
|
|
121
|
-
Do **not** inline the work-item-type fallback order or the parent/child linkage rules here — they are the single source of truth in [governance/development-methodology.md](../../governance/development-methodology.md) → **Process-Template-Aware ADO Hierarchy Rules**. Detect the provider from `external_provider`, then apply those rules. *Fallback: if that doc is missing, record the tracker mapping as an Open Question and proceed without item-type assignment.*
|
|
122
|
-
|
|
123
|
-
Scope-specific delta (the only thing this spell adds on top of those rules): each split **epic** maps to the **Epic-level** logical level — use the `Epic` work item type whenever the resolved provider/template offers it, and record the selected type per epic in `execution-plan.md`. All lower-level and linkage decisions defer to the governance rules above.
|
|
124
|
-
|
|
125
|
-
### 4. Architecture Decision Check
|
|
126
|
-
|
|
127
|
-
Scan the PRD for decisions that need ADRs:
|
|
128
|
-
- New frameworks or libraries not already in the stack
|
|
129
|
-
- New external service integrations (APIs, databases, auth providers)
|
|
130
|
-
- Data model changes that affect multiple subsystems
|
|
131
|
-
- Deployment topology changes
|
|
132
|
-
- New communication patterns (sync vs async, REST vs gRPC vs events)
|
|
133
|
-
|
|
134
|
-
For each candidate:
|
|
135
|
-
```markdown
|
|
136
|
-
#### ADR Candidate: [Title]
|
|
137
|
-
**Trigger:** [What in the PRD requires this decision]
|
|
138
|
-
**Options:** [2-3 alternatives]
|
|
139
|
-
**Recommendation:** [If obvious, state it; otherwise flag for the architecture role]
|
|
140
|
-
**Blocking:** [Which epics are blocked until this is decided]
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### 5. Security Review
|
|
144
|
-
|
|
145
|
-
Check the PRD against the threat model:
|
|
146
|
-
- Does this feature introduce new attack surface? (new endpoints, new auth flows, new data stores)
|
|
147
|
-
- Does it handle PII, payment data, or secrets?
|
|
148
|
-
- Does it change trust boundaries? (new external integrations, new user roles)
|
|
149
|
-
- Are there OWASP Top 10 concerns? (injection points, auth gaps, data exposure)
|
|
150
|
-
|
|
151
|
-
For each concern:
|
|
152
|
-
```markdown
|
|
153
|
-
#### Security Flag: [Title]
|
|
154
|
-
**Threat:** [What could go wrong]
|
|
155
|
-
**Mitigation required:** [What the implementation must include]
|
|
156
|
-
**Blocking:** [yes/no — can the epic proceed without resolving this?]
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### 6. Agent Assignment
|
|
160
|
-
|
|
161
|
-
Map each epic to the right **role**, then resolve each role to a concrete agent persona via `agents/agent-policies.md` / `naming-conventions.md` (fallback: keep the generic role label if the roster files are absent):
|
|
162
|
-
|
|
163
|
-
| Role | When |
|
|
164
|
-
|------|------|
|
|
165
|
-
| Architecture | ADR candidates, cross-epic design decisions |
|
|
166
|
-
| Backend / Full-stack | APIs, databases, server-side logic |
|
|
167
|
-
| Frontend / UI | Web UI, component frameworks |
|
|
168
|
-
| Mobile | Native/cross-platform mobile apps |
|
|
169
|
-
| QA | Test strategy, coverage validation |
|
|
170
|
-
| DevOps | Pipeline creation, deployment config |
|
|
171
|
-
| Research | Unknowns, technology evaluation, competitive analysis |
|
|
172
|
-
| Marketing | User-facing copy, landing pages, SEO |
|
|
173
|
-
|
|
174
|
-
Flag any epics that need **multiple roles** (e.g., a full-stack feature = backend + frontend + QA).
|
|
175
|
-
|
|
176
|
-
### 7. Dependency Graph
|
|
177
|
-
|
|
178
|
-
Produce a Mermaid diagram showing epic execution order:
|
|
179
|
-
|
|
180
|
-
```mermaid
|
|
181
|
-
flowchart LR
|
|
182
|
-
E1[Epic 1: Infrastructure] --> E2[Epic 2: API Layer]
|
|
183
|
-
E2 --> E3[Epic 3: Web UI]
|
|
184
|
-
E2 --> E4[Epic 4: Mobile App]
|
|
185
|
-
E3 --> E5[Epic 5: Integration Tests]
|
|
186
|
-
E4 --> E5
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
Identify:
|
|
190
|
-
- **Critical path** — the longest dependency chain
|
|
191
|
-
- **Parallelizable epics** — epics that can run simultaneously on different branches
|
|
192
|
-
- **Milestone gates** — points where human review is needed before continuing
|
|
193
|
-
|
|
194
|
-
### 8. Execution Plan Output
|
|
195
|
-
|
|
196
|
-
Produce `execution-plan.md` with this structure:
|
|
197
|
-
|
|
198
|
-
```markdown
|
|
199
|
-
# Execution Plan: [Feature Name]
|
|
200
|
-
|
|
201
|
-
## PRD Summary
|
|
202
|
-
- **Source:** [PRD file or inline]
|
|
203
|
-
- **Business:** [which business]
|
|
204
|
-
- **Target repo:** [org/repo]
|
|
205
|
-
- **Classification:** Single cycle / Multi-cycle / Program-scale
|
|
206
|
-
- **Total epics:** [N]
|
|
207
|
-
- **Total estimated stories:** [N]
|
|
208
|
-
- **ADR candidates:** [N]
|
|
209
|
-
- **Security flags:** [N]
|
|
210
|
-
|
|
211
|
-
## Dependency Graph
|
|
212
|
-
[Mermaid diagram]
|
|
213
|
-
|
|
214
|
-
## Epics
|
|
215
|
-
|
|
216
|
-
### Epic 1: [Name]
|
|
217
|
-
- **Stories:** [estimated count]
|
|
218
|
-
- **Agent:** [primary]
|
|
219
|
-
- **Dependencies:** none
|
|
220
|
-
- **Tracking item:** [internal-only OR external provider + type/id]
|
|
221
|
-
- **Risk:** Low/Medium/High
|
|
222
|
-
- **Notes:** [any special considerations]
|
|
223
|
-
|
|
224
|
-
### Epic 2: [Name]
|
|
225
|
-
...
|
|
226
|
-
|
|
227
|
-
## Architecture Decisions Required
|
|
228
|
-
[List of ADR candidates with recommendations]
|
|
229
|
-
|
|
230
|
-
## Security Flags
|
|
231
|
-
[List of security concerns with mitigations]
|
|
232
|
-
|
|
233
|
-
## Recommended Execution Order
|
|
234
|
-
1. Resolve ADR candidates (architecture role)
|
|
235
|
-
2. Epic 1 — spell-full-cycle or spell-architect → spell-implement → spell-ship
|
|
236
|
-
3. Run spell-commit-work to checkpoint major outputs before starting Epic 2
|
|
237
|
-
4. Epic 2 — ...
|
|
238
|
-
5. [milestone gate if needed]
|
|
239
|
-
6. Epic N — ...
|
|
240
|
-
|
|
241
|
-
## Open Questions
|
|
242
|
-
[Anything that needs human decision before execution can start]
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
If `external_provider=jira` or `external_provider=other`, add explicit TODOs in Open Questions for provider-specific type mapping and linkage automation.
|
|
246
|
-
|
|
247
|
-
### 9. Present and Confirm
|
|
248
|
-
|
|
249
|
-
Present the execution plan to the user. Ask:
|
|
250
|
-
1. Does the epic split make sense?
|
|
251
|
-
2. Are the ADR candidates correct? Should any be decided now?
|
|
252
|
-
3. Are there epics that should be deprioritized or cut?
|
|
253
|
-
4. Ready to start with Epic 1?
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## Rules
|
|
258
|
-
|
|
259
|
-
- **Never start implementation from this spell.** This spell produces a plan, not code. The output feeds into `spell-architect` or `spell-full-cycle`.
|
|
260
|
-
- **Be honest about unknowns.** If the PRD references technology or services you don't have context on, flag it as a research item for the research role.
|
|
261
|
-
- **Respect existing ADRs.** If the PRD proposes something that contradicts an existing ADR, flag the conflict — don't silently override.
|
|
262
|
-
- **Conservative estimates.** When in doubt, split smaller. Two small epics are better than one that's too big.
|
|
263
|
-
- **Security is non-negotiable.** If a security flag is blocking, it blocks. No "we'll add auth later."
|
|
1
|
+
---
|
|
2
|
+
name: Spell — Scope
|
|
3
|
+
description: Analyze a large PRD — scope it, split into epics, check architecture and security implications, estimate effort, and produce an execution plan with agent assignments
|
|
4
|
+
argument-hint: "Path to PRD or paste PRD content (e.g., 'Analyze PRD.md for {BUSINESS_NAME} mobile app')"
|
|
5
|
+
agent: agent
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Executive Summary
|
|
9
|
+
|
|
10
|
+
- This spell takes a PRD of any size and produces an actionable execution plan.
|
|
11
|
+
- It assesses scope, splits into sprint-sized epics, identifies architecture/security decisions needed, and maps agents to work.
|
|
12
|
+
- Use this before `spell-architect` when the PRD is too large for a single Spell Loop cycle. (Formerly `spell-assess`.)
|
|
13
|
+
- Output: `execution-plan.md` — ordered epics with dependency graph, risk flags, ADR candidates, and agent assignments.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Analyze the provided PRD and produce a scoped execution plan.
|
|
18
|
+
|
|
19
|
+
Use these files for context. Each is optional — if a file is missing, proceed with the stated fallback and note the gap in the output's Open Questions:
|
|
20
|
+
|
|
21
|
+
- [governance/development-methodology.md](../../governance/development-methodology.md) — Spell Loop methodology, story sizing rules, and the canonical **ADO Hierarchy Rules**. *Fallback: if missing, use the default sizing of 4–8 right-sized stories per cycle described below and skip external-tracker hierarchy mapping.*
|
|
22
|
+
- [governance/testing-standards.md](../../governance/testing-standards.md) — Testing frameworks per stack. *Fallback: if missing, flag test strategy as an open question.*
|
|
23
|
+
- [governance/cicd-standards.md](../../governance/cicd-standards.md) — Pipeline requirements. *Fallback: if missing, omit pipeline considerations.*
|
|
24
|
+
- [DECISIONS.md](../../DECISIONS.md) — Existing ADRs to check against. *Fallback: if missing, treat all architecture decisions as new candidates.*
|
|
25
|
+
- [security/threat-model.md](../../security/threat-model.md) — Active threat model. *Fallback: if missing, apply OWASP Top 10 as the baseline.*
|
|
26
|
+
- [agents/agent-policies.md](../../agents/agent-policies.md) — Agent roster, power levels, capabilities. *Fallback: if missing, assign work by role label (architecture, backend, frontend, mobile, QA, DevOps, research) instead of named personas.*
|
|
27
|
+
- [naming-conventions.md](../../naming-conventions.md) — Agent roster and role-to-persona mapping. *Fallback: if missing, refer to roles by their generic label.*
|
|
28
|
+
- [project.md](../../project.md) — Project goals and business context. *Fallback: if missing, derive context from the PRD itself.*
|
|
29
|
+
- [governance/product-excellence-standards.md](../../governance/product-excellence-standards.md) — PRD Quality Scorecard and scoring rubric. *Fallback: if missing, skip the Quality Quick-Check (section 1.5) and note that it was skipped.*
|
|
30
|
+
|
|
31
|
+
> **Roster by reference.** This spell maps work to **roles** (architecture, backend, frontend, mobile, QA, DevOps, research, marketing). Resolve each role to a concrete agent persona via `agents/agent-policies.md` / `naming-conventions.md` at run time — do not assume a fixed set of persona names.
|
|
32
|
+
|
|
33
|
+
> **Placeholder resolution.** `{ADO_ORG}`, `{ADO_PROJECT}`, `{BUSINESS_NAME}`, and any other `{UPPER_SNAKE}` token resolve from `.arcane.json` or the PRD frontmatter; if a value is unset, ask rather than assuming a default.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Workflow
|
|
38
|
+
|
|
39
|
+
### 1. PRD Intake
|
|
40
|
+
|
|
41
|
+
Accept the PRD from one of these input sources:
|
|
42
|
+
|
|
43
|
+
| Source | Format | How to fetch |
|
|
44
|
+
|--------|--------|--------------|
|
|
45
|
+
| **File path** | `PRD.md` or any markdown file | Read the file directly |
|
|
46
|
+
| **Pasted content** | Inline text in the prompt | Use as-is |
|
|
47
|
+
| **External tracker work item ID** (external mode) | `#507` or `507` with org name | Detect the provider (see tracking settings below) and fetch the item's title, description, and acceptance criteria via that provider's CLI/API. For ADO: `az boards work-item show --id {id} --org https://dev.azure.com/{ADO_ORG} --output json` and extract `System.Description`, `Microsoft.VSTS.Common.AcceptanceCriteria`, and `System.Title` |
|
|
48
|
+
|
|
49
|
+
If the input is an external work item ID:
|
|
50
|
+
1. Confirm the org/account: `{ADO_ORG}` — resolve from `.arcane.json` / PRD frontmatter; ask if unset.
|
|
51
|
+
2. Fetch the item via the detected provider (for ADO: `az boards work-item show`).
|
|
52
|
+
3. If the work item has child items, fetch those too — they may contain additional requirements.
|
|
53
|
+
4. Combine all content into a single PRD view before proceeding.
|
|
54
|
+
|
|
55
|
+
Resolve tracking settings from PRD frontmatter (preferred) or ask:
|
|
56
|
+
- `tracking_mode: internal | external`
|
|
57
|
+
- `external_provider: ado | jira | other`
|
|
58
|
+
|
|
59
|
+
If unset and ADO context already exists, default to `external` + `ado` for backward compatibility.
|
|
60
|
+
|
|
61
|
+
If `tracking_mode=external` and `external_provider=ado`, resolve template/type availability before splitting epics (resolve `{ADO_ORG}` / `{ADO_PROJECT}` from `.arcane.json` / PRD frontmatter; ask if unset):
|
|
62
|
+
```bash
|
|
63
|
+
az devops project show --org https://dev.azure.com/{ADO_ORG} --project {ADO_PROJECT} --query "capabilities.processTemplate.templateName" --output tsv
|
|
64
|
+
az boards work-item-type list --org https://dev.azure.com/{ADO_ORG} --project {ADO_PROJECT} --output json --query "[].name"
|
|
65
|
+
```
|
|
66
|
+
For non-ADO providers, detect the provider from `external_provider` and resolve its equivalent item types instead.
|
|
67
|
+
|
|
68
|
+
Read the full PRD. Extract:
|
|
69
|
+
- **Feature name** and business context
|
|
70
|
+
- **Target repo** and tech stack
|
|
71
|
+
- **Total requirement count** (Must Have / Should Have / Won't Have)
|
|
72
|
+
- **Total acceptance criteria count**
|
|
73
|
+
- **Dependencies** on external services, APIs, or decisions
|
|
74
|
+
|
|
75
|
+
### 1.5. Quality Quick-Check
|
|
76
|
+
|
|
77
|
+
Before proceeding to scope assessment, run a quick quality audit against the PRD Quality Scorecard in `governance/product-excellence-standards.md`. Score each dimension (Requirements, UX, Accessibility, Performance, Security, Responsive, Competitive) as Bronze / Silver / Gold.
|
|
78
|
+
|
|
79
|
+
If any dimension scores **Bronze**, recommend:
|
|
80
|
+
> 💡 **Quality recommendation:** This PRD scores Bronze on [dimensions]. Consider running `spell-enchant` to enhance the PRD before continuing with assessment and architecture. `spell-enchant` will conduct competitive research (research role) and marketing review (marketing role), and proactively add missing quality requirements.
|
|
81
|
+
|
|
82
|
+
This is a recommendation, not a gate — the user decides whether to enchant first or proceed directly. Include the scorecard results in the execution plan output regardless.
|
|
83
|
+
|
|
84
|
+
### 2. Scope Assessment
|
|
85
|
+
|
|
86
|
+
Evaluate the PRD against Spell Loop sizing rules:
|
|
87
|
+
- Each Spell Loop cycle = **1-2 weeks of agent work** = **4-8 right-sized stories**
|
|
88
|
+
- A right-sized story: one file change, one endpoint, one component, one migration
|
|
89
|
+
- Flag anything that violates story sizing: "Build the entire dashboard", "Add authentication", "Refactor the API layer"
|
|
90
|
+
|
|
91
|
+
Classify the PRD:
|
|
92
|
+
|
|
93
|
+
| Classification | Criteria | Action |
|
|
94
|
+
|---------------|----------|--------|
|
|
95
|
+
| **Single cycle** | ≤ 8 stories, no cross-cutting concerns | Proceed directly to `spell-architect` |
|
|
96
|
+
| **Multi-cycle** | 9-30 stories, clear epic boundaries | Split into epics, each gets its own Spell Loop run |
|
|
97
|
+
| **Program-scale** | 30+ stories, multiple subsystems, cross-team concerns | Split into phases with milestone gates between them |
|
|
98
|
+
|
|
99
|
+
### 3. Epic Splitting (if multi-cycle or program-scale)
|
|
100
|
+
|
|
101
|
+
Break the PRD into epics. Each epic must be:
|
|
102
|
+
- **Self-contained** — shippable independently (no half-built features)
|
|
103
|
+
- **Sprint-sized** — 4-8 stories per epic
|
|
104
|
+
- **Dependency-ordered** — infrastructure before API before UI before polish
|
|
105
|
+
|
|
106
|
+
For each epic, define:
|
|
107
|
+
```markdown
|
|
108
|
+
### Epic N: [Name]
|
|
109
|
+
**Stories (estimated):** [count]
|
|
110
|
+
**Dependencies:** [prior epics or external]
|
|
111
|
+
**Tech stack:** [frameworks, platforms]
|
|
112
|
+
**Primary role:** [backend / frontend / mobile / full-stack — resolve to a persona via `agent-policies` / `naming-conventions`]
|
|
113
|
+
**Risk level:** Low / Medium / High
|
|
114
|
+
**Sprint estimate:** [1 or 2 cycles]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 3.5. External Tracker Mapping (external mode)
|
|
118
|
+
|
|
119
|
+
Only applies when `tracking_mode=external`. Skip entirely for internal mode.
|
|
120
|
+
|
|
121
|
+
Do **not** inline the work-item-type fallback order or the parent/child linkage rules here — they are the single source of truth in [governance/development-methodology.md](../../governance/development-methodology.md) → **Process-Template-Aware ADO Hierarchy Rules**. Detect the provider from `external_provider`, then apply those rules. *Fallback: if that doc is missing, record the tracker mapping as an Open Question and proceed without item-type assignment.*
|
|
122
|
+
|
|
123
|
+
Scope-specific delta (the only thing this spell adds on top of those rules): each split **epic** maps to the **Epic-level** logical level — use the `Epic` work item type whenever the resolved provider/template offers it, and record the selected type per epic in `execution-plan.md`. All lower-level and linkage decisions defer to the governance rules above.
|
|
124
|
+
|
|
125
|
+
### 4. Architecture Decision Check
|
|
126
|
+
|
|
127
|
+
Scan the PRD for decisions that need ADRs:
|
|
128
|
+
- New frameworks or libraries not already in the stack
|
|
129
|
+
- New external service integrations (APIs, databases, auth providers)
|
|
130
|
+
- Data model changes that affect multiple subsystems
|
|
131
|
+
- Deployment topology changes
|
|
132
|
+
- New communication patterns (sync vs async, REST vs gRPC vs events)
|
|
133
|
+
|
|
134
|
+
For each candidate:
|
|
135
|
+
```markdown
|
|
136
|
+
#### ADR Candidate: [Title]
|
|
137
|
+
**Trigger:** [What in the PRD requires this decision]
|
|
138
|
+
**Options:** [2-3 alternatives]
|
|
139
|
+
**Recommendation:** [If obvious, state it; otherwise flag for the architecture role]
|
|
140
|
+
**Blocking:** [Which epics are blocked until this is decided]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 5. Security Review
|
|
144
|
+
|
|
145
|
+
Check the PRD against the threat model:
|
|
146
|
+
- Does this feature introduce new attack surface? (new endpoints, new auth flows, new data stores)
|
|
147
|
+
- Does it handle PII, payment data, or secrets?
|
|
148
|
+
- Does it change trust boundaries? (new external integrations, new user roles)
|
|
149
|
+
- Are there OWASP Top 10 concerns? (injection points, auth gaps, data exposure)
|
|
150
|
+
|
|
151
|
+
For each concern:
|
|
152
|
+
```markdown
|
|
153
|
+
#### Security Flag: [Title]
|
|
154
|
+
**Threat:** [What could go wrong]
|
|
155
|
+
**Mitigation required:** [What the implementation must include]
|
|
156
|
+
**Blocking:** [yes/no — can the epic proceed without resolving this?]
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### 6. Agent Assignment
|
|
160
|
+
|
|
161
|
+
Map each epic to the right **role**, then resolve each role to a concrete agent persona via `agents/agent-policies.md` / `naming-conventions.md` (fallback: keep the generic role label if the roster files are absent):
|
|
162
|
+
|
|
163
|
+
| Role | When |
|
|
164
|
+
|------|------|
|
|
165
|
+
| Architecture | ADR candidates, cross-epic design decisions |
|
|
166
|
+
| Backend / Full-stack | APIs, databases, server-side logic |
|
|
167
|
+
| Frontend / UI | Web UI, component frameworks |
|
|
168
|
+
| Mobile | Native/cross-platform mobile apps |
|
|
169
|
+
| QA | Test strategy, coverage validation |
|
|
170
|
+
| DevOps | Pipeline creation, deployment config |
|
|
171
|
+
| Research | Unknowns, technology evaluation, competitive analysis |
|
|
172
|
+
| Marketing | User-facing copy, landing pages, SEO |
|
|
173
|
+
|
|
174
|
+
Flag any epics that need **multiple roles** (e.g., a full-stack feature = backend + frontend + QA).
|
|
175
|
+
|
|
176
|
+
### 7. Dependency Graph
|
|
177
|
+
|
|
178
|
+
Produce a Mermaid diagram showing epic execution order:
|
|
179
|
+
|
|
180
|
+
```mermaid
|
|
181
|
+
flowchart LR
|
|
182
|
+
E1[Epic 1: Infrastructure] --> E2[Epic 2: API Layer]
|
|
183
|
+
E2 --> E3[Epic 3: Web UI]
|
|
184
|
+
E2 --> E4[Epic 4: Mobile App]
|
|
185
|
+
E3 --> E5[Epic 5: Integration Tests]
|
|
186
|
+
E4 --> E5
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Identify:
|
|
190
|
+
- **Critical path** — the longest dependency chain
|
|
191
|
+
- **Parallelizable epics** — epics that can run simultaneously on different branches
|
|
192
|
+
- **Milestone gates** — points where human review is needed before continuing
|
|
193
|
+
|
|
194
|
+
### 8. Execution Plan Output
|
|
195
|
+
|
|
196
|
+
Produce `execution-plan.md` with this structure:
|
|
197
|
+
|
|
198
|
+
```markdown
|
|
199
|
+
# Execution Plan: [Feature Name]
|
|
200
|
+
|
|
201
|
+
## PRD Summary
|
|
202
|
+
- **Source:** [PRD file or inline]
|
|
203
|
+
- **Business:** [which business]
|
|
204
|
+
- **Target repo:** [org/repo]
|
|
205
|
+
- **Classification:** Single cycle / Multi-cycle / Program-scale
|
|
206
|
+
- **Total epics:** [N]
|
|
207
|
+
- **Total estimated stories:** [N]
|
|
208
|
+
- **ADR candidates:** [N]
|
|
209
|
+
- **Security flags:** [N]
|
|
210
|
+
|
|
211
|
+
## Dependency Graph
|
|
212
|
+
[Mermaid diagram]
|
|
213
|
+
|
|
214
|
+
## Epics
|
|
215
|
+
|
|
216
|
+
### Epic 1: [Name]
|
|
217
|
+
- **Stories:** [estimated count]
|
|
218
|
+
- **Agent:** [primary]
|
|
219
|
+
- **Dependencies:** none
|
|
220
|
+
- **Tracking item:** [internal-only OR external provider + type/id]
|
|
221
|
+
- **Risk:** Low/Medium/High
|
|
222
|
+
- **Notes:** [any special considerations]
|
|
223
|
+
|
|
224
|
+
### Epic 2: [Name]
|
|
225
|
+
...
|
|
226
|
+
|
|
227
|
+
## Architecture Decisions Required
|
|
228
|
+
[List of ADR candidates with recommendations]
|
|
229
|
+
|
|
230
|
+
## Security Flags
|
|
231
|
+
[List of security concerns with mitigations]
|
|
232
|
+
|
|
233
|
+
## Recommended Execution Order
|
|
234
|
+
1. Resolve ADR candidates (architecture role)
|
|
235
|
+
2. Epic 1 — spell-full-cycle or spell-architect → spell-implement → spell-ship
|
|
236
|
+
3. Run spell-commit-work to checkpoint major outputs before starting Epic 2
|
|
237
|
+
4. Epic 2 — ...
|
|
238
|
+
5. [milestone gate if needed]
|
|
239
|
+
6. Epic N — ...
|
|
240
|
+
|
|
241
|
+
## Open Questions
|
|
242
|
+
[Anything that needs human decision before execution can start]
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
If `external_provider=jira` or `external_provider=other`, add explicit TODOs in Open Questions for provider-specific type mapping and linkage automation.
|
|
246
|
+
|
|
247
|
+
### 9. Present and Confirm
|
|
248
|
+
|
|
249
|
+
Present the execution plan to the user. Ask:
|
|
250
|
+
1. Does the epic split make sense?
|
|
251
|
+
2. Are the ADR candidates correct? Should any be decided now?
|
|
252
|
+
3. Are there epics that should be deprioritized or cut?
|
|
253
|
+
4. Ready to start with Epic 1?
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Rules
|
|
258
|
+
|
|
259
|
+
- **Never start implementation from this spell.** This spell produces a plan, not code. The output feeds into `spell-architect` or `spell-full-cycle`.
|
|
260
|
+
- **Be honest about unknowns.** If the PRD references technology or services you don't have context on, flag it as a research item for the research role.
|
|
261
|
+
- **Respect existing ADRs.** If the PRD proposes something that contradicts an existing ADR, flag the conflict — don't silently override.
|
|
262
|
+
- **Conservative estimates.** When in doubt, split smaller. Two small epics are better than one that's too big.
|
|
263
|
+
- **Security is non-negotiable.** If a security flag is blocking, it blocks. No "we'll add auth later."
|