arcane-cli 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +253 -0
- package/dist/assets/.arcane/agents/agent-policies-template.md +414 -0
- package/dist/assets/.arcane/governance/agent-approved-paths.md +60 -0
- package/dist/assets/.arcane/governance/agent-policies.md +414 -0
- package/dist/assets/.arcane/governance/agent-work-queue-model.md +61 -0
- package/dist/assets/.arcane/governance/authentication-strategy.md +220 -0
- package/dist/assets/.arcane/governance/cicd-standards.md +227 -0
- package/dist/assets/.arcane/governance/decision-documentation-standard.md +335 -0
- package/dist/assets/.arcane/governance/development-methodology.md +384 -0
- package/dist/assets/.arcane/governance/git-conventions.md +759 -0
- package/dist/assets/.arcane/governance/hardening-checklist.md +117 -0
- package/dist/assets/.arcane/governance/naming-conventions.md +142 -0
- package/dist/assets/.arcane/governance/new-business-setup.md +182 -0
- package/dist/assets/.arcane/governance/poc-management-pattern.md +190 -0
- package/dist/assets/.arcane/governance/portable-bootstrap.md +101 -0
- package/dist/assets/.arcane/governance/product-excellence-standards.md +211 -0
- package/dist/assets/.arcane/governance/rca-process-standard.md +157 -0
- package/dist/assets/.arcane/governance/spell-authoring-standards.md +129 -0
- package/dist/assets/.arcane/governance/testing-standards.md +158 -0
- package/dist/assets/.arcane/governance/threat-model.md +104 -0
- package/dist/assets/.arcane/governance/universal-agent-rules.md +108 -0
- package/dist/assets/.arcane/image-prompts/adelaide-image-prompt.md +140 -0
- package/dist/assets/.arcane/image-prompts/alexander-image-prompt.md +138 -0
- package/dist/assets/.arcane/image-prompts/bess-image-prompt.md +139 -0
- package/dist/assets/.arcane/image-prompts/circe-image-prompt.md +143 -0
- package/dist/assets/.arcane/image-prompts/custodio-image-prompt.md +140 -0
- package/dist/assets/.arcane/image-prompts/iris-image-prompt.md +139 -0
- package/dist/assets/.arcane/image-prompts/kellar-image-prompt.md +141 -0
- package/dist/assets/.arcane/image-prompts/lafayette-image-prompt.md +140 -0
- package/dist/assets/.arcane/image-prompts/lince-image-prompt.md +142 -0
- package/dist/assets/.arcane/image-prompts/mercurio-image-prompt.md +140 -0
- package/dist/assets/.arcane/image-prompts/merlin-image-prompt.md +139 -0
- package/dist/assets/.arcane/image-prompts/prospero-image-prompt.md +141 -0
- package/dist/assets/.arcane/templates/venture-template/overview.md +66 -0
- package/dist/assets/.claude/commands/spell-address-review.md +9 -0
- package/dist/assets/.claude/commands/spell-arcane-version.md +9 -0
- package/dist/assets/.claude/commands/spell-architect.md +9 -0
- package/dist/assets/.claude/commands/spell-bootstrap-business.md +9 -0
- package/dist/assets/.claude/commands/spell-brainstorm.md +9 -0
- package/dist/assets/.claude/commands/spell-bug.md +9 -0
- package/dist/assets/.claude/commands/spell-bump.md +9 -0
- package/dist/assets/.claude/commands/spell-check-drift.md +9 -0
- package/dist/assets/.claude/commands/spell-close-session.md +9 -0
- package/dist/assets/.claude/commands/spell-commit-work.md +9 -0
- package/dist/assets/.claude/commands/spell-create-pull-request.md +9 -0
- package/dist/assets/.claude/commands/spell-document.md +9 -0
- package/dist/assets/.claude/commands/spell-dotnet-expert.md +9 -0
- package/dist/assets/.claude/commands/spell-eas-ios-deploy.md +9 -0
- package/dist/assets/.claude/commands/spell-enchant.md +9 -0
- package/dist/assets/.claude/commands/spell-explain-concept.md +9 -0
- package/dist/assets/.claude/commands/spell-feedback.md +9 -0
- package/dist/assets/.claude/commands/spell-full-cycle.md +9 -0
- package/dist/assets/.claude/commands/spell-generate-bot-icons.md +9 -0
- package/dist/assets/.claude/commands/spell-implement.md +9 -0
- package/dist/assets/.claude/commands/spell-open-session.md +9 -0
- package/dist/assets/.claude/commands/spell-plan.md +9 -0
- package/dist/assets/.claude/commands/spell-present-arcane.md +9 -0
- package/dist/assets/.claude/commands/spell-product-review.md +9 -0
- package/dist/assets/.claude/commands/spell-review-batch.md +9 -0
- package/dist/assets/.claude/commands/spell-review.md +9 -0
- package/dist/assets/.claude/commands/spell-save-idea.md +9 -0
- package/dist/assets/.claude/commands/spell-scope.md +9 -0
- package/dist/assets/.claude/commands/spell-security-review.md +9 -0
- package/dist/assets/.claude/commands/spell-ship.md +9 -0
- package/dist/assets/.claude/commands/spell-status.md +9 -0
- package/dist/assets/.claude/commands/spell-suggest-feature.md +9 -0
- package/dist/assets/.claude/commands/spell-test.md +9 -0
- package/dist/assets/.claude/commands/spell-todo.md +9 -0
- package/dist/assets/.github/agents/adelaide.agent.md +44 -0
- package/dist/assets/.github/agents/alexander.agent.md +43 -0
- package/dist/assets/.github/agents/bess.agent.md +42 -0
- package/dist/assets/.github/agents/circe.agent.md +43 -0
- package/dist/assets/.github/agents/custodio.agent.md +44 -0
- package/dist/assets/.github/agents/iris.agent.md +43 -0
- package/dist/assets/.github/agents/kellar.agent.md +43 -0
- package/dist/assets/.github/agents/lafayette.agent.md +42 -0
- package/dist/assets/.github/agents/lince.agent.md +43 -0
- package/dist/assets/.github/agents/mercurio.agent.md +43 -0
- package/dist/assets/.github/agents/merlin.agent.md +44 -0
- package/dist/assets/.github/agents/prospero.agent.md +43 -0
- package/dist/assets/.github/instructions/agent-output.instructions.md +48 -0
- package/dist/assets/.github/prompts/spell-address-review.prompt.md +114 -0
- package/dist/assets/.github/prompts/spell-arcane-version.prompt.md +82 -0
- package/dist/assets/.github/prompts/spell-architect.prompt.md +116 -0
- package/dist/assets/.github/prompts/spell-bootstrap-business.prompt.md +73 -0
- package/dist/assets/.github/prompts/spell-brainstorm.prompt.md +124 -0
- package/dist/assets/.github/prompts/spell-bug.prompt.md +109 -0
- package/dist/assets/.github/prompts/spell-bump.prompt.md +73 -0
- package/dist/assets/.github/prompts/spell-check-drift.prompt.md +97 -0
- package/dist/assets/.github/prompts/spell-close-session.prompt.md +189 -0
- package/dist/assets/.github/prompts/spell-commit-work.prompt.md +211 -0
- package/dist/assets/.github/prompts/spell-create-pull-request.prompt.md +170 -0
- package/dist/assets/.github/prompts/spell-document.prompt.md +83 -0
- package/dist/assets/.github/prompts/spell-dotnet-expert.prompt.md +117 -0
- package/dist/assets/.github/prompts/spell-eas-ios-deploy.prompt.md +183 -0
- package/dist/assets/.github/prompts/spell-enchant.prompt.md +385 -0
- package/dist/assets/.github/prompts/spell-explain-concept.prompt.md +69 -0
- package/dist/assets/.github/prompts/spell-feedback.prompt.md +113 -0
- package/dist/assets/.github/prompts/spell-full-cycle.prompt.md +201 -0
- package/dist/assets/.github/prompts/spell-generate-bot-icons.prompt.md +84 -0
- package/dist/assets/.github/prompts/spell-implement.prompt.md +101 -0
- package/dist/assets/.github/prompts/spell-open-session.prompt.md +116 -0
- package/dist/assets/.github/prompts/spell-plan.prompt.md +145 -0
- package/dist/assets/.github/prompts/spell-present-arcane.prompt.md +188 -0
- package/dist/assets/.github/prompts/spell-product-review.prompt.md +97 -0
- package/dist/assets/.github/prompts/spell-review-batch.prompt.md +94 -0
- package/dist/assets/.github/prompts/spell-review.prompt.md +131 -0
- package/dist/assets/.github/prompts/spell-save-idea.prompt.md +83 -0
- package/dist/assets/.github/prompts/spell-scope.prompt.md +263 -0
- package/dist/assets/.github/prompts/spell-security-review.prompt.md +129 -0
- package/dist/assets/.github/prompts/spell-ship.prompt.md +104 -0
- package/dist/assets/.github/prompts/spell-status.prompt.md +85 -0
- package/dist/assets/.github/prompts/spell-suggest-feature.prompt.md +110 -0
- package/dist/assets/.github/prompts/spell-test.prompt.md +87 -0
- package/dist/assets/.github/prompts/spell-todo.prompt.md +126 -0
- package/dist/assets/DECISIONS.md +19 -0
- package/dist/assets/TODO.md +7 -0
- package/dist/assets/agents/architecture-lead.yaml +61 -0
- package/dist/assets/agents/collaborator.yaml +59 -0
- package/dist/assets/agents/devops.yaml +60 -0
- package/dist/assets/agents/frontend-dev.yaml +60 -0
- package/dist/assets/agents/fullstack-dev.yaml +59 -0
- package/dist/assets/agents/marketing-strategist.yaml +60 -0
- package/dist/assets/agents/mobile-dev.yaml +59 -0
- package/dist/assets/agents/operations-comms.yaml +58 -0
- package/dist/assets/agents/orchestrator.yaml +60 -0
- package/dist/assets/agents/qa-lead.yaml +60 -0
- package/dist/assets/agents/research-analyst.yaml +59 -0
- package/dist/assets/agents/security-ops.yaml +61 -0
- package/dist/assets/ai-context/system-prompt-context.md +32 -0
- package/dist/assets/journal/.gitkeep +0 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +2313 -0
- package/dist/index.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Spell — Address Review
|
|
3
|
+
description: Respond to code-review feedback on a pull request — fetch comment threads, triage each, implement fixes or reply with rationale, and resolve every thread.
|
|
4
|
+
argument-hint: --pr <number> (required) [--fix-all] — the PR to address; --fix-all treats all suggestions/nitpicks as fix-now
|
|
5
|
+
agent: agent
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Executive Summary
|
|
9
|
+
|
|
10
|
+
- This spell handles inbound code-review feedback: read comments, act on them, and resolve the threads.
|
|
11
|
+
- Each comment is triaged — must-fix / suggestion / question / nitpick — and given a disposition.
|
|
12
|
+
- Must-fix items are implemented, committed, and pushed; others are implemented or answered with rationale.
|
|
13
|
+
- Every thread is resolved at the end (many providers require all threads resolved before merge).
|
|
14
|
+
- This is the author-side counterpart to `spell-review` (the reviewer side). Provider-agnostic.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
Respond to review feedback for the specified pull request.
|
|
19
|
+
|
|
20
|
+
Context to consult:
|
|
21
|
+
|
|
22
|
+
- `.arcane/governance/git-conventions.md` — commit format, agent attribution trailers, PR policy, and the interactive-session commit gate.
|
|
23
|
+
- `.arcane/governance/development-methodology.md` — workflow phases.
|
|
24
|
+
|
|
25
|
+
Related spells:
|
|
26
|
+
|
|
27
|
+
- `spell-review` — the reviewer side. If review was run here, its findings carry stable IDs (`R1`, `R2`, …); reference those IDs when replying so each thread maps to the original finding.
|
|
28
|
+
- `spell-create-pull-request` — opens the PR this spell responds to. Run it first if no PR exists yet.
|
|
29
|
+
|
|
30
|
+
## Arguments
|
|
31
|
+
|
|
32
|
+
- `--pr <number>` — **required.** The PR to address. If omitted, check the current branch for an associated PR or ask the user.
|
|
33
|
+
- `--fix-all` — optional. Treat all suggestions and nitpicks as fix-now (no deferrals).
|
|
34
|
+
|
|
35
|
+
## Step 0 — Setup
|
|
36
|
+
|
|
37
|
+
1. **Resolve the PR.** If `--pr` is given, use it. If omitted, look up the PR for the current branch (`gh pr view --json number` / `az repos pr list --source-branch <branch>`). If still none, **stop** and ask the user for the PR number — do not guess.
|
|
38
|
+
2. **Working tree must be clean.** Run `git status`. If dirty, **stop** and ask the user to commit or stash first — never stash silently, since uncommitted work can get tangled into the review-fix commits below.
|
|
39
|
+
3. **Detect the provider** from the git remote:
|
|
40
|
+
|
|
41
|
+
| Remote URL contains | Provider |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| `github.com` | GitHub (`gh`) |
|
|
44
|
+
| `dev.azure.com` / `visualstudio.com` | Azure DevOps (`az repos`) |
|
|
45
|
+
| anything else | unknown — **stop** and ask the user |
|
|
46
|
+
|
|
47
|
+
4. **Fetch the PR plus all comment threads:**
|
|
48
|
+
- **GitHub:** `gh pr view <PR> --comments`
|
|
49
|
+
- **Azure DevOps:** `az repos pr thread list --id <PR>`
|
|
50
|
+
|
|
51
|
+
## Step 1 — Parse threads
|
|
52
|
+
|
|
53
|
+
For each thread extract: thread ID, author, file + line (if inline), comment text, status, existing replies. Keep only **active** threads; ignore already-resolved ones. If a comment references a `spell-review` finding ID (`R1`, …), carry it through so the reply can cite it.
|
|
54
|
+
|
|
55
|
+
**If zero active threads remain:** report "No active review threads to address — nothing to do" and stop. Do not create commits or push.
|
|
56
|
+
|
|
57
|
+
## Step 2 — Categorize each comment
|
|
58
|
+
|
|
59
|
+
| Category | Criteria | Action |
|
|
60
|
+
| --- | --- | --- |
|
|
61
|
+
| must-fix | bug, security issue, logic error, broken behavior, standards violation | implement, commit, push |
|
|
62
|
+
| suggestion | better approach, refactor, optional improvement | implement OR reply with rationale |
|
|
63
|
+
| question | clarification / "why did you…?" | answer in the thread |
|
|
64
|
+
| nitpick | minor style / naming preference | implement OR reply with rationale |
|
|
65
|
+
|
|
66
|
+
Heuristics: "must"/"should"/"required"/"blocking" → must-fix; ends with "?" or starts "why/how/what" → question; "nit"/"minor"/"optional"/"consider" → nitpick; alternative offered without requiring → suggestion. When unsure, escalate to suggestion (not nitpick).
|
|
67
|
+
|
|
68
|
+
## Step 3 — Disposition
|
|
69
|
+
|
|
70
|
+
| Disposition | When |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| Fix Now | all must-fix; suggestions/nitpicks < ~30 min effort AND within files the PR already touches |
|
|
73
|
+
| Defer | scope-expanding items: new features, infra/tooling, cross-file refactors, > ~1 hr effort |
|
|
74
|
+
| Decline | the current approach is intentional — reply with rationale |
|
|
75
|
+
|
|
76
|
+
`--fix-all` forces all suggestions/nitpicks to Fix Now. Deferred items get a `TODO.md` entry with a `(PR #<n> feedback)` note **and** a reply on the thread pointing to that TODO before the thread is resolved — never resolve a deferred thread silently, or the reviewer cannot tell it was tracked vs. ignored.
|
|
77
|
+
|
|
78
|
+
## Step 4 — Present the plan, then wait
|
|
79
|
+
|
|
80
|
+
Show a table (`# | category | disposition | author | file:line | summary | planned action`) plus counts. Wait for confirmation; let the user reclassify any item before proceeding.
|
|
81
|
+
|
|
82
|
+
## Step 5 — Execute
|
|
83
|
+
|
|
84
|
+
Commits in this spell follow `.arcane/governance/git-conventions.md`: Conventional Commits format, agent attribution (`--author` + required `Agent`/`Model`/`Provider` trailers) when an agent authors the change, and — because this is an **interactive session** — present each proposed commit message and **wait for the human's approval before committing** (the Step 4 plan approval covers *what* to do, not the commit itself). Never squash.
|
|
85
|
+
|
|
86
|
+
For **must-fix** (one thread at a time): read the code → implement → run the relevant tests.
|
|
87
|
+
- **If tests pass:** commit (e.g. `fix(scope): address review — <desc>`) → reply `Fixed in <hash>. <what changed>` (cite the `R#` finding ID if one exists) → resolve the thread immediately.
|
|
88
|
+
- **If tests fail:** do **not** commit. Either fix the regression and re-run, or — if the fix is wrong or larger than expected — revert the change, reply on the thread explaining what blocked it, and reclassify to Defer (TODO + thread note). A broken must-fix must never land.
|
|
89
|
+
|
|
90
|
+
For **suggestions/nitpicks**: if implementing, make the change, run tests, and batch into one commit; reply and resolve. If declining, reply with specific, respectful rationale (reference an ADR or convention if relevant) and resolve as won't-fix.
|
|
91
|
+
|
|
92
|
+
For **questions**: answer clearly in the thread; if the question reveals a real issue, reclassify and handle it; resolve after answering.
|
|
93
|
+
|
|
94
|
+
Resolve threads via the provider:
|
|
95
|
+
- **GitHub:** resolve the review thread (`gh` / GitHub MCP resolve-thread).
|
|
96
|
+
- **Azure DevOps:** update the thread status (`Fixed` or `WontFix`).
|
|
97
|
+
- **If a thread cannot be auto-resolved** (provider API error, insufficient permissions, or the reviewer must resolve it themselves): leave the reply in place, list the thread in the Step 6 report under "needs manual resolution," and do not treat the sweep as complete.
|
|
98
|
+
|
|
99
|
+
## Step 6 — Sweep, push, report
|
|
100
|
+
|
|
101
|
+
1. Re-fetch threads; resolve any still-active ones (this is the merge gate on many providers). Any thread that genuinely cannot be auto-resolved (see Step 5) is reported as "needs manual resolution," not silently left open.
|
|
102
|
+
2. `git push` all commits.
|
|
103
|
+
3. Print a summary table of actions taken (category, file, action, commit), thread status (resolved / deferred-with-TODO / needs manual resolution), commits pushed, and next steps (CI, notify reviewer, ready for re-review).
|
|
104
|
+
4. Optionally post the summary back to the PR as a top-level comment for a durable record.
|
|
105
|
+
|
|
106
|
+
## Rules
|
|
107
|
+
|
|
108
|
+
- Always present the plan and wait for confirmation before changing code.
|
|
109
|
+
- This is an interactive session: get human approval for each commit message before committing (per git-conventions Commit Governance).
|
|
110
|
+
- Never commit a change whose tests fail — fix, revert, or defer instead.
|
|
111
|
+
- Resolve each thread immediately after addressing it — do not batch resolution to the very end (except the final sweep).
|
|
112
|
+
- Never dismiss feedback without reasoning, and never resolve a deferred thread without leaving a TODO pointer on it.
|
|
113
|
+
- Follow `.arcane/governance/git-conventions.md` for commit format and attribution; do not squash.
|
|
114
|
+
- Never include secrets or tokens in replies or commits.
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
argument-hint: Optional flag — pass "components" to list all installed components in full detail
|
|
5
|
+
agent: agent
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Executive Summary
|
|
9
|
+
|
|
10
|
+
- This prompt reads `.arcane.json` and reports the installed Arcane version for this repository.
|
|
11
|
+
- It surfaces the install date, profile, and component count.
|
|
12
|
+
- Optionally lists every installed component when the "components" argument is passed.
|
|
13
|
+
- Use this any time you need to know which Arcane version a repo is running.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Report the Arcane installation state for this repository.
|
|
18
|
+
|
|
19
|
+
## Step 1 — Read the Manifest
|
|
20
|
+
|
|
21
|
+
Read [.arcane.json](.arcane.json) from the repository root.
|
|
22
|
+
|
|
23
|
+
If the file does not exist, stop and output:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
⚠ Arcane is not installed in this repository.
|
|
27
|
+
Run `spell init` to install it.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Step 2 — Output Installation Summary
|
|
31
|
+
|
|
32
|
+
Produce output in this exact structure:
|
|
33
|
+
|
|
34
|
+
### Arcane Installation
|
|
35
|
+
|
|
36
|
+
| Field | Value |
|
|
37
|
+
| ---------------- | ----------------------------- |
|
|
38
|
+
| **Version** | `{version from .arcane.json}` |
|
|
39
|
+
| **Profile** | `{profile}` |
|
|
40
|
+
| **Installed At** | `{installedAt}` |
|
|
41
|
+
| **Components** | `{count}` installed |
|
|
42
|
+
|
|
43
|
+
### Update Check
|
|
44
|
+
|
|
45
|
+
- Fetch the latest published version from the npm registry: `https://registry.npmjs.org/arcane-cli/latest`
|
|
46
|
+
- Extract the `version` field from the JSON response.
|
|
47
|
+
- Compare to the installed version.
|
|
48
|
+
|
|
49
|
+
If up to date:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
✔ You are on the latest version ({version}).
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If behind:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
⚠ Update available: {installed} → {latest}
|
|
59
|
+
Run `spell update` to upgrade.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If the npm registry is unreachable, report:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
ℹ Could not reach npm registry — update check skipped.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Step 3 — Component Detail (optional)
|
|
69
|
+
|
|
70
|
+
Only include this section when the user passed "components" as the prompt argument.
|
|
71
|
+
|
|
72
|
+
List each entry from the `components` array in `.arcane.json` as a table:
|
|
73
|
+
|
|
74
|
+
| Component | Installed Version | Files |
|
|
75
|
+
| --------- | ----------------- | ----- |
|
|
76
|
+
| ... | ... | ... |
|
|
77
|
+
|
|
78
|
+
## Rules
|
|
79
|
+
|
|
80
|
+
- Do not modify any files.
|
|
81
|
+
- Keep output factual — read directly from `.arcane.json`, do not infer or assume values.
|
|
82
|
+
- If `installedAt` is an ISO 8601 timestamp, display it as a human-readable date (e.g., "26 May 2026").
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Spell — Architect
|
|
3
|
+
description: Generate architecture decisions and story breakdown from a PRD, producing architecture.md and stories.json
|
|
4
|
+
argument-hint: Path to PRD.md or paste the PRD content
|
|
5
|
+
agent: agent
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Executive Summary
|
|
9
|
+
|
|
10
|
+
- This prompt takes a PRD and produces architecture decisions plus an implementable story breakdown.
|
|
11
|
+
- It follows a structured solutioning pattern — progressive context chain from requirements to implementation plan.
|
|
12
|
+
- Outputs `architecture.md` and `stories.json` that feed into `spell-implement`.
|
|
13
|
+
- See [[governance/development-methodology|Development Methodology]] for full Spell Loop reference.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Generate architecture decisions and story breakdown from the provided PRD.
|
|
18
|
+
|
|
19
|
+
Use these files for context:
|
|
20
|
+
|
|
21
|
+
- [governance/development-methodology.md](../../governance/development-methodology.md) — Spell Loop methodology and stories.json format
|
|
22
|
+
- [governance/testing-standards.md](../../governance/testing-standards.md) — Testing frameworks and coverage requirements
|
|
23
|
+
- [DECISIONS.md](../../DECISIONS.md) — Existing ADRs to respect and extend
|
|
24
|
+
|
|
25
|
+
Workflow:
|
|
26
|
+
|
|
27
|
+
1. **Read the PRD** — understand requirements, constraints, and acceptance criteria.
|
|
28
|
+
- 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.
|
|
29
|
+
|
|
30
|
+
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.
|
|
31
|
+
|
|
32
|
+
3. **Make architecture decisions** — for each significant technical choice:
|
|
33
|
+
- What are the options?
|
|
34
|
+
- What are the tradeoffs?
|
|
35
|
+
- What does the decision depend on?
|
|
36
|
+
- Propose a recommendation with rationale.
|
|
37
|
+
- Flag decisions that need a new ADR in DECISIONS.md.
|
|
38
|
+
|
|
39
|
+
4. **Generate architecture.md**:
|
|
40
|
+
```markdown
|
|
41
|
+
# Architecture: [Feature Name]
|
|
42
|
+
|
|
43
|
+
## Overview
|
|
44
|
+
[High-level approach in 2-3 sentences]
|
|
45
|
+
|
|
46
|
+
## Decisions
|
|
47
|
+
### [Decision 1: e.g., API Design]
|
|
48
|
+
- **Options:** [A, B, C]
|
|
49
|
+
- **Decision:** [Chosen option]
|
|
50
|
+
- **Rationale:** [Why]
|
|
51
|
+
- **ADR:** [Existing ADR-NNN or "Needs new ADR"]
|
|
52
|
+
|
|
53
|
+
## Component Diagram
|
|
54
|
+
[Mermaid diagram showing how components interact]
|
|
55
|
+
|
|
56
|
+
## Data Flow
|
|
57
|
+
[Sequence diagram for key workflows]
|
|
58
|
+
|
|
59
|
+
## Testing Strategy
|
|
60
|
+
- [Framework per governance/testing-standards.md]
|
|
61
|
+
- [Key test scenarios from acceptance criteria]
|
|
62
|
+
- [Coverage targets]
|
|
63
|
+
|
|
64
|
+
## Security Considerations
|
|
65
|
+
- [Per threat model]
|
|
66
|
+
|
|
67
|
+
## Implementation Notes
|
|
68
|
+
- [Tech stack specifics, package versions, patterns to follow]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
5. **Break into stories** — generate `stories.json` per the format in development-methodology.md:
|
|
72
|
+
- Each story must be completable in one AI context window (one file change, one endpoint, one component).
|
|
73
|
+
- Order stories by dependency (infrastructure first, then API, then UI).
|
|
74
|
+
- Include acceptance criteria from the PRD mapped to specific stories.
|
|
75
|
+
- Mark all stories as `"passes": false`.
|
|
76
|
+
|
|
77
|
+
5a. **Validate stories.json schema** — before outputting, self-check every field. Missing fields break `spell-implement`. Required top-level fields:
|
|
78
|
+
- `feature` (string)
|
|
79
|
+
- `branchName` (string, format: `agent/type/description`)
|
|
80
|
+
- `assignedAgent` (string, agent slug)
|
|
81
|
+
- `trackingMode` (`internal` or `external`)
|
|
82
|
+
- `externalProvider` (required when `trackingMode=external`)
|
|
83
|
+
- `adoWorkItemId` (required only when `trackingMode=external` and `externalProvider=ado`)
|
|
84
|
+
|
|
85
|
+
Required per-story fields:
|
|
86
|
+
- `id` (string, e.g. `FEAT-001`)
|
|
87
|
+
- `title` (string)
|
|
88
|
+
- `description` (string — detailed enough for implementation without additional context)
|
|
89
|
+
- `acceptanceCriteria` (array of strings)
|
|
90
|
+
- `priority` (number, 1 = highest)
|
|
91
|
+
- `passes` (boolean, always `false` on output)
|
|
92
|
+
- `assignedTo` (string, agent slug)
|
|
93
|
+
- `testEvidence` (null on output)
|
|
94
|
+
|
|
95
|
+
If any required field is missing, regenerate before outputting. Do not present incomplete stories.json.
|
|
96
|
+
|
|
97
|
+
6. **Implementation readiness check** — verify:
|
|
98
|
+
- Every PRD requirement maps to at least one story.
|
|
99
|
+
- No story depends on an unresolved Open Question from the PRD.
|
|
100
|
+
- Testing strategy covers all acceptance criteria.
|
|
101
|
+
- No architecture decision contradicts existing ADRs.
|
|
102
|
+
|
|
103
|
+
7. **Save to disk** — write both outputs to the feature folder:
|
|
104
|
+
- `features/{adoWorkItemId}-{slug}/architecture.md` and `features/{adoWorkItemId}-{slug}/stories.json` when `trackingMode=external` and `externalProvider=ado`
|
|
105
|
+
- `features/{slug}/architecture.md` and `features/{slug}/stories.json` when `trackingMode=internal` (or non-ADO external providers without an ADO ID)
|
|
106
|
+
|
|
107
|
+
Resolve `trackingMode`, `externalProvider`, optional `adoWorkItemId`, and slug from PRD frontmatter first. If the folder does not exist, create it with `mkdir -p`.
|
|
108
|
+
Confirm the paths to the user after writing.
|
|
109
|
+
|
|
110
|
+
8. **Present for review** — show the architecture and story breakdown to the user.
|
|
111
|
+
|
|
112
|
+
Rules:
|
|
113
|
+
- Stories must be right-sized per the methodology doc (not "build the entire dashboard").
|
|
114
|
+
- Architecture decisions must reference existing ADRs when relevant.
|
|
115
|
+
- Use Mermaid for all diagrams.
|
|
116
|
+
- If PRD scope is too large, recommend splitting before proceeding.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Spell — Bootstrap Business
|
|
3
|
+
description: Create a new business documentation starter in Arcane using the template, naming rules, and setup playbook.
|
|
4
|
+
argument-hint: Business Name | Business Type | One-line description
|
|
5
|
+
agent: agent
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Executive Summary
|
|
9
|
+
|
|
10
|
+
- This prompt scaffolds a new business documentation package from the template automatically.
|
|
11
|
+
- It applies naming conventions, creates required files, and initializes checklists per business type.
|
|
12
|
+
- Use this when starting a new business to ensure consistent structure and avoid missing setup steps.
|
|
13
|
+
- Input format is: `Business Name | Business Type | Description` — prompt will ask for missing fields.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Bootstrap a new business in this repository.
|
|
18
|
+
|
|
19
|
+
Parse prompt argument as:
|
|
20
|
+
`<Business Name> | <Business Type> | <One-line Description>`
|
|
21
|
+
|
|
22
|
+
If any required value is missing, ask only for missing fields.
|
|
23
|
+
|
|
24
|
+
Use these files first (each is optional — if missing, proceed as noted):
|
|
25
|
+
|
|
26
|
+
- [playbooks/new-business-setup.md](../../playbooks/new-business-setup.md) — setup playbook. If `playbooks/` doesn't exist, skip and derive steps from the business-type checklist below.
|
|
27
|
+
- [naming-conventions.md](../../naming-conventions.md) — slug/file naming rules. If missing, default to lowercase-with-dashes slugs.
|
|
28
|
+
- [ventures/\_template/overview.md](../../ventures/_template/overview.md) — overview template. If missing, generate a minimal overview from the fields below.
|
|
29
|
+
- [README.md](../../README.md) — repo navigation. If missing, skip cross-linking.
|
|
30
|
+
- [project.md](../../project.md) — project context. If missing, skip.
|
|
31
|
+
|
|
32
|
+
> **Business root.** `{BUSINESS_ROOT}` is the directory that holds business/venture folders (default: `ventures/`). Resolve from `.arcane.json` or repo frontmatter; if `ventures/` doesn't exist and no business root is configured, ask the user where business folders live before creating anything.
|
|
33
|
+
|
|
34
|
+
Workflow:
|
|
35
|
+
|
|
36
|
+
1. Create `{BUSINESS_ROOT}/<slug>/` using existing repo style (lowercase with dashes). If the business root doesn't exist yet, create it at the configured location (or the path the user provided).
|
|
37
|
+
2. Create these files:
|
|
38
|
+
- `overview.md` from template, filled with provided business details and current date.
|
|
39
|
+
- `config.md` with placeholders for `{PLATFORM_NAME}` configuration, data paths, and platform integrations. (`{PLATFORM_NAME}` is the org's operating platform — resolve from `.arcane.json`/frontmatter; ask if unset.)
|
|
40
|
+
- `legal.md` with baseline legal checklist and links to relevant repo docs.
|
|
41
|
+
3. Add a startup checklist tailored to the business type (`e-commerce`, `app`, `protocol`, or `service`).
|
|
42
|
+
4. Add cross-links only when appropriate:
|
|
43
|
+
- Update [README.md](../../README.md) only if there is a clear place for business navigation.
|
|
44
|
+
- Update [TODO.md](../../TODO.md) only with concrete, actionable next tasks.
|
|
45
|
+
5. Return a ready-to-start summary.
|
|
46
|
+
|
|
47
|
+
Output format:
|
|
48
|
+
|
|
49
|
+
## Created
|
|
50
|
+
|
|
51
|
+
- File and folder paths created.
|
|
52
|
+
|
|
53
|
+
## Defaults Applied
|
|
54
|
+
|
|
55
|
+
- Slug, naming decisions, and template assumptions used.
|
|
56
|
+
|
|
57
|
+
## Immediate Next Actions
|
|
58
|
+
|
|
59
|
+
1. Action one.
|
|
60
|
+
2. Action two.
|
|
61
|
+
3. Action three.
|
|
62
|
+
4. Action four.
|
|
63
|
+
5. Action five.
|
|
64
|
+
|
|
65
|
+
## Questions To Finalize
|
|
66
|
+
|
|
67
|
+
- Up to 3 targeted questions, or `None`.
|
|
68
|
+
|
|
69
|
+
Rules:
|
|
70
|
+
|
|
71
|
+
- Follow repository frontmatter conventions.
|
|
72
|
+
- Do not create Azure resources directly; document steps only.
|
|
73
|
+
- Keep generated docs editable and operational, not verbose.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Spell — Brainstorm
|
|
3
|
+
description: Divergent ideation — explore multiple solutions to a problem space before committing to a plan
|
|
4
|
+
argument-hint: "Problem space or opportunity (e.g., 'How should we handle multi-tenant billing?')"
|
|
5
|
+
agent: agent
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Executive Summary
|
|
9
|
+
|
|
10
|
+
- This spell generates multiple solution options for a problem space before narrowing to a plan.
|
|
11
|
+
- It produces divergent ideas, evaluates trade-offs, and surfaces hidden constraints — without committing to implementation.
|
|
12
|
+
- Use this BEFORE `spell-plan` when you're unsure which direction to take, or when the problem is ambiguous.
|
|
13
|
+
- Output: structured options with trade-off matrix, recommended path, and open questions.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Explore the given problem space and generate solution options.
|
|
18
|
+
|
|
19
|
+
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:
|
|
20
|
+
|
|
21
|
+
- [governance/development-methodology.md](../../governance/development-methodology.md) — Spell Loop methodology. _If missing:_ proceed with general SDLC reasoning.
|
|
22
|
+
- [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.
|
|
23
|
+
- [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.
|
|
24
|
+
- [naming-conventions.md](../../naming-conventions.md) — Agent roster and roles. _If missing:_ proceed without role references.
|
|
25
|
+
- [TODO.md](../../../TODO.md) — In-progress work (referenced in step 4). _If missing:_ skip the in-progress-work cross-check and note it.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Workflow
|
|
30
|
+
|
|
31
|
+
### 1. Problem Framing
|
|
32
|
+
|
|
33
|
+
Accept the problem from one of these sources:
|
|
34
|
+
|
|
35
|
+
| Source | Format | How to fetch |
|
|
36
|
+
|--------|--------|--------------|
|
|
37
|
+
| **Description in prompt** | Inline text | Use as-is |
|
|
38
|
+
| **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` |
|
|
39
|
+
| **File path** | Path to existing doc | Read the file |
|
|
40
|
+
|
|
41
|
+
Clarify the problem by identifying:
|
|
42
|
+
- **What is the core tension?** — competing goals, missing capability, or scaling pain
|
|
43
|
+
- **Who is affected?** — users, operators, downstream systems
|
|
44
|
+
- **What constraints exist?** — budget, timeline, tech stack, ADRs already decided
|
|
45
|
+
- **What does "good enough" look like?** — minimum viable outcome vs. ideal outcome
|
|
46
|
+
|
|
47
|
+
If the problem is too vague, ask up to 3 clarifying questions before proceeding.
|
|
48
|
+
|
|
49
|
+
### 2. Divergent Ideation
|
|
50
|
+
|
|
51
|
+
Generate **3–5 distinct approaches** to the problem. Each must be meaningfully different — not just parameter variations of the same idea.
|
|
52
|
+
|
|
53
|
+
For each option:
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
### Option N: [Name]
|
|
57
|
+
**One-liner:** [What this approach does in ≤15 words]
|
|
58
|
+
**How it works:** [2-3 sentences on mechanism]
|
|
59
|
+
**Strengths:** [What this gets right]
|
|
60
|
+
**Weaknesses:** [What this sacrifices or risks]
|
|
61
|
+
**Effort:** S (< 1 sprint) / M (1-2 sprints) / L (3+ sprints)
|
|
62
|
+
**Prerequisite ADRs:** [Decisions that must be made first, or "none"]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Guidelines for generating options:
|
|
66
|
+
- Include at least one **simple/minimal** option (the "just do the simplest thing" path)
|
|
67
|
+
- Include at least one **ambitious** option (the ideal-world approach)
|
|
68
|
+
- Include at least one **unconventional** option (reframe the problem, challenge assumptions)
|
|
69
|
+
- Do NOT include options that violate existing ADRs unless you explicitly flag the conflict
|
|
70
|
+
|
|
71
|
+
### 3. Trade-off Matrix
|
|
72
|
+
|
|
73
|
+
Produce a comparison table:
|
|
74
|
+
|
|
75
|
+
| Dimension | Option 1 | Option 2 | Option 3 | ... |
|
|
76
|
+
|-----------|----------|----------|----------|-----|
|
|
77
|
+
| **Complexity** | Low/Med/High | | | |
|
|
78
|
+
| **Time to value** | Days/Weeks/Months | | | |
|
|
79
|
+
| **Scalability** | Poor/Good/Excellent | | | |
|
|
80
|
+
| **Reversibility** | Easy/Hard/Irreversible | | | |
|
|
81
|
+
| **Risk** | Low/Med/High | | | |
|
|
82
|
+
| **Alignment with goals** | Weak/Moderate/Strong | | | |
|
|
83
|
+
|
|
84
|
+
### 4. Hidden Constraints & Risks
|
|
85
|
+
|
|
86
|
+
Surface things the user might not have considered:
|
|
87
|
+
- Dependencies on decisions not yet made
|
|
88
|
+
- Interaction with other in-progress work (check `TODO.md`)
|
|
89
|
+
- Security or compliance implications
|
|
90
|
+
- Data migration or backwards-compatibility concerns
|
|
91
|
+
- Skills or tooling gaps
|
|
92
|
+
|
|
93
|
+
### 5. Recommendation
|
|
94
|
+
|
|
95
|
+
State your recommended path clearly:
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
## Recommended Path
|
|
99
|
+
|
|
100
|
+
**Option [N]: [Name]**
|
|
101
|
+
|
|
102
|
+
**Why:** [1-2 sentences on why this balances trade-offs best for the current context]
|
|
103
|
+
|
|
104
|
+
**Immediate next step:** [One concrete action — likely "run `spell-plan` with this direction"]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
If no single option is clearly best, say so and identify what additional information would break the tie.
|
|
108
|
+
|
|
109
|
+
### 6. Open Questions
|
|
110
|
+
|
|
111
|
+
List up to 5 questions that would refine the decision:
|
|
112
|
+
- Questions whose answers would change the recommendation
|
|
113
|
+
- Questions about constraints not visible in the docs
|
|
114
|
+
- Questions about user preferences or business priorities
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Rules
|
|
119
|
+
|
|
120
|
+
- **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.
|
|
121
|
+
- **Quantity over polish.** Brainstorming favors breadth. Options don't need to be fully fleshed out — just distinct enough to compare.
|
|
122
|
+
- **Challenge assumptions.** If the user's framing seems to constrain solutions unnecessarily, say so explicitly.
|
|
123
|
+
- **Respect decided ADRs.** Flag conflicts but don't silently ignore existing decisions.
|
|
124
|
+
- **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,109 @@
|
|
|
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
|
+
argument-hint: Bug description (e.g., "Session detail dialog shows 404 when clicking a mock session")
|
|
5
|
+
agent: agent
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Executive Summary
|
|
9
|
+
|
|
10
|
+
- This prompt handles the full bug lifecycle: document → track → diagnose → fix → verify → close.
|
|
11
|
+
- It records the bug in your configured tracker (external provider) or `TODO.md` (internal mode) and links the fix commit to it.
|
|
12
|
+
- Output is a working fix with tests, committed using Conventional Commits format.
|
|
13
|
+
- **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`.
|
|
14
|
+
- See [[governance/development-methodology|Development Methodology]] for full Spell Loop reference.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
Document, diagnose, and fix the described bug.
|
|
19
|
+
|
|
20
|
+
Use these files for context (each is optional — if a file is missing, proceed and note the assumption you fell back on):
|
|
21
|
+
|
|
22
|
+
- [governance/development-methodology.md](../../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`.
|
|
23
|
+
- [DECISIONS.md](../../DECISIONS.md) — Existing ADRs to respect. If missing, proceed without ADR constraints.
|
|
24
|
+
- [governance/testing-standards.md](../../governance/testing-standards.md) — Coverage thresholds. If missing, match the test conventions already present in the repo.
|
|
25
|
+
|
|
26
|
+
Workflow:
|
|
27
|
+
|
|
28
|
+
1. **Capture the bug** — gather these details from the user (ask if missing):
|
|
29
|
+
|
|
30
|
+
| Field | Description |
|
|
31
|
+
|-------|-------------|
|
|
32
|
+
| **Summary** | One-line description of the bug |
|
|
33
|
+
| **Reproduction steps** | Numbered steps to reproduce |
|
|
34
|
+
| **Expected behavior** | What should happen |
|
|
35
|
+
| **Actual behavior** | What actually happens (include error messages, HTTP codes, screenshots) |
|
|
36
|
+
| **Severity** | Critical / High / Medium / Low |
|
|
37
|
+
| **Affected component** | File path, page, API route, or module |
|
|
38
|
+
| **Discovery context** | How was this found? (smoke test, user report, monitoring) |
|
|
39
|
+
|
|
40
|
+
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.
|
|
41
|
+
|
|
42
|
+
- **`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.
|
|
43
|
+
- **`tracking_mode: external`** — file a work item in the configured provider. Read [governance/development-methodology.md](../../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}`.
|
|
44
|
+
|
|
45
|
+
*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:*
|
|
46
|
+
```bash
|
|
47
|
+
az boards work-item create \
|
|
48
|
+
--type Bug \
|
|
49
|
+
--title "[Bug] {SUMMARY}" \
|
|
50
|
+
--description "{formatted description with repro steps}" \
|
|
51
|
+
--org https://dev.azure.com/{ADO_ORG} \
|
|
52
|
+
--project {ADO_PROJECT} \
|
|
53
|
+
--output json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If the configured tooling is unavailable or the user prefers manual tracking, fall back to the `TODO.md` entry above and continue.
|
|
57
|
+
|
|
58
|
+
3. **Diagnose** — trace the code path to find the root cause:
|
|
59
|
+
- Read the affected component and its dependencies.
|
|
60
|
+
- Identify the exact line(s) where the bug manifests.
|
|
61
|
+
- Determine *why* the bug exists (data mismatch, missing case, race condition, etc.).
|
|
62
|
+
- Document the root cause concisely.
|
|
63
|
+
|
|
64
|
+
4. **Implement the fix** — write the minimal code change:
|
|
65
|
+
- Fix only the bug — no refactoring, no feature additions.
|
|
66
|
+
- Follow existing code patterns and conventions.
|
|
67
|
+
- If the fix touches a public interface, check all callers.
|
|
68
|
+
|
|
69
|
+
5. **Add or update tests** — ensure the bug cannot regress:
|
|
70
|
+
- Write a test that reproduces the bug (fails without the fix).
|
|
71
|
+
- Verify existing tests still pass.
|
|
72
|
+
- Run the full test suite: `npx vitest run` (or project-specific command).
|
|
73
|
+
|
|
74
|
+
6. **Verify the fix** — confirm the bug is resolved:
|
|
75
|
+
- Run the reproduction steps from Step 1 — they should now succeed.
|
|
76
|
+
- Check for side effects in related functionality.
|
|
77
|
+
- If applicable, rebuild and restart: `npm run build`.
|
|
78
|
+
|
|
79
|
+
7. **Commit** — stage and propose a commit message for approval:
|
|
80
|
+
```
|
|
81
|
+
fix({scope}): {SUMMARY}
|
|
82
|
+
|
|
83
|
+
{Root cause explanation}
|
|
84
|
+
|
|
85
|
+
{What was changed and why}
|
|
86
|
+
|
|
87
|
+
{WORK_ITEM_LINK}
|
|
88
|
+
```
|
|
89
|
+
Follow Conventional Commits format. For `{WORK_ITEM_LINK}`, use the commit-link convention your tracker expects (per [governance/development-methodology.md](../../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`.
|
|
90
|
+
|
|
91
|
+
8. **Close out the tracker** — update the work item's state to reflect the fix:
|
|
92
|
+
- **`internal`** — mark the `TODO.md` entry as resolved (check it off / move to a Done section).
|
|
93
|
+
- **`external`** — transition the work item to its resolved/done state via the provider. For Azure DevOps specifically (resolve `{ADO_ORG}` from `.arcane.json`):
|
|
94
|
+
```bash
|
|
95
|
+
az boards work-item update \
|
|
96
|
+
--id {WORK_ITEM_ID} \
|
|
97
|
+
--state Resolved \
|
|
98
|
+
--org https://dev.azure.com/{ADO_ORG} \
|
|
99
|
+
--output json
|
|
100
|
+
```
|
|
101
|
+
For other providers, follow [governance/development-methodology.md](../../governance/development-methodology.md).
|
|
102
|
+
|
|
103
|
+
Rules:
|
|
104
|
+
- Fix only the reported bug. Do not bundle unrelated improvements.
|
|
105
|
+
- 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.
|
|
106
|
+
- Every fix must have a test that would have caught the bug.
|
|
107
|
+
- Present the commit message for human approval — never auto-commit.
|
|
108
|
+
- If the root cause is unclear, present your diagnosis and ask for confirmation before implementing.
|
|
109
|
+
- If the fix is risky (touches shared infrastructure, auth, or data), flag it explicitly.
|