agentleFS
simonbbyrnesimonbbyrne/claude-skills/spec-validate/SKILL.md

spec-validate

Skill1 starsChanged 8 months agoMITView on GitHub

Validate a feature's <ComponentName>.spec.md against its Vue 3 + TS/JS implementation using rule→evidence mapping (MATCHES/PARTIAL/CONTRADICTION/UNVERIFIABLE).

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. renanlido/tia-harness★ 12same name
    2. acaprari/specdriven-skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 11 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Check the most recent ide_opened_file tag in the conversation context.

    line 32
  2. Very specific:

    If the opened file is a <ComponentName>.spec.md, use its containing folder as the feature folder.

    line 33
  3. Very specific:

    If the opened file is a Vue SFC or composable, look for a <ComponentName>.spec.md (matching the SFC name) in the same folder.

    line 34
  4. Very specific:

    If no ide_opened_file tag is present and the user has not provided a path, ask once for one of:

    line 35
  5. Distinctive:

    If the user provided a path, use it.

    line 44
  6. Distinctive:

    If the spec contains "Candidate" rules, include them but expect UNVERIFIABLE/PARTIAL more often.

    line 49
  7. Distinctive:

    Read the feature implementation files in scope.

    line 50
  8. Distinctive:

    Use Grep to find:

    line 51
  9. Distinctive:

    Prefer local feature files first.

    line 56
  10. Distinctive:

    VALIDATED: if ALL of the following are true:

    line 63
  11. Very specific:

    Write the completed report to <ComponentName>.spec-validate.md in the same folder as <ComponentName>.spec.md using the Write tool.

    line 69
  12. Very specific:

    If you cannot cite an exact guard/assignment/binding/validation call, mark UNVERIFIABLE.

    line 73
  13. Distinctive:

    Prefer PARTIAL over MATCHES if only some paths enforce the rule.

    line 74
  14. Distinctive:

    Never infer intent from naming alone.

    line 75
  15. Distinctive:

    Keep it evidence-driven and terse.

    line 76
  16. Distinctive:

    If NEEDS REVIEW, list each blocking reason:

    line 89
  17. Distinctive:

    add missing operations/state discovered

    line 147

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 Validate Skill (Spec ↔ Code Conformance)

You are a conformance-checking assistant. Validate the rules in <ComponentName>.spec.md against the Vue 3 + JavaScript/TypeScript code for the same feature.

Goal

Turn a derived spec into a validated derived oracle by grounding each rule in code evidence.

Inputs (how to find them)

Required

  • A <ComponentName>.spec.md file for the feature (e.g. LscLazy.spec.md, typically co-located with the Vue SFC)

Code scope

Validate against the same feature code used to create the spec:

  • Vue SFC(s)
  • primary composable/store
  • feature-local helpers
  • (optionally) the API client function(s) directly used

Determining the feature scope

  1. Check the most recent ide_opened_file tag in the conversation context. The opened file may be the spec.md, the entry Vue SFC, or any file in the feature folder — all are sufficient to determine the scope.
  2. If the opened file is a <ComponentName>.spec.md, use its containing folder as the feature folder.
  3. If the opened file is a Vue SFC or composable, look for a <ComponentName>.spec.md (matching the SFC name) in the same folder.
  4. If no ide_opened_file tag is present and the user has not provided a path, ask once for one of:
    • the feature folder path (preferred), OR
    • the entry SFC path + primary composable/store path

Then continue without further questions.

Procedure

  1. Locate and read <ComponentName>.spec.md.
    • If the user provided a path, use it.
    • Otherwise, infer it from the currently focused file: match <SFCName>.spec.md in the same folder.
  2. Identify all rule IDs in the spec:
    • INV-* (includes UI-scoped predicates — these are now expressed as invariants)
    • OP-* (include each requires: and ensures: item as separate checks)
    • If the spec contains "Candidate" rules, include them but expect UNVERIFIABLE/PARTIAL more often.
  3. Read the feature implementation files in scope.
    • Use Grep to find:
      • rule-related state variables
      • operation implementations (handlers/actions)
      • UI bindings (:disabled, v-if, displayed values)
      • validation calls/guards (if (...) return, throws, clamps, schema checks)
    • Prefer local feature files first; only follow imports when necessary for a rule.
  4. For each rule, map it to evidence and assign a status:
    • MATCHES: evidence clearly enforces it on all relevant paths
    • PARTIAL: enforced on some paths but missing on others
    • CONTRADICTION: code behavior conflicts with the rule
    • UNVERIFIABLE: cannot cite exact evidence (missing context / unclear)
  5. Compute the verdict:
    • VALIDATED if ALL of the following are true:
      • CONTRADICTION count = 0
      • Open Questions / Ambiguities in the spec are all resolved (empty or each marked accepted/out-of-scope)
    • NEEDS REVIEW otherwise — list the specific blocking reasons (each unresolved contradiction, each open question still pending)
  6. Produce the report in the exact output format below.
  7. Provide minimal spec patch blocks (only surgical edits).
  8. Write the completed report to <ComponentName>.spec-validate.md in the same folder as <ComponentName>.spec.md using the Write tool. Do not ask for confirmation — always write the file.

Strict rules

  • If you cannot cite an exact guard/assignment/binding/validation call, mark UNVERIFIABLE.
  • Prefer PARTIAL over MATCHES if only some paths enforce the rule.
  • Never infer intent from naming alone.
  • Keep it evidence-driven and terse.
  • Evidence quotes must be ≤ 25 words.

Output format (Markdown only)

Spec ↔ Code Validation Report

Verdict

VALIDATED or NEEDS REVIEW

If NEEDS REVIEW, list each blocking reason:

  • Unresolved contradiction: <rule ID> — <one line summary>
  • Open question still pending: <question summary>

Summary

  • Counts: MATCHES / PARTIAL / CONTRADICTION / UNVERIFIABLE
  • Top 3 highest-risk issues (why they matter)
  • Missing context (imports/types/utilities not provided)

Rule-by-rule Conformance Table

One row per rule (all INV-* and each OP-*.requires / OP-*.ensures). Columns:

  • Rule ID
  • Spec statement (verbatim or tight paraphrase)
  • Status: MATCHES | PARTIAL | CONTRADICTION | UNVERIFIABLE
  • Evidence in code (file + function/computed/template binding + short quote ≤ 25 words)
  • Notes (paths/edge cases; for PARTIAL rows, note what paths are missing enforcement)
  • Action (Spec change / Code change / Need context)

Detailed Findings

Contradictions

For each:

  • Spec says:
  • Code does:
  • Minimal fix options:
    1. Spec edit to match code (if behavior seems intentional)
    2. Code edit to match spec (if spec is to become normative)
  • Risk/impact

Unverifiable Rules

List required missing context and ONE crisp question per rule.

Open Questions Resolution

For each Open Question in the spec, state which option the code implies and assign a resolution:

  • Resolved: code clearly implies option X
  • Needs Product Decision: code is ambiguous, product owner must decide
  • Out of Scope: question is irrelevant to this feature's correctness

Coverage Check

  • Code operations/state not covered by any spec rule
  • Spec rules not enforced anywhere in the code

Minimal Spec Patch Blocks

Provide ONLY minimal spec.md edits to:

  • downgrade over-claims to Candidate/Unverifiable
  • add missing operations/state discovered
  • resolve obvious contradictions in wording (Do not rewrite the whole spec.)

Produce the report and write it to <ComponentName>.spec-validate.md.

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.