arcane-cli 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +253 -0
  3. package/dist/assets/.arcane/agents/agent-policies-template.md +414 -0
  4. package/dist/assets/.arcane/governance/agent-approved-paths.md +60 -0
  5. package/dist/assets/.arcane/governance/agent-policies.md +414 -0
  6. package/dist/assets/.arcane/governance/agent-work-queue-model.md +61 -0
  7. package/dist/assets/.arcane/governance/authentication-strategy.md +220 -0
  8. package/dist/assets/.arcane/governance/cicd-standards.md +227 -0
  9. package/dist/assets/.arcane/governance/decision-documentation-standard.md +335 -0
  10. package/dist/assets/.arcane/governance/development-methodology.md +384 -0
  11. package/dist/assets/.arcane/governance/git-conventions.md +759 -0
  12. package/dist/assets/.arcane/governance/hardening-checklist.md +117 -0
  13. package/dist/assets/.arcane/governance/naming-conventions.md +142 -0
  14. package/dist/assets/.arcane/governance/new-business-setup.md +182 -0
  15. package/dist/assets/.arcane/governance/poc-management-pattern.md +190 -0
  16. package/dist/assets/.arcane/governance/portable-bootstrap.md +101 -0
  17. package/dist/assets/.arcane/governance/product-excellence-standards.md +211 -0
  18. package/dist/assets/.arcane/governance/rca-process-standard.md +157 -0
  19. package/dist/assets/.arcane/governance/spell-authoring-standards.md +129 -0
  20. package/dist/assets/.arcane/governance/testing-standards.md +158 -0
  21. package/dist/assets/.arcane/governance/threat-model.md +104 -0
  22. package/dist/assets/.arcane/governance/universal-agent-rules.md +108 -0
  23. package/dist/assets/.arcane/image-prompts/adelaide-image-prompt.md +140 -0
  24. package/dist/assets/.arcane/image-prompts/alexander-image-prompt.md +138 -0
  25. package/dist/assets/.arcane/image-prompts/bess-image-prompt.md +139 -0
  26. package/dist/assets/.arcane/image-prompts/circe-image-prompt.md +143 -0
  27. package/dist/assets/.arcane/image-prompts/custodio-image-prompt.md +140 -0
  28. package/dist/assets/.arcane/image-prompts/iris-image-prompt.md +139 -0
  29. package/dist/assets/.arcane/image-prompts/kellar-image-prompt.md +141 -0
  30. package/dist/assets/.arcane/image-prompts/lafayette-image-prompt.md +140 -0
  31. package/dist/assets/.arcane/image-prompts/lince-image-prompt.md +142 -0
  32. package/dist/assets/.arcane/image-prompts/mercurio-image-prompt.md +140 -0
  33. package/dist/assets/.arcane/image-prompts/merlin-image-prompt.md +139 -0
  34. package/dist/assets/.arcane/image-prompts/prospero-image-prompt.md +141 -0
  35. package/dist/assets/.arcane/templates/venture-template/overview.md +66 -0
  36. package/dist/assets/.claude/commands/spell-address-review.md +9 -0
  37. package/dist/assets/.claude/commands/spell-arcane-version.md +9 -0
  38. package/dist/assets/.claude/commands/spell-architect.md +9 -0
  39. package/dist/assets/.claude/commands/spell-bootstrap-business.md +9 -0
  40. package/dist/assets/.claude/commands/spell-brainstorm.md +9 -0
  41. package/dist/assets/.claude/commands/spell-bug.md +9 -0
  42. package/dist/assets/.claude/commands/spell-bump.md +9 -0
  43. package/dist/assets/.claude/commands/spell-check-drift.md +9 -0
  44. package/dist/assets/.claude/commands/spell-close-session.md +9 -0
  45. package/dist/assets/.claude/commands/spell-commit-work.md +9 -0
  46. package/dist/assets/.claude/commands/spell-create-pull-request.md +9 -0
  47. package/dist/assets/.claude/commands/spell-document.md +9 -0
  48. package/dist/assets/.claude/commands/spell-dotnet-expert.md +9 -0
  49. package/dist/assets/.claude/commands/spell-eas-ios-deploy.md +9 -0
  50. package/dist/assets/.claude/commands/spell-enchant.md +9 -0
  51. package/dist/assets/.claude/commands/spell-explain-concept.md +9 -0
  52. package/dist/assets/.claude/commands/spell-feedback.md +9 -0
  53. package/dist/assets/.claude/commands/spell-full-cycle.md +9 -0
  54. package/dist/assets/.claude/commands/spell-generate-bot-icons.md +9 -0
  55. package/dist/assets/.claude/commands/spell-implement.md +9 -0
  56. package/dist/assets/.claude/commands/spell-open-session.md +9 -0
  57. package/dist/assets/.claude/commands/spell-plan.md +9 -0
  58. package/dist/assets/.claude/commands/spell-present-arcane.md +9 -0
  59. package/dist/assets/.claude/commands/spell-product-review.md +9 -0
  60. package/dist/assets/.claude/commands/spell-review-batch.md +9 -0
  61. package/dist/assets/.claude/commands/spell-review.md +9 -0
  62. package/dist/assets/.claude/commands/spell-save-idea.md +9 -0
  63. package/dist/assets/.claude/commands/spell-scope.md +9 -0
  64. package/dist/assets/.claude/commands/spell-security-review.md +9 -0
  65. package/dist/assets/.claude/commands/spell-ship.md +9 -0
  66. package/dist/assets/.claude/commands/spell-status.md +9 -0
  67. package/dist/assets/.claude/commands/spell-suggest-feature.md +9 -0
  68. package/dist/assets/.claude/commands/spell-test.md +9 -0
  69. package/dist/assets/.claude/commands/spell-todo.md +9 -0
  70. package/dist/assets/.github/agents/adelaide.agent.md +44 -0
  71. package/dist/assets/.github/agents/alexander.agent.md +43 -0
  72. package/dist/assets/.github/agents/bess.agent.md +42 -0
  73. package/dist/assets/.github/agents/circe.agent.md +43 -0
  74. package/dist/assets/.github/agents/custodio.agent.md +44 -0
  75. package/dist/assets/.github/agents/iris.agent.md +43 -0
  76. package/dist/assets/.github/agents/kellar.agent.md +43 -0
  77. package/dist/assets/.github/agents/lafayette.agent.md +42 -0
  78. package/dist/assets/.github/agents/lince.agent.md +43 -0
  79. package/dist/assets/.github/agents/mercurio.agent.md +43 -0
  80. package/dist/assets/.github/agents/merlin.agent.md +44 -0
  81. package/dist/assets/.github/agents/prospero.agent.md +43 -0
  82. package/dist/assets/.github/instructions/agent-output.instructions.md +48 -0
  83. package/dist/assets/.github/prompts/spell-address-review.prompt.md +114 -0
  84. package/dist/assets/.github/prompts/spell-arcane-version.prompt.md +82 -0
  85. package/dist/assets/.github/prompts/spell-architect.prompt.md +116 -0
  86. package/dist/assets/.github/prompts/spell-bootstrap-business.prompt.md +73 -0
  87. package/dist/assets/.github/prompts/spell-brainstorm.prompt.md +124 -0
  88. package/dist/assets/.github/prompts/spell-bug.prompt.md +109 -0
  89. package/dist/assets/.github/prompts/spell-bump.prompt.md +73 -0
  90. package/dist/assets/.github/prompts/spell-check-drift.prompt.md +97 -0
  91. package/dist/assets/.github/prompts/spell-close-session.prompt.md +189 -0
  92. package/dist/assets/.github/prompts/spell-commit-work.prompt.md +211 -0
  93. package/dist/assets/.github/prompts/spell-create-pull-request.prompt.md +170 -0
  94. package/dist/assets/.github/prompts/spell-document.prompt.md +83 -0
  95. package/dist/assets/.github/prompts/spell-dotnet-expert.prompt.md +117 -0
  96. package/dist/assets/.github/prompts/spell-eas-ios-deploy.prompt.md +183 -0
  97. package/dist/assets/.github/prompts/spell-enchant.prompt.md +385 -0
  98. package/dist/assets/.github/prompts/spell-explain-concept.prompt.md +69 -0
  99. package/dist/assets/.github/prompts/spell-feedback.prompt.md +113 -0
  100. package/dist/assets/.github/prompts/spell-full-cycle.prompt.md +201 -0
  101. package/dist/assets/.github/prompts/spell-generate-bot-icons.prompt.md +84 -0
  102. package/dist/assets/.github/prompts/spell-implement.prompt.md +101 -0
  103. package/dist/assets/.github/prompts/spell-open-session.prompt.md +116 -0
  104. package/dist/assets/.github/prompts/spell-plan.prompt.md +145 -0
  105. package/dist/assets/.github/prompts/spell-present-arcane.prompt.md +188 -0
  106. package/dist/assets/.github/prompts/spell-product-review.prompt.md +97 -0
  107. package/dist/assets/.github/prompts/spell-review-batch.prompt.md +94 -0
  108. package/dist/assets/.github/prompts/spell-review.prompt.md +131 -0
  109. package/dist/assets/.github/prompts/spell-save-idea.prompt.md +83 -0
  110. package/dist/assets/.github/prompts/spell-scope.prompt.md +263 -0
  111. package/dist/assets/.github/prompts/spell-security-review.prompt.md +129 -0
  112. package/dist/assets/.github/prompts/spell-ship.prompt.md +104 -0
  113. package/dist/assets/.github/prompts/spell-status.prompt.md +85 -0
  114. package/dist/assets/.github/prompts/spell-suggest-feature.prompt.md +110 -0
  115. package/dist/assets/.github/prompts/spell-test.prompt.md +87 -0
  116. package/dist/assets/.github/prompts/spell-todo.prompt.md +126 -0
  117. package/dist/assets/DECISIONS.md +19 -0
  118. package/dist/assets/TODO.md +7 -0
  119. package/dist/assets/agents/architecture-lead.yaml +61 -0
  120. package/dist/assets/agents/collaborator.yaml +59 -0
  121. package/dist/assets/agents/devops.yaml +60 -0
  122. package/dist/assets/agents/frontend-dev.yaml +60 -0
  123. package/dist/assets/agents/fullstack-dev.yaml +59 -0
  124. package/dist/assets/agents/marketing-strategist.yaml +60 -0
  125. package/dist/assets/agents/mobile-dev.yaml +59 -0
  126. package/dist/assets/agents/operations-comms.yaml +58 -0
  127. package/dist/assets/agents/orchestrator.yaml +60 -0
  128. package/dist/assets/agents/qa-lead.yaml +60 -0
  129. package/dist/assets/agents/research-analyst.yaml +59 -0
  130. package/dist/assets/agents/security-ops.yaml +61 -0
  131. package/dist/assets/ai-context/system-prompt-context.md +32 -0
  132. package/dist/assets/journal/.gitkeep +0 -0
  133. package/dist/index.d.ts +12 -0
  134. package/dist/index.js +2313 -0
  135. package/dist/index.js.map +1 -0
  136. package/package.json +72 -0
