feat(quality): sharpen do-it's write-lifecycle quality spine#2
Merged
Conversation
Make installed agents write high-quality code by default: tighten the write-before -> write-during -> write-after spine and compress the two heaviest skills so the agent actually reads them. The shared 'write less' primitive is a single decision ladder, reused across skills, not restated. - router: add the decision ladder to § Restraint (does it need to exist? -> stdlib -> native -> existing dep -> one line -> minimal) with never-cut guardrails; grill/brainstorm/lint/YAGNI-lens reference it. - grill: rewrite 290 -> 88-line core + references/checks.md. One core loop at top: necessity first, falsify by exploring not asking, one decision at a time with a recommended answer, checkable+exhaustive completion. Capabilities kept. - brainstorm: rewrite 293 -> 110-line core + references/artifact-format.md. Two viewpoints run inline by default, fan out only at Heavy/explicit (capability unchanged, default cost removed); options map along the ladder; pick-a-branch + fog-of-war skip cut over-firing. - anti-patterns-lint: no-consumer family also flags speculative interface/type/ abstract-class exports as ladder rung 1; family set stays closed per Restraint. - code-quality-cleaner: maintainability + YAGNI/over-engineering with a bounded checklist and a tagged finding format (delete:/stdlib:/native:/yagni:/shrink:, severity preserved, net: -N verdict); wired into review-loop as the YAGNI lens. - fix-loop already mandates batch-by-root-cause (verified, unchanged). Tests: build:codex-plugin regenerates plugins/index mirrors; npm run test green (agents, skill-links, hooks incl. 2 new anti-patterns-lint cases, install). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
让装了 do-it 的 agent 默认写出高质量代码。把 do-it 的质量从「事后 review」升级成贯穿写代码生命周期的一条脊柱,并把两个最重的 skill 压瘦,让 agent 真的会去读。
全程守住「又快又好」:不加写前阻塞清单、不建会膨胀的库、不注入 CLAUDE.md,退役/降级处逐项核对能力保留。
质量脊柱 + 共享原语
改动
do-it-routerdo-it-grillreferences/checks.md52 行;顶部 3 步紧核心:必要性优先 / 探代码证伪 / 一次一问给推荐答案 / 可检验穷尽完成判据。15 个能力点全保留do-it-brainstormreferences/artifact-format.md89 行;双视角默认内联、Heavy/显式才扇出(能力不变、去默认成本);决策阶梯发散轴;pick-a-branch + fog-of-war 治过度触发。16 个能力点全保留anti-patterns-lint.shinterface/type/abstract class(rung-1 YAGNI);family 集合保持封闭(守 Restraint);+2 测试code-quality-cleanerdelete:/stdlib:/native:/yagni:/shrink:(保留 severity +net: -N收尾);接进 review-loop 强度梯do-it-fix-loop经核对已正确(批处理是当前默认),未改。来源
验证
npm run build:codex-plugin重建 plugins/index.json 镜像,源与镜像逐字同步(含新 references 文件)npm run test全绿:validate-agents / check-skill-links / lint-hooks / test-hooks(含 2 个新 anti-patterns-lint 用例)/ test-install 19/19🤖 Generated with Claude Code