Nacl tl verify code

From ITSalt/NaCl · View interactive version

Nacl tl verify code is an AI agent skill from the GitHub repository ITSalt/NaCl. Verify NaCl TL code correctness by tracing data flow, checking contracts, running configured tests, comparing failures, and reporting evidence. Use when verifying changed code for a UC or TECH item, checking data flow after a fix, or for compatibility with `/nacl-tl-verify-code`.

How to use this skill

Skill file

NaCl TL Code Verification For Codex

Read ../nacl-tl-core/SKILL.md and ../nacl-tl-core/references/tl-codex-contract.md before executing this workflow.

Verify correctness, not style alone. TL artifacts and reports remain English.

Read ../references/migration-rules.md and

../references/verification-vocabulary.md before executing the workflow.

Contract

Inputs consumed:

Outputs produced:

Downstream consumers:

Workflow

Step 1: Identify Change

Read the work item description and changed files. Determine affected modules,

entry points, data owners, API boundaries, and final consumers.

Enumerate acceptance criteria. Read the work item's acceptance criteria and

build a per-criterion checklist — one entry per criterion, not the category

groups. This is the requirements-traceability checklist Step 5 traces against:

verification keyed on code-presence alone passes a change that touches

clean-tracing code while an acceptance criterion is entirely unimplemented (the

"missing-requirement" defect class — e.g. an audit-log row the spec demands but

no code writes). For each criterion, during the Step 2 trace mark whether it is

implemented (a changed-code path actually produces the behaviour, confirmed

via the cross-file trace, not a plausibly-named function or dead config) and

whether it is covered (a test exercises it). If no acceptance criteria are

available, record that the traceability check was skipped; do not fail on its

absence.

If changed files or scope cannot be resolved, report:

Status: BLOCKED
Reason: changed code scope is unavailable

Step 2: Trace Data Flow

Trace data end to end across relevant layers:

Check field names, types, nullable values, error propagation, renamed fields,

and contract compatibility between layers.

The layers above are the canonical chain, but a defect often lives one hop off

it — in a caller or a runtime the chain does not name. Do not stop at the

template; trace the actual code graph. For each external symbol the changed

code calls (a client, service, or util), open the file that defines it and

confirm the assumptions hold: signature, return shape, and any hardcoded value

that silently overrides a parameter. A field can be declared in the contract or

config yet never be set by the runtime (dead config), so the feature reads as

implemented while the runtime does something else — invisible if you read only

the changed files. For each exported symbol the change modifies (renamed field,

new return shape, changed enum), grep the source roots for imports and

call-sites of the symbol, then re-apply the per-layer checks at each consumer

found. Report any cross-file mismatch as a normal correctness finding; it

contributes to FAILED like any other defect.

Step 3: Verify Storage And Contracts

For database or persistence changes, inspect migrations, constraints, indexes,

default values, and code assumptions. For API changes, compare request and

response types to the contract and frontend usage.

Use database or graph tools only when available. Otherwise report the missing

runtime check as NOT_RUN or PARTIALLY_VERIFIED.

Step 4: Check Common Correctness Risks

Look for incomplete renames, stale imports, unhandled optional values, missing

error handling, frontend fields absent from backend responses, backend fields

unused by frontend consumers, and tests that assert implementation details

instead of behavior.

Step 5: Run Tests And Compare

Discover the configured test command from the affected workspace. Do not

invent a runner.

When execution is available:

  1. Run the relevant suite or scoped tests.
  2. Record collected tests and failures.
  3. If the runner collects zero tests, retry against a known relevant test file

when one exists.

  1. Compare failures with any available baseline from the implementation result

or a pre-change run.

  1. Check whether test files import or exercise the changed modules.

If no configured runner exists, report BLOCKED. If tests run but coverage is

missing, report PARTIALLY_VERIFIED or UNVERIFIED based on the strength of

the static evidence.

Acceptance-criteria traceability gap. Cross the per-criterion checklist

from Step 1 against the trace and test results: any criterion that is neither

implemented in the change (Step 2) nor covered by a collected test is a

coverage gap — route it through the same coverage-gap mapping above and report

Status: UNVERIFIED. A change cannot reach a passing status while a required

behaviour is unverified. (A criterion implemented but contradicted by the code

is a behaviour defect → Status: FAILED, not a coverage gap.)

Source-Parity Requirements

persistence, contracts, and tests rather than only judging code style.

recovery or transaction behavior when applicable.

Do not invent fallback commands.

successful test output is at most PARTIALLY_VERIFIED unless the task is

explicitly code-inspection-only.

Step 6: Return Result

Return:

Use VERIFIED only when static correctness checks and required tests support

the contract. Use FAILED for confirmed behavior or contract defects.

Self-adversarial check before emitting FAILED: re-read the cited code

path once more and try to refute your own finding (a guard, a consumer that

never hits it, a type that makes it safe); keep the finding — and the FAILED

status — unless that second read gives positive evidence it is a non-issue.

Never drop the finding on uncertainty.

Capabilities

May Do

Must Not Do

changes the request to repair.

Conditional Tools And Actions

and dependencies.

environment access.

Blocked Or Unverified Reporting

tools are unavailable.

end-to-end evidence is incomplete.

item.

Source Comparison

Preserved Methodology

Removed Claude Mechanics

Codex Replacement Behavior

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.