Use only when autopilot-code dispatches implementation verification and evidence recording. Not for top-level user requests or primary capability routing.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Code Test?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/dmlguq456-code-test-56ea97f4)
---
name: code-test
description: "Use only when autopilot-code dispatches implementation verification and evidence recording. Not for top-level user requests or primary capability routing."
metadata:
portable_source: capabilities/code-test.md
adapter: opencode
invocation_class: parent-invoked
---
# code-test
This is an OpenCode-native Skill projection generated from the portable
capability contract. It is adapter-owned output, not a legacy compatibility Skill copy.
## Source
- Portable source: `capabilities/code-test.md`
- Runtime check: `adapters/opencode/bin/preflight.sh capability-info code-test`
- Bootstrap: `adapters/opencode/AGENTS.md`
## Use
1. Read `capabilities/code-test.md` for the runtime-neutral contract.
2. Run `adapters/opencode/bin/preflight.sh capability-info code-test`.
3. Obey the reported status:
- `instruction-only`: use this Skill as OpenCode guidance plus explicit preflight guards.
- `tool-contract`: report the named `tool_contract`, run any `tool_contract_check`, and obey `runtime_surface` / `fallback` before claiming full support.
- `unsupported`: stop or use the reported `fallback`.
## Shape
- Identifier: `code-test`
- Invocation class: `parent-invoked`
- Supported modes: `none`
- Argument shape: `<plan name, path, or test scope> [--intensity direct|quick|standard|strong|thorough|adversarial]`
- Portable meaning: Verify implementation results in stages and record evidence.
## Portable Contract
- Invocation semantics: Assess graduated verification after `code-execute` or on demand to verify code correctness. Intensity-derived rigor scales final verification and test-adequacy review; it does not force a separate parallel QA loop by itself. The capability resolves a plan path, changed-file list, or test scope, assesses the applicable test levels, runs only checks whose evidence is missing or invalidated by the change, stops on the first failing new check, and records durable evidence before reporting a verdict. When the verification target includes a report spectrogram, assess the fail-closed figure semantic verifier against its manifest and report. Reuse its result only while the manifest, report, PNG hash, and visual-review evidence still match. Missing exact 48 kHz full-band metadata, range-compatible claims, shared-scale evidence, or a hash-current visual review is a failed level. For a planned QA leg with sealed `done_when` items, its `<primary-report>.items.json` is a derived output of that exact primary report. The existing report scope, sub-session fence, state ledger, and continuation carry the sidecar with the primary; no separate path input is needed. Adapters may expose this capability through native commands, skill files, prompt instructions, or explicit wrappers. The adapter must report unsupported runtime mechanics instead of silently treating another runtime's native file format as portable. Put pytest basetemp and tool scratch data under the supplied `runtime_dir` or system temporary storage. Keep test reports and compact evidence in the declared artifact outputs.
## Projected Portable Details
## Artifact Ownership
Artifact root: `core/CONVENTIONS.md §5.1`.
When invoked from a `team` `autopilot-code` stage cycle, write verification
evidence only to the test node's declared outputs and write scope. Return the final verdict to `code-report`, which owns
`pipeline_summary.md`; the `code-test` stage must not write that report-owned
artifact. Standalone invocations should create or reuse an appropriate
`plans/<date>_<slug>/` work-cycle directory and may update their own standalone
summary when no `code-report` stage exists.
Required evidence:
- test target resolution: plan path, changed-file list, or inferred scope;
- command log or explicit skip/block reason for each attempted level;
- failing level and first actionable error when verification fails;
- final one-line verdict suitable for handoff to `code-report`.
## Artifact Producer Lifecycle
`code-test` is a `team` stage worker: it never issues its own campaign or
cycle. It receives the owner's open cycle through
`AGENT_ARTIFACT_CAMPAIGN_ID`/`AGENT_ARTIFACT_CYCLE_ID`/`AGENT_ARTIFACT_PRODUCER_ID`/
`AGENT_ARTIFACT_CYCLE_DIR`/`AGENT_ARTIFACT_OUTPUT_DIR` (dispatch env
pass-through); the resolver applies the test node's declared outputs and
write scope.
`artifact_producer.py` owns the open cycle and its output paths; `finalize` and
`admit-shared` belong to the owner, never to a stage worker. See
`producer_lifecycle` in `capabilities/topologies.json`.
## Role Requirements
Use portable role names from `roles/README.md` and `core/CONVENTIONS.md`.
Concrete model names, subagent frontmatter, and runtime-specific tool lists
belong in adapter files.
Minimum role mapping:
- verification: QA role using `roles/units/qa/test.md`;
- review: optional QA reviewer for test adequacy when selected by QA/intensity risk;
- reporting: editorial/reporting role only for user-facing summary polish, not
for changing the test verdict.
## Guard Requirements
Adapters must preserve the portable invariants relevant to this capability:
- resolve artifact root through `utilities/artifact-root.sh` or equivalent logic;
- use DB memory paths, not runtime-native memory files.
Additional test-entry gates:
- run `roles/units/qa/test.md` semantics or the adapter-native projection of
that mode before claiming verification;
- if the adapter reports a `verification-runner` tool contract, run its
contract check or report unavailable;
- do not modify source files while acting in `code-test`;
- do not claim independent QA review unless a separate QA role, headless worker,
or external reviewer actually ran.
## Portable Procedure
1. Resolve the verification target:
- if a plan path is provided, read the plan's verification section and the
corresponding checklist/changed-file evidence;
- if changed files are provided, use them directly;
- otherwise infer recent changed files from git state and report the
inference.
2. Assess the applicable levels from `roles/units/qa/test.md`: syntax, import,
smoke, functional, integration, and behavioral runtime observation for
user-facing surfaces. These levels classify evidence; they do not require a
restart at syntax when valid evidence already covers a level. Use existing
execution, review, test, and CI artifacts when their source, scope, inputs,
dependencies, and run conditions still apply. Identify the changed delta,
any known failure, and any required unverified dimension.
If changed outputs include a spectrogram report, assess the fail-closed
figure semantic verifier against its manifest and report, reusing its result
only when the evidence remains current.
3. Run only selected checks whose evidence is missing or invalidated, in level
order, and stop at the first failure. Preserve known unresolved failures;
after a fix, rerun the check affected by that fix. A handoff or a historical
PASS marker alone neither invalidates command evidence nor satisfies the
current test gate.
4. Record commands, outputs or excerpts, skips, blockers, and the first
actionable failure in `test_logs/`.
5. Emit the final verdict as a handoff to `code-report`; in a `team` stage
cycle, `code-report` alone updates `pipeline_summary.md`. When no
`code-report` stage exists, a standalone invocation may update its own
standalone work-cycle summary.
6. Return a concise report path plus verdict to the caller.
## Shared Procedure References
Read the complete portable procedure files listed here when they apply; this logical read-set is shared across Claude, Codex, and OpenCode.
- `capabilities/code-test/references/procedure.md`
## Workflow Evidence
- For workflow state: `adapters/opencode/bin/preflight.sh status [cwd] [session-id]` and `adapters/opencode/bin/preflight.sh prompt-signal [cwd] [session-id]`
Do not use legacy compatibility Skill files or non-native adapter Skill files
as OpenCode-native source. Those files are compatibility/reference surfaces only.