entropy-scan
Scan codebase for principle deviations. Report only — no code changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scan codebase for principle deviations. Report only — no code changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Query and manage Shipwright agents via the admin API — cron jobs, env vars, tool permissions, API tokens, and plugins. Use to configure the running agent, manage its schedules, inspect another agent's config, or provision a new agent.
Orchestrates the full test-readiness pipeline (phases 1–5), once per qualifying repo under repos/, each in its own worktree + branch. Runs test-inventory → test-design → test-migration → test-roadmap → test-fix in sequence per repo, starting from the first stale artifact. Invoked by the `shipwright-test-readiness` cron on a daily schedule; exits early for a repo when all of its phase artifacts are fresh.
Scan Sentry for new/regressed unresolved issues, dynamically map them to repos. Report only — no code changes.
Cross-cutting contract for the test-readiness pipeline. Specifies the GitHub repository configuration that makes "tests pass" structurally meaningful instead of advisory — branch protection requiring CI to pass, required secrets, environments, deploy hooks, and PR templates. Referenced by `test-design` (Phase 2 emits the repo-config plan) and `test-roadmap` (Phase 4 auto-pairs workflow tasks with branch-protection tasks). Without these, the verification commands in each task body are honor-system; with them, the workflow is the gate.
Phase 4 of the test-readiness pipeline. Synthesizes the three prior artifacts (inventory, system design, migration) into a single executable roadmap `test-readiness-plan.md` with five sequenced milestones and an agent-executable task list. Includes mandatory sections on where we are now, where we want to be, the gap, the speed delta, and open risks. Output is suitable for handoff to an engineer or to `shipwright /dev-task`. Invoke when the `/test-roadmap` command runs.
Query and update the Shipwright task store — pick the next ready task, mark status transitions, and append new tasks. Use whenever you need to read from or write to the task queue. Calls the task store HTTP API directly via curl.
| name | entropy-scan |
| description | Scan codebase for principle deviations. Report only — no code changes. |
Scan the codebase for 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 principles file 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/shipwright/principles.md already exists in the project root.
.claude/shipwright/principles.md. Edit it to customize principles for this project." and stop.references/principles.md (relative to the plugin root — the plugin's own shared principles file).claude/shipwright/principles.md in the project root.claude/shipwright/principles.md. Edit it to customize principles for this project. Re-run /entropy-scan to start scanning.".claude/shipwright/principles.md in the project root..claude/shipwright/principles.md"references/principles.md (relative to the plugin root). Print: "No project config found. Using default principles. Run /entropy-scan --init to customize."/entropy-scan --init to get started." and stop.### heading starting a rule entry; read its **Domain:**, **Severity:**, prose statement, and (if present) **Detection:**, **PR-worthy:**, and **HITL:** fields. todo_max_age_days defaults to 90 (no per-project override in this format — a project's .claude/shipwright/principles.md override can adjust the stale_todo entry's own Detection text if a different threshold is needed).**Detection:** field — these are the entropy-scannable rules; everything else is judgment-only (read by review/plan-session/dev-task, never mechanically scanned). Map each scannable entry's **Domain:** to a report category: security → security, dead_code → dead_code, todo_debt → todo_debt, architecture → inconsistent_patterns, docs → documentation_gaps. Print the count of scannable entries.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)dead_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 scannable entries} / {count total entries}
## Summary
| Category | High | Medium | Low | Total |
|----------|------|--------|-----|-------|
| security | 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 queue task-store tasks 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}`.claude/shipwright/principles.md override do not appear anywhere in the report.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 queue task-store tasks 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-scan never creates PRs or tasks — queueing PR-worthy findings as task-store tasks belongs to /entropy-fix..claude/shipwright/principles.md omits an entry present in the plugin default, treat it as not scanned — 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).