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.…
Tiered semantic analysis of changed code (rg → ast-grep → OpenGrep). Detects error-path bugs structural gates miss. Findings default to WARN. Internal — invoked by verify.
$ npx -y skills add Obsidian-Owl/specwright --skill gate-semantic --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/gate-semanticContext preview
The summary Claude sees to decide when to auto-load this skill.
Tiered semantic analysis of changed code (rg → ast-grep → OpenGrep). Detects error-path bugs structural gates miss. Findings default to WARN. Internal — invoked by verify.
name: gate-semantic description: >- Tiered semantic analysis of changed code (rg → ast-grep → OpenGrep). Detects error-path bugs structural gates miss. Findings default to WARN. Internal — invoked by verify. allowed-tools: - Read - Bash - Glob - Grep - Write
Detect semantic bugs in changed code using symbolic pre-processing when available. For each candidate finding, localize it explicitly with premises, claims, and conclusion grounded in file:line evidence.
**Scope (MEDIUM freedom):** Changed code files only. Skip markdown/JSON/YAML/config. No changed code → PASS.
**Tool tiers (LOW freedom):** Resolve from `gates.semantic.tools` config, fall back to PATH detection. Missing tools narrow scope — never FAIL or ERROR. Validate `sg` identity: `sg --version 2>&1 | grep -iq 'ast-grep'` (`/usr/bin/sg` from shadow-utils is a false positive).
| Tier | Tool | Adds | |------|------|------| | 0 | rg | Text-pattern extraction + LLM | | 1 | ast-grep (`sg`) | Structural JSON, metavariable capture | | 2 | OpenGrep | Cross-function taint (rules: config `rulesDir` or `.opengrep/rules/`) |
**Extraction (HIGH freedom):** Extract structural facts using highest available tier's tool. Feed facts (not raw files) to LLM. Tier 1: `sg scan <file> --json --rule <rule>` or `sg run --pattern '...' <file> --json` (avoid `--stdin`). Tier 2: `opengrep scan --config <rules-dir> --json <file>`.
**Categories (LOW freedom):**
| Category | Tier | Diagnostic question | |----------|------|-------------------| | error-path-cleanup | 0+ | Does any error path skip releasing an acquired resource? | | unchecked-errors | 0+ | Is any error-producing call's return value discarded? | | fail-open-handling (CWE-636) | 1+ | Does any catch block swallow, broaden, or ignore errors? | | error-data-leakage (CWE-209) | 1+ | Does any error response expose internals to the caller? | | resource-lifecycle | 2+ | Is any acquired resource not released on all exit paths? |
Categories requiring an unavailable tier are skipped with an INFO note. Sole owner of CWE-636 and CWE-209 analysis (transferred from gate-security to avoid duplicate findings).
**Verdict (LOW freedom):** Per `protocols/evidence.md#verdict-rendering`. All findings WARN by default. No findings = PASS. WARN-only = WARN. Any BLOCK = FAIL.
Tier 0 categories: **permanently WARN-only**. Tier 1+ may promote to BLOCK when: (1) ≥5 shipped units, (2) FP rate <10% per `evidence.md#verdict-rendering` calibration, (3) user opt-in via config `{"severity": "block"}`.
**Evidence report:** Tool availability, skipped categories with reason, each finding with category, file:line, tier/tool, severity, remediation.
| Condition | Action | |-----------|--------| | Disabled in config | sw-verify skips silently | | No changed code files | PASS | | No symbolic tools | Degrade to Tier 0 | | Tool missing at runtime | WARN, skip tier | | No calibration data | All findings WARN |
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.…
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.…
Detects unused exports, orphaned files, architecture layer violations, and circular dependencies across changed files. Delegates to architect agent for…
Explicitly adopt an existing work into the current worktree after validating live ownership, stale sessions, and branch consistency.