one-code-extension 0.1.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 (153) hide show
  1. package/LICENSE +32 -0
  2. package/README.md +202 -0
  3. package/agents/explore.md +24 -0
  4. package/agents/general-purpose.md +21 -0
  5. package/agents/plan.md +22 -0
  6. package/docs/decisions/auto-mode.md +526 -0
  7. package/docs/decisions/branding.md +127 -0
  8. package/docs/decisions/code-review-remediation.md +106 -0
  9. package/docs/decisions/compaction.md +140 -0
  10. package/docs/decisions/distribution.md +133 -0
  11. package/docs/decisions/hooks.md +64 -0
  12. package/docs/decisions/lsp.md +58 -0
  13. package/docs/decisions/mcp.md +104 -0
  14. package/docs/decisions/memory-state.md +170 -0
  15. package/docs/decisions/model-policy.md +126 -0
  16. package/docs/decisions/modes.md +178 -0
  17. package/docs/decisions/skills-plugins.md +56 -0
  18. package/docs/decisions/subagents-workflows.md +225 -0
  19. package/docs/decisions/system-prompt.md +98 -0
  20. package/docs/decisions/tools.md +407 -0
  21. package/docs/decisions/tui.md +202 -0
  22. package/docs/decisions.md +148 -0
  23. package/extensions/ask-user/index.ts +124 -0
  24. package/extensions/ask-user/questions.ts +60 -0
  25. package/extensions/auto-mode/actions.ts +78 -0
  26. package/extensions/auto-mode/classifier.ts +388 -0
  27. package/extensions/auto-mode/config.ts +237 -0
  28. package/extensions/auto-mode/decision-log.ts +60 -0
  29. package/extensions/auto-mode/defaults.ts +65 -0
  30. package/extensions/auto-mode/instructions.ts +74 -0
  31. package/extensions/auto-mode/model-picker.ts +225 -0
  32. package/extensions/auto-mode/model-select.ts +178 -0
  33. package/extensions/auto-mode/paths.ts +109 -0
  34. package/extensions/auto-mode/pause.ts +96 -0
  35. package/extensions/auto-mode/prompt.ts +307 -0
  36. package/extensions/auto-mode/rules.ts +96 -0
  37. package/extensions/auto-mode/safety-floor.ts +100 -0
  38. package/extensions/auto-mode/sensitive.ts +137 -0
  39. package/extensions/auto-mode/shell-analysis.ts +702 -0
  40. package/extensions/background/index.ts +405 -0
  41. package/extensions/background/registry.ts +81 -0
  42. package/extensions/background/wakeup.ts +41 -0
  43. package/extensions/bash/background.ts +136 -0
  44. package/extensions/bash/index.ts +149 -0
  45. package/extensions/branding/assistant-marker.ts +53 -0
  46. package/extensions/branding/index.ts +366 -0
  47. package/extensions/branding/prompt-editor.ts +42 -0
  48. package/extensions/branding/prompt-marker.ts +29 -0
  49. package/extensions/branding/startup.ts +152 -0
  50. package/extensions/claude-compat/index.ts +50 -0
  51. package/extensions/claude-context/index.ts +79 -0
  52. package/extensions/compaction/index.ts +231 -0
  53. package/extensions/compaction/prompt.ts +191 -0
  54. package/extensions/context-management/index.ts +147 -0
  55. package/extensions/effort/index.ts +216 -0
  56. package/extensions/effort/slider.ts +253 -0
  57. package/extensions/exit/index.ts +28 -0
  58. package/extensions/file-tracker/index.ts +103 -0
  59. package/extensions/file-tracker/tracker.ts +145 -0
  60. package/extensions/hooks/debug.ts +53 -0
  61. package/extensions/hooks/executor.ts +132 -0
  62. package/extensions/hooks/index.ts +310 -0
  63. package/extensions/hooks/matcher.ts +72 -0
  64. package/extensions/hooks/plugin-hooks.ts +79 -0
  65. package/extensions/hooks/protocol.ts +151 -0
  66. package/extensions/hooks/settings.ts +163 -0
  67. package/extensions/hooks/trust.ts +151 -0
  68. package/extensions/lib/branch-restore.ts +35 -0
  69. package/extensions/lib/claude-context.ts +148 -0
  70. package/extensions/lib/deferred.ts +119 -0
  71. package/extensions/lib/git.ts +14 -0
  72. package/extensions/lib/memory.ts +219 -0
  73. package/extensions/lib/model-policy.ts +436 -0
  74. package/extensions/lib/model-tier.ts +99 -0
  75. package/extensions/lib/notifications.ts +18 -0
  76. package/extensions/lib/paths.ts +26 -0
  77. package/extensions/lib/per-cwd.ts +21 -0
  78. package/extensions/lib/persisted-output.ts +70 -0
  79. package/extensions/lib/pi-version.ts +54 -0
  80. package/extensions/lib/plugins.ts +227 -0
  81. package/extensions/lib/reminders.ts +212 -0
  82. package/extensions/lib/scratchpad.ts +68 -0
  83. package/extensions/lib/tui-render.ts +522 -0
  84. package/extensions/lsp/client.ts +278 -0
  85. package/extensions/lsp/format.ts +46 -0
  86. package/extensions/lsp/index.ts +193 -0
  87. package/extensions/lsp/protocol.ts +64 -0
  88. package/extensions/lsp/servers.ts +79 -0
  89. package/extensions/mcp/client.ts +205 -0
  90. package/extensions/mcp/config.ts +199 -0
  91. package/extensions/mcp/index.ts +373 -0
  92. package/extensions/mcp/schema.ts +161 -0
  93. package/extensions/memory/index.ts +90 -0
  94. package/extensions/notebook/index.ts +77 -0
  95. package/extensions/notebook/notebook.ts +108 -0
  96. package/extensions/permissions/index.ts +876 -0
  97. package/extensions/permissions/matcher.ts +455 -0
  98. package/extensions/permissions/modes.ts +107 -0
  99. package/extensions/permissions/protected-paths.ts +125 -0
  100. package/extensions/permissions/settings.ts +98 -0
  101. package/extensions/plan-mode/index.ts +209 -0
  102. package/extensions/plan-mode/reminder.ts +33 -0
  103. package/extensions/plan-mode/slug.ts +28 -0
  104. package/extensions/plan-mode/viewer.ts +124 -0
  105. package/extensions/plugins/index.ts +115 -0
  106. package/extensions/plugins/template.ts +42 -0
  107. package/extensions/search-tools/index.ts +0 -0
  108. package/extensions/search-tools/tools.ts +24 -0
  109. package/extensions/skill/index.ts +170 -0
  110. package/extensions/subagents/agents.ts +126 -0
  111. package/extensions/subagents/child.ts +414 -0
  112. package/extensions/subagents/default-model.ts +122 -0
  113. package/extensions/subagents/index.ts +1119 -0
  114. package/extensions/subagents/model-select.ts +346 -0
  115. package/extensions/subagents/rpc-turns.ts +123 -0
  116. package/extensions/subagents/runs.ts +93 -0
  117. package/extensions/subagents/usage.ts +53 -0
  118. package/extensions/subagents/worktree.ts +69 -0
  119. package/extensions/system-prompt/environment.ts +35 -0
  120. package/extensions/system-prompt/index.ts +54 -0
  121. package/extensions/system-prompt/template.ts +103 -0
  122. package/extensions/system-prompt/tiers/common.ts +63 -0
  123. package/extensions/system-prompt/tiers/frontier.ts +24 -0
  124. package/extensions/system-prompt/tiers/low.ts +71 -0
  125. package/extensions/system-prompt/tiers/mid.ts +56 -0
  126. package/extensions/system-reminder/index.ts +37 -0
  127. package/extensions/tasks/index.ts +140 -0
  128. package/extensions/tasks/store.ts +174 -0
  129. package/extensions/todo/index.ts +133 -0
  130. package/extensions/tool-search/index.ts +168 -0
  131. package/extensions/tool-style/index.ts +84 -0
  132. package/extensions/web/index.ts +43 -0
  133. package/extensions/web-fetch/extract.ts +139 -0
  134. package/extensions/web-fetch/index.ts +291 -0
  135. package/extensions/web-fetch/summarize.ts +78 -0
  136. package/extensions/workflow/agent-session.ts +368 -0
  137. package/extensions/workflow/globals.ts +251 -0
  138. package/extensions/workflow/index.ts +364 -0
  139. package/extensions/workflow/journal.ts +75 -0
  140. package/extensions/workflow/permission-gate.ts +71 -0
  141. package/extensions/workflow/run-manager.ts +306 -0
  142. package/extensions/workflow/saved-workflows.ts +45 -0
  143. package/extensions/workflow/script-source.ts +201 -0
  144. package/extensions/workflow/types.ts +99 -0
  145. package/extensions/workflow/vm-runtime.ts +31 -0
  146. package/extensions/workflow/widget.ts +56 -0
  147. package/extensions/worktree/index.ts +266 -0
  148. package/extensions/worktree/rewrite.ts +59 -0
  149. package/package.json +101 -0
  150. package/themes/one-code-light.json +76 -0
  151. package/themes/one-code.json +76 -0
  152. package/types/app.d.ts +5 -0
  153. package/types/community-packages.d.ts +12 -0
