Intent Capture

Record decisions from AI agents and IDEs automatically.

Intent Capture is the input layer. It monitors your project, watches for AI coding sessions, and automatically extracts decisions without requiring manual documentation.

How Capture Works

Capture operates through three integrated systems:

┌──────────────────┐     ┌──────────────────┐     ┌──────────────────┐
│   File Watcher   │     │  Session Parser  │     │    Correlation   │
│  (filesystem)    │────▶│  (AI sessions)   │────▶│    Engine        │
└──────────────────┘     └──────────────────┘     └──────────────────┘
         │                        │                        │
         └────────────────────────┴────────────────────────┘

                         ┌──────────────────┐
                         │  Decision Store  │
                         │   (journal.db)   │
                         └──────────────────┘

1. File Watcher

The Intent daemon monitors your project directory for all file changes:

  • Create — New files added
  • Modify — Existing files changed
  • Delete — Files removed
  • Rename — Files moved (detected via content hash matching)

Changes are detected in real-time via filesystem events, with a 30-second reconciliation loop to catch any missed events. All changes are written to the journal as the system of record.

2. Session Parser

Intent extracts structured data from AI coding tool sessions. For Claude Code, it monitors ~/.claude/projects/{project-path}/*.jsonl and extracts:

  • User prompts — What you asked the agent to do
  • Agent replies — The reasoning and response
  • File operations — Every Write, Edit, MultiEdit, Read, and other tool calls
  • Content hashes — For precise matching to filesystem changes

The parser understands 15+ file-editing tools and normalizes all paths to your project root.

3. Correlation Engine

The correlation engine links filesystem changes to the AI exchanges that created them. It matches based on file paths, content hashes, timing, and operation type to determine which conversation produced each change.

This creates provenance—you can trace any line of code back to the conversation that created it.

Decision Enrichment

Once a filesystem change is correlated to an AI exchange, Intent generates decision enrichment using an LLM. Each enrichment includes:

{
  "title": "Implement JWT authentication middleware",
  "intent": "Add secure token-based authentication to protect API routes",
  "approach": "Used RS256 signing with refresh token rotation",
  "impact": "All /api routes now require valid JWT in Authorization header",
  "tags": ["authentication", "jwt", "security", "middleware"],
  "phase": "Authentication System",
  "complexity": "medium"
}

This transforms raw conversations into structured, searchable decision artifacts.

Session Enrichment

When exchanges in coding sessions progress, Intent generates a session enrichment—a higher-level summary of the entire session:

{
  "scope": "Implemented complete JWT auth system with refresh tokens",
  "keyDecisions": [
    "Chose RS256 over HS256 for key rotation support",
    "Added 15-minute access token expiry with 7-day refresh"
  ],
  "challenges": "Handling token expiration edge cases during active requests",
  "technologies": ["Go", "JWT", "bcrypt", "middleware"],
  "outcomes": "Secure authentication with automatic token refresh"
}

Session enrichments provide the "executive summary" of a coding session—useful for team updates, handoffs, and historical review.

Provenance Mapping

Provenance is the link between code and conversation. When Intent correlates a file change to an exchange, it stores provenance marks in the CRDT:

┌─────────────────────────────────────────────────────────────┐
│  src/auth/middleware.ts                                     │
├─────────────────────────────────────────────────────────────┤
│  Lines 1-15   ← Exchange ex_0_abc123: "Add JWT validation"  │
│  Lines 16-42  ← Exchange ex_0_def456: "Handle token refresh"│
│  Lines 43-60  ← Exchange ex_0_ghi789: "Add error responses" │
└─────────────────────────────────────────────────────────────┘

This enables bi-directional navigation:

  • Code → Conversation: Click any line to see the exchange that created it
  • Conversation → Code: Click any exchange to highlight the lines it produced

Offline Support

Intent handles offline work gracefully. The catchup system creates a baseline snapshot when the daemon starts. If the daemon stops (laptop closed, restart, etc.), on restart it:

  1. Compares current filesystem to the baseline snapshot
  2. Detects all changes that occurred while offline
  3. Identifies renames via content-hash matching
  4. Writes all changes to the journal with filesystem-catchup source

No data is lost, even if you work offline for days.

What Gets Captured

SourceWhat's Recorded
Claude CodeFull conversation sessions with tool calls, file operations, user prompts and agent replies
CursorChat and Composer sessions with file operations and conversation context
Codex CLISession capture with file operations and conversation context
Gemini CLISession capture with file operations and conversation context
FilesystemAll file create/modify/delete/rename operations with content hashes

Configuration

Capture behavior is configured in .intent/config.json:

{
  "capture": {
    "watchPaths": ["."],
    "ignorePaths": ["node_modules", ".git", "dist"],
    "sessionIdleTimeout": 300
  }
}

You can also use .intentignore (same syntax as .gitignore) to exclude paths from monitoring.

Next Steps