Active Directory, passively managed
  • Go 94.6%
  • PLpgSQL 4.6%
  • Dockerfile 0.8%
Find a file
Charley Sheets 8204f9db1b
All checks were successful
build / images (controlloop) (push) Successful in 1m48s
build / images (rpcserver) (push) Successful in 1m41s
test / go-test (push) Successful in 22s
test / schema-test (push) Successful in 52s
Merge pull request 'feat(ci): trigger deploys' (#12) from feat/trigger-deploy into main
Reviewed-on: #12
2026-04-18 08:34:40 +00:00
.forgejo/workflows Dispatch test deploy on push to main; bake schema into controlloop 2026-04-18 08:24:00 +00:00
cmd Add cmd/dp: Bubble Tea TUI for the operator 2026-04-13 07:54:53 +00:00
internal Add ListRecentPlans to approvalstore client 2026-04-13 07:54:04 +00:00
k8s Publish images under the brooktrails/ Harbor project 2026-04-18 04:51:23 +00:00
schema Add approval store schema, CNPG cluster, and Go module 2026-04-11 20:46:33 +00:00
.gitignore Initial commit 2026-04-11 05:51:59 +00:00
CLAUDE.md Add deploy artifacts: Dockerfile, k8s manifests, CI build/push 2026-04-13 08:17:02 +00:00
Dockerfile Move BINARY ARG above first FROM so it reaches the final stage 2026-04-18 08:27:58 +00:00
go.mod Add cmd/dp: Bubble Tea TUI for the operator 2026-04-13 07:54:53 +00:00
go.sum Add cmd/dp: Bubble Tea TUI for the operator 2026-04-13 07:54:53 +00:00
LICENSE Initial commit 2026-04-11 05:51:59 +00:00
README.md docs: flesh out readme with an implementation plan 2026-04-11 06:50:20 +00:00

"Active Directory, passively managed."

directory-pacifier

An LLM-assisted Windows/AD fleet management agent for a homelab environment. The system uses an LLM (Anthropic API initially, local acceleration later) to bridge general systems expertise with AD/Windows domain administration knowledge, providing visibility, diagnosis, and assisted remediation without requiring the operator to be an AD expert.

Architecture

Three components with explicit privilege separation:

  • Control loop (low-privilege) — drives the LLM, evaluates advisory policy rules, proposes operations, manages user interaction for approvals. Untrusted by construction; does not participate in the execution trust chain.
  • Approval store (Postgres via CNPG) — append-only by role enforcement. Stores proposed operations with a cryptographic commitment to the exact operation request, approval/rejection records (single-use, time-bounded), execution records, and the trust ledger. Observable independently by both the control loop and the RPC server. Doubles as audit log.
  • RPC server (high-privilege) — executes operations against the Windows/AD fleet. Independently evaluates mandatory policy rules and verifies approval exists in the store for the exact operation received. Does not trust the control loop's claims about anything.

Policy system

Two lanes in a shared policy language:

  • Advisory rules — provided to the LLM as context to inform its judgment. Can be expressive and rich.
  • Mandatory rules — evaluated by a rules engine inside the RPC server. Simple by design. LLM cannot override. Result is final.

Trust model

Trust accumulates explicitly over time, per operation type and scope. The agent proposes trust reductions after demonstrated success; the operator grants them deliberately. Scope is a first-class dimension — fleet-wide operations do not inherit trust from single-host operations of the same type.

Universe model

Operations act on subjects within universes. A universe is a first-class entity with a driver that provides member enumeration, subject validation, and a vocabulary of subject kinds and scope descriptors. Drivers are composable via a decorator pattern — a user-defined universe ("my three favorite computers", "domain controllers only") is the AD driver with a filter decorator applied, inheriting the full AD vocabulary and validation while constraining membership. Universe driver configuration is stored as JSONB in Postgres; credentials are referenced from OpenBao rather than stored directly.

Built-in universe kinds initially: ad_domain, user_defined. Driver interface is designed for future extension (Kubernetes, SSH fleet, etc.).

Management layer

DSC push mode for desired state operations, direct PowerShell reads for interrogation and diagnosis, Prometheus + windows_exporter for metrics. windows_exporter fleet installation is the first concrete operation target and the initial driver for proving the architecture end-to-end.

Implementation

Go. Postgres (CNPG). OpenBao for secrets. Deployed to the c2-talos Kubernetes cluster.