Scan codebase for golden principle deviations. Report only — no code changes.
From entropy-patrolnpx claudepluginhub app-vitals/marketplace --plugin entropy-patrolThis skill uses the workspace's default tool permissions.
golden-principles.yamlreferences/customization.mdreferences/quality-log-schema.mdreferences/schema.mdScan the codebase for golden principle violations and write a structured report. This skill makes no code changes — it reads and reports only. Use /entropy-fix to act on the findings.
Before starting, check if any flags were passed:
--init — copy the default golden principles config to the project and exit (no scan)--summary — print category counts to stdout; skip writing entropy-report.md or quality-log.jsonl--trend — read .entropy-patrol/quality-log.jsonl and print a trend summary; skip the scan entirely--trend FlagIf the --trend flag was passed:
.entropy-patrol/quality-log.jsonl in the project root.No scan history found. Run /entropy-scan a few times to build trend data.
Then stop.Not enough scan history for trends (need at least 2 runs).
Current entry count: {N}. Run /entropy-scan again to build history.
Then stop.--window N entries (default: 30). If --window is not specified, use 30.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ENTROPY TREND ({first_date} → {last_date}, {N} scans)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OVERALL
{first_scan_total} violations → {last_scan_total} violations ({delta, e.g. "▼ 10" or "▲ 3" or "— no change"})
BY SEVERITY
High {first} → {last} ({direction})
Medium {first} → {last} ({direction})
Low {first} → {last} ({direction})
BY RULE (most changed first)
{rule_id} {first} → {last} ({direction}) {most improved label if applicable}
...
MOST IMPROVED: {rule_id} (▼ {N} violations)
MOST WORSENING: {rule_id} (▲ {N} violations) {or "none — all rules stable or improving"}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
--init FlagIf the --init flag was passed:
.claude/entropy-patrol/golden-principles.yaml already exists in the project root.
.claude/entropy-patrol/golden-principles.yaml. Edit it to customize rules for this project." and stop.skills/entropy-scan/golden-principles.yaml (relative to this skill file — the plugin's own default config).claude/entropy-patrol/golden-principles.yaml in the project root.claude/entropy-patrol/golden-principles.yaml. Edit it to customize rules for this project. Re-run /entropy-scan to start scanning.".claude/entropy-patrol/golden-principles.yaml in the project root..claude/entropy-patrol/golden-principles.yaml"skills/entropy-scan/golden-principles.yaml (relative to this skill file). Print: "No project config found. Using default golden principles. Run /entropy-scan --init to customize."/entropy-scan --init to get started." and stop.rules list and the todo_max_age_days global config (default: 90).disabled: true. Print the count of active rules.For each active rule (in order: security first, then high → medium → low severity within each category), run the detection described in the rule's detection_hint. Use Read, Grep, and Glob tools to gather evidence.
Important:
file_path, line_number (if applicable), rule_id, severity, description (one line describing the specific issue), estimated_fix_effort (trivial / small / medium)detection_hint — do not expand scope or make judgment calls beyond what the hint describesOrder of categories:
security (highest stakes — always first)missing_testsdead_codetodo_debtinconsistent_patternsdocumentation_gapsWithin each category, process high-severity rules before medium before low.
If --summary flag was passed, skip to Step 5.
Write entropy-report.md to the project root (overwrite if it exists). Format:
# Entropy Report
**Generated:** {YYYY-MM-DD HH:MM} {timezone}
**Config:** {project override path | "plugin default"}
**Rules scanned:** {count active rules} / {count total rules}
## Summary
| Category | High | Medium | Low | Total |
|----------|------|--------|-----|-------|
| security | N | N | N | N |
| missing_tests | N | N | N | N |
| dead_code | N | N | N | N |
| todo_debt | N | N | N | N |
| inconsistent_patterns | N | N | N | N |
| documentation_gaps | N | N | N | N |
| **Total** | **N** | **N** | **N** | **N** |
---
## Findings
### {category name}
#### {rule.id} — {rule.description} `{severity}`
{If no findings: "No violations found."}
{If findings exist, list as checkboxes:}
- [ ] `{file_path}:{line_number}` — {one-line description of the specific issue} _{estimated_fix_effort}_
{Repeat for each finding in this rule}
---
{Repeat section for each category that has findings}
## No Violations
{List any categories or rules with zero findings here, as a quick confirmation they were checked.}
---
_Run `/entropy-fix` to open PRs for `pr_worthy: true` violations._
_Run `/entropy-scan --init` to create a project-level config for rule customization._
Rules:
- [ ]) so /entropy-fix can track which ones have been addressed- [ ] \{file_path}:{line_number}` — {description} {effort}`- [ ] \{file_path}` — {description} {effort}`Whether or not --summary was passed, always print a summary to stdout after the scan (or instead of writing the report, if --summary was passed):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ENTROPY SCAN COMPLETE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HIGH {N} findings
MEDIUM {N} findings
LOW {N} findings
─────────────────────
TOTAL {N} findings across {N} rules
TOP ISSUES
──────────
{List up to 3 highest-severity findings, one line each:}
{severity} · {rule_id} · {file_path} — {description}
{If any high-severity findings exist:}
⚠️ Run /entropy-fix to open PRs for pr_worthy violations.
{If zero findings:}
✓ No violations found. Codebase is clean against active rules.
{If --summary flag: no report written.}
{Otherwise:}
Report written to: entropy-report.md
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
If --summary flag was NOT passed (i.e., a full scan with report write):
{
"timestamp": "<current UTC ISO-8601>",
"commitSha": "<short git sha from `git rev-parse --short HEAD`; omit field if git unavailable>",
"totalViolations": <total findings count>,
"bySeverity": {
"high": <count>,
"medium": <count>,
"low": <count>
},
"byRule": {
"<rule_id>": <count>
// Only include rules with at least 1 finding
},
"reportPath": "entropy-report.md"
}
.entropy-patrol/ directory in the project root if it doesn't exist..entropy-patrol/quality-log.jsonl.
Quality log updated: .entropy-patrol/quality-log.jsonlSchema reference: skills/entropy-scan/references/quality-log-schema.md
entropy-report.md and .entropy-patrol/quality-log.jsonl./entropy-fix.disabled: true. Never scan a disabled rule — not even "just to check."entropy-report.md. Previous results are not preserved..entropy-patrol/quality-log.jsonl. Appends only.--summary skips log. When --summary is passed, no log entry is written (no report = no log entry).