Skip to content

Commit e351b47

Browse files
authored
Merge pull request #234 from udecode/codex/stable-query-options-args
2 parents 4fea35b + b0e9410 commit e351b47

23 files changed

Lines changed: 1445 additions & 50 deletions

File tree

.agents/AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Use those skills when relevant:
4949

5050
- `task` for normal repo task execution
5151
- `major-task` for heavyweight architecture, framework comparison, migration, benchmark, or proposal work
52+
- `deslop` for the final bounded cleanup pass once a change already works
5253
- `tdd`
5354
- `ce-review` when doing a code review
5455

.agents/rules/deslop.mdc

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
description: Run a bounded final deslop pass on a nearly-finished change using slop-scan deltas, focused review lenses, and post-cleanup re-verification
3+
---
4+
5+
# Deslop
6+
7+
Use this after the implementation already works and before commit or push. This
8+
is not a planning workflow and not a rescue mission for broken code. It is the
9+
last pressure pass that strips noise out of an otherwise-correct diff.
10+
11+
## Core Contract
12+
13+
- Deslop is a bounded helper inside the normal execution lane, not a competing
14+
end-to-end workflow.
15+
- Default scope is changed files only. Do not widen to the whole repo unless
16+
the user asks.
17+
- Prefer deleting or inlining over introducing fresh abstraction.
18+
- Treat slop-scan as signal, not law. Fix the good hits. Ignore the fake ones.
19+
20+
## What Counts As Slop
21+
22+
Focus on concrete smell families, not vague "AI code" vibes:
23+
24+
- needless abstraction: pass-through wrappers, barrel-only indirection, async
25+
noise, single-use helper layers
26+
- duplication: repeated signatures, repeated mock setup, local copy-paste
27+
helpers
28+
- defensive noise: empty catches, error swallowing, error obscuring where the
29+
real fix is to rethrow or narrow once
30+
- structural fragmentation: over-fragmentation and fan-out hotspots when they
31+
land in the changed area
32+
- placeholders and leftovers: TODO comments, dead helpers, debug scraps, fake
33+
scaffolding text
34+
35+
## Inputs To Gather
36+
37+
Before cleanup, collect:
38+
39+
- repo root `AGENTS.md`
40+
- any nested `AGENTS.md` or design docs that govern the changed area
41+
- the active plan file when one exists
42+
- the changed-files list or explicit file scope
43+
- fresh verification evidence from the implementation pass
44+
- the repo slop delta command output
45+
46+
## Review Lenses
47+
48+
When the user explicitly asked for deslop / cleanup / refactor, run these 3
49+
review lenses in parallel on the same context bundle:
50+
51+
1. Repo rules and documentation conformance
52+
2. Type safety and source of truth
53+
3. Simplification and overengineering
54+
55+
If parallel reviewers are unavailable, do the same 3 lenses locally before
56+
editing.
57+
58+
## Procedure
59+
60+
1. Lock behavior first
61+
- If current behavior is not already protected, add or run the narrowest
62+
regression proof before cleanup edits.
63+
64+
2. Bound the scope
65+
- Build a changed-files list or explicit file scope.
66+
- Stay inside that scope for both review and cleanup.
67+
68+
3. Launch the review lenses
69+
- Give every reviewer the same context bundle and one assigned lens.
70+
- Ask for findings first, ordered by severity, with file references.
71+
72+
4. Run slop delta while reviewers work
73+
- Prefer the repo script: `bun run lint:slop:delta`
74+
- If it does not exist, fall back to `slop-scan delta ...`
75+
- Use delta, not raw repo-wide scan, to focus on added and worsened noise.
76+
77+
5. Synthesize before editing
78+
- Merge the reviewer output and delta output under:
79+
- `How did we do?`
80+
- `Feedback to keep`
81+
- `Feedback to ignore`
82+
- `Plan of attack`
83+
84+
6. Apply only the worthwhile fixes
85+
- type drift, casts, or duplicated type definitions
86+
- pass-through wrappers, async noise, fake helper seams
87+
- dead helpers, placeholder comments, debug leftovers
88+
- duplicate mock setup or local copy-paste helpers
89+
- empty or error-obscuring internal catches when the right fix is simpler
90+
91+
7. Re-run the narrowest affected verification
92+
- rerun the same tests, lint, and typecheck lanes that protect the touched
93+
area
94+
- if a stronger final gate already existed, rerun it after cleanup
95+
96+
8. Update the story
97+
- Make sure the active plan, commit text, and PR-facing text describe the
98+
post-deslop state, not the earlier draft.
99+
100+
## Stop Rules
101+
102+
- Do not widen scope because the scan found juicy unrelated cleanup.
103+
- Do not start product work during deslop.
104+
- Do not add abstraction to fix abstraction.
105+
- If generated, vendored, or fixture noise dominates the scan, filter it and
106+
move on.
107+
- If behavior is not locked and cleanup would be risky, stop and lock behavior
108+
first.
109+
110+
## Expected Output
111+
112+
Return an evidence-dense cleanup report:
113+
114+
- scope
115+
- behavior lock / verification used
116+
- top slop deltas
117+
- feedback kept vs ignored
118+
- simplifications applied
119+
- post-deslop verification
120+
- remaining risks or explicitly deferred cleanup