@@ -0,0 +1,188 @@
1
+ ---
2
+ name: Spell — Present Arcane
3
+ description: Present Arcane in one of three modes — a full 1-hour talk (default), a live-state executive summary document, or a deck-builder meta-prompt sized to a slide count or duration.
4
+ argument-hint: '[summary|deck] + optional audience/size — e.g., "for investors", "summary exec", "deck 10m", "deck 20 slides"'
5
+ agent: agent
6
+ ---
7
+
8
+ See [[governance/development-methodology|Development Methodology]] for full Spell Loop reference. Project context: [[project|Project Overview]].
9
+
10
+ ## Mode Selection
11
+
12
+ Parse the first word of the argument before doing anything else. Match case-insensitively:
13
+
14
+ - `summary` → run **Summary Mode** (produce a finished executive-summary document; skip the slide deck). See the Summary Mode section at the end of this file.
15
+ - `deck` → run **Deck Mode** (emit a copy/paste prompt for an external AI to generate slides). See the Deck Mode section at the end of this file.
16
+ - `present`, or no argument at all → run **Present Mode** (default): the full 1-hour talk outline defined immediately below (Purpose through Tone).
17
+ - Any other leading word → treat the whole argument as an audience hint and run **Present Mode**. (If the word *looks* like an intended mode — e.g. `slides`, `doc`, `pdf`, `talk` — note in one line that it isn't a recognized mode and that you're defaulting to Present, then proceed.)
18
+
19
+ After identifying the mode, treat every remaining word as an audience and/or size hint and carry it forward into the chosen mode. The mode keyword itself (`summary`/`deck`/`present`) is consumed by routing and is never a hint.
20
+
21
+ ---
22
+
23
+ ## Purpose
24
+
25
+ Generate a complete, structured presentation for a **1-hour talk about the Arcane project** — including slide-by-slide outline, speaker notes, and a timed demo segment plan.
26
+
27
+ The presentation should tell the story of *what was built*, *why it matters*, *how it works*, and *where it is going*.
28
+
29
+ ---
30
+
31
+ ## Context Files to Read First
32
+
33
+ Read these files before generating the presentation. They are the ground truth **when present** — every row is **optional**. If a file is missing, use the listed fallback and continue; flag any gap in the output (see Output Instructions) rather than blocking.
34
+
35
+ `{BUSINESS_ROOT}` is the directory holding per-business folders (e.g. `ventures/`, `businesses/`, or `projects/`); `{BUSINESS_NAME}` is a specific business. Resolve both from `.arcane.json` / project frontmatter; if unset, **detect** by scanning for a likely root, or ask the operator. There may be zero, one, or many businesses — enumerate whatever exists rather than assuming a fixed count.
36
+
37
+ | File | What to extract | If missing, fall back to |
38
+ |------|----------------|--------------------------|
39
+ | [project.md](../../project.md) | Mission, vision, core principles, entities, goals | `README.md`, then ask the operator for the mission |
40
+ | [ai-context/system-prompt-context.md](../../ai-context/system-prompt-context.md) | Environment, agent stack, current state | Infer environment from repo; omit slide detail if unknown |
41
+ | [DECISIONS.md](../../DECISIONS.md) | Key ADRs — decisions that shaped the architecture | Skip ADR callouts; note that decision records are absent |
42
+ | [agents/agent-capability-matrix.md](../../agents/agent-capability-matrix.md) | Agent lineup and capability tiers | `.github/agents/*.agent.md`; else present the system generically |
43
+ | [agents/agent-policies.md](../../agents/agent-policies.md) | Power levels, autonomy model | [[governance/naming-conventions]]; else describe roles generically |
44
+ | `{BUSINESS_ROOT}/<business>/overview.md` | Per-business status (repeat for each business found) | Enumerate `{BUSINESS_ROOT}/*`; if none, present Arcane without a ventures act |
45
+ | [governance/development-methodology.md](../../governance/development-methodology.md) | The Spell Loop — development workflow | Describe the Spell Loop from the spell library filenames |
46
+ | `{INFRA_DOC}` — hardware/infra inventory (e.g. `infrastructure/hardware-inventory.md`) | Hardware context for demo credibility | Detect any infra/hardware doc; else omit the infrastructure slide |
47
+ | [README.md](../../README.md) | Repo structure overview | List top-level directories directly |
48
+
49
+ ---
50
+
51
+ ## Presentation Requirements
52
+
53
+ ### Format
54
+ - **Total runtime:** 60 minutes
55
+ - **Structure:** Slides + speaker notes + timed demo plan
56
+ - **Output format:** Markdown outline suitable for pasting into Gamma.app, Google Slides, or PowerPoint
57
+ - Each slide = `## Slide N — Title` heading
58
+ - Bullet points = talking points (not wall-of-text)
59
+ - Speaker notes = italic block under each slide
60
+ - Max 6 bullets per slide
61
+
62
+ ### Timing Budget
63
+ | Segment | Minutes |
64
+ |---------|---------|
65
+ | Opening hook + who I am | 5 |
66
+ | What is Arcane / the vision | 8 |
67
+ | The problem being solved | 5 |
68
+ | Architecture & stack walkthrough | 12 |
69
+ | Ventures — what's been built | 8 |
70
+ | Live demo | 15 |
71
+ | Lessons learned & what's next | 5 |
72
+ | Q&A buffer | 2 |
73
+ | **Total** | **60** |
74
+
75
+ ---
76
+
77
+ ## Slide Structure to Generate
78
+
79
+ ### Act 1 — Hook & Context (Slides 1–4, ~13 min)
80
+
81
+ 1. **Title slide** — Project name, presenter, date, one-line tagline
82
+ 2. **The dream** — "One person. Multiple businesses. AI does the work." The vision in human terms.
83
+ 3. **Who I am** — {OPERATOR_NAME}'s background, technical role, what motivated this project
84
+ 4. **The problem** — Running a business is brutal. AI tooling exists but isn't wired together. This project wires it together.
85
+
86
+ ### Act 2 — What Was Built (Slides 5–11, ~20 min)
87
+
88
+ 5. **Arcane — the operating system for AI-run businesses** — What the repo is, what it contains, how it's structured
89
+ 6. **Security model** — full-disk encryption, least privilege, no root, SecretRef, private network mesh — why security is non-negotiable for a production system
90
+ 7. **The AI agent stack** — the gateway plus the agent lineup, power levels, and tool profiles. Populate the roster from the agent-capability-matrix / `.github/agents/*.agent.md` (see [[governance/agent-policies]] / [[governance/naming-conventions]]); name each `{AGENT_NAME}` with its role rather than assuming a fixed cast. If no roster files exist, describe agent *roles* (e.g. research, marketing, ops, dev) generically.
91
+ 8. **The Spell Loop** — Arcane's development methodology: spell-plan → spell-architect → spell-implement → spell-ship
92
+ 9. **Multi-client AI governance** — Same rules enforced across every AI client the operator uses. Cite the relevant governance ADR if a decision record exists (resolve the ADR id from `DECISIONS.md`); otherwise state the principle without an id.
93
+ 10. **Ventures overview** — one line per business found under `{BUSINESS_ROOT}` (e.g. `{BUSINESS_NAME}` — launch-ready, `{BUSINESS_NAME}` — active dev), plus the idea pipeline. If none exist, replace with a roadmap slide.
94
+ 11. **Infrastructure** — `{PRIMARY_HOST}` (primary host; resolve from `{INFRA_DOC}` / `.arcane.json`, else ask or omit), the private network mesh, the configured tracker, and any dual-boot/host setup
95
+
96
+ ### Act 3 — Live Demo (Slides 12–13, ~15 min)
97
+
98
+ 12. **Demo plan slide** — What will be shown, in what order, what to look for
99
+ 13. **Demo backup slide** — Screenshots/recordings of key flows in case of live failure
100
+
101
+ **Demo script to include (in speaker notes):**
102
+ - Show Arcane repo structure in VS Code
103
+ - Trigger a spell command (e.g., `spell-open-session` or `spell-sprint-status`) and show it in action
104
+ - Show a Spell Loop output artifact (PRD or epics) that was AI-generated
105
+ - Show the agent gateway running on `{PRIMARY_HOST}` (status, agent list, or a live agent message). Resolve `{PRIMARY_HOST}` from `{INFRA_DOC}` / `.arcane.json`; if unset, ask the operator or skip this beat.
106
+ - Optional: show Gamma.app or SlidesAI generating a quick slide from a prompt (meta moment)
107
+
108
+ ### Act 4 — Reflection & Next (Slides 14–16, ~7 min)
109
+
110
+ 14. **What worked** — Top 3 things that validated the approach
111
+ 15. **What was hard** — Honest lessons: security overhead, LLM consistency, documentation discipline
112
+ 16. **What's next** — near-term milestones per business found (e.g. `{BUSINESS_NAME}` launch, `{BUSINESS_NAME}` Sprint 1) and scaling to the next business. Pull these from each `{BUSINESS_ROOT}/<business>/overview.md`; if none exist, present the framework roadmap instead.
113
+
114
+ ### Closing (Slide 17)
115
+
116
+ 17. **Close** — One-sentence takeaway, contact info, repo or demo link
117
+
118
+ ---
119
+
120
+ ## Output Instructions
121
+
122
+ 1. Generate the **full slide outline** with titles, bullet points (max 6 per slide), and speaker notes.
123
+ 2. Include a **demo timing breakdown** in the speaker notes for slides 12–13 (what to show at each minute mark).
124
+ 3. At the end, include a **"Gamma.app prompt"** block — a single text prompt the user can paste into Gamma.app to auto-generate the visual deck from this outline.
125
+ 4. Flag any slides where **content gaps exist** (e.g., a venture overview file that doesn't exist yet) so the user knows what to fill in before presenting.
126
+
127
+ ---
128
+
129
+ ## Tone
130
+
131
+ - Confident and technical — this is not vaporware, this is a working production system.
132
+ - Honest — show real numbers, real stack, real decisions. No marketing fluff.
133
+ - Energetic — this is a unique project; present it with pride.
134
+ - Audience-aware — if the user provided an audience hint (e.g., "for investors"), adjust language and emphasis accordingly. Default to technical/builder audience.
135
+
136
+ ---
137
+
138
+ ## Summary Mode
139
+
140
+ Produce a finished, always-current executive summary **document** about Arcane — not a slide deck and not a prompt for another AI. The point is that it reflects live repository state at run time, so counts and versions are never stale.
141
+
142
+ ### Step 1 — Gather live state
143
+
144
+ Read the repo to populate accurate values:
145
+
146
+ - `package.json` / `.arcane.json` → Arcane version.
147
+ - `.github/prompts/spell-*.prompt.md` → count of spells.
148
+ - `.github/agents/*.agent.md` → count of agent personas.
149
+ - `.arcane/governance/*.md` → governance/standards docs available.
150
+ - `README.md` / `project.md` → scope and mission.
151
+
152
+ ### Step 2 — Tailor to audience
153
+
154
+ If an audience hint followed `summary` (e.g., `exec`, `engineering`, `onboarding`), adjust emphasis:
155
+
156
+ - **exec** — governance, auditability, delivery predictability.
157
+ - **engineering** — the Spell Loop, quality gates, the spell + agent system.
158
+ - **onboarding** — getting started, `spell init`, first session.
159
+ - none — balanced general-stakeholder summary.
160
+
161
+ ### Step 3 — Output the document
162
+
163
+ Output a complete Markdown document (no preamble), with current values filled in: what Arcane is, why it exists, what it includes (spell count, agent count, governance), how adopters use it (the Spell Loop), how quality/governance are enforced, and how to adopt it. End with a one-line generation note including the version. The document must be immediately usable as-is.
164
+
165
+ ---
166
+
167
+ ## Deck Mode
168
+
169
+ Produce a single copy/paste **prompt** that the user can give to another AI tool to generate a full slide deck about Arcane, sized to the requested length.
170
+
171
+ ### Step 1 — Parse size
172
+
173
+ From the words after `deck`:
174
+
175
+ - `N slides` → target exactly N slides.
176
+ - `Nm` (minutes) → ~1 slide/minute (10m → 8–12, 30m → 20–30).
177
+ - `Nh` (hours) → convert to minutes, ~0.8–1.0 slides/minute (1h → 45–60).
178
+
179
+ If no size is given (including when only an audience hint like `deck for investors` follows), stop and ask for one (`N slides`, `Nm`, or `Nh`) before emitting anything. Retain any audience hint already provided so the user need not repeat it.
180
+
181
+ ### Step 2 — Gather source material
182
+
183
+ Use repo docs as ground truth (README, project, development-methodology, git-conventions, the spell library, agent roster). Cover: the Spell Loop lifecycle and quality gates; the spell + agent system; session continuity; governance; adoption path; risks and anti-patterns.
184
+
185
+ ### Step 3 — Emit the meta-prompt
186
+
187
+ Output one fenced code block containing a prompt that instructs the external AI to produce: the target slide count (or range), a slide-by-slide outline, title + subtitle per slide, 3–5 bullets per slide, a visual suggestion per slide, and speaker notes — plus a final roadmap slide and a risks/limitations slide. Require plain language and claims grounded in the supplied context. After the block, add a one-line tip to paste it into the user's preferred slide generator and request export.
188
+
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: Spell — Product Review
3
+ description: Build/Measure/Analyze/Decide cycle — evaluate feature performance and recommend next actions
4
+ argument-hint: Feature or product area to review (e.g., "{BUSINESS_NAME} storefront performance", "{BUSINESS_NAME} beta feedback")
5
+ agent: agent
6
+ ---
7
+
8
+ ## Executive Summary
9
+
10
+ - This prompt runs a Build/Measure/Analyze/Decide product review cycle.
11
+ - Used after a feature ships to evaluate its impact and decide what's next.
12
+ - Combines analytics data, user feedback, and business metrics into an actionable recommendation.
13
+ - Feeds back into `spell-plan` for the next iteration of the product.
14
+
15
+ ---
16
+
17
+ Run a product review cycle for the specified feature or product area.
18
+
19
+ **Placeholders** (resolve from `.arcane.json` or the feature/PRD frontmatter; if unset, **ask** rather than assuming a default):
20
+
21
+ - `{BUSINESS_NAME}` — the business/venture under review.
22
+ - `{BUSINESS_ROOT}` — the directory holding that business's product docs (KPIs, metrics, strategy). If no such root is configured or present, ask where these docs live; if there is none, treat the per-business metrics docs as absent and apply the fallback in step 2.
23
+
24
+ Use these files for context:
25
+
26
+ - [project.md](../../project.md) — Business goals and priorities
27
+ - The relevant business docs under `{BUSINESS_ROOT}/` — KPIs, metrics, and product strategy. **If `{BUSINESS_ROOT}` or these docs are missing, proceed with what `project.md` provides and flag the gap; if even `project.md` is absent, report "insufficient context to review" and list what is missing rather than inventing goals.**
28
+ - [governance/development-methodology.md](../../governance/development-methodology.md) — Spell Loop context
29
+
30
+ Workflow:
31
+
32
+ 1. **Build — What was shipped?**
33
+ - Summarize the feature/change that was deployed.
34
+ - List the acceptance criteria and whether they were met.
35
+ - Note the timeline: when was it planned, built, and shipped?
36
+
37
+ 2. **Measure — What data do we have?**
38
+ - Gather available metrics:
39
+ - Usage data (if analytics are configured)
40
+ - Error rates / crash reports
41
+ - User feedback (support tickets, reviews, direct feedback)
42
+ - Business metrics (sales, conversions, engagement)
43
+ - If the KPI/metrics docs under `{BUSINESS_ROOT}` (or any analytics source) are missing or empty, **do not fabricate numbers.** Proceed with "insufficient data to review" and list exactly what is missing (which docs, which metrics, which instrumentation), then recommend adding it before the next review.
44
+
45
+ 3. **Analyze — What does the data tell us?**
46
+ - Is the feature achieving its goal?
47
+ - Are there unexpected behaviors or usage patterns?
48
+ - How does it compare to the hypothesis in the PRD?
49
+ - What's working well? What isn't?
50
+
51
+ 4. **Decide — What do we do next?**
52
+ - **Iterate:** feature needs improvement — generate follow-up PRD items.
53
+ - **Scale:** feature is working — invest in marketing/growth.
54
+ - **Pivot:** feature isn't solving the problem — reconsider approach.
55
+ - **Kill:** feature is net negative — plan removal.
56
+
57
+ 5. **Generate product review report**:
58
+ ```markdown
59
+ ## Product Review — [Feature/Product]
60
+
61
+ **Date:** [timestamp]
62
+ **Review Period:** [date range]
63
+ **Business:** {BUSINESS_NAME}
64
+
65
+ ### Build Summary
66
+ - Feature: [what was built]
67
+ - Shipped: [date]
68
+ - Stories completed: [N]
69
+
70
+ ### Metrics
71
+ | Metric | Baseline | Current | Target | Status |
72
+ | -------- | -------- | ------- | ------ | ------------ |
73
+ | [metric] | [before] | [after] | [goal] | ON/OFF TRACK |
74
+
75
+ ### Analysis
76
+ - [Key insights from the data]
77
+ - [Unexpected findings]
78
+
79
+ ### Decision
80
+ - **Recommendation:** [Iterate / Scale / Pivot / Kill]
81
+ - **Rationale:** [Why]
82
+ - **Next Actions:**
83
+ 1. [Action item → owner]
84
+ 2. [Action item → owner]
85
+
86
+ ### Missing Instrumentation
87
+ - [Metrics we should be tracking but aren't]
88
+ ```
89
+
90
+ 6. **Present for discussion** — this review drives human decision-making, not autonomous action.
91
+
92
+ Rules:
93
+ - **Data-driven, not opinion-driven.** Base recommendations on evidence, not assumptions.
94
+ - **Acknowledge uncertainty.** If data is thin, say so — don't overfit to limited signals.
95
+ - **Recommendation guardrails:** Flag any recommendation involving purchases or subscriptions for human approval (see your org's decision log / spending policy if one exists).
96
+ - **Connect to business goals.** Every analysis must reference the relevant business's KPIs from `{BUSINESS_ROOT}` or `project.md`; if neither is available, say so explicitly instead of asserting goals.
97
+ - **No vanity metrics.** Focus on metrics that drive decisions, not numbers that look good.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: Spell — Review Batch
3
+ description: Adversarially review many pull requests in one run and emit per-PR verdicts plus a consolidated go/no-go readiness gate report. Provider-agnostic.
4
+ argument-hint: '--prs <n,n,…> | --pr <n> | --file <path> | --query <q> [--repos <r,…>] [--html] [--title <t>]'
5
+ agent: agent
6
+ ---
7
+
8
+ ## Executive Summary
9
+
10
+ - This spell runs the `spell-review` engine across a batch of pull requests and rolls the results into one report.
11
+ - It produces a per-PR verdict (approve / request-changes) plus an overall **go / no-go** gate for the batch — useful for a release-readiness or UAT gate.
12
+ - It is provider-agnostic: GitHub (`gh`) and Azure DevOps (`az repos`), detected from the git remote.
13
+ - This is the reviewer-side, many-PR counterpart to `spell-review` (single diff). The author-side spell is `spell-address-review`; PRs are typically opened with `spell-create-pull-request`.
14
+
15
+ ---
16
+
17
+ Review a batch of pull requests and produce a consolidated readiness report.
18
+
19
+ Context to consult:
20
+
21
+ - `.arcane/governance/git-conventions.md` — review severity and merge policy.
22
+ - The `spell-review` spell — the single-PR review engine this spell reuses per PR (dimension-coverage lenses, severity, stable finding IDs `R1`, `R2`…).
23
+
24
+ ## Arguments
25
+
26
+ - `--pr <n>` — a single PR.
27
+ - `--prs <n,n,…>` — comma-separated PR numbers.
28
+ - `--file <path>` — a file to extract PR numbers from (match `\b\d{2,}\b`).
29
+ - `--query <q>` — a provider query to discover matching PRs.
30
+ - `--repos <r,…>` — optional repo scoping for multi-repo orgs.
31
+ - `--html` — also emit a self-contained HTML version of the consolidated report for easy sharing.
32
+ - `--title <t>` — optional title for the consolidated report (e.g. "Sprint 42 UAT Gate").
33
+
34
+ If no input mode is given, ask the user how they want to specify the PRs.
35
+
36
+ ## Step 1 — Resolve inputs
37
+
38
+ 1. Detect the provider first from `git remote get-url origin` (GitHub vs Azure DevOps). If the remote is ambiguous or unrecognized, stop and ask. Confirm the CLI is authenticated (`gh auth status` / `az account show`) before proceeding; on an auth failure, report the exact remediation command and stop — do not partially run.
39
+ 2. Parse the input mode and collect the PR list. For `--query`, discover PRs via the provider:
40
+ - **GitHub:** `gh pr list --search "<q>" --json number,title,headRefName`
41
+ - **Azure DevOps:** `az repos pr list --status active --query "<filter>"`
42
+ - If `--query` returns zero PRs, report "no PRs matched" and stop — there is nothing to gate.
43
+ 3. Deduplicate and validate every PR number (positive integers). Drop and note any malformed token rather than aborting. If the resulting list is empty, stop and ask for valid input.
44
+ 4. Resolve scope per PR. `--repos` scopes discovery and disambiguates PR numbers across a multi-repo org; carry the owning repo with each PR number so mixed-repo batches fetch from the right repo (`gh pr view <n> --repo <r>` / `az repos pr show --id <n>`). A bare number with no repo defaults to the origin repo.
45
+ 5. **Batch size.** Process PRs sequentially (each review is independent). If the batch exceeds **20 PRs**, warn the user, confirm intent, and proceed in order — do not silently truncate.
46
+
47
+ ## Step 2 — Review each PR
48
+
49
+ For each PR in the batch, independently:
50
+
51
+ 1. Fetch the PR diff and metadata (`gh pr diff <n>` / `az repos pr show --id <n>` + diff). If a PR can't be fetched (deleted, no access, network error), **skip it, record it as `SKIPPED` with the reason, and continue** — never abort the whole batch for one bad PR.
52
+ 2. Run the `spell-review` workflow against that diff — the full dimension-coverage sweep (correctness, security, performance, tests, naming/clarity, architecture), severity-ranked findings (`HIGH` / `MEDIUM` / `LOW`, matching the `spell-review` ladder) with stable IDs, and the PASS/WARN/FAIL coverage table.
53
+ 3. Record a per-PR result: verdict (**approve** / **request-changes**), finding counts by severity, and the coverage table.
54
+
55
+ Reviews are adversarial — actively look for problems, do not just confirm quality. Apply the same no-fabrication coverage mandate as `spell-review`: a clean lens is reported as "no issues," never padded.
56
+
57
+ ## Step 3 — Consolidate
58
+
59
+ Build one report:
60
+
61
+ ```markdown
62
+ # Batch Review — {title or "PR Readiness"} ({date})
63
+
64
+ ## Gate: {GO / NO-GO}
65
+
66
+ > GO only if every PR was reviewed and no PR carries an unresolved HIGH finding.
67
+
68
+ | PR | Repo | Title | Verdict | High | Med | Low |
69
+ | -- | ---- | ----- | ------- | ---- | --- | --- |
70
+ | #n | repo | … | approve / request-changes | 0 | 1 | 2 |
71
+ | #n | repo | … | SKIPPED — {reason} | — | — | — |
72
+
73
+ ## Per-PR detail
74
+ ### PR #n — {title}
75
+ - Verdict: …
76
+ - Coverage: {PASS/WARN/FAIL per lens}
77
+ - Findings: {R1 …}
78
+ ```
79
+
80
+ The overall gate is **NO-GO** if any reviewed PR has an unresolved HIGH finding, **or** if any requested PR was skipped (an un-reviewed PR can't be cleared) — otherwise **GO**. `HIGH` is the top severity in the `spell-review` ladder; do not invent a "Critical" tier the engine never emits.
81
+
82
+ ## Step 4 — Output
83
+
84
+ 1. Write the consolidated markdown report to a sensible path (e.g. `reviews/batch-review-{date}.md`).
85
+ 2. If `--html` was passed, also emit a self-contained HTML file (inline CSS, no external assets) at the same base path so it can be shared by email/chat.
86
+ 3. Print a summary to the user: total reviewed / skipped, verdict counts, total findings by severity, the GO/NO-GO gate, and the output path(s).
87
+
88
+ ## Rules
89
+
90
+ - Reuse the `spell-review` engine per PR — do not invent a parallel, weaker rubric.
91
+ - Reviews are adversarial but honest — no fabricated findings to inflate counts.
92
+ - The HTML report must be fully self-contained (inline styles) so it works offline.
93
+ - Do not commit or post anything to external systems — the report is a local file the user shares deliberately.
94
+ - Never include secrets or tokens in the report.
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: Spell — Review
3
+ description: Adversarial code review — must find issues, validate architecture compliance, and check security
4
+ argument-hint: PR number, branch name, or file paths to review
5
+ agent: agent
6
+ ---
7
+
8
+ ## Executive Summary
9
+
10
+ - This prompt performs an adversarial code review — "looks good" is not acceptable.
11
+ - The reviewer must explicitly cover every lens — correctness, security, performance, tests, naming/clarity, architecture — and state "no issues" for any lens that is clean. There is no finding quota: zero findings is a valid outcome on a clean or small diff.
12
+ - Checks architecture compliance, test coverage, security, and coding standards.
13
+ - See [[governance/development-methodology|Development Methodology]] for the adversarial review pattern.
14
+
15
+ ---
16
+
17
+ Perform an adversarial review of the specified code changes.
18
+
19
+ Use these files for context:
20
+
21
+ - [governance/development-methodology.md](../../governance/development-methodology.md) — Adversarial review requirements
22
+ - [governance/testing-standards.md](../../governance/testing-standards.md) — Coverage thresholds to validate
23
+ - [DECISIONS.md](../../DECISIONS.md) — ADRs to check compliance against
24
+ - [security/threat-model.md](../../security/threat-model.md) — Security controls to validate
25
+ - The feature's `architecture.md` — tech decisions that code must follow
26
+
27
+ Workflow:
28
+
29
+ 1. **Gather the diff** — get the full set of changes being reviewed:
30
+ - `git diff main...HEAD` for branch reviews.
31
+ - Specific file paths if provided.
32
+ - PR diff if a PR number is given.
33
+
34
+ 2. **Architecture compliance** — for each changed file:
35
+ - Does it follow the architecture decisions in architecture.md?
36
+ - Does it respect existing ADRs?
37
+ - Are there unauthorized framework or pattern deviations?
38
+
39
+ 3. **Code quality** — check for:
40
+ - Naming conventions (per project standards).
41
+ - Error handling (appropriate, not excessive).
42
+ - Code duplication (DRY violations).
43
+ - Complexity (functions too long, too many parameters).
44
+ - Dead code, commented-out code, debug statements.
45
+
46
+ 4. **Test coverage** — validate:
47
+ - New code has corresponding tests.
48
+ - Coverage meets thresholds per testing-standards.md.
49
+ - Edge cases are tested (nulls, empty collections, boundaries).
50
+ - No test stubs or skipped tests without justification.
51
+
52
+ 5. **Security review** — check for OWASP Top 10 issues:
53
+ - Injection vulnerabilities (SQL, XSS, command injection).
54
+ - Authentication/authorization gaps.
55
+ - Sensitive data exposure.
56
+ - Insecure dependencies.
57
+
58
+ 6. **Generate review report**:
59
+ ```markdown
60
+ ## Code Review — [Feature/Branch Name]
61
+
62
+ **Reviewer:** [Agent name]
63
+ **Date:** [timestamp]
64
+
65
+ ### Coverage Summary
66
+
67
+ One row per coverage lens. Verdict is `PASS` for a clean lens (note "no issues"),
68
+ `WARN` for non-blocking findings, `FAIL` for a blocker. Reference the relevant
69
+ finding IDs (`R1`, `R2`, …) in the Notes column.
70
+
71
+ | Lens | Verdict (PASS/WARN/FAIL) | Notes |
72
+ | --------------- | ------------------------ | ------------------------------------ |
73
+ | Correctness | [PASS/WARN/FAIL] | [no issues / refs to R#] |
74
+ | Security | [PASS/WARN/FAIL] | [no issues / refs to R#] |
75
+ | Performance | [PASS/WARN/FAIL] | [no issues / refs to R#] |
76
+ | Tests | [PASS/WARN/FAIL] | [no issues / refs to R#] |
77
+ | Naming/Clarity | [PASS/WARN/FAIL] | [no issues / refs to R#] |
78
+ | Architecture | [PASS/WARN/FAIL] | [no issues / refs to R#] |
79
+
80
+ ### Findings
81
+
82
+ Give each finding a stable ID (`R1`, `R2`, …) so it can be referenced in follow-ups and in `spell-address-review`.
83
+
84
+ #### HIGH Severity
85
+ - **R1** — [Finding with file:line reference]
86
+
87
+ #### MEDIUM Severity
88
+ - **R2** — [Finding with file:line reference]
89
+
90
+ #### LOW Severity
91
+ - **R3** — [Finding with file:line reference]
92
+
93
+ ### Architecture Compliance
94
+ - [Compliant / Minor deviation / Major violation]
95
+
96
+ ### Test Coverage Assessment
97
+ - [Coverage % and gap analysis]
98
+
99
+ ### Security Assessment
100
+ - [OWASP checklist results]
101
+
102
+ ### Verdict
103
+ - [ ] APPROVE — no critical issues
104
+ - [ ] REQUEST CHANGES — critical issues found (list blockers)
105
+ - [ ] DEFER — needs human decision on [topic]
106
+
107
+ ### Backlog Items
108
+ - [Findings outside scope of this change — track separately]
109
+ ```
110
+
111
+ 7. **Save report to disk** — write the review report to the feature folder's `assessments/` directory:
112
+ ```bash
113
+ FEATURE_FOLDER="features/$(git symbolic-ref --short HEAD | sed 's|.*/feat/||')"
114
+ REPORT_PATH="$FEATURE_FOLDER/assessments/review-$(date +%Y-%m-%d).md"
115
+ mkdir -p "$FEATURE_FOLDER/assessments"
116
+ # Write the full review report to $REPORT_PATH
117
+ ```
118
+ If the branch doesn't follow `feat/{id}-{slug}`, ask the operator for the feature folder path.
119
+ Confirm the saved path to the user.
120
+
121
+ 8. **Present findings** — show the review to the user with a clear recommendation.
122
+
123
+ 9. **Write back to the pull request** — when a PR exists for these changes, sync a short verdict plus a findings summary (verdict + finding counts/IDs + a pointer to the saved report) into the PR body/description. Use provider-agnostic phrasing that works for either GitHub or Azure DevOps. Mark it clearly as a snapshot at review time, and fall back to a top-level PR comment if the description can't be updated.
124
+
125
+ Rules:
126
+ - **Cover every dimension, not a finding count.** You MUST explicitly address each lens — correctness, security, performance, tests, naming/clarity, architecture — and state "no issues" for any lens that is clean. There is no minimum number of findings: zero findings is a valid outcome on a clean or small diff. The mandate is coverage of effort, not a count of findings — never fabricate issues to hit a quota.
127
+ - **Never rubber-stamp.** Every review must include substantive analysis across all dimensions.
128
+ - **Classify severity honestly.** Don't inflate LOW findings to pad the report.
129
+ - **Escalate architecture-level flaws.** If the review surfaces deep design or architecture problems (not line-level fixes), recommend routing them to `spell-architect` rather than trying to patch them inline.
130
+ - **Separate concerns.** Don't block a PR for issues unrelated to the current change — add them to backlog.
131
+ - **Check for bias.** If you wrote the code being reviewed, flag the conflict and recommend a different agent review.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: Spell — Save Idea
3
+ description: Quickly capture a fleeting idea into the repo's idea inbox so it is not lost. Low ceremony, no approval gate, optimized for voice and speed.
4
+ argument-hint: The idea itself — a sentence to a couple of paragraphs (e.g., "add a dark-mode toggle to the settings page")
5
+ agent: agent
6
+ ---
7
+
8
+ ## Executive Summary
9
+
10
+ - This spell saves a short idea into `IDEAS.md` at the repo root with a timestamp, so a good thought is not lost between sessions.
11
+ - It is deliberately fast and low-friction: no approval gate, no multi-step proposal — capture and confirm.
12
+ - Use it the moment an idea occurs to you. Triage later with `spell-todo` or `spell-suggest-feature`.
13
+ - This is the lightweight counterpart to `spell-document` (which formalizes a whole conversation into polished docs).
14
+
15
+ ---
16
+
17
+ Capture the user's idea into the idea inbox with minimal ceremony.
18
+
19
+ The user's input IS the idea. If no idea text was provided, ask one short question: _"What's the idea?"_ and stop until they answer.
20
+
21
+ ## Step 1 — Normalize the Idea
22
+
23
+ - Take the user's input verbatim as the core idea.
24
+ - Strip a leading invocation phrase if the user dictated one (e.g., "save this idea —", "note that", "remind me to") — log the idea, not the command to log it.
25
+ - Lightly clean it up: fix obvious typos and capitalization, but **do not** rewrite, expand, or editorialize. The user's phrasing is the record.
26
+ - If the idea is clearly multiple distinct ideas, split them into separate entries (one appended line each).
27
+ - Optionally infer a single short tag (1–2 words, kebab-case) from the content — e.g., `ui`, `infra`, `marketing`, `dx`. If nothing fits cleanly, omit the tag.
28
+ - **If the idea contains a secret** (token, password, API key, connection string), redact it inline (e.g., `[redacted]`) before writing and warn the user in the confirmation. Never write the raw value to `IDEAS.md`.
29
+
30
+ ## Step 2 — Append to IDEAS.md
31
+
32
+ Append (never overwrite) an entry to `IDEAS.md` at the repo root.
33
+
34
+ Entry format:
35
+
36
+ ```markdown
37
+ - **[YYYY-MM-DD HH:MM]** [#tag] <the idea, lightly cleaned> <!-- status: new -->
38
+ ```
39
+
40
+ - Get the real local date and time from the system (e.g., run `date`) rather than guessing — a wrong timestamp silently corrupts the append-only log.
41
+ - The `status: new` HTML comment lets later triage mark entries as `promoted` / `dropped` without deleting history.
42
+ - Include `[#tag]` only if a tag was inferred; otherwise omit it.
43
+
44
+ If `IDEAS.md` does not exist yet, create it with this header first, then append:
45
+
46
+ ```markdown
47
+ # Idea Inbox
48
+
49
+ Fast-capture log of ideas worth keeping. Add with `spell-save-idea`. Triage with `spell-todo`
50
+ (actionable) or `spell-suggest-feature` (product ideas). Entries are append-only; mark status in the
51
+ trailing comment rather than deleting.
52
+
53
+ ---
54
+ ```
55
+
56
+ ## Step 3 — Confirm (one line)
57
+
58
+ Print a single concise confirmation, nothing more:
59
+
60
+ ```
61
+ 💡 Saved to IDEAS.md — [#tag] <short echo of the idea>
62
+ ```
63
+
64
+ - If multiple entries were appended, confirm with one line per entry (or a count, e.g. `💡 Saved 3 ideas to IDEAS.md`).
65
+ - If anything was redacted, append `(secret redacted)` to the confirmation so the user knows.
66
+
67
+ ## Step 4 — Offer Promotion (optional, non-blocking)
68
+
69
+ After confirming, add at most one short line offering a next step **only if the idea is obviously
70
+ actionable or product-shaped**:
71
+
72
+ > Want to turn this into a tracked item? Run `spell-todo` (task) or `spell-suggest-feature` (product idea).
73
+
74
+ Do not ask follow-up questions. Do not commit — leave that to `spell-commit-work`.
75
+
76
+ ## Rules
77
+
78
+ - Speed over polish. This spell should feel instant.
79
+ - Never overwrite existing entries — always append.
80
+ - Never rewrite the user's idea beyond light cleanup. Preserve their words.
81
+ - No approval gate — write immediately.
82
+ - Never include secrets, tokens, or credentials in an entry.
83
+ - Do not commit the change.