Sandbox
@songyang0603/ds-spec-loop

Spec programming skill for Claude Code, Codex, and Copilot

This skill gives coding agents a consistent loop for working from a repository’s existing instructions, docs, tests, and decision records. It focuses on one change at a time and asks the agent to update the related evidence together instead of treating code as the only source of truth.

39 stars1 forksUpdated 1mo ago
Who it's for

Builders who want their coding agent to follow the repository’s own spec, decision, and test conventions.

What it delivers

You can make changes with the agent keeping requirements, implementation, checks, and documentation consistent.

What it does

Repository-native spec loop

Tells the agent to use the repository itself as the source of truth, not a separate planning template.

Decision record ownership

Requires each non-mechanical change to create or update the one decision record responsible for it.

Requirement change handling

Keeps unfinished proposals editable in place and treats reversals of delivered decisions as new linked records.

Evidence-based checks

Asks for direct checks that can confirm or disprove completion, not just narrative summaries.

Convention matching

Finds the repo’s existing rules, docs, tests, CI, and history instead of imposing one fixed folder layout.

Read-only review mode

Supports review tasks that compare proposals, decisions, code, tests, and docs without modifying files.

How to get it

  1. 1The community-maintained skills installer requires Node.js and lets you choose the…
    npx skills add songyang0603/ds-spec-loop
  2. 2Run
    gh skill install songyang0603/ds-spec-loop ds-spec-loop --agent codex --scope user
  3. 3Implement a change
    Use $ds-spec-loop to implement this change. Reuse the repository's existing
    decision, documentation, test, and CI conventions, and keep them consistent.
  4. 4Write a proposal without implementing it
    Use $ds-spec-loop to investigate this change and write its proposal.
    Do not implement it. Compare real alternatives and define direct checks.
  5. 5Review without modifying
    Use $ds-spec-loop to check whether proposals, decisions, code, tests,
    generated files, and current documentation agree. Do not modify files.

README

ds-spec-loop

English | 简体中文

A general Spec programming Skill for coding agents.

ds-spec-loop helps coding agents keep requirements, decisions, implementation, tests, and documentation consistent while building features, fixing bugs, changing architecture or interfaces, improving tests and development processes, or removing code.

Here, Spec programming does not mean writing a long plan before coding. It means using the repository itself as the source of truth: instructions describe constraints, current documentation describes the system as it exists, decision records preserve why choices were made, and code plus tests provide executable evidence.

Method origin

This independent community project was developed from analysis of Spec and decision practices visible in the public DeepSeek Harness repository and Git history.

The runtime Skill uses general terms and does not require that repository's directories, framework, or test commands. This project is not official, is not affiliated with or endorsed by DeepSeek, and does not redistribute DeepSeek Harness source code. See NOTICE.

🚀 Install and use

Community Skills CLI

The community-maintained skills installer requires Node.js and lets you choose the target coding agent and installation scope:

npx skills add songyang0603/ds-spec-loop

GitHub CLI

gh skill install songyang0603/ds-spec-loop ds-spec-loop --agent codex --scope user

Replace codex with claude-code or github-copilot when appropriate.

Manual installation

Clone or download this repository, then copy the entire skills/ds-spec-loop directory:

HostUser scopeRepository scope
Codex~/.agents/skills/ds-spec-loop.agents/skills/ds-spec-loop
Claude Code~/.claude/skills/ds-spec-loop.claude/skills/ds-spec-loop
GitHub Copilot~/.copilot/skills/ds-spec-loop or ~/.agents/skills/ds-spec-loop.github/skills/ds-spec-loop, .claude/skills/ds-spec-loop, or .agents/skills/ds-spec-loop

See the current official documentation for Codex, Claude Code, and GitHub Copilot.

Invoke the Skill

HostCommand
Codex$ds-spec-loop
Claude Code/ds-spec-loop
GitHub Copilot CLI/ds-spec-loop

Examples below use Codex syntax. Replace $ds-spec-loop with /ds-spec-loop in Claude Code or GitHub Copilot CLI.

Implement a change:

Use $ds-spec-loop to implement this change. Reuse the repository's existing
decision, documentation, test, and CI conventions, and keep them consistent.

Write a proposal without implementing it:

Use $ds-spec-loop to investigate this change and write its proposal.
Do not implement it. Compare real alternatives and define direct checks.

Review without modifying:

Use $ds-spec-loop to check whether proposals, decisions, code, tests,
generated files, and current documentation agree. Do not modify files.

