@alecsibilia/luca 13.0.0-alpha.3 → 13.0.0-alpha.4

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 (65) hide show
  1. package/dist/chunks/branch.mjs +5 -5
  2. package/dist/chunks/checks.mjs +5 -5
  3. package/dist/chunks/claim-verify.mjs +1 -1
  4. package/dist/chunks/classify.mjs +1 -1
  5. package/dist/chunks/confidence.mjs +5 -5
  6. package/dist/chunks/hook.mjs +10 -4
  7. package/dist/chunks/init.mjs +1 -1
  8. package/dist/chunks/phase.mjs +5 -5
  9. package/dist/chunks/pr-review.mjs +5 -5
  10. package/dist/chunks/preferences.mjs +5 -5
  11. package/dist/chunks/repair.mjs +1 -1
  12. package/dist/chunks/repo.mjs +5 -5
  13. package/dist/chunks/retro.mjs +5 -5
  14. package/dist/chunks/roadmap.mjs +5 -5
  15. package/dist/chunks/rules.mjs +5 -5
  16. package/dist/chunks/state.mjs +5 -5
  17. package/dist/chunks/stray-local-install.mjs +1 -1
  18. package/dist/chunks/telemetry.mjs +1 -1
  19. package/dist/chunks/todo.mjs +5 -5
  20. package/dist/chunks/vault-init.mjs +1 -1
  21. package/dist/chunks/verification.mjs +4 -4
  22. package/dist/chunks/workflow.mjs +5 -5
  23. package/dist/claude/.claude/agents/debater.md +88 -0
  24. package/dist/claude/.claude/agents/discussion.md +13 -26
  25. package/dist/claude/.claude/agents/executor.md +6 -18
  26. package/dist/claude/.claude/agents/learner.md +31 -71
  27. package/dist/claude/.claude/agents/plan-reviewer.md +5 -9
  28. package/dist/claude/.claude/agents/researcher.md +5 -9
  29. package/dist/claude/.claude/agents/reviewer.md +18 -15
  30. package/dist/claude/.claude/agents/shadow-scanner.md +23 -26
  31. package/dist/claude/.claude/agents/test-writer.md +89 -0
  32. package/dist/claude/.claude/agents/verifier.md +5 -5
  33. package/dist/claude/.claude/commands/gh-pr-address.md +4 -4
  34. package/dist/claude/.claude/commands/lu-review.md +1 -1
  35. package/dist/claude/.claude/commands/lu.md +5 -5
  36. package/dist/claude/.claude/commands/milestone-new.md +1 -1
  37. package/dist/claude/.claude/commands/phase-execute.md +1 -1
  38. package/dist/claude/.claude/commands/phase-plan.md +1 -1
  39. package/dist/claude/.claude/commands/repo-cleanup.md +8 -5
  40. package/dist/claude/skills/autopilot/SKILL.md +22 -32
  41. package/dist/claude/skills/gh-pr-address/SKILL.md +4 -4
  42. package/dist/claude/skills/lu/SKILL.md +8 -8
  43. package/dist/claude/skills/lu-review/SKILL.md +1 -1
  44. package/dist/claude/skills/milestone-audit/SKILL.md +41 -61
  45. package/dist/claude/skills/milestone-complete/SKILL.md +1 -1
  46. package/dist/claude/skills/phase-discuss/SKILL.md +5 -5
  47. package/dist/claude/skills/phase-execute/SKILL.md +60 -67
  48. package/dist/claude/skills/phase-plan/SKILL.md +11 -13
  49. package/dist/claude/skills/phase-research/SKILL.md +1 -1
  50. package/dist/claude/skills/post-init-tour/SKILL.md +1 -1
  51. package/dist/claude/skills/project-new/SKILL.md +19 -77
  52. package/dist/claude/skills/quick/SKILL.md +2 -8
  53. package/dist/claude/skills/repo-audit/SKILL.md +5 -5
  54. package/dist/claude/skills/repo-cleanup/SKILL.md +8 -5
  55. package/dist/claude/skills/session-plan/SKILL.md +9 -9
  56. package/dist/claude/skills/workflow-save/SKILL.md +4 -4
  57. package/dist/index.mjs +1 -1
  58. package/dist/shared/{luca.BQXFn5yo.mjs → luca.BKNzBAX6.mjs} +2 -2
  59. package/dist/shared/{luca.CuvqWf4b.mjs → luca.CSIEeM0g.mjs} +2 -2
  60. package/dist/shared/{luca.DykMxS_D.mjs → luca.CZNcKKAw.mjs} +160 -53
  61. package/dist/shared/{luca.pqZahLS5.mjs → luca.CbQLVJY4.mjs} +1 -1
  62. package/dist/shared/{luca.BH2GZl5z.mjs → luca.DEnRxIjr.mjs} +1 -1
  63. package/dist/shared/{luca.BhM9TDAo.mjs → luca.EQGAqeU5.mjs} +3 -3
  64. package/dist/shared/{luca.DXUcpbIe.mjs → luca.Q3_4GQWh.mjs} +1 -1
  65. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DXUcpbIe.mjs';
