arcane-cli 0.22.7 → 0.22.9

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.
@@ -243,4 +243,21 @@ Author: Display Name <email>
243
243
 
244
244
  **Pull Request:** [full PR URL](https://github.com/{org}/{repo}/pull/{id} or https://dev.azure.com/{org}/{project}/_git/{repo}/pullrequest/{id})
245
245
 
246
+ **Branch topology** — per the generated state diagrams convention (rule 8, ARC-036), built only from
247
+ data Step 1/9 already gathered (current branch name, commits ahead of target via
248
+ `git log origin/<target>..HEAD --format="%h %s" --reverse`). Skip entirely — this is the applicability
249
+ guard — when there is no separate topic branch (the local-only-checkpoint path, committing directly on
250
+ trunk) or no usable remote (nothing to compare against):
251
+
252
+ ```mermaid
253
+ gitGraph
254
+ commit id: "<target HEAD short-sha>"
255
+ branch <branch-name>
256
+ commit id: "<short-sha 1>"
257
+ commit id: "<short-sha 2>"
258
+ ```
259
+
260
+ One commit per entry in the gathered commit list, in the same order; omit the diagram (not just the
261
+ commits) if that list is empty. Use `<target>`'s short SHA as the fork-point commit id.
262
+
246
263
  **Next:** Continue work or run `spell-close-session` to finalize journal and session docs.
@@ -168,6 +168,22 @@ Documentation-only PR. No functional code changed.
168
168
  - If no reviewers were resolved (none passed, or names the provider could not match): `⚠ No reviewers assigned — add them in the PR or re-run with --reviewers`.
169
169
  - If `--draft`: note it was created as a draft.
170
170
  - Delete the body temp file (`<git-dir>/arcane-pr-body.md`) once the PR is confirmed created and verified.
171
+ - **Branch topology** — per the generated state diagrams convention (rule 8, ARC-036), built only from
172
+ Step 1's already-gathered branch name and commit list (`git log origin/<target>..HEAD --format="%h %s" --reverse`).
173
+ Skip entirely (the applicability guard) if that commit list is empty — Step 0.4 already stops before
174
+ reaching here in that case, so this only re-states the same guard for anyone reading this step in
175
+ isolation:
176
+
177
+ ```mermaid
178
+ gitGraph
179
+ commit id: "<target HEAD short-sha>"
180
+ branch <branch-name>
181
+ commit id: "<short-sha 1>"
182
+ commit id: "<short-sha 2>"
183
+ ```
184
+
185
+ Same shape `spell-commit-work` uses for the identical concept — reference it rather than re-deriving
186
+ the rule (D8): one commit per gathered log entry, target's short SHA as the fork point.
171
187
 
172
188
  ## Rules
173
189
 
package/dist/index.js CHANGED
@@ -3371,6 +3371,33 @@ async function checkForUpdate(currentVersion, feedUrl, cachePath = DEFAULT_CACHE
3371
3371
  }
3372
3372
  }
3373
3373
 
3374
+ // src/modules/diagram-generator.ts
3375
+ function generateVersionDriftDiagram(repoFilesVersion, installedCliVersion, npmLatestVersion) {
3376
+ if (repoFilesVersion === installedCliVersion && installedCliVersion === npmLatestVersion) {
3377
+ return null;
3378
+ }
3379
+ const lines = ["gitGraph", ` commit id: "${repoFilesVersion}"`];
3380
+ let lastDistinctVersion = repoFilesVersion;
3381
+ if (installedCliVersion !== repoFilesVersion) {
3382
+ lines.push(
3383
+ " branch repo-files",
3384
+ " checkout main",
3385
+ ` commit id: "${installedCliVersion}"`
3386
+ );
3387
+ lastDistinctVersion = installedCliVersion;
3388
+ }
3389
+ if (npmLatestVersion !== lastDistinctVersion) {
3390
+ lines.push(
3391
+ " branch installed-cli",
3392
+ " checkout main",
3393
+ ` commit id: "${npmLatestVersion}" tag: "latest"`
3394
+ );
3395
+ } else {
3396
+ lines[lines.length - 1] += ' tag: "latest"';
3397
+ }
3398
+ return lines.join("\n");
3399
+ }
3400
+
3374
3401
  // src/commands/status.ts
3375
3402
  async function runStatus(targetDir, packageVersion) {
3376
3403
  let manifest;
@@ -3429,6 +3456,26 @@ async function runStatus(targetDir, packageVersion) {
3429
3456
  footer += " (spell update available)";
3430
3457
  }
3431
3458
  console.log(footer);
3459
+ if (versionResult.latest !== null) {
3460
+ const diagram = generateVersionDriftDiagram(
3461
+ manifest.version,
3462
+ packageVersion,
3463
+ versionResult.latest
3464
+ );
3465
+ if (diagram !== null) {
3466
+ console.log("");
3467
+ if (process.stdout.isTTY) {
3468
+ console.log(" Version drift:");
3469
+ console.log(` repo-files: ${manifest.version}`);
3470
+ console.log(` installed-cli: ${packageVersion}`);
3471
+ console.log(` latest (npm): ${versionResult.latest}`);
3472
+ } else {
3473
+ console.log("```mermaid");
3474
+ console.log(diagram);
3475
+ console.log("```");
3476
+ }
3477
+ }
3478
+ }
3432
3479
  }
3433
3480
 
3434
3481
  // src/commands/uninstall.ts