cairn-ai 0.1.10 → 0.2.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.
Files changed (57) hide show
  1. package/.agents/workflows/cairn-doctor.md +2 -11
  2. package/.agents/workflows/cairn-install.md +1 -5
  3. package/.agents/workflows/cairn-memory.md +3 -1
  4. package/.agents/workflows/cairn-plan.md +6 -4
  5. package/.agents/workflows/cairn-review.md +3 -1
  6. package/.agents/workflows/cairn-toolcheck.md +2 -10
  7. package/.agents/workflows/cairn-uninstall.md +1 -11
  8. package/.agents/workflows/cairn-upgrade.md +1 -5
  9. package/.agents/workflows/cairn-work.md +4 -2
  10. package/.claude/agents/explorer.md +1 -1
  11. package/.claude/agents/worker.md +1 -1
  12. package/.claude/commands/cairn-doctor.md +1 -9
  13. package/.claude/commands/cairn-install.md +1 -5
  14. package/.claude/commands/cairn-memory.md +1 -1
  15. package/.claude/commands/cairn-plan.md +1 -1
  16. package/.claude/commands/cairn-review.md +1 -1
  17. package/.claude/commands/cairn-toolcheck.md +2 -5
  18. package/.claude/commands/cairn-uninstall.md +1 -9
  19. package/.claude/commands/cairn-upgrade.md +1 -5
  20. package/.claude/commands/cairn-work.md +1 -1
  21. package/.codex-plugin/plugin.json +6 -1
  22. package/README.de.md +5 -5
  23. package/README.es.md +5 -5
  24. package/README.fr.md +5 -5
  25. package/README.ja.md +5 -5
  26. package/README.ko.md +11 -8
  27. package/README.md +11 -8
  28. package/README.pt.md +5 -5
  29. package/README.zh.md +5 -5
  30. package/commands/cairn-doctor.md +2 -7
  31. package/commands/cairn-install.md +4 -7
  32. package/commands/cairn-memory.md +3 -3
  33. package/commands/cairn-plan.md +8 -7
  34. package/commands/cairn-review.md +3 -3
  35. package/commands/cairn-toolcheck.md +4 -6
  36. package/commands/cairn-uninstall.md +1 -7
  37. package/commands/cairn-upgrade.md +4 -7
  38. package/commands/cairn-work.md +10 -8
  39. package/docs/model-guidance/README.md +9 -6
  40. package/docs/model-guidance/claude.md +1 -1
  41. package/docs/model-guidance/codex.md +1 -1
  42. package/hooks/hooks.json +5 -5
  43. package/package.json +2 -2
  44. package/scripts/cairn-goal.mjs +539 -0
  45. package/scripts/cairn-lifecycle.mjs +140 -7
  46. package/scripts/cairn-paths.mjs +103 -0
  47. package/scripts/cairn-state.mjs +183 -131
  48. package/scripts/cairn-state.sh +68 -8
  49. package/scripts/cairn-toolcheck.mjs +312 -79
  50. package/scripts/cairn.mjs +54 -43
  51. package/skills/cairn-memory/SKILL.md +9 -3
  52. package/skills/cairn-plan/SKILL.md +26 -10
  53. package/skills/cairn-review/SKILL.md +5 -2
  54. package/skills/cairn-work/SKILL.md +34 -13
  55. package/templates/MEMORY.md +1 -1
  56. package/templates/PLAN.md +1 -0
  57. package/templates/work-plan.md +21 -4
@@ -2,17 +2,7 @@
2
2
 
3
3
  Goal: diagnose Cairn installation status.
4
4
 
5
- Run:
6
-
7
- ```sh
8
- bunx cairn-ai@latest doctor
9
- ```
10
-
11
- When running from local source:
12
-
13
- ```sh
14
- node scripts/cairn.mjs doctor
15
- ```
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Invoke Node directly with the absolute `entrypoints.cli` value and `["doctor"]`; do not build a shell-interpolated command from the path.
16
6
 
17
7
  Checks:
18
8
 
@@ -20,3 +10,4 @@ Checks:
20
10
  - Claude Code commands and agents mirror files.
21
11
  - Antigravity skills and workflows mirror files.
22
12
  - Antigravity CLI skills and workflows mirror files.
13
+ - Installed runtime locators and the referenced scripts, templates, and model guidance.
@@ -8,10 +8,6 @@ Run:
8
8
  bunx cairn-ai@latest install
