Package Exports
- drift-ai
- drift-ai/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (drift-ai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
drift
Track how your code drifts from the plan during AI coding sessions
When you vibe code with AI (Cursor, Copilot, Claude, etc.), the implementation often drifts from the original ticket. drift captures what actually happened and keeps context for the next session.
The Problem
- PO writes PRD → creates Jira tickets
- Developer takes ticket, vibes with AI
- AI changes things — sometimes a lot
- Ticket still says the old plan
- Next task has wrong context
- AI doesn't know what actually happened
The Solution
drift start PROJ-123 # Start session, link to ticket
# ... vibe code with your AI ...
drift sync # AI summarizes what happened, updates CONTEXT.mdInstallation
npm install -g drift-aiSetup
# In your project repo
drift init
# Get free API key from https://console.groq.com
drift config --groq-key gsk_...
# (Optional) Configure Jira
drift config --jira-url https://yourteam.atlassian.net \
--jira-email you@email.com \
--jira-token your-api-tokenUsage
Start a session
drift start # Start without ticket
drift start PROJ-123 # Link to Jira ticket
drift start PROJ-123 -m "Adding auth flow" # With plan descriptionCheck status
drift status # See what's changed since session startEnd session & sync
drift sync # Generate summary, update CONTEXT.md, post to Jira
drift sync --no-push # Skip Jira posting
drift sync -m "Also refactored the utils" # Add notesView history
drift log # Last 5 sessions
drift log -n 10 # Last 10 sessionsCONTEXT.md
After each sync, drift updates CONTEXT.md in your repo:
# Project Context
## Session: 2024-02-03 (PROJ-123)
**What happened:**
Implemented JWT authentication with refresh tokens. Switched from localStorage
to httpOnly cookies for better security.
**Decisions made:**
- Using cookies over localStorage for token storage
- Added rate limiting on auth endpoints (wasn't in spec)
- Skipped "remember me" — needs product decision
**Drift from plan:**
- Original spec said localStorage, we changed to cookies
- Added refresh token rotation (not in original ticket)
**For next session:**
- Auth context lives in /src/auth/
- Token refresh is handled in axios interceptor
- Still need: password reset flowThis file becomes context for your next AI session — paste it or let your AI read it.
Environment Variables
Instead of drift config, you can use environment variables:
export GROQ_API_KEY=gsk_...
export JIRA_URL=https://yourteam.atlassian.net
export JIRA_EMAIL=you@email.com
export JIRA_TOKEN=your-api-tokenHow It Works
drift startsaves the current git SHA- You code with your AI assistant
drift syncgets the git diff since start- Groq (Llama 3.3 70B) analyzes what changed and generates a structured summary
- CONTEXT.md is updated with the session info
- (Optional) Summary is posted as a comment on the Jira ticket
Why Groq?
- 100% free — no credit card needed
- Fast — responses in <1 second
- Good quality — Llama 3.3 70B is excellent for code analysis
- No subscription required — just sign up and get a key
License
MIT