Phase 02c: Code Resolution (Tree-sitter)
Pre-resolves property definitions to concrete locations in the source code, using the Tree-sitter MCP.
Prerequisites
outputs/TARGET_INFO.jsonis required, containing the target repository and commit hash.outputs/BUG_BOUNTY_SCOPE.json(inherited from Phase 01e).
Input
- The output of Phase 01e (
outputs/01e_PARTIAL_*.json). outputs/01b_SUBGRAPH_INDEX.json, built from the Phase 01b output.- The target codebase.
Processing
- Build the subgraph index: Indexes spec function names and state transitions from 01b partials.
- Tree-sitter symbol analysis: Retrieves functions and structs via
mcp__tree_sitter__get_symbols. - Code location resolution: Maps each property's entry point to a file and line range.
- Severity gate: Drops items at the Informational level.
Output
outputs/02c_PARTIAL_*.json
{
"property_id": "PROP-001",
"type": "Invariant",
"description": "Authentication state must be verified before accessing protected resources",
"code_scope": {
"file": "src/auth.rs",
"line_range": [42, 68],
"symbol": "verify_auth",
"language": "rust"
},
"severity": "HIGH"
}
code_scope: the concrete code location resolved by Tree-sitter.severity: the severity classification fromBUG_BOUNTY_SCOPE.json.
This pre-resolution reduces token consumption in Phase 03 by 40-60%.