Skip to content
Skills Library
Programming · Building & coding

dx-write-implementation

/dx-write-implementation

Use when a branch already carries failing tests and someone wants the code that satisfies them, for example "make these tests pass", "implement against the red branch", "write the code for 142, the tests are already there", or "go green". Reads the coverage declaration the test half committed, writes production code against those tests only, and reports any contract item it found no test for instead of quietly writing one. Runs alone, or as the second half of `dx-implement-issue`. Picked up by an engineer or a coding agent. The argument is either an issue number or a pasted markdown body, give

Repository
dx-harness ↗
Licence
GPL-3.0
Last repository change
27.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

GPL-3.0, otwarta.

What it does and when to use it

Use when a branch already carries failing tests and someone wants the code that satisfies them, for example "make these tests pass", "implement against the red branch", "write the code for 142, the tests are already there", or "go green". Reads the coverage declaration the test half committed, writes production code against those tests only, and reports any contract item it found no test for instead of quietly writing one. Runs alone, or as the second half of `dx-implement-issue`. Picked up by an engineer or a coding agent. The argument is either an issue number or a pasted markdown body, give

Triggers from the description

make these tests passimplement against the red branchwrite the code for 142, the tests are already therego green
Original author description

Use when a branch already carries failing tests and someone wants the code that satisfies them, for example "make these tests pass", "implement against the red branch", "write the code for 142, the tests are already there", or "go green". Reads the coverage declaration the test half committed, writes production code against those tests only, and reports any contract item it found no test for instead of quietly writing one. Runs alone, or as the second half of `dx-implement-issue`. Picked up by an engineer or a coding agent. The argument is either an issue number or a pasted markdown body, give

How it works

  1. Step 1: Get the contract
  2. Step 2: Read the coverage declaration
  3. Step 3: Reconcile the declaration against the contract
  4. Step 4: Implement against the tests
  5. Step 5: Cover what the implementation revealed
  6. Step 6: Run the checks the repository runs
  7. Step 7: Report
  8. Rules
Original SKILL.md headings · 103 lines, 895 words
SKILL.md preview
---
name: dx-write-implementation
description: 'Use when a branch already carries failing tests and someone wants the code that satisfies them, for example "make these tests pass", "implement against the red branch", "write the code for 142, the tests are already there", or "go green". Reads the coverage declaration the test half committed, writes production code against those tests only, and reports any contract item it found no test for instead of quietly writing one. Runs alone, or as the second half of `dx-implement-issue`. Picked up by an engineer or a coding agent. The argument is either an issue number or a pasted markdown body, given as $ARGUMENTS'
---

You write the production code that turns a red branch green. The tests are already
written, so what you have to satisfy is settled before you start.

## Step 1: Get the contract

**Called by `dx-implement-issue`**: it has already run the intake and hands you the
numbered contract items, the shape, the surface assessment, the bound agent
patterns, and the test stack. Use them.

**Invoked alone**: run [../../../procedures/issue-contract.md](../../../procedures/issue-contract.md)
yourself, all eight steps.

## Step 2: Read the coverage declaration

Recover the declaration the test half wrote, with the command in
[../../../procedures/commit-discipline.md](../../../procedures/commit-discipline.md).
It tells you which contract items have a test, where each test is, and which items
were recorded as manual.

Three states, and each has a defined answer:

- **A declaration is present.** Use it as your work list. Go to Step 3.
- **No commit carries a declaration, and the suite has failing tests anyway.** Somebody wrote tests without the test half. Say so, list the failing tests you found, and treat them as the work list. Note in your report that no declaration backs them, so the manual items are unknown.
- **No declaration and no failing tests.** The test half never ran on this branch. Stop. Say that there is nothing to implement against, and that `/dx-harness:dx-write-tests <the same argument>` produces it. Do not write tests here to fill the gap.

## Step 3: Reconcile the declaration against the contract

Compare the declaration's items against the numbered contract items from Step 1.
This check runs before any code.

| What you find | What you do |
| --- | --- |
| Every contract item is covered or recorded as manual | Proceed to Step 4 |
| A contract item appears in neither place | Report it as an uncovered item and ask whether to proceed without it. Do not write its test |
| The declaration names an item the contract does not | Report it. The issue changed after the test half ran |

