@veewo/claw-core 0.2.17 → 0.2.19

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 (29) hide show
  1. package/README.md +16 -16
  2. package/dist/src/knowledge-sidecar.js +13 -0
  3. package/dist/src/knowledge-sidecar.js.map +1 -1
  4. package/dist/src/plan.js +46 -32
  5. package/dist/src/plan.js.map +1 -1
  6. package/dist/src/resources/cindy-delegate-writer/TEMPLATE.json +1 -1
  7. package/dist/src/resources/delegate-writer/TEMPLATE.json +1 -1
  8. package/dist/src/resources/doc-updater/FALLBACK.md +16 -16
  9. package/dist/src/resources/doc-updater/SKILL.md +19 -19
  10. package/dist/src/resources/doc-updater/TEMPLATE.json +1 -1
  11. package/dist/src/resources/knowledge-writer/CONTENT-COVERAGE.md +30 -30
  12. package/dist/src/resources/knowledge-writer/SKILL.md +6 -6
  13. package/dist/src/resources/knowledge-writer/TEMPLATE.json +1 -1
  14. package/dist/src/resources/knowledge-writer/non-claw-fallback.md +53 -53
  15. package/dist/src/templates/plans/default.js +1 -1
  16. package/dist/src/types.d.ts +2 -0
  17. package/dist/src/workflow-guidance.codex.config.json +363 -0
  18. package/dist/src/workflow-guidance.config.json +365 -365
  19. package/dist/src/workflow-guidance.d.ts +8 -1
  20. package/dist/src/workflow-guidance.js +21 -21
  21. package/dist/src/workflow-guidance.js.map +1 -1
  22. package/dist/src/workflow-guidance.qoder.config.json +362 -0
  23. package/package.json +48 -48
  24. package/dist/src/embedding-config.d.ts +0 -9
  25. package/dist/src/embedding-config.js +0 -21
  26. package/dist/src/embedding-config.js.map +0 -1
  27. package/dist/src/project-config-defaults.d.ts +0 -6
  28. package/dist/src/project-config-defaults.js +0 -5
  29. package/dist/src/project-config-defaults.js.map +0 -1
@@ -1,19 +1,19 @@
1
- ---
2
- name: doc-updater
3
- description: Update configured existing external documentation as the dependent documentation stage of knowledge finalization.
4
- ---
5
-
6
- # Doc updater
7
-
8
- Resolve `<skill-dir>` as the directory containing this file.
9
-
10
- Use this skill only when it owns the external-document stage of an active
11
- knowledge-finalization plan.
12
-
13
- - When this skill owns the supplied finalization assignment as a stage of an active plan, run `claw subplan create --parent <parent-task-name> --task-id <id> --template-file "<skill-dir>/TEMPLATE.json"`.
14
- - When explicitly invoked with supplied materials outside an active parent plan, run `claw plan create --template-file "<skill-dir>/TEMPLATE.json" --title "doc-updater"`.
15
-
16
- The parent stage supplies the frozen external documentation paths, finalization
17
- materials, and the resulting canonical knowledge state.
18
-
19
- If the template or claw CLI is unavailable, follow `FALLBACK.md` directly.
1
+ ---
2
+ name: doc-updater
3
+ description: Update configured existing external documentation as the dependent documentation stage of knowledge finalization.
4
+ ---
5
+
6
+ # Doc updater
7
+
8
+ Resolve `<skill-dir>` as the directory containing this file.
9
+
10
+ Use this skill only when it owns the external-document stage of an active
11
+ knowledge-finalization plan.
12
+
13
+ - When this skill owns the supplied finalization assignment as a stage of an active plan, run `claw subplan create --parent <parent-task-name> --task-id <id> --template-file "<skill-dir>/TEMPLATE.json"`.
14
+ - When explicitly invoked with supplied materials outside an active parent plan, run `claw plan create --template-file "<skill-dir>/TEMPLATE.json" --title "doc-updater"`.
15
+
16
+ The parent stage supplies the frozen external documentation paths, finalization
17
+ materials, and the resulting canonical knowledge state.
18
+
19
+ If the template or claw CLI is unavailable, follow `FALLBACK.md` directly.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "doc-updater",
3
- "version": "0.2.17",
3
+ "version": "0.2.19",
4
4
  "scope": "session",
5
5
  "title": "doc-updater",
6
6
  "status": "process.active",
@@ -1,30 +1,30 @@
1
- # knowledge-writer content coverage
2
-
3
- ## Source to converted-home mapping
4
-
5
- - Trigger and template entry: `SKILL.md`; input and quality contract: `TEMPLATE.json` requirements, tasks, guidance, and rules.
6
- - Template compatibility: `TEMPLATE.json` declares the current claw CLI version.
7
- - Conclusion evidence from every supplied material, with task-status interpretation when present: `non-claw-fallback.md`, template tasks 1 and 2, acceptance criteria, and template rules.
8
- - Evidence freshness and unresolved-conflict handling: `non-claw-fallback.md`, template task 2, acceptance criteria, and template rules.
9
- - Runtime scope: `TEMPLATE.json` top-level `scope` only; it is not repeated in writer prompts.
10
- - Fixed Truth-then-ADR sequence without routing choices: template tasks 4 and 5 and `non-claw-fallback.md`.
11
- - Machine-stable current/history/superseded metadata and dated evolution grammar: `knowledge-format.md`, template tasks 4 and 5, and `non-claw-fallback.md`.
12
- - On-write format inspection and repair without corpus-wide migration: `knowledge-format.md`, template tasks 3 through 6, acceptance criteria, and template rules.
13
- - Canonical-owner discovery and exhaustive search: template tasks 3 through 6 plus template rules.
14
- - One-owner stewardship and cross-document consistency: template task 6, template rules, and `non-claw-fallback.md`.
15
- - Writing constraints, encoding, exact identifiers, and return behavior: `non-claw-fallback.md`, template task 6, and template rules.
16
- - Supplied-material immutability: template task 1, acceptance criteria, template rules, and `non-claw-fallback.md`.
17
- - Verification gate: template task 6 requires focused and exhaustive post-write review before completion.
18
-
19
- ## Coverage result
20
-
21
- - [x] Important source triggers and inputs are represented.
22
- - [x] Conclusion-bearing content from every supplied material drives deposition; task status informs interpretation without turning task metadata into an execution record.
23
- - [x] The ordered workflow always performs the Truth pass before the ADR pass and has no route-choice task.
24
- - [x] Search tools, ownership constraints, and safety boundaries are represented.
25
- - [x] Time-bounded authority, current-anchor checks, and unresolved-freshness no-edit behavior are represented.
26
- - [x] Writing and consistency verification requirements are represented.
27
- - [x] Canonical state and dated evolution semantics are represented.
28
- - [x] Every written owner is repaired to canonical format while untouched documents remain unmigrated.
29
- - [x] Full direct behavior remains available in the adjacent fallback.
30
- - [x] No source companion scripts or external links require migration.
1
+ # knowledge-writer content coverage
2
+
3
+ ## Source to converted-home mapping
4
+
5
+ - Trigger and template entry: `SKILL.md`; input and quality contract: `TEMPLATE.json` requirements, tasks, guidance, and rules.
6
+ - Template compatibility: `TEMPLATE.json` declares the current claw CLI version.
7
+ - Conclusion evidence from every supplied material, with task-status interpretation when present: `non-claw-fallback.md`, template tasks 1 and 2, acceptance criteria, and template rules.
8
+ - Evidence freshness and unresolved-conflict handling: `non-claw-fallback.md`, template task 2, acceptance criteria, and template rules.
9
+ - Runtime scope: `TEMPLATE.json` top-level `scope` only; it is not repeated in writer prompts.
10
+ - Fixed Truth-then-ADR sequence without routing choices: template tasks 4 and 5 and `non-claw-fallback.md`.
11
+ - Machine-stable current/history/superseded metadata and dated evolution grammar: `knowledge-format.md`, template tasks 4 and 5, and `non-claw-fallback.md`.
12
+ - On-write format inspection and repair without corpus-wide migration: `knowledge-format.md`, template tasks 3 through 6, acceptance criteria, and template rules.
13
+ - Canonical-owner discovery and exhaustive search: template tasks 3 through 6 plus template rules.
14
+ - One-owner stewardship and cross-document consistency: template task 6, template rules, and `non-claw-fallback.md`.
15
+ - Writing constraints, encoding, exact identifiers, and return behavior: `non-claw-fallback.md`, template task 6, and template rules.
16
+ - Supplied-material immutability: template task 1, acceptance criteria, template rules, and `non-claw-fallback.md`.
17
+ - Verification gate: template task 6 requires focused and exhaustive post-write review before completion.
18
+
19
+ ## Coverage result
20
+
21
+ - [x] Important source triggers and inputs are represented.
22
+ - [x] Conclusion-bearing content from every supplied material drives deposition; task status informs interpretation without turning task metadata into an execution record.
23
+ - [x] The ordered workflow always performs the Truth pass before the ADR pass and has no route-choice task.
24
+ - [x] Search tools, ownership constraints, and safety boundaries are represented.
25
+ - [x] Time-bounded authority, current-anchor checks, and unresolved-freshness no-edit behavior are represented.
26
+ - [x] Writing and consistency verification requirements are represented.
27
+ - [x] Canonical state and dated evolution semantics are represented.
28
+ - [x] Every written owner is repaired to canonical format while untouched documents remain unmigrated.
29
+ - [x] Full direct behavior remains available in the adjacent fallback.
30
+ - [x] No source companion scripts or external links require migration.
@@ -1,9 +1,9 @@
1
- ---
2
- name: knowledge-writer
3
- description: Evaluate supplied materials by their content, then maintain canonical Truth followed by ADR knowledge in one consistency-aware pass. Use only when explicitly invoked with supplied materials; do not trigger this skill implicitly.
4
- ---
5
- # Knowledge writer
6
-
1
+ ---
2
+ name: knowledge-writer
3
+ description: Evaluate supplied materials by their content, then maintain canonical Truth followed by ADR knowledge in one consistency-aware pass. Use only when explicitly invoked with supplied materials; do not trigger this skill implicitly.
4
+ ---
5
+ # Knowledge writer
6
+
7
7
  Resolve `<skill-dir>` as the directory containing this file.
