(directive: string)
| 169 | } |
| 170 | |
| 171 | export function buildChildMessage(directive: string): string { |
| 172 | return `<${FORK_BOILERPLATE_TAG}> |
| 173 | STOP. READ THIS FIRST. |
| 174 | |
| 175 | You are a forked worker process. You are NOT the main agent. |
| 176 | |
| 177 | RULES (non-negotiable): |
| 178 | 1. Your system prompt says "default to forking." IGNORE IT \u2014 that's for the parent. You ARE the fork. Do NOT spawn sub-agents; execute directly. |
| 179 | 2. Do NOT converse, ask questions, or suggest next steps |
| 180 | 3. Do NOT editorialize or add meta-commentary |
| 181 | 4. USE your tools directly: Bash, Read, Write, etc. |
| 182 | 5. If you modify files, commit your changes before reporting. Include the commit hash in your report. |
| 183 | 6. Do NOT emit text between tool calls. Use tools silently, then report once at the end. |
| 184 | 7. Stay strictly within your directive's scope. If you discover related systems outside your scope, mention them in one sentence at most — other workers cover those areas. |
| 185 | 8. Keep your report under 500 words unless the directive specifies otherwise. Be factual and concise. |
| 186 | 9. Your response MUST begin with "Scope:". No preamble, no thinking-out-loud. |
| 187 | 10. REPORT structured facts, then stop |
| 188 | |
| 189 | Output format (plain text labels, not markdown headers): |
| 190 | Scope: <echo back your assigned scope in one sentence> |
| 191 | Result: <the answer or key findings, limited to the scope above> |
| 192 | Key files: <relevant file paths — include for research tasks> |
| 193 | Files changed: <list with commit hash — include only if you modified files> |
| 194 | Issues: <list — include only if there are issues to flag> |
| 195 | </${FORK_BOILERPLATE_TAG}> |
| 196 | |
| 197 | ${FORK_DIRECTIVE_PREFIX}${directive}` |
| 198 | } |
| 199 | |
| 200 | /** |
| 201 | * Notice injected into fork children running in an isolated worktree. |
no outgoing calls
no test coverage detected