본문으로 건너뛰기
cccskills
무료GitHub에 공개

wiring-contract

Derive this project's own integration conventions from what the code already does, draft them as a wiring contract, and hold new work to it. Closes the built-but-not-wired gap at L3 (walking skeleton) — a mechanism that ships and is never called reads green in every other check.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Wiring Contract

Answer one question for this project and then keep answering it automatically: when something is built here, what does it have to be connected to before it counts as done?

The failure is not carelessness, it is structural. A model's context makes it unable to see whether the element it just generated is referenced anywhere else, so plausible-but-unreferenced code is the expected output. Across 304,362 verified AI-authored commits in 6,275 repositories, "unused variables or parameters" is the second most frequent issue class, and "undefined variable or reference" — writer and reader disagreeing about a name or path — is the most common runtime bug category. It does not wash out: AI-authored code survives longer than human-written code (53.9% vs 69.3% line death rate), so an orphan is less likely to be cleaned up than a human's.

Every ordinary signal misses it. Tests pass, coverage rises, lint is clean, review approves — because each of those verifies a thing against itself, and wiring is a property of a pair.

When to Use

  • At L3, before implementation — the walking-skeleton obligation (G-V13). A design is not complete until its joins are named.
  • On an existing project, once, to discover what conventions it already has.
  • After a structural change (new directory, new layer, a move) — regenerate, never hand-edit.
  • When check_wiring_contract.py reports UNGOVERNED files you did not expect.

Workflow

1. Detect — read the repo's own majority convention

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/check_wiring_contract.py" --root . --detect

This proposes a rule only where the repo already behaves that way, and records the evidence:

- id: wc-002
  pattern: "scripts/*.py"
  obliges:
    - referenced_by: ["**/*"]
  detected_from: "18 of 20 files already satisfy this"
  confidence: 0.90

A rule without observed support is a preference, not a contract. Two obligation types exist and that is deliberate — referenced_by (something outside the file references it, by import, invocation, path, or a glob that matches it) and sibling_reference (a same-directory barrel or registry lists it). Nine specific obligations rot; two general ones that always run do not.

2. Review with the human — this is a draft, not a finding

Present the proposal and ask, per rule, in plain language: "18 of 20 scripts here have a caller. Should that be required?" Watch for two failure shapes:

  • A majority that is an accident. Four files in a directory that happen to be referenced does not make referencing them a rule. Ask what the directory is for.
  • A convention the detector cannot see. Files invoked by reflection, by a registry built at runtime, or by a config string are wired and will look orphaned. These need an exemption with a reason — and "it is hard to check" is not one.

Write the confirmed contract to .claude/harness/wiring-contract.yml. Per the evidence-writes rule, the contract is a human-confirmed draft, never written unattended.

3. Enforce — and put it where the agent will feel it

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/check_wiring_contract.py" --root .

Per G-V14, add this to the command run after every change, not only to CI. Agents respond to automated signals far more reliably than to documentation: a failing command gets fixed, a guardrail paragraph in the context window may not be read at all.

4. Read the UNGOVERNED count — it is the load-bearing number

Files matching no rule are listed with a count. Zero violations across a governed subset is not zero violations. A clean report beside 300 ungoverned files describes the health of a fraction while implying the whole — the precise false green this skill exists to end. Either extend coverage or state why those files are outside it.

Output

  • Creates/updates: .claude/harness/wiring-contract.yml (human-confirmed)
  • Reports: violations, and the ungoverned count
  • Feeds: /mycelium:definition-of-done (G-V14 verification block), /mycelium:bvssh-check (CALMS Automation wiring_integrity)

Theory Citations

  • Cockburn — walking skeleton: "a tiny implementation of the system that performs a small end-to-end function… it should link together the main architectural components." Wiring exists before features.
  • Hunt & Thomas — tracer bullets: the same instinct, framed as end-to-end feedback first.
  • Ford, Parsons, Kua — architecture fitness functions: objective, continuously-executed measures of properties the design must preserve. This check is one, and belongs in the pipeline rather than in a review checklist.

Deliberately NOT a catalogue

Mycelium does not ship a list of integration points to check. A sibling project hand-listed 4 component and 9 plugin integration points; such a list is stale the moment someone adds the tenth, and hand-enumerated scope is the origin of this entire failure family. The rules here are derived from the project in front of you, and regenerated when it changes.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Accessibility audit, scoped to the surfaces a product actually has. Detects web / rendered_markdown / terminal / native_app / video_audio / document / headless, then applies only the criteria that bind. WCAG 2.1 AA in full for web; not at all for headless.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

haabe/mycelium472026년 10월 18일 업데이트

adopt

무료

Bring Mycelium into a project that already has code. Detects that the repo predates the framework, asks before touching anything, then reads the codebase to draft what it CAN establish (delivery, solution shape) and — the actual point — names what it cannot (purpose, strategy, real user evidence). The output is a discovery backlog with a head start, never a filled canvas.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

haabe/mycelium472026년 10월 18일 업데이트

Design the smallest viable test to validate or invalidate a critical assumption. Based on Torres's assumption testing framework, organized by Gilad's AFTER model (Assessment → Fact-Finding → Tests → Experiments → Release Results).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

haabe/mycelium472026년 10월 18일 업데이트

Use before any research activity or significant decision. Reviews cognitive biases relevant to the current stage.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

haabe/mycelium472026년 10월 18일 업데이트

Use to evaluate whether current work aligns with Better Value Sooner Safer Happier. Run at diamond completion and periodically.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

haabe/mycelium472026년 10월 18일 업데이트

Lint canvas files for staleness, missing fields, inconsistent evidence types, and orphaned references. Run periodically or before major transitions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

haabe/mycelium472026년 10월 18일 업데이트

haabe의 스킬 모두 보기

이 스킬의 문제 신고