@lumerahq/cli 0.19.28 → 0.19.29
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/dist/index.js
CHANGED
|
@@ -248,7 +248,7 @@ async function main() {
|
|
|
248
248
|
break;
|
|
249
249
|
// Project
|
|
250
250
|
case "init":
|
|
251
|
-
await import("./init-
|
|
251
|
+
await import("./init-ZFBNNPDX.js").then((m) => m.init(args.slice(1)));
|
|
252
252
|
break;
|
|
253
253
|
case "register":
|
|
254
254
|
await import("./register-OOU477QY.js").then((m) => m.register(args.slice(1)));
|
|
@@ -27,7 +27,7 @@ import pc from "picocolors";
|
|
|
27
27
|
import prompts from "prompts";
|
|
28
28
|
import { execSync } from "child_process";
|
|
29
29
|
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, rmSync, readlinkSync, symlinkSync } from "fs";
|
|
30
|
-
import {
|
|
30
|
+
import { join, resolve } from "path";
|
|
31
31
|
function toTitleCase(str) {
|
|
32
32
|
return str.split(/[-_]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
33
33
|
}
|
|
@@ -44,83 +44,44 @@ var TEMPLATE_EXCLUDE = /* @__PURE__ */ new Set(["template.json"]);
|
|
|
44
44
|
var TEMPLATE_RENAMES = /* @__PURE__ */ new Map([["_gitignore", ".gitignore"]]);
|
|
45
45
|
var TEMPLATE_RAW_COPY = /* @__PURE__ */ new Set(["pnpm-lock.yaml"]);
|
|
46
46
|
var STUDIO_PROBLEM_FIRST_FLAG = "studio_problem_first";
|
|
47
|
-
var
|
|
47
|
+
var PROBLEM_FIRST_AGENTS_MD = `# {{projectTitle}}
|
|
48
48
|
|
|
49
|
-
This
|
|
49
|
+
This file is project-specific durable memory for future Studio agent sessions.
|
|
50
|
+
Keep it concise and update it only with context that is not obvious from the
|
|
51
|
+
file tree alone.
|
|
50
52
|
|
|
51
|
-
|
|
52
|
-
relevant memory files.
|
|
53
|
+
## Purpose
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
rule, data contract, naming convention, recurring assumption, or correction
|
|
56
|
-
that should survive future sessions.
|
|
55
|
+
Describe the business problem this workspace solves and who uses it.
|
|
57
56
|
|
|
58
|
-
|
|
59
|
-
source files in memory.
|
|
57
|
+
## Business Workflow
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
and expose it in the app UI or a clear review/edit path.
|
|
59
|
+
Capture the durable workflow, domain terms, review expectations, and important
|
|
60
|
+
edge cases.
|
|
64
61
|
|
|
65
|
-
|
|
66
|
-
`;
|
|
67
|
-
var MEMORY_FILES = /* @__PURE__ */ new Map([
|
|
68
|
-
["README.md", `# Project Memory
|
|
69
|
-
|
|
70
|
-
Repo-backed memory keeps durable project context available across agent
|
|
71
|
-
sessions. Keep it concise and reviewable.
|
|
72
|
-
|
|
73
|
-
Use this folder for:
|
|
74
|
-
- confirmed project decisions
|
|
75
|
-
- durable workflow rules and mappings
|
|
76
|
-
- data contracts and source-file assumptions
|
|
77
|
-
- runbooks for recurring work
|
|
78
|
-
- open questions that should carry forward
|
|
62
|
+
## Domain Notes
|
|
79
63
|
|
|
80
|
-
|
|
81
|
-
|
|
64
|
+
Record user-specific terminology, assumptions, constraints, and preferences
|
|
65
|
+
that future agents should preserve.
|
|
82
66
|
|
|
83
|
-
|
|
84
|
-
source of truth, such as collections or config, and expose it in the app UI or a
|
|
85
|
-
clear review/edit path.
|
|
86
|
-
`],
|
|
87
|
-
["project-context.md", `# Project Context
|
|
67
|
+
## Project Conventions
|
|
88
68
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
`],
|
|
92
|
-
["decisions.md", `# Decisions
|
|
69
|
+
Document non-obvious architecture, naming, validation, or UX conventions that
|
|
70
|
+
should guide future changes.
|
|
93
71
|
|
|
94
|
-
|
|
72
|
+
## Validation
|
|
95
73
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
`],
|
|
99
|
-
["open-questions.md", `# Open Questions
|
|
74
|
+
List the commands or checks that should pass before changes are considered
|
|
75
|
+
done.
|
|
100
76
|
|
|
101
|
-
|
|
102
|
-
behavior is finalized.
|
|
103
|
-
`],
|
|
104
|
-
["rules/README.md", `# Rules
|
|
77
|
+
## Decisions and Follow-ups
|
|
105
78
|
|
|
106
|
-
|
|
107
|
-
handling expectations.
|
|
108
|
-
`],
|
|
109
|
-
["mappings/README.md", `# Mappings
|
|
79
|
+
Record durable decisions and unresolved questions that should carry forward.
|
|
110
80
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
Document expected source files, required columns, data types, and known source
|
|
117
|
-
system assumptions.
|
|
118
|
-
`],
|
|
119
|
-
["runbooks/README.md", `# Runbooks
|
|
120
|
-
|
|
121
|
-
Document repeatable operating steps for recurring workflows.
|
|
122
|
-
`]
|
|
123
|
-
]);
|
|
81
|
+
Do not use this file as a generic Lumera platform manual, tool guide, or code
|
|
82
|
+
index. Do not store secrets, credentials, tokens, private keys, or transient
|
|
83
|
+
chat summaries.
|
|
84
|
+
`;
|
|
124
85
|
function copyDir(src, dest, replacements, isRoot = true) {
|
|
125
86
|
if (!existsSync(dest)) {
|
|
126
87
|
mkdirSync(dest, { recursive: true });
|
|
@@ -170,24 +131,9 @@ async function isStudioProblemFirstScaffoldEnabled(targetDir) {
|
|
|
170
131
|
return false;
|
|
171
132
|
}
|
|
172
133
|
}
|
|
173
|
-
function
|
|
174
|
-
if (existsSync(path)) return;
|
|
175
|
-
mkdirSync(dirname(path), { recursive: true });
|
|
176
|
-
writeFileSync(path, content);
|
|
177
|
-
}
|
|
178
|
-
function applyProblemFirstMemoryScaffold(projectRoot) {
|
|
134
|
+
function applyProblemFirstProjectInstructionsScaffold(projectRoot, replacements) {
|
|
179
135
|
const agentsMdPath = join(projectRoot, "AGENTS.md");
|
|
180
|
-
|
|
181
|
-
const agentsMd = readFileSync(agentsMdPath, "utf-8");
|
|
182
|
-
if (!agentsMd.includes("## Project Memory")) {
|
|
183
|
-
writeFileSync(agentsMdPath, `${agentsMd.trimEnd()}
|
|
184
|
-
|
|
185
|
-
${MEMORY_AGENTS_SECTION}`);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
for (const [relativePath, content] of MEMORY_FILES) {
|
|
189
|
-
writeFileIfMissing(join(projectRoot, "memory", relativePath), content);
|
|
190
|
-
}
|
|
136
|
+
writeFileSync(agentsMdPath, processTemplate(PROBLEM_FIRST_AGENTS_MD, replacements));
|
|
191
137
|
}
|
|
192
138
|
function isGitInstalled() {
|
|
193
139
|
try {
|
|
@@ -484,7 +430,7 @@ async function init(args) {
|
|
|
484
430
|
const problemFirstScaffold = await isStudioProblemFirstScaffoldEnabled(targetDir);
|
|
485
431
|
copyDir(templateDir, targetDir, replacements);
|
|
486
432
|
if (problemFirstScaffold) {
|
|
487
|
-
|
|
433
|
+
applyProblemFirstProjectInstructionsScaffold(targetDir, replacements);
|
|
488
434
|
}
|
|
489
435
|
ensureClaudeInstructionsLink(targetDir);
|
|
490
436
|
const installCommand = existsSync(join(targetDir, "pnpm-lock.yaml")) ? "pnpm install --frozen-lockfile" : "pnpm install";
|