Report an uncovered contract item. Never close the gap by writing the missing test
yourself.

## Step 4: Implement against the tests

Take the covered items in the declaration's order. For each one:

1. Read the test named in the declaration, and read it as the specification. It is what the criterion means, in this repository's terms
2. Write the production code that makes it pass
3. Run the command the issue contract recorded. Confirm that test passes, and that nothing that was passing now fails
4. Commit, per [../../../procedures/commit-discipline.md](../../../procedures/commit-discipline.md)

Follow the conventions in the repository's own agent instructions, and where they
are silent, follow what the surrounding code already does.

Two limits hold throughout:

- **Do not edit a test to make it pass.** A test that is wrong is a question back to whoever wrote it, not something to adjust. The one exception is a test that does not compile, and even then you fix the compile error and leave the assertion exactly as it was.
- **The diff touches only what the contract names.** Respect every constraint the issue states, including its out-of-scope list. If a constraint conflicts with a contract item, stop and surface the conflict rather than resolving it silently.

## Step 5: Cover what the implementation revealed

Your code has paths nobody named: an internal error branch, a boundary the happy
path never reaches, a concurrent write. Add tests for the ones your implementation
introduced, following the repository's assertion conventions.

Keep the line between this and Step 3 clear:

- **A path your code introduced** is yours to test. It did not exist when the test half ran.
- **A contract item with no test** is not. That is Step 3's gap, and it gets reported.

List every test you added here in your report, separately from the ones the test
half wrote.

## Step 6: Run the checks the repository runs

Run what its continuous integration runs. The repository's agent instructions and
its package scripts name them: usually a lint, a typecheck, and the test suite.

All of them pass before you report. If one fails, fix it.

## Step 7: Report

1. **Branch**: the branch name
2. **Files changed**: each file, and what changed
3. **Coverage**: each contract item, the test that covers it, and that it now passes
4. **Uncovered**: any contract item with no test, from Step 3, and that you did not write one
5. **Tests you added**: the ones from Step 5, marked as written after the code
6. **Manual items**: carried through from the declaration, in the words the test half wrote
7. **Checks**: each command you ran and its result

**Called by `dx-implement-issue`**: hand this back and stop. The router opens the
pull request.

**Invoked alone**: say that the branch is green and that
`/dx-harness:dx-create-pr` opens the request. Do not open it yourself.

## Rules

- Read the coverage declaration before writing any code. It is the work list.
- Report a contract item with no test. Never write the missing test yourself.
- Never edit a test to make it pass. A wrong test is a question, not a task.
- A test you add covers a path your own implementation introduced, and your report says so.
- Every commit leaves the suite passing, and the checks pass before you report.
- Carry the manual items through unchanged.

Versions

The database has no other skills named dx-write-implementation.

Database snapshot: 13.11.2026 · package version 05c98b03093c (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100dx-write-tests
    Use when someone wants the tests for an issue written before any implementation exists, for example "write the tests for 142 first", "give me a failing test per acceptance criterion", "red branch for this issue", or "TDD this issue". Writes one failing test per contract item,…
  • 100dx-implement-issue
    Use when someone wants an existing GitHub issue built, for example "implement issue 142", "pick up this issue", "build the story in issue 98", or when they paste an issue body and ask for the code. Reads the issue, checks it is specific enough to build, plans against its…
  • 100software-implementation
    Write the minimal production code needed to make failing TDD tests pass (Green phase of red-green-refactor). Use when failing tests exist and production code must be written or modified to satisfy them. Reads and interprets failing test output, discovers codebase conventions…
  • 100red-green-refactor
    Guides the red-green-refactor TDD workflow: write a failing test first, implement the minimum code to make it pass, then refactor while keeping tests green. Use when a user asks to practice TDD, write tests first, follow red-green-refactor, do test-driven development, write…
  • 90tdd
    Implement the next unchecked step of an approved plan, or one review finding marked fix, as a red commit with failing tests and a green commit with the code that passes them; test files are locked during green. Use for all implementation work on a feature or fix branch.
  • 100implement-issue
    Implement a GitHub issue tests-first - take the acceptance criteria from the issue, write red tests against the public API, commit them, open a draft PR, then implement in checkpoint commits until green, with user-facing docs as one of the criteria. Use when asked to implement,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.