lazyclaude-ai 0.1.4 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +28 -11
- package/README_ko-KR.md +26 -10
- package/REFERENCE.md +2 -1
- package/RELEASE_CHECKLIST.md +3 -3
- package/docs/hooks.md +13 -3
- package/docs/lazycodex-port-audit.md +78 -0
- package/docs/migration.md +13 -4
- package/package.json +2 -1
- package/plugins/lazyclaude/.claude-plugin/plugin.json +3 -3
- package/plugins/lazyclaude/bin/lazyclaude-hook.js +4 -3
- package/plugins/lazyclaude/commands/start-work.md +21 -0
- package/plugins/lazyclaude/commands/ulw-loop.md +24 -0
- package/plugins/lazyclaude/commands/ulw-plan.md +22 -0
- package/plugins/lazyclaude/skills/ai-slop-remover/SKILL.md +142 -0
- package/plugins/lazyclaude/skills/comment-checker/SKILL.md +55 -0
- package/plugins/lazyclaude/skills/debugging/SKILL.md +70 -0
- package/plugins/lazyclaude/skills/debugging/references/methodology/00-setup.md +108 -0
- package/plugins/lazyclaude/skills/debugging/references/methodology/02-investigate.md +126 -0
- package/plugins/lazyclaude/skills/debugging/references/methodology/04-oracle-triple.md +106 -0
- package/plugins/lazyclaude/skills/debugging/references/methodology/05-escalate.md +69 -0
- package/plugins/lazyclaude/skills/debugging/references/methodology/06-fix.md +116 -0
- package/plugins/lazyclaude/skills/debugging/references/methodology/08-qa.md +94 -0
- package/plugins/lazyclaude/skills/debugging/references/methodology/09-cleanup.md +164 -0
- package/plugins/lazyclaude/skills/debugging/references/methodology/partial-runtime-evidence.md +228 -0
- package/plugins/lazyclaude/skills/debugging/references/runtimes/bundled-js-binary.md +415 -0
- package/plugins/lazyclaude/skills/debugging/references/runtimes/go.md +252 -0
- package/plugins/lazyclaude/skills/debugging/references/runtimes/native-binary.md +484 -0
- package/plugins/lazyclaude/skills/debugging/references/runtimes/node.md +260 -0
- package/plugins/lazyclaude/skills/debugging/references/runtimes/python.md +248 -0
- package/plugins/lazyclaude/skills/debugging/references/runtimes/rust.md +234 -0
- package/plugins/lazyclaude/skills/debugging/references/tools/ghidra.md +212 -0
- package/plugins/lazyclaude/skills/debugging/references/tools/playwright-cli.md +194 -0
- package/plugins/lazyclaude/skills/debugging/references/tools/pwndbg.md +263 -0
- package/plugins/lazyclaude/skills/debugging/references/tools/pwntools.md +265 -0
- package/plugins/lazyclaude/skills/frontend-ui-ux/SKILL.md +62 -0
- package/plugins/lazyclaude/skills/lsp/SKILL.md +56 -6
- package/plugins/lazyclaude/skills/programming/SKILL.md +99 -7
- package/plugins/lazyclaude/skills/programming/references/go/README.md +90 -0
- package/plugins/lazyclaude/skills/programming/references/go/backend-stack.md +641 -0
- package/plugins/lazyclaude/skills/programming/references/go/bootstrap.md +328 -0
- package/plugins/lazyclaude/skills/programming/references/go/bubbletea-v2.md +360 -0
- package/plugins/lazyclaude/skills/programming/references/go/cobra-stack.md +468 -0
- package/plugins/lazyclaude/skills/programming/references/go/concurrency.md +362 -0
- package/plugins/lazyclaude/skills/programming/references/go/data-modeling.md +329 -0
- package/plugins/lazyclaude/skills/programming/references/go/error-handling.md +359 -0
- package/plugins/lazyclaude/skills/programming/references/go/golangci-strict.md +236 -0
- package/plugins/lazyclaude/skills/programming/references/go/grpc-connect.md +375 -0
- package/plugins/lazyclaude/skills/programming/references/go/libraries.md +337 -0
- package/plugins/lazyclaude/skills/programming/references/go/one-liners.md +202 -0
- package/plugins/lazyclaude/skills/programming/references/go/sqlc-pgx.md +471 -0
- package/plugins/lazyclaude/skills/programming/references/go/testing.md +467 -0
- package/plugins/lazyclaude/skills/programming/references/go/type-patterns.md +298 -0
- package/plugins/lazyclaude/skills/programming/references/python/README.md +314 -0
- package/plugins/lazyclaude/skills/programming/references/python/async-anyio.md +442 -0
- package/plugins/lazyclaude/skills/programming/references/python/data-modeling.md +233 -0
- package/plugins/lazyclaude/skills/programming/references/python/data-processing.md +133 -0
- package/plugins/lazyclaude/skills/programming/references/python/error-handling.md +218 -0
- package/plugins/lazyclaude/skills/programming/references/python/fastapi-stack.md +316 -0
- package/plugins/lazyclaude/skills/programming/references/python/httpx2-optimization.md +360 -0
- package/plugins/lazyclaude/skills/programming/references/python/libraries.md +307 -0
- package/plugins/lazyclaude/skills/programming/references/python/one-liners.md +268 -0
- package/plugins/lazyclaude/skills/programming/references/python/orjson-stack.md +378 -0
- package/plugins/lazyclaude/skills/programming/references/python/pydantic-ai.md +285 -0
- package/plugins/lazyclaude/skills/programming/references/python/pyproject-strict.md +232 -0
- package/plugins/lazyclaude/skills/programming/references/python/textual-tui.md +201 -0
- package/plugins/lazyclaude/skills/programming/references/python/type-patterns.md +176 -0
- package/plugins/lazyclaude/skills/programming/references/rust/README.md +317 -0
- package/plugins/lazyclaude/skills/programming/references/rust/async-tokio.md +299 -0
- package/plugins/lazyclaude/skills/programming/references/rust/axum-stack.md +467 -0
- package/plugins/lazyclaude/skills/programming/references/rust/cargo-strict.md +317 -0
- package/plugins/lazyclaude/skills/programming/references/rust/clap-stack.md +409 -0
- package/plugins/lazyclaude/skills/programming/references/rust/concurrency.md +375 -0
- package/plugins/lazyclaude/skills/programming/references/rust/libraries.md +439 -0
- package/plugins/lazyclaude/skills/programming/references/rust/one-liners.md +291 -0
- package/plugins/lazyclaude/skills/programming/references/rust/proptest-insta.md +429 -0
- package/plugins/lazyclaude/skills/programming/references/rust/type-state.md +354 -0
- package/plugins/lazyclaude/skills/programming/references/rust/unsafe-discipline.md +250 -0
- package/plugins/lazyclaude/skills/programming/references/rust/zero-cost-safety.md +527 -0
- package/plugins/lazyclaude/skills/programming/references/rust-ub/README.md +289 -0
- package/plugins/lazyclaude/skills/programming/references/rust-ub/miri-sanitizers-loom.md +411 -0
- package/plugins/lazyclaude/skills/programming/references/rust-ub/ub-taxonomy.md +269 -0
- package/plugins/lazyclaude/skills/programming/references/typescript/README.md +195 -0
- package/plugins/lazyclaude/skills/programming/references/typescript/backend-hono.md +672 -0
- package/plugins/lazyclaude/skills/programming/references/typescript/bootstrap.md +199 -0
- package/plugins/lazyclaude/skills/programming/references/typescript/data-modeling.md +202 -0
- package/plugins/lazyclaude/skills/programming/references/typescript/error-handling.md +169 -0
- package/plugins/lazyclaude/skills/programming/references/typescript/tsconfig-strict.md +152 -0
- package/plugins/lazyclaude/skills/programming/references/typescript/type-patterns.md +196 -0
- package/plugins/lazyclaude/skills/programming/scripts/go/check-no-excuse-rules.sh +173 -0
- package/plugins/lazyclaude/skills/programming/scripts/go/new-project.py +138 -0
- package/plugins/lazyclaude/skills/programming/scripts/go/templates/.editorconfig +13 -0
- package/plugins/lazyclaude/skills/programming/scripts/go/templates/.golangci.yml +95 -0
- package/plugins/lazyclaude/skills/programming/scripts/go/templates/AGENTS.md.tmpl +24 -0
- package/plugins/lazyclaude/skills/programming/scripts/go/templates/README.md.tmpl +12 -0
- package/plugins/lazyclaude/skills/programming/scripts/go/templates/Taskfile.yml +40 -0
- package/plugins/lazyclaude/skills/programming/scripts/go/templates/ci.yml +37 -0
- package/plugins/lazyclaude/skills/programming/scripts/go/templates/config.go +24 -0
- package/plugins/lazyclaude/skills/programming/scripts/go/templates/gitignore +15 -0
- package/plugins/lazyclaude/skills/programming/scripts/go/templates/main.go.tmpl +22 -0
- package/plugins/lazyclaude/skills/programming/scripts/go/templates/run.go +15 -0
- package/plugins/lazyclaude/skills/programming/scripts/python/check-no-excuse-rules.py +687 -0
- package/plugins/lazyclaude/skills/programming/scripts/python/new-project.py +172 -0
- package/plugins/lazyclaude/skills/programming/scripts/python/new-script.py +116 -0
- package/plugins/lazyclaude/skills/programming/scripts/rust/check-no-excuse-rules.py +296 -0
- package/plugins/lazyclaude/skills/programming/scripts/rust/check-no-excuse-rules.sh +158 -0
- package/plugins/lazyclaude/skills/programming/scripts/rust/new-project.py +175 -0
- package/plugins/lazyclaude/skills/programming/scripts/typescript/check-no-excuse-rules.ts +282 -0
- package/plugins/lazyclaude/skills/programming/scripts/typescript/new-project.ts +177 -0
- package/plugins/lazyclaude/skills/refactor/SKILL.md +73 -0
- package/plugins/lazyclaude/skills/remove-ai-slops/SKILL.md +52 -0
- package/plugins/lazyclaude/skills/review-work/SKILL.md +92 -6
- package/plugins/lazyclaude/skills/rules/SKILL.md +59 -6
- package/plugins/lazyclaude/skills/start-work/SKILL.md +73 -20
- package/plugins/lazyclaude/skills/ultragoal/SKILL.md +97 -0
- package/plugins/lazyclaude/skills/ulw-loop/SKILL.md +96 -19
- package/plugins/lazyclaude/skills/ulw-plan/SKILL.md +77 -17
- package/scripts/qa-portable-install.sh +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.7 - Unreleased
|
|
4
|
+
|
|
5
|
+
- Expand the LazyCodex port audit beyond skill frontmatter into upstream OMO
|
|
6
|
+
component coverage.
|
|
7
|
+
- Ship the original `ai-slop-remover` skill alias alongside the LazyClaude
|
|
8
|
+
`remove-ai-slops` skill.
|
|
9
|
+
- Include LazyCodex programming and debugging auxiliary reference packs so the
|
|
10
|
+
Claude plugin carries the same deep language/runtime guidance, not only short
|
|
11
|
+
summary skills.
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
<p align="center">
|
|
11
11
|
<img src="https://img.shields.io/badge/npm-lazyclaude--ai-cb3837" />
|
|
12
|
-
<img src="https://img.shields.io/badge/version-0.1.
|
|
12
|
+
<img src="https://img.shields.io/badge/version-0.1.7-2ea44f" />
|
|
13
13
|
<img src="https://img.shields.io/badge/Claude%20Code-plugin-blueviolet" />
|
|
14
14
|
<img src="https://img.shields.io/badge/license-MIT-blue" />
|
|
15
15
|
</p>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
> [!NOTE]
|
|
20
20
|
> LazyClaude is a quiet personal distribution for bringing LazyCodex-style prompt engineering into Claude Code. It installs as `lazyclaude@lazyclaude-ai`, so normal `claude` launches can load the LazyClaude skills and hooks without a long `--plugin-dir` command.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
This checkout is prepared as `lazyclaude-ai@0.1.7` for personal install
|
|
23
23
|
convenience. The repo can remain private and quiet; publishing to npm here does
|
|
24
24
|
not imply public repo promotion, marketplace publication, or advertisement.
|
|
25
25
|
Future package releases still require explicit user approval.
|
|
@@ -30,11 +30,17 @@ Future package releases still require explicit user approval.
|
|
|
30
30
|
- **ULW prompt hooks** - type `ulw`, `ultrawork`, `$ulw-plan`, or `$ulw-loop`
|
|
31
31
|
- **Native goal guidance** - ULW context points Claude toward `/goal` or
|
|
32
32
|
model-facing `get_goal`, `create_goal`, and delayed `update_goal` when those
|
|
33
|
-
surfaces exist
|
|
33
|
+
surfaces exist, and gives a clear fallback when goal tools are unavailable
|
|
34
34
|
- **Dynamic workflow/worktree guidance** - large or parallel tasks are steered
|
|
35
35
|
toward Claude Code Dynamic workflow orchestration and Dynamic worktree
|
|
36
36
|
isolation
|
|
37
|
-
- **Claude skills** -
|
|
37
|
+
- **Claude skills** - a richer LazyCodex-style corpus: `programming`,
|
|
38
|
+
`debugging`, `refactor`, `ai-slop-remover`, `remove-ai-slops`, `review-work`,
|
|
39
|
+
`frontend-ui-ux`, `comment-checker`, `rules`, `lsp`, `ultragoal`,
|
|
40
|
+
`ulw-plan`, `ulw-loop`, and `start-work`
|
|
41
|
+
- **LazyCodex auxiliary packs** - ships `programming/references`,
|
|
42
|
+
`programming/scripts`, and `debugging/references` for deeper language and
|
|
43
|
+
runtime guidance
|
|
38
44
|
- **Workflow agents** - planner, executor, verifier, reviewer, librarian, and QA runner
|
|
39
45
|
- **Local marketplace registration** - Claude can resolve `claude plugin details lazyclaude@lazyclaude-ai`
|
|
40
46
|
- **MCP and LSP helpers** - plugin-local stdio MCP plus TypeScript-family LSP doctor
|
|
@@ -49,14 +55,14 @@ npx --yes lazyclaude-ai install
|
|
|
49
55
|
```
|
|
50
56
|
|
|
51
57
|
If you are currently inside this repository checkout, which has the same
|
|
52
|
-
package name as the registry package, `npx --yes lazyclaude-ai@0.1.
|
|
58
|
+
package name as the registry package, `npx --yes lazyclaude-ai@0.1.7 install`
|
|
53
59
|
can resolve the local same-name source checkout and fail with
|
|
54
60
|
`sh: lazyclaude-ai: command not found`. From a fresh directory, the normal
|
|
55
61
|
install command works:
|
|
56
62
|
|
|
57
63
|
```bash
|
|
58
64
|
cd /tmp
|
|
59
|
-
npx --yes lazyclaude-ai@0.1.
|
|
65
|
+
npx --yes lazyclaude-ai@0.1.7 install
|
|
60
66
|
```
|
|
61
67
|
|
|
62
68
|
Validate the installed plugin:
|
|
@@ -134,9 +140,15 @@ LazyClaude does not auto-type `/goal` or send slash command text for you.
|
|
|
134
140
|
Instead, the hook and ULW skills add run-context guidance: use Claude Code's
|
|
135
141
|
native goal surface when available, inspect `get_goal`, call `create_goal` only
|
|
136
142
|
when no matching goal is active, and reserve `update_goal` for verified
|
|
137
|
-
completion or a genuine blocker.
|
|
138
|
-
|
|
139
|
-
|
|
143
|
+
completion or a genuine blocker. When goal tools are unavailable or not exposed,
|
|
144
|
+
LazyClaude keeps the local evidence ledger authoritative and may suggest an
|
|
145
|
+
exact `/goal <completion condition>` before long execution without repeatedly
|
|
146
|
+
printing fallback chatter.
|
|
147
|
+
For large independent work, LazyClaude applies the same principle to Claude
|
|
148
|
+
Code's available orchestration surfaces: when `Workflow` is exposed, call the
|
|
149
|
+
`Workflow` tool; when isolated edits need a model-facing worktree lane, use
|
|
150
|
+
`EnterWorktree`. If only the CLI surface is available for a fresh isolated lane,
|
|
151
|
+
use `claude --worktree <short-name> --tmux`.
|
|
140
152
|
|
|
141
153
|
Plain `ulw` is hook context activation. Claude may still show it as hook
|
|
142
154
|
guidance rather than a separate Skill tool invocation in history. Use visible
|
|
@@ -148,6 +160,10 @@ namespaced commands when you want explicit LazyClaude skill activation:
|
|
|
148
160
|
/lazyclaude:start-work plans/lazyclaude-retrofit.md
|
|
149
161
|
```
|
|
150
162
|
|
|
163
|
+
Those namespaced commands are shipped as real Claude Code command files under
|
|
164
|
+
`plugins/lazyclaude/commands/`, so `/lazyclaude:ulw-loop` should load the
|
|
165
|
+
command body, then the matching skill guidance.
|
|
166
|
+
|
|
151
167
|
## Commands
|
|
152
168
|
|
|
153
169
|
| Command | Purpose |
|
|
@@ -224,5 +240,6 @@ version probe evidence instead of failing mysteriously.
|
|
|
224
240
|
| LSP | `plugins/lazyclaude/.lsp.json` |
|
|
225
241
|
|
|
226
242
|
See `README_ko-KR.md` for Korean setup notes, `REFERENCE.md` for the pinned
|
|
227
|
-
LazyCodex source,
|
|
228
|
-
|
|
243
|
+
LazyCodex source, `docs/migration.md` for the Codex-to-Claude migration table,
|
|
244
|
+
`docs/lazycodex-port-audit.md` for the current port audit, and `CHANGELOG.md`
|
|
245
|
+
for release notes.
|
package/README_ko-KR.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
<p align="center">
|
|
11
11
|
<img src="https://img.shields.io/badge/npm-lazyclaude--ai-cb3837" />
|
|
12
|
-
<img src="https://img.shields.io/badge/version-0.1.
|
|
12
|
+
<img src="https://img.shields.io/badge/version-0.1.7-2ea44f" />
|
|
13
13
|
<img src="https://img.shields.io/badge/Claude%20Code-plugin-blueviolet" />
|
|
14
14
|
<img src="https://img.shields.io/badge/license-MIT-blue" />
|
|
15
15
|
</p>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
> [!NOTE]
|
|
24
24
|
> LazyClaude는 LazyCodex 스타일의 prompt engineering을 Claude Code로 가져오기 위한 조용한 개인용 배포판입니다. `lazyclaude@lazyclaude-ai`로 설치되므로, 매번 긴 `--plugin-dir` 없이 일반 `claude` 실행에서 LazyClaude skill과 hook을 불러올 수 있습니다.
|
|
25
25
|
|
|
26
|
-
현재
|
|
26
|
+
현재 checkout은 `lazyclaude-ai@0.1.7` 배포용으로 준비되어 있습니다. 목적은 다른 PC에서도
|
|
27
27
|
빠르게 설치하기 위한 개인용 배포물입니다. 저장소는 비공개 저장소로
|
|
28
28
|
유지할 수 있고, npm 배포가 곧 홍보, 공개 저장소 운영, Claude marketplace
|
|
29
29
|
등록을 의미하지는 않습니다. 새 버전 배포는 항상 별도의 명시적 승인 후에
|
|
@@ -35,10 +35,16 @@
|
|
|
35
35
|
- **ULW prompt hook** - `ulw`, `ultrawork`, `$ulw-plan`, `$ulw-loop` 트리거
|
|
36
36
|
- **Native goal guidance** - Claude Code가 `/goal` 또는 `get_goal`,
|
|
37
37
|
`create_goal`, `update_goal` 같은 goal surface를 제공하면 이를 우선
|
|
38
|
-
사용하도록
|
|
38
|
+
사용하도록 유도하고, goal tools are unavailable 상황의 fallback도 명시
|
|
39
39
|
- **Dynamic workflow/worktree guidance** - 크거나 병렬적인 작업은 Claude
|
|
40
40
|
Code Dynamic workflow와 Dynamic worktree 격리 쪽으로 유도
|
|
41
|
-
- **Claude skills** -
|
|
41
|
+
- **Claude skills** - LazyCodex 스타일을 더 풍부하게 옮긴 corpus:
|
|
42
|
+
`programming`, `debugging`, `refactor`, `ai-slop-remover`, `remove-ai-slops`,
|
|
43
|
+
`review-work`, `frontend-ui-ux`, `comment-checker`, `rules`, `lsp`,
|
|
44
|
+
`ultragoal`, `ulw-plan`, `ulw-loop`, `start-work`
|
|
45
|
+
- **LazyCodex auxiliary packs** - `programming/references`,
|
|
46
|
+
`programming/scripts`, `debugging/references`까지 포함해서 언어별,
|
|
47
|
+
런타임별 세부 지침을 보존
|
|
42
48
|
- **워크플로우 agents** - planner, executor, verifier, reviewer, librarian, QA runner
|
|
43
49
|
- **Local marketplace 등록** - `claude plugin details lazyclaude@lazyclaude-ai`에서 inventory 확인
|
|
44
50
|
- **MCP와 LSP helper** - plugin-local stdio MCP와 TypeScript 계열 LSP doctor
|
|
@@ -54,13 +60,13 @@ npx --yes lazyclaude-ai install
|
|
|
54
60
|
|
|
55
61
|
현재 위치가 이 저장소 checkout이면, registry package와 같은 package name을
|
|
56
62
|
가진 same-name source checkout 안에 있는 상태입니다. 이 경우
|
|
57
|
-
`npx --yes lazyclaude-ai@0.1.
|
|
63
|
+
`npx --yes lazyclaude-ai@0.1.7 install`이 local checkout을 먼저 해석해서
|
|
58
64
|
`sh: lazyclaude-ai: command not found`로 실패할 수 있습니다. 새 폴더에서는
|
|
59
65
|
일반 설치 명령이 정상 동작합니다.
|
|
60
66
|
|
|
61
67
|
```bash
|
|
62
68
|
cd /tmp
|
|
63
|
-
npx --yes lazyclaude-ai@0.1.
|
|
69
|
+
npx --yes lazyclaude-ai@0.1.7 install
|
|
64
70
|
```
|
|
65
71
|
|
|
66
72
|
설치 상태를 확인합니다.
|
|
@@ -137,9 +143,14 @@ LazyClaude는 `/goal`을 대신 입력하거나 slash command text를 자동 전
|
|
|
137
143
|
않습니다. 대신 hook과 ULW skill이 run context를 보강합니다. Claude Code의
|
|
138
144
|
native goal surface가 있으면 `get_goal`을 먼저 확인하고, matching active
|
|
139
145
|
goal이 없을 때만 `create_goal`을 호출하며, `update_goal`은 검증 완료 또는
|
|
140
|
-
진짜 blocker가 있을 때까지 미루도록 안내합니다.
|
|
141
|
-
|
|
142
|
-
|
|
146
|
+
진짜 blocker가 있을 때까지 미루도록 안내합니다. goal tools are unavailable,
|
|
147
|
+
즉 model-facing goal tools가 이 Claude Code session에 노출되지 않은 경우에는
|
|
148
|
+
로컬 evidence ledger를 기준으로 계속 진행하고, 긴 실행 전에 필요한 경우에만
|
|
149
|
+
정확한 `/goal <completion condition>`를 제안합니다. 큰 독립 작업에서는
|
|
150
|
+
같은 원칙을 Claude Code가 노출한 orchestration surface에 적용합니다.
|
|
151
|
+
`Workflow`가 노출되면 `Workflow` tool을 호출하고, isolated edit lane이
|
|
152
|
+
model-facing worktree를 필요로 하면 `EnterWorktree`를 사용합니다. CLI surface만
|
|
153
|
+
가능한 새 격리 lane에서는 `claude --worktree <short-name> --tmux`를 사용합니다.
|
|
143
154
|
|
|
144
155
|
단순히 `ulw`라고 입력하는 것은 hook context activation입니다. Claude Code
|
|
145
156
|
history에는 별도 Skill tool invocation이 아니라 hook guidance로 보일 수
|
|
@@ -152,6 +163,10 @@ command를 사용합니다.
|
|
|
152
163
|
/lazyclaude:start-work plans/lazyclaude-retrofit.md
|
|
153
164
|
```
|
|
154
165
|
|
|
166
|
+
이 namespaced command들은 `plugins/lazyclaude/commands/` 아래 실제 Claude Code
|
|
167
|
+
command file로 배포됩니다. 따라서 `/lazyclaude:ulw-loop`는 command body를 먼저
|
|
168
|
+
로드하고, 이어서 대응 skill guidance를 따라가야 합니다.
|
|
169
|
+
|
|
155
170
|
## 명령어
|
|
156
171
|
|
|
157
172
|
| 명령어 | 용도 |
|
|
@@ -230,4 +245,5 @@ probe evidence를 남깁니다.
|
|
|
230
245
|
| LSP | `plugins/lazyclaude/.lsp.json` |
|
|
231
246
|
|
|
232
247
|
영문 설명은 `README.md`, LazyCodex 출처 고정 정보는 `REFERENCE.md`,
|
|
233
|
-
Codex-to-Claude 변환 표는 `docs/migration.md
|
|
248
|
+
Codex-to-Claude 변환 표는 `docs/migration.md`, 현재 port audit은
|
|
249
|
+
`docs/lazycodex-port-audit.md`, release notes는 `CHANGELOG.md`를 참고하세요.
|
package/REFERENCE.md
CHANGED
|
@@ -7,7 +7,7 @@ Claude docs snapshot: 2026-05-31
|
|
|
7
7
|
|
|
8
8
|
- Repository: https://github.com/code-yeongyu/lazycodex
|
|
9
9
|
- Pinned tree: https://github.com/code-yeongyu/lazycodex/tree/3fb8802e314dc0a1f23481dd3782cdca26b92dc2
|
|
10
|
-
- Observed reference clone: `/tmp/lazycodex-
|
|
10
|
+
- Observed reference clone: `/tmp/lazycodex-reference`
|
|
11
11
|
|
|
12
12
|
## Migration Table
|
|
13
13
|
|
|
@@ -15,6 +15,7 @@ Claude docs snapshot: 2026-05-31
|
|
|
15
15
|
| --- | --- | --- |
|
|
16
16
|
| `.codex-plugin/plugin.json` | `.claude-plugin/plugin.json` | Plugin identity and component paths are translated, not copied. |
|
|
17
17
|
| Codex skills | Claude Code `skills/<name>/SKILL.md` | Skills keep workflow intent and remove Codex-only tool names. |
|
|
18
|
+
| Codex skill reference packs | Claude Code skill auxiliary files | `programming/references`, `programming/scripts`, and `debugging/references` are packaged with Claude-safe coordination wording. |
|
|
18
19
|
| Codex hooks | Claude Code `hooks/hooks.json` | Hook events are mapped to Claude tool names and JSON stdin behavior. |
|
|
19
20
|
| Codex MCP config | Claude Code `.mcp.json` | Local helper tools stay plugin-scoped. |
|
|
20
21
|
| Codex LSP MCP component | Claude Code `.lsp.json` | MVP starts with TypeScript/JavaScript. |
|
package/RELEASE_CHECKLIST.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# LazyClaude Release Checklist
|
|
2
2
|
|
|
3
|
-
Status: quiet public npm package
|
|
4
|
-
|
|
3
|
+
Status: this checkout is prepared for quiet public npm package
|
|
4
|
+
`lazyclaude-ai@0.1.7` after explicit user approval.
|
|
5
5
|
|
|
6
6
|
DO NOT publish a new version of LazyClaude, run `npm publish`, push release
|
|
7
7
|
tags, or add a remote Claude Code marketplace entry without explicit user
|
|
@@ -44,7 +44,7 @@ to type a generated command that shells out to `npx --yes lazyclaude-ai path` fo
|
|
|
44
44
|
normal npm installs.
|
|
45
45
|
|
|
46
46
|
Run fresh-machine QA from a fresh directory, not from this repository checkout.
|
|
47
|
-
Inside the same-name source checkout, `npx --yes lazyclaude-ai@0.1.
|
|
47
|
+
Inside the same-name source checkout, `npx --yes lazyclaude-ai@0.1.7 install`
|
|
48
48
|
can resolve the local package and fail with `sh: lazyclaude-ai: command not
|
|
49
49
|
found`. Use `cd /tmp` for the fresh directory scenario, or use the explicit
|
|
50
50
|
fresh-prefix form:
|
package/docs/hooks.md
CHANGED
|
@@ -38,9 +38,17 @@ matching goal is active, and delay `update_goal` until verified completion or a
|
|
|
38
38
|
genuine blocker. It may also point Claude toward the user-visible `/goal`
|
|
39
39
|
surface, but it does not auto-type `/goal` or send slash command text.
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
If goal tools are unavailable or not exposed in the running Claude Code session,
|
|
42
|
+
the hook context keeps the local evidence ledger authoritative. It may suggest
|
|
43
|
+
`/goal <completion condition>` before long execution, but it should not repeat
|
|
44
|
+
fallback chatter on every ULW turn.
|
|
45
|
+
|
|
46
|
+
For broad work, the same context ports the LazyCodex model-facing principle to
|
|
47
|
+
Claude Code's exposed orchestration surfaces: if `Workflow` is available, call
|
|
48
|
+
the `Workflow` tool before serial execution and bind every lane to evidence and
|
|
49
|
+
cleanup. If isolated edits need a model-facing worktree lane, use
|
|
50
|
+
`EnterWorktree`; when only the CLI surface is available, the actionable launch
|
|
51
|
+
form is `claude --worktree <short-name> --tmux`.
|
|
44
52
|
|
|
45
53
|
Plain `ulw` therefore activates hook context, not a visible Skill tool call.
|
|
46
54
|
For a visible LazyClaude command/skill invocation, use the namespaced Claude
|
|
@@ -52,6 +60,8 @@ Code commands:
|
|
|
52
60
|
/lazyclaude:start-work plans/lazyclaude-retrofit.md
|
|
53
61
|
```
|
|
54
62
|
|
|
63
|
+
These are real Claude Code command files in `plugins/lazyclaude/commands/`.
|
|
64
|
+
|
|
55
65
|
## Safety
|
|
56
66
|
|
|
57
67
|
Hooks parse JSON from stdin and return JSON to Claude Code. The hook does not
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# LazyCodex Port Audit
|
|
2
|
+
|
|
3
|
+
Reference snapshot: `code-yeongyu/lazycodex` commit
|
|
4
|
+
`3fb8802e314dc0a1f23481dd3782cdca26b92dc2`.
|
|
5
|
+
|
|
6
|
+
This document tracks the LazyCodex/OMO surfaces checked during the deeper
|
|
7
|
+
LazyClaude port pass. The goal is to keep future updates honest: if the upstream
|
|
8
|
+
plugin grows a new user-facing skill, hook, or runtime behavior, this map should
|
|
9
|
+
make the missing LazyClaude target obvious.
|
|
10
|
+
|
|
11
|
+
## Ported Runtime Concepts
|
|
12
|
+
|
|
13
|
+
| LazyCodex / OMO source | LazyClaude target | Status |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| `components/comment-checker` | `skills/comment-checker`, `PostToolUse` hook guidance | Ported as Claude-native skill and hook prompt guidance. |
|
|
16
|
+
| `components/lsp` | `.lsp.json`, `.mcp.json`, `bin/lazyclaude-lsp-doctor.js`, `skills/lsp` | Ported as lightweight Claude Code LSP/MCP helper rather than vendoring the full Codex MCP package. |
|
|
17
|
+
| `components/rules` | `skills/rules`, `SessionStart` / `PostCompact` hook behavior | Ported as Claude session rule guidance and cache-reset messaging. |
|
|
18
|
+
| `components/ultragoal` | `skills/ultragoal`, `ulw-*`, `start-work` goal guidance | Ported to Claude-native goal wording, preserving evidence/ledger/quality-gate discipline. |
|
|
19
|
+
| `components/ultrawork` | `commands/ulw-loop.md`, `commands/ulw-plan.md`, `skills/ulw-loop`, `skills/ulw-plan` | Ported to Claude skills, commands, agents, workflow/worktree guidance, and UserPromptSubmit hook injection. |
|
|
20
|
+
| `components/telemetry` | No runtime telemetry | Intentionally not ported as network telemetry. LazyClaude remains quiet/local by default. |
|
|
21
|
+
|
|
22
|
+
## Ported Skill Corpus
|
|
23
|
+
|
|
24
|
+
LazyCodex aggregate skills include:
|
|
25
|
+
|
|
26
|
+
- `ai-slop-remover`
|
|
27
|
+
- `comment-checker`
|
|
28
|
+
- `debugging`
|
|
29
|
+
- `frontend-ui-ux`
|
|
30
|
+
- `lsp`
|
|
31
|
+
- `programming`
|
|
32
|
+
- `refactor`
|
|
33
|
+
- `remove-ai-slops`
|
|
34
|
+
- `review-work`
|
|
35
|
+
- `rules`
|
|
36
|
+
- `ultragoal`
|
|
37
|
+
|
|
38
|
+
LazyClaude now ships those names or Claude-native equivalents, plus LazyClaude
|
|
39
|
+
workflow additions:
|
|
40
|
+
|
|
41
|
+
- `start-work`
|
|
42
|
+
- `ulw-loop`
|
|
43
|
+
- `ulw-plan`
|
|
44
|
+
|
|
45
|
+
The original `ai-slop-remover` name is preserved as an alias-style skill so
|
|
46
|
+
upstream LazyCodex prompts that call that name still have a matching Claude
|
|
47
|
+
surface. `remove-ai-slops` remains the broader LazyClaude cleanup skill.
|
|
48
|
+
|
|
49
|
+
## Auxiliary Packs
|
|
50
|
+
|
|
51
|
+
The deeper LazyCodex skills rely on files beyond `SKILL.md`. LazyClaude now
|
|
52
|
+
packages the high-value portable auxiliary packs:
|
|
53
|
+
|
|
54
|
+
- `programming/references`
|
|
55
|
+
- `programming/scripts`
|
|
56
|
+
- `debugging/references`
|
|
57
|
+
|
|
58
|
+
These packs carry language/runtime-specific guidance for TypeScript, Python,
|
|
59
|
+
Rust, Go, debugging methodology, runtime probes, and tool usage. OpenCode-only
|
|
60
|
+
coordination examples in the debugging references were rewritten as Claude
|
|
61
|
+
workflow/subagent pseudocode so they do not instruct Claude Code to call missing
|
|
62
|
+
tools literally.
|
|
63
|
+
|
|
64
|
+
## Deliberate Non-Ports
|
|
65
|
+
|
|
66
|
+
The following upstream repository content was audited but not copied into the
|
|
67
|
+
runtime package:
|
|
68
|
+
|
|
69
|
+
- LazyCodex web/landing app: not part of the Claude Code plugin runtime.
|
|
70
|
+
- GitHub Actions and npm publish workflows: this repository uses manual user
|
|
71
|
+
publication.
|
|
72
|
+
- OMO telemetry network component: omitted to keep LazyClaude local and quiet.
|
|
73
|
+
- Full component TypeScript packages for rules/comment-checker/LSP/ultragoal:
|
|
74
|
+
represented by Claude-native hook/skill/MCP/LSP surfaces where portable, not
|
|
75
|
+
vendored wholesale.
|
|
76
|
+
|
|
77
|
+
If any of those become desired runtime features, they should be introduced with
|
|
78
|
+
their own tests and explicit user approval.
|
package/docs/migration.md
CHANGED
|
@@ -7,10 +7,11 @@ of surface, and a conservative local fallback where it does not.
|
|
|
7
7
|
| Codex surface | Claude Code surface | LazyClaude implementation |
|
|
8
8
|
| --- | --- | --- |
|
|
9
9
|
| Codex CLI prompt engineering | Claude Code skills | `plugins/lazyclaude/skills/*/SKILL.md` |
|
|
10
|
+
| Codex auxiliary skill packs | Claude Code skill auxiliary files | `programming/references`, `programming/scripts`, and `debugging/references` are included where portable |
|
|
10
11
|
| Codex ultrawork plan mode | Claude Code skill plus planner agent | `ulw-plan` and `prometheus-planner` |
|
|
11
12
|
| Codex execution loop | Claude Code skill plus executor agent | `ulw-loop`, `start-work`, and `boulder-executor` |
|
|
12
13
|
| Codex goal-tool guidance | Claude Code native goal surface | `/goal` when user-selected, or model-facing `get_goal`, `create_goal`, and verified-final `update_goal` guidance when exposed |
|
|
13
|
-
| Codex parallel orchestration | Claude Code Dynamic workflow and Dynamic worktree surfaces |
|
|
14
|
+
| Codex parallel orchestration | Claude Code Dynamic workflow and Dynamic worktree surfaces | Call `Workflow` for broad independent work when exposed; use `EnterWorktree` or the CLI worktree path for risky or parallel edits |
|
|
14
15
|
| Codex hooks | Claude Code hooks | `plugins/lazyclaude/hooks/hooks.json` |
|
|
15
16
|
| Codex MCP helpers | Claude Code plugin MCP config | `plugins/lazyclaude/.mcp.json` |
|
|
16
17
|
| Codex LSP integration | Claude Code plugin LSP config | `plugins/lazyclaude/.lsp.json` |
|
|
@@ -54,11 +55,19 @@ Claude to inspect `get_goal`, create a goal with `create_goal` only when no
|
|
|
54
55
|
matching active goal exists, and defer `update_goal` until the evidence gate has
|
|
55
56
|
passed or a real blocker is recorded.
|
|
56
57
|
|
|
58
|
+
Current Claude Code sessions may not expose model-facing goal tools to the
|
|
59
|
+
model. When goal tools are unavailable or not exposed, LazyClaude should not
|
|
60
|
+
pretend the native goal was bound. It keeps the local evidence ledger
|
|
61
|
+
authoritative and may suggest `/goal <completion condition>` before
|
|
62
|
+
long-running ULW execution without repeatedly printing fallback chatter.
|
|
63
|
+
|
|
57
64
|
When the user explicitly chooses Claude Code `/goal`, that native session goal
|
|
58
65
|
remains user-visible and user-controlled. LazyClaude does not auto-type
|
|
59
|
-
`/goal`. For multi-lane work, LazyClaude
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
`/goal`. For multi-lane work, LazyClaude follows the same model-facing tool
|
|
67
|
+
principle where Claude Code exposes it: call the `Workflow` tool before serial
|
|
68
|
+
execution, bind each lane to criteria and evidence, and use `EnterWorktree` for
|
|
69
|
+
isolated model-facing worktree lanes. When only the CLI surface is available,
|
|
70
|
+
the concrete isolated-lane launch form is `claude --worktree <short-name> --tmux`.
|
|
62
71
|
|
|
63
72
|
If OMC/omc is already installed in Claude Code, keep it disabled or start a
|
|
64
73
|
separate Claude Code session without OMC while testing LazyClaude. This repo no
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lazyclaude-ai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Claude Code-native LazyCodex-style workflow distribution.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"scripts",
|
|
15
15
|
"README.md",
|
|
16
16
|
"README_ko-KR.md",
|
|
17
|
+
"CHANGELOG.md",
|
|
17
18
|
"cover.png",
|
|
18
19
|
"generate_cover.py",
|
|
19
20
|
"REFERENCE.md",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lazyclaude",
|
|
3
3
|
"description": "Claude Code-native LazyCodex-style workflow plugin.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "LazyClaude contributors"
|
|
7
7
|
},
|
|
8
|
-
"homepage": "https://github.com/
|
|
9
|
-
"repository": "https://github.com/
|
|
8
|
+
"homepage": "https://github.com/wjgoarxiv/lazyclaude",
|
|
9
|
+
"repository": "https://github.com/wjgoarxiv/lazyclaude",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"keywords": ["claude-code", "hooks", "skills", "agents", "lsp", "workflow"],
|
|
12
12
|
"skills": "./skills",
|
|
@@ -41,10 +41,11 @@ const ultraworkContext = [
|
|
|
41
41
|
"ULTRAWORK MODE ENABLED.",
|
|
42
42
|
"Treat this prompt as an explicit request to use LazyClaude ulw-loop discipline now; load or follow /lazyclaude:ulw-loop / Skill(ulw-loop) semantics before ordinary task execution.",
|
|
43
43
|
"Use evidence-bound planning, tests, manual QA, and cleanup receipts.",
|
|
44
|
-
"Native goal integration: when Claude Code exposes
|
|
44
|
+
"Native goal tool integration: only when Claude Code exposes model-facing goal tools, first inspect get_goal, call create_goal with an objective-only payload when no matching goal is active, and reserve update_goal for verified completion or a genuine blocker.",
|
|
45
|
+
"Native /goal fallback: if model-facing goal tools are unavailable or not exposed, say so explicitly and ask the user to bind the native Claude Code goal with /goal <completion condition>; continue with the LazyClaude ledger fallback when they decline or the surface is absent.",
|
|
45
46
|
"Do not auto-type or inject the user's slash commands; treat /goal as Claude Code's native goal surface, not as prompt text for this hook to send.",
|
|
46
|
-
"Dynamic workflow:
|
|
47
|
-
"Dynamic worktree:
|
|
47
|
+
"Dynamic workflow integration: when Claude Code exposes the Workflow tool and the task is broad, risky, parallel, or long-running, call the Workflow tool before serial execution and bind each lane to explicit criteria, artifacts, and cleanup receipts.",
|
|
48
|
+
"Dynamic worktree integration: when Claude Code exposes EnterWorktree and isolated edits are needed, use EnterWorktree for the selected lane; otherwise use or recommend claude --worktree <short-name> --tmux. Never mutate unrelated user state.",
|
|
48
49
|
].join(" ");
|
|
49
50
|
|
|
50
51
|
const input = readInput();
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Execute a checked plan with LazyClaude start-work discipline.
|
|
3
|
+
argument-hint: '<plan-file>'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the `start-work` skill for the user's current plan file or command
|
|
7
|
+
arguments.
|
|
8
|
+
|
|
9
|
+
Before the first checkbox, bootstrap Claude Code-native workflow state:
|
|
10
|
+
|
|
11
|
+
- Use `get_goal` and `create_goal` only if model-facing goal tools are exposed.
|
|
12
|
+
- If goal tools are unavailable, ask the user to set a native `/goal` completion
|
|
13
|
+
condition for the plan before multi-turn execution.
|
|
14
|
+
- For broad, risky, parallel, or long-running checkbox waves, call the
|
|
15
|
+
`Workflow` tool when Claude Code exposes it.
|
|
16
|
+
- For isolated edit lanes, use `EnterWorktree` when exposed; otherwise launch
|
|
17
|
+
or recommend `claude --worktree <short-name> --tmux`.
|
|
18
|
+
|
|
19
|
+
Then execute the first unchecked top-level checkbox with failing-test-first
|
|
20
|
+
implementation, automated verification, manual QA evidence, cleanup receipts,
|
|
21
|
+
and ledger updates.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run LazyClaude ULW loop discipline with goal and Dynamic workflow bootstrap.
|
|
3
|
+
argument-hint: '<objective>'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the `ulw-loop` skill for the user's current objective or command arguments.
|
|
7
|
+
|
|
8
|
+
Before implementation, bootstrap Claude Code-native workflow state:
|
|
9
|
+
|
|
10
|
+
1. If model-facing goal tools are available in this session, inspect `get_goal`,
|
|
11
|
+
call `create_goal` only when no matching goal exists, and reserve
|
|
12
|
+
`update_goal` for verified completion or a genuine blocker.
|
|
13
|
+
2. If goal tools are unavailable, state that plainly and ask the user to bind
|
|
14
|
+
the native Claude Code goal with this exact surface before long execution:
|
|
15
|
+
`/goal <completion condition for the current objective>`.
|
|
16
|
+
3. For broad, risky, parallel, or long-running work, call the `Workflow` tool
|
|
17
|
+
when Claude Code exposes it. Bind every lane to explicit criteria, evidence
|
|
18
|
+
artifacts, and cleanup receipts.
|
|
19
|
+
4. When isolated edits are needed, use `EnterWorktree` when Claude Code exposes
|
|
20
|
+
it. If only the CLI surface is available, tell the user the concrete launch
|
|
21
|
+
form: `claude --worktree <short-name> --tmux`.
|
|
22
|
+
|
|
23
|
+
Then continue with evidence-bound success criteria, tests, manual QA artifacts,
|
|
24
|
+
cleanup receipts, and explicit release approval boundaries.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Plan LazyClaude work with explicit goal, Dynamic workflow, and QA criteria.
|
|
3
|
+
argument-hint: '<planning brief>'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the `ulw-plan` skill for the user's current planning brief or command
|
|
7
|
+
arguments.
|
|
8
|
+
|
|
9
|
+
The plan must include Claude Code-native bootstrap steps:
|
|
10
|
+
|
|
11
|
+
- If model-facing goal tools are exposed, use `get_goal`, `create_goal`, and
|
|
12
|
+
delayed `update_goal` exactly as native goal state, not as slash-command text.
|
|
13
|
+
- If goal tools are unavailable, include the exact user-visible `/goal`
|
|
14
|
+
completion condition to bind before execution.
|
|
15
|
+
- For independent, risky, parallel, or long-running work, include when Claude
|
|
16
|
+
should call the `Workflow` tool and how each lane proves its evidence.
|
|
17
|
+
- For isolated edit lanes, include when to use `EnterWorktree`; if only the CLI
|
|
18
|
+
surface is available, include `claude --worktree <short-name> --tmux`, plus
|
|
19
|
+
evidence paths and cleanup.
|
|
20
|
+
|
|
21
|
+
Write the plan under `plans/` and keep it executable: concrete files, tests,
|
|
22
|
+
manual QA, cleanup, and publish/remote-mutation guardrails.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-slop-remover
|
|
3
|
+
description: "Removes AI-generated code smells from a SINGLE file while preserving functionality. For multiple files, run per file in parallel."
|
|
4
|
+
---
|
|
5
|
+
You are an expert code refactorer specializing in removing AI-generated "slop" patterns while STRICTLY preserving functionality.
|
|
6
|
+
|
|
7
|
+
**INPUT**: Exactly ONE file path. If multiple paths provided, REJECT and instruct to run one LazyClaude pass per file.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## DETECTION CRITERIA (Specific)
|
|
12
|
+
|
|
13
|
+
### 1. Obvious Comments (EXCLUDE: BDD comments like #given, #when, #then, #when/then)
|
|
14
|
+
|
|
15
|
+
**REMOVE**:
|
|
16
|
+
- Comments restating the code: `x += 1 # increment x`
|
|
17
|
+
- Docstrings on trivial methods: `"""Returns the name."""` for `def get_name(): return self.name`
|
|
18
|
+
- Section dividers: `# ===== HELPER FUNCTIONS =====`
|
|
19
|
+
- Commented-out code blocks
|
|
20
|
+
- `# TODO: future enhancement` without concrete plan
|
|
21
|
+
- `# Note: this is important` without explaining WHY
|
|
22
|
+
|
|
23
|
+
**KEEP**:
|
|
24
|
+
- Comments explaining WHY (business logic, edge cases, workarounds)
|
|
25
|
+
- Links to issues/tickets: `# See SPR-1234`
|
|
26
|
+
- Non-obvious algorithm explanations
|
|
27
|
+
- Regex explanations
|
|
28
|
+
- Matches to existing code style
|
|
29
|
+
|
|
30
|
+
### 2. Over-Defensive Code
|
|
31
|
+
|
|
32
|
+
**REMOVE**:
|
|
33
|
+
- Null checks for values that CANNOT be None (e.g., Django request in view)
|
|
34
|
+
- `if x is not None and x.attr is not None:` when x is guaranteed
|
|
35
|
+
- Try-except around code that can't raise (e.g., dict literal access)
|
|
36
|
+
- `isinstance()` checks for statically typed parameters
|
|
37
|
+
- Default values for required parameters: `def foo(x: str = "")` when empty string is invalid
|
|
38
|
+
- Backward-compat shims: `_old_name = new_name # deprecated`
|
|
39
|
+
- `# removed` or `# deleted` comments for removed code
|
|
40
|
+
- Re-exports of unused items
|
|
41
|
+
- Verbose, duplicated, or redundant code / test cases
|
|
42
|
+
|
|
43
|
+
**KEEP**:
|
|
44
|
+
- Validation at system boundaries (user input, external API responses)
|
|
45
|
+
- Error handling for I/O operations
|
|
46
|
+
- Null checks for nullable DB fields
|
|
47
|
+
- assertions in test code to matching type expectations
|
|
48
|
+
|
|
49
|
+
### 3. Spaghetti Nesting (2+ levels deep)
|
|
50
|
+
|
|
51
|
+
**REFACTOR**:
|
|
52
|
+
- Nested if-else chains -> early returns / guard clauses
|
|
53
|
+
- `if x: if y: if z:` -> `if not x: return` / `if not y: return`
|
|
54
|
+
- Nested loops with conditionals -> extract to helper OR use comprehensions
|
|
55
|
+
- Complex ternary `a if b else (c if d else e)` -> explicit if-else
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## PROCESS
|
|
60
|
+
|
|
61
|
+
### Step 1: Read & Analyze
|
|
62
|
+
Read the file. Identify ALL slop instances with line numbers.
|
|
63
|
+
|
|
64
|
+
### Step 2: Deep Consideration (CRITICAL)
|
|
65
|
+
For EACH identified issue, think:
|
|
66
|
+
- **Functionality Impact**: Will removing this change behavior? If ANY doubt, SKIP.
|
|
67
|
+
- **Test Coverage**: Are there tests that might break? If uncertain, SKIP.
|
|
68
|
+
- **Context Dependency**: Is this "slop" actually necessary for this specific codebase? (e.g., defensive code for known flaky external API)
|
|
69
|
+
- **Readability Trade-off**: Will removal make code LESS readable? If yes, SKIP.
|
|
70
|
+
|
|
71
|
+
**RULE**: When in doubt, DO NOT CHANGE. False negatives are better than breaking code.
|
|
72
|
+
|
|
73
|
+
### Step 3: Execute Changes
|
|
74
|
+
Make changes using Claude Code edit tools. One logical change at a time.
|
|
75
|
+
|
|
76
|
+
### Step 4: Detailed Report
|
|
77
|
+
|
|
78
|
+
**OUTPUT FORMAT**:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
## AI Slop Removed: {filename}
|
|
82
|
+
|
|
83
|
+
### Analysis Summary
|
|
84
|
+
- Total issues found: N
|
|
85
|
+
- Issues fixed: M
|
|
86
|
+
- Issues skipped (safety): K
|
|
87
|
+
|
|
88
|
+
### Changes Made
|
|
89
|
+
|
|
90
|
+
#### Change 1: [Category] Line X-Y
|
|
91
|
+
**Before**: [original code snippet]
|
|
92
|
+
**After**: [modified code snippet]
|
|
93
|
+
**Why this is slop**: [Explain why this pattern is problematic]
|
|
94
|
+
**Why safe to remove**: [Explain why functionality is preserved]
|
|
95
|
+
**Impact**: None - purely cosmetic improvement
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### Skipped Issues (Preserved for Safety)
|
|
100
|
+
|
|
101
|
+
#### Skipped 1: Line X
|
|
102
|
+
**Reason**: [Why you chose not to change this]
|
|
103
|
+
|
|
104
|
+
### Summary
|
|
105
|
+
- Removed N obvious comments
|
|
106
|
+
- Simplified M defensive patterns
|
|
107
|
+
- Flattened K nested structures
|
|
108
|
+
- Preserved L patterns that looked like slop but serve purpose
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## SAFETY RULES
|
|
114
|
+
|
|
115
|
+
1. **NEVER remove error handling for I/O, network, or file operations**
|
|
116
|
+
2. **NEVER simplify validation for user input or external data**
|
|
117
|
+
3. **NEVER change public API signatures**
|
|
118
|
+
4. **NEVER remove type hints (even redundant-looking ones)**
|
|
119
|
+
5. **If a pattern appears in multiple places, it might be intentional - ASK before bulk removal**
|
|
120
|
+
6. **Preserve all BDD test comments (#given, #when, #then)**
|
|
121
|
+
|
|
122
|
+
When finished, your report should be detailed enough that a reviewer can understand EXACTLY what changed and feel confident the changes are safe.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## WHEN NO SLOP FOUND
|
|
127
|
+
|
|
128
|
+
If the file is clean, report:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
## AI Slop Analysis: {filename}
|
|
132
|
+
|
|
133
|
+
### Result: No AI Slop Detected
|
|
134
|
+
|
|
135
|
+
This file is clean. Here's why:
|
|
136
|
+
|
|
137
|
+
**Comments**: N comments found, all explain WHY not WHAT
|
|
138
|
+
**Defensive Code**: Null checks present are appropriate (e.g., checks external API response)
|
|
139
|
+
**Code Structure**: Maximum nesting depth acceptable, early returns used appropriately
|
|
140
|
+
|
|
141
|
+
**Conclusion**: This code appears to be human-written or well-reviewed AI code. No changes needed.
|
|
142
|
+
```
|