Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Campaign Workflows

The campaign command group runs bulk compliance operations across multiple controls, policies, or scope questions in a single coordinated run. Campaigns support an external-agent-first pattern with checkpoint persistence and lease-based concurrency for safe fan-out to multiple agents.

Campaign Domains and Modes

DomainModeDescription
controlsinitialDraft new narratives and evidence for controls
controlsnotes-fixAddress platform notes on existing controls
controlsreview-fixFix findings from a family review job
policyanswerGenerate answers for policy questions
policyreview-fixFix findings from a policy review
scopeanswerGenerate answers for scope questions
scopereview-fixFix findings from a scope review

Control Campaigns

Draft New Narratives for a Family

pretorin campaign controls --mode initial --family AC \
  --system "My System" --framework-id fedramp-moderate

Fix Controls with Platform Notes

pretorin campaign controls --mode notes-fix --family AC

Fix Controls after Family Review

pretorin campaign controls --mode review-fix --family AC --review-job <job-id>

Options

OptionDescription
--systemTarget system ID or name
--framework-idTarget framework ID
--familyControl family to target (e.g., AC, AU)
--controlsSpecific control IDs (comma-separated)
--all-controlsTarget all controls in the framework
--modeCampaign mode: initial, notes-fix, review-fix
--artifactsArtifact types to generate: narratives, evidence, or both (default: both)
--review-jobReview job ID (required for review-fix mode)
--concurrencyNumber of parallel workers
--max-retriesMaximum retry attempts per item
--checkpointPath to checkpoint file for resume
--applyApply proposals to platform after completion
--outputOutput mode: auto, live, compact, json

Policy Campaigns

Answer All Incomplete Policy Questions

pretorin campaign policy --mode answer --all-incomplete

Fix Policy Review Findings

pretorin campaign policy --mode review-fix --policies <policy-id>

Options

OptionDescription
--policiesSpecific policy IDs (comma-separated)
--all-incompleteTarget all incomplete policies
--modeCampaign mode: answer, review-fix
--systemOptional system context passthrough
--concurrencyNumber of parallel workers (default: 4)
--max-retriesMaximum retry attempts per item (default: 2)
--checkpointPath to checkpoint file for resume
--applyApply proposals to platform after completion
--outputOutput mode: auto, live, compact, json

Scope Campaigns

Answer Scope Questions

pretorin campaign scope --mode answer \
  --system "My System" --framework-id fedramp-moderate

Options

OptionDescription
--systemTarget system ID or name (required)
--framework-idTarget framework ID (required)
--modeCampaign mode: answer, review-fix
--concurrencyNumber of parallel workers (default: 4)
--max-retriesMaximum retry attempts per question (default: 2)
--checkpointPath to checkpoint file for resume
--applyApply proposals to platform after completion
--outputOutput mode: auto, live, compact, json

Checking Campaign Status

pretorin campaign status --checkpoint .pretorin/campaign-checkpoint.json

Campaign Lifecycle

  1. Prepare — The campaign snapshots platform state and creates a local checkpoint file
  2. Claim — Items are claimed with TTL-based leases (safe for multiple agents)
  3. Draft — Each item gets full context and drafting instructions
  4. Propose — Proposals are submitted without writing to the platform
  5. Apply — All accepted proposals are pushed to the platform in one operation

Use --apply to automatically apply after completion, or run campaign status to review before applying.