@alecsibilia/luca 13.0.0-alpha.6 → 13.0.0-alpha.8

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.
Files changed (49) hide show
  1. package/dist/chunks/branch.mjs +6 -6
  2. package/dist/chunks/checks.mjs +6 -6
  3. package/dist/chunks/claim-verify.mjs +1 -1
  4. package/dist/chunks/classify.mjs +1 -1
  5. package/dist/chunks/confidence.mjs +6 -6
  6. package/dist/chunks/doctor.mjs +3 -1
  7. package/dist/chunks/hook.mjs +4 -4
  8. package/dist/chunks/init.mjs +7 -3
  9. package/dist/chunks/phase.mjs +8 -8
  10. package/dist/chunks/pr-review.mjs +6 -6
  11. package/dist/chunks/preferences.mjs +6 -6
  12. package/dist/chunks/repair.mjs +1 -1
  13. package/dist/chunks/repo.mjs +6 -6
  14. package/dist/chunks/retro.mjs +5 -5
  15. package/dist/chunks/roadmap.mjs +6 -6
  16. package/dist/chunks/rules.mjs +5 -5
  17. package/dist/chunks/state.mjs +6 -6
  18. package/dist/chunks/stray-local-install.mjs +1 -1
  19. package/dist/chunks/telemetry.mjs +1 -1
  20. package/dist/chunks/todo.mjs +6 -6
  21. package/dist/chunks/vault-config-location.mjs +96 -0
  22. package/dist/chunks/vault-init.mjs +1 -1
  23. package/dist/chunks/verification.mjs +4 -4
  24. package/dist/chunks/workflow.mjs +6 -6
  25. package/dist/claude/.claude/agents/architect.md +1 -1
  26. package/dist/claude/.claude/agents/finalize.md +30 -31
  27. package/dist/claude/.claude/agents/research.md +2 -2
  28. package/dist/claude/.claude/agents/review.md +26 -16
  29. package/dist/claude/.claude/agents/triage.md +3 -4
  30. package/dist/claude/.claude/commands/lu.md +4 -4
  31. package/dist/claude/.claude/commands/milestone-new.md +1 -1
  32. package/dist/claude/.claude/hooks/context-refresher.ts +13 -18
  33. package/dist/claude/.claude/hooks/continuation-messages.ts +13 -18
  34. package/dist/claude/.claude/hooks/pipeline-guard.ts +13 -18
  35. package/dist/claude/skills/autopilot/SKILL.md +3 -2
  36. package/dist/claude/skills/gh-prepare/SKILL.md +1 -1
  37. package/dist/claude/skills/lu/SKILL.md +4 -4
  38. package/dist/claude/skills/phase-execute/SKILL.md +3 -2
  39. package/dist/claude/skills/quick/SKILL.md +4 -3
  40. package/dist/index.mjs +1 -1
  41. package/dist/shared/{luca.DZxAJmyM.mjs → luca.B8ydzQ8S.mjs} +17 -21
  42. package/dist/shared/{luca.0ssL9rcP.mjs → luca.BV4noBW7.mjs} +2 -2
  43. package/dist/shared/{luca.BiHycbFi.mjs → luca.BeGsLJkq.mjs} +3 -3
  44. package/dist/shared/{luca.Cf93m-DM.mjs → luca.CWsqOppt.mjs} +1 -1
  45. package/dist/shared/{luca.BTcIy-Mh.mjs → luca.CyQeErH2.mjs} +6 -5
  46. package/dist/shared/{luca.B-w_fieK.mjs → luca.Da5I_JVg.mjs} +1 -1
  47. package/dist/shared/{luca.D7w2gjQ5.mjs → luca.Dn7Gbruu.mjs} +2 -2
  48. package/dist/shared/{luca.lLQ2ZIAB.mjs → luca.ELUgu8AW.mjs} +8 -8
  49. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DZxAJmyM.mjs';
3
+ import '../shared/luca.B8ydzQ8S.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,12 +8,12 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { r as runWriteHandler, u as lucaBranchGuardTool } from '../shared/luca.lLQ2ZIAB.mjs';
12
- import '../shared/luca.BTcIy-Mh.mjs';
11
+ import { r as runWriteHandler, u as lucaBranchGuardTool } from '../shared/luca.ELUgu8AW.mjs';
12
+ import '../shared/luca.CyQeErH2.mjs';
13
13
  import 'node:os';
