- Added a unified `job` prompt and removed `poll` and `cancel-job` prompts, documenting merged async actions. - Renamed `PollTool` to `JobTool` and replaced `poll`/`cancel_job` tool exports with a unified `job` tool. - Expanded `JobTool` schema to accept `poll` and `cancel` IDs, adding cancel-first execution for cancel-only requests. - Consolidated poll/cancel rendering in `renderJob`, mapping `await`, `poll`, and `cancel_job` keys to the unified job renderer with action badges. - Updated bash/task prompts and tests to use `job` for polling and cancellation flows, including JobTool auto-background checks.
6.6 KiB
Launches subagents to parallelize workflows.
{{#if asyncEnabled}}
- Use
read jobs://to inspect state;read jobs://<job_id>for detail. - Use the
jobtool (withpoll) to wait until completion. You MUST NOT pollread jobs://in a loop. {{/if}}
{{#if defaultMode}}
Current input mode: default. Shared context and custom task-call schema are available.
{{/if}}
{{#if schemaFreeMode}}
Current input mode: schema-free. Shared context is available; custom task-call schema is disabled. For structured output, rely on the agent definition or inherited session schema.
{{/if}}
{{#if independentMode}}
Current input mode: independent. Shared context and custom schema are both disabled. Every assignment must stand on its own.
{{/if}}
{{#if contextEnabled}}
Subagents lack your conversation history. Every decision, file content, and user requirement they need MUST be explicit in context or assignment.
{{else}}
Subagents lack your conversation history. Every decision, file content, and user requirement they need MUST be explicit in each task assignment.
{{/if}}
| Sequential first | Then | Reason |
|---|---|---|
| Types/interfaces | Consumers | Need contract |
| API exports | Callers | Need signatures |
| Core module | Dependents | Import dependency |
| Schema/migration | App logic | Schema dependency |
Safe to parallelize: independent modules, isolated file-scoped refactors, tests for existing code.
{{#if contextEnabled}} **context:** ``` ## Goal ← one sentence: what the batch accomplishes ## Non-goals ← what tasks must not touch ## Constraints ← MUST/MUST NOT rules and session decisions ## API Contract ← exact types/signatures if tasks share an interface (omit if N/A) ## Acceptance ← definition of done; build/lint runs AFTER all tasks complete ``` {{else}} No shared `context` field exists in this mode. Fold goal, non-goals, constraints, and acceptance criteria into each `assignment`. {{/if}} **assignment:** ``` ## Target ← exact file paths; named symbols; explicit non-goals ## Change ← step-by-step what to add/remove/rename; patterns/APIs to use ## Edge Cases ← tricky inputs; existing behavior that must survive ## Acceptance ← observable result proving the task is done; no project-wide commands ``` Before invoking: {{#if contextEnabled}} - `context` contains only session-specific info {{else}} - Every `assignment` includes its own goal, constraints, and acceptance criteria (no shared context) {{/if}} - Every `assignment` follows the template; no one-liners; edge cases covered - Tasks are truly parallel — you can articulate why none depends on another's output - File paths are explicit; no globs {{#if customSchemaEnabled}} - `schema` is set if you expect structured output {{else}} - Do not pass a custom task-call `schema` in this mode {{/if}}{{#if contextEnabled}} Two tasks with non-overlapping file sets — demonstrates scope partitioning.
## Goal Rename `parseConfig` → `loadConfig` in `src/config/parser.ts` and all callers. ## Non-goals No behavior or signature changes; rename only. ## Acceptance (global) Caller runs `bun check:ts` after both tasks complete. Tasks must NOT run it. ## Target - `src/config/parser.ts`: function `parseConfig` - If `src/config/index.ts` re-exports it, update the re-export - Non-goals: do not touch callers or testsChange
- Rename
parseConfig→loadConfig(declaration + any JSDoc references)
Edge Cases
- Rename all overload signatures if overloaded
- Internal helpers like
_parseConfigValueare different symbols — leave untouched - Do not add a backwards-compat alias
Acceptance
parseConfigno longer appears as a top-level export inparser.ts
Target
src/cli/init.ts,src/server/bootstrap.ts,src/worker/index.ts- Non-goals: do not touch
src/config/parser.tsorsrc/config/index.ts
Change
- Replace
import { parseConfig }→import { loadConfig } - Replace every call site
parseConfig(→loadConfig( - For
import * as cfgusers, updatecfg.parseConfigproperty access
Edge Cases
- String literals containing "parseConfig" (logs, comments) are documentation — leave them
- If a file re-exports to an external package boundary, keep the old name via
export { loadConfig as parseConfig }with a// TODO: remove after next majorcomment
Acceptance
- No bare
parseConfigidentifier remains in the three target files {{/if}}
{{#list agents join="\n"}}
Agent: {{name}}
Tools: {{default (join tools ", ") "All"}} {{description}} {{/list}}