From atv-starter-kit
Functional-test strategy and test-quality audit for KB workflows. Use when deciding whether a slice needs functional/e2e/browser/API workflow tests, when existing tests may be mocked theater, or when user-visible behavior must be verified without manual QA.
How this skill is triggered — by the user, by Claude, or both
Slash command
/atv-starter-kit:kb-functional-test [slice plan, feature, changed files, or test file][slice plan, feature, changed files, or test file]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Functional tests prove the real workflow works. Unit tests prove parts. Both matter, but mocked tests that never exercise the behavior do not count.
Functional tests prove the real workflow works. Unit tests prove parts. Both matter, but mocked tests that never exercise the behavior do not count.
This skill owns the test-level decision for KB work. kb-plan records the initial decision, kb-work re-checks it before marking a slice done, and kb-complete uses it for manifest-level smoke coverage.
This is a lazy helper lane. Do not load it for every slice. Load it when the test level is unclear, UI/API/CLI behavior could be faked by low-level tests, or the slice touches user-visible behavior.
verification describes the workflow mode (tdd, integration, functional, verification-only, hitl). test_level describes the concrete proof required:
test_level | Use When | Minimum Proof |
|---|---|---|
none | copy/style/docs-only, dead-code removal, generated/config-only with build/lint coverage | lint/build/check only |
unit | isolated pure logic, parser/formatter/helper, no public workflow boundary | focused unit test that fails before fix |
integration | wiring between modules, persistence, callbacks, service boundaries, API contract internals | integration test using real collaborating code where practical |
functional-api | HTTP/API workflow, action/tool endpoint, command handler, data contract visible to callers | API smoke/test through public surface |
functional-cli | CLI command or script behavior users/operators invoke | CLI smoke script/test with real arguments and observable output |
functional-browser | UI flow, DOM state, navigation, visual interaction, browser-only behavior, or major functionality exposed through the UI | headless Playwright/Cypress/CDP/agent-browser probe that drives the behavior through the UI with observable assertions |
full | release/high-risk flow touching auth, persistence, integration, UI, or multiple critical paths | targeted functional checks plus broader suite/smoke |
functional_risk is the execution breadth: none, narrow, broad, or full.
Run this before any judgment-based classification.
If expected_files contains .tsx, .jsx, .vue, or .svelte files, set test_level: functional-browser automatically. The agent must not downgrade this classification to unit, integration, functional-api, verification-only, or none.
Also set test_level: functional-browser when non-UI files change behavior whose primary user path is through the rendered app UI.
functional-browser means:
If Playwright cannot access the target because the route requires an existing authenticated corporate browser session, use the repo/platform's authenticated browser transport (for example CDP) and record why Playwright was not viable. This is still functional-browser; it is not backend/API verification.
Functional assertions must test behavior the user would verify, not implementation structure.
Behavioral assertions are correct:
locator('.margin-value').toBeVisible() plus text matching a number pattern..deal-row count is greater than 0.Structural assertions are wrong:
margin-value containing 42%" -> breaks on harmless CSS or markup refactors./api/deals/submit" -> tests implementation, not user behavior.state.isLoading becomes false" -> tests internals, not rendered outcome.Use stable selectors when needed, but make the asserted condition behavioral. Before writing an assertion, ask: "Would a user verify this the same way?" If not, it is structural and should be rewritten.
Classify from concrete evidence, not vibes:
expected_files.integration.functional-api or functional-cli.functional-browser.Default upward when uncertain. A narrow functional check is cheaper than shipping a workflow lie.
Require at least one functional or integration-style test when a change touches:
If the changed behavior has a runnable UI path, the functional proof must go through the rendered UI. That means opening the page/screen, interacting with the visible control the user would use, and asserting the rendered result or visible state change. Backend/API/unit tests may supplement that proof, but they do not satisfy it. Do not downgrade to API/backend-only verification because it is faster.
Skip or defer functional tests only when the change is dead-code removal, local refactor with existing coverage and no user-visible path, or a generated/config-only change covered by build/lint. Pure copy/style still needs rendered UI evidence when it changes what a user sees.
This decision is eligible for small/mini models when the platform supports model-tiered subagents.
Good mini-model tasks:
test_level and functional_risk from a slice plan;Do not use a mini model as the final proof of behavior. The proof is the command, test, browser probe, screenshot, or failing/passing output. Escalate to a stronger model when classification depends on architecture, auth/security, flaky async behavior, complex UI state, or repeated failures.
An existing test is meaningful only if it:
If a test mostly asserts mocks were called, snapshots noise, or duplicates implementation logic, mark it weak and add a better functional probe.
.atv/qa-screenshots/ or the repo's configured QA artifact path.kb-complete cleanup. Do not keep unlimited traces/videos unless they explain a failure.If a functional check will be repeated, turn it into a script or test:
Add the command to docs/context/operations/testing.md and make kb-check able to discover or call it.
Report:
test_level;For functional-browser, proof must include the executed browser assertion file or project test path plus exit code. A screenshot-only or prose-only claim is not functional proof.
npx claudepluginhub irtechie/atv-starterkit --plugin atv-starter-kitGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.