Use when working on complex multi-step tasks to maintain goal coherence — auto-detects goals from conversation, tracks state transitions, maintains parent-child relationships, and prevents goal drift
Working on multi-step tasks, branching conversations, or sessions where the user's intent could drift or fragment. Use this to maintain coherence across complex work.
Every user message potentially signals a goal. Detect them through two channels:
Explicit goals — Direct requests with clear deliverables:
Implicit goals — Intent that emerges from context:
Goals form a tree. Every complex goal decomposes into sub-goals with dependencies.
## Active Goals
### [G1] Build user authentication system
- **State:** ACTIVE
- **Created:** 2026-04-07
- **Summary:** Implement JWT-based auth with refresh tokens
#### [G1.1] Design auth middleware
- **State:** COMPLETED
- **Parent:** G1
- **Completed:** 2026-04-07
#### [G1.2] Implement token refresh flow
- **State:** ACTIVE
- **Parent:** G1
- **Depends on:** G1.1
#### [G1.3] Write auth integration tests
- **State:** BLOCKED
- **Parent:** G1
- **Blocked by:** G1.2
Goals move through four states with strict transition rules:
ACTIVE ──────► COMPLETED
│ ▲
│ │ (unblock)
▼ │
BLOCKED ───────────┘
│
│ (user abandons or scope changes)
▼
ABANDONED
ACTIVE — Currently being worked on or ready to be worked on.
BLOCKED — Cannot proceed until a dependency is resolved.
Blocked by: [specific thing]COMPLETED — Deliverable is done and verified.
ABANDONED — Intentionally dropped.
Abandoned: [reason]When a new user request arrives, check if it relates to an existing active goal before creating a new one.
Apply two methods and take the higher score:
Word overlap — Compare the request words against each active goal's name:
Sequence similarity — Compare the full strings character-by-character:
Threshold: If the best score across all active goals is >= 0.4, treat the request as related to that goal. Below 0.4, create a new goal.
Goals that haven't been progressed need attention.
When stale goals are detected:
Track goals in a structured comment block or in the session's working memory. Use this markdown format:
## Goal Tracker
### Active
- **[G1] Build REST API for user management** (created 2026-04-07)
- [G1.1] Design endpoint schema — COMPLETED
- [G1.2] Implement CRUD handlers — ACTIVE
- [G1.3] Write integration tests — BLOCKED by G1.2
### Completed
- **[G0] Set up project scaffold** (completed 2026-04-07)
### Abandoned
- (none)
### Notes
- G1 linked from user request "let's build the user API" (fuzzy match: 0.72)
Use goal tracking to prevent drift: