tsa-constraintslisted
Install: claude install-skill aimasteracc/tree-sitter-analyzer
# tsa-constraints — Inhibitory edges as code
> Bio-analogy: **inhibitory synapses** — declared "X must NOT call Y" rules
> that fire UNSAFE verdicts when violated. Rules live in
> `architectural-constraints.yml` at repo root, are evaluated against the
> persisted call graph, and persist violations in SQLite for fast re-reads.
## When to use
| Goal | Action |
|--------------------------------------------|---------------------------------------|
| List current rules | Read `architectural-constraints.yml` |
| Check repo against rules | `check_constraints` (no args) |
| Pre-edit gate (includes rule check) | `safe_to_edit` (auto) |
| Add a new rule | Edit YAML + re-run `check_constraints`|
| Filter violations by severity | `check_constraints(severity_min="error")` |
| Filter by path | `check_constraints(path_filter="mcp/**")` |
## Procedure
### One-shot audit
```
check_constraints()
```
Returns:
```yaml
success: true
verdict: SAFE | CAUTION | UNSAFE
violations: [
{rule_id, caller_file, caller_line, callee_name, callee_file, severity, reason}
]
rule_count: <int>
evaluated_edge_count: <int>
```
Verdict cascade:
- `UNSAFE` → any error-severity violation
- `CAUTION` → any warn-severity violation
- `SAFE` → none
### Adding a new rule
1. Open `architectural-constrain