arcane-cli 0.39.0 → 1.1.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/README.md +14 -1
- package/dist/assets/.agents/skills/spell-address-review/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-adopt-docs/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-arcane-version/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-architect/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-brainstorm/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-bug/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-bump/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-check-drift/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-close-session/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-commit-work/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-compliance/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-create-pull-request/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-document/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-dotnet-expert/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-eas-store-deploy/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-enchant/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-explain-concept/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-feedback/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-full-cycle/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-generate-bot-icons/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-implement/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-make-discoverable/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-manifest/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-open-session/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-plan/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-present-arcane/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-product-review/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-review/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-review-batch/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-save-idea/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-scope/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-scry/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-security-review/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-ship/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-status/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-suggest-feature/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-summon-venture/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-sync-pull-request/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-test/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-todo/SKILL.md +1 -1
- package/dist/assets/.agents/skills/spell-verification-ledger/SKILL.md +1 -1
- package/dist/assets/.arcane/governance/development-methodology.md +6 -6
- package/dist/assets/.arcane/governance/git-conventions.md +2 -2
- package/dist/assets/.arcane/governance/portable-bootstrap.md +1 -0
- package/dist/assets/.arcane/governance/product-excellence-standards.md +1 -1
- package/dist/assets/.arcane/governance/spell-authoring-standards.md +9 -1
- package/dist/assets/.arcane/governance/universal-agent-rules.md +5 -3
- package/dist/assets/.arcane/spells/spell-address-review.md +115 -0
- package/dist/assets/.arcane/spells/spell-adopt-docs.md +158 -0
- package/dist/assets/.arcane/spells/spell-arcane-version.md +87 -0
- package/dist/assets/.arcane/spells/spell-architect.md +117 -0
- package/dist/assets/.arcane/spells/spell-brainstorm.md +125 -0
- package/dist/assets/.arcane/spells/spell-bug.md +123 -0
- package/dist/assets/.arcane/spells/spell-bump.md +82 -0
- package/dist/assets/.arcane/spells/spell-check-drift.md +118 -0
- package/dist/assets/.arcane/spells/spell-close-session.md +266 -0
- package/dist/assets/.arcane/spells/spell-commit-work.md +279 -0
- package/dist/assets/.arcane/spells/spell-compliance.md +130 -0
- package/dist/assets/.arcane/spells/spell-create-pull-request.md +224 -0
- package/dist/assets/.arcane/spells/spell-document.md +84 -0
- package/dist/assets/.arcane/spells/spell-dotnet-expert.md +118 -0
- package/dist/assets/.arcane/spells/spell-eas-store-deploy.md +254 -0
- package/dist/assets/.arcane/spells/spell-enchant.md +386 -0
- package/dist/assets/.arcane/spells/spell-explain-concept.md +70 -0
- package/dist/assets/.arcane/spells/spell-feedback.md +138 -0
- package/dist/assets/.arcane/spells/spell-full-cycle.md +253 -0
- package/dist/assets/.arcane/spells/spell-generate-bot-icons.md +85 -0
- package/dist/assets/.arcane/spells/spell-implement.md +109 -0
- package/dist/assets/.arcane/spells/spell-make-discoverable.md +293 -0
- package/dist/assets/.arcane/spells/spell-manifest.md +148 -0
- package/dist/assets/.arcane/spells/spell-open-session.md +154 -0
- package/dist/assets/.arcane/spells/spell-plan.md +160 -0
- package/dist/assets/.arcane/spells/spell-present-arcane.md +189 -0
- package/dist/assets/.arcane/spells/spell-product-review.md +98 -0
- package/dist/assets/.arcane/spells/spell-review-batch.md +113 -0
- package/dist/assets/.arcane/spells/spell-review.md +142 -0
- package/dist/assets/.arcane/spells/spell-save-idea.md +117 -0
- package/dist/assets/.arcane/spells/spell-scope.md +266 -0
- package/dist/assets/.arcane/spells/spell-scry.md +124 -0
- package/dist/assets/.arcane/spells/spell-security-review.md +152 -0
- package/dist/assets/.arcane/spells/spell-ship.md +106 -0
- package/dist/assets/.arcane/spells/spell-status.md +86 -0
- package/dist/assets/.arcane/spells/spell-suggest-feature.md +122 -0
- package/dist/assets/.arcane/spells/spell-summon-venture.md +110 -0
- package/dist/assets/.arcane/spells/spell-sync-pull-request.md +161 -0
- package/dist/assets/.arcane/spells/spell-test.md +88 -0
- package/dist/assets/.arcane/spells/spell-todo.md +166 -0
- package/dist/assets/.arcane/spells/spell-verification-ledger.md +102 -0
- package/dist/assets/.claude/commands/spell-address-review.md +2 -2
- package/dist/assets/.claude/commands/spell-adopt-docs.md +2 -2
- package/dist/assets/.claude/commands/spell-arcane-version.md +2 -2
- package/dist/assets/.claude/commands/spell-architect.md +2 -2
- package/dist/assets/.claude/commands/spell-brainstorm.md +2 -2
- package/dist/assets/.claude/commands/spell-bug.md +2 -2
- package/dist/assets/.claude/commands/spell-bump.md +2 -2
- package/dist/assets/.claude/commands/spell-check-drift.md +2 -2
- package/dist/assets/.claude/commands/spell-close-session.md +2 -2
- package/dist/assets/.claude/commands/spell-commit-work.md +2 -2
- package/dist/assets/.claude/commands/spell-compliance.md +2 -2
- package/dist/assets/.claude/commands/spell-create-pull-request.md +2 -2
- package/dist/assets/.claude/commands/spell-document.md +2 -2
- package/dist/assets/.claude/commands/spell-dotnet-expert.md +2 -2
- package/dist/assets/.claude/commands/spell-eas-store-deploy.md +2 -2
- package/dist/assets/.claude/commands/spell-enchant.md +2 -2
- package/dist/assets/.claude/commands/spell-explain-concept.md +2 -2
- package/dist/assets/.claude/commands/spell-feedback.md +2 -2
- package/dist/assets/.claude/commands/spell-full-cycle.md +2 -2
- package/dist/assets/.claude/commands/spell-generate-bot-icons.md +2 -2
- package/dist/assets/.claude/commands/spell-implement.md +2 -2
- package/dist/assets/.claude/commands/spell-make-discoverable.md +2 -2
- package/dist/assets/.claude/commands/spell-manifest.md +2 -2
- package/dist/assets/.claude/commands/spell-open-session.md +2 -2
- package/dist/assets/.claude/commands/spell-plan.md +2 -2
- package/dist/assets/.claude/commands/spell-present-arcane.md +2 -2
- package/dist/assets/.claude/commands/spell-product-review.md +2 -2
- package/dist/assets/.claude/commands/spell-review-batch.md +2 -2
- package/dist/assets/.claude/commands/spell-review.md +2 -2
- package/dist/assets/.claude/commands/spell-save-idea.md +2 -2
- package/dist/assets/.claude/commands/spell-scope.md +2 -2
- package/dist/assets/.claude/commands/spell-scry.md +2 -2
- package/dist/assets/.claude/commands/spell-security-review.md +2 -2
- package/dist/assets/.claude/commands/spell-ship.md +2 -2
- package/dist/assets/.claude/commands/spell-status.md +2 -2
- package/dist/assets/.claude/commands/spell-suggest-feature.md +2 -2
- package/dist/assets/.claude/commands/spell-summon-venture.md +2 -2
- package/dist/assets/.claude/commands/spell-sync-pull-request.md +2 -2
- package/dist/assets/.claude/commands/spell-test.md +2 -2
- package/dist/assets/.claude/commands/spell-todo.md +2 -2
- package/dist/assets/.claude/commands/spell-verification-ledger.md +2 -2
- package/dist/assets/.github/instructions/agent-output.instructions.md +14 -13
- package/dist/assets/.github/prompts/spell-address-review.prompt.md +1 -107
- package/dist/assets/.github/prompts/spell-adopt-docs.prompt.md +1 -150
- package/dist/assets/.github/prompts/spell-arcane-version.prompt.md +1 -79
- package/dist/assets/.github/prompts/spell-architect.prompt.md +1 -109
- package/dist/assets/.github/prompts/spell-brainstorm.prompt.md +1 -117
- package/dist/assets/.github/prompts/spell-bug.prompt.md +1 -115
- package/dist/assets/.github/prompts/spell-bump.prompt.md +1 -74
- package/dist/assets/.github/prompts/spell-check-drift.prompt.md +1 -110
- package/dist/assets/.github/prompts/spell-close-session.prompt.md +1 -258
- package/dist/assets/.github/prompts/spell-commit-work.prompt.md +1 -270
- package/dist/assets/.github/prompts/spell-compliance.prompt.md +1 -122
- package/dist/assets/.github/prompts/spell-create-pull-request.prompt.md +1 -215
- package/dist/assets/.github/prompts/spell-document.prompt.md +1 -76
- package/dist/assets/.github/prompts/spell-dotnet-expert.prompt.md +1 -110
- package/dist/assets/.github/prompts/spell-eas-store-deploy.prompt.md +1 -246
- package/dist/assets/.github/prompts/spell-enchant.prompt.md +1 -378
- package/dist/assets/.github/prompts/spell-explain-concept.prompt.md +1 -62
- package/dist/assets/.github/prompts/spell-feedback.prompt.md +1 -130
- package/dist/assets/.github/prompts/spell-full-cycle.prompt.md +1 -245
- package/dist/assets/.github/prompts/spell-generate-bot-icons.prompt.md +1 -77
- package/dist/assets/.github/prompts/spell-implement.prompt.md +1 -101
- package/dist/assets/.github/prompts/spell-make-discoverable.prompt.md +1 -285
- package/dist/assets/.github/prompts/spell-manifest.prompt.md +1 -140
- package/dist/assets/.github/prompts/spell-open-session.prompt.md +1 -146
- package/dist/assets/.github/prompts/spell-plan.prompt.md +1 -152
- package/dist/assets/.github/prompts/spell-present-arcane.prompt.md +1 -181
- package/dist/assets/.github/prompts/spell-product-review.prompt.md +1 -90
- package/dist/assets/.github/prompts/spell-review-batch.prompt.md +1 -105
- package/dist/assets/.github/prompts/spell-review.prompt.md +1 -134
- package/dist/assets/.github/prompts/spell-save-idea.prompt.md +1 -109
- package/dist/assets/.github/prompts/spell-scope.prompt.md +1 -258
- package/dist/assets/.github/prompts/spell-scry.prompt.md +1 -116
- package/dist/assets/.github/prompts/spell-security-review.prompt.md +1 -144
- package/dist/assets/.github/prompts/spell-ship.prompt.md +1 -98
- package/dist/assets/.github/prompts/spell-status.prompt.md +1 -78
- package/dist/assets/.github/prompts/spell-suggest-feature.prompt.md +1 -114
- package/dist/assets/.github/prompts/spell-summon-venture.prompt.md +1 -102
- package/dist/assets/.github/prompts/spell-sync-pull-request.prompt.md +1 -152
- package/dist/assets/.github/prompts/spell-test.prompt.md +1 -80
- package/dist/assets/.github/prompts/spell-todo.prompt.md +1 -158
- package/dist/assets/.github/prompts/spell-verification-ledger.prompt.md +1 -94
- package/dist/index.js +1073 -246
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- /package/dist/assets/{.github/prompts → .arcane/spells}/_fragments/tracking-mode-declaration.md +0 -0
|
@@ -6,155 +6,4 @@ argument-hint: Feature or initiative to plan (e.g., "user authentication for a m
|
|
|
6
6
|
agent: agent
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- This prompt generates a PRD.md from a feature description or TODO item.
|
|
12
|
-
- It follows a structured analysis pattern — requirements, acceptance criteria, and constraints.
|
|
13
|
-
- Output feeds directly into `spell-architect` as the next phase of the Spell Loop.
|
|
14
|
-
- See [[.arcane/governance/development-methodology|Development Methodology]] for full Spell Loop reference.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
Generate a Product Requirements Document for the described feature or initiative.
|
|
19
|
-
|
|
20
|
-
Use these files for context:
|
|
21
|
-
|
|
22
|
-
- [governance/development-methodology.md](../../.arcane/governance/development-methodology.md) — Spell Loop methodology
|
|
23
|
-
- [project.md](../../project.md) — Project goals and priorities
|
|
24
|
-
- [DECISIONS.md](../../DECISIONS.md) — Existing ADRs to respect
|
|
25
|
-
|
|
26
|
-
Workflow:
|
|
27
|
-
|
|
28
|
-
1. **Configure tracking mode first** — decide how this work will be tracked before requirement intake:
|
|
29
|
-
|
|
30
|
-
<!-- fragment:tracking-mode-declaration:start -->
|
|
31
|
-
- `tracking_mode: internal | external`
|
|
32
|
-
- `external_provider: ado | github | jira | other`
|
|
33
|
-
<!-- fragment:tracking-mode-declaration:end -->
|
|
34
|
-
|
|
35
|
-
Resolve in this order, matching spell-open-session's own resolution chain (EF-14): root
|
|
36
|
-
`.arcane.json` (if present) → the committed self-hosted source manifest (`src/assets/.arcane.json`,
|
|
37
|
-
read only when it declares `selfHosted: true`) → the current feature PRD frontmatter → ask.
|
|
38
|
-
Do not re-ask when any of the first three sources already sets it.
|
|
39
|
-
|
|
40
|
-
Rules:
|
|
41
|
-
- 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.
|
|
42
|
-
- 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].
|
|
43
|
-
- If `tracking_mode=internal`, do not require an external tracker ID.
|
|
44
|
-
- If `tracking_mode=external` and `external_provider=ado`, collect org/project and resolve process template + available work item types before planning:
|
|
45
|
-
```bash
|
|
46
|
-
az devops project show --org https://dev.azure.com/{org} --project {project} --query "capabilities.processTemplate.templateName" --output tsv
|
|
47
|
-
az boards work-item-type list --org https://dev.azure.com/{org} --project {project} --output json --query "[].name"
|
|
48
|
-
```
|
|
49
|
-
Then enforce level-to-type mapping using the first available type in order:
|
|
50
|
-
- Epic-level: `Epic → Feature → User Story → Issue`
|
|
51
|
-
- Feature-level: `Feature → User Story → Issue`
|
|
52
|
-
- Story-level: `User Story → Issue → Task`
|
|
53
|
-
- Task-level: `Task → Issue`
|
|
54
|
-
- Defect-level: `Bug → Issue → Task`
|
|
55
|
-
- 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.
|
|
56
|
-
- If `external_provider=jira` or `other`, record as TODO and continue with internal artifacts unless the operator provides explicit provider workflow steps.
|
|
57
|
-
|
|
58
|
-
2. **Gather requirements** — accept input from any of these sources:
|
|
59
|
-
|
|
60
|
-
| Source | Format | How to fetch |
|
|
61
|
-
|--------|--------|--------------|
|
|
62
|
-
| **Description in prompt** | Inline text | Use as-is |
|
|
63
|
-
| **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` |
|
|
64
|
-
| **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 |
|
|
65
|
-
| **File path** | Path to existing doc | Read the file |
|
|
66
|
-
|
|
67
|
-
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.
|
|
68
|
-
|
|
69
|
-
Ask clarifying questions if the feature description is ambiguous. You need to understand:
|
|
70
|
-
- What problem does this solve?
|
|
71
|
-
- Who is the user/audience?
|
|
72
|
-
- What business does this belong to?
|
|
73
|
-
- Are there existing ADRs or constraints?
|
|
74
|
-
- **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`.
|
|
75
|
-
- **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.
|
|
76
|
-
|
|
77
|
-
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.
|
|
78
|
-
|
|
79
|
-
4. **Generate PRD.md** with these sections:
|
|
80
|
-
```markdown
|
|
81
|
-
# PRD: [Feature Name]
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
tracking:
|
|
85
|
-
tracking_mode: [internal|external]
|
|
86
|
-
external_provider: [ado|github|jira|other|null]
|
|
87
|
-
adoWorkItemId: [number|null]
|
|
88
|
-
githubIssueId: [number|null]
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## Problem Statement
|
|
92
|
-
[What problem are we solving? Why now?]
|
|
93
|
-
|
|
94
|
-
## Target Users
|
|
95
|
-
[Who benefits? Which business?]
|
|
96
|
-
|
|
97
|
-
## Requirements
|
|
98
|
-
### Must Have
|
|
99
|
-
- [Requirement with acceptance criteria]
|
|
100
|
-
|
|
101
|
-
### Should Have
|
|
102
|
-
- [Requirement with acceptance criteria]
|
|
103
|
-
|
|
104
|
-
### Won't Have (this iteration)
|
|
105
|
-
- [Explicitly excluded scope]
|
|
106
|
-
|
|
107
|
-
## Constraints
|
|
108
|
-
- [Technical: frameworks, platforms, existing architecture]
|
|
109
|
-
- [Business: budget, timeline, dependencies]
|
|
110
|
-
- [Security: per threat model]
|
|
111
|
-
|
|
112
|
-
## Acceptance Criteria
|
|
113
|
-
- [ ] [Testable criterion 1]
|
|
114
|
-
- [ ] [Testable criterion 2]
|
|
115
|
-
|
|
116
|
-
## Dependencies
|
|
117
|
-
- [Other features, services, or decisions needed]
|
|
118
|
-
|
|
119
|
-
## Open Questions
|
|
120
|
-
- [Unresolved items that need human decision]
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Include an **example config snippet** when presenting the draft:
|
|
124
|
-
```yaml
|
|
125
|
-
tracking:
|
|
126
|
-
tracking_mode: external
|
|
127
|
-
external_provider: ado
|
|
128
|
-
adoWorkItemId: 541
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
5. **Validate against existing ADRs** — ensure the PRD doesn't contradict established decisions.
|
|
132
|
-
|
|
133
|
-
6. **Save to disk** — derive the feature folder from the tracking configuration and slugified feature name, then write the PRD:
|
|
134
|
-
```bash
|
|
135
|
-
# external/ado example: adoWorkItemId=541, feature name="Phase 2A" → slug="phase-2a"
|
|
136
|
-
# FEATURE_DIR="features/{adoWorkItemId}-{slug}"
|
|
137
|
-
|
|
138
|
-
# external/github example: githubIssueId=42, feature name="Phase 2A" → slug="phase-2a"
|
|
139
|
-
# FEATURE_DIR="features/{githubIssueId}-{slug}"
|
|
140
|
-
|
|
141
|
-
# internal or a provider without a known issue ID:
|
|
142
|
-
# FEATURE_DIR="features/{slug}"
|
|
143
|
-
mkdir -p "$FEATURE_DIR"
|
|
144
|
-
# Write PRD.md to the feature folder
|
|
145
|
-
```
|
|
146
|
-
Save the generated PRD.md using:
|
|
147
|
-
- `features/{adoWorkItemId}-{slug}/PRD.md` when `tracking_mode=external` and `external_provider=ado`
|
|
148
|
-
- `features/{githubIssueId}-{slug}/PRD.md` when `tracking_mode=external`, `external_provider=github`, and a `githubIssueId` is known
|
|
149
|
-
- `features/{slug}/PRD.md` otherwise (internal mode, or an external provider without a known issue ID)
|
|
150
|
-
Confirm the resolved path to the user.
|
|
151
|
-
|
|
152
|
-
7. **Present for review** — show the PRD to the user for approval before proceeding to `spell-architect`.
|
|
153
|
-
|
|
154
|
-
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).
|
|
155
|
-
|
|
156
|
-
Rules:
|
|
157
|
-
- Every requirement must have at least one testable acceptance criterion.
|
|
158
|
-
- Scope must be small enough for one sprint (1-2 weeks of agent work).
|
|
159
|
-
- If the scope is too large, recommend splitting into multiple PRDs.
|
|
160
|
-
- Flag any requirements that would need a new ADR decision.
|
|
9
|
+
This prompt is the Arcane `spell-plan` spell. Read [`.arcane/spells/spell-plan.md`](../../.arcane/spells/spell-plan.md) and follow it as the complete workflow.
|
|
@@ -6,184 +6,4 @@ argument-hint: '[summary|deck] + optional audience/size — e.g., "for investors
|
|
|
6
6
|
agent: agent
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Mode Selection
|
|
12
|
-
|
|
13
|
-
Parse the first word of the argument before doing anything else. Match case-insensitively:
|
|
14
|
-
|
|
15
|
-
- `summary` → run **Summary Mode** (produce a finished executive-summary document; skip the slide deck). See the Summary Mode section at the end of this file.
|
|
16
|
-
- `deck` → run **Deck Mode** (emit a copy/paste prompt for an external AI to generate slides). See the Deck Mode section at the end of this file.
|
|
17
|
-
- `present`, or no argument at all → run **Present Mode** (default): the full 1-hour talk outline defined immediately below (Purpose through Tone).
|
|
18
|
-
- Any other leading word → treat the whole argument as an audience hint and run **Present Mode**. (If the word *looks* like an intended mode — e.g. `slides`, `doc`, `pdf`, `talk` — note in one line that it isn't a recognized mode and that you're defaulting to Present, then proceed.)
|
|
19
|
-
|
|
20
|
-
After identifying the mode, treat every remaining word as an audience and/or size hint and carry it forward into the chosen mode. The mode keyword itself (`summary`/`deck`/`present`) is consumed by routing and is never a hint.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Purpose
|
|
25
|
-
|
|
26
|
-
Generate a complete, structured presentation for a **1-hour talk about the Arcane project** — including slide-by-slide outline, speaker notes, and a timed demo segment plan.
|
|
27
|
-
|
|
28
|
-
The presentation should tell the story of *what was built*, *why it matters*, *how it works*, and *where it is going*.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Context Files to Read First
|
|
33
|
-
|
|
34
|
-
Read these files before generating the presentation. They are the ground truth **when present** — every row is **optional**. If a file is missing, use the listed fallback and continue; flag any gap in the output (see Output Instructions) rather than blocking.
|
|
35
|
-
|
|
36
|
-
`{BUSINESS_ROOT}` is the directory holding per-business folders (e.g. `ventures/`, `businesses/`, or `projects/`); `{BUSINESS_NAME}` is a specific business. Resolve both from `.arcane.json` / project frontmatter; if unset, **detect** by scanning for a likely root, or ask the operator. There may be zero, one, or many businesses — enumerate whatever exists rather than assuming a fixed count.
|
|
37
|
-
|
|
38
|
-
| File | What to extract | If missing, fall back to |
|
|
39
|
-
|------|----------------|--------------------------|
|
|
40
|
-
| [project.md](../../project.md) | Mission, vision, core principles, entities, goals | `README.md`, then ask the operator for the mission |
|
|
41
|
-
| [ai-context/system-prompt-context.md](../../ai-context/system-prompt-context.md) | Environment, agent stack, current state | Infer environment from repo; omit slide detail if unknown |
|
|
42
|
-
| [DECISIONS.md](../../DECISIONS.md) | Key ADRs — decisions that shaped the architecture | Skip ADR callouts; note that decision records are absent |
|
|
43
|
-
| `.github/agents/*.agent.md` | Agent lineup and capability tiers | Present the system generically if no generated agent files exist |
|
|
44
|
-
| [agents/agent-policies.md](../../.arcane/governance/agent-policies.md) | Power levels, autonomy model | [[.arcane/governance/naming-conventions]]; else describe roles generically |
|
|
45
|
-
| `{BUSINESS_ROOT}/<business>/overview.md` | Per-business status (repeat for each business found) | Enumerate `{BUSINESS_ROOT}/*`; if none, present Arcane without a ventures act |
|
|
46
|
-
| [governance/development-methodology.md](../../.arcane/governance/development-methodology.md) | The Spell Loop — development workflow | Describe the Spell Loop from the spell library filenames |
|
|
47
|
-
| `{INFRA_DOC}` — hardware/infra inventory (e.g. `infrastructure/hardware-inventory.md`) | Hardware context for demo credibility | Detect any infra/hardware doc; else omit the infrastructure slide |
|
|
48
|
-
| [README.md](../../README.md) | Repo structure overview | List top-level directories directly |
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Presentation Requirements
|
|
53
|
-
|
|
54
|
-
### Format
|
|
55
|
-
- **Total runtime:** 60 minutes
|
|
56
|
-
- **Structure:** Slides + speaker notes + timed demo plan
|
|
57
|
-
- **Output format:** Markdown outline suitable for pasting into Gamma.app, Google Slides, or PowerPoint
|
|
58
|
-
- Each slide = `## Slide N — Title` heading
|
|
59
|
-
- Bullet points = talking points (not wall-of-text)
|
|
60
|
-
- Speaker notes = italic block under each slide
|
|
61
|
-
- Max 6 bullets per slide
|
|
62
|
-
|
|
63
|
-
### Timing Budget
|
|
64
|
-
| Segment | Minutes |
|
|
65
|
-
|---------|---------|
|
|
66
|
-
| Opening hook + who I am | 5 |
|
|
67
|
-
| What is Arcane / the vision | 8 |
|
|
68
|
-
| The problem being solved | 5 |
|
|
69
|
-
| Architecture & stack walkthrough | 12 |
|
|
70
|
-
| Ventures — what's been built | 8 |
|
|
71
|
-
| Live demo | 15 |
|
|
72
|
-
| Lessons learned & what's next | 5 |
|
|
73
|
-
| Q&A buffer | 2 |
|
|
74
|
-
| **Total** | **60** |
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## Slide Structure to Generate
|
|
79
|
-
|
|
80
|
-
### Act 1 — Hook & Context (Slides 1–4, ~13 min)
|
|
81
|
-
|
|
82
|
-
1. **Title slide** — Project name, presenter, date, one-line tagline
|
|
83
|
-
2. **The dream** — "One person. Multiple businesses. AI does the work." The vision in human terms.
|
|
84
|
-
3. **Who I am** — {OPERATOR_NAME}'s background, technical role, what motivated this project
|
|
85
|
-
4. **The problem** — Running a business is brutal. AI tooling exists but isn't wired together. This project wires it together.
|
|
86
|
-
|
|
87
|
-
### Act 2 — What Was Built (Slides 5–11, ~20 min)
|
|
88
|
-
|
|
89
|
-
5. **Arcane — the operating system for AI-run businesses** — What the repo is, what it contains, how it's structured
|
|
90
|
-
6. **Security model** — full-disk encryption, least privilege, no root, SecretRef, private network mesh — why security is non-negotiable for a production system
|
|
91
|
-
7. **The AI agent stack** — the gateway plus the agent lineup, power levels, and tool profiles. Populate the roster from the agent-capability-matrix / `.github/agents/*.agent.md` (see [[.arcane/governance/agent-policies]] / [[.arcane/governance/naming-conventions]]); name each `{AGENT_NAME}` with its role rather than assuming a fixed cast. If no roster files exist, describe agent *roles* (e.g. research, marketing, ops, dev) generically.
|
|
92
|
-
8. **The Spell Loop** — Arcane's development methodology: spell-plan → spell-architect → spell-implement → spell-ship
|
|
93
|
-
9. **Multi-client AI governance** — Same rules enforced across every AI client the operator uses. Cite the relevant governance ADR if a decision record exists (resolve the ADR id from `DECISIONS.md`); otherwise state the principle without an id.
|
|
94
|
-
10. **Ventures overview** — one line per business found under `{BUSINESS_ROOT}` (e.g. `{BUSINESS_NAME}` — launch-ready, `{BUSINESS_NAME}` — active dev), plus the idea pipeline. If none exist, replace with a roadmap slide.
|
|
95
|
-
11. **Infrastructure** — `{PRIMARY_HOST}` (primary host; resolve from `{INFRA_DOC}` / `.arcane.json`, else ask or omit), the private network mesh, the configured tracker, and any dual-boot/host setup
|
|
96
|
-
|
|
97
|
-
### Act 3 — Live Demo (Slides 12–13, ~15 min)
|
|
98
|
-
|
|
99
|
-
12. **Demo plan slide** — What will be shown, in what order, what to look for
|
|
100
|
-
13. **Demo backup slide** — Screenshots/recordings of key flows in case of live failure
|
|
101
|
-
|
|
102
|
-
**Demo script to include (in speaker notes):**
|
|
103
|
-
- Show Arcane repo structure in VS Code
|
|
104
|
-
- Trigger a spell command (e.g., `spell-open-session` or `spell-sprint-status`) and show it in action
|
|
105
|
-
- Show a Spell Loop output artifact (PRD or epics) that was AI-generated
|
|
106
|
-
- Show the agent gateway running on `{PRIMARY_HOST}` (status, agent list, or a live agent message). Resolve `{PRIMARY_HOST}` from `{INFRA_DOC}` / `.arcane.json`; if unset, ask the operator or skip this beat.
|
|
107
|
-
- Optional: show Gamma.app or SlidesAI generating a quick slide from a prompt (meta moment)
|
|
108
|
-
|
|
109
|
-
### Act 4 — Reflection & Next (Slides 14–16, ~7 min)
|
|
110
|
-
|
|
111
|
-
14. **What worked** — Top 3 things that validated the approach
|
|
112
|
-
15. **What was hard** — Honest lessons: security overhead, LLM consistency, documentation discipline
|
|
113
|
-
16. **What's next** — near-term milestones per business found (e.g. `{BUSINESS_NAME}` launch, `{BUSINESS_NAME}` Sprint 1) and scaling to the next business. Pull these from each `{BUSINESS_ROOT}/<business>/overview.md`; if none exist, present the framework roadmap instead.
|
|
114
|
-
|
|
115
|
-
### Closing (Slide 17)
|
|
116
|
-
|
|
117
|
-
17. **Close** — One-sentence takeaway, contact info, repo or demo link
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
## Output Instructions
|
|
122
|
-
|
|
123
|
-
1. Generate the **full slide outline** with titles, bullet points (max 6 per slide), and speaker notes.
|
|
124
|
-
2. Include a **demo timing breakdown** in the speaker notes for slides 12–13 (what to show at each minute mark).
|
|
125
|
-
3. At the end, include a **"Gamma.app prompt"** block — a single text prompt the user can paste into Gamma.app to auto-generate the visual deck from this outline.
|
|
126
|
-
4. Flag any slides where **content gaps exist** (e.g., a venture overview file that doesn't exist yet) so the user knows what to fill in before presenting.
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## Tone
|
|
131
|
-
|
|
132
|
-
- Confident and technical — this is not vaporware, this is a working production system.
|
|
133
|
-
- Honest — show real numbers, real stack, real decisions. No marketing fluff.
|
|
134
|
-
- Energetic — this is a unique project; present it with pride.
|
|
135
|
-
- Audience-aware — if the user provided an audience hint (e.g., "for investors"), adjust language and emphasis accordingly. Default to technical/builder audience.
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## Summary Mode
|
|
140
|
-
|
|
141
|
-
Produce a finished, always-current executive summary **document** about Arcane — not a slide deck and not a prompt for another AI. The point is that it reflects live repository state at run time, so counts and versions are never stale.
|
|
142
|
-
|
|
143
|
-
### Step 1 — Gather live state
|
|
144
|
-
|
|
145
|
-
Read the repo to populate accurate values:
|
|
146
|
-
|
|
147
|
-
- `package.json` / `.arcane.json` → Arcane version.
|
|
148
|
-
- `.github/prompts/spell-*.prompt.md` → count of spells.
|
|
149
|
-
- `.github/agents/*.agent.md` → count of agent personas.
|
|
150
|
-
- `.arcane/governance/*.md` → governance/standards docs available.
|
|
151
|
-
- `README.md` / `project.md` → scope and mission.
|
|
152
|
-
|
|
153
|
-
### Step 2 — Tailor to audience
|
|
154
|
-
|
|
155
|
-
If an audience hint followed `summary` (e.g., `exec`, `engineering`, `onboarding`), adjust emphasis:
|
|
156
|
-
|
|
157
|
-
- **exec** — governance, auditability, delivery predictability.
|
|
158
|
-
- **engineering** — the Spell Loop, quality gates, the spell + agent system.
|
|
159
|
-
- **onboarding** — getting started, `spell init`, first session.
|
|
160
|
-
- none — balanced general-stakeholder summary.
|
|
161
|
-
|
|
162
|
-
### Step 3 — Output the document
|
|
163
|
-
|
|
164
|
-
Output a complete Markdown document (no preamble), with current values filled in: what Arcane is, why it exists, what it includes (spell count, agent count, governance), how adopters use it (the Spell Loop), how quality/governance are enforced, and how to adopt it. End with a one-line generation note including the version. The document must be immediately usable as-is.
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## Deck Mode
|
|
169
|
-
|
|
170
|
-
Produce a single copy/paste **prompt** that the user can give to another AI tool to generate a full slide deck about Arcane, sized to the requested length.
|
|
171
|
-
|
|
172
|
-
### Step 1 — Parse size
|
|
173
|
-
|
|
174
|
-
From the words after `deck`:
|
|
175
|
-
|
|
176
|
-
- `N slides` → target exactly N slides.
|
|
177
|
-
- `Nm` (minutes) → ~1 slide/minute (10m → 8–12, 30m → 20–30).
|
|
178
|
-
- `Nh` (hours) → convert to minutes, ~0.8–1.0 slides/minute (1h → 45–60).
|
|
179
|
-
|
|
180
|
-
If no size is given (including when only an audience hint like `deck for investors` follows), stop and ask for one (`N slides`, `Nm`, or `Nh`) before emitting anything. Retain any audience hint already provided so the user need not repeat it.
|
|
181
|
-
|
|
182
|
-
### Step 2 — Gather source material
|
|
183
|
-
|
|
184
|
-
Use repo docs as ground truth (README, project, development-methodology, git-conventions, the spell library, agent roster). Cover: the Spell Loop lifecycle and quality gates; the spell + agent system; session continuity; governance; adoption path; risks and anti-patterns.
|
|
185
|
-
|
|
186
|
-
### Step 3 — Emit the meta-prompt
|
|
187
|
-
|
|
188
|
-
Output one fenced code block containing a prompt that instructs the external AI to produce: the target slide count (or range), a slide-by-slide outline, title + subtitle per slide, 3–5 bullets per slide, a visual suggestion per slide, and speaker notes — plus a final roadmap slide and a risks/limitations slide. Require plain language and claims grounded in the supplied context. After the block, add a one-line tip to paste it into the user's preferred slide generator and request export.
|
|
189
|
-
|
|
9
|
+
This prompt is the Arcane `spell-present-arcane` spell. Read [`.arcane/spells/spell-present-arcane.md`](../../.arcane/spells/spell-present-arcane.md) and follow it as the complete workflow.
|
|
@@ -6,93 +6,4 @@ argument-hint: Feature or product area to review (e.g., "{BUSINESS_NAME} storefr
|
|
|
6
6
|
agent: agent
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- This prompt runs a Build/Measure/Analyze/Decide product review cycle.
|
|
12
|
-
- Used after a feature ships to evaluate its impact and decide what's next.
|
|
13
|
-
- Combines analytics data, user feedback, and business metrics into an actionable recommendation.
|
|
14
|
-
- Feeds back into `spell-plan` for the next iteration of the product.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
Run a product review cycle for the specified feature or product area.
|
|
19
|
-
|
|
20
|
-
**Placeholders** (resolve from `.arcane.json` or the feature/PRD frontmatter; if unset, **ask** rather than assuming a default):
|
|
21
|
-
|
|
22
|
-
- `{BUSINESS_NAME}` — the business/venture under review.
|
|
23
|
-
- `{BUSINESS_ROOT}` — the directory holding that business's product docs (KPIs, metrics, strategy). If no such root is configured or present, ask where these docs live; if there is none, treat the per-business metrics docs as absent and apply the fallback in step 2.
|
|
24
|
-
|
|
25
|
-
Use these files for context:
|
|
26
|
-
|
|
27
|
-
- [project.md](../../project.md) — Business goals and priorities
|
|
28
|
-
- The relevant business docs under `{BUSINESS_ROOT}/` — KPIs, metrics, and product strategy. **If `{BUSINESS_ROOT}` or these docs are missing, proceed with what `project.md` provides and flag the gap; if even `project.md` is absent, report "insufficient context to review" and list what is missing rather than inventing goals.**
|
|
29
|
-
- [governance/development-methodology.md](../../.arcane/governance/development-methodology.md) — Spell Loop context
|
|
30
|
-
|
|
31
|
-
Workflow:
|
|
32
|
-
|
|
33
|
-
1. **Build — What was shipped?**
|
|
34
|
-
- Summarize the feature/change that was deployed.
|
|
35
|
-
- List the acceptance criteria and whether they were met.
|
|
36
|
-
- Note the timeline: when was it planned, built, and shipped?
|
|
37
|
-
|
|
38
|
-
2. **Measure — What data do we have?**
|
|
39
|
-
- Gather available metrics:
|
|
40
|
-
- Usage data (if analytics are configured)
|
|
41
|
-
- Error rates / crash reports
|
|
42
|
-
- User feedback (support tickets, reviews, direct feedback)
|
|
43
|
-
- Business metrics (sales, conversions, engagement)
|
|
44
|
-
- If the KPI/metrics docs under `{BUSINESS_ROOT}` (or any analytics source) are missing or empty, **do not fabricate numbers.** Proceed with "insufficient data to review" and list exactly what is missing (which docs, which metrics, which instrumentation), then recommend adding it before the next review.
|
|
45
|
-
|
|
46
|
-
3. **Analyze — What does the data tell us?**
|
|
47
|
-
- Is the feature achieving its goal?
|
|
48
|
-
- Are there unexpected behaviors or usage patterns?
|
|
49
|
-
- How does it compare to the hypothesis in the PRD?
|
|
50
|
-
- What's working well? What isn't?
|
|
51
|
-
|
|
52
|
-
4. **Decide — What do we do next?**
|
|
53
|
-
- **Iterate:** feature needs improvement — generate follow-up PRD items.
|
|
54
|
-
- **Scale:** feature is working — invest in marketing/growth.
|
|
55
|
-
- **Pivot:** feature isn't solving the problem — reconsider approach.
|
|
56
|
-
- **Kill:** feature is net negative — plan removal.
|
|
57
|
-
|
|
58
|
-
5. **Generate product review report**:
|
|
59
|
-
```markdown
|
|
60
|
-
## Product Review — [Feature/Product]
|
|
61
|
-
|
|
62
|
-
**Date:** [timestamp]
|
|
63
|
-
**Review Period:** [date range]
|
|
64
|
-
**Business:** {BUSINESS_NAME}
|
|
65
|
-
|
|
66
|
-
### Build Summary
|
|
67
|
-
- Feature: [what was built]
|
|
68
|
-
- Shipped: [date]
|
|
69
|
-
- Stories completed: [N]
|
|
70
|
-
|
|
71
|
-
### Metrics
|
|
72
|
-
| Metric | Baseline | Current | Target | Status |
|
|
73
|
-
| -------- | -------- | ------- | ------ | ------------ |
|
|
74
|
-
| [metric] | [before] | [after] | [goal] | ON/OFF TRACK |
|
|
75
|
-
|
|
76
|
-
### Analysis
|
|
77
|
-
- [Key insights from the data]
|
|
78
|
-
- [Unexpected findings]
|
|
79
|
-
|
|
80
|
-
### Decision
|
|
81
|
-
- **Recommendation:** [Iterate / Scale / Pivot / Kill]
|
|
82
|
-
- **Rationale:** [Why]
|
|
83
|
-
- **Next Actions:**
|
|
84
|
-
1. [Action item → owner]
|
|
85
|
-
2. [Action item → owner]
|
|
86
|
-
|
|
87
|
-
### Missing Instrumentation
|
|
88
|
-
- [Metrics we should be tracking but aren't]
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
6. **Present for discussion** — this review drives human decision-making, not autonomous action.
|
|
92
|
-
|
|
93
|
-
Rules:
|
|
94
|
-
- **Data-driven, not opinion-driven.** Base recommendations on evidence, not assumptions.
|
|
95
|
-
- **Acknowledge uncertainty.** If data is thin, say so — don't overfit to limited signals.
|
|
96
|
-
- **Recommendation guardrails:** Flag any recommendation involving purchases or subscriptions for human approval (see your org's decision log / spending policy if one exists).
|
|
97
|
-
- **Connect to business goals.** Every analysis must reference the relevant business's KPIs from `{BUSINESS_ROOT}` or `project.md`; if neither is available, say so explicitly instead of asserting goals.
|
|
98
|
-
- **No vanity metrics.** Focus on metrics that drive decisions, not numbers that look good.
|
|
9
|
+
This prompt is the Arcane `spell-product-review` spell. Read [`.arcane/spells/spell-product-review.md`](../../.arcane/spells/spell-product-review.md) and follow it as the complete workflow.
|
|
@@ -6,108 +6,4 @@ argument-hint: '--prs <n,n,…> | --pr <n> | --file <path> | --query <q> [--rep
|
|
|
6
6
|
agent: agent
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- This spell runs the `spell-review` engine across a batch of pull requests and rolls the results into one report.
|
|
12
|
-
- It produces a per-PR verdict (approve / request-changes) plus an overall **go / no-go** gate for the batch — useful for a release-readiness or UAT gate.
|
|
13
|
-
- It is provider-agnostic: GitHub (`gh`) and Azure DevOps (`az repos`), detected from the git remote.
|
|
14
|
-
- This is the reviewer-side, many-PR counterpart to `spell-review` (single diff). The author-side spell is `spell-address-review`; PRs are typically opened with `spell-create-pull-request`.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
Review a batch of pull requests and produce a consolidated readiness report.
|
|
19
|
-
|
|
20
|
-
Context to consult:
|
|
21
|
-
|
|
22
|
-
- `.arcane/governance/git-conventions.md` — review severity and merge policy.
|
|
23
|
-
- The `spell-review` spell — the single-PR review engine this spell reuses per PR (dimension-coverage lenses, severity, stable finding IDs `R1`, `R2`…).
|
|
24
|
-
|
|
25
|
-
## Arguments
|
|
26
|
-
|
|
27
|
-
- `--pr <n>` — a single PR.
|
|
28
|
-
- `--prs <n,n,…>` — comma-separated PR numbers.
|
|
29
|
-
- `--file <path>` — a file to extract PR numbers from (match `\b\d{2,}\b`).
|
|
30
|
-
- `--query <q>` — a provider query to discover matching PRs.
|
|
31
|
-
- `--repos <r,…>` — optional repo scoping for multi-repo orgs.
|
|
32
|
-
- `--html` — also emit a self-contained HTML version of the consolidated report for easy sharing.
|
|
33
|
-
- `--title <t>` — optional title for the consolidated report (e.g. "Sprint 42 UAT Gate").
|
|
34
|
-
|
|
35
|
-
If no input mode is given, ask the user how they want to specify the PRs.
|
|
36
|
-
|
|
37
|
-
## Step 1 — Resolve inputs
|
|
38
|
-
|
|
39
|
-
1. Detect the provider first from `git remote get-url origin` (GitHub vs Azure DevOps). If the remote is ambiguous or unrecognized, stop and ask. Confirm the CLI is authenticated (`gh auth status` / `az account show`) before proceeding; on an auth failure, report the exact remediation command and stop — do not partially run.
|
|
40
|
-
2. Parse the input mode and collect the PR list. For `--query`, discover PRs via the provider:
|
|
41
|
-
- **GitHub:** `gh pr list --search "<q>" --json number,title,headRefName`
|
|
42
|
-
- **Azure DevOps:** `az repos pr list --status active --query "<filter>"`
|
|
43
|
-
- If `--query` returns zero PRs, report "no PRs matched" and stop — there is nothing to gate.
|
|
44
|
-
3. Deduplicate and validate every PR number (positive integers). Drop and note any malformed token rather than aborting. If the resulting list is empty, stop and ask for valid input.
|
|
45
|
-
4. Resolve scope per PR. `--repos` scopes discovery and disambiguates PR numbers across a multi-repo org; carry the owning repo with each PR number so mixed-repo batches fetch from the right repo (`gh pr view <n> --repo <r>` / `az repos pr show --id <n>`). A bare number with no repo defaults to the origin repo.
|
|
46
|
-
5. **Batch size.** Process PRs sequentially (each review is independent). If the batch exceeds **20 PRs**, warn the user, confirm intent, and proceed in order — do not silently truncate.
|
|
47
|
-
|
|
48
|
-
## Step 2 — Review each PR
|
|
49
|
-
|
|
50
|
-
For each PR in the batch, independently:
|
|
51
|
-
|
|
52
|
-
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.
|
|
53
|
-
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.
|
|
54
|
-
3. Record a per-PR result: verdict (**approve** / **request-changes**), finding counts by severity, and the coverage table.
|
|
55
|
-
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.
|
|
56
|
-
|
|
57
|
-
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.
|
|
58
|
-
|
|
59
|
-
## Step 3 — Consolidate
|
|
60
|
-
|
|
61
|
-
Build one report:
|
|
62
|
-
|
|
63
|
-
```markdown
|
|
64
|
-
# Batch Review — {title or "PR Readiness"} ({date})
|
|
65
|
-
|
|
66
|
-
## Gate: {GO / NO-GO}
|
|
67
|
-
|
|
68
|
-
> GO only if every PR was reviewed and no PR carries an unresolved HIGH finding.
|
|
69
|
-
|
|
70
|
-
| PR | Repo | Title | Verdict | High | Med | Low |
|
|
71
|
-
| -- | ---- | ----- | ------- | ---- | --- | --- |
|
|
72
|
-
| [#n]({url}) | repo | … | approve / request-changes | 0 | 1 | 2 |
|
|
73
|
-
| [#n]({url}) | repo | … | SKIPPED — {reason} | — | — | — |
|
|
74
|
-
|
|
75
|
-
## Per-PR detail
|
|
76
|
-
### [PR #n]({url}) — {title}
|
|
77
|
-
- Verdict: …
|
|
78
|
-
- Coverage: {PASS/WARN/FAIL per lens}
|
|
79
|
-
- Findings: {R1 …}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
The overall gate is **NO-GO** if any reviewed PR has an unresolved HIGH finding, **or** if any requested PR was skipped (an un-reviewed PR can't be cleared) — otherwise **GO**. `HIGH` is the top severity in the `spell-review` ladder; do not invent a "Critical" tier the engine never emits.
|
|
83
|
-
|
|
84
|
-
**Gate flowchart** — per the generated state diagrams convention (rule 8, ARC-036), built only from
|
|
85
|
-
the verdict already computed per PR above; skip entirely (the applicability guard) for a batch of one
|
|
86
|
-
PR — there is nothing to aggregate:
|
|
87
|
-
|
|
88
|
-
```mermaid
|
|
89
|
-
flowchart LR
|
|
90
|
-
PR1["PR #n<br/>approve"] --> Gate{Gate}
|
|
91
|
-
PR2["PR #n<br/>request-changes"] --> Gate
|
|
92
|
-
Gate --> Verdict[GO]
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
One node per PR in the batch, labeled with its number and verdict exactly as computed in the table
|
|
96
|
-
above (including `SKIPPED`); the gate node's outcome is the same GO/NO-GO already derived. Never use
|
|
97
|
-
the bare lowercase word `end` as a node label — Mermaid's flowchart parser reserves it and will fail
|
|
98
|
-
to render (verified against Mermaid's own flowchart syntax docs; none of this batch's real labels
|
|
99
|
-
collide, but a PR title inserted verbatim as a label could).
|
|
100
|
-
|
|
101
|
-
## Step 4 — Output
|
|
102
|
-
|
|
103
|
-
1. Write the consolidated markdown report to a sensible path (e.g. `reviews/batch-review-{date}.md`).
|
|
104
|
-
2. If `--html` was passed, also emit a self-contained HTML file (inline CSS, no external assets) at the same base path so it can be shared by email/chat.
|
|
105
|
-
3. Print a summary to the user: total reviewed / skipped, verdict counts, total findings by severity, the GO/NO-GO gate, and the output path(s).
|
|
106
|
-
|
|
107
|
-
## Rules
|
|
108
|
-
|
|
109
|
-
- Reuse the `spell-review` engine per PR — do not invent a parallel, weaker rubric.
|
|
110
|
-
- Reviews are adversarial but honest — no fabricated findings to inflate counts.
|
|
111
|
-
- The HTML report must be fully self-contained (inline styles) so it works offline.
|
|
112
|
-
- Do not commit or post anything to external systems — the report is a local file the user shares deliberately.
|
|
113
|
-
- Never include secrets or tokens in the report.
|
|
9
|
+
This prompt is the Arcane `spell-review-batch` spell. Read [`.arcane/spells/spell-review-batch.md`](../../.arcane/spells/spell-review-batch.md) and follow it as the complete workflow.
|