3
+ import '../shared/luca.Q3_4GQWh.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 { r as runWriteHandler, t as lucaBranchGuardTool } from '../shared/luca.DykMxS_D.mjs';
11
+ import { r as runWriteHandler, t as lucaBranchGuardTool } from '../shared/luca.CZNcKKAw.mjs';
12
12
  import 'node:os';
13
- import '../shared/luca.BH2GZl5z.mjs';
14
- import '../shared/luca.CuvqWf4b.mjs';
15
- import '../shared/luca.pqZahLS5.mjs';
13
+ import '../shared/luca.DEnRxIjr.mjs';
14
+ import '../shared/luca.CSIEeM0g.mjs';
15
+ import '../shared/luca.CbQLVJY4.mjs';
16
16
  import '../shared/luca.CQ3g1xrD.mjs';
17
17
  import '../shared/luca.Djs7oPPj.mjs';
18
18
 
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DXUcpbIe.mjs';
3
+ import '../shared/luca.Q3_4GQWh.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 { e as readJsonPayload, r as runWriteHandler, s as lucaChecksRunTool } from '../shared/luca.DykMxS_D.mjs';
11
+ import { e as readJsonPayload, r as runWriteHandler, s as lucaChecksRunTool } from '../shared/luca.CZNcKKAw.mjs';
12
12
  import 'node:os';
13
- import '../shared/luca.BH2GZl5z.mjs';
14
- import '../shared/luca.CuvqWf4b.mjs';
15
- import '../shared/luca.pqZahLS5.mjs';
13
+ import '../shared/luca.DEnRxIjr.mjs';
14
+ import '../shared/luca.CSIEeM0g.mjs';
15
+ import '../shared/luca.CbQLVJY4.mjs';
16
16
  import '../shared/luca.CQ3g1xrD.mjs';
17
17
  import '../shared/luca.Djs7oPPj.mjs';
18
18
 
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import { resolve } from 'pathe';
3
- import '../shared/luca.DXUcpbIe.mjs';
3
+ import '../shared/luca.Q3_4GQWh.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.DXUcpbIe.mjs';
2
+ import { C as ClassifyComplexityInputSchema } from '../shared/luca.Q3_4GQWh.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.DXUcpbIe.mjs';
3
- import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.BH2GZl5z.mjs';
2
+ import '../shared/luca.Q3_4GQWh.mjs';
3
+ import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.DEnRxIjr.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 { b as renderConfidenceJournalMarkdown, r as readConfidenceJournal, g as getConfidenceSummary } from '../shared/luca.CuvqWf4b.mjs';
11
+ import { b as renderConfidenceJournalMarkdown, r as readConfidenceJournal, g as getConfidenceSummary } from '../shared/luca.CSIEeM0g.mjs';
12
12
  import { l as logger } from '../shared/luca.dM-MKlNE.mjs';
13
13
  import 'zod';
14
- import { e as readJsonPayload, r as runWriteHandler, v as lucaConfidenceLogTool } from '../shared/luca.DykMxS_D.mjs';
14
+ import { e as readJsonPayload, r as runWriteHandler, v as lucaConfidenceLogTool } from '../shared/luca.CZNcKKAw.mjs';
15
15
  import 'node:os';
16
- import '../shared/luca.pqZahLS5.mjs';
16
+ import '../shared/luca.CbQLVJY4.mjs';
17
17
  import 'consola';
18
18
  import '../shared/luca.CQ3g1xrD.mjs';
19
19
  import '../shared/luca.Djs7oPPj.mjs';
@@ -1,11 +1,11 @@
1
1
  import { defineCommand } from 'citty';
