# Analysis Quick Reference
Version: 1.1.1
Last Updated: January 23, 2026
Commands
- Semantics trace:
branchpy analyze --emit-semantics - CFG DOT:
branchpy analyze <project> --debug-cfg cfg.dot - Flow metrics:
branchpy semantics2 flow --project <path> [--json] [--label <name>] - Clear flow cache:
clear_flow_cache()(Python API) - PFI:
branchpy pfi -p <project> [--output FILE] [--format full|compact|by-stat] [--export-dot FILE] [--show-warnings] [--show-dead] [--complexity-threshold N] [--stats NAMES] - AI provider call (analysis):
ProviderManager.get_provider(...).chat(ChatRequest(...))
Key Artifacts
- Semantics config:
.branchpy/semantics/semantics.yaml(+ backups under.backup/) - CFG visualization:
cfg.dot(user-specified; render with Graphviz) - PFI exports:
.branchpy/cache/function_index.json(default) or user path; call graph DOT via--export-dot - Governance (optional):
~/.branchpy/pfi_governance.jsonl
Metrics & Warnings
- Flow: path count, cyclomatic complexity, branching factor, unreachable labels/statements, dynamic jump unresolved, semantics miss.
- PFI: signature drift, side-effect drift, dead/shadowed/duplicate functions, complexity warnings, naming convention warnings.
- SAE: cosmetic vs mechanical classification; variable type/op inference per path/label.
Defaults
- CFG entry:
startlabel preferred. - Semantics schema: version
1.0; placeholders must be declared. - PFI complexity threshold: 15.
- Flow caching: enabled by default.
Safety
- Analysis is offline/static; no telemetry uploads.
- AI calls require explicit user/config initiation;
safe_mode=Truerestricts to local providers.