gate-build
Runs configured build and test commands in tiered order. Captures output as evidence per tier. Returns PASS, FAIL, WARN, or SKIP based on per-tier verdicts.…
Detects unused exports, orphaned files, architecture layer violations, and circular dependencies across changed files. Delegates to architect agent for structural analysis. Internal gate — invoked by verify.
$ npx -y skills add Obsidian-Owl/specwright --skill gate-wiring --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/gate-wiringContext preview
The summary Claude sees to decide when to auto-load this skill.
Detects unused exports, orphaned files, architecture layer violations, and circular dependencies across changed files. Delegates to architect agent for structural analysis. Internal gate — invoked by verify.
name: gate-wiring description: >- Detects unused exports, orphaned files, architecture layer violations, and circular dependencies across changed files. Delegates to architect agent for structural analysis. Internal gate — invoked by verify. allowed-tools: - Read - Bash - Glob - Grep - Write - Task
Ensure the codebase is properly connected — no dead code, no orphaned files, no architecture violations. Code that compiles and passes tests can still be wired incorrectly.
**Scope (MEDIUM freedom):**
**Analysis (HIGH freedom):**
**Verdict (LOW freedom):**
**Cross-unit integration (MEDIUM freedom, multi-unit only):**
When verifying the final unit of a multi-unit design, run additional cross-unit wiring checks against the full feature diff. This catches integration issues invisible to per-unit analysis: missing cross-unit imports, interface mismatches, disconnected entry points.
*Activation predicate* — all four conditions must be true: 1. `workUnits` array exists in the selected work's workflow.json (multi-unit work) 2. `selectedWork.baselineCommit` is non-null 3. `git cat-file -t {baselineCommit}` exits 0 (commit is reachable) 4. All `workUnits` entries except the current `unitId` have status `shipped` or `abandoned`, AND at least one non-current unit has status `shipped` (if all non-current units are `abandoned`, skip with WARN "All prior units abandoned — cross-unit integration check skipped")
If condition 1 is false: skip cross-unit check entirely (single-unit — not applicable, no WARN, no output). If condition 2 is false: skip with WARN "No baseline commit recorded — cross-unit integration check skipped." If condition 3 is false: skip with WARN "Baseline commit {sha} unreachable — cross-unit integration check skipped." If condition 4 is false: skip entirely (not the final unit — no WARN, no output).
*Branch freshness pre-check* — before computing the diff: Run `git merge-base --is-ancestor origin/{config.git.baseBranch} HEAD` (default `origin/main`). If non-zero exit: WARN "Feature branch is behind {baseBranch} — cross-unit diff may be incomplete. Consider rebasing." Continue the check.
*Full-feature diff:* Compute the merge base to scope the diff to feature-only changes:
MERGE_BASE=$(git merge-base {baselineCommit} HEAD)
git diff $MERGE_BASE HEAD --name-onlyUsing the merge base (not `baselineCommit` directly) ensures that after a rebase onto a newer main, the diff includes only files changed on the feature branch — not unrelated files merged to main since design start. If the diff returns empty: WARN "Full-feature diff returned no changed files — cross-unit integration check skipped" and exit without delegating. Filter the file list to only files that exist on HEAD (remove deleted files).
*Architect delegation for cross-unit analysis:* Delegate to `specwright-architect` with: (a) the full-feature file list (HEAD-existing only), (b) the design.md (architect extracts integration-relevant content), (c) `integration-criteria.md` from the design-level directory if present. Instruct the architect to check:
importing code exists in consuming units.
what later units import.
pieces.
imports.
semantic analysis).
*Severity calibration:* Cross-unit structural findings (missing cross-unit import, interface mismatch, disconnected entry point) are BLOCK severity. Dead feature exports are WARN severity. This overrides the per-unit default of WARN. Cross-unit wiring failures represent a non-functional feature, not an advisory cleanup suggestion.
*Unit attribution:* Each cross-unit finding must identify which units are involved (e.g., "Interface mismatch between unit-1 export `PaymentRequest` in `src/types.ts:15` and unit-3 import in `src/checkout.ts:8`").
*Integration criteria handling:* If `integration-criteria.md` is absent: WARN "Integration criteria file not found — IC checks skipped" and continue with structural checks. If the file exists but contains zero IC entries (no lines matching `- [ ] IC-`): WARN "Integration criteria file contains no criteria — IC checks skipped" and continue. If an IC cannot be structurally verified (g
Craft quality software with AI discipline. Spec-driven development plugin for Claude Code and Opencode — quality gates, adversarial testing, and evidence capture.
Repo: Obsidian-Owl/specwright
Runs configured build and test commands in tiered order. Captures output as evidence per tier. Returns PASS, FAIL, WARN, or SKIP based on per-tier verdicts.…
Detects leaked secrets, injection patterns, and sensitive data exposure across changed files. Uses real tooling when configured, LLM judgment for analysis.…
Tiered semantic analysis of changed code (rg → ast-grep → OpenGrep). Detects error-path bugs structural gates miss. Findings default to WARN. Internal —…
Maps every acceptance criterion from the spec to implementation evidence and test evidence. Criteria without evidence fail. The ultimate quality gate. Internal…
Audits test quality — assertion strength, boundary coverage, mock discipline, error path testing. Delegates to the tester agent for adversarial analysis.…
Explicitly adopt an existing work into the current worktree after validating live ownership, stale sessions, and branch consistency.