@alecsibilia/luca 13.0.0-alpha.1
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.
- package/LICENSE +201 -0
- package/README.md +47 -0
- package/bin/luca.js +3 -0
- package/dist/chunks/branch.mjs +47 -0
- package/dist/chunks/bun-runtime.mjs +46 -0
- package/dist/chunks/checks.mjs +53 -0
- package/dist/chunks/claim-verify.mjs +465 -0
- package/dist/chunks/classify.mjs +105 -0
- package/dist/chunks/confidence.mjs +199 -0
- package/dist/chunks/doctor.mjs +158 -0
- package/dist/chunks/hook.mjs +696 -0
- package/dist/chunks/init.mjs +715 -0
- package/dist/chunks/muninndb-health.mjs +66 -0
- package/dist/chunks/phase.mjs +38 -0
- package/dist/chunks/pr-review.mjs +122 -0
- package/dist/chunks/preferences.mjs +61 -0
- package/dist/chunks/repair.mjs +111 -0
- package/dist/chunks/repo.mjs +58 -0
- package/dist/chunks/retro.mjs +86 -0
- package/dist/chunks/roadmap.mjs +58 -0
- package/dist/chunks/rules.mjs +527 -0
- package/dist/chunks/stale-mcp-server.mjs +90 -0
- package/dist/chunks/state.mjs +57 -0
- package/dist/chunks/stray-local-install.mjs +200 -0
- package/dist/chunks/telemetry.mjs +165 -0
- package/dist/chunks/todo.mjs +151 -0
- package/dist/chunks/vault-init.mjs +300 -0
- package/dist/chunks/verification.mjs +95 -0
- package/dist/chunks/version.mjs +70 -0
- package/dist/chunks/workflow.mjs +47 -0
- package/dist/claude/.claude/agents/architect.md +410 -0
- package/dist/claude/.claude/agents/build.md +111 -0
- package/dist/claude/.claude/agents/discuss.md +93 -0
- package/dist/claude/.claude/agents/discussion.md +149 -0
- package/dist/claude/.claude/agents/execute.md +416 -0
- package/dist/claude/.claude/agents/executor.md +161 -0
- package/dist/claude/.claude/agents/fast.md +84 -0
- package/dist/claude/.claude/agents/finalize.md +484 -0
- package/dist/claude/.claude/agents/learner.md +160 -0
- package/dist/claude/.claude/agents/plan-reviewer.md +129 -0
- package/dist/claude/.claude/agents/plan.md +96 -0
- package/dist/claude/.claude/agents/research.md +327 -0
- package/dist/claude/.claude/agents/researcher.md +78 -0
- package/dist/claude/.claude/agents/review.md +283 -0
- package/dist/claude/.claude/agents/reviewer.md +163 -0
- package/dist/claude/.claude/agents/shadow-scanner.md +257 -0
- package/dist/claude/.claude/agents/triage.md +230 -0
- package/dist/claude/.claude/agents/verifier.md +131 -0
- package/dist/claude/.claude/commands/bug-diagnose.md +12 -0
- package/dist/claude/.claude/commands/gh-issue-triage.md +14 -0
- package/dist/claude/.claude/commands/gh-pr-address.md +235 -0
- package/dist/claude/.claude/commands/gh-prepare.md +12 -0
- package/dist/claude/.claude/commands/grill-me.md +12 -0
- package/dist/claude/.claude/commands/lu-review.md +51 -0
- package/dist/claude/.claude/commands/lu.md +75 -0
- package/dist/claude/.claude/commands/luca-init.md +14 -0
- package/dist/claude/.claude/commands/luca-telemetry-report.md +12 -0
- package/dist/claude/.claude/commands/memory-audit.md +12 -0
- package/dist/claude/.claude/commands/milestone-new.md +122 -0
- package/dist/claude/.claude/commands/phase-discuss.md +45 -0
- package/dist/claude/.claude/commands/phase-execute.md +39 -0
- package/dist/claude/.claude/commands/phase-plan.md +53 -0
- package/dist/claude/.claude/commands/repo-cleanup.md +80 -0
- package/dist/claude/.claude/commands/todo-add.md +28 -0
- package/dist/claude/.claude/commands/todo-check.md +36 -0
- package/dist/claude/.claude/hooks/context-refresher.ts +285 -0
- package/dist/claude/.claude/hooks/continuation-messages.ts +215 -0
- package/dist/claude/.claude/hooks/pipeline-guard.ts +182 -0
- package/dist/claude/.claude/settings.json +41 -0
- package/dist/claude/skills/arch-audit/SKILL.md +161 -0
- package/dist/claude/skills/autopilot/SKILL.md +1299 -0
- package/dist/claude/skills/bug-diagnose/SKILL.md +102 -0
- package/dist/claude/skills/choose/SKILL.md +124 -0
- package/dist/claude/skills/gh-issue-triage/SKILL.md +97 -0
- package/dist/claude/skills/gh-pr-address/SKILL.md +235 -0
- package/dist/claude/skills/gh-prepare/SKILL.md +209 -0
- package/dist/claude/skills/grill-me/SKILL.md +46 -0
- package/dist/claude/skills/lu/SKILL.md +112 -0
- package/dist/claude/skills/lu-review/SKILL.md +51 -0
- package/dist/claude/skills/luca-init/SKILL.md +91 -0
- package/dist/claude/skills/luca-telemetry-report/SKILL.md +145 -0
- package/dist/claude/skills/luca-write-surface/SKILL.md +213 -0
- package/dist/claude/skills/memory-audit/SKILL.md +217 -0
- package/dist/claude/skills/milestone-audit/SKILL.md +545 -0
- package/dist/claude/skills/milestone-complete/SKILL.md +168 -0
- package/dist/claude/skills/milestone-gaps/SKILL.md +60 -0
- package/dist/claude/skills/milestone-new/SKILL.md +125 -0
- package/dist/claude/skills/note/SKILL.md +162 -0
- package/dist/claude/skills/phase-add/SKILL.md +91 -0
- package/dist/claude/skills/phase-assumptions/SKILL.md +92 -0
- package/dist/claude/skills/phase-discuss/SKILL.md +165 -0
- package/dist/claude/skills/phase-execute/SKILL.md +1786 -0
- package/dist/claude/skills/phase-insert/SKILL.md +100 -0
- package/dist/claude/skills/phase-plan/SKILL.md +461 -0
- package/dist/claude/skills/phase-remove/SKILL.md +113 -0
- package/dist/claude/skills/phase-research/SKILL.md +80 -0
- package/dist/claude/skills/post-init-tour/SKILL.md +58 -0
- package/dist/claude/skills/progress/SKILL.md +271 -0
- package/dist/claude/skills/project-new/SKILL.md +609 -0
- package/dist/claude/skills/quick/SKILL.md +256 -0
- package/dist/claude/skills/rename-audit/SKILL.md +52 -0
- package/dist/claude/skills/repo-audit/SKILL.md +88 -0
- package/dist/claude/skills/repo-cleanup/SKILL.md +80 -0
- package/dist/claude/skills/seed-memory/SKILL.md +235 -0
- package/dist/claude/skills/session-pause/SKILL.md +126 -0
- package/dist/claude/skills/session-plan/SKILL.md +112 -0
- package/dist/claude/skills/session-resume/SKILL.md +75 -0
- package/dist/claude/skills/todo-add/SKILL.md +85 -0
- package/dist/claude/skills/todo-check/SKILL.md +77 -0
- package/dist/claude/skills/workflow-save/SKILL.md +277 -0
- package/dist/index.d.mts +33 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.mjs +69 -0
- package/dist/shared/luca.B3Mimc0P.mjs +52 -0
- package/dist/shared/luca.B3saVjJm.mjs +163 -0
- package/dist/shared/luca.BYdjkfnz.mjs +217 -0
- package/dist/shared/luca.BmhNkYe2.mjs +56 -0
- package/dist/shared/luca.C4gMUoBd.mjs +358 -0
- package/dist/shared/luca.CQ3g1xrD.mjs +19 -0
- package/dist/shared/luca.CRmaAfXR.mjs +713 -0
- package/dist/shared/luca.CrXzXueR.mjs +57 -0
- package/dist/shared/luca.DTomPq7I.mjs +91 -0
- package/dist/shared/luca.DjDTeDCi.mjs +1904 -0
- package/dist/shared/luca.HZxBTBgD.mjs +201 -0
- package/dist/shared/luca.TSMg1t7I.mjs +10 -0
- package/dist/shared/luca.dM-MKlNE.mjs +25 -0
- package/dist/shared/luca.naWEcQ4B.mjs +7 -0
- package/package.json +76 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { w as lucaStateSchemaTolerant, x as PhaseSlugSchema } from './luca.CRmaAfXR.mjs';
|
|
5
|
+
|
|
6
|
+
async function loadCurrentState(opts) {
|
|
7
|
+
const statePath = join(opts.cwd, ".luca", "state.json");
|
|
8
|
+
if (!existsSync(statePath)) {
|
|
9
|
+
return lucaStateSchemaTolerant.parse({});
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
const raw = JSON.parse(await readFile(statePath, "utf-8"));
|
|
13
|
+
const result = lucaStateSchemaTolerant.safeParse(raw);
|
|
14
|
+
if (!result.success) {
|
|
15
|
+
return lucaStateSchemaTolerant.parse({});
|
|
16
|
+
}
|
|
17
|
+
return result.data;
|
|
18
|
+
} catch {
|
|
19
|
+
return lucaStateSchemaTolerant.parse({});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function kebabCase(s) {
|
|
24
|
+
return s.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
25
|
+
}
|
|
26
|
+
function resolveActiveSlug(state) {
|
|
27
|
+
if (state.currentPhase === 0) {
|
|
28
|
+
return {
|
|
29
|
+
ok: false,
|
|
30
|
+
error: "no active phase (currentPhase=0). Advance the roadmap before writing phase artifacts."
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
if (state.currentPhase < 1 || state.currentPhase > 99) {
|
|
34
|
+
return {
|
|
35
|
+
ok: false,
|
|
36
|
+
error: `currentPhase=${state.currentPhase} is out of range (1\u201399).`
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const entry = state.roadmap[state.currentPhase - 1];
|
|
40
|
+
if (!entry) {
|
|
41
|
+
return {
|
|
42
|
+
ok: false,
|
|
43
|
+
error: `currentPhase=${state.currentPhase} has no matching roadmap entry. Update state.roadmap first.`
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const NN = String(state.currentPhase).padStart(2, "0");
|
|
47
|
+
const slug = `${NN}-${kebabCase(entry.name)}`;
|
|
48
|
+
if (!PhaseSlugSchema.safeParse(slug).success) {
|
|
49
|
+
return {
|
|
50
|
+
ok: false,
|
|
51
|
+
error: `roadmap entry name "${entry.name}" produced an invalid phase slug "${slug}". The name must contain at least one letter/digit so it slugifies to <NN-kebab-case>.`
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return { ok: true, NN, slug };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { loadCurrentState as l, resolveActiveSlug as r };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { homedir } from 'node:os';
|
|
2
|
+
import * as p from '@clack/prompts';
|
|
3
|
+
import semver from 'semver';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
|
|
6
|
+
const MIN_BUN_VERSION = "1.0.0";
|
|
7
|
+
const BunPrerequisiteSchema = z.object({
|
|
8
|
+
/** Whether the Bun runtime is detected in the current environment. */
|
|
9
|
+
installed: z.boolean(),
|
|
10
|
+
/** Bun version string (e.g. "1.1.38"), or null if not installed. */
|
|
11
|
+
version: z.string().nullable(),
|
|
12
|
+
/** Absolute path to the Bun binary, or null if not found. */
|
|
13
|
+
path: z.string().nullable(),
|
|
14
|
+
/** Whether the installed version meets the minimum requirement. */
|
|
15
|
+
meetsMinimum: z.boolean()
|
|
16
|
+
});
|
|
17
|
+
const PlatformInfoSchema = z.object({
|
|
18
|
+
/** Operating system identifier (e.g. "darwin", "linux", "win32"). */
|
|
19
|
+
os: z.string(),
|
|
20
|
+
/** CPU architecture (e.g. "arm64", "x64"). */
|
|
21
|
+
arch: z.string(),
|
|
22
|
+
/** Absolute path to the user's home directory. */
|
|
23
|
+
homeDir: z.string()
|
|
24
|
+
});
|
|
25
|
+
const PrerequisiteResultSchema = z.object({
|
|
26
|
+
/** Whether all prerequisite checks passed. */
|
|
27
|
+
ok: z.boolean(),
|
|
28
|
+
/** Bun runtime check result. */
|
|
29
|
+
bun: BunPrerequisiteSchema,
|
|
30
|
+
/** Platform information. */
|
|
31
|
+
platform: PlatformInfoSchema
|
|
32
|
+
});
|
|
33
|
+
function checkBunPrerequisite() {
|
|
34
|
+
const installed = typeof Bun !== "undefined";
|
|
35
|
+
if (!installed) {
|
|
36
|
+
return BunPrerequisiteSchema.parse({
|
|
37
|
+
installed: false,
|
|
38
|
+
version: null,
|
|
39
|
+
path: null,
|
|
40
|
+
meetsMinimum: false
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const version = Bun.version;
|
|
44
|
+
const bunPath = Bun.which("bun");
|
|
45
|
+
const meetsMinimum = semver.gte(version, MIN_BUN_VERSION);
|
|
46
|
+
return BunPrerequisiteSchema.parse({
|
|
47
|
+
installed: true,
|
|
48
|
+
version,
|
|
49
|
+
path: bunPath,
|
|
50
|
+
meetsMinimum
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function checkPlatform() {
|
|
54
|
+
return PlatformInfoSchema.parse({
|
|
55
|
+
os: process.platform,
|
|
56
|
+
arch: process.arch,
|
|
57
|
+
homeDir: homedir()
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function checkPrerequisites() {
|
|
61
|
+
const bun = checkBunPrerequisite();
|
|
62
|
+
const platform = checkPlatform();
|
|
63
|
+
return PrerequisiteResultSchema.parse({
|
|
64
|
+
ok: bun.installed && bun.meetsMinimum,
|
|
65
|
+
bun,
|
|
66
|
+
platform
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
async function promptBunInstall() {
|
|
70
|
+
p.note(
|
|
71
|
+
[
|
|
72
|
+
"Luca requires Bun (https://bun.sh) version 1.0.0 or later.",
|
|
73
|
+
"",
|
|
74
|
+
"Install Bun with:",
|
|
75
|
+
" curl -fsSL https://bun.sh/install | bash",
|
|
76
|
+
"",
|
|
77
|
+
"Or visit: https://bun.sh/docs/installation"
|
|
78
|
+
].join("\n"),
|
|
79
|
+
"Bun Not Found"
|
|
80
|
+
);
|
|
81
|
+
const shouldContinue = await p.confirm({
|
|
82
|
+
message: "Continue after installing Bun?",
|
|
83
|
+
initialValue: false
|
|
84
|
+
});
|
|
85
|
+
if (p.isCancel(shouldContinue)) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
return shouldContinue === true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { checkPlatform as a, checkPrerequisites as c, promptBunInstall as p };
|