Reference · GitOps & Second Brain

From idea to a running change — and back

Every change takes the same path: captured in Git, checked automatically, deployed automatically, documented for humans in the wiki and for the AI in the "Second Brain." The loop closes because the AI reads its own knowledge back and assists the next change.

Data flow · change → deploy → knowledge
Change
idea · edit
git push
Forgejo
source of truth
Webhook + HMAC
Dockhand
on Unraid
compose up
Live stack
running
↓ DOCUMENTED AS
Wiki.js
for humans · readable
Second Brain
for the AI · versioned
↺ The AI reads back and assists the next change

Git as the source of truth

Every compose file and config lives in Forgejo. Edit, commit — whatever is in Git is the valid state. A rollback is a simple "revert" with full history.

Forgejoversionedrollback

Dockhand on Unraid

A push triggers a redeploy via a signed webhook (HMAC): Dockhand pulls the new state and restarts the stack — no SSH needed. Dockhand runs as a container on Unraid.

Dockhandwebhook + HMACauto-deploy

Updates as a proposal, not a surprise

New image versions do not slip into production on their own: a bot opens a pull request for them, a pipeline checks the change, and only a merge ships it. Staying current without updating blindly.

update botpull requestchecked before rollout

Wiki.js for humans

In parallel, the human-readable docs land in the wiki — architecture, runbooks, stack pages — and an internal portal gathers services, diagrams and runbooks in one place. The wiki itself is mirrored back to Git, so it is doubly backed up.

Wiki.jsinternal portalrunbooks

Second Brain for the AI

An AI-curated, Git-backed knowledge store: what happened is logged directly, durable knowledge is proposed by the AI as a pull request — a human reviews and merges. Trust tiers prevent "knowledge pollution."

AI-curatedPR reviewtrust tiers

AI sandbox with approval

Experiments do not run on the live system but in a dedicated test VM. The AI files a test task as a ticket; it only runs once a human has approved it. Inside the VM the AI works without admin rights in an additional sandbox, may reach the internet but not the rest of the home network. The result comes back as a comment on the ticket, and a snapshot resets the VM to its clean state at any time.

human approvalsealed-off VMsnapshot
Stack in use
ForgejoDockhandUnraidWebhook (HMAC)CI pipelineWiki.jsSecond BrainLab VM