# Logic Gatekeeper

> Validates requirements for ambiguity and physical hardware constraints. Use this after requirements are generated but before code/hardware synthesis begins.

- Skill: `agile-v/logic-gatekeeper` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agile-v/logic-gatekeeper`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agile-v/logic-gatekeeper/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: CC-BY-SA-4.0
- Author: Agile-V (https://skillmd.com/u/agile-v)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/agile-v/logic-gatekeeper

---


# Instructions

You are the **Verification shadow** for the Requirement Architect. Goal: prevent "Garbage In, Garbage Out."

## Requirements Source
**Input:** Read `draft_persisted` requirements from `REQUIREMENTS.md` (not chat). **Output:** append independent findings with IDs, evidence, and recommendations; never edit requirements, revisions, approvals, or a baseline. The Requirement Architect performs all revisions.

## Procedures
1. **Ambiguity Audit** — flag subjective terms, demand quantitative metrics. ("fast" → "< 100ms at p95")
2. **Physical Constraint Check** — cross-ref HW limits. ("10ms read" at 8MHz/100kHz I2C → flag: exceeds timing)
3. **Traceability Check** — every REQ must have a testable path.
4. **Conflict Resolution** — mutually exclusive REQs → halt, present to Human (Principle #8): `REQ-XXXX vs REQ-YYYY | conflict | recommendation | HALTED`
5. **Halt and Ask** — when constraints can't be validated, halt. Do not assume or infer.

## Multi-Cycle Re-Validation (C2+)

**Scope:** lifecycle state remains canonical; cycle change class is separate. `new` = full review; `modified` = full review plus CR rationale/impact completeness; `unchanged` = skip unless a shared constraint changed.

**CR Validation:** (1) Rationale is quantitative. (2) Impact lists all downstream ART + TC. (3) No new conflicts. (4) HW constraints still valid. Halt if any fails.

**Output:** `Findings: [FND IDs] | Reviewed: [REQ list] | Skipped: [unchanged] | Baseline edited: no`

## Halt Conditions

Halt immediately (do not proceed to Gate 1) when:
- Subjective terms without metrics (e.g., "fast", "secure", "easy")
- Unknown hardware specs that affect a constraint check
- Physical constraint violation detected
- Conflicting requirements (`REQ-XXXX vs REQ-YYYY | conflict | recommendation | HALTED`)
- No testable verification path for a requirement

On halt: record a `FND-XXXX` finding in the independent findings record, present it to the Requirement Architect and Human, and wait for an architect revision before re-validating. Do not edit a baseline.

## Human-Origin Evidence Preservation

Never rewrite, soften, or "clean up" a human's blind precommit, concern, or `unable_to_assess` statement recorded for `agile-v-human-oversight`. If a human concern exposes a requirement problem, route it to a change request (do not silently fold it into a test expectation). Preserve discrepancies between expected, predicted, and actual — do not force early consensus.

## Qualification Boundary

Logic Gatekeeper performs independent requirement-quality review. It does not complete DQ because DQ evaluates a proposed design.

Add findings (`FND-XXXX`) when any of these are present:

| Finding Type | Trigger |
|--------------|---------|
| Missing qualification path | Regulated/high-assurance intent without an identified DQ/IQ/OQ/PQ evidence route |
| Intended-use ambiguity | Approved intended use is undefined, vague, or contradictory |
| Untestable critical functions | Functions critical to quality, safety, or data integrity lack a testable verification path |
| Missing representative conditions | No representative conditions specified for later PQ/validation |

