Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.crewship.ai/llms.txt

Use this file to discover all available pages before exploring further.

crewship policy

Manage per-crew autonomy and behavior-mode policy. Each crew carries an autonomy_level (strict | guided | trusted | full) and a behavior_mode (warn | block) that together drive every HITL decision the orchestrator makes — memory writes, skill creation, behavior-monitor escalations, ephemeral spawns. The dial lives in crews.autonomy_level / crews.behavior_mode (v98 migration) and is consumed by every PR-B / PR-C subsystem via the shared policy.Resolver.
crewship policy <subcommand> [flags]

Subcommands

CommandDescription
getShow the current policy for one crew, including the audit triple (who set it, when, optional reason).
setUpdate a crew’s policy. Loose transitions (any → trusted/full) confirm unless --yes; --level full requires --reason.
listShow every crew’s policy in the current workspace.

Levels and modes

Autonomy levels (closed set):
LevelBehaviour
strictEvery governable action needs operator approval. Use for production / compliance-sensitive crews.
guidedRead-only actions auto-execute; writes need approval. Default for new crews.
trustedMost actions auto-execute; writes log to inbox for after-the-fact review.
fullAutonomous; journal-only logging. Opt-in for power-team workflows. Requires --reason.
Behavior modes (closed set):
ModeBehaviour
warnF4.2 DENY decisions land as non-blocking inbox notifications; the agent’s action proceeds. Default.
blockF4.2 DENY aborts the next tool call. Opt-in once behavior-monitor confidence is built.
The combination autonomy_level=full with behavior_mode=block is rejected by the API (opt-in trust paired with opt-in restriction is incoherent).

crewship policy get

Fetch the current policy + audit triple for one crew.
crewship policy get --crew engineering
crewship policy get --crew engineering --format json | jq .reason
FlagTypeDefaultDescription
--crewstringCrew slug or CUID (required).
Sample output:
CREW:      crew-eng
AUTONOMY:  guided
BEHAVIOR:  warn
SET BY:    user_01HXYZABCDEF
SET AT:    2026-05-21T10:00:00Z
REASON:    —
--format json and --format yaml pass the wire object through verbatim so jq/yq pipelines see the canonical field names (crew_id, autonomy_level, behavior_mode, set_by_user_id, set_at, reason).

crewship policy set

Update a crew’s policy. Atomic single PUT; on success the shared resolver cache is invalidated server-side so downstream subsystems (memory write gating, skill creation HITL, behavior monitor, ephemeral spawn) see the new state immediately rather than waiting for the 10s TTL.
crewship policy set --crew engineering --level trusted
crewship policy set --crew prod-ops --level full --behavior warn \
  --reason "Friday production freeze — operator on call" --yes
crewship policy set --crew sandbox --level strict --behavior block
FlagTypeDefaultDescription
--crewstringCrew slug or CUID (required).
--levelstringAutonomy level (required). One of strict, guided, trusted, full.
--behaviorstringwarnBehavior mode. One of warn, block.
--reasonstringOperator-supplied reason. Required when --level=full.
--yesboolfalseSkip the loose-transition confirmation prompt.
Validation order:
  1. --crew, --level presence checks (no round-trip on missing flags).
  2. Enum check for --level and --behavior — invalid values reject locally with a friendly error rather than letting the API return 400.
  3. --reason requirement for --level=full — matches the same rule the API enforces, but failing fast here keeps the network out of the loop on operator typos.
  4. Loose-transition confirmation (any → trusted or full) unless --yes.
Sample output:
✓ Policy updated for crew crew-eng: trusted / warn

crewship policy list

Show every crew’s policy in the current workspace, sorted by crew name (case-insensitive). Useful for fleet-wide audits and for spotting crews still on the default guided/warn pair.
crewship policy list
crewship policy list --format json
crewship policy list --format yaml
Sample output:
CREW          ID        AUTONOMY  BEHAVIOR  SET AT                REASON
Engineering   crew-eng  guided    warn      —                     —
Quality       crew-qa   strict    block     2026-05-20T00:00:00Z  Compliance hold
The CREW column is enriched from /api/v1/crews because the policy API only returns crew_id; sorting on a CUID would be stable but useless to a human reader. If the crew-name fetch fails, the column falls back to and the list still renders — the policies themselves are usable without the friendly name.

Errors

ExitMeaning
400Invalid level/behavior combination, or --reason missing for --level=full.
401Not authenticated. Run crewship login.
404Crew slug/ID not found in this workspace.