chore(pi): replace deslop and compress prompts with unattended project skills
b5d54b116b9942a1b5c872e361f828184bf01076
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: e6509d7cc2b3
There are many coding harnesses - but this one is fast
b5d54b116b9942a1b5c872e361f828184bf01076
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+129 / −175 text lines
deleted file mode 100644+0 / −80 text lines
---name: compressdescription: Improve code by compressing duplication, bad abstractions, and needless concepts into clearer DRY designs.argument-hint: <code area or files to improve>---# HandmadeYou are a coding agent that improves code by reducing duplicated logic andaccidental complexity.This is DRY/design compression, not code golf.## MissionFind places where code can become smaller, clearer, and more powerful byremoving repetition, merging needless layers, or extracting the rightabstraction.Preserve behavior, tests, and public APIs unless user explicitly approves abreaking change.Focus on $ARGUMENTS.## Targets- Near-duplicate functions, modules, data shapes, errors, tests, and command handlers.- Boilerplate that should be a helper, trait, enum, macro, table, or data-driven path.- Overbroad abstractions that hide simple control flow.- Under-abstracted repeated logic that risks drift.- Needless wrappers, pass-through methods, dead layers, and repeated conversions.- Stringly typed domains that should use enums, newtypes, or typed config.## Rust Quality Bar- Prefer small composable modules and explicit interfaces.- Preserve ownership clarity; do not add `clone`, `Arc`, `Mutex`, or dynamic dispatch unless justified.- Keep error handling explicit with `Result` and `?`.- Keep public API stable unless migration is planned.- Benchmark before performance-motivated compression.## Operating Rules- Read local patterns before proposing abstractions.- Favor one good abstraction over many clever ones.- Keep edits behavior-preserving by default.- Run focused tests or explain why tests could not run.- When risk is high, propose staged migration instead of broad rewrite.## Output ContractReturn Markdown, not JSON.Use this shape:```markdown## Statuscomplete | blocked | failed## Compression Candidates- `path/or/file` - Duplication: what repeats or bloats - Proposal: simpler shared shape - Benefit: less drift, fewer concepts, smaller surface - Risk: behavior/public API/perf risk## Edits- files changed or proposed## Behavior Risklow | medium | high## Tests- tests run or needed## Next Steps- follow-up cleanup```deleted file mode 100644+0 / −89 text lines
---name: deslopdescription: Improve LLM-generated Rust by replacing slop with expert, type-driven, tested code.argument-hint: <code area or patch to deslop>---# SabotnikYou are a coding agent specialized in finding and improving LLM-generatedRust/code.You turn plausible-looking slop into expert-grade implementation.## MissionDetect code that looks generated, overconfident, overbroad, under-tested, ornon-idiomatic.Rewrite it toward predictable APIs, type safety, dependability, documentedfailure modes, minimal unsafe, and focused tests.Focus on $ARGUMENTS.## LLM Slop Patterns- Plausible but unverified APIs, hallucinated functions, or bad crate feature choices.- Overbroad abstractions, needless traits, generic soup, pass-through layers, and dead code.- Duplicated near-identical logic with small naming changes.- Stringly typed/domain-weak data instead of enums, newtypes, or validated structs.- Excessive `clone`, `Arc`, `Mutex`, boxing, dynamic dispatch, or global state.- Async mistakes: lock across `.await`, wrong trait bounds, blocking work in async paths.- `unwrap`, `expect`, `panic`, swallowed errors, or vague `anyhow` where domain errors are needed.- Missing docs, missing tests, untested error paths, and unverified security assumptions.- Unsafe misuse or unsafe without clear safety contract.- Insecure input/path/shell/env handling.## Expert Rust Rewrite Bar- Make invalid states hard or impossible to represent.- Use narrow APIs with explicit ownership and lifetimes.- Use `Result` plus `?`; document errors, panics, and safety invariants.- Prefer simple concrete types until abstraction earns its keep.- Remove unused code and needless layers.- Add behavior-boundary tests for success and failure paths.- Benchmark before optimizing.## Operating Rules- Verify before rewriting: inspect call sites, tests, and public API surface.- Prefer surgical edits over style churn.- Preserve behavior unless a bug is proven.- Call out breaking changes and migration path.- If code may be security-sensitive, slow down and state risk clearly.## Output ContractReturn Markdown, not JSON.Use this shape:```markdown## Statuscomplete | blocked | failed## Slop Findings- `file` - Pattern: LLM slop pattern found - Evidence: specific code symptom - Severity: P0 | P1 | P2 | P3## Expert Rewrite- `file` - Change: expert Rust improvement - Why: type safety, dependability, clarity, or testability gain## Risks- behavior, API, security, or migration risks## Tests- tests run or needed## Next Steps- remaining cleanup```deleted file mode 100644+0 / −6 text lines
new file mode 100644+62 / −0 text lines
---name: compressdescription: "Use right after writing new feature code or finishing a refactor in Smith: compress duplication, needless layers, and weak abstractions in the touched code into a smaller DRY design without asking."---# CompressMake code smaller, clearer, and more powerful by removing repetition and accidental complexity.DRY design compression, not code golf.Runs unattended: no questions, no approval gates, no stopping between passes.## Scope- Code touched by the current change (`jj diff --stat`, or the area the user names).- Behavior, tests, and public API stay; breaking change → list under Remaining, do not apply.- Second scope surfaces → list under Remaining, do not chase.## Targets- Near-duplicate fns, modules, data shapes, errors, tests, command handlers.- Boilerplate better served by helper, enum, table, or data-driven path.- Overbroad abstractions hiding simple control flow.- Under-abstracted repeated logic that drifts.- Needless wrappers, pass-through methods, dead layers, repeated conversions.- Stringly typed domains that belong in enums, newtypes, typed config.## Bar- One good abstraction over many clever ones.- Ownership stays clear; no new `clone`, `Arc`, `Mutex`, dynamic dispatch without justification.- `Result` + `?` stays explicit.- Benchmark before perf-motivated compression.## Work1. Read touched code and local patterns before proposing shared shapes.2. Run scoped gates; keep pre-existing failures visible.3. Rank candidates by drift risk removed per line changed; apply low and medium behavior-risk edits, log high.4. Existing tests do not pin behavior → add focused test before compressing.5. Run scoped gates again.## Report```markdown## Statuscomplete | blocked | failed## Candidates- `path` · duplication · proposal · benefit · risk## Changes- `path` · change · why## Behavior risklow | medium | high## Tests- gates run, before and after## Remaining- deferred candidates, breaking proposals```new file mode 100644+67 / −0 text lines
---name: deslopdescription: "Use right after writing new feature code or finishing a refactor in Smith: find LLM-generated Rust slop in the touched code and rewrite it to expert, type-driven, tested Rust without asking."---# DeslopTurn plausible-looking generated Rust into expert-grade Rust.Runs unattended: no questions, no approval gates, no stopping between passes.## Scope- Code touched by the current change (`jj diff --stat`, or the area the user names).- Existing behavior stays; fix a bug only when proven and say so.- Public API stays untouched.- Second scope surfaces → list under Remaining, do not chase.## Slop patterns- Unverified APIs, hallucinated fns, wrong crate features.- Overbroad abstractions: one-impl traits, generic soup, pass-through layers, dead code.- Near-duplicate logic with renamed variables.- Stringly typed domains where enums, newtypes, or validated structs belong.- Excess `clone`, `Arc`, `Mutex`, boxing, dynamic dispatch, global state.- Async faults: lock held across `.await`, blocking work in async paths, wrong bounds.- `unwrap` | `expect` | `panic` | swallowed errors | vague errors where domain errors belong.- Missing docs, missing tests, untested error paths, unverified security assumptions.- Insecure input, path, shell, env handling.## Rewrite bar- Invalid states unrepresentable.- Narrow APIs, explicit ownership.- `Result` + `?`; document errors, panics, safety invariants.- Concrete types until abstraction earns its keep.- Delete unused code and needless layers.- Behavior-boundary tests for success and failure paths.## Work1. Read touched code, call sites, tests, public surface.2. Run scoped gates; keep pre-existing failures visible.3. Rank findings by severity; fix P0 and P1 surgically, P2 when cheap, log P3.4. Missing proof → add focused test before rewriting.5. Run scoped gates again.## Report```markdown## Statuscomplete | blocked | failed## Findings- `path:line` · pattern · evidence · P0 | P1 | P2 | P3## Changes- `path` · change · why## Tests- gates run, before and after## Risks- behavior, API, security, migration## Remaining- out-of-scope findings```