check-state

check-state is a command for Claude Code from navraj007in/architecture-cowork-plugin. It costs 16 tokens per session (2,327 once invoked), scanned A, original, Apache-2.0.

A command that checks whether a project's central state file is valid and consistent. The state file records information shared by many project commands.

In plain words
What is it for?
Use it to inspect `architecture-output/_state.json`, generate a validation report, and optionally fix simple issues or treat warnings as failures.
Why use it?
It detects incorrect data types, outdated values, missing required information, and commands writing fields they do not own.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

Part of the architect plugin — 48 skills, 63 commands, 19 agents, 7 MCP servers shipped together

Good fit Use it to inspect architecture-output/_state.json, generate a validation report, and optionally fix simple issues or treat warnings as failures.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/navraj007in/architecture-cowork-plugin/check-state
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.

Clone the repo
git clone --depth 1 https://github.com/navraj007in/architecture-cowork-plugin

Made for: Claude Code.

Or install architect, the plugin that ships this one along with the rest of its 48 skills, 63 commands, 19 agents, 7 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for check-state

README.md
[![agentmods](https://agentmods.dev/badge/commands/navraj007in/architecture-cowork-plugin/check-state/github.svg)](https://agentmods.dev/commands/navraj007in/architecture-cowork-plugin/check-state)
Your own site
<a href="https://agentmods.dev/commands/navraj007in/architecture-cowork-plugin/check-state"><img src="https://agentmods.dev/badge/commands/navraj007in/architecture-cowork-plugin/check-state/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for check-state

Your own site · 80×15
<a href="https://agentmods.dev/commands/navraj007in/architecture-cowork-plugin/check-state"><img src="https://agentmods.dev/badge/commands/navraj007in/architecture-cowork-plugin/check-state.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,327 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.1 $0.00016 $0.02327
Opus 5 $0.00008 $0.01163
Sonnet 5 $0.00003 $0.00465
Haiku 4.5 $0.00002 $0.00233

Measured 12d ago against content hash c1f8e7dfb07b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

check-state 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 12d 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.

commands/check-state.md · 258 lines

How it starts

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

/architect:check-state

Validates _state.json for schema compliance, type errors, and per-command write rule violations. Identifies stale fields, missing required sections, and inconsistencies across state.

Trigger

/architect:check-state
/architect:check-state [--fix]     # auto-fix simple issues
/architect:check-state [--strict]  # fail on warnings (not just errors)

Purpose

The _state.json file accumulates output from 50+ commands, each owning specific fields. Over time, inconsistencies emerge:

  • Field values that don't match their declared type (e.g., project.stage is array instead of enum)
  • Stale fields (set by command A, never updated, contradicts current command B output)
  • Missing required fields for the project's stage
  • Violations of per-command write rules (command X overwrote field owned by command Y)

This command scans the state file and reports all issues with severity levels.

Input

No required input. Reads architecture-output/_state.json in the current project.

Output Files

1. architecture-output/state-check-report.md (always generated)

# State Validation Report

**Date:** 2026-04-24 14:32:10  
**Project:** my-startup  
**Stage:** growth  

## Summary

✅ **Pass Rate:** 87/92 checks passed (94%)
❌ **Critical Errors:** 2
⚠️  **Warnings:** 3
ℹ️  **Info:** 0

---

## Critical Issues

### 1. Invalid type: `project.stage` (CRITICAL)
**Field:** `project.stage`  
**Expected:** `"concept" | "mvp" | "growth" | "enterprise"`  
**Actual:** `["mvp", "growth"]` (array, not string!)  
**Consequence:** Downstream commands interpret stage as growth only; this breaks cost estimation and roadmap generation.  
**Fix:** `jq '.project.stage = "growth"' _state.json > _state.json.fixed && mv _state.json.fixed _state.json`

### 2. Stale field: `blueprint.deepen_passes` (CRITICAL)
**Field:** `blueprint.deepen_passes`  
**Value:** `0` (set 30 days ago)  
**Problem:** Current blueprint shows `deepen_passes: 3`, but state shows `0`. This contradicts the actual output.  
**Consequence:** Next blueprint run may not deepen correctly.  
**Fix:** Update to `3` or delete (will be regenerated by next blueprint run).  
**Command:** `jq '.blueprint.deepen_passes = 3' _state.json > _state.json.fixed && mv _state.json.fixed _state.json`

---

## Warnings

### 1. Write-rule violation: `design` field (WARNING)
**Field:** `design`  
**Owned by:** `design-system` command  
**Last modified:** 2026-04-20 (blueprint ran on 2026-04-20, may have overwritten design tokens)  
**Consequence:** Design is out of sync with actual design-system output.  
**Suggested fix:** Run `/architect:design-system` to refresh design tokens.

### 2. Missing recommended field: `entities` (WARNING)
**Stage:** growth  
**Recommendation:** growth-stage projects should have `entities` defined (currently absent).  
**Consequence:** Data-model generation will fall back to SDL entities only (may miss business logic).  
**Suggested fix:** Run `/architect:generate-data-model` to populate entities.

### 3. Unused field: `cost_estimate.old_currency_format` (WARNING)
**Field:** `cost_estimate.old_currency_format`  
**Found:** This field is not in the canonical schema and may be stale.  
**Consequence:** Ignored by all commands.  
**Suggested fix:** Delete via `jq 'del(.cost_estimate.old_currency_format)'`

---

## Schema Validation Passed

✅ All top-level fields are correct types  
✅ All project stage requirements met (growth stage)  
✅ All command-owned field write rules respected (no overlaps)  
✅ Design colors are valid hex (6 verified)  
✅ Component types are recognized (8 components)  
✅ Entity schema looks good (12 entities, all with types)

---

## Recommendations

**Priority 1 (run immediately):**
1. Fix `project.stage` type (array → string)
2. Reconcile `blueprint.deepen_passes` (0 → 3)

**Priority 2 (run before next major command):**
3. Run `/architect:design-system` to refresh design tokens
4. Run `/architect:generate-data-model` to populate entities

**Priority 3 (clean-up, can wait):**
5. Remove unused `cost_estimate.old_currency_format` field

---

## Fix Instructions

**Auto-fix (safe issues only):**
```bash
/architect:check-state --fix

This will:

  • Correct type mismatches (array → string, etc.)
  • Remove unknown fields
  • Preserve all data
  • Create backup before modifying

Manual fixes:

Read the full file on GitHub · 258 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. 12d ago First seen · 258 lines · 16 tokens per session scan A c1f8e7dfb07b

Subscribe to this mod's changes

check-state is a command published in the GitHub repository navraj007in/architecture-cowork-plugin (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 16 tokens to every session and 2,327 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.