arcane-cli 0.38.3 → 1.0.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 (176) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/.agents/skills/spell-address-review/SKILL.md +6 -0
  3. package/dist/assets/.agents/skills/spell-adopt-docs/SKILL.md +6 -0
  4. package/dist/assets/.agents/skills/spell-arcane-version/SKILL.md +6 -0
  5. package/dist/assets/.agents/skills/spell-architect/SKILL.md +6 -0
  6. package/dist/assets/.agents/skills/spell-brainstorm/SKILL.md +6 -0
  7. package/dist/assets/.agents/skills/spell-bug/SKILL.md +6 -0
  8. package/dist/assets/.agents/skills/spell-bump/SKILL.md +6 -0
  9. package/dist/assets/.agents/skills/spell-check-drift/SKILL.md +6 -0
  10. package/dist/assets/.agents/skills/spell-close-session/SKILL.md +6 -0
  11. package/dist/assets/.agents/skills/spell-commit-work/SKILL.md +6 -0
  12. package/dist/assets/.agents/skills/spell-compliance/SKILL.md +6 -0
  13. package/dist/assets/.agents/skills/spell-create-pull-request/SKILL.md +6 -0
  14. package/dist/assets/.agents/skills/spell-document/SKILL.md +6 -0
  15. package/dist/assets/.agents/skills/spell-dotnet-expert/SKILL.md +6 -0
  16. package/dist/assets/.agents/skills/spell-eas-store-deploy/SKILL.md +6 -0
  17. package/dist/assets/.agents/skills/spell-enchant/SKILL.md +6 -0
  18. package/dist/assets/.agents/skills/spell-explain-concept/SKILL.md +6 -0
  19. package/dist/assets/.agents/skills/spell-feedback/SKILL.md +6 -0
  20. package/dist/assets/.agents/skills/spell-full-cycle/SKILL.md +6 -0
  21. package/dist/assets/.agents/skills/spell-generate-bot-icons/SKILL.md +6 -0
  22. package/dist/assets/.agents/skills/spell-implement/SKILL.md +6 -0
  23. package/dist/assets/.agents/skills/spell-make-discoverable/SKILL.md +6 -0
  24. package/dist/assets/.agents/skills/spell-manifest/SKILL.md +6 -0
  25. package/dist/assets/.agents/skills/spell-open-session/SKILL.md +6 -0
  26. package/dist/assets/.agents/skills/spell-plan/SKILL.md +6 -0
  27. package/dist/assets/.agents/skills/spell-present-arcane/SKILL.md +6 -0
  28. package/dist/assets/.agents/skills/spell-product-review/SKILL.md +6 -0
  29. package/dist/assets/.agents/skills/spell-review/SKILL.md +6 -0
  30. package/dist/assets/.agents/skills/spell-review-batch/SKILL.md +6 -0
  31. package/dist/assets/.agents/skills/spell-save-idea/SKILL.md +6 -0
  32. package/dist/assets/.agents/skills/spell-scope/SKILL.md +6 -0
  33. package/dist/assets/.agents/skills/spell-scry/SKILL.md +6 -0
  34. package/dist/assets/.agents/skills/spell-security-review/SKILL.md +6 -0
  35. package/dist/assets/.agents/skills/spell-ship/SKILL.md +6 -0
  36. package/dist/assets/.agents/skills/spell-status/SKILL.md +6 -0
  37. package/dist/assets/.agents/skills/spell-suggest-feature/SKILL.md +6 -0
  38. package/dist/assets/.agents/skills/spell-summon-venture/SKILL.md +6 -0
  39. package/dist/assets/.agents/skills/spell-sync-pull-request/SKILL.md +6 -0
  40. package/dist/assets/.agents/skills/spell-test/SKILL.md +6 -0
  41. package/dist/assets/.agents/skills/spell-todo/SKILL.md +6 -0
  42. package/dist/assets/.agents/skills/spell-verification-ledger/SKILL.md +6 -0
  43. package/dist/assets/.arcane/governance/development-methodology.md +6 -6
  44. package/dist/assets/.arcane/governance/git-conventions.md +2 -2
  45. package/dist/assets/.arcane/governance/portable-bootstrap.md +1 -0
  46. package/dist/assets/.arcane/governance/product-excellence-standards.md +1 -1
  47. package/dist/assets/.arcane/governance/spell-authoring-standards.md +9 -1
  48. package/dist/assets/.arcane/governance/universal-agent-rules.md +7 -0
  49. package/dist/assets/.arcane/spells/spell-address-review.md +115 -0
  50. package/dist/assets/.arcane/spells/spell-adopt-docs.md +158 -0
  51. package/dist/assets/.arcane/spells/spell-arcane-version.md +87 -0
  52. package/dist/assets/.arcane/spells/spell-architect.md +117 -0
  53. package/dist/assets/.arcane/spells/spell-brainstorm.md +125 -0
  54. package/dist/assets/.arcane/spells/spell-bug.md +123 -0
  55. package/dist/assets/.arcane/spells/spell-bump.md +82 -0
  56. package/dist/assets/.arcane/spells/spell-check-drift.md +118 -0
  57. package/dist/assets/.arcane/spells/spell-close-session.md +266 -0
  58. package/dist/assets/.arcane/spells/spell-commit-work.md +279 -0
  59. package/dist/assets/.arcane/spells/spell-compliance.md +130 -0
  60. package/dist/assets/.arcane/spells/spell-create-pull-request.md +224 -0
  61. package/dist/assets/.arcane/spells/spell-document.md +84 -0
  62. package/dist/assets/.arcane/spells/spell-dotnet-expert.md +118 -0
  63. package/dist/assets/.arcane/spells/spell-eas-store-deploy.md +254 -0
  64. package/dist/assets/.arcane/spells/spell-enchant.md +386 -0
  65. package/dist/assets/.arcane/spells/spell-explain-concept.md +70 -0
  66. package/dist/assets/.arcane/spells/spell-feedback.md +138 -0
  67. package/dist/assets/.arcane/spells/spell-full-cycle.md +253 -0
  68. package/dist/assets/.arcane/spells/spell-generate-bot-icons.md +85 -0
  69. package/dist/assets/.arcane/spells/spell-implement.md +109 -0
  70. package/dist/assets/.arcane/spells/spell-make-discoverable.md +293 -0
  71. package/dist/assets/.arcane/spells/spell-manifest.md +148 -0
  72. package/dist/assets/.arcane/spells/spell-open-session.md +154 -0
  73. package/dist/assets/.arcane/spells/spell-plan.md +160 -0
  74. package/dist/assets/.arcane/spells/spell-present-arcane.md +189 -0
  75. package/dist/assets/.arcane/spells/spell-product-review.md +98 -0
  76. package/dist/assets/.arcane/spells/spell-review-batch.md +113 -0
  77. package/dist/assets/.arcane/spells/spell-review.md +142 -0
  78. package/dist/assets/.arcane/spells/spell-save-idea.md +117 -0
  79. package/dist/assets/.arcane/spells/spell-scope.md +266 -0
  80. package/dist/assets/.arcane/spells/spell-scry.md +124 -0
  81. package/dist/assets/.arcane/spells/spell-security-review.md +152 -0
  82. package/dist/assets/.arcane/spells/spell-ship.md +106 -0
  83. package/dist/assets/.arcane/spells/spell-status.md +86 -0
  84. package/dist/assets/.arcane/spells/spell-suggest-feature.md +122 -0
  85. package/dist/assets/.arcane/spells/spell-summon-venture.md +110 -0
  86. package/dist/assets/.arcane/spells/spell-sync-pull-request.md +161 -0
  87. package/dist/assets/.arcane/spells/spell-test.md +88 -0
  88. package/dist/assets/.arcane/spells/spell-todo.md +166 -0
  89. package/dist/assets/.arcane/spells/spell-verification-ledger.md +102 -0
  90. package/dist/assets/.claude/commands/spell-address-review.md +2 -2
  91. package/dist/assets/.claude/commands/spell-adopt-docs.md +2 -2
  92. package/dist/assets/.claude/commands/spell-arcane-version.md +2 -2
  93. package/dist/assets/.claude/commands/spell-architect.md +2 -2
  94. package/dist/assets/.claude/commands/spell-brainstorm.md +2 -2
  95. package/dist/assets/.claude/commands/spell-bug.md +2 -2
  96. package/dist/assets/.claude/commands/spell-bump.md +2 -2
  97. package/dist/assets/.claude/commands/spell-check-drift.md +2 -2
  98. package/dist/assets/.claude/commands/spell-close-session.md +2 -2
  99. package/dist/assets/.claude/commands/spell-commit-work.md +2 -2
  100. package/dist/assets/.claude/commands/spell-compliance.md +2 -2
  101. package/dist/assets/.claude/commands/spell-create-pull-request.md +2 -2
  102. package/dist/assets/.claude/commands/spell-document.md +2 -2
  103. package/dist/assets/.claude/commands/spell-dotnet-expert.md +2 -2
  104. package/dist/assets/.claude/commands/spell-eas-store-deploy.md +2 -2
  105. package/dist/assets/.claude/commands/spell-enchant.md +2 -2
  106. package/dist/assets/.claude/commands/spell-explain-concept.md +2 -2
  107. package/dist/assets/.claude/commands/spell-feedback.md +2 -2
  108. package/dist/assets/.claude/commands/spell-full-cycle.md +2 -2
  109. package/dist/assets/.claude/commands/spell-generate-bot-icons.md +2 -2
  110. package/dist/assets/.claude/commands/spell-implement.md +2 -2
  111. package/dist/assets/.claude/commands/spell-make-discoverable.md +2 -2
  112. package/dist/assets/.claude/commands/spell-manifest.md +2 -2
  113. package/dist/assets/.claude/commands/spell-open-session.md +2 -2
  114. package/dist/assets/.claude/commands/spell-plan.md +2 -2
  115. package/dist/assets/.claude/commands/spell-present-arcane.md +2 -2
  116. package/dist/assets/.claude/commands/spell-product-review.md +2 -2
  117. package/dist/assets/.claude/commands/spell-review-batch.md +2 -2
  118. package/dist/assets/.claude/commands/spell-review.md +2 -2
  119. package/dist/assets/.claude/commands/spell-save-idea.md +2 -2
  120. package/dist/assets/.claude/commands/spell-scope.md +2 -2
  121. package/dist/assets/.claude/commands/spell-scry.md +2 -2
  122. package/dist/assets/.claude/commands/spell-security-review.md +2 -2
  123. package/dist/assets/.claude/commands/spell-ship.md +2 -2
  124. package/dist/assets/.claude/commands/spell-status.md +2 -2
  125. package/dist/assets/.claude/commands/spell-suggest-feature.md +2 -2
  126. package/dist/assets/.claude/commands/spell-summon-venture.md +2 -2
  127. package/dist/assets/.claude/commands/spell-sync-pull-request.md +2 -2
  128. package/dist/assets/.claude/commands/spell-test.md +2 -2
  129. package/dist/assets/.claude/commands/spell-todo.md +2 -2
  130. package/dist/assets/.claude/commands/spell-verification-ledger.md +2 -2
  131. package/dist/assets/.github/instructions/agent-output.instructions.md +14 -13
  132. package/dist/assets/.github/prompts/spell-address-review.prompt.md +1 -107
  133. package/dist/assets/.github/prompts/spell-adopt-docs.prompt.md +1 -150
  134. package/dist/assets/.github/prompts/spell-arcane-version.prompt.md +1 -79
  135. package/dist/assets/.github/prompts/spell-architect.prompt.md +1 -109
  136. package/dist/assets/.github/prompts/spell-brainstorm.prompt.md +1 -117
  137. package/dist/assets/.github/prompts/spell-bug.prompt.md +1 -115
  138. package/dist/assets/.github/prompts/spell-bump.prompt.md +1 -74
  139. package/dist/assets/.github/prompts/spell-check-drift.prompt.md +1 -110
  140. package/dist/assets/.github/prompts/spell-close-session.prompt.md +1 -258
  141. package/dist/assets/.github/prompts/spell-commit-work.prompt.md +1 -270
  142. package/dist/assets/.github/prompts/spell-compliance.prompt.md +1 -122
  143. package/dist/assets/.github/prompts/spell-create-pull-request.prompt.md +1 -215
  144. package/dist/assets/.github/prompts/spell-document.prompt.md +1 -76
  145. package/dist/assets/.github/prompts/spell-dotnet-expert.prompt.md +1 -110
  146. package/dist/assets/.github/prompts/spell-eas-store-deploy.prompt.md +1 -246
  147. package/dist/assets/.github/prompts/spell-enchant.prompt.md +1 -378
  148. package/dist/assets/.github/prompts/spell-explain-concept.prompt.md +1 -62
  149. package/dist/assets/.github/prompts/spell-feedback.prompt.md +1 -130
  150. package/dist/assets/.github/prompts/spell-full-cycle.prompt.md +1 -245
  151. package/dist/assets/.github/prompts/spell-generate-bot-icons.prompt.md +1 -77
  152. package/dist/assets/.github/prompts/spell-implement.prompt.md +1 -101
  153. package/dist/assets/.github/prompts/spell-make-discoverable.prompt.md +1 -285
  154. package/dist/assets/.github/prompts/spell-manifest.prompt.md +1 -140
  155. package/dist/assets/.github/prompts/spell-open-session.prompt.md +1 -146
  156. package/dist/assets/.github/prompts/spell-plan.prompt.md +1 -152
  157. package/dist/assets/.github/prompts/spell-present-arcane.prompt.md +1 -181
  158. package/dist/assets/.github/prompts/spell-product-review.prompt.md +1 -90
  159. package/dist/assets/.github/prompts/spell-review-batch.prompt.md +1 -105
  160. package/dist/assets/.github/prompts/spell-review.prompt.md +1 -134
  161. package/dist/assets/.github/prompts/spell-save-idea.prompt.md +1 -109
  162. package/dist/assets/.github/prompts/spell-scope.prompt.md +1 -258
  163. package/dist/assets/.github/prompts/spell-scry.prompt.md +1 -116
  164. package/dist/assets/.github/prompts/spell-security-review.prompt.md +1 -144
  165. package/dist/assets/.github/prompts/spell-ship.prompt.md +1 -98
  166. package/dist/assets/.github/prompts/spell-status.prompt.md +1 -78
  167. package/dist/assets/.github/prompts/spell-suggest-feature.prompt.md +1 -114
  168. package/dist/assets/.github/prompts/spell-summon-venture.prompt.md +1 -102
  169. package/dist/assets/.github/prompts/spell-sync-pull-request.prompt.md +1 -152
  170. package/dist/assets/.github/prompts/spell-test.prompt.md +1 -80
  171. package/dist/assets/.github/prompts/spell-todo.prompt.md +1 -158
  172. package/dist/assets/.github/prompts/spell-verification-ledger.prompt.md +1 -94
  173. package/dist/index.js +195 -49
  174. package/dist/index.js.map +1 -1
  175. package/package.json +4 -4
  176. /package/dist/assets/{.github/prompts → .arcane/spells}/_fragments/tracking-mode-declaration.md +0 -0
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: Spell — Adopt Docs
3
+ description: Bring an existing document tree under Arcane governance without moving anything first — inventory, propose a mapping, get approval, then apply in reversible steps. Dry-run by default.
4
+ claude_description: Use PROACTIVELY when bringing an existing, ungoverned doc tree under Arcane governance.
5
+ argument-hint: Optional path to the tree to adopt (defaults to the repository root). Add `--apply` only after reviewing a dry run.
6
+ agent: agent
7
+ ---
8
+
9
+ ## Executive Summary
10
+
11
+ - This spell adopts a folder of documents that already exists, rather than
12
+ scaffolding a new one.
13
+ - It **never moves, renames, or deletes anything until you approve a specific
14
+ written mapping** — the default run is read-only.
15
+ - It works with `subject_root: "."`, so a tree that already lives at the
16
+ repository root is adopted where it is. Restructuring is offered, never
17
+ required.
18
+ - Every mutating phase states its rollback before it runs.
19
+ - In a repository marked `content_sensitivity: sensitive`, the inventory records
20
+ paths and shapes, never document contents.
21
+
22
+ ---
23
+
24
+ ## Preconditions
25
+
26
+ Stop and report, without changing anything, if any of these fail:
27
+
28
+ 1. **`.arcane.json` exists.** If not: "Run `spell init` first — adoption needs a
29
+ profile and a subject root to map into."
30
+ 2. **The working tree is clean** (`git status --porcelain` is empty). Adoption's
31
+ rollback story is "revert the commit"; that only works from a clean baseline.
32
+ Report the dirty paths and stop.
33
+ 3. **The target path exists and is inside the repository.** Reject absolute
34
+ paths and anything resolving outside the repo root.
35
+
36
+ Read, in order: `.arcane.json` (for `subject_root`, `content_sensitivity`,
37
+ `profile`), then `.arcane/governance/records-conventions.md`, then
38
+ `.arcane/governance/naming-conventions.md` if installed.
39
+
40
+ ## Phase 1 — Inventory (always read-only)
41
+
42
+ Walk the target tree and build a picture of what is actually there. Do not open
43
+ a document to summarize its subject matter; classify from path, name, extension,
44
+ and size.
45
+
46
+ Report:
47
+
48
+ - **Total counts** by extension, and total size.
49
+ - **Depth and shape** — how deep the tree goes, which directories hold the bulk.
50
+ - **Naming patterns observed** — dated (`2024-03-01-...`), numbered, free-form,
51
+ or mixed. Report what you see; do not judge it yet.
52
+ - **Collisions with Arcane's own layout** — anything already at `TODO.md`,
53
+ `DECISIONS.md`, `IDEAS.md`, `README.md`, `journal/`, `.arcane/`, `.github/`,
54
+ `.claude/`. These are the only paths where adoption could overwrite something.
55
+ - **Files Git will treat as binary** under the installed `.gitattributes`, and
56
+ any that are large enough to be worth an explicit LFS decision later.
57
+ - **Anything unreadable** — permission errors, broken symlinks, zero-byte files.
58
+ Report them; never silently skip.
59
+
60
+ **If `content_sensitivity` is `"sensitive"`:** the inventory is paths, counts,
61
+ extensions and sizes only. Do not quote filenames that are themselves revealing
62
+ in the session summary — say "12 files under `clients/`", not the list — and do
63
+ not open documents to characterize their contents.
64
+
65
+ ## Phase 2 — Propose a mapping
66
+
67
+ Produce a written proposal. This is the artifact the operator approves, and it
68
+ must be specific enough that they can predict every effect.
69
+
70
+ For each group of files, state one of:
71
+
72
+ | Disposition | Meaning |
73
+ |---|---|
74
+ | **Leave in place** | No move. The default, and the right answer for most trees. |
75
+ | **Move** | Old path → new path, explicitly, per file or per directory. |
76
+ | **Rename** | Old name → new name, with the rule that produced it. |
77
+ | **Ignore** | Added to `.gitignore` rather than governed. |
78
+ | **Flag** | Needs an operator decision this spell will not make (see below). |
79
+
80
+ Always also state:
81
+
82
+ - **What `subject_root` will be** afterwards, and whether adoption changes it.
83
+ If the tree is already at the repository root, propose `"."` and say plainly
84
+ that this means no restructuring.
85
+ - **Which collisions from Phase 1 you propose to resolve, and how.** Never
86
+ propose overwriting an existing `TODO.md`/`DECISIONS.md`/`README.md`; propose
87
+ merging or leaving the operator's file untouched.
88
+ - **What will NOT be touched** — an explicit list is part of the proposal, not
89
+ an omission from it.
90
+
91
+ Flag rather than decide:
92
+
93
+ - Anything that looks like credentials, keys, or personal data.
94
+ - Anything suggesting a retention obligation (contracts, filings, tax records)
95
+ — see `records-conventions.md`; deletion and relocation of those is an
96
+ operator decision.
97
+ - Superseded-looking duplicates (`final-v2-FINAL.docx`). Propose the tombstone
98
+ convention from `records-conventions.md`; do not pick a winner.
99
+
100
+ End with: **"Approve this mapping? (yes / edit / cancel)"** and stop. A dry run
101
+ ends here, always.
102
+
103
+ ## Phase 3 — Apply (only after explicit approval, and only with `--apply`)
104
+
105
+ Apply in the order below. Each step states its rollback *before* it runs, and
106
+ each step is a separate commit. Revert them in reverse order — reverting an
107
+ earlier phase while a later one still stands will conflict, because the later
108
+ phase built on the paths the earlier one created.
109
+
110
+ 1. **Write `subject_root` to `.arcane.json`** (if it changes).
111
+ *Rollback: revert the commit; no files moved yet.*
112
+ 2. **Add ignore entries** for anything dispositioned "Ignore".
113
+ *Rollback: revert the commit; files are untouched on disk either way.*
114
+ 3. **Renames**, using `git mv` so history follows the file.
115
+ *Rollback: revert the commit. If a rename collides with an existing path,
116
+ stop the whole phase — do not overwrite, do not continue to step 4.*
117
+ 4. **Moves**, using `git mv`, deepest paths first so parent directories are
118
+ never removed out from under a pending move.
119
+ *Rollback: revert the commit.*
120
+ 5. **Tombstones** for anything the operator confirmed as superseded, per
121
+ `records-conventions.md`.
122
+ *Rollback: revert the commit; original content was never deleted.*
123
+
124
+ Hard rules for this phase:
125
+
126
+ - **Never delete a document.** Adoption moves, renames, and marks. Deletion is a
127
+ separate, explicit operator decision (`records-conventions.md`).
128
+ - **Never overwrite an existing file.** On any collision, stop and report.
129
+ - **Stop at the first failure.** Do not attempt partial recovery mid-phase —
130
+ report what completed, what did not, and the exact `git revert` command for
131
+ each commit already made.
132
+ - If the repository is `content_sensitivity: sensitive`, commit messages name
133
+ paths and counts only, never contents.
134
+
135
+ ## Phase 4 — Report
136
+
137
+ Output:
138
+
139
+ ```
140
+ Adopted <N> files under {SUBJECT_ROOT}
141
+
142
+ Moved <n> (commit <sha>)
143
+ Renamed <n> (commit <sha>)
144
+ Tombstoned <n> (commit <sha>)
145
+ Left as-is <n>
146
+ Ignored <n>
147
+ Flagged <n> — needs your decision, listed below
148
+ ```
149
+
150
+ Then list every flagged item with the decision it needs. Finish with the
151
+ suggested next step: `spell-todo` to capture the flagged decisions, or
152
+ `spell-commit-work` if anything remains uncommitted.
153
+
154
+ ## Related
155
+
156
+ - [[.arcane/governance/records-conventions|Records Conventions]] — supersession and retention
157
+ - [[.arcane/governance/git-conventions|Git Conventions]] — branch and merge discipline
158
+ - [[.arcane/governance/universal-agent-rules|Universal Agent Rules]] — sensitive-repository behaviour
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: Spell — Arcane Version
3
+ description: Report the version of Arcane installed in this repository, the active profile, installed components, and whether an update is available.
4
+ claude_description: Use PROACTIVELY when asked about the installed Arcane version, profile, or whether an update is available.
5
+ argument-hint: Optional flag — pass "components" to list all installed components in full detail
6
+ agent: agent
7
+ ---
8
+
9
+ ## Executive Summary
10
+
11
+ - This prompt reads `.arcane.json` and reports the installed Arcane version for this repository.
12
+ - It surfaces the install date, profile, and component count.
13
+ - Optionally lists every installed component when the "components" argument is passed.
14
+ - Use this any time you need to know which Arcane version a repo is running.
15
+
16
+ ---
17
+
18
+ Report the Arcane installation state for this repository.
19
+
20
+ ## Step 1 — Read the Manifest
21
+
22
+ Read [.arcane.json](../../.arcane.json) from the repository root.
23
+
24
+ If the file does not exist, stop and output:
25
+
26
+ ```
27
+ ⚠ Arcane is not installed in this repository.
28
+ Run `spell init` to install it.
29
+ ```
30
+
31
+ ## Step 2 — Output Installation Summary
32
+
33
+ Produce output in this exact structure:
34
+
35
+ ### Arcane Installation
36
+
37
+ | Field | Value |
38
+ | ---------------- | ----------------------------- |
39
+ | **Version** | `{version from .arcane.json}` |
40
+ | **Profile** | `{profile}` |
41
+ | **Installed At** | `{installedAt}` |
42
+ | **Components** | `{count}` installed |
43
+
44
+ ### Update Check (two-axis)
45
+
46
+ This repo's `.arcane.json` version is one of three readings — check both axes, the same two as
47
+ `spell-open-session`'s own version check:
48
+
49
+ - **Repo-files version** — already read in Step 1 (`.arcane.json`'s `version` field).
50
+ - **Installed CLI version** — determine the version of the installed `arcane-cli` CLI (for example,
51
+ `npx arcane-cli --version`, or the locally installed package version).
52
+ - **Npm-latest version** — fetch `https://registry.npmjs.org/arcane-cli/latest` and extract the
53
+ `version` field.
54
+
55
+ - **(a) Repo-files behind the installed CLI:** `⚠ Managed files out of date: files at {version} → CLI at {cli}. Run spell update to resync files.`
56
+ - **(b) Installed CLI behind npm-latest:** `⚠ Update available: CLI at {cli} → latest {latest}. Upgrade the CLI, then run spell update.`
57
+ - **If either axis drifts, emit the canonical version-drift diagram** — same template, same collapsing/
58
+ branching rule, same `:::mermaid`-for-ADO-wikis fencing as `spell-open-session.md`'s own
59
+ "Arcane version check (two-axis)" step; that file holds the canonical shape, referenced here rather
60
+ than repeated.
61
+ - If both axes are current:
62
+
63
+ ```
64
+ ✔ You are on the latest version ({version}).
65
+ ```
66
+
67
+ If the npm registry is unreachable, report:
68
+
69
+ ```
70
+ ℹ Could not reach npm registry — update check skipped.
71
+ ```
72
+
73
+ ## Step 3 — Component Detail (optional)
74
+
75
+ Only include this section when the user passed "components" as the prompt argument.
76
+
77
+ List each entry from the `components` array in `.arcane.json` as a table:
78
+
79
+ | Component | Installed Version | Files |
80
+ | --------- | ----------------- | ----- |
81
+ | ... | ... | ... |
82
+
83
+ ## Rules
84
+
85
+ - Do not modify any files.
86
+ - Keep output factual — read directly from `.arcane.json`, do not infer or assume values.
87
+ - If `installedAt` is an ISO 8601 timestamp, display it as a human-readable date (e.g., "26 May 2026").
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: Spell — Architect
3
+ description: Generate architecture decisions and story breakdown from a PRD, producing architecture.md and stories.json
4
+ claude_description: Use PROACTIVELY once a PRD exists and needs architecture decisions and a story breakdown before implementation starts.
5
+ argument-hint: Path to PRD.md or paste the PRD content
6
+ agent: agent
7
+ ---
8
+
9
+ ## Executive Summary
10
+
11
+ - This prompt takes a PRD and produces architecture decisions plus an implementable story breakdown.
12
+ - It follows a structured solutioning pattern — progressive context chain from requirements to implementation plan.
13
+ - Outputs `architecture.md` and `stories.json` that feed into `spell-implement`.
14
+ - See [[.arcane/governance/development-methodology|Development Methodology]] for full Spell Loop reference.
15
+
16
+ ---
17
+
18
+ Generate architecture decisions and story breakdown from the provided PRD.
19
+
20
+ Use these files for context:
21
+
22
+ - [governance/development-methodology.md](../../.arcane/governance/development-methodology.md) — Spell Loop methodology and stories.json format
23
+ - [governance/testing-standards.md](../../.arcane/governance/testing-standards.md) — Testing frameworks and coverage requirements
24
+ - [DECISIONS.md](../../DECISIONS.md) — Existing ADRs to respect and extend
25
+
26
+ Workflow:
27
+
28
+ 1. **Read the PRD** — understand requirements, constraints, and acceptance criteria.
29
+ - If no PRD exists for the feature, do not architect against assumptions — recommend the user run `spell-plan` first to produce one, then return here.
30
+
31
+ 2. **Verify PRD coverage** — before designing the architecture, confirm the PRD covers the scope needed to design against. Never guess to fill holes. If there are gaps or ambiguities (missing requirements, undefined constraints, unresolved acceptance criteria), list them explicitly and ask the user to resolve them — or loop back to `spell-plan` — before proceeding. Only continue once the gaps are resolved.
32
+
33
+ 3. **Make architecture decisions** — for each significant technical choice:
34
+ - What are the options?
35
+ - What are the tradeoffs?
36
+ - What does the decision depend on?
37
+ - Propose a recommendation with rationale.
38
+ - Flag decisions that need a new ADR in DECISIONS.md.
39
+
40
+ 4. **Generate architecture.md**:
41
+ ```markdown
42
+ # Architecture: [Feature Name]
43
+
44
+ ## Overview
45
+ [High-level approach in 2-3 sentences]
46
+
47
+ ## Decisions
48
+ ### [Decision 1: e.g., API Design]
49
+ - **Options:** [A, B, C]
50
+ - **Decision:** [Chosen option]
51
+ - **Rationale:** [Why]
52
+ - **ADR:** [Existing ADR-NNN or "Needs new ADR"]
53
+
54
+ ## Component Diagram
55
+ [Mermaid diagram showing how components interact]
56
+
57
+ ## Data Flow
58
+ [Sequence diagram for key workflows]
59
+
60
+ ## Testing Strategy
61
+ - [Framework per governance/testing-standards.md]
62
+ - [Key test scenarios from acceptance criteria]
63
+ - [Coverage targets]
64
+
65
+ ## Security Considerations
66
+ - [Per threat model]
67
+
68
+ ## Implementation Notes
69
+ - [Tech stack specifics, package versions, patterns to follow]
70
+ ```
71
+
72
+ 5. **Break into stories** — generate `stories.json` per the format in development-methodology.md:
73
+ - Each story must be completable in one AI context window (one file change, one endpoint, one component).
74
+ - Order stories by dependency (infrastructure first, then API, then UI).
75
+ - Include acceptance criteria from the PRD mapped to specific stories.
76
+ - Mark all stories as `"passes": false`.
77
+
78
+ 5a. **Validate stories.json schema** — before outputting, self-check every field. Missing fields break `spell-implement`. Required top-level fields:
79
+ - `feature` (string)
80
+ - `branchName` (string, format: `agent/type/description`)
81
+ - `assignedAgent` (string, agent slug)
82
+ - `trackingMode` (`internal` or `external`)
83
+ - `externalProvider` (required when `trackingMode=external`)
84
+ - `adoWorkItemId` (required only when `trackingMode=external` and `externalProvider=ado`)
85
+
86
+ Required per-story fields:
87
+ - `id` (string, e.g. `FEAT-001`)
88
+ - `title` (string)
89
+ - `description` (string — detailed enough for implementation without additional context)
90
+ - `acceptanceCriteria` (array of strings)
91
+ - `priority` (number, 1 = highest)
92
+ - `passes` (boolean, always `false` on output)
93
+ - `assignedTo` (string, agent slug)
94
+ - `testEvidence` (null on output)
95
+
96
+ If any required field is missing, regenerate before outputting. Do not present incomplete stories.json.
97
+
98
+ 6. **Implementation readiness check** — verify:
99
+ - Every PRD requirement maps to at least one story.
100
+ - No story depends on an unresolved Open Question from the PRD.
101
+ - Testing strategy covers all acceptance criteria.
102
+ - No architecture decision contradicts existing ADRs.
103
+
104
+ 7. **Save to disk** — write both outputs to the feature folder:
105
+ - `features/{adoWorkItemId}-{slug}/architecture.md` and `features/{adoWorkItemId}-{slug}/stories.json` when `trackingMode=external` and `externalProvider=ado`
106
+ - `features/{slug}/architecture.md` and `features/{slug}/stories.json` when `trackingMode=internal` (or non-ADO external providers without an ADO ID)
107
+
108
+ Resolve `trackingMode`, `externalProvider`, optional `adoWorkItemId`, and slug from PRD frontmatter first. If the folder does not exist, create it with `mkdir -p`.
109
+ Confirm the paths to the user after writing.
110
+
111
+ 8. **Present for review** — show the architecture and story breakdown to the user.
112
+
113
+ Rules:
114
+ - Stories must be right-sized per the methodology doc (not "build the entire dashboard").
115
+ - Architecture decisions must reference existing ADRs when relevant.
116
+ - Use Mermaid for all diagrams, per rule 8 (`.arcane/governance/universal-agent-rules.md`) — this spell's component/data-flow diagrams are agent-authored design output, not the generated-state-diagrams sub-convention ARC-036 covers.
117
+ - If PRD scope is too large, recommend splitting before proceeding.
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: Spell — Brainstorm
3
+ description: Divergent ideation — explore multiple solutions to a problem space before committing to a plan
4
+ claude_description: Use PROACTIVELY when exploring multiple solutions to a problem before committing to one.
5
+ argument-hint: "Problem space or opportunity (e.g., 'How should we handle multi-tenant billing?')"
6
+ agent: agent
7
+ ---
8
+
9
+ ## Executive Summary
10
+
11
+ - This spell generates multiple solution options for a problem space before narrowing to a plan.
12
+ - It produces divergent ideas, evaluates trade-offs, and surfaces hidden constraints — without committing to implementation.
13
+ - Use this BEFORE `spell-plan` when you're unsure which direction to take, or when the problem is ambiguous.
14
+ - Output: structured options with trade-off matrix, recommended path, and open questions.
15
+
16
+ ---
17
+
18
+ Explore the given problem space and generate solution options.
19
+
20
+ Use these files for context. Each is **optional** — if a file is missing, proceed without it and note the gap in your output so the user knows what wasn't consulted:
21
+
22
+ - [governance/development-methodology.md](../../.arcane/governance/development-methodology.md) — Spell Loop methodology. _If missing:_ proceed with general SDLC reasoning.
23
+ - [DECISIONS.md](../../DECISIONS.md) — Existing ADRs (to avoid contradicting decided patterns). _If missing:_ assume no decided patterns and state that ADR conflicts could not be checked.
24
+ - [project.md](../../project.md) — Project goals and business context. _If missing:_ infer context from the problem statement and ask a clarifying question if goals are unclear.
25
+ - [naming-conventions.md](../../.arcane/governance/naming-conventions.md) — Agent roster and roles. _If missing:_ proceed without role references.
26
+ - [TODO.md](../../TODO.md) — In-progress work (referenced in step 4). _If missing:_ skip the in-progress-work cross-check and note it.
27
+
28
+ ---
29
+
30
+ ## Workflow
31
+
32
+ ### 1. Problem Framing
33
+
34
+ Accept the problem from one of these sources:
35
+
36
+ | Source | Format | How to fetch |
37
+ |--------|--------|--------------|
38
+ | **Description in prompt** | Inline text | Use as-is |
39
+ | **ADO work item ID** | `#507` or `507` with org name | Run: `az boards work-item show --id {id} --org https://dev.azure.com/{org} --output json` |
40
+ | **File path** | Path to existing doc | Read the file |
41
+
42
+ Clarify the problem by identifying:
43
+ - **What is the core tension?** — competing goals, missing capability, or scaling pain
44
+ - **Who is affected?** — users, operators, downstream systems
45
+ - **What constraints exist?** — budget, timeline, tech stack, ADRs already decided
46
+ - **What does "good enough" look like?** — minimum viable outcome vs. ideal outcome
47
+
48
+ If the problem is too vague, ask up to 3 clarifying questions before proceeding.
49
+
50
+ ### 2. Divergent Ideation
51
+
52
+ Generate **3–5 distinct approaches** to the problem. Each must be meaningfully different — not just parameter variations of the same idea.
53
+
54
+ For each option:
55
+
56
+ ```markdown
57
+ ### Option N: [Name]
58
+ **One-liner:** [What this approach does in ≤15 words]
59
+ **How it works:** [2-3 sentences on mechanism]
60
+ **Strengths:** [What this gets right]
61
+ **Weaknesses:** [What this sacrifices or risks]
62
+ **Effort:** S (< 1 sprint) / M (1-2 sprints) / L (3+ sprints)
63
+ **Prerequisite ADRs:** [Decisions that must be made first, or "none"]
64
+ ```
65
+
66
+ Guidelines for generating options:
67
+ - Include at least one **simple/minimal** option (the "just do the simplest thing" path)
68
+ - Include at least one **ambitious** option (the ideal-world approach)
69
+ - Include at least one **unconventional** option (reframe the problem, challenge assumptions)
70
+ - Do NOT include options that violate existing ADRs unless you explicitly flag the conflict
71
+
72
+ ### 3. Trade-off Matrix
73
+
74
+ Produce a comparison table:
75
+
76
+ | Dimension | Option 1 | Option 2 | Option 3 | ... |
77
+ |-----------|----------|----------|----------|-----|
78
+ | **Complexity** | Low/Med/High | | | |
79
+ | **Time to value** | Days/Weeks/Months | | | |
80
+ | **Scalability** | Poor/Good/Excellent | | | |
81
+ | **Reversibility** | Easy/Hard/Irreversible | | | |
82
+ | **Risk** | Low/Med/High | | | |
83
+ | **Alignment with goals** | Weak/Moderate/Strong | | | |
84
+
85
+ ### 4. Hidden Constraints & Risks
86
+
87
+ Surface things the user might not have considered:
88
+ - Dependencies on decisions not yet made
89
+ - Interaction with other in-progress work (check `TODO.md`)
90
+ - Security or compliance implications
91
+ - Data migration or backwards-compatibility concerns
92
+ - Skills or tooling gaps
93
+
94
+ ### 5. Recommendation
95
+
96
+ State your recommended path clearly:
97
+
98
+ ```markdown
99
+ ## Recommended Path
100
+
101
+ **Option [N]: [Name]**
102
+
103
+ **Why:** [1-2 sentences on why this balances trade-offs best for the current context]
104
+
105
+ **Immediate next step:** [One concrete action — likely "run `spell-plan` with this direction"]
106
+ ```
107
+
108
+ If no single option is clearly best, say so and identify what additional information would break the tie.
109
+
110
+ ### 6. Open Questions
111
+
112
+ List up to 5 questions that would refine the decision:
113
+ - Questions whose answers would change the recommendation
114
+ - Questions about constraints not visible in the docs
115
+ - Questions about user preferences or business priorities
116
+
117
+ ---
118
+
119
+ ## Rules
120
+
121
+ - **Never commit to implementation.** This spell produces options, not plans. The output **feeds into `spell-plan`** (run it with the recommended direction). For a large idea spanning multiple features or sprints, hand off to `spell-scope` first to break it into deliverables, then `spell-plan` each.
122
+ - **Quantity over polish.** Brainstorming favors breadth. Options don't need to be fully fleshed out — just distinct enough to compare.
123
+ - **Challenge assumptions.** If the user's framing seems to constrain solutions unnecessarily, say so explicitly.
124
+ - **Respect decided ADRs.** Flag conflicts but don't silently ignore existing decisions.
125
+ - **Stay grounded.** Options must be feasible given the tech stack and team size. No "hire 5 engineers" solutions for a solo operation.
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: Spell — Bug
3
+ description: Document, diagnose, and fix a bug — files a tracker work item (per tracking_mode), traces root cause, implements fix, verifies, and commits
4
+ claude_description: Use PROACTIVELY whenever diagnosing and fixing a bug, even if the user just describes broken behavior.
5
+ argument-hint: Bug description (e.g., "Session detail dialog shows 404 when clicking a mock session")
6
+ agent: agent
7
+ ---
8
+
9
+ ## Executive Summary
10
+
11
+ - This prompt handles the full bug lifecycle: document → track → diagnose → fix → verify → close.
12
+ - It records the bug in your configured tracker (external provider) or `TODO.md` (internal mode) and links the fix commit to it.
13
+ - Output is a working fix with tests, committed using Conventional Commits format.
14
+ - **When to use:** you have a concrete defect — wrong/broken behavior versus expected. If the report is actually a request for *new* behavior, route to `spell-suggest-feature` instead. For small non-blocking cleanups discovered along the way, capture them with `spell-todo`.
15
+ - See [[.arcane/governance/development-methodology|Development Methodology]] for full Spell Loop reference.
16
+
17
+ ---
18
+
19
+ Document, diagnose, and fix the described bug.
20
+
21
+ Use these files for context (each is optional — if a file is missing, proceed and note the assumption you fell back on):
22
+
23
+ - [governance/development-methodology.md](../../.arcane/governance/development-methodology.md) — Spell Loop methodology **and tracker-provider specifics** (which tracker, work-item types, commit-link syntax). If missing, default to `tracking_mode: internal` and track in `TODO.md`.
24
+ - [DECISIONS.md](../../DECISIONS.md) — Existing ADRs to respect. If missing, proceed without ADR constraints.
25
+ - [governance/testing-standards.md](../../.arcane/governance/testing-standards.md) — Coverage thresholds. If missing, match the test conventions already present in the repo.
26
+
27
+ Workflow:
28
+
29
+ 1. **Capture the bug** — gather these details from the user (ask if missing):
30
+
31
+ | Field | Description |
32
+ |-------|-------------|
33
+ | **Summary** | One-line description of the bug |
34
+ | **Reproduction steps** | Numbered steps to reproduce |
35
+ | **Expected behavior** | What should happen |
36
+ | **Actual behavior** | What actually happens (include error messages, HTTP codes, screenshots) |
37
+ | **Severity** | Critical / High / Medium / Low |
38
+ | **Affected component** | File path, page, API route, or module |
39
+ | **Discovery context** | How was this found? (smoke test, user report, monitoring) |
40
+
41
+ 2. **Record the bug** — file it in whatever tracker this repo uses. Resolve `tracking_mode` from `.arcane.json` (or the repo's feature/PRD frontmatter); if unset, **ask** rather than assuming.
42
+
43
+ - **`tracking_mode: internal`** (or no tracker configured) — append the bug to `TODO.md` (create it if absent) using the captured fields from Step 1. Use the `TODO.md` entry's identifier as `{WORK_ITEM_ID}`. No external tooling required.
44
+ - **`tracking_mode: external`** — file a work item in the configured provider. Read [governance/development-methodology.md](../../.arcane/governance/development-methodology.md) for the provider, work-item type, and required fields; do **not** assume Azure DevOps. Extract the returned id as `{WORK_ITEM_ID}`.
45
+
46
+ *Azure DevOps is one such provider — if and only if `.arcane.json` / methodology names it (and the `az` CLI is available), file it like so. Resolve `{ADO_ORG}` and `{ADO_PROJECT}` from `.arcane.json`; ask if unset:*
47
+ ```bash
48
+ az boards work-item create \
49
+ --type Bug \
50
+ --title "[Bug] {SUMMARY}" \
51
+ --description "{formatted description with repro steps}" \
52
+ --org https://dev.azure.com/{ADO_ORG} \
53
+ --project {ADO_PROJECT} \
54
+ --output json
55
+ ```
56
+
57
+ *GitHub is another — if and only if `.arcane.json` names `external_provider: github` (and the `gh` CLI is authenticated):*
58
+ ```bash
59
+ gh issue create \
60
+ --title "[Bug] {SUMMARY}" \
61
+ --body "{formatted description with repro steps}" \
62
+ --label bug
63
+ ```
64
+ `gh issue create` prints the created issue's URL on success; extract the trailing number as `{WORK_ITEM_ID}`. Omit `--label` if the repo has no `bug` label (`gh label list`) rather than guessing.
65
+
66
+ If the configured tooling is unavailable or the user prefers manual tracking, fall back to the `TODO.md` entry above and continue.
67
+
68
+ 3. **Diagnose** — trace the code path to find the root cause:
69
+ - Read the affected component and its dependencies.
70
+ - Identify the exact line(s) where the bug manifests.
71
+ - Determine *why* the bug exists (data mismatch, missing case, race condition, etc.).
72
+ - Document the root cause concisely.
73
+
74
+ 4. **Implement the fix** — write the minimal code change:
75
+ - Fix only the bug — no refactoring, no feature additions.
76
+ - Follow existing code patterns and conventions.
77
+ - If the fix touches a public interface, check all callers.
78
+
79
+ 5. **Add or update tests** — ensure the bug cannot regress:
80
+ - Write a test that reproduces the bug (fails without the fix).
81
+ - Verify existing tests still pass.
82
+ - Run the full test suite: `npx vitest run` (or project-specific command).
83
+
84
+ 6. **Verify the fix** — confirm the bug is resolved:
85
+ - Run the reproduction steps from Step 1 — they should now succeed.
86
+ - Check for side effects in related functionality.
87
+ - If applicable, rebuild and restart: `npm run build`.
88
+
89
+ 7. **Commit** — stage and propose a commit message for approval:
90
+ ```
91
+ fix({scope}): {SUMMARY}
92
+
93
+ {Root cause explanation}
94
+
95
+ {What was changed and why}
96
+
97
+ {WORK_ITEM_LINK}
98
+ ```
99
+ Follow Conventional Commits format. For `{WORK_ITEM_LINK}`, use the commit-link convention your tracker expects (per [governance/development-methodology.md](../../.arcane/governance/development-methodology.md)) — e.g. `Fixes AB#{WORK_ITEM_ID}` for Azure DevOps, `Fixes #{WORK_ITEM_ID}` for GitHub Issues, or a plain `Refs TODO.md` for internal mode. Wait for user approval before executing `git commit`.
100
+
101
+ 8. **Close out the tracker** — update the work item's state to reflect the fix:
102
+ - **`internal`** — mark the `TODO.md` entry as resolved (check it off / move to a Done section).
103
+ - **`external`** — transition the work item to its resolved/done state via the provider. For Azure DevOps specifically (resolve `{ADO_ORG}` from `.arcane.json`):
104
+ ```bash
105
+ az boards work-item update \
106
+ --id {WORK_ITEM_ID} \
107
+ --state Resolved \
108
+ --org https://dev.azure.com/{ADO_ORG} \
109
+ --output json
110
+ ```
111
+ For GitHub specifically:
112
+ ```bash
113
+ gh issue close {WORK_ITEM_ID} --reason completed --comment "Fixed by {commit SHA or PR URL}"
114
+ ```
115
+ For other providers, follow [governance/development-methodology.md](../../.arcane/governance/development-methodology.md).
116
+
117
+ Rules:
118
+ - Fix only the reported bug. Do not bundle unrelated improvements.
119
+ - If the report turns out to describe *new* or *changed* behavior rather than a defect, stop and route the user to `spell-suggest-feature`. Capture any non-blocking follow-ups you notice via `spell-todo` rather than expanding this fix.
120
+ - Every fix must have a test that would have caught the bug.
121
+ - Present the commit message for human approval — never auto-commit.
122
+ - If the root cause is unclear, present your diagnosis and ask for confirmation before implementing.
123
+ - If the fix is risky (touches shared infrastructure, auth, or data), flag it explicitly.