cairn-ai 0.6.0 → 0.7.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/.agents/workflows/cairn-doctor.md +4 -1
- package/.agents/workflows/cairn-install.md +3 -1
- package/.agents/workflows/cairn-uninstall.md +3 -1
- package/.agents/workflows/cairn-upgrade.md +3 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.de.md +32 -5
- package/README.es.md +32 -5
- package/README.fr.md +32 -5
- package/README.ja.md +32 -5
- package/README.ko.md +34 -8
- package/README.md +34 -8
- package/README.pt.md +32 -5
- package/README.zh.md +32 -5
- package/commands/cairn-doctor.md +4 -1
- package/commands/cairn-install.md +11 -5
- package/commands/cairn-uninstall.md +9 -4
- package/commands/cairn-upgrade.md +8 -1
- package/package.json +2 -2
- package/scripts/cairn-auto-upgrade.mjs +334 -0
- package/scripts/cairn-lifecycle-claude.mjs +64 -18
- package/scripts/cairn-lifecycle-commands.mjs +355 -79
- package/scripts/cairn-lifecycle-hosts.mjs +98 -0
- package/scripts/cairn-lifecycle-integrity.mjs +106 -33
- package/scripts/cairn-lifecycle-layout.mjs +69 -0
- package/scripts/cairn-lifecycle-staging.mjs +45 -30
- package/scripts/cairn-lifecycle-transaction-journal.mjs +50 -7
- package/scripts/cairn-lifecycle.mjs +148 -45
- package/scripts/cairn-paths.mjs +12 -0
- package/scripts/cairn-state-context.mjs +25 -0
- package/scripts/cairn-state.mjs +54 -21
- package/scripts/cairn-update-state.mjs +219 -0
- package/scripts/cairn.mjs +13 -8
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { spawn as spawnProcess } from "node:child_process";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
import { lstatSync, mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { lstat, rm, rmdir } from "node:fs/promises";
|
|
5
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
6
|
+
import { cairnHome, installManifestPath, installRoot } from "./cairn-paths.mjs";
|
|
7
|
+
|
|
8
|
+
// Auto-upgrade state shared by the SessionStart hook and the detached runner. The hook only reads small files here,
|
|
9
|
+
// claims a pending notice, and spawns the runner; it never touches the network, a lock, or the installation.
|
|
10
|
+
export const UPDATE_PACKAGE_NAME = "cairn-ai";
|
|
11
|
+
export const CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000;
|
|
12
|
+
export const NOTICE_MAX_AGE_MS = 14 * 24 * 60 * 60 * 1000;
|
|
13
|
+
export const NOTICE_KINDS = ["updated", "failed", "manual"];
|
|
14
|
+
// Exit codes of `cairn-lifecycle.mjs upgrade --auto` besides 0 (done) and 1 (anything else). They are a contract
|
|
15
|
+
// between versions: the runner is the installed version and the lifecycle it starts is the new one.
|
|
16
|
+
// `manual`: the files are committed and only the Claude Code step (cache refresh, registration, a missing claude CLI)
|
|
17
|
+
// is left to the user.
|
|
18
|
+
export const AUTO_UPGRADE_EXIT = Object.freeze({ manual: 3 });
|
|
19
|
+
const UPDATE_SCHEMA_VERSION = 1;
|
|
20
|
+
const SMALL_FILE_LIMIT = 64 * 1024;
|
|
21
|
+
const MANIFEST_FILE_LIMIT = 1024 * 1024;
|
|
22
|
+
const OFF_VALUES = new Set(["0", "false", "off", "no"]);
|
|
23
|
+
const INSTALLED_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
|
|
24
|
+
|
|
25
|
+
export function updatePaths(env = process.env) {
|
|
26
|
+
const home = cairnHome(env);
|
|
27
|
+
const root = join(home, "update");
|
|
28
|
+
return {
|
|
29
|
+
home,
|
|
30
|
+
root,
|
|
31
|
+
config: join(home, "config.json"),
|
|
32
|
+
state: join(root, "state.json"),
|
|
33
|
+
notice: join(root, "notice.json"),
|
|
34
|
+
log: join(root, "last-run.log"),
|
|
35
|
+
lock: join(root, "update.lock"),
|
|
36
|
+
stage: join(root, "stage"),
|
|
37
|
+
manifest: installManifestPath(env),
|
|
38
|
+
runtimeParent: join(installRoot(env), "runtime"),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// A regular file at most `limit` bytes, parsed as JSON. Symlinks, directories, oversized and malformed files are
|
|
43
|
+
// "invalid"; only a missing file is "missing".
|
|
44
|
+
export function readJsonFile(path, limit = SMALL_FILE_LIMIT) {
|
|
45
|
+
let info;
|
|
46
|
+
try { info = lstatSync(path); } catch (error) { return { status: error?.code === "ENOENT" ? "missing" : "invalid" }; }
|
|
47
|
+
if (!info.isFile() || info.size > limit) return { status: "invalid" };
|
|
48
|
+
try { return { status: "ok", value: JSON.parse(readFileSync(path, "utf8")) }; } catch { return { status: "invalid" }; }
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function writeJsonAtomic(path, value) {
|
|
52
|
+
writeFileAtomic(path, `${JSON.stringify(value, null, 2)}\n`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function writeFileAtomic(path, text) {
|
|
56
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
57
|
+
const temporary = `${path}.${process.pid}.${randomUUID()}.tmp`;
|
|
58
|
+
try {
|
|
59
|
+
writeFileSync(temporary, text, { flag: "wx" });
|
|
60
|
+
renameSync(temporary, path);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
rmSync(temporary, { force: true });
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// On by default. CAIRN_AUTO_UPGRADE=0|false|off|no or config.json `autoUpgrade: false` turns it off, and so does a
|
|
68
|
+
// config.json that cannot be read or has the wrong shape: an unclear setting never starts an install.
|
|
69
|
+
export function autoUpgradeSetting(env = process.env, paths = updatePaths(env)) {
|
|
70
|
+
const raw = env.CAIRN_AUTO_UPGRADE;
|
|
71
|
+
if (typeof raw === "string" && OFF_VALUES.has(raw.trim().toLowerCase())) return { enabled: false, source: "env" };
|
|
72
|
+
const config = readJsonFile(paths.config);
|
|
73
|
+
if (config.status === "missing") return { enabled: true, source: "default" };
|
|
74
|
+
if (config.status !== "ok" || !isPlainObject(config.value)) return { enabled: false, source: "invalid-config" };
|
|
75
|
+
const value = config.value.autoUpgrade;
|
|
76
|
+
if (value === undefined) return { enabled: true, source: "default" };
|
|
77
|
+
if (typeof value !== "boolean") return { enabled: false, source: "invalid-config" };
|
|
78
|
+
return { enabled: value, source: "config" };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function readInstallManifest(paths) {
|
|
82
|
+
const read = readJsonFile(paths.manifest, MANIFEST_FILE_LIMIT);
|
|
83
|
+
const manifest = read.status === "ok" ? read.value : null;
|
|
84
|
+
if (manifest?.schemaVersion !== 2 || manifest.plugin !== "cairn" || typeof manifest.version !== "string"
|
|
85
|
+
|| !INSTALLED_VERSION.test(manifest.version) || !["checkout", "package"].includes(manifest.origin)) return null;
|
|
86
|
+
return { version: manifest.version, installedAt: manifest.installedAt, origin: manifest.origin };
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function readUpdateState(paths) {
|
|
90
|
+
const read = readJsonFile(paths.state);
|
|
91
|
+
return read.status === "ok" && isPlainObject(read.value) && read.value.schemaVersion === UPDATE_SCHEMA_VERSION ? read.value : null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function readPendingNotice(paths) {
|
|
95
|
+
const read = readJsonFile(paths.notice);
|
|
96
|
+
return read.status === "ok" && validNotice(read.value) ? read.value : null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function emptyUpdateState() {
|
|
100
|
+
return {
|
|
101
|
+
schemaVersion: UPDATE_SCHEMA_VERSION, lastCheckedAt: null, latestSeen: null, consecutiveFailures: 0,
|
|
102
|
+
nextAttemptAt: null, failedVersion: null, lastResult: null,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function noticeRecord(kind, from, to, at) {
|
|
107
|
+
return { schemaVersion: UPDATE_SCHEMA_VERSION, kind, from, to, at };
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// The hook runs from an installed runtime only when its own .cairn-runtime.json points at <install>/runtime/<version>.
|
|
111
|
+
// A source checkout has no locator there, so it reads and writes nothing else.
|
|
112
|
+
export function runningInstall(pluginRoot, paths) {
|
|
113
|
+
if (typeof pluginRoot !== "string") return null;
|
|
114
|
+
const locator = readJsonFile(join(pluginRoot, ".cairn-runtime.json"));
|
|
115
|
+
if (locator.status !== "ok" || locator.value?.plugin !== "cairn" || typeof locator.value.pluginRoot !== "string") return null;
|
|
116
|
+
const version = childName(paths.runtimeParent, locator.value.pluginRoot);
|
|
117
|
+
if (!version || !INSTALLED_VERSION.test(version)) return null;
|
|
118
|
+
return { runtimeRoot: join(paths.runtimeParent, version), version };
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Due once a day after the later of the last check and the install; a recorded backoff can only push it further out.
|
|
122
|
+
export function checkDue({ state, manifest, now }) {
|
|
123
|
+
const time = now.getTime();
|
|
124
|
+
const next = Date.parse(state?.nextAttemptAt ?? "");
|
|
125
|
+
if (Number.isFinite(next) && time < next) return false;
|
|
126
|
+
const since = Math.max(...[state?.lastCheckedAt, manifest?.installedAt].map((value) => Date.parse(value ?? "")).filter(Number.isFinite));
|
|
127
|
+
return !Number.isFinite(since) || time - since >= CHECK_INTERVAL_MS;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// SessionStart: claim at most one pending notice, then start the runner when a check is due. Returns the claimed
|
|
131
|
+
// notice or null. Callers swallow errors so the capsule and exit code never depend on this step.
|
|
132
|
+
export function sessionStartUpdate({ env = process.env, now = new Date(), spawn = spawnProcess, pluginRoot } = {}) {
|
|
133
|
+
const paths = updatePaths(env);
|
|
134
|
+
const running = runningInstall(pluginRoot, paths);
|
|
135
|
+
if (!running) return null;
|
|
136
|
+
let notice = null;
|
|
137
|
+
try { notice = claimNotice(paths, { runningVersion: running.version, now }); } catch { notice = null; }
|
|
138
|
+
try { startRunnerWhenDue({ env, now, spawn, paths, running }); } catch { /* the next session tries again */ }
|
|
139
|
+
return notice;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function startRunnerWhenDue({ env, now, spawn, paths, running }) {
|
|
143
|
+
if (!autoUpgradeSetting(env, paths).enabled) return;
|
|
144
|
+
const manifest = readInstallManifest(paths);
|
|
145
|
+
// Only the canonical runtime of the installed version starts a runner; a retained runtime or a checkout install never does.
|
|
146
|
+
if (!manifest || manifest.origin !== "package" || manifest.version !== running.version) return;
|
|
147
|
+
if (!checkDue({ state: readUpdateState(paths), manifest, now })) return;
|
|
148
|
+
// stdio "ignore" keeps the hook's stdout pipe closed so the host does not wait for the runner; the error listener
|
|
149
|
+
// keeps a failed spawn from becoming an uncaught exception in the hook.
|
|
150
|
+
const child = spawn(process.execPath, [join(running.runtimeRoot, "scripts", "cairn-auto-upgrade.mjs"), "run"], {
|
|
151
|
+
cwd: paths.home, env, detached: true, stdio: "ignore", windowsHide: true,
|
|
152
|
+
});
|
|
153
|
+
child?.on?.("error", () => {});
|
|
154
|
+
child?.unref?.();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// `updated` is shown only by a session that runs the new version; `failed` and `manual` by any installed version.
|
|
158
|
+
// The first session to rename the file shows it; notices older than 14 days are dropped silently.
|
|
159
|
+
export function claimNotice(paths, { runningVersion, now = new Date() }) {
|
|
160
|
+
const read = readJsonFile(paths.notice);
|
|
161
|
+
if (read.status === "missing") return null;
|
|
162
|
+
if (read.status !== "ok" || !validNotice(read.value) || now.getTime() - Date.parse(read.value.at) > NOTICE_MAX_AGE_MS) {
|
|
163
|
+
rmSync(paths.notice, { force: true });
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
if (!noticeShownBy(read.value, runningVersion)) return null;
|
|
167
|
+
const claimed = `${paths.notice}.${randomUUID()}.claimed`;
|
|
168
|
+
try { renameSync(paths.notice, claimed); } catch { return null; }
|
|
169
|
+
try {
|
|
170
|
+
const value = readJsonFile(claimed).value;
|
|
171
|
+
if (validNotice(value) && noticeShownBy(value, runningVersion)) return value;
|
|
172
|
+
// A runner replaced the notice between the read and the rename; put the newer one back for its own session.
|
|
173
|
+
try { lstatSync(paths.notice); } catch { renameSync(claimed, paths.notice); }
|
|
174
|
+
return null;
|
|
175
|
+
} finally {
|
|
176
|
+
rmSync(claimed, { force: true });
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function noticeShownBy(notice, runningVersion) {
|
|
181
|
+
return notice.kind !== "updated" || notice.to === runningVersion;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function validNotice(value) {
|
|
185
|
+
return isPlainObject(value) && value.schemaVersion === UPDATE_SCHEMA_VERSION && NOTICE_KINDS.includes(value.kind)
|
|
186
|
+
&& typeof value.to === "string" && typeof value.from === "string" && Number.isFinite(Date.parse(value.at ?? ""));
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Called by uninstall after the lifecycle lock is released: the known update files and the runner's stage go, and the
|
|
190
|
+
// directory is removed when empty. config.json and projects/ stay. A running runner (its lock present) keeps its stage.
|
|
191
|
+
export async function removeUpdateState(env = process.env) {
|
|
192
|
+
const paths = updatePaths(env);
|
|
193
|
+
try {
|
|
194
|
+
if (!(await lstat(paths.root)).isDirectory()) return;
|
|
195
|
+
} catch (error) {
|
|
196
|
+
if (error?.code === "ENOENT") return;
|
|
197
|
+
throw error;
|
|
198
|
+
}
|
|
199
|
+
for (const path of [paths.state, paths.notice, paths.log]) await rm(path, { force: true });
|
|
200
|
+
let locked = true;
|
|
201
|
+
try { await lstat(paths.lock); } catch (error) { if (error?.code === "ENOENT") locked = false; else throw error; }
|
|
202
|
+
if (!locked) await rm(paths.stage, { recursive: true, force: true });
|
|
203
|
+
try { await rmdir(paths.root); } catch (error) { if (!["ENOENT", "ENOTEMPTY", "EEXIST"].includes(error?.code)) throw error; }
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function childName(parent, child) {
|
|
207
|
+
const direct = singleSegment(relative(resolve(parent), resolve(child)));
|
|
208
|
+
if (direct) return direct;
|
|
209
|
+
try { return singleSegment(relative(realpathSync(parent), realpathSync(child))); } catch { return null; }
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function singleSegment(relation) {
|
|
213
|
+
if (!relation || relation === ".." || relation.startsWith(`..${sep}`) || isAbsolute(relation) || relation.includes(sep)) return null;
|
|
214
|
+
return relation;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function isPlainObject(value) {
|
|
218
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
219
|
+
}
|
package/scripts/cairn.mjs
CHANGED
|
@@ -75,6 +75,11 @@ export async function main(command = "help", args = [], { runner = spawnSync } =
|
|
|
75
75
|
process.exitCode = result.status ?? 1;
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
+
if (command === "auto-upgrade") {
|
|
79
|
+
const result = runner(process.execPath, [join(scriptDir, "cairn-auto-upgrade.mjs"), ...args], { stdio: "inherit" });
|
|
80
|
+
process.exitCode = result.status ?? 1;
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
78
83
|
if (command === "cleanup") {
|
|
79
84
|
const result = runner(process.execPath, [join(scriptDir, "cairn-cleanup.mjs"), ...args], { stdio: "inherit" });
|
|
80
85
|
process.exitCode = result.status ?? 1;
|
|
@@ -131,56 +136,56 @@ const messages = {
|
|
|
131
136
|
plan: `Use the cairn-plan skill before non-trivial implementation. Read project-root MEMORY.md first when present; if absent, continue without repository memory. Understand the whole work first, then classify it into executable tasks and sub-tasks. Keep PLAN.md as an index, write detailed plans to docs/plan/<topic>.md, and record Light/Heavy Path triage before any mutation. ${stagedTriagePolicy} ${reasoningEffortPolicy} ${artifactLocalePolicy} ${planExecutionPolicy} ${planIndexPolicy}`,
|
|
132
137
|
work: `Use cairn-work only after a plan exists. Read root MEMORY.md when present and continue without it when absent. ${tokenEfficientWorkPolicy} Execute one task through its recorded Light/Heavy Path. ${stagedTriagePolicy} ${reasoningEffortPolicy} ${workExecutionPolicy} ${artifactLocalePolicy} Resume active work after side questions unless asked to pause, stop, or switch.`,
|
|
133
138
|
review: `Use the cairn-review skill. Compare evidence against PLAN.md and MEMORY.md. ${artifactLocalePolicy}`,
|
|
134
|
-
usage: "Usage: cairn install|upgrade|doctor|uninstall|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
139
|
+
usage: "Usage: cairn install|upgrade|doctor|uninstall|auto-upgrade|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
135
140
|
},
|
|
136
141
|
ko: {
|
|
137
142
|
memory: `cairn-memory 스킬을 사용하세요. MEMORY.md는 짧은 색인으로, 상세 내용은 docs/memory/<domain>.md에 기록합니다. ${artifactLocalePolicyKo} ${memoryIndexPolicy}`,
|
|
138
143
|
plan: `중요 구현 전에는 cairn-plan 스킬을 사용하세요. 프로젝트 루트 MEMORY.md가 있으면 먼저 읽고, 없으면 저장소 메모리 없이 계속 진행합니다. 먼저 전체 작업을 파악한 뒤 실행 가능한 task와 필요한 sub-task로 분류합니다. PLAN.md는 색인으로, 상세 계획은 docs/plan/<topic>.md에 기록하며 파일 변경 전 Light/Heavy Path 트리아지를 남깁니다. ${stagedTriagePolicyKo} ${reasoningEffortPolicy} ${artifactLocalePolicyKo} ${planExecutionPolicy} ${planIndexPolicy}`,
|
|
139
144
|
work: `계획이 있으면 cairn-work를 사용하세요. 루트 MEMORY.md가 있으면 읽고 없으면 무시하고 진행합니다. ${tokenEfficientWorkPolicy} 기록된 Light/Heavy Path로 한 task를 수행합니다. ${stagedTriagePolicyKo} ${reasoningEffortPolicy} ${workExecutionPolicy} ${artifactLocalePolicyKo} 곁가지 질문 뒤에는 일시중지·중단·전환 요청이 없으면 active work를 재개합니다.`,
|
|
140
145
|
review: `cairn-review 스킬을 사용하세요. PLAN.md와 MEMORY.md 기준으로 증거를 비교합니다. ${artifactLocalePolicyKo}`,
|
|
141
|
-
usage: "사용법: cairn install|upgrade|doctor|uninstall|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
146
|
+
usage: "사용법: cairn install|upgrade|doctor|uninstall|auto-upgrade|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
142
147
|
},
|
|
143
148
|
ja: {
|
|
144
149
|
memory: `cairn-memory スキルを使用してください。MEMORY.md は短い索引にし、詳細は docs/memory/<domain>.md に記録します。${artifactLocalePolicy} ${memoryIndexPolicy}`,
|
|
145
150
|
plan: `cairn-plan スキルを使用してください。PLAN.md は索引にし、詳細計画は docs/plan/<topic>.md に記録します。${reasoningEffortPolicy} ${artifactLocalePolicy} ${planExecutionPolicy} ${planIndexPolicy}`,
|
|
146
151
|
work: `cairn-work スキルを使用してください。1つのモジュールスライスを実行し、モジュール証拠と表面証拠を取得します。${tokenEfficientWorkPolicy} ${reasoningEffortPolicy} ${workExecutionPolicy} ${artifactLocalePolicy}`,
|
|
147
152
|
review: `cairn-review スキルを使用してください。PLAN.md と MEMORY.md に照らして証拠を比較します。${artifactLocalePolicy}`,
|
|
148
|
-
usage: "使い方: cairn install|upgrade|doctor|uninstall|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
153
|
+
usage: "使い方: cairn install|upgrade|doctor|uninstall|auto-upgrade|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
149
154
|
},
|
|
150
155
|
zh: {
|
|
151
156
|
memory: `使用 cairn-memory skill。将 MEMORY.md 保持为简短索引,并将详细内容写入 docs/memory/<domain>.md。${artifactLocalePolicy} ${memoryIndexPolicy}`,
|
|
152
157
|
plan: `使用 cairn-plan skill。将 PLAN.md 保持为索引,并将详细计划写入 docs/plan/<topic>.md。${reasoningEffortPolicy} ${artifactLocalePolicy} ${planExecutionPolicy} ${planIndexPolicy}`,
|
|
153
158
|
work: `使用 cairn-work skill。执行一个模块切片,并收集模块证据。${tokenEfficientWorkPolicy} ${reasoningEffortPolicy} ${workExecutionPolicy} ${artifactLocalePolicy}`,
|
|
154
159
|
review: `使用 cairn-review skill。根据 PLAN.md 和 MEMORY.md 对比证据。${artifactLocalePolicy}`,
|
|
155
|
-
usage: "用法: cairn install|upgrade|doctor|uninstall|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
160
|
+
usage: "用法: cairn install|upgrade|doctor|uninstall|auto-upgrade|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
156
161
|
},
|
|
157
162
|
es: {
|
|
158
163
|
memory: `Usa la skill cairn-memory. Mantén MEMORY.md como un índice breve y escribe los detalles en docs/memory/<domain>.md. ${artifactLocalePolicy} ${memoryIndexPolicy}`,
|
|
159
164
|
plan: `Usa la skill cairn-plan. Mantén PLAN.md como índice y escribe los planes detallados en docs/plan/<topic>.md. ${reasoningEffortPolicy} ${artifactLocalePolicy} ${planExecutionPolicy} ${planIndexPolicy}`,
|
|
160
165
|
work: `Usa la skill cairn-work. Ejecuta un solo segmento de módulo y captura evidencia de módulo y de superficie. ${tokenEfficientWorkPolicy} ${reasoningEffortPolicy} ${workExecutionPolicy} ${artifactLocalePolicy}`,
|
|
161
166
|
review: `Usa la skill cairn-review. Compara la evidencia con PLAN.md y MEMORY.md. ${artifactLocalePolicy}`,
|
|
162
|
-
usage: "Uso: cairn install|upgrade|doctor|uninstall|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
167
|
+
usage: "Uso: cairn install|upgrade|doctor|uninstall|auto-upgrade|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
163
168
|
},
|
|
164
169
|
fr: {
|
|
165
170
|
memory: `Utilisez la skill cairn-memory. Gardez MEMORY.md comme index court et écrivez les détails dans docs/memory/<domain>.md. ${artifactLocalePolicy} ${memoryIndexPolicy}`,
|
|
166
171
|
plan: `Utilisez la skill cairn-plan. Gardez MEMORY.md comme index et écrivez les plans détaillés dans docs/plan/<topic>.md. ${reasoningEffortPolicy} ${artifactLocalePolicy} ${planExecutionPolicy} ${planIndexPolicy}`,
|
|
167
172
|
work: `Utilisez la skill cairn-work. Exécutez une tranche de module et capturez les preuves de module et de surface. ${tokenEfficientWorkPolicy} ${reasoningEffortPolicy} ${workExecutionPolicy} ${artifactLocalePolicy}`,
|
|
168
173
|
review: `Utilisez la skill cairn-review. Comparez les preuves avec PLAN.md et MEMORY.md. ${artifactLocalePolicy}`,
|
|
169
|
-
usage: "Utilisation: cairn install|upgrade|doctor|uninstall|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
174
|
+
usage: "Utilisation: cairn install|upgrade|doctor|uninstall|auto-upgrade|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
170
175
|
},
|
|
171
176
|
de: {
|
|
172
177
|
memory: `Verwenden Sie die Skill cairn-memory. Halten Sie MEMORY.md als kurzen Index und schreiben Sie Details nach docs/memory/<domain>.md. ${artifactLocalePolicy} ${memoryIndexPolicy}`,
|
|
173
178
|
plan: `Verwenden Sie die Skill cairn-plan. Halten Sie MEMORY.md als Index und schreiben Sie Detailpläne nach docs/plan/<topic>.md. ${reasoningEffortPolicy} ${artifactLocalePolicy} ${planExecutionPolicy} ${planIndexPolicy}`,
|
|
174
179
|
work: `Verwenden Sie die Skill cairn-work. Führen Sie einen Modulabschnitt aus und erfassen Sie Modul- und Oberflächenbelege. ${tokenEfficientWorkPolicy} ${reasoningEffortPolicy} ${workExecutionPolicy} ${artifactLocalePolicy}`,
|
|
175
180
|
review: `Verwenden Sie die Skill cairn-review. Vergleichen Sie Belege mit PLAN.md und MEMORY.md. ${artifactLocalePolicy}`,
|
|
176
|
-
usage: "Verwendung: cairn install|upgrade|doctor|uninstall|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
181
|
+
usage: "Verwendung: cairn install|upgrade|doctor|uninstall|auto-upgrade|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
177
182
|
},
|
|
178
183
|
pt: {
|
|
179
184
|
memory: `Use a skill cairn-memory. Mantenha MEMORY.md como um índice curto e escreva detalhes em docs/memory/<domain>.md. ${artifactLocalePolicy} ${memoryIndexPolicy}`,
|
|
180
185
|
plan: `Use a skill cairn-plan. Mantenha MEMORY.md como índice e escreva planos detalhados em docs/plan/<topic>.md. ${reasoningEffortPolicy} ${artifactLocalePolicy} ${planExecutionPolicy} ${planIndexPolicy}`,
|
|
181
186
|
work: `Use a skill cairn-work. Execute uma fatia de módulo e capture evidências de módulo e de superfície. ${tokenEfficientWorkPolicy} ${reasoningEffortPolicy} ${workExecutionPolicy} ${artifactLocalePolicy}`,
|
|
182
187
|
review: `Use a skill cairn-review. Compare evidências com PLAN.md e MEMORY.md. ${artifactLocalePolicy}`,
|
|
183
|
-
usage: "Uso: cairn install|upgrade|doctor|uninstall|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
188
|
+
usage: "Uso: cairn install|upgrade|doctor|uninstall|auto-upgrade|cleanup|init|memory|plan|work|review|toolcheck|goal|task",
|
|
184
189
|
},
|
|
185
190
|
};
|
|
186
191
|
|