Skip to content

Commit 13c43ca

Browse files
committed
fix: corrected agent delegation toolsets
1 parent b86dfe7 commit 13c43ca

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

api/.hermes/plugins/persist_state/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def _render_checklist(result: Any) -> str:
187187
return "\n".join(lines)
188188

189189

190-
_THINK_TAGS = _re.compile(r"<(antThinking|think|thinking|reasoning)>.*?</\\1>", _re.DOTALL | _re.IGNORECASE)
190+
_THINK_TAGS = _re.compile(r"<(antThinking|think|thinking|reasoning)>.*?</\1>", _re.DOTALL | _re.IGNORECASE)
191191

192192

193193
def _strip_thinking(text: str) -> str:

api/src/agent/agent.prompts.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,20 @@ export const DELEGATION_STRATEGY = `# Delegation
9393
## Workflow
9494
9595
1. **Map the work once.** Unless you already know exactly where everything lives, spawn ONE read-only survey subagent and use its summary to split the work into small units — ideally one file (or one acceptance criterion / issue) per unit. Do not read source yourself to plan.
96-
delegate_task(goal="Locate the files and line ranges relevant to each item to be implemented/fixed — read with read_file/search_files (small offset/limit windows), not cat/grep. Report file paths and line ranges in full, but keep prose brief — key facts only", context="<the plan / issues>", toolsets=["file"], max_iterations=10)
96+
delegate_task(
97+
goal="Locate the files and line ranges relevant to each item to be implemented/fixed — discover with search_files or terminal (ls/find), then read the hits with read_file (small offset/limit windows). Report file paths and line ranges in full, but keep prose brief — key facts only",
98+
context="<the plan / issues>",
99+
toolsets=["file","terminal","search"],
100+
max_iterations=10
101+
)
97102
2. **Delegate each unit.** For every item, spawn a subagent that does the actual reading and editing:
98-
delegate_task(
99-
goal="<the specific change to make>. Work test-first: add or extend the automated test that encodes the acceptance criterion and confirm it FAILS first, then implement until it passes — set up the standard runner for this stack if none exists (Vitest for Vite/TS, Jest for plain Node, pytest for Python), and never weaken, skip, or delete a test to go green. Run the project's static analysis on the files you touch and fix every error. In your FINAL report, be concise — the exact files and line ranges you changed (paths and line numbers in full) plus the test result, key facts only, no restated file contents (narrate freely as you work; only this final report is persisted). Read with read_file/search_files (small offset/limit windows), not cat/grep; use terminal only to run tests/builds.",
100-
context="<the slice of the plan/issue this unit covers and where it lives, from the survey>",
101-
toolsets=["file","terminal","search"],
102-
max_iterations=40,
103-
)
104-
Run units that touch DIFFERENT files in parallel; run units that share a file or depend on each other ONE at a time, feeding the earlier unit's summary into the next unit's context.
103+
delegate_task(
104+
goal="<the specific change to make>. Work test-first: add or extend the automated test that encodes the acceptance criterion and confirm it FAILS first, then implement until it passes — set up the standard runner for this stack if none exists (Vitest for Vite/TS, Jest for plain Node, pytest for Python), and never weaken, skip, or delete a test to go green. Run the project's static analysis on the files you touch and fix every error. In your FINAL report, be concise — the exact files and line ranges you changed (paths and line numbers in full) plus the test result, key facts only, no restated file contents (narrate freely as you work; only this final report is persisted). Read with read_file/search_files (small offset/limit windows), not cat/grep; use terminal only to run tests/builds.",
105+
context="<the slice of the plan/issue this unit covers and where it lives, from the survey>",
106+
toolsets=["file","terminal","search"],
107+
max_iterations=40,
108+
)
109+
Run units that touch DIFFERENT files in parallel; run units that share a file or depend on each other ONE at a time, feeding the earlier unit's summary into the next unit's context.
105110
3. **Mark it done — the report is saved for you.** When a subagent returns, mark its todo item completed. Its full report is appended automatically to the Findings of \`.olympian/PROGRESS.md\`, so you do NOT need to copy it anywhere or re-open the file to verify — trust the report; the verification stage is the safety net.
106111
4. **Verify, don't re-do.** Use your own tools to keep the todo current, run the final whole-repo static-analysis / tests, and orchestrate; delegate a read-only subagent to CHECK a subagent's work when you need to. Route every change — even a one-line fix — and every broad survey through a subagent, so file bodies stay out of your context.`;
107112

0 commit comments

Comments
 (0)