docs(skills): verification-first loop, hallucination defense, scope lens (U17/U18/U19 — O10/O15/O17) - #50
Merged
Conversation
Upgrade the testing skill's regression-test-per-bug content into an explicit red-green-observe discipline: a bug fix's failing regression test must be run and its failure observed before the fix, a feature states a falsifiable "done when" before implementation, and a completion claim cites evidence (test output, pushed SHA) rather than narrating it. builder/SKILL.md cross-references the loop from its Implementation Workflow instead of restating it, keeping testing the single policy home. docs/hooks.md's opt-in recipes gain a paragraph on mechanical TDD enforcement for teams that want a hard PreToolUse block, citing nizos/tdd-guard as a worked external example (not vendored) that composes with the shipped commit/task quality gates. Source: artifacts/research_ai_coding_frustrations.md Part 3, O10.
Give builder a concrete Hallucination Defense workflow section that concretizes CLAUDE.md Core Principle 1 with two named steps: (a) verify an API against Context7/official docs before calling it if it's not already used elsewhere in this repo (checked via Grep first); (b) verify a new dependency exists in its official registry before installing it — hallucinated package names are deterministic enough to be pre-registered by attackers (slopsquatting). Registry existence is explicitly scoped as not a vulnerability scan (that's the separately tracked, unselected O7). dependency-upgrade/SKILL.md gains a one-line cross-reference to builder's new-dependency check beside its "a version string is a claim" rule, rather than restating it. Source: artifacts/research_ai_coding_frustrations.md Part 3, O15.
Add a "does this diff exceed its stated task?" perspective to
swarm-review's Parallel Review Perspectives: flag unrequested
refactors, drive-by edits outside the task/plan's acceptance
criteria, and dead code left behind; compare against the task/plan's
AC and the PR template's stated scope and Risk Tier field; cite the
diff-size CI job's >400-LOC advisory as the size signal rather than a
hard threshold. Adversarial Questions' Challenge Assumptions gains a
matching question ("What in this diff did nobody ask for?").
code-check/SKILL.md's Audit Dimensions gains a matching Scope
Adherence entry that cross-references swarm-review's lens instead of
restating it, applying the same lens codebase-wide rather than
diff-by-diff.
Source: artifacts/research_ai_coding_frustrations.md Part 3, O17.
4 tasks
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.
Summary
Round-2 units from the research's deferred set, as requested: O10 + O15 + O17 in one PR, three atomic commits. All skill/docs prose — no defaults change, no hooks touched.
What changed
testingskill as policy home,buildercross-reference): bug fixes start from a failing regression test the agent observes fail; features state a falsifiable "done when" first; completion cites evidence (test output, pushed SHA), never narration.docs/hooks.mdgains an opt-in pointer to TDD-Guard-style mechanical enforcement (external, not vendored) that composes with the shipped commit/task gates.builderas policy home): named steps — Grep-first-then-Context7/docs verification for unfamiliar APIs, and a registry-existence check (npm/PyPI/crates.io/pkg.go.dev) before adding any new dependency (slopsquatting defense; explicitly scoped as not-a-vuln-scan — that remains O7).dependency-upgradecross-references it beside "a version string is a claim."swarm-reviewperspective ("does this diff exceed its stated task?" — unrequested refactors, drive-by edits, dead code; compared against task AC + PR-template scope/Risk Tier, citing the diff-size advisory) plus the adversarial question "What in this diff did nobody ask for?"; matchingcode-checkaudit dimension, cross-referenced not restated.Provenance
check-invariants.shALL GREEN;test-hooks.shALL GREEN (untouched hooks stay green); frontmatter/description grep across the full range: zero matches (desc-budget unaffected).code-check's worker-launch list on the grounds that it would be "exactly the kind of drive-by edit U19 itself is about catching" — the lens working before it merged.Risk tier
low — skills/docs prose only; enforcement stays at the skill rung by design (the research's stated honest rung for these three).
Test plan
🤖 Generated with Claude Code