Skip to content

ship-a-detector: the playbook for authoring a hook or gate detector - #331

Merged
mergify[bot] merged 2 commits into
mainfrom
experiment/wf-1788992325476-4/ship-a-detector-playbook/g0.t0.a-a76871205-482b4fad
Sep 10, 2026
Merged

ship-a-detector: the playbook for authoring a hook or gate detector#331
mergify[bot] merged 2 commits into
mainfrom
experiment/wf-1788992325476-4/ship-a-detector-playbook/g0.t0.a-a76871205-482b4fad

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

Adds product/skills/ship-a-detector, a playbook for writing a hook or gate detector in this repo. Sixty-five of one hundred eighty-five merged PRs touch engine/hooks/, and thirty-seven of those were post-ship repairs across thirteen hooks. The repairs collapse into seven recurring defect kinds, each already solved somewhere in the corpus and none reachable by the next author.

The playbook is an ordered list meant to be copied into a todolist before work starts. A step that does not apply stays in the list marked skip: <reason> rather than disappearing.

Review Claim

Authoring a detector follows one written, ordered sequence whose steps come from the repair history rather than from memory.

Review Lane

behavior

Safety Invariant

Adds no mechanical gate and changes no existing hook. A detector that passes CI today still passes. The only thing that changes is what a future author does before opening a PR. Confirmed by the repository owner.

Slice Rationale

The sequence must exist before anything can route to it, and its steps derive from thirty-seven specific PRs, so writing it is a separate reviewable claim from wiring the routing. The router ships as its own PR.

Non-goals

Does not modify any existing hook. Does not add a CI gate. Does not change create-skill. Does not reimplement what make-pr does; the final step calls it.

Test Plan

Built and verified by Invoker workflow wf-1788992325476-4. Both the implementation task and its verify-ship-a-detector task completed, running check_skill_test_coverage.py, check_skill_trigger_mechanism.py and the full suite. The workflow's terminal __merge__ task then failed on a git conflict, which is why this branch is opened as a PR directly rather than merged by Invoker.

Revert Plan

git revert the merge commit. The change is additive: one new skill directory plus a docs/skill-triggers.md row. Nothing existing depends on it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01F43CBUnsDEs6J2zEC1r8a8


Note

Low Risk
Additive documentation and a new product skill only; no hook, gate, or install script changes.

Overview
Introduces ship-a-detector, an auto-fire product skill that agents should run before writing or widening anything under engine/hooks/ or scripts/check_*.py. It does not change runtime behavior, hooks, or CI — only adds procedural guidance.

The skill points authors at playbooks/detector-lifecycle.md, a 20-step checklist (paste verbatim into a todo; use skip: <reason> instead of deleting steps) covering the seven recurring detector defect classes, fixtures and fail-before/pass-after evidence, install/settings wiring, README and docs/ecosystem.md inventory, full CI commands, then make-pr at step 20. SKILL.md plus fires_example.md / stays_silent_example.md document when description-match should fire vs stay silent.

docs/ecosystem.md gains a product inventory row; docs/skill-triggers.md regenerated so auto-fire count is 19 and ship-a-detector is listed.

Reviewed by Cursor Bugbot for commit ac34e88. Bugbot is set up for automated code reviews on this repo. Configure here.

edbert-bot and others added 2 commits September 9, 2026 15:47
65 of 185 merged PRs in this repo touch engine/hooks/, 13 of 28 hooks
needed post-ship repair, and 37 PRs did nothing but repair a shipped
detector. gh-write-verification hit two already-known kinds in three days
(#322, #323, #324). create-skill never mentions hooks, CONTRIBUTING has no
hook section, and 10 of 31 hooks have no docs/ecosystem.md row.

The playbook is a verbatim 20-step ordered list, copied into a todolist
before task-specific work; a step that does not apply stays in the list
marked `skip: <reason>`. Steps 4-10 are the seven recurring defect kinds,
one per step. Steps 14-18 are the install, README, and inventory tail that
this repo measurably drops. Step 20 hands off to make-pr.

Every numbered step cites the PRs that motivated it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…authoring a detector follows one written, ordered sequence whose steps come from the repair history rather than from memory.

Review lane: behavior
Safety invariant: the playbook adds no new mechanical gate and changes no existing hook, so a detector that passes CI today still passes; it can only change what a future author does before opening a PR.
Slice rationale: the sequence has to exist before anything can route to it, and its steps are derived from thirty-seven specific PRs, so writing it is a separate reviewable claim from wiring the routing.
Architectural effect: adds the repo's second playbook package; its final step calls the existing make-pr skill rather than duplicating publication.
Goal: add product/skills/ship-a-detector with a playbook carrying the ordered steps that the thirty-seven repair PRs imply.
Effectiveness measurement: each of the seven recurring defect kinds maps to a numbered step, and each step cites the PR numbers that motivated it, so a reader can check the step against the incident rather than trusting the author.
Motivation: gh-write-verification shipped this month and hit two of the seven known kinds within three days, authored by an agent with the whole corpus available; the knowledge existed and was not reachable.
Alternative considerations: adding the steps to create-skill was rejected because that skill covers skills rather than hooks and mixing them would bury both; a new hook was rejected because the gap is a missing order, not a missing check.
Implementation details: the seven kinds are target and scope resolution, false positive on quoted or fenced content, missed near-miss shape, retry-loop behaviour under stop_hook_active, first-failure exit hiding a second check, unreadable input reported as clean, and lifecycle state across turns.
Non-goals: does not modify any existing hook, does not add a CI gate, does not change create-skill, does not reimplement what make-pr does.
Layer: domain
Feature state: active
Files: product/skills/ship-a-detector/** (new)
Change types: new skill, new playbook
Acceptance criteria: check_skill_test_coverage.py passes for the new skill, and every numbered step cites at least one PR number.

Exit code: 0
@cursor

cursor Bot commented Sep 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_f4edefff-78d5-4176-a66f-5bf1481cd812)

@mergify

mergify Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@EdbertChan

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify

mergify Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 4 minutes 49 seconds in the queue, including 3 minutes 27 seconds running CI.

Required conditions to merge
  • check-success = lint
  • check-success = test

@mergify mergify Bot added the queued label Sep 10, 2026
@mergify
mergify Bot merged commit e23737a into main Sep 10, 2026
4 checks passed
@mergify mergify Bot removed the queued label Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants