Capture

How Stoa automatically captures decisions from AI coding tools and file changes, without any manual documentation.

Capture is the input layer of Stoa. It automatically monitors your project, watches for AI coding sessions, and extracts decisions without any manual documentation effort.

How Capture Works

The system operates through three integrated components that work together to build a complete provenance record.

1. File Watcher

The daemon monitors your project directory for all file changes in real time:

Change TypeWhat It Detects
CreateNew files added to the project
ModifyExisting files changed
DeleteFiles removed
RenameFiles moved (detected via content hash matching)

Changes are detected via filesystem events (fsnotify) with a 30-second reconciliation loop as a safety net. All changes are written to the journal as the system of record.

2. Session Parser

The session parser extracts structured data from AI coding tool sessions. For Claude Code (the primary integration), it monitors:

~/.claude/projects/{project-path}/*.jsonl

From each session, it extracts:

  • User prompts (what you asked the AI to do)
  • Agent replies (what the AI responded)
  • File operations (Write, Edit, MultiEdit, Read, and 15+ other tool types)
  • Content hashes for precise change matching

The parser normalizes all paths relative to the project root and handles tool-specific formats across all supported AI coding tools.

3. Correlation Engine

The correlation engine links filesystem changes to the AI exchanges that created them. It matches on:

  • File paths: which files the exchange operated on
  • Content hashes: precise match between session content and actual file content
  • Timing: when the change occurred relative to the exchange
  • Operation type: create, modify, delete

This creates provenance, the ability to trace any line of code back to the conversation that produced it.

Decision Enrichment

Once a filesystem change correlates to an AI exchange, Stoa uses an LLM to generate structured enrichment:

FieldDescription
TitleShort description of the decision
PurposeWhy this change was made
ApproachHow the change was implemented
ImpactWhat this change affects
TagsCategorization labels
PhaseDevelopment phase (design, implementation, etc.)
ComplexityEstimated complexity level

Enrichment runs automatically in the background. You can configure the LLM model with intent configure llm.

Session Enrichment

Higher-level summaries are generated for entire coding sessions, providing:

  • Scope: what the session covered
  • Key decisions: the most important choices made
  • Challenges: problems encountered and how they were solved
  • Technologies: tools and frameworks involved
  • Outcomes: what was accomplished

Session enrichments are useful for team updates, handoffs, and understanding what happened in a session at a glance.

What Gets Captured

SourceContent
Claude CodeFull sessions with tool calls, file operations, prompts, and replies
Cursor CLIChat and Composer sessions with file operations
Codex CLISession capture with file operations and context
Gemini CLISession capture with file operations and context
FilesystemAll create, modify, delete, and rename operations with content hashes

Offline Support

The catchup system ensures no changes are lost, even when the daemon isn't running:

  1. On startup, the daemon creates a baseline snapshot of all tracked files
  2. It compares the current state against the last known state
  3. Any changes that occurred while offline are detected and recorded
  4. Rename detection works even across offline periods via content hash matching

Configuration

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

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

Use .intentignore (same syntax as .gitignore) to exclude paths from tracking:

# Dependencies
node_modules/
vendor/

# Build output
dist/
build/

# Large files
*.zip
*.tar.gz

What's Next