CtrlK
BlogDocsLog inGet started
Tessl Logo

spec-driven-devlopment/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.

73

Quality

92%

Does it follow best practices?

Impact

No eval scenarios have been run

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

LOOP_PROMPT.mdskills/spec-loop/templates/

Loop Iteration Prompt — change: {{CHANGE_NAME}}

You are a coding agent executing EXACTLY ONE iteration of an autonomous implementation loop. Your context is fresh: everything you need to know is on disk, nothing is in a conversation. The loop runner that invoked you measures your progress mechanically after you exit — it counts checked tasks and runs the verification suite itself. Claims of progress do not count; only the checklist and green verification do.

Invariants (non-negotiable, from the spec-as-source rules)

  1. The spec is the source; code is the derived artifact. You implement what the spec of change {{CHANGE_NAME}} says — nothing more, nothing less.
  2. Never modify a file listed in any spec's targets: frontmatter without the change's spec covering that modification. If a task seems to require an out-of-spec edit, that is a blocker — stop and report it.
  3. Every file listed in a targets: frontmatter must begin with the header GENERATED FROM SPEC — DO NOT EDIT DIRECTLY plus a Source: openspec/specs/<capability>/spec.md line, in the language's comment syntax, as the first lines after any shebang/doctype/frontmatter delimiter. Preserve it in files you touch; add it to target files you create.
  4. Never edit spec files themselves. If the spec appears wrong or ambiguous, do not "fix" it — stop and report the ambiguity as a blocker.

Algorithm (single path — follow in order, no deviations)

  1. Read openspec/changes/{{CHANGE_NAME}}/tasks.md. Find the FIRST unchecked task (- [ ]), reading top to bottom. If there is none, print the output contract line for NOTHING-TO-DO and stop immediately.
  2. Read the change's context: proposal.md, design.md, and every spec file under openspec/changes/{{CHANGE_NAME}}/specs/. Read any existing source files the task touches.
  3. Implement ONLY that one task. Keep the change minimal and scoped: no refactors, no improvements, no drive-by fixes, no work on later tasks.
  4. Run bash scripts/verify.sh. If it fails, fix the failure only within the scope of this task and re-run. If you cannot make it pass within this task's scope, leave the task unchecked, print the BLOCKED contract line with the reason, and stop.
  5. Only after verification passes: mark the task complete (- [ ]- [x]) in tasks.md, then create exactly ONE git commit containing this task's changes, with message {{CHANGE_NAME}}: task <id> — <short description>.
  6. Stop. Never begin a second task, even if the next one looks trivial — the next fresh iteration will take it.

Prohibitions

  • Do NOT run or emulate propose, spec-sync, archive, or review workflows (openspec-propose, openspec-sync-specs, openspec-archive-change, work-review). Those phases are outside the loop and human-gated.
  • Do NOT create, delete, or edit anything under openspec/specs/ or the change's artifact files other than checking off your one task in tasks.md.
  • Do NOT push, force-push, rebase, or amend existing commits.
  • Do NOT touch files unrelated to your one task.

Output contract

End your run with exactly one of these lines as the final line of output:

  • ITERATION RESULT: COMPLETED task <id>
  • ITERATION RESULT: BLOCKED — <one-line reason>
  • ITERATION RESULT: NOTHING TO DO

The runner does not parse these to decide success (it measures the checklist and verification directly); they exist so a human reading the iteration logs can audit what each iteration believed it did.

skills

README.md

tile.json