@kolisachint/hoocode-agent 0.5.52 → 0.5.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +91 -0
- package/dist/cli/args.d.ts +2 -2
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +9 -8
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-frontmatter.d.ts +8 -2
- package/dist/core/agent-frontmatter.d.ts.map +1 -1
- package/dist/core/agent-frontmatter.js +13 -7
- package/dist/core/agent-frontmatter.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +1 -1
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/embsearch/embsearch-service.d.ts +1 -1
- package/dist/core/embsearch/embsearch-service.d.ts.map +1 -1
- package/dist/core/embsearch/embsearch-service.js +1 -1
- package/dist/core/embsearch/embsearch-service.js.map +1 -1
- package/dist/core/extensions/plugins/authoring.d.ts.map +1 -1
- package/dist/core/extensions/plugins/authoring.js +1 -1
- package/dist/core/extensions/plugins/authoring.js.map +1 -1
- package/dist/core/extensions/plugins/formats/shared.d.ts +1 -1
- package/dist/core/extensions/plugins/formats/shared.d.ts.map +1 -1
- package/dist/core/extensions/plugins/formats/shared.js +1 -1
- package/dist/core/extensions/plugins/formats/shared.js.map +1 -1
- package/dist/core/extensions/plugins/formats/types.d.ts +1 -1
- package/dist/core/extensions/plugins/formats/types.d.ts.map +1 -1
- package/dist/core/extensions/plugins/formats/types.js.map +1 -1
- package/dist/core/external-tools.d.ts +1 -1
- package/dist/core/external-tools.d.ts.map +1 -1
- package/dist/core/external-tools.js +2 -2
- package/dist/core/external-tools.js.map +1 -1
- package/dist/core/sdk.d.ts +2 -2
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +3 -3
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/self-docs.d.ts +1 -1
- package/dist/core/self-docs.d.ts.map +1 -1
- package/dist/core/self-docs.js +1 -1
- package/dist/core/self-docs.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +1 -1
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +1 -1
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/settings-manager.d.ts +2 -2
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +13 -5
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-types.d.ts +1 -1
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +14 -15
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/index.d.ts +2 -2
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +3 -3
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/plugins.d.ts.map +1 -1
- package/dist/core/tools/plugins.js +2 -2
- package/dist/core/tools/plugins.js.map +1 -1
- package/dist/core/tools/propose-plugin.d.ts.map +1 -1
- package/dist/core/tools/propose-plugin.js +1 -1
- package/dist/core/tools/propose-plugin.js.map +1 -1
- package/dist/core/tools/search.d.ts +1 -1
- package/dist/core/tools/search.d.ts.map +1 -1
- package/dist/core/tools/search.js +5 -5
- package/dist/core/tools/search.js.map +1 -1
- package/dist/core/tools/todo.d.ts.map +1 -1
- package/dist/core/tools/todo.js +9 -7
- package/dist/core/tools/todo.js.map +1 -1
- package/dist/extensions/core/ask-options.d.ts.map +1 -1
- package/dist/extensions/core/ask-options.js +1 -0
- package/dist/extensions/core/ask-options.js.map +1 -1
- package/dist/extensions/core/modes.d.ts.map +1 -1
- package/dist/extensions/core/modes.js +9 -0
- package/dist/extensions/core/modes.js.map +1 -1
- package/dist/extensions/core/permission-gate.d.ts.map +1 -1
- package/dist/extensions/core/permission-gate.js +40 -10
- package/dist/extensions/core/permission-gate.js.map +1 -1
- package/dist/init-templates.generated.d.ts.map +1 -1
- package/dist/init-templates.generated.js +14 -14
- package/dist/init-templates.generated.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +7 -7
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/tool-chain-summary.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-chain-summary.js +1 -1
- package/dist/modes/interactive/components/tool-chain-summary.js.map +1 -1
- package/dist/modes/interactive/components/tool-signal.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-signal.js +7 -7
- package/dist/modes/interactive/components/tool-signal.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +2 -2
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +2 -2
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/extensions.md +1 -1
- package/docs/modes.md +33 -7
- package/docs/quickstart.md +1 -1
- package/docs/sdk.md +2 -2
- package/docs/settings.md +3 -3
- package/docs/usage.md +4 -4
- package/examples/agents/fork-reviewer.md +1 -1
- package/examples/agents/orchestrator.md +1 -1
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/plan-mode/index.ts +1 -1
- package/examples/extensions/preset.ts +1 -1
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/truncated-tool.ts +1 -1
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/05-tools.ts +3 -3
- package/package.json +4 -4
- package/templates/agents/code-review.md +1 -1
- package/templates/agents/explore.md +2 -2
- package/templates/agents/general-purpose.md +2 -2
- package/templates/agents/plan.md +2 -2
- package/templates/agents/security-review.md +1 -1
- package/templates/default-config.json +6 -3
- package/templates/modes/ask/system.md +4 -7
- package/templates/modes/build/system.md +6 -8
- package/templates/modes/debug/system.md +7 -8
- package/templates/modes/plan/system.md +7 -13
- package/templates/prompts/task-main.md +5 -12
- package/templates/skills/artifact-design/SKILL.md +1 -1
- package/templates/skills/canvas-design/SKILL.md +1 -1
- package/templates/skills/plugin-authoring/SKILL.md +1 -1
package/docs/extensions.md
CHANGED
|
@@ -1823,7 +1823,7 @@ pi.registerTool({
|
|
|
1823
1823
|
|
|
1824
1824
|
### Overriding Built-in Tools
|
|
1825
1825
|
|
|
1826
|
-
Extensions can override built-in tools (`read`, `bash`, `edit`, `write`, `
|
|
1826
|
+
Extensions can override built-in tools (`read`, `bash`, `edit`, `write`, `SearchCodebase`) by registering a tool with the same name. Interactive mode displays a warning when this happens.
|
|
1827
1827
|
|
|
1828
1828
|
```bash
|
|
1829
1829
|
# Extension's read tool replaces built-in read
|
package/docs/modes.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# Modes
|
|
2
2
|
|
|
3
3
|
A mode swaps the system prompt hoocode runs under, so the same session can be
|
|
4
|
-
steered between answering questions, designing a change, and making it.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
steered between answering questions, designing a change, and making it.
|
|
5
|
+
|
|
6
|
+
A mode prompt is instructions; what actually blocks a tool call is the mode's
|
|
7
|
+
entry in `hoo-config.json`. The two are meant to agree, and the shipped defaults
|
|
8
|
+
below make them agree for the read-only modes — but if you write a custom mode
|
|
9
|
+
prompt that forbids something, add the matching policy or nothing enforces it.
|
|
8
10
|
|
|
9
11
|
The active mode is `build` unless configured otherwise.
|
|
10
12
|
|
|
@@ -25,11 +27,35 @@ back to `build` clears the key rather than writing the default.
|
|
|
25
27
|
|
|
26
28
|
| Mode | For | Tells the model to |
|
|
27
29
|
|------|-----|--------------------|
|
|
28
|
-
| `ask` | Questions about a codebase | Read,
|
|
29
|
-
| `plan` | Designing a change before making it | Explore, ask
|
|
30
|
-
| `build` | Implementing |
|
|
30
|
+
| `ask` | Questions about a codebase | Read, SearchCodebase, trace, and explain, citing paths and line numbers; decline edits and suggest `/mode build` |
|
|
31
|
+
| `plan` | Designing a change before making it | Explore, ask blocking questions with `ask_options`, then write a plan with Goal / Files to modify / New files / Tests / Verification |
|
|
32
|
+
| `build` | Implementing | Read before editing, one verified change at a time, name what an irreversible operation destroys before running it, never commit or push unasked, run tests after each unit of work |
|
|
31
33
|
| `debug` | Finding a root cause | Gather evidence, reproduce, trace the call path, state the root cause in one sentence, describe the fix without applying it |
|
|
32
34
|
|
|
35
|
+
## What each mode actually permits
|
|
36
|
+
|
|
37
|
+
The mode prompts above say what the model should do; these are the shipped
|
|
38
|
+
defaults in `hoo-config.json` that decide what it *can* do. Edit them per mode,
|
|
39
|
+
globally in `~/.hoocode/hoo-config.json` or per project in
|
|
40
|
+
`./.hoocode/hoo-config.json`.
|
|
41
|
+
|
|
42
|
+
| Mode | `auto_allow` (runs without a prompt) | Hard policy |
|
|
43
|
+
|------|--------------------------------------|-------------|
|
|
44
|
+
| `ask` | `read` | `denied_tools: [edit, write]` |
|
|
45
|
+
| `plan` | `read`, `write` | `allowed_write_paths: [.hoocode/plans/*, .hoocode/plan.md]` |
|
|
46
|
+
| `build` | `read` | none — every `bash`/`edit`/`write` is gated |
|
|
47
|
+
| `debug` | `read`, `bash` | `denied_tools: [edit, write]` |
|
|
48
|
+
|
|
49
|
+
- `denied_tools` is hard enforcement: it applies with or without a UI, so it
|
|
50
|
+
holds in `--print` runs too.
|
|
51
|
+
- `allowed_write_paths` covers both `edit` and `write`, and is checked *before*
|
|
52
|
+
`auto_allow` — which is what confines plan mode to its plan file even though
|
|
53
|
+
`write` is auto-allowed there. It is currently only applied in interactive
|
|
54
|
+
sessions.
|
|
55
|
+
- `bash` is not restricted by tool policy in any shipped mode. In `ask` and
|
|
56
|
+
`debug` the prompt is what keeps it read-only; if you need that enforced, set
|
|
57
|
+
`allowed_bash_commands` (a hard-enforced regex allowlist) for the mode.
|
|
58
|
+
|
|
33
59
|
## The planning workflow
|
|
34
60
|
|
|
35
61
|
Plan mode writes to `.hoocode/plans/<session-id>.md`. Each session gets its own
|
package/docs/quickstart.md
CHANGED
|
@@ -59,7 +59,7 @@ By default, hoocode gives the model four tools:
|
|
|
59
59
|
- `edit` - patch files
|
|
60
60
|
- `bash` - run shell commands
|
|
61
61
|
|
|
62
|
-
The built-in read-only `
|
|
62
|
+
The built-in read-only `SearchCodebase` tool is available through tool options. HooCode runs in your current working directory and can modify files there. Use git or another checkpointing workflow if you want easy rollback.
|
|
63
63
|
|
|
64
64
|
## Give hoocode project instructions
|
|
65
65
|
|
package/docs/sdk.md
CHANGED
|
@@ -469,7 +469,7 @@ const { session } = await createAgentSession({ resourceLoader: loader });
|
|
|
469
469
|
```typescript
|
|
470
470
|
import {
|
|
471
471
|
codingTools, // read, bash, edit, write (default)
|
|
472
|
-
readOnlyTools, // read,
|
|
472
|
+
readOnlyTools, // read, SearchCodebase
|
|
473
473
|
readTool, bashTool, editTool, writeTool,
|
|
474
474
|
searchTool,
|
|
475
475
|
} from "@kolisachint/hoocode-agent";
|
|
@@ -492,7 +492,7 @@ const { session } = await createAgentSession({
|
|
|
492
492
|
```typescript
|
|
493
493
|
import {
|
|
494
494
|
createCodingTools, // Creates [read, bash, edit, write] for specific cwd
|
|
495
|
-
createReadOnlyTools, // Creates [read,
|
|
495
|
+
createReadOnlyTools, // Creates [read, SearchCodebase] for specific cwd
|
|
496
496
|
createReadTool,
|
|
497
497
|
createBashTool,
|
|
498
498
|
createEditTool,
|
package/docs/settings.md
CHANGED
|
@@ -324,9 +324,9 @@ there.
|
|
|
324
324
|
|
|
325
325
|
| Binary | Adds | Without it |
|
|
326
326
|
|---|---|---|
|
|
327
|
-
| `rg` | Fast path for the lexical half of `
|
|
327
|
+
| `rg` | Fast path for the lexical half of `SearchCodebase`. Fetched at startup. | A pure-JS scanner with identical output, slower on large trees. |
|
|
328
328
|
| `fd` | Fast path for `find`. Fetched at startup. | A JS directory walker, slower, with approximated glob/ignore handling. |
|
|
329
|
-
| `embsearch` | Semantic hits fused into `
|
|
329
|
+
| `embsearch` | Semantic hits fused into `SearchCodebase`, and meaning-ranked capability/MCP lookup. Fetched on first use. Must be the ONNX build. | `SearchCodebase` runs lexical-only. Nothing errors; intent-phrased queries rank worse. |
|
|
330
330
|
| `webtools` | The `webfetch` and `websearch` tools. Fetched on first use. | Both tools error when called. |
|
|
331
331
|
| `voicetools` | Push-to-talk voice input in the TUI. Fetched on first use. | Voice capture reports an error and never starts. |
|
|
332
332
|
|
|
@@ -335,7 +335,7 @@ there.
|
|
|
335
335
|
| `enableWebTools` | boolean | `false` | Enable `webfetch` + `websearch` (network access). Needs the `webtools` binary. |
|
|
336
336
|
| `webtools.timeoutSecs` | number | `15` | Per-request timeout in seconds, clamped 1–120. Wins over `HOOCODE_WEBTOOLS_TIMEOUT`. |
|
|
337
337
|
| `webtools.search` | object | — | Search backend and credentials, read by the `webtools` binary itself. See [Web search providers](#web-search-providers). |
|
|
338
|
-
| `
|
|
338
|
+
| `enableSemanticIndex` | boolean | `true` | Build and fuse the semantic index into `SearchCodebase`. Set false to run it lexical-only. |
|
|
339
339
|
| `embsearchBinaryPath` | string | — | Explicit path to the `embsearch` binary. Default: resolve from `PATH`. |
|
|
340
340
|
| `embsearchThresholdBytes` | number | `0` | Minimum indexable source bytes before a repo is embedded. `0` indexes every repo. |
|
|
341
341
|
| `voice.silenceMs` | number | `800` | Trailing silence before voice capture auto-stops, clamped 300–10000. `VOICETOOLS_SILENCE_MS` overrides this. |
|
package/docs/usage.md
CHANGED
|
@@ -311,7 +311,7 @@ cat README.md | hoocode -p "Summarize this text"
|
|
|
311
311
|
| `--no-builtin-tools`, `-nbt` | Disable built-in tools but keep extension/custom tools enabled |
|
|
312
312
|
| `--no-tools`, `-nt` | Disable all tools |
|
|
313
313
|
|
|
314
|
-
Built-in tools: `read`, `bash`, `edit`, `write`, `
|
|
314
|
+
Built-in tools: `read`, `bash`, `edit`, `write`, `SearchCodebase`.
|
|
315
315
|
|
|
316
316
|
#### Optional tool bundles
|
|
317
317
|
|
|
@@ -321,7 +321,7 @@ Off by default unless noted; each adds a capability rather than a single tool.
|
|
|
321
321
|
|--------|---------|
|
|
322
322
|
| `--enable-todowrite` | The TodoWrite tool — a live todo list in the task panel |
|
|
323
323
|
| `--enable-webtools` | `webfetch` and `websearch` (network access) |
|
|
324
|
-
| `--enable-
|
|
324
|
+
| `--enable-semantic-index` | The semantic index fused into `SearchCodebase` (on by default). The tool itself is always registered and cannot be disabled |
|
|
325
325
|
| `--enable-plugintools` | The autonomous plugin system — see [Plugins](plugins.md) |
|
|
326
326
|
|
|
327
327
|
#### Subagents
|
|
@@ -376,7 +376,7 @@ trims the session to the smallest useful fixed per-turn surface, for small or
|
|
|
376
376
|
local models that waste context on harness boilerplate:
|
|
377
377
|
|
|
378
378
|
- Only `read`, `write`, `edit`, and `bash`, with short descriptions and stripped
|
|
379
|
-
parameter schemas. `bash` subsumes `
|
|
379
|
+
parameter schemas. `bash` subsumes `SearchCodebase` — discovery happens via the shell.
|
|
380
380
|
- A terse replacement system prompt.
|
|
381
381
|
- No subagents, TodoWrite, skills, context files, mode appendix, or the
|
|
382
382
|
self-documentation section.
|
|
@@ -418,7 +418,7 @@ hoocode --model sonnet:high "Solve this complex problem"
|
|
|
418
418
|
hoocode --models "claude-*,gpt-4o"
|
|
419
419
|
|
|
420
420
|
# Read-only mode
|
|
421
|
-
hoocode --tools read,
|
|
421
|
+
hoocode --tools read,SearchCodebase -p "Review the code"
|
|
422
422
|
```
|
|
423
423
|
|
|
424
424
|
### Environment Variables
|
|
@@ -19,7 +19,7 @@ import { Key } from "@kolisachint/hoocode-tui";
|
|
|
19
19
|
import { extractTodoItems, isSafeCommand, markCompletedSteps, type TodoItem } from "./utils.js";
|
|
20
20
|
|
|
21
21
|
// Tools
|
|
22
|
-
const PLAN_MODE_TOOLS = ["read", "bash", "
|
|
22
|
+
const PLAN_MODE_TOOLS = ["read", "bash", "SearchCodebase", "questionnaire"];
|
|
23
23
|
const NORMAL_MODE_TOOLS = ["read", "bash", "edit", "write"];
|
|
24
24
|
|
|
25
25
|
// Type guard for assistant messages
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* "provider": "openai-codex",
|
|
17
17
|
* "model": "gpt-5.2-codex",
|
|
18
18
|
* "thinkingLevel": "high",
|
|
19
|
-
* "tools": ["read", "
|
|
19
|
+
* "tools": ["read", "SearchCodebase"],
|
|
20
20
|
* "instructions": "You are in PLANNING MODE. Your job is to deeply understand the problem and create a detailed implementation plan.\n\nRules:\n- DO NOT make any changes. You cannot edit or write files.\n- Read files IN FULL (no offset/limit) to get complete context. Partial reads miss critical details.\n- Explore thoroughly: search for related code, find similar patterns, understand the architecture.\n- Ask clarifying questions if requirements are ambiguous. Do not assume.\n- Identify risks, edge cases, and dependencies before proposing solutions.\n\nOutput:\n- Create a structured plan with numbered steps.\n- For each step: what to change, why, and potential risks.\n- List files that will be modified.\n- Note any tests that should be added or updated.\n\nWhen done, ask the user if they want you to:\n1. Write the plan to a markdown file (e.g., PLAN.md)\n2. Create a GitHub issue with the plan\n3. Proceed to implementation (they should switch to 'implement' preset)"
|
|
21
21
|
* },
|
|
22
22
|
* "implement": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* 4. Custom rendering of tool calls and results
|
|
12
12
|
*
|
|
13
13
|
* The `rg` tool here wraps ripgrep with proper truncation. Compare this to the
|
|
14
|
-
* built-in `
|
|
14
|
+
* built-in `SearchCodebase` tool in src/core/tools/search.ts for a more complete implementation.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { mkdtemp, writeFile } from "node:fs/promises";
|
package/examples/sdk/05-tools.ts
CHANGED
|
@@ -14,14 +14,14 @@ import { createAgentSession, SessionManager } from "@kolisachint/hoocode-agent";
|
|
|
14
14
|
|
|
15
15
|
// Read-only mode (no edit/write)
|
|
16
16
|
await createAgentSession({
|
|
17
|
-
tools: ["read", "
|
|
17
|
+
tools: ["read", "SearchCodebase"],
|
|
18
18
|
sessionManager: SessionManager.inMemory(),
|
|
19
19
|
});
|
|
20
20
|
console.log("Read-only session created");
|
|
21
21
|
|
|
22
22
|
// Custom tool selection
|
|
23
23
|
await createAgentSession({
|
|
24
|
-
tools: ["read", "bash", "
|
|
24
|
+
tools: ["read", "bash", "SearchCodebase"],
|
|
25
25
|
sessionManager: SessionManager.inMemory(),
|
|
26
26
|
});
|
|
27
27
|
console.log("Custom tools session created");
|
|
@@ -38,7 +38,7 @@ console.log("Custom cwd session created");
|
|
|
38
38
|
// Or pick specific tools for custom cwd
|
|
39
39
|
await createAgentSession({
|
|
40
40
|
cwd: customCwd,
|
|
41
|
-
tools: ["read", "bash", "
|
|
41
|
+
tools: ["read", "bash", "SearchCodebase"],
|
|
42
42
|
sessionManager: SessionManager.inMemory(customCwd),
|
|
43
43
|
});
|
|
44
44
|
console.log("Specific tools with custom cwd session created");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolisachint/hoocode-agent",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.54",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"hoocodeConfig": {
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"prepublishOnly": "npm run clean && npm run build"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@kolisachint/hoocode-agent-core": "^0.5.
|
|
54
|
-
"@kolisachint/hoocode-ai": "^0.5.
|
|
55
|
-
"@kolisachint/hoocode-tui": "^0.5.
|
|
53
|
+
"@kolisachint/hoocode-agent-core": "^0.5.54",
|
|
54
|
+
"@kolisachint/hoocode-ai": "^0.5.54",
|
|
55
|
+
"@kolisachint/hoocode-tui": "^0.5.54",
|
|
56
56
|
"@silvia-odwyer/photon-node": "^0.3.4",
|
|
57
57
|
"chalk": "^5.5.0",
|
|
58
58
|
"cli-highlight": "^2.1.11",
|
|
@@ -13,7 +13,7 @@ description: |
|
|
|
13
13
|
Output: Ranked findings, each with path:line, the defect, and how it fails.
|
|
14
14
|
Cost: Medium (reads the full diff and surrounding code)
|
|
15
15
|
Isolation: Read-only; can run in parallel with other review tasks
|
|
16
|
-
tools: read, bash,
|
|
16
|
+
tools: read, bash, SearchCodebase
|
|
17
17
|
model: capable
|
|
18
18
|
background: true
|
|
19
19
|
---
|
|
@@ -15,7 +15,7 @@ description: |
|
|
|
15
15
|
Output: Concise summary, file list, or plan. No code changes.
|
|
16
16
|
Cost: Low (read-only)
|
|
17
17
|
Isolation: Can run in parallel with other explore tasks
|
|
18
|
-
tools: read,
|
|
18
|
+
tools: read, SearchCodebase
|
|
19
19
|
model: fast
|
|
20
20
|
background: true
|
|
21
21
|
---
|
|
@@ -23,7 +23,7 @@ You are an explore-only agent running inside hoocode. You read code and produce
|
|
|
23
23
|
|
|
24
24
|
Scope:
|
|
25
25
|
- Do not modify, create, or delete files, and do not run commands.
|
|
26
|
-
- Use read and
|
|
26
|
+
- Use read and SearchCodebase to locate and understand code.
|
|
27
27
|
|
|
28
28
|
Method:
|
|
29
29
|
1. Break the task into concrete questions.
|
|
@@ -12,14 +12,14 @@ description: |
|
|
|
12
12
|
Output: The completed result plus a summary of what was done and where.
|
|
13
13
|
Cost: Variable (read + write + run)
|
|
14
14
|
Isolation: Should not run concurrently with other write tasks on the same files
|
|
15
|
-
tools: read, bash, edit, write,
|
|
15
|
+
tools: read, bash, edit, write, SearchCodebase
|
|
16
16
|
model: standard
|
|
17
17
|
delegate: true
|
|
18
18
|
---
|
|
19
19
|
You are a general-purpose subagent running inside hoocode. You handle multi-step and open-ended tasks end to end. You run in an isolated context and cannot see the parent conversation.
|
|
20
20
|
|
|
21
21
|
Scope:
|
|
22
|
-
- You may read,
|
|
22
|
+
- You may read, SearchCodebase, edit, and write files, and run commands needed to complete the task.
|
|
23
23
|
- Stay within the requested task. Do not refactor or change unrelated code.
|
|
24
24
|
|
|
25
25
|
Method:
|
package/templates/agents/plan.md
CHANGED
|
@@ -14,7 +14,7 @@ description: |
|
|
|
14
14
|
Output: A concrete plan — the approach, the files to change, and the steps.
|
|
15
15
|
Cost: Low–medium (read-only)
|
|
16
16
|
Isolation: Can run in parallel with explore tasks
|
|
17
|
-
tools: read,
|
|
17
|
+
tools: read, SearchCodebase
|
|
18
18
|
model: standard
|
|
19
19
|
background: true
|
|
20
20
|
---
|
|
@@ -24,7 +24,7 @@ isolated context and cannot see the parent conversation.
|
|
|
24
24
|
|
|
25
25
|
Scope:
|
|
26
26
|
- Do not create, modify, or delete files, and do not run commands.
|
|
27
|
-
- Use read and
|
|
27
|
+
- Use read and SearchCodebase to understand the code and its structure.
|
|
28
28
|
|
|
29
29
|
Method:
|
|
30
30
|
1. Restate the goal and identify what you need to learn to plan it.
|
|
@@ -14,7 +14,7 @@ description: |
|
|
|
14
14
|
fix.
|
|
15
15
|
Cost: Medium (reads the diff and traces untrusted input)
|
|
16
16
|
Isolation: Read-only; can run in parallel with other review tasks
|
|
17
|
-
tools: read, bash,
|
|
17
|
+
tools: read, bash, SearchCodebase
|
|
18
18
|
model: capable
|
|
19
19
|
background: true
|
|
20
20
|
---
|
|
@@ -9,9 +9,12 @@
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"modes": {
|
|
12
|
-
"ask": { "auto_allow": ["read"] },
|
|
13
|
-
"plan": {
|
|
12
|
+
"ask": { "auto_allow": ["read"], "denied_tools": ["edit", "write"] },
|
|
13
|
+
"plan": {
|
|
14
|
+
"auto_allow": ["read", "write"],
|
|
15
|
+
"allowed_write_paths": [".hoocode/plans/*", ".hoocode/plan.md"]
|
|
16
|
+
},
|
|
14
17
|
"build": { "auto_allow": ["read"] },
|
|
15
|
-
"debug": { "auto_allow": ["read", "bash"] }
|
|
18
|
+
"debug": { "auto_allow": ["read", "bash"], "denied_tools": ["edit", "write"] }
|
|
16
19
|
}
|
|
17
20
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
You are in **ask mode** — read-only Q&A.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Forbidden: edit files, write files, run commands that modify state.
|
|
3
|
+
Forbidden: edit or write any file; any command that changes state. Read-only shell (`git log`, `git diff`, `ls`, `rg`) is fine.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
- If a question requires a code change to answer properly, describe the change; do not apply it.
|
|
10
|
-
- If the user asks you to edit something, decline and suggest switching to build mode with `/mode build`.
|
|
5
|
+
- Cite path:line.
|
|
6
|
+
- Describe a needed change exactly; never apply it. To apply, `/mode build`.
|
|
7
|
+
- If you do not know, say so and name what you would read to find out.
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
You are in **build mode** — implement
|
|
1
|
+
You are in **build mode** — implement and verify, one change at a time.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
- **
|
|
5
|
-
- **
|
|
6
|
-
- **
|
|
7
|
-
- **
|
|
8
|
-
- **Match existing style** — indentation, naming, import order.
|
|
9
|
-
- **Run tests** after every logical unit of change. Fix failures before continuing.
|
|
3
|
+
- **Read before editing.** Never write a file you have not read this session.
|
|
4
|
+
- **Sequential edits.** Finish and verify one logical change before the next. Reads and searches still batch into one message.
|
|
5
|
+
- **Irreversible ops** (delete, force-push, drop table, `rm -rf`, history rewrite): say what it destroys before you call it. The gate shows the command, not the blast radius.
|
|
6
|
+
- **Never commit or push unless asked.**
|
|
7
|
+
- **Run tests** after each logical unit. Fix failures; report ones you cannot.
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
You are in **debug mode** — root-cause
|
|
1
|
+
You are in **debug mode** — root-cause only.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
1. **Gather evidence** — read logs, error traces, and relevant source. Run safe diagnostic commands (search, read, non-mutating shell commands).
|
|
5
|
-
2. **Reproduce** — identify the minimal condition that triggers the bug.
|
|
6
|
-
3. **Trace** — follow the full call path from entry point to failure site, citing file and line at each step.
|
|
7
|
-
4. **State the root cause** in one clear sentence.
|
|
8
|
-
5. **Describe the fix** — files, lines, and what to change — but do not apply it.
|
|
3
|
+
Forbidden: edit or write any file; any command that changes state. To apply a fix, `/mode build`.
|
|
9
4
|
|
|
10
|
-
|
|
5
|
+
1. **Evidence** — read logs, traces, and source. Read-only shell only.
|
|
6
|
+
2. **Reproduce** — the minimal trigger. If you cannot, say so and reason from what you have.
|
|
7
|
+
3. **Trace** — entry point to failure site, path:line at each step.
|
|
8
|
+
4. **Root cause** — one sentence, plus the evidence proving it. Two candidates beat one invented. "Not found" is a valid answer.
|
|
9
|
+
5. **Fix** — files, lines, what to change. Do not apply it.
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
You are in **plan mode** — explore and design
|
|
1
|
+
You are in **plan mode** — explore and design.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Forbidden: create, edit, or delete any file except `{{PLAN_PATH}}`.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
2. Write the finished plan to `{{PLAN_PATH}}` with these sections:
|
|
5
|
+
1. Read the relevant files. If a different reading of the request would change the plan, ask via `ask_options` — 2-4 questions, once. Settle the rest yourself.
|
|
6
|
+
2. Write `{{PLAN_PATH}}`:
|
|
8
7
|
- **Goal** — one sentence.
|
|
9
|
-
- **Files to modify** — path, line range,
|
|
8
|
+
- **Files to modify** — path, line range, change.
|
|
10
9
|
- **New files** — path, purpose.
|
|
11
10
|
- **Tests** — what to add or update.
|
|
12
|
-
- **Verification** — commands
|
|
13
|
-
3.
|
|
14
|
-
`/grill` to stress-test it, then `/approve` to execute it step by step or
|
|
15
|
-
`/goal` to work toward it autonomously." Recommend `/grill` first whenever the
|
|
16
|
-
plan carries real risk — it surfaces weak assumptions before any code changes.
|
|
17
|
-
|
|
18
|
-
Forbidden: edit any source file. Only `{{PLAN_PATH}}` may be written.
|
|
11
|
+
- **Verification** — commands that prove the goal is met, not that the code runs.
|
|
12
|
+
3. Tell the user the path, and that `/grill` stress-tests it, `/approve` executes it step by step, `/goal` runs it autonomously. Recommend `/grill` when the plan carries risk.
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
You have access to the **Task** tool. Use it to delegate self-contained tasks to specialized subagents that run in their own isolated context and return only their final answer. Pick an agent by name from the <available_agents> list in this prompt and pass it as `subagent_type`.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
1. The work is self-contained and you only need the final result, not intermediate steps.
|
|
5
|
-
2. You want to investigate or edit something in parallel without losing your current context or reasoning chain.
|
|
6
|
-
3. The task is a discrete unit (explore one module, run one test file, review one PR, fix one isolated bug).
|
|
7
|
-
4. You need to run a long command or test suite and wait for its output without blocking your own reasoning.
|
|
3
|
+
Delegate when you need only the final result: a discrete unit (explore one module, run one test file, review one PR, fix one isolated bug), an investigation you want running in parallel without spending your own context, or a long command or test suite you would block on. Use `explore` for read-only scouting, `plan` for research before changes. Dispatch independent subtasks in the same turn. Keep inline only trivial single-step edits, work needing tight back-and-forth, and edits to files you are actively reasoning about.
|
|
8
4
|
|
|
9
|
-
Model tier (optional `complexity`):
|
|
5
|
+
Model tier (optional `complexity`): `fast` for quick reads/lookups, `standard` for multi-file edits, `capable` for deep architecture. Omit to use the agent's default; an agent pinning its own model ignores it.
|
|
10
6
|
|
|
11
7
|
Guidelines:
|
|
12
8
|
- Choose the agent whose description best matches the task.
|
|
13
|
-
-
|
|
14
|
-
- Do NOT delegate tasks that require tight back-and-forth with your current reasoning, or edits to files you are actively reasoning about.
|
|
15
|
-
- The subagent returns ONLY its final answer. Its intermediate reasoning, tool calls, and output are hidden from you.
|
|
16
|
-
- Delegate proactively when work is self-contained or parallelizable: multi-step investigation, read-only exploration (use `explore`), research before changes (use `plan`), drafting a standalone file/section, or running a long command/test suite. Dispatch independent subtasks in the same turn. Handle only trivial single-step edits or tightly interactive back-and-forth inline.
|
|
9
|
+
- The subagent cannot see this conversation and returns ONLY its final answer — pass all context (files, constraints, prior findings) in `prompt`.
|
|
17
10
|
{{BACKGROUND_GUIDANCE}}
|
|
18
|
-
- When working
|
|
19
|
-
- To continue a previous subagent
|
|
11
|
+
- When working a TodoWrite plan, mark the item in_progress BEFORE dispatching: each dispatch is attributed to the current in_progress item in the task panel.
|
|
12
|
+
- To continue a previous subagent, call Task with `resume_task_id` set to its task_id; it resumes with its full transcript and `prompt` is your follow-up.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: artifact-design
|
|
3
3
|
description: Build a self-contained HTML visual written to disk — page, report, dashboard, mockup, diagram, or poster. Load before the first line of markup or CSS whenever something has to look right, or a redesign is asked for. Not for app code the project's own design system already governs.
|
|
4
|
-
allowed-tools: read, write, edit,
|
|
4
|
+
allowed-tools: read, write, edit, SearchCodebase
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Designing a visual
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: canvas-design
|
|
3
3
|
description: How to make a canvas extension's page good — layout, styling, live state, and the dependency and token constraints the surface imposes. Read when building or editing a canvas; the /new-canvas brief points here.
|
|
4
4
|
disable-model-invocation: true
|
|
5
|
-
allowed-tools: read, write, edit,
|
|
5
|
+
allowed-tools: read, write, edit, SearchCodebase
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Designing a canvas
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plugin-authoring
|
|
3
3
|
description: How to author a portable, reusable hoocode plugin — when a capability is worth extracting, how to name and describe it so it triggers again, and what makes content portable across repos and machines. Use before calling ProposePlugin or UpdatePlugin, or when deciding whether a recipe you just completed is worth keeping.
|
|
4
|
-
allowed-tools: read, write, edit,
|
|
4
|
+
allowed-tools: read, write, edit, SearchCodebase
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Authoring a plugin
|