agentleFS
mhgolestanmhgolestan/code-context-mcp/.claude/skills/speckit-companion-living-validate/SKILL.md

speckit-companion-living-validate

Skill0 starsChanged 50 days agoMITView on GitHub

Check the shape of living specs and a feature spec's deltas — a requirement with no scenario, a scenario missing WHEN or THEN, a duplicate heading, a delta pointing at nothing (opt-in, read-only, never halts)

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify Python is available by running python3 --version.

    line 20
  2. Very specific:

    If python3 is not available, warn the user and skip: [companion] Warning: python3 not detected.

    line 21
  3. Very specific:

    Run the checker from the repository root.

    line 26
  4. Very specific:

    Add --json when a caller needs the machine-readable object rather than the list.

    line 32
  5. Distinctive:

    Do not edit any spec to satisfy a finding as part of this command.

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Spec Shape

Check that every living spec, and every active feature spec's delta sections, are shaped the way every reader of them assumes. A living spec is only worth keeping if what gets folded into it is trustworthy, and until something checked, a requirement with no scenario or a delta pointing at a heading that does not exist landed silently and was found weeks later by a person reading the file.

Read-only — it never edits anything, and it never fails (always exits success). The fold consumes the same checks and refuses to write on an error; this command only reports. A surrounding workflow may treat findings as a gate; the command itself does not.

This is opt-in. With living specs disabled (or no config), it reports nothing and exits clean.

Prerequisites

  • Verify Python is available by running python3 --version.
  • If python3 is not available, warn the user and skip: [companion] Warning: python3 not detected; skipped the spec shape check.

Execution

Run the checker from the repository root. When the invocation names a capability, add --capability <name> so only that capability's spec is checked:

python3 .specify/extensions/companion/scripts/living_validate.py

Add --json when a caller needs the machine-readable object rather than the list. Each finding carries a severity, a stable code, the path, the line, a sentence saying what is wrong, and a one-line fix.

What it reports

CodeSeverityRaised when
requirement-without-scenariowarningA requirement states a rule and never says how anyone would know it held.
requirement-bundles-ruleswarningA requirement states more than 4 SHALL, MUST or SHOULD sentences under one heading. Split it: one requirement per rule, each with its own heading and scenario.
requirement-too-wordywarningA requirement takes more than 120 words to state its rule. Cut it to the rule and the one reason that stops someone breaking it.
scenario-missing-halferrorA scenario has a condition and no outcome, or an outcome and no condition. The keywords are recognised with or without emphasis, so - WHEN … counts exactly as - **WHEN** … does.
duplicate-requirementerrorTwo requirements in one capability share a heading, which is the join key fold-back and coverage use.
unknown-capabilityerrorA delta block is marked for a capability the registry does not list.
delta-heading-not-foundwarningA MODIFIED or REMOVED entry names a heading the target spec does not carry. The fold promotes an unmatched modification into an addition, so this is a defined outcome rather than damage.
unmatched-touches-globwarningA file marker names a pattern matching nothing on disk.
  • requirements-outside-capability — every file marker names code the capability does not claim, so nothing resolves for that behaviour.
  • capability-claims-undescribed-code — the capability claims code no requirement describes, so a change there is briefed with nothing. | unbalanced-fence | warning | A code fence is opened and never closed, so everything after it is invisible to every reader. |

Severity answers exactly one question: whether the fold stops. An error means the durable record would be damaged; a warning means it would be untidy.

Report

Relay the checker's own output. Where it reports findings, say how many are errors and how many are warnings, and name the file and line for each. Where it reports skipped files, list them with their reasons verbatim — a clean report must never be readable as a verdict on files that were never examined.

Do not edit any spec to satisfy a finding as part of this command. Fixing is the author's decision, made with the finding in front of them.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.