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.
71
89%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
#!/usr/bin/env bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
import re
import sys
ROOT = Path.cwd()
spec_root = ROOT / "openspec" / "specs"
pattern = re.compile(r"\[@test\]\s+([^\s`)]+)")
missing = []
for spec in sorted(spec_root.glob("**/spec.md")):
text = spec.read_text(encoding="utf-8")
for raw_link in pattern.findall(text):
# [@test] paths are project-root-relative, not relative to the spec file.
candidate = (ROOT / raw_link).resolve()
project_relative = candidate.relative_to(ROOT) if str(candidate).startswith(str(ROOT)) else candidate
if not candidate.exists():
missing.append((spec, raw_link, project_relative))
if missing:
print("FAILED — missing tests referenced by specs.\n")
current_spec = None
for spec, raw_link, resolved in missing:
if spec != current_spec:
print(f"--- {spec}")
current_spec = spec
print(f" MISSING {raw_link} -> {resolved}")
print("\nA missing [@test] is worse than a failing test: the requirement is not verifiable.")
sys.exit(1)
print("check-spec-links: PASSED")
PY.tessl-plugin
skills
handoff
openspec-apply-change
openspec-archive-change
openspec-explore
openspec-propose
openspec-sync-specs
requirement-gathering
spec-as-source-setup
templates
openspec-schema
spec-as-source
templates
spec-ci-sync
spec-rebuild
spec-verify
spec-writer
work-review