joplin-llm-wiki: Command for Claude Code

.cursor/commands/spectra-drift.md

/spectra-drift is a command for Claude Code, Cursor from gcake119/joplin-llm-wiki. It costs 19 tokens per session (1,357 once invoked), scanned A, original, MIT.

A command for finding differences between a planned Spectra change and the code currently in the project.

In plain words
What is it for?
Use it to inspect a named change, review drift severity and broken references, and get a recommended next command.
Why use it?
It shows when a plan has gone stale, when referenced files or symbols no longer exist, and when other commits may have caused conflicts.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md). Also seen: names the AskUserQuestion tool.

This is gcake119/joplin-llm-wiki's own configuration. It tells Claude Code and Cursor how to work on joplin-llm-wiki itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything joplin-llm-wiki configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gcake119/joplin-llm-wiki. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gcake119/joplin-llm-wiki/main/.cursor/commands/spectra-drift.md
Clone the repo
git clone --depth 1 https://github.com/gcake119/joplin-llm-wiki

Made for: Claude Code, Cursor.

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 /spectra-drift

README.md
[![agentmods](https://agentmods.dev/badge/commands/gcake119/joplin-llm-wiki/spectra-drift/github.svg)](https://agentmods.dev/commands/gcake119/joplin-llm-wiki/spectra-drift)
Your own site
<a href="https://agentmods.dev/commands/gcake119/joplin-llm-wiki/spectra-drift"><img src="https://agentmods.dev/badge/commands/gcake119/joplin-llm-wiki/spectra-drift/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 /spectra-drift

Your own site · 80×15
<a href="https://agentmods.dev/commands/gcake119/joplin-llm-wiki/spectra-drift"><img src="https://agentmods.dev/badge/commands/gcake119/joplin-llm-wiki/spectra-drift.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 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,357 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.00019 $0.01357
Opus 5 $0.00010 $0.00678
Sonnet 5 $0.00004 $0.00271
Haiku 4.5 $0.00002 $0.00136

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

Security

Grade A, and why

/spectra-drift 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.

.cursor/commands/spectra-drift.md · 113 lines

How it starts

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

Detect drift between a Spectra change and the current codebase state. Reports time dormancy, broken design anchors, task collisions with external commits, and a single recommended next command.

Input: Optionally specify a change name (e.g., /spectra-drift add-auth). If omitted, infer from conversation context or auto-select if only one active change exists.

Prerequisites: This skill requires the spectra CLI. If any spectra command fails with "command not found" or similar, report the error and STOP.

Steps

  1. Determine change name

    If not provided, infer from context or run spectra list --json to auto-select. If multiple active changes exist and no name is given, list candidates and ask the user to rerun with an explicit name.

  2. Run programmatic drift analysis

    spectra drift <change-name> --json
    

    The JSON contains:

    • severity: "light" / "medium" / "heavy"
    • total_score: aggregate over Time / Structure / Tasks (Environment is display-only)
    • dimensions: array of { kind, status, score, contributes_to_total }
    • broken_anchors: design.md references (file paths / symbols / functions / CLI flags) that no longer resolve
    • tasks_blocked_external: pending tasks whose referenced files were modified by commits outside the change dir
    • tasks_maybe_resolved: pending tasks whose verb+target keywords match commit subjects since created
    • primary_recommendation: a single copy-pasteable command line
  3. Present the report

    Use a user-readable, conclusion-first format. The first substantive paragraph after the title MUST be a plain-language conclusion that says what to do next before showing score tables, broken anchors, task collisions, or severity labels.

    Translate severity into action-oriented meaning:

    • Light: the change can continue with apply.
    • Medium: the change can continue, but the plan should be refreshed before implementation.
    • Heavy: the old plan is likely unsuitable for direct implementation; restart or refresh first.

    Recommended shape:

    ## Drift Report: <change-name>
    
    <Plain-language conclusion. Example for medium: "This change can continue, but update the plan before implementing it. Related code has changed since the plan was written, so applying the old tasks directly may cause rework or conflicts.">
    
    ### Why
    
    - <1-3 plain-language reasons derived from dimensions, broken anchors, and task collisions>
    
    ### Details
    
    | Item              | Result                                                 |
    | ----------------- | ------------------------------------------------------ |
    | Time              | <status>                                               |
    | Design references | <broken anchor count or "No broken references">        |
    | Pending tasks     | <blocked/maybe-resolved count or "No task collisions"> |
    | Overall           | <light/medium/heavy, total score N>                    |
    
    ### Recommendation
    
    Run `<primary_recommendation>`.
    

    Keep technical details below the plain-language conclusion. List broken anchors, blocked tasks, and maybe-resolved tasks only when non-empty. Omit empty technical detail sections entirely. Keep the report short enough to skim; the goal is to help the user decide, not to explain the scoring model.

  4. Apply the recommendation interactively

    Use the AskUserQuestion tool to offer one decision based on severity. Use plain-language option labels while preserving the exact command in each option description. Do NOT auto-invoke /spectra-apply, /spectra-ingest, or spectra archive; always wait for the user's choice.

    • Light (score 0-3, drift is minor):
      • Recommended label: "Directly start work"
        • Description: run /spectra-apply <name>
      • Alternate label: "Pause for now"
        • Description: do nothing until the user reviews manually
    • Medium (score 4-8, refresh worth doing):
      • Recommended label: "Refresh the plan"
        • Description: run /spectra-ingest <name> with the broken references and task collisions as context
      • Alternate label: "Directly start work"
        • Description: run /spectra-apply <name> only if the user knows the reported changes are harmless
      • Alternate label: "Pause for now"
        • Description: do nothing until the user reviews manually
    • Heavy (score >8 or anchor decay >30%, design diverges from code):
      • Recommended label: "Archive and restart"
        • Description: run <primary_recommendation>
      • Alternate label: "Refresh the plan"
        • Description: try /spectra-ingest <name> before restarting
      • Alternate label: "Pause for now"
        • Description: do nothing until the user reviews manually

Read the full file on GitHub · 113 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 · 113 lines · 19 tokens per session scan A 69deeeae15b9

Subscribe to this mod's changes

/spectra-drift is a command published in the GitHub repository gcake119/joplin-llm-wiki (2 stars, last pushed 3mo ago), licensed MIT. It adds 19 tokens to every session and 1,357 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.