9
9
  ```
10
10
 
11
- When running from local source:
12
-
13
- ```sh
14
- node scripts/cairn.mjs install
15
- ```
11
+ Installation must run from the package/global source because the cached plugin is the destination. Do not copy Cairn runtime files into the target project and do not invoke install from a cached plugin locator.
16
12
 
17
13
  After installation, check status with the `cairn-doctor` workflow.
@@ -2,6 +2,8 @@
2
2
 
3
3
  Use the `cairn-memory` skill.
4
4
 
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Cairn scripts and policy resources must be resolved through that locator, not from the target project.
6
+
5
7
  Goal: create or update repository memory without asking the user for discoverable facts.
6
8
 
7
9
  Procedure:
@@ -12,4 +14,4 @@ Procedure:
12
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.
13
15
  5. Write details to `docs/memory/<domain>.md`.
14
16
  6. Keep `MEMORY.md` as a short index.
15
- 7. Use the OS locale for user-visible output unless the user asks for another language.
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.
@@ -2,15 +2,17 @@
2
2
 
3
3
  Use the `cairn-plan` skill.
4
4
 
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Resolve Cairn scripts, model guidance, templates, commands, and agents through that locator; only repository state such as `MEMORY.md`, `PLAN.md`, and `docs/plan/` belongs to the target project.
6
+
5
7
  Goal: leave a decision-complete plan for the current task in files before non-trivial implementation.
6
8
 
7
9
  Procedure:
8
10
 
9
11
  1. Every agent must read the project-root `MEMORY.md` for domain knowledge and repository policy before repository exploration, tool selection, work, or delegation.
10
12
  2. Read relevant `docs/memory/*.md`.
11
- 3. If the active or assigned model is Claude-family, read `docs/model-guidance/claude.md`; if Codex-family, read `docs/model-guidance/codex.md`.
12
- 4. Run `node scripts/cairn.mjs toolcheck` when available.
13
- 5. If required LSP/check tools are missing, run `node scripts/cairn.mjs toolcheck --install` or a repository-native install command before accepting a fallback.
13
+ 3. If the active or assigned model is Claude-family, read `claude.md` under the locator's `resources.modelGuidance`; if Codex-family, read `codex.md` there.
14
+ 4. Invoke Node directly with the locator's absolute `entrypoints.cli`, `toolcheck`, and `--root` for the target repository.
15
+ 5. If required LSP/check tools are missing, follow the installed toolcheck policy before any explicitly approved installation attempt.
14
16
  6. Explore before asking the user.
15
17
  7. Understand the whole work and affected surfaces first, then classify it into small executable tasks. If a task is still too broad to verify cleanly, split it into sub-tasks.
16
18
  8. Run complexity triage before applying agent, plugin, or delegated workflow guidance, and record it before mutating files.
@@ -20,4 +22,4 @@ Procedure:
20
22
  12. Write `docs/plan/<topic>.md`.
21
23
  13. Add the topic link and status to `PLAN.md`.
22
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.
23
- 15. Use the OS locale for user-visible output unless the user asks for another language.
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.
@@ -2,6 +2,8 @@
2
2
 
3
3
  Use the `cairn-review` skill.
4
4
 
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Cairn scripts and policy resources must be resolved through that locator, not from the target project.
6
+
5
7
  Goal: review completed work against plan, memory, policy, and evidence.
6
8
 
7
9
  Procedure:
@@ -11,4 +13,4 @@ Procedure:
11
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.
12
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.
13
15
  5. Record review evidence in `docs/plan/<topic>.md`.
14
- 6. Use the OS locale for user-visible output unless the user asks for another language.
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.
@@ -2,16 +2,8 @@
2
2
 
3
3
  Goal: detect repository stacks and check required LSP, typecheck, lint, dry-run, and verification tools.
4
4
 
5
- Run the local command first:
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Invoke Node directly with the absolute `entrypoints.cli` value, `toolcheck`, and an explicit `--root` argument for the target repository; do not build a shell-interpolated command from the path.
6
6
 
7
- ```sh
8
- node scripts/cairn.mjs toolcheck
9
- ```
10
-
11
- If required tools are missing, attempt repository-native installation:
12
-
13
- ```sh
14
- node scripts/cairn.mjs toolcheck --install
15
- ```
7
+ If required tools are missing, follow the installed command policy before any explicitly approved installation attempt.
16
8
 
17
9
  Record detected stacks, missing tools, install attempts, and blockers in the related `docs/plan/<topic>.md`.
@@ -2,16 +2,6 @@
2
2
 
3
3
  Goal: remove the Codex, Claude Code, and Antigravity entries installed by Cairn.
4
4
 
5
- Run:
6
-
7
- ```sh
8
- bunx cairn-ai@latest uninstall
9
- ```
10
-
11
- When running from local source:
12
-
13
- ```sh
14
- node scripts/cairn.mjs uninstall
15
- ```
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Invoke Node directly with the absolute `entrypoints.cli` value and `["uninstall"]`; do not build a shell-interpolated command from the path.
16
6
 
17
7
  The source work folder and user-created `MEMORY.md`, `PLAN.md`, `docs/memory`, and `docs/plan` files are not deleted.
@@ -8,10 +8,6 @@ Run:
8
8
  bunx cairn-ai@latest upgrade
9
9
  ```
10
10
 
11
- When running from local source:
12
-
13
- ```sh
14
- node scripts/cairn.mjs upgrade
15
- ```
11
+ Upgrade must run from the package/global source because the cached plugin is replaced. Do not invoke upgrade from a cached plugin locator.
16
12
 
17
13
  After upgrade, check status with the `cairn-doctor` workflow.
@@ -2,6 +2,8 @@
2
2
 
3
3
  Use the `cairn-work` skill.
4
4
 
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Resolve Cairn scripts and policy resources through that locator; only work artifacts and state belong to the target project.
6
+
5
7
  Goal: execute the next incomplete module task in `PLAN.md` without bypassing the recorded complexity triage.
6
8
 
7
9
  Procedure:
@@ -10,7 +12,7 @@ Procedure:
10
12
  2. Read `PLAN.md`, the detailed plan, and relevant memory notes.
11
13
  3. Read the Codex or Claude model guidance recorded in the plan.
12
14
  4. Select one small module task.
13
- 5. Confirm required tool readiness. If a required LSP/check tool is missing, run `node scripts/cairn.mjs toolcheck --install` or a repository-native install command before accepting a fallback.
15
+ 5. Confirm required tool readiness by invoking Node directly with the locator's absolute `entrypoints.cli`, `toolcheck`, and `--root` for the target repository. Follow the installed toolcheck policy before any explicitly approved installation attempt.
14
16
  6. Confirm the complexity triage and selected Light/Heavy Path recorded in the plan. If missing, update the plan before mutating files.
15
17
  7. For Light Path, keep the user-called/main agent in the orchestrator role and delegate implementation edits to one bounded `worker` whenever subagent tools are available, then run focused verification.
16
18
  8. For Heavy Path, follow the plan's staged implementation and review gates without role-mapping shortcuts.
@@ -19,4 +21,4 @@ Procedure:
19
21
  11. Re-run surface integration verification.
20
22
  12. Record tool readiness and verification evidence in `docs/plan/<topic>.md` and update `PLAN.md`.
21
23
  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 output unless the user asks for another language.
24
+ 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.
@@ -4,4 +4,4 @@ Read-only discovery agent for codebase questions, impact analysis, pattern searc
4
4
 
5
5
  Before any task, read the project-root `MEMORY.md` for domain knowledge and repository policy.
6
6
 
7
- Refer to `agents/explorer.md`.
7
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Resolve `resources.agents` from that JSON object and follow `explorer.md` in that directory. Do not resolve Cairn agent files from the target project.
@@ -4,4 +4,4 @@ Focused execution agent for search, small edits, command checks, and QA artifact
4
4
 
5
5
  Before any task, read the project-root `MEMORY.md` for domain knowledge and repository policy.
6
6
 
7
- Refer to `agents/worker.md`.
7
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Resolve `resources.agents` from that JSON object and follow `worker.md` in that directory. Do not resolve Cairn agent files from the target project.
@@ -2,12 +2,4 @@
2
2
 
3
3
  Diagnose Cairn installation status.
4
4
 
5
- ```sh
6
- node scripts/cairn.mjs doctor
7
- ```
8
-
9
- Published package:
10
-
11
- ```sh
12
- bunx cairn-ai@latest doctor
13
- ```
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Invoke Node directly with the absolute `entrypoints.cli` value and the argument array `["doctor"]`; do not build a shell-interpolated command from the path.
@@ -2,11 +2,7 @@
2
2
 
3
3
  Install Cairn into Codex, Claude Code, and Antigravity.
4
4
 
5
- ```sh
6
- node scripts/cairn.mjs install
7
- ```
8
-
9
- Published package:
5
+ Installation must run from the package/global source because the cached installation is the destination. Do not copy runtime files into the target project and do not invoke install from the cached plugin locator.
10
6
 
11
7
  ```sh
12
8
  bunx cairn-ai@latest install
@@ -2,4 +2,4 @@
2
2
 
3
3
  Create or update `MEMORY.md` and `docs/memory/<domain>.md`.
4
4
 
5
- Follow plugin command `commands/cairn-memory.md`.
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Resolve `resources.commands` from that JSON object and follow `cairn-memory.md` in that directory. Do not resolve Cairn command files from the target project.
@@ -2,4 +2,4 @@
2
2
 
3
3
  Start by reading the project-root `MEMORY.md`, then create or update `PLAN.md` and `docs/plan/<topic>.md` before non-trivial implementation, including Light/Heavy Path complexity triage and tool readiness.
4
4
 
5
- Follow plugin command `commands/cairn-plan.md`.
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Resolve `resources.commands` from that JSON object and follow `cairn-plan.md` in that directory. Resolve model guidance and templates through the same locator. Do not resolve Cairn runtime resources from the target project.
@@ -2,4 +2,4 @@
2
2
 
3
3
  Review completed tasks against memory, plan, policy, tool readiness, and evidence.
4
4
 
5
- Follow plugin command `commands/cairn-review.md`.
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Resolve `resources.commands` from that JSON object and follow `cairn-review.md` in that directory. Do not resolve Cairn command files from the target project.
@@ -2,9 +2,6 @@
2
2
 
3
3
  Detect repository stacks and check required LSP, typecheck, lint, dry-run, and verification tools.
4
4
 
5
- ```sh
6
- node scripts/cairn.mjs toolcheck
7
- node scripts/cairn.mjs toolcheck --install
8
- ```
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Invoke Node directly with the absolute `entrypoints.cli` value, `toolcheck`, and an explicit `--root` pointing at the target repository; do not build a shell-interpolated command from the path.
9
6
 
10
- Use `--install` before accepting a missing required tool as unavailable.
7
+ If required tools are missing, report the proposed install and obtain explicit user approval. Only then add `--install --yes` for a pinned/supported installer or use the approved repository-native command.
@@ -2,12 +2,4 @@
2
2
 
3
3
  Remove the Codex, Claude Code, and Antigravity entries installed by Cairn.
4
4
 
5
- ```sh
6
- node scripts/cairn.mjs uninstall
7
- ```
8
-
9
- Published package:
10
-
11
- ```sh
12
- bunx cairn-ai@latest uninstall
13
- ```
5
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Invoke Node directly with the absolute `entrypoints.cli` value and the argument array `["uninstall"]`; do not build a shell-interpolated command from the path.
@@ -2,11 +2,7 @@
2
2
 
3
3
  Update the Cairn installation from the current source.
4
4
 
5
- ```sh
6
- node scripts/cairn.mjs upgrade
7
- ```
8
-
9
- Published package:
5
+ Upgrade must run from the package/global source because the cached installation is replaced. Do not invoke upgrade from the cached plugin locator.
10
6
 
11
7
  ```sh
12
8
  bunx cairn-ai@latest upgrade
@@ -4,4 +4,4 @@ Start by reading the project-root `MEMORY.md`, then execute the next incomplete
4
4
 
5
5
  If the user asks a side question, status question, or narrow clarification while a 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.
6
6
 
7
- Follow plugin command `commands/cairn-work.md`.
7
+ Read the installed Cairn runtime locator at `{{CAIRN_RUNTIME_LOCATOR_JSON}}`. Resolve `resources.commands` from that JSON object and follow `cairn-work.md` in that directory. Do not resolve Cairn command files from the target project.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cairn",
3
- "version": "0.1.10",
3
+ "version": "0.2.0",
4
4
  "description": "Token-efficient agent harness with tool readiness for Codex, Claude Code, and Antigravity.",
5
5
  "author": {
6
6
  "name": "WkNam"
@@ -24,6 +24,7 @@
24
24
  "Use Cairn to create MEMORY.md and PLAN.md for this repository.",
25
25
  "At the start of each task, every agent must read the project-root MEMORY.md for domain knowledge and repository policy before planning, implementation, review, or delegation.",
26
26
  "Run cairn-toolcheck before planning implementation work.",
27
+ "Resolve Cairn scripts, templates, commands, agents, and model guidance from the installed plugin runtime locator; never search for those runtime files in the target repository. Keep the target repository root separate and pass it explicitly to Cairn commands.",
27
28
  "Before non-trivial implementation, run cairn-plan for this task without asking me for discoverable facts.",
28
29
  "When planning, first understand the whole work, then classify it into small executable tasks; if a task needs further breakdown, split it into sub-tasks.",
29
30
  "The user-called/main agent is the orchestrator: plan, assign, verify, and record evidence; actual implementation edits must be delegated to worker subagents whenever subagent tools are available, on both Light Path and Heavy Path.",
@@ -33,6 +34,10 @@
33
34
  "If subagent tools are unavailable, the main agent takes over implementation directly and records that takeover in evidence; do not stop before local implementation solely because subagent tools are unavailable.",
34
35
  "Record Light Path or Heavy Path complexity triage in docs/plan/<topic>.md before mutating files.",
35
36
  "Run cairn-work from the current PLAN.md and pass dry-run/check, module acceptance, and surface integration gates.",
37
+ "For implementation requests, persist one active Cairn goal with stable task IDs. After a task passes its required bound receipts, advance immediately to the next task and continue until goal-level final review completes; active is never a completion state.",
38
+ "Missing, failed, skipped, stale, or placeholder evidence never completes a task. A worker may report only its assigned task; the main agent reviews the handoff and advances the goal.",
39
+ "If progress cannot continue, explicitly pause, block with a concrete reason, or cancel the Cairn goal instead of silently stopping. Do not repeatedly block a re-entered stop hook in the same turn.",
40
+ "Tool installation is an external-state change: report the proposal and obtain explicit user approval before using a pinned/supported installer.",
36
41
  "If I ask a side question, status question, or narrow clarification while a plan or task is still active, answer it briefly and then resume the previous active work unless I explicitly ask you to pause, stop, or switch tasks."
37
42
  ]
38
43
  }
package/README.de.md CHANGED
@@ -33,8 +33,8 @@ Der gewählte path und die Begründung werden in `docs/plan/<topic>.md` festgeha
33
33
  `cairn toolcheck` untersucht das aktuelle repository auf JavaScript-, TypeScript-, Python-, PHP-, Java-, Kotlin-, Swift-, Go- und Rust-stacks und prüft die passenden LSP- und verification tools.
34
34
 
35
35
  ```sh
36
- cairn toolcheck
37
- cairn toolcheck --install
36
+ cairn toolcheck --root .
37
+ cairn toolcheck --install --yes --root .
38
38
  ```
39
39
 
40
40
  - `toolcheck` meldet detected stacks und missing tools.
@@ -57,7 +57,7 @@ Cairn wendet model-specific adjustment nur auf Claude-family und Codex-family mo
57
57
  - Claude-family: geeignet für long context, policy interpretation und plan/evidence review.
58
58
  - Codex-family: geeignet für small implementation tasks, explicit file edits, command-based verification und bounded `worker` tasks.
59
59
 
60
- Details stehen in `docs/model-guidance/README.md`, `docs/model-guidance/claude.md` und `docs/model-guidance/codex.md`.
60
+ Details stehen im installierten Plugin unter `cairn://docs/model-guidance/README.md`, `cairn://docs/model-guidance/claude.md` und `cairn://docs/model-guidance/codex.md`.
61
61
 
62
62
  ## Repository Artifacts
63
63
 
@@ -65,7 +65,7 @@ Das harness erstellt und pflegt diese files im Ziel-repository root.
65
65
 
66
66
  - `MEMORY.md`: kurzer Index persistent domain knowledge.
67
67
  - `docs/memory/*.md`: detailliertes Wissen je domain.
68
- - `docs/model-guidance/*.md`: Claude- und Codex-model adjustment guidance.
68
+ - `.cairn/state.json`: git-ignorierter Goal-, Task- und Receipt-Status für Wiederaufnahme und scoped stop gates.
69
69
  - `PLAN.md`: kurzer Index aktiver und abgeschlossener work topics.
70
70
  - `docs/plan/*.md`: detailed execution plans.
71
71
 
@@ -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 folgt der konfigurierten OS locale, sofern der user nicht ausdrücklich eine andere Sprache verlangt. 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.
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
@@ -33,8 +33,8 @@ El path seleccionado y su justificación se registran en `docs/plan/<topic>.md`
33
33
  `cairn toolcheck` inspecciona el repositorio actual para stacks JavaScript, TypeScript, Python, PHP, Java, Kotlin, Swift, Go y Rust, y luego revisa los LSP y verification tools correspondientes.
34
34
 
35
35
  ```sh
36
- cairn toolcheck
37
- cairn toolcheck --install
36
+ cairn toolcheck --root .
37
+ cairn toolcheck --install --yes --root .
38
38
  ```
39
39
 
40
40
  - `toolcheck` reporta detected stacks y missing tools.
@@ -57,7 +57,7 @@ Cairn solo aplica ajustes específicos de modelo a modelos Claude-family y Codex
57
57
  - Claude-family: útil para long context, policy interpretation y plan/evidence review.
58
58
  - Codex-family: útil para small implementation tasks, explicit file edits, command-based verification y bounded `worker` tasks.
59
59
 
60
- La guía detallada vive en `docs/model-guidance/README.md`, `docs/model-guidance/claude.md` y `docs/model-guidance/codex.md`.
60
+ La guía detallada vive en el plugin instalado y se referencia como `cairn://docs/model-guidance/README.md`, `cairn://docs/model-guidance/claude.md` y `cairn://docs/model-guidance/codex.md`.
61
61
 
62
62
  ## Repository Artifacts
63
63
 
@@ -65,7 +65,7 @@ El harness crea y mantiene estos archivos en la raíz del repositorio objetivo.
65
65
 
66
66
  - `MEMORY.md`: índice corto de conocimiento persistente del dominio.
67
67
  - `docs/memory/*.md`: conocimiento detallado por dominio.
68
- - `docs/model-guidance/*.md`: guía de ajuste de modelos Claude y Codex.
68
+ - `.cairn/state.json`: estado git-ignored de goal, task y receipt para reanudación y stop gates acotados.
69
69
  - `PLAN.md`: índice corto de temas activos y completados.
70
70
  - `docs/plan/*.md`: planes de ejecución detallados.
71
71
 
@@ -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 debe seguir el OS locale configurado, salvo que el usuario pida otro idioma explícitamente. 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.
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
@@ -33,8 +33,8 @@ Le path choisi et sa justification sont enregistrés dans `docs/plan/<topic>.md`
33
33
  `cairn toolcheck` inspecte le repository courant pour les stacks JavaScript, TypeScript, Python, PHP, Java, Kotlin, Swift, Go et Rust, puis vérifie les LSP et verification tools correspondants.
34
34
 
35
35
  ```sh
36
- cairn toolcheck
37
- cairn toolcheck --install
36
+ cairn toolcheck --root .
37
+ cairn toolcheck --install --yes --root .
38
38
  ```
39
39
 
40
40
  - `toolcheck` signale les detected stacks et missing tools.
@@ -57,7 +57,7 @@ Cairn applique des ajustements spécifiques uniquement aux modèles Claude-famil
57
57
  - Claude-family : utile pour long context, policy interpretation et plan/evidence review.
58
58
  - Codex-family : utile pour small implementation tasks, explicit file edits, command-based verification et bounded `worker` tasks.
59
59
 
60
- Les détails se trouvent dans `docs/model-guidance/README.md`, `docs/model-guidance/claude.md` et `docs/model-guidance/codex.md`.
60
+ Les détails se trouvent dans le plugin installé sous `cairn://docs/model-guidance/README.md`, `cairn://docs/model-guidance/claude.md` et `cairn://docs/model-guidance/codex.md`.
61
61
 
62
62
  ## Repository Artifacts
63
63
 
@@ -65,7 +65,7 @@ Le harness crée et maintient ces fichiers à la racine du repository cible.
65
65
 
66
66
  - `MEMORY.md` : index court de persistent domain knowledge.
67
67
  - `docs/memory/*.md` : connaissances détaillées par domaine.
68
- - `docs/model-guidance/*.md` : guidance d'ajustement pour les modèles Claude et Codex.
68
+ - `.cairn/state.json` : état git-ignored des goals, tasks et receipts pour la reprise et les stop gates ciblés.
69
69
  - `PLAN.md` : index court des sujets actifs et terminés.
70
70
  - `docs/plan/*.md` : detailed execution plans.
71
71
 
@@ -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 doit suivre l'OS locale configurée, sauf si l'utilisateur demande explicitement une autre langue. 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.
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
@@ -33,8 +33,8 @@ Cairn は execution policy では LazyCodex と異なります。LazyCodex の r
33
33
  `cairn toolcheck` は現在の repository から JavaScript、TypeScript、Python、PHP、Java、Kotlin、Swift、Go、Rust stacks を検出し、対応する LSP と verification tools を確認します。
34
34
 
35
35
  ```sh
36
- cairn toolcheck
37
- cairn toolcheck --install
36
+ cairn toolcheck --root .
37
+ cairn toolcheck --install --yes --root .
38
38
  ```
39
39
 
40
40
  - `toolcheck` は detected stacks と missing tools を報告します。
@@ -57,7 +57,7 @@ Cairn は Claude-family と Codex-family models にのみ model-specific adjustm
57
57
  - Claude-family: long context、policy interpretation、plan/evidence review に有用です。
58
58
  - Codex-family: small implementation tasks、explicit file edits、command-based verification、bounded `worker` tasks に有用です。
59
59
 
60
- 詳細は `docs/model-guidance/README.md`、`docs/model-guidance/claude.md`、`docs/model-guidance/codex.md` にあります。
60
+ 詳細はインストール済みプラグインの `cairn://docs/model-guidance/README.md`、`cairn://docs/model-guidance/claude.md`、`cairn://docs/model-guidance/codex.md` にあります。
61
61
 
62
62
  ## Repository Artifacts
63
63
 
@@ -65,7 +65,7 @@ harness は対象 repository root に次の files を作成して維持します
65
65
 
66
66
  - `MEMORY.md`: persistent domain knowledge の短い index。
67
67
  - `docs/memory/*.md`: domain ごとの詳細 knowledge。
68
- - `docs/model-guidance/*.md`: Claude と Codex model adjustment guidance。
68
+ - `.cairn/state.json`: 再開と scoped stop gate のための git-ignored goal/task/receipt 状態。
69
69
  - `PLAN.md`: active/completed work topics の短い index。
70
70
  - `docs/plan/*.md`: detailed execution plans。
71
71
 
@@ -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 は user が別の language を指定しない限り configured OS locale に従います。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 です。
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
@@ -37,12 +37,14 @@ subagent 도구가 progress-reporting channel을 제공하면 subagent는 작업
37
37
  `cairn toolcheck`는 현재 저장소에서 JavaScript, TypeScript, Python, PHP, Java, Kotlin, Swift, Go, Rust 스택을 감지하고, 해당 LSP와 검증 도구를 확인합니다.
38
38
 
39
39
  ```sh
40
- cairn toolcheck
41
- cairn toolcheck --install
40
+ cairn toolcheck --root .
41
+ # 명시적 승인을 받은 경우에만:
42
+ cairn toolcheck --install --yes --root .
42
43
  ```
43
44
 
44
45
  - `toolcheck`는 감지된 스택과 누락 도구를 보고합니다.
45
- - `toolcheck --install`은 package manager dev dependency, Composer dev dependency, `uv`, Java LSP bootstrap, `go install`, `rustup component add` 같은 가장 가까운 프로젝트 로컬 또는 저장소 네이티브 설치 경로를 시도합니다.
46
+ - 기본 검사는 읽기 전용이고 timeout으로 제한되며, 저장소 로컬 wrapper를 단순 탐지를 위해 실행하지 않습니다.
47
+ - `toolcheck --install`은 사용자의 명시적 승인과 `--yes`를 모두 요구합니다. 버전이 고정되지 않았거나 checksum이 없는 installer는 `latest`를 내려받는 대신 사용할 수 없는 것으로 보고합니다.
46
48
  - Cairn 계획은 감지된 스택, 필요한 도구, 설치 명령, blocker를 기록합니다.
47
49
  - LSP server가 없다는 사실만으로 정밀한 코드베이스 탐색을 건너뛸 수 없습니다. 설치 또는 동등한 symbol-aware fallback을 먼저 시도해야 합니다.
48
50
 
@@ -61,7 +63,7 @@ Cairn은 Claude-family와 Codex-family 모델에만 모델별 조정을 적용
61
63
  - Claude-family: 긴 컨텍스트, 정책 해석, 계획/증거 검토에 유용합니다.
62
64
  - Codex-family: 작은 구현 작업, 명시적 파일 편집, command 기반 검증, 제한된 `worker` 작업에 유용합니다.
63
65
 
64
- 자세한 가이드는 `docs/model-guidance/README.md`, `docs/model-guidance/claude.md`, `docs/model-guidance/codex.md`에 있습니다.
66
+ 자세한 가이드는 설치된 플러그인에 있으며 `cairn://docs/model-guidance/README.md`, `cairn://docs/model-guidance/claude.md`, `cairn://docs/model-guidance/codex.md`로 참조합니다.
65
67
 
66
68
  ## Repository Artifacts
67
69
 
@@ -69,11 +71,11 @@ Cairn은 Claude-family와 Codex-family 모델에만 모델별 조정을 적용
69
71
 
70
72
  - `MEMORY.md`: 지속 도메인 지식의 짧은 색인.
71
73
  - `docs/memory/*.md`: 도메인별 상세 지식.
72
- - `docs/model-guidance/*.md`: Claude와 Codex 모델 조정 가이드.
73
74
  - `PLAN.md`: 활성/완료 작업 주제의 짧은 색인.
74
75
  - `docs/plan/*.md`: 상세 실행 계획.
76
+ - `.cairn/state.json`: 중단 재개와 범위가 제한된 종료 게이트에 쓰는 git-ignored 버전드 goal/task/receipt 상태.
75
77
 
76
- 루트 파일은 짧게 유지하고 상세 내용은 `docs/` 아래로 이동해, 에이전트가 필요한 컨텍스트만 읽도록 합니다.
78
+ 런타임 script, template, command, agent, model guidance는 설치된 플러그인 루트에 유지합니다. 각 표면의 locator가 같은 설치본을 가리키므로 대상 저장소에 Cairn 내부 파일을 복사하지 않습니다.
77
79
 
78
80
  ## Commands
79
81
 
@@ -103,12 +105,13 @@ cairn toolcheck
103
105
  - `cairn doctor`: Codex 설정, 설치, hook trust state, Claude Code mirror 파일, Antigravity mirror 파일을 진단합니다.
104
106
  - `cairn uninstall`: Cairn이 추가한 Codex 설정, cache, Claude Code mirror 파일, Antigravity mirror 파일을 제거합니다.
105
107
  - `cairn toolcheck`: 저장소 스택을 감지하고 필요한 LSP와 검증 도구를 확인하거나 설치합니다.
108
+ - `cairn goal ...`: 저장소의 영속 goal을 시작·조회·일시정지·재개·차단·취소·완료합니다. task 완료에는 현재 goal/task/plan에 바인딩된 성공 receipt가 필요합니다.
106
109
  - `cairn-memory`: 도메인 지식을 탐색하고 `MEMORY.md`를 갱신합니다.
107
110
  - `cairn-plan`: `docs/plan/` 아래에 decision-complete plan을 만듭니다.
108
111
  - `cairn-work`: 현재 `PLAN.md`의 다음 모듈 작업을 실행하고 두 검증 게이트를 확보합니다.
109
112
  - `cairn-review`: 계획, memory, 증거를 기준으로 완료된 작업을 검토합니다.
110
113
 
111
- `install`과 `upgrade`는 `~/.codex/config.toml`을 수정하기 전에 `*.cairn-backup-*` 백업을 만듭니다. 소스 플러그인 manifest는 validator-friendly 상태를 유지하고, 설치된 cache copy에만 Codex hook 활성화를 위한 `hooks` field가 추가됩니다.
114
+ `install`과 `upgrade`는 `~/.codex/config.toml`을 수정하기 전에 `*.cairn-backup-*` 백업을 만들고 각 표면의 runtime locator를 갱신합니다. 소스 플러그인 manifest는 validator-friendly 상태를 유지하고, 설치된 cache copy에만 Codex hook 활성화를 위한 `hooks` field가 추가됩니다. 현재 custom lifecycle은 유지하며, upgrade는 교체 대상인 cache copy가 아니라 게시/전역 package에서 실행해야 합니다.
112
115
 
113
116
  Codex는 `skills/`와 `commands/`를 사용합니다. Claude Code는 `.claude/` 아래의 mirror command와 agent definition을 사용합니다. Antigravity는 `.agents/workflows`와 global skills mirror를 사용합니다.
114
117
 
@@ -123,7 +126,7 @@ Codex 전용 hooks는 Antigravity로 포팅하지 않습니다. 대신 같은 pl
123
126
 
124
127
  ## Locale Policy
125
128
 
126
- Cairn의 재사용 지침은 전역 사용을 위해 영어로 작성됩니다. 사용자에게 보이는 출력은 사용자가 다른 언어를 명시하지 않는 한 설정된 OS locale을 따릅니다. CLI는 `en`, `ko`, `ja`, `zh`, `es`, `fr`, `de`, `pt`의 일반 메시지를 현지화하고, 지원하지 않는 locale은 영어로 fallback합니다. Codex hook `statusMessage` 텍스트는 정적 영어로 유지하고, hook command output은 영어 또는 한국어입니다.
129
+ 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
130
 
128
131
  ## Delegation
129
132
 
package/README.md CHANGED
@@ -45,12 +45,14 @@ When a delegated subagent finishes, it provides a final report before leaving. A
45
45
  `cairn toolcheck` inspects the current repository for JavaScript, TypeScript, Python, PHP, Java, Kotlin, Swift, Go, and Rust stacks, then checks the matching LSP and verification tools.
46
46
 
47
47
  ```sh
48
- cairn toolcheck
49
- cairn toolcheck --install
48
+ cairn toolcheck --root .
49
+ # After explicit approval only:
50
+ cairn toolcheck --install --yes --root .
50
51
  ```
51
52
 
52
53
  - `toolcheck` reports detected stacks and missing tools.
53
- - `toolcheck --install` attempts the closest project-local or repository-native install path, such as package-manager dev dependencies, Composer dev dependencies, `uv`, Java LSP bootstrap, `go install`, or `rustup component add`.
54
+ - Default checks are read-only, bounded by a timeout, and do not execute repository-local wrappers merely to discover them.
55
+ - `toolcheck --install` requires both `--yes` and explicit user approval. Unpinned or checksum-free installers are unavailable rather than silently downloading `latest`.
54
56
  - Cairn plans record detected stack, required tools, install commands, and blockers.
55
57
  - A missing LSP server is not a valid reason to skip precise codebase exploration until installation or an equivalent symbol-aware fallback has been attempted.
56
58
 
@@ -69,7 +71,7 @@ Cairn only applies model-specific adjustment to Claude-family and Codex-family m
69
71
  - Claude-family: useful for long context, policy interpretation, and plan/evidence review.
70
72
  - Codex-family: useful for small implementation tasks, explicit file edits, command-based verification, and bounded `worker` tasks.
71
73
 
72
- Detailed guidance lives in `docs/model-guidance/README.md`, `docs/model-guidance/claude.md`, and `docs/model-guidance/codex.md`.
74
+ Detailed guidance lives in the installed plugin and is referenced as `cairn://docs/model-guidance/README.md`, `cairn://docs/model-guidance/claude.md`, and `cairn://docs/model-guidance/codex.md`.
73
75
 
74
76
  ## Repository Artifacts
75
77
 
@@ -77,11 +79,11 @@ The harness creates and maintains these files at the target repository root.
77
79
 
78
80
  - `MEMORY.md`: short index of persistent domain knowledge.
79
81
  - `docs/memory/*.md`: detailed knowledge by domain.
80
- - `docs/model-guidance/*.md`: Claude and Codex model adjustment guidance.
81
82
  - `PLAN.md`: short index of active and completed work topics.
82
83
  - `docs/plan/*.md`: detailed execution plans.
84
+ - `.cairn/state.json`: git-ignored, versioned active goal/task/receipt state used for interruption recovery and scoped stop gates.
83
85
 
84
- Root files stay short and details move under `docs/`, so agents only read the context they need.
86
+ Runtime scripts, templates, commands, agents, and model guidance stay in the installed plugin root. Runtime locator files let Codex, Claude Code, and Antigravity share that installed copy without copying Cairn internals into the target repository.
85
87
 
86
88
  ## Commands
87
89
 
@@ -111,12 +113,13 @@ cairn toolcheck
111
113
  - `cairn doctor`: diagnoses Codex settings, installation, hook trust state, Claude Code mirror files, and Antigravity mirror files.
112
114
  - `cairn uninstall`: removes Cairn-added Codex settings, cache, Claude Code mirror files, and Antigravity mirror files.
113
115
  - `cairn toolcheck`: detects repository stacks and checks or installs required LSP and verification tools.
116
+ - `cairn goal ...`: starts, inspects, pauses, resumes, blocks, cancels, and completes a persisted repository goal; task completion requires bound successful receipts.
114
117
  - `cairn-memory`: explores domain knowledge and updates `MEMORY.md`.
115
118
  - `cairn-plan`: creates a decision-complete plan under `docs/plan/`.
116
119
  - `cairn-work`: executes the next module task in the current `PLAN.md` with two verification gates.
117
120
  - `cairn-review`: reviews completed tasks against plan, memory, and evidence.
118
121
 
119
- Install and upgrade create `*.cairn-backup-*` backups before modifying `~/.codex/config.toml`. The source plugin manifest stays validator-friendly; only the installed cache copy gets a `hooks` field to activate Codex hooks.
122
+ Install and upgrade create `*.cairn-backup-*` backups before modifying `~/.codex/config.toml`. They also write runtime locators for every surface. The source plugin manifest stays validator-friendly; only the installed cache copy gets a `hooks` field to activate Codex hooks. The current custom lifecycle remains in use; lifecycle upgrade should run from the published/global package, not from the cached copy that it replaces.
120
123
 
121
124
  Codex uses `skills/` and `commands/`. Claude Code uses mirrored commands and agent definitions under `.claude/`. Antigravity uses `.agents/workflows` and global skills mirrors.
122
125
 
@@ -131,7 +134,7 @@ Codex-only hooks are not ported to Antigravity. Instead, the same planning, memo
131
134
 
132
135
  ## Locale Policy
133
136
 
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.
137
+ 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
138
 
136
139
  ## Delegation
137
140