2
- import { c as coarsePhaseOf, a as classifyWritePath, A as AUDIT_PATH_PATTERN, W as WAVE_FILE_RE } from '../shared/luca.DXUcpbIe.mjs';
3
- import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.BH2GZl5z.mjs';
2
+ import { c as coarsePhaseOf, a as classifyWritePath, A as AUDIT_PATH_PATTERN, W as WAVE_FILE_RE } from '../shared/luca.Q3_4GQWh.mjs';
3
+ import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.DEnRxIjr.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
6
6
  import { isAbsolute, relative } from 'node:path';
7
7
  import { S as STEP_ARTIFACTS } from '../shared/luca.Djs7oPPj.mjs';
8
- import { p as phasePathFor } from '../shared/luca.pqZahLS5.mjs';
8
+ import { p as phasePathFor } from '../shared/luca.CbQLVJY4.mjs';
9
9
  import 'node:crypto';
10
10
  import 'node:module';
11
11
  import 'node:url';
@@ -196,6 +196,7 @@ const LUCA_READ_VERBS = /* @__PURE__ */ new Set([
196
196
  "current",
197
197
  "list",
198
198
  "guard",
199
+ "aggregate",
199
200
  "filter-stale",
200
201
  "detect-convergence",
201
202
  "regression-check"
@@ -215,9 +216,14 @@ const LUCA_NOUN_VERBS = {
215
216
  checks: /* @__PURE__ */ new Set(["run"]),
216
217
  branch: /* @__PURE__ */ new Set(["guard"]),
217
218
  workflow: /* @__PURE__ */ new Set(["reset"]),
218
- confidence: /* @__PURE__ */ new Set(["log"])
219
+ confidence: /* @__PURE__ */ new Set(["log"]),
220
+ // Read-side surfaces over the per-phase verify.json files.
221
+ verification: /* @__PURE__ */ new Set(["read", "aggregate"])
219
222
  };
220
223
  function classifyLucaCommand(rest) {
224
+ if (rest.some((t) => ["--help", "-h", "--version"].includes(t))) {
225
+ return "bash-readonly";
226
+ }
221
227
  const noun = rest.find((t) => !t.startsWith("-"));
222
228
  if (!noun) return "bash-readonly";
223
229
  const verbs = LUCA_NOUN_VERBS[noun];
@@ -3,7 +3,7 @@ import { defineCommand, runMain } from 'citty';
3
3
  import { existsSync, chmodSync } from 'node:fs';
4
4
  import { mkdir, writeFile, readFile, readdir, copyFile } from 'node:fs/promises';
5
5
  import { join, dirname, delimiter } from 'node:path';
6
- import { l as lucaStateSchema } from '../shared/luca.DXUcpbIe.mjs';
6
+ import { l as lucaStateSchema } from '../shared/luca.Q3_4GQWh.mjs';
7
7
  import 'node:crypto';
8
8
  import 'node:module';
9
9
  import 'node:url';
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DXUcpbIe.mjs';
3
+ import '../shared/luca.Q3_4GQWh.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 { r as runWriteHandler, b as lucaPhaseCurrentTool, c as lucaPhaseAdvanceTool, d as lucaPhaseArchiveTool } from '../shared/luca.DykMxS_D.mjs';
11
+ import { r as runWriteHandler, b as lucaPhaseCurrentTool, c as lucaPhaseAdvanceTool, d as lucaPhaseArchiveTool } from '../shared/luca.CZNcKKAw.mjs';
12
12
  import 'node:os';
13
- import '../shared/luca.BH2GZl5z.mjs';
14
- import '../shared/luca.CuvqWf4b.mjs';
15
- import '../shared/luca.pqZahLS5.mjs';
13
+ import '../shared/luca.DEnRxIjr.mjs';
14
+ import '../shared/luca.CSIEeM0g.mjs';
15
+ import '../shared/luca.CbQLVJY4.mjs';
16
16
  import '../shared/luca.CQ3g1xrD.mjs';
17
17
  import '../shared/luca.Djs7oPPj.mjs';
18
18
 
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DXUcpbIe.mjs';
3
+ import '../shared/luca.Q3_4GQWh.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 { e as readJsonPayload, r as runWriteHandler, n as lucaPrReviewDetectConvergenceTool, o as lucaPrReviewFilterStaleTool, p as lucaPrReviewRegressionCheckTool } from '../shared/luca.DykMxS_D.mjs';
11
+ import { e as readJsonPayload, r as runWriteHandler, n as lucaPrReviewDetectConvergenceTool, o as lucaPrReviewFilterStaleTool, p as lucaPrReviewRegressionCheckTool } from '../shared/luca.CZNcKKAw.mjs';
12
12
  import 'node:os';
13
- import '../shared/luca.BH2GZl5z.mjs';
14
- import '../shared/luca.CuvqWf4b.mjs';
15
- import '../shared/luca.pqZahLS5.mjs';
13
+ import '../shared/luca.DEnRxIjr.mjs';
14
+ import '../shared/luca.CSIEeM0g.mjs';
15
+ import '../shared/luca.CbQLVJY4.mjs';
16
16
  import '../shared/luca.CQ3g1xrD.mjs';
17
17
  import '../shared/luca.Djs7oPPj.mjs';
18
18
 
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import 'zod';
3
- import '../shared/luca.DXUcpbIe.mjs';
3
+ import '../shared/luca.Q3_4GQWh.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 { e as readJsonPayload, r as runWriteHandler, h as lucaPreferencesReadTool, i as lucaPreferencesWriteTool } from '../shared/luca.DykMxS_D.mjs';
11
+ import { e as readJsonPayload, r as runWriteHandler, h as lucaPreferencesReadTool, i as lucaPreferencesWriteTool } from '../shared/luca.CZNcKKAw.mjs';
12
12
  import 'node:os';
13
- import '../shared/luca.BH2GZl5z.mjs';
14
- import '../shared/luca.CuvqWf4b.mjs';
15
- import '../shared/luca.pqZahLS5.mjs';
13
+ import '../shared/luca.DEnRxIjr.mjs';
14
+ import '../shared/luca.CSIEeM0g.mjs';
15
+ import '../shared/luca.CbQLVJY4.mjs';
16
16
  import '../shared/luca.CQ3g1xrD.mjs';
17
17
  import '../shared/luca.Djs7oPPj.mjs';
18
18
 
@@ -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.DXUcpbIe.mjs';
5
+ import { l as lucaStateSchema } from '../shared/luca.Q3_4GQWh.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.DXUcpbIe.mjs';
3
+ import '../shared/luca.Q3_4GQWh.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 { e as readJsonPayload, r as runWriteHandler, q as lucaRepoCleanupApplyTool } from '../shared/luca.DykMxS_D.mjs';
11
+ import { e as readJsonPayload, r as runWriteHandler, q as lucaRepoCleanupApplyTool } from '../shared/luca.CZNcKKAw.mjs';
12
12
  import 'node:os';
13
- import '../shared/luca.BH2GZl5z.mjs';
14
- import '../shared/luca.CuvqWf4b.mjs';
15
- import '../shared/luca.pqZahLS5.mjs';
13
+ import '../shared/luca.DEnRxIjr.mjs';
14
+ import '../shared/luca.CSIEeM0g.mjs';
15
+ import '../shared/luca.CbQLVJY4.mjs';
16
16
  import '../shared/luca.CQ3g1xrD.mjs';
17
17
  import '../shared/luca.Djs7oPPj.mjs';
18
18
 
@@ -1,5 +1,5 @@
1
1
  import { defineCommand } from 'citty';
2
- import '../shared/luca.DXUcpbIe.mjs';
2
+ import '../shared/luca.Q3_4GQWh.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.BhM9TDAo.mjs';
11
- import { l as listRuns } from '../shared/luca.CuvqWf4b.mjs';
10
+ import { a as analyzeRun, g as gatherRunArtifacts, r as renderPostmortemMarkdown, c as computePostmortemExitCode } from '../shared/luca.EQGAqeU5.mjs';
11
+ import { l as listRuns } from '../shared/luca.CSIEeM0g.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.BQXFn5yo.mjs';
16
- import '../shared/luca.pqZahLS5.mjs';
15
+ import '../shared/luca.BKNzBAX6.mjs';
16
+ import '../shared/luca.CbQLVJY4.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.DXUcpbIe.mjs';
3
+ import '../shared/luca.Q3_4GQWh.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 { e as readJsonPayload, r as runWriteHandler, f as lucaRoadmapReadTool, g as lucaRoadmapCreateTool } from '../shared/luca.DykMxS_D.mjs';
11
+ import { e as readJsonPayload, r as runWriteHandler, f as lucaRoadmapReadTool, g as lucaRoadmapCreateTool } from '../shared/luca.CZNcKKAw.mjs';
12
12
  import 'node:os';
13
- import '../shared/luca.BH2GZl5z.mjs';
14
- import '../shared/luca.CuvqWf4b.mjs';
15
- import '../shared/luca.pqZahLS5.mjs';
13
+ import '../shared/luca.DEnRxIjr.mjs';
14
+ import '../shared/luca.CSIEeM0g.mjs';
15
+ import '../shared/luca.CbQLVJY4.mjs';
16
16
  import '../shared/luca.CQ3g1xrD.mjs';
17
17
  import '../shared/luca.Djs7oPPj.mjs';
18
18
 
@@ -1,6 +1,6 @@
1
1
  import { defineCommand } from 'citty';
2
2
  import { join as join$1 } from 'pathe';
3
- import '../shared/luca.DXUcpbIe.mjs';
3
+ import '../shared/luca.Q3_4GQWh.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.BhM9TDAo.mjs';
12
- import { l as listRuns } from '../shared/luca.CuvqWf4b.mjs';
11
+ import { a as analyzeRun, g as gatherRunArtifacts } from '../shared/luca.EQGAqeU5.mjs';
12
+ import { l as listRuns } from '../shared/luca.CSIEeM0g.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.BQXFn5yo.mjs';
17
- import '../shared/luca.pqZahLS5.mjs';
16
+ import '../shared/luca.BKNzBAX6.mjs';
17
+ import '../shared/luca.CbQLVJY4.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.DXUcpbIe.mjs';
3
+ import '../shared/luca.Q3_4GQWh.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 { r as runWriteHandler, l as lucaStateAdvanceTool, a as lucaStateReadTool } from '../shared/luca.DykMxS_D.mjs';
11
+ import { r as runWriteHandler, l as lucaStateAdvanceTool, a as lucaStateReadTool } from '../shared/luca.CZNcKKAw.mjs';
12
12
  import 'node:os';
13
- import '../shared/luca.BH2GZl5z.mjs';
14
- import '../shared/luca.CuvqWf4b.mjs';
15
- import '../shared/luca.pqZahLS5.mjs';
13
+ import '../shared/luca.DEnRxIjr.mjs';
14
+ import '../shared/luca.CSIEeM0g.mjs';
15
+ import '../shared/luca.CbQLVJY4.mjs';
16
16
  import '../shared/luca.CQ3g1xrD.mjs';
17
17
  import '../shared/luca.Djs7oPPj.mjs';
18
18
 
@@ -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.DXUcpbIe.mjs';
4
+ import '../shared/luca.Q3_4GQWh.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.DXUcpbIe.mjs';
2
+ import { R as RunIdSchema, L as LUCA_DIR_ROOT, T as TelemetryRecordSchema } from '../shared/luca.Q3_4GQWh.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.DXUcpbIe.mjs';
3
+ import '../shared/luca.Q3_4GQWh.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 { e as readJsonPayload, r as runWriteHandler, j as lucaTodoUpdateTool, k as lucaTodoListTool, m as lucaTodoAddTool } from '../shared/luca.DykMxS_D.mjs';
11
+ import { e as readJsonPayload, r as runWriteHandler, j as lucaTodoUpdateTool, k as lucaTodoListTool, m as lucaTodoAddTool } from '../shared/luca.CZNcKKAw.mjs';
12
12
  import 'node:os';
13
- import '../shared/luca.BH2GZl5z.mjs';
14
- import '../shared/luca.CuvqWf4b.mjs';
15
- import '../shared/luca.pqZahLS5.mjs';
13
+ import '../shared/luca.DEnRxIjr.mjs';
14
+ import '../shared/luca.CSIEeM0g.mjs';
15
+ import '../shared/luca.CbQLVJY4.mjs';
16
16
  import '../shared/luca.CQ3g1xrD.mjs';
17
17
  import '../shared/luca.Djs7oPPj.mjs';
18
18
 
@@ -1,5 +1,5 @@
1
1
  import { existsSync, chmodSync, mkdirSync } from 'node:fs';
2
- import '../shared/luca.DXUcpbIe.mjs';
2
+ import '../shared/luca.Q3_4GQWh.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.DXUcpbIe.mjs';
3
- import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.BH2GZl5z.mjs';
2
+ import '../shared/luca.Q3_4GQWh.mjs';
3
+ import { l as loadCurrentState, r as resolveActiveSlug } from '../shared/luca.DEnRxIjr.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.BQXFn5yo.mjs';
11
+ import { l as listPhaseSlugs, r as readVerificationResult, a as aggregateVerificationResults } from '../shared/luca.BKNzBAX6.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.pqZahLS5.mjs';
15
+ import '../shared/luca.CbQLVJY4.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.DXUcpbIe.mjs';
3
+ import '../shared/luca.Q3_4GQWh.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 { r as runWriteHandler, u as lucaWorkflowResetTool } from '../shared/luca.DykMxS_D.mjs';
11
+ import { r as runWriteHandler, u as lucaWorkflowResetTool } from '../shared/luca.CZNcKKAw.mjs';
12
12
  import 'node:os';
13
- import '../shared/luca.BH2GZl5z.mjs';
14
- import '../shared/luca.CuvqWf4b.mjs';
15
- import '../shared/luca.pqZahLS5.mjs';
13
+ import '../shared/luca.DEnRxIjr.mjs';
14
+ import '../shared/luca.CSIEeM0g.mjs';
15
+ import '../shared/luca.CbQLVJY4.mjs';
16
16
  import '../shared/luca.CQ3g1xrD.mjs';
17
17
  import '../shared/luca.Djs7oPPj.mjs';
18
18
 
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: Adversarial Debater
3
+ description: Argues one assigned side (DEFEND or CHALLENGE) of a proposition with evidence, then returns a structured verdict with confidence. Spawn opposing debaters in parallel for adversarial validation of a fix, decision, or claim; the orchestrator arbitrates by confidence-weighted majority.
4
+ subagent: true
5
+ id: debater
6
+ max-steps: 20
7
+ tools: Read, Grep, Glob
8
+ allowed-tools: [Read, Grep, Glob]
9
+ ---
10
+
11
+ ## Core Operating Rules (all subagents)
12
+ - No temp files or shell commands for edits — use edit tools only.
13
+ - No prose between consecutive tool calls — invoke tools directly.
14
+ - Respect mode boundaries — read-only means read-only.
15
+ - Pipeline state belongs to the orchestrator. You MUST NOT run state-mutating `luca` commands (`luca state advance`, `luca roadmap create`, `luca phase advance`/`archive`, `luca workflow reset`). Reading state is fine (`luca state read`, `luca phase current`, `luca verification read`). Mutating pipeline state from a subagent races the orchestrator and corrupts the run. This restriction is about PIPELINE STATE only — it does NOT limit code edits: if your role is to change code (e.g. executor, test-writer), edit production files freely within your mode boundary using Edit/Write. The one constraint on `.luca/` artifacts is that you write only the SINGLE canonical artifact assigned to your role (e.g. a reviewer writes its one `audits/<reviewer>.md`), never another step's artifact or `state.json`.
16
+
17
+ ## Self-Verification Mandate
18
+ - Verify every assumption with a tool call. Do NOT rely on memory of file contents — re-read files before editing.
19
+ - Before referencing any file path or line number, verify it exists via tool call.
20
+
21
+ ## Anti-Sycophancy Directive
22
+ - Do NOT rubber-stamp. If you find 0 issues, state what you checked and why each check passed.
23
+ - Silence is not approval — every APPROVE verdict requires specific evidence.
24
+
25
+ ## Memory Tier Discipline
26
+
27
+ Before every `muninn_remember`/`muninn_remember_batch` call, decide the tier:
28
+
29
+ - **verified** — content cites a specific source (file:line, PR id, user message id, external URL) AND the claim is testable from that source AND it is factual not interpretive.
30
+ - **inferred** (engine default) — patterns, lessons, opinions, predictions, recommendations, AI-derived metrics, session archives. **Use this for every `muninn_remember_batch` write.**
31
+ - **external** — content imported from outside this repo (rare; e.g. seeded preferences memory).
32
+ - **untrusted** — never assigned by an agent.
33
+
34
+ `muninn_remember` does NOT accept a tier at create time. For **verified** writes, capture the returned id and immediately call `mcp__muninn__muninn_trust(id: <returned-id>, trust: "verified", vault: <repo_vault>)` to promote.
35
+
36
+ When processing `muninn_recall` results, prefer engrams with `trust: verified` over `inferred` when both match a query.
37
+
38
+ ## Memory I/O Is the Orchestrator's Job
39
+ - You do NOT have MuninnDB/MCP access. Do not attempt `mcp__muninn__*` calls — they are unavailable to subagents and will fail.
40
+ - Any prior learnings, decisions, or pitfalls you need are supplied in your prompt by the orchestrator (which recalls them on your behalf). If you need context your prompt doesn't include, say so in your output instead of trying to recall it yourself.
41
+ - Insights you produce for long-term storage are RETURNED in your structured output; the orchestrator persists them to MuninnDB. Never assume you persisted anything.
42
+
43
+ ## Luca Reminders
44
+ - Obey `<luca-reminder>` tags — mid-session guidance supersedes stale context.
45
+ - End every response with exactly: `<!-- usage: {"inputTokens":<N>,"outputTokens":<N>,"model":"<id>"} -->`. If `model` or token counts are unknown, **omit** the entire comment — never `null` or `0` placeholders.
46
+ - Optionally include `"outcome":"<value>"` (enum: `completed`, `completed_no_usage`, `completed_partial_parse`, `crashed`, `killed`, `timeout`, `cancelled_by_user`). Omit key entirely when unset — never empty string.
47
+ - Subagent telemetry invariants (per `luca telemetry emit --kind=subagent.invoke` and `--kind=subagent.complete`): `success: true` for any `completed*` outcome; `false` for `crashed`/`killed`/`timeout`; never emit `null`. `durationMs` MUST be `Date.now() - ts` from the matching invoke event; omit if unmeasurable, never a guess.
48
+
49
+ You are a Luca debater. You are assigned ONE side of a proposition and you argue it as rigorously and honestly as the evidence allows.
50
+
51
+ ## Inputs you will be given
52
+ - **PROPOSITION** — the claim under dispute (e.g. "the fix in <diff> correctly resolves the failure and introduces no regression").
53
+ - **STANCE** — exactly one of:
54
+ - **DEFEND** — make the strongest evidence-backed case that the proposition is TRUE.
55
+ - **CHALLENGE** — make the strongest evidence-backed case that the proposition is FALSE (find the break, the missed case, the regression).
56
+ - Context: the diff/files/criteria in question.
57
+
58
+ ## How to argue
59
+ 1. Argue ONLY your assigned stance — the opposing debater covers the other side; the orchestrator weighs both.
60
+ 2. Ground every claim in specific evidence: `file:line`, a code path, a failing/expected behavior. Assertion without a citation carries no weight.
61
+ 3. Reason about real execution: trace the actual code path, inputs, edge cases, and cross-module effects — not surface plausibility.
62
+ 4. **Honesty over advocacy** (anti-sycophancy): if the evidence genuinely undercuts your assigned stance, say so in CONCESSION and lower your CONFIDENCE accordingly. A dishonest 0.9 is worse than an honest 0.4 — the arbiter relies on calibrated confidence.
63
+
64
+ ## Output Format
65
+ ```
66
+ STANCE: DEFEND | CHALLENGE
67
+ POSITION: <one-sentence claim you are arguing>
68
+ CONFIDENCE: <0.0–1.0 — calibrated likelihood your position is correct on the evidence>
69
+ EVIDENCE:
70
+ - <claim> — <file:line or code path / observed behavior>
71
+ - ...
72
+ STRONGEST_OPPOSING_POINT: <the best argument against your stance, stated fairly>
73
+ CONCESSION: <what the evidence does NOT let you claim, or "none">
74
+ ```
75
+
76
+ ## Constraints
77
+ - Read-only: cite and reason, never edit. Empirical settlement (writing/running a repro test) is delegated to the test-writer, not you.
78
+ - No hedging-as-both-sides: you were assigned a stance — commit to it, but keep CONFIDENCE calibrated.
79
+ - Be concrete and falsifiable: every EVIDENCE line should be something the arbiter (or the opposing debater) could check.
80
+
81
+ ## Guidance
82
+
83
+ - **Self-verification.** Re-read files before editing. Verify every assumption with a concrete tool call (Read, Grep, Glob, or a CLI invocation) before acting on it. Do not infer file state from memory or prior context.
84
+ - **Anti-sycophancy.** Every APPROVE verdict must cite specific evidence — a file path, a diff hunk, a test name, an audit finding. Bare approvals are reviewer failure modes; the review counts as not-yet-done until evidence is on the record.
85
+
86
+ ## Telemetry
87
+
88
+ - `subagent-end` — emit when a spawned subagent returns. Carries the subagent id, the outcome, and the result summary.
@@ -12,6 +12,7 @@ allowed-tools: [Read, Grep, Glob, Write, Edit]
12
12
  - No temp files or shell commands for edits — use edit tools only.
13
13
  - No prose between consecutive tool calls — invoke tools directly.
14
14
  - Respect mode boundaries — read-only means read-only.
15
+ - Pipeline state belongs to the orchestrator. You MUST NOT run state-mutating `luca` commands (`luca state advance`, `luca roadmap create`, `luca phase advance`/`archive`, `luca workflow reset`). Reading state is fine (`luca state read`, `luca phase current`, `luca verification read`). Mutating pipeline state from a subagent races the orchestrator and corrupts the run. This restriction is about PIPELINE STATE only — it does NOT limit code edits: if your role is to change code (e.g. executor, test-writer), edit production files freely within your mode boundary using Edit/Write. The one constraint on `.luca/` artifacts is that you write only the SINGLE canonical artifact assigned to your role (e.g. a reviewer writes its one `audits/<reviewer>.md`), never another step's artifact or `state.json`.
15
16
 
16
17
  ## Self-Verification Mandate
17
18
  - Verify every assumption with a tool call. Do NOT rely on memory of file contents — re-read files before editing.
@@ -34,11 +35,10 @@ Before every `muninn_remember`/`muninn_remember_batch` call, decide the tier:
34
35
 
35
36
  When processing `muninn_recall` results, prefer engrams with `trust: verified` over `inferred` when both match a query.
36
37
 
37
- ## Pre-Invoke Memory Recall
38
- - If MuninnDB MCP tools are available, before your first substantive tool call run `muninn_recall` once to surface prior learnings for this task.
39
- - Form: `mcp__muninn__muninn_recall(vault: "<from .luca/config.json muninn.vault, fallback 'default'>", context: ["<task topic>"], mode: "semantic", limit: 5)`.
40
- - Filter recalled engrams: prefer `trust: verified` over `inferred` when both match.
41
- - If MuninnDB is unreachable or returns no matches, log briefly and proceed — NEVER block on recall failure.
38
+ ## Memory I/O Is the Orchestrator's Job
39
+ - You do NOT have MuninnDB/MCP access. Do not attempt `mcp__muninn__*` calls they are unavailable to subagents and will fail.
40
+ - Any prior learnings, decisions, or pitfalls you need are supplied in your prompt by the orchestrator (which recalls them on your behalf). If you need context your prompt doesn't include, say so in your output instead of trying to recall it yourself.
41
+ - Insights you produce for long-term storage are RETURNED in your structured output; the orchestrator persists them to MuninnDB. Never assume you persisted anything.
42
42
 
43
43
  ## Luca Reminders
44
44
  - Obey `<luca-reminder>` tags — mid-session guidance supersedes stale context.
@@ -112,25 +112,16 @@ Write the following to `.luca/phases/<currentPhaseSlug>/context.md` (the phase s
112
112
  - <anything still unresolved — the planner should flag these>
113
113
  ```
114
114
 
115
- ## Historical Context from MuninnDB
115
+ ## Historical Context (supplied by the orchestrator)
116
116
 
117
- Before surfacing ambiguities, check if past architectural decisions are relevant:
117
+ The orchestrator includes any relevant prior architectural decisions from
118
+ MuninnDB in your prompt (you have no MuninnDB access yourself). When such
119
+ prior art is present:
120
+ - Present it when surfacing related ambiguities.
121
+ - Note whether the same decision applies here or needs revisiting.
122
+ - Mark ambiguities that contradict prior art as higher priority for user review.
118
123
 
119
- 1. Read `.luca/config.json` `muninn.vault` (fall back to `"default"`).
120
- 2. Query for related past decisions:
121
- ```
122
- mcp__muninn__muninn_recall(
123
- vault: "<repo_vault>",
124
- context: "<task intent and domain>",
125
- tags: ["decision"]
126
- )
127
- ```
128
- 3. If relevant decisions are found:
129
- - Present them as **prior art** when surfacing related ambiguities
130
- - Note whether the same decision applies here or needs revisiting
131
- - Mark decisions that contradict prior art as higher priority for user review
132
-
133
- If MuninnDB is unavailable or returns nothing, proceed without this step.
124
+ If no prior decisions were supplied, proceed without this step.
134
125
 
135
126
  ## Behavioral Rules
136
127
 
@@ -143,7 +134,3 @@ If MuninnDB is unavailable or returns nothing, proceed without this step.
143
134
  ## Guidance
144
135
 
145
136
  - **Self-verification.** Re-read files before editing. Verify every assumption with a concrete tool call (Read, Grep, Glob, or a CLI invocation) before acting on it. Do not infer file state from memory or prior context.
146
-
147
- ## Pipeline Invocations
148
-
149
- - **Pre-invoke MuninnDB recall.** Before planning or making a non-trivial decision, recall relevant prior patterns, decisions, and pitfalls from the repo vault AND the `default` vault. Merge by score and surface the top matches in your reasoning.