Agent workflows
The CLI is designed to be discoverable by an agent without relying on a stale prompt or parsing decorative terminal output.The default loop
- inspect current state;
- validate the desired document offline;
- calculate a diff or impact report;
- produce an integrity-checked plan;
- run the plan with
--dry-run; - apply the same plan with a version precondition; and
- read state or the change journal to verify the result.
source: "agent", its stable change ID can also be inspected through
the change journal.
Stable JSON
Successful commands emit one document to stdout:Ask feature and experiment questions directly
Use the bounded read contract instead of scraping the dashboard or rebuilding statistics from event rows:exposures export, persist its
typed checkpoint records, and resume with the latest non-null cursor.
Keep evaluation context out of arguments
Read-only inspection uses a context file or stdin and requires an explicit instant:--file exported.superflag.json to run the same evaluator offline.
One-time secrets
Key and app creation reveal plaintext secrets only with explicit--show-secrets. Supply a stable idempotency key so an interrupted response can
recover the same secret during the delivery window:
Install the Superflag skill
The CLI package includes a portable skill matched to that exact package version. Install it into the standard workspace location, verify it in CI, and update it only after intentionally changing the pinned CLI version:.agents/skills/superflag/; pass
--target <directory> for a different canonical location. The CLI records its
package version, public source URL, and content digest in
.superflag-skill.json. check is entirely local and exits with conflict code
6 when the vendored files drift from the installed package. JSON formatting is
ignored for the provenance manifest, but its exact fields and values must match.
install refuses to overwrite different existing instructions; review them and
use update for an explicit staged replacement with rollback on failure.
The public skill contains only installed-CLI guidance. Repository-specific paths,
development commands, and allowed app/environment scope belong in the consuming
repository’s own agent guidance. superflag contract --json remains the
installed version’s source of truth for command arguments, capabilities, and
exits. The same skill source is visible in the
CLI repository.