arcane-cli 0.22.10 → 0.22.12
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/dist/assets/.github/prompts/spell-architect.prompt.md +1 -1
- package/dist/assets/.github/prompts/spell-close-session.prompt.md +6 -3
- package/dist/assets/.github/prompts/spell-explain-concept.prompt.md +1 -1
- package/dist/assets/.github/prompts/spell-open-session.prompt.md +2 -2
- package/dist/assets/.github/prompts/spell-scope.prompt.md +1 -1
- package/dist/assets/.github/prompts/spell-security-review.prompt.md +22 -0
- package/dist/assets/ai-context/system-prompt-context.md +14 -8
- package/package.json +1 -1
|
@@ -112,5 +112,5 @@ Workflow:
|
|
|
112
112
|
Rules:
|
|
113
113
|
- Stories must be right-sized per the methodology doc (not "build the entire dashboard").
|
|
114
114
|
- Architecture decisions must reference existing ADRs when relevant.
|
|
115
|
-
- Use Mermaid for all diagrams.
|
|
115
|
+
- Use Mermaid for all diagrams, per rule 8 (`.arcane/governance/universal-agent-rules.md`) — this spell's component/data-flow diagrams are agent-authored design output, not the generated-state-diagrams sub-convention ARC-036 covers.
|
|
116
116
|
- If PRD scope is too large, recommend splitting before proceeding.
|
|
@@ -66,6 +66,8 @@ Workflow:
|
|
|
66
66
|
- Keep unresolved items open.
|
|
67
67
|
- Remove completed checklist items only when completion is documented in the correct source-of-truth file.
|
|
68
68
|
|
|
69
|
+
4b. **Register unfinished, task-bearing work on a durable surface (session handoff durability, ARC-040) before the handoff is written.** Enumerate: an incomplete `Active task`, the `Next concrete action`, and any content that would otherwise live only in `Notes` because it has no other durable home. For each, resolve the sink from `tracking_mode` (per ARC-032): `internal` → the appropriate `TODO.md` (root or venture book); `external` → a work item via the configured `external_provider`, falling back to `TODO.md` when tracker tooling is unavailable this session. Write or update the entry, then carry its location into step 5b so the handoff fields below can name it. Skip this step entirely when nothing is unfinished — a fully clean close has nothing to register.
|
|
70
|
+
|
|
69
71
|
5. **Update [ai-context/system-prompt-context.md](../../ai-context/system-prompt-context.md).**
|
|
70
72
|
- If priorities, environment state, or agent rules changed during the session, update the file to reflect current reality.
|
|
71
73
|
- If no changes are needed, skip this step.
|
|
@@ -80,14 +82,14 @@ In `ai-context/system-prompt-context.md`, replace the existing `## Next Session
|
|
|
80
82
|
> Auto-generated by spell-close-session. Consumed by spell-open-session. Do not edit manually.
|
|
81
83
|
> Generated: YYYY-MM-DD
|
|
82
84
|
|
|
83
|
-
- **Active task:** One-line description of the task that was in progress when this session closed.
|
|
85
|
+
- **Active task:** One-line description of the task that was in progress when this session closed. If incomplete, name where step 4b registered it (e.g. `TODO.md:NNN`).
|
|
84
86
|
- **Last completed step:** The final concrete action taken — include file path or command text. If that action was async work step 1b classified as anything other than `succeeded`, do not describe it as done here — name the action in `dispatched`/in-progress terms (e.g. "Pushed the fix and opened PR #NN" is fine; "Merged PR #NN" is not, unless step 1b confirmed the merge) and let `Pending Verification` carry the actual state.
|
|
85
|
-
- **Next concrete action:** The exact first thing to do at next session start. Be specific: file, command, or decision. Never write "continue work."
|
|
87
|
+
- **Next concrete action:** The exact first thing to do at next session start. Be specific: file, command, or decision. Never write "continue work." Name where step 4b registered it (e.g. `TODO.md:NNN`).
|
|
86
88
|
- **Active files:** Files with uncommitted changes or the focus of the last edit (comma-separated).
|
|
87
89
|
- **Branch:** Output of `git branch --show-current`.
|
|
88
90
|
- **Blockers:** Known unresolved blockers or dependencies. Write "None" if clear.
|
|
89
91
|
- **Pending Verification:** One line per non-`succeeded` item from step 1b: `<what> — <state> — <verification action>`. States: `dispatched`, `pending`, `failed`, `unverifiable` (never list a `succeeded` item here — it belongs in `Last completed step` / TODO.md / the journal instead, worded per the gating above). The verification action is required for `dispatched`, `pending`, and `unverifiable` — "N/A" is only valid for `failed`, where the state is already resolved and there is nothing left to check. Write "None" only if step 1b found every dispatched item resolved to `succeeded` or `failed` before this handoff was written.
|
|
90
|
-
- **Notes:** Anything time-sensitive, fragile, or contextual that would be lost if not stated explicitly.
|
|
92
|
+
- **Notes:** Anything time-sensitive, fragile, or contextual that would be lost if not stated explicitly. Never the sole carrier of durable content (session handoff durability) — if it names unfinished work, that work must also be registered per step 4b; name its location here.
|
|
91
93
|
```
|
|
92
94
|
|
|
93
95
|
Rules:
|
|
@@ -251,6 +253,7 @@ Route the user to the right next spell based on the end state:
|
|
|
251
253
|
Rules:
|
|
252
254
|
|
|
253
255
|
- Do not invent completions — only mark items done if verifiable from context. "Verifiable" means classified `succeeded` under step 1b's five-state vocabulary (`dispatched`/`pending`/`succeeded`/`failed`/`unverifiable`), not merely "I can see it was started" (EF-21).
|
|
256
|
+
- `Notes` is a pointer, never the sole carrier of durable content (session handoff durability) — if something needs to survive to next session, it must also live wherever step 4b registers it, not only in prose here.
|
|
254
257
|
- Keep frontmatter date values in `YYYY-MM-DD`.
|
|
255
258
|
- Preserve existing checklist and journal style.
|
|
256
259
|
- Keep edits minimal and factual.
|
|
@@ -21,7 +21,7 @@ Follow these rules strictly:
|
|
|
21
21
|
|
|
22
22
|
1. **Start with the one-sentence answer.** What is it, or why does it happen? No preamble.
|
|
23
23
|
2. **Use analogies from the user's world** — relate to tools, systems, or workflows they already use (their editor, their chat/notification tooling, their own agents, their own infrastructure). Check the workspace for context about the user's setup.
|
|
24
|
-
3. **Use diagrams
|
|
24
|
+
3. **Use diagrams per rule 8** (`.arcane/governance/universal-agent-rules.md`) — Mermaid sequence diagrams for flows, flowcharts for decision trees. Don't use diagrams for simple definitions.
|
|
25
25
|
4. **Show the "so what?"** — connect the explanation to what the user can *do* with this knowledge. What decisions does it unlock? What options does it create?
|
|
26
26
|
5. **Name the moving parts** with a summary table when there are multiple components, layers, or options to compare.
|
|
27
27
|
6. **Use real examples from their system** — reference actual agent names, actual config files, actual commands. Don't use generic placeholders when specific is available.
|
|
@@ -34,9 +34,9 @@ Use these files first:
|
|
|
34
34
|
|
|
35
35
|
Check `ai-context/system-prompt-context.md` for a `## Next Session Handoff` section.
|
|
36
36
|
|
|
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.
|
|
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 — include `Last completed step`, `Blockers`, and `Notes` verbatim alongside the rest (session handoff durability: these three are written by close-session but were previously never read back). 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
38
|
- **If the handoff's `Pending Verification` field lists anything other than "None" (EF-21):** surface each listed item explicitly, then actively re-check its current status (per the item's stated verification action) rather than treating the state recorded at close-session time as still current — a `dispatched`/`pending` item may have since succeeded, failed, or still be running, and carrying it forward as inert text would repeat the exact failure mode this field exists to prevent. Report what you found (resolved succeeded / resolved failed / still pending / still unverifiable) before relying on anything downstream that depended on it.
|
|
39
|
-
- After surfacing it, apply the Mutation Guard below before
|
|
39
|
+
- After surfacing it, apply the Mutation Guard below, then run the **Durability check** (session handoff durability, ARC-040): confirm that an incomplete `Active task`, the `Next concrete action`, and any task-bearing `Notes` content each name a durable location that genuinely exists (the cited `TODO.md` line, or tracker work item). If a named location is missing, or close-session's own step 4b was skipped when it shouldn't have been, register the missing content now — on this session's own branch — before proceeding. Only then append `> ✓ Consumed: YYYY-MM-DD` (today's date); the marker write is a repository mutation. If the Durability check cannot complete, leave the handoff unconsumed so the next open-session retries the same check idempotently, rather than silently losing the gap.
|
|
40
40
|
- If the section is absent or already marked consumed: skip this step and proceed with the normal workspace scan.
|
|
41
41
|
|
|
42
42
|
## Mutation Guard (run lazily before the first repository write)
|
|
@@ -175,7 +175,7 @@ Flag any epics that need **multiple roles** (e.g., a full-stack feature = backen
|
|
|
175
175
|
|
|
176
176
|
### 7. Dependency Graph
|
|
177
177
|
|
|
178
|
-
Produce a Mermaid diagram showing epic execution order:
|
|
178
|
+
Produce a Mermaid diagram (per rule 8) showing epic execution order — an agent-authored planning diagram, not the generated-state-diagrams sub-convention ARC-036 covers, since the ordering is this spell's own design output rather than already-computed state:
|
|
179
179
|
|
|
180
180
|
```mermaid
|
|
181
181
|
flowchart LR
|
|
@@ -30,6 +30,25 @@ Workflow:
|
|
|
30
30
|
- Full project audit
|
|
31
31
|
- Particular area of concern (auth, payments, data handling)
|
|
32
32
|
|
|
33
|
+
1a. **Map trust boundaries and data flow** — before running the checklists below, sketch how data crosses trust zones (external actors, the auth boundary, internal services, data stores). This is agent-authored analysis under rule 8 (`.arcane/governance/universal-agent-rules.md`), not the generated-state-diagrams sub-convention ARC-036 covers — there is no already-computed trust-boundary state to read back, only the agent's own reasoning about the code. Use a Mermaid flowchart with a subgraph per trust zone:
|
|
34
|
+
|
|
35
|
+
```mermaid
|
|
36
|
+
flowchart LR
|
|
37
|
+
subgraph External [Untrusted]
|
|
38
|
+
User[User / Client]
|
|
39
|
+
end
|
|
40
|
+
subgraph Boundary [Trust Boundary: Auth]
|
|
41
|
+
API[API Layer]
|
|
42
|
+
end
|
|
43
|
+
subgraph Internal [Trusted]
|
|
44
|
+
DB[(Data Store)]
|
|
45
|
+
end
|
|
46
|
+
User -->|request| API
|
|
47
|
+
API -->|authenticated query| DB
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Skip this step when the review scope doesn't cross any trust boundary — a single internal utility with no new external interaction, no new data store, and no new auth flow has nothing to diagram.
|
|
51
|
+
|
|
33
52
|
2. **OWASP Top 10 checklist** — check each category:
|
|
34
53
|
|
|
35
54
|
| # | Category | Check |
|
|
@@ -81,6 +100,9 @@ Workflow:
|
|
|
81
100
|
**Date:** [timestamp]
|
|
82
101
|
**Scope:** [What was reviewed]
|
|
83
102
|
|
|
103
|
+
### Trust Boundary / Data Flow
|
|
104
|
+
[Mermaid flowchart from step 1a — omit this section entirely if step 1a was skipped]
|
|
105
|
+
|
|
84
106
|
### OWASP Top 10 Results
|
|
85
107
|
| Category | Status | Findings |
|
|
86
108
|
| ------------------------- | --------- | --------- |
|
|
@@ -23,11 +23,17 @@
|
|
|
23
23
|
|
|
24
24
|
## Next Session Handoff
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
**Active
|
|
30
|
-
**
|
|
31
|
-
**
|
|
32
|
-
**
|
|
33
|
-
**
|
|
26
|
+
> Auto-generated by spell-close-session. Consumed by spell-open-session. Do not edit manually.
|
|
27
|
+
> Generated: YYYY-MM-DD
|
|
28
|
+
|
|
29
|
+
- **Active task:** None yet.
|
|
30
|
+
- **Last completed step:** Initial scaffold via `spell init`.
|
|
31
|
+
- **Next concrete action:** Begin work.
|
|
32
|
+
- **Active files:** —
|
|
33
|
+
- **Branch:** main
|
|
34
|
+
- **Blockers:** None.
|
|
35
|
+
- **Pending Verification:** None.
|
|
36
|
+
- **Notes:** —
|
|
37
|
+
|
|
38
|
+
> ✓ Consumed: YYYY-MM-DD — scaffold placeholder, not a real session; ships pre-consumed so the first
|
|
39
|
+
> real spell-open-session run does not mistake this for live handoff content.
|