.agents/skills/deslop/SKILL.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
description: Run a bounded final deslop pass on a nearly-finished change using slop-scan deltas, focused review lenses, and post-cleanup re-verification
3+
name: deslop
4+
metadata:
5+
skiller:
6+
source: .agents/rules/deslop.mdc
7+
---
8+
9+
# Deslop
10+
11+
Use this after the implementation already works and before commit or push. This
12+
is not a planning workflow and not a rescue mission for broken code. It is the
13+
last pressure pass that strips noise out of an otherwise-correct diff.
14+
15+
## Core Contract
16+
17+
- Deslop is a bounded helper inside the normal execution lane, not a competing
18+
end-to-end workflow.
19+
- Default scope is changed files only. Do not widen to the whole repo unless
20+
the user asks.
21+
- Prefer deleting or inlining over introducing fresh abstraction.
22+
- Treat slop-scan as signal, not law. Fix the good hits. Ignore the fake ones.
23+
24+
## What Counts As Slop
25+
26+
Focus on concrete smell families, not vague "AI code" vibes:
27+
28+
- needless abstraction: pass-through wrappers, barrel-only indirection, async
29+
noise, single-use helper layers
30+
- duplication: repeated signatures, repeated mock setup, local copy-paste
31+
helpers
32+
- defensive noise: empty catches, error swallowing, error obscuring where the
33+
real fix is to rethrow or narrow once
34+
- structural fragmentation: over-fragmentation and fan-out hotspots when they
35+
land in the changed area
36+
- placeholders and leftovers: TODO comments, dead helpers, debug scraps, fake
37+
scaffolding text
38+
39+
## Inputs To Gather
40+
41+
Before cleanup, collect:
42+
43+
- repo root `AGENTS.md`
44+
- any nested `AGENTS.md` or design docs that govern the changed area
45+
- the active plan file when one exists
46+
- the changed-files list or explicit file scope
47+
- fresh verification evidence from the implementation pass
48+
- the repo slop delta command output
49+
50+
## Review Lenses
51+
52+
When the user explicitly asked for deslop / cleanup / refactor, run these 3
53+
review lenses in parallel on the same context bundle:
54+
55+
1. Repo rules and documentation conformance
56+
2. Type safety and source of truth
57+
3. Simplification and overengineering
58+
59+
If parallel reviewers are unavailable, do the same 3 lenses locally before
60+
editing.
61+
62+
## Procedure
63+
64+
1. Lock behavior first
65+
- If current behavior is not already protected, add or run the narrowest
66+
regression proof before cleanup edits.
67+
68+
2. Bound the scope
69+
- Build a changed-files list or explicit file scope.
70+
- Stay inside that scope for both review and cleanup.
71+
72+
3. Launch the review lenses
73+
- Give every reviewer the same context bundle and one assigned lens.
74+
- Ask for findings first, ordered by severity, with file references.
75+
76+
4. Run slop delta while reviewers work
77+
- Prefer the repo script: `bun run lint:slop:delta`
78+
- If it does not exist, fall back to `slop-scan delta ...`
79+
- Use delta, not raw repo-wide scan, to focus on added and worsened noise.
80+
81+
5. Synthesize before editing
82+
- Merge the reviewer output and delta output under:
83+
- `How did we do?`
84+
- `Feedback to keep`
85+
- `Feedback to ignore`
86+
- `Plan of attack`
87+
88+
6. Apply only the worthwhile fixes
89+
- type drift, casts, or duplicated type definitions
90+
- pass-through wrappers, async noise, fake helper seams
91+
- dead helpers, placeholder comments, debug leftovers
92+
- duplicate mock setup or local copy-paste helpers
93+
- empty or error-obscuring internal catches when the right fix is simpler
94+
95+
7. Re-run the narrowest affected verification
96+
- rerun the same tests, lint, and typecheck lanes that protect the touched
97+
area
98+
- if a stronger final gate already existed, rerun it after cleanup
99+
100+
8. Update the story
101+
- Make sure the active plan, commit text, and PR-facing text describe the
102+
post-deslop state, not the earlier draft.
103+
104+
## Stop Rules
105+
106+
- Do not widen scope because the scan found juicy unrelated cleanup.
107+
- Do not start product work during deslop.
108+
- Do not add abstraction to fix abstraction.
109+
- If generated, vendored, or fixture noise dominates the scan, filter it and
110+
move on.
111+
- If behavior is not locked and cleanup would be risky, stop and lock behavior
112+
first.
113+
114+
## Expected Output
115+
116+
Return an evidence-dense cleanup report:
117+
118+
- scope
119+
- behavior lock / verification used
120+
- top slop deltas
121+
- feedback kept vs ignored
122+
- simplifications applied
123+
- post-deslop verification
124+
- remaining risks or explicitly deferred cleanup
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"kitcn": patch
3+
---
4+
5+
## Patches
6+
7+
- Fix React query options to stay stable for equal Convex query args.

