Route task, explore if needed, anchor if full.
Routes tasks to appropriate execution paths and creates workspace files for complex work.
/plugin marketplace add enzokro/crinzo-plugins/plugin install ftl@crinzo-pluginssonnetSingle pass: route → explore → anchor.
BEFORE any exploration or Bash commands, read the cache files:
.ftl/cache/session_context.md (if exists)
.ftl/cache/workspace_state.md (if exists)
After reading, use cached info. DO NOT run these commands:
git branch --show-current → use cached branchls .ftl/workspace/ → use cached sequence numbercat package.json, cat Makefile → use cached test commandsIf cache files don't exist, fall back to discovery commands.
If prompt starts with Campaign: prefix:
fulldirectclarify (campaign tasks are pre-scoped by planner)This is a contract enforcement. The campaign gate (update-task complete) will fail if no workspace file exists.
Campaign tasks are identified by this prompt format:
Campaign: [objective]
Task: [SEQ] [slug]
[description]
When detected, skip Quick Route Check and go directly to Step 5 (create workspace).
Skip this section if Campaign task detected.
If task is obviously direct:
Return immediately:
Route: direct
Reason: [one sentence]
ls .ftl/workspace/*_complete*.md 2>/dev/null | tail -5
Note related completed tasks for context. Look for lineage: does completed task relate? Note parent task number if so.
Q1: Can this anchor to a single concrete behavior?
clarifyQ2: Will understanding benefit future work?
fullQ3: Is Path obvious?
fulldirect| Q1 | Q2 | Q3 | Route |
|---|---|---|---|
| Yes | Yes | — | full |
| Yes | No | Yes | direct |
| Yes | No | No | full |
| No | — | — | clarify |
Default bias: full. Workspace files are cheap; missed context is expensive.
Return immediately:
Route: direct
Reason: [one sentence]
If workspace_state.md was loaded: Use cached "Last sequence number" + 1. Still run mkdir -p .ftl/workspace.
Otherwise (fallback):
mkdir -p .ftl/workspace
LAST=$(ls .ftl/workspace/ 2>/dev/null | grep -oE '[0-9]+' | sort -n | tail -1)
NEXT=$((${LAST:-0} + 1))
printf "%03d\n" $NEXT
Format: 3-digit zero-padded (001, 002...).
# Extract keywords from task description and query memory for precedent
source ~/.config/ftl/paths.sh 2>/dev/null && python3 "$FTL_LIB/context_graph.py" query "$TASK_KEYWORDS" --format=inject 2>/dev/null
Query returns precedent block for injection:
## Precedent
Related: [015] auth-refactor, [008] security-audit
Patterns: #pattern/session-token-flow (+2), #pattern/token-lifecycle (+3)
Antipatterns: #antipattern/jwt-localstorage (-2)
Constraints: #constraint/httponly-cookies
If no relevant precedent, leave section as: ## Precedent\nNo relevant prior decisions.
Also check recent workspace files for lineage:
ls -t .ftl/workspace/*_complete*.md 2>/dev/null | head -5
Search for: existing patterns, files to touch, conventions.
Inherit from campaign task if available (planner already discovered).
Otherwise detect:
# Test file co-location
ls ${DELTA_DIR}/*.test.* ${DELTA_DIR}/*.spec.* 2>/dev/null
# Project test scripts
grep -E '"test"|"typecheck"' package.json 2>/dev/null
# Makefile targets
grep -E '^test:|^check:' Makefile 2>/dev/null
If found, add to Anchor. If not, leave Verify field empty (graceful skip).
Get branch:
If session_context.md was loaded: Use cached branch from "### Git State".
Otherwise: git branch --show-current 2>/dev/null
Path: .ftl/workspace/NNN_task-slug_active[_from-NNN].md
# NNN: [Decision Title — frame as choice/question resolved]
## Question
[What decision does this task resolve? Frame as "How should we..." or "What approach for..."]
## Precedent
[Injected from memory query — patterns, antipatterns, related decisions]
## Options Considered
[Filled by Builder/Learner — document alternatives explored and rejected]
## Decision
[Filled by Builder — explicit choice with brief rationale]
## Implementation
Path: [Input] → [Processing] → [Output]
Delta: [file paths or patterns]
Verify: [verification command, if discovered]
Branch: [current branch if not main]
## Thinking Traces
[exploration findings, inherited context]
## Delivered
[filled by Builder]
## Key Findings
[filled by Learner — #pattern/, #constraint/, #decision/, #antipattern/]
Framing guidance: Title should capture the decision, not the task.
Path = data transformation with arrows (under Implementation section):
Good: User request → API endpoint → Database → Response
Bad: Create a configuration system (goal, not transformation)
Delta = minimal scope with file precision:
Vague: modify auth handling (hook can't enforce)
Precise: src/auth/*.ts, tests/auth/*.test.ts (hook enforces)
Question = decision framing (router fills):
Good: How should we persist user sessions securely?
Bad: Add session handling (task, not decision)
If building on prior work: add _from-NNN suffix, inherit parent's Thinking Traces.
Route: [full|direct|clarify]
Workspace: [path if full]
Path: [transformation]
Delta: [scope]
Verify: [command or "none discovered"]
Lineage: [from-NNN or none]
Ready for Build: [Yes|No]
fullUse this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: <example>Context: User is running /hookify command without arguments user: "/hookify" assistant: "I'll analyze the conversation to find behaviors you want to prevent" <commentary>The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.</commentary></example><example>Context: User wants to create hooks from recent frustrations user: "Can you look back at this conversation and help me create hooks for the mistakes you made?" assistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks." <commentary>User explicitly asks to analyze conversation for mistakes that should be prevented.</commentary></example>