verify-loop

A command that runs the project's complete local verification process. It checks types, code style, tests, and whether generated files still match their source files.

In plain words
What is it for?
Verifying changes in a TypeScript project, especially changes to its grammar, command-line interface, schemas, documentation, or generated artifacts.
Why use it?
It catches broken code and outdated generated files before a change is proposed. When generated output is wrong, it points developers back to the source that should be edited.

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/chanmeng666/archlang/verify-loop
Clone the repo
git clone --depth 1 https://github.com/ChanMeng666/archlang

Made for: Claude Code.

Per session 11 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,224 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00011 $0.01224
Opus 5 $0.00005 $0.00612
Sonnet 5 $0.00002 $0.00245
Haiku 4.5 $0.00001 $0.00122

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

Security

Grade A, and why

verify-loop 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.

.claude/commands/verify-loop.md · 83 lines

How it starts

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

Verify loop

The single command to prove a change is sound before proposing it. Run the two aggregate scripts and report a pass/fail table.

Steps

  1. npm run check — typecheck (noUncheckedIndexedAccess on) + biome check + the full vitest suite. All three must be green.

  2. npm run check:drift — runs every generator and fails if any generated artifact differs from its committed form.

    • If a drift step fails, run the matching npm run gen:* (or npm run gen:all) to regenerate the artifact from its source, then re-run npm run check:drift.
    • NEVER hand-edit a generated file to make drift pass. The nine generated artifacts (editors/archlang.tmLanguage.json, playground/src/arch-language.js, docs/error-codes.md, docs/cli-reference.md, spec.llm.md, llms-full.txt, grammars/archlang.gbnf, schemas/plan.schema.json, schemas/intent.schema.json) are outputs — edit the source (src/grammar/tokens.ts, src/error-catalog.ts, src/manifest.ts, SKILL.md, examples/, PLAN_JSON_SCHEMA, INTENT_JSON_SCHEMA) and regenerate.
    • If you touched the CLI, expect docs/cli-reference.md to move — it is generated from src/manifest.ts. Read that diff; it is the one artifact a CLI change always rewrites.
  3. npm run typecheck:all — REQUIRED whenever the change touched anything outside src/ + test/; skippable (and worth skipping, it is slow) when it did not. Step 1's typecheck only covers src; this adds the root dev config (test, eval, dataset, scripts, bench) plus the playground, docs-site (vue-tsc), MCP shim and VS Code extension. CI runs it in the builds job.

    • A TS2345 … | undefined on a workspace file that tsc -p <workspace> calls clean means a ROOT test imported that module into the strict root program. Fix it in the shared module — never by relaxing the root option (AGENTS.md → Gotchas; docs/testing.md §4).
  4. Conditional gates — run the ones the diff earns:

    • touched docs/*.md or docs-site/npm run docs:build (the core suite never compiles the site).
    • touched playground/npm run build && npm run playground:build:only && npm run e2e:playground.
    • touched docs-site/npm run build && npm run docs:build:only && npm run e2e:docs.
    • touched packages/mcpnpm run mcp:build && node packages/mcp/scripts/check-dist-resources.mjs.
    • touched editors/vscodenpm run vscode:build:only && npx vitest run editors/vscode (the stdio + bundle-freshness tests SKIP without a built bundle).

Read the full file on GitHub · 83 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 · 83 lines · 11 tokens per session scan A 6a58fd61321d

Subscribe to this mod's changes

verify-loop is a command published in the GitHub repository ChanMeng666/archlang (8 stars, last pushed 2d ago), licensed MIT. It adds 11 tokens to every session and 1,224 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.