code-test
Use only when autopilot-code dispatches implementation verification and evidence recording. Not for top-level user requests or primary capability routing.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 9
- Forks
- 2
01 前言 Front Matter
- 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.
03 SKILL.md 正文
code-test
This is a Codex-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/codex/bin/preflight.sh capability-info code-test - Bootstrap:
adapters/codex/AGENTS.md
Use
- Read
capabilities/code-test.mdfor the runtime-neutral contract. - Run
adapters/codex/bin/preflight.sh capability-info code-test. - Obey the reported status:
instruction-only: use this Skill as Codex guidance plus explicit preflight guards.tool-contract: report the namedtool_contract, run anytool_contract_check, and obeyruntime_surface/fallbackbefore claiming full support.unsupported: stop or use the reportedfallback.
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-executeor 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 sealeddone_whenitems, its<primary-report>.items.jsonis 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 suppliedruntime_diror 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 standard+ 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 standard+ 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.shor equivalent logic; - use DB memory paths, not runtime-native memory files.
Additional test-entry gates:
- run
roles/units/qa/test.mdsemantics or the adapter-native projection of that mode before claiming verification; - if the adapter reports a
verification-runnertool 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
- 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.
- 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. - 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.
- Record commands, outputs or excerpts, skips, blockers, and the first
actionable failure in
test_logs/. - Emit the final verdict as a handoff to
code-report; in astandard+stage cycle,code-reportalone updatespipeline_summary.md. When nocode-reportstage exists, a standalone invocation may update its own standalone work-cycle summary. - 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
- Before capability grounding/spec-changing work:
adapters/codex/bin/preflight.sh route code-test [cwd] [session-id] - For workflow state:
adapters/codex/bin/preflight.sh status [cwd] [session-id]andadapters/codex/bin/preflight.sh prompt-signal [cwd] [session-id]
Do not use legacy compatibility Skill files or non-native adapter Skill files as Codex-native source. Those files are compatibility/reference surfaces only.
04 同仓库更多 Skills
code-refine
Use only when autopilot-code dispatches plan revision after user notes, plan-check feedback, or verification failure. Not for top-level user requests or primary capability routing.
code-execute
Use only when autopilot-code dispatches the implementation stage for an approved plan. Not for top-level user requests or primary capability routing.
claude-aware
Demonstrate a skill source with inactive runtime-specific metadata.
portable-review
Review a change using portable, instruction-only guidance.
session-tidy
Use when context fills, before compact, on handoff to another session, after a large task, or on request. Not for primary routing or memory writes.
draft-strategy
Use only when autopilot-draft dispatches document strategy and evidence-plan creation. Not for top-level user requests or primary capability routing.