14
- import '../shared/luca.Cf93m-DM.mjs';
15
- import '../shared/luca.D7w2gjQ5.mjs';
16
- import '../shared/luca.B-w_fieK.mjs';
14
+ import '../shared/luca.CWsqOppt.mjs';
15
+ import '../shared/luca.Dn7Gbruu.mjs';
16
+ import '../shared/luca.Da5I_JVg.mjs';
17
17
  import '../shared/luca.CQ3g1xrD.mjs';
18
18
 
19
19
  const guardCommand = defineCommand({
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DZxAJmyM.mjs';
3
+ import '../shared/luca.B8ydzQ8S.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,12 +8,12 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { f as readJsonPayload, r as runWriteHandler, t as lucaChecksRunTool } from '../shared/luca.lLQ2ZIAB.mjs';
12
- import '../shared/luca.BTcIy-Mh.mjs';
11
+ import { f as readJsonPayload, r as runWriteHandler, t as lucaChecksRunTool } from '../shared/luca.ELUgu8AW.mjs';
12
+ import '../shared/luca.CyQeErH2.mjs';
13
13
  import 'node:os';
14
- import '../shared/luca.Cf93m-DM.mjs';
15
- import '../shared/luca.D7w2gjQ5.mjs';
16
- import '../shared/luca.B-w_fieK.mjs';
14
+ import '../shared/luca.CWsqOppt.mjs';
15
+ import '../shared/luca.Dn7Gbruu.mjs';
16
+ import '../shared/luca.Da5I_JVg.mjs';
17
17
  import '../shared/luca.CQ3g1xrD.mjs';
18
18
 
19
19
  const runCommand = defineCommand({
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import { resolve } from 'pathe';
3
- import '../shared/luca.DZxAJmyM.mjs';
3
+ import '../shared/luca.B8ydzQ8S.mjs';
4
4
  import { readFileSync, existsSync, readdirSync, statSync } from 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import { join } from 'node:path';
@@ -1,5 +1,5 @@
1
1
  import { defineCommand } from 'citty';
2
- import { C as ClassifyComplexityInputSchema } from '../shared/luca.DZxAJmyM.mjs';
2
+ import { C as ClassifyComplexityInputSchema } from '../shared/luca.B8ydzQ8S.mjs';
3
3
  import 'node:fs';
4
4
  import 'node:fs/promises';
5
5
  import 'node:path';
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
- import '../shared/luca.DZxAJmyM.mjs';
3
- import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.Cf93m-DM.mjs';
2
+ import '../shared/luca.B8ydzQ8S.mjs';
3
+ import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.CWsqOppt.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,13 +8,13 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { b as renderConfidenceJournalMarkdown, r as readConfidenceJournal, g as getConfidenceSummary } from '../shared/luca.D7w2gjQ5.mjs';
11
+ import { b as renderConfidenceJournalMarkdown, r as readConfidenceJournal, g as getConfidenceSummary } from '../shared/luca.Dn7Gbruu.mjs';
12
12
  import { l as logger } from '../shared/luca.dM-MKlNE.mjs';
13
13
  import 'zod';
14
- import { f as readJsonPayload, r as runWriteHandler, w as lucaConfidenceLogTool } from '../shared/luca.lLQ2ZIAB.mjs';
15
- import '../shared/luca.BTcIy-Mh.mjs';
14
+ import { f as readJsonPayload, r as runWriteHandler, w as lucaConfidenceLogTool } from '../shared/luca.ELUgu8AW.mjs';
15
+ import '../shared/luca.CyQeErH2.mjs';
16
16
  import 'node:os';
17
- import '../shared/luca.B-w_fieK.mjs';
17
+ import '../shared/luca.Da5I_JVg.mjs';
18
18
  import 'consola';
19
19
  import '../shared/luca.CQ3g1xrD.mjs';
20
20
 
@@ -13,6 +13,7 @@ async function executeDoctor(options = {}) {
13
13
  const { legacyPackageCheck } = await import('./legacy-package.mjs');
14
14
  const { strayLocalInstallCheck } = await import('./stray-local-install.mjs');
15
15
  const { configVersionSkewCheck } = await import('./config-version-skew.mjs');
16
+ const { vaultConfigLocationCheck } = await import('./vault-config-location.mjs');
16
17
  const allChecks = [
17
18
  // Prerequisites
18
19
  bunRuntimeCheck,
@@ -24,7 +25,8 @@ async function executeDoctor(options = {}) {
24
25
  legacyPackageCheck,
25
26
  // Project (cwd-dependent)
26
27
  strayLocalInstallCheck,
27
- configVersionSkewCheck
28
+ configVersionSkewCheck,
29
+ vaultConfigLocationCheck
28
30
  ];
29
31
  const checks = scope ? allChecks.filter((check) => check.scope === scope) : allChecks;
30
32
  if (checks.length === 0) {
@@ -1,11 +1,11 @@
1
1
  import { defineCommand } from 'citty';
2
- import { c as coarsePhaseOf, t as toLucaRelative, a as classifyWritePath, A as AUDIT_PATH_PATTERN, W as WAVE_FILE_RE } from '../shared/luca.DZxAJmyM.mjs';
3
- import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.Cf93m-DM.mjs';
2
+ import { c as coarsePhaseOf, t as toLucaRelative, a as classifyWritePath, A as AUDIT_PATH_PATTERN, W as WAVE_FILE_RE } from '../shared/luca.B8ydzQ8S.mjs';
3
+ import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.CWsqOppt.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
7
- import { l as lucaStateClaimOwnerTool, S as STEP_ARTIFACTS } from '../shared/luca.BTcIy-Mh.mjs';
8
- import { p as phasePathFor } from '../shared/luca.B-w_fieK.mjs';
7
+ import { l as lucaStateClaimOwnerTool, S as STEP_ARTIFACTS } from '../shared/luca.CyQeErH2.mjs';
8
+ import { p as phasePathFor } from '../shared/luca.Da5I_JVg.mjs';
9
9
  import 'node:crypto';
10
10
  import 'node:module';
11
11
  import 'node:url';
@@ -3,7 +3,7 @@ import { defineCommand, runMain } from 'citty';
3
3
  import { existsSync, chmodSync } from 'node:fs';
4
4
  import { mkdir, readFile, writeFile, readdir, copyFile } from 'node:fs/promises';
5
5
  import { join, dirname, delimiter } from 'node:path';
6
- import { l as lucaStateSchema } from '../shared/luca.DZxAJmyM.mjs';
6
+ import { l as lucaStateSchema } from '../shared/luca.B8ydzQ8S.mjs';
7
7
  import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
@@ -45,8 +45,12 @@ async function writeProjectSkeleton(opts) {
45
45
  contents: JSON.stringify(
46
46
  {
47
47
  lucaVersion: LUCA_VERSION,
48
- vault: null,
49
- oversight: "full-auto"
48
+ oversight: "full-auto",
49
+ // Canonical vault location is `muninn.vault` (see
50
+ // resolveRepoVault + the vault-routing rule). `luca
51
+ // vault:init` fills this in later; the placeholder makes the
52
+ // canonical home discoverable in a fresh config.
53
+ muninn: { vault: null }
50
54
  },
51
55
  null,
52
56
  2
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DZxAJmyM.mjs';
3
+ import '../shared/luca.B8ydzQ8S.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,12 +8,12 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { r as runWriteHandler, c as lucaPhaseCurrentTool, d as lucaPhaseAdvanceTool, e as lucaPhaseArchiveTool } from '../shared/luca.lLQ2ZIAB.mjs';
12
- import '../shared/luca.BTcIy-Mh.mjs';
11
+ import { r as runWriteHandler, c as lucaPhaseCurrentTool, d as lucaPhaseAdvanceTool, e as lucaPhaseArchiveTool } from '../shared/luca.ELUgu8AW.mjs';
12
+ import '../shared/luca.CyQeErH2.mjs';
13
13
  import 'node:os';
14
- import '../shared/luca.Cf93m-DM.mjs';
15
- import '../shared/luca.D7w2gjQ5.mjs';
16
- import '../shared/luca.B-w_fieK.mjs';
14
+ import '../shared/luca.CWsqOppt.mjs';
15
+ import '../shared/luca.Dn7Gbruu.mjs';
16
+ import '../shared/luca.Da5I_JVg.mjs';
17
17
  import '../shared/luca.CQ3g1xrD.mjs';
18
18
 
19
19
  const currentCommand = defineCommand({
@@ -28,7 +28,7 @@ const currentCommand = defineCommand({
28
28
  const advanceCommand = defineCommand({
29
29
  meta: {
30
30
  name: "advance",
31
- description: "Advance the active roadmap phase by one (currentPhase \u2192 currentPhase+1), marking the completed phase done and the next in-progress. Call at the phase boundary (learn step) when more phases remain; the final phase routes to the milestone step."
31
+ description: "Advance the active roadmap phase by one (currentPhase \u2192 currentPhase+1), marking the completed phase done and the next in-progress. Call at the phase boundary (learn step) when more phases remain; the final phase routes to the finalize step."
32
32
  },
33
33
  async run() {
34
34
  await runWriteHandler("phase advance", lucaPhaseAdvanceTool, {});
@@ -37,7 +37,7 @@ const advanceCommand = defineCommand({
37
37
  const archiveCommand = defineCommand({
38
38
  meta: {
39
39
  name: "archive",
40
- description: "Archive all active phase directories (.luca/phases/<slug>/ \u2192 .luca/archive/<slug>/) at milestone close, so the next milestone starts from an empty phases/ dir. Idempotent; skips slugs already archived. Allowed only in the milestone/complete steps."
40
+ description: "Archive all active phase directories (.luca/phases/<slug>/ \u2192 .luca/archive/<slug>/) at milestone close, so the next milestone starts from an empty phases/ dir. Idempotent; skips slugs already archived. Allowed only in the finalize step."
41
41
  },
42
42
  async run() {
43
43
  await runWriteHandler("phase archive", lucaPhaseArchiveTool, {});
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DZxAJmyM.mjs';
3
+ import '../shared/luca.B8ydzQ8S.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,12 +8,12 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { f as readJsonPayload, r as runWriteHandler, o as lucaPrReviewDetectConvergenceTool, p as lucaPrReviewFilterStaleTool, q as lucaPrReviewRegressionCheckTool } from '../shared/luca.lLQ2ZIAB.mjs';
12
- import '../shared/luca.BTcIy-Mh.mjs';
11
+ import { f as readJsonPayload, r as runWriteHandler, o as lucaPrReviewDetectConvergenceTool, p as lucaPrReviewFilterStaleTool, q as lucaPrReviewRegressionCheckTool } from '../shared/luca.ELUgu8AW.mjs';
12
+ import '../shared/luca.CyQeErH2.mjs';
13
13
  import 'node:os';
14
- import '../shared/luca.Cf93m-DM.mjs';
15
- import '../shared/luca.D7w2gjQ5.mjs';
16
- import '../shared/luca.B-w_fieK.mjs';
14
+ import '../shared/luca.CWsqOppt.mjs';
15
+ import '../shared/luca.Dn7Gbruu.mjs';
16
+ import '../shared/luca.Da5I_JVg.mjs';
17
17
  import '../shared/luca.CQ3g1xrD.mjs';
18
18
 
19
19
  const filterStaleCommand = defineCommand({
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DZxAJmyM.mjs';
3
+ import '../shared/luca.B8ydzQ8S.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,12 +8,12 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { f as readJsonPayload, r as runWriteHandler, i as lucaPreferencesReadTool, j as lucaPreferencesWriteTool } from '../shared/luca.lLQ2ZIAB.mjs';
12
- import '../shared/luca.BTcIy-Mh.mjs';
11
+ import { f as readJsonPayload, r as runWriteHandler, i as lucaPreferencesReadTool, j as lucaPreferencesWriteTool } from '../shared/luca.ELUgu8AW.mjs';
12
+ import '../shared/luca.CyQeErH2.mjs';
13
13
  import 'node:os';
14
- import '../shared/luca.Cf93m-DM.mjs';
15
- import '../shared/luca.D7w2gjQ5.mjs';
16
- import '../shared/luca.B-w_fieK.mjs';
14
+ import '../shared/luca.CWsqOppt.mjs';
15
+ import '../shared/luca.Dn7Gbruu.mjs';
16
+ import '../shared/luca.Da5I_JVg.mjs';
17
17
  import '../shared/luca.CQ3g1xrD.mjs';
18
18
 
19
19
  const readCommand = defineCommand({
@@ -2,7 +2,7 @@ import { defineCommand } from 'citty';
2
2
  import { existsSync } from 'node:fs';
3
3
  import { readFile, rm } from 'node:fs/promises';
4
4
  import { join } from 'node:path';
5
- import { l as lucaStateSchema } from '../shared/luca.DZxAJmyM.mjs';
5
+ import { l as lucaStateSchema } from '../shared/luca.B8ydzQ8S.mjs';
6
6
  import 'node:crypto';
7
7
  import 'node:module';
8
8
  import 'node:url';
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DZxAJmyM.mjs';
3
+ import '../shared/luca.B8ydzQ8S.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,12 +8,12 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { f as readJsonPayload, r as runWriteHandler, s as lucaRepoCleanupApplyTool } from '../shared/luca.lLQ2ZIAB.mjs';
12
- import '../shared/luca.BTcIy-Mh.mjs';
11
+ import { f as readJsonPayload, r as runWriteHandler, s as lucaRepoCleanupApplyTool } from '../shared/luca.ELUgu8AW.mjs';
12
+ import '../shared/luca.CyQeErH2.mjs';
13
13
  import 'node:os';
14
- import '../shared/luca.Cf93m-DM.mjs';
15
- import '../shared/luca.D7w2gjQ5.mjs';
16
- import '../shared/luca.B-w_fieK.mjs';
14
+ import '../shared/luca.CWsqOppt.mjs';
15
+ import '../shared/luca.Dn7Gbruu.mjs';
16
+ import '../shared/luca.Da5I_JVg.mjs';
17
17
  import '../shared/luca.CQ3g1xrD.mjs';
18
18
 
19
19
  const cleanupApplyCommand = defineCommand({
@@ -1,5 +1,5 @@
1
1
  import { defineCommand } from 'citty';
2
- import '../shared/luca.DZxAJmyM.mjs';
2
+ import '../shared/luca.B8ydzQ8S.mjs';
3
3
  import 'node:fs';
4
4
  import 'node:fs/promises';
5
5
  import 'node:path';
@@ -7,13 +7,13 @@ import 'node:crypto';
7
7
  import 'node:module';
8
8
  import 'node:url';
9
9
  import 'node:child_process';
10
- import { a as analyzeRun, g as gatherRunArtifacts, r as renderPostmortemMarkdown, c as computePostmortemExitCode } from '../shared/luca.BiHycbFi.mjs';
11
- import { l as listRuns } from '../shared/luca.D7w2gjQ5.mjs';
10
+ import { a as analyzeRun, g as gatherRunArtifacts, r as renderPostmortemMarkdown, c as computePostmortemExitCode } from '../shared/luca.BeGsLJkq.mjs';
11
+ import { l as listRuns } from '../shared/luca.Dn7Gbruu.mjs';
12
12
  import { l as logger } from '../shared/luca.dM-MKlNE.mjs';
13
13
  import 'zod';
14
14
  import 'node:os';
15
- import '../shared/luca.0ssL9rcP.mjs';
16
- import '../shared/luca.B-w_fieK.mjs';
15
+ import '../shared/luca.BV4noBW7.mjs';
16
+ import '../shared/luca.Da5I_JVg.mjs';
17
17
  import 'pathe';
18
18
  import 'consola';
19
19
 
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DZxAJmyM.mjs';
3
+ import '../shared/luca.B8ydzQ8S.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,12 +8,12 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { f as readJsonPayload, r as runWriteHandler, g as lucaRoadmapReadTool, h as lucaRoadmapCreateTool } from '../shared/luca.lLQ2ZIAB.mjs';
12
- import '../shared/luca.BTcIy-Mh.mjs';
11
+ import { f as readJsonPayload, r as runWriteHandler, g as lucaRoadmapReadTool, h as lucaRoadmapCreateTool } from '../shared/luca.ELUgu8AW.mjs';
12
+ import '../shared/luca.CyQeErH2.mjs';
13
13
  import 'node:os';
14
- import '../shared/luca.Cf93m-DM.mjs';
15
- import '../shared/luca.D7w2gjQ5.mjs';
16
- import '../shared/luca.B-w_fieK.mjs';
14
+ import '../shared/luca.CWsqOppt.mjs';
15
+ import '../shared/luca.Dn7Gbruu.mjs';
16
+ import '../shared/luca.Da5I_JVg.mjs';
17
17
  import '../shared/luca.CQ3g1xrD.mjs';
18
18
 
19
19
  const readCommand = defineCommand({
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import { join as join$1 } from 'pathe';
3
- import '../shared/luca.DZxAJmyM.mjs';
3
+ import '../shared/luca.B8ydzQ8S.mjs';
4
4
  import { existsSync, readdirSync, statSync, readFileSync } from 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import { isAbsolute, resolve, join, extname } from 'node:path';
@@ -8,13 +8,13 @@ import 'node:crypto';
8
8
  import { createRequire } from 'node:module';
9
9
  import { pathToFileURL } from 'node:url';
10
10
  import 'node:child_process';
11
- import { a as analyzeRun, g as gatherRunArtifacts } from '../shared/luca.BiHycbFi.mjs';
12
- import { l as listRuns } from '../shared/luca.D7w2gjQ5.mjs';
11
+ import { a as analyzeRun, g as gatherRunArtifacts } from '../shared/luca.BeGsLJkq.mjs';
12
+ import { l as listRuns } from '../shared/luca.Dn7Gbruu.mjs';
13
13
  import { l as logger } from '../shared/luca.dM-MKlNE.mjs';
14
14
  import 'zod';
15
15
  import 'node:os';
16
- import '../shared/luca.0ssL9rcP.mjs';
17
- import '../shared/luca.B-w_fieK.mjs';
16
+ import '../shared/luca.BV4noBW7.mjs';
17
+ import '../shared/luca.Da5I_JVg.mjs';
18
18
  import 'consola';
19
19
 
20
20
  let tsModuleCache = void 0;
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DZxAJmyM.mjs';
3
+ import '../shared/luca.B8ydzQ8S.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,12 +8,12 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { r as runWriteHandler, l as lucaStateSetCurrentPhaseTool, a as lucaStateAdvanceTool, b as lucaStateReadTool } from '../shared/luca.lLQ2ZIAB.mjs';
12
- import { l as lucaStateClaimOwnerTool } from '../shared/luca.BTcIy-Mh.mjs';
11
+ import { r as runWriteHandler, l as lucaStateSetCurrentPhaseTool, a as lucaStateAdvanceTool, b as lucaStateReadTool } from '../shared/luca.ELUgu8AW.mjs';
12
+ import { l as lucaStateClaimOwnerTool } from '../shared/luca.CyQeErH2.mjs';
13
13
  import 'node:os';
14
- import '../shared/luca.Cf93m-DM.mjs';
15
- import '../shared/luca.D7w2gjQ5.mjs';
16
- import '../shared/luca.B-w_fieK.mjs';
14
+ import '../shared/luca.CWsqOppt.mjs';
15
+ import '../shared/luca.Dn7Gbruu.mjs';
16
+ import '../shared/luca.Da5I_JVg.mjs';
17
17
  import '../shared/luca.CQ3g1xrD.mjs';
18
18
 
19
19
  const readCommand = defineCommand({
@@ -1,7 +1,7 @@
1
1
  import { existsSync, lstatSync } from 'node:fs';
2
2
  import { rm, writeFile, readdir, rmdir } from 'node:fs/promises';
3
3
  import { join } from 'node:path';
4
- import '../shared/luca.DZxAJmyM.mjs';
4
+ import '../shared/luca.B8ydzQ8S.mjs';
5
5
  import 'node:crypto';
6
6
  import 'node:module';
7
7
  import 'node:url';
@@ -1,5 +1,5 @@
1
1
  import { defineCommand } from 'citty';
2
- import { R as RunIdSchema, L as LUCA_DIR_ROOT, T as TelemetryRecordSchema } from '../shared/luca.DZxAJmyM.mjs';
2
+ import { R as RunIdSchema, L as LUCA_DIR_ROOT, T as TelemetryRecordSchema } from '../shared/luca.B8ydzQ8S.mjs';
3
3
  import { mkdirSync, appendFileSync } from 'node:fs';
4
4
  import 'node:fs/promises';
5
5
  import { join, dirname } from 'node:path';
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DZxAJmyM.mjs';
3
+ import '../shared/luca.B8ydzQ8S.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,12 +8,12 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { f as readJsonPayload, r as runWriteHandler, k as lucaTodoUpdateTool, m as lucaTodoListTool, n as lucaTodoAddTool } from '../shared/luca.lLQ2ZIAB.mjs';
12
- import '../shared/luca.BTcIy-Mh.mjs';
11
+ import { f as readJsonPayload, r as runWriteHandler, k as lucaTodoUpdateTool, m as lucaTodoListTool, n as lucaTodoAddTool } from '../shared/luca.ELUgu8AW.mjs';
12
+ import '../shared/luca.CyQeErH2.mjs';
13
13
  import 'node:os';
14
- import '../shared/luca.Cf93m-DM.mjs';
15
- import '../shared/luca.D7w2gjQ5.mjs';
16
- import '../shared/luca.B-w_fieK.mjs';
14
+ import '../shared/luca.CWsqOppt.mjs';
15
+ import '../shared/luca.Dn7Gbruu.mjs';
16
+ import '../shared/luca.Da5I_JVg.mjs';
17
17
  import '../shared/luca.CQ3g1xrD.mjs';
18
18
 
19
19
  const addCommand = defineCommand({
@@ -0,0 +1,96 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { writeFile, readFile } from 'node:fs/promises';
3
+ import { join } from 'node:path';
4
+
5
+ const CHECK_NAME = "Vault config location";
6
+ function configPath() {
7
+ return join(process.cwd(), ".luca", "config.json");
8
+ }
9
+ async function readConfig() {
10
+ const p = configPath();
11
+ if (!existsSync(p)) return null;
12
+ try {
13
+ const raw = JSON.parse(await readFile(p, "utf-8"));
14
+ return raw && typeof raw === "object" && !Array.isArray(raw) ? raw : null;
15
+ } catch {
16
+ return null;
17
+ }
18
+ }
19
+ function nonEmptyTrimmed(v) {
20
+ if (typeof v === "string") {
21
+ const trimmed = v.trim();
22
+ if (trimmed.length > 0) return trimmed;
23
+ }
24
+ return void 0;
25
+ }
26
+ function muninnVaultOf(config) {
27
+ const muninn = config.muninn;
28
+ if (muninn && typeof muninn === "object" && !Array.isArray(muninn)) {
29
+ return nonEmptyTrimmed(muninn.vault);
30
+ }
31
+ return void 0;
32
+ }
33
+ const vaultConfigLocationCheck = {
34
+ name: CHECK_NAME,
35
+ scope: "project",
36
+ async run() {
37
+ const pass = (message) => ({
38
+ name: CHECK_NAME,
39
+ status: "pass",
40
+ message,
41
+ fixCommand: null,
42
+ details: null
43
+ });
44
+ const config = await readConfig();
45
+ if (config === null) {
46
+ return pass("no .luca/config.json to check");
47
+ }
48
+ if (!("vault" in config)) {
49
+ return pass("no legacy top-level vault key present");
50
+ }
51
+ const topLevel = nonEmptyTrimmed(config.vault);
52
+ const muninnVault = muninnVaultOf(config);
53
+ const wouldFold = topLevel !== void 0 && muninnVault === void 0;
54
+ const detail = wouldFold ? `It carries "${topLevel}" and muninn.vault is unset \u2014 \`--fix\` folds it into muninn.vault, then removes the top-level key.` : `\`--fix\` removes it (muninn.vault is the source of truth).`;
55
+ return {
56
+ name: CHECK_NAME,
57
+ status: "warning",
58
+ message: "config.json has a top-level `vault` key (canonical location is `muninn.vault`)",
59
+ fixCommand: "luca doctor --fix",
60
+ details: [
61
+ `.luca/config.json stores a top-level \`vault\` key. The canonical location is \`muninn.vault\`; the top-level key is only read as a legacy fallback.`,
62
+ detail
63
+ ].join("\n ")
64
+ };
65
+ },
66
+ async fix() {
67
+ const config = await readConfig();
68
+ if (config === null || !("vault" in config)) {
69
+ return { applied: [], errors: [] };
70
+ }
71
+ try {
72
+ const topLevel = nonEmptyTrimmed(config.vault);
73
+ const muninnVault = muninnVaultOf(config);
74
+ const next = { ...config };
75
+ const applied = [];
76
+ if (topLevel !== void 0 && muninnVault === void 0) {
77
+ const existingMuninn = config.muninn && typeof config.muninn === "object" && !Array.isArray(config.muninn) ? config.muninn : {};
78
+ next.muninn = { ...existingMuninn, vault: topLevel };
79
+ applied.push(`Folded top-level vault "${topLevel}" \u2192 muninn.vault`);
80
+ }
81
+ delete next.vault;
82
+ applied.push("Removed stale top-level `vault` key from .luca/config.json");
83
+ await writeFile(configPath(), JSON.stringify(next, null, 2) + "\n");
84
+ return { applied, errors: [] };
85
+ } catch (err) {
86
+ return {
87
+ applied: [],
88
+ errors: [
89
+ `Failed to normalize .luca/config.json vault location: ${err.message}`
90
+ ]
91
+ };
92
+ }
93
+ }
94
+ };
95
+
96
+ export { vaultConfigLocationCheck };
@@ -1,5 +1,5 @@
1
1
  import { existsSync, chmodSync, mkdirSync } from 'node:fs';
2
- import '../shared/luca.DZxAJmyM.mjs';
2
+ import '../shared/luca.B8ydzQ8S.mjs';
3
3
  import 'node:fs/promises';
4
4
  import 'node:path';
5
5
  import { l as loadCurrentConfig } from '../shared/luca.CQ3g1xrD.mjs';
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
- import '../shared/luca.DZxAJmyM.mjs';
3
- import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.Cf93m-DM.mjs';
2
+ import '../shared/luca.B8ydzQ8S.mjs';
3
+ import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.CWsqOppt.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,11 +8,11 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { l as listPhaseSlugs, r as readVerificationResult, a as aggregateVerificationResults } from '../shared/luca.0ssL9rcP.mjs';
11
+ import { l as listPhaseSlugs, r as readVerificationResult, a as aggregateVerificationResults } from '../shared/luca.BV4noBW7.mjs';
12
12
  import { l as logger } from '../shared/luca.dM-MKlNE.mjs';
13
13
  import 'zod';
14
14
  import 'node:os';
15
- import '../shared/luca.B-w_fieK.mjs';
15
+ import '../shared/luca.Da5I_JVg.mjs';
16
16
  import 'pathe';
17
17
  import 'consola';
18
18
 
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DZxAJmyM.mjs';
3
+ import '../shared/luca.B8ydzQ8S.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:path';
@@ -8,12 +8,12 @@ import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
10
10
  import 'node:child_process';
11
- import { r as runWriteHandler, v as lucaWorkflowResetTool } from '../shared/luca.lLQ2ZIAB.mjs';
12
- import '../shared/luca.BTcIy-Mh.mjs';
11
+ import { r as runWriteHandler, v as lucaWorkflowResetTool } from '../shared/luca.ELUgu8AW.mjs';
12
+ import '../shared/luca.CyQeErH2.mjs';
13
13
  import 'node:os';
14
- import '../shared/luca.Cf93m-DM.mjs';
15
- import '../shared/luca.D7w2gjQ5.mjs';
16
- import '../shared/luca.B-w_fieK.mjs';
14
+ import '../shared/luca.CWsqOppt.mjs';
15
+ import '../shared/luca.Dn7Gbruu.mjs';
16
+ import '../shared/luca.Da5I_JVg.mjs';
17
17
  import '../shared/luca.CQ3g1xrD.mjs';
18
18
 
19
19
  const resetCommand = defineCommand({
@@ -342,7 +342,7 @@ If changes requested, revise and re-submit. In **full-auto**, skip approval —
342
342
  When the plan is approved (or auto-approved in full-auto):
343
343
 
344
344
  1. The plan file is the canonical `.luca/phases/<currentPhaseSlug>/plan.md` written via `luca` artifact write semantics. Downstream stages resolve it deterministically from the phase slug and the LUCA_DIR_CONTRACT; no separate `planFile` state field is needed.
345
- 2. Transition to **Execute** mode via `luca state advance --to-step execute`.
345
+ 2. Transition to the **plan** step via `luca state advance --to-step plan` (the only legal next step from `architect`; planning then flows plan → plan-review → execute per the pipeline-transitions table).
346
346
 
347
347
  ---
348
348