# Verification
URL: /documentation/plugin/verification



## What it does [#what-it-does]

`strata19.verify_implementation` is the verification gate: four deterministic detectors —
unreachable-file candidates, duplicate code fragments, placeholders and stubs, and configuration
gaps — run over the local index and return a real per-finding verdict that can contradict a
confident completion claim. Compiler-backed semantic providers add swallowed-exception and
unguarded-route findings when their prerequisites are available, and two traceability checks
report code with no spec (UC-01) and exported symbols with no intent link (RC-01). `strata19.run_native_security_analysis`
runs the deeper, taint-based security detectors and the same compiler-backed semantic detectors,
for an open-ended "what's actually wrong here" ask that the light gate alone does not answer.
`strata19.check_convergence` answers "is this project converged" from local `state.db` alone:
three of six hosted conditions are computed locally, the other three always report `degraded`
with the concrete reason no local table can answer them.

`strata19.ensure_ready`, `strata19.project_check_run`, and `strata19.project_check_export_proof`
compose a pre-push readiness verdict: whether a specbook and code index exist, a bounded
multi-stage Project Check across findings/coverage/caveats, and a privacy-reviewed exportable
proof of that check. `strata19.get_analysis_caveats` names what the analysis should not be
trusted to say — this run's bounds and warnings, plus permanent structural gaps.

## When to use it [#when-to-use-it]

Call `strata19.verify_implementation` before any completion claim, not only at the end of a task.
Call `strata19.run_native_security_analysis` for an open-ended "what's wrong with this repo"
ask, or when the user names a specific vulnerability class — command injection, SQL injection,
XSS, SSRF, path traversal — rather than reaching for a shell grep. Call
`strata19.check_convergence` to answer "am I done" against recorded intent; call it again with
`forceRecompute: true` only when you suspect the cache is stale. Call `strata19.project_check_run`
before opening a PR, when the change is wide enough to warrant more than the light gate.

Do not run `strata19.verify_implementation` mid-edit on work you already know is incomplete — it
is a real scan, not a progress bar. Do not treat a `degraded` convergence condition as a failure
to fix; it means no local table can answer that condition, and the premium living graph is what
would. Do not report a Project Check as passing when one of its stages did not run — a partial
check is a real, reportable state.

## How to use it [#how-to-use-it]

<Steps>
  <Step>
    Check convergence against recorded intent. A real call against this repository returned:

    ```json title="Call — strata19.check_convergence"
    {}
    ```

    ```json title="Response (excerpt)"
    {
      "verdict": "diverged",
      "conditions": [
        { "id": "implementationComplete", "status": "fail", "detail": "No local spec_inventory items or non-EXTRA obligations found — nothing to converge on" },
        { "id": "noDrift", "status": "pass", "detail": "No spec_code_mappings rows with compliance_status = DRIFTED" },
        { "id": "criterionCoverage", "status": "degraded", "detail": "Hosted-only: ... no local table establishes a criterion-to-test edge." },
        { "id": "guardCoverage", "status": "degraded", "detail": "Hosted-only: ... no local table records guard identity or positive/negative test-case pairing." },
        { "id": "noSecurityViolations", "status": "degraded", "detail": "Hosted-only: ... no local concept of route/endpoint, auth middleware, or a guard-to-endpoint edge exists." },
        { "id": "noProtocolViolations", "status": "pass", "detail": "No open critical-severity findings (local analog of hosted gap_protocol_violation)" }
      ],
      "cacheHit": true
    }
    ```

    Two conditions pass, one fails on a real reason, and three report `degraded` — each with the
    specific local-table gap that makes them unanswerable without the hosted living graph. This is
    the honest shape: a `degraded` reason is not the same as a failure, and the response never rounds
    it up to a passing verdict.
  </Step>

  <Step>
    Run the light gate before any completion claim:

    ```json title="Call — strata19.verify_implementation"
    { "limit": 25 }
    ```
  </Step>

  <Step>
    Escalate to the deep detectors for an open-ended ask:

    ```json title="Call — strata19.run_native_security_analysis"
    {}
    ```
  </Step>

  <Step>
    Compose a pre-push verdict:

    ```json title="Calls — strata19.ensure_ready, strata19.project_check_run"
    {}
    { "repoPath": "/path/to/repo" }
    ```
  </Step>
</Steps>

## Parameters [#parameters]

