disclose

Context assembly for AI age

Don't flood your context window. Retrieve exactly the learnings and documentation you need within a strict token budget.

$ disclose learnings --query "auth" --domains security --min-confidence 0.7
Searching 42 learnings...
Results: 5
Time: 15ms
Max Confidence: 0.92
## JWT token validation pattern
Type: pattern | Confidence: 0.92 | Status: active
Always validate JWT tokens on server side...

Smart Context Management

Retrieve, bundle, and assemble context for AI workflows

🧠

Learning Retrieval

FTS5 full-text search with advanced filtering by domains, types, confidence, and status. Multiple output formats (Markdown, JSON) and sort options.

💰

Token Budgeting

Specify a max token count. Disclose prioritizes most valuable context to fit your budget with smart truncation.

📦

Context Bundling

Pack documentation, learnings, and file snippets into a single optimized context package with keyword-based slicing.

🎯

Session Context

Generate learning context for LLM session start injection with confidence-recency and relevance-based ranking strategies.

🔍

File Location

Intelligent file discovery across context, history, and skills domains. Search by query with token-budgeted ranking.

📊

Index Management

Ensure catalog indexes exist with ensure-index. Build indexes for specific domains with custom paths and validation.

Core Commands

Complete command reference for context management

Learning Retrieval
$ disclose learnings --query "error handling"
Search all learnings with FTS5 full-text search
$ disclose learnings --query "bun testing" --domains bun,typescript --min-confidence 0.7 --limit 10
Filter by domains and confidence with result limit
$ disclose learnings --types pattern,gotcha --sort-by confidence --format json
Filter by learning types, sort by confidence, JSON output
Session Context
$ disclose session-context
Default session context (800 tokens, confidence 0.7+)
$ disclose session-context --token-budget 1200 --domains typescript,react --min-confidence 0.8
Custom token budget and domain filtering
$ disclose session-context --types pattern,gotcha --strategy confidence_recency --format json
Focus on specific learning types with ranking strategy
Context Bundling
$ disclose pack --query "auth implementation" --scope history --token-budget 2000
Create context pack from query with history scope
$ disclose pack --query "database schema" --include-history --history-limit 5 --max-files 8
Include recent history entries in bundle
$ disclose pack --query "API design" --scope all --token-budget 3000 --out custom-bundle.md
Multi-domain search with custom output path
File Location
$ disclose locate --query "error handling patterns" --scope all --max-files 10
Locate relevant files across all domains
$ disclose locate --query "SQL queries" --scope context --token-budget 1500
Search specific domain with token budget
$ disclose locate --query "configuration" --no-index-build
Skip index building for faster results
Index Management
$ disclose ensure-index --type history
Ensure catalog index exists for history domain
$ disclose index --type context --force
Rebuild index for context domain
$ disclose index --type history --input-root /path/to/history --output-index /path/to/index
Build index with custom paths

Advanced Filtering

Precise control over learning retrieval

🏷️

Domains Filter

--domains bun,typescript,security

Filter by knowledge domains for targeted retrieval

📝

Types Filter

--types pattern,problem-solution,insight

Select specific learning types (pattern, mistake, insight)

📊

Confidence Filter

--min-confidence 0.8

Retrieve only high-confidence learnings

📅

Status Filter

--status active,pending_review

Filter by learning status (active, deprecated, flagged)

🔄

Sort Options

--sort-by confidence --sort-order desc

Sort by relevance, date, or confidence (asc/desc)

📊

Limit Results

--limit 20

Control maximum number of results returned

Installation

📦

Bun Package

bun install -g @fwdslsh/disclose

Integration with Hyphn Tools

# Capture a learning
inscribe learning add \
  --type pattern \
  --summary "Bun native APIs for performance" \
  --domains "bun,typescript"

# Search learnings
disclose learnings --query "bun performance" --domains bun

# Generate session context
disclose session-context --token-budget 800 --min-confidence 0.7