# The `economy` agent preset: token-efficient agent with cost-aware delegation. # ── identity ──────────────────────────────────────────────────────────────── - id: persona name: '@deepseek-ai/dsh-persona' config: text: >- You are an economy-focused coding agent powered by the {{model}} model. Your working directory is {{cwd}}. TOKEN & COST EFFICIENCY PRINCIPLES (MANDATORY OPERATING RULES): 1. Do cheap work directly in the main thread: - A direct read/grep/glob call is almost always cheaper and faster than a subagent, which pays its own system prompt and tool catalog. Use read/grep/glob/pwsh directly for lookups, small edits, and tasks with a small working set. 2. Delegate only when delegation clearly saves tokens: - Delegate large, self-contained subtasks that would otherwise add many tool-call rounds to the main context: whole-codebase exploration, running and analyzing a test suite, drafting an isolated implementation, independent research. - Use `subagent` for self-contained work; use `subagent_fork` only when the child must build on this conversation. - Group related questions into one delegation rather than one subagent per small question. 3. Bound the delegation cost: - Prefer one subagent per work item; never spawn a subagent for a lookup a main-thread tool can answer. - Children are leaves: a delegated child works directly with its own tools and reports back; it must not delegate further. - Ignore or cancel a subagent whose result no longer matters; collect only the results you need. 4. Context protection: - Keep the main conversation lean: paste conclusions, not raw file dumps. 5. Communication: - Keep assistant responses concise, structured, and actionable. - id: agent-instructions name: '@deepseek-ai/dsh-agent-instructions' config: maxBytes: 65536 # ── shell ─────────────────────────────────────────────────────────────────── - id: tool-bash name: '@deepseek-ai/dsh-tool-bash' disabled: !!js process.platform === 'win32' - id: tool-pwsh name: '@deepseek-ai/dsh-tool-pwsh' disabled: !!js process.platform !== 'win32' # ── filesystem ────────────────────────────────────────────────────────────── - id: tool-fs name: '@deepseek-ai/dsh-tool-fs' - id: tool-fs-search name: '@deepseek-ai/dsh-tool-fs-search' config: sampleOverCapGlobResults: false # ── background jobs ──────────────────────────────────────────────────────── - id: tool-jobs name: '@deepseek-ai/dsh-tool-jobs' # ── skills ────────────────────────────────────────────────────────────────── - id: skill-filesystem name: '@deepseek-ai/dsh-skill-filesystem' - id: tool-skill name: '@deepseek-ai/dsh-tool-skill' # ── goals ─────────────────────────────────────────────────────────────────── - id: tool-goal name: '@deepseek-ai/dsh-tool-goal' # ── plan mode ─────────────────────────────────────────────────────────────── - id: planning name: cordis:group group: true isolate: planMode: true config: - id: plan-mode name: '@deepseek-ai/dsh-plan-mode' config: section: | You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode. Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery. The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode. Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out. Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions. When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation. # ── compaction ────────────────────────────────────────────────────────────── - id: compaction name: cordis:group group: true isolate: compaction: true toolResultPruner: true config: - id: compaction-basic name: '@deepseek-ai/dsh-compaction-basic' - id: command-compact name: '@deepseek-ai/dsh-command-compact' - id: tool-result-pruner name: '@deepseek-ai/dsh-compaction-tool-result-pruner' config: thresholdChars: 4096 headChars: 2048 tailChars: 512 # ── delegation and workflows ──────────────────────────────────────────────── - id: delegation name: cordis:group group: true isolate: workflowEngine: true config: - id: tool-subagent-control name: '@deepseek-ai/dsh-tool-subagent-control' - id: tool-subagent-list-agents name: '@deepseek-ai/dsh-tool-subagent-control/list-agents' - id: tool-subagent name: '@deepseek-ai/dsh-tool-subagent' config: provider: spawn toolName: subagent backgroundMode: one-shot # Children are leaves: the top-level agent may delegate, a child may # not, so the number of spawned agents is bounded by the top-level # delegations instead of cascading. maxDepth: 1 - id: tool-subagent-fork name: '@deepseek-ai/dsh-tool-subagent' config: provider: fork toolName: subagent_fork backgroundMode: one-shot maxDepth: 1 # An economy mode should not reach for external paid agents by default, so # these rows stay off even though the base host plane mounts each provider. # A deployment that wants them copies this preset and removes `disabled` # from the matching row; each run then needs that product's own CLI on PATH # (`codex`, `claude`, `cursor-agent`) plus its own account. - id: tool-subagent-codex name: '@deepseek-ai/dsh-tool-subagent' disabled: true config: provider: codex toolName: subagent_codex backgroundMode: one-shot maxDepth: provider-managed - id: tool-subagent-claude-code name: '@deepseek-ai/dsh-tool-subagent' disabled: true config: provider: claude-code toolName: subagent_claude_code backgroundMode: one-shot maxDepth: provider-managed - id: tool-subagent-cursor name: '@deepseek-ai/dsh-tool-subagent' disabled: true config: provider: cursor toolName: subagent_cursor backgroundMode: one-shot maxDepth: provider-managed - id: workflow-worker-thread name: '@deepseek-ai/dsh-workflow-worker-thread' config: provider: spawn - id: tool-workflow name: '@deepseek-ai/dsh-tool-workflow' - id: tool-ralph name: '@deepseek-ai/dsh-tool-ralph' config: # Fresh-agent rounds are the most expensive delegation pattern: every # round is a new child with no conversation seed. Keep the budget tight. subagentProvider: spawn maxRounds: 8 # ── remaining model-facing rows ───────────────────────────────────────────── - id: tool-ask-user name: '@deepseek-ai/dsh-tool-ask-user' - id: tool-todo name: '@deepseek-ai/dsh-tool-todo' config: allowParallelInProgress: true - id: tool-web name: '@deepseek-ai/dsh-tool-web' config: fetch: false searchTimeoutMs: 60000