Code Context

Link code to tasks with automatic analysis. All local, no LLM required.

Overview

Code context creates a bridge between your task management and actual code. It stores which files each task touches, tracks their status, and provides coverage metrics.

Derived data lives in .board/context/<board>.json — gitignored and regenerable.

Quick Start

# Scan your codebase and link files to cards
barkcli context scan

# Check coverage
barkcli context status

# Search for code
barkcli code "authentication"

barkcli code <query>

Search symbols and files, then see which cards are linked.

barkcli code "login"              # find login-related code
barkcli code "UserService"        # find a class
barkcli code "src/api"            # find files in a path

barkcli context scan

Automatically map cards to code files using fuzzy title matching.

barkcli context scan

# How it works:
# 1. Reads all card titles
# 2. Scans your codebase for files and symbols
# 3. Matches titles to code using fuzzy scoring
# 4. Updates the context with matched files

barkcli context link

Manually pin a file or symbol to a card.

barkcli context link jwt-login src/auth/login.ts
barkcli context link jwt-login UserService

barkcli context status

Show coverage and staleness of your code context.

barkcli context status

# Output:
# Board: main
# Coverage: 67% (12/18 files linked)
# Stale files: 3 (not updated in >7 days)

barkcli context sync

Git-aware refresh of your context. Updates last commit info and dirty state.

barkcli context sync

# This command:
# - Checks which files have been modified since last commit
# - Updates the last_commit field for each file
# - Marks files as dirty or clean

barkcli context autosync

Automatically run context sync after each git commit.

barkcli context autosync on       # enable
barkcli context autosync off      # disable

Supported Languages

Full Symbol Extraction

JavaScript, TypeScript, Python, Rust, Go

File-Level Matching

All other languages (path-based matching)

Privacy

All code context analysis runs locally. No code is sent to external services unless you explicitly configure an AI provider.