arcane-cli 0.39.0 → 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 +1 -1
  3. package/dist/assets/.agents/skills/spell-adopt-docs/SKILL.md +1 -1
  4. package/dist/assets/.agents/skills/spell-arcane-version/SKILL.md +1 -1
  5. package/dist/assets/.agents/skills/spell-architect/SKILL.md +1 -1
  6. package/dist/assets/.agents/skills/spell-brainstorm/SKILL.md +1 -1
  7. package/dist/assets/.agents/skills/spell-bug/SKILL.md +1 -1
  8. package/dist/assets/.agents/skills/spell-bump/SKILL.md +1 -1
  9. package/dist/assets/.agents/skills/spell-check-drift/SKILL.md +1 -1
  10. package/dist/assets/.agents/skills/spell-close-session/SKILL.md +1 -1
  11. package/dist/assets/.agents/skills/spell-commit-work/SKILL.md +1 -1
  12. package/dist/assets/.agents/skills/spell-compliance/SKILL.md +1 -1
  13. package/dist/assets/.agents/skills/spell-create-pull-request/SKILL.md +1 -1
  14. package/dist/assets/.agents/skills/spell-document/SKILL.md +1 -1
  15. package/dist/assets/.agents/skills/spell-dotnet-expert/SKILL.md +1 -1
  16. package/dist/assets/.agents/skills/spell-eas-store-deploy/SKILL.md +1 -1
  17. package/dist/assets/.agents/skills/spell-enchant/SKILL.md +1 -1
  18. package/dist/assets/.agents/skills/spell-explain-concept/SKILL.md +1 -1
  19. package/dist/assets/.agents/skills/spell-feedback/SKILL.md +1 -1
  20. package/dist/assets/.agents/skills/spell-full-cycle/SKILL.md +1 -1
  21. package/dist/assets/.agents/skills/spell-generate-bot-icons/SKILL.md +1 -1
  22. package/dist/assets/.agents/skills/spell-implement/SKILL.md +1 -1
  23. package/dist/assets/.agents/skills/spell-make-discoverable/SKILL.md +1 -1
  24. package/dist/assets/.agents/skills/spell-manifest/SKILL.md +1 -1
  25. package/dist/assets/.agents/skills/spell-open-session/SKILL.md +1 -1
  26. package/dist/assets/.agents/skills/spell-plan/SKILL.md +1 -1
  27. package/dist/assets/.agents/skills/spell-present-arcane/SKILL.md +1 -1
  28. package/dist/assets/.agents/skills/spell-product-review/SKILL.md +1 -1
  29. package/dist/assets/.agents/skills/spell-review/SKILL.md +1 -1
  30. package/dist/assets/.agents/skills/spell-review-batch/SKILL.md +1 -1
  31. package/dist/assets/.agents/skills/spell-save-idea/SKILL.md +1 -1
  32. package/dist/assets/.agents/skills/spell-scope/SKILL.md +1 -1
  33. package/dist/assets/.agents/skills/spell-scry/SKILL.md +1 -1
  34. package/dist/assets/.agents/skills/spell-security-review/SKILL.md +1 -1
  35. package/dist/assets/.agents/skills/spell-ship/SKILL.md +1 -1
  36. package/dist/assets/.agents/skills/spell-status/SKILL.md +1 -1
  37. package/dist/assets/.agents/skills/spell-suggest-feature/SKILL.md +1 -1
  38. package/dist/assets/.agents/skills/spell-summon-venture/SKILL.md +1 -1
  39. package/dist/assets/.agents/skills/spell-sync-pull-request/SKILL.md +1 -1
  40. package/dist/assets/.agents/skills/spell-test/SKILL.md +1 -1
  41. package/dist/assets/.agents/skills/spell-todo/SKILL.md +1 -1
  42. package/dist/assets/.agents/skills/spell-verification-ledger/SKILL.md +1 -1
  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 +5 -3
  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 +143 -39
  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
@@ -6,248 +6,4 @@ argument-hint: "Feature description, optional work item ID, target repo (e.g., '
6
6
  agent: agent
7
7
  ---
8
8
 
