lean-os 0.1.0
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/README.md +15 -0
- package/dist/commands/ai.d.ts +1 -0
- package/dist/commands/ai.js +54 -0
- package/dist/commands/ai.js.map +1 -0
- package/dist/generators/file-writer.d.ts +5 -0
- package/dist/generators/file-writer.js +13 -0
- package/dist/generators/file-writer.js.map +1 -0
- package/dist/generators/workspace-generator.d.ts +5 -0
- package/dist/generators/workspace-generator.js +24 -0
- package/dist/generators/workspace-generator.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/ai-prompts.d.ts +18 -0
- package/dist/prompts/ai-prompts.js +167 -0
- package/dist/prompts/ai-prompts.js.map +1 -0
- package/dist/templates/workspace-template.d.ts +18 -0
- package/dist/templates/workspace-template.js +628 -0
- package/dist/templates/workspace-template.js.map +1 -0
- package/dist/ui/banner.d.ts +1 -0
- package/dist/ui/banner.js +20 -0
- package/dist/ui/banner.js.map +1 -0
- package/dist/ui/outro.d.ts +3 -0
- package/dist/ui/outro.js +61 -0
- package/dist/ui/outro.js.map +1 -0
- package/dist/utils/paths.d.ts +1 -0
- package/dist/utils/paths.js +13 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/slugify.d.ts +1 -0
- package/dist/utils/slugify.js +10 -0
- package/dist/utils/slugify.js.map +1 -0
- package/dist/utils/yaml.d.ts +1 -0
- package/dist/utils/yaml.js +7 -0
- package/dist/utils/yaml.js.map +1 -0
- package/package.json +32 -0
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# LeanOS CLI
|
|
2
|
+
|
|
3
|
+
LeanOS is an agent-native startup operating system for AI-first products.
|
|
4
|
+
|
|
5
|
+
Run:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx lean-os ai
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The CLI creates the initial LeanOS workspace. After setup, open your editor chat and type:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
/init leanos
|
|
15
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function runAiCommand(): Promise<void>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { cancel, confirm, isCancel, note, outro } from "@clack/prompts";
|
|
2
|
+
import pc from "picocolors";
|
|
3
|
+
import { runAiPrompts } from "../prompts/ai-prompts.js";
|
|
4
|
+
import { printBanner } from "../ui/banner.js";
|
|
5
|
+
import { printCreatedWorkspaceOutro, printComingSoonOutro } from "../ui/outro.js";
|
|
6
|
+
import { workspaceExists } from "../utils/paths.js";
|
|
7
|
+
import { generateWorkspace } from "../generators/workspace-generator.js";
|
|
8
|
+
export async function runAiCommand() {
|
|
9
|
+
printBanner();
|
|
10
|
+
note([
|
|
11
|
+
"LeanOS will create an agent-native startup workspace for your AI-first product.",
|
|
12
|
+
"",
|
|
13
|
+
"The CLI only collects the basics.",
|
|
14
|
+
"Your LeanOS Agent will continue the strategy, MVP, roadmap and execution workflow inside your editor chat."
|
|
15
|
+
].join("\n"), "Welcome");
|
|
16
|
+
const promptResult = await runAiPrompts();
|
|
17
|
+
if (promptResult.status === "cancelled") {
|
|
18
|
+
cancel("LeanOS setup cancelled.");
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (promptResult.status === "exit") {
|
|
22
|
+
outro("No workspace created. Come back when you are ready.");
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (promptResult.status === "coming-soon") {
|
|
26
|
+
printComingSoonOutro(promptResult.label);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (await workspaceExists(process.cwd())) {
|
|
30
|
+
const overwrite = await confirm({
|
|
31
|
+
message: "A leanos.yaml file already exists here. Overwrite the LeanOS workspace files?",
|
|
32
|
+
initialValue: false
|
|
33
|
+
});
|
|
34
|
+
if (isCancel(overwrite)) {
|
|
35
|
+
cancel("LeanOS setup cancelled.");
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (!overwrite) {
|
|
39
|
+
outro("No files changed. Existing LeanOS workspace was left untouched.");
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
const result = await generateWorkspace(process.cwd(), promptResult.answers);
|
|
45
|
+
printCreatedWorkspaceOutro(promptResult.answers, result.createdGroups);
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
49
|
+
console.error(pc.red("Could not create the LeanOS workspace."));
|
|
50
|
+
console.error(pc.dim(message));
|
|
51
|
+
process.exitCode = 1;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=ai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../src/commands/ai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,WAAW,EAAE,CAAC;IAEd,IAAI,CACF;QACE,iFAAiF;QACjF,EAAE;QACF,mCAAmC;QACnC,4GAA4G;KAC7G,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ,SAAS,CACV,CAAC;IAEF,MAAM,YAAY,GAAG,MAAM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O,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
export async function writeWorkspaceFiles(rootDir, files) {
|
|
4
|
+
for (const file of files) {
|
|
5
|
+
const targetPath = join(rootDir, file.path);
|
|
6
|
+
await mkdir(dirname(targetPath), { recursive: true });
|
|
7
|
+
await writeFile(targetPath, ensureTrailingNewline(file.content), "utf8");
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function ensureTrailingNewline(content) {
|
|
11
|
+
return content.endsWith("\n") ? content : `${content}\n`;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=file-writer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-writer.js","sourceRoot":"","sources":["../../src/generators/file-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAO1C,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,OAAe,EAAE,KAAkB;IAC3E,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACtD,MAAM,SAAS,CAAC,UAAU,EAAE,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC;AAED,SAAS,qBAAqB,CAAC,OAAe;IAC5C,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WorkspaceAnswers } from "../templates/workspace-template.js";
|
|
2
|
+
export type WorkspaceGenerationResult = {
|
|
3
|
+
createdGroups: string[];
|
|
4
|
+
};
|
|
5
|
+
export declare function generateWorkspace(rootDir: string, answers: WorkspaceAnswers): Promise<WorkspaceGenerationResult>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createWorkspaceFiles } from "../templates/workspace-template.js";
|
|
2
|
+
import { writeWorkspaceFiles } from "./file-writer.js";
|
|
3
|
+
export async function generateWorkspace(rootDir, answers) {
|
|
4
|
+
const files = createWorkspaceFiles(answers);
|
|
5
|
+
await writeWorkspaceFiles(rootDir, files);
|
|
6
|
+
return {
|
|
7
|
+
createdGroups: [
|
|
8
|
+
"leanos.yaml",
|
|
9
|
+
".leanos/agent",
|
|
10
|
+
".leanos/commands",
|
|
11
|
+
".leanos/skills",
|
|
12
|
+
".leanos/playbooks",
|
|
13
|
+
"company/",
|
|
14
|
+
"product/",
|
|
15
|
+
"validation/",
|
|
16
|
+
"mvp/",
|
|
17
|
+
"roadmap/",
|
|
18
|
+
"architecture/",
|
|
19
|
+
"growth/",
|
|
20
|
+
".github/"
|
|
21
|
+
]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=workspace-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-generator.js","sourceRoot":"","sources":["../../src/generators/workspace-generator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAAe,EAAE,OAAyB;IAChF,MAAM,KAAK,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAE1C,OAAO;QACL,aAAa,EAAE;YACb,aAAa;YACb,eAAe;YACf,kBAAkB;YAClB,gBAAgB;YAChB,mBAAmB;YACnB,UAAU;YACV,UAAU;YACV,aAAa;YACb,MAAM;YACN,UAAU;YACV,eAAe;YACf,SAAS;YACT,UAAU;SACX;KACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import pc from "picocolors";
|
|
3
|
+
import { runAiCommand } from "./commands/ai.js";
|
|
4
|
+
const [command] = process.argv.slice(2);
|
|
5
|
+
async function main() {
|
|
6
|
+
if (!command || command === "--help" || command === "-h") {
|
|
7
|
+
showHelp();
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (command === "ai") {
|
|
11
|
+
await runAiCommand();
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
console.log(pc.red(`Unknown command: ${command}`));
|
|
15
|
+
showHelp();
|
|
16
|
+
process.exitCode = 1;
|
|
17
|
+
}
|
|
18
|
+
function showHelp() {
|
|
19
|
+
console.log(`
|
|
20
|
+
${pc.bold("LeanOS CLI")}
|
|
21
|
+
|
|
22
|
+
Usage:
|
|
23
|
+
leanos ai
|
|
24
|
+
|
|
25
|
+
Commands:
|
|
26
|
+
ai Create an agent-native LeanOS startup workspace
|
|
27
|
+
`);
|
|
28
|
+
}
|
|
29
|
+
main().catch((error) => {
|
|
30
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
31
|
+
console.error(pc.red("LeanOS failed to run."));
|
|
32
|
+
console.error(pc.dim(message));
|
|
33
|
+
process.exitCode = 1;
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=index.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,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WorkspaceAnswers } from "../templates/workspace-template.js";
|
|
2
|
+
type CancelledResult = {
|
|
3
|
+
status: "cancelled";
|
|
4
|
+
};
|
|
5
|
+
type ExitResult = {
|
|
6
|
+
status: "exit";
|
|
7
|
+
};
|
|
8
|
+
type ComingSoonResult = {
|
|
9
|
+
status: "coming-soon";
|
|
10
|
+
label: string;
|
|
11
|
+
};
|
|
12
|
+
type CreateWorkspaceResult = {
|
|
13
|
+
status: "create-workspace";
|
|
14
|
+
answers: WorkspaceAnswers;
|
|
15
|
+
};
|
|
16
|
+
export type AiPromptResult = CancelledResult | ExitResult | ComingSoonResult | CreateWorkspaceResult;
|
|
17
|
+
export declare function runAiPrompts(): Promise<AiPromptResult>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { confirm, isCancel, multiselect, select, text } from "@clack/prompts";
|
|
2
|
+
const productStatusLabels = {
|
|
3
|
+
"new-product": "New product / idea",
|
|
4
|
+
"existing-product": "Existing product",
|
|
5
|
+
"codebase-without-strategy": "Existing codebase, but no clear product strategy yet"
|
|
6
|
+
};
|
|
7
|
+
const productTypeLabels = {
|
|
8
|
+
"b2b-saas": "B2B SaaS",
|
|
9
|
+
"b2c-app": "B2C app",
|
|
10
|
+
"ai-agent-product": "AI agent product",
|
|
11
|
+
"developer-tool": "Developer tool",
|
|
12
|
+
marketplace: "Marketplace",
|
|
13
|
+
"internal-tool": "Internal tool",
|
|
14
|
+
"api-product": "API product",
|
|
15
|
+
"not-sure": "Not sure yet"
|
|
16
|
+
};
|
|
17
|
+
const stageLabels = {
|
|
18
|
+
idea: "Idea only",
|
|
19
|
+
"researching-problem": "Researching the problem",
|
|
20
|
+
"designing-mvp": "Designing MVP",
|
|
21
|
+
"building-mvp": "Building MVP",
|
|
22
|
+
"mvp-launched": "MVP launched",
|
|
23
|
+
"existing-product-with-users": "Existing product with users",
|
|
24
|
+
scaling: "Scaling"
|
|
25
|
+
};
|
|
26
|
+
const modeLabels = {
|
|
27
|
+
"solo-founder": "Solo founder",
|
|
28
|
+
"founder-plus-ai-agents": "Founder + AI agents",
|
|
29
|
+
"small-team": "Small team",
|
|
30
|
+
"existing-startup-team": "Existing startup team",
|
|
31
|
+
"internal-innovation-team": "Internal corporate innovation team"
|
|
32
|
+
};
|
|
33
|
+
const departmentLabels = {
|
|
34
|
+
product: "Product",
|
|
35
|
+
validation: "Validation",
|
|
36
|
+
engineering: "Engineering",
|
|
37
|
+
design: "Design",
|
|
38
|
+
growth: "Growth",
|
|
39
|
+
sales: "Sales",
|
|
40
|
+
"customer-success": "Customer Success",
|
|
41
|
+
finance: "Finance",
|
|
42
|
+
"legal-compliance": "Legal / Compliance"
|
|
43
|
+
};
|
|
44
|
+
const defaultDepartments = ["product", "validation", "engineering", "design", "growth"];
|
|
45
|
+
export async function runAiPrompts() {
|
|
46
|
+
const action = await select({
|
|
47
|
+
message: "What do you want to do?",
|
|
48
|
+
options: [
|
|
49
|
+
{ value: "create", label: "Create a new LeanOS workspace" },
|
|
50
|
+
{ value: "connect", label: "Connect LeanOS to an existing project" },
|
|
51
|
+
{ value: "install-agent", label: "Install LeanOS Agent files in this repo" },
|
|
52
|
+
{ value: "exit", label: "Exit" }
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
if (isCancel(action))
|
|
56
|
+
return { status: "cancelled" };
|
|
57
|
+
if (action === "exit")
|
|
58
|
+
return { status: "exit" };
|
|
59
|
+
if (action === "connect")
|
|
60
|
+
return { status: "coming-soon", label: "Connect LeanOS to an existing project" };
|
|
61
|
+
if (action === "install-agent")
|
|
62
|
+
return { status: "coming-soon", label: "Install LeanOS Agent files in this repo" };
|
|
63
|
+
const companyName = await text({
|
|
64
|
+
message: "Company or startup name",
|
|
65
|
+
validate: required
|
|
66
|
+
});
|
|
67
|
+
if (isCancel(companyName))
|
|
68
|
+
return { status: "cancelled" };
|
|
69
|
+
const productNameInput = await text({
|
|
70
|
+
message: "Product name",
|
|
71
|
+
placeholder: String(companyName)
|
|
72
|
+
});
|
|
73
|
+
if (isCancel(productNameInput))
|
|
74
|
+
return { status: "cancelled" };
|
|
75
|
+
const productStatus = await select({
|
|
76
|
+
message: "New product or existing product?",
|
|
77
|
+
options: toOptions(productStatusLabels)
|
|
78
|
+
});
|
|
79
|
+
if (isCancel(productStatus))
|
|
80
|
+
return { status: "cancelled" };
|
|
81
|
+
const productType = await select({
|
|
82
|
+
message: "Product type",
|
|
83
|
+
options: toOptions(productTypeLabels)
|
|
84
|
+
});
|
|
85
|
+
if (isCancel(productType))
|
|
86
|
+
return { status: "cancelled" };
|
|
87
|
+
const description = await text({
|
|
88
|
+
message: "Short product description",
|
|
89
|
+
validate: required
|
|
90
|
+
});
|
|
91
|
+
if (isCancel(description))
|
|
92
|
+
return { status: "cancelled" };
|
|
93
|
+
const targetUser = await text({
|
|
94
|
+
message: "Primary user or customer",
|
|
95
|
+
placeholder: "Not sure yet",
|
|
96
|
+
validate: required
|
|
97
|
+
});
|
|
98
|
+
if (isCancel(targetUser))
|
|
99
|
+
return { status: "cancelled" };
|
|
100
|
+
const stage = await select({
|
|
101
|
+
message: "Current stage",
|
|
102
|
+
options: toOptions(stageLabels)
|
|
103
|
+
});
|
|
104
|
+
if (isCancel(stage))
|
|
105
|
+
return { status: "cancelled" };
|
|
106
|
+
const mode = await select({
|
|
107
|
+
message: "Operating mode",
|
|
108
|
+
options: toOptions(modeLabels)
|
|
109
|
+
});
|
|
110
|
+
if (isCancel(mode))
|
|
111
|
+
return { status: "cancelled" };
|
|
112
|
+
const departments = await multiselect({
|
|
113
|
+
message: "Active departments",
|
|
114
|
+
options: toOptions(departmentLabels),
|
|
115
|
+
initialValues: defaultDepartments,
|
|
116
|
+
required: true
|
|
117
|
+
});
|
|
118
|
+
if (isCancel(departments))
|
|
119
|
+
return { status: "cancelled" };
|
|
120
|
+
const answers = {
|
|
121
|
+
companyName: String(companyName).trim(),
|
|
122
|
+
productName: String(productNameInput).trim() || String(companyName).trim(),
|
|
123
|
+
productStatus: productStatus,
|
|
124
|
+
productType: productType,
|
|
125
|
+
description: String(description).trim(),
|
|
126
|
+
targetUser: String(targetUser).trim(),
|
|
127
|
+
stage: stage,
|
|
128
|
+
mode: mode,
|
|
129
|
+
departments: departments
|
|
130
|
+
};
|
|
131
|
+
const shouldCreate = await confirm({
|
|
132
|
+
message: `${formatSummary(answers)}\n\nCreate workspace?`,
|
|
133
|
+
initialValue: true
|
|
134
|
+
});
|
|
135
|
+
if (isCancel(shouldCreate))
|
|
136
|
+
return { status: "cancelled" };
|
|
137
|
+
if (!shouldCreate)
|
|
138
|
+
return { status: "exit" };
|
|
139
|
+
return {
|
|
140
|
+
status: "create-workspace",
|
|
141
|
+
answers
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function required(value) {
|
|
145
|
+
if (!value.trim()) {
|
|
146
|
+
return "This field is required.";
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function toOptions(labels) {
|
|
150
|
+
return Object.entries(labels).map(([value, label]) => ({
|
|
151
|
+
value: value,
|
|
152
|
+
label: label
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
function formatSummary(answers) {
|
|
156
|
+
return [
|
|
157
|
+
"LeanOS workspace summary:",
|
|
158
|
+
"",
|
|
159
|
+
`Company: ${answers.companyName}`,
|
|
160
|
+
`Product: ${answers.productName}`,
|
|
161
|
+
`Type: ${productTypeLabels[answers.productType]}`,
|
|
162
|
+
`Stage: ${stageLabels[answers.stage]}`,
|
|
163
|
+
`Mode: ${modeLabels[answers.mode]}`,
|
|
164
|
+
`Departments: ${answers.departments.map((department) => departmentLabels[department]).join(", ")}`
|
|
165
|
+
].join("\n");
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=ai-prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-prompts.js","sourceRoot":"","sources":["../../src/prompts/ai-prompts.ts"],"names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B,CAAC;IACnC,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAwB,MAA8B;IACtE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;QACrD,KAAK,EAAE,KAAe;QACtB,KAAK,EAAE,KAAe;KACvB,CAAC,CAAC,CAAC;AACN,CAAC;AAED,SAAS,aAAa,CAAC,OAAyB;IAC9C,OAAO;QACL,2BAA2B;QAC3B,EAAE;QACF,YAAY,OAAO,CAAC,WAAW,EAAE;QACjC,YAAY,OAAO,CAAC,WAAW,EAAE;QACjC,SAAS,iBAAiB,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QACjD,UAAU,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACtC,SAAS,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnC,gBAAgB,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;KACnG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FileEntry } from "../generators/file-writer.js";
|
|
2
|
+
export type ProductStatus = "new-product" | "existing-product" | "codebase-without-strategy";
|
|
3
|
+
export type ProductType = "b2b-saas" | "b2c-app" | "ai-agent-product" | "developer-tool" | "marketplace" | "internal-tool" | "api-product" | "not-sure";
|
|
4
|
+
export type ProductStage = "idea" | "researching-problem" | "designing-mvp" | "building-mvp" | "mvp-launched" | "existing-product-with-users" | "scaling";
|
|
5
|
+
export type OperatingMode = "solo-founder" | "founder-plus-ai-agents" | "small-team" | "existing-startup-team" | "internal-innovation-team";
|
|
6
|
+
export type Department = "product" | "validation" | "engineering" | "design" | "growth" | "sales" | "customer-success" | "finance" | "legal-compliance";
|
|
7
|
+
export type WorkspaceAnswers = {
|
|
8
|
+
companyName: string;
|
|
9
|
+
productName: string;
|
|
10
|
+
productStatus: ProductStatus;
|
|
11
|
+
productType: ProductType;
|
|
12
|
+
description: string;
|
|
13
|
+
targetUser: string;
|
|
14
|
+
stage: ProductStage;
|
|
15
|
+
mode: OperatingMode;
|
|
16
|
+
departments: Department[];
|
|
17
|
+
};
|
|
18
|
+
export declare function createWorkspaceFiles(answers: WorkspaceAnswers): FileEntry[];
|
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
import { stringifyYaml } from "../utils/yaml.js";
|
|
2
|
+
const installedSkills = [
|
|
3
|
+
"define-company",
|
|
4
|
+
"define-product",
|
|
5
|
+
"define-icp",
|
|
6
|
+
"define-value-proposition",
|
|
7
|
+
"define-mvp-scope",
|
|
8
|
+
"create-roadmap",
|
|
9
|
+
"create-github-issues",
|
|
10
|
+
"check-coherence",
|
|
11
|
+
"review-pr"
|
|
12
|
+
];
|
|
13
|
+
export function createWorkspaceFiles(answers) {
|
|
14
|
+
return [
|
|
15
|
+
{ path: "leanos.yaml", content: createLeanOsYaml(answers) },
|
|
16
|
+
{ path: "README.md", content: workspaceReadme(answers) },
|
|
17
|
+
{ path: ".leanos/agent/agent.md", content: agentProfile(answers) },
|
|
18
|
+
{ path: ".leanos/agent/operating-rules.md", content: operatingRules() },
|
|
19
|
+
{ path: ".leanos/agent/context-loading.md", content: contextLoading() },
|
|
20
|
+
...commandFiles(),
|
|
21
|
+
...skillFiles(),
|
|
22
|
+
{ path: ".leanos/skills/custom/README.md", content: customSkillsReadme() },
|
|
23
|
+
{ path: ".leanos/playbooks/active/new-product-mvp-validation.playbook.md", content: activePlaybook() },
|
|
24
|
+
{ path: ".leanos/context/workspace-summary.md", content: workspaceSummary(answers) },
|
|
25
|
+
{ path: ".leanos/context/active-playbook.md", content: activePlaybookContext() },
|
|
26
|
+
{ path: ".leanos/context/next-actions.md", content: nextActions() },
|
|
27
|
+
{ path: "company/profile.md", content: companyProfile(answers) },
|
|
28
|
+
{ path: "company/mission.md", content: titledDraft("Mission", "Define why the company exists and who it serves.") },
|
|
29
|
+
{ path: "company/vision.md", content: titledDraft("Vision", "Describe the future state this company wants to create.") },
|
|
30
|
+
{ path: "company/principles.md", content: titledDraft("Principles", "Capture operating principles that should guide product and company decisions.") },
|
|
31
|
+
{ path: "company/decision-log.md", content: decisionLog() },
|
|
32
|
+
{ path: "product/brief.md", content: productBrief(answers) },
|
|
33
|
+
{ path: "product/problem.md", content: titledDraft("Problem", "Define the painful, frequent, valuable problem this product solves.") },
|
|
34
|
+
{ path: "product/icp.md", content: titledDraft("Ideal Customer Profile", "Define the specific customer segment the MVP should serve first.") },
|
|
35
|
+
{ path: "product/value-proposition.md", content: titledDraft("Value Proposition", "Explain the outcome, benefit, and reason to believe for the target customer.") },
|
|
36
|
+
{ path: "product/business-model-canvas.md", content: titledDraft("Business Model Canvas", "Define customers, channels, value, revenue, costs, partners, and key activities.") },
|
|
37
|
+
{ path: "validation/assumptions.md", content: titledDraft("Assumptions", "List the riskiest assumptions behind the company, product, customer, and MVP.") },
|
|
38
|
+
{ path: "validation/experiments.md", content: titledDraft("Experiments", "Plan validation experiments that test assumptions before overbuilding.") },
|
|
39
|
+
{ path: "validation/interview-script.md", content: titledDraft("Interview Script", "Prepare discovery questions for customer interviews.") },
|
|
40
|
+
{ path: "validation/success-metrics.md", content: titledDraft("Success Metrics", "Define signals that prove the product is moving toward validation.") },
|
|
41
|
+
{ path: "validation/learning-log.md", content: learningLog() },
|
|
42
|
+
{ path: "mvp/scope.md", content: titledDraft("MVP Scope", "Define the smallest coherent product scope needed to validate the core value proposition.") },
|
|
43
|
+
{ path: "mvp/user-stories.md", content: titledDraft("User Stories", "Capture user stories for the MVP in priority order.") },
|
|
44
|
+
{ path: "mvp/acceptance-criteria.md", content: titledDraft("Acceptance Criteria", "Define what must be true for MVP work to be accepted.") },
|
|
45
|
+
{ path: "mvp/non-goals.md", content: titledDraft("Non-Goals", "List what the MVP intentionally will not include.") },
|
|
46
|
+
{ path: "roadmap/roadmap.md", content: titledDraft("Roadmap", "Sequence product work by validation cycle and strategic priority.") },
|
|
47
|
+
{ path: "roadmap/milestones.md", content: titledDraft("Milestones", "Define visible checkpoints for product progress and learning.") },
|
|
48
|
+
{ path: "roadmap/backlog.md", content: titledDraft("Backlog", "Collect candidate work before prioritization.") },
|
|
49
|
+
{ path: "architecture/overview.md", content: titledDraft("Architecture Overview", "Describe the current or intended technical architecture.") },
|
|
50
|
+
{ path: "architecture/technical-decisions.md", content: decisionLog("Technical Decisions") },
|
|
51
|
+
{ path: "growth/positioning.md", content: titledDraft("Positioning", "Define how the product should be described to the target market.") },
|
|
52
|
+
{ path: "growth/landing-page.md", content: titledDraft("Landing Page", "Draft the landing page message and conversion goal.") },
|
|
53
|
+
{ path: "growth/launch-plan.md", content: titledDraft("Launch Plan", "Plan the first launch or validation distribution loop.") },
|
|
54
|
+
{ path: ".github/copilot-instructions.md", content: copilotInstructions() },
|
|
55
|
+
...issueTemplates(),
|
|
56
|
+
{ path: ".github/PULL_REQUEST_TEMPLATE.md", content: pullRequestTemplate() },
|
|
57
|
+
{ path: ".github/workflows/pr-validation.yml", content: prValidationWorkflow() },
|
|
58
|
+
{ path: ".github/leanos/labels.yaml", content: labelsYaml() },
|
|
59
|
+
{ path: ".github/leanos/project-sync.yaml", content: projectSyncYaml() },
|
|
60
|
+
{ path: ".github/leanos/branch-rules.md", content: branchRules() },
|
|
61
|
+
{ path: ".github/leanos/pr-validation-rules.md", content: prValidationRules() }
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
function createLeanOsYaml(answers) {
|
|
65
|
+
return stringifyYaml({
|
|
66
|
+
leanos: {
|
|
67
|
+
version: "0.1.0",
|
|
68
|
+
workspace_type: "startup"
|
|
69
|
+
},
|
|
70
|
+
company: {
|
|
71
|
+
name: answers.companyName,
|
|
72
|
+
stage: answers.stage,
|
|
73
|
+
mode: answers.mode
|
|
74
|
+
},
|
|
75
|
+
product: {
|
|
76
|
+
name: answers.productName,
|
|
77
|
+
type: answers.productType,
|
|
78
|
+
status: answers.productStatus,
|
|
79
|
+
description: answers.description,
|
|
80
|
+
target_user: answers.targetUser
|
|
81
|
+
},
|
|
82
|
+
agent: {
|
|
83
|
+
chief_agent: "enabled",
|
|
84
|
+
command_style: "slash-and-natural-language"
|
|
85
|
+
},
|
|
86
|
+
governance: {
|
|
87
|
+
mode: "balanced"
|
|
88
|
+
},
|
|
89
|
+
github: {
|
|
90
|
+
status: "not_configured",
|
|
91
|
+
project_sync: "disabled"
|
|
92
|
+
},
|
|
93
|
+
architecture: {
|
|
94
|
+
stack_status: "undefined"
|
|
95
|
+
},
|
|
96
|
+
departments: {
|
|
97
|
+
active: answers.departments
|
|
98
|
+
},
|
|
99
|
+
skills: {
|
|
100
|
+
installed: installedSkills
|
|
101
|
+
},
|
|
102
|
+
playbooks: {
|
|
103
|
+
active: ["new-product-mvp-validation", "b2b-saas-mvp"]
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function workspaceReadme(answers) {
|
|
108
|
+
return `# ${answers.productName}
|
|
109
|
+
|
|
110
|
+
This workspace is powered by LeanOS.
|
|
111
|
+
|
|
112
|
+
LeanOS helps you transform startup strategy into roadmap, GitHub issues, branches, pull requests and validated MVP learning.
|
|
113
|
+
|
|
114
|
+
## Start here
|
|
115
|
+
|
|
116
|
+
Open your editor chat and type:
|
|
117
|
+
|
|
118
|
+
\`\`\`text
|
|
119
|
+
/init leanos
|
|
120
|
+
\`\`\`
|
|
121
|
+
|
|
122
|
+
## Useful commands
|
|
123
|
+
|
|
124
|
+
\`\`\`text
|
|
125
|
+
/define icp
|
|
126
|
+
/define value-proposition
|
|
127
|
+
/define mvp
|
|
128
|
+
/check coherence
|
|
129
|
+
/create roadmap
|
|
130
|
+
/sync github
|
|
131
|
+
/workon issue
|
|
132
|
+
/create pr
|
|
133
|
+
/review pr
|
|
134
|
+
\`\`\`
|
|
135
|
+
|
|
136
|
+
## Current LeanOS status
|
|
137
|
+
|
|
138
|
+
- Company profile: Draft
|
|
139
|
+
- Product brief: Draft
|
|
140
|
+
- ICP: Needs definition
|
|
141
|
+
- Value proposition: Not defined
|
|
142
|
+
- MVP scope: Not defined
|
|
143
|
+
- Roadmap: Not created
|
|
144
|
+
- GitHub sync: Not connected
|
|
145
|
+
- Coherence score: Not available yet
|
|
146
|
+
|
|
147
|
+
## Recommended next step
|
|
148
|
+
|
|
149
|
+
Define your ICP:
|
|
150
|
+
|
|
151
|
+
\`\`\`text
|
|
152
|
+
/define icp
|
|
153
|
+
\`\`\`
|
|
154
|
+
`;
|
|
155
|
+
}
|
|
156
|
+
function agentProfile(answers) {
|
|
157
|
+
return `# LeanOS Agent
|
|
158
|
+
|
|
159
|
+
You are the LeanOS Agent for ${answers.productName}.
|
|
160
|
+
|
|
161
|
+
LeanOS is an agent-native startup operating system. It turns a coding agent into a startup operator that can help with strategy, product definition, validation, MVP scope, roadmap, GitHub execution, and learning loops.
|
|
162
|
+
|
|
163
|
+
## Role
|
|
164
|
+
|
|
165
|
+
Act as the Chief Agent for this startup. Help the user move from unclear ideas to coherent product decisions and implementation work.
|
|
166
|
+
|
|
167
|
+
## Operating Mode
|
|
168
|
+
|
|
169
|
+
- Support natural language requests.
|
|
170
|
+
- Support slash commands from .leanos/commands.
|
|
171
|
+
- Load context from company, product, validation, mvp, roadmap, architecture, growth, GitHub, skills, playbooks, and .leanos/context.
|
|
172
|
+
- Do not jump into implementation before the relevant company, customer, problem, value proposition, MVP, roadmap, and issue context is clear enough.
|
|
173
|
+
- Always check coherence between ICP, problem, value proposition, MVP scope, roadmap, and the current issue before implementation.
|
|
174
|
+
- Prefer small, validated steps over large speculative builds.
|
|
175
|
+
|
|
176
|
+
## Current Workspace
|
|
177
|
+
|
|
178
|
+
- Company: ${answers.companyName}
|
|
179
|
+
- Product: ${answers.productName}
|
|
180
|
+
- Product type: ${answers.productType}
|
|
181
|
+
- Stage: ${answers.stage}
|
|
182
|
+
- Operating mode: ${answers.mode}
|
|
183
|
+
- Primary user: ${answers.targetUser}
|
|
184
|
+
`;
|
|
185
|
+
}
|
|
186
|
+
function operatingRules() {
|
|
187
|
+
return `# Operating Rules
|
|
188
|
+
|
|
189
|
+
- Keep strategy, validation, roadmap, and implementation connected.
|
|
190
|
+
- Ask for missing product context before building.
|
|
191
|
+
- Use the smallest coherent MVP scope.
|
|
192
|
+
- Turn validated work into issues, branches, pull requests, and learning.
|
|
193
|
+
- Capture important decisions in decision logs.
|
|
194
|
+
- Keep GitHub workflow static until GitHub sync is configured.
|
|
195
|
+
`;
|
|
196
|
+
}
|
|
197
|
+
function contextLoading() {
|
|
198
|
+
return `# Context Loading
|
|
199
|
+
|
|
200
|
+
When LeanOS starts, load context in this order:
|
|
201
|
+
|
|
202
|
+
1. leanos.yaml
|
|
203
|
+
2. .leanos/context/workspace-summary.md
|
|
204
|
+
3. .leanos/context/active-playbook.md
|
|
205
|
+
4. .leanos/context/next-actions.md
|
|
206
|
+
5. company/profile.md
|
|
207
|
+
6. product/brief.md
|
|
208
|
+
7. product/icp.md
|
|
209
|
+
8. product/problem.md
|
|
210
|
+
9. product/value-proposition.md
|
|
211
|
+
10. mvp/scope.md
|
|
212
|
+
11. roadmap/roadmap.md
|
|
213
|
+
|
|
214
|
+
Only load deeper files when they are relevant to the user's current request.
|
|
215
|
+
`;
|
|
216
|
+
}
|
|
217
|
+
function commandFiles() {
|
|
218
|
+
const commandMap = {
|
|
219
|
+
"init-leanos": "Initialize LeanOS in the current chat by loading workspace context, active playbook, next actions, and available commands.",
|
|
220
|
+
status: "Summarize the current LeanOS workspace status across company, product, validation, MVP, roadmap, GitHub, and next actions.",
|
|
221
|
+
"define-company": "Guide the user to define company profile, mission, vision, principles, and decision log entries.",
|
|
222
|
+
"define-strategy": "Clarify the strategy connecting ICP, problem, value proposition, business model, validation, and MVP.",
|
|
223
|
+
"define-icp": "Define the ideal customer profile with specific segment, pains, triggers, buying context, and exclusions.",
|
|
224
|
+
"define-problem": "Define the specific customer problem, its urgency, frequency, current alternatives, and validation signals.",
|
|
225
|
+
"define-value-proposition": "Define the promise, outcome, differentiated value, and proof behind the product.",
|
|
226
|
+
"define-business-model": "Draft or refine the business model canvas for the product.",
|
|
227
|
+
"define-assumptions": "Identify and prioritize riskiest assumptions for validation.",
|
|
228
|
+
"define-mvp": "Define MVP scope, user stories, acceptance criteria, and non-goals.",
|
|
229
|
+
"create-roadmap": "Create a validation-first roadmap from the current MVP and assumptions.",
|
|
230
|
+
"sync-github": "Prepare GitHub sync instructions. Do not call GitHub APIs until integration is configured.",
|
|
231
|
+
"create-issues": "Turn roadmap items into GitHub issue drafts with clear scope and acceptance criteria.",
|
|
232
|
+
"workon-issue": "Load issue context, check coherence, plan implementation, and work only inside the agreed scope.",
|
|
233
|
+
"create-pr": "Prepare a pull request summary tied to the issue, MVP scope, tests, and learning.",
|
|
234
|
+
"review-pr": "Review a pull request against MVP scope, coherence, acceptance criteria, and validation goals.",
|
|
235
|
+
"capture-learning": "Capture customer, product, technical, and roadmap learning from recent work.",
|
|
236
|
+
"iterate-roadmap": "Update roadmap priorities based on new learning.",
|
|
237
|
+
"list-skills": "List installed LeanOS skills and when to use them.",
|
|
238
|
+
"explain-skill": "Explain one installed skill, its purpose, and expected output."
|
|
239
|
+
};
|
|
240
|
+
return [
|
|
241
|
+
...Object.entries(commandMap).map(([name, description]) => ({
|
|
242
|
+
path: `.leanos/commands/${name}.md`,
|
|
243
|
+
content: commandTemplate(name, description)
|
|
244
|
+
})),
|
|
245
|
+
{
|
|
246
|
+
path: ".leanos/commands/check-coherence.md",
|
|
247
|
+
content: checkCoherenceCommand()
|
|
248
|
+
}
|
|
249
|
+
];
|
|
250
|
+
}
|
|
251
|
+
function commandTemplate(name, description) {
|
|
252
|
+
return `# /${name.replaceAll("-", " ")}
|
|
253
|
+
|
|
254
|
+
## Purpose
|
|
255
|
+
|
|
256
|
+
${description}
|
|
257
|
+
|
|
258
|
+
## Process
|
|
259
|
+
|
|
260
|
+
1. Load the relevant LeanOS context.
|
|
261
|
+
2. Ask for missing information if the context is not clear enough.
|
|
262
|
+
3. Produce a concise, actionable output.
|
|
263
|
+
4. Update the relevant workspace files only when the user asks you to make changes.
|
|
264
|
+
|
|
265
|
+
## Expected Output
|
|
266
|
+
|
|
267
|
+
- Current context
|
|
268
|
+
- Recommended action
|
|
269
|
+
- Next command
|
|
270
|
+
`;
|
|
271
|
+
}
|
|
272
|
+
function checkCoherenceCommand() {
|
|
273
|
+
return `# /check coherence
|
|
274
|
+
|
|
275
|
+
## Purpose
|
|
276
|
+
|
|
277
|
+
Check whether the current company, ICP, problem, value proposition, MVP scope, roadmap, and current issue are strategically aligned.
|
|
278
|
+
|
|
279
|
+
## Process
|
|
280
|
+
|
|
281
|
+
1. Load company, product, validation, MVP, roadmap, and issue context.
|
|
282
|
+
2. Compare ICP, problem, value proposition, MVP scope, roadmap, and current implementation work.
|
|
283
|
+
3. Identify contradictions, missing decisions, and validation risks.
|
|
284
|
+
4. Recommend the smallest changes needed to restore coherence.
|
|
285
|
+
|
|
286
|
+
## Expected Output
|
|
287
|
+
|
|
288
|
+
Coherence Score: 0-100
|
|
289
|
+
|
|
290
|
+
### Strong alignments
|
|
291
|
+
|
|
292
|
+
- What is working well.
|
|
293
|
+
|
|
294
|
+
### Inconsistencies
|
|
295
|
+
|
|
296
|
+
- What does not match or is missing.
|
|
297
|
+
|
|
298
|
+
### Risks
|
|
299
|
+
|
|
300
|
+
- What could cause wasted implementation or weak validation.
|
|
301
|
+
|
|
302
|
+
### Recommended changes
|
|
303
|
+
|
|
304
|
+
- The smallest next edits or decisions.
|
|
305
|
+
|
|
306
|
+
### Suggested next command
|
|
307
|
+
|
|
308
|
+
- The best LeanOS command to run next.
|
|
309
|
+
`;
|
|
310
|
+
}
|
|
311
|
+
function skillFiles() {
|
|
312
|
+
const skills = {
|
|
313
|
+
"define-company": "Help define the company context, mission, vision, principles, and decision log.",
|
|
314
|
+
"define-product": "Help clarify the product brief, problem, customer, and product status.",
|
|
315
|
+
"define-icp": "Help identify a specific first customer segment for validation.",
|
|
316
|
+
"define-value-proposition": "Help articulate the core promise and differentiated value.",
|
|
317
|
+
"define-mvp-scope": "Help reduce the MVP to the smallest coherent validation scope.",
|
|
318
|
+
"create-roadmap": "Help sequence product work by validation cycle and priority.",
|
|
319
|
+
"create-github-issues": "Help turn roadmap work into GitHub-ready issues.",
|
|
320
|
+
"check-coherence": "Help identify strategic misalignment before implementation.",
|
|
321
|
+
"review-pr": "Help review pull requests against scope, coherence, and validation goals."
|
|
322
|
+
};
|
|
323
|
+
return Object.entries(skills).map(([name, description]) => ({
|
|
324
|
+
path: `.leanos/skills/installed/${name}.skill.md`,
|
|
325
|
+
content: `# ${name}
|
|
326
|
+
|
|
327
|
+
${description}
|
|
328
|
+
|
|
329
|
+
## Output
|
|
330
|
+
|
|
331
|
+
- Key questions
|
|
332
|
+
- Recommended decisions
|
|
333
|
+
- Files to update
|
|
334
|
+
- Suggested next command
|
|
335
|
+
`
|
|
336
|
+
}));
|
|
337
|
+
}
|
|
338
|
+
function customSkillsReadme() {
|
|
339
|
+
return `# Custom Skills
|
|
340
|
+
|
|
341
|
+
Add project-specific LeanOS skills here.
|
|
342
|
+
|
|
343
|
+
Custom skills should explain:
|
|
344
|
+
|
|
345
|
+
- when to use the skill
|
|
346
|
+
- what context it needs
|
|
347
|
+
- what output it should produce
|
|
348
|
+
- which workspace files it may update
|
|
349
|
+
`;
|
|
350
|
+
}
|
|
351
|
+
function activePlaybook() {
|
|
352
|
+
return `# New Product MVP Validation Playbook
|
|
353
|
+
|
|
354
|
+
## Goal
|
|
355
|
+
|
|
356
|
+
Move from product idea to a coherent, validated MVP plan.
|
|
357
|
+
|
|
358
|
+
## Sequence
|
|
359
|
+
|
|
360
|
+
1. Define ICP.
|
|
361
|
+
2. Define the problem.
|
|
362
|
+
3. Define the value proposition.
|
|
363
|
+
4. Define assumptions.
|
|
364
|
+
5. Define MVP scope.
|
|
365
|
+
6. Create roadmap.
|
|
366
|
+
7. Create issues.
|
|
367
|
+
8. Build, review, learn, and iterate.
|
|
368
|
+
`;
|
|
369
|
+
}
|
|
370
|
+
function workspaceSummary(answers) {
|
|
371
|
+
return `# Workspace Summary
|
|
372
|
+
|
|
373
|
+
- Company: ${answers.companyName}
|
|
374
|
+
- Product: ${answers.productName}
|
|
375
|
+
- Status: ${answers.productStatus}
|
|
376
|
+
- Type: ${answers.productType}
|
|
377
|
+
- Stage: ${answers.stage}
|
|
378
|
+
- Mode: ${answers.mode}
|
|
379
|
+
- Primary user: ${answers.targetUser}
|
|
380
|
+
- Description: ${answers.description}
|
|
381
|
+
- Active departments: ${answers.departments.join(", ")}
|
|
382
|
+
`;
|
|
383
|
+
}
|
|
384
|
+
function activePlaybookContext() {
|
|
385
|
+
return `# Active Playbook
|
|
386
|
+
|
|
387
|
+
Current playbook:
|
|
388
|
+
|
|
389
|
+
- new-product-mvp-validation
|
|
390
|
+
|
|
391
|
+
Use this playbook until the MVP validation cycle is complete or the user explicitly switches playbooks.
|
|
392
|
+
`;
|
|
393
|
+
}
|
|
394
|
+
function nextActions() {
|
|
395
|
+
return `# Next Actions
|
|
396
|
+
|
|
397
|
+
## 1. Define ICP
|
|
398
|
+
|
|
399
|
+
Command:
|
|
400
|
+
|
|
401
|
+
\`\`\`text
|
|
402
|
+
/define icp
|
|
403
|
+
\`\`\`
|
|
404
|
+
|
|
405
|
+
## 2. Define Problem
|
|
406
|
+
|
|
407
|
+
Command:
|
|
408
|
+
|
|
409
|
+
\`\`\`text
|
|
410
|
+
/define problem
|
|
411
|
+
\`\`\`
|
|
412
|
+
|
|
413
|
+
## 3. Define Value Proposition
|
|
414
|
+
|
|
415
|
+
Command:
|
|
416
|
+
|
|
417
|
+
\`\`\`text
|
|
418
|
+
/define value-proposition
|
|
419
|
+
\`\`\`
|
|
420
|
+
|
|
421
|
+
## 4. Define MVP Scope
|
|
422
|
+
|
|
423
|
+
Command:
|
|
424
|
+
|
|
425
|
+
\`\`\`text
|
|
426
|
+
/define mvp
|
|
427
|
+
\`\`\`
|
|
428
|
+
`;
|
|
429
|
+
}
|
|
430
|
+
function companyProfile(answers) {
|
|
431
|
+
return `# Company Profile
|
|
432
|
+
|
|
433
|
+
- Company: ${answers.companyName}
|
|
434
|
+
- Operating mode: ${answers.mode}
|
|
435
|
+
- Current stage: ${answers.stage}
|
|
436
|
+
|
|
437
|
+
## Draft
|
|
438
|
+
|
|
439
|
+
Describe what the company is building, who it serves, and why now.
|
|
440
|
+
`;
|
|
441
|
+
}
|
|
442
|
+
function productBrief(answers) {
|
|
443
|
+
return `# Product Brief
|
|
444
|
+
|
|
445
|
+
- Product: ${answers.productName}
|
|
446
|
+
- Type: ${answers.productType}
|
|
447
|
+
- Status: ${answers.productStatus}
|
|
448
|
+
- Primary user: ${answers.targetUser}
|
|
449
|
+
|
|
450
|
+
## Description
|
|
451
|
+
|
|
452
|
+
${answers.description}
|
|
453
|
+
|
|
454
|
+
## Draft
|
|
455
|
+
|
|
456
|
+
Clarify the customer, problem, value proposition, MVP, and validation path.
|
|
457
|
+
`;
|
|
458
|
+
}
|
|
459
|
+
function titledDraft(title, guidance) {
|
|
460
|
+
return `# ${title}
|
|
461
|
+
|
|
462
|
+
${guidance}
|
|
463
|
+
|
|
464
|
+
## Draft
|
|
465
|
+
|
|
466
|
+
TBD
|
|
467
|
+
`;
|
|
468
|
+
}
|
|
469
|
+
function decisionLog(title = "Decision Log") {
|
|
470
|
+
return `# ${title}
|
|
471
|
+
|
|
472
|
+
| Date | Decision | Context | Owner |
|
|
473
|
+
| --- | --- | --- | --- |
|
|
474
|
+
| TBD | TBD | TBD | TBD |
|
|
475
|
+
`;
|
|
476
|
+
}
|
|
477
|
+
function learningLog() {
|
|
478
|
+
return `# Learning Log
|
|
479
|
+
|
|
480
|
+
| Date | Source | Learning | Impact |
|
|
481
|
+
| --- | --- | --- | --- |
|
|
482
|
+
| TBD | TBD | TBD | TBD |
|
|
483
|
+
`;
|
|
484
|
+
}
|
|
485
|
+
function copilotInstructions() {
|
|
486
|
+
return `# LeanOS Instructions
|
|
487
|
+
|
|
488
|
+
This repository uses LeanOS.
|
|
489
|
+
|
|
490
|
+
Before implementing product work:
|
|
491
|
+
|
|
492
|
+
- load LeanOS context
|
|
493
|
+
- check ICP, problem, value proposition, MVP scope, roadmap, and issue coherence
|
|
494
|
+
- keep implementation aligned with validation goals
|
|
495
|
+
- avoid adding features outside the agreed scope
|
|
496
|
+
`;
|
|
497
|
+
}
|
|
498
|
+
function issueTemplates() {
|
|
499
|
+
return [
|
|
500
|
+
issueTemplate("feature.yml", "Feature", "Scoped product feature aligned with MVP or roadmap."),
|
|
501
|
+
issueTemplate("bug.yml", "Bug", "Bug report with impact and reproduction context."),
|
|
502
|
+
issueTemplate("experiment.yml", "Experiment", "Validation experiment tied to an assumption."),
|
|
503
|
+
issueTemplate("validation.yml", "Validation", "Customer or market validation task."),
|
|
504
|
+
issueTemplate("task.yml", "Task", "General LeanOS implementation or operations task.")
|
|
505
|
+
];
|
|
506
|
+
}
|
|
507
|
+
function issueTemplate(fileName, name, description) {
|
|
508
|
+
return {
|
|
509
|
+
path: `.github/ISSUE_TEMPLATE/${fileName}`,
|
|
510
|
+
content: `name: ${name}
|
|
511
|
+
description: ${description}
|
|
512
|
+
title: "[${name}]: "
|
|
513
|
+
labels: ["leanos"]
|
|
514
|
+
body:
|
|
515
|
+
- type: textarea
|
|
516
|
+
id: context
|
|
517
|
+
attributes:
|
|
518
|
+
label: Context
|
|
519
|
+
description: What problem, assumption, or roadmap item does this relate to?
|
|
520
|
+
validations:
|
|
521
|
+
required: true
|
|
522
|
+
- type: textarea
|
|
523
|
+
id: scope
|
|
524
|
+
attributes:
|
|
525
|
+
label: Scope
|
|
526
|
+
description: What should be done?
|
|
527
|
+
validations:
|
|
528
|
+
required: true
|
|
529
|
+
- type: textarea
|
|
530
|
+
id: acceptance
|
|
531
|
+
attributes:
|
|
532
|
+
label: Acceptance criteria
|
|
533
|
+
description: How will we know this is complete?
|
|
534
|
+
validations:
|
|
535
|
+
required: true
|
|
536
|
+
`
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
function pullRequestTemplate() {
|
|
540
|
+
return `# Pull Request
|
|
541
|
+
|
|
542
|
+
## LeanOS Context
|
|
543
|
+
|
|
544
|
+
- Issue:
|
|
545
|
+
- MVP scope:
|
|
546
|
+
- Roadmap item:
|
|
547
|
+
- Validation goal:
|
|
548
|
+
|
|
549
|
+
## Summary
|
|
550
|
+
|
|
551
|
+
Describe what changed.
|
|
552
|
+
|
|
553
|
+
## Coherence Check
|
|
554
|
+
|
|
555
|
+
- ICP alignment:
|
|
556
|
+
- Problem alignment:
|
|
557
|
+
- Value proposition alignment:
|
|
558
|
+
- MVP scope alignment:
|
|
559
|
+
|
|
560
|
+
## Tests
|
|
561
|
+
|
|
562
|
+
- [ ] Build or test command run
|
|
563
|
+
- [ ] Manual validation completed
|
|
564
|
+
|
|
565
|
+
## Learning
|
|
566
|
+
|
|
567
|
+
Capture any new product, customer, or technical learning.
|
|
568
|
+
`;
|
|
569
|
+
}
|
|
570
|
+
function prValidationWorkflow() {
|
|
571
|
+
return `name: LeanOS PR Validation
|
|
572
|
+
|
|
573
|
+
on:
|
|
574
|
+
pull_request:
|
|
575
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
|
576
|
+
|
|
577
|
+
jobs:
|
|
578
|
+
static-validation:
|
|
579
|
+
runs-on: ubuntu-latest
|
|
580
|
+
steps:
|
|
581
|
+
- name: Checkout
|
|
582
|
+
uses: actions/checkout@v4
|
|
583
|
+
- name: LeanOS placeholder validation
|
|
584
|
+
run: echo "LeanOS PR validation rules are documented in .github/leanos/pr-validation-rules.md"
|
|
585
|
+
`;
|
|
586
|
+
}
|
|
587
|
+
function labelsYaml() {
|
|
588
|
+
return `labels:
|
|
589
|
+
- name: leanos
|
|
590
|
+
color: "5319e7"
|
|
591
|
+
description: LeanOS managed work
|
|
592
|
+
- name: validation
|
|
593
|
+
color: "0e8a16"
|
|
594
|
+
description: Validation or learning task
|
|
595
|
+
- name: mvp
|
|
596
|
+
color: "1d76db"
|
|
597
|
+
description: MVP scope work
|
|
598
|
+
- name: strategy
|
|
599
|
+
color: "fbca04"
|
|
600
|
+
description: Strategy or product definition
|
|
601
|
+
`;
|
|
602
|
+
}
|
|
603
|
+
function projectSyncYaml() {
|
|
604
|
+
return `github:
|
|
605
|
+
status: not_configured
|
|
606
|
+
project_sync: disabled
|
|
607
|
+
`;
|
|
608
|
+
}
|
|
609
|
+
function branchRules() {
|
|
610
|
+
return `# Branch Rules
|
|
611
|
+
|
|
612
|
+
- Use focused branches tied to a roadmap item or issue.
|
|
613
|
+
- Keep branch scope aligned with MVP and validation goals.
|
|
614
|
+
- Prefer small pull requests that can be reviewed for coherence.
|
|
615
|
+
`;
|
|
616
|
+
}
|
|
617
|
+
function prValidationRules() {
|
|
618
|
+
return `# PR Validation Rules
|
|
619
|
+
|
|
620
|
+
Before merging, check:
|
|
621
|
+
|
|
622
|
+
- The PR links to an issue or explicit LeanOS task.
|
|
623
|
+
- The work fits the MVP scope or roadmap.
|
|
624
|
+
- The implementation does not add unrelated features.
|
|
625
|
+
- The PR includes a short learning or validation note when relevant.
|
|
626
|
+
`;
|
|
627
|
+
}
|
|
628
|
+
//# sourceMappingURL=workspace-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-template.js","sourceRoot":"","sources":["../../src/templates/workspace-template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAiDjD,MAAM,eAAe,GAAG;IACtB,gBAAgB;IAChB,gBAAgB;IAChB,YAAY;IACZ,0BAA0B;IAC1B,kBAAkB;IAClB,gBAAgB;IAChB,sBAAsB;IACtB,iBAAiB;IACjB,WAAW;CACZ,CAAC;AAEF,MAAM,UAAU,oBAAoB,CAAC,OAAyB;IAC5D,OAAO;QACL,EAAE,IA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AAU,EAAE,MAAM,EAAE,mDAAmD,CAAC;KACvF,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,QAAgB,EAAE,IAAY,EAAE,WAAmB;IACxE,OAAO;QACL,IAAI,EAAE,0BAA0B,QAAQ,EAAE;QAC1C,OAAO,EAAE,SAAS,IAAI;eACX,WAAW;WACf,IAAI;;;;;;;;;;;;;;;;;;;;;;;;CAwBd;KACE,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BR,CAAC;AACF,CAAC;AAED,SAAS,oBAAoB;IAC3B,OAAO;;;;;;;;;;;;;;CAcR,CAAC;AACF,CAAC;AAED,SAAS,UAAU;IACjB,OAAO;;;;;;;;;;;;;CAaR,CAAC;AACF,CAAC;AAED,SAAS,eAAe;IACtB,OAAO;;;CAGR,CAAC;AACF,CAAC;AAED,SAAS,WAAW;IAClB,OAAO;;;;;CAKR,CAAC;AACF,CAAC;AAED,SAAS,iBAAiB;IACxB,OAAO;;;;;;;;CAQR,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function printBanner(): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import figlet from "figlet";
|
|
2
|
+
import pc from "picocolors";
|
|
3
|
+
const fallbackBanner = `██╗ ███████╗ █████╗ ███╗ ██╗ ██████╗ ███████╗
|
|
4
|
+
██║ ██╔════╝██╔══██╗████╗ ██║██╔═══██╗██╔════╝
|
|
5
|
+
██║ █████╗ ███████║██╔██╗ ██║██║ ██║███████╗
|
|
6
|
+
██║ ██╔══╝ ██╔══██║██║╚██╗██║██║ ██║╚════██║
|
|
7
|
+
███████╗███████╗██║ ██║██║ ╚████║╚██████╔╝███████║
|
|
8
|
+
╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝`;
|
|
9
|
+
export function printBanner() {
|
|
10
|
+
const banner = figlet.textSync("LeanOS", {
|
|
11
|
+
font: "ANSI Shadow",
|
|
12
|
+
horizontalLayout: "default",
|
|
13
|
+
verticalLayout: "default"
|
|
14
|
+
});
|
|
15
|
+
console.log(pc.cyan(banner || fallbackBanner));
|
|
16
|
+
console.log(pc.bold("LeanOS AI"));
|
|
17
|
+
console.log(pc.dim("Agent-native startup operating system"));
|
|
18
|
+
console.log("");
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"banner.js","sourceRoot":"","sources":["../../src/ui/banner.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,cAAc,GAAG;;;;;oDAK6B,CAAC;AAErD,MAAM,UAAU,WAAW;IACzB,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE;QACvC,IAAI,EAAE,aAAa;QACnB,gBAAgB,EAAE,SAAS;QAC3B,cAAc,EAAE,SAAS;KAC1B,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
|
package/dist/ui/outro.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { outro } from "@clack/prompts";
|
|
2
|
+
import pc from "picocolors";
|
|
3
|
+
const productTypeLabels = {
|
|
4
|
+
"b2b-saas": "B2B SaaS",
|
|
5
|
+
"b2c-app": "B2C app",
|
|
6
|
+
"ai-agent-product": "AI agent product",
|
|
7
|
+
"developer-tool": "Developer tool",
|
|
8
|
+
marketplace: "Marketplace",
|
|
9
|
+
"internal-tool": "Internal tool",
|
|
10
|
+
"api-product": "API product",
|
|
11
|
+
"not-sure": "Not sure yet"
|
|
12
|
+
};
|
|
13
|
+
const stageLabels = {
|
|
14
|
+
idea: "Idea only",
|
|
15
|
+
"researching-problem": "Researching the problem",
|
|
16
|
+
"designing-mvp": "Designing MVP",
|
|
17
|
+
"building-mvp": "Building MVP",
|
|
18
|
+
"mvp-launched": "MVP launched",
|
|
19
|
+
"existing-product-with-users": "Existing product with users",
|
|
20
|
+
scaling: "Scaling"
|
|
21
|
+
};
|
|
22
|
+
const modeLabels = {
|
|
23
|
+
"solo-founder": "Solo founder",
|
|
24
|
+
"founder-plus-ai-agents": "Founder + AI agents",
|
|
25
|
+
"small-team": "Small team",
|
|
26
|
+
"existing-startup-team": "Existing startup team",
|
|
27
|
+
"internal-innovation-team": "Internal corporate innovation team"
|
|
28
|
+
};
|
|
29
|
+
export function printComingSoonOutro(label) {
|
|
30
|
+
outro(`${label} is coming soon. For now, use "Create a new LeanOS workspace".`);
|
|
31
|
+
}
|
|
32
|
+
export function printCreatedWorkspaceOutro(answers, createdGroups) {
|
|
33
|
+
const message = [
|
|
34
|
+
pc.green("LeanOS workspace created successfully."),
|
|
35
|
+
"",
|
|
36
|
+
`Company: ${answers.companyName}`,
|
|
37
|
+
`Product: ${answers.productName}`,
|
|
38
|
+
`Type: ${productTypeLabels[answers.productType]}`,
|
|
39
|
+
`Stage: ${stageLabels[answers.stage]}`,
|
|
40
|
+
`Mode: ${modeLabels[answers.mode]}`,
|
|
41
|
+
`Departments: ${answers.departments.join(", ")}`,
|
|
42
|
+
"",
|
|
43
|
+
"Created:",
|
|
44
|
+
...createdGroups.map((group) => `- ${group}`),
|
|
45
|
+
"",
|
|
46
|
+
"Next step:",
|
|
47
|
+
"",
|
|
48
|
+
"Open your editor chat and type:",
|
|
49
|
+
"",
|
|
50
|
+
pc.bold("/init leanos"),
|
|
51
|
+
"",
|
|
52
|
+
"You can also say:",
|
|
53
|
+
"",
|
|
54
|
+
'"Help me define the ICP."',
|
|
55
|
+
'"Turn this idea into an MVP."',
|
|
56
|
+
'"Create a roadmap for the first validation cycle."',
|
|
57
|
+
'"Check if my MVP is coherent."'
|
|
58
|
+
].join("\n");
|
|
59
|
+
outro(message);
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=outro.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outro.js","sourceRoot":"","sources":["../../src/ui/outro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,MAAM,iBAAiB,GAA2B;IAChD,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,SAAS;IACpB,kBAAkB,EAAE,kBAAkB;IACtC,gBAAgB,EAAE,gBAAgB;IAClC,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,eAAe;IAChC,aAAa,EAAE,aAAa;IAC5B,UAAU,EAAE,cAAc;CAC3B,CAAC;AAEF,MAAM,WAAW,GAA2B;IAC1C,IAAI,EAAE,WAAW;IACjB,qBAAqB,EAAE,yBAAyB;IAChD,eAAe,EAAE,eAAe;IAChC,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;IAC9B,6BAA6B,EAAE,6BAA6B;IAC5D,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,MAAM,UAAU,GAA2B;IACzC,cAAc,EAAE,cAAc;IAC9B,wBAAwB,EAAE,qBAAqB;IAC/C,YAAY,EAAE,YAAY;IAC1B,uBAAuB,EAAE,uBAAuB;IAChD,0BAA0B,EAAE,oCAAoC;CACjE,CAAC;AAEF,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,KAAK,CAAC,GAAG,KAAK,gEAAgE,CAAC,CAAC;AAClF,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAAyB,EAAE,aAAuB;IAC3F,MAAM,OAAO,GAAG;QACd,EAAE,CAAC,KAAK,CAAC,wCAAwC,CAAC;QAClD,EAAE;QACF,YAAY,OAAO,CAAC,WAAW,EAAE;QACjC,YAAY,OAAO,CAAC,WAAW,EAAE;QACjC,SAAS,iBAAiB,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QACjD,UAAU,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACtC,SAAS,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnC,gBAAgB,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QAChD,EAAE;QACF,UAAU;QACV,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC;QAC7C,EAAE;QACF,YAAY;QACZ,EAAE;QACF,iCAAiC;QACjC,EAAE;QACF,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC;QACvB,EAAE;QACF,mBAAmB;QACnB,EAAE;QACF,2BAA2B;QAC3B,+BAA+B;QAC/B,oDAAoD;QACpD,gCAAgC;KACjC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEb,KAAK,CAAC,OAAO,CAAC,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function workspaceExists(rootDir: string): Promise<boolean>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { access } from "node:fs/promises";
|
|
2
|
+
import { constants } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
export async function workspaceExists(rootDir) {
|
|
5
|
+
try {
|
|
6
|
+
await access(join(rootDir, "leanos.yaml"), constants.F_OK);
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAAe;IACnD,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function slugify(value: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slugify.js","sourceRoot":"","sources":["../../src/utils/slugify.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,OAAO,KAAK;SACT,SAAS,CAAC,MAAM,CAAC;SACjB,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;SAC/B,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function stringifyYaml(value: unknown): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml.js","sourceRoot":"","sources":["../../src/utils/yaml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,SAAS,CAAC,KAAK,EAAE;QACtB,SAAS,EAAE,CAAC;KACb,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lean-os",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "LeanOS agent-native startup operating system CLI.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"lean-os": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc -p tsconfig.json",
|
|
14
|
+
"dev": "tsx src/index.ts",
|
|
15
|
+
"start": "node dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@clack/prompts": "^0.8.2",
|
|
19
|
+
"figlet": "^1.8.0",
|
|
20
|
+
"picocolors": "^1.1.1",
|
|
21
|
+
"yaml": "^2.7.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/figlet": "^1.7.0",
|
|
25
|
+
"@types/node": "^22.10.7",
|
|
26
|
+
"tsx": "^4.19.2",
|
|
27
|
+
"typescript": "^5.7.3"
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=18.18"
|
|
31
|
+
}
|
|
32
|
+
}
|