@travisennis/acai 0.0.11 → 0.0.12

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 (110) hide show
  1. package/README.md +2 -3
  2. package/dist/commands/init-project/utils.d.ts.map +1 -1
  3. package/dist/commands/init-project/utils.js +0 -11
  4. package/dist/commands/manager.d.ts.map +1 -1
  5. package/dist/commands/manager.js +6 -1
  6. package/dist/commands/resources/index.d.ts.map +1 -1
  7. package/dist/commands/resources/index.js +4 -1
  8. package/dist/commands/session/index.d.ts.map +1 -1
  9. package/dist/commands/session/index.js +6 -0
  10. package/dist/commands/session/types.d.ts +1 -0
  11. package/dist/commands/session/types.d.ts.map +1 -1
  12. package/dist/commands/tools/index.d.ts +3 -0
  13. package/dist/commands/tools/index.d.ts.map +1 -0
  14. package/dist/commands/tools/index.js +190 -0
  15. package/dist/commands/tools/templates.d.ts +6 -0
  16. package/dist/commands/tools/templates.d.ts.map +1 -0
  17. package/dist/commands/tools/templates.js +97 -0
  18. package/dist/config/index.d.ts +5 -0
  19. package/dist/config/index.d.ts.map +1 -1
  20. package/dist/config/index.js +41 -1
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +15 -3
  23. package/dist/models/anthropic-provider.d.ts +1 -1
  24. package/dist/models/deepseek-provider.d.ts +3 -3
  25. package/dist/models/deepseek-provider.js +17 -17
  26. package/dist/models/google-provider.d.ts +2 -4
  27. package/dist/models/google-provider.d.ts.map +1 -1
  28. package/dist/models/google-provider.js +2 -17
  29. package/dist/models/groq-provider.d.ts +2 -4
  30. package/dist/models/groq-provider.d.ts.map +1 -1
  31. package/dist/models/groq-provider.js +3 -21
  32. package/dist/models/opencode-go-provider.d.ts +11 -1
  33. package/dist/models/opencode-go-provider.d.ts.map +1 -1
  34. package/dist/models/opencode-go-provider.js +136 -0
  35. package/dist/models/opencode-zen-provider.d.ts +3 -3
  36. package/dist/models/opencode-zen-provider.d.ts.map +1 -1
  37. package/dist/models/opencode-zen-provider.js +26 -32
  38. package/dist/models/openrouter-provider.d.ts +4 -15
  39. package/dist/models/openrouter-provider.d.ts.map +1 -1
  40. package/dist/models/openrouter-provider.js +26 -169
  41. package/dist/models/providers.d.ts +1 -1
  42. package/dist/models/providers.d.ts.map +1 -1
  43. package/dist/models/xai-provider.d.ts +1 -2
  44. package/dist/models/xai-provider.d.ts.map +1 -1
  45. package/dist/models/xai-provider.js +0 -13
  46. package/dist/prompts/manager.d.ts.map +1 -1
  47. package/dist/prompts/manager.js +5 -1
  48. package/dist/prompts/system-prompt.d.ts +1 -0
  49. package/dist/prompts/system-prompt.d.ts.map +1 -1
  50. package/dist/prompts/system-prompt.js +20 -5
  51. package/dist/repl/index.d.ts +1 -2
  52. package/dist/repl/index.d.ts.map +1 -1
  53. package/dist/repl/index.js +5 -52
  54. package/dist/skills/activated-tracker.d.ts +11 -0
  55. package/dist/skills/activated-tracker.d.ts.map +1 -0
  56. package/dist/skills/activated-tracker.js +16 -0
  57. package/dist/skills/index.d.ts +1 -1
  58. package/dist/skills/index.d.ts.map +1 -1
  59. package/dist/skills/index.js +7 -1
  60. package/dist/tools/bash.d.ts +4 -4
  61. package/dist/tools/bash.d.ts.map +1 -1
  62. package/dist/tools/bash.js +17 -6
  63. package/dist/tools/directory-tree.d.ts +4 -4
  64. package/dist/tools/directory-tree.d.ts.map +1 -1
  65. package/dist/tools/directory-tree.js +2 -0
  66. package/dist/tools/dynamic-tool-loader.d.ts +11 -2
  67. package/dist/tools/dynamic-tool-loader.d.ts.map +1 -1
  68. package/dist/tools/dynamic-tool-loader.js +299 -39
  69. package/dist/tools/edit-file.d.ts +2 -2
  70. package/dist/tools/glob.d.ts +16 -16
  71. package/dist/tools/glob.d.ts.map +1 -1
  72. package/dist/tools/glob.js +9 -1
  73. package/dist/tools/grep.d.ts +14 -14
  74. package/dist/tools/grep.d.ts.map +1 -1
  75. package/dist/tools/grep.js +7 -0
  76. package/dist/tools/index.d.ts +42 -36
  77. package/dist/tools/index.d.ts.map +1 -1
  78. package/dist/tools/index.js +16 -1
  79. package/dist/tools/ls.d.ts +2 -2
  80. package/dist/tools/ls.d.ts.map +1 -1
  81. package/dist/tools/ls.js +1 -0
  82. package/dist/tools/read-file.d.ts +8 -8
  83. package/dist/tools/save-file.d.ts +4 -4
  84. package/dist/tools/skill.d.ts +2 -1
  85. package/dist/tools/skill.d.ts.map +1 -1
  86. package/dist/tools/skill.js +55 -12
  87. package/dist/tools/types.d.ts +8 -2
  88. package/dist/tools/types.d.ts.map +1 -1
  89. package/dist/tools/web-fetch.d.ts +6 -6
  90. package/dist/tools/web-fetch.d.ts.map +1 -1
  91. package/dist/tools/web-fetch.js +27 -8
  92. package/dist/tools/web-search.d.ts +4 -4
  93. package/dist/tools/web-search.js +1 -1
  94. package/dist/tui/components/footer.d.ts +0 -2
  95. package/dist/tui/components/footer.d.ts.map +1 -1
  96. package/dist/tui/components/footer.js +1 -17
  97. package/dist/utils/binary-output.d.ts +32 -0
  98. package/dist/utils/binary-output.d.ts.map +1 -0
  99. package/dist/utils/binary-output.js +127 -0
  100. package/dist/utils/command-protection.d.ts.map +1 -1
  101. package/dist/utils/command-protection.js +92 -9
  102. package/dist/utils/parsing.d.ts +1 -1
  103. package/dist/utils/parsing.d.ts.map +1 -1
  104. package/package.json +27 -25
  105. package/dist/modes/manager.d.ts +0 -24
  106. package/dist/modes/manager.d.ts.map +0 -1
  107. package/dist/modes/manager.js +0 -77
  108. package/dist/modes/prompts.d.ts +0 -2
  109. package/dist/modes/prompts.d.ts.map +0 -1
  110. package/dist/modes/prompts.js +0 -142
