origin-check

A checkpoint that compares a feature's working plan with the user's original idea and reports whether the plan has drifted.

In plain words
What is it for?
It helps confirm that a planned feature remains faithful to the request and raises an escalation when the alignment is uncertain.
Why use it?
It catches misunderstandings before implementation or review, when changing direction is still easier.

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/gosha70/code-copilot-team/origin-check
Clone the repo
git clone --depth 1 https://github.com/gosha70/code-copilot-team

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,044 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.00000 $0.01044
Opus 5 $0.00000 $0.00522
Sonnet 5 $0.00000 $0.00209
Haiku 4.5 $0.00000 $0.00104

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

Security

Grade A, and why

origin-check 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.

adapters/claude-code/.claude/commands/origin-check.md · 93 lines

How it starts

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

Run the origin-confirmation circuit breaker for a feature. Validates that the working spec/plan is a faithful realisation of the user's original idea, and surfaces an interactive escalation if it has drifted.

When to use this

  • Before announcing plan approval (Plan agent / human reviewer).
  • As the build agent's first action, before delegating any sub-agent work.
  • Before /phase-complete (it's already wired into the post-phase checklist, but /origin-check lets you preview the verdict).
  • Any time you suspect a spec has drifted from the user's actual ask.

The full protocol lives in shared/skills/origin-confirmation/SKILL.md.

Argument

$ARGUMENTS — the feature_id of the spec under specs/<feature_id>/ or specs/pitches/<feature_id>/. If empty, ask the user which feature to check before proceeding.

Procedure

  1. Check the script. Run bash scripts/check-origin-alignment.sh "$ARGUMENTS". Capture both the exit code and the printed message.

  2. If exit 0 — proceed clean. Tell the user the feature is aligned and stop.

  3. If exit 1 — proceed with warning. Tell the user the alignment record's confidence is medium/low and recommend re-running the alignment-check protocol with full origin sources read into context.

  4. If exit 4 — there's no alignment record yet, or the latest one is older than the most recent edit to plan.md / spec.md. Run the origin_alignment_check procedure from shared/skills/origin-confirmation/SKILL.md end-to-end:

    • Read every link in the origin: block of specs/<feature_id>/plan.md (issue body via gh issue view, URLs via WebFetch, transcripts from disk).
    • State the origin claim verbatim (quote the origin_claim paragraph or the strongest origin sentence).
    • State the working claim (one paragraph derived from the current spec.md).
    • List concrete mismatches as bullets, or none.
    • Render the verdict block.
    • Append the block to specs/<feature_id>/origin-alignment-<YYYY-MM-DD-HHMM>.md (one file per gate firing — append-only).
    • Re-run the script. Report the new exit code.

Read the full file on GitHub · 93 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 · 93 lines · 0 tokens per session scan A e7022c6c1869

Subscribe to this mod's changes

origin-check is a command published in the GitHub repository gosha70/code-copilot-team (6 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,044 tokens. 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.