---
description: Perform a read-only consistency analysis across spec.md, plan.md, tasks.md, and ADR sources for the active ss-tools feature.
---

## User Input

```text
$ARGUMENTS
```

You **MUST** consider the user input before proceeding (if not empty).

## Goal

Identify inconsistencies, ambiguities, coverage gaps, and decision-memory drift across the feature artifacts before implementation proceeds.

## Operating Constraints

**STRICTLY READ-ONLY**: Do not modify files.

**Constitution Authority**: `.specify/memory/constitution.md` is the local constitutional baseline for this workflow. Conflicts with its must-level principles are CRITICAL.

## Execution Steps

1. Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` and derive absolute paths for `spec.md`, `plan.md`, `tasks.md`, and relevant ADR sources under `docs/adr/`.
   - Analyze the active feature directory under `specs/<feature>/` only.

2. Load minimal necessary context from:
   - `spec.md`
   - `plan.md`
   - `tasks.md`
   - `contracts/modules.md` when present
   - `README.md`
   - `.specify/memory/constitution.md`
   - relevant `docs/adr/*.md`

3. Build internal inventories for:
   - requirements
   - user stories and acceptance criteria
   - task coverage
   - constitution principles
   - ADR / decision-memory guardrails

4. Detect high-signal issues only:
   - duplication
   - ambiguity
   - underspecification
   - constitution conflicts
   - coverage gaps
   - terminology drift
   - repository-structure mismatches (e.g., Rust/MCP paths in a Python/Svelte project)
   - decision-memory drift and rejected-path scheduling

5. Produce a compact Markdown report with:
   - findings table
   - coverage summary table
   - decision-memory summary table
   - constitution alignment issues
   - unmapped tasks
   - metrics

6. Provide next actions:
   - CRITICAL/HIGH issues should be resolved before `speckit.implement`
   - lower-severity issues may be deferred with explicit rationale

## Analysis Rules

- Treat stale Rust/MCP assumptions in plan/tasks as real defects for this Python/Svelte repository.
- Treat missing ADR propagation as a real defect, not a documentation nit.
- Prefer repository-real expectations (`backend/src/**/*.py`, `frontend/src/**/*.svelte`, `backend/tests/`, `frontend/src/lib/**/__tests__/`).
- Do not treat `.kilo/plans/*` as feature artifacts for consistency analysis.