.claude/skills/deslop

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.agents/skills/deslop

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Use those skills when relevant:
5454

5555
- `task` for normal repo task execution
5656
- `major-task` for heavyweight architecture, framework comparison, migration, benchmark, or proposal work
57+
- `deslop` for the final bounded cleanup pass once a change already works
5758
- `tdd`
5859
- `ce-review` when doing a code review
5960

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: Add a real deslop skill and slop-scan command surface
3+
type: feature
4+
date: 2026-04-19
5+
status: completed
6+
---
7+
8+
# Add a real deslop skill and slop-scan command surface
9+
10+
## Goal
11+
Add a local `deslop` skill that is worth using: generated from repo source of
12+
truth, backed by runnable slop-scan commands, and aligned with the repo's
13+
review + verification rules.
14+
15+
## Findings
16+
- Local skills come from `.agents/rules/*.mdc`; `bun install` regenerates
17+
`.agents/skills/**` and root `AGENTS.md`.
18+
- The current user-drafted deslop shape already fits the repo: bounded final
19+
cleanup pass, parallel review vectors, then narrow re-verification.
20+
- `slop-scan` is useful here, but whole-repo raw scans are noisy; the valuable
21+
surface is delta-oriented and should summarize added/worsened findings.
22+
- The repo currently has no `deslop` source file and no `lint:slop*` scripts.
23+
24+
## Plan
25+
1. Add a root tooling wrapper that runs `slop-scan delta` against a sensible
26+
local baseline and prints a short summary.
27+
2. Wire `lint:slop` and `lint:slop:delta` scripts in root `package.json`.
28+
3. Add `.agents/rules/deslop.mdc` as the source-of-truth skill.
29+
4. Register/described the new skill in `.agents/AGENTS.md`, then run
30+
`bun install` to regenerate generated skill artifacts.
31+
5. Run narrow verification for the new tooling and generated skill output.
32+
33+
## Result
34+
- Added repo-local `deslop` source-of-truth plus generated skill output.
35+
- Added `tooling/slop.ts` and `tooling/slop.test.ts`.
36+
- Added root scripts `lint:slop` and `lint:slop:delta`.
37+
- Captured the non-obvious workflow/tooling lesson in `docs/solutions/`.
38+
39+
## Verification
40+
- `bun test ./tooling/slop.test.ts`
41+
- `bun run lint:fix`
42+
- `bun run typecheck`
43+
- `bun run intent:validate`
44+
- `bun run intent:stale`
45+
- `bun run lint:slop:delta -- --top 3`

0 commit comments

Comments
 (0)