arcane-cli 0.14.0 → 0.15.1
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 -21
- package/README.md +253 -253
- package/dist/assets/.arcane/agents/agent-policies-template.md +414 -414
- package/dist/assets/.arcane/governance/agent-policies.md +414 -414
- package/dist/assets/.arcane/governance/agent-work-queue-model.md +61 -61
- package/dist/assets/.arcane/governance/cicd-standards.md +227 -227
- package/dist/assets/.arcane/governance/development-methodology.md +384 -384
- package/dist/assets/.arcane/governance/git-conventions.md +759 -759
- package/dist/assets/.arcane/governance/naming-conventions.md +142 -142
- package/dist/assets/.arcane/governance/new-business-setup.md +182 -182
- package/dist/assets/.arcane/governance/portable-bootstrap.md +101 -101
- package/dist/assets/.arcane/governance/product-excellence-standards.md +211 -211
- package/dist/assets/.arcane/governance/testing-standards.md +158 -158
- package/dist/assets/.arcane/governance/universal-agent-rules.md +108 -108
- package/dist/assets/.arcane/image-prompts/adelaide-image-prompt.md +140 -140
- package/dist/assets/.arcane/image-prompts/alexander-image-prompt.md +138 -138
- package/dist/assets/.arcane/image-prompts/bess-image-prompt.md +139 -139
- package/dist/assets/.arcane/image-prompts/circe-image-prompt.md +143 -143
- package/dist/assets/.arcane/image-prompts/custodio-image-prompt.md +140 -140
- package/dist/assets/.arcane/image-prompts/iris-image-prompt.md +139 -139
- package/dist/assets/.arcane/image-prompts/kellar-image-prompt.md +141 -141
- package/dist/assets/.arcane/image-prompts/lafayette-image-prompt.md +140 -140
- package/dist/assets/.arcane/image-prompts/lince-image-prompt.md +142 -142
- package/dist/assets/.arcane/image-prompts/mercurio-image-prompt.md +140 -140
- package/dist/assets/.arcane/image-prompts/merlin-image-prompt.md +139 -139
- package/dist/assets/.arcane/image-prompts/prospero-image-prompt.md +141 -141
- package/dist/assets/.arcane.json +5 -0
- package/dist/assets/.claude/commands/spell-enchant.md +9 -9
- package/dist/assets/.github/agents/adelaide.agent.md +44 -44
- package/dist/assets/.github/agents/alexander.agent.md +43 -43
- package/dist/assets/.github/agents/bess.agent.md +42 -42
- package/dist/assets/.github/agents/circe.agent.md +43 -43
- package/dist/assets/.github/agents/custodio.agent.md +44 -44
- package/dist/assets/.github/agents/iris.agent.md +43 -43
- package/dist/assets/.github/agents/kellar.agent.md +43 -43
- package/dist/assets/.github/agents/lafayette.agent.md +42 -42
- package/dist/assets/.github/agents/lince.agent.md +43 -43
- package/dist/assets/.github/agents/mercurio.agent.md +43 -43
- package/dist/assets/.github/agents/merlin.agent.md +44 -44
- package/dist/assets/.github/agents/prospero.agent.md +43 -43
- package/dist/assets/.github/prompts/spell-close-session.prompt.md +17 -5
- package/dist/assets/.github/prompts/spell-commit-work.prompt.md +24 -6
- package/dist/assets/.github/prompts/spell-create-pull-request.prompt.md +12 -3
- package/dist/assets/.github/prompts/spell-enchant.prompt.md +385 -385
- package/dist/assets/.github/prompts/spell-feedback.prompt.md +113 -113
- package/dist/assets/.github/prompts/spell-full-cycle.prompt.md +202 -201
- package/dist/assets/.github/prompts/spell-implement.prompt.md +101 -101
- package/dist/assets/.github/prompts/spell-open-session.prompt.md +20 -5
- package/dist/assets/.github/prompts/spell-scope.prompt.md +263 -263
- package/dist/assets/agents/architecture-lead.yaml +61 -61
- package/dist/assets/agents/collaborator.yaml +59 -59
- package/dist/assets/agents/devops.yaml +60 -60
- package/dist/assets/agents/frontend-dev.yaml +60 -60
- package/dist/assets/agents/fullstack-dev.yaml +59 -59
- package/dist/assets/agents/marketing-strategist.yaml +60 -60
- package/dist/assets/agents/mobile-dev.yaml +59 -59
- package/dist/assets/agents/operations-comms.yaml +58 -58
- package/dist/assets/agents/orchestrator.yaml +60 -60
- package/dist/assets/agents/qa-lead.yaml +60 -60
- package/dist/assets/agents/research-analyst.yaml +59 -59
- package/dist/assets/agents/security-ops.yaml +61 -61
- package/dist/index.js +346 -9
- package/dist/index.js.map +1 -1
- package/package.json +72 -72
- package/dist/assets/.claude/commands/spell-eas-ios-deploy.md +0 -9
- package/dist/assets/.github/prompts/spell-eas-ios-deploy.prompt.md +0 -183
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Spell — Implement
|
|
3
|
-
description: Autonomous implementation loop — pick a story from stories.json, build it, test it, commit it, repeat until all stories pass
|
|
4
|
-
argument-hint: Path to stories.json or paste story context (optional - uses current directory stories.json by default)
|
|
5
|
-
agent: agent
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Executive Summary
|
|
9
|
-
|
|
10
|
-
- This is the core autonomous loop of the Spell Loop methodology.
|
|
11
|
-
- Each iteration: pick a story → implement → run tests → commit if passing → update stories.json → loop.
|
|
12
|
-
- Uses fresh context per iteration — only stories.json, progress.txt, and git history carry forward.
|
|
13
|
-
- See [[governance/development-methodology|Development Methodology]] for full Spell Loop reference.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
Run the autonomous implementation loop for the current feature.
|
|
18
|
-
|
|
19
|
-
Use these files for context:
|
|
20
|
-
|
|
21
|
-
- [governance/development-methodology.md](../../governance/development-methodology.md) — Spell Loop methodology
|
|
22
|
-
- [governance/testing-standards.md](../../governance/testing-standards.md) — Testing frameworks and coverage requirements
|
|
23
|
-
- The feature's `architecture.md` — for tech decisions and patterns
|
|
24
|
-
- The feature's `stories.json` — for the work breakdown
|
|
25
|
-
- 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
|
|
26
|
-
|
|
27
|
-
Workflow (loop until all stories pass):
|
|
28
|
-
|
|
29
|
-
0. **Sync workspace** — before any code changes, ensure the workspace is current:
|
|
30
|
-
```bash
|
|
31
|
-
git fetch --prune origin
|
|
32
|
-
git checkout main && git pull --ff-only
|
|
33
|
-
```
|
|
34
|
-
If `pull --ff-only` fails, halt and report — manual rebase is needed.
|
|
35
|
-
|
|
36
|
-
1. **Load stories.json** — locate the feature folder from the current branch:
|
|
37
|
-
```bash
|
|
38
|
-
# Derive feature folder from branch name (works for lafayette/feat/541-phase-2a or lafayette/feat/phase-2a)
|
|
39
|
-
FEATURE_FOLDER="features/$(git symbolic-ref --short HEAD | sed 's|.*/feat/||')"
|
|
40
|
-
```
|
|
41
|
-
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.
|
|
42
|
-
|
|
43
|
-
Find the next story where `"passes": false`, ordered by priority.
|
|
44
|
-
|
|
45
|
-
2. **Read context** — load only what this story needs:
|
|
46
|
-
- The story's description and acceptance criteria from stories.json
|
|
47
|
-
- Relevant sections of architecture.md
|
|
48
|
-
- Latest entries in progress.txt (if exists) for learnings from previous iterations
|
|
49
|
-
- Files that will be modified (check git status)
|
|
50
|
-
|
|
51
|
-
3. **Implement the story**:
|
|
52
|
-
- Follow the architecture decisions — do not deviate without flagging.
|
|
53
|
-
- Write the minimum code to satisfy acceptance criteria.
|
|
54
|
-
- Follow project coding conventions and patterns from existing code.
|
|
55
|
-
- Include tests per governance/testing-standards.md.
|
|
56
|
-
|
|
57
|
-
4. **Run tests**:
|
|
58
|
-
- Run the test suite for the affected area.
|
|
59
|
-
- All existing tests must still pass (no regressions).
|
|
60
|
-
- New tests must pass.
|
|
61
|
-
- Check coverage against thresholds (80% line, 95% critical path).
|
|
62
|
-
|
|
63
|
-
5. **Evaluate results**:
|
|
64
|
-
- **Tests pass:** proceed to commit.
|
|
65
|
-
- **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.
|
|
66
|
-
|
|
67
|
-
6. **Commit the story**:
|
|
68
|
-
- Use Conventional Commits format (see spell-commit-work).
|
|
69
|
-
- One commit per story (squash if needed).
|
|
70
|
-
- Include the story ID in the commit body.
|
|
71
|
-
|
|
72
|
-
7. **Update stories.json**:
|
|
73
|
-
- Set `"passes": true` for the completed story.
|
|
74
|
-
- Set `"testEvidence"` with coverage % and test count.
|
|
75
|
-
|
|
76
|
-
8. **Append to `$FEATURE_FOLDER/progress.txt`**:
|
|
77
|
-
```
|
|
78
|
-
## Iteration N — [STORY-ID] — [timestamp]
|
|
79
|
-
### What was done
|
|
80
|
-
- [summary of changes]
|
|
81
|
-
### What was learned
|
|
82
|
-
- [patterns, gotchas, conventions discovered]
|
|
83
|
-
### What to watch for
|
|
84
|
-
- [warnings for future iterations]
|
|
85
|
-
```
|
|
86
|
-
File lives in the feature folder, not the repo root.
|
|
87
|
-
|
|
88
|
-
9. **Loop** — go to step 1 and pick the next story.
|
|
89
|
-
|
|
90
|
-
10. **Completion** — when all stories have `"passes": true`:
|
|
91
|
-
- Summarize what was built.
|
|
92
|
-
- Report total test count and coverage.
|
|
93
|
-
- Recommend running `spell-review` for adversarial review.
|
|
94
|
-
|
|
95
|
-
Rules:
|
|
96
|
-
- **Fresh context:** do not carry assumptions from previous stories. Re-read what you need.
|
|
97
|
-
- **No scope creep:** only implement what the story specifies.
|
|
98
|
-
- **Test first when possible:** write the test, see it fail, then implement.
|
|
99
|
-
- **Commit atomically:** one story = one commit.
|
|
100
|
-
- **Never skip tests:** if there's no test framework set up, set it up as the first story.
|
|
101
|
-
- **Stuck threshold:** if a story fails 3 consecutive attempts, mark it and move on. Human intervention needed.
|
|
1
|
+
---
|
|
2
|
+
name: Spell — Implement
|
|
3
|
+
description: Autonomous implementation loop — pick a story from stories.json, build it, test it, commit it, repeat until all stories pass
|
|
4
|
+
argument-hint: Path to stories.json or paste story context (optional - uses current directory stories.json by default)
|
|
5
|
+
agent: agent
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Executive Summary
|
|
9
|
+
|
|
10
|
+
- This is the core autonomous loop of the Spell Loop methodology.
|
|
11
|
+
- Each iteration: pick a story → implement → run tests → commit if passing → update stories.json → loop.
|
|
12
|
+
- Uses fresh context per iteration — only stories.json, progress.txt, and git history carry forward.
|
|
13
|
+
- See [[governance/development-methodology|Development Methodology]] for full Spell Loop reference.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Run the autonomous implementation loop for the current feature.
|
|
18
|
+
|
|
19
|
+
Use these files for context:
|
|
20
|
+
|
|
21
|
+
- [governance/development-methodology.md](../../governance/development-methodology.md) — Spell Loop methodology
|
|
22
|
+
- [governance/testing-standards.md](../../governance/testing-standards.md) — Testing frameworks and coverage requirements
|
|
23
|
+
- The feature's `architecture.md` — for tech decisions and patterns
|
|
24
|
+
- The feature's `stories.json` — for the work breakdown
|
|
25
|
+
- 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
|
|
26
|
+
|
|
27
|
+
Workflow (loop until all stories pass):
|
|
28
|
+
|
|
29
|
+
0. **Sync workspace** — before any code changes, ensure the workspace is current:
|
|
30
|
+
```bash
|
|
31
|
+
git fetch --prune origin
|
|
32
|
+
git checkout main && git pull --ff-only
|
|
33
|
+
```
|
|
34
|
+
If `pull --ff-only` fails, halt and report — manual rebase is needed.
|
|
35
|
+
|
|
36
|
+
1. **Load stories.json** — locate the feature folder from the current branch:
|
|
37
|
+
```bash
|
|
38
|
+
# Derive feature folder from branch name (works for lafayette/feat/541-phase-2a or lafayette/feat/phase-2a)
|
|
39
|
+
FEATURE_FOLDER="features/$(git symbolic-ref --short HEAD | sed 's|.*/feat/||')"
|
|
40
|
+
```
|
|
41
|
+
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.
|
|
42
|
+
|
|
43
|
+
Find the next story where `"passes": false`, ordered by priority.
|
|
44
|
+
|
|
45
|
+
2. **Read context** — load only what this story needs:
|
|
46
|
+
- The story's description and acceptance criteria from stories.json
|
|
47
|
+
- Relevant sections of architecture.md
|
|
48
|
+
- Latest entries in progress.txt (if exists) for learnings from previous iterations
|
|
49
|
+
- Files that will be modified (check git status)
|
|
50
|
+
|
|
51
|
+
3. **Implement the story**:
|
|
52
|
+
- Follow the architecture decisions — do not deviate without flagging.
|
|
53
|
+
- Write the minimum code to satisfy acceptance criteria.
|
|
54
|
+
- Follow project coding conventions and patterns from existing code.
|
|
55
|
+
- Include tests per governance/testing-standards.md.
|
|
56
|
+
|
|
57
|
+
4. **Run tests**:
|
|
58
|
+
- Run the test suite for the affected area.
|
|
59
|
+
- All existing tests must still pass (no regressions).
|
|
60
|
+
- New tests must pass.
|
|
61
|
+
- Check coverage against thresholds (80% line, 95% critical path).
|
|
62
|
+
|
|
63
|
+
5. **Evaluate results**:
|
|
64
|
+
- **Tests pass:** proceed to commit.
|
|
65
|
+
- **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.
|
|
66
|
+
|
|
67
|
+
6. **Commit the story**:
|
|
68
|
+
- Use Conventional Commits format (see spell-commit-work).
|
|
69
|
+
- One commit per story (squash if needed).
|
|
70
|
+
- Include the story ID in the commit body.
|
|
71
|
+
|
|
72
|
+
7. **Update stories.json**:
|
|
73
|
+
- Set `"passes": true` for the completed story.
|
|
74
|
+
- Set `"testEvidence"` with coverage % and test count.
|
|
75
|
+
|
|
76
|
+
8. **Append to `$FEATURE_FOLDER/progress.txt`**:
|
|
77
|
+
```
|
|
78
|
+
## Iteration N — [STORY-ID] — [timestamp]
|
|
79
|
+
### What was done
|
|
80
|
+
- [summary of changes]
|
|
81
|
+
### What was learned
|
|
82
|
+
- [patterns, gotchas, conventions discovered]
|
|
83
|
+
### What to watch for
|
|
84
|
+
- [warnings for future iterations]
|
|
85
|
+
```
|
|
86
|
+
File lives in the feature folder, not the repo root.
|
|
87
|
+
|
|
88
|
+
9. **Loop** — go to step 1 and pick the next story.
|
|
89
|
+
|
|
90
|
+
10. **Completion** — when all stories have `"passes": true`:
|
|
91
|
+
- Summarize what was built.
|
|
92
|
+
- Report total test count and coverage.
|
|
93
|
+
- Recommend running `spell-review` for adversarial review.
|
|
94
|
+
|
|
95
|
+
Rules:
|
|
96
|
+
- **Fresh context:** do not carry assumptions from previous stories. Re-read what you need.
|
|
97
|
+
- **No scope creep:** only implement what the story specifies.
|
|
98
|
+
- **Test first when possible:** write the test, see it fail, then implement.
|
|
99
|
+
- **Commit atomically:** one story = one commit.
|
|
100
|
+
- **Never skip tests:** if there's no test framework set up, set it up as the first story.
|
|
101
|
+
- **Stuck threshold:** if a story fails 3 consecutive attempts, mark it and move on. Human intervention needed.
|
|
@@ -35,9 +35,26 @@ Use these files first:
|
|
|
35
35
|
Check `ai-context/system-prompt-context.md` for a `## Next Session Handoff` section.
|
|
36
36
|
|
|
37
37
|
- If present and **not yet marked consumed** (no `> ✓ Consumed:` line): surface it immediately as `## Picking Up From Last Session` at the very top of your output, before all other sections. Use the `Next concrete action` field as the first item in `## Next Session Plan`. Use the `Active task`, `Active files`, and `Branch` fields to pre-populate the State Snapshot.
|
|
38
|
-
- After surfacing it,
|
|
38
|
+
- After surfacing it, apply the Mutation Guard below before appending `> ✓ Consumed: YYYY-MM-DD` (today's date). The marker write is a repository mutation.
|
|
39
39
|
- If the section is absent or already marked consumed: skip this step and proceed with the normal workspace scan.
|
|
40
40
|
|
|
41
|
+
## Mutation Guard (run lazily before the first repository write)
|
|
42
|
+
|
|
43
|
+
Do not create a branch during a read-only session. Immediately before the first file edit, generated file, staging action, or other repository mutation, classify the current Git/remote state and apply exactly one path:
|
|
44
|
+
|
|
45
|
+
| Observed state | Required action before mutation |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| Supported, authenticated GitHub/ADO remote + trunk checked out | Create and switch the **current worktree only** to `sessions/YYYY-MM-DD-<topic-slug>`, derived deterministically from the focus, handoff active task, or top next action. |
|
|
48
|
+
| Already on a compliant `sessions/YYYY-MM-DD-<topic-slug>` branch | Stay on it; do not create or switch branches. |
|
|
49
|
+
| Noncompliant unpushed branch with no active PR | Rename it to the deterministic session name before mutation. |
|
|
50
|
+
| Branch has an active PR | Stay on the PR branch and report it; never rename a branch backing an active PR. |
|
|
51
|
+
| Current path is a linked worktree | Mutate/switch only the current worktree. Never switch or delete a branch attached to another worktree. |
|
|
52
|
+
| No remote, unsupported remote, or provider authentication unavailable | Stay on the repository trunk. Print `Local-only session: no usable remote merge path; mutations remain on <trunk> and close-session must use its local-only path.` |
|
|
53
|
+
|
|
54
|
+
A usable merge path requires a configured remote on a supported provider (`github.com`, `dev.azure.com`, or `visualstudio.com`) and authenticated provider tooling. A remote URL alone is insufficient. Re-evaluate immediately before the first mutation so a remote added or removed during the read-only portion is handled from observed state.
|
|
55
|
+
|
|
56
|
+
If branch creation/rename is required, complete it before writing the handoff consumed marker or any other file. If the guard cannot determine the current worktree, active-PR state, or merge capability, fail closed without mutation and ask for operator direction.
|
|
57
|
+
|
|
41
58
|
**Drift Check (run before deep context gathering):**
|
|
42
59
|
|
|
43
60
|
Run the `spell-check-drift` spell first, before building the state snapshot or gathering deep context. Drift compounds the longer a session runs, so catch it early.
|
|
@@ -52,13 +69,11 @@ Then produce output in this exact structure:
|
|
|
52
69
|
|
|
53
70
|
Before anything else, check:
|
|
54
71
|
|
|
55
|
-
- **Current branch:** Run `git branch --show-current`
|
|
56
|
-
- If this is a worktree-backed session, staying on the topic branch is expected (do not require switching to `main`).
|
|
57
|
-
- If not worktree-backed, warn the user and suggest switching back to `main`.
|
|
72
|
+
- **Current branch:** Run `git branch --show-current` and `git worktree list`. Report the current state; do not switch during this read-only check. Branch creation/switching is owned by the lazy Mutation Guard.
|
|
58
73
|
- **Session branch naming compliance:** Branch names must be human-readable and policy-compliant:
|
|
59
74
|
- Interactive session default: `sessions/YYYY-MM-DD-<topic-slug>` (kebab-case topic from current task/session objective).
|
|
60
75
|
- Disallow random adjective-noun generator names (example: `ideal-disco`) as session defaults.
|
|
61
|
-
- If current branch is non-compliant and no active PR depends on it,
|
|
76
|
+
- If current branch is non-compliant and no active PR depends on it, record the required rename for the Mutation Guard. Do not rename during a read-only session.
|
|
62
77
|
- If an active PR uses the old branch name, do not force-delete the old remote branch; flag it and continue with a follow-up rename plan.
|
|
63
78
|
- **Stale local branches:** Run `git branch --merged main` to list branches already merged that should be deleted.
|
|
64
79
|
- **Tracker configuration check (early):** resolve active tracking settings before planning. Read `.arcane.json` first (if present), then the current feature PRD frontmatter if available:
|