Wrkr is the deterministic See-layer CLI in the See -> Prove -> Control model.
Wrkr is the AI-DSPM discovery layer in Clyra's governance sequence:
- See: Wrkr discovers AI tools, autonomy context, permissions, and risk.
- Prove: Axym maps Wrkr proof records to compliance controls.
- Control: Gait applies policy enforcement to approved governance decisions.
Wrkr runs standalone and interoperates through shared Clyra-AI/proof contracts.
Wrkr is in v1 contract-hardening phase with deterministic end-to-end workflows implemented for:
- discovery and scan target modes (
init,scan, diff state) - deterministic detection, policy/profile evaluation, and ranked risk output
- identity lifecycle, manifest generation, and proof chain verification
- compliance evidence export, reporting artifacts, posture scoring, and regression baselines
- deterministic remediation planning (
fix) and auth-profile safeguards
Coverage and contract health are enforced by:
- acceptance flow tests in
internal/acceptance/v1_acceptance_test.go - scenario coverage mapping in
internal/scenarios/coverage_map.json - CI contract lanes (
make test-contracts,make prepush-full, CodeQL)
# Configure default scan target and split auth profiles.
wrkr init --non-interactive --repo acme/backend --scan-token "$GH_READ_TOKEN" --fix-token "$GH_WRITE_TOKEN" --json
# Scan explicit target modes.
wrkr scan --repo acme/backend --json
wrkr scan --org acme --json
wrkr scan --path ./local-repos --json
# Optional custom policy overlay.
wrkr scan --path ./local-repos --policy ./fixtures/wrkr-policy.yaml --json
# Profile-aware compliance scan and posture score output.
wrkr scan --path ./local-repos --profile standard --json
# Risk report and inventory export views.
wrkr report --top 5 --json
wrkr report --pdf --json
wrkr export --format inventory --json
# Identity lifecycle commands.
wrkr identity list --json
wrkr identity show <agent_id> --json
wrkr identity approve <agent_id> --approver @maria --scope read-only --expires 90d --json
wrkr lifecycle --org acme --json
wrkr manifest generate --json
wrkr score --json
wrkr score --explain
wrkr regress init --baseline ./.wrkr/last-scan.json --json
wrkr regress run --baseline ./.wrkr/wrkr-regress-baseline.json --json
wrkr verify --chain --json
wrkr evidence --frameworks eu-ai-act,soc2 --json
wrkr fix --top 3 --json
# Optional non-deterministic enrichment branch (explicitly opt-in).
wrkr scan --path ./local-repos --enrich --github-api https://api.github.com --json
# Incremental delta scan keyed on (tool_type, location, org).
wrkr scan --org acme --diff --jsonExactly one target source must be selected per scan invocation:
--repo <owner/repo>--org <org>--path <local-dir>
Invalid target combinations return exit code 6 with a machine-readable JSON envelope when --json is set.
- Last scan state is persisted locally at
.wrkr/last-scan.json(override with--stateorWRKR_STATE_PATH). - Signed proof records are appended to
.wrkr/proof-chain.jsonand use local signing material at.wrkr/proof-signing-key.json. --diffreports only added, removed, and permission-changed findings.- If local state is absent,
--baseline <path>can provide a CI artifact baseline.
- Structured parsing is used for JSON/YAML/TOML detector surfaces; parse failures are emitted as typed findings.
- Secret detectors only emit credential-presence context and key names, never secret values.
- Policy checks run after detection and emit deterministic
policy_checkandpolicy_violationfindings. - Built-in policy pack is versioned (
core/policy/rules/builtin.yaml) and loaded on every scan; repo-localwrkr-policy.yamland--policyoverlays are supported.
wrkr fix --top <N> --jsongenerates deterministic remediation patch previews and commit messages for eligible high-risk findings.- Unsupported findings are emitted with explicit non-fixable reason codes.
wrkr fix --open-prrequires a write-capable fix profile token (scan-only profile fails closed).
wrkr evidence is fail-closed on output paths:
- Non-empty, non-managed output directories are blocked.
- Ownership marker
.wrkr-evidence-managedmust be a regular file. - Marker symlink/directory usage is blocked.
- Unsafe output writes return exit code
8withunsafe_operation_blocked.
- Command reference:
docs/commands/ - Operator examples/playbooks:
docs/examples/ wrkr-manifest.yamlopen specification:docs/specs/wrkr-manifest.md