arcane-cli 0.22.4 → 0.22.6
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/development-methodology.md +25 -2
- package/dist/assets/.arcane/governance/git-conventions.md +4 -2
- package/dist/assets/.arcane/governance/new-business-setup.md +2 -2
- package/dist/assets/.arcane/governance/spell-authoring-standards.md +7 -1
- package/dist/assets/.github/instructions/agent-output.instructions.md +53 -2
- package/dist/assets/.github/prompts/spell-bug.prompt.md +13 -0
- package/dist/assets/.github/prompts/spell-bump.prompt.md +4 -1
- package/dist/assets/.github/prompts/spell-full-cycle.prompt.md +4 -3
- package/dist/assets/.github/prompts/spell-open-session.prompt.md +2 -2
- package/dist/assets/.github/prompts/spell-plan.prompt.md +15 -7
- package/dist/assets/.github/prompts/spell-review-batch.prompt.md +4 -4
- package/dist/assets/.github/prompts/spell-review.prompt.md +1 -1
- package/dist/assets/.github/prompts/spell-scope.prompt.md +2 -2
- package/dist/assets/.github/prompts/spell-suggest-feature.prompt.md +10 -2
- package/dist/assets/.github/prompts/spell-summon-venture.prompt.md +1 -1
- package/dist/index.js +20 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -89,13 +89,23 @@ Persist tracking configuration in PRD frontmatter (and in `.arcane.json` when av
|
|
|
89
89
|
```yaml
|
|
90
90
|
tracking:
|
|
91
91
|
tracking_mode: external # internal | external
|
|
92
|
-
external_provider: ado # ado | jira | other
|
|
92
|
+
external_provider: ado # ado | github | jira | other
|
|
93
93
|
ado:
|
|
94
94
|
org: "{ADO_ORG}"
|
|
95
95
|
project: "{ADO_PROJECT}"
|
|
96
96
|
process_template: "Agile"
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
+
Or, for a GitHub-tracked repo:
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
tracking:
|
|
103
|
+
tracking_mode: external
|
|
104
|
+
external_provider: github
|
|
105
|
+
github:
|
|
106
|
+
repo: "{owner}/{repo}"
|
|
107
|
+
```
|
|
108
|
+
|
|
99
109
|
### Process-Template-Aware ADO Hierarchy Rules
|
|
100
110
|
|
|
101
111
|
When `tracking_mode=external` and `external_provider=ado`, do not hardcode work item types. Resolve types from the project's process template and currently enabled types first:
|
|
@@ -131,6 +141,19 @@ Child linkage rules:
|
|
|
131
141
|
3. If the selected fallback type combination cannot be linked as parent/child in that process template, use `Related` links and prefix titles with logical level tags (for example: `[EPIC]`, `[FEATURE]`) to preserve intent.
|
|
132
142
|
4. Never silently flatten hierarchy. Document fallback/link decisions in `execution-plan.md` notes.
|
|
133
143
|
|
|
144
|
+
### GitHub Issues Conventions
|
|
145
|
+
|
|
146
|
+
When `tracking_mode=external` and `external_provider=github`, resolve `{owner}/{repo}` from `git remote get-url origin` (or `.arcane.json`'s `github.repo` field if set) rather than assuming it matches the working directory name.
|
|
147
|
+
|
|
148
|
+
GitHub Issues has no configurable work-item-type hierarchy the way Azure DevOps does — there is no process-template discovery step, and no equivalent to `az boards work-item-type list`. Use these substitutes instead:
|
|
149
|
+
|
|
150
|
+
- **Categorization** — labels, not types. Resolve the repo's actual labels first (`gh label list`) rather than assuming `bug`/`enhancement`/`epic` exist; a fresh repo may have only GitHub's defaults, or none. Apply a label with `--label <name>` on create, or omit it rather than inventing one.
|
|
151
|
+
- **Hierarchy** — GitHub Issues has no native parent/child API field reachable from `gh`. Simulate logical hierarchy with a task-list in the parent issue's body (`- [ ] #43`, `- [ ] #44`) and `Related to #NN` / `Part of #NN` references in child issue bodies. This is a substitute, not true hierarchy — document the simulation in `execution-plan.md` notes the same way an ADO `Related`-link fallback gets documented (see the Child linkage rules above), so a reader doesn't mistake the checkbox list for a first-class relationship the platform enforces.
|
|
152
|
+
- **Creation:** `gh issue create --title "{title}" --body "{body}" [--label <name>]` — prints the issue URL on success; the trailing path segment is the issue number.
|
|
153
|
+
- **Fetching:** `gh issue view {id} --json title,body,labels`.
|
|
154
|
+
- **Closing:** `gh issue close {id} --reason completed [--comment "{note}"]` (`--reason` also accepts `not planned` or `duplicate`).
|
|
155
|
+
- **Commit/PR linkage:** `Fixes #{id}` / `Closes #{id}` in a commit message or PR body auto-closes the issue on merge (GitHub-native behavior, no extra command needed) — prefer this over a manual `gh issue close` call when the fix lands via a PR.
|
|
156
|
+
|
|
134
157
|
### External Provider TODOs
|
|
135
158
|
|
|
136
159
|
- **Jira (`external_provider=jira`)** — TODO: define issue-type mapping, parent-child/epic linkage strategy, and command examples.
|
|
@@ -252,7 +275,7 @@ For features that should run end-to-end with minimal human intervention, use `sp
|
|
|
252
275
|
spell-full-cycle = spell-plan → [spell-enchant] → spell-architect → [spell-implement → spell-test → spell-review]* → spell-ship
|
|
253
276
|
```
|
|
254
277
|
|
|
255
|
-
The entire pipeline runs autonomously with a single human gate at PR approval. Includes optional PRD enchantment between Plan and Architect (runs automatically if any quality dimension scores Bronze, or if `--enchant` is specified). Requires three inputs: feature description, tracking configuration (`tracking_mode` and optional `external_provider`), and target repo. In ADO mode, include the ADO work item ID. Each phase has built-in quality gates that halt the pipeline on failure rather than producing garbage for downstream phases.
|
|
278
|
+
The entire pipeline runs autonomously with a single human gate at PR approval. Includes optional PRD enchantment between Plan and Architect (runs automatically if any quality dimension scores Bronze, or if `--enchant` is specified). Requires three inputs: feature description, tracking configuration (`tracking_mode` and optional `external_provider`), and target repo. In ADO mode, include the ADO work item ID; in GitHub mode, include the issue number if one already exists. Each phase has built-in quality gates that halt the pipeline on failure rather than producing garbage for downstream phases.
|
|
256
279
|
|
|
257
280
|
See [.github/prompts/spell-full-cycle.prompt.md](../.github/prompts/spell-full-cycle.prompt.md) for the complete prompt.
|
|
258
281
|
|
|
@@ -567,13 +567,15 @@ See also: [Agent Workflow — Sync with main before opening a PR](#agent-workflo
|
|
|
567
567
|
| **Description** | Must include: summary of changes, rationale, verification steps, and a linked work item ID if applicable |
|
|
568
568
|
| **Pre-PR sync** | **Mandatory rebase on latest `origin/<target>` before pushing.** See [🛑 Agent-mandatory pre-PR guard](#-agent-mandatory-pre-pr-guard) above — this applies even when opening PRs via raw `az repos pr create` / `gh pr create` / MCP tools. |
|
|
569
569
|
| **Branch cleanup** | After merge, delete the source branch (local and remote). |
|
|
570
|
-
| **PR link format** | All PR references in agent output
|
|
570
|
+
| **PR link format** | All PR references in agent output **must** be clickable markdown links to the PR, not a bare `PR #NNN`. |
|
|
571
|
+
| **Doc-ID link format** | The same rule extends to `ADR-NNN`/`ARC-NNN`/`EF-NN`/journal entries/named governance docs — never a bare ID. See `.github/instructions/agent-output.instructions.md` → Doc-ID Link Format for the full rule and required formats per context. |
|
|
571
572
|
|
|
572
573
|
### Agent PR Workflow
|
|
573
574
|
|
|
574
575
|
1. **Create a work item** (if one doesn't exist) using `spell-suggest-feature` or `spell-bug`.
|
|
575
576
|
2. **Open PR** with proper title, description, and work-item link.
|
|
576
|
-
3. **Notify the human** through your configured channel with
|
|
577
|
+
3. **Notify the human** through your configured channel with a clickable link, not a bare number:
|
|
578
|
+
`[PR #{number} — {title}]({url}) — {repo} (#{workItemId})`.
|
|
577
579
|
4. **Address review feedback** if a reviewer requests changes.
|
|
578
580
|
5. **After merge**, delete the branch (local + remote) and confirm cleanup.
|
|
579
581
|
|
|
@@ -113,12 +113,12 @@ See [[agents/installation|Runtime Installation]].
|
|
|
113
113
|
|
|
114
114
|
### Step 3.3 — Agent Git Identity Setup
|
|
115
115
|
|
|
116
|
-
Every agent that will produce commits for this business must have a registered Git identity **before making its first commit**. See [[
|
|
116
|
+
Every agent that will produce commits for this business must have a registered Git identity **before making its first commit**. See [[git-conventions#agent-attribution-model|Git Conventions — Agent Attribution]].
|
|
117
117
|
|
|
118
118
|
For each agent assigned to this business:
|
|
119
119
|
|
|
120
120
|
1. **Confirm persona name** is registered in [[naming-conventions|Naming Conventions]] agent roster.
|
|
121
|
-
2. **Confirm Git identity** exists in the registered identities table in [[
|
|
121
|
+
2. **Confirm Git identity** exists in the registered identities table in [[git-conventions#agent-email-convention|Git Conventions]].
|
|
122
122
|
3. **Add agent to `.mailmap`** in every repo the agent will commit to:
|
|
123
123
|
```
|
|
124
124
|
{AGENT_NAME} <{AGENT_EMAIL}>
|
|
@@ -15,7 +15,13 @@ against a consistent bar. This is the spell-prompt analogue of [[product-excelle
|
|
|
15
15
|
grades PRDs, not prompts). It is an **authoring-time standard** — a checklist for contributors writing
|
|
16
16
|
or reviewing spells. It is **not** meant to be read at runtime by the spells it grades.
|
|
17
17
|
|
|
18
|
-
See [ARC-014](
|
|
18
|
+
See [ARC-014](https://github.com/codemagicianhq/arcane/blob/main/DECISIONS.md#arc-014--spell-authoring-standards-a-quality-rubric-for-spell-prompts)
|
|
19
|
+
for the decision that established this standard. **Full canonical URL, not a same-repo
|
|
20
|
+
wiki-link** (corrected 2026-08-31, BC-06) — this file ships to consumer repos, and
|
|
21
|
+
`DECISIONS.md` does not: `src/assets/DECISIONS.md` (what consumers actually receive via
|
|
22
|
+
`spell init`) is an empty starter template for the *consumer's own* decisions, so a
|
|
23
|
+
same-repo wiki-link to a specific ARC id would resolve to the wrong document once
|
|
24
|
+
installed, not simply fail to resolve.
|
|
19
25
|
|
|
20
26
|
## The Spell Quality Rubric
|
|
21
27
|
|
|
@@ -4,7 +4,7 @@ applyTo: "**"
|
|
|
4
4
|
|
|
5
5
|
# Agent Output Formatting Rules
|
|
6
6
|
|
|
7
|
-
Source of truth: `.arcane/governance/git-conventions.md` → PR Standards
|
|
7
|
+
Source of truth: `.arcane/governance/git-conventions.md` → PR Standards → PR Requirements.
|
|
8
8
|
|
|
9
9
|
## PR Link Format
|
|
10
10
|
|
|
@@ -20,9 +20,60 @@ All PR references in agent output **must** be clickable markdown links. Never wr
|
|
|
20
20
|
[PR #270 — fix: remove Unix-only preinstall script and approve esbuild builds](https://dev.azure.com/{org}/{project}/_git/{repo}/pullrequest/270)
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
## Doc-ID Link Format
|
|
24
|
+
|
|
25
|
+
The same rule extends to every other identifier class this framework uses to reference
|
|
26
|
+
a decision or record: `ADR-NNN`, `ARC-NNN`, `EF-NN`, venture decision IDs, journal
|
|
27
|
+
entries, and named governance docs. A bare decision ID in agent output is the same
|
|
28
|
+
defect as a bare `PR #NNN` — the reader has to go find it themselves, and a typo or
|
|
29
|
+
stale number is invisible until someone tries.
|
|
30
|
+
|
|
31
|
+
**Required format, by context:**
|
|
32
|
+
- **Inside a repo's own local markdown** (e.g. this repo's `journal/`, `PLAN.md`, or
|
|
33
|
+
`DECISIONS.md` cross-referencing itself): a wiki-link (`[[DECISIONS#ARC-NNN|ARC-NNN]]`)
|
|
34
|
+
or a relative markdown link that actually resolves from that file's own location.
|
|
35
|
+
- **Chat or PR output:** a clickable markdown link to the canonical file/anchor.
|
|
36
|
+
- **Governance docs this framework ships** (`.arcane/governance/*.md`): the full
|
|
37
|
+
canonical-repo URL. A file here lives in *this* repo today but ships into every
|
|
38
|
+
consumer repo's own tree, where a wiki-link or relative path to Arcane's own
|
|
39
|
+
`DECISIONS.md` either fails to resolve, or worse, silently resolves to the
|
|
40
|
+
*consumer's own* `DECISIONS.md` (an empty per-consumer starter template, not
|
|
41
|
+
Arcane's real decision record) — wrong content, not just a dead link.
|
|
42
|
+
- **Spell prompts and instructions this framework ships**
|
|
43
|
+
(`.github/prompts/*.prompt.md`, `.github/instructions/*.md`): **plain text only —
|
|
44
|
+
cite the bare ID, no link at all** (`ARC-035`, not `[ARC-035](...)`). A full
|
|
45
|
+
canonical URL is *also* unsafe here, not just a same-repo link: it bakes
|
|
46
|
+
`github.com/codemagicianhq/arcane` — this project's own org and repo name — into
|
|
47
|
+
content the org-token portability gate (`scripts/org-token-lint.ts`, D2 in
|
|
48
|
+
`spell-authoring-standards.md`) exists specifically to keep out of distributed
|
|
49
|
+
spells. **Confirmed live 2026-08-31 (BC-06):** the build's `Org-token lint` failed
|
|
50
|
+
on exactly this pattern in three prompt files, including two this same correction
|
|
51
|
+
pass had introduced minutes earlier while fixing the *other* link defect. Known
|
|
52
|
+
gap: the portability scan today only walks `.github/prompts/`, so a full URL in a
|
|
53
|
+
`.github/instructions/*.md` file — like this one's own Merge Strategy section, two
|
|
54
|
+
paragraphs down — ships uncaught; tracked in `TODO.md`.
|
|
55
|
+
- **Cross-repo references from anywhere else** (chat, PR output, another repo
|
|
56
|
+
entirely): the full canonical-repo URL.
|
|
57
|
+
|
|
58
|
+
**Never fabricate an unresolvable link.** If you cannot confirm the ID exists and where
|
|
59
|
+
it resolves to, say so and cite the ID as plain text rather than inventing a link that
|
|
60
|
+
looks real but goes nowhere.
|
|
61
|
+
|
|
23
62
|
## Merge Strategy
|
|
24
63
|
|
|
25
|
-
All PRs must use **Rebase and fast-forward**. Never squash. Never merge commit. See
|
|
64
|
+
All PRs must use **Rebase and fast-forward**. Never squash. Never merge commit. See
|
|
65
|
+
ARC-009 §7 (Arcane's own framework decision — cited as plain text, not linked, per
|
|
66
|
+
Doc-ID Link Format above: this file ships). **Corrected 2026-08-31 (BC-06), three
|
|
67
|
+
times over:** this file previously cited `ADR-048`, which does exist in the shipped
|
|
68
|
+
`framework-decisions.md` reference — but its actual topic ("Code Versus Docs Branch
|
|
69
|
+
Policy") has nothing to do with merge strategy, a topical miscitation rather than a
|
|
70
|
+
missing one. The first fix replaced it with a same-repo wiki-link to this repo's own
|
|
71
|
+
`DECISIONS.md` — itself the exact cross-repo defect this section warns about
|
|
72
|
+
(`DECISIONS.md` doesn't ship). The second fix replaced that with a full canonical
|
|
73
|
+
URL, which held up locally but failed the build's org-token portability gate: a
|
|
74
|
+
`github.com/codemagicianhq/arcane` URL bakes this project's own org into a file the
|
|
75
|
+
gate treats as distributed content (see Doc-ID Link Format above). Settled on the
|
|
76
|
+
bare ID — the gate's own documented safe form.
|
|
26
77
|
|
|
27
78
|
When completing a PR via `az repos pr update`, do **not** pass `--squash true`. The correct command:
|
|
28
79
|
|
|
@@ -53,6 +53,15 @@ Workflow:
|
|
|
53
53
|
--output json
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
+
*GitHub is another — if and only if `.arcane.json` names `external_provider: github` (and the `gh` CLI is authenticated):*
|
|
57
|
+
```bash
|
|
58
|
+
gh issue create \
|
|
59
|
+
--title "[Bug] {SUMMARY}" \
|
|
60
|
+
--body "{formatted description with repro steps}" \
|
|
61
|
+
--label bug
|
|
62
|
+
```
|
|
63
|
+
`gh issue create` prints the created issue's URL on success; extract the trailing number as `{WORK_ITEM_ID}`. Omit `--label` if the repo has no `bug` label (`gh label list`) rather than guessing.
|
|
64
|
+
|
|
56
65
|
If the configured tooling is unavailable or the user prefers manual tracking, fall back to the `TODO.md` entry above and continue.
|
|
57
66
|
|
|
58
67
|
3. **Diagnose** — trace the code path to find the root cause:
|
|
@@ -98,6 +107,10 @@ Workflow:
|
|
|
98
107
|
--org https://dev.azure.com/{ADO_ORG} \
|
|
99
108
|
--output json
|
|
100
109
|
```
|
|
110
|
+
For GitHub specifically:
|
|
111
|
+
```bash
|
|
112
|
+
gh issue close {WORK_ITEM_ID} --reason completed --comment "Fixed by {commit SHA or PR URL}"
|
|
113
|
+
```
|
|
101
114
|
For other providers, follow [governance/development-methodology.md](../../.arcane/governance/development-methodology.md).
|
|
102
115
|
|
|
103
116
|
Rules:
|
|
@@ -9,7 +9,10 @@ agent: agent
|
|
|
9
9
|
|
|
10
10
|
- This spell determines whether a version bump is required and applies the correct semver type.
|
|
11
11
|
- Use it whenever you've changed `src/assets/`, `registry.ts`, or `profiles.ts` in the arcane repo.
|
|
12
|
-
- It enforces the rule from
|
|
12
|
+
- It enforces the rule from `project.md` → Constraints → Self-hosting: "Anything touching
|
|
13
|
+
`src/assets/` requires a version bump." (Corrected 2026-08-31, BC-06 — this previously cited
|
|
14
|
+
CLAUDE.md, which now carries only the working protocol; the rule's live prose home moved to
|
|
15
|
+
`project.md:56-58`.)
|
|
13
16
|
|
|
14
17
|
---
|
|
15
18
|
|
|
@@ -39,10 +39,11 @@ Before proceeding, confirm you have all three:
|
|
|
39
39
|
- **Tracker work item ID** (e.g., `#507`) in `external` mode — fetch it using the detected provider's CLI/API. For an ADO provider, fetch via `az boards work-item show --id {id} --org https://dev.azure.com/{ADO_ORG} --output json` and extract `System.Title`, `System.Description`, and `Microsoft.VSTS.Common.AcceptanceCriteria`; for other providers, fetch the title, description, and acceptance criteria via that provider's equivalent. If the work item has child items, fetch those too. `{ADO_ORG}` resolves from `.arcane.json` or the PRD/feature frontmatter; ask if unset.
|
|
40
40
|
2. **Tracking configuration** — required before execution:
|
|
41
41
|
- `tracking_mode: internal | external`
|
|
42
|
-
- `external_provider: ado | jira | other` (required when `tracking_mode=external`)
|
|
42
|
+
- `external_provider: ado | github | jira | other` (required when `tracking_mode=external`)
|
|
43
43
|
- If omitted and an ADO context is already present, default to `external` + `ado` (backward compatibility).
|
|
44
44
|
- If `tracking_mode=external` and `external_provider=ado`, an `adoWorkItemId` is required for commit/PR linkage.
|
|
45
|
-
-
|
|
45
|
+
- If `tracking_mode=external` and `external_provider=github`, a `githubIssueId` is used for commit/PR linkage when one exists (optional, unlike ADO).
|
|
46
|
+
- In ADO mode, resolve available work item types and apply process-template-aware fallback mapping from `governance/development-methodology.md` before creating/linking hierarchy items. In GitHub mode, use that same doc's GitHub Issues Conventions (labels, not configurable types).
|
|
46
47
|
3. **Target repo** — which repository and org (e.g., `{REPO_ORG}/{REPO_NAME}`). `{REPO_ORG}`/`{REPO_NAME}` resolve from `.arcane.json` or the PRD/feature frontmatter; if not provided, infer from context or ask.
|
|
47
48
|
|
|
48
49
|
If `external_provider=jira` or `external_provider=other`, record TODO notes for provider-specific automation and continue with internal artifact flow unless explicit provider commands are supplied.
|
|
@@ -57,7 +58,7 @@ Execute the `spell-plan` workflow:
|
|
|
57
58
|
|
|
58
59
|
1. Gather requirements from the feature description.
|
|
59
60
|
2. Check existing ADRs and business docs for constraints.
|
|
60
|
-
3. Produce `PRD.md` with requirements, acceptance criteria, constraints, and tracking configuration (`tracking_mode`, optional `external_provider`, optional `adoWorkItemId`).
|
|
61
|
+
3. Produce `PRD.md` with requirements, acceptance criteria, constraints, and tracking configuration (`tracking_mode`, optional `external_provider`, optional `adoWorkItemId`/`githubIssueId`).
|
|
61
62
|
4. **Gate:** Validate every requirement has at least one testable acceptance criterion. If scope is too large for one sprint, halt and recommend splitting.
|
|
62
63
|
|
|
63
64
|
Store the PRD in the working directory. Proceed automatically to Phase 1.5.
|
|
@@ -86,8 +86,8 @@ Before anything else, check:
|
|
|
86
86
|
- **Stale local branches:** Run `git branch --merged main` to list branches already merged that should be deleted — this session's own read-only candidate list (`--merged` also misses every branch landed via this repo's sanctioned rebase-and-fast-forward, so treat a *clean* result as "no ancestry-visible candidates," not "nothing to check"). Open-session only lists; it does not delete. Apply the [Content-Verified Branch Deletion](../../.arcane/governance/git-conventions.md#content-verified-branch-deletion-todomd-merged-branch-cleanup-finding) procedure (git-conventions.md) to any candidate before flagging it as safe, and leave the actual idempotent prune to `spell-close-session`'s sweep.
|
|
87
87
|
- **Tracker configuration check (early):** resolve active tracking settings before planning, in this order: root `.arcane.json` (if present) -> the committed self-hosted source manifest (`src/assets/.arcane.json`, read only when it declares `selfHosted: true` -- this is EF-14's recorded self-hosting resolution tier, distinct from treating the mere presence of a self-host marker as license to infer other, unrelated config) -> the current feature PRD frontmatter -> ask. Persisted once at `spell init`/`spell update` (EF-14); do not re-ask when any of the first three sources already sets it.
|
|
88
88
|
- `tracking_mode: internal | external`
|
|
89
|
-
- `external_provider: ado | jira | other`
|
|
90
|
-
- If all three sources are absent, ask: "Track work in this repo (TODO.md / PRDs)" [internal] vs "Track work in an external tracker (Azure DevOps / Jira / other)" [external]. Default to `external` + `ado` only when existing ADO context already exists (backward compatibility).
|
|
89
|
+
- `external_provider: ado | github | jira | other`
|
|
90
|
+
- If all three sources are absent, ask: "Track work in this repo (TODO.md / PRDs)" [internal] vs "Track work in an external tracker (Azure DevOps / GitHub / Jira / other)" [external]. Default to `external` + `ado` only when existing ADO context already exists (backward compatibility).
|
|
91
91
|
- **Open PRs (external/ado mode only):** if tracking mode is `external` with provider `ado` and ADO MCP is available, list all open PRs across all repos in the configured repo list (resolve from `.arcane.json`; if unset, ask the operator which repos to scan). Flag PRs older than 3 days as stale, older than 7 days as overdue. Format each as a clickable markdown link: `[PR #{id} — {title}](https://dev.azure.com/{ADO_ORG}/{ADO_PROJECT}/_git/{repo}/pullrequest/{id})` — resolve `{ADO_ORG}` and `{ADO_PROJECT}` from `.arcane.json` / PRD frontmatter; ask if unset. Never list a bare `PR #NNN`.
|
|
92
92
|
- **Uncommitted changes:** Run `git status` and report any uncommitted files.
|
|
93
93
|
- **Arcane version check (two-axis):** If `.arcane.json` exists in the repo root, check both whether the repo's managed files are behind the installed CLI _and_ whether the installed CLI is behind the latest published version of `arcane-cli`:
|
|
@@ -28,7 +28,7 @@ Workflow:
|
|
|
28
28
|
|
|
29
29
|
```yaml
|
|
30
30
|
tracking_mode: internal | external
|
|
31
|
-
external_provider: ado | jira | other
|
|
31
|
+
external_provider: ado | github | jira | other
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Resolve in this order, matching spell-open-session's own resolution chain (EF-14): root
|
|
@@ -38,7 +38,7 @@ Workflow:
|
|
|
38
38
|
|
|
39
39
|
Rules:
|
|
40
40
|
- If not explicitly set and ADO context is already present (work item ID + org/project), default to `tracking_mode: external`, `external_provider: ado` for backward compatibility.
|
|
41
|
-
- If none of the three sources above set it and no ADO context exists, ask: "Track work in this repo (TODO.md / PRDs)" [internal] vs "Track work in an external tracker (Azure DevOps / Jira / other)" [external].
|
|
41
|
+
- If none of the three sources above set it and no ADO context exists, ask: "Track work in this repo (TODO.md / PRDs)" [internal] vs "Track work in an external tracker (Azure DevOps / GitHub / Jira / other)" [external].
|
|
42
42
|
- If `tracking_mode=internal`, do not require an external tracker ID.
|
|
43
43
|
- If `tracking_mode=external` and `external_provider=ado`, collect org/project and resolve process template + available work item types before planning:
|
|
44
44
|
```bash
|
|
@@ -51,6 +51,7 @@ Workflow:
|
|
|
51
51
|
- Story-level: `User Story → Issue → Task`
|
|
52
52
|
- Task-level: `Task → Issue`
|
|
53
53
|
- Defect-level: `Bug → Issue → Task`
|
|
54
|
+
- If `tracking_mode=external` and `external_provider=github`, collect the repo (`{owner}/{repo}`, resolve from `git remote get-url origin`; ask if ambiguous) and, if the PRD's scope is known to need one, an existing issue number. GitHub Issues has no configurable work-item-type hierarchy the way ADO does — see [governance/development-methodology.md](../../.arcane/governance/development-methodology.md) → **GitHub Issues Conventions** for the labels-and-task-list substitute.
|
|
54
55
|
- If `external_provider=jira` or `other`, record as TODO and continue with internal artifacts unless the operator provides explicit provider workflow steps.
|
|
55
56
|
|
|
56
57
|
2. **Gather requirements** — accept input from any of these sources:
|
|
@@ -59,9 +60,10 @@ Workflow:
|
|
|
59
60
|
|--------|--------|--------------|
|
|
60
61
|
| **Description in prompt** | Inline text | Use as-is |
|
|
61
62
|
| **ADO work item ID** (external/ado mode) | `#507` or `507` with org name | Run: `az boards work-item show --id {id} --org https://dev.azure.com/{org} --output json` and extract `System.Description`, `Microsoft.VSTS.Common.AcceptanceCriteria`, and `System.Title` |
|
|
63
|
+
| **GitHub issue number** (external/github mode) | `#42` or `42` | Run: `gh issue view {id} --json title,body,labels` and extract `title` and `body` as the feature description |
|
|
62
64
|
| **File path** | Path to existing doc | Read the file |
|
|
63
65
|
|
|
64
|
-
If the input is an ADO work item ID, fetch its content first, then use it as the feature description. If it has child work items, fetch those too for additional context.
|
|
66
|
+
If the input is an ADO work item ID or a GitHub issue number, fetch its content first, then use it as the feature description. If it has child work items (ADO) or a task-list of related issues (GitHub — see governance's GitHub Issues Conventions), fetch those too for additional context.
|
|
65
67
|
|
|
66
68
|
Ask clarifying questions if the feature description is ambiguous. You need to understand:
|
|
67
69
|
- What problem does this solve?
|
|
@@ -69,6 +71,7 @@ Workflow:
|
|
|
69
71
|
- What business does this belong to?
|
|
70
72
|
- Are there existing ADRs or constraints?
|
|
71
73
|
- **If `tracking_mode=external` and `external_provider=ado`: What is the ADO work item ID?** — required before proceeding in ADO mode. Store it as `adoWorkItemId` in PRD frontmatter so it flows to `spell-architect` and `stories.json`.
|
|
74
|
+
- **If `tracking_mode=external` and `external_provider=github`: What is the GitHub issue number, if one already exists?** — optional (unlike ADO, a PRD doesn't require a pre-existing issue); store it as `githubIssueId` in PRD frontmatter when known.
|
|
72
75
|
|
|
73
76
|
3. **Research context** — check the relevant business docs under `{BUSINESS_ROOT}/` (resolve from `.arcane.json`'s `business_root` field, default `ventures/` if unset) and any existing code repos.
|
|
74
77
|
|
|
@@ -79,8 +82,9 @@ Workflow:
|
|
|
79
82
|
---
|
|
80
83
|
tracking:
|
|
81
84
|
tracking_mode: [internal|external]
|
|
82
|
-
external_provider: [ado|jira|other|null]
|
|
85
|
+
external_provider: [ado|github|jira|other|null]
|
|
83
86
|
adoWorkItemId: [number|null]
|
|
87
|
+
githubIssueId: [number|null]
|
|
84
88
|
---
|
|
85
89
|
|
|
86
90
|
## Problem Statement
|
|
@@ -130,19 +134,23 @@ Workflow:
|
|
|
130
134
|
# external/ado example: adoWorkItemId=541, feature name="Phase 2A" → slug="phase-2a"
|
|
131
135
|
# FEATURE_DIR="features/{adoWorkItemId}-{slug}"
|
|
132
136
|
|
|
133
|
-
#
|
|
137
|
+
# external/github example: githubIssueId=42, feature name="Phase 2A" → slug="phase-2a"
|
|
138
|
+
# FEATURE_DIR="features/{githubIssueId}-{slug}"
|
|
139
|
+
|
|
140
|
+
# internal or a provider without a known issue ID:
|
|
134
141
|
# FEATURE_DIR="features/{slug}"
|
|
135
142
|
mkdir -p "$FEATURE_DIR"
|
|
136
143
|
# Write PRD.md to the feature folder
|
|
137
144
|
```
|
|
138
145
|
Save the generated PRD.md using:
|
|
139
146
|
- `features/{adoWorkItemId}-{slug}/PRD.md` when `tracking_mode=external` and `external_provider=ado`
|
|
140
|
-
- `features/{slug}/PRD.md` when `tracking_mode=
|
|
147
|
+
- `features/{githubIssueId}-{slug}/PRD.md` when `tracking_mode=external`, `external_provider=github`, and a `githubIssueId` is known
|
|
148
|
+
- `features/{slug}/PRD.md` otherwise (internal mode, or an external provider without a known issue ID)
|
|
141
149
|
Confirm the resolved path to the user.
|
|
142
150
|
|
|
143
151
|
7. **Present for review** — show the PRD to the user for approval before proceeding to `spell-architect`.
|
|
144
152
|
|
|
145
|
-
8. **Provider TODO handling** — if `external_provider=jira` or `external_provider=other`, add a TODO note in PRD open questions that provider-specific automation/linking is pending.
|
|
153
|
+
8. **Provider TODO handling** — if `external_provider=jira` or `external_provider=other`, add a TODO note in PRD open questions that provider-specific automation/linking is pending. `github` does not need this — it has a real, working flow (Step 1 above).
|
|
146
154
|
|
|
147
155
|
Rules:
|
|
148
156
|
- Every requirement must have at least one testable acceptance criterion.
|
|
@@ -51,7 +51,7 @@ For each PR in the batch, independently:
|
|
|
51
51
|
1. Fetch the PR diff and metadata (`gh pr diff <n>` / `az repos pr show --id <n>` + diff). If a PR can't be fetched (deleted, no access, network error), **skip it, record it as `SKIPPED` with the reason, and continue** — never abort the whole batch for one bad PR.
|
|
52
52
|
2. Run the `spell-review` workflow against that diff — the full dimension-coverage sweep (correctness, security, performance, tests, naming/clarity, architecture), severity-ranked findings (`HIGH` / `MEDIUM` / `LOW`, matching the `spell-review` ladder) with stable IDs, and the PASS/WARN/FAIL coverage table.
|
|
53
53
|
3. Record a per-PR result: verdict (**approve** / **request-changes**), finding counts by severity, and the coverage table.
|
|
54
|
-
4. **Post the formal round state per PR** — apply `spell-review`'s step 10 (
|
|
54
|
+
4. **Post the formal round state per PR** — apply `spell-review`'s step 10 (ARC-035 decision 3 — cited as plain text, not linked; see `agent-output.instructions.md` → Doc-ID Link Format) to *this* PR's number, not just this workflow's own single-run PR: a **request-changes** verdict posts `gh pr review <n> --request-changes` (or `az repos pr set-vote --id <n> --vote reject`); a re-review that clears a round this batch previously blocked dismisses/supersedes that prior review. An **approve** verdict posts nothing. Never let a posting failure (unauthenticated CLI, PR closed mid-batch) skip or abort the remaining PRs in the batch — record the result already computed and continue.
|
|
55
55
|
|
|
56
56
|
Reviews are adversarial — actively look for problems, do not just confirm quality. Apply the same no-fabrication coverage mandate as `spell-review`: a clean lens is reported as "no issues," never padded.
|
|
57
57
|
|
|
@@ -68,11 +68,11 @@ Build one report:
|
|
|
68
68
|
|
|
69
69
|
| PR | Repo | Title | Verdict | High | Med | Low |
|
|
70
70
|
| -- | ---- | ----- | ------- | ---- | --- | --- |
|
|
71
|
-
| #n | repo | … | approve / request-changes | 0 | 1 | 2 |
|
|
72
|
-
| #n | repo | … | SKIPPED — {reason} | — | — | — |
|
|
71
|
+
| [#n]({url}) | repo | … | approve / request-changes | 0 | 1 | 2 |
|
|
72
|
+
| [#n]({url}) | repo | … | SKIPPED — {reason} | — | — | — |
|
|
73
73
|
|
|
74
74
|
## Per-PR detail
|
|
75
|
-
### PR #n — {title}
|
|
75
|
+
### [PR #n]({url}) — {title}
|
|
76
76
|
- Verdict: …
|
|
77
77
|
- Coverage: {PASS/WARN/FAIL per lens}
|
|
78
78
|
- Findings: {R1 …}
|
|
@@ -122,7 +122,7 @@ Workflow:
|
|
|
122
122
|
|
|
123
123
|
9. **Write back to the pull request** — when a PR exists for these changes, sync a short verdict plus a findings summary (verdict + finding counts/IDs + a pointer to the saved report) into the PR body/description. Use provider-agnostic phrasing that works for either GitHub or Azure DevOps. Mark it clearly as a snapshot at review time, and fall back to a top-level PR comment if the description can't be updated.
|
|
124
124
|
|
|
125
|
-
10. **Post the formal round state** (
|
|
125
|
+
10. **Post the formal round state** (ARC-035 decision 3 — Arcane's own framework decision, cited as plain text, not linked, since this file ships; see `agent-output.instructions.md` → Doc-ID Link Format) — step 9's write-back is a human-readable summary; this is the separate, machine-readable signal the `Review round clear` required check actually reads. Only a confirmed blocker posts a formal review — an `APPROVE` or `DEFER` verdict posts nothing here, preserving the zero-friction path for PRs nobody formally blocks:
|
|
126
126
|
- **REQUEST CHANGES verdict:**
|
|
127
127
|
- GitHub: `gh pr review <n> --request-changes --body "<one-line blocker summary + pointer to the saved report>"`.
|
|
128
128
|
- Azure DevOps: `az repos pr set-vote --id <n> --vote reject` — the same primitive `spell-commit-work.prompt.md`'s author-side self-approval step already uses (`az repos pr set-vote --vote approve`), applied to the reviewer side.
|
|
@@ -54,7 +54,7 @@ If the input is an external work item ID:
|
|
|
54
54
|
|
|
55
55
|
Resolve tracking settings from PRD frontmatter (preferred) or ask:
|
|
56
56
|
- `tracking_mode: internal | external`
|
|
57
|
-
- `external_provider: ado | jira | other`
|
|
57
|
+
- `external_provider: ado | github | jira | other`
|
|
58
58
|
|
|
59
59
|
If unset and ADO context already exists, default to `external` + `ado` for backward compatibility.
|
|
60
60
|
|
|
@@ -118,7 +118,7 @@ For each epic, define:
|
|
|
118
118
|
|
|
119
119
|
Only applies when `tracking_mode=external`. Skip entirely for internal mode.
|
|
120
120
|
|
|
121
|
-
Do **not** inline the work-item-type fallback order or the parent/child linkage rules here — they are the single source of truth in [governance/development-methodology.md](../../.arcane/governance/development-methodology.md)
|
|
121
|
+
Do **not** inline the work-item-type fallback order or the parent/child linkage rules here — they are the single source of truth in [governance/development-methodology.md](../../.arcane/governance/development-methodology.md), under **Process-Template-Aware ADO Hierarchy Rules** (`external_provider=ado`) or **GitHub Issues Conventions** (`external_provider=github`). Detect the provider from `external_provider`, then apply the matching section's rules. *Fallback: if that doc is missing, record the tracker mapping as an Open Question and proceed without item-type assignment.*
|
|
122
122
|
|
|
123
123
|
Scope-specific delta (the only thing this spell adds on top of those rules): each split **epic** maps to the **Epic-level** logical level — use the `Epic` work item type whenever the resolved provider/template offers it, and record the selected type per epic in `execution-plan.md`. All lower-level and linkage decisions defer to the governance rules above.
|
|
124
124
|
|
|
@@ -55,7 +55,7 @@ Workflow:
|
|
|
55
55
|
- Read `tracking_mode` / `external_provider` from `.arcane.json` or the active PRD frontmatter if available.
|
|
56
56
|
- If missing, ask the user:
|
|
57
57
|
- `tracking_mode: internal | external`
|
|
58
|
-
- `external_provider: ado | jira | other` (required only for external mode)
|
|
58
|
+
- `external_provider: ado | github | jira | other` (required only for external mode)
|
|
59
59
|
- If ADO context is already active and no explicit choice is provided, default to `external` + `ado` for backward compatibility.
|
|
60
60
|
|
|
61
61
|
5. **Create tracker item (conditional)**:
|
|
@@ -70,9 +70,17 @@ Workflow:
|
|
|
70
70
|
--output json
|
|
71
71
|
```
|
|
72
72
|
Extract the work item ID from the response.
|
|
73
|
+
- If `tracking_mode=external` and `external_provider=github`, create an issue:
|
|
74
|
+
```bash
|
|
75
|
+
gh issue create \
|
|
76
|
+
--title "{title}" \
|
|
77
|
+
--body "{formatted user story + impact assessment}" \
|
|
78
|
+
--label enhancement
|
|
79
|
+
```
|
|
80
|
+
`gh issue create` prints the created issue's URL; extract the trailing number as the issue ID. `--label` names must exist in the repo already (`gh label list`) — omit it rather than guessing a label that isn't there.
|
|
73
81
|
- If `tracking_mode=internal`, skip external item creation and track in `TODO.md` only.
|
|
74
82
|
- If `external_provider=jira` or `other`, add a TODO note for provider-specific automation and continue with `TODO.md` tracking.
|
|
75
|
-
- The ADO
|
|
83
|
+
- The ADO and GitHub commands above are illustrative; for the authoritative per-provider creation steps and field mappings, see [[.arcane/governance/development-methodology|Development Methodology]].
|
|
76
84
|
|
|
77
85
|
6. **Update backlog** — add a line to `TODO.md`:
|
|
78
86
|
```markdown
|
|
@@ -11,7 +11,7 @@ agent: agent
|
|
|
11
11
|
- **Hub-gated:** requires `role: "hub"` in `.arcane.json`. Refuses cleanly in a consumer repo, pointing at the right place to capture the idea instead.
|
|
12
12
|
- Use this when starting a new venture (business, product, or personal project) that the hub should track.
|
|
13
13
|
- Input format is: `Venture Name | Venture Type | Description` — prompt will ask for missing fields.
|
|
14
|
-
- Renamed from `spell-bootstrap-business` — venture books and the registry didn't exist when that spell was named. Clean rename, no compatibility alias, per
|
|
14
|
+
- Renamed from `spell-bootstrap-business` — venture books and the registry didn't exist when that spell was named. Clean rename, no compatibility alias, per ARC-008's precedent (cited as plain text, not linked — this file ships; see `agent-output.instructions.md` → Doc-ID Link Format).
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
package/dist/index.js
CHANGED
|
@@ -97,7 +97,7 @@ var ManifestInvalidFieldError = class extends Error {
|
|
|
97
97
|
};
|
|
98
98
|
var MANIFEST_FILE = ".arcane.json";
|
|
99
99
|
var VALID_TRACKING_MODES = ["internal", "external"];
|
|
100
|
-
var VALID_EXTERNAL_PROVIDERS = ["ado", "jira", "other"];
|
|
100
|
+
var VALID_EXTERNAL_PROVIDERS = ["ado", "github", "jira", "other"];
|
|
101
101
|
var VALID_CONTENT_SENSITIVITY = ["standard", "sensitive"];
|
|
102
102
|
var VALID_PUSH_POLICIES = ["open", "guarded", "blocked"];
|
|
103
103
|
function isValidSubjectRoot(value) {
|
|
@@ -2677,7 +2677,7 @@ async function runInit(options, targetDir, assetsDir, packageVersion) {
|
|
|
2677
2677
|
message: "How will work be tracked in this repo?",
|
|
2678
2678
|
choices: [
|
|
2679
2679
|
{ value: "internal", name: "Track work in this repo (TODO.md / PRDs)" },
|
|
2680
|
-
{ value: "external", name: "Track work in an external tracker (Azure DevOps / Jira / other)" }
|
|
2680
|
+
{ value: "external", name: "Track work in an external tracker (Azure DevOps / GitHub / Jira / other)" }
|
|
2681
2681
|
]
|
|
2682
2682
|
});
|
|
2683
2683
|
if (tracking_mode === "external") {
|
|
@@ -2685,6 +2685,7 @@ async function runInit(options, targetDir, assetsDir, packageVersion) {
|
|
|
2685
2685
|
message: "Which external tracker?",
|
|
2686
2686
|
choices: [
|
|
2687
2687
|
{ value: "ado", name: "Azure DevOps" },
|
|
2688
|
+
{ value: "github", name: "GitHub Issues" },
|
|
2688
2689
|
{ value: "jira", name: "Jira" },
|
|
2689
2690
|
{ value: "other", name: "Other" }
|
|
2690
2691
|
]
|
|
@@ -2963,7 +2964,7 @@ var MANIFEST_RETROFITS = [
|
|
|
2963
2964
|
message: "How will work be tracked in this repo?",
|
|
2964
2965
|
choices: [
|
|
2965
2966
|
{ value: "internal", name: "Track work in this repo (TODO.md / PRDs)" },
|
|
2966
|
-
{ value: "external", name: "Track work in an external tracker (Azure DevOps / Jira / other)" }
|
|
2967
|
+
{ value: "external", name: "Track work in an external tracker (Azure DevOps / GitHub / Jira / other)" }
|
|
2967
2968
|
]
|
|
2968
2969
|
});
|
|
2969
2970
|
if (tracking_mode === "external") {
|
|
@@ -2971,6 +2972,7 @@ var MANIFEST_RETROFITS = [
|
|
|
2971
2972
|
message: "Which external tracker?",
|
|
2972
2973
|
choices: [
|
|
2973
2974
|
{ value: "ado", name: "Azure DevOps" },
|
|
2975
|
+
{ value: "github", name: "GitHub Issues" },
|
|
2974
2976
|
{ value: "jira", name: "Jira" },
|
|
2975
2977
|
{ value: "other", name: "Other" }
|
|
2976
2978
|
]
|
|
@@ -3983,6 +3985,21 @@ var pkg = require3("../package.json");
|
|
|
3983
3985
|
var ASSETS_DIR = process.env["ARCANE_ASSETS_DIR"] ?? join12(dirname4(fileURLToPath(import.meta.url)), "assets");
|
|
3984
3986
|
var program = new Command();
|
|
3985
3987
|
program.name("spell").description("Arcane framework CLI \u2014 scaffold and manage governance files").version(pkg.version).action(async () => {
|
|
3988
|
+
if (program.args.length > 0) {
|
|
3989
|
+
const [attempted] = program.args;
|
|
3990
|
+
console.error(`spell: unrecognized command '${attempted}'`);
|
|
3991
|
+
console.error();
|
|
3992
|
+
console.error(
|
|
3993
|
+
`Spells are prompts, not CLI commands \u2014 run /spell-${attempted} in your agent client.`
|
|
3994
|
+
);
|
|
3995
|
+
console.error();
|
|
3996
|
+
console.error("Real CLI commands:");
|
|
3997
|
+
for (const cmd of program.commands) {
|
|
3998
|
+
console.error(` ${cmd.name().padEnd(14)} ${cmd.description()}`);
|
|
3999
|
+
}
|
|
4000
|
+
process.exitCode = 1;
|
|
4001
|
+
return;
|
|
4002
|
+
}
|
|
3986
4003
|
await printWelcome(pkg.version, process.cwd());
|
|
3987
4004
|
program.outputHelp();
|
|
3988
4005
|
});
|