Spec review

From liza-mas/liza · View interactive version

Spec review is an AI agent skill from the GitHub repository liza-mas/liza. Specification Review Protocol

How to use this skill

Skill file

Purpose

Review technical specifications for inconsistencies, gaps, contradictions, and ambiguities. This skill is for finding specification issues, not proposing design changes.

Trigger

Use this skill when:

Reference-First Planning Artifacts

When the reviewed artifact contains ## Source References, apply the shared

Reference-First Authoring contract and ADR-0133.

The assigned carrier plus its declared direct references is the review corpus; do not require a

broad parent or ancestor read when those spans are sufficient. Mechanical path, revision, anchor,

and freshness checks are compositor-owned. The reviewer owns semantic coverage and authority.

Reject a strict planning artifact for any of these contract violations:

  1. an inherited requirement, constraint, threshold, or interface has no direct reference;
  2. unchanged inherited prose is presented as a local decision;
  3. the artifact requires a full-parent read when an assigned anchor is sufficient;
  4. a local statement conflicts with its inherited owner;
  5. output[] is used as a second detailed specification;
  6. detailed prose is duplicated only to make Markdown and output[] character-identical;
  7. a correction accumulates unchanged or resolved history;
  8. an assigned obligation maps to no reference, or its mapped anchor span omits that obligation;
  9. a priority is silently promoted, demoted, or dropped, a bound is tightened or an obligation

added past its source (Reference-First Authoring, Bounds), Must coverage is missing, or

Won't scope is included;

  1. the next role cannot act from the assigned scope and references without inventing policy or

waiting on an unallocated prerequisite, evidence is demanded at the wrong stage, or a frozen

scope, preservation directive, or unchecked existing-source premise blocks a binding obligation; or

  1. a consequential guarantee has no owner and evidence.

A finding cannot create a commitment: before blocking, name the binding requirement, exclusion,

or correctness obligation the artifact violates. A demand for a Should/Could feature, a stronger

unspecified guarantee, or Won't scope is at most a non-blocking suggestion; a real Must conflict

is reported with evidence and routed to the human.

Repeated labels and IDs, short task intents, exact action-boundary values, and clearly marked

quotations are permitted. Marker-free legacy artifacts retain the existing review path.

Inputs

The user should provide:

If not provided, ask:

To review your specifications, I need:
1. Where are the spec files? (e.g., specs/, docs/)
2. Any specific concerns to focus on?

Protocol

Corpus Size

If token limits force truncation mid-analysis, stop and report:

Phase 1: Discovery

  1. Map the specification corpus
  1. Classify documents
  1. Read all documents completely

Phase 2: Analysis

Review against these categories. For each issue found, record:

Issue Types

| Type | Definition |

|------|------------|

| Inconsistency | Same concept defined differently in different places |

| Gap | Missing information the artifact's next consumer needs |

| Contradiction | Two statements that cannot both be true |

| Ambiguity | Statement that can be interpreted multiple ways |

| Missing Reference | Cross-reference to non-existent section or document |

| Undefined Term | Term used without definition |

Severity Levels

| Severity | Definition |

|----------|------------|

| Critical | Blocks implementation or causes runtime failure |

| High | Causes significant confusion or likely bugs |

| Medium | Reduces spec quality, may cause minor issues |

| Low | Nitpick, polish, or style issue |

Phase 3: Systematic Checks

Apply these checks to the specification corpus at the precision its next consumer needs. Detail a later stage owns (formats, thresholds, field specs below an epic or story) is not a Gap. Never ask an artifact to originate or tighten a bound.

1. Cross-Document Consistency
2. Completeness
3. Logical Consistency
4. Edge Cases
5. Undefined or Ambiguous Terms
6. Error Handling
7. Testability

Phase 4: Report

Generate report in this format:

# Specification Review: [Project/Component Name]

## Summary

- Critical: N
- High: N
- Medium: N
- Low: N

---

## Critical Issues

### [Issue Title]

- **Location:** file.md:123 or file.md#section
- **Type:** [Issue Type]
- **Description:** [What's wrong]
- **Suggestion:** [How to fix]

---

## High Issues

[Same format]

---

## Medium Issues

[Same format]

---

## Low Issues

[Same format]

---

## Recommendations

[Overall observations about spec quality and suggested improvements]

Constraints

Examples

Example Issue: Inconsistency

### Agent State Missing from State Machine

- **Location:** roles.md:330 vs state-machines.md:102-108
- **Type:** Inconsistency
- **Description:** roles.md shows agents register with `status: STARTING`, but state-machines.md only defines IDLE, WORKING, WAITING, HANDOFF. STARTING is not a valid state.
- **Suggestion:** Add STARTING to state machine with transition STARTING → IDLE, or change registration to use IDLE.

Example Issue: Gap

### Grace Period Duration Undefined

- **Location:** state-machines.md:263
- **Type:** Undefined Term
- **Description:** Validation rule references "grace period" but duration is never defined.
- **Suggestion:** Define explicitly (e.g., "60 seconds") or reference related timing constant.

Example Issue: Contradiction

### Backoff Timing Mismatch

- **Location:** design.md:50-55 vs implementation.md:120-125
- **Type:** Contradiction
- **Description:** design.md specifies exponential backoff (10s, 20s, 40s), but implementation.md shows fixed 5s delay.
- **Suggestion:** Align documents — update implementation to match design or document the simplification.

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.