arcane-cli 0.17.1 → 0.19.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.
@@ -312,10 +312,17 @@ When working across machines, topic branches are the coordination mechanism:
312
312
 
313
313
  | Repo Type | Examples | Merge Method | PR Required? |
314
314
  | -------------- | ---------------------------------- | ------------ | ------------ |
315
- | **Docs repos** | docs hub, prototypes | PR | Yes |
315
+ | **Docs repos** | docs hub, prototypes | PR or local ff-only | No — see note |
316
316
  | **Code repos** | application, API, storefront repos | PR | Yes |
317
317
 
318
- - **All repos have main branch protection.** Direct pushes to main are rejected. All changes must go through a PR.
318
+ > **Docs-only repositories.** A PR is *not* required. `cicd-standards.md` records
319
+ > the docs-only exception (ADR-048): branch discipline still applies — branch,
320
+ > work, then fast-forward merge — but a review gate is optional where there is no
321
+ > build to validate. This table previously said "PR required: Yes", contradicting
322
+ > that exception; the exception governs. Repositories that produce artifacts keep
323
+ > the PR requirement in full.
324
+
325
+ - **Code repos have main branch protection.** Direct pushes to main are rejected, and all changes go through a PR. Docs-only repositories keep branch discipline (branch → work → fast-forward merge) but may merge locally without a PR, per the exception above.
319
326
 
320
327
  #### Azure DevOps PR Merge Type
321
328
 
