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
@@ -7,155 +7,4 @@ agent: agent
7
7
  last_updated: 2026-08-31
8
8
  ---
9
9
 
10
- ## Executive Summary
11
-
12
- - This spell safely syncs an open PR's branch with its target branch once the target has moved ahead.
13
- - It is the recovery path `spell-create-pull-request` and `spell-ship` route to when they detect a
14
- conflict they deliberately don't try to resolve themselves.
15
- - It draws a hard line between conflicts safe to resolve mechanically (identical changes on both sides)
16
- and conflicts that need a human — it never guesses on the ambiguous side of that line.
17
- - Every history-rewriting step is preceded by a recoverable ref, and every push uses
18
- `--force-with-lease`, never bare `--force`.
19
-
20
- ---
21
-
22
- Sync the specified PR's branch (or the current branch's own open PR) with its target branch.
23
-
24
- Context to consult:
25
-
26
- - `.arcane/governance/git-conventions.md` — the declared merge-strategy ladder (Merge no-fast-forward or
27
- Rebase-and-fast-forward sanctioned; Squash and Semi-linear merge never sanctioned) and branch policy.
28
- - `.arcane/governance/testing-standards.md` — coverage thresholds for the post-replay gate re-run.
29
-
30
- Related spells:
31
-
32
- - `spell-create-pull-request` — routes here from its Step 0.6 conflict-stop; reuses its Step 2
33
- provider-detection table rather than re-deriving it (D8).
34
- - `spell-ship` — routes here from its Step 2 conflict-stop.
35
-
36
- ## Step 0 — Guard checks
37
-
38
- 1. **Require a clean worktree.** Run `git status --porcelain`. Any output — staged, unstaged, or
39
- untracked — **STOPS** this spell before it touches anything. Sync is not the place to also carry
40
- uncommitted work through a rebase.
41
- 2. **Resolve the active PR, source branch, base branch, and expected head SHA.** If a PR number or
42
- branch name was given as an argument, resolve from that; otherwise resolve from
43
- `git branch --show-current` and the open PR for it (reuse `spell-create-pull-request`'s Step 2
44
- provider-detection and open-PR-lookup calls — same commands, not restated here). Record the
45
- branch's current HEAD SHA now, before anything else runs — this is what "expected head SHA" means
46
- for Step 5's post-push verification once rebase/replay changes it to a new value.
47
- 3. **STOP** if no open PR is found for the resolved branch — this spell syncs an *existing* PR; if none
48
- exists yet, direct the user to `spell-create-pull-request` first.
49
-
50
- ## Step 1 — Create the recoverable ref
51
-
52
- Before any history-rewriting operation, tag the current HEAD so this sync is never a one-way door:
53
-
54
- ```bash
55
- git tag "sync-backup/<branch>/$(date +%Y%m%d-%H%M%S)" HEAD
56
- ```
57
-
58
- Report the tag name in the final output (Step 6). **Never delete this tag automatically** — leave it for
59
- the human to remove once they've confirmed the sync landed correctly; this spell only ever adds it.
60
-
61
- ## Step 2 — Fetch and apply the declared merge policy
62
-
63
- ```bash
64
- git fetch origin
65
- ```
66
-
67
- Resolve the repository's actual merge-strategy ladder from `git-conventions.md` rather than assuming:
68
-
69
- - **Rebase-and-fast-forward** (the common case for a PR that's simply fallen behind): `git rebase origin/<target>`.
70
- - **Merge no-fast-forward** (when the repo's declared policy or the PR's own history indicates merge
71
- commits are the norm here): `git merge origin/<target>`.
72
- - **Never** produce a squash or semi-linear result as part of this sync — those are never sanctioned,
73
- regardless of which of the two above applies.
74
-
75
- ## Step 3 — Classify any conflict: mechanical vs. ambiguous
76
-
77
- If Step 2 completes with no conflicts, skip straight to Step 4 — **this is the common case and it must
78
- not be treated as a special case of conflict handling.**
79
-
80
- If Step 2 reports conflicts, read every conflicted file's conflict markers before doing anything else,
81
- then classify **each conflicted hunk independently** — a single file can contain both kinds:
82
-
83
- - **Mechanically resolvable** — both sides made the identical change (e.g. the same formatting fix, the
84
- same import added the same way), or one side's change is a strict superset of the other's with no
85
- semantic divergence. Resolve by keeping the superset/identical content, verify no line from either
86
- side's *unique* content was dropped, stage the file, and continue the rebase/merge.
87
- - **Ambiguous** — the same lines changed with different intent, or you cannot establish with confidence
88
- that one side's content is a strict superset of the other's. **STOP.** Do not guess, do not pick a
89
- side, do not attempt a "reasonable-looking" merge of the two. Abort the in-progress rebase/merge
90
- (`git rebase --abort` / `git merge --abort`) so the branch is left exactly as it was, then report:
91
- - The exact conflicting file(s) and hunk(s).
92
- - Both sides' conflicting content, verbatim.
93
- - That the recoverable ref from Step 1 still points at the pre-sync state.
94
- - A direct instruction to resolve manually and re-run this spell, or to resolve and push directly.
95
-
96
- Never proceed past an ambiguous hunk on the theory that "the rest of the file is fine" — abort the whole
97
- operation and hand off, per the line above.
98
-
99
- ## Step 4 — Re-run project gates before pushing
100
-
101
- A clean replay is not the same as a working tree. Before pushing:
102
-
103
- ```bash
104
- npm run typecheck && npm run lint && npm run test
105
- ```
106
-
107
- If this repository has `check:version-bump` and the sync touched any distributable path, run it too. **A
108
- gate failure here is the same class of stop as an ambiguous conflict** — do not push a tree that fails
109
- its own gates just because the git-level replay succeeded. Report which gate failed and stop; the
110
- recoverable ref from Step 1 is still available.
111
-
112
- ## Step 5 — Push and verify
113
-
114
- ```bash
115
- git push --force-with-lease
116
- ```
117
-
118
- - **On success:** proceed to provider verification below.
119
- - **On lease rejection** (the remote moved again since this sync's own Step 2 fetch — someone else
120
- pushed to the branch in the meantime): **do not retry with `--force`, and do not retry
121
- `--force-with-lease` blindly.** Re-fetch and re-evaluate from Step 2 as if starting over — the branch
122
- state this sync was built against no longer exists. This is a genuinely new sync, not a retry of the
123
- same one.
124
-
125
- **Provider verification (never assume a successful push means the PR reflects it):**
126
-
127
- | Provider | Verify |
128
- | --- | --- |
129
- | GitHub | `gh pr view <PR#> --json headRefOid,mergeable` — `headRefOid` must equal the new HEAD SHA from Step 5; `mergeable` should not report a conflict state. |
130
- | Azure DevOps | `az repos pr show --id <PR_ID> --output json --query "{sha:lastMergeSourceCommit.commitId, status:mergeStatus}"` — the SHA must equal the new HEAD; `status` should not report `conflicts`. |
131
-
132
- If the reported SHA does not match, or the mergeable/status field reports a conflict despite a clean
133
- local push, **do not report success** — this is the exact "dispatched is not succeeded" gap EF-21
134
- already established for `spell-close-session`; a push completing without error is dispatched, not
135
- verified. Re-check once after a short wait (provider APIs can lag); if it still doesn't match, stop and
136
- report the discrepancy rather than declaring the sync done.
137
-
138
- ## Step 6 — Report
139
-
140
- ```
141
- ✓ PR synced: <URL>
142
- Branch: <branch> → <target>
143
- Method: rebase-and-fast-forward | merge-no-fast-forward
144
- Conflicts: none | resolved (mechanical) | none — no rebase needed
145
- Recoverable ref: sync-backup/<branch>/<timestamp>
146
- New head SHA: <sha> (provider-confirmed)
147
- ```
148
-
149
- - If Step 3 resolved any mechanical conflicts, list exactly which files and what was kept from each side.
150
- - If Step 3 aborted on an ambiguous conflict, this report never runs — Step 3's own STOP report is final.
151
- - Never delete the Step 1 recoverable ref as part of this report — that is the human's call.
152
-
153
- ## Rules
154
-
155
- - Never push with bare `--force` — only `--force-with-lease`, and never retry a rejected lease blindly.
156
- - Never guess on an ambiguous conflict — abort and hand off, every time, with no exception for
157
- "obviously trivial-looking" content on either side that this spell cannot independently verify.
158
- - Never skip the recoverable ref (Step 1), even for a sync expected to be clean — the ref costs nothing
159
- and the alternative is an unrecoverable mistake on the case that turns out not to be clean.
160
- - Never report a sync as complete on a push success alone — provider verification (Step 5) is mandatory.
161
- - Never delete the recoverable ref automatically.
10
+ This prompt is the Arcane `spell-sync-pull-request` spell. Read [`.arcane/spells/spell-sync-pull-request.md`](../../.arcane/spells/spell-sync-pull-request.md) and follow it as the complete workflow.
@@ -6,83 +6,4 @@ argument-hint: Story ID or test scope (e.g., "STORY-003" or "all")
6
6
  agent: agent
7
7
  ---
8
8
 
9
- ## Executive Summary
10
-
11
- - This prompt runs tests, validates coverage against thresholds, and generates evidence artifacts.
12
- - Used after `spell-implement` to verify quality before `spell-review`.
13
- - Enforces the testing standards from ADR-050 (80% line / 95% critical path coverage).
14
- - See [[.arcane/governance/testing-standards|Testing Standards]] for framework details.
15
-
16
- ---
17
-
18
- Run test suites and validate quality for the specified scope.
19
-
20
- Use these files for context:
21
-
22
- - [governance/testing-standards.md](../../.arcane/governance/testing-standards.md) — Frameworks, thresholds, evidence requirements
23
- - [governance/development-methodology.md](../../.arcane/governance/development-methodology.md) — Spell Loop context
24
- - The feature's `stories.json` — for acceptance criteria to validate
25
-
26
- Workflow:
27
-
28
- 1. **Identify test scope**:
29
- - If a story ID is given, test only the files changed by that story.
30
- - If "all" is given, run the full test suite.
31
- - Determine the tech stack and corresponding test framework from testing-standards.md.
32
-
33
- 2. **Run tests**:
34
- - The spell is framework-agnostic — execute the test command for whatever stack the project uses. Example runners by ecosystem:
35
- - JS/TS: `npm test` / `vitest run` / `jest`
36
- - .NET: `dotnet test`
37
- - Python: `pytest`
38
- - Capture output including pass/fail counts and any error messages.
39
- - Run coverage analysis if the framework supports it.
40
-
41
- 3. **Validate coverage**:
42
- - Compare against the thresholds configured in testing-standards.md. These percentages are the project's choice — use whatever values that doc defines, not a universal law. Typical defaults:
43
- - Line coverage minimum (commonly ~80%).
44
- - Critical path coverage (commonly ~95% for auth, payments, data mutations).
45
- - If below threshold, identify uncovered lines and recommend specific tests to add.
46
-
47
- 4. **Check acceptance criteria**:
48
- - Map each acceptance criterion from the story to a specific test.
49
- - Flag any acceptance criteria without corresponding test coverage.
50
-
51
- 5. **Generate test evidence**:
52
- ```markdown
53
- ## Test Evidence — [Story ID or Scope]
54
-
55
- **Date:** [timestamp]
56
- **Framework:** [e.g. Vitest / Jest / xUnit / pytest / etc.]
57
-
58
- ### Results
59
- - Tests passed: [N]
60
- - Tests failed: [N]
61
- - Tests skipped: [N]
62
- - Line coverage: [N%]
63
- - Branch coverage: [N%]
64
-
65
- ### Acceptance Criteria Coverage
66
- | Criterion | Test | Status |
67
- | ----------- | ----------- | ----------------- |
68
- | [criterion] | [test name] | PASS/FAIL/MISSING |
69
-
70
- ### Uncovered Areas
71
- - [file:lines with no coverage]
72
-
73
- ### Recommendations
74
- - [Additional tests needed]
75
- ```
76
-
77
- 6. **Update stories.json** — if testing a specific story, update the `testEvidence` field.
78
-
79
- 7. **Report** — present the test evidence and recommend next steps:
80
- - All pass + coverage met → recommend `spell-review`.
81
- - Failures found → recommend fixing via `spell-implement`.
82
- - Coverage gap → recommend adding tests before review.
83
-
84
- Rules:
85
- - Never mark a story as passing if tests fail or coverage is below the threshold.
86
- - Include actual test output, not just summaries.
87
- - If no test framework is set up, flag this as a blocker and recommend setup.
88
- - Critical path code (auth, payments, data mutations) must meet the 95% threshold.
9
+ This prompt is the Arcane `spell-test` spell. Read [`.arcane/spells/spell-test.md`](../../.arcane/spells/spell-test.md) and follow it as the complete workflow.
@@ -6,161 +6,4 @@ argument-hint: The raw idea to elaborate (e.g., "add spending limits doc", "auto
6
6
  agent: agent
7
7
  ---
8
8
 
9
- ## Executive Summary
10
-
11
- - This prompt turns a vague idea into a concrete, well-scoped TODO item placed in the correct file and section.
12
- - It reads the current TODO landscape and repo structure to avoid duplicates and pick the right home.
13
- - Use this any time you have an idea mid-session and don't want to lose it or park it in the wrong place.
14
- - If the idea is ADR-worthy or journal-worthy, it flags that and routes accordingly.
15
- - **In a hub repo:** "add a todo for &lt;venture&gt;" targets that venture's own `TODO.md` book instead of the hub root. `--sweep` skips elaboration entirely and reports new/open counts across every book (hub root + every venture).
16
-
17
- ---
18
-
19
- Resolve `{BUSINESS_ROOT}` from `.arcane.json`'s `business_root` field (default `ventures/` if unset) before either mode below.
20
-
21
- ## Sweep Mode (`--sweep`)
22
-
23
- If the argument is (or starts with) `--sweep`, skip every other step in this spell entirely and run this instead:
24
-
25
- - **In a hub repo:** report `status: new` counts and oldest-entry age for the hub root `TODO.md` plus every `{BUSINESS_ROOT}/<slug>/TODO.md` that exists. Group by book, point at `spell-manifest` for entries ready to promote. Report-only — no edits.
26
- - **In a consumer repo:** report the same, for the repo-root `TODO.md` only (no venture books exist there).
27
-
28
- Output format:
29
-
30
- ```
31
- Todo sweep — N books, M open items
32
-
33
- hub TODO.md 12 open, oldest 2026-07-14
34
- ventures/ordovica/TODO.md 3 open, oldest 2026-08-10
35
- ```
36
-
37
- ## Step 0 — Venture Targeting (Hub Only)
38
-
39
- If the input names a venture ("add a todo for ordo", `--venture <slug>`), resolve it through `{BUSINESS_ROOT}/registry.json`'s aliases first (exact slug → alias → closest match offered — never guessed). Unknown slug:
40
-
41
- ```
42
- No venture "<slug>" under {BUSINESS_ROOT}/ (closest: ordovica, tidewright).
43
- 1) use <closest> 2) add to hub root TODO.md 3) cancel (create the venture first: spell-summon-venture)
44
- ```
45
-
46
- If `role` in `.arcane.json` is not `"hub"`, venture-targeting phrasing is refused:
47
-
48
- > Venture targeting works only in the hub repo (`role: "hub"` in `.arcane.json`). This repo has no venture books.
49
- > 1) add to this repo's TODO.md (venture reference removed)
50
- > 2) skip — capture it in the hub: `spell-todo --venture <slug> "<idea>"`
51
-
52
- If option 1 is chosen and the named venture is a *different* venture than this repo's own, strip that name from the item text before writing it — a sibling venture's name must never land in a consumer repo's `TODO.md`. If it's this repo's own venture, keep the text as given.
53
-
54
- An idea that only *mentions* a venture, without targeting phrasing, is not redirected — proceed with the hub root as normal (speed rule: don't block on a maybe).
55
-
56
- Elaborate the idea given by the user and add it to the right document(s) — the hub root `TODO.md` by default, or the resolved venture's own `TODO.md` when targeted.
57
-
58
- The raw idea from the user is in the prompt argument. If no argument was provided, ask the user to describe the idea before proceeding.
59
-
60
- Use these files first:
61
-
62
- - [TODO.md](../../TODO.md) — section structure and existing items (avoid duplicates); or the targeted venture's own `TODO.md`
63
- - [DECISIONS.md](../../DECISIONS.md) — ADR registry (check if the idea is decision-worthy)
64
- - [README.md](../../README.md) — repo structure (find the right canonical doc to reference)
65
- - [project.md](../../project.md) — active priorities (calibrate urgency)
66
-
67
- ## Step 1 — Understand the Idea
68
-
69
- Read the raw input. Ask one clarifying question only if the idea is fundamentally ambiguous (e.g., "which business?"). Do not ask for information you can infer.
70
-
71
- Classify the idea along two axes:
72
-
73
- **Type:**
74
- - `todo` — a discrete action item with a clear done state
75
- - `bug` — a defect to fix
76
- - `tech-debt` — deferred cleanup/refactor cost to track
77
- - `adr-candidate` — a significant architectural or policy decision that needs a formal ADR
78
- - `journal-seed` — context-heavy exploration that belongs in a journal entry, not a task list
79
- - `idea-capture` — a speculative or long-horizon idea with no immediate action (goes in TODO under the relevant section with a `[ ]`)
80
-
81
- **Domain** (pick primary):
82
- - `security` — threat model, hardening, access control
83
- - `agents` — agent config, channels, policies, installation
84
- - `infrastructure` — hardware, OS, cloud, networking, provisioning
85
- - `governance` — git conventions, agent autonomy, spending controls, work management
86
- - `ci-cd` — repos, pipelines, build/release automation
87
- - `business` — a specific business under `{BUSINESS_ROOT}/` — name which one
88
- - `product-ideas` — new product concepts or packaging ideas
89
- - `legal` — LLC, ToS, contracts
90
- - `playbooks` — runbooks, setup guides, automation scripts
91
- - `prompts` — new or updated `.github/prompts/` files
92
-
93
- **Scope** (optional, additive — does not replace Domain):
94
- - `repo` — repo-wide change touching the project broadly
95
- - `feature` — scoped to a specific feature or slug
96
- - `file` — scoped to a specific file or area
97
-
98
- ## Step 2 — Elaborate
99
-
100
- Expand the idea into one or more concrete TODO items. Each item must:
101
-
102
- - Be phrased as an imperative action (e.g., "Define...", "Create...", "Implement...", "Document...")
103
- - Have a clear done state (reviewable by a human in 10 seconds)
104
- - Include a file reference if a canonical home doc already exists (e.g., `— see [[DECISIONS]]`)
105
- - Be specific enough to act on without further clarification
106
-
107
- If the idea naturally decomposes into multiple sub-items (e.g., "build dashboard" → design, implement, deploy, document), list them individually — do not bundle vague compound items.
108
-
109
- If the idea is an `adr-candidate`, also draft a one-sentence ADR title suggestion (e.g., `ADR-NNN: Use GitHub Actions for CI instead of Azure Pipelines`).
110
-
111
- ## Step 3 — Route to the Right Document
112
-
113
- Determine the target file(s) for each item:
114
-
115
- | Situation | Target |
116
- | ----------------------------------------------------- | ---------------------------------------------------------------------------------- |
117
- | Discrete action item with a domain section in TODO.md | `TODO.md` under the matching section |
118
- | New domain not yet in TODO.md | `TODO.md` — add a new section heading |
119
- | Speculative idea or future-facing concept | `TODO.md` under `## Product Ideas` or the best matching section |
120
- | ADR candidate | `DECISIONS.md` — flag it as pending, do not write the full ADR yet |
121
- | Journal-worthy context | `journal/` — propose a filename with today's date slug, do not create the file yet |
122
- | Finding sourced from a research report | `TODO.md` under the matching section — cross-reference the report path (e.g., `— see docs/research/<slug>.md`) |
123
- | Business-specific execution item | Both `TODO.md` AND the relevant `{BUSINESS_ROOT}/<name>/overview.md` reference section |
124
-
125
- ## Step 4 — Show Proposal
126
-
127
- Output the elaborated items in this format before making any edits:
128
-
129
- ## Proposed TODO Addition
130
-
131
- **Idea understood as:** [one-sentence restatement]
132
- **Type:** [type from Step 1]
133
- **Domain:** [domain from Step 1]
134
- **Scope:** [scope from Step 1, if applicable — repo / feature / file]
135
-
136
- **Elaborated items:**
137
-
138
- - [ ] [First item — phrased as imperative, with file ref if applicable]
139
- - [ ] [Second item if applicable]
140
- - ...
141
-
142
- **Target document(s):**
143
- - `[file path]` → section `## [Section Name]`
144
-
145
- **If ADR-candidate:** Suggested ADR title: `ADR-NNN: [title]`
146
-
147
- **Placement note (if any):** [e.g., "No matching section exists — will add ## [New Section]"]
148
-
149
- **Approve?** (yes / edit / skip)
150
-
151
- ## Step 5 — Apply (After Approval)
152
-
153
- When the user approves:
154
-
155
- 1. Insert the item(s) at the bottom of the correct section in the target file(s).
156
- 2. Update the `last_updated` frontmatter on every file touched (date: today as YYYY-MM-DD).
157
- 3. Do NOT commit — leave that to `spell-commit-work`.
158
- 4. Confirm what was added and where.
159
-
160
- Output after applying:
161
-
162
- ## Added
163
-
164
- - `[file]` → `## [Section]`: [item text]
165
-
166
- **Next:** Run `spell-commit-work` to checkpoint, or continue the session.
9
+ This prompt is the Arcane `spell-todo` spell. Read [`.arcane/spells/spell-todo.md`](../../.arcane/spells/spell-todo.md) and follow it as the complete workflow.
@@ -6,97 +6,4 @@ argument-hint: Optional focus (e.g., "just the corrections", "since the last com
6
6
  agent: agent
7
7
  ---
8
8
 
9
- ## Executive Summary
10
-
11
- - The highest-value output of a working session is often the corrections — claims that were checked and
12
- did not survive. `spell-close-session` captures what happened and sanitized lessons learned; it does
13
- not capture what was asserted, what was checked, what the check showed, or what changed as a result.
14
- This spell extracts exactly that, separately.
15
- - **Run on demand, not every session.** Most sessions have nothing worth a ledger entry; this spell says
16
- so plainly and stops rather than manufacturing content to fill one (same discipline as
17
- `spell-document`).
18
- - **A `corrected` result is the point, not a failure to hide.** A ledger showing three confirmed claims
19
- and one correction is more valuable than one showing four confirmed claims and nothing else — the
20
- correction is evidence the verification step actually did something, not theater.
21
- - Appends to a single running file, [`docs/verification-ledger.md`](../../docs/verification-ledger.md),
22
- so a calibration rate (how often a checked claim survives) is computable across sessions without
23
- reading scattered journal entries.
24
-
25
- ---
26
-
27
- ## What counts as a ledger-worthy event
28
-
29
- Only an assertion that was actually **checked against an independent source** counts — not every
30
- statement made during the session. The check has to have been capable of coming back either way:
31
-
32
- - A confident claim, followed by a real verification step (a tool call, a live read, re-running
33
- something, checking a second source), whose result **confirmed** the claim.
34
- - A confident claim, followed by the same kind of check, whose result **contradicted** it —
35
- a **correction**.
36
- - A check that was attempted but couldn't produce a definitive answer (no access, an ambiguous result)
37
- — **unverifiable**. Distinct from never having been checked at all, which isn't ledger-worthy at all.
38
-
39
- Not ledger-worthy: a claim nobody checked, a preference or judgment call with no verifiable fact behind
40
- it, or a check whose outcome was never in doubt (confirming something already directly observed moments
41
- earlier is not a verification event).
42
-
43
- ## Workflow
44
-
45
- 1. **Scan the session for ledger-worthy events**, per the definition above. Look specifically for
46
- moments where a check contradicted an initial assertion — a count that was off, a file path that
47
- didn't exist, a "should be done" that direct inspection showed wasn't, a citation that pointed at the
48
- wrong content. These are usually more memorable than confirmations; do not let them get lost among
49
- routine, expected-to-pass checks.
50
-
51
- 2. **Stop here if nothing qualifies.** If the session had no real verification events — no claim was
52
- both asserted with confidence and independently checked — say so plainly and do not proceed. A quiet,
53
- uneventful session with nothing to report is a valid outcome, not a gap to paper over.
54
-
55
- 3. **Classify each event:**
56
-
57
- | Field | What it captures |
58
- | --- | --- |
59
- | Claim | The assertion as originally stated, in the speaker's own words at the time — not softened in hindsight. |
60
- | Verification method | What was actually done to check it (a specific command, a specific file read, a specific re-fetch) — not "verified," which asserts nothing checkable itself. |
61
- | Result | `confirmed` / `corrected` / `unverifiable`. |
62
- | Correction | For `corrected` only: what the check actually showed, and what changed as a result (a claim retracted, a decision reversed, a fix applied). |
63
-
64
- 4. **Present the extracted ledger for approval** before writing — the same approval gate
65
- `spell-document` uses, since this is also durable content leaving the conversation:
66
-
67
- ```text
68
- ## Verification Ledger Proposal — [session topic]
69
-
70
- | Claim | Verification method | Result | Correction |
71
- | --- | --- | --- | --- |
72
- | ... | ... | confirmed | — |
73
- | ... | ... | corrected | ... |
74
-
75
- Approve? (yes / edit / skip)
76
- ```
77
-
78
- 5. **Append, don't rewrite.** After approval, append a new `## YYYY-MM-DD — <session topic>` section
79
- with the approved table to `docs/verification-ledger.md`. Get the real date from the system rather
80
- than guessing. If the file doesn't exist yet, create it with a short header explaining its purpose
81
- and schema, then the first section — never insert a section anywhere but the end.
82
-
83
- ## Rules
84
-
85
- - Never fabricate a ledger-worthy event to fill a report — an empty result from step 2 is a complete,
86
- valid run of this spell.
87
- - Quote the claim as it was actually stated, not a cleaned-up paraphrase that makes the miss look
88
- smaller (or larger) than it was.
89
- - Do not editorialize about fault or blame in the ledger itself — the value is the calibration signal
90
- (how often checks confirm vs. correct), not a record of who was wrong.
91
- - Do not commit the changes — that is `spell-commit-work`'s job.
92
-
93
- ## Related
94
-
95
- - **Complements, does not replace:** `spell-close-session`'s narrative record and sanitized lessons
96
- learned. Run this spell separately when a session had real verification events worth a structured
97
- record, not as a mandatory step of every close.
98
- - `spell-document` — the general-purpose formalization spell this one borrows its
99
- extract-then-approve-then-write shape from, narrowed to one specific, structured record type.
100
-
101
- > **Tip:** Run `spell-close-session` afterward to log the session, or `spell-commit-work` to commit the
102
- > ledger update.
9
+ This prompt is the Arcane `spell-verification-ledger` spell. Read [`.arcane/spells/spell-verification-ledger.md`](../../.arcane/spells/spell-verification-ledger.md) and follow it as the complete workflow.