arcane-cli 1.2.0 → 1.3.1
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 +12 -1
- package/dist/assets/.arcane/governance/portable-bootstrap.md +1 -1
- package/dist/assets/.arcane/governance/spell-authoring-standards.md +6 -1
- package/dist/assets/.arcane/governance/universal-agent-rules.md +5 -1
- package/dist/index.js +236 -99
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -233,16 +233,27 @@ spell uninstall --user # removes only what it wrote; an edited client file is k
|
|
|
233
233
|
|
|
234
234
|
Codex, VS Code Copilot and Claude Code each discover the user tier from their own home-directory locations (`~/.agents/skills` and `~/.claude/commands`), so no VS Code setting is needed. Governance stays per repository — only spell delivery moves up a level.
|
|
235
235
|
|
|
236
|
+
**Agents move the same way.** Your agent roster can live once per machine too:
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
spell agents init --user # ~/.arcane/agents.yaml plus one definition file per role
|
|
240
|
+
spell agents sync --user # renders ~/.copilot/agents/<name>.agent.md — VS Code agent modes
|
|
241
|
+
spell agents list --user # the roster the tier holds
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Unlike spells, agent files are never delivered by `spell init` or `spell update`: they are rendered from your roster, whose naming strategy decides each file's name and contents, so an upgrade leaves them alone by design (ARC-047). And unlike skills, VS Code does **not** collapse two agents that share a name — a repository carrying its own `.github/agents` files adds a second entry beside the tier's rather than replacing it, so opting the repository out is what produces one set.
|
|
245
|
+
|
|
236
246
|
**Then let a repository stop carrying its own copies.** `spell init` offers this when the machine already has a tier, and an existing repository opts in by setting one field:
|
|
237
247
|
|
|
238
248
|
```jsonc
|
|
239
249
|
// .arcane.json
|
|
240
|
-
{ "spell_scope": "user" } // absent, or "repo", means this repository carries its own spells
|
|
250
|
+
{ "spell_scope": "user" } // absent, or "repo", means this repository carries its own spells and agents
|
|
241
251
|
```
|
|
242
252
|
|
|
243
253
|
```bash
|
|
244
254
|
spell update # lists the spell files this repository no longer manages — deletes nothing
|
|
245
255
|
spell update --prune # removes the untouched ones; anything you edited is kept and named
|
|
256
|
+
spell agents sync # stops writing .github/agents here; names the leftovers and the git rm line
|
|
246
257
|
spell doctor # fails loudly if the user tier it now depends on is missing
|
|
247
258
|
```
|
|
248
259
|
|
|
@@ -52,7 +52,7 @@ Paste this entire file into any AI client (Claude web, ChatGPT, etc.) to give it
|
|
|
52
52
|
## Where Documents Live
|
|
53
53
|
|
|
54
54
|
- **Framework-managed standards:** `.arcane/governance/`. Spells reference this single installed layer; **do not create a duplicate root `governance/` tree. Enforcement: explicitly advisory prose (ARC-023) — no check scans a repo for a duplicate root-level `governance/` directory.**
|
|
55
|
-
- **Framework-managed spells:** `.arcane/spells/<id>.md` is each spell's one authored source (ARC-045). The files each AI client discovers — `.github/prompts/<id>.prompt.md` for Copilot, `.claude/commands/<id>.md` for Claude Code, `.agents/skills/<id>/SKILL.md` for Codex — are thin generated shims that point back at it; edit the canonical file, never a shim. **Enforcement: executable check (ARC-023) — `npm run check:self-host-parity` re-renders every shim from its canonical file and fails on any difference; `spell update` keeps a hand-edited shim untouched and names it rather than merging into it.** The same canonical spells can also be installed once per machine — `spell init --user` puts them at `~/.arcane/spells/<id>.md` with one Codex/Copilot skill under `~/.agents/skills/` and one Claude Code command under `~/.claude/commands/` per spell (ARC-045 decision 3); governance never moves up a tier. A repository may then opt out of carrying its own copies entirely with `spell_scope: "user"` in `.arcane.json` (ARC-045 decision 4) — `spell update --prune` removes what it no longer manages, keeping anything you edited, and `spell doctor` fails loudly if the tier it now depends on is missing.
|
|
55
|
+
- **Framework-managed spells:** `.arcane/spells/<id>.md` is each spell's one authored source (ARC-045). The files each AI client discovers — `.github/prompts/<id>.prompt.md` for Copilot, `.claude/commands/<id>.md` for Claude Code, `.agents/skills/<id>/SKILL.md` for Codex — are thin generated shims that point back at it; edit the canonical file, never a shim. **Enforcement: executable check (ARC-023) — `npm run check:self-host-parity` re-renders every shim from its canonical file and fails on any difference; `spell update` keeps a hand-edited shim untouched and names it rather than merging into it.** The same canonical spells can also be installed once per machine — `spell init --user` puts them at `~/.arcane/spells/<id>.md` with one Codex/Copilot skill under `~/.agents/skills/` and one Claude Code command under `~/.claude/commands/` per spell (ARC-045 decision 3); governance never moves up a tier. The agent roster follows the same shape (ARC-047): `spell agents init|sync --user` keeps `agents.yaml` and the role definitions at `~/.arcane` and renders one `~/.copilot/agents/<name>.agent.md` per agent, which is where VS Code looks for machine-wide agent modes. Agent files are never installed by `spell init`/`spell update` at either tier -- they are rendered from the roster, whose naming strategy picks each file's name, which is why an upgrade never touches them. A repository may then opt out of carrying its own copies entirely with `spell_scope: "user"` in `.arcane.json` (ARC-045 decision 4) — `spell update --prune` removes what it no longer manages, keeping anything you edited, and `spell doctor` fails loudly if the tier it now depends on is missing.
|
|
56
56
|
- **Project-owned orientation and continuity:** `README.md`, `project.md`, `TODO.md`, `DECISIONS.md`, `ai-context/`, and `journal/`. Arcane creates missing files once and preserves existing content.
|
|
57
57
|
- **Project/domain documents:** use explicit descriptive paths such as `docs/`, `security/`, `infrastructure/`, or a configured business root. These add project context alongside framework standards.
|
|
58
58
|
- **Overrides survive `arcane update`:** editing a managed `.arcane/governance/` standard no longer risks silent loss. Additive project documents were always safe; a hand-edit to a shipped standard now is too. **Enforcement: executable check (ARC-038, shipped BC-31)** — `spell update` compares each file's on-disk content against its recorded hash at install time: unchanged, it refreshes normally; edited, it fetches the exact previously-installed published version as a three-way merge base against your edit and the new vendor content, auto-merging non-overlapping changes and leaving standard conflict markers only on genuine collisions. If the prior published version can't be fetched, your edit is left untouched with a warning rather than replaced.
|
|
@@ -125,7 +125,12 @@ Arcane spells ship to other repositories and, eventually, open source. Keep them
|
|
|
125
125
|
hand. Relative links inside a spell resolve from `.arcane/spells/`, two levels below the repo
|
|
126
126
|
root (`../../.arcane/governance/…`, `../../README.md`); refer to a sibling spell as
|
|
127
127
|
`spell-x.md`. Enforcement: executable check (ARC-023) — `npm run check:self-host-parity`
|
|
128
|
-
re-renders every shim from its canonical file and fails CI on any byte of difference.
|
|
128
|
+
re-renders every shim from its canonical file and fails CI on any byte of difference. **A spell
|
|
129
|
+
may also be installed once per machine** at `~/.arcane/spells/<id>.md` (ARC-045 decision 3), where
|
|
130
|
+
a `../../` link has no repository to resolve against: write a spell so that a broken context link
|
|
131
|
+
degrades to a named, skippable step rather than a dead end, which D2 Gold already asks for in its
|
|
132
|
+
"works in a vanilla consuming repo with no Arcane context files present" bar. Enforcement:
|
|
133
|
+
explicitly advisory prose (ARC-023) — nothing resolves a spell's links from the user tier.
|
|
129
134
|
- **Never hard-code** an org name, person, venture, product, or machine name. Use a documented
|
|
130
135
|
`{UPPER_SNAKE}` placeholder: `{ADO_ORG}`, `{ADO_PROJECT}`, `{BUSINESS_NAME}`, `{OPERATOR_NAME}`.
|
|
131
136
|
Enforcement: executable check (ARC-023) — same mechanism as D2 Bronze above: the `org-token-lint`
|
|
@@ -160,4 +160,8 @@ client through a separate mechanism: one canonical source per spell at `.arcane/
|
|
|
160
160
|
(ARC-045), from which three thin shims are generated — `.github/prompts/*.prompt.md` for Copilot,
|
|
161
161
|
`.claude/commands/*.md` for Claude Code, and `.agents/skills/*/SKILL.md` for Codex (CS-01) — never
|
|
162
162
|
hand-authored per client. A shim carries no workflow of its own: when a spell must be read in full,
|
|
163
|
-
read the canonical file.
|
|
163
|
+
read the canonical file. Both spells and the agent roster can instead be installed once per machine,
|
|
164
|
+
at `~/.arcane` (ARC-045 decision 3, ARC-047); a repository with `spell_scope: "user"` in `.arcane.json`
|
|
165
|
+
carries neither its own spell files nor its own `.github/agents/*.agent.md`, and every client reads
|
|
166
|
+
the machine-wide copies instead. This table is unaffected either way — standing instructions never
|
|
167
|
+
move tier.
|