arcane-cli 0.15.2 → 0.15.3
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.
|
@@ -25,7 +25,12 @@ Use these files first:
|
|
|
25
25
|
Workflow:
|
|
26
26
|
|
|
27
27
|
1. **Check git status and guard the branch** — run `git status` to see what changed, and confirm the current branch.
|
|
28
|
-
-
|
|
28
|
+
- Classify the Git/remote state before enforcing the protected-branch guard. A usable merge path requires a configured remote on a supported provider (`github.com`, `dev.azure.com`, or `visualstudio.com`) and authenticated provider tooling. A remote URL alone is insufficient.
|
|
29
|
+
- Apply exactly one path:
|
|
30
|
+
- **Supported, authenticated GitHub/ADO remote + `main` or `master` checked out:** **STOP — do not stage or commit directly.** Create and switch the current worktree to a compliant topic branch (for example, `sessions/YYYY-MM-DD-<slug>`), then continue.
|
|
31
|
+
- **Supported, authenticated GitHub/ADO remote + valid topic/PR branch checked out:** stay on that branch and continue.
|
|
32
|
+
- **No remote, unsupported remote, or provider authentication unavailable:** remain on the current trunk. Print `Local-only checkpoint: no usable remote merge path; commit remains on <trunk> and no remote push/PR will run.` Continue through the local commit gate, then skip Steps 9 and 10 entirely.
|
|
33
|
+
- If the current worktree, branch, provider, or authentication state cannot be determined, fail closed before staging and ask the operator. Never strand a local-only commit on a topic branch with no usable merge path.
|
|
29
34
|
|
|
30
35
|
2. **Run tests and verify coverage** _(skip only if zero source files changed — e.g., pure docs/config commit)_:
|
|
31
36
|
- Detect the project stack from the root of the changed repo:
|
|
@@ -45,19 +50,21 @@ Workflow:
|
|
|
45
50
|
- Run the detected formatter, then `git add` the resulting changes so they are part of this commit.
|
|
46
51
|
- **If no formatter is configured, skip this step gracefully** — do not install one and do not block the commit.
|
|
47
52
|
|
|
48
|
-
3. **
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
- Is this part of a larger initiative or a standalone change?
|
|
52
|
-
- **Commit-splitting heuristic:** if the staged changes span clearly unrelated concerns (e.g., a feature change + an unrelated refactor + a dependency bump), recommend splitting them into multiple focused commits, each with its own message, rather than a single mixed commit. A single commit is fine when the changes serve one purpose. When splitting, stage and commit each concern separately.
|
|
53
|
-
- **Wiki-link check:** For any new `.md` files being committed, verify each has at least one outbound `[[...]]` wiki-link connecting it to the knowledge graph. Orphaned docs (no outbound links) break Obsidian's graph view. If missing, add a `Related:` or `See also:` line before committing. See the CLAUDE.md wiki-link conventions for the correct format.
|
|
54
|
-
|
|
55
|
-
4. **Determine authorship** — who produced this content? See [governance/git-conventions.md](../../governance/git-conventions.md) Agent Attribution Model section and ADR-028.
|
|
53
|
+
3. **Determine authorship and partition the batch** — who produced each changed file or inseparable change set? See [governance/git-conventions.md](../../governance/git-conventions.md) Agent Attribution Model section and ADR-028.
|
|
54
|
+
- **Invariant: one commit has exactly one author.** Changes spanning authors must be split into separate commits.
|
|
55
|
+
- Partition changed files by author first. Step 4 then groups by concern within each author partition; concern grouping must never recombine authors.
|
|
56
56
|
- **Human wrote it:** no `--author` override needed (uses global Git config)
|
|
57
57
|
- **AI agent/tool produced it:** use `--author` with the agent's registered identity:
|
|
58
58
|
- Roster agent: `--author="{AGENT_NAME} <{AGENT_EMAIL}>"` — resolve `{AGENT_NAME}` / `{AGENT_EMAIL}` from the active agent config (see [[agent-policies]] / [[naming-conventions]]); ask if unset.
|
|
59
59
|
- Generic CLI/IDE tool: `--author="{TOOL_NAME} <{TOOL_NAME_LOWER}@{OPERATOR_DOMAIN}>"` — resolve `{TOOL_NAME}` from the channel in use and `{OPERATOR_DOMAIN}` from `.arcane.json`; ask if unset.
|
|
60
|
-
- When
|
|
60
|
+
- When authorship is unknown or disputed, stop and ask. Never select one identity for a mixed-author batch.
|
|
61
|
+
|
|
62
|
+
4. **Analyze and group changes within each author partition** — categorize the work:
|
|
63
|
+
- What was the intent? (new feature, bug fix, docs, refactor, etc.)
|
|
64
|
+
- What scope/area was affected? (prompts, agents, security, infrastructure, journal, etc.)
|
|
65
|
+
- Is this part of a larger initiative or a standalone change?
|
|
66
|
+
- **Commit-splitting heuristic:** within one author partition, if the changes span clearly unrelated concerns (e.g., a feature change + an unrelated refactor + a dependency bump), recommend splitting them into multiple focused commits, each with its own message, rather than a single mixed commit. A single commit is fine when one author's changes serve one purpose. When splitting, stage and commit each concern separately.
|
|
67
|
+
- **Wiki-link check:** For any new `.md` files being committed, verify each has at least one outbound `[[...]]` wiki-link connecting it to the knowledge graph. Orphaned docs (no outbound links) break Obsidian's graph view. If missing, add a `Related:` or `See also:` line before committing. See the CLAUDE.md wiki-link conventions for the correct format.
|
|
61
68
|
|
|
62
69
|
4.5. **Resolve execution authority before any commit or merge command:**
|
|
63
70
|
- Declare `interaction_context: interactive | autonomous`. VS Code chat, editor chat, Claude Code, and any live operator session are `interactive`; never infer `autonomous` from tool access.
|
|
@@ -131,6 +138,8 @@ Workflow:
|
|
|
131
138
|
|
|
132
139
|
9. **Push branch and run platform-specific PR flow:**
|
|
133
140
|
|
|
141
|
+
**Local-only exit:** if Step 1 classified the repository as having no usable remote merge path, skip this entire step and Step 10. Print `Local-only checkpoint: committed on <trunk>; no remote push/PR performed.` The local commit is the completed checkpoint.
|
|
142
|
+
|
|
134
143
|
**Separate merge authorization gate:** commit approval never authorizes merge. Bind any interactive merge approval to the exact PR ID and current head SHA, and re-check both immediately before completion. Missing/changed approval invalidates the gate. Never invoke merge, auto-merge, auto-complete, or `--status completed` below loader-validated Magus authority; create/update the PR, print the visible downgrade, and leave completion to a human.
|
|
135
144
|
|
|
136
145
|
a. Run `git push origin <branch>`.
|