User Input
$ARGUMENTS
Audience and tone (interactive mode)
When KISS_AGENT_MODE=interactive (the default), assume the user
has limited technical background and limited domain knowledge
— they may know basics but lack deep expertise in this skill's
area. Run this skill as a guided questionnaire:
- One question at a time. No walls of questions.
- Yes / no first. Phrase so
yes, no, not sure, or skip
is a valid answer.
- Translate jargon, don't strip it. Use the technical term but
always pair it with a plain-English gloss the first time it
appears.
- Choices, not blank fields. When yes/no isn't enough, offer
2-4 lettered options (A/B/C/D) with one-line plain-language
descriptions of the trade-off. Always include "Not sure — pick
a sensible default".
- Always recommend. State the option you would pick and why in
one sentence so the user can reply "yes" / "ok" to accept. Pull
defaults from upstream artefacts (spec, architecture, ADRs,
standards) before asking blank.
- Show, don't ask. When upstream artefacts already imply an
answer, propose it as a pre-filled finding and ask for a
yes / no confirmation rather than asking the user to fill in a
blank.
not sure / skip triggers a sensible default, marked
"(default applied — confirm later)" in the artefact, and a debt
entry in this skill's debt file.
When KISS_AGENT_MODE=auto (or --auto), skip the questionnaire
entirely: apply sensible defaults from upstream artefacts and log
decisions to the parent agent's decision log.
Inputs
.kiss/context.yml
{context.paths.docs}/design/<feature>/design.md
{context.paths.docs}/design/<feature>/api-contract.md (if present)
{context.paths.docs}/product/acceptance.md (for AC-linked tests)
Outputs
- Test files under the project's own test directory (
tests/,
spec/, __tests__/, etc. — the AI picks the right location).
{context.paths.docs}/testing/<feature>/unit-tests-index.md —
a per-feature index listing generated test files, the function
they cover, and which AC they trace to.
{context.paths.docs}/testing/<feature>/unit-tests-index.extract
Context Update
Does not mutate .kiss/context.yml. Does not run tests — it
scaffolds them.
Handoffs
kiss-implement executes the tasks that fill in test bodies
when skeletons alone are not enough.
kiss-test-cases (feature-level Given/When/Then) complements
unit tests with end-to-end scenarios.
kiss-test-execution records results.
AI authoring scope
Does: infer target language/framework from the project (check
package.json, pyproject.toml, go.mod, Cargo.toml), scaffold
one test file per module boundary, include a happy-path, a negative
case, and at least one boundary per public function, leave
intentional // TODO markers where a decision is deferred.
Does not: run the tests; invent business rules not present in
the design or acceptance criteria; replace tests the developer has
already written.
Usage
<SKILL_DIR> = the integration's skills root (e.g. .claude/skills/
for Claude Code, .agents/skills/ for Antigravity / Codex,
.cursor/skills/ for Cursor, .windsurf/workflows/ for Windsurf).
Scripts live at <SKILL_DIR>/<skill-name>/scripts/….
UT_FRAMEWORK=vitest UT_TARGET_DIR=tests \
bash <SKILL_DIR>/kiss-unit-tests/scripts/bash/scaffold-tests.sh --auto
Answer keys
| Key |
Meaning |
Default |
UT_FRAMEWORK |
vitest/jest/pytest/go-test/junit/xunit/rspec… |
auto-detected from project files |
UT_TARGET_DIR |
project-root-relative test dir |
auto-detected |
UT_MIN_COVERAGE |
informational threshold to log into the index |
80 |
Interactive flow
- Detect language + framework from project files.
- Read
design.md modules — one test file per top-level module.
- For each public function, propose: happy path + 1–2 negatives +
1 boundary. List them in the index file, then scaffold.
- Link each test back to an AC id (if any) so coverage → AC is
traceable.
Debt register
File: {context.paths.docs}/testing/<feature>/test-debts.md,
prefix TQDEBT-. Log when:
- A module has no public functions to test.
- A function has no clear happy path stated.
- Framework auto-detection fails.
References
references/framework-detection.md — how the script decides.
1---2name: kiss-unit-tests3description: Generates unit-test skeletons for the active feature from the design + acceptance criteria. Writes test files into the project's own test tree (not under docs/). Covers the happy path, negative branches, and at least one boundary per function. Use when writing unit tests, generating test skeletons for a feature, or when test coverage needs to be added for new code.4---567## User Input89```text10$ARGUMENTS11```1213## Audience and tone (interactive mode)1415When `KISS_AGENT_MODE=interactive` (the default), assume the user16has **limited technical background and limited domain knowledge**17— they may know basics but lack deep expertise in this skill's18area. Run this skill as a guided questionnaire:1920- **One question at a time.** No walls of questions.21- **Yes / no first.** Phrase so `yes`, `no`, `not sure`, or `skip`22 is a valid answer.23- **Translate jargon, don't strip it.** Use the technical term but24 always pair it with a plain-English gloss the first time it25 appears.26- **Choices, not blank fields.** When yes/no isn't enough, offer27 2-4 lettered options (A/B/C/D) with one-line plain-language28 descriptions of the trade-off. Always include "Not sure — pick29 a sensible default".30- **Always recommend.** State the option you would pick and why in31 one sentence so the user can reply "yes" / "ok" to accept. Pull32 defaults from upstream artefacts (spec, architecture, ADRs,33 standards) before asking blank.34- **Show, don't ask.** When upstream artefacts already imply an35 answer, propose it as a pre-filled finding and ask for a36 yes / no confirmation rather than asking the user to fill in a37 blank.38- **`not sure` / `skip` triggers a sensible default**, marked39 "(default applied — confirm later)" in the artefact, and a debt40 entry in this skill's debt file.4142When `KISS_AGENT_MODE=auto` (or `--auto`), skip the questionnaire43entirely: apply sensible defaults from upstream artefacts and log44decisions to the parent agent's decision log.4546## Inputs4748- `.kiss/context.yml`49- `{context.paths.docs}/design/<feature>/design.md`50- `{context.paths.docs}/design/<feature>/api-contract.md` (if present)51- `{context.paths.docs}/product/acceptance.md` (for AC-linked tests)5253## Outputs5455- Test files under the project's own test directory (`tests/`,56 `spec/`, `__tests__/`, etc. — the AI picks the right location).57- `{context.paths.docs}/testing/<feature>/unit-tests-index.md` —58 a per-feature index listing generated test files, the function59 they cover, and which AC they trace to.60- `{context.paths.docs}/testing/<feature>/unit-tests-index.extract`6162## Context Update6364Does not mutate `.kiss/context.yml`. Does not run tests — it65scaffolds them.6667## Handoffs6869- `kiss-implement` executes the tasks that fill in test bodies70 when skeletons alone are not enough.71- `kiss-test-cases` (feature-level Given/When/Then) complements72 unit tests with end-to-end scenarios.73- `kiss-test-execution` records results.7475## AI authoring scope7677**Does:** infer target language/framework from the project (check78`package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`), scaffold79one test file per module boundary, include a happy-path, a negative80case, and at least one boundary per public function, leave81intentional `// TODO` markers where a decision is deferred.8283**Does not:** run the tests; invent business rules not present in84the design or acceptance criteria; replace tests the developer has85already written.8687## Usage8889> `<SKILL_DIR>` = the integration's skills root (e.g. `.claude/skills/`90> for Claude Code, `.agents/skills/` for Antigravity / Codex,91> `.cursor/skills/` for Cursor, `.windsurf/workflows/` for Windsurf).92> Scripts live at `<SKILL_DIR>/<skill-name>/scripts/…`.9394```bash95UT_FRAMEWORK=vitest UT_TARGET_DIR=tests \96 bash <SKILL_DIR>/kiss-unit-tests/scripts/bash/scaffold-tests.sh --auto97```9899### Answer keys100101| Key | Meaning | Default |102|---|---|---|103| `UT_FRAMEWORK` | `vitest`/`jest`/`pytest`/`go-test`/`junit`/`xunit`/`rspec`… | auto-detected from project files |104| `UT_TARGET_DIR` | project-root-relative test dir | auto-detected |105| `UT_MIN_COVERAGE` | informational threshold to log into the index | `80` |106107## Interactive flow1081091. Detect language + framework from project files.1102. Read `design.md` modules — one test file per top-level module.1113. For each public function, propose: happy path + 1–2 negatives +112 1 boundary. List them in the index file, then scaffold.1134. Link each test back to an AC id (if any) so coverage → AC is114 traceable.115116## Debt register117118File: `{context.paths.docs}/testing/<feature>/test-debts.md`,119prefix `TQDEBT-`. Log when:120121- A module has no public functions to test.122- A function has no clear happy path stated.123- Framework auto-detection fails.124125## References126127- `references/framework-detection.md` — how the script decides.