<TypeTable
  type="{
  taskId: {
    description: 'verify_implementation. Optional local work-item id. Supplied, evaluates that task’s pinned contract; omitted, this is a generic repo-wide scan and must not be read as confirming any one task complete.',
    type: 'string',
  },
  limit: {
    description: 'verify_implementation. Maximum findings embedded in the response (default 25). Bounds only the embedded page — totalFindings stays repo-wide.',
    type: 'number',
  },
  maxFiles: {
    description: 'verify_implementation. Caps how many files the detector scan walks. Hitting the cap marks the scan truncated rather than returning a partial result as complete.',
    type: 'number',
  },
  scope: {
    description: 'check_convergence. A SubjectRef (&#x22;work_item:WI-114&#x22;) to narrow unreviewed to one subject. conditions is always project-wide regardless of scope.',
    type: 'string',
  },
  forceRecompute: {
    description: 'check_convergence. Bypass the cache and recompute even when the ledger shows nothing dirty. Default false.',
    type: 'boolean',
  },
  requested: {
    description: 'run_native_security_analysis. Optional subset of detector ids (SEC-01..09). Defaults to every supported family.',
    type: 'string[]',
  },
}"
/>

`strata19.ensure_ready` and `strata19.get_analysis_caveats` take no parameters.
`strata19.project_check_run` takes an optional `repoPath`.
`strata19.project_check_export_proof` requires the `run` object from `project_check_run`; called
without `approvedPreviewDigest` it only returns the exact preview and writes nothing, and only a
second call with that digest writes the proof artifact.

Reviewing a pull request before push draws on a related family — `strata19.review_pull_request`,
`strata19.get_file_diff`, `strata19.list_pull_requests`, `strata19.list_git_branches`, and
`strata19.graph_from_git_range` — each documented on its own [reference page](/documentation/reference/tool-groups).

## What you get back [#what-you-get-back]

`strata19.verify_implementation` returns a per-finding verdict plus `totalFindings` and
`findingsByClass` computed repo-wide, independent of the embedded page. `strata19.check_convergence`
returns the `verdict` (`converged`/`diverged`/`degraded`), the six `conditions` shown above, and
`unreviewed` subjects the invalidation ledger flagged as changed since the last computation.
`strata19.project_check_run` returns a categorical assessment across named sections, each
reporting its own state — never silently omitted when a stage could not run.

## What a check result means [#what-a-check-result-means]

For a requirement a work item tracks, each outcome carries a state (`current`, `failing`, `stale`,
`not run`, `unresolved`, `uncommitted`) and, when current, a strength: `checked` (a test shown to
fail when the behaviour is broken), `passing, unproven` (it passes, but nothing shows it tests the
rule), `observed`, `structural`, or `signed off` (a person vouched; the pane says "Approved by a
person"). A green test alone is `passing, unproven`.

A check that could not run, or ran in a way that says nothing about the code, is `unresolved` with
one reason, never `failing`. The reasons and what to do about each are in the plugin's
`docs/TROUBLESHOOTING.md`.

Whether a gap blocks work is set by two variables read when the server starts, not by a setting:
`STRATA19_VERIFICATION_ENFORCEMENT` (direct work and draft rules, default `ask`) and
`STRATA19_VERIFICATION_ENFORCEMENT_SPECBOOK` (work an approved specbook rule governs, default
`enforce`). Under `enforce` a required rule whose only check is `passing, unproven` is not ready
until a person confirms the check or a break proof shows it. `STRATA19_GATE_MODE` is a different
switch: it only controls the Stop hook.

`strata19.get_project_status` may report `analysisClaimsState: "computing"`. The code index is still
catching up with the tree, so the classified-analysis count and the combined Findings total are
left out rather than guessed; `findingCounts.total` is still exact. Read it again shortly.

## Limits [#limits]

`strata19.check_convergence` can answer three of six hosted conditions locally; the other three —
`criterionCoverage`, `guardCoverage`, `noSecurityViolations` — always report `degraded` on the
free tier, with the exact local-table gap named in `detail`, because they require
`STRATA19_API_KEY` and the hosted living graph. `strata19.verify_implementation`'s deterministic
gate covers dead code, duplicates, placeholders, and configuration gaps — nothing else; a clean
result is scoped evidence, not a general proof of security, correctness, or product completeness.
Review `strata19.get_analysis_caveats` before trusting an absence of findings elsewhere in a
partial run.

## Related [#related]

* [Code intelligence](/documentation/plugin/code-intelligence) — the index the gate scans
* [Findings](/documentation/plugin/findings) — reading one finding's evidence in detail
* [Limits](/documentation/reference/limits) — what a clean result never proves
* [`strata19.verify_implementation`](/documentation/reference/tools/verify_implementation)
* [`strata19.check_convergence`](/documentation/reference/tools/check_convergence)
* [`strata19.run_native_security_analysis`](/documentation/reference/tools/run_native_security_analysis)
* [`strata19.project_check_run`](/documentation/reference/tools/project_check_run)