@@ -0,0 +1,118 @@
1
+ ---
2
+ title: Records Conventions
3
+ audience: both
4
+ last_updated: YYYY-MM-DD
5
+ status: active
6
+ tags: [records, documentation, retention, supersession]
7
+ ---
8
+
9
+ # Records Conventions
10
+
11
+ How superseded documents are retained, linked to what replaced them, and when
12
+ they may not be deleted. Applies to documentation and records repositories.
13
+
14
+ ## Executive Summary
15
+
16
+ - A superseded document **stays where it is** and gains a tombstone header. It is
17
+ not moved to an archive directory.
18
+ - Every tombstone names its replacement, so a reader who arrives at the old
19
+ document by an old link is never stranded.
20
+ - Deletion is a separate, explicit decision from supersession — and some records
21
+ may not be deleted at all.
22
+ - These are framework conventions, not legal advice. Where a retention
23
+ obligation applies, that obligation governs.
24
+
25
+ ---
26
+
27
+ ## Why in place, not an archive directory
28
+
29
+ Moving a superseded document breaks every existing link to it — from other
30
+ documents, from commit messages, from external systems, from someone's notes.
31
+ The reader most likely to arrive at an outdated document is exactly the reader
32
+ who needs to be told it is outdated and where to go instead, and a broken link
33
+ cannot tell them anything.
34
+
35
+ Keeping the document at its original path and marking it in place means:
36
+
37
+ - Old links keep resolving, and now resolve to a page that redirects the reader.
38
+ - The document's own history stays continuous in `git log <path>` rather than
39
+ splitting across a rename.
40
+ - No repository-wide layout is imposed on subjects whose organisation is
41
+ determined by something other than Arcane.
42
+
43
+ A universal archive directory is deliberately **not** prescribed. Where an
44
+ external retention system is authoritative, that system's layout wins.
45
+
46
+ ## Tombstone header
47
+
48
+ Prepend to the superseded document, above its existing content:
49
+
50
+ ```markdown
51
+ > **Superseded — 2026-08-23.** Replaced by [Current Title](../path/to/replacement.md).
52
+ > Retained for reference; do not treat as current.
53
+ ```
54
+
55
+ Add the matching frontmatter so the state is machine-readable, not only prose:
56
+
57
+ ```yaml
58
+ ---
59
+ status: superseded
60
+ superseded_on: 2026-08-23
61
+ superseded_by: path/to/replacement.md
62
+ ---
63
+ ```
64
+
65
+ Rules:
66
+
67
+ - `superseded_by` is required. A tombstone that does not say what replaced it is
68
+ worse than no tombstone: it tells the reader to stop without telling them
69
+ where to go.
70
+ - If a document was superseded by *several* documents, list all of them.
71
+ - If a document was retired without replacement, say so explicitly
72
+ (`superseded_by: none — <reason>`), rather than leaving the field off.
73
+ - Do not delete the original content. The tombstone is a header, not a
74
+ replacement for the body.
75
+ - **Add the reverse link on the replacement**, so the relationship is
76
+ discoverable from either end. A reader who finds only the current document
77
+ should still be able to see what it replaced:
78
+
79
+ ```yaml
80
+ ---
81
+ supersedes: path/to/old-document.md
82
+ ---
83
+ ```
84
+
85
+ One-directional linking only helps readers who arrive at the old document.
86
+ The reverse direction is what preserves the record's own history.
87
+
88
+ ## Retention and deletion
89
+
90
+ Supersession and deletion are different decisions and must not be conflated.
91
+ Marking a document superseded is a routine editorial act. Deleting it is not.
92
+
93
+ **Deletion is prohibited without an explicit, recorded decision when any of the
94
+ following is true:**
95
+
96
+ - The document records a decision, agreement, or obligation that other parties
97
+ relied on.
98
+ - The document is referenced by an external system, a contract, or a filing.
99
+ - A retention period applies to it — whether by regulation, contract, or the
100
+ operator's own policy.
101
+ - The repository is marked `content_sensitivity: sensitive` and the document's
102
+ own existence is part of the record.
103
+
104
+ When deletion *is* approved, record it: what was deleted, when, on whose
105
+ authority, and why. A deletion nobody can account for later is indistinguishable
106
+ from data loss.
107
+
108
+ **Arcane does not ship a retention schedule.** Retention periods are
109
+ jurisdiction-, industry-, and contract-specific; a framework default would be
110
+ guesswork wearing the costume of a standard. Record the applicable period per
111
+ subject where one exists, and treat its absence as "unknown, therefore do not
112
+ delete", not as "no obligation".
113
+
114
+ ## Related
115
+
116
+ - [[DECISIONS]]
117
+ - [[governance/decision-documentation-standard|Decision Documentation Standard]]
118
+ - [[governance/git-conventions|Git Conventions]]
@@ -72,6 +72,32 @@ See also: [[README]], [[DECISIONS]], [[governance/git-conventions|Git Convention
72
72
 
73
73
  ---
74
74
 
75
+ ## Sensitive Repositories
76
+
77
+ 21. **Reference, don't transcribe, when the repository is marked sensitive.** If
78
+ `.arcane.json` has `content_sensitivity: "sensitive"`, the repository's own
79
+ documents are the sensitive material — not just credentials inside them. In
80
+ that mode:
81
+ - **Cite paths, never contents.** Write "see `records/2024/lease.md`", not a
82
+ quotation, summary-with-details, or paraphrase of what it says. This
83
+ applies to journal entries, decision records, commit messages, PR
84
+ descriptions, and TODO items alike — every one of those is a durable,
85
+ often-published artifact that outlives the session.
86
+ - **Retain no screenshots of repository contents.** Read them, act on them,
87
+ then do not save them. The screenshot-curation heuristics above are
88
+ superseded here: "when ambiguous, save it" inverts to "when ambiguous,
89
+ don't."
90
+ - **A sanitized summary is still permitted where it carries no recoverable
91
+ detail** — "three lease agreements, one expiring this quarter" is fine;
92
+ naming the parties, addresses, sums, or dates is not.
93
+ - This is a governance default, not an access control. It constrains what
94
+ agents *write down*; it does not restrict what they may read, and it is
95
+ not a substitute for repository permissions or the push-safety controls in
96
+ `git-conventions.md`.
97
+ - Absent or `"standard"` means normal behaviour — this rule adds nothing.
98
+
99
+ ---
100
+
75
101
  ## Naming Conventions
76
102
 
77
103
  16. **Three naming tiers — never mix them:**
@@ -0,0 +1,9 @@
1
+ # Adopt Docs
2
+
3
+ Invoke the Arcane `spell-adopt-docs` spell workflow.
4
+
5
+ See the full prompt at `.github/prompts/spell-adopt-docs.prompt.md` for the complete workflow definition.
6
+
7
+ ---
8
+
9
+ @.github/prompts/spell-adopt-docs.prompt.md
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: Spell — Adopt Docs
3
+ description: Bring an existing document tree under Arcane governance without moving anything first — inventory, propose a mapping, get approval, then apply in reversible steps. Dry-run by default.
4
+ argument-hint: Optional path to the tree to adopt (defaults to the repository root). Add `--apply` only after reviewing a dry run.
5
+ agent: agent
6
+ ---
7
+
8
+ ## Executive Summary
9
+
10
+ - This spell adopts a folder of documents that already exists, rather than
11
+ scaffolding a new one.
12
+ - It **never moves, renames, or deletes anything until you approve a specific
13
+ written mapping** — the default run is read-only.
14
+ - It works with `subject_root: "."`, so a tree that already lives at the
15
+ repository root is adopted where it is. Restructuring is offered, never
16
+ required.
17
+ - Every mutating phase states its rollback before it runs.
18
+ - In a repository marked `content_sensitivity: sensitive`, the inventory records
19
+ paths and shapes, never document contents.
20
+
21
+ ---
22
+
23
+ ## Preconditions
24
+
25
+ Stop and report, without changing anything, if any of these fail:
26
+
27
+ 1. **`.arcane.json` exists.** If not: "Run `spell init` first — adoption needs a
28
+ profile and a subject root to map into."
29
+ 2. **The working tree is clean** (`git status --porcelain` is empty). Adoption's
30
+ rollback story is "revert the commit"; that only works from a clean baseline.
31
+ Report the dirty paths and stop.
32
+ 3. **The target path exists and is inside the repository.** Reject absolute
33
+ paths and anything resolving outside the repo root.
34
+
35
+ Read, in order: `.arcane.json` (for `subject_root`, `content_sensitivity`,
36
+ `profile`), then `.arcane/governance/records-conventions.md`, then
37
+ `.arcane/governance/naming-conventions.md` if installed.
38
+
39
+ ## Phase 1 — Inventory (always read-only)
40
+
41
+ Walk the target tree and build a picture of what is actually there. Do not open
42
+ a document to summarize its subject matter; classify from path, name, extension,
43
+ and size.
44
+
45
+ Report:
46
+
47
+ - **Total counts** by extension, and total size.
48
+ - **Depth and shape** — how deep the tree goes, which directories hold the bulk.
49
+ - **Naming patterns observed** — dated (`2024-03-01-...`), numbered, free-form,
50
+ or mixed. Report what you see; do not judge it yet.
51
+ - **Collisions with Arcane's own layout** — anything already at `TODO.md`,
52
+ `DECISIONS.md`, `IDEAS.md`, `README.md`, `journal/`, `.arcane/`, `.github/`,
53
+ `.claude/`. These are the only paths where adoption could overwrite something.
54
+ - **Files Git will treat as binary** under the installed `.gitattributes`, and
55
+ any that are large enough to be worth an explicit LFS decision later.
56
+ - **Anything unreadable** — permission errors, broken symlinks, zero-byte files.
57
+ Report them; never silently skip.
58
+
59
+ **If `content_sensitivity` is `"sensitive"`:** the inventory is paths, counts,
60
+ extensions and sizes only. Do not quote filenames that are themselves revealing
61
+ in the session summary — say "12 files under `clients/`", not the list — and do
62
+ not open documents to characterize their contents.
63
+
64
+ ## Phase 2 — Propose a mapping
65
+
66
+ Produce a written proposal. This is the artifact the operator approves, and it
67
+ must be specific enough that they can predict every effect.
68
+
69
+ For each group of files, state one of:
70
+
71
+ | Disposition | Meaning |
72
+ |---|---|
73
+ | **Leave in place** | No move. The default, and the right answer for most trees. |
74
+ | **Move** | Old path → new path, explicitly, per file or per directory. |
75
+ | **Rename** | Old name → new name, with the rule that produced it. |
76
+ | **Ignore** | Added to `.gitignore` rather than governed. |
77
+ | **Flag** | Needs an operator decision this spell will not make (see below). |
78
+
79
+ Always also state:
80
+
81
+ - **What `subject_root` will be** afterwards, and whether adoption changes it.
82
+ If the tree is already at the repository root, propose `"."` and say plainly
83
+ that this means no restructuring.
84
+ - **Which collisions from Phase 1 you propose to resolve, and how.** Never
85
+ propose overwriting an existing `TODO.md`/`DECISIONS.md`/`README.md`; propose
86
+ merging or leaving the operator's file untouched.
87
+ - **What will NOT be touched** — an explicit list is part of the proposal, not
88
+ an omission from it.
89
+
90
+ Flag rather than decide:
91
+
92
+ - Anything that looks like credentials, keys, or personal data.
93
+ - Anything suggesting a retention obligation (contracts, filings, tax records)
94
+ — see `records-conventions.md`; deletion and relocation of those is an
95
+ operator decision.
96
+ - Superseded-looking duplicates (`final-v2-FINAL.docx`). Propose the tombstone
97
+ convention from `records-conventions.md`; do not pick a winner.
98
+
99
+ End with: **"Approve this mapping? (yes / edit / cancel)"** and stop. A dry run
100
+ ends here, always.
101
+
102
+ ## Phase 3 — Apply (only after explicit approval, and only with `--apply`)
103
+
104
+ Apply in the order below. Each step states its rollback *before* it runs, and
105
+ each step is a separate commit. Revert them in reverse order — reverting an
106
+ earlier phase while a later one still stands will conflict, because the later
107
+ phase built on the paths the earlier one created.
108
+
109
+ 1. **Write `subject_root` to `.arcane.json`** (if it changes).
110
+ *Rollback: revert the commit; no files moved yet.*
111
+ 2. **Add ignore entries** for anything dispositioned "Ignore".
112
+ *Rollback: revert the commit; files are untouched on disk either way.*
113
+ 3. **Renames**, using `git mv` so history follows the file.
114
+ *Rollback: revert the commit. If a rename collides with an existing path,
115
+ stop the whole phase — do not overwrite, do not continue to step 4.*
116
+ 4. **Moves**, using `git mv`, deepest paths first so parent directories are
117
+ never removed out from under a pending move.
118
+ *Rollback: revert the commit.*
119
+ 5. **Tombstones** for anything the operator confirmed as superseded, per
120
+ `records-conventions.md`.
121
+ *Rollback: revert the commit; original content was never deleted.*
122
+
123
+ Hard rules for this phase:
124
+
125
+ - **Never delete a document.** Adoption moves, renames, and marks. Deletion is a
126
+ separate, explicit operator decision (`records-conventions.md`).
127
+ - **Never overwrite an existing file.** On any collision, stop and report.
128
+ - **Stop at the first failure.** Do not attempt partial recovery mid-phase —
129
+ report what completed, what did not, and the exact `git revert` command for
130
+ each commit already made.
131
+ - If the repository is `content_sensitivity: sensitive`, commit messages name
132
+ paths and counts only, never contents.
133
+
134
+ ## Phase 4 — Report
135
+
136
+ Output:
137
+
138
+ ```
139
+ Adopted <N> files under {SUBJECT_ROOT}
140
+
141
+ Moved <n> (commit <sha>)
142
+ Renamed <n> (commit <sha>)
143
+ Tombstoned <n> (commit <sha>)
144
+ Left as-is <n>
145
+ Ignored <n>
146
+ Flagged <n> — needs your decision, listed below
147
+ ```
148
+
149
+ Then list every flagged item with the decision it needs. Finish with the
150
+ suggested next step: `spell-todo` to capture the flagged decisions, or
151
+ `spell-commit-work` if anything remains uncommitted.
152
+
153
+ ## Related
154
+
155
+ - [[.arcane/governance/records-conventions|Records Conventions]] — supersession and retention
156
+ - [[.arcane/governance/git-conventions|Git Conventions]] — branch and merge discipline
157
+ - [[.arcane/governance/universal-agent-rules|Universal Agent Rules]] — sensitive-repository behaviour
@@ -102,6 +102,10 @@ Rules:
102
102
  - If screenshots were provided during the session, reference them in troubleshooting or journal entries.
103
103
 
104
104
  7. **Process screenshots** (if provided during the session).
105
+ - **First check `content_sensitivity` in `.arcane.json`.** If it is
106
+ `"sensitive"`, retain no screenshots of repository contents and transcribe
107
+ nothing from them into the journal — record the document path instead. See
108
+ universal-agent-rules.md, "Sensitive Repositories".
105
109
  - Screenshots should already be saved to `assets/screenshots/YYYY-MM-DD/` — agents must save them immediately when the user pastes them (see global screenshot rule in `copilot-instructions.md`).
106
110
  - At close-session time, review all screenshots saved during the session.
107
111
  - Keep only screenshots that provide durable evidence for journal/runbook documentation.
@@ -0,0 +1,53 @@
1
+ # Line-ending baseline (EF-17). Text normalizes to LF in the repository and
2
+ # checks out per-platform; binary formats are marked so Git never rewrites or
3
+ # diffs them as text.
4
+ * text=auto eol=lf
5
+
6
+ # Documents — binary. Office formats are ZIP containers: a line-ending rewrite
7
+ # corrupts them, and a textual diff is noise either way.
8
+ *.pdf binary
9
+ *.docx binary
10
+ *.doc binary
11
+ *.xlsx binary
12
+ *.xls binary
13
+ *.pptx binary
14
+ *.ppt binary
15
+ *.odt binary
16
+ *.ods binary
17
+ *.odp binary
18
+ *.rtf binary
19
+
20
+ # Images
21
+ *.png binary
22
+ *.jpg binary
23
+ *.jpeg binary
24
+ *.gif binary
25
+ *.bmp binary
26
+ *.tif binary
27
+ *.tiff binary
28
+ *.webp binary
29
+ *.ico binary
30
+ *.heic binary
31
+
32
+ # Scans and audio/video attachments commonly filed with records
33
+ *.mp3 binary
34
+ *.mp4 binary
35
+ *.mov binary
36
+ *.wav binary
37
+
38
+ # Archives
39
+ *.zip binary
40
+ *.7z binary
41
+ *.gz binary
42
+ *.tar binary
43
+
44
+ # Fonts
45
+ *.woff binary
46
+ *.woff2 binary
47
+ *.ttf binary
48
+ *.otf binary
49
+
50
+ # Git LFS is deliberately NOT configured here. It requires server-side support
51
+ # and changes clone behaviour for everyone, so it is an opt-in decision rather
52
+ # than a default. Consider it when a binary is large or changes often -- once
53
+ # a large file is committed without LFS, removing it needs a history rewrite.
@@ -0,0 +1,15 @@
1
+ # Editor and OS noise
2
+ .DS_Store
3
+ Thumbs.db
4
+ Desktop.ini
5
+ *~
6
+ .*.swp
7
+
8
+ # Office lock/temp files — these appear whenever a document is open and must
9
+ # never be committed.
10
+ ~$*
11
+ *.tmp
12
+
13
+ # Local-only working area. Anything here is yours and is never installed,
14
+ # updated, or read by Arcane.
15
+ .local/