cairn-ai 0.1.10 → 0.1.11
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-memory.md +1 -1
- package/.agents/workflows/cairn-plan.md +1 -1
- package/.agents/workflows/cairn-review.md +1 -1
- package/.agents/workflows/cairn-work.md +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.de.md +1 -1
- package/README.es.md +1 -1
- package/README.fr.md +1 -1
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/README.pt.md +1 -1
- package/README.zh.md +1 -1
- package/commands/cairn-memory.md +1 -1
- package/commands/cairn-plan.md +1 -1
- package/commands/cairn-review.md +1 -1
- package/commands/cairn-work.md +1 -1
- package/docs/model-guidance/README.md +1 -1
- package/docs/model-guidance/claude.md +1 -1
- package/docs/model-guidance/codex.md +1 -1
- package/package.json +1 -1
- package/scripts/cairn-state.mjs +58 -4
- package/scripts/cairn-state.sh +68 -8
- package/scripts/cairn.mjs +34 -32
- package/skills/cairn-memory/SKILL.md +2 -2
- package/skills/cairn-plan/SKILL.md +3 -3
- package/skills/cairn-review/SKILL.md +2 -2
- package/skills/cairn-work/SKILL.md +2 -2
- package/templates/MEMORY.md +1 -1
- package/templates/PLAN.md +1 -0
- package/templates/work-plan.md +1 -1
|
@@ -12,4 +12,4 @@ Procedure:
|
|
|
12
12
|
4. Use `explorer` for read-only domain discovery and contradiction checks when available; use `worker` for exact references, command checks, and bounded evidence capture. When subagent tools are available, each agent may recursively delegate bounded sub-tasks to subagents. Tell every delegated agent and child subagent to read the project-root `MEMORY.md` before work, keep scope, and preserve others' edits.
|
|
13
13
|
5. Write details to `docs/memory/<domain>.md`.
|
|
14
14
|
6. Keep `MEMORY.md` as a short index.
|
|
15
|
-
7. Use the OS locale for user-visible
|
|
15
|
+
7. Use the OS locale for user-visible responses and generated or updated documentation, plans, and memory artifacts unless the user asks for another language.
|
|
@@ -20,4 +20,4 @@ Procedure:
|
|
|
20
20
|
12. Write `docs/plan/<topic>.md`.
|
|
21
21
|
13. Add the topic link and status to `PLAN.md`.
|
|
22
22
|
14. Put the selected Light/Heavy Path, checked Heavy Path signals, tool readiness, module acceptance verification, and surface integration verification on every module task.
|
|
23
|
-
15. Use the OS locale for user-visible
|
|
23
|
+
15. Use the OS locale for user-visible responses and generated or updated documentation, plans, and memory artifacts unless the user asks for another language.
|
|
@@ -11,4 +11,4 @@ Procedure:
|
|
|
11
11
|
3. Delegate independent read-only review to `explorer` when it materially improves speed or quality; use `worker` only for scoped verification reruns or QA artifacts. When subagent tools are available, each agent may recursively delegate bounded sub-tasks to subagents. Tell every delegated agent and child subagent to read the project-root `MEMORY.md` before work, keep scope, and preserve others' edits.
|
|
12
12
|
4. Report findings first, ordered by severity, with file and line references. If no issues are found, say so clearly and mention remaining test gaps or residual risk.
|
|
13
13
|
5. Record review evidence in `docs/plan/<topic>.md`.
|
|
14
|
-
6. Use the OS locale for user-visible
|
|
14
|
+
6. Use the OS locale for user-visible responses and generated or updated documentation, plans, and memory artifacts unless the user asks for another language.
|
|
@@ -19,4 +19,4 @@ Procedure:
|
|
|
19
19
|
11. Re-run surface integration verification.
|
|
20
20
|
12. Record tool readiness and verification evidence in `docs/plan/<topic>.md` and update `PLAN.md`.
|
|
21
21
|
13. If the user asks a side question, status question, or narrow clarification while this task is still active, answer it briefly and then resume the previous active work unless the user explicitly asks to pause, stop, or switch tasks.
|
|
22
|
-
14. Use the OS locale for user-visible
|
|
22
|
+
14. Use the OS locale for user-visible responses and generated or updated documentation, plans, and memory artifacts unless the user asks for another language.
|
package/README.de.md
CHANGED
|
@@ -119,7 +119,7 @@ Codex-only hooks werden nicht nach Antigravity portiert. Stattdessen laufen dies
|
|
|
119
119
|
|
|
120
120
|
## Locale Policy
|
|
121
121
|
|
|
122
|
-
Cairns reusable instructions sind für global use auf Englisch geschrieben. User-visible output
|
|
122
|
+
Cairns reusable instructions sind für global use auf Englisch geschrieben. User-visible output sowie erstellte oder aktualisierte documentation, plans und memory artifacts folgen der konfigurierten OS locale, sofern der user nicht ausdrücklich eine andere Sprache verlangt. Das umfasst Inhalte in `MEMORY.md`, `PLAN.md`, `docs/memory` und `docs/plan`. Die CLI lokalisiert common messages für `en`, `ko`, `ja`, `zh`, `es`, `fr`, `de` und `pt` und fällt bei unsupported locales auf English zurück. Codex hook `statusMessage` text bleibt static English, während hook command output English oder Korean ist.
|
|
123
123
|
|
|
124
124
|
## Delegation
|
|
125
125
|
|
package/README.es.md
CHANGED
|
@@ -119,7 +119,7 @@ Los hooks exclusivos de Codex no se portan a Antigravity. En su lugar, los mismo
|
|
|
119
119
|
|
|
120
120
|
## Locale Policy
|
|
121
121
|
|
|
122
|
-
Las instrucciones reutilizables de Cairn están escritas en inglés para uso global. El output visible para el usuario
|
|
122
|
+
Las instrucciones reutilizables de Cairn están escritas en inglés para uso global. El output visible para el usuario y la documentation, los plans y los memory artifacts generados o actualizados deben seguir el OS locale configurado, salvo que el usuario pida otro idioma explícitamente. Esto incluye el contenido de `MEMORY.md`, `PLAN.md`, `docs/memory` y `docs/plan`. La CLI localiza mensajes comunes para `en`, `ko`, `ja`, `zh`, `es`, `fr`, `de` y `pt`, y vuelve a English para locales no soportados. El texto `statusMessage` de Codex hooks permanece en inglés estático, mientras que hook command output es English o Korean.
|
|
123
123
|
|
|
124
124
|
## Delegation
|
|
125
125
|
|
package/README.fr.md
CHANGED
|
@@ -119,7 +119,7 @@ Les hooks propres à Codex ne sont pas portés vers Antigravity. À la place, le
|
|
|
119
119
|
|
|
120
120
|
## Locale Policy
|
|
121
121
|
|
|
122
|
-
Les instructions réutilisables de Cairn sont écrites en anglais pour un usage global. La sortie visible par l'utilisateur
|
|
122
|
+
Les instructions réutilisables de Cairn sont écrites en anglais pour un usage global. La sortie visible par l'utilisateur ainsi que la documentation, les plans et les artifacts mémoire générés ou mis à jour doivent suivre l'OS locale configurée, sauf si l'utilisateur demande explicitement une autre langue. Cela inclut le contenu de `MEMORY.md`, `PLAN.md`, `docs/memory` et `docs/plan`. La CLI localise les messages communs pour `en`, `ko`, `ja`, `zh`, `es`, `fr`, `de` et `pt`, puis revient à English pour les locales non prises en charge. Le texte `statusMessage` des Codex hooks reste en anglais statique, tandis que hook command output est English ou Korean.
|
|
123
123
|
|
|
124
124
|
## Delegation
|
|
125
125
|
|
package/README.ja.md
CHANGED
|
@@ -119,7 +119,7 @@ Codex-only hooks は Antigravity へ port されません。代わりに同じ p
|
|
|
119
119
|
|
|
120
120
|
## Locale Policy
|
|
121
121
|
|
|
122
|
-
Cairn の reusable instructions は global use のため英語で書かれています。user-visible output
|
|
122
|
+
Cairn の reusable instructions は global use のため英語で書かれています。user-visible output と生成または更新される documentation、plans、memory artifacts は、user が別の language を指定しない限り configured OS locale に従います。これには `MEMORY.md`、`PLAN.md`、`docs/memory`、`docs/plan` の内容が含まれます。CLI は `en`、`ko`、`ja`、`zh`、`es`、`fr`、`de`、`pt` の common messages を localize し、unsupported locales は English に fallback します。Codex hook `statusMessage` text は static English のまま、hook command output は English または Korean です。
|
|
123
123
|
|
|
124
124
|
## Delegation
|
|
125
125
|
|
package/README.ko.md
CHANGED
|
@@ -123,7 +123,7 @@ Codex 전용 hooks는 Antigravity로 포팅하지 않습니다. 대신 같은 pl
|
|
|
123
123
|
|
|
124
124
|
## Locale Policy
|
|
125
125
|
|
|
126
|
-
Cairn의 재사용 지침은 전역 사용을 위해 영어로 작성됩니다. 사용자에게 보이는
|
|
126
|
+
Cairn의 재사용 지침은 전역 사용을 위해 영어로 작성됩니다. 사용자에게 보이는 출력과 생성 또는 갱신되는 문서, 계획, 메모리 산출물은 사용자가 다른 언어를 명시하지 않는 한 설정된 OS locale을 따릅니다. 여기에는 `MEMORY.md`, `PLAN.md`, `docs/memory`, `docs/plan` 내용이 포함됩니다. CLI는 `en`, `ko`, `ja`, `zh`, `es`, `fr`, `de`, `pt`의 일반 메시지를 현지화하고, 지원하지 않는 locale은 영어로 fallback합니다. Codex hook `statusMessage` 텍스트는 정적 영어로 유지하고, hook command output은 영어 또는 한국어입니다.
|
|
127
127
|
|
|
128
128
|
## Delegation
|
|
129
129
|
|
package/README.md
CHANGED
|
@@ -131,7 +131,7 @@ Codex-only hooks are not ported to Antigravity. Instead, the same planning, memo
|
|
|
131
131
|
|
|
132
132
|
## Locale Policy
|
|
133
133
|
|
|
134
|
-
Cairn's reusable instructions are written in English for global use. User-visible output should follow the configured OS locale unless the user explicitly asks for another language. The CLI localizes common messages for `en`, `ko`, `ja`, `zh`, `es`, `fr`, `de`, and `pt`, and falls back to English for unsupported locales. Codex hook `statusMessage` text remains static English, while hook command output is English or Korean.
|
|
134
|
+
Cairn's reusable instructions are written in English for global use. User-visible output and generated or updated documentation, plans, and memory artifacts should follow the configured OS locale unless the user explicitly asks for another language. This includes `MEMORY.md`, `PLAN.md`, `docs/memory`, and `docs/plan` content. The CLI localizes common messages for `en`, `ko`, `ja`, `zh`, `es`, `fr`, `de`, and `pt`, and falls back to English for unsupported locales. Codex hook `statusMessage` text remains static English, while hook command output is English or Korean.
|
|
135
135
|
|
|
136
136
|
## Delegation
|
|
137
137
|
|
package/README.pt.md
CHANGED
|
@@ -119,7 +119,7 @@ Codex-only hooks nao sao portados para Antigravity. Em vez disso, os mesmos proc
|
|
|
119
119
|
|
|
120
120
|
## Locale Policy
|
|
121
121
|
|
|
122
|
-
As instrucoes reutilizaveis do Cairn sao escritas em English para global use. User-visible output
|
|
122
|
+
As instrucoes reutilizaveis do Cairn sao escritas em English para global use. User-visible output e documentation, plans e memory artifacts gerados ou atualizados devem seguir o OS locale configurado, a menos que o usuario peca explicitamente outro idioma. Isso inclui conteudo em `MEMORY.md`, `PLAN.md`, `docs/memory` e `docs/plan`. A CLI localiza mensagens comuns para `en`, `ko`, `ja`, `zh`, `es`, `fr`, `de` e `pt`, e volta para English em unsupported locales. O texto `statusMessage` dos Codex hooks permanece static English, enquanto hook command output e English ou Korean.
|
|
123
123
|
|
|
124
124
|
## Delegation
|
|
125
125
|
|
package/README.zh.md
CHANGED
|
@@ -119,7 +119,7 @@ Codex-only hooks 不会移植到 Antigravity。相同的 planning、memory、com
|
|
|
119
119
|
|
|
120
120
|
## Locale Policy
|
|
121
121
|
|
|
122
|
-
Cairn 的 reusable instructions 为了 global use 使用英文编写。除非用户明确要求其他语言,user-visible output 应遵循 configured OS locale
|
|
122
|
+
Cairn 的 reusable instructions 为了 global use 使用英文编写。除非用户明确要求其他语言,user-visible output 以及生成或更新的 documentation、plans、memory artifacts 应遵循 configured OS locale。这包括 `MEMORY.md`、`PLAN.md`、`docs/memory` 和 `docs/plan` 内容。CLI 会本地化 `en`、`ko`、`ja`、`zh`、`es`、`fr`、`de` 和 `pt` 的 common messages,不支持的 locales fallback 到 English。Codex hook `statusMessage` text 保持 static English,而 hook command output 为 English 或 Korean。
|
|
123
123
|
|
|
124
124
|
## Delegation
|
|
125
125
|
|
package/commands/cairn-memory.md
CHANGED
|
@@ -14,4 +14,4 @@ Procedure:
|
|
|
14
14
|
4. Use `explorer` for read-only domain discovery and contradiction checks when available; use `worker` for exact references, command checks, and bounded evidence capture. When subagent tools are available, each agent may recursively delegate bounded sub-tasks to subagents. Tell every delegated agent and child subagent to read the project-root `MEMORY.md` before work, keep scope, and preserve others' edits.
|
|
15
15
|
5. Write details to `docs/memory/<domain>.md`.
|
|
16
16
|
6. Keep `MEMORY.md` as a short index.
|
|
17
|
-
7. Use the OS locale for user-visible
|
|
17
|
+
7. Use the OS locale for user-visible responses and generated or updated documentation, plans, and memory artifacts unless the user asks for another language.
|
package/commands/cairn-plan.md
CHANGED
|
@@ -23,4 +23,4 @@ Procedure:
|
|
|
23
23
|
13. Add the topic link and status to `PLAN.md`.
|
|
24
24
|
14. Put the selected Light/Heavy Path, checked Heavy Path signals, tool readiness, module acceptance verification, and surface integration verification on every module task.
|
|
25
25
|
15. For Heavy Path, include an explicit automated test command and `Tests:` evidence line; Heavy Path completion must not rely on generic verification wording alone.
|
|
26
|
-
16. Use the OS locale for user-visible
|
|
26
|
+
16. Use the OS locale for user-visible responses and generated or updated documentation, plans, and memory artifacts unless the user asks for another language.
|
package/commands/cairn-review.md
CHANGED
|
@@ -13,4 +13,4 @@ Procedure:
|
|
|
13
13
|
3. Delegate independent read-only review to `explorer` when it materially improves speed or quality; use `worker` only for scoped verification reruns or QA artifacts. When subagent tools are available, each agent may recursively delegate bounded sub-tasks to subagents. Tell every delegated agent and child subagent to read the project-root `MEMORY.md` before work, keep scope, and preserve others' edits.
|
|
14
14
|
4. Report findings first, ordered by severity, with file and line references. If no issues are found, say so clearly and mention remaining test gaps or residual risk.
|
|
15
15
|
5. Record review evidence in `docs/plan/<topic>.md`.
|
|
16
|
-
6. Use the OS locale for user-visible
|
|
16
|
+
6. Use the OS locale for user-visible responses and generated or updated documentation, plans, and memory artifacts unless the user asks for another language.
|
package/commands/cairn-work.md
CHANGED
|
@@ -22,4 +22,4 @@ Procedure:
|
|
|
22
22
|
12. Re-run surface integration verification.
|
|
23
23
|
13. Record tool readiness and verification evidence in `docs/plan/<topic>.md` and update `PLAN.md`.
|
|
24
24
|
14. If the user asks a side question, status question, or narrow clarification while this task is still active, answer it briefly and then resume the previous active work unless the user explicitly asks to pause, stop, or switch tasks.
|
|
25
|
-
15. Use the OS locale for user-visible
|
|
25
|
+
15. Use the OS locale for user-visible responses and generated or updated documentation, plans, and memory artifacts unless the user asks for another language.
|
|
@@ -27,7 +27,7 @@ The goal is not to make prompts long by model. The goal is to stabilize the same
|
|
|
27
27
|
- Every implementation task must pass module acceptance verification and surface integration verification.
|
|
28
28
|
- Before mutating external state, run the closest available dry-run, check, plan, diff, validate, or equivalent command.
|
|
29
29
|
- Limit each task to two verification passes by default. After two failed passes, record the blocker or split it into sub-tasks instead of continuing a repeated loop.
|
|
30
|
-
- User-visible
|
|
30
|
+
- User-visible responses and generated or updated documentation, plans, and memory artifacts must follow the OS locale unless the user asks for another language.
|
|
31
31
|
|
|
32
32
|
## Delegation Defaults
|
|
33
33
|
|
|
@@ -20,7 +20,7 @@ Claude-family models are strong at long-context retention, policy interpretation
|
|
|
20
20
|
- Do not allow open-ended verification loops. Require a blocker or sub-task split after two failed passes.
|
|
21
21
|
- On Heavy Path, check plan gaps before implementation.
|
|
22
22
|
- Before asking the user, use repository evidence and available `explorer`/`worker` delegation when it materially improves speed or quality.
|
|
23
|
-
- Write user-visible
|
|
23
|
+
- Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.
|
|
24
24
|
|
|
25
25
|
## Path Guidance
|
|
26
26
|
|
|
@@ -25,7 +25,7 @@ Codex-family models are strong at small implementation tasks, explicit tool use,
|
|
|
25
25
|
- Do not trust success-looking output alone. Confirm real files, commands, and surface evidence.
|
|
26
26
|
- Do not skip LSP, typecheck, lint, dry-run, or verification because a tool is missing. Try repository-local installation or record the failed install attempt as a blocker.
|
|
27
27
|
- Do not continue an open-ended verification loop. Use at most two verification passes per task unless the plan records a risk-based exception.
|
|
28
|
-
- Write user-visible
|
|
28
|
+
- Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.
|
|
29
29
|
|
|
30
30
|
## Path Guidance
|
|
31
31
|
|
package/package.json
CHANGED
package/scripts/cairn-state.mjs
CHANGED
|
@@ -17,7 +17,7 @@ This file is a short index of persistent repository knowledge.
|
|
|
17
17
|
- Prefer precise repository exploration before implementation.
|
|
18
18
|
- Preserve proper nouns, file names, variable names, service names, alert names, MCP tool names, and agent names exactly as written.
|
|
19
19
|
- Read only the detailed memory files needed for the current task.
|
|
20
|
-
- Write user-visible responses and artifacts in the OS locale unless the user asks for another language.
|
|
20
|
+
- Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.
|
|
21
21
|
|
|
22
22
|
## Update Rules
|
|
23
23
|
|
|
@@ -26,6 +26,28 @@ This file is a short index of persistent repository knowledge.
|
|
|
26
26
|
- Record facts with source paths, commands, and observed behavior.
|
|
27
27
|
`;
|
|
28
28
|
|
|
29
|
+
const memoryTemplateKo = `# MEMORY
|
|
30
|
+
|
|
31
|
+
이 파일은 지속적으로 필요한 저장소 지식의 짧은 색인입니다.
|
|
32
|
+
|
|
33
|
+
## Domain Knowledge
|
|
34
|
+
|
|
35
|
+
- 자세한 기록은 \`docs/memory/\` 아래에 연결합니다.
|
|
36
|
+
|
|
37
|
+
## Policy
|
|
38
|
+
|
|
39
|
+
- 구현 전에는 저장소를 정확히 탐색합니다.
|
|
40
|
+
- 고유명사, 파일 이름, 변수 이름, 서비스 이름, 알림 이름, MCP 도구 이름, 에이전트 이름은 쓰인 그대로 보존합니다.
|
|
41
|
+
- 현재 작업에 필요한 상세 메모리 파일만 읽습니다.
|
|
42
|
+
- 사용자가 다른 언어를 요청하지 않는 한, 사용자에게 보이는 응답과 생성 또는 갱신하는 문서, 계획, 메모리 산출물은 OS locale 언어로 작성합니다.
|
|
43
|
+
|
|
44
|
+
## Update Rules
|
|
45
|
+
|
|
46
|
+
- 루트 파일은 짧게 유지합니다.
|
|
47
|
+
- 자세한 도메인 지식은 \`docs/memory/<domain>.md\`로 옮깁니다.
|
|
48
|
+
- 사실은 출처 경로, 명령, 관찰된 동작과 함께 기록합니다.
|
|
49
|
+
`;
|
|
50
|
+
|
|
29
51
|
const planTemplate = `# PLAN
|
|
30
52
|
|
|
31
53
|
This file is a short index of active and completed work plans.
|
|
@@ -51,11 +73,43 @@ This file is a short index of active and completed work plans.
|
|
|
51
73
|
- Module acceptance verification.
|
|
52
74
|
- Surface integration verification.
|
|
53
75
|
- Run dry-run or check mode before external-state mutation when available.
|
|
76
|
+
- Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.
|
|
54
77
|
- Use at most two verification passes per task by default.
|
|
55
78
|
- If a gate fails, diagnose once, shrink the task or split it into sub-tasks, and rerun both gates.
|
|
56
79
|
- After two failed passes, record the blocker in \`docs/plan/<topic>.md\`.
|
|
57
80
|
`;
|
|
58
81
|
|
|
82
|
+
const planTemplateKo = `# PLAN
|
|
83
|
+
|
|
84
|
+
이 파일은 진행 중이거나 완료된 작업 계획의 짧은 색인입니다.
|
|
85
|
+
|
|
86
|
+
## Active Plans
|
|
87
|
+
|
|
88
|
+
- 상세 계획은 \`docs/plan/\` 아래에 연결합니다.
|
|
89
|
+
|
|
90
|
+
## Completed Plans
|
|
91
|
+
|
|
92
|
+
- 완료된 주제는 증거 링크와 함께 이곳으로 옮깁니다.
|
|
93
|
+
|
|
94
|
+
## Planning Rules
|
|
95
|
+
|
|
96
|
+
- 모든 에이전트는 배정된 작업을 시작할 때 도메인 지식과 저장소 정책을 위해 프로젝트 루트 \`MEMORY.md\`를 먼저 읽어야 합니다.
|
|
97
|
+
- 계획은 구현 전에 의사결정이 완료된 상태여야 합니다.
|
|
98
|
+
- 에이전트, 플러그인, 위임 워크플로 지침을 적용하기 전에 복잡도 트리아지를 실행합니다.
|
|
99
|
+
- 선택한 Light Path 또는 Heavy Path와 확인한 Heavy Path 신호를 \`docs/plan/<topic>.md\`에 기록합니다.
|
|
100
|
+
- 구현은 작은 모듈 작업으로 나눕니다.
|
|
101
|
+
- 구현 전에 저장소 스택과 필요한 LSP/check 도구를 감지합니다.
|
|
102
|
+
- 필요한 도구가 없으면 사용할 수 없다고 판단하기 전에 설치 또는 부트스트랩을 시도합니다.
|
|
103
|
+
- 각 작업은 보통 정확히 두 게이트를 통과합니다.
|
|
104
|
+
- 모듈 수용 검증.
|
|
105
|
+
- 표면 통합 검증.
|
|
106
|
+
- 외부 상태 변경 전에는 가능한 경우 dry-run 또는 check mode를 실행합니다.
|
|
107
|
+
- 사용자가 다른 언어를 요청하지 않는 한, 사용자에게 보이는 응답과 생성 또는 갱신하는 문서, 계획, 메모리 산출물은 OS locale 언어로 작성합니다.
|
|
108
|
+
- 기본적으로 작업당 검증은 최대 두 번만 수행합니다.
|
|
109
|
+
- 게이트가 실패하면 한 번 진단하고, 작업을 줄이거나 sub-task로 나눈 뒤 두 게이트를 다시 실행합니다.
|
|
110
|
+
- 두 번 실패한 뒤에는 blocker를 \`docs/plan/<topic>.md\`에 기록합니다.
|
|
111
|
+
`;
|
|
112
|
+
|
|
59
113
|
if (isCliEntry()) {
|
|
60
114
|
const event = process.argv[2] ?? "manual";
|
|
61
115
|
const result = await runStateResult(event);
|
|
@@ -69,12 +123,12 @@ export async function runState(event = "manual", { root = process.env.HARNESS_RE
|
|
|
69
123
|
|
|
70
124
|
export async function runStateResult(event = "manual", { root = process.env.HARNESS_REPO_ROOT ?? process.cwd(), locale = localeValue() } = {}) {
|
|
71
125
|
const resolvedRoot = resolve(root);
|
|
126
|
+
const ko = locale.toLowerCase().startsWith("ko");
|
|
72
127
|
await mkdir(join(resolvedRoot, "docs", "memory"), { recursive: true });
|
|
73
128
|
await mkdir(join(resolvedRoot, "docs", "plan"), { recursive: true });
|
|
74
|
-
await writeIfMissing(join(resolvedRoot, "MEMORY.md"), memoryTemplate);
|
|
75
|
-
await writeIfMissing(join(resolvedRoot, "PLAN.md"), planTemplate);
|
|
129
|
+
await writeIfMissing(join(resolvedRoot, "MEMORY.md"), ko ? memoryTemplateKo : memoryTemplate);
|
|
130
|
+
await writeIfMissing(join(resolvedRoot, "PLAN.md"), ko ? planTemplateKo : planTemplate);
|
|
76
131
|
|
|
77
|
-
const ko = locale.toLowerCase().startsWith("ko");
|
|
78
132
|
if (event === "session-start" || event === "user-prompt-submit") {
|
|
79
133
|
return {
|
|
80
134
|
status: 0,
|
package/scripts/cairn-state.sh
CHANGED
|
@@ -10,7 +10,38 @@ mkdir -p "$root/docs/memory" "$root/docs/plan"
|
|
|
10
10
|
memory="$root/MEMORY.md"
|
|
11
11
|
plan="$root/PLAN.md"
|
|
12
12
|
|
|
13
|
+
is_ko() {
|
|
14
|
+
case "$locale" in
|
|
15
|
+
ko*|KO*) return 0 ;;
|
|
16
|
+
*) return 1 ;;
|
|
17
|
+
esac
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
if [ ! -f "$memory" ]; then
|
|
21
|
+
if is_ko; then
|
|
22
|
+
cat > "$memory" <<'EOF'
|
|
23
|
+
# MEMORY
|
|
24
|
+
|
|
25
|
+
이 파일은 지속적으로 필요한 저장소 지식의 짧은 색인입니다.
|
|
26
|
+
|
|
27
|
+
## Domain Knowledge
|
|
28
|
+
|
|
29
|
+
- 자세한 기록은 `docs/memory/` 아래에 연결합니다.
|
|
30
|
+
|
|
31
|
+
## Policy
|
|
32
|
+
|
|
33
|
+
- 구현 전에는 저장소를 정확히 탐색합니다.
|
|
34
|
+
- 고유명사, 파일 이름, 변수 이름, 서비스 이름, 알림 이름, MCP 도구 이름, 에이전트 이름은 쓰인 그대로 보존합니다.
|
|
35
|
+
- 현재 작업에 필요한 상세 메모리 파일만 읽습니다.
|
|
36
|
+
- 사용자가 다른 언어를 요청하지 않는 한, 사용자에게 보이는 응답과 생성 또는 갱신하는 문서, 계획, 메모리 산출물은 OS locale 언어로 작성합니다.
|
|
37
|
+
|
|
38
|
+
## Update Rules
|
|
39
|
+
|
|
40
|
+
- 루트 파일은 짧게 유지합니다.
|
|
41
|
+
- 자세한 도메인 지식은 `docs/memory/<domain>.md`로 옮깁니다.
|
|
42
|
+
- 사실은 출처 경로, 명령, 관찰된 동작과 함께 기록합니다.
|
|
43
|
+
EOF
|
|
44
|
+
else
|
|
14
45
|
cat > "$memory" <<'EOF'
|
|
15
46
|
# MEMORY
|
|
16
47
|
|
|
@@ -25,7 +56,7 @@ This file is a short index of persistent repository knowledge.
|
|
|
25
56
|
- Prefer precise repository exploration before implementation.
|
|
26
57
|
- Preserve proper nouns, file names, variable names, service names, alert names, MCP tool names, and agent names exactly as written.
|
|
27
58
|
- Read only the detailed memory files needed for the current task.
|
|
28
|
-
- Write user-visible responses and artifacts in the OS locale unless the user asks for another language.
|
|
59
|
+
- Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.
|
|
29
60
|
|
|
30
61
|
## Update Rules
|
|
31
62
|
|
|
@@ -33,9 +64,43 @@ This file is a short index of persistent repository knowledge.
|
|
|
33
64
|
- Move detailed domain knowledge to `docs/memory/<domain>.md`.
|
|
34
65
|
- Record facts with source paths, commands, and observed behavior.
|
|
35
66
|
EOF
|
|
67
|
+
fi
|
|
36
68
|
fi
|
|
37
69
|
|
|
38
70
|
if [ ! -f "$plan" ]; then
|
|
71
|
+
if is_ko; then
|
|
72
|
+
cat > "$plan" <<'EOF'
|
|
73
|
+
# PLAN
|
|
74
|
+
|
|
75
|
+
이 파일은 진행 중이거나 완료된 작업 계획의 짧은 색인입니다.
|
|
76
|
+
|
|
77
|
+
## Active Plans
|
|
78
|
+
|
|
79
|
+
- 상세 계획은 `docs/plan/` 아래에 연결합니다.
|
|
80
|
+
|
|
81
|
+
## Completed Plans
|
|
82
|
+
|
|
83
|
+
- 완료된 주제는 증거 링크와 함께 이곳으로 옮깁니다.
|
|
84
|
+
|
|
85
|
+
## Planning Rules
|
|
86
|
+
|
|
87
|
+
- 모든 에이전트는 배정된 작업을 시작할 때 도메인 지식과 저장소 정책을 위해 프로젝트 루트 `MEMORY.md`를 먼저 읽어야 합니다.
|
|
88
|
+
- 계획은 구현 전에 의사결정이 완료된 상태여야 합니다.
|
|
89
|
+
- 에이전트, 플러그인, 위임 워크플로 지침을 적용하기 전에 복잡도 트리아지를 실행합니다.
|
|
90
|
+
- 선택한 Light Path 또는 Heavy Path와 확인한 Heavy Path 신호를 `docs/plan/<topic>.md`에 기록합니다.
|
|
91
|
+
- 구현은 작은 모듈 작업으로 나눕니다.
|
|
92
|
+
- 구현 전에 저장소 스택과 필요한 LSP/check 도구를 감지합니다.
|
|
93
|
+
- 필요한 도구가 없으면 사용할 수 없다고 판단하기 전에 설치 또는 부트스트랩을 시도합니다.
|
|
94
|
+
- 각 작업은 보통 정확히 두 게이트를 통과합니다.
|
|
95
|
+
- 모듈 수용 검증.
|
|
96
|
+
- 표면 통합 검증.
|
|
97
|
+
- 외부 상태 변경 전에는 가능한 경우 dry-run 또는 check mode를 실행합니다.
|
|
98
|
+
- 사용자가 다른 언어를 요청하지 않는 한, 사용자에게 보이는 응답과 생성 또는 갱신하는 문서, 계획, 메모리 산출물은 OS locale 언어로 작성합니다.
|
|
99
|
+
- 기본적으로 작업당 검증은 최대 두 번만 수행합니다.
|
|
100
|
+
- 게이트가 실패하면 한 번 진단하고, 작업을 줄이거나 sub-task로 나눈 뒤 두 게이트를 다시 실행합니다.
|
|
101
|
+
- 두 번 실패한 뒤에는 blocker를 `docs/plan/<topic>.md`에 기록합니다.
|
|
102
|
+
EOF
|
|
103
|
+
else
|
|
39
104
|
cat > "$plan" <<'EOF'
|
|
40
105
|
# PLAN
|
|
41
106
|
|
|
@@ -60,19 +125,14 @@ This file is a short index of active and completed work plans.
|
|
|
60
125
|
- Module acceptance verification.
|
|
61
126
|
- Surface integration verification.
|
|
62
127
|
- Run dry-run or check mode before external-state mutation when available.
|
|
128
|
+
- Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.
|
|
63
129
|
- Use at most two verification passes per task by default.
|
|
64
130
|
- If a gate fails, diagnose once, shrink the task or split it into sub-tasks, and rerun both gates.
|
|
65
131
|
- After two failed passes, record the blocker in `docs/plan/<topic>.md`.
|
|
66
132
|
EOF
|
|
133
|
+
fi
|
|
67
134
|
fi
|
|
68
135
|
|
|
69
|
-
is_ko() {
|
|
70
|
-
case "$locale" in
|
|
71
|
-
ko*|KO*) return 0 ;;
|
|
72
|
-
*) return 1 ;;
|
|
73
|
-
esac
|
|
74
|
-
}
|
|
75
|
-
|
|
76
136
|
case "$event" in
|
|
77
137
|
session-start|user-prompt-submit)
|
|
78
138
|
if is_ko; then
|
package/scripts/cairn.mjs
CHANGED
|
@@ -58,62 +58,64 @@ function isCliEntry() {
|
|
|
58
58
|
|
|
59
59
|
const planExecutionPolicy = "The user-called/main agent is the orchestrator; implementation edits go to worker subagents whenever subagent tools are available. When the subagent tool provides a progress-reporting channel, subagents report status to the orchestrator when starting work, when deciding or confirming direction, during periodic progress, and when finishing; the orchestrator must immediately relay received status events to the user. If no mid-run reporting channel exists, the orchestrator relays observable events such as assignment, waiting, and final completion. When a delegated subagent finishes, it must provide its final report before leaving; after the orchestrator captures the final report and evidence, the orchestrator must close or release the completed subagent, then review the final report and evidence before marking the work complete. If subagent tools are unavailable, the main agent takes over implementation directly and records that takeover in evidence.";
|
|
60
60
|
const workExecutionPolicy = "The user-called/main agent orchestrates, while worker subagents perform implementation edits whenever subagent tools are available. When the subagent tool provides a progress-reporting channel, subagents report status to the orchestrator when starting work, when deciding or confirming direction, during periodic progress, and when finishing; the orchestrator must immediately relay received status events to the user. If no mid-run reporting channel exists, the orchestrator relays observable events such as assignment, waiting, and final completion. When a delegated subagent finishes, it must provide its final report before leaving; after the orchestrator captures the final report and evidence, the orchestrator must close or release the completed subagent, then review the final report and evidence before marking the work complete. If subagent tools are unavailable, the main agent takes over implementation directly and records that takeover in evidence.";
|
|
61
|
+
const artifactLocalePolicy = "Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.";
|
|
62
|
+
const artifactLocalePolicyKo = "사용자가 다른 언어를 요청하지 않는 한, 사용자에게 보이는 응답과 생성 또는 갱신하는 문서, 계획, 메모리 산출물은 OS locale 언어로 작성합니다.";
|
|
61
63
|
|
|
62
64
|
const messages = {
|
|
63
65
|
en: {
|
|
64
|
-
memory:
|
|
65
|
-
plan: `Use the cairn-plan skill before non-trivial implementation. Every agent must first read the project-root MEMORY.md for domain knowledge and repository policy. 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. ${planExecutionPolicy}`,
|
|
66
|
-
work: `Use the cairn-work skill only after a plan exists. Every agent must first read the project-root MEMORY.md for domain knowledge and repository policy. Execute one module task using the recorded Light/Heavy Path route: ${workExecutionPolicy} Capture dry-run/check, module, and surface evidence. If the user asks a side question while work is active, answer briefly and then resume unless they explicitly ask to pause, stop, or switch tasks.`,
|
|
67
|
-
review:
|
|
66
|
+
memory: `Use the cairn-memory skill. Keep MEMORY.md as a short index and write details to docs/memory/<domain>.md. ${artifactLocalePolicy}`,
|
|
67
|
+
plan: `Use the cairn-plan skill before non-trivial implementation. Every agent must first read the project-root MEMORY.md for domain knowledge and repository policy. 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. ${artifactLocalePolicy} ${planExecutionPolicy}`,
|
|
68
|
+
work: `Use the cairn-work skill only after a plan exists. Every agent must first read the project-root MEMORY.md for domain knowledge and repository policy. Execute one module task using the recorded Light/Heavy Path route: ${workExecutionPolicy} Capture dry-run/check, module, and surface evidence. ${artifactLocalePolicy} If the user asks a side question while work is active, answer briefly and then resume unless they explicitly ask to pause, stop, or switch tasks.`,
|
|
69
|
+
review: `Use the cairn-review skill. Compare evidence against PLAN.md and MEMORY.md. ${artifactLocalePolicy}`,
|
|
68
70
|
usage: "Usage: cairn install|upgrade|doctor|uninstall|init|memory|plan|work|review|toolcheck",
|
|
69
71
|
},
|
|
70
72
|
ko: {
|
|
71
|
-
memory:
|
|
72
|
-
plan: `중요 구현 전에는 cairn-plan 스킬을 사용하세요. 모든 에이전트는 도메인 지식과 저장소 정책을 위해 프로젝트 루트 MEMORY.md를 먼저 읽어야 합니다. 먼저 전체 작업을 파악한 뒤 실행 가능한 task와 필요한 sub-task로 분류합니다. PLAN.md는 색인으로, 상세 계획은 docs/plan/<topic>.md에 기록하며 파일 변경 전 Light/Heavy Path 트리아지를 남깁니다. ${planExecutionPolicy}`,
|
|
73
|
-
work: `계획이 있을 때만 cairn-work 스킬을 사용하세요. 모든 에이전트는 도메인 지식과 저장소 정책을 위해 프로젝트 루트 MEMORY.md를 먼저 읽어야 합니다. 기록된 Light/Heavy Path 경로로 하나의 모듈 작업을 실행합니다. ${workExecutionPolicy} dry-run/check, 모듈, 표면 증거를 확보합니다. 작업 중 사용자가 곁가지 질문을 하면 짧게 답한 뒤, 명시적으로 일시중지/중단/작업 전환을 요청한 경우가 아니면 이전 active work를 계속합니다.`,
|
|
74
|
-
review:
|
|
73
|
+
memory: `cairn-memory 스킬을 사용하세요. MEMORY.md는 짧은 색인으로, 상세 내용은 docs/memory/<domain>.md에 기록합니다. ${artifactLocalePolicyKo}`,
|
|
74
|
+
plan: `중요 구현 전에는 cairn-plan 스킬을 사용하세요. 모든 에이전트는 도메인 지식과 저장소 정책을 위해 프로젝트 루트 MEMORY.md를 먼저 읽어야 합니다. 먼저 전체 작업을 파악한 뒤 실행 가능한 task와 필요한 sub-task로 분류합니다. PLAN.md는 색인으로, 상세 계획은 docs/plan/<topic>.md에 기록하며 파일 변경 전 Light/Heavy Path 트리아지를 남깁니다. ${artifactLocalePolicyKo} ${planExecutionPolicy}`,
|
|
75
|
+
work: `계획이 있을 때만 cairn-work 스킬을 사용하세요. 모든 에이전트는 도메인 지식과 저장소 정책을 위해 프로젝트 루트 MEMORY.md를 먼저 읽어야 합니다. 기록된 Light/Heavy Path 경로로 하나의 모듈 작업을 실행합니다. ${workExecutionPolicy} dry-run/check, 모듈, 표면 증거를 확보합니다. ${artifactLocalePolicyKo} 작업 중 사용자가 곁가지 질문을 하면 짧게 답한 뒤, 명시적으로 일시중지/중단/작업 전환을 요청한 경우가 아니면 이전 active work를 계속합니다.`,
|
|
76
|
+
review: `cairn-review 스킬을 사용하세요. PLAN.md와 MEMORY.md 기준으로 증거를 비교합니다. ${artifactLocalePolicyKo}`,
|
|
75
77
|
usage: "사용법: cairn install|upgrade|doctor|uninstall|init|memory|plan|work|review|toolcheck",
|
|
76
78
|
},
|
|
77
79
|
ja: {
|
|
78
|
-
memory:
|
|
79
|
-
plan: `cairn-plan スキルを使用してください。PLAN.md は索引にし、詳細計画は docs/plan/<topic>.md に記録します。${planExecutionPolicy}`,
|
|
80
|
-
work: `cairn-work スキルを使用してください。1つのモジュールスライスを実行し、モジュール証拠と表面証拠を取得します。${workExecutionPolicy}`,
|
|
81
|
-
review:
|
|
80
|
+
memory: `cairn-memory スキルを使用してください。MEMORY.md は短い索引にし、詳細は docs/memory/<domain>.md に記録します。${artifactLocalePolicy}`,
|
|
81
|
+
plan: `cairn-plan スキルを使用してください。PLAN.md は索引にし、詳細計画は docs/plan/<topic>.md に記録します。${artifactLocalePolicy} ${planExecutionPolicy}`,
|
|
82
|
+
work: `cairn-work スキルを使用してください。1つのモジュールスライスを実行し、モジュール証拠と表面証拠を取得します。${workExecutionPolicy} ${artifactLocalePolicy}`,
|
|
83
|
+
review: `cairn-review スキルを使用してください。PLAN.md と MEMORY.md に照らして証拠を比較します。${artifactLocalePolicy}`,
|
|
82
84
|
usage: "使い方: cairn install|upgrade|doctor|uninstall|init|memory|plan|work|review|toolcheck",
|
|
83
85
|
},
|
|
84
86
|
zh: {
|
|
85
|
-
memory:
|
|
86
|
-
plan: `使用 cairn-plan skill。将 PLAN.md 保持为索引,并将详细计划写入 docs/plan/<topic>.md。${planExecutionPolicy}`,
|
|
87
|
-
work: `使用 cairn-work skill。执行一个模块切片,并收集模块证据。${workExecutionPolicy}`,
|
|
88
|
-
review:
|
|
87
|
+
memory: `使用 cairn-memory skill。将 MEMORY.md 保持为简短索引,并将详细内容写入 docs/memory/<domain>.md。${artifactLocalePolicy}`,
|
|
88
|
+
plan: `使用 cairn-plan skill。将 PLAN.md 保持为索引,并将详细计划写入 docs/plan/<topic>.md。${artifactLocalePolicy} ${planExecutionPolicy}`,
|
|
89
|
+
work: `使用 cairn-work skill。执行一个模块切片,并收集模块证据。${workExecutionPolicy} ${artifactLocalePolicy}`,
|
|
90
|
+
review: `使用 cairn-review skill。根据 PLAN.md 和 MEMORY.md 对比证据。${artifactLocalePolicy}`,
|
|
89
91
|
usage: "用法: cairn install|upgrade|doctor|uninstall|init|memory|plan|work|review|toolcheck",
|
|
90
92
|
},
|
|
91
93
|
es: {
|
|
92
|
-
memory:
|
|
93
|
-
plan: `Usa la skill cairn-plan. Mantén PLAN.md como índice y escribe los planes detallados en docs/plan/<topic>.md. ${planExecutionPolicy}`,
|
|
94
|
-
work: `Usa la skill cairn-work. Ejecuta un solo segmento de módulo y captura evidencia de módulo y de superficie. ${workExecutionPolicy}`,
|
|
95
|
-
review:
|
|
94
|
+
memory: `Usa la skill cairn-memory. Mantén MEMORY.md como un índice breve y escribe los detalles en docs/memory/<domain>.md. ${artifactLocalePolicy}`,
|
|
95
|
+
plan: `Usa la skill cairn-plan. Mantén PLAN.md como índice y escribe los planes detallados en docs/plan/<topic>.md. ${artifactLocalePolicy} ${planExecutionPolicy}`,
|
|
96
|
+
work: `Usa la skill cairn-work. Ejecuta un solo segmento de módulo y captura evidencia de módulo y de superficie. ${workExecutionPolicy} ${artifactLocalePolicy}`,
|
|
97
|
+
review: `Usa la skill cairn-review. Compara la evidencia con PLAN.md y MEMORY.md. ${artifactLocalePolicy}`,
|
|
96
98
|
usage: "Uso: cairn install|upgrade|doctor|uninstall|init|memory|plan|work|review|toolcheck",
|
|
97
99
|
},
|
|
98
100
|
fr: {
|
|
99
|
-
memory:
|
|
100
|
-
plan: `Utilisez la skill cairn-plan. Gardez MEMORY.md comme index et écrivez les plans détaillés dans docs/plan/<topic>.md. ${planExecutionPolicy}`,
|
|
101
|
-
work: `Utilisez la skill cairn-work. Exécutez une tranche de module et capturez les preuves de module et de surface. ${workExecutionPolicy}`,
|
|
102
|
-
review:
|
|
101
|
+
memory: `Utilisez la skill cairn-memory. Gardez MEMORY.md comme index court et écrivez les détails dans docs/memory/<domain>.md. ${artifactLocalePolicy}`,
|
|
102
|
+
plan: `Utilisez la skill cairn-plan. Gardez MEMORY.md comme index et écrivez les plans détaillés dans docs/plan/<topic>.md. ${artifactLocalePolicy} ${planExecutionPolicy}`,
|
|
103
|
+
work: `Utilisez la skill cairn-work. Exécutez une tranche de module et capturez les preuves de module et de surface. ${workExecutionPolicy} ${artifactLocalePolicy}`,
|
|
104
|
+
review: `Utilisez la skill cairn-review. Comparez les preuves avec PLAN.md et MEMORY.md. ${artifactLocalePolicy}`,
|
|
103
105
|
usage: "Utilisation: cairn install|upgrade|doctor|uninstall|init|memory|plan|work|review|toolcheck",
|
|
104
106
|
},
|
|
105
107
|
de: {
|
|
106
|
-
memory:
|
|
107
|
-
plan: `Verwenden Sie die Skill cairn-plan. Halten Sie MEMORY.md als Index und schreiben Sie Detailpläne nach docs/plan/<topic>.md. ${planExecutionPolicy}`,
|
|
108
|
-
work: `Verwenden Sie die Skill cairn-work. Führen Sie einen Modulabschnitt aus und erfassen Sie Modul- und Oberflächenbelege. ${workExecutionPolicy}`,
|
|
109
|
-
review:
|
|
108
|
+
memory: `Verwenden Sie die Skill cairn-memory. Halten Sie MEMORY.md als kurzen Index und schreiben Sie Details nach docs/memory/<domain>.md. ${artifactLocalePolicy}`,
|
|
109
|
+
plan: `Verwenden Sie die Skill cairn-plan. Halten Sie MEMORY.md als Index und schreiben Sie Detailpläne nach docs/plan/<topic>.md. ${artifactLocalePolicy} ${planExecutionPolicy}`,
|
|
110
|
+
work: `Verwenden Sie die Skill cairn-work. Führen Sie einen Modulabschnitt aus und erfassen Sie Modul- und Oberflächenbelege. ${workExecutionPolicy} ${artifactLocalePolicy}`,
|
|
111
|
+
review: `Verwenden Sie die Skill cairn-review. Vergleichen Sie Belege mit PLAN.md und MEMORY.md. ${artifactLocalePolicy}`,
|
|
110
112
|
usage: "Verwendung: cairn install|upgrade|doctor|uninstall|init|memory|plan|work|review|toolcheck",
|
|
111
113
|
},
|
|
112
114
|
pt: {
|
|
113
|
-
memory:
|
|
114
|
-
plan: `Use a skill cairn-plan. Mantenha MEMORY.md como índice e escreva planos detalhados em docs/plan/<topic>.md. ${planExecutionPolicy}`,
|
|
115
|
-
work: `Use a skill cairn-work. Execute uma fatia de módulo e capture evidências de módulo e de superfície. ${workExecutionPolicy}`,
|
|
116
|
-
review:
|
|
115
|
+
memory: `Use a skill cairn-memory. Mantenha MEMORY.md como um índice curto e escreva detalhes em docs/memory/<domain>.md. ${artifactLocalePolicy}`,
|
|
116
|
+
plan: `Use a skill cairn-plan. Mantenha MEMORY.md como índice e escreva planos detalhados em docs/plan/<topic>.md. ${artifactLocalePolicy} ${planExecutionPolicy}`,
|
|
117
|
+
work: `Use a skill cairn-work. Execute uma fatia de módulo e capture evidências de módulo e de superfície. ${workExecutionPolicy} ${artifactLocalePolicy}`,
|
|
118
|
+
review: `Use a skill cairn-review. Compare evidências com PLAN.md e MEMORY.md. ${artifactLocalePolicy}`,
|
|
117
119
|
usage: "Uso: cairn install|upgrade|doctor|uninstall|init|memory|plan|work|review|toolcheck",
|
|
118
120
|
},
|
|
119
121
|
};
|
|
@@ -25,7 +25,7 @@ When subagent tools are available, each agent may recursively delegate bounded s
|
|
|
25
25
|
- Recursive subagent delegation is allowed only for bounded sub-tasks when the current surface supports it.
|
|
26
26
|
4. Write detailed facts to `docs/memory/<domain>.md`.
|
|
27
27
|
5. Keep only one-line links and summaries in `MEMORY.md`.
|
|
28
|
-
6. Write user-visible
|
|
28
|
+
6. Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.
|
|
29
29
|
|
|
30
30
|
## Delegation Prompt Format
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ When subagent tools are available, each agent may recursively delegate bounded s
|
|
|
33
33
|
TASK: Explore persistent domain knowledge for <domain>.
|
|
34
34
|
EXPECTED OUTCOME: Return facts, source paths, and proof commands concisely.
|
|
35
35
|
REQUIRED TOOLS: Read-only file search, LSP/symbol tools, command checks.
|
|
36
|
-
MUST DO: Read the project-root `MEMORY.md` before doing assigned work. Preserve proper nouns exactly. Cite local paths. Separate facts from inference. Use the OS locale for user-visible
|
|
36
|
+
MUST DO: Read the project-root `MEMORY.md` before doing assigned work. Preserve proper nouns exactly. Cite local paths. Separate facts from inference. Use the OS locale for user-visible responses and generated or updated documentation, plans, and memory artifacts.
|
|
37
37
|
MUST NOT DO: Edit files. Ask the user. Guess missing names.
|
|
38
38
|
CONTEXT: Current task, repository root, existing MEMORY.md entries.
|
|
39
39
|
```
|
|
@@ -41,7 +41,7 @@ Plan from the whole work down. First understand the full requested outcome and a
|
|
|
41
41
|
- Tell every delegated agent and child subagent to read the project-root `MEMORY.md` before work, keep scope, and tell workers they are not alone in the codebase and must not revert others' edits.
|
|
42
42
|
12. Create `docs/plan/<topic>.md` from `templates/work-plan.md`.
|
|
43
43
|
13. Add a short index entry to `PLAN.md`.
|
|
44
|
-
14. Write user-visible
|
|
44
|
+
14. Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.
|
|
45
45
|
|
|
46
46
|
## Complexity Triage
|
|
47
47
|
|
|
@@ -118,7 +118,7 @@ Heavy Path flow: plan -> pre-implementation review -> bounded `worker` implement
|
|
|
118
118
|
- Verification can expand for risk, but the reason must be recorded.
|
|
119
119
|
- The default loop budget is two verification passes per task. If a gate fails, diagnose once, shrink the task or split it into sub-tasks, and rerun both gates. After two failed passes, record the blocker in `docs/plan/<topic>.md` instead of continuing an open-ended loop.
|
|
120
120
|
- Ask the user only when agents, repository evidence, or local verification cannot answer the decision.
|
|
121
|
-
- User-visible
|
|
121
|
+
- User-visible responses and generated or updated documentation, plans, and memory artifacts must follow the OS locale unless the user asks for another language.
|
|
122
122
|
|
|
123
123
|
## Tool Readiness Policy
|
|
124
124
|
|
|
@@ -147,7 +147,7 @@ Prefer repository-native dry-run and check modes before mutating external state.
|
|
|
147
147
|
TASK: Produce <role> input needed for the <topic> plan.
|
|
148
148
|
EXPECTED OUTCOME: Return concrete decisions, file paths, dependencies, risks, and evidence requirements.
|
|
149
149
|
REQUIRED TOOLS: Read-only repository exploration, tool readiness checks, LSP/symbol tools, local command checks.
|
|
150
|
-
MUST DO: Read the project-root `MEMORY.md` before doing assigned work. Preserve proper nouns exactly. Prefer repository evidence. Install or bootstrap missing required tools before declaring them unavailable. Identify assumptions. Treat the user-called/main agent as the orchestrator. Use `explorer` for read-only discovery and `worker` for actual implementation edits or verification when subagent tools are available, regardless of Light Path or Heavy Path. When the subagent tool provides a progress-reporting channel, require subagents to report status to the orchestrator when starting work, when deciding or confirming direction, during periodic progress, and when finishing; the orchestrator must immediately relay received status events to the user. If no mid-run reporting channel exists, relay observable events such as assignment, waiting, and final completion. Require delegated subagents to provide a final report before leaving; after capturing the final report and evidence, close or release the completed subagent, then review the final report and evidence before marking the work complete. If subagent tools are unavailable, the main agent takes over implementation directly and records that takeover in evidence. When subagent tools are available, allow recursive delegation of bounded sub-tasks. Tell every delegated agent and child subagent to read the project-root `MEMORY.md` before work. Tell workers they are not alone in the codebase and must not revert others' edits. Use the OS locale for user-visible
|
|
150
|
+
MUST DO: Read the project-root `MEMORY.md` before doing assigned work. Preserve proper nouns exactly. Prefer repository evidence. Install or bootstrap missing required tools before declaring them unavailable. Identify assumptions. Treat the user-called/main agent as the orchestrator. Use `explorer` for read-only discovery and `worker` for actual implementation edits or verification when subagent tools are available, regardless of Light Path or Heavy Path. When the subagent tool provides a progress-reporting channel, require subagents to report status to the orchestrator when starting work, when deciding or confirming direction, during periodic progress, and when finishing; the orchestrator must immediately relay received status events to the user. If no mid-run reporting channel exists, relay observable events such as assignment, waiting, and final completion. Require delegated subagents to provide a final report before leaving; after capturing the final report and evidence, close or release the completed subagent, then review the final report and evidence before marking the work complete. If subagent tools are unavailable, the main agent takes over implementation directly and records that takeover in evidence. When subagent tools are available, allow recursive delegation of bounded sub-tasks. Tell every delegated agent and child subagent to read the project-root `MEMORY.md` before work. Tell workers they are not alone in the codebase and must not revert others' edits. Use the OS locale for user-visible responses and generated or updated documentation, plans, and memory artifacts.
|
|
151
151
|
MUST NOT DO: Edit production code. Ask the user. Expand scope. Delegate vague or unbounded work.
|
|
152
152
|
CONTEXT: User request, MEMORY.md, relevant docs/memory notes, applied model guidance, repository root.
|
|
153
153
|
```
|
|
@@ -26,7 +26,7 @@ When subagent tools are available, each agent may recursively delegate bounded r
|
|
|
26
26
|
- Recursive subagent delegation is allowed only for bounded sub-tasks when the current surface supports it.
|
|
27
27
|
- Keep blocking review work local when the next step depends immediately on the result.
|
|
28
28
|
5. Report findings first, ordered by severity, with file and line references. If there are no issues, say so clearly and record remaining test gaps or residual risk.
|
|
29
|
-
6. Write user-visible
|
|
29
|
+
6. Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.
|
|
30
30
|
|
|
31
31
|
## Reviewer Prompt Format
|
|
32
32
|
|
|
@@ -34,7 +34,7 @@ When subagent tools are available, each agent may recursively delegate bounded r
|
|
|
34
34
|
TASK: Review correctness, scope, and evidence for task <task-id>.
|
|
35
35
|
EXPECTED OUTCOME: Findings ordered by severity with file and line references, or an explicit no-issue result with residual risk.
|
|
36
36
|
REQUIRED TOOLS: Read-only diff inspection, tool readiness checks, verification command execution, plan/memory reading.
|
|
37
|
-
MUST DO: Read the project-root `MEMORY.md` before doing assigned work. Check tool readiness and install-attempt evidence. Check dry-run or check evidence when external state could change. Check both module evidence and surface evidence. Preserve proper nouns exactly. Use the OS locale for user-visible
|
|
37
|
+
MUST DO: Read the project-root `MEMORY.md` before doing assigned work. Check tool readiness and install-attempt evidence. Check dry-run or check evidence when external state could change. Check both module evidence and surface evidence. Preserve proper nouns exactly. Use the OS locale for user-visible responses and generated or updated documentation, plans, and memory artifacts.
|
|
38
38
|
MUST NOT DO: Edit files. Ask the user. Approve skipped LSP/typecheck/lint without install evidence. Approve missing evidence or open-ended verification loops.
|
|
39
39
|
CONTEXT: docs/plan/<topic>.md, MEMORY.md, relevant docs/memory notes, changed files.
|
|
40
40
|
```
|
|
@@ -42,7 +42,7 @@ When subagent tools are available, each agent may recursively delegate bounded s
|
|
|
42
42
|
15. Apply the bounded loop policy when a gate fails.
|
|
43
43
|
16. Record evidence in the plan file before marking the task complete.
|
|
44
44
|
17. If the user asks a side question, status question, or narrow clarification while this task is still active, answer it briefly and then resume the previous active work unless the user explicitly asks to pause, stop, or switch tasks.
|
|
45
|
-
18. Write user-visible
|
|
45
|
+
18. Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.
|
|
46
46
|
|
|
47
47
|
## Builder Prompt Format
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@ When subagent tools are available, each agent may recursively delegate bounded s
|
|
|
50
50
|
TASK: Implement task <task-id> for <topic>.
|
|
51
51
|
EXPECTED OUTCOME: Minimal code or documentation change satisfying the task contract.
|
|
52
52
|
REQUIRED TOOLS: Scoped file editing, tool readiness checks, existing test/build commands, surface QA commands.
|
|
53
|
-
MUST DO: Read the project-root `MEMORY.md` before doing assigned work and follow its policy. Stay within the listed file scope and ownership. Assume you are not alone in the codebase; do not revert others' edits. Treat the user-called/main agent as the orchestrator; delegate actual implementation edits to `worker` whenever subagent tools are available, regardless of Light Path or Heavy Path. When the subagent tool provides a progress-reporting channel, require subagents to report status to the orchestrator when starting work, when deciding or confirming direction, during periodic progress, and when finishing; the orchestrator must immediately relay received status events to the user. If no mid-run reporting channel exists, relay observable events such as assignment, waiting, and final completion. Require delegated subagents to provide a final report before leaving; after capturing final report and evidence, close or release the completed subagent, then review the final report and evidence before marking the work complete. If subagent tools are unavailable, the main agent takes over implementation directly and records that takeover in evidence. When subagent tools are available, recursively delegate only bounded sub-tasks and pass these same constraints to every child subagent. Install or bootstrap missing required tools before declaring them unavailable. Run dry-run or check mode before external-state mutation when available. Provide module evidence and surface evidence. Use the OS locale for user-visible
|
|
53
|
+
MUST DO: Read the project-root `MEMORY.md` before doing assigned work and follow its policy. Stay within the listed file scope and ownership. Assume you are not alone in the codebase; do not revert others' edits. Treat the user-called/main agent as the orchestrator; delegate actual implementation edits to `worker` whenever subagent tools are available, regardless of Light Path or Heavy Path. When the subagent tool provides a progress-reporting channel, require subagents to report status to the orchestrator when starting work, when deciding or confirming direction, during periodic progress, and when finishing; the orchestrator must immediately relay received status events to the user. If no mid-run reporting channel exists, relay observable events such as assignment, waiting, and final completion. Require delegated subagents to provide a final report before leaving; after capturing final report and evidence, close or release the completed subagent, then review the final report and evidence before marking the work complete. If subagent tools are unavailable, the main agent takes over implementation directly and records that takeover in evidence. When subagent tools are available, recursively delegate only bounded sub-tasks and pass these same constraints to every child subagent. Install or bootstrap missing required tools before declaring them unavailable. Run dry-run or check mode before external-state mutation when available. Provide module evidence and surface evidence. Use the OS locale for user-visible responses and generated or updated documentation, plans, and memory artifacts.
|
|
54
54
|
MUST NOT DO: Ask the user. Skip LSP/typecheck/lint because a tool is missing without attempting installation. Refactor unrelated code. Continue an open-ended verification loop. Treat a side question as permission to abandon the active task. Delegate vague or unbounded work. Claim completion without evidence. Modify files outside the assigned ownership.
|
|
55
55
|
CONTEXT: docs/plan/<topic>.md task, relevant docs/memory notes, applied model guidance, exact files, verification commands.
|
|
56
56
|
```
|
package/templates/MEMORY.md
CHANGED
|
@@ -11,4 +11,4 @@ Short index of persistent repository knowledge. Link detailed notes under `docs/
|
|
|
11
11
|
- Preserve proper nouns exactly as written.
|
|
12
12
|
- Prefer repository evidence over assumptions.
|
|
13
13
|
- Read only the detailed memory needed for the current task.
|
|
14
|
-
- Write user-visible
|
|
14
|
+
- Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.
|
package/templates/PLAN.md
CHANGED
|
@@ -8,6 +8,7 @@ Short index of work plans. Link detailed plans under `docs/plan/`.
|
|
|
8
8
|
- Install or bootstrap missing required tools before declaring them unavailable.
|
|
9
9
|
- Heavy Path completion requires explicit automated test evidence.
|
|
10
10
|
- Record tool readiness, dry-run/check evidence, module acceptance evidence, and surface integration evidence in detailed plans.
|
|
11
|
+
- Write user-visible responses and generated or updated documentation, plans, and memory artifacts in the OS locale unless the user asks for another language.
|
|
11
12
|
|
|
12
13
|
## Active Plans
|
|
13
14
|
|
package/templates/work-plan.md
CHANGED
|
@@ -24,7 +24,7 @@ Describe the observable result.
|
|
|
24
24
|
- `docs/model-guidance/<claude-or-codex>.md`
|
|
25
25
|
- Rationale:
|
|
26
26
|
- Role-specific adjustment:
|
|
27
|
-
- User-visible
|
|
27
|
+
- User-visible response and artifact locale: OS locale unless the user asks for another language.
|
|
28
28
|
|
|
29
29
|
## Complexity Triage
|
|
30
30
|
|