arcane-cli 1.6.0 → 1.8.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/dist/assets/.arcane/governance/decision-documentation-standard.md +37 -1
- package/dist/assets/.arcane/governance/development-methodology.md +20 -0
- package/dist/assets/.arcane/governance/spell-authoring-standards.md +32 -0
- package/dist/assets/.arcane/spells/_fragments/needs-you.md +14 -0
- package/dist/assets/.arcane/spells/spell-address-review.md +18 -0
- package/dist/assets/.arcane/spells/spell-adopt-docs.md +17 -0
- package/dist/assets/.arcane/spells/spell-arcane-version.md +26 -0
- package/dist/assets/.arcane/spells/spell-architect.md +17 -0
- package/dist/assets/.arcane/spells/spell-close-session.md +52 -2
- package/dist/assets/.arcane/spells/spell-commit-work.md +17 -0
- package/dist/assets/.arcane/spells/spell-create-pull-request.md +17 -0
- package/dist/assets/.arcane/spells/spell-eas-store-deploy.md +23 -0
- package/dist/assets/.arcane/spells/spell-feedback.md +9 -0
- package/dist/assets/.arcane/spells/spell-full-cycle.md +18 -0
- package/dist/assets/.arcane/spells/spell-make-discoverable.md +17 -0
- package/dist/assets/.arcane/spells/spell-manifest.md +18 -0
- package/dist/assets/.arcane/spells/spell-open-session.md +23 -0
- package/dist/assets/.arcane/spells/spell-plan.md +17 -0
- package/dist/assets/.arcane/spells/spell-review-batch.md +17 -0
- package/dist/assets/.arcane/spells/spell-review.md +18 -1
- package/dist/assets/.arcane/spells/spell-save-idea.md +2 -0
- package/dist/assets/.arcane/spells/spell-scope.md +17 -0
- package/dist/assets/.arcane/spells/spell-ship.md +17 -0
- package/dist/assets/.arcane/spells/spell-sync-pull-request.md +18 -0
- package/dist/assets/.arcane/spells/spell-todo.md +84 -2
- package/dist/assets/ai-context/system-prompt-context.md +1 -0
- package/dist/index.js +317 -64
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -36,7 +36,43 @@ Arcane separates framework-level decisions from org-specific ones using two pref
|
|
|
36
36
|
- If the decision would apply to any organization using Arcane, it is `ARC-NNN`.
|
|
37
37
|
- If the decision is specific to how your organization operates, it is `ADR-NNN`.
|
|
38
38
|
- When uncertain, default to `ADR-NNN` in ops; promote to `ARC-NNN` later if the decision proves framework-generic. **Enforcement: explicitly advisory prose (ARC-023) — whether a decision is framework-generic enough for `ARC-NNN` (this rule and the two prefix-scoping rules above) is a judgment call; no script evaluates a decision's content to confirm the chosen prefix.**
|
|
39
|
-
- Never renumber existing entries in either sequence. **Enforcement: explicitly advisory prose (ARC-023) — `scripts/check-distributed-adr-references.ts` only verifies that a bare `ADR-NNN` citation resolves to a heading declared in `framework-decisions.md` (and separately flags certain `ARC-NNN`/`EF-NNN` link forms as cross-repo hazards); it never checks that numbers are sequential, unique, or never reused.**
|
|
39
|
+
- Never renumber existing entries in either sequence. **Enforcement: explicitly advisory prose (ARC-023) — `scripts/check-distributed-adr-references.ts` only verifies that a bare `ADR-NNN` citation resolves to a heading declared in `framework-decisions.md` (and separately flags certain `ARC-NNN`/`EF-NNN` link forms as cross-repo hazards); it never checks that numbers are sequential, unique, or never reused. Uniqueness alone has an executable check in Arcane's own repository only: `scripts/check-stale-claims.ts` (run in CI as `npm run check:stale-claims`) fails when two decision headings in its `DECISIONS.md` share an ID (ARC-050). That check does not ship to consuming repositories, and it cannot tell a renumbered entry from a new one.**
|
|
40
|
+
|
|
41
|
+
## Allocating Decision Numbers
|
|
42
|
+
|
|
43
|
+
Decision numbers are a shared sequence (ARC-028 R4). Two sessions on separate branches that each take
|
|
44
|
+
"the next number" both take the same one. The collision surfaces at merge, or never, and
|
|
45
|
+
cross-references then point at the wrong decision. ARC-050 sets how a number is allocated:
|
|
46
|
+
|
|
47
|
+
1. **Fetch, then take the maximum.** Before allocating a decision number, fetch the trunk when a
|
|
48
|
+
usable remote exists. "Usable" is the classification `spell-open-session`'s Mutation Guard uses: a
|
|
49
|
+
supported provider with authenticated provider tooling, where a remote URL alone is not enough.
|
|
50
|
+
Then allocate `max(highest number on the local branch, highest number on the remote trunk) + 1`.
|
|
51
|
+
2. **A local-only repository allocates from the local maximum and says so**, so the number is
|
|
52
|
+
visibly unchecked against any other branch.
|
|
53
|
+
|
|
54
|
+
**Enforcement (rules 1 and 2): structured spell gate (ARC-023) — `spell-close-session` step 3
|
|
55
|
+
requires the observed trunk maximum, or its stated local-only line, before it writes a new entry.
|
|
56
|
+
A decision written outside that spell, by hand or by another workflow, follows these rules as
|
|
57
|
+
explicitly advisory prose: nothing else fetches or compares for it.**
|
|
58
|
+
3. **No reservation markers.** Never commit a placeholder or "reserved" entry to claim a number. A
|
|
59
|
+
marker is itself an edit to the same shared sequence, so it collides the same way. **Enforcement:
|
|
60
|
+
explicitly advisory prose (ARC-023) — no script recognizes a placeholder entry as a reservation.**
|
|
61
|
+
4. **Several decisions at once are allocated once.** A program that drafts several decisions
|
|
62
|
+
allocates all of them at the start of the wave that needs them, from the fetched trunk. Its
|
|
63
|
+
parallel lanes use those numbers and never allocate their own. A single session that records
|
|
64
|
+
several decisions allocates them consecutively from one fetched maximum. **Enforcement:
|
|
65
|
+
explicitly advisory prose (ARC-023) — no spell gate or script tracks which numbers a program
|
|
66
|
+
pre-allocated.**
|
|
67
|
+
5. **When a collision still happens, the unmerged branch renumbers.** Fetching narrows the race but
|
|
68
|
+
does not close it: two sessions can fetch before either pushes. "Never renumber existing entries"
|
|
69
|
+
applies to merged entries. When two branches hold the same number, the branch that has not merged
|
|
70
|
+
yet renumbers its own entry and every reference to it on that branch. **Enforcement: explicitly
|
|
71
|
+
advisory prose (ARC-023) for the renumbering — no script performs it or checks which branch did
|
|
72
|
+
it. Detecting the collision is an executable check in Arcane's own repository only:
|
|
73
|
+
`scripts/check-stale-claims.ts`, run in CI as `npm run check:stale-claims`, fails when two
|
|
74
|
+
decision headings share an ID. It matches any `## <PREFIX>-<number>` heading, not only `ARC`, so
|
|
75
|
+
a consuming repository can adopt it, but it is not installed there.**
|
|
40
76
|
|
|
41
77
|
## Problem Statement
|
|
42
78
|
|
|
@@ -161,6 +161,26 @@ GitHub Issues has no configurable work-item-type hierarchy the way Azure DevOps
|
|
|
161
161
|
- **Jira (`external_provider=jira`)** — TODO: define issue-type mapping, parent-child/epic linkage strategy, and command examples.
|
|
162
162
|
- **Other providers (`external_provider=other`)** — TODO: define required metadata contract and fallback behavior before enabling automation.
|
|
163
163
|
|
|
164
|
+
### Tracker-ID Suffix on Captured Items
|
|
165
|
+
|
|
166
|
+
When `tracking_mode=external` and a `TODO.md` item or an `IDEAS.md` entry corresponds to a tracker work item that already exists, the item carries that work item's id as a suffix, in the provider's own reference format. This is the one definition of the suffix; `spell-todo`, `spell-save-idea` and `spell-manifest` point here rather than restating it.
|
|
167
|
+
|
|
168
|
+
| `external_provider` | Suffix | Example |
|
|
169
|
+
| --- | --- | --- |
|
|
170
|
+
| `github` | `[#<number>]` | `- [ ] Add export button [#123]` |
|
|
171
|
+
| `ado` | `[AB#<id>]` | `- [ ] Add export button [AB#123]` |
|
|
172
|
+
| `jira` | `[<issue key>]` — the key exactly as Jira prints it | `- [ ] Add export button [PROJ-123]` |
|
|
173
|
+
| `other` | no suffix until that provider's metadata contract is defined (see External Provider TODOs) | — |
|
|
174
|
+
|
|
175
|
+
- **Placement:** at the end of the item's text, after any file reference, and before a trailing `<!-- status: … -->` comment on an idea entry.
|
|
176
|
+
- **Only a real id:** the suffix records an id that exists — one the operator supplied, or one a spell just got back from the tracker. Never guess an id, and never file a work item just to have a suffix.
|
|
177
|
+
- **One suffix per item:** an item that already carries a suffix keeps it; it is not duplicated or rewritten.
|
|
178
|
+
- **`tracking_mode=internal`:** no suffix. Items are written exactly as they are without this section.
|
|
179
|
+
|
|
180
|
+
The suffix uses the same reference forms as the commit-link syntax `spell-bug` writes (`Fixes AB#{id}` for Azure DevOps, `Fixes #{id}` for GitHub Issues — the GitHub form is also under GitHub Issues Conventions above), so an item and the commit that closes it point at the work item the same way.
|
|
181
|
+
|
|
182
|
+
**Enforcement: explicitly advisory prose (ARC-023) — no script checks that an externally tracked item carries its suffix or that a suffix matches the provider's format; the three spells apply it at write time and compliance depends on the executing agent.**
|
|
183
|
+
|
|
164
184
|
### Fresh Context Per Iteration
|
|
165
185
|
|
|
166
186
|
Each implementation iteration starts with clean context. The only memory between iterations is:
|
|
@@ -213,6 +213,38 @@ Arcane's own repository, a test (`test/up02-d-runtime-placeholders.test.ts`) fai
|
|
|
213
213
|
`status: active` governance document uses a token that is not in this list. Whether an agent actually
|
|
214
214
|
resolves a listed token from the named source is explicitly advisory prose: no check exercises it.**
|
|
215
215
|
|
|
216
|
+
## Required operator actions: the `Needs you` block
|
|
217
|
+
|
|
218
|
+
Some runs end with an action only the operator can take: approving or merging a pull request,
|
|
219
|
+
accepting a decision record, answering a question the work is waiting on, confirming a `guarded`
|
|
220
|
+
push, running an interactive command such as `spell unblock-push`, or a step on an external platform
|
|
221
|
+
the agent cannot reach. Listed among optional next steps, such an action gets skimmed past. A spell
|
|
222
|
+
whose output can carry one reports it in one fixed block instead:
|
|
223
|
+
|
|
224
|
+
- **One fixed heading,** `## ⚠ Needs you`, at the very top of the final report, before every other
|
|
225
|
+
section and before any optional next step.
|
|
226
|
+
- **One line per action:** exactly what to do, then why the agent cannot do it itself.
|
|
227
|
+
- **Never only among optional steps:** an action required for correctness may be repeated under next
|
|
228
|
+
steps or suggestions, but it always appears in the block.
|
|
229
|
+
- **Omitted when empty:** when nothing needs the operator, the block is left out entirely, never
|
|
230
|
+
printed as an empty heading or a "None" line.
|
|
231
|
+
|
|
232
|
+
The block's wording lives in one shared prose fragment (ARC-039), `needs-you`, kept in Arcane's
|
|
233
|
+
source under `.arcane/spells/_fragments/` and never shipped on its own. A spell carries it as a
|
|
234
|
+
`<!-- fragment:needs-you:start -->` / `<!-- fragment:needs-you:end -->` marker pair placed where the
|
|
235
|
+
spell describes its final output or report, and `npm run fix:self-host-parity` expands the fragment
|
|
236
|
+
between the markers. Edit the fragment, never an expanded copy, and never restate its rules by hand
|
|
237
|
+
in a spell body. Required actions also survive the end of a session: `spell-close-session` writes
|
|
238
|
+
the open items into the handoff's `Needs you` field, and `spell-open-session` surfaces that field
|
|
239
|
+
first, above the rest of the handoff, and does not mark the handoff consumed until it has.
|
|
240
|
+
|
|
241
|
+
**Enforcement: executable check (ARC-023) for the wording — in Arcane's own repository,
|
|
242
|
+
`npm run check:self-host-parity` fails CI when a spell's expanded span differs from the fragment, and
|
|
243
|
+
a test (`test/up04-b-needs-you.test.ts`) fails when the fragment loses its heading, placement or
|
|
244
|
+
omit-when-empty rule, or when a spell in the chosen set loses its span. Which spells carry the span
|
|
245
|
+
is decided by an author's judgment, and whether an agent actually emits the block is explicitly
|
|
246
|
+
advisory prose: no check reads a spell's output.**
|
|
247
|
+
|
|
216
248
|
## How to audit a spell
|
|
217
249
|
|
|
218
250
|
For each dimension, score Bronze/Silver/Gold with one line of evidence. Record the overall (weakest)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
**Needs you — required operator actions.** When this run leaves an action that only the operator can take, and the work is not correct or complete until it is taken, report it in one block at the very top of the final report, before every other section and before any optional next step:
|
|
2
|
+
|
|
3
|
+
```markdown
|
|
4
|
+
## ⚠ Needs you
|
|
5
|
+
|
|
6
|
+
- <exactly what to do: the command, the link, or the question> — <why the agent cannot do it itself>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
- **What belongs in it:** an action the work needs that only the operator can take — approving or merging a pull request, accepting a decision record, answering a question the work is waiting on, confirming a `guarded` push, running an interactive command such as `spell unblock-push`, or a step on an external platform the agent cannot reach. An optional suggestion, a next spell to run, or anything the agent could do itself is not a required action and stays out of the block.
|
|
10
|
+
- **One line per action.** Say exactly what to do, then, after the dash, why the agent cannot do it. Write the command, link or question out in full; never point elsewhere with "see above".
|
|
11
|
+
- **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
|
|
12
|
+
- **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
|
|
13
|
+
- **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
|
|
14
|
+
- Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
|
|
@@ -114,6 +114,24 @@ Resolve threads via the provider:
|
|
|
114
114
|
|
|
115
115
|
3. `git push` all commits.
|
|
116
116
|
4. 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).
|
|
117
|
+
|
|
118
|
+
<!-- fragment:needs-you:start -->
|
|
119
|
+
**Needs you — required operator actions.** When this run leaves an action that only the operator can take, and the work is not correct or complete until it is taken, report it in one block at the very top of the final report, before every other section and before any optional next step:
|
|
120
|
+
|
|
121
|
+
```markdown
|
|
122
|
+
## ⚠ Needs you
|
|
123
|
+
|
|
124
|
+
- <exactly what to do: the command, the link, or the question> — <why the agent cannot do it itself>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
- **What belongs in it:** an action the work needs that only the operator can take — approving or merging a pull request, accepting a decision record, answering a question the work is waiting on, confirming a `guarded` push, running an interactive command such as `spell unblock-push`, or a step on an external platform the agent cannot reach. An optional suggestion, a next spell to run, or anything the agent could do itself is not a required action and stays out of the block.
|
|
128
|
+
- **One line per action.** Say exactly what to do, then, after the dash, why the agent cannot do it. Write the command, link or question out in full; never point elsewhere with "see above".
|
|
129
|
+
- **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
|
|
130
|
+
- **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
|
|
131
|
+
- **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
|
|
132
|
+
- Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
|
|
133
|
+
<!-- fragment:needs-you:end -->
|
|
134
|
+
|
|
117
135
|
5. Optionally post the summary back to the PR as a top-level comment for a durable record.
|
|
118
136
|
|
|
119
137
|
## Rules
|
|
@@ -134,6 +134,23 @@ Hard rules for this phase:
|
|
|
134
134
|
|
|
135
135
|
## Phase 4 — Report
|
|
136
136
|
|
|
137
|
+
<!-- fragment:needs-you:start -->
|
|
138
|
+
**Needs you — required operator actions.** When this run leaves an action that only the operator can take, and the work is not correct or complete until it is taken, report it in one block at the very top of the final report, before every other section and before any optional next step:
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
## ⚠ Needs you
|
|
142
|
+
|
|
143
|
+
- <exactly what to do: the command, the link, or the question> — <why the agent cannot do it itself>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
- **What belongs in it:** an action the work needs that only the operator can take — approving or merging a pull request, accepting a decision record, answering a question the work is waiting on, confirming a `guarded` push, running an interactive command such as `spell unblock-push`, or a step on an external platform the agent cannot reach. An optional suggestion, a next spell to run, or anything the agent could do itself is not a required action and stays out of the block.
|
|
147
|
+
- **One line per action.** Say exactly what to do, then, after the dash, why the agent cannot do it. Write the command, link or question out in full; never point elsewhere with "see above".
|
|
148
|
+
- **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
|
|
149
|
+
- **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
|
|
150
|
+
- **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
|
|
151
|
+
- Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
|
|
152
|
+
<!-- fragment:needs-you:end -->
|
|
153
|
+
|
|
137
154
|
Output:
|
|
138
155
|
|
|
139
156
|
```
|
|
@@ -70,6 +70,32 @@ If the npm registry is unreachable, report:
|
|
|
70
70
|
ℹ Could not reach npm registry — update check skipped.
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
### Setup questions from an AI harness (no interactive terminal, PRD D-02 / #282)
|
|
74
|
+
|
|
75
|
+
This spell itself stays read-only. If the operator then asks you to run `spell update`, note that a
|
|
76
|
+
harness shell is not an interactive terminal. The CLI then skips every unanswered manifest question
|
|
77
|
+
and prints ``! Skipped N manifest question(s) (<fields>) — no interactive terminal. Run `spell update` from a terminal, or answer by flags:``,
|
|
78
|
+
followed by the exact line to re-run, such as
|
|
79
|
+
`spell update --tracking-mode <internal|external> --push-policy <open|guarded|blocked>`.
|
|
80
|
+
`spell init --profile <profile>` prints the same kind of `spell update` line when it leaves
|
|
81
|
+
questions unanswered. Do not send the operator off to find a terminal. Instead:
|
|
82
|
+
|
|
83
|
+
1. Ask the operator each skipped question through the harness's own question UI (a plain chat
|
|
84
|
+
question if the harness has none): one question per flag the CLI printed, offering exactly the
|
|
85
|
+
values that flag lists. The flags are `--role`, `--tracking-mode`, `--external-provider`,
|
|
86
|
+
`--content-sensitivity`, `--push-policy` and `--subject-root`. `--tracking-mode external` also
|
|
87
|
+
needs `--external-provider <ado|github|jira|other>`, so ask that too when the answer is
|
|
88
|
+
`external`.
|
|
89
|
+
2. Re-run `spell update` with the flags the CLI printed, filled with the operator's answers, for
|
|
90
|
+
example `spell update --tracking-mode internal --push-policy guarded`.
|
|
91
|
+
3. Never pass a flag the operator did not answer. No guessed, default or "recommended" value stands
|
|
92
|
+
in for an answer. An unanswered question stays unset: the next interactive run asks it, and the
|
|
93
|
+
next harness run reports it skipped again.
|
|
94
|
+
4. Never loosen `push_policy` by flag. `--push-policy` only answers an unset question or tightens a
|
|
95
|
+
recorded policy, and the CLI refuses a loosening. Moving a repository from `blocked` or `guarded`
|
|
96
|
+
toward `open` is only ever `spell unblock-push`, which the operator runs from an interactive
|
|
97
|
+
terminal (ARC-034 decision 6, ARC-049 decision 6). Tell them so; do not try to run it for them.
|
|
98
|
+
|
|
73
99
|
## Step 3 — Component Detail (optional)
|
|
74
100
|
|
|
75
101
|
Only include this section when the user passed "components" as the prompt argument.
|
|
@@ -110,6 +110,23 @@ Workflow:
|
|
|
110
110
|
|
|
111
111
|
8. **Present for review** — show the architecture and story breakdown to the user.
|
|
112
112
|
|
|
113
|
+
<!-- fragment:needs-you:start -->
|
|
114
|
+
**Needs you — required operator actions.** When this run leaves an action that only the operator can take, and the work is not correct or complete until it is taken, report it in one block at the very top of the final report, before every other section and before any optional next step:
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
## ⚠ Needs you
|
|
118
|
+
|
|
119
|
+
- <exactly what to do: the command, the link, or the question> — <why the agent cannot do it itself>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
- **What belongs in it:** an action the work needs that only the operator can take — approving or merging a pull request, accepting a decision record, answering a question the work is waiting on, confirming a `guarded` push, running an interactive command such as `spell unblock-push`, or a step on an external platform the agent cannot reach. An optional suggestion, a next spell to run, or anything the agent could do itself is not a required action and stays out of the block.
|
|
123
|
+
- **One line per action.** Say exactly what to do, then, after the dash, why the agent cannot do it. Write the command, link or question out in full; never point elsewhere with "see above".
|
|
124
|
+
- **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
|
|
125
|
+
- **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
|
|
126
|
+
- **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
|
|
127
|
+
- Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
|
|
128
|
+
<!-- fragment:needs-you:end -->
|
|
129
|
+
|
|
113
130
|
Rules:
|
|
114
131
|
- Stories must be right-sized per the methodology doc (not "build the entire dashboard").
|
|
115
132
|
- Architecture decisions must reference existing ADRs when relevant.
|
|
@@ -53,13 +53,39 @@ Workflow:
|
|
|
53
53
|
- Journal entries must include:
|
|
54
54
|
- `### Prompt Context` — original prompt text or a faithful paraphrase of the multi-turn request when the session began from a substantive user ask. Include follow-up scope inputs if they materially changed the direction of the work.
|
|
55
55
|
- `### What Got Done` — numbered list of concrete outcomes with file/ADR references. Only list an outcome here if step 1b classified it `succeeded` (or it never involved async work at all, e.g. a local file edit). A `pending`/`dispatched`/`unverifiable` item belongs in Open Items Carried Forward, not here — do not let this section imply completion step 1b couldn't confirm.
|
|
56
|
-
- `### Decisions Made` — table of ADR number, decision, and rationale. If no decisions were made, omit this section.
|
|
56
|
+
- `### Decisions Made` — table of ADR number, decision, and rationale. If no decisions were made, omit this section. Take every number in this table from step 3's allocation rule (ARC-050). If step 3 has not allocated yet, run that allocation now and use the same numbers in both places. Never write a number from memory or from this branch's `DECISIONS.md` alone.
|
|
57
57
|
- `### Lessons Learned` — one heading per lesson with enough context to prevent the mistake again. Use narrative, not bullet fragments.
|
|
58
58
|
- `### Open Items Carried Forward` — items that remain undone from this session, including every `pending`/`dispatched`/`failed`/`unverifiable` item from step 1b.
|
|
59
59
|
|
|
60
|
+
2b. **Lesson routing: send each lesson where it can be acted on.** A lesson left only in the journal never reaches the people who could fix its cause. Skip this step when step 2 wrote no `### Lessons Learned`, or when the invocation includes `--no-route`. With `--no-route`, the lessons stay in the journal only; say `Lesson routing skipped (--no-route)` in the closure report.
|
|
61
|
+
- **Classify each lesson** written in step 2 into exactly one class:
|
|
62
|
+
- **Framework-shaped:** the fix belongs in Arcane itself, meaning a spell prompt, template, governance doc, playbook, or CLI behavior this repository installed rather than authored. This is `spell-feedback` Step 3's definition. Destination: `FEEDBACK.md`, queued for upstream.
|
|
63
|
+
- **Product idea:** the lesson suggests something to build in this repository's own product. Destination: `spell-save-idea`.
|
|
64
|
+
- **Repo-local:** anything about this repository's own content, configuration, or way of working. Destination: the journal only. It is already there, so nothing more is written.
|
|
65
|
+
- **Show one batch proposal and ask once.** List every lesson with its class and destination, then ask a single question: `Route these lessons? (yes / edit / skip)`. `edit` lets the operator change a class or drop a lesson, then shows the proposal again. Route nothing before an explicit `yes`. A timeout, a cancellation, a delegated or host-generated response, or assent given to something else is not approval. Neither is an autonomous run with no operator to ask. In each of those cases route nothing, keep the lessons in the journal, and list the proposal in the closure report as not routed. `skip` is a complete, valid answer.
|
|
66
|
+
- **Framework-shaped, after `yes`:** append **one** block to `FEEDBACK.md` at the repository root, in `spell-feedback`'s Step 5 block format. Create the file with a `# Feedback Log` header first if it is missing. Fill the block this way:
|
|
67
|
+
- Heading: `## Feedback — <the spell or doc the lessons concern, or "Arcane workflow" when they span several> (<YYYY-MM-DD>)`.
|
|
68
|
+
- `**Session:**` names this session and adds `(routed by spell-close-session from Lessons Learned)`.
|
|
69
|
+
- `**Rating:**` and `**Would use again:**` are `N/A`, because nobody rated anything.
|
|
70
|
+
- Friction Points: one line per lesson saying what happened.
|
|
71
|
+
- Improvement Items: one imperative item per lesson, each line ending with `<!-- upstream: queued -->`.
|
|
72
|
+
- Raw Notes: cite the journal file and each lesson's heading.
|
|
73
|
+
- **Product idea, after `yes`:** hand each one to `spell-save-idea` as a one-sentence idea, citing the journal file. That spell appends it to the idea book.
|
|
74
|
+
- **No public write from this step.** Close-session never files an issue and never runs `gh issue create`. It also never runs `spell-feedback`'s Step 6 filing flow. Queuing is the whole outcome here. The `yes` above approves local appends only. Filing upstream still needs `spell-feedback`'s own literal `disclose` confirmation on each item, given in a later `spell-feedback` or `spell-feedback --flush` run, which re-offers every queued item through its genericize-and-`disclose` flow.
|
|
75
|
+
- **Append-only.** Add new entries to `FEEDBACK.md` and the idea book. Never edit, reorder, or remove an existing entry in either.
|
|
76
|
+
- Enforcement: structured spell gate (ARC-023) — nothing is routed without the one explicit batch `yes`, and it fails closed. The no-public-write and append-only rules are explicitly advisory prose: no hook stops this step from running `gh` or rewriting a book, so they hold by the step's own instructions. Classifying a lesson is a judgment call, and the operator checks it at the batch proposal.
|
|
77
|
+
|
|
60
78
|
3. **Update [DECISIONS.md](../../DECISIONS.md).**
|
|
61
79
|
- Add ADRs for any decisions made during the session (naming choices, tool preferences, workflow standards, security policies, etc.).
|
|
62
80
|
- Use the next sequential ADR number.
|
|
81
|
+
- **Allocate that number against the trunk, not only this branch (ARC-050; ARC-028 R4 names decision numbers a shared sequence).** Another session on another branch may already have taken "the next number". Do this immediately before writing the first new entry:
|
|
82
|
+
- **Classify the remote first.** Use the classification from step 9's remote-capability check, which is the same one `spell-open-session`'s Mutation Guard uses. A usable remote is a supported provider (`github.com`, `dev.azure.com`, or `visualstudio.com`) with authenticated provider tooling; a remote URL alone is not enough. Resolve `<remote>` and `<trunk>` from observed state as step 10 does. Never assume `origin` or `main`.
|
|
83
|
+
- **Usable remote: fetch, then take the maximum.** Run `git fetch <remote> <trunk>`. Read the highest decision ID (the number in the log's `## <PREFIX>-NNN` headings) from this branch's `DECISIONS.md`, and from the trunk's copy with `git show <remote>/<trunk>:DECISIONS.md`. A trunk with no `DECISIONS.md` has no maximum. Allocate `max(highest ID on this branch, highest ID on <remote>/<trunk>) + 1`. In the Decision Updates output, name both maxima and the number allocated.
|
|
84
|
+
- **Local-only: allocate from the local maximum and say so.** When there is no usable remote, allocate `highest ID in the local DECISIONS.md + 1`. Say so in the Decision Updates output: `Allocated <PREFIX>-NNN from the local maximum only; not checked against any other branch.` Treat a usable remote whose fetch fails the same way, and name the failed fetch in that line.
|
|
85
|
+
- **Several decisions in one session:** allocate them consecutively from the one maximum you just computed, in a single pass.
|
|
86
|
+
- **No reservation markers.** Never commit a placeholder or "reserved" entry to claim a number before the real entry exists. A marker is itself an edit to the same shared sequence, so it collides the same way.
|
|
87
|
+
- **If a collision still surfaces later** (two sessions fetched before either pushed), the branch that has not merged yet renumbers its own entry and every reference to it on that branch. Merged entries are never renumbered (`decision-documentation-standard.md`).
|
|
88
|
+
- Enforcement: structured spell gate (ARC-023) — this step requires the observed trunk maximum, or the stated local-only line, before a new entry is written. The renumbering rule above is explicitly advisory prose: nothing in this spell detects a collision after the fact.
|
|
63
89
|
- Follow the existing format: Date, Status, Context, Decision, Reasoning, Rejected alternatives.
|
|
64
90
|
|
|
65
91
|
4. **Update [TODO.md](../../TODO.md).**
|
|
@@ -94,6 +120,7 @@ In `ai-context/system-prompt-context.md`, replace the existing `## Next Session
|
|
|
94
120
|
- **Branch:** Output of `git branch --show-current`.
|
|
95
121
|
- **Blockers:** Known unresolved blockers or dependencies. Write "None" if clear.
|
|
96
122
|
- **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.
|
|
123
|
+
- **Needs you:** One line per action only the operator can take that this session leaves open: `<what to do> — <why the agent cannot do it>`. This block is committed before steps 9–10 run, so write it with them in view and name now the actions they will leave open: the pull request step 9c opens needs a human merge, and when `push_policy` (read it now, per step 9c's push-policy check) is `blocked`, or `guarded` in an autonomous run, the push itself waits on the operator. The closure report's `## ⚠ Needs you` block (step 11) lists the same items, plus any that arose after this handoff was committed. Write "None" when nothing needs the operator. Never leave such an action only in `Blockers`, `Notes` or `Carry Forward`; it may be repeated there, but it always appears here.
|
|
97
124
|
- **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.
|
|
98
125
|
```
|
|
99
126
|
|
|
@@ -149,7 +176,7 @@ Rules:
|
|
|
149
176
|
- Timeout, cancellation, fallback, or delegated response is not approval. Print the visible authorization downgrade and halt without committing.
|
|
150
177
|
|
|
151
178
|
c. **Push and open a PR through `spell-commit-work` step 9, including its separate merge gate:**
|
|
152
|
-
- Run the push-policy check before the push. `spell-commit-work` step 9a runs the same check; run it once per push, not twice. It also governs step 10's remote branch deletions. If it stops the push, end the session with the commits local and report them in the PR Readiness section as not pushed.
|
|
179
|
+
- Run the push-policy check before the push. `spell-commit-work` step 9a runs the same check; run it once per push, not twice. It also governs step 10's remote branch deletions. If it stops the push, end the session with the commits local and report them in the PR Readiness section as not pushed, and in the step 11 report's `## ⚠ Needs you` block.
|
|
153
180
|
|
|
154
181
|
<!-- fragment:push-policy-check:start -->
|
|
155
182
|
**Push-policy check (ARC-049) — before any push.** Read `push_policy` from the repository's `.arcane.json` at the repository root (a self-hosted source repository with no root manifest keeps it in `src/assets/.arcane.json` when that file declares `selfHosted: true`). An absent file or an absent field means `open`. The check covers every push this spell makes: a branch push, a `--force-with-lease` push, and a remote branch deletion (`git push <remote> --delete <branch>`).
|
|
@@ -199,6 +226,23 @@ Rules:
|
|
|
199
226
|
|
|
200
227
|
Output format:
|
|
201
228
|
|
|
229
|
+
<!-- fragment:needs-you:start -->
|
|
230
|
+
**Needs you — required operator actions.** When this run leaves an action that only the operator can take, and the work is not correct or complete until it is taken, report it in one block at the very top of the final report, before every other section and before any optional next step:
|
|
231
|
+
|
|
232
|
+
```markdown
|
|
233
|
+
## ⚠ Needs you
|
|
234
|
+
|
|
235
|
+
- <exactly what to do: the command, the link, or the question> — <why the agent cannot do it itself>
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
- **What belongs in it:** an action the work needs that only the operator can take — approving or merging a pull request, accepting a decision record, answering a question the work is waiting on, confirming a `guarded` push, running an interactive command such as `spell unblock-push`, or a step on an external platform the agent cannot reach. An optional suggestion, a next spell to run, or anything the agent could do itself is not a required action and stays out of the block.
|
|
239
|
+
- **One line per action.** Say exactly what to do, then, after the dash, why the agent cannot do it. Write the command, link or question out in full; never point elsewhere with "see above".
|
|
240
|
+
- **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
|
|
241
|
+
- **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
|
|
242
|
+
- **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
|
|
243
|
+
- Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
|
|
244
|
+
<!-- fragment:needs-you:end -->
|
|
245
|
+
|
|
202
246
|
## Session Closure
|
|
203
247
|
|
|
204
248
|
- Summary of what was completed.
|
|
@@ -224,9 +268,15 @@ Output format:
|
|
|
224
268
|
|
|
225
269
|
- Exact file updates made.
|
|
226
270
|
|
|
271
|
+
## Lesson Routing
|
|
272
|
+
|
|
273
|
+
- Each lesson from step 2b with its class and where it went: `FEEDBACK.md` (queued for upstream), `spell-save-idea`, or journal only.
|
|
274
|
+
- Or one of: `Lesson routing skipped (--no-route)`, `No lessons recorded`, or `Not routed (no explicit yes)` followed by the proposal.
|
|
275
|
+
|
|
227
276
|
## Decision Updates
|
|
228
277
|
|
|
229
278
|
- ADRs added or note that none were needed.
|
|
279
|
+
- For each ADR added, how its number was allocated (step 3): `max(<this branch's highest>, <remote>/<trunk>'s highest) + 1`, or the local-only line.
|
|
230
280
|
|
|
231
281
|
## TODO Updates
|
|
232
282
|
|
|
@@ -256,6 +256,23 @@ Workflow:
|
|
|
256
256
|
|
|
257
257
|
Output format after execution:
|
|
258
258
|
|
|
259
|
+
<!-- fragment:needs-you:start -->
|
|
260
|
+
**Needs you — required operator actions.** When this run leaves an action that only the operator can take, and the work is not correct or complete until it is taken, report it in one block at the very top of the final report, before every other section and before any optional next step:
|
|
261
|
+
|
|
262
|
+
```markdown
|
|
263
|
+
## ⚠ Needs you
|
|
264
|
+
|
|
265
|
+
- <exactly what to do: the command, the link, or the question> — <why the agent cannot do it itself>
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
- **What belongs in it:** an action the work needs that only the operator can take — approving or merging a pull request, accepting a decision record, answering a question the work is waiting on, confirming a `guarded` push, running an interactive command such as `spell unblock-push`, or a step on an external platform the agent cannot reach. An optional suggestion, a next spell to run, or anything the agent could do itself is not a required action and stays out of the block.
|
|
269
|
+
- **One line per action.** Say exactly what to do, then, after the dash, why the agent cannot do it. Write the command, link or question out in full; never point elsewhere with "see above".
|
|
270
|
+
- **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
|
|
271
|
+
- **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
|
|
272
|
+
- **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
|
|
273
|
+
- Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
|
|
274
|
+
<!-- fragment:needs-you:end -->
|
|
275
|
+
|
|
259
276
|
## Commit Complete
|
|
260
277
|
|
|
261
278
|
```
|
|
@@ -200,6 +200,23 @@ so they need no edit.
|
|
|
200
200
|
|
|
201
201
|
## Step 6 — Report
|
|
202
202
|
|
|
203
|
+
<!-- fragment:needs-you:start -->
|
|
204
|
+
**Needs you — required operator actions.** When this run leaves an action that only the operator can take, and the work is not correct or complete until it is taken, report it in one block at the very top of the final report, before every other section and before any optional next step:
|
|
205
|
+
|
|
206
|
+
```markdown
|
|
207
|
+
## ⚠ Needs you
|
|
208
|
+
|
|
209
|
+
- <exactly what to do: the command, the link, or the question> — <why the agent cannot do it itself>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
- **What belongs in it:** an action the work needs that only the operator can take — approving or merging a pull request, accepting a decision record, answering a question the work is waiting on, confirming a `guarded` push, running an interactive command such as `spell unblock-push`, or a step on an external platform the agent cannot reach. An optional suggestion, a next spell to run, or anything the agent could do itself is not a required action and stays out of the block.
|
|
213
|
+
- **One line per action.** Say exactly what to do, then, after the dash, why the agent cannot do it. Write the command, link or question out in full; never point elsewhere with "see above".
|
|
214
|
+
- **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
|
|
215
|
+
- **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
|
|
216
|
+
- **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
|
|
217
|
+
- Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
|
|
218
|
+
<!-- fragment:needs-you:end -->
|
|
219
|
+
|
|
203
220
|
```
|
|
204
221
|
✓ PR created: <URL>
|
|
205
222
|
Title: <title>
|
|
@@ -234,6 +234,29 @@ console error stating otherwise (`EV-06`).
|
|
|
234
234
|
- **Locale lists differ between the stores.** Release notes are per-language; resolve locale coverage
|
|
235
235
|
against each store's own catalogue rather than copying the other store's list (`MR-06`).
|
|
236
236
|
|
|
237
|
+
### Reporting the release
|
|
238
|
+
|
|
239
|
+
End every release run with a short report. The store-console steps the agent cannot reach — sending
|
|
240
|
+
staged Google Play changes for review, answering an App Store review question, confirming a manual
|
|
241
|
+
release — are required operator actions:
|
|
242
|
+
|
|
243
|
+
<!-- fragment:needs-you:start -->
|
|
244
|
+
**Needs you — required operator actions.** When this run leaves an action that only the operator can take, and the work is not correct or complete until it is taken, report it in one block at the very top of the final report, before every other section and before any optional next step:
|
|
245
|
+
|
|
246
|
+
```markdown
|
|
247
|
+
## ⚠ Needs you
|
|
248
|
+
|
|
249
|
+
- <exactly what to do: the command, the link, or the question> — <why the agent cannot do it itself>
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
- **What belongs in it:** an action the work needs that only the operator can take — approving or merging a pull request, accepting a decision record, answering a question the work is waiting on, confirming a `guarded` push, running an interactive command such as `spell unblock-push`, or a step on an external platform the agent cannot reach. An optional suggestion, a next spell to run, or anything the agent could do itself is not a required action and stays out of the block.
|
|
253
|
+
- **One line per action.** Say exactly what to do, then, after the dash, why the agent cannot do it. Write the command, link or question out in full; never point elsewhere with "see above".
|
|
254
|
+
- **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
|
|
255
|
+
- **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
|
|
256
|
+
- **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
|
|
257
|
+
- Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
|
|
258
|
+
<!-- fragment:needs-you:end -->
|
|
259
|
+
|
|
237
260
|
---
|
|
238
261
|
|
|
239
262
|
## Rules
|
|
@@ -127,6 +127,15 @@ For each framework-shaped item:
|
|
|
127
127
|
|
|
128
128
|
Maintainer side is unchanged: GitHub issues are arcane's normal public intake; triage into arcane's own `IDEAS.md`/`DECISIONS.md` happens in arcane sessions like any other issue. This spell never writes to a hub's venture books and never reads `ventures/registry.json` — framework feedback and venture ideas are different channels on purpose (venture ideas → hub books → `spell-manifest`; framework lessons → here → arcane's GitHub).
|
|
129
129
|
|
|
130
|
+
## Entry Point — Lessons Routed by `spell-close-session`
|
|
131
|
+
|
|
132
|
+
`FEEDBACK.md` has a second writer. `spell-close-session`'s lesson-routing step (step 2b) classifies each of the session's Lessons Learned. After one batch confirmation, it appends the framework-shaped ones as a single block in Step 5's format:
|
|
133
|
+
- `**Session:**` carries `(routed by spell-close-session from Lessons Learned)`.
|
|
134
|
+
- `**Rating:**` and `**Would use again:**` are `N/A`.
|
|
135
|
+
- Each improvement item ends with `<!-- upstream: queued -->`.
|
|
136
|
+
|
|
137
|
+
That step never files anything publicly. Its entries reach `{ARCANE_UPSTREAM_REPO}` only through this spell: `spell-feedback --flush` picks them up with every other queued item and runs Step 6 on each one (genericize, the literal `disclose` confirmation, then file or re-queue). A routed entry gets no shortcut, because close-session's batch confirmation approved a local append, not a public issue. An `N/A` rating is not a low rating, so it never triggers the `⚠️ LOW RATING` flag. **Enforcement: structured spell gate (ARC-023) — Step 6's literal `disclose` confirmation gates filing a routed item exactly as it gates any other; nothing in this spell distinguishes a routed item that could skip it.**
|
|
138
|
+
|
|
130
139
|
## Rules
|
|
131
140
|
|
|
132
141
|
- Never overwrite existing feedback — always append.
|
|
@@ -184,6 +184,24 @@ Execute the `spell-ship` workflow:
|
|
|
184
184
|
applies (state "Nothing withheld" in that case). Fold it into the consumer repo's own QA checklist
|
|
185
185
|
so a human reviewer sees exactly what still needs a human look, not just what passed (2026-07-22
|
|
186
186
|
dogfooding finding: honest disclosure of sandbox limits, not just of failures).
|
|
187
|
+
|
|
188
|
+
<!-- fragment:needs-you:start -->
|
|
189
|
+
**Needs you — required operator actions.** When this run leaves an action that only the operator can take, and the work is not correct or complete until it is taken, report it in one block at the very top of the final report, before every other section and before any optional next step:
|
|
190
|
+
|
|
191
|
+
```markdown
|
|
192
|
+
## ⚠ Needs you
|
|
193
|
+
|
|
194
|
+
- <exactly what to do: the command, the link, or the question> — <why the agent cannot do it itself>
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
- **What belongs in it:** an action the work needs that only the operator can take — approving or merging a pull request, accepting a decision record, answering a question the work is waiting on, confirming a `guarded` push, running an interactive command such as `spell unblock-push`, or a step on an external platform the agent cannot reach. An optional suggestion, a next spell to run, or anything the agent could do itself is not a required action and stays out of the block.
|
|
198
|
+
- **One line per action.** Say exactly what to do, then, after the dash, why the agent cannot do it. Write the command, link or question out in full; never point elsewhere with "see above".
|
|
199
|
+
- **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
|
|
200
|
+
- **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
|
|
201
|
+
- **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
|
|
202
|
+
- Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
|
|
203
|
+
<!-- fragment:needs-you:end -->
|
|
204
|
+
|
|
187
205
|
4. Create the PR:
|
|
188
206
|
- `external/ado` mode: `az repos pr create --repository {repo} --source-branch {branch} --target-branch main --title "{feature}" --work-items {adoWorkItemId}`
|
|
189
207
|
- `internal` mode (or provider TODO mode): create PR without `--work-items`.
|
|
@@ -250,6 +250,23 @@ just because nothing threw an error.
|
|
|
250
250
|
|
|
251
251
|
## Phase 6 — Report
|
|
252
252
|
|
|
253
|
+
<!-- fragment:needs-you:start -->
|
|
254
|
+
**Needs you — required operator actions.** When this run leaves an action that only the operator can take, and the work is not correct or complete until it is taken, report it in one block at the very top of the final report, before every other section and before any optional next step:
|
|
255
|
+
|
|
256
|
+
```markdown
|
|
257
|
+
## ⚠ Needs you
|
|
258
|
+
|
|
259
|
+
- <exactly what to do: the command, the link, or the question> — <why the agent cannot do it itself>
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
- **What belongs in it:** an action the work needs that only the operator can take — approving or merging a pull request, accepting a decision record, answering a question the work is waiting on, confirming a `guarded` push, running an interactive command such as `spell unblock-push`, or a step on an external platform the agent cannot reach. An optional suggestion, a next spell to run, or anything the agent could do itself is not a required action and stays out of the block.
|
|
263
|
+
- **One line per action.** Say exactly what to do, then, after the dash, why the agent cannot do it. Write the command, link or question out in full; never point elsewhere with "see above".
|
|
264
|
+
- **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
|
|
265
|
+
- **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
|
|
266
|
+
- **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
|
|
267
|
+
- Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
|
|
268
|
+
<!-- fragment:needs-you:end -->
|
|
269
|
+
|
|
253
270
|
Summarize what changed, what's still open, and close with a plain-language,
|
|
254
271
|
user-verifiable acceptance checklist:
|
|
255
272
|
|
|
@@ -30,6 +30,18 @@ Parse `status: new` entries from the hub root `IDEAS.md` and every `{BUSINESS_RO
|
|
|
30
30
|
|
|
31
31
|
Tolerate operator YAML frontmatter above a book's header — entries always live below the `---` divider. Malformed entries (missing timestamp, unparseable status comment) are listed under a `Skipped` heading with `file:line`, never silently dropped.
|
|
32
32
|
|
|
33
|
+
**Status-comment grammar.** A status comment is `<!-- status: <state>[; <key>: <value>]... -->`. The first field is the status itself, unchanged from before: `new`, `promoted → <dest> YYYY-MM-DD`, or `dropped YYYY-MM-DD` with an optional `(reason)`. Zero or more `; <key>: <value>` fields may follow it. `spell-todo --sweep --validate` writes three of them: `value` and `fit` (each `y`, `n` or `?`) and `dup` (`none`, or a short reference). Both forms parse:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
<!-- status: new -->
|
|
37
|
+
<!-- status: new; value: y; fit: y; dup: none -->
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- **Splitting:** split the comment body on `; ` only where the next segment starts with a lowercase `key: `. A `; ` anywhere else — inside a drop reason, say — stays part of the field it is in.
|
|
41
|
+
- **Deciding `new`:** only the first field does. An entry is collected when that field is exactly `status: new`, with or without fields after it.
|
|
42
|
+
- **Unknown fields:** an unknown key, or a known key with an unexpected value, is ignored and shown as-is. It never moves the entry to `Skipped`.
|
|
43
|
+
- **Unparseable:** a comment is unparseable, and the entry goes to `Skipped`, when it does not open with `status:`, is not closed with `-->`, or its first field is not exactly `new`, `promoted …` or `dropped …` (a typo such as `status: nwe` or `status: New` is reported, never silently left out of both lists).
|
|
44
|
+
|
|
33
45
|
## Step 2 — List
|
|
34
46
|
|
|
35
47
|
Print one numbered list, grouped by book, oldest entry first within each group. Numbering is session-scoped — it does not persist across runs.
|
|
@@ -45,6 +57,8 @@ ventures/ordovica/TODO.md
|
|
|
45
57
|
3. [ ] Confirm cart snapshot order (open item, no status comment — todo-book entries are listed as-is)
|
|
46
58
|
```
|
|
47
59
|
|
|
60
|
+
An entry whose status comment carries validation fields (Step 1's grammar) shows them after its text — for example `(value: y, fit: n, dup: none)` — so that the operator can leave out `fit: n` entries, or ones marked as duplicates, when selecting in Step 3. An entry without them is listed exactly as before.
|
|
61
|
+
|
|
48
62
|
## Step 3 — Select
|
|
49
63
|
|
|
50
64
|
Ask: `Promote which? (numbers/ranges, e.g. 1,3,5-8, or "all")`. Accept a single answer covering the whole batch. `all` selects every listed entry, including ones in books outside `--venture` if no filter was given.
|
|
@@ -114,8 +128,12 @@ book:<other-slug>/IDEAS.md
|
|
|
114
128
|
|
|
115
129
|
Any marker whose destination repository is public ends in ` (disclosed)` — whichever route landed it, because Step 5 gated it as a disclosure.
|
|
116
130
|
|
|
131
|
+
**Tracker-id suffix.** When route (c) files a tracker item, append the new work item's id to the hub entry's text as a suffix — before its status comment — in the format [governance/development-methodology.md](../../.arcane/governance/development-methodology.md) defines once under "Tracker-ID Suffix on Captured Items" for that tracker's provider (`[AB#<id>]` Azure DevOps, `[#<id>]` GitHub, the issue key for Jira). Use only the id the create command returned. The promoted marker still names the repo (`github:<slug>#<id>`), which is what disambiguates a GitHub suffix inside a hub book. An entry that already carries a suffix keeps it unchanged wherever it lands. No tracker item filed means no suffix: entries routed without a tracker (and every internal-mode flow) are written exactly as before.
|
|
132
|
+
|
|
117
133
|
Dropped entries get `<!-- status: dropped YYYY-MM-DD -->`, optionally with a trailing `(reason)`.
|
|
118
134
|
|
|
135
|
+
Validation fields already in an entry's comment (Step 1's grammar) are kept after the new first field when it is marked, e.g. `<!-- status: dropped 2026-09-27; value: n; fit: y; dup: none -->`. An entry without them gets exactly the marker above.
|
|
136
|
+
|
|
119
137
|
Before any downstream write, grep the target file for the entry's normalized first ~40 characters — if already present, treat this entry as already-landed, mark the hub entry promoted, and skip the write. This is what makes an interrupted or re-run batch safe.
|
|
120
138
|
|
|
121
139
|
## Step 7 — Leak Scan
|
|
@@ -36,6 +36,7 @@ Use these files first:
|
|
|
36
36
|
Check `ai-context/system-prompt-context.md` for a `## Next Session Handoff` section.
|
|
37
37
|
|
|
38
38
|
- 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.
|
|
39
|
+
- **The handoff's `Needs you` field comes first.** If it lists anything other than "None", surface every item in the `## ⚠ Needs you` block (see the output structure below) **above** `## Picking Up From Last Session`, the one exception to "before all other sections" in the bullet above. Where you can check an item (a pull request's merge state, whether a branch was pushed), check it: an item the operator has already done leaves the block and is noted as done under `## Picking Up From Last Session` (that counts as surfaced); keep every item you cannot check. A handoff written before this field existed has no `Needs you` line; treat it as "None". Do not mark the handoff consumed until every listed item has been surfaced: a handoff whose `Needs you` items were not surfaced stays unconsumed, so the next open-session surfaces them again.
|
|
39
40
|
- **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.
|
|
40
41
|
- 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` item — by stable locator, not a line number that may have already drifted — 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.
|
|
41
42
|
- If the section is absent or already marked consumed: skip this step and proceed with the normal workspace scan.
|
|
@@ -67,6 +68,23 @@ Run the `spell-check-drift` spell first, before building the state snapshot or g
|
|
|
67
68
|
|
|
68
69
|
Then produce output in this exact structure:
|
|
69
70
|
|
|
71
|
+
<!-- fragment:needs-you:start -->
|
|
72
|
+
**Needs you — required operator actions.** When this run leaves an action that only the operator can take, and the work is not correct or complete until it is taken, report it in one block at the very top of the final report, before every other section and before any optional next step:
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
## ⚠ Needs you
|
|
76
|
+
|
|
77
|
+
- <exactly what to do: the command, the link, or the question> — <why the agent cannot do it itself>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
- **What belongs in it:** an action the work needs that only the operator can take — approving or merging a pull request, accepting a decision record, answering a question the work is waiting on, confirming a `guarded` push, running an interactive command such as `spell unblock-push`, or a step on an external platform the agent cannot reach. An optional suggestion, a next spell to run, or anything the agent could do itself is not a required action and stays out of the block.
|
|
81
|
+
- **One line per action.** Say exactly what to do, then, after the dash, why the agent cannot do it. Write the command, link or question out in full; never point elsewhere with "see above".
|
|
82
|
+
- **Never only among optional steps.** An action required for correctness is never listed only under next steps, suggestions, `Carry Forward` or `What's Next?`. It may be repeated there, but it always appears in this block.
|
|
83
|
+
- **Omit it when empty.** When nothing needs the operator, leave the block out entirely: no heading and no "None" line.
|
|
84
|
+
- **Every final report.** The block belongs in whatever report ends the run, including a report written when the spell stops early.
|
|
85
|
+
- Enforcement: explicitly advisory prose (ARC-023) — no check reads a spell's actual output for this block; it holds by these instructions alone.
|
|
86
|
+
<!-- fragment:needs-you:end -->
|
|
87
|
+
|
|
70
88
|
## Workspace Health Check
|
|
71
89
|
|
|
72
90
|
Before anything else, check:
|
|
@@ -99,6 +117,11 @@ Before anything else, check:
|
|
|
99
117
|
- Run `npm view arcane-cli version` to get the latest published version.
|
|
100
118
|
- **(a) Managed files behind the installed CLI** (installed CLI version is newer than the version recorded in `.arcane.json`): surface a warning: `⚠️ Managed files out of date: files at <installed> → CLI at <cli>. Run spell update to resync files.`
|
|
101
119
|
- **(b) Installed CLI behind the latest published version** (latest published is newer than the installed CLI): surface a warning: `⚠️ Arcane CLI update available: CLI at <cli> → latest <latest>. Upgrade the CLI, then run spell update.`
|
|
120
|
+
- **Setup questions from an AI harness (no interactive terminal, PRD D-02 / #282):** if you run `spell update` yourself — a repository write, so apply the Mutation Guard first — note that a harness shell is not an interactive terminal. The CLI then skips every unanswered manifest question and prints ``! Skipped N manifest question(s) (<fields>) — no interactive terminal. Run `spell update` from a terminal, or answer by flags:``, followed by the exact line to re-run, such as `spell update --tracking-mode <internal|external> --push-policy <open|guarded|blocked>`. `spell init --profile <profile>` prints the same kind of `spell update` line when it leaves questions unanswered. Do not send the operator off to find a terminal. Instead:
|
|
121
|
+
1. Ask the operator each skipped question through the harness's own question UI (a plain chat question if the harness has none): one question per flag the CLI printed, offering exactly the values that flag lists. The flags are `--role`, `--tracking-mode`, `--external-provider`, `--content-sensitivity`, `--push-policy` and `--subject-root`. `--tracking-mode external` also needs `--external-provider <ado|github|jira|other>`, so ask that too when the answer is `external`.
|
|
122
|
+
2. Re-run `spell update` with the flags the CLI printed, filled with the operator's answers, for example `spell update --tracking-mode internal --push-policy guarded`.
|
|
123
|
+
3. Never pass a flag the operator did not answer. No guessed, default or "recommended" value stands in for an answer. An unanswered question stays unset: the next interactive run asks it, and the next harness run reports it skipped again.
|
|
124
|
+
4. Never loosen `push_policy` by flag. `--push-policy` only answers an unset question or tightens a recorded policy, and the CLI refuses a loosening. Moving a repository from `blocked` or `guarded` toward `open` is only ever `spell unblock-push`, which the operator runs from an interactive terminal (ARC-034 decision 6, ARC-049 decision 6). Tell them so; do not try to run it for them.
|
|
102
125
|
- **If either axis shows drift, emit the canonical version-drift diagram beside the warning(s)** — per the generated state diagrams convention (rule 8, ARC-036). One commit per *distinct* version value among the three readings, in the order repo-files → installed-CLI → npm-latest; collapse consecutive identical values into a single shared commit rather than repeating it. Branch off immediately after the commit for each axis that drifts — `repo-files` after the repo-files-version commit if axis A drifts, `installed-cli` after the installed-CLI-version commit if axis B drifts. Tag the final commit `"latest"`. The dangling branch(es) *are* the drifting axis/axes — no legend needed:
|
|
103
126
|
```mermaid
|
|
104
127
|
gitGraph
|