Skip to content

Commit 4d65383

Browse files
committed
refactor(handcraft): redraw Lens 6+7 boundary, add per-lens exit questions + failure modes
Surgeon Rule compressed. Review Comment Craft → Per-Artifact. Final re-read pass.
1 parent 2ed69df commit 4d65383

1 file changed

Lines changed: 43 additions & 10 deletions

File tree

commands/development/pb-handcraft.md

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ difficulty: "intermediate"
66
model_hint: "sonnet"
77
execution_pattern: "sequential"
88
related_commands: ['pb-voice', 'pb-review', 'pb-linus-agent', 'pb-commit', 'pb-llm-guidelines']
9-
last_reviewed: "2026-04-26"
10-
last_evolved: "2026-04-26"
11-
version: "1.3.0"
12-
version_notes: "v1.3.0: Add The Badge Test -- the defend-every-line standard now frames the whole pass, ambient rather than a separate step."
9+
last_reviewed: "2026-07-02"
10+
last_evolved: "2026-07-02"
11+
version: "1.4.0"
12+
version_notes: "v1.4.0: Lens 6+7 boundary redrawn (register → L6, mechanical read-aloud → L7). Per-lens exit questions + failure modes. Repeated section anatomy detection. Surgeon Rule compressed. Review Comment Craft moved to Per-Artifact. Final re-read pass."
1313
breaking_changes: []
1414
---
1515
# AI Output Quality Gate
@@ -48,8 +48,6 @@ Apply `/pb-preamble` thinking: challenge your own output before anyone else does
4848

4949
## The Surgeon Rule
5050

51-
A surgeon doesn't narrate while cutting. Doesn't explain the scalpel. Doesn't add tissue. Doesn't nick adjacent structures.
52-
5351
Minimal sufficient. No bloat. No clipping.
5452

5553
---
@@ -77,7 +75,7 @@ Some projects enforce this explicitly. Most don't but will judge it. The standar
7775

7876
## Horizontal Sweep (External Code Contributions)
7977

80-
Before the six lenses, sweep horizontally: does the new code follow existing idioms, or does it introduce new ways of doing old things?
78+
Before the seven lenses, sweep horizontally: does the new code follow existing idioms, or does it introduce new ways of doing old things?
8179

