vm-deterministic-summarizer
Skill detail with category, linked agents, and source metadata.
vm-deterministic-summarizer
Deterministic fallback script that generates template-based file summaries from signatures.json and file-metrics.json for any file that AI did not reach. Guarantees zero hollow entries in file-analysis.json. Marks generated summaries with summary_source=deterministic so downstream agents can distinguish AI vs template summaries.
Source: .github/skills/code-generation/vm-deterministic-summarizer/SKILL.md
Used By Agents
Preview
View source preview (first 3000 chars)
# vm-deterministic-summarizer
## When to Use This Skill
- Phase QA-RETRY fallback: after AI retry attempts, fill remaining hollow entries
- Any time file-analysis.json has entries with empty summaries that need a baseline
- When downstream agents need non-empty file descriptions to function
## Unitary Function
**ONE responsibility:** For every file-analysis.json entry with an empty summary, generate a template-based summary from structural data and mark it as deterministic.
## NOT RESPONSIBLE FOR
- AI-quality summaries (that is 3b File Summarizer)
- Modifying source code
- Any analysis beyond what is already in intermediate JSONs
## Template
```
{role_description} in the {cluster} feature cluster. Contains {class_count} class(es)
({class_names}) and {function_count} function(s). Imports {internal_import_count} internal
module(s) and {external_import_count} external package(s). {loc} lines of code with
cyclomatic complexity {cc}. {framework_note}
```
Where:
- `role_description` is derived from role_tags: "Controller/container file", "Service file", "Data model file", etc.
- `framework_note` is derived from external imports: "Uses React, Redux." or "No framework-specific imports."
## Script
See `scripts/deterministic_summarizer.py`. Cross-platform Python, no external dependencies.
## Input
```json
{
"output_dir": "docs/codebase-analysis",
"checklist_path": "docs/codebase-analysis/checklist.json"
}
```
## Output
Updates in-place:
- `file-analysis.json`: sets `summary` and `summary_source: "deterministic"` for hollow entries
- `checklist.json`: sets `file_analysis: "completed-deterministic"` for filled entries