topos_evaluate_code
Score a code snippet for SIMPLE and SECURE quality dimensions via static CFG/CPG analysis. Returns a lattice verdict from SLOP to IDEAL with generator scores.
Instructions
Score a raw code string on the SIMPLE / COMPOSABLE / SECURE quality
lattice (read-only; never writes or runs the code).
Use for a snippet not yet on disk. Only SIMPLE and SECURE are
reachable here (scored from the source's CFG/CPG); COMPOSABLE needs
a module dependency graph, so for it use topos_evaluate_file with
gitnexus_dir, or topos_evaluate_project for a whole tree.
Returns an EvaluationResult: the lattice verdict (SLOP…IDEAL),
per-generator scores, and a next-step agent contract.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Source code to evaluate. | |
| allow | No | One-off acknowledged dangerous-call patterns. | |
| verbose | No | Include raw metrics. | |
| language | No | Language: python, rust, javascript, typescript, cpp, or go. | python |
| preferences | No | Optional generator ranking. |