package/LICENSE ADDED
@@ -0,0 +1,32 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Isuru Wijesiri
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ This package bundles or adapts work from other MIT-licensed projects:
26
+
27
+ - The language-server command table in `extensions/lsp/servers.ts` follows the
28
+ one in `pi-lsp-extension` (MIT).
29
+ - The subagent spawn approach in `extensions/subagents/` is modeled on the
30
+ official subagent example in the pi repository (MIT).
31
+ - `web_search` is provided by the `pi-web-search` package (MIT), a runtime
32
+ dependency rather than vendored code.
package/README.md ADDED
@@ -0,0 +1,202 @@
1
+ # One Code
2
+
3
+ **The Claude Code experience โ€” on any model you want.**
4
+
5
+ One Code gives you Claude Code's whole workflow: subagents, ultracode workflows,
6
+ skills, MCP, plan mode, hooks, a real permission system, project memory โ€” but
7
+ runs it on **any provider**. Anthropic, OpenAI, Gemini, a local Ollama model, or
8
+ a gateway like OpenRouter. The **same tool surface**, the same `.claude/` config,
9
+ your choice of brain behind it.
10
+
11
+ Free and open source (MIT). No lock-in, no subscription, no fork of anything โ€”
12
+ One Code is a package for the [pi coding agent](https://github.com/earendil-works/pi),
13
+ so upstream improvements land as a version bump.
14
+
15
+ ## Install
16
+
17
+ One project, two npm packages โ€” pick the one that fits you:
18
+
19
+ | You | Install | Package |
20
+ |---|---|---|
21
+ | **Most people** (new to pi included) | `npm install -g one-code` | [`one-code`](https://www.npmjs.com/package/one-code) โ€” the app: its own `one-code` command, a pinned pi bundled inside, state isolated in `~/.one-code`, coexists with any existing `pi` |
22
+ | Already running pi, want it on your own install | `pi install npm:one-code-extension` | [`one-code-extension`](https://www.npmjs.com/package/one-code-extension) โ€” just the extensions; rides your pi (tested against pi 0.83โ€“0.84, warns outside that range) |
23
+
24
+ ```bash
25
+ npm install -g one-code
26
+ cd your-project && one-code
27
+ ```
28
+
29
+ Or via Homebrew (also installs Node for you):
30
+
31
+ ```bash
32
+ brew install isuruwijesiri/one-code/one-code
33
+ ```
34
+
35
+ > The npm route needs **Node 22.19+**.
36
+
37
+ ## Two-minute quickstart โ€” free, no card
38
+
39
+ You need one model-provider key. Two providers hand out **free frontier-adjacent
40
+ models** today, so you can try the whole thing for nothing:
41
+
42
+ - **OpenCode Zen** ([opencode.ai/zen](https://opencode.ai/zen)) โ€” sign up, copy
43
+ your API key. Free model: `deepseek-v4-flash-free`.
44
+ - **OpenRouter** ([openrouter.ai](https://openrouter.ai)) โ€” sign up, create a
45
+ key (or just OAuth from inside One Code). Free models carry a `:free` suffix โ€”
46
+ `nvidia/nemotron-3-ultra-550b-a55b:free` is genuinely good.
47
+
48
+ Then:
49
+
50
+ ```bash
51
+ cd your-project
52
+ one-code # first run asks for a provider โ€” pick one, paste the key
53
+ ```
54
+
55
+ Inside the session: `/login` connects more providers (OpenRouter supports
56
+ "Sign in with OpenRouter", no key-copying needed), `/model` switches models.
57
+ Env vars work too: `OPENCODE_API_KEY`, `OPENROUTER_API_KEY`, `ANTHROPIC_API_KEY`,
58
+ `OPENAI_API_KEY`, and friends are picked up automatically.
59
+
60
+ *(On the pi-package install, the same applies with `pi` as the command.)*
61
+
62
+ ---
63
+
64
+ ## Why One Code
65
+
66
+ - **Bring your own model.** Not tied to one vendor. Switch mid-session with
67
+ `/model`, or drive a cheap local model for routine work and a frontier model
68
+ for the hard parts.
69
+ - **Your Claude Code setup already works.** `CLAUDE.md`, `.claude/commands`,
70
+ `.claude/skills`, `.claude/agents`, `.mcp.json`, installed plugins, and
71
+ `settings.json` permission rules are all picked up unchanged. Nothing to port.
72
+ - **The features that make Claude Code good live in the harness, not the model** โ€”
73
+ and One Code brings all of them across.
74
+
75
+ ---
76
+
77
+ ## What you get
78
+
79
+ ### ๐Ÿค– Subagents
80
+ Delegate work to child agents that each get their own context window, so only
81
+ the answer comes back โ€” not the noise. Define them as markdown in
82
+ `.claude/agents/`, pick their model per agent, or `fork` one that inherits your
83
+ conversation. Run them in the background and message them while they work, or
84
+ isolate each in its own git worktree (below). Three ship in the box:
85
+ `general-purpose`, `explore`, and `plan`.
86
+
87
+ ### โšก Ultracode workflows
88
+ For big jobs โ€” a broad audit, a migration, a review worth double-checking โ€” say
89
+ **`ultracode`** and the model writes a short JavaScript script that fans work out
90
+ across many agents in parallel. Runs go to the background with a live progress
91
+ panel; every run is journaled, so re-running replays the unchanged parts for
92
+ free. Save scripts in `.claude/workflows/` to invoke by name.
93
+
94
+ ### ๐Ÿ”’ Permissions & auto mode
95
+ A real permission gate reads your existing `allow`/`deny`/`ask` rules from
96
+ `.claude/settings.json` (`deny` always wins). Cycle modes with **ctrl+q** โ€”
97
+ manual โ†’ accept-edits โ†’ plan โ†’ **auto**. Auto mode removes routine prompts
98
+ *without* removing the boundary: a classifier screens each action, reads pass
99
+ freely, and risky operations (writes outside your project, credential paths,
100
+ force pushes, `curl | bash`) get stopped unless *you* named them. A deterministic
101
+ safety floor protects the agent's own config no matter what the model decides.
102
+
103
+ ### ๐Ÿ“‹ Plan mode
104
+ Enter a read-only planning mode where the model can only write to a dedicated
105
+ plan file. Review the finished plan in an approval dialog before a single line of
106
+ code changes. The plan survives context compaction, and you can edit the file
107
+ yourself while it works.
108
+
109
+ ### ๐ŸŒฟ Git worktrees
110
+ Send the whole session into an isolated git worktree with `enter_worktree` โ€”
111
+ branched from your current HEAD under `.claude/worktrees/`, so every command and
112
+ relative path runs there and your working tree stays untouched until you
113
+ `exit_worktree`. Subagents can each take their own worktree too, so a fan-out
114
+ that edits files runs in parallel without ever colliding.
115
+
116
+ ### ๐Ÿงฉ Skills, plugins & MCP
117
+ Standard [Agent Skills](https://agentskills.io) from `.claude/skills/`, whole
118
+ Claude Code **plugins** (their agents, skills, commands, and MCP servers, all
119
+ namespaced), and any **MCP server** from `.mcp.json` โ€” every MCP tool is loaded
120
+ on demand so it never bloats the prompt.
121
+
122
+ ### ๐Ÿช Hooks
123
+ Claude Code command hooks run unchanged โ€” `PreToolUse`, `PostToolUse`,
124
+ `UserPromptSubmit`, `SessionStart`, `Stop`, and more โ€” with the same stdin JSON,
125
+ exit-code semantics, and output envelope. Project hooks run only after a one-time
126
+ consent prompt.
127
+
128
+ ### ๐Ÿง  Memory & long sessions
129
+ Per-repo auto-memory that persists facts across sessions, a session scratchpad,
130
+ and Claude Code's own compaction prompt so long conversations shrink cleanly
131
+ instead of falling off a cliff. On Anthropic, old thinking is trimmed
132
+ automatically to keep sessions cheap.
133
+
134
+ ### ๐Ÿ› ๏ธ The same tool surface as Claude Code
135
+ `read`, `write`, `edit`, `bash` (with background runs), `grep`, `find`, `ls`,
136
+ `todo_write`, `notebook_edit`, `web_search`, `web_fetch`, `lsp_diagnostics`
137
+ (live language-server diagnostics after edits), `ask_user_question`, task
138
+ tracking, background monitors, scheduled wake-ups โ€” and `tool_search`, which
139
+ keeps rarely-used schemas out of the prompt until they're needed. On Anthropic
140
+ and recent OpenAI models this uses the provider's native deferred-tool
141
+ mechanism, so loading a tool never invalidates your cached prompt.
142
+
143
+ Every Claude Code tool has a counterpart here, so muscle memory and rules carry
144
+ over: Claude Code's own PascalCase names โ€” `Read`, `Bash`, `Edit`, `Task`,
145
+ `WebFetch`, `TodoWrite`, `EnterWorktree`, and the rest โ€” are accepted verbatim in
146
+ your `.claude/settings.json` permission rules and hook matchers, mapped to the
147
+ matching tool automatically.
148
+
149
+ ### ๐ŸŽš๏ธ Reasoning effort & ๐ŸŽจ themes
150
+ An `/effort` slider from `minimal` to `max` (and `ultracode` past the end), on
151
+ the same dial shift+tab cycles. Two themes ship โ€” `one-code` (dark) and
152
+ `one-code-light` โ€” a warm clay accent in the spirit of Claude Code's terminal.
153
+
154
+ ---
155
+
156
+ ## Everything else, briefly
157
+
158
+ | | |
159
+ |---|---|
160
+ | **Slash commands** | `/permissions`, `/auto-mode`, `/agents`, `/skills`, `/todos`, `/subagent`, `/effort`, `/workflows`, `/plugins`, `/mcp`, `/lsp`, and every plugin command (namespaced). |
161
+ | **Ported system prompt** | Claude Code's system prompt, adapted and tiered by model capability so smaller models get more guidance. |
162
+ | **Steering** | `<system-reminder>` nudges, read-before-write and stale-edit guards, and denial feedback that the model actually learns from. |
163
+ | **Other modes** | `pi -p "โ€ฆ"` one-shot ยท `pi -c` continue ยท `pi --mode json` for scripts ยท `pi --permission-mode plan` ยท `pi --model <provider/id>`. |
164
+
165
+ ---
166
+
167
+ ## Install from source
168
+
169
+ ```bash
170
+ git clone https://github.com/IsuruMaduranga/one-code
171
+ cd one-code && npm install && cd ..
172
+ pi install ./one-code # a path install still needs `npm install` first for deps
173
+ pi list # confirm it registered
174
+ ```
175
+
176
+ ## A real boundary, not a leap of faith
177
+
178
+ Like Claude Code, One Code's security model is the **permission system plus auto
179
+ mode**, not a promise that the model will behave. Every action is gated: `deny`
180
+ rules always win, risky operations get stopped, and auto mode's classifier keeps
181
+ you in flow without dropping the boundary. Want an OS-level hard wall on top? Run
182
+ pi inside a container โ€” the permission gate and the container compose.
183
+
184
+ ## Good to know
185
+
186
+ - **Web search** uses your provider's own search API (OpenAI, Anthropic,
187
+ Gemini), so it needs a provider that offers one.
188
+ - **LSP diagnostics** need the language server on your `PATH` (e.g.
189
+ `npm i -g typescript-language-server typescript`).
190
+ - Verified end-to-end on Anthropic and OpenAI models, and through **OpenRouter**
191
+ (which brokers many open models โ€” DeepSeek, Llama, Qwen, and more); other
192
+ providers work but are less exercised.
193
+ - **Platforms:** developed and verified on **macOS and Linux**; **WSL** works
194
+ the same way (it *is* Linux). Native Windows is **untested best-effort** for
195
+ now: pi itself requires a bash there (Git Bash โ€” see pi's Windows docs), and
196
+ One Code has known gaps on native Windows (hooks and background shells assume
197
+ `/bin/sh`). Don't rely on it until a Windows smoke test lands in a future
198
+ release.
199
+
200
+ ## License
201
+
202
+ MIT โ€” see [LICENSE](LICENSE). Contributions welcome.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: explore
3
+ description: Read-only search agent for broad fan-out searches โ€” when answering means sweeping many files, directories, or naming conventions and you only need the conclusion, not the file dumps. It locates code; it does not review or audit it.
4
+ tools: read, grep, find, ls
5
+ ---
6
+
7
+ You are a codebase reconnaissance agent. You can read and search; you cannot
8
+ modify anything or run commands.
9
+
10
+ Your job is to find things and report *where they are*, compressed. The agent that
11
+ delegated to you is spending its context on other work, so do not return file
12
+ dumps โ€” return the conclusion plus precise locations.
13
+
14
+ Method:
15
+
16
+ - Search broadly first (multiple patterns, several naming conventions, plausible
17
+ synonyms), then read only the excerpts that decide the question.
18
+ - Follow the conventions you observe rather than assuming a layout.
19
+ - If the caller asked "very thorough", check alternative locations and spellings
20
+ before concluding something does not exist.
21
+
22
+ Report as a short list of findings, each with `path:line` and one line of what is
23
+ there. State explicitly if something does not appear to exist โ€” a confident
24
+ negative is a useful answer. Never speculate about code you did not read.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: general-purpose
3
+ description: General-purpose agent for researching complex questions, searching for code, and executing multi-step tasks. Use when a task needs several steps and you don't need to watch the intermediate work.
4
+ ---
5
+
6
+ You are a general-purpose engineering agent working on a delegated task.
7
+
8
+ You have the project's full tool set. Work autonomously: the agent that delegated
9
+ to you cannot answer follow-up questions, so make reasonable decisions and state
10
+ the assumptions you made.
11
+
12
+ Your final message is the entire result โ€” it is read by another agent, not by a
13
+ human watching your progress. So:
14
+
15
+ - Lead with the answer or outcome, not a description of your process.
16
+ - Include the concrete details the caller needs: file paths with line numbers,
17
+ exact command output that mattered, names of functions or symbols involved.
18
+ - Quote what you found rather than summarising it away when precision matters.
19
+ - If you could not finish something, say what is missing and why, plainly.
20
+
21
+ Do not narrate what you are about to do. Investigate, act, then report.
package/agents/plan.md ADDED
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: plan
3
+ description: Software architect agent for designing implementation plans. Use when you need an implementation strategy for a task. Returns step-by-step plans, identifies critical files, and considers architectural trade-offs. Read-only.
4
+ tools: read, grep, find, ls
5
+ ---
6
+
7
+ You are a software architect. You can read and search the codebase; you cannot
8
+ modify it or run commands. You produce a plan, not an implementation.
9
+
10
+ Ground the plan in what the code actually does:
11
+
12
+ - Find the existing functions, utilities, and patterns the work should reuse, and
13
+ name them with their paths. Prefer extending what exists over adding new code.
14
+ - Name the specific files to change and what changes in each. Where a change
15
+ repeats across many files, describe the pattern once and list a few
16
+ representative paths.
17
+ - Call out the architectural trade-off you are making and why, when there is one.
18
+ - Flag risks, edge cases, and anything that would need a decision from the user.
19
+
20
+ Return: a short context paragraph on why the change is needed, then ordered steps
21
+ concrete enough to execute, then how to verify the result end to end. Keep it
22
+ scannable โ€” no restating the request back, no filler.