knowns-dev/knowns/2026-08-27
Claude Code and agent skill by knowns-dev/knowns
- community
Checking that the SKILL.md file is still in the repository.
Specification for a built-in kn-test skill that turns spec Scenarios and ACs into tests and reports AC-level gaps
Install
npx vskill@latest install knowns-dev/knowns/2026-08-27SKILL.md
Overview
Add kn-test, a built-in skill that turns a spec's Scenarios and Acceptance Criteria into actual tests, and reports which criteria no test yet proves.
An audit of all sixteen skill sources found testing is not an owned responsibility anywhere. The word "test" appears roughly 33 times, but only one line in the entire set instructs anyone to write a test:
One bullet, inside a five-step plan template. Everything else is downstream of tests already existing: kn-implement:92 runs them, kn-review:86 flags when they are missing, kn-debug triages them once red, kn-research reads them as evidence. kn-verify contains the word zero times — it verifies spec-to-task coverage, not tests, so a project whose entire suite fails still passes it.
The sharper defect is a loop the workflow leaves open. kn-spec generates a ## Scenarios section in Given/When/Then form and its own checklist makes that section mandatory. Exactly one skill reads it — kn-plan:87, and only to group requirements into tasks. No skill turns a Scenario into a test case. Meanwhile acceptance criteria are satisfied by bookkeeping rather than evidence:
So a criterion becomes "met" because a task was closed, not because anything demonstrated it. kn-test closes that loop.
Related: @doc/specs/2026-08-27/kn-decision-skill established the pattern this follows — give a new skill only the responsibility no existing skill holds.
Locked Decisions
- D1:
kn-testderives test cases from a spec's Scenarios and ACs, writes them following existing repository conventions, and reports which ACs no test covers. Running the suite stays withkn-implement, triaging failures stays withkn-debug, and flagging absent tests during review stays withkn-review. The skill takes the design and gap-reporting work that no skill currently owns, and takes nothing that already works. - D2:
kn-testbecomes a step in thekn-flowExecution Loop, placed between implement and review. Unlikekn-decision, which is triggered by an exceptional condition and therefore needs only handoff pointers, testing is ordinary cycle work for every behaviour-changing task. A pointer-only integration would leave it unused, because nothing fails to signal that it was skipped. Placing it before review means the reviewer sees code and tests together. - D3: The mapping from AC or Scenario to test lives in the skill's report and the task notes, not in the test code. No AC identifier is added to test names or comments. The repository's 181 existing test files use descriptive names with no criterion references, and imposing a new convention on them is a larger change than this work justifies.
- D4:
kn-testreports no coverage percentage and enforces no coverage threshold. The repository configures none anywhere — no-coverprofile, no reporting service, no gate — and the only mention is non-enforced prose in.knowns/docs/development/conventions/checklist.md. Line coverage also answers a weaker question than the one this skill exists for: a high percentage says nothing about which acceptance criterion is unproven.
Correction, recorded rather than silently patched: D4 originally also cited CONTRIBUTING.md as mentioning coverage. Review of the skill found no such text — grep -i coverage CONTRIBUTING.md returns nothing. The claim came from an earlier research pass and was wrong. The decision itself is unchanged; only the false supporting citation was removed.
System Decision Impact
- Impact: none — D1 through D4 are execution rules scoped to this skill and kept canonically in this spec's
Locked Decisionssection.
A judgment worth surfacing rather than burying: D2 adds a mandatory step to the shared orchestration loop, which shapes how every later task is executed and is closer to durable guidance than anything in the kn-decision spec was. It is recorded as none because the canonical statement of that rule is kn-flow/SKILL.md itself, and the project forbids mirroring scoped spec rules into the System Decision ledger. A reviewer who disagrees should say so before approval rather than after.
Requirements
Functional Requirements
- FR-1: A new built-in skill source exists at
internal/instructions/skills/kn-test/SKILL.mdwith the standard frontmatter. - FR-2: The skill documents how to derive concrete test cases from a spec's
## ScenariosGiven/When/Then blocks and from its Acceptance Criteria. - FR-3: The skill documents how to choose the right test layer for a case, covering the four that exist in this repository: Go unit tests beside the source, Go end-to-end tests under
tests/that drive the built binary, UI unit tests underui/srcusingbun:test, and UI end-to-end specs underui/e2eusing Playwright. - FR-4: The skill states the repository's real commands rather than generic ones, including the race flag and the count flag that the Makefile uses.
- FR-5: The skill produces a mapping of each AC and Scenario to the test that covers it, marking those with no test.
- FR-6: The skill reports gaps at AC level and contains no coverage percentage, target, or threshold.
- FR-7: The skill states that running the full suite belongs to
kn-implementand failure triage belongs tokn-debug, so the boundaries are explicit rather than inferred. - FR-8: The skill handles a task with no linked spec by deriving cases from the task's own acceptance criteria.
- FR-9: The skill instructs the reader to say plainly when an AC cannot be proven by an automated test, rather than writing a test that appears to cover it.
- FR-10:
kn-flow's Execution Loop includeskn-testbetween implement and review. - FR-11: The built-in skill count assertion in
internal/instructions/skills/contracts_test.gois updated from 16 to 17. - FR-12: Every hardcoded skill roster is updated to include
kn-test— the nineSKILL.mdfiles carrying the shared roster sentence, and the user-facing docs that enumerate skills.
Non-Functional Requirements
- NFR-1: The skill source is platform-neutral, containing none of the markers
TestBuiltInSkillContractsrejects. - NFR-2: The skill's final user-facing response follows the shared order:
Goal/result,Key details,Next action. - NFR-3: The skill is comparable in length to existing skills, roughly 150-320 lines.
- NFR-4: The skill introduces no testing practice the repository does not already have. Specifically it mandates no coverage threshold, no test-first ordering, and no criterion identifiers inside test code.
Acceptance Criteria
- [ ] AC-1:
go test ./internal/instructions/skillspasses with the count assertion at 17 andkn-testpresent in the embedded set. - [ ] AC-2:
TestBuiltInSkillContractspasses forkn-test, confirming response-order markers appear in order and no platform-specific marker is present. - [ ] AC-3: The skill body describes deriving test cases from both Given/When/Then Scenarios and Acceptance Criteria.
- [ ] AC-4: The skill body names all four test layers present in this repository and states which kind of case belongs at each.
- [ ] AC-5: The skill body contains the repository's actual test commands, matching what the Makefile runs.
- [ ] AC-6: The skill body contains no coverage percentage, target, or threshold, and no instruction to run a coverage profile.
- [ ] AC-7: The skill body states that running the suite belongs to
kn-implementand failure triage tokn-debug. - [ ] AC-8: The skill body specifies the AC-to-test mapping as report output, and instructs against adding criterion identifiers to test names or comments.
- [ ] AC-9:
kn-flow's Execution Loop lists kn-test between the implement and review steps. - [ ] AC-10: The nine roster carriers plus the enumerating docs all list
kn-test, and the roster sentence remains byte-identical across every carrier. - [ ] AC-11: After building from source, sync places
kn-testin the generated platform skill directories. - [ ] AC-12:
knowns validate --sddreports no warnings attributable to this change.
Scenarios
Scenario 1: Happy Path — tests derived from a linked spec
Given a task linked to a spec that has Scenarios and ACs, with implementation complete When the developer runs /kn-test Then the skill lists a test case per Scenario and AC, writes the missing ones at the appropriate layer, and reports a mapping showing which criteria are now covered and which are not
Scenario 2: Task with no linked spec
Given a standalone task with acceptance criteria but no spec When /kn-test runs Then cases are derived from the task's own ACs, and the mapping is reported against those instead
Scenario 3: Edge Case — a criterion no automated test can prove
Given an AC that depends on human judgement or an environment the suite cannot reach When the skill reaches that criterion Then it reports the criterion as not automatable with a short reason, rather than writing a test that appears to cover it
Scenario 4: Edge Case — an existing test already covers a criterion
Given an AC already proven by a test written earlier When the skill builds its mapping Then it links the existing test and writes no duplicate
Scenario 5: Edge Case — coverage percentage requested
Given a user asks what the coverage number is When the skill responds Then it reports which ACs lack tests and states that this project configures no coverage tooling, rather than inventing a number or a threshold
Scenario 6: Orchestrated run
Given kn-flow is executing a task through its loop When implementation finishes Then the test step runs before review, so the reviewer sees the implementation and its tests together
Technical Notes
- Canonical source is
internal/instructions/skills/kn-test/SKILL.md. Generated copies under.claude/skills/,.agents/skills/, and.kiro/skills/are overwritten by sync and are out of implementation scope. //go:embed kn-*picks up the new directory automatically. Only the hardcoded count incontracts_test.goneeds editing;internal/codegen/skill_sync.goderives its count from the embed FS.- Verifying the sync criterion requires building from source first.
knowns synccopies skills from the embed FS of the binary that runs it, not from the source tree, so an installed binary will silently sync the old set and produce nothing. Build withgo build -o /tmp/knowns-dev ./cmd/knownsand run that. - Repository test commands, as the Makefile defines them:
go test -v -race -count=1 ./...for Go unit tests;cd tests && go test -v -timeout 300s -count=1 -run TestCLI ./...for CLI end-to-end;bun test srcfor UI unit;bun test:e2efor Playwright. CI runsgo vet, notgolangci-lint. - Go tests here use the standard library only.
testifyappears ingo.modas an indirect dependency and is not imported by any test. Table-driven cases witht.Runsubtests are the dominant pattern.
Task Generation
- Task Prefix: KNT
Task Links
Generated tasks will be linked here after /kn-plan --from @doc/specs/2026-08-27/kn-test-skill runs.
Open Questions
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.knowns/docs/specs/2026-08-27/kn-test-skill.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/knowns-dev/knowns/2026-08-27)