Skip to content

Instantly share code, notes, and snippets.

@johnlindquist
Created December 12, 2025 18:27
Show Gist options
  • Select an option

  • Save johnlindquist/b1be753f8259dba49ec0d9b54e0cfde6 to your computer and use it in GitHub Desktop.

Select an option

Save johnlindquist/b1be753f8259dba49ec0d9b54e0cfde6 to your computer and use it in GitHub Desktop.
UserPromptSubmit Hook Reminder Schedule

UserPromptSubmit Hook Reminder Schedule

Quick Summary

After 3 UserSubmitPrompts, the system shows reminders every 3 prompts, cycling through 5 different reminder types. Each reminder is combined with a Tools Refresh notification.

Complete Schedule (Prompts 1-30)

Prompt Type Reminder Index Content
1-2 (no reminder)
3 tools+reminder 0 Skills Refresh + Context-drift check
4-5 (no reminder)
6 tools+reminder 1 Skills Refresh + Protocol enforcer
7-8 (no reminder)
9 tools+reminder 2 Skills Refresh + Goal alignment
10-11 (no reminder)
12 tools+reminder 3 Skills Refresh + Workspace hygiene
13-14 (no reminder)
15 tools+reminder 4 Skills Refresh + Root-cause check
16-17 (no reminder)
18 tools+reminder 0 Skills Refresh + Context-drift check (cycles)
19-20 (no reminder)
21 tools+reminder 1 Skills Refresh + Protocol enforcer
22-23 (no reminder)
24 tools+reminder 2 Skills Refresh + Goal alignment
25-26 (no reminder)
27 tools+reminder 3 Skills Refresh + Workspace hygiene
28-29 (no reminder)
30 tools+reminder 4 Skills Refresh + Root-cause check

Reminder Rotation (5 reminders cycling)

Index 0: Context-drift

Session Check-in: We are N turns deep.

  1. Run bd ready to verify we are still on the critical path.
  2. If the current task is done, use bd close and consider /compact.
  3. Do not start new major features without a fresh session.

Index 1: Protocol-enforcer

Protocol Enforcer:

  1. Have you checked logs recently? (find . -name "*.log")
  2. Are all gh commands using single-line format?
  3. Are we creating temp files in /tmp as required?

Index 2: Goal-alignment

Goal Alignment: You have used N tools this session.

  • Are we closer to the user's original request?
  • If stuck, prefer Skill('investigate') over brute force.

Index 3: Workspace-hygiene

Workspace Hygiene:

  1. Run git status - are there uncommitted changes?
  2. Check tsconfig.json for new errors.
  3. Ensure no regressions in recent changes.

Index 4: Root-cause

Root Cause Check: "The symptom is not the sickness."

  • Are you fixing a symptom or the root cause?
  • Verify your assumptions with data/logs before editing code.

Skills Refresh (Always shown with reminders)

Appears on every 3rd prompt (prompts 3, 6, 9, 12, 15, 18, 21, 24, 27, 30...):

Load skills before using them: Skill("name")

Common skills:
- beads - Task tracking
- gemini - AI research
- ubs - Bug scanning
- github - GitHub ops

Do not guess CLI commands. Load the skill first.

Configuration

From hooks/src/reminder-manager.ts:

const DEFAULT_CONFIG: ReminderConfig = {
  frequency: 3,           // Show reminder every 3 prompts
  startAfter: 3,          // Start after 3 prompts
  enabled: true,          // Reminders enabled
  toolsRefreshFrequency: 3, // Refresh tools every 3 prompts
}

Implementation Details

  • Rotating reminders: 5 different reminders cycle continuously
  • Tools refresh: Triggered independently, combined with rotating reminder when both occur
  • Combined type: When both show together, the type is "tools+reminder"
  • Cycle continues: After reminder 4 (root-cause), cycles back to reminder 0 (context)

Test Status

❌ Current tests are outdated - they expect:

  • Reminder type to be individual types ("context", "protocol", etc.)
  • Only 5 reminders total (missing tools-refresh)
  • enabled=false to prevent all reminders (but tools refresh is independent)

✓ Actual behavior matches the implementation exactly - reminders show as designed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment