/dominicode-sdd-creator:dominicode-harness-initfrom dominicode-sdd-creator
Audits existing feedback mechanisms (tests, lint, type checking, build, CI) in a repository and generates an AGENTS.md with Contract, Lane, and Verdict sections for the Contract Based Review Method (CBRM). Use when preparing a repo for agent work or setting up a verification harness.
Ships in dominicode-sdd-creator. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Prepare a repository so an agent can work on it and you can trust the result without reading every line.
Part of the Contract Based Review Method (CBRM) — by Bezael Pérez · Dominicode.
This file instructs the agent that sets up the harness. The
AGENTS.mdit generates for the target repository comes fromtemplates/AGENTS.template.md.
Issue -> Contract -> Lane -> Verdict -> PR
(criteria) (harness) (evidence)
You don't trust the agent's code because it looks right. You review it against a contract: the acceptance criteria of the spec, each with the command that proves it. The lane keeps the agent inside the agreed scope and gives it a harness to check itself. The verdict is per-criterion evidence, and it replaces your patience while reading diffs.
The generated AGENTS.md has exactly those three parts:
| Part | What it holds |
|---|---|
| Contract | Where the task's acceptance criteria live and the definition of done |
| Lane | Stack, harness (short and long loop), known reds, conventions, boundaries |
| Verdict | The format the agent must deliver: status, alignment, criterion → evidence table |
This skill sets up the lane. Without a lane, the contract is a statement of intent and you have to issue the verdict manually — exactly the problem we came here to solve.
For non-trivial features, the contract comes from the dominicode-sdd-creator skill (spec.md + tasks.md). For small Issues that don't warrant a full spec (a bug with a clear repro, a single-file change), a copy of the light contract template at .dominicode/specs/<issue-number>-<slug>.md is enough. See dominicode-sdd-creator/references/cbrm.md for the full method.
Never put a command in the harness that you have not run.
A harness with invented commands is worse than having no harness: the agent thinks it is verified, you think it is verified, and nobody has checked it. Every command that ends up in the final file must have been run in Phase 1, with its output recorded.
If a command exists but fails in the repository as it is today, that does not exclude it from the harness — document it as a known red. An honest harness with two reds is worth more than a fake green one.
Do not modify anything. Only read and run commands.
Find manifests and derive the package manager from lockfiles, not convention:
| Manifest | Stack | Lockfile to check |
|---|---|---|
package.json | Node/TS | pnpm-lock.yaml, yarn.lock, package-lock.json, bun.lockb |
pyproject.toml, requirements.txt | Python | uv.lock, poetry.lock |
go.mod | Go | — |
Cargo.toml | Rust | Cargo.lock |
pom.xml, build.gradle | Java/Kotlin | — |
*.csproj, *.sln | .NET | — |
Gemfile | Ruby | Gemfile.lock |
composer.json | PHP | composer.lock |
If multiple manifests appear, this is a monorepo: ask which package the harness should cover before proceeding.
Look for candidates in manifest scripts, Makefile / Justfile / Taskfile, and .github/workflows workflows — CI is often the most reliable source for the project's real commands. If the repo uses ai-workflow-kit, .ak/config.md (## Commands: Test, Lint, Typecheck, Build, E2E) lists the commands /ak-setup found; treat them as candidates like any other and run them, since that file records that a command exists, not that it passes.
The harness has six categories:
One at a time. For each one, record: exact command, exit code, duration, and the last lines of output if it fails.
A command that takes 8 minutes is not suitable for the short loop even if it works. The harness has two speeds:
If a command does not exist, do not invent or install it yourself: report it as a gap.
AGENTS.md, CLAUDE.md, .cursorrules, .cursor/rules/, .github/copilot-instructions.md, .claude/, .pi/, .ak/config.md.
.ak/config.md belongs to ai-workflow-kit: never write it. Both tools read each other's format, so the lane and that file can live side by side; the kit's verify --final runs the lane's loops too.
If any already exist, do not overwrite them. Read them, then propose the diff in Phase 2.
If the root AGENTS.md (or GEMINI.md, or a .cursor/rules/*.mdc) is the dominicode-sdd-creator skill file copied by a 1.7.x install (it starts with # AGENTS.md — Dominicode SDD Creator), do not merge the lane into it. Report it and propose moving the skill to .agents/dominicode-sdd-creator/ (with its templates/ and references/) and replacing the root file with the lane.
| Mechanism | Command | Status | Time |
|--------------|--------------------|----------------|------|
| Build | pnpm build | OK | 24s |
| Type check | pnpm tsc --noEmit | OK | 6s |
| Tests | — | DOES NOT EXIST | — |
| Lint | pnpm lint | FAILS (12) | 4s |
| CI | — | DOES NOT EXIST | — |
| E2E | — | DOES NOT EXIST | — |
Before writing anything, show the list of files you will create or modify and wait for confirmation. If a file already exists, show the proposed diff — never overwrite it without permission.
Generate using the real commands verified in Phase 1, never placeholders:
AGENTS.md — the repo's permanent rules, in three parts: Contract (where acceptance criteria live, definition of done), Lane (stack, verification commands at both speeds, known reds, conventions detected in existing code, boundaries) and Verdict (the evidence format every task ends with). Template at templates/AGENTS.template.md.CLAUDE.md — if the user works with Claude Code and it does not exist, a one-line pointer to AGENTS.md. Do not duplicate the content: it will drift within two weeks..dominicode/spec.template.md — the light task contract for small Issues. Template at templates/spec.template.md. Always generate it, even in repos that use the SDD skill: small Issues need a contract too. The template is never filled in place — each small Issue gets a copy at .dominicode/specs/<issue-number>-<slug>.md. The Contract section of AGENTS.md names both locations: specs/<slug>/ for features and .dominicode/specs/ for small Issues..github/PULL_REQUEST_TEMPLATE.md — Contract, Lane and Verdict sections with an evidence table. Template at templates/pr.template.md.Always close with this, in this format:
## Your harness status
**Current level: N of 4**
[Phase 1 table]
### Gaps, by impact
1. [Gap] — [what it currently lets through]
2. ...
### Your next move
[ONE concrete action, with the command or file]
One move per report. Anyone who tries to climb three levels at once climbs none.
The method does not depend on Claude. Pi loads this SKILL.md as is (it implements the Agent Skills specification) and reads the generated AGENTS.md from the repo root, so it needs no CLAUDE.md pointer. The dominicode-sdd-creator Claude Code plugin (as hooks) and the Pi package (as an extension) both ship verified done, which runs the short loop of that AGENTS.md every time the agent stops after changing files and sends a red result back to it: keep the Short loop heading and its bash block as the template writes them, and annotate a command known red only when it truly predates the agent. For agents that read instruction files (Codex, Cursor, Gemini CLI, Aider…), use AGENTS.md in this folder. For any agent with repository access and no instruction-file support, references/generic-prompt.md contains the same three phases as a standalone prompt that can be pasted and used.
Skill by Bezael Pérez · Dominicode — part of the Contract Based Review Method (CBRM).
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub bezael/sdd-creator --plugin dominicode-sdd-creator2 skills in this plugin
Other plugins' skills for the same job