9
- ## Executive Summary
10
-
11
- - This prompt chains all Spell Loop phases into a single autonomous pipeline.
12
- - Includes optional PRD enchantment (spell-enchant) between Plan and Architect for quality enhancement.
13
- - Only one human touchpoint: approving the PR at ship time.
14
- - Delegates each phase to the appropriate specialized agent role (research, architecture, build, QA, marketing review) — **in practice, a single agent switches hats per phase** unless a real per-tool subagent registry is configured (e.g. `.claude/agents/` for Claude Code); this framework ships no such registry by default, so "delegates" names the intended role model, not a literal handoff between separately running agents (2026-07-22 dogfooding finding). Resolve concrete personas from [agent-policies](../../.arcane/governance/agent-policies.md) / [naming-conventions](../../.arcane/governance/naming-conventions.md); if neither is present, proceed with role names directly.
15
- - If any phase fails, the pipeline halts and reports the blocker — no silent failures.
16
-
17
- ---
18
-
19
- Run the complete Spell Loop end-to-end for the described feature.
20
-
21
- Use these files for context:
22
-
23
- - [governance/development-methodology.md](../../.arcane/governance/development-methodology.md) — Spell Loop methodology and stories.json format
24
- - [governance/testing-standards.md](../../.arcane/governance/testing-standards.md) — Testing frameworks and coverage requirements
25
- - [governance/cicd-standards.md](../../.arcane/governance/cicd-standards.md) — CI/CD pipeline and deployment gates
26
- - [governance/git-conventions.md](../../.arcane/governance/git-conventions.md) — Branch discipline and commit format
27
- - [project.md](../../project.md) — Project goals and priorities
28
- - [DECISIONS.md](../../DECISIONS.md) — Existing ADRs to respect
29
- - [governance/product-excellence-standards.md](../../.arcane/governance/product-excellence-standards.md) — PRD Quality Scorecard for enchantment
30
-
31
- ---
32
-
33
- ## Required Inputs
34
-
35
- Before proceeding, confirm you have all three:
36
-
37
- 1. **Feature description** — what to build and why. Accepted formats:
38
- - Inline text in the prompt
39
- - Path to a PRD file (e.g., `PRD.md`)
40
- - **Tracker work item ID** (e.g., `#507`) in `external` mode — fetch it using the detected provider's CLI/API. For an ADO provider, fetch via `az boards work-item show --id {id} --org https://dev.azure.com/{ADO_ORG} --output json` and extract `System.Title`, `System.Description`, and `Microsoft.VSTS.Common.AcceptanceCriteria`; for other providers, fetch the title, description, and acceptance criteria via that provider's equivalent. If the work item has child items, fetch those too. `{ADO_ORG}` resolves from `.arcane.json` or the PRD/feature frontmatter; ask if unset.
41
- 2. **Tracking configuration** — required before execution:
42
- <!-- fragment:tracking-mode-declaration:start -->
43
- - `tracking_mode: internal | external`
44
- - `external_provider: ado | github | jira | other`
45
- <!-- fragment:tracking-mode-declaration:end -->
46
- - (`external_provider` is required when `tracking_mode=external`)
47
- - If omitted and an ADO context is already present, default to `external` + `ado` (backward compatibility).
48
- - If `tracking_mode=external` and `external_provider=ado`, an `adoWorkItemId` is required for commit/PR linkage.
49
- - If `tracking_mode=external` and `external_provider=github`, a `githubIssueId` is used for commit/PR linkage when one exists (optional, unlike ADO).
50
- - In ADO mode, resolve available work item types and apply process-template-aware fallback mapping from `governance/development-methodology.md` before creating/linking hierarchy items. In GitHub mode, use that same doc's GitHub Issues Conventions (labels, not configurable types).
51
- 3. **Target repo** — which repository and org (e.g., `{REPO_ORG}/{REPO_NAME}`). `{REPO_ORG}`/`{REPO_NAME}` resolve from `.arcane.json` or the PRD/feature frontmatter; if not provided, infer from context or ask.
52
-
53
- If `external_provider=jira` or `external_provider=other`, record TODO notes for provider-specific automation and continue with internal artifact flow unless explicit provider commands are supplied.
54
-
55
- ---
56
-
57
- ## Pipeline Phases
58
-
59
- ### Phase 1 — Plan
60
-
61
- Execute the `spell-plan` workflow:
62
-
63
- 1. Gather requirements from the feature description.
64
- 2. Check existing ADRs and business docs for constraints.
65
- 3. **If the feature description hands in a pre-diagnosed root cause** (a specific file/line/mechanism already named as the cause of a bug), re-verify it against current source before accepting it — a handed-in diagnosis can be stale (2026-07-22 dogfooding finding: a filed root-cause lead was already fixed and the real causes were elsewhere). Do not carry a stale diagnosis into the PRD or stories unexamined.
66
- 4. Produce `PRD.md` with requirements, acceptance criteria, constraints, and tracking configuration (`tracking_mode`, optional `external_provider`, optional `adoWorkItemId`/`githubIssueId`).
67
- 5. **Gate:** Validate every requirement has at least one testable acceptance criterion. If scope is too large for one sprint, halt and recommend splitting.
68
-
69
- Store the PRD in the working directory. Proceed automatically to Phase 1.5.
70
-
71
- ### Phase 1.5 — Enchant (Optional)
72
-
73
- Run a quick quality audit of the PRD against the scorecard in `governance/product-excellence-standards.md`. Score each dimension as Bronze / Silver / Gold.
74
-
75
- **Decision logic:**
76
- - If the user specified `--enchant` or explicitly requested enchantment: run `spell-enchant` workflow fully.
77
- - If any dimension scores Bronze: recommend enchantment, but proceed without it if the user hasn't requested it.
78
- - If all dimensions score Silver or above: skip enchantment and proceed to Phase 2.
79
-
80
- When running enchantment:
81
- 1. Conduct the research role's analysis (competitive analysis, UX patterns, accessibility audit).
82
- 2. Conduct the marketing-review role's pass (first impressions, brand alignment, onboarding).
83
- 3. Generate enhancement suggestions (Must-Add / Should-Add / Could-Add / Won't-Add).
84
- 4. Check scope budget — if enchanted scope exceeds 2× original, flag prominently.
85
- 5. Produce the enhanced PRD, preserving all original requirements and tagging additions with `[ENCHANTED]`.
86
- 6. Replace the working PRD with the enchanted version.
87
-
88
- **Gate:** If scope budget exceeds 2× and the user hasn't pre-approved, halt and ask for confirmation before proceeding.
89
-
90
- Proceed automatically to Phase 2.
91
-
92
- ### Phase 2 — Architect
93
-
94
- Execute the `spell-architect` workflow:
95
-
96
- 1. Read the PRD from Phase 1.
97
- 2. Make architecture decisions (framework, patterns, component structure).
98
- 3. Produce `architecture.md` with decisions, component diagram, and testing strategy.
99
- 4. Produce `stories.json` with the full schema:
100
- - Top-level: `feature`, `branchName`, `assignedAgent`, `trackingMode`, optional `externalProvider`, optional `adoWorkItemId`
101
- - Per story: `id`, `title`, `description`, `acceptanceCriteria`, `priority`, `passes: false`, `assignedTo`, `testEvidence: null`
102
- 5. **Gate:** Self-validate `stories.json` schema completeness. If any required field is missing, regenerate before proceeding. Every PRD requirement must map to at least one story. No story may depend on an unresolved Open Question.
103
-
104
- Proceed automatically to Phase 3.
105
-
106
- ### Phase 3 — Implement (Autonomous Loop)
107
-
108
- Execute the `spell-implement` workflow:
109
-
110
- 0. **Sync workspace** — before any code changes, ensure the workspace is current:
111
- ```bash
112
- git fetch --prune origin
113
- git checkout main && git pull --ff-only
114
- ```
115
- If `pull --ff-only` fails, halt and report — manual rebase is needed.
116
-
117
- **In a linked worktree, do not run the `checkout main` line** (ARC-028 R1/R8). It fails with `fatal: 'main' is already used by worktree at '<path>'` when another working tree holds `main`, and the halt instruction above only covers a `pull` failure — so an agent that runs it there has no branch to take. This matters especially here: the R4 rule below sends genuinely disjoint epics into parallel worktrees, so this pipeline reaches that state by design. Sync the remote-tracking ref instead:
118
- ```bash
119
- git fetch --prune origin # origin/main is now current
120
- ```
121
- and branch from `origin/main` in step 1. Check which primitive you are in with `git rev-parse --path-format=absolute --git-common-dir` vs `--git-dir` — equal means primary checkout. `--path-format=absolute` is required, or every primary checkout looks like a worktree from any subdirectory.
122
- 1. Create the topic branch from `stories.json.branchName` (format: `{agent}/type/description`).
123
- 2. Loop:
124
- a. Pick the next story where `passes: false`, ordered by priority.
125
- b. Implement the story — minimum code to satisfy acceptance criteria.
126
- b1. **DB migration guard.** If `architecture.md`/the PRD did not name a database migration as part of this feature's scope, but implementing this story is about to produce one anyway, **halt and flag it** — do not write the migration file silently (2026-07-22 dogfooding finding: this is a scoped hard guard, not a blanket ban). If a migration genuinely is in scope, **re-derive its sequence number from a fresh `git pull --ff-only` of the target branch immediately before writing the file** — not once at branch-creation time in step 0 — so a concurrent epic that landed a migration in the meantime is reflected. This is the concrete fix for a real incident: two epics run in parallel worktrees each independently claimed the same migration sequence number, invisible until human merge review.
127
- c. Write tests per `governance/testing-standards.md`.
128
- d. Run tests. If passing:
129
- - In `external/ado` mode, commit with `#{adoWorkItemId} type(scope): description` and agent attribution trailers (`Agent`, `Model`, `Model-Source`, `Provider`).
130
- - In `internal` mode, commit with standard Conventional Commits format (no ADO prefix) plus attribution trailers.
131
- e. Update `stories.json`: set `passes: true`, fill `testEvidence`.
132
- f. Append learnings to `progress.txt`.
133
- g. Repeat until all stories pass or a story fails 3 consecutive attempts.
134
- 3. **Gate:** If any story is stuck after 3 attempts, halt the pipeline and report the blocker with error details. Do not proceed to Phase 4 with failing stories.
135
-
136
- Proceed automatically to Phase 4.
137
-
138
- ### Phase 4 — Test
139
-
140
- Execute the `spell-test` workflow:
141
-
142
- 1. Run the full test suite (not just per-story — full regression).
143
- 2. Validate coverage: 80% line minimum, 95% critical path.
144
- 3. Map each acceptance criterion from the PRD to a specific passing test.
145
- 4. **If this run produced a database migration:** a fresh/empty test database is not sufficient evidence by itself — this is a real incident's root cause (a unique index conflicted with legitimate duplicate rows the target app allows by design; every test passed against an empty DB, then broke the consumer's actual deploy). If the execution sandbox has access to a snapshot or copy of the target environment's real data, replay the migration against it and report the result. **If it does not** (the common case for an isolated sandbox), do not silently proceed as if this were validated — name the gap explicitly in the ship report's disclosure (see below) so a human reviews the migration against real data before it ships.
146
- 5. Update `stories.json` with consolidated test evidence.
147
- 6. **Gate:** If coverage is below threshold or any acceptance criterion lacks a test, loop back to Phase 3 to add missing tests. Maximum 2 coverage-fix loops before halting.
148
-
149
- Proceed automatically to Phase 5.
150
-
151
- ### Phase 5 — Review (Adversarial)
152
-
153
- Execute the `spell-review` workflow:
154
-
155
- 1. Review the full diff (`git diff main...HEAD`).
156
- 2. Check architecture compliance against `architecture.md`.
157
- 3. Check for OWASP Top 10 security issues.
158
- 4. 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; never fabricate issues to hit one.
159
- 5. Classify each real finding: HIGH / MEDIUM / LOW.
160
- 6. **Gate:** If any HIGH severity finding exists, loop back to Phase 3 to fix it. MEDIUM and LOW findings are noted in the ship report but do not block. Maximum 2 review-fix loops before halting.
161
-
162
- Proceed automatically to Phase 6.
163
-
164
- ### Phase 6 — Ship
165
-
166
- Execute the `spell-ship` workflow:
167
-
168
- 1. Verify all prior phases passed (PRD, architecture, all stories, tests, review).
169
- 1a. **PR strategy: one branch, one PR, per invocation.** This is the default and it is not optional to
170
- restate per run — a 2026-07-22 dogfooding finding found this pattern had to be imposed by the
171
- operator each time because the spell never stated it. If a later invocation would touch files an
172
- earlier, still-open PR from a prior invocation already changed, do not open a second, conflicting PR
173
- — rebase this branch onto the earlier PR's branch (or wait for it to merge, per this spell's own
174
- multi-epic serialization default in the Rules section) before opening this one.
175
- 2. Run pre-deploy checklist:
176
- - No merge conflicts with target branch.
177
- - No secrets or credentials in the diff.
178
- - DECISIONS.md updated if new ADRs were created.
179
- - Documentation updated for user-facing changes.
180
- 3. Generate the ship report (phase status table, test evidence, review findings, recommendation).
181
- **Mandatory disclosure section:** explicitly list anything this run could not verify in its own
182
- execution sandbox — a real-data migration replay Phase 4 couldn't attempt, an external integration
183
- it couldn't reach, a manual step it couldn't perform — never omit this section just because nothing
184
- applies (state "Nothing withheld" in that case). Fold it into the consumer repo's own QA checklist
185
- so a human reviewer sees exactly what still needs a human look, not just what passed (2026-07-22
186
- dogfooding finding: honest disclosure of sandbox limits, not just of failures).
187
- 4. Create the PR:
188
- - `external/ado` mode: `az repos pr create --repository {repo} --source-branch {branch} --target-branch main --title "{feature}" --work-items {adoWorkItemId}`
189
- - `internal` mode (or provider TODO mode): create PR without `--work-items`.
190
- 5. **HUMAN GATE:** Present the ship report and PR link. Wait for explicit human approval bound to the exact PR ID and head SHA. This is separate from every earlier commit approval.
191
- 6. **AUTHORITY GATE:** Resolve loader-validated effective power and `exec_allowed`. Below Magus or missing/invalid authority must visibly downgrade to human completion; do not invoke merge/auto-complete. Interactive Magus+ requires the separate approval from step 5; autonomous Magus+ may self-merge within approved scope.
192
- 7. Only after both applicable gates pass: merge via the detected provider using the approved PR ID/head SHA and allowed merge strategy.
193
- 8. Pull merge to local, delete the topic branch.
194
-
195
- ---
196
-
197
- ## Error Handling
198
-
199
- - **Phase failure:** If any gate fails and exhausts its retry budget, halt immediately. Report which phase failed, what the error was, and what input is needed to unblock.
200
- - **Stuck story:** After 3 failed attempts on a single story, mark it in `stories.json` with the error and halt. Do not skip stories and continue — a failing story may indicate an architecture problem.
201
- - **Missing tooling:** If a required tool (test framework, SDK, CLI) is not installed, halt and report the prerequisite. Do not attempt to install system packages without confirmation.
202
-
203
- ---
204
-
205
- ## Progress Reporting
206
-
207
- After each phase completes, output a brief status line:
208
-
209
- ```
210
- [Phase 1/6 — Plan] COMPLETE — PRD.md generated (5 requirements, 8 acceptance criteria)
211
- [Phase 2/6 — Architect] COMPLETE — 4 stories in stories.json, branch: lafayette/feat/feature-name
212
- [Phase 3/6 — Implement] COMPLETE — 4/4 stories passing, 12 tests, 87% coverage
213
- [Phase 4/6 — Test] COMPLETE — full regression green, 87% line / 96% critical path
214
- [Phase 5/6 — Review] COMPLETE — 0 HIGH, 2 MEDIUM, 1 LOW findings
215
- [Phase 6/6 — Ship] AWAITING APPROVAL — PR #77 created, ship report below
216
- ```
217
-
218
- **Pipeline state diagram** — per the generated state diagrams convention (rule 8, ARC-036), built only
219
- from the phase status this section already tracks; skip entirely (the applicability guard) after Phase
220
- 1 alone, before any other phase has run — a single-state pipeline has nothing to show in relation to
221
- the rest. From Phase 2 onward, alongside the status line above:
222
-
223
- ```mermaid
224
- stateDiagram-v2
225
- [*] --> Plan
226
- Plan --> Architect
227
- Architect --> Implement
228
- Implement --> Test
229
- Test --> Review
230
- Review --> Ship
231
- Ship --> [*]
232
- Implement : Implement (current)
233
- ```
234
-
235
- Append ` (current)` to whichever phase's own name is the one that just completed or is in progress —
236
- exactly one phase carries it at a time, matching the status line's own `[Phase N/6 — Name]` value. Omit
237
- `Enchant` from the diagram entirely when Phase 1.5 was skipped (Decision logic above); insert it between
238
- `Plan` and `Architect` when it ran.
239
-
240
- ---
241
-
242
- ## Rules
243
-
244
- - **One human gate only.** Everything before Phase 6 step 5 is autonomous. Do not ask for intermediate approvals unless a gate fails.
245
- - **No scope creep.** Only build what the feature description specifies.
246
- - **Fail fast.** If a phase cannot succeed, halt immediately rather than producing garbage for downstream phases.
247
- - **Attribution required.** Every commit must carry `Agent`, `Model`, `Model-Source`, and `Provider` trailers per ADR-028/ADR-029, plus `Persona`/`Role` when a roster exists and one was assigned.
248
- - **Branch discipline.** All work on topic branches, never on main — see `.arcane/governance/git-conventions.md`'s Trunk-based development rule. (Corrected 2026-08-31, BC-14: previously cited "ADR-048," which does exist in the shipped `framework-decisions.md` reference but is actually about the Code-Versus-Docs Branch Policy's local-only-repo fallback, unrelated to this general rule — a topical miscitation, the same class BC-06 found and fixed elsewhere. `git-conventions.md` states this rule directly with no ADR/ARC number attached, so there is nothing to cite beyond the file itself.)
249
- - **Fresh context per story.** Do not carry assumptions between stories during Phase 3.
250
- - **Epic checkpointing.** When this spell is run as one epic in a multi-epic plan, recommend running `spell-commit-work` before starting the next epic.
251
- - **Multi-epic runs serialize by default (ARC-028 R4).** Before running two or more epics concurrently in separate worktrees, compare their footprints: the file and directory globs each will touch, plus any **shared sequence** — database migration numbers, generated indexes and manifests, lockfiles, fixture IDs, anything where correctness depends on what another epic picked. If the footprints overlap on either axis, run the epics **sequentially in one workspace**, or re-scope them to disjoint footprints first. State the comparison and the resulting decision in the run's opening report; "they seemed unrelated" is not a footprint comparison.
252
-
253
- This is a default derived from evidence, not caution for its own sake. A four-epic run with three executing in parallel isolated worktrees produced two epics independently claiming the same migration sequence number and two adding conflicting imports to the same file region — none of it visible until a human reached merge review. A three-epic re-run, strictly serialized in one workspace, produced zero collisions. Isolation prevents epics from *disturbing* each other; it does nothing to stop them *agreeing on the same answer* to a question neither knew the other was asking, and it delays the discovery until the most expensive moment. Serialization stays the default until re-derivation tooling exists (fresh-pull sequence re-derivation, shared numbering locks) — parallelism is available for genuinely disjoint footprints, and should be used there.
9
+ This prompt is the Arcane `spell-full-cycle` spell. Read [`.arcane/spells/spell-full-cycle.md`](../../.arcane/spells/spell-full-cycle.md) and follow it as the complete workflow.
@@ -6,80 +6,4 @@ argument-hint: Bot concept (e.g., "{AGENT_NAME} for ecommerce ops, powerful + mo
6
6
  agent: agent
7
7
  ---
8
8
 
9
- ## Executive Summary
10
-
11
- - This spell standardizes bot icon creation for Teams deployments.
12
- - It separates creative generation (image-capable agent) from deterministic packaging (local script).
13
- - Output is always Teams-ready: `color.png` (192x192) + `outline.png` (32x32 transparent, white glyph).
14
- - Use this **after** agent setup (the agent's identity/role is defined) and **before** packaging `manifest.json` in the Teams setup flow.
15
-
16
- ---
17
-
18
- Create a high-quality avatar concept for the bot, then prepare Teams-compliant icon files.
19
-
20
- ## Inputs
21
-
22
- - Bot role and personality (from user argument)
23
- - Brand direction (if none provided): clean, modern, readable at small sizes
24
-
25
- ## Rules
26
-
27
- - **Validate before processing.** After the source image is saved, confirm it exists and is **square** (equal width and height) before running the build script. If the file is missing, regenerate it; if it is non-square, regenerate or crop to a 1:1 ratio. Do **not** run the build step on a missing or non-square source — fail with a clear message (e.g. `source.png is 1024x768; Teams icons require a square source`).
28
- - Quick check: `python3 -c "from PIL import Image; w,h=Image.open('{TEMP_DIR}/source.png').size; print(w,h); assert w==h, 'source must be square'"` (or `file {TEMP_DIR}/source.png` to read the dimensions).
29
- - The image must contain no copyrighted logos, mascots, or trademarked characters.
30
-
31
- > **Placeholders.** `{TEMP_DIR}` resolves to a writable working directory — your OS temp dir (`os.tmpdir()` / `$TMPDIR` / `%TEMP%`) plus a `teams-app` subfolder, or a repo-local `.tmp/teams-app/`. `{REPO_ROOT}` is the consuming repository's root. Resolve from `.arcane.json` / your shell; ask if unset.
32
-
33
- ## Image Generation Requirements
34
-
35
- Generate one **source image** with these constraints:
36
-
37
- - Square PNG
38
- - Transparent background preferred
39
- - High resolution (1024x1024 recommended)
40
- - Single strong subject, centered
41
- - Minimal detail that survives downscaling
42
- - No copyrighted logos, mascots, or trademarked characters
43
-
44
- Save as:
45
-
46
- - `{TEMP_DIR}/source.png`
47
-
48
- ## Post-Process (Required)
49
-
50
- Run (the script path resolves relative to the repo root):
51
-
52
- ```bash
53
- python3 {REPO_ROOT}/playbooks/scripts/build-teams-icons.py \
54
- --input {TEMP_DIR}/source.png \
55
- --output {TEMP_DIR}
56
- ```
57
-
58
- If `playbooks/scripts/build-teams-icons.py` is **missing** under the repo root, do not improvise silently — tell the user the script is expected at `{REPO_ROOT}/playbooks/scripts/build-teams-icons.py` and either restore it or fall back to producing the two sizes manually (e.g. an equivalent PIL/ImageMagick resize: 192x192 `color.png`, and a 32x32 transparent `outline.png` with a white glyph).
59
-
60
- This creates:
61
-
62
- - `{TEMP_DIR}/color.png` (192x192)
63
- - `{TEMP_DIR}/outline.png` (32x32, transparent background, white glyph)
64
-
65
- ## Validation
66
-
67
- Run:
68
-
69
- ```bash
70
- file {TEMP_DIR}/color.png
71
- file {TEMP_DIR}/outline.png
72
- ```
73
-
74
- Expected:
75
-
76
- - `color.png`: PNG image data, 192 x 192
77
- - `outline.png`: PNG image data, 32 x 32
78
-
79
- ## Final Output
80
-
81
- Report:
82
-
83
- - Visual style chosen
84
- - Paths to generated files
85
- - Any readability concerns at 32x32 size
9
+ This prompt is the Arcane `spell-generate-bot-icons` spell. Read [`.arcane/spells/spell-generate-bot-icons.md`](../../.arcane/spells/spell-generate-bot-icons.md) and follow it as the complete workflow.
@@ -6,104 +6,4 @@ argument-hint: Path to stories.json or paste story context (optional - uses curr
6
6
  agent: agent
7
7
  ---
8
8
 
9
- ## Executive Summary
10
-
11
- - This is the core autonomous loop of the Spell Loop methodology.
12
- - Each iteration: pick a story → implement → run tests → commit if passing → update stories.json → loop.
13
- - Uses fresh context per iteration — only stories.json, progress.txt, and git history carry forward.
14
- - See [[.arcane/governance/development-methodology|Development Methodology]] for full Spell Loop reference.
15
-
16
- ---
17
-
18
- Run the autonomous implementation loop for the current feature.
19
-
20
- Use these files for context:
21
-
22
- - [governance/development-methodology.md](../../.arcane/governance/development-methodology.md) — Spell Loop methodology
23
- - [governance/testing-standards.md](../../.arcane/governance/testing-standards.md) — Testing frameworks and coverage requirements
24
- - The feature's `architecture.md` — for tech decisions and patterns
25
- - The feature's `stories.json` — for the work breakdown
26
- - The feature's `progress.txt` (in `features/{slug}/`, if present) — accumulated learnings from prior iterations; read it before each iteration and append new learnings as the loop proceeds
27
-
28
- Workflow (loop until all stories pass):
29
-
30
- 0. **Sync workspace** — before any code changes, ensure the workspace is current:
31
- ```bash
32
- git fetch --prune origin
33
- git checkout main && git pull --ff-only
34
- ```
35
- If `pull --ff-only` fails, halt and report — manual rebase is needed.
36
-
37
- **In a linked worktree, do not run the `checkout main` line** (ARC-028 R1/R8). It fails with `fatal: 'main' is already used by worktree at '<path>'` when another working tree holds `main`, and the halt instruction above only covers a `pull` failure — so an agent that runs it there has no branch to take. Sync the remote-tracking ref instead, which is all this step actually needs:
38
- ```bash
39
- git fetch --prune origin # origin/main is now current
40
- git rebase origin/main # or branch from origin/main directly in step 1
41
- ```
42
- Check with `git rev-parse --path-format=absolute --git-common-dir` vs `--git-dir`: equal means primary checkout, different means linked worktree. `--path-format=absolute` is required — without it the two differ from any subdirectory and every primary checkout looks like a worktree.
43
-
44
- 1. **Load stories.json** — locate the feature folder from the current branch:
45
- ```bash
46
- # Derive feature folder from branch name (works for lafayette/feat/541-phase-2a or lafayette/feat/phase-2a)
47
- FEATURE_FOLDER="features/$(git symbolic-ref --short HEAD | sed 's|.*/feat/||')"
48
- ```
49
- Load `$FEATURE_FOLDER/stories.json` and `$FEATURE_FOLDER/architecture.md`. If the branch name doesn't follow the `feat/{slug}` or `feat/{id}-{slug}` pattern, look for the most recently modified `features/*/stories.json` or ask the operator for the path.
50
-
51
- Find the next story where `"passes": false`, ordered by priority.
52
-
53
- 2. **Read context** — load only what this story needs:
54
- - The story's description and acceptance criteria from stories.json
55
- - Relevant sections of architecture.md
56
- - Latest entries in progress.txt (if exists) for learnings from previous iterations
57
- - Files that will be modified (check git status)
58
-
59
- 3. **Implement the story**:
60
- - Follow the architecture decisions — do not deviate without flagging.
61
- - Write the minimum code to satisfy acceptance criteria.
62
- - Follow project coding conventions and patterns from existing code.
63
- - Include tests per governance/testing-standards.md.
64
-
65
- 4. **Run tests**:
66
- - Run the test suite for the affected area.
67
- - All existing tests must still pass (no regressions).
68
- - New tests must pass.
69
- - Check coverage against thresholds (80% line, 95% critical path).
70
-
71
- 5. **Evaluate results**:
72
- - **Tests pass:** proceed to commit.
73
- - **Tests fail:** debug and fix. If stuck after 3 attempts, mark the story with the error in stories.json and move to the next story.
74
-
75
- 6. **Commit the story**:
76
- - Use Conventional Commits format (see spell-commit-work).
77
- - One commit per story (squash if needed).
78
- - Include the story ID in the commit body.
79
-
80
- 7. **Update stories.json**:
81
- - Set `"passes": true` for the completed story.
82
- - Set `"testEvidence"` with coverage % and test count.
83
-
84
- 8. **Append to `$FEATURE_FOLDER/progress.txt`**:
85
- ```
86
- ## Iteration N — [STORY-ID] — [timestamp]
87
- ### What was done
88
- - [summary of changes]
89
- ### What was learned
90
- - [patterns, gotchas, conventions discovered]
91
- ### What to watch for
92
- - [warnings for future iterations]
93
- ```
94
- File lives in the feature folder, not the repo root.
95
-
96
- 9. **Loop** — go to step 1 and pick the next story.
97
-
98
- 10. **Completion** — when all stories have `"passes": true`:
99
- - Summarize what was built.
100
- - Report total test count and coverage.
101
- - Recommend running `spell-review` for adversarial review.
102
-
103
- Rules:
104
- - **Fresh context:** do not carry assumptions from previous stories. Re-read what you need.
105
- - **No scope creep:** only implement what the story specifies.
106
- - **Test first when possible:** write the test, see it fail, then implement.
107
- - **Commit atomically:** one story = one commit.
108
- - **Never skip tests:** if there's no test framework set up, set it up as the first story.
109
- - **Stuck threshold:** if a story fails 3 consecutive attempts, mark it and move on. Human intervention needed.
9
+ This prompt is the Arcane `spell-implement` spell. Read [`.arcane/spells/spell-implement.md`](../../.arcane/spells/spell-implement.md) and follow it as the complete workflow.