Runs before first user prompt. Total execution: ~50-100ms
[ProWorkflow] Loaded 3 learnings from database: - [Testing] Always run tests before committing - [TypeScript] Check for any types in strict mode - [Git] Use conventional commit format[ProWorkflow] Previous session: 2026-03-07 (12 edits, 2 corrections)[ProWorkflow] 2 worktrees available for parallel work[ProWorkflow] Ready. Use /wrap-up before ending, /learn to capture corrections.
Calculate adaptive threshold based on correction rate
Check if current edit count matches checkpoint (5, 10, 20, etc.)
Output reminder if checkpoint reached
4
Example Output
[ProWorkflow] 5 edits — checkpoint for review[ProWorkflow] Run: git diff --stat | to see changes[ProWorkflow] (adaptive: tighter gates due to recent correction rate)
[ProWorkflow] Issues in src/utils.ts: 42: console.log found 58: TODO found 91: Possible hardcoded secret[ProWorkflow] Consider: [LEARN] to remember patterns
Extract intent from first user prompt (saved to temp file)
On subsequent prompts:
Increment editsSinceLastTouch counter
Extract keywords from original intent
Extract keywords from current prompt
Calculate relevance (keyword overlap)
If 6+ edits AND relevance < 20%: drift alert
3
Example Output
[ProWorkflow] Drift check: 8 edits since original goal[ProWorkflow] Original intent: "Add user authentication with JWT tokens"[ProWorkflow] Current work seems unrelated — refocusing or intentional tangent?
[ProWorkflow] Session saved to database: - Edits: 23 - Corrections: 3 - Prompts: 15[ProWorkflow] WARNING: 7 uncommitted changes![ProWorkflow] Session ending...[ProWorkflow] Did you run /wrap-up? Learnings captured?[ProWorkflow] Use /search <keyword> to find past learnings