8
8
 
9
9
  - When this skill owns the supplied finalization assignment as a stage of an active plan, run `claw subplan create --parent <parent-task-name> --task-id <id> --template-file "<skill-dir>/TEMPLATE.json"`.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "knowledge-writer",
3
- "version": "0.2.17",
3
+ "version": "0.2.19",
4
4
  "scope": "session",
5
5
  "title": "knowledge-writer",
6
6
  "status": "process.active",
@@ -1,53 +1,53 @@
1
- # Knowledge writer fallback
2
-
3
- Act as the knowledge-base steward for the project. Leave the relevant Truth and ADR corpus accurate, coherent, and easy for future agents to trust.
4
-
5
- ## Input and evidence boundary
6
-
7
- Read every supplied material completely. Interpret evidence from its content and semantics rather than requiring a particular filename, field, record shape, or serialization format. Extract executed conclusions, verified findings, retrospective lessons, key decisions, and other explicit outcomes wherever they appear. Do not repeat implementation or test verification or modify supplied materials.
8
-
9
- When task status is present, it helps interpret completed, pending, and blocked scope, but a task list is not an execution log. Infer execution results, verified findings, planning outcomes, and durable decisions from conclusion-bearing content; never turn task titles, descriptions, requirements, or intentions into completed results merely because they appear in an input.
10
-
11
- ## Evidence freshness
12
-
13
- Trusted means the evidence was verified at the revision or worktree state it describes; it does not make an older report permanently authoritative for current behavior.
14
-
15
- - Before writing current behavior from a supplied conclusion, read the relevant implementation anchors and inspect later or overlapping working-tree changes. This is a freshness check, not repeated implementation verification; do not rerun tests merely to reconfirm the report.
16
- - When current implementation supersedes the report, current implementation owns current-state Truth and the report may only support historical or version-bound evidence.
17
- - If chronology or authority cannot be resolved safely, omit the affected canonical write and retain the freshness conflict as the reason.
18
-
19
- ## Fixed deposition sequence
20
-
21
- Process the eligible evidence without a route choice:
22
-
23
- 1. Maintain Truth for stable behavior, architecture facts, constraints, pitfalls, code anchors, and verification rules.
24
- 2. Then maintain ADRs for durable decisions, context, rationale, alternatives, tradeoffs, ownership, and consequences, using the same evidence and resulting Truth state.
25
- 3. Finally review Truth and ADR together for ownership and consistency.
26
-
27
- Use `knowledge-format.md` for every new document and every existing owner written by this pass. Inspect each selected owner before writing and repair nonconforming structure in the same edit; leave untouched documents unmigrated. Dated identifies an evolution checkpoint, not age or time-to-live.
28
-
29
- It is valid for either pass to make no edit when the eligible evidence contains no new or changed durable knowledge. Temporary progress, speculation, conversational narration, unchanged facts, and unfinished-task claims do not belong in canonical knowledge.
30
-
31
- ## Stewardship and ownership
32
-
33
- Use `claw search` to discover existing owners, then open every plausible candidate before judging it. Use exhaustive text search for distinguishing identifiers when top-k recall could hide another current claim. Update the document that already owns the topic; create a new document only for a genuinely new durable topic after filename and title collision checks.
34
-
35
- Maintain one current owner for each material fact or decision. A broad or neighboring document is still a competing owner when it restates an unqualified current rule. Reconcile overlaps by extending the canonical owner and narrowing other current claims to references, historical evidence, or non-overlapping scope. Preserve unrelated user edits and repository conventions.
36
-
37
- Truth and ADR are one knowledge system: after both ordered passes, review the related documents together and resolve contradictions between current-state Truth, decision ownership, and consequences. Do not report completion while a material current claim remains inconsistent or ownerless.
38
-
39
- ## Writing and verification
40
-
41
- - Follow the repository's language and document shape.
42
- - Preserve exact identifiers, config keys, commands, and error text.
43
- - Use project-relative paths in canonical documents.
44
- - Ground every fact, path, owner, and alternative in supplied or inspected evidence.
45
- - Label historical and superseded evidence explicitly; never silently promote it to current behavior.
46
- - Add dated evolution only for former facts or decisions that remain useful for rollback, compatibility, feature repetition, incident reasoning, or understanding a meaningful transition.
47
- - Repair every written Truth or ADR owner to the canonical format in `knowledge-format.md`; do not defer a discovered format mismatch.
48
- - Repair mojibake and preserve valid Markdown encoding.
49
- - Re-run focused and exhaustive searches after writing; every plausible hit must be the selected owner, an explicit reference, historical or version-bound evidence, or a narrowed non-overlapping claim.
50
-
51
- ## Return
52
-
53
- Return a brief completion note with changed paths or the evidence-backed no-edit reasons. Response format is not part of the contract.
1
+ # Knowledge writer fallback
2
+
3
+ Act as the knowledge-base steward for the project. Leave the relevant Truth and ADR corpus accurate, coherent, and easy for future agents to trust.
4
+
5
+ ## Input and evidence boundary
6
+
7
+ Read every supplied material completely. Interpret evidence from its content and semantics rather than requiring a particular filename, field, record shape, or serialization format. Extract executed conclusions, verified findings, retrospective lessons, key decisions, and other explicit outcomes wherever they appear. Do not repeat implementation or test verification or modify supplied materials.
8
+
9
+ When task status is present, it helps interpret completed, pending, and blocked scope, but a task list is not an execution log. Infer execution results, verified findings, planning outcomes, and durable decisions from conclusion-bearing content; never turn task titles, descriptions, requirements, or intentions into completed results merely because they appear in an input.
10
+
11
+ ## Evidence freshness
12
+
13
+ Trusted means the evidence was verified at the revision or worktree state it describes; it does not make an older report permanently authoritative for current behavior.
14
+
15
+ - Before writing current behavior from a supplied conclusion, read the relevant implementation anchors and inspect later or overlapping working-tree changes. This is a freshness check, not repeated implementation verification; do not rerun tests merely to reconfirm the report.
16
+ - When current implementation supersedes the report, current implementation owns current-state Truth and the report may only support historical or version-bound evidence.
17
+ - If chronology or authority cannot be resolved safely, omit the affected canonical write and retain the freshness conflict as the reason.
18
+
19
+ ## Fixed deposition sequence
20
+
21
+ Process the eligible evidence without a route choice:
22
+
23
+ 1. Maintain Truth for stable behavior, architecture facts, constraints, pitfalls, code anchors, and verification rules.
24
+ 2. Then maintain ADRs for durable decisions, context, rationale, alternatives, tradeoffs, ownership, and consequences, using the same evidence and resulting Truth state.
25
+ 3. Finally review Truth and ADR together for ownership and consistency.
26
+
27
+ Use `knowledge-format.md` for every new document and every existing owner written by this pass. Inspect each selected owner before writing and repair nonconforming structure in the same edit; leave untouched documents unmigrated. Dated identifies an evolution checkpoint, not age or time-to-live.
28
+
29
+ It is valid for either pass to make no edit when the eligible evidence contains no new or changed durable knowledge. Temporary progress, speculation, conversational narration, unchanged facts, and unfinished-task claims do not belong in canonical knowledge.
30
+
31
+ ## Stewardship and ownership
32
+
33
+ Use `claw search` to discover existing owners, then open every plausible candidate before judging it. Use exhaustive text search for distinguishing identifiers when top-k recall could hide another current claim. Update the document that already owns the topic; create a new document only for a genuinely new durable topic after filename and title collision checks.
34
+
35
+ Maintain one current owner for each material fact or decision. A broad or neighboring document is still a competing owner when it restates an unqualified current rule. Reconcile overlaps by extending the canonical owner and narrowing other current claims to references, historical evidence, or non-overlapping scope. Preserve unrelated user edits and repository conventions.
36
+
37
+ Truth and ADR are one knowledge system: after both ordered passes, review the related documents together and resolve contradictions between current-state Truth, decision ownership, and consequences. Do not report completion while a material current claim remains inconsistent or ownerless.
38
+
39
+ ## Writing and verification
40
+
41
+ - Follow the repository's language and document shape.
42
+ - Preserve exact identifiers, config keys, commands, and error text.
43
+ - Use project-relative paths in canonical documents.
44
+ - Ground every fact, path, owner, and alternative in supplied or inspected evidence.
45
+ - Label historical and superseded evidence explicitly; never silently promote it to current behavior.
46
+ - Add dated evolution only for former facts or decisions that remain useful for rollback, compatibility, feature repetition, incident reasoning, or understanding a meaningful transition.
47
+ - Repair every written Truth or ADR owner to the canonical format in `knowledge-format.md`; do not defer a discovered format mismatch.
48
+ - Repair mojibake and preserve valid Markdown encoding.
49
+ - Re-run focused and exhaustive searches after writing; every plausible hit must be the selected owner, an explicit reference, historical or version-bound evidence, or a narrowed non-overlapping claim.
50
+
51
+ ## Return
52
+
53
+ Return a brief completion note with changed paths or the evidence-backed no-edit reasons. Response format is not part of the contract.
@@ -1,6 +1,6 @@
1
1
  export const defaultPlanTemplate = {
2
2
  id: "default",
3
- version: "0.2.17",
3
+ version: "0.2.19",
4
4
  status: "process.discussing",
5
5
  goal: {
6
6
  text: "",
@@ -150,6 +150,7 @@ export type WorkflowGuidanceGoalTool = {
150
150
  };
151
151
  export type WorkflowGuidance = {
152
152
  stage: "requirements" | "review" | "discussion" | "execution" | "done" | "deposition" | "paused" | "left";
153
+ transition?: "subplan_returned";
153
154
  summary: string;
154
155
  nextsteps: string[];
155
156
  nextTask?: {
@@ -410,6 +411,7 @@ export type PlanWriteInput = {
410
411
  host?: string;
411
412
  };
412
413
  export type PlanWriteResult = {
414
+ scope: "project" | "session";
413
415
  taskName: string;
414
416
  taskDir: string;
415
417
  planPath: string;
@@ -0,0 +1,363 @@
1
+ {
2
+ "goalModeObjective": {
3
+ "withGoal": "Follow the claw workflow guidance and finish your goal: {{planGoal}}",
4
+ "withoutGoal": "Follow the claw workflow guidance and finish your goal."
5
+ },
6
+ "planCreateRecall": {
7
+ "recommendedCommand": "claw search --query \"<topic>\""
8
+ },
9
+ "states": {
10
+ "prepare.requirements.withGoal": {
11
+ "stage": "requirements",
12
+ "summary": "Task scope is bound. Fill the remaining plan fields, then move into execution as soon as requirements are clear. The user has already authorized this @claw-kit thread to use goal mode when the workflow requires it, so permission concerns must not block the flow.",
13
+ "nextsteps": [
14
+ "1. Fill the missing plan fields.",
15
+ "2. Move into `process.active` once requirements are clear."
16
+ ],
17
+ "notes": "Fill only the fields still needed to execute, such as `requirements`, `tasks`, `references`, `rules`, and `keyDecisions`. If scope is still unclear, clarify it with the user before switching to `process.active`.",
18
+ "commandHints": [
19
+ "{{editBase}} --status process.active",
20
+ "{{editBase}} --requirements \"<summary>\" --acceptance \"<criterion>\"",
21
+ "{{editBase}} --reference <path> --why \"<reason>\""
22
+ ]
23
+ },
24
+ "prepare.requirements.withGoal.noGoalMode": {
25
+ "stage": "requirements",
26
+ "summary": "Task scope is bound. Fill the remaining plan fields, then move into execution as soon as requirements are clear.",
27
+ "nextsteps": [
28
+ "1. Fill the missing plan fields.",
29
+ "2. Move into `process.active` once requirements are clear."
30
+ ],
31
+ "notes": "Fill only the fields still needed to execute, such as `requirements`, `tasks`, `references`, `rules`, and `keyDecisions`. If scope is still unclear, clarify it with the user before switching to `process.active`.",
32
+ "commandHints": [
33
+ "{{editBase}} --status process.active",
34
+ "{{editBase}} --requirements \"<summary>\" --acceptance \"<criterion>\"",
35
+ "{{editBase}} --reference <path> --why \"<reason>\""
36
+ ]
37
+ },
38
+ "prepare.requirements.withoutGoal": {
39
+ "stage": "requirements",
40
+ "summary": "Task scope is bound. Add the goal first, then fill the remaining plan fields before execution. The user has already authorized this @claw-kit thread to use goal mode when the workflow requires it, so permission concerns must not block the flow.",
41
+ "nextsteps": [
42
+ "1. Fill `goal.text`.",
43
+ "2. Fill the missing plan fields.",
44
+ "3. Move into `process.active` once requirements are clear."
45
+ ],
46
+ "notes": "Fill only the fields still needed to execute, such as `requirements`, `tasks`, `references`, `rules`, and `keyDecisions`. If scope is still unclear, clarify it with the user before switching to `process.active`.",
47
+ "commandHints": [
48
+ "{{editBase}} --status process.active",
49
+ "{{editBase}} --goal \"<goal>\" --requirements \"<summary>\" --acceptance \"<criterion>\"",
50
+ "{{editBase}} --reference <path> --why \"<reason>\""
51
+ ]
52
+ },
53
+ "prepare.requirements.withoutGoal.noGoalMode": {
54
+ "stage": "requirements",
55
+ "summary": "Task scope is bound. Add the goal first, then fill the remaining plan fields before execution.",
56
+ "nextsteps": [
57
+ "1. Fill `goal.text`.",
58
+ "2. Fill the missing plan fields.",
59
+ "3. Move into `process.active` once requirements are clear."
60
+ ],
61
+ "notes": "Fill only the fields still needed to execute, such as `requirements`, `tasks`, `references`, `rules`, and `keyDecisions`. If scope is still unclear, clarify it with the user before switching to `process.active`.",
62
+ "commandHints": [
63
+ "{{editBase}} --status process.active",
64
+ "{{editBase}} --goal \"<goal>\" --requirements \"<summary>\" --acceptance \"<criterion>\"",
65
+ "{{editBase}} --reference <path> --why \"<reason>\""
66
+ ]
67
+ },
68
+ "prepare.review": {
69
+ "stage": "review",
70
+ "summary": "This plan is in a legacy review stage.",
71
+ "nextsteps": [
72
+ "1. Fold the remaining review notes into the plan.",
73
+ "2. Confirm the route with the user.",
74
+ "3. Move the plan back into `prepare.requirements` or `process.discussing`."
75
+ ],
76
+ "notes": "Do not create a separate review pass. Merge review criteria into planning itself.",
77
+ "commandHints": [
78
+ "{{editBase}} --requirements \"<revised summary>\" --key-decision \"<confirmed decision>\"",
79
+ "{{editBase}} --status prepare.requirements",
80
+ "{{editBase}} --status process.discussing"
81
+ ],
82
+ "askUser": {
83
+ "reason": "This legacy review stage should be resolved back into normal planning before execution.",
84
+ "useCodexOptions": true,
85
+ "options": [
86
+ {
87
+ "id": "merge-revisions",
88
+ "label": "Revise plan",
89
+ "description": "Apply the remaining plan changes directly, then continue with normal planning.",
90
+ "recommended": true
91
+ },
92
+ {
93
+ "id": "discuss-tradeoff",
94
+ "label": "Discuss tradeoff",
95
+ "description": "The review raised a route choice that should be clarified with the user."
96
+ },
97
+ {
98
+ "id": "hold-plan",
99
+ "label": "Hold execution",
100
+ "description": "Pause until missing requirements or constraints are clarified."
101
+ }
102
+ ]
103
+ }
104
+ },
105
+ "process.allTasksDone": {
106
+ "stage": "done",
107
+ "summary": "All plan tasks are done. Finish the plan record, then complete the canonical plan lifecycle.",
108
+ "nextsteps": [
109
+ "1. Clear thread progress with `update_plan`.",
110
+ "2. Run `claw plan done --retrospective` once. Add `--key-decision` only for real durable decisions not already recorded.",
111
+ "3. Stop after the canonical plan transition; no separate closeout action is required from the main agent."
112
+ ],
113
+ "notes": "Background maintenance is fail-open and requires no main-agent action; it must not change plan completion or subplan resume.",
114
+ "commandHints": [
115
+ "{{doneBase}} --retrospective \"<summary>\" [--key-decision \"<durable decision>\"]"
116
+ ]
117
+ },
118
+ "process.hasCompletedTasks": {
119
+ "stage": "{{processStage}}",
120
+ "summary": "Execution is in progress.",
121
+ "nextsteps": [
122
+ "1. Sync thread progress with `update_plan`.",
123
+ "2. Continue with {{nextTaskRef}}."
124
+ ],
125
+ "notes": "In `process.active`, keep moving unless there is a real blocker or explicit user interruption.",
126
+ "commandHints": [
127
+ "{{taskDoneCommand}}",
128
+ "claw task edit --id <id> --status in_progress"
129
+ ]
130
+ },
131
+ "process.justEntered": {
132
+ "stage": "{{processStage}}",
133
+ "summary": "Execution is starting.",
134
+ "nextsteps": [
135
+ "Sync thread progress with `update_plan`.",
136
+ "Start with {{nextTaskRef}}."
137
+ ],
138
+ "notes": "In `process.active`, keep moving unless there is a real blocker or explicit user interruption.",
139
+ "commandHints": [
140
+ "{{taskDoneCommand}}",
141
+ "{{doneBase}} --retrospective \"<summary>\""
142
+ ],
143
+ "goalTool": {
144
+ "tool": "create_goal",
145
+ "allowOverwrite": true,
146
+ "reason": "Execution is entering an active process state, so the thread should have an active Codex goal tied to the plan goal."
147
+ },
148
+ "goalMode": {
149
+ "allowOverwrite": true,
150
+ "setWhen": "on_enter_process_active"
151
+ }
152
+ },
153
+ "process.justEntered.noGoalMode": {
154
+ "stage": "{{processStage}}",
155
+ "summary": "Execution is starting.",
156
+ "nextsteps": [
157
+ "Sync thread progress with `update_plan`.",
158
+ "Start with {{nextTaskRef}}."
159
+ ],
160
+ "notes": "In `process.active`, keep moving unless there is a real blocker or explicit user interruption.",
161
+ "commandHints": [
162
+ "{{taskDoneCommand}}",
163
+ "{{doneBase}} --retrospective \"<summary>\""
164
+ ]
165
+ },
166
+ "process.resumedActive": {
167
+ "stage": "execution",
168
+ "summary": "Execution is resuming.",
169
+ "nextsteps": [
170
+ "Sync thread progress with `update_plan`.",
171
+ "Restore Goal Mode to the active state.",
172
+ "Resume with {{nextTaskRef}}."
173
+ ],
174
+ "notes": "The plan is moving back from a paused status into active execution, so Goal Mode should be restored to the active state before work resumes.",
175
+ "commandHints": [
176
+ "{{taskDoneCommand}}",
177
+ "{{doneBase}} --retrospective \"<summary>\""
178
+ ],
179
+ "goalTool": {
180
+ "tool": "create_goal",
181
+ "allowOverwrite": true,
182
+ "reason": "Execution is resuming from a paused process state, so the thread should restore an active Codex goal for the plan goal."
183
+ },
184
+ "goalMode": {
185
+ "allowOverwrite": true,
186
+ "setWhen": "on_resume_process_active"
187
+ }
188
+ },
189
+ "process.resumedActive.noGoalMode": {
190
+ "stage": "execution",
191
+ "summary": "Execution is resuming.",
192
+ "nextsteps": [
193
+ "Sync the thread progress with our tasks.",
194
+ "Resume with {{nextTaskRef}}."
195
+ ],
196
+ "notes": "The plan is moving back from a paused status into active execution.",
197
+ "commandHints": [
198
+ "{{taskDoneCommand}}",
199
+ "{{doneBase}} --retrospective \"<summary>\""
200
+ ]
201
+ },
202
+ "process.wait": {
203
+ "stage": "paused",
204
+ "summary": "Execution is paused.",
205
+ "nextsteps": [
206
+ "1. Use `update_goal(status=\"blocked\")` to end the current active thread goal.",
207
+ "2. When resuming the plan, restore the active thread goal after re-entering `process.active`.",
208
+ "3. Resume through `process.active` when execution should continue."
209
+ ],
210
+ "notes": "Use `process.wait` for a real blocker or a deliberate hold. Do not keep executing while the plan is paused.",
211
+ "commandHints": [
212
+ "{{resumeBase}}"
213
+ ],
214
+ "goalTool": {
215
+ "tool": "update_goal",
216
+ "status": "blocked",
217
+ "reason": "Execution is paused in `process.wait`, so the current active thread goal should be ended as blocked until work resumes."
218
+ }
219
+ },
220
+ "process.wait.noGoalMode": {
221
+ "stage": "paused",
222
+ "summary": "Execution is paused.",
223
+ "nextsteps": [
224
+ "1. Resume through `process.active` when execution should continue."
225
+ ],
226
+ "notes": "Use `process.wait` for a real blocker or a deliberate hold. Do not keep executing while the plan is paused.",
227
+ "commandHints": [
228
+ "{{resumeBase}}"
229
+ ]
230
+ },
231
+ "process.discussing": {
232
+ "stage": "discussion",
233
+ "summary": "The plan is paused for discussion.",
234
+ "nextsteps": [
235
+ "1. Use `update_goal(status=\"blocked\")` to end the current active thread goal.",
236
+ "2. When resuming the plan, restore the active thread goal after re-entering `process.active`.",
237
+ "3. Resolve the discussion, then resume through `process.active`."
238
+ ],
239
+ "notes": "Use `process.discussing` for route discussion or decision-making. Resume execution only after the discussion is settled.",
240
+ "commandHints": [
241
+ "{{resumeBase}}"
242
+ ],
243
+ "goalTool": {
244
+ "tool": "update_goal",
245
+ "status": "blocked",
246
+ "reason": "Execution is paused in `process.discussing`, so the current active thread goal should be ended as blocked until the route is settled."
247
+ }
248
+ },
249
+ "process.discussing.initial": {
250
+ "stage": "discussion",
251
+ "summary": "The plan starts in discussion while the requirements and proposed solution are discussed and confirmed with the user.",
252
+ "nextsteps": [
253
+ "1. Use {{planningSkill}} to discuss and confirm the requirements and proposed solution with the user.",
254
+ "2. If execution remains, record the task list with the relevant command hint. If planning resolves the request, complete task #1 and close the plan."
255
+ ],
256
+ "notes": "A draft is not completion.",
257
+ "commandHints": [
258
+ "{{startBase}} --requirements \"<summary>\" --acceptance \"<criterion>\" --add-task \"<title>\" --detail \"<detail>\"",
259
+ "claw task done --id 1"
260
+ ]
261
+ },
262
+ "process.discussing.initial.noPlanStart": {
263
+ "stage": "discussion",
264
+ "summary": "The plan starts in discussion and must remain there until the current template task's delivery guidance is satisfied.",
265
+ "nextsteps": [
266
+ "1. Use the task's requested planning or discussion skill until its outcome, constraints, and material open questions are clear.",
267
+ "2. Follow the current template task's delivery guidance; use ordinary plan and task mutations unless that guidance deliberately adopts the optional plan start shorthand."
268
+ ],
269
+ "notes": "claw plan start remains globally available as optional syntax sugar, but this template task has not selected it as the recommended delivery path."
270
+ },
271
+ "process.discussing.noGoalMode": {
272
+ "stage": "discussion",
273
+ "summary": "The plan is paused for discussion.",
274
+ "nextsteps": [
275
+ "1. Resolve the discussion, then resume through `process.active`."
276
+ ],
277
+ "notes": "Use `process.discussing` for route discussion or decision-making. Resume execution only after the discussion is settled.",
278
+ "commandHints": [
279
+ "{{resumeBase}}"
280
+ ]
281
+ },
282
+ "process.activeTask": {
283
+ "stage": "{{processStage}}",
284
+ "summary": "Execution is in progress.",
285
+ "nextsteps": [
286
+ "Continue the current task."
287
+ ],
288
+ "commandHints": [
289
+ "{{taskDoneCommand}}"
290
+ ]
291
+ },
292
+ "process.default": {
293
+ "stage": "{{processStage}}",
294
+ "summary": "Execution is in progress.",
295
+ "nextsteps": [
296
+ "Continue with {{nextTaskRef}}."
297
+ ],
298
+ "commandHints": [
299
+ "{{taskDoneCommand}}"
300
+ ]
301
+ },
302
+ "end.completed": {
303
+ "stage": "done",
304
+ "summary": "The plan is completed and ready for closeout.",
305
+ "nextsteps": [
306
+ "1. Use `update_goal(status=\"complete\")` to close the active thread goal for this plan.",
307
+ "2. Finish any remaining workflow-guided closeout work such as archive or parent-plan resumption.",
308
+ "3. Do not continue ad hoc in this thread. Start the next task only through `using-claw-kit`, then follow the returned `workflowGuidance`."
309
+ ],
310
+ "goalTool": {
311
+ "tool": "update_goal",
312
+ "status": "complete",
313
+ "reason": "The plan has reached completion, so the active thread goal should be marked complete."
314
+ }
315
+ },
316
+ "end.closed": {
317
+ "stage": "paused",
318
+ "summary": "The plan is no longer active.",
319
+ "nextsteps": [
320
+ "Reopen through `prepare.requirements` before resuming, or leave it as historical context."
321
+ ],
322
+ "commandHints": [
323
+ "{{editBase}} --status prepare.requirements"
324
+ ]
325
+ }
326
+ },
327
+ "sessionStart": {
328
+ "default": {
329
+ "lines": [
330
+ "This session started inside a .claw project: {{projectName}} ({{projectId}}).",
331
+ ".claw directory: {{clawDir}}",
332
+ "You can use goal mode in this thread when required by the claw workflow; don't ask me again.",
333
+ "Follow the claw workflowGuidance return fields as the required next-step contract.",
334
+ "Load claw-kit:using-claw-kit as the main workflow skill for this session."
335
+ ]
336
+ },
337
+ "recovered": {
338
+ "header": [
339
+ "Use @claw-kit for this session.",
340
+ "Claw workflow snapshot is recovered.",
341
+ "Treat returned claw workflowGuidance as the only next-step contract.",
342
+ "There is already an unfinished plan in this thread.",
343
+ "Tell the user and ask whether to close the current plan or continue advancing it before starting unrelated work.",
344
+ "You can use goal mode in this thread when required by the claw workflow; don't ask me again.",
345
+ "After this plan finishes, keep using claw-kit in this thread for the next task.",
346
+ ""
347
+ ],
348
+ "snapshotHeader": "Current claw workflow snapshot:",
349
+ "snapshotFields": {
350
+ "task": "- task: {{taskName}}",
351
+ "plan": "- plan: {{planFile}}",
352
+ "planStatus": "- plan status: {{planStatus}}",
353
+ "planSummary": "- plan summary: {{planSummary}}",
354
+ "nextSteps": "- next steps: {{nextSteps}}",
355
+ "commandHints": "- command hints: {{commandHints}}",
356
+ "notes": "- notes: {{notes}}",
357
+ "askUser": "- ask user: {{askUser}}",
358
+ "goalMode": "- goal mode: {{goalMode}}"
359
+ },
360
+ "planContentHeader": "Current plan content:"
361
+ }
362
+ }
363
+ }