-
Notifications
You must be signed in to change notification settings - Fork 39
First Context Generation
Manoj Mallick edited this page May 11, 2026
·
1 revision
cd /path/to/your/project
sigmap ask "explain the auth flow"This generates a compact signature map and retrieves files related to authentication.
cd ~/path/to/my-projectsigmapThis creates .context/ directory with:
-
context.md— Full signature map -
query-context.md— Current query results -
sig-index.json— Index of all signatures
What it does:
- Scans all source files
- Extracts code signatures (function names, classes, etc.)
- Ranks files by relevance
First run takes: 5-30 seconds (depending on project size)
sigmap ask "how does the payment flow work?"Output shows:
- Top 10 ranked files
- Full context in
.context/query-context.md - Confidence scores
sigmap validate --query "payment flow"Checks if essential files are in the context:
- ✓ PASS — All files found
- ⚠ PARTIAL — Some files missing
- ✗ FAIL — Critical files not retrieved
sigmap judge --response answer.txt --context .context/query-context.mdScores how grounded your AI answer is (0-100):
- 80-100 — Highly grounded, references code correctly
- 60-80 — Grounded, mostly correct
- 40-60 — Partial, some gaps
- 0-40 — Not grounded, vague references
Cause: Empty project or hidden source directory
Fix:
sigmap --init
# Manually edit gen-context.config.json to specify srcDirs
sigmapCause: Including test files, node_modules
Fix: Create .contextignore:
node_modules/
dist/
.next/
__pycache__/
*.test.js
*.spec.ts
Cause: Few signatures extracted (small project)
Fix: Run on larger projects or check language support:
sigmap --diagnose-extractorsCreate gen-context.config.json in project root:
{
"srcDirs": ["src", "app", "lib"],
"exclude": ["node_modules", "dist", "tests"],
"strategy": "full",
"maxTokens": 6000
}Key options:
-
srcDirs— Directories to scan -
exclude— Patterns to skip -
strategy—full,per-module, orhot-cold -
maxTokens— Budget limit
See Configuration Guide for all options.