Adds the shared kernel modules (oikos/policy.py, oikos/relations.py, oikos/ledger.py) that let every surface — CLI, MCP, context-card generator — agree on risk classification and ontology graph walks from one implementation. homelab CLI: `service <name> explain|health|docs|log|actions|history` (Service Console v0), `change preflight <service>`, `node <name> relations`. Restart and client add/remove now append change-ledger entries (ledger/*.jsonl, committed alongside the change they record). mcp/server.py mirrors explain/preflight/get_relations/get_change_history as MCP tools, card-first so agent orientation is one call instead of several search_docs/get_page round-trips. oikos/gen-topology.py now also emits a compact context card per host and service (oikos/cards/*.md) — identity, blast radius, safe actions + risk class, doc pointer, recent ledger history. runbooks/*.md: service health check, config change + deploy, client enrollment, incident investigation, and the five node lifecycle transitions (provision/activate/migrate/deprecate/destroy), each with machine-readable frontmatter (risk class, inputs, verification, docs-update checklist). Wired into HERMES.md so agents load these instead of rediscovering topology per-task. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
name, risk_class, inputs, verification, docs_update_checklist, transition
| name | risk_class | inputs | verification | docs_update_checklist | transition | ||||
|---|---|---|---|---|---|---|---|---|---|
| lifecycle-provision-node | config_mutation |
|
grep 'state: provisioning' hosts/<name>.yaml |
|
planned -> provisioning |
Lifecycle: provision a node
Per oikos/ontology.yaml lifecycle.transitions.
Policy note: provisioning nodes get a lifecycle override —
config_mutation actions downgrade to reversible_low because nothing
depends on the node yet (see oikos/policy.yaml lifecycle_overrides).
Requires (from ontology): inventory entry, IP reserved, storage pool chosen, doc page stub.
- Create the LXC/VM on its target Proxmox host (
pct create/qm create), choosing the storage pool deliberately — record it as thestorage:field once populated (Week 1 schema; not yet backfilled for existing nodes). - Add the inventory entry:
homelab client add <name>for anything that will run thehomelabCLI, or a directhosts.<name>:block withstate: provisioning,kind,host,pve_id,lan_ipfor infra-only LXCs that won't self-enroll. - Stub the doc page (
containers/<pve_id>-<name>.mdorvms/<pve_id>-<name>.md) — even a one-line "provisioning, see plan X" is enough to satisfy the transition requirement. - Reserve the IP in DNS/DHCP notes if it's a fixed LAN address.
Next: lifecycle-activate-node.md.