Skip to content

docs(skill): harden SKILL.md into a bug-prevention guardrail - #11

Merged
dksingh1997 merged 1 commit into
mainfrom
strengthen-skill
Jun 27, 2026
Merged

docs(skill): harden SKILL.md into a bug-prevention guardrail#11
dksingh1997 merged 1 commit into
mainfrom
strengthen-skill

Conversation

@dksingh1997

Copy link
Copy Markdown
Owner

Make SKILL.md strong enough that we stop pushing bugs

SKILL.md was good advice. This makes it an enforceable gate. Every rule now traces to a real failure we hit shipping Tiers 1–4, with copy-paste commands to catch it.

What's new

  • The Iron Laws (up front, read every time): 8 non-negotiables — proof-before-ship, run the suite 3×, never break a passing test, additive-only at the boundary, zero runtime deps, reserve ports, code+docs in one commit, clean diff.

  • §9 VERIFY — the gate you cannot skip. Replaces the soft "run before declaring done" with:

    • Self-audit commands (syntax check, zero-dep import scan, console.log scan, manifest/port validity, diff review) — all verified to run correctly against the current repo.
    • The 3× full-suite rule spelled out as mandatory, with the leaked-process check (pgrep).
    • Live smoke step per change type (emulator / CLI / MCP / control plane).
    • A tightened Definition-of-Done checklist.
  • §10 "Bugs we will not ship again" — a table of the actual failures from this repo's history, each mapped to the rule that prevents it:

    Bug Prevented by
    4700/ec2 port collision silently disabled a service prove the port is free + not an infra default; live smoke
    getFreePort() race → intermittent EADDRINUSE (passed run 1, failed run 3) allocate-and-bind-with-retry; run suite 3×
    MCP console.log corrupted its own JSON-RPC stream MCP logs to stderr only
    bulk script reformatted 27 untouched manifests review the diff; no churn
    seed() shipped for 2 of 4 services but docs implied all state scope explicitly
    stacked PRs left children off main prefer single PRs; verify main after merge
    refactor risked launcher behavior drift refactors prove parity
  • §11 SHIP — PR hygiene (single PRs to main; verify main actually contains the code post-merge; paste verification results in the PR body).

  • Strengthened §1 (prove the port is free and4600) and §5 (the retry pattern for booting multiple servers; assert concrete values; clean up to avoid cross-file leaks; never paper over flake with sleep/timeouts).

Verification

Docs-only change. I ran every command embedded in the new sections to confirm they work as written (fixed one zsh glob-quoting issue in the import-audit command). +201/−32 lines, no code touched.

Independent of the feature PRs — safe to merge straight to main.

Turns SKILL.md from advisory into an enforceable gate, codifying every bug
class we actually hit shipping Tiers 1-4 so they can't recur.

Added:
- The Iron Laws — 8 non-negotiables up front (proof-before-ship, 3x suite,
  never break a passing test, additive-only, zero-dep, reserve ports, code+docs
  together, clean diff).
- Section 9 VERIFY — a hard gate with copy-paste self-audit commands (syntax,
  zero-dep import check, console.log check, manifest/port validity, diff
  review), the mandatory 3x full-suite rule, leaked-process check, and a live
  smoke step per change type. All commands verified to run correctly.
- Section 10 'Bugs we will not ship again' — a table of real failures (the
  4700/ec2 port collision, the getFreePort EADDRINUSE race, MCP stdout
  corruption, manifest formatting churn, half-shipped feature, stacked-PR merge
  gap, refactor behavior drift) each mapped to the rule that prevents it.
- Section 11 SHIP — PR hygiene (prefer single PRs to main; verify main actually
  contains the code after merge; paste verification results in the PR body).
- Strengthened section 1 (prove the port is free + not 4600) and section 5
  (allocate-and-bind-with-retry port pattern; assert concrete values; clean up
  to avoid leaks; never paper over flake with sleeps/timeouts).
@dksingh1997
dksingh1997 merged commit 062fb14 into main Jun 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant