You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .mex/ROUTER.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ edges:
14
14
condition: when setting up the dev environment or running the project for the first time
15
15
- target: patterns/INDEX.md
16
16
condition: when starting a task — check the pattern index for a matching pattern file
17
-
last_updated: 2026-05-22
17
+
last_updated: 2026-05-27
18
18
---
19
19
20
20
# Session Bootstrap
@@ -54,7 +54,8 @@ Then read this file fully before doing anything else in this session.
54
54
-**Safe provider retrieval CLI:**`secretzero get` now retrieves via provider bundle methods (`SyncEngine.get_provider_secret`) with metadata-first output by default; plaintext requires `--reveal`. Sandbox policy guards retrieval when `SZ_SANDBOX=true` unless explicitly overridden by `SZ_ALLOW_GET_IN_SANDBOX=true`, and command-level policy preflight blocks on policy errors.
55
55
-**GitNexus / MetaGit relational intel:**`secretzero sync` and `secretzero get` write `.gitnexus/secrets_overlay.json` (Ladybug-oriented JSON linking manifest secret names to symbol IDs / FQNs from `.gitnexus/discovery_bindings.json`). Optional `SZ_METAGIT_REGISTRY=1` merges inventory into `~/.metagit.yml`. `secretzero discover` persists bindings and extends LLM output with parent symbol / FQN fields. `secretzero gitnexus blast-radius --symbol <FQN>` wraps GitNexus impact; `secretzero rotate --trigger-reindex` runs `gitnexus analyze --skills` after success. Per-secret `process_tags` labels execution-flow sensitivity (schema + docs updated).
56
56
-**Terraform static-variable behavior:** Terraform export now always emits sensitive input variables for static-like secrets (`static` and bundle kinds with `PROMPTS_LIKE_STATIC`, such as `azure_app_reg`). `--include-static-secrets` now controls whether static defaults are embedded as Terraform variable defaults.
57
-
-**Agent skill guidance split:** SecretZero guidance is now split into focused skills — `skills/secretzero-author/SKILL.md` (schema-compliant Secretfile authoring, safe contextless discovery, `.szvar` lane breakout, and policy-bound targets), `skills/secretzero-agent/SKILL.md` (agentic vectors, runtime/API workflows, and installation/onboarding), and `skills/secretzero-handle/SKILL.md` (`SZ_AGENT_MODE`, `.env`/ingest preseed, spill-safe CLI).
57
+
-**Agent skill guidance split:** SecretZero guidance is now split into focused skills — `skills/secretzero-author/SKILL.md` (schema-compliant Secretfile authoring, safe contextless discovery, `.szvar` lane breakout, and policy-bound targets), `skills/secretzero-agent/SKILL.md` (agentic vectors, runtime/API workflows, and installation/onboarding), `skills/secretzero-handle/SKILL.md` (`SZ_AGENT_MODE`, `.env`/ingest preseed, spill-safe CLI), and `skills/secretzero-agent-adopt/SKILL.md` (Hermes/OpenClaw `agent list` / `agent adopt` bootstrap and restore loops).
58
+
-**`secretzero agent list` / `agent adopt`:** Discover local Hermes/OpenClaw installs (read-only) and bootstrap SecretZero environments from **present** catalog credentials without emitting values. `agent adopt` writes `Secretfile.yml` into `--output-dir` (default: agent install path); `agent backup` is an alias. Supports `--template`, `--preseed-lockfile`, autodetect (Hermes then OpenClaw), and idempotent merge on re-adopt. See `docs/superpowers/specs/2026-05-27-agent-adopt-design.md`, `.mex/patterns/agent-adopt.md`.
58
59
-**`secretzero agent instructions`:** Read-only Rich/JSON report of `agent_instructions` (summary + numbered steps). Default scope is pending manual secrets (same semantics as `agent sync`); `--all` lists every secret with instructions; `--detailed` adds optional metadata. See `.mex/patterns/agent-instructions-report.md`.
59
60
-**Environment-map lanes + target profiles:** Secretfile now supports top-level `environments` and `target_profiles`; CLI (`sync`, `agent sync`, `web`) and API (`/sync`, `/agent/sync`) resolve lane-specific var files/lockfiles/profile defaults with runtime flags taking precedence. `secretzero web` now renders an environment dropdown and recomputes lane context on selection.
60
61
-**CLI-wide environment propagation:** Secretfile-backed CLI commands now share root-aware `--environment` resolution. `secretzero -e <env> ...` flows into manifest/list/status/render/drift/terraform-style commands, while subcommand-local `--environment` overrides the root selection when both are present.
environments from local agent installs. This is **not**`secretzero backup create` (encrypted value DR).
26
+
27
+
Implementation lives under `src/secretzero/integrations/`.
28
+
29
+
## Steps
30
+
31
+
1. Add or extend an adapter in `integrations/<target>/` with `catalog.yaml` + `adapter.py`.
32
+
2. Register the adapter in `integrations/registry.py` with autodetect order.
33
+
3. Keep scans **presence-only** — never attach secret values to result models or JSON.
34
+
4. Generated manifests use `default: null` on static secrets; target paths point at agent `.env` (absolute when GitOps output dir differs from install root).
35
+
5.`--preseed-lockfile` must call `run_lockfile_import` via the ingest-preseed path (hash-only).
36
+
6. Update skills (`secretzero-agent-adopt`), README `agent-entrypoint` comment, and ROUTER.md together.
37
+
38
+
## Gotchas
39
+
40
+
-`agent backup` wording collides mentally with `secretzero backup create` — document the distinction in help and skills.
41
+
- Re-adopt merges new catalog matches into an existing Secretfile unless `--force`.
42
+
-`--force` rebuilds from scratch (drops merge behavior).
43
+
- Autodetect failure must not write partial artifacts.
44
+
- Default `--output-dir` is the resolved agent install path.
45
+
46
+
## Verify
47
+
48
+
- Run `tests/test_agent_adopt.py`.
49
+
- Confirm JSON output never contains fixture secret strings.
50
+
- Run fast pre-commit gate.
51
+
52
+
## Update Scaffold
53
+
54
+
-[ ] Update `.mex/ROUTER.md` when adopt behavior changes
0 commit comments