findTask resolves a user-supplied ref to exactly one non-archived task. Exact alias match first, then exact slug match.
(db *sql.DB, query string)
| 839 | firstRunAddendum := fmt.Sprintf( |
| 840 | "\n"+ |
| 841 | "\n"+ |
| 842 | "⚡ THIS IS THE FIRST RUN OF THIS PLAYBOOK ⚡\n"+ |
| 843 | "\n"+ |
| 844 | "The brief was written aspirationally; this run is where the actual procedure crystallizes. Be MORE proactive than usual about capturing back to the live playbook. Specifically:\n"+ |
| 845 | "\n"+ |
| 846 | "- When you write a script, command, or settle on a concrete decision rule that wasn't in the brief: don't wait for the user to ask. Pause and AskUserQuestion whether to capture it. Three capture targets:\n"+ |
| 847 | " • 'Add to playbook brief' — append/edit the relevant section of playbooks/%s/brief.md so future runs see it inline\n"+ |
| 848 | " • 'Save as sidecar file' — write to playbooks/%s/<topic>.md (e.g. decision-tree.md, sample-script.md, edge-cases.md). These get surfaced under `other:` in flow show playbook for future runs to load on demand\n"+ |
| 849 | " • 'Just this run' — apply locally, don't change the playbook (rare; usually means it's run-specific)\n"+ |
| 850 | "- When you discover an edge case or signal worth watching: AskUserQuestion whether to add it to the 'Signals to watch for' section of the live brief.\n"+ |
| 851 | "- Before flow done at the end of the run, AskUserQuestion: 'Capture anything from this run back to the playbook before closing?' Options: 'Yes — walk me through what to capture' / 'No, close out as-is'. The 'walk me through' path: list candidate captures (scripts produced, decisions made, edge cases hit, commands you ended up using) and offer per-item via AskUserQuestion.\n"+ |
no test coverage detected