prescribe_frankability_fixes
Generate structured prescriptions for frank-audit findings that require manual fixes, including source context, related files, and proposed edit ops.
Instructions
Generate LLM-ready prescriptions for frank-audit findings that can't be auto-fixed.
Each prescription contains:
finding (rule, file, line, refusal reason)
sourceContext (~30 lines around the finding)
relatedFiles (other places that mention the same symbol)
proposedOps — array of edit ops the rule's helper logic produced (e.g. FA304 already mapped 36px → 'C2' from the project's spacing scale; FA301 already matched the closest palette token). The agent can submit these verbatim to apply_frankability_edit_ops, or modify before submitting.
explanation (the rule's docs)
safetyCheck (verify command run after apply)
Workflow for the agent:
Call this tool to get prescriptions.
Inspect each
proposedOpsarray. Either submit verbatim or modify. For findings with no proposedOps (structural refactors like FA2xx multifile-helpers, FA5xx DOM bans), construct your own ops from the 12 strict op kinds: removeImport | moveFile | addToIndexFile | addToGlobalScope | removeTopLevelDecl | addElementScope | replaceTokenValue | renameObjectKey | removeObjectKey | setObjectProperty | addDesignToken | skipCall apply_frankability_edit_ops(symbols_dir, ops) — frank-audit validates every op, snapshots, applies, runs verify, rolls back on regression. Failed ops return structured details (E_OLDVALUE_NOT_FOUND with actualLine, E_KEY_NOT_FOUND with availableKeys, etc.) so you can retry intelligently.
Repeat until prescriptions are exhausted or no progress.
Args: symbols_dir: Absolute path to the symbols/ directory.
Returns: JSON with schema version, opId, list of prescriptions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbols_dir | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |