prompt-bridge

Session handoff generation and context transfer

prompt-bridge

Seamless context handoff between Claude Code sessions

Prompt-bridge generates comprehensive handoff documents that capture the complete session context—code state, blockers, decisions, next steps—enabling the next session to pick up exactly where you left off without loss of momentum.


What It Does

At the end of a work session, prompt-bridge:

  1. Scans recent changes - Analyzes git diff, modified files
  2. Extracts decisions - Captures what was decided and why
  3. Summarizes progress - What was accomplished this session
  4. Lists blockers - What's preventing further progress
  5. Generates handoff - Creates comprehensive context document

Think of prompt-bridge as your session note-taker, creating the perfect briefing for whoever continues the work (probably you tomorrow).


Key Capabilities

Session Analysis

  • Code Diff Analysis: Understand what code changed
  • Commit Message Parsing: Extract reasoning from git history
  • Blocker Extraction: Pull incomplete tasks from activity logs
  • Decision Tracking: Note key architectural choices made

Handoff Document Generation

  • Markdown Format: Clean, readable handoff documentation
  • Code Snippets: Include relevant code sections
  • File Organization: Map which files were modified and why
  • Related Context: Link to relevant documentation

Context Preservation

  • Git Integration: Record current branch, last commit
  • File History: List recently modified files with timestamps
  • Terminal History: Capture recent command patterns
  • Error Logs: Include recent errors and resolutions

Smart Recommendations

  • Next Steps: Suggest logical next work items
  • Testing: Recommend what to test before continuing
  • Documentation: Flag docs that need updating
  • Knowledge Transfer: Note complex patterns for future reference

Accessing prompt-bridge

Command Line

# Generate handoff for current session
/cya

# Or manually:
"C:/Users/felix/Desktop/F3L1X Tech/active/prompt-bridge/venv/Scripts/python.exe" \
  "C:/Users/felix/Desktop/F3L1X Tech/active/prompt-bridge/manage.py" \
  generate-handoff --auto-save

Web Dashboard

URL: http://127.0.0.1:8061

The prompt-bridge dashboard shows:
- Recent handoff documents
- Session summaries
- Code change history
- Blocker trends over time

Handoff API

Endpoint Purpose Method
/api/handoff/generate/ Create new handoff POST
/api/handoff/recent/ List recent handoffs GET
/api/handoff/<id>/ Retrieve handoff GET
/api/handoff/<id>/html/ Render handoff as HTML GET

Common Use Cases

Use Case 1: End of Session Handoff

Goal: Create comprehensive note for next session

/cya

Prompt-bridge generates:

# Session Handoff - 2026-02-17 (Session 42)

## What Was Accomplished
- Implemented email confirmation flow
- Refactored user authentication models
- Added rate limiting to login endpoint

## Files Modified
- auth/forms.py (40 lines added)
- auth/views.py (60 lines changed)
- auth/models.py (20 lines added)

## What's Working
✅ Email validation
✅ Confirmation token generation
✅ Rate limiting (5 attempts/hour)

## Current Blockers
- [ ] SMTP credentials for production email sending (waiting for Felix)
- [ ] Rate limiting not enforced on API endpoints (separate from web forms)
- [ ] Email template doesn't support custom headers

## Code Snippets
[Relevant code sections included]

## Testing Needed
- [ ] Test email sends with production SMTP
- [ ] Test rate limit across distributed cache
- [ ] Test token expiration edge cases

## Next Steps
1. Provide SMTP credentials
2. Test rate limiting with API endpoints
3. Add email header customization
4. Deploy to staging environment

## Related Documentation
- [Authentication Guide](/docs/guides/authentication/)
- [Email Integration](/docs/guides/email/)
- [Rate Limiting Patterns](/docs/concepts/rate-limiting/)

## Questions/Notes
- Consider using Celery for async email sending
- Rate limiter may need Redis cluster for production

Use Case 2: Team Handoff

Goal: Transfer work to teammate with full context

  1. Generate handoff with /cya
  2. Share handoff document with teammate
  3. They read handoff document for full context
  4. They continue work without ramp-up time
  5. Minimal questions needed

Use Case 3: Preserve Context After Break

Goal: Remember everything after taking time off

  1. End session with /cya (creates handoff)
  2. Take 1 week break
  3. Return and open handoff document
  4. All context preserved: what was done, what's blocked, next steps
  5. Resume work immediately with full context

Use Case 4: Incident Post-Mortem

Goal: Document what happened during outage/emergency

Prompt-bridge captures:
- Timeline of changes
- What code caused issue
- What was tried to fix
- Final resolution
- Lessons learned

Becomes input to doc-u-me post-mortem documentation.


Important Notes

Handoff Document Location

Handoff documents are saved to:
- Active Realm Directory: active/{realm}/HANDOFF-{date}.md
- Also linked from: ACTIVITY_LOG.md for easy reference
- Not in: Random locations, old sessions directories

Always use /cya command - it handles proper location automatically.

What Gets Captured

Handoff includes:
- Git diff and commit history
- Activity log analysis
- File modification summary
- Code snippets for changed functions
- Blocker extraction
- Testing recommendations

Handoff does NOT include:
- Secrets or credentials
- Large binary files
- Full original code (just diffs)
- IDE-specific settings

Blocker Preservation

If you have unchecked "- [ ]" items in your ACTIVITY_LOG.md when /cya runs:
1. Handoff document captures all blockers
2. Blockers persist in ACTIVITY_LOG.md
3. Next session's /hello surfaces same blockers
4. Creates feedback loop preventing loss of work


Troubleshooting

Handoff generation fails

Symptom: /cya command errors
Fix: Ensure git repository is clean (commit or stash changes first)

Handoff is missing important context

Symptom: Generated handoff doesn't include critical information
Fix: Add context to ACTIVITY_LOG.md before running /cya

Can't find previous handoff document

Symptom: Handoff was created but you can't locate it
Fix: Check active/{realm}/HANDOFF-*.md files, or search with doc-u-me

Handoff contains sensitive information

Symptom: Credentials or secrets appear in handoff
Fix: Those shouldn't be in code, move to .env files and regenerate handoff


  • doc-u-me - Stores and indexes handoff documents for search
  • mr-greet - Uses handoff context to brief next session
  • pipeline-go - Defines handoff format standard
  • All active realms - Generate handoffs at end of session

Further Reading