analyze

A read-only command that checks a feature specification, implementation plan, and task list for consistency and quality after task generation.

In plain words
What is it for?
It is for reviewing spec.md, plan.md, and tasks.md together and reporting issues that may need correction.
Why use it?
It finds contradictions, duplicates, ambiguities, and missing details before implementation starts, while leaving the files unchanged.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/knitli/codeweaver/analyze
Clone the repo
git clone --depth 1 https://github.com/knitli/codeweaver

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,358 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 91% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01358
Opus 5 $0.00000 $0.00679
Sonnet 5 $0.00000 $0.00272
Haiku 4.5 $0.00000 $0.00136

Measured 2d ago against content hash ccd3374ed4fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

analyze scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

91% identical to analyze — 11 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/analyze.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.


description: Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.

The user input to you can be provided directly by the agent or as a command argument - you MUST consider it before proceeding with the prompt (if not empty).

User input:

$ARGUMENTS

Goal: Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (spec.md, plan.md, tasks.md) before implementation. This command MUST run only after /tasks has successfully produced a complete tasks.md.

STRICTLY READ-ONLY: Do not modify any files. Output a structured analysis report. Offer an optional remediation plan (user must explicitly approve before any follow-up editing commands would be invoked manually).

Constitution Authority: The project constitution (.specify/memory/constitution.md) (path relative to repo root) is non-negotiable within this analysis scope. Constitution conflicts are automatically CRITICAL and require adjustment of the spec, plan, or tasks—not dilution, reinterpretation, or silent ignoring of the principle. If a principle itself needs to change, that must occur in a separate, explicit constitution update outside /analyze.

Execution steps:

  1. Run .specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:

    • SPEC = FEATURE_DIR/spec.md
    • PLAN = FEATURE_DIR/plan.md
    • TASKS = FEATURE_DIR/tasks.md Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command).
  2. Load artifacts:

    • Parse spec.md sections: Overview/Context, Functional Requirements, Non-Functional Requirements, User Stories, Edge Cases (if present).
    • Parse plan.md: Architecture/stack choices, Data Model references, Phases, Technical constraints.
    • Parse tasks.md: Task IDs, descriptions, phase grouping, parallel markers [P], referenced file paths.
    • Load constitution .specify/memory/constitution.md for principle validation (path relative to repo root).
  3. Build internal semantic models:

    • Requirements inventory: Each functional + non-functional requirement with a stable key (derive slug based on imperative phrase; e.g., "User can upload file" -> user-can-upload-file).
    • User story/action inventory.
    • Task coverage mapping: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases).
    • Constitution rule set: Extract principle names and any MUST/SHOULD normative statements.
  4. Detection passes: A. Duplication detection:

    • Identify near-duplicate requirements. Mark lower-quality phrasing for consolidation. B. Ambiguity detection:
    • Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria.
    • Flag unresolved placeholders (TODO, TKTK, ???, , etc.). C. Underspecification:
    • Requirements with verbs but missing object or measurable outcome.
    • User stories missing acceptance criteria alignment.
    • Tasks referencing files or components not defined in spec/plan. D. Constitution alignment:
    • Any requirement or plan element conflicting with a MUST principle.
    • Missing mandated sections or quality gates from constitution. E. Coverage gaps:
    • Requirements with zero associated tasks.
    • Tasks with no mapped requirement/story.
    • Non-functional requirements not reflected in tasks (e.g., performance, security). F. Inconsistency:
    • Terminology drift (same concept named differently across files).
    • Data entities referenced in plan but absent in spec (or vice versa).
    • Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note).
    • Conflicting requirements (e.g., one requires to use Next.js while other says to use Vue as the framework).

Read the full file on GitHub · 109 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 109 lines · 0 tokens per session scan A ccd3374ed4fb

Subscribe to this mod's changes

analyze is a command published in the GitHub repository knitli/codeweaver (12 stars, last pushed 2mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,358 tokens. A static security scan graded it A with 0 findings. It is 91% identical to analyze, differing in 11 lines, and is treated as a copy.