CtrlK
BlogDocsLog inGet started
Tessl Logo

spec-driven-development/spec-as-source

Spec-driven development on OpenSpec, with mechanical spec-as-source enforcement: a custom 'spec-as-source' OpenSpec schema adds file-ownership (targets) and test-verification ([@test]) metadata to every capability spec, three scripts (link check, ownership check, manifest build) keep code and specs from drifting apart, plus requirement-gathering, spec-writer, work-review, and a session-handoff skill with a proactive context-warning hook.

68

Quality

85%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

SKILL.mdskills/skill-router/

name:
skill-router
description:
Single entry point to the spec-as-source workflow: given a request, decides which of the plugin's skills to activate — excluding trivial work first, deriving the current phase from the state of the repo second, and matching descriptions last — then runs the chosen skill inline or in a subagent. Use when you do not know which skill applies, or want the workflow driven for you. Trigger — which skill should I use, what do I do next, route this, start working on X, implement X, propose a change, continue the implementation, I want to build X, help me with this project, non so da dove partire.

Skill Router

One registered skill instead of seventeen. The others stay in $SKILL_SOURCE_ROOT/skills/ and are activated by reading their SKILL.md, not by being installed.

The hard part is not matching. These skills are the ordered phases of a process, not a menu of peer tools. Asked to "implement the login" with no spec on disk, textual similarity points straight at the implementation skill — and that is the wrong answer: the right move is upstream. A router that matches by similarity alone skips phases, and skipping phases is precisely what this method exists to prevent.

So: exclude first, determine the phase second, match last.

How to use it

Read ROUTER.md — the decision procedure — and follow its five stages in order. It is the policy; this file is only the entry point.

python3 skills/skill-router/build_router.py   # Stage 0: refresh the table

Then work through ROUTER.md Stage 1 → Stage 5 and act on the outcome.

The three inputs

FileWhat it is
ROUTER.mdthe decision procedure — the five stages, the probes, the trace format
routing-table.mdgenerated from the skills on disk: index, divergences, dangling references, verbatim descriptions
the chosen SKILL.mdread only after the decision, and only for the skill selected

Never decide from memory of what a skill does. The description in the table is the routing contract; the rest of a skill is read after it has been chosen.

Non-negotiables

  • Never invoke an unregistered skill through a skill-invocation tool. Only this router is registered. The others are activated by reading their SKILL.md and following it — inline, or handed to a subagent.
  • Never route to a rules/ file. Rules are always-active constraints on the router itself, not destinations.
  • Never route to a name that is not in the table, including names that appear only under "dangling references".
  • Never guess between two plausible candidates. Stop and ask. A router that guesses turns an explicit doubt into an invisible error.
  • Always show the trace. Gate, phase and the probe that detected it, candidates, choice, mode, and the description fragment the match rests on. A decision that cannot be explained cannot be corrected.

Installation

bash skills/skill-router/install.sh          # absolute symlink into ~/.claude/skills/
bash skills/skill-router/install.sh --check  # read-only

A symlink, never a copy: a copy becomes a second source of truth that diverges in silence. This repo already carries the evidence — install.sh --check reports it.

What this cannot do

It cannot stop the harness from auto-triggering a skill that is already registered globally. It governs what happens when it is invoked. If an obsolete same-named skill is installed in ~/.claude/skills/, that one may run without the router ever being consulted — install.sh reports those, and removing them is a separate, deliberate act.

skills

README.md

tile.json