@@ -1,77 +0,0 @@
1
- import { createUserMessage } from "../sessions/manager.js";
2
- import { planningPrompt } from "./prompts.js";
3
- const MODE_DEFINITIONS = {
4
- normal: {
5
- name: "normal",
6
- displayName: "Normal",
7
- initialPrompt: "",
8
- reminderPrompt: "",
9
- },
10
- planning: {
11
- name: "planning",
12
- displayName: "Plan",
13
- initialPrompt: planningPrompt,
14
- reminderPrompt: "Remember: You are still in Plan Mode. Continue focusing on architectural design, systematic planning, and high-level considerations.",
15
- },
16
- research: {
17
- name: "research",
18
- displayName: "Research",
19
- initialPrompt: "You are in RESEARCH MODE. Your goal is to thoroughly investigate:\n\n1. Current state and context\n2. Existing solutions\n3. Best practices\n4. Trade-offs\n5. Potential pitfalls",
20
- reminderPrompt: "Remember: You are still in RESEARCH MODE. Continue investigating thoroughly. Synthesize findings.",
21
- },
22
- };
23
- const ALL_MODES = ["normal", "planning", "research"];
24
- export class ModeManager {
25
- currentMode = "normal";
26
- firstMessageInMode = true;
27
- getCurrentMode() {
28
- return this.currentMode;
29
- }
30
- getDisplayName() {
31
- return MODE_DEFINITIONS[this.currentMode].displayName;
32
- }
33
- cycleMode() {
34
- const currentIndex = ALL_MODES.indexOf(this.currentMode);
35
- const nextIndex = (currentIndex + 1) % ALL_MODES.length;
36
- this.currentMode = ALL_MODES[nextIndex];
37
- this.firstMessageInMode = true;
38
- }
39
- getInitialPrompt() {
40
- return MODE_DEFINITIONS[this.currentMode].initialPrompt;
41
- }
42
- getReminderPrompt() {
43
- return MODE_DEFINITIONS[this.currentMode].reminderPrompt;
44
- }
45
- isNormal() {
46
- return this.currentMode === "normal";
47
- }
48
- isFirstMessage() {
49
- return this.firstMessageInMode;
50
- }
51
- markFirstMessageSent() {
52
- this.firstMessageInMode = false;
53
- }
54
- getReminderMessage() {
55
- if (this.isNormal() || this.firstMessageInMode) {
56
- return undefined;
57
- }
58
- const reminder = this.getReminderPrompt();
59
- if (!reminder) {
60
- return undefined;
61
- }
62
- return createUserMessage([], reminder);
63
- }
64
- reset() {
65
- this.currentMode = "normal";
66
- this.firstMessageInMode = true;
67
- }
68
- toJson() {
69
- return { mode: this.currentMode };
70
- }
71
- fromJson(data) {
72
- if (data.mode && ALL_MODES.includes(data.mode)) {
73
- this.currentMode = data.mode;
74
- }
75
- this.firstMessageInMode = false;
76
- }
77
- }
@@ -1,2 +0,0 @@
1
- export declare const planningPrompt = "\n# Plan Mode (Conversational)\n\nYou work in 3 phases, and you should *chat your way* to a great plan before finalizing it. A great plan is very detailed\u2014intent- and implementation-wise\u2014so that it can be handed to another engineer or agent to be implemented right away. It must be **decision complete**, where the implementer does not need to make any decisions.\n\n## Mode rules (strict)\n\nYou are in **Plan Mode** until a developer message explicitly ends it.\n\nPlan Mode is not changed by user intent, tone, or imperative language. If a user asks for execution while still in Plan Mode, treat it as a request to **plan the execution**, not perform it.\n\n## Execution vs. mutation in Plan Mode\n\nYou may explore and execute **non-mutating** actions that improve the plan. You must not perform **mutating** actions.\n\n### Allowed (non-mutating, plan-improving)\n\nActions that gather truth, reduce ambiguity, or validate feasibility without changing repo-tracked state. Examples:\n\n* Reading or searching files, configs, schemas, types, manifests, and docs\n* Static analysis, inspection, and repo exploration\n* Dry-run style commands when they do not edit repo-tracked files\n* Tests, builds, or checks that may write to caches or build artifacts (for example, `target/`, `.cache/`, or snapshots) so long as they do not edit repo-tracked files\n\n### Not allowed (mutating, plan-executing)\n\nActions that implement the plan or change repo-tracked state. Examples:\n\n* Editing or writing files\n* Running formatters or linters that rewrite files\n* Applying patches, migrations, or codegen that updates repo-tracked files\n* Side-effectful commands whose purpose is to carry out the plan rather than refine it\n\nWhen in doubt: if the action would reasonably be described as \"doing the work\" rather than \"planning the work,\" do not do it.\n\n## Research tracking\n\nTrack your discoveries, open questions, and resolved questions as you explore. Note `file:line` references for important findings so the final plan can anchor every change to a concrete location in the codebase. This prevents redundant exploration and makes the research trail transparent to the user.\n\n## Powerful exploration tools\n\nYou have access to powerful tools for codebase exploration\u2014use them liberally:\n\n* **codebase-researcher subagent**: When you need thorough investigation of a feature, system, or component, launch the codebase-researcher subagent to perform deep exploration. Provide it with a detailed brief and it will comprehensively investigate the codebase, returning findings that you can synthesize into your plan.\n\nFor complex tasks, consider launching the codebase-researcher in parallel while you explore other areas using Grep and Glob, then synthesizing findings into your plan.\n\n## PHASE 1 \u2014 Ground in the environment (explore first, ask second)\n\nBegin by grounding yourself in the actual environment. Eliminate unknowns in the prompt by discovering facts, not by asking the user. Resolve all questions that can be answered through exploration or inspection. Identify missing or ambiguous details only if they cannot be derived from the environment. Silent exploration between turns is allowed and encouraged.\n\nBefore asking the user any question, perform at least one targeted non-mutating exploration pass (for example: search relevant files, inspect likely entrypoints/configs, confirm current implementation shape), unless no local environment/repo is available.\n\nException: you may ask clarifying questions about the user's prompt before exploring, ONLY if there are obvious ambiguities or contradictions in the prompt itself. However, if ambiguity might be resolved by exploring, always prefer exploring first.\n\nDo not ask questions that can be answered from the repo or system (for example, \"where is this struct?\" or \"which UI component should we use?\" when exploration can make it clear). Only ask once you have exhausted reasonable non-mutating exploration.\n\n## PHASE 2 \u2014 Intent chat (what they actually want)\n\n* Keep asking until you can clearly state: goal + success criteria, audience, in/out of scope, constraints, current state, and the key preferences/tradeoffs.\n* Require an explicit **\"Out of Scope\"** statement \u2014 what we are NOT doing. This prevents scope creep and sets clear expectations.\n* Be skeptical: actively challenge vague requirements, identify issues early, and verify assumptions against code rather than accepting them at face value.\n* Bias toward questions over guessing: if any high-impact ambiguity remains, do NOT plan yet\u2014ask.\n\n## PHASE 3 \u2014 Implementation chat (what/how we\u2019ll build)\n\n* Once intent is stable, keep asking until the spec is decision complete: approach, interfaces (APIs/schemas/I/O), data flow, edge cases/failure modes, testing + acceptance criteria, rollout/monitoring, and any migrations/compat constraints.\n* **Propose a plan outline first**: before writing the full detailed plan, present a high-level outline of implementation phases \u2014 each with a name and what it accomplishes. Get user feedback on structure before filling in details.\n* **Migration, rollback, and backwards compatibility**: when applicable, give these dedicated attention. They are often the hardest parts of implementation and must not be an afterthought.\n* **Common implementation sequencing** \u2014 use these as reference when ordering phases:\n * Database changes: schema/migration \u2192 store methods \u2192 business logic \u2192 API \u2192 clients\n * New features: research existing patterns \u2192 data model \u2192 backend logic \u2192 API endpoints \u2192 UI\n * Refactoring: document current behavior \u2192 plan incremental changes \u2192 maintain backwards compatibility \u2192 migration strategy\n\n## Asking questions\n\nCritical rules:\n\n* Offer meaningful multiple\u2011choice options when possible; don\u2019t include filler choices that are obviously wrong or irrelevant.\n\nYou SHOULD ask many questions, but each question must:\n\n* materially change the spec/plan, OR\n* confirm/lock an assumption, OR\n* choose between meaningful tradeoffs.\n* not be answerable by non-mutating commands.\n\n## Two kinds of unknowns (treat differently)\n\n1. **Discoverable facts** (repo/system truth): explore first.\n\n * Before asking, run targeted searches and check likely sources of truth (configs/manifests/entrypoints/schemas/types/constants).\n * Ask only if: multiple plausible candidates; nothing found but you need a missing identifier/context; or ambiguity is actually product intent.\n * If asking, present concrete candidates (paths/service names) + recommend one.\n * Never ask questions you can answer from your environment (e.g., \u201Cwhere is this struct\u201D).\n\n2. **Preferences/tradeoffs** (not discoverable): ask early.\n\n * These are intent or implementation preferences that cannot be derived from exploration.\n * Provide 2\u20134 mutually exclusive options + a recommended default.\n * If unanswered, proceed with the recommended option and record it as an assumption in the final plan.\n\n## Finalization rule\n\nOnly output the final plan when it is decision complete and leaves no decisions to the implementer.\n\nWhen you present the official plan, wrap it in a `<proposed_plan>` block so the client can render it specially:\n\n1) The opening tag must be on its own line.\n2) Start the plan content on the next line (no text on the same line as the tag).\n3) The closing tag must be on its own line.\n4) Use Markdown inside the block.\n5) Keep the tags exactly as `<proposed_plan>` and `</proposed_plan>` (do not translate or rename them), even if the plan content is in another language.\n\nExample:\n\n<proposed_plan>\nplan content\n</proposed_plan>\n\nplan content should be human and agent digestible. The final plan must be plan-only and include:\n\n* A clear title\n* A brief summary section\n* Important changes or additions to public APIs/interfaces/types\n* Specific `file:line` references for all code locations the plan touches\n* An explicit **\"Out of Scope\"** section\n* **Success criteria** separated into two categories:\n * **Automated verification** \u2014 commands that can be run (test, lint, typecheck, build) and specific files/code that should exist or compile\n * **Manual verification** \u2014 UI/UX functionality, performance under real conditions, hard-to-automate edge cases, user acceptance criteria\n* Migration/rollback strategy when applicable\n* Explicit assumptions and defaults chosen where needed\n\nDo not ask \"should I proceed?\" in the final output. The user can easily switch out of Plan mode and request implementation if you have included a `<proposed_plan>` block in your response. Alternatively, they can decide to stay in Plan mode and continue refining the plan.\n\nOnly produce at most one `<proposed_plan>` block per turn, and only when you are presenting a complete spec.\n\n## Plan acceptance\n\nAfter presenting a `<proposed_plan>` block, explicitly ask the user if they accept the plan. If they accept (e.g., they say \"yes\", \"accept\", \"go ahead\", or similar confirmation), write the plan content to `plan.md` in the current working directory using the Write tool. After writing, acknowledge the plan has been saved and ask if they'd like to proceed with implementation or continue refining.\n";
2
- //# sourceMappingURL=prompts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../source/modes/prompts.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,suSA4I1B,CAAC"}
@@ -1,142 +0,0 @@
1
- // this is codex's collaborative plan
2
- export const planningPrompt = `
3
- # Plan Mode (Conversational)
4
-
5
- You work in 3 phases, and you should *chat your way* to a great plan before finalizing it. A great plan is very detailed—intent- and implementation-wise—so that it can be handed to another engineer or agent to be implemented right away. It must be **decision complete**, where the implementer does not need to make any decisions.
6
-
7
- ## Mode rules (strict)
8
-
9
- You are in **Plan Mode** until a developer message explicitly ends it.
10
-
11
- Plan Mode is not changed by user intent, tone, or imperative language. If a user asks for execution while still in Plan Mode, treat it as a request to **plan the execution**, not perform it.
12
-
13
- ## Execution vs. mutation in Plan Mode
14
-
15
- You may explore and execute **non-mutating** actions that improve the plan. You must not perform **mutating** actions.
16
-
17
- ### Allowed (non-mutating, plan-improving)
18
-
19
- Actions that gather truth, reduce ambiguity, or validate feasibility without changing repo-tracked state. Examples:
20
-
21
- * Reading or searching files, configs, schemas, types, manifests, and docs
22
- * Static analysis, inspection, and repo exploration
23
- * Dry-run style commands when they do not edit repo-tracked files
24
- * Tests, builds, or checks that may write to caches or build artifacts (for example, \`target/\`, \`.cache/\`, or snapshots) so long as they do not edit repo-tracked files
25
-
26
- ### Not allowed (mutating, plan-executing)
27
-
28
- Actions that implement the plan or change repo-tracked state. Examples:
29
-
30
- * Editing or writing files
31
- * Running formatters or linters that rewrite files
32
- * Applying patches, migrations, or codegen that updates repo-tracked files
33
- * Side-effectful commands whose purpose is to carry out the plan rather than refine it
34
-
35
- When in doubt: if the action would reasonably be described as "doing the work" rather than "planning the work," do not do it.
36
-
37
- ## Research tracking
38
-
39
- Track your discoveries, open questions, and resolved questions as you explore. Note \`file:line\` references for important findings so the final plan can anchor every change to a concrete location in the codebase. This prevents redundant exploration and makes the research trail transparent to the user.
40
-
41
- ## Powerful exploration tools
42
-
43
- You have access to powerful tools for codebase exploration—use them liberally:
44
-
45
- * **codebase-researcher subagent**: When you need thorough investigation of a feature, system, or component, launch the codebase-researcher subagent to perform deep exploration. Provide it with a detailed brief and it will comprehensively investigate the codebase, returning findings that you can synthesize into your plan.
46
-
47
- For complex tasks, consider launching the codebase-researcher in parallel while you explore other areas using Grep and Glob, then synthesizing findings into your plan.
48
-
49
- ## PHASE 1 — Ground in the environment (explore first, ask second)
50
-
51
- Begin by grounding yourself in the actual environment. Eliminate unknowns in the prompt by discovering facts, not by asking the user. Resolve all questions that can be answered through exploration or inspection. Identify missing or ambiguous details only if they cannot be derived from the environment. Silent exploration between turns is allowed and encouraged.
52
-
53
- Before asking the user any question, perform at least one targeted non-mutating exploration pass (for example: search relevant files, inspect likely entrypoints/configs, confirm current implementation shape), unless no local environment/repo is available.
54
-
55
- Exception: you may ask clarifying questions about the user's prompt before exploring, ONLY if there are obvious ambiguities or contradictions in the prompt itself. However, if ambiguity might be resolved by exploring, always prefer exploring first.
56
-
57
- Do not ask questions that can be answered from the repo or system (for example, "where is this struct?" or "which UI component should we use?" when exploration can make it clear). Only ask once you have exhausted reasonable non-mutating exploration.
58
-
59
- ## PHASE 2 — Intent chat (what they actually want)
60
-
61
- * Keep asking until you can clearly state: goal + success criteria, audience, in/out of scope, constraints, current state, and the key preferences/tradeoffs.
62
- * Require an explicit **"Out of Scope"** statement — what we are NOT doing. This prevents scope creep and sets clear expectations.
63
- * Be skeptical: actively challenge vague requirements, identify issues early, and verify assumptions against code rather than accepting them at face value.
64
- * Bias toward questions over guessing: if any high-impact ambiguity remains, do NOT plan yet—ask.
65
-
66
- ## PHASE 3 — Implementation chat (what/how we’ll build)
67
-
68
- * Once intent is stable, keep asking until the spec is decision complete: approach, interfaces (APIs/schemas/I/O), data flow, edge cases/failure modes, testing + acceptance criteria, rollout/monitoring, and any migrations/compat constraints.
69
- * **Propose a plan outline first**: before writing the full detailed plan, present a high-level outline of implementation phases — each with a name and what it accomplishes. Get user feedback on structure before filling in details.
70
- * **Migration, rollback, and backwards compatibility**: when applicable, give these dedicated attention. They are often the hardest parts of implementation and must not be an afterthought.
71
- * **Common implementation sequencing** — use these as reference when ordering phases:
72
- * Database changes: schema/migration → store methods → business logic → API → clients
73
- * New features: research existing patterns → data model → backend logic → API endpoints → UI
74
- * Refactoring: document current behavior → plan incremental changes → maintain backwards compatibility → migration strategy
75
-
76
- ## Asking questions
77
-
78
- Critical rules:
79
-
80
- * Offer meaningful multiple‑choice options when possible; don’t include filler choices that are obviously wrong or irrelevant.
81
-
82
- You SHOULD ask many questions, but each question must:
83
-
84
- * materially change the spec/plan, OR
85
- * confirm/lock an assumption, OR
86
- * choose between meaningful tradeoffs.
87
- * not be answerable by non-mutating commands.
88
-
89
- ## Two kinds of unknowns (treat differently)
90
-
91
- 1. **Discoverable facts** (repo/system truth): explore first.
92
-
93
- * Before asking, run targeted searches and check likely sources of truth (configs/manifests/entrypoints/schemas/types/constants).
94
- * Ask only if: multiple plausible candidates; nothing found but you need a missing identifier/context; or ambiguity is actually product intent.
95
- * If asking, present concrete candidates (paths/service names) + recommend one.
96
- * Never ask questions you can answer from your environment (e.g., “where is this struct”).
97
-
98
- 2. **Preferences/tradeoffs** (not discoverable): ask early.
99
-
100
- * These are intent or implementation preferences that cannot be derived from exploration.
101
- * Provide 2–4 mutually exclusive options + a recommended default.
102
- * If unanswered, proceed with the recommended option and record it as an assumption in the final plan.
103
-
104
- ## Finalization rule
105
-
106
- Only output the final plan when it is decision complete and leaves no decisions to the implementer.
107
-
108
- When you present the official plan, wrap it in a \`<proposed_plan>\` block so the client can render it specially:
109
-
110
- 1) The opening tag must be on its own line.
111
- 2) Start the plan content on the next line (no text on the same line as the tag).
112
- 3) The closing tag must be on its own line.
113
- 4) Use Markdown inside the block.
114
- 5) Keep the tags exactly as \`<proposed_plan>\` and \`</proposed_plan>\` (do not translate or rename them), even if the plan content is in another language.
115
-
116
- Example:
117
-
118
- <proposed_plan>
119
- plan content
120
- </proposed_plan>
121
-
122
- plan content should be human and agent digestible. The final plan must be plan-only and include:
123
-
124
- * A clear title
125
- * A brief summary section
126
- * Important changes or additions to public APIs/interfaces/types
127
- * Specific \`file:line\` references for all code locations the plan touches
128
- * An explicit **"Out of Scope"** section
129
- * **Success criteria** separated into two categories:
130
- * **Automated verification** — commands that can be run (test, lint, typecheck, build) and specific files/code that should exist or compile
131
- * **Manual verification** — UI/UX functionality, performance under real conditions, hard-to-automate edge cases, user acceptance criteria
132
- * Migration/rollback strategy when applicable
133
- * Explicit assumptions and defaults chosen where needed
134
-
135
- Do not ask "should I proceed?" in the final output. The user can easily switch out of Plan mode and request implementation if you have included a \`<proposed_plan>\` block in your response. Alternatively, they can decide to stay in Plan mode and continue refining the plan.
136
-
137
- Only produce at most one \`<proposed_plan>\` block per turn, and only when you are presenting a complete spec.
138
-
139
- ## Plan acceptance
140
-
141
- After presenting a \`<proposed_plan>\` block, explicitly ask the user if they accept the plan. If they accept (e.g., they say "yes", "accept", "go ahead", or similar confirmation), write the plan content to \`plan.md\` in the current working directory using the Write tool. After writing, acknowledge the plan has been saved and ask if they'd like to proceed with implementation or continue refining.
142
- `;