Skip to content

Repository files navigation

Intent-Driven Template

This is a template project for intent-driven software delivery with OpenSpec, OpenCode, and reusable engineering skills.

It is intended for teams that want changes to start from clear intent, move through explicit behaviour and design artifacts, and finish with implementation tasks that preserve the reasoning behind the work.

This template also makes OpenSpec spec-as-source capable: fenced Gherkin specs can be extracted into acceptance tests, while workflow rules keep specification changes and code changes separated so the OpenSpec specification remains the source of truth.

Walkthrough

Read the full walkthrough: Spec-Driven Development with OpenSpec and OpenCode.

Spec-Driven Development with OpenSpec and OpenCode

Read the full walkthrough: SDD with Multi-Model Spec Review and Glossary

Spec-Driven Development Multi-Model Adversarial Authoring and Glossary with OpenCode and OpenSpec

A focused walkthrough of OpenSpec spec-as-source: Behavior-Driven Development and Spec-Driven Development with OpenSpec.

Behavior-Driven Development and Spec-Driven Development with OpenSpec

How To Use This Template

Start A New Project From This Template

Clone this repository, open it with OpenCode, and start working from the bundled OpenSpec configuration, commands, skills, and schema.

Add This Template To An Existing Project

Open your existing project with OpenCode and ask it to install the template:

Read and understand INSTALL_TEMPLATE.md and follow the instructions there.

What This Template Uses

The bundled OpenSpec schema is a local copy of the intent-driven schema from https://github.com/intent-driven-dev/openspec-schemas/tree/main/openspec/schemas/intent-driven.

Workflow

The intent-driven workflow moves through these artifacts in order:

proposal -> specs -> design -> adr -> tasks
  • proposal captures why the change matters.
  • specs describe observable behaviour with fenced Gherkin scenarios.
  • design explains the implementation approach and trade-offs.
  • adr records durable architectural decisions.
  • tasks turn the accepted intent, behaviour, design, and decisions into work.

Schema

This repository includes a bundled local copy of the intent-driven schema at openspec/schemas/intent-driven/. The upstream schema lives in https://github.com/intent-driven-dev/openspec-schemas/tree/main/openspec/schemas/intent-driven.

To activate the schema, set this in openspec/config.yaml:

schema: intent-driven

To validate it, run:

openspec schema validate intent-driven

Skills

Standard OpenSpec lifecycle skills in .opencode/skills/ — names are self-explanatory: openspec-new-change, openspec-propose, openspec-continue-change, openspec-explore, openspec-apply-change, openspec-verify-change, openspec-sync-specs, openspec-archive-change

Skill Location Purpose
openspec-bulk-apply-change .opencode/skills/ Applies multiple active changes concurrently in isolated worktrees with parallel verification.
adversarial-authoring .opencode/skills/ Runs author and reviewer agents in sequence to reduce model bias in drafts.
grill-me .agents/skills/ Interrogates plans and designs with probing questions to surface hidden assumptions.
c4-diagrams .agents/skills/ Visualises system architecture using C4 model levels in ASCII or Mermaid.
architectural-decision-records .agents/skills/ Captures architectural decisions with rationale, tradeoffs, and supersession chains.
gherkin-authoring .agents/skills/ Drafts and improves Gherkin scenarios for observable, domain-language behaviour.
acceptance-test-authoring .agents/skills/ Sets up and maintains acceptance tests that extract fenced Gherkin from OpenSpec Markdown specs.
bdd-zone-check .agents/skills/ Guides spec-first work and keeps specs-zone changes separate from code-zone changes.
glossary .agents/skills/ Maintains business and technical terminology and companion glossary references for specification artifacts.
openspec-git-discipline .agents/skills/ Enforces that proposals reach main before apply, and implementation merges before archive.

The source behavior-driven template also includes Claude Code hooks for live zone enforcement. Those hooks are intentionally not copied here; bdd-zone-check is guidance unless an OpenCode equivalent is wired later.

The acceptance-test-authoring skill includes JavaScript (cucumber-js) and Python (behave) runner packs as examples. Use the pack that matches your project, adapt it to your application's startup and page-object conventions, or replace it with an equivalent runner for your preferred stack while preserving the fenced-Gherkin extraction and effective-spec behavior.

Agents

Specialist agents used within skills, in .opencode/agent/:

Agent Purpose
adversarial-author Writes an initial draft of a specification artifact or design document.
adversarial-reviewer Reviews the author's draft with challenges and improvement suggestions.

About

OpenSpec and OpenCode template for intent-driven development with specs, ADRs, C4 diagrams, Gherkin, TDD, Multi-Model Adversarial Spec Authoring, Glossary for Domain Terms, and reusable engineering workflows. This also makes OpenSpec spec-as-source capable.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages