arcane-cli 0.22.5 → 0.22.7
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/universal-agent-rules.md +1 -1
- package/dist/assets/.github/prompts/spell-arcane-version.prompt.md +16 -12
- package/dist/assets/.github/prompts/spell-bug.prompt.md +13 -0
- package/dist/assets/.github/prompts/spell-full-cycle.prompt.md +4 -3
- package/dist/assets/.github/prompts/spell-open-session.prompt.md +15 -3
- package/dist/assets/.github/prompts/spell-plan.prompt.md +15 -7
- 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/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
|
|
|
@@ -33,7 +33,7 @@ See also: [[README]], [[DECISIONS]], [[governance/git-conventions|Git Convention
|
|
|
33
33
|
|
|
34
34
|
7. **Use wiki-links for cross-references** (e.g., `[[DECISIONS#ADR-NNN|Short Title]]`, `[[journal/YYYY-MM-DD-topic-slug|Session Label]]`). This enables knowledge graph visualization.
|
|
35
35
|
|
|
36
|
-
8. **Use Mermaid for diagrams** (` ```mermaid ` blocks) for all flow charts, architecture diagrams, and sequence diagrams. Directory trees stay as plain code blocks.
|
|
36
|
+
8. **Use Mermaid for diagrams** (` ```mermaid ` blocks) for all flow charts, architecture diagrams, and sequence diagrams. Directory trees stay as plain code blocks. Spell output describing state the spell already computed — not authored, freehand explanatory content — additionally follows the **generated state diagrams** convention ([ARC-036](https://github.com/codemagicianhq/arcane/blob/main/DECISIONS.md#arc-036--generated-state-diagrams-deterministic-mermaid-for-computed-spell-state)): a deterministic, data-derived Mermaid diagram built only from values already in scope, never modeled or invented. Skip it for one-line outputs, speed-rule spells, or any state with only a single reading — the diagram exists to make relationships between multiple already-computed values legible, not to decorate simple output.
|
|
37
37
|
|
|
38
38
|
9. **Journal files use date-prefix naming:** `journal/YYYY-MM-DD-topic-slug.md` for chronological sorting.
|
|
39
39
|
|
|
@@ -40,23 +40,27 @@ Produce output in this exact structure:
|
|
|
40
40
|
| **Installed At** | `{installedAt}` |
|
|
41
41
|
| **Components** | `{count}` installed |
|
|
42
42
|
|
|
43
|
-
### Update Check
|
|
43
|
+
### Update Check (two-axis)
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
- Compare to the installed version.
|
|
45
|
+
This repo's `.arcane.json` version is one of three readings — check both axes, the same two as
|
|
46
|
+
`spell-open-session`'s own version check:
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
- **Repo-files version** — already read in Step 1 (`.arcane.json`'s `version` field).
|
|
49
|
+
- **Installed CLI version** — determine the version of the installed `arcane-cli` CLI (for example,
|
|
50
|
+
`npx arcane-cli --version`, or the locally installed package version).
|
|
51
|
+
- **Npm-latest version** — fetch `https://registry.npmjs.org/arcane-cli/latest` and extract the
|
|
52
|
+
`version` field.
|
|
50
53
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
- **(a) Repo-files behind the installed CLI:** `⚠ Managed files out of date: files at {version} → CLI at {cli}. Run spell update to resync files.`
|
|
55
|
+
- **(b) Installed CLI behind npm-latest:** `⚠ Update available: CLI at {cli} → latest {latest}. Upgrade the CLI, then run spell update.`
|
|
56
|
+
- **If either axis drifts, emit the canonical version-drift diagram** — same template, same collapsing/
|
|
57
|
+
branching rule, same `:::mermaid`-for-ADO-wikis fencing as `spell-open-session.prompt.md`'s own
|
|
58
|
+
"Arcane version check (two-axis)" step; that file holds the canonical shape, referenced here rather
|
|
59
|
+
than repeated.
|
|
60
|
+
- If both axes are current:
|
|
56
61
|
|
|
57
62
|
```
|
|
58
|
-
|
|
59
|
-
Run `spell update` to upgrade.
|
|
63
|
+
✔ You are on the latest version ({version}).
|
|
60
64
|
```
|
|
61
65
|
|
|
62
66
|
If the npm registry is unreachable, report:
|
|
@@ -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:
|
|
@@ -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`:
|
|
@@ -96,7 +96,19 @@ Before anything else, check:
|
|
|
96
96
|
- Run `npm view arcane-cli version` to get the latest published version.
|
|
97
97
|
- **(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.`
|
|
98
98
|
- **(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.`
|
|
99
|
-
- If
|
|
99
|
+
- **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:
|
|
100
|
+
```mermaid
|
|
101
|
+
gitGraph
|
|
102
|
+
commit id: "<repo-files version>"
|
|
103
|
+
branch repo-files
|
|
104
|
+
checkout main
|
|
105
|
+
commit id: "<installed-CLI version>"
|
|
106
|
+
branch installed-cli
|
|
107
|
+
checkout main
|
|
108
|
+
commit id: "<npm-latest version>" tag: "latest"
|
|
109
|
+
```
|
|
110
|
+
(Shown here with both axes drifting — omit whichever `branch`/`checkout` pair belongs to a non-drifting axis, and collapse its commit into its neighbor's if the values are equal.) Use `:::mermaid` fencing instead of ` ```mermaid ` when the output surface is an Azure DevOps wiki — resolve `external_provider` from `.arcane.json` rather than assuming, the same as every other tracker-conditional step in this file; note for bare terminals that the fenced source is still readable without a renderer.
|
|
111
|
+
- If both axes are current, report current and continue — no diagram (the applicability guard: a single, matching reading has nothing to visualize).
|
|
100
112
|
- If no `.arcane.json` exists, skip silently.
|
|
101
113
|
|
|
102
114
|
## State Snapshot
|
|
@@ -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.
|
|
@@ -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
|
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
|
});
|