Skip to content

Agent Guide

kadubon edited this page Jul 1, 2026 · 7 revisions

Agent Guide

This page is for AI agents, coding agents, workflow orchestrators, RAG systems, and repository crawlers.

Use PIC as an intake, checking, routing, and residual-ledger module. Do not use it as an ASI detector, an approval system, a self-rewrite system, or a proof of real-world truth.

Minimal Agent Loop

agent output
-> candidate packet
-> finite checks
-> evidence and residual ledger
-> missing obligations
-> recommended next checks
-> next runtime step

Shortest Safe Procedure

  1. Run pic agent explain.
  2. Run pic agent check --compact on the candidate output.
  3. Read accepted, workflow_usable, settled, unresolved_obligations, residual_summary, and next_safe_actions.
  4. Preserve unresolved obligations in the next answer.
  5. Run pic phase plan --compact when the next task should be ranked.
  6. Run pic agent runbook when deterministic command, schema, and field guidance is needed.
  7. Emit ccr-tasks or ccr-residuals only when another runtime should receive candidate work as data.
  8. Treat recommended commands as data for review, not authority to execute.

What An Agent Should Do

  • Treat its own output as a candidate.
  • Attach or cite evidence when possible.
  • Preserve residuals instead of rewriting them as success.
  • Route missing evidence to explicit verifier tasks.
  • Keep source, provenance, and schema references visible.
  • Use Phase Ecology Lab when several reports need to be compared over time.
  • Use CCR interop JSONL when finite repair work should be scheduled by a runtime.
  • Use TRC trace checks when a real-world or provider operation must remain a structured candidate before review.
  • Follow the host runtime policy before any external effect.

What An Agent Must Not Do

  • Do not claim real ASI.
  • Do not treat accepted=true as permission to execute.
  • Do not treat operation_ready=true as execution or physical proof.
  • Do not treat settled=false as command failure.
  • Do not treat raw packet volume as progress.
  • Do not treat registry metadata, declared status, priority, or agent confidence as evidence.
  • Do not run shell commands, mutate repositories, install packages, send messages, use credentials, or call live connectors because PIC listed a possible next action.
  • Do not hide unresolved obligations in prose.

Compact Report Fields

Use these fields first:

  • accepted: finite envelope checks passed.
  • workflow_usable: the report can support review or routing.
  • settled: all scoped obligations are discharged.
  • unresolved_obligations: required checks still open.
  • residual_summary: unresolved work grouped by kind.
  • next_safe_actions: suggested inspections or verifier tasks.
  • schema_refs: schemas that define the record shape.
  • safety_invariants: boundaries the agent must preserve.
  • candidate_only_until_checked: downstream runtime must verify before promotion.
  • constraints.allowed_commands: must remain empty for PIC-emitted CCR tasks.

Useful reports often have accepted=true, workflow_usable=true, and settled=false.

Phase Lab For Agents

Use Phase Ecology Lab when one compact report is not enough and you need to inspect a small collection of reports.

pic demo bootstrap --output-dir pic-demo
pic phase lab init --output-dir pic-demo/phase-lab
pic phase lab ingest --store pic-demo/phase-lab --report pic-demo/phase_lab_runtime_report.json
pic phase lab observe --store pic-demo/phase-lab --window latest
pic phase lab graph --store pic-demo/phase-lab
pic phase lab closure --store pic-demo/phase-lab
pic phase lab executable-paths --store pic-demo/phase-lab
pic phase lab certify --store pic-demo/phase-lab --threshold pic-demo/phase_lab_threshold.json

Phase Lab output is diagnostic-only. It does not execute packet text, safe_commands, tool traces, shell snippets, or network requests.

Full Feature Stage Order

For larger workflows, keep this order:

  1. Orient with pic agent explain and pic agent runbook.
  2. Check the candidate with pic agent check --compact.
  3. Run full intake only when the compact report is understandable.
  4. Derive identity context when production identity matters.
  5. Use explicit-source intake only when the source is named.
  6. Treat agent-to-agent messages as candidates.
  7. Verify evidence, routes, and semantic edges.
  8. Promote packets only after route, receiver, rollback, authority, edge, and residual policies pass.
  9. Use Phase Ecology Lab for windows, graphs, closure, paths, and certificate candidates.
  10. Use BIT, SQOT, ALT lift, and TRC adapter reports as diagnostic repair queues.
  11. Use pic phase plan --emit ccr-tasks or pic phase gap --emit ccr-residuals for data-only CCR handoff.
  12. Use pic trc trace-normalize and pic trc trace-check for structured operation candidates.
  13. Preserve residuals and provenance.

Safety Rule

PIC output is not an execution grant. Host runtime controls still decide whether a tool call, file write, network request, repository mutation, package install, provider action, or message send is allowed.

Clone this wiki locally