The requested task boundary remains binding: review-only stays read-only, and proposal-only does not silently become implementation.

✨ What it does

FeatureWhat the agent does
Understand existing conventionsReads applicable instructions, proposals, decisions, current docs, source, tests, generated files, CI, and relevant Git history
Reuse one decision recordUpdates the record already responsible for the change; creates a narrowly scoped record when none exists
Write testable acceptance criteriaStates what should be observable, where it can fail, and which direct check can disprove completion
Trace the affected integration pathChecks the layers that actually connect the change to its caller, runtime, persistence, or visible result
Handle changed requirementsRevises an unfinished proposal in place; creates a replacement record only after a delivered decision is reversed
Keep the repository consistentUpdates affected decisions, code, tests, generated files, public contracts, and current docs in the same pull request or linked changes
Remove code completelyChecks real consumers and removes obsolete code, registration, exports, config, tests, docs, and compatibility behavior

The core rule is:

Every non-mechanical change creates or updates one decision record responsible for that change.

A spelling correction, formatting-only edit, or other local mechanical change is exempt only when it changes no behavior, contract, structure, process, test strategy, stored-data format, or rationale.

🧭 How it works

The Skill does not impose one directory layout. It first finds which existing files already perform each job.

ResponsibilityCommon repository forms
Working rulesAGENTS.md, CLAUDE.md, Copilot instructions
Unfinished decisionSpec, RFC, proposal, design doc, draft ADR
Current decisionADR, decision record, implemented design, shipped RFC
Current system descriptionarchitecture docs, README, API or package docs
Focused checkspytest, cargo test, go test, pnpm test, real CLI/UI/API checks
Full checksGitHub Actions, Makefile, pre-commit, repository scripts

A Python project is not told to run pnpm test. A repository that already uses ADRs is not told to create another decision directory.

If no equivalent convention exists, the Skill proposes only a small fallback: repository instructions, current architecture documentation, and a directory such as docs/decisions/. It does not create class folders, archives, indexes, validators, translations, or checksum files without a demonstrated need.

Decision lifecycle

The method preserves three meanings without forcing particular status words:

StageMeaning
Workingnot delivered yet, partly implemented, or still changing
Currentimplementation, direct checks, and current documentation agree
Declinedconsidered but not adopted; retained only while the reason remains useful

An accepted ADR does not always mean the code has shipped. A decision becomes Current only when implementation, direct checks, and current documentation agree.

Replacement is a relationship between decisions:

  • change an unfinished proposal directly;
  • create a new cross-linked record when a delivered decision is reversed;
  • keep both decisions Current when only part of the earlier decision was replaced;
  • consolidate an old decision only after the new record preserves its unique rationale, consequences, verification requirements, and reintroduction conditions.

Repository contents

skills/ds-spec-loop/
├── SKILL.md
├── agents/openai.yaml
└── references/
    ├── acceptance-and-evidence.md
    ├── adoption.md
    ├── decision-classes.md
    ├── decision-record-lifecycle.md
    ├── documentation-discipline.md
    ├── requirement-change.md
    ├── simplification.md
    ├── system-of-authority.md
    └── templates.md

SKILL.md contains the portable core. References load only when the task needs them. agents/openai.yaml contains optional Codex-specific metadata, including the default invocation prompt.

📝 Update log

v0.2 — 2026-08-17

Further generalized the Spec programming loop so it can be used in projects with different conventions. The Skill reuses each project's existing Specs, RFCs, ADRs, documentation, testing, and CI conventions, while strengthening rules for mid-development requirement changes, decision ownership, lifecycle transitions, partial replacement, and verification evidence. This update has passed cross-language scenario tests, structural validation, and independent review.

v0.1 — 2026-08-15

Published the first open-source version, based on Spec programming patterns observed in the public DeepSeek Harness repository. It included the reusable Skill, English and Chinese documentation, and installation instructions for Codex, Claude Code, and GitHub Copilot.

Contributing

Contributions are welcome. If you find a problem or have a suggestion, please open an Issue with enough context to understand or reproduce it; documentation improvements, usage examples, and focused pull requests are also appreciated.

See LICENSE for the project license.

Files in the repo

Repository payload7 top-level entries
  • docs
  • skills
  • AGENTS.md
  • LICENSE
  • NOTICE
  • README.md
  • README.zh-CN.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

obra/
superpowers

An agentic skills framework & software development methodology that works.

285k
1 add

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k