8280
- How does the project parse directives? Use the same parser.
8381
- How does the project manage slice fields on structs? Add the same lifecycle methods.
@@ -114,6 +112,8 @@ The work must be indistinguishable from what the target maintainer would write t
114112
- Error wrapping style (project's error package or stdlib?)
115113
- Import grouping (stdlib / external / internal?)
116114

115+
**Exit:** Did you read the target codebase, or match from memory? (Fails when you match from memory — you'll miss convention drift.)
116+
117117
### Lens 2: AI Tell Scan
118118

119119
Read every line looking for machine patterns. If a line makes you think "a human wouldn't write it that way," rewrite it.
@@ -147,11 +147,14 @@ Read every line looking for machine patterns. If a line makes you think "a human
147147
- Numbered lists where prose would be more natural
148148
- Summary at the end restating what was just said
149149
- Opener repetition across posts (scan last 5 before writing new)
150+
- Repeated section anatomy — identical beat structure (scene → diagnosis → prescription → close) across N > 1 sections. Break one section's rhythm.
150151

151152
**Typography tells:**
152153
- Em dashes anywhere -- use `--` for internal docs, match project conventions for external output
153154
- Exotic/unicode symbols -- stick to ASCII
154155

156+
**Exit:** Did you flag at least one tell you initially overlooked? (Fails when you've read so much AI output you've normalized the patterns — you literally can't see them anymore.)
157+
155158
### Lens 3: Bloat Check
156159

157160
Remove anything that doesn't earn its place.
@@ -166,6 +169,10 @@ Remove anything that doesn't earn its place.
166169

167170
**The test:** cover each line with your hand. Does removing it lose information? If no, cut it.
168171

172+
**The structure test:** scan section openings. If Lens 2 flagged repeated section anatomy, verify you broke at least one section's rhythm. Uniform structure is bloat regardless of who (or what) wrote it.
173+
174+
**Exit:** Did you remove anything, or did everything earn its place on first pass? (Fails when attachment to your own prose makes every line feel load-bearing.)
175+
169176
### Lens 4: Clipping Check
170177

171178
Verify nothing was accidentally removed.
@@ -177,6 +184,8 @@ Verify nothing was accidentally removed.
177184

178185
**The test:** diff against the original. For each removed line, confirm it's genuinely unnecessary.
179186

187+
**Exit:** Did you diff against the original and confirm every removal? (Fails when the diff is large and you skim instead of checking each line.)
188+
180189
### Lens 5: Scope Check
181190

182191
The reader built the system. Don't explain their code, their spec, their domain, or their role back to them.
@@ -194,6 +203,8 @@ The reader built the system. Don't explain their code, their spec, their domain,
194203

195204
**Why it matters:** Reviewer text that explains a maintainer's own system back reads as outsider, AI-assisted, or condescending -- even when factually correct. The strongest review comments show the bug, the proof, and the fix without restating what the reader built.
196205

206+
**Exit:** Did you cut anything that explained the reader's domain back to them? (Fails when you assume the reader needs context you'd find condescending if roles were reversed.)
207+
197208
### Lens 6: Register Check
198209

199210
Apply project-specific voice guidelines. If the project defines a voice guide or `/pb-voice` has been configured, use those rules. Otherwise, match the register of the target project's existing docs and comments.
@@ -208,24 +219,41 @@ General dev-to-dev register:
208219

209220
**For GitHub artifacts** (commits, PRs, issues, PR/review/inline comments): `~/.claude/CLAUDE.md` § GitHub Artifact Register sets the ceilings, strip list, and never-write list.
210221

222+
**Conversational check:** read the output aloud as if saying it to a colleague over a drink. Mouth the words — silent reading skips what the tongue catches.
223+
224+
- Would you actually say this sentence to another human in conversation?
225+
- Would they check their phone midway through?
226+
- Does it sound like you typed this live, or like a generated artifact?
227+
228+
If the conversational check flags something your eye skipped, the problem is register, not cadence. Fix it here.
229+
230+
**Exit:** Would you say every sentence aloud to a colleague without hedging or apologizing? (Fails when you read silently — your eye skips what your tongue would catch.)
231+
211232
### Lens 7: Read-Aloud Check
212233

234+
This is a detection method, not a problem category. Your eyes skip what your tongue catches — reading aloud surfaces issues the other lenses miss, regardless of what kind of issue it is.
235+
213236
Read the output as if speaking it to the maintainer over a call.
214237

215238
- Does any sentence feel robotic when spoken?
216239
- Are sentence lengths varied, or is it mechanical?
217240
- Does the flow have rhythm, or does it plod?
218-
- Would you actually say this to a colleague?
219241

220242
If it sounds like a press release, rewrite until it sounds like a person.
221243

222244
**For conversational artifacts (PR/issue comments, emails, Slack):** beyond spoken rhythm, check the shape. Does it read like someone typed this live, or like a generated review artifact with section headers and bullet padding? Scene-setter up front, specific pointers, flowing prose. Structured submissions (GHSA fields, VRP forms) skip this sub-check -- required sections drive their shape.
223245

246+
**Exit:** Did reading aloud catch something silent reading skipped? (Fails when you mutter instead of reading aloud — whispering is still silent reading.)
247+
248+
### Final Re-Read
249+
250+
Not an eighth lens — a closing sweep. After all seven lenses, re-read the final output once from top to bottom. You changed things. Confirm the fixes didn't introduce new tells. If you find one, fix it and re-read; one clean pass is enough. Don't restart the lens pass.
251+
224252
---
225253

226254
## Submission Quality Gate (Security Reports)
227255

228-
Before any security submission -- GHSA, bounty platform, email -- verify these in addition to the six lenses:
256+
Before any security submission -- GHSA, bounty platform, email -- verify these in addition to the seven lenses:
229257

230258
- **PoC or traced input path.** "I tested this" or "I traced input from annotation to fmt.Sprintf with no sanitization." Code analysis is silver; observable output is gold. Prefer gold.
231259
- **Realistic scenario.** What does the attacker do, what breaks. State preconditions (RBAC, auth, config).
@@ -237,7 +265,11 @@ Before any security submission -- GHSA, bounty platform, email -- verify these i
237265

238266
---
239267

240-
## Review Comment Craft
268+
## Per-Artifact
269+
270+
Extensions for specific artifact types that need more than the seven lenses.
271+
272+
### Review Comments
241273

242274
Before posting any review comment on a PR, issue, or thread, check:
243275

@@ -293,6 +325,7 @@ Run after work is functionally complete, before presenting externally. Integrate
293325
- `/pb-review` -- Code review (bugs, logic, tests)
294326
- `/pb-linus-agent` -- Peer review persona
295327
- `/pb-commit` -- Commit message quality
328+
- `/pb-llm-guidelines` -- LLM coding guardrails referenced in Scope Guard
296329

297330
---
298331

0 commit comments

Comments
 (0)