mirror of
https://github.com/Dvorinka/Devour.git
synced 2026-06-03 20:13:03 +00:00
i dont like commits
This commit is contained in:
@@ -8,11 +8,14 @@ description: >
|
||||
duplicate functions, code smells, naming issues, import cycles, or coupling
|
||||
problems. Also use when asked for a health score, what to fix next, or to
|
||||
create a cleanup plan. Supports 28 languages.
|
||||
allowed-tools: Bash(desloppify *)
|
||||
allowed-tools: Bash(devour quality*, devour review*, devour scorecard*)
|
||||
---
|
||||
|
||||
# Desloppify
|
||||
|
||||
Devour delegates quality/review operations to `desloppify`.
|
||||
Use Devour entrypoints (`devour quality ...`, `devour review ...`, `devour scorecard`) so users stay in one CLI surface.
|
||||
|
||||
## 1. Your Job
|
||||
|
||||
**Improve code quality by fixing findings and maximizing strict score honestly.**
|
||||
@@ -33,11 +36,11 @@ Never skip scores. The user tracks progress through them.
|
||||
scan → follow the tool's strategy → fix or wontfix → rescan
|
||||
```
|
||||
|
||||
1. `desloppify scan --path .` — the scan output ends with **INSTRUCTIONS FOR AGENTS**. Follow them. Don't substitute your own analysis.
|
||||
1. `devour quality scan --path .` — this delegates to `desloppify scan`; follow the output **INSTRUCTIONS FOR AGENTS** exactly.
|
||||
2. Fix the issue the tool recommends.
|
||||
3. `desloppify resolve fixed "<id>"` — or if it's intentional/acceptable:
|
||||
`desloppify resolve wontfix "<id>" --note "reason why"`
|
||||
4. Rescan to verify.
|
||||
3. `devour quality resolve fixed "<id>"` — or if it's intentional/acceptable:
|
||||
`devour quality resolve wontfix "<id>" --note "reason why"`
|
||||
4. Rescan to verify via `devour quality scan --path .`.
|
||||
|
||||
**Wontfix is not free.** It lowers the strict score. The gap between lenient and strict IS wontfix debt. Call it out when:
|
||||
- Wontfix count is growing — challenge whether past decisions still hold
|
||||
@@ -47,23 +50,24 @@ scan → follow the tool's strategy → fix or wontfix → rescan
|
||||
## 3. Commands
|
||||
|
||||
```bash
|
||||
desloppify scan --path src/ # full scan
|
||||
desloppify scan --path src/ --reset-subjective # reset subjective baseline to 0, then scan
|
||||
desloppify next --count 5 # top priorities
|
||||
desloppify show <pattern> # filter by file/detector/ID
|
||||
desloppify plan # prioritized plan
|
||||
desloppify fix <fixer> --dry-run # auto-fix (dry-run first!)
|
||||
desloppify move <src> <dst> --dry-run # move + update imports
|
||||
desloppify resolve fixed|wontfix|false_positive "<pat>" # classify finding outcome
|
||||
desloppify review --prepare # generate subjective review data
|
||||
desloppify review --import file.json # import review results
|
||||
devour quality scan --path src/ # full scan
|
||||
devour quality scan --path src/ --reset-subjective # reset subjective baseline to 0, then scan
|
||||
devour quality next --count 5 # top priorities
|
||||
devour quality show <pattern> # filter by file/detector/ID
|
||||
devour quality plan # prioritized plan
|
||||
devour quality fix <fixer> --dry-run # auto-fix (dry-run first!)
|
||||
devour quality move <src> <dst> --dry-run # move + update imports
|
||||
devour quality resolve fixed|wontfix|false_positive "<pat>" # classify finding outcome
|
||||
devour review --prepare # generate subjective review data
|
||||
devour review --import file.json # import review results
|
||||
devour review # default batch run (codex+parallel+scan-after-import)
|
||||
```
|
||||
|
||||
## 4. Subjective Reviews (biggest score lever)
|
||||
|
||||
Score = 40% mechanical + 60% subjective. Subjective starts at 0% until reviewed.
|
||||
|
||||
1. `desloppify review --prepare` — writes dimension definitions and codebase context
|
||||
1. `devour review --prepare` — delegates to `desloppify review --prepare` and writes dimension definitions and codebase context
|
||||
to `query.json`.
|
||||
|
||||
2. **Review each dimension independently.** For best results, review dimensions in
|
||||
@@ -78,7 +82,7 @@ Score = 40% mechanical + 60% subjective. Subjective starts at 0% until reviewed.
|
||||
3. Merge assessments (average scores if multiple reviewers cover the same dimension)
|
||||
and findings, then import:
|
||||
```bash
|
||||
desloppify review --import findings.json
|
||||
devour review --import findings.json
|
||||
```
|
||||
|
||||
Required output format per reviewer:
|
||||
@@ -96,7 +100,7 @@ Score = 40% mechanical + 60% subjective. Subjective starts at 0% until reviewed.
|
||||
}
|
||||
```
|
||||
|
||||
Need a clean subjective rerun from zero? Run `desloppify scan --path src/ --reset-subjective` before preparing/importing fresh review data.
|
||||
Need a clean subjective rerun from zero? Run `devour quality scan --path src/ --reset-subjective` before preparing/importing fresh review data.
|
||||
|
||||
Even moderate scores (60-80) dramatically improve overall health.
|
||||
|
||||
@@ -127,7 +131,51 @@ When desloppify itself appears wrong or inconsistent:
|
||||
|
||||
## Prerequisite
|
||||
|
||||
`command -v desloppify >/dev/null 2>&1 && echo "desloppify: installed" || echo "NOT INSTALLED — run: pip install --upgrade git+https://github.com/peteromallet/desloppify.git"`
|
||||
`command -v desloppify >/dev/null 2>&1 && echo "desloppify: installed" || echo "NOT INSTALLED — run: pip install --upgrade \"desloppify[full]\""`
|
||||
|
||||
## Install-and-Run Prompt (Copy/Paste)
|
||||
|
||||
```text
|
||||
Install or update desloppify, then scan this codebase for code quality issues
|
||||
(dead code, duplication, complexity, smells). It tracks findings persistently
|
||||
across sessions and reports a health score.
|
||||
|
||||
Requires Python 3.11+. Install from PyPI:
|
||||
pip install --upgrade desloppify
|
||||
# Recommended for deepest coverage (tree-sitter + Python security adapter):
|
||||
pip install --upgrade "desloppify[full]"
|
||||
desloppify update-skill codex # pick yours: claude, cursor, codex, copilot, windsurf, gemini
|
||||
|
||||
Use Devour wrappers (delegates to desloppify):
|
||||
devour quality scan --path .
|
||||
devour quality status
|
||||
devour quality next
|
||||
|
||||
Direct equivalent commands:
|
||||
desloppify scan --path .
|
||||
desloppify status
|
||||
desloppify next
|
||||
|
||||
--path is the directory to scan (use "." for the whole project, or "src/" etc).
|
||||
Language is auto-detected. To override: desloppify --lang python scan --path .
|
||||
(note: --lang goes BEFORE the subcommand)
|
||||
|
||||
Fix what it finds, then:
|
||||
desloppify resolve fixed <id> --note "what changed" --attest "I have actually [DESCRIBE THE CONCRETE CHANGE YOU MADE] and I am not gaming the score by resolving without fixing."
|
||||
|
||||
For false positives:
|
||||
desloppify resolve wontfix <id> --note "reason" --attest "I have actually verified this is intentional/false-positive and I am not gaming the score by resolving without fixing."
|
||||
|
||||
If subjective scores feel stale or inflated:
|
||||
desloppify scan --path . --reset-subjective
|
||||
|
||||
Because state persists, run regularly (for example before each push).
|
||||
If anything seems wrong/confusing in desloppify itself, capture a repro and ask
|
||||
whether to log an upstream issue.
|
||||
|
||||
If you need to debug desloppify internals:
|
||||
git clone https://github.com/peteromallet/desloppify.git /tmp/desloppify
|
||||
```
|
||||
|
||||
<!-- desloppify-end -->
|
||||
|
||||
@@ -135,7 +183,7 @@ When desloppify itself appears wrong or inconsistent:
|
||||
|
||||
This is the canonical Codex overlay used by the README install command.
|
||||
|
||||
1. Prefer first-class batch runs: `desloppify review --run-batches --runner codex --parallel`.
|
||||
1. Prefer first-class batch runs: `devour review` (default) or `devour review --run-batches --runner codex --parallel`.
|
||||
2. The command writes immutable packet snapshots under `.desloppify/review_packets/holistic_packet_*.json`; use those for reproducible retries.
|
||||
3. Keep reviewer input scoped to the immutable packet and the source files named in each batch.
|
||||
4. Do not use prior chat context, score history, narrative summaries, issue labels, or target-threshold anchoring while scoring.
|
||||
@@ -152,7 +200,7 @@ This is the canonical Codex overlay used by the README install command.
|
||||
```
|
||||
|
||||
7. Keep `findings` schema compatible with `query.system_prompt`.
|
||||
8. If a batch fails, retry only that slice with `desloppify review --run-batches --packet <packet.json> --only-batches <idxs>`.
|
||||
8. If a batch fails, retry only that slice with `devour review --run-batches --packet <packet.json> --only-batches <idxs>`.
|
||||
|
||||
<!-- desloppify-overlay: codex -->
|
||||
<!-- desloppify-end -->
|
||||
|
||||
Reference in New Issue
Block a user