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.
73
92%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
Turn "is this prompt ready?" into a mechanical check. The loop scores the
incoming prompt against a fixed rubric (templates/SCORING_RUBRIC.md),
interviews the user on the weakest dimensions, locks confirmed answers,
rewrites the prompt, and re-scores — repeating until the score crosses the
threshold or the round cap is hit. The output is a refined prompt of verified
quality that openspec-propose or openspec-explore can consume directly.
The loop is human-in-the-loop by nature: the user is present in every round. It never runs headless and it never produces downstream artifacts (proposal, spec, code) while refinement is still in progress.
Each round moves through these phases in order. A phase is entered only when its entry condition holds and left only when its exit condition holds — no skipping except where a condition explicitly says so.
templates/SCORING_RUBRIC.md, quoting evidence for every
score above 0, and total the result.n/a or left as an open question — never invented.The loop stops on the first of these, never on a feeling of "good enough":
If the very first scoring of the incoming prompt totals 9 or more, skip the interview, lock, and rewrite phases entirely and go straight to the output contract. A prompt that is already good does not get five rounds of ceremony.
The interview phase absorbs the discipline of the requirement-gathering
skill. Its hard rules are restated here in full so this skill is
self-sufficient even when installed alone; consult requirement-gathering
for question craft, but the rules below are binding on their own:
n/a; it is never filled in.openspec-propose, never write a spec, and
never write code. The loop must reach its stop criterion — and the user
must confirm the output contract — before any downstream step starts.Questions come from the rubric, not from generic checklists. After each scoring round:
The loop's state lives in a session document, not in conversation memory.
At the start of a session, instantiate templates/PROMPT_SESSION.md and
keep it current from then on — it is what makes locks enforceable and
rounds auditable. The document is an artifact of the conversation (kept in
the change-planning area or scratch space), not a repo deliverable.
Record every round in it as it happens:
The ## Locked register in the session document is the loop's memory of
what the user has decided. Its rules:
## Locked — not a paraphrase.~~old text~~ — superseded) for audit. Never delete a
lock, and never treat your own reinterpretation as an override.Always active, in every phase of the loop — analyze, score, interview, lock, rewrite, re-score, and the final output contract alike:
Any information the loop needs but does not have is marked
n/aor turned into an interview question — never invented, never assumed, never filled with a plausible default.
Concretely: a rewrite that would need a fact the user never provided marks
the slot n/a or queues the fact as the next question; a score is never
propped up by imagined context; an output-contract section with nothing
confirmed to put in it says n/a rather than something plausible. When in
doubt whether something was actually stated or confirmed, it was not — ask.
Entered only when the loop has stopped — the threshold was reached (or the first-round pass fired), or the round cap was hit and the user chose to proceed anyway. This phase turns the session into the artifact the SDD workflow consumes:
templates/REFINED_PROMPT.md and fill every section from
the session document: the final prompt revision verbatim, scope in/out,
core behavior, edge cases, constraints, capabilities touched, verification
expectations, the final rubric score per dimension with its evidence
quotes, and the complete lock register copied verbatim (superseded entries
kept struck-through). A section with nothing confirmed to put in it says
n/a — the anti-invention invariant applies here as everywhere.openspec-propose (or openspec-explore when the user wants to think
first). The lock register travels with it precisely so that downstream
steps never re-ask a locked decision — everything the user already
decided is settled; downstream questions may only cover genuinely new
ground..tessl-plugin
skills
handoff
handoff-skill
openspec-apply-change
openspec-archive-change
openspec-explore
openspec-propose
openspec-sync-specs
prompt-loop
requirement-gathering
spec-as-source-setup
templates
openspec-schema
spec-as-source
templates
spec-ci-sync
spec-loop
spec-rebuild
spec-verify
spec-writer
work-review