The Git protocol, local search, Desktop app and native hooks help coordinate work in the repository. Run each agent in its own client; GuardianContext 0.1.20 does not provide MCP transport, start sessions or exchange messages between agents.
Install and get started
The official installer prepares Desktop, semantic search, security, and updates on Python 3.11. Initialize the repository and install native hooks if the project uses them. Keep credentials on your machine. The full manual is available offline with guardian manual. To try only the local structure and text search, install the base package with uv tool install --python 3.11 guardiancontext and run guardian init in the Git repository. After recording a decision in decisoes/, run guardian index rebuild --lexical and guardian brief "migrations" --tool agents --max-tokens 1500. The briefing cites matching excerpts and files. This path does not install hooks; configure them separately when needed.
uv tool install --python 3.11 --refresh "guardiancontext[semantic,desktop,update,security]"
guardian --version
guardian init
guardian hook install
guardian-desktop
Local operation and diagnosis
Run Codex, Claude Code, or another agent with its own client. GuardianContext provides repository context, claims, handoffs, local diagnostics, and native hook protection; it does not launch the client or provide MCP transport. Check configuration readiness separately from recorded activity. Diagnostics can report the latest known claims or hook event with its source, scope, date, and result. A shared-worktree claim and a hook installation are different evidence. A renamed repository may retain claim evidence while a path-based hook no longer matches. No activity observed does not prove that an agent read instructions or followed them. Activity data comes from the shared database and trail; older reservations recorded only in Markdown files may not appear.
MCP retirement and migration
Guardian MCP, its server and proxy, managed sessions, and inter-session messages were removed in 0.1.18. On normal use after the update, Guardian automatically maintains configurations for projects it already knows: it verifies ownership and permissions where the platform allows, keeps a protected backup outside the repository for 30 days before replacing a configuration, and retries pending items on later runs. During normal use, Guardian also checks and automatically refreshes its own managed guard when needed; this is separate from configuration cleanup and preserves unrecognized files and files whose access cannot be verified. Cleanup items do not produce warnings in claim commands; check `guardian doctor --format json` for diagnostics. A pending item does not block coding. On Windows, EFS-encrypted files and files whose ownership or permissions cannot be verified remain untouched and pending. Linux and macOS still report `permissions_unavailable` and preserve those files. Messages from retired sessions are not delivered or retried.
If a command exits 0 and prints `[claim] <ID>`, the reservation was created even if `Limpeza MCP pendente` also appears; continue the task. If it exits 77 with `[runtime_access_denied]` or `[file_permission_denied]`, use the host tool to request an authorized run of the exact Guardian command, then retry it.
guardian doctor --format json
Update safely
Official installations use mandatory automatic updates. `guardian update status` shows the installed version, policy, and last result. If the runtime is in use, installation is deferred; check the result again later. Use `guardian update check --force` to check for a release. Installations through pip, venv, editable checkouts, or unknown origins require manual updates through the method used to install them. Legacy installations that still need hook migration should run `guardian hook install` in each repository, then `guardian update enable --confirm-legacy-migrated`. The signed update policy for 0.1.19 is still in implementation and has not been activated in production. Keep locks and the journal; removing them to force an update can leave the installation incomplete.
guardian update status
guardian update check --force
guardian hook install
guardian update enable --confirm-legacy-migrated
Failure and recovery
deferred means the update was postponed: check active clients and hook migration. journal_failed means a failure before installation; the current version was preserved. rolled_back confirms recovery after a failed health check. For rollback_required or rollback_failed, reinstall the previous version and inspect the journal. The health probe now opens the coordination database with the new version and, if it fails, the database snapshot is restored before the previous version is probed. If the database is locked by another process (antivirus, backup), the updater retries before rejecting the new version; on the way back, recovery ends as rolled_back with coordination: degraded and the coordination_busy warning, instead of rollback_failed. If the snapshot cannot be restored because of the lock, it stays on disk, the journal records the restore command (snapshot_not_restored) and `guardian update status` tries again. Keep wheels referenced by recovery receipts. An offline check preserves the current version. After updating, check the installed version, clients and operation result.
guardian update status
guardian update check --force
Measure through simulation
Run `guardian simulate` to exercise five local scenarios: a busy runtime, update journal preflight, SQLite rollback restoration, a hook blocking execution, and one-time hook approval. To save a JSON result, use `guardian simulate --json reviewed-result.json`; review the file before exporting it with `scripts/sync_product_site.py --evidence`. This prepares a local export and does not upload automatically. The current format is schema 2, with no latency metric; schema 1 reports from 0.1.17 are historical, and their eight scenarios are not the current simulation. Simulation does not launch models, install packages, or prove a production update.
guardian simulate
guardian simulate --json reviewed-result.json
scripts/sync_product_site.py --evidence
Data and limits
Current simulation results record the version, UTC date, platform, and scenario counts. They do not include message bodies or prove agent behavior, release readiness, or production service levels. Older schema 1 reports are labeled historical.
Local integration inventory
Use the Integrations tab to inspect known local MCP configuration, skill and plugin paths without executing their contents. User-level paths require explicit opt-in. Basic inventory is available on every plan; hash comparison and review receipts require Developer; explanatory static findings require Professional; verified Internal unlocks both. Review rereads the inventory and refuses changed hashes or incomplete coverage. It stores only IDs, hashes and the latest 30 receipts privately. It does not authorize execution or certify safety. Commands, arguments, environment values and file contents are not included in reports. Linked, inaccessible, oversized or invalid files make coverage incomplete. TOML metadata requires Python 3.11; JSONC is unsupported. Other locations and opaque code may remain undetected.
guardian --no-auto-update integrations scan
guardian --no-auto-update integrations scan --include-user
guardian --no-auto-update integrations review --digest REVIEWED_HASH
Settings, protection and Desktop
Open ⚙ Settings for the selected repository. Local history and supported native approval requests: Developer; opt-in interception: Professional; signed organizational policies: Enterprise. Internal licenses unlock all features without activating integrations automatically. New capabilities require a verified signed grant; editing a cached plan label does not unlock them. Installed hooks do not prove coverage: restart the client and verify its native hooks. Arbitrary shell commands require confirmation; this implementation does not claim to parse every shell language. History is sanitized; full pending request details remain private and are removed after completion or expiry. Desktop shortcuts, login startup and tray are optional on all plans. Without a working tray the window remains accessible. Quit and update requests terminate the application. Linux uses XDG and macOS uses LaunchAgent; native platform verification is required. After updating, check the version, clients and operation result.
guardian security status
guardian security history
guardian security configure --input settings.json
Signatures, rotation and hook limits
LICENSE anchors come only from the verified package release; environment overrides are ignored. The verified package release includes the Guardian public key. The private key stays in the server secret manager and is never distributed to clients. Initial ORG trust requires explicit guardian trust import-org --bootstrap; later rotations require the current authority signature and the next revision. Grants expire within seven days or at the end of the key validity window, whichever comes first. After expiry, new premium activations are blocked and existing protection restrictions are preserved. Revocation while offline becomes known on reconnection or expiry. Policy reads reject older restored revisions. Claude hook timeouts may allow the read; protection evidence depends on the provider and version. ORG trust is repository-bound. Administrator recovery requires --confirm-recovery, records a private receipt and preserves policy revisions. Older clients cannot reactivate retired LICENSE keys; update CLI and Desktop together.
Application language
Choose Português (Brasil), English, Español or System in global Desktop settings. CLI shares the GUARDIAN_HOME profile preference. --lang applies to the current command, GUARDIAN_LANG takes precedence over the saved preference and auto restores the system language. The choice does not change commands, identifiers or JSON fields. Restart Desktop when prompted. Interface language does not change currency, commercial eligibility or payment methods.
guardian --lang en --help
guardian language es
guardian language auto
guardian manual --lang en
Account, projects, and limits
Create an account with `guardian signup`. To authorize this copy for an existing project, the holder uses `guardian login --repo PROJECT_NAME`; use `guardian login --new --repo PROJECT_NAME` only when creating a new project. The command asks for the account email, password, and confirmation. `guardian bindings status` shows this copy’s binding locally. `guardian bindings list` lists authorized bindings; `guardian bindings revoke BINDING_ID` revokes one. Listing and revoking ask for the holder’s credentials. The `gb_...` credential and its Ed25519 private key stay in the operating system credential store; the server returns the credential once during enrollment. Each independent clone needs the holder’s authorization; worktrees that share a Git common directory can use the same binding. Authorized clones do not require another project license. Do not copy credentials or `.guardian` to authorize another copy. Legacy API credentials remain accepted during the transition. The cutoff requires a validated release and seven days of notice; it is not active in production. Free allows one repository per account with no time limit. Check current plans and limits; this manual does not set prices.
When offline during onboarding, use `guardian signup --offline --email YOUR_EMAIL --repo PROJECT_NAME`: the registration package is encrypted at rest (AES-256-GCM) and signed with Ed25519 for up to seven days until `guardian signup --offline-sync` confirms server delivery (`guardian signup --offline-status` checks the deadline). After seven days without confirmation, only claims coordination is suspended and hooks enter silent permissive mode, without blocking Git or removing any files.
guardian signup
guardian login --repo PROJECT_NAME
guardian login --new --repo PROJECT_NAME
guardian bindings status
guardian bindings list
guardian bindings revoke BINDING_ID
guardian billing plans
guardian signup --offline --email user@example.com --repo PROJECT_NAME
guardian signup --offline-sync
guardian signup --offline-status
Checkout, cancellation, and refunds
List plans with `guardian billing plans` and start checkout with `guardian billing checkout --plan-id ID`; for an international payer, add `--foreign-customer`, which bills recurring charges in BRL by credit card only. The CLI opens the Asaas-hosted invoice. Paid rights start after provider confirmation; resume a pending attempt with `guardian billing resume --intent-id ID`. `guardian billing cancel` stops renewal and preserves the paid period. The client does not issue money refunds: request review through official support channels. A confirmed partial refund preserves the original plan and period; a confirmed full refund removes only rights funded by that charge and preserves other valid paid periods.
guardian billing plans
guardian billing checkout --plan-id ID
guardian billing checkout --plan-id ID --foreign-customer
guardian billing resume --intent-id ID
guardian billing cancel
Telemetry and offline use
Telemetry headers contain a random installation ID, version, client type, automatic update status, and language; they exclude message content, paths, and host names. License state can use cache offline for up to seven days, also limited by the paid period and key validity. After expiry, licensed operations may be limited while local protections already active are preserved. Offline revocations arrive after reconnection or expiry.
guardian billing status
guardian --version
What 0.1.14 changes for everyone
Automatic update brings 0.1.14 to eligible machines with no action from you, and no claim becomes active without a team decision: without `claims.ativo` the pre-commit behaves as in 0.1.13 (internal `legado` level). What changes for everyone, even without turning claims on: (1) if git cannot read the staging area, the commit is refused with `[guardian] RECUSADO: não foi possível ler o staging` instead of passing as if staging were empty; (2) renaming with `git mv` a file covered by another actor's claim is refused, because both paths of the rename are checked (a rename still counts as 1 toward the wide-staging limit); (3) the unconfigured-actor warning appears at most once a day in each worktree, while blocks and errors always appear; (4) the `[guardian] branch=… head=… arquivos=N` line only appears with a warning, a block or `GUARDIAN_VERBOSE=1`; (5) `guardian doctor` and `guardian hook install` have compact output: `doctor` shows lists of 5 items with `… (+N)` (the full list comes with `--verbose` or `--format json`) and gained the `[APLICAÇÃO]` and `[CLAIMS]` lines; `hook install` prints a single line (one path per hook with `--verbose`); anything that parses the text output should move to `--format json` (or `--json`), which is stable; (6) search (`guardian index search`, `guardian brief` and the MCP tool `context_search`) leaves out claims by default, and `decisoes/INDICE.md` too; `--kind claim`, `--all` or `include_claims` bring them back; (7) `guardian instrucoes sync` no longer deletes hand-written text inside the generated block: it refuses the file, shows the lines and a short diff, continues with the other files and exits with 1; `--dry-run` shows without writing and `--force` replaces the block keeping the old one in `<file>.bak`; (8) the `claim_conflict` message is now readable, and the auditor warns `decisoes_indice_desatualizado` when a hand-written `INDICE.md` does not list a decision.
guardian doctor
guardian doctor --verbose
guardian doctor --format json
guardian hook install --verbose
guardian index search TERM
guardian index search TERM --all
guardian index search TERM --kind claim
guardian instrucoes sync --dry-run
guardian instrucoes sync --force
Optional claims: turn on and choose the level
Claims are leases on file scopes between agents. They stay off until the team decides: declare `claims.ativo: true` in `guardian.json` and bring the change to the base through a PR, because CI reads the base. When turned on, the default is `strict`; `claims.aplicacao` can lower it to `enforce` or `observe`. `observe` only warns and the commit passes. `enforce` refuses the commit and the PR that touch a file reserved by another actor. `strict` does the same, requires an identity on every commit while any claim is active, does not skip the checks during a merge and requires the `Guardian-Actor` trailer on every commit of the PR. The level in force is the highest of the team (`guardian.json`), this machine (a local preference, which can only raise the level and only exists with claims active) and the organization's signed policy (a floor that implies active, valid in the local pre-commit and not in CI). On the CLI use `guardian claim-policy show` and `guardian claim-policy set`; with `--equipe` the `set` writes the level to `guardian.json` without committing, and it only applies to the team after the PR. On the Desktop, in ⚙ Settings, the Claims group has the team switch, the three levels and the Apply on this machine and Save for the team buttons. The actor is found automatically, in this order: `--actor`, `GUARDIAN_ACTOR`, `git config guardian.actor`, `.guardian/config.json`, the single actor of the worktree's claims (only in branches mode) and, last, `git:<e-mail>`. If several sessions share one worktree, set `guardian.actor` or `GUARDIAN_ACTOR` per session. Identity is declared text, not authenticated. With claims active, the prepare-commit-msg and commit-msg hooks add the `Guardian-Actor`, `Guardian-Claim` and `Guardian-Trail` trailers. The pre-commit installs them on its own at the first commit, but only creates the file when it does not exist and never changes a third-party hook or a versioned `core.hooksPath`: in those cases run `guardian hook install`, which chains to the existing hook.
guardian claim-policy show
guardian claim-policy show --format json
guardian claim-policy set enforce
guardian claim-policy set strict --equipe
guardian hook install
guardian doctor
Claims: reserve, renew and release
With claims active, reservations live in the machine's local coordination database and versioned mirror under `claims/`, shared across its worktrees. `guardian claim` reserves files; `--task` accepts a textual issue reference without contacting or validating against a tracker. `--plano` links an existing repository plan to the claim as supporting material for the work item. `--branch` records the owner's real branch when you reserve on someone else's behalf. Exit 3 from `guardian claim` means the reservation exists but a later step failed: the output carries `claim_id` and `operation_id`; do not rerun the command without the id (it would duplicate the reservation), check `guardian claims operation <operation_id>` and, to complete, rerun with `--operation-id <the same id>`. The owner takes over the context by renewing with `guardian renew ID --actor OWNER` or on their first commit that touches the scope, provided the actor is declared; taking over by commit does not renew the lease. `guardian release` releases the reservation and records its local outcome. `entregue` describes the claim's state; it does not complete the issue or prove that the work item is finished. An expired claim blocks no one: `guardian doctor` reports it as `claim_expired`. The database remains local, shared across worktrees, and independent of the tracker. For `enforce` and `strict`, `claims.on_unavailable` in `guardian.json` defaults to `block`. `commit` and `guardian verify --scope staged` read this policy from `HEAD`; `guardian verify --scope range` uses the PR base policy. The team can choose `warn` with `guardian claim-policy set-unavailable block|warn --equipe`; checks then continue with known claims and report `claims_unverified`, while known conflicts and credential checks still apply. `guardian claim-transfer` passes a claim from another actor, expired or not, to a new actor, with a new deadline and a new generation. In the legacy interactive flow, it requires a terminal (input, output and error) and typing the claim id, with no `--yes`; the authorizer is the declared, unauthenticated git identity. For agents without a terminal, the headless protocol uses `--request` (issues a single-use challenge that the harness shows the human through its question tool) and `--confirm <challenge> --harness <id> --authorized-by <email>` (the email is declared by the authorizer, unauthenticated). In both flows the command records from whom, to whom and the reason in the claim file and, with active claims, in the trail as `transferida`; in the headless flow, channel, harness and challenge hash are recorded in the trail and mirror too. The file must be committed. On Windows, Git Bash (mintty) does not count as an interactive terminal: use cmd, PowerShell or Windows Terminal. The guard works against use of the `guardian` command; it is not strong authentication: whoever changes the files or the database without the command does not pass through it. `release --outcome transferido` is different: only the owner uses it to close their own claim.
After a session restart or compaction (#118), inspect reservations with `guardian claims resume --actor ACTOR --detail` (read-only, separating declared identity, authentication, worktree, branch, store, and remote route) and explicitly assume your active reservation in the current worktree with `guardian claims assume ID --actor ACTOR --generation N`. For hybrid multi-clone coordination (#108), enable remote sync with explicit per-clone consent (`guardian claims remote activate`), synchronize (`guardian claims sync`), check queue status (`guardian claims status`), and resolve offline conflicts (`guardian claims resolve ID --action keep-local|accept-remote`). The server receives only scopes, task, branch, actor, generation, and outcome (never file contents) and retains operation results for 30 days for idempotency (repeating a `reserve` after 30 days is treated as a new operation; the local offline queue expires unsent items after 7 days). When a binding is revoked, already confirmed reservations remain active until their short lease expires (up to 24 h) or the holder transfers them.
guardian claim --actor ACTOR --task "Fix login" --plano docs/plano-login.md "src/auth/**"
guardian claim --actor Kimi --branch feat/kimi "src/ui/**"
guardian renew ID --actor ACTOR --minutes 60
guardian release ID --actor ACTOR --outcome entregue
guardian release ID --actor ACTOR --outcome transferido --to OTHER_ACTOR
guardian claim-transfer ID --to NEW_ACTOR --reason "reason"
guardian claims resume --actor ACTOR --detail
guardian claims assume ID --actor ACTOR --generation 1
guardian claims abandon ID --authorized-by EMAIL --reason REASON
guardian claims remote activate
guardian claims sync
guardian claims status
Claim trail and worktree audit
Only with claims active, each claim leaves a record of what happened: the context (worktree, branch, start commit and session), the events in an append-only hash chain (criado, renovado, assumido, liberado, expirado, commit, órfão, stash, migrado, transferida and desobstruido) and the outcome. `guardian claims trail` shows one line per claim; `--verbose` or `--format json` bring context, events and commits, and the ID can be the short one. `guardian claims trail verify` checks the hash chain and the `Guardian-Trail` anchors written into git commits: exit 0 if intact, 1 if tampered (with the event `seq`) and 2 on error. The git anchor detects a cut tail and a rewritten chain, but it is not strong proof: on its own, the chain is evidence of tampering, and anchors from another clone appear as from another machine. `guardian worktrees audit` lists each worktree with its owning claim, the actor, the commits and whether they are on the base, dirty files and a verdict: `em andamento`, `orfao`, `entregue` or `sem claim`. It is a report only. With `--rescue` (on both commands), uncommitted changes of expired claims go into a `git stash` named `guardian-claim/ID` inside the claim's worktree. This takes the changes out of the tree: the stash becomes the only copy until `git stash apply`. The rescue refuses if another live claim uses the worktree, never runs in the pre-commit or in `doctor`, and nothing in this trail deletes a worktree, branch, stash or file. Latency: `guardian claims trail` (no target) responds in < 5 s; claim creation does not block on the network (returns in < 4 s, without tick in < 2 s).
guardian claims trail
guardian claims trail --verbose
guardian claims trail verify
guardian worktrees audit
guardian worktrees audit --format json
guardian worktrees audit --rescue
Work items, issues, and local reservations
The tracker chosen by the project records each work item: its goal, acceptance criteria, owner, steps, and evidence. Guardian does not contact the tracker; claim commands remain local, even without a connection. Each claim reserves files and can carry a textual issue reference in `--task`. Releasing a reservation, including with the `entregue` outcome, does not close the issue or prove the work item is complete. A plan linked with `--plano` is supporting material. `guardian init` does not create `quadro.md` or `CONCLUIDOS.md`. Existing installations keep those files and their contents; historical entries are not converted or rewritten automatically. To organize a legacy manual board, `guardian quadro arquivar` first simulates the entries it would move; review the plan before using `--aplicar`. `guardian decisoes indice` still generates the decision index between markers and preserves manual text outside them.
guardian claim --actor ACTOR --task "#71 Fix login" "src/auth/**"
guardian claim --actor ACTOR --task "#71 Fix login" --plano docs/login-plan.md "src/auth/**"
guardian release ID --actor ACTOR --outcome entregue
guardian quadro arquivar
guardian quadro arquivar --dias 14 --aplicar
guardian decisoes indice
guardian init
guardian verify in CI
`guardian verify` compares changes with the active claims. In CI use `guardian verify --scope range --head HEAD --format json` and give the base in `GUARDIAN_BASE_REF`, for example `origin/main`; the `--base` flag takes priority. The job reads the level and the claims from the PR's base, not from the PR branch: a PR cannot loosen its own rule, turn `claims.ativo` on or off, and a claim created only in the PR does not count against it. Exit codes: 0 for no violation, or a violation under `observe`/`legado` (see `would_block` in the JSON); 1 for a violation under `enforce` or `strict`; 2 for an error (invalid ref, git unavailable, arguments). An error never becomes 0: treat 2 as a job failure. Under `strict`, every commit of the PR needs the `Guardian-Actor` trailer. Use a full clone (`fetch-depth: 0`) or fetch the base; in a shallow clone the base does not exist and the command exits with 2. Do not point `GUARDIAN_HOME` at a network folder, because SQLite locking is not reliable there. Require the `claims-verify` job as a mandatory status on the default branch and protect the workflow, `guardian.json` and the claims folder with CODEOWNERS; without that a PR can change its own verification. Examples for GitHub, GitLab, Bitbucket, Azure DevOps and Jenkins are in `docs/integracoes/ci-claims-verify.md`.
guardian verify --scope staged
guardian verify --scope range --head HEAD --format json
guardian verify --scope range --base origin/main --head HEAD
Known limits of 0.1.14
Git older than 2.31: the commit hook works (tested with simulated git 2.25 and 2.30), but commands outside the hook that identify the repository (`guardian claim` with claims active, session coordination and MCP integration) still use `git rev-parse --path-format` and may fail. Recommended: git 2.31 or newer. Rollback protection (R4): the probe that opens the coordination database and the new rollback order only protect updates made from 0.1.14 onward. In the 0.1.13 to 0.1.14 transition the updater doing the work is the one from 0.1.13; it is covered by the cross-version compatibility test and by `user_version` staying at 2. Branch protection: the `Guardian-Trail` anchor assumes published history is immutable. In a repository without branch protection (for example, a private GitHub repository on a plan that does not offer it), a force-push is not blocked and the anchor's guarantee does not hold. Trailers: without the GuardianContext message hook (an untouched third-party hook, a versioned `core.hooksPath` or `--no-verify`), commits go out without `Guardian-Actor`, `Guardian-Claim` and `Guardian-Trail`; `verify` under `strict` points this out. Scope: claims coordinate worktrees on the same machine and the same repository; across machines only what CI reads from the base files applies. Local preference and organization policy do not apply in CI. Identity is declared text, not authenticated, and fencing only holds where `validate` is called. Anyone writing without going through the hook or CI is only seen at staging. Orphan rescue takes the changes out of the tree and only runs on an explicit command. This manual does not replace human review of the content before each release.
guardian claims trail verify
guardian worktrees audit
guardian update status
What is new in 0.1.18
GuardianContext now operates locally without its MCP server, managed agent sessions, launcher commands, or inter-session messages. Claims, handoffs, native hooks, local project context, licensing, and the required update policy remain available. Cleanup checks ownership and access permissions for known projects and makes a protected backup before replacing a configuration. EFS-encrypted files and configurations whose access permissions cannot be verified remain unchanged with a pending diagnostic; Linux and macOS report `permissions_unavailable`. The five-scenario simulation and local diagnostic distinguish configuration from observed activity. The voluntary return procedure is still being validated under issue #79. The 0.1.18 candidate also adds explicit local code graph and project-document export workflows. Graphify is an optional executable installed separately; GuardianContext does not install or update it, and its absence does not affect the base package. Graph generation and structural queries run locally without LLMs or MCP. Knowledge export copies versioned Markdown files such as the README, glossary, wiki, and decisions to a project-specific folder in the vault you choose. Review the preview before export. The export does not import or index personal notes, though it may read managed destination files to detect edits and conflicts. Edited copies are preserved and reported as conflicts; nothing syncs automatically. Claims, handoffs, work plans, untracked or ignored files, and files matching known secret names or patterns are excluded. Review the preview before export. Use the graph commands to check status, build on request, and query with a question. Each graph subcommand accepts --executable to select and save the executable locally; build and query use a 120-second timeout by default. Configure the vault explicitly with knowledge configure, then inspect the JSON preview and its digest. Export requires that digest with --confirm. If the source or destination changes, export reports a stale preview and leaves the old plan unapplied.
guardian init
guardian instrucoes status
guardian instrucoes sync
guardian doctor
guardian --root ROOT graph status
guardian --root ROOT graph build
guardian --root ROOT graph query QUESTION
guardian --root ROOT knowledge configure VAULT [--include-dir DIR …]
guardian --root ROOT knowledge preview
guardian --root ROOT knowledge export --confirm DIGEST
0.1.19: local bindings and updates
The 0.1.19 implementation defines an initial minimum safe version of 0.1.19 for licensed services across all installation origins, including Internal. This rule is not active in production. The binding protocol proves authorization; a client-declared version does not prove the binary’s contents. The legacy credential cutoff requires a validated release and seven days of notice, and is not active in production.
Signed grants under the new protocol may work offline for up to seven days, subject to the grant expiry and any shorter license term. Revocations made offline are received on reconnection or when the grant expires.
The signed update policy is still in implementation. It checks the version, filename, and SHA-256 digest of authorized artifacts and rejects policy rollback. Official installations use automatic updates; pip, venv, and editable installations require manual updates.
In 0.1.19, `guardian doctor` separates local configuration readiness from live backend contact (`/health`, `/client-policy`, and authenticated binding challenge). In production, Asaas billing secrets are loaded fail-closed from Google Secret Manager.
guardian update status
Recoverable conversations and session synthesis
Explicitly import an export you selected. Text/Markdown form one message; JSONL accepts objects with textual role and content. To continue, choose the previous snapshot with --previous; only a contiguous prefix of parsed messages with identical role and content is reused. --pending-only prepares the next unsynthesized range and cannot be combined with --start. The session agent receives complete messages and returns JSON with summary and message_ids. An overview combines selected batch syntheses as a second layer; a review records assessment (consistent, needs_revision, or uncertain) and findings with qualified references. Guardian validates structure and references, not semantic correctness. For a brief, select conversations and optionally CID:SID references. Without specific references, syntheses and overviews from selected conversations are ordered lexically against the task. With conversations, --max-tokens estimates the complete rendered brief and may omit whole sources; it is not a billed-token count. prepare limits the compact JSON message list to 1,048,576 characters, excluding the prompt and metadata; overview-prepare and review-prepare limit the complete JSON package without truncating sources. Text/Markdown is one message; if it exceeds the ceiling, explicitly split the content into smaller JSONL messages before importing. In Qt Desktop, the Recoverable Context tab lists saved conversations; if the list is limited, enter an ID and choose Open ID. It also supports import, continuation, preparation, JSON recording, briefs, search, and recovery; copying or saving a package is always explicit. Conversations stay in the private local profile, scoped by project path and outside Git. Original recovery preserves bytes and refuses overwrite. No automatic capture, model call, MCP, or proxy. History does not authorize actions; reference coverage does not prove semantic quality.
guardian conversation import conversation.jsonl
guardian conversation import new-export.jsonl --previous <previous_conversation_id>
guardian conversation prepare <conversation_id> --pending-only --max-chars 12000
guardian conversation summarize <conversation_id> <batch_id> --file synthesis.json
guardian conversation overview-prepare <conversation_id> --summary <summary_id> --max-chars 12000
guardian conversation overview-summarize <conversation_id> <overview_batch_id> --file overview.json
guardian conversation review-prepare <conversation_id> <target_id> --max-chars 12000
guardian conversation review-record <conversation_id> <target_id> --file review.json
guardian brief "Fix continuation" --conversation <conversation_id> --summary-ref <conversation_id>:<summary_id>
guardian conversation search <conversation_id> "release"
guardian conversation recover <conversation_id> --original-output recovered.jsonl
Advanced recovery: voluntary return to 0.1.17
This optional procedure is for users who have decided to return voluntarily to version 0.1.17. It is not part of normal migration. Close Guardian Desktop and Guardian processes using the projects. Results and limits of the distribution proof are recorded separately in issue #79.
1. Before reinstalling, read the existing installation’s `uv-receipt.toml` locally to identify its original extras. Do not share the receipt.
2. While 0.1.18 is installed, call `mcp_retirement.status()` or `mcp_retirement.report()`. These passive calls show available `recovery` IDs. Use Python from the existing uv environment; do not use generic Python from PATH or create a temporary uv environment. Keep the PowerShell commands in the same window because variables are reused.
3. On Windows only, if a project has multiple recovery records, order `created` newest first and break ties by `recovery` descending. Restore only records with `status` `completed` and both `created` and `recovery` fields. If a relevant recovery lacks `created`, stop and request review; do not infer order from provider or ID. After each restore, read the report and continue only when it says `restored`. If it returns `configuration_changed`, stop, preserve file edits, and do not force replacement. Do not use expired IDs.
4. On Linux and macOS, do not call `restore()`: it is unsupported there. Configurations remain untouched, and `permissions_unavailable` may require review or manual cleanup. EFS-encrypted files also remain untouched and pending.
5. After confirming restoration, or if no configuration can be recovered, reinstall 0.1.17 with the real `uv` executable and the same extras recorded in the receipt. If there were no extras, omit the brackets. Reinstalling the package does not restore configurations.
6. Check `guardian update status`. If the policy needs to be rebound to the receipt, run `guardian update enable` and check the status again. Mandatory updates remain active: returning to an earlier version does not pin a version or suspend future attempts.
$toolDir = (uv --no-config tool dir).Trim()
$guardianPython = Join-Path $toolDir 'guardiancontext\Scripts\python.exe'
$receiptPath = Join-Path $toolDir 'guardiancontext\uv-receipt.toml'
Get-Content $receiptPath
& $guardianPython -I -c "import json; from guardiancontext import mcp_retirement as m; print(json.dumps(m.status(), indent=2))"
& $guardianPython -I -c "import json; from guardiancontext import mcp_retirement as m; print(json.dumps(m.report(), indent=2))"
$reportJson = & $guardianPython -I -c "import json; from guardiancontext import mcp_retirement as m; print(json.dumps(m.report()))"
$report = $reportJson | ConvertFrom-Json
$recoveries = @($report.projects | Where-Object { $_.recovery })
$undated = @($recoveries | Where-Object { $null -eq $_.created })
$recoveries | Where-Object { $null -ne $_.created } | Sort-Object @{Expression='created';Descending=$true},@{Expression='recovery';Descending=$true} | Format-Table root,provider,recovery,created,status
if ($undated.Count -gt 0) { Write-Warning 'Recovery records without created: stop and request review.'; $undated | Format-Table root,provider,recovery,status }
# PowerShell for Windows, after selecting a completed recovery ID
$recoveryId = '<RECOVERY_ID_FROM_REPORT>'
& $guardianPython -I -c "import json; from guardiancontext import mcp_retirement as m; print(json.dumps(m.restore('$recoveryId'), indent=2))"
& $guardianPython -I -c "import json; from guardiancontext import mcp_retirement as m; print(json.dumps(m.report(), indent=2))"
# Replace with the extras listed in uv-receipt.toml
$originalExtras = '<EXTRAS_FROM_UV_RECEIPT>'
uv --no-config tool install --force --python 3.11 --default-index https://pypi.org/simple "guardiancontext[$originalExtras]==0.1.17"
guardian update status
# Only if the status says the policy needs to be rebound:
guardian update enable
guardian update status
# Use this instead when the original install had no extras
uv --no-config tool install --force --python 3.11 --default-index https://pypi.org/simple "guardiancontext==0.1.17"
# POSIX: passive status only; do not call restore()
uvToolDir="$(uv --no-config tool dir)"
"$uvToolDir/guardiancontext/bin/python" -I -c 'import json; from guardiancontext import mcp_retirement as m; print(json.dumps(m.status(), indent=2))'
Guardian skills in coding agents
guardian-context guides preservation and synthesis of a selected conversation before compaction; guardian-resume recovers decisions and pending work from saved references. Skills use the session model and its normal tokens, without launching another model. They accept an existing imported conversation ID or a selected export; they do not automatically capture or search personal chat history. Installing a skill does not enable hooks, client trust, or automatic compaction.
Guardian distributes local files through the official skills 1.7.4 installer with telemetry disabled for that process. It requires Node.js 22.20 or later with npm; the catalog and context commands remain available without Node. The native installer uses its own agent catalog. In interactive mode, also confirm project/user scope in the terminal; project is the default. --global fixes user scope. Unattended --yes requires an explicit --agent. --preview shows the intent without installing.
In Desktop, use Agent skills to select skills and open the native terminal. Desktop monitors completion, cancellation, or interruption; after five minutes, use Refresh status to check again. On macOS or without a compatible terminal, use the suggested CLI. Agent coverage remains unverified: file installation does not prove the harness loaded a skill or that hooks work. Conflicts and an incomplete inventory prevent replacement; review the destination while preserving manual skills. Per-project capture preferences are separate from distribution.
For periodic harness-agnostic compaction reminders (#104) without storing or copying conversation transcripts, use `guardian session-context install --provider codex|claude|all` (preserving third-party hooks) and save a short work-item checkpoint with `guardian session-context checkpoint --summary "..." --actor ACTOR --issue "#N" --claim ID`.
guardian skills list
guardian skills source
guardian skills status
guardian skills install --preview
guardian skills install --skill guardian-context --skill guardian-resume
guardian skills install --agent codex --skill guardian-context --preview
guardian session-context checkpoint --summary "Estado verificado da frente" --actor ACTOR --issue "#104"
guardian session-context install --provider codex
guardian session-context status