AIV as an AI-DLC verification sensor

AIV integrates with AI-DLC as deterministic evidence at a lifecycle boundary. It does not replace AI-DLC orchestration. AI-DLC decides when a sensor runs and how humans respond; AIV computes the code/document integrity facts used by that decision.

AIV inside AI-DLC

Figure 1: AI-DLC owns the workflow, AIV owns the evidence step. Agent output becomes either a file-local request or a complete diff request. The sensor calls aiv verify, maps structured findings to the AI-DLC sensor schema, and returns advisory or fail-closed status. The verdict can also carry policy/evidence digests and an audit head.

Why this integration adds value

AI-DLC includes deterministic sensor manifests around tools such as linters and type checkers. AIV adds a different evidence layer:

Each finding has a stable rule id, file, line, message, and blocking/advisory status. The same result can be published through JSON, SARIF, GitHub, and audit surfaces.

Complete plugin tree

integrations/aidlc/plugin/
  .aidlc-plugin/plugin.json
  sensors/
    aidlc-aiv.md
    aidlc-aiv-blocking.md
  tools/
    aiv-aidlc-sensor.py

The plugin uses AI-DLC’s `` token, so its packaged tool path remains stable across supported harnesses.

Two sensor contracts

Sensor Command behavior Best use
aiv advisory, reports findings/integration problems without blocking first adoption, post-save feedback, calibration
aiv-blocking --blocking, trusted policy required, unavailable integration/external input fails closed governed phase boundary

Blocking mode requires AIV_POLICY_REF or --policy-ref. It forwards --require-trusted-policy, so missing/fallback/drifted policy cannot silently pass.

Two evidence scopes

Input Evidence scope Use
--file path one file with empty raw diff; file-local checks quick feedback
--request change.json full changed-file set and raw diff authoritative phase gate

Full request mode is required when evidence depends on relationships between files or exact added lines, including production-plus-test context, manifest/declaration changes, duplication, or multi-area cohesion.

Build prerequisite

The AI-DLC adapter calls aiv verify from release 2.0. Build the jar:

mvn -pl aiv-cli -am clean package
export AIV_JAR="$(pwd)/aiv-cli/target/aiv-cli-2.0.0.jar"

Confirm the jar reports the verify capabilities:

java -jar "$AIV_JAR" verify --capabilities

Advisory file example

python integrations/aidlc/aiv_aidlc_sensor.py \
  --aiv-jar "$AIV_JAR" \
  --file src/main/java/app/Greeter.java

Response:

{
  "pass": true,
  "violations": [
    {
      "file": "src/main/java/app/Greeter.java",
      "line": 1,
      "rule": "syntax.unverified",
      "message": "..."
    }
  ]
}

Advisory pass: true means the sensor did not block; violations still require visibility/review.

Authoritative blocking example

export AIV_POLICY_REF=origin/main
python integrations/aidlc/aiv_aidlc_sensor.py \
  --aiv-jar "$AIV_JAR" \
  --request build/aiv-change.json \
  --workspace . \
  --blocking

Blocking mode fails when:

For a blocking local deterministic sensor, use an explicit profile with package-existence, external, and Jev disabled. A separate advisory sensor can run those integrations if desired.

Install into an AI-DLC source tree

Copy:

integrations/aidlc/plugin -> <aidlc-workflows>/plugins/aiv-integrity

Then enable the plugin through that installation’s plugin selection and run its normal packaging/compose process. The authored plugin contains its manifest, sensor definitions, and tool implementation; no core AI-DLC file needs to be edited by hand.

For a manual installed-workspace experiment, place the tool under the harness tool directory, place the sensor manifest under sensors, and add aiv or aiv-blocking to the target stage’s sensors list.

Runtime flow

  1. AI-DLC emits a sensor call for a changed output.
  2. Adapter reads file/request JSON.
  3. Adapter launches java -jar ... verify with timeout.
  4. Verify resolves/pins/freezes policy and runs AIV gates.
  5. Adapter validates process status and JSON response.
  6. AIV findings map to {file, line, rule, message} violations.
  7. External-input declarations are surfaced as integration violations.
  8. AI-DLC records sensor outcome and applies advisory/blocking workflow semantics.

Security and trust

Validation

python -m unittest integrations.aidlc.test_aiv_aidlc_sensor -v

Tests cover advisory/blocked integration failures, required trusted policy, external-input rejection, file request construction, finding mapping, subprocess exit handling, and malformed/empty output.

Author: Viquar Khan