1. On a machine logged into Claude, mint a Code OAuth token
You raised your castle from the zer0-mistakes stones. Now you will teach it to run itself โ to write its own scrolls, mend its own walls, and keep a diary of every battle โ without ever handing a stranger the keys to the gate.
This is a direct sequel to Epic Quest: Zer0-to-Her0 CMStyle. There you built a living site. Here you teach it autonomy: a robot drafts content, screenshots it, files its own bugs, opens pull requests, reviews and improves them, contributes fixes upstream, and writes a retrospective of every working session โ while a human still holds the merge button. This campaign is reverse-engineered from a real 40-branch build, so every chapter is a milestone you can actually complete and verify.
๐ The Legend Behind This Quest¶
Most castles need a keeper awake at every hour โ patching walls, copying scrolls, watching the gate. The Self-Operating Castle is different. Its keeper sleeps. While they rest, tireless familiars draft the next scroll, test every bridge before a traveler crosses, and hunt the bugs that crept in at dusk. But the familiars never open the final gate themselves โ they bring the key to the keeper and wait. That single discipline โ autonomy that proposes, a human that disposes โ is what separates a self-operating castle from a runaway machine.
The dragon at the heart of this campaign is not a monster of fire. It is ๐ The Self-Retrigger Loop: a CI job that, on finishing its own work, wakes itself to do it again โ forever. Learn to break that loop and you have learned the deepest lesson of autonomy.
๐ฏ Quest Objectives¶
By the end of this campaign you will have built and verified:
Primary Objectives (Required for Campaign Completion)¶
- A verification harness โ a deterministic CI gate that turns "is it broken?" into a required check
- An autonomous content factory โ generation from a backlog that refuses to publish what it cannot verify
- An editorial reviewer โ an agent that improves each draft in place, and the loop-breaker that stops it reviewing itself forever
- A least-privilege trust layer โ OAuth, a bot PAT with no admin scope, and a
*_ENABLEDkill switch on every automation - A named agent + skill fleet โ every role a persona with hard rules, plus a routine that audits the fleet itself
- A session chronicle โ a hook that, at the end of every working session, records what the session cost
Mastery Indicators¶
You will know you have mastered this campaign when you can:
- [ ] Explain OODA dispatch and git-ref CAS leasing (no server โ git is the database)
- [ ] Diagnose and break a synchronize self-retrigger loop
- [ ] Separate a product bug from a platform bug and file the platform one upstream
- [ ] Defend the Prime Directive: an unverifiable command never ships
๐บ๏ธ Quest Metadata¶
| Field | Value |
|---|---|
| Type | epic_quest โ a multi-session campaign |
| Tier | โก Master 1111 capstone โ chapters span ๐ฑ Apprentice โ โก Master |
| Total XP | ~955 XP across 10 chapters, plus two side-quest lines |
| Primary classes | ๐๏ธ System Engineer ยท ๐ป Software Developer ยท ๐ก๏ธ Security Specialist |
| Prerequisites | Zer0-to-Her0 CMStyle, basic Git, a GitHub account |
| Boss | ๐ The Self-Retrigger Loop (a CI job that re-triggers itself forever) |
| Source build | bamr87/lifehacker.dev โ 40 merged branches, +16,223 / โ499 lines (see issue #365) |
๐ The Campaign โ Ten Chapters¶
Each chapter maps to merged branches from the reference build you can study and reproduce. Play them in order; each unlocks the next.
| # | Chapter | Level | Difficulty | XP | Class | Reference PRs |
|---|---|---|---|---|---|---|
| I | The Summoning | 0001 |
๐ข Easy | 50 | ๐ป Developer | #1 ยท #2 ยท #11 |
| II | The Proving Grounds | 0100 |
๐ก Medium | 75 | ๐๏ธ System Eng | #3 ยท #4 |
| III | The War Machine | 1000 |
โ๏ธ Epic | 150 | ๐๏ธ System Eng | #7 ยท #16 ยท #21 |
| IV | The Sigils of Trust | 1001 |
๐ด Hard | 90 | ๐ก๏ธ Security | #12 ยท #13 ยท #14 ยท #15 |
| V | The Content Forge | 1010 |
๐ด Hard | 120 | ๐ป Developer | #9 ยท #22 ยท #26 |
| VI | The Editor's Eye | 1100 |
๐ด Hard | 110 | ๐ป Developer | #25 ยท #35 ยท #36 ยท ๐ #49 |
| VII | The Named Familiars | 1101 |
๐ก Medium | 80 | ๐๏ธ System Eng | #45 ยท #46 |
| VIII | The Cartographer | 0101 |
๐ก Medium | 60 | ๐ป Developer | #42 |
| IX | The Chronicle | 1110 |
๐ด Hard | 100 | ๐ป Developer | #47 ยท #50 ยท #51 ยท #52 |
| X | The Bard Forge | 1100 |
๐ด Hard | 120 | ๐ป Developer | #53 |
๐ Boss gate. The Self-Retrigger Loop stands between Chapter VI and Chapter VII. You cannot pass to the Named Familiars until you have broken the loop in the Editor's Eye (reference PR #49).
๐ Choose Your Adventure Platform¶
This campaign builds GitHub-hosted automation, so your battleground is a GitHub repository plus a local clone. The familiars are gated OFF until you both add auth and flip a switch โ exactly the discipline you will teach your own site.
๐ ๏ธ Arm the gate (any OS)¶
# 1. On a machine logged into Claude, mint a Code OAuth token:
claude setup-token
# 2. Store it as a repo secret and flip the kill switch you want on:
gh secret set CLAUDE_CODE_OAUTH_TOKEN --repo <you>/<your-site>
gh variable set CONTENT_FACTORY_ENABLED --body true --repo <you>/<your-site>
# Until BOTH the secret and the *_ENABLED variable exist, every familiar idles.
Each chapter adds its own platform notes (a CI runner, a bot PAT, a session hook). The rule never changes: nothing autonomous runs until you opt in, and it stops the instant you unset the variable.
๐ Badges This Campaign Awards¶
- ๐ฅ First Pull Request โ Chapter I (PR #1)
- ๐๏ธ Castle Mechanic โ Chapter III (the fleet + simulation stand up)
- ๐ก๏ธ Security Guardian โ Chapter IV (OAuth everywhere, least-privilege PAT, no admin scope)
- ๐ Loop Breaker โ Chapter VI (break the self-retrigger loop)
- ๐ค Familiar Master โ Chapter VII (the agent set + its self-review)
- ๐ Chronicler โ Chapter IX (the retrospective hook)
- ๐ช Loop Closer โ Chapter X (turn project history into a learnable quest without mutating the project)
- ๐ Bug Slayer โ Side-quest Line A (re-land an orphan, break the loop, stop the header-shredder twice)
- ๐ The Self-Operating Architect โ complete all ten chapters
โจฏ Side-Quest Lines¶
Two optional lines run alongside the main campaign. Their content is authored in the reference build (bamr87/lifehacker.dev) and is being lifted into IT-Journey as standalone Apprentice side-quests.
- ๐ Line A โ The Bug Slayer's Gauntlet โ the boss fights between chapters: the orphan-commit trap (#8, #10), transient-vs-real failures (#32, #39), fail-safe builds (#43).
- ๐ Line B โ The Lore Library โ real terminal skills the forge produced: fzf (#17, #31, #44), tmux survival (#20, #38, #40), and the point-the-robot / guardrails / fleet-spawn docs (#18, #33, #41). (Tracked as planned side-quests โ lifted from the verified source, not re-invented.)
๐งฑ Build Plan for IT-Journey Maintainers¶
This campaign was forged automatically from issue #365 by the quest-forge fleet. To reproduce or extend it:
- The
epic_questhub (this file) lives atpages/_quests/codex/self-operating-website.md(epic quests use the/quests/codex/URL namespace). Each chapter is amain_questin its binary-level directory (pages/_quests/XXXX/) with a/quests/XXXX/<slug>/permalink, so it also surfaces on that level's hub; the campaign is held together byquest_dependenciesand this hub's chapter index. - Chapters chain via
quest_dependencies.recommended_quests/unlocks_quests; the hubunlocks_questsevery chapter. - Badges are free-text
rewards.badgesโ no central registry to update. - Re-run is automatic: label any future quest-forge proposal issue
epic-quest(or comment/forge-quest) and thequest-forge.ymlworkflow opens a fresh campaign PR.
๐บ๏ธ Campaign Map¶
graph TD
Pre[Prequel: Zer0-to-Her0 CMStyle] --> Hub[๐ The Self-Operating Website]
Hub --> I[I ยท The Summoning]
I --> II[II ยท The Proving Grounds]
II --> III[III ยท The War Machine]
III --> IV[IV ยท The Sigils of Trust]
IV --> V[V ยท The Content Forge]
V --> VI[VI ยท The Editor's Eye]
VI --> Boss{๐ Self-Retrigger Loop}
Boss --> VII[VII ยท The Named Familiars]
VII --> VIII[VIII ยท The Cartographer]
VIII --> IX[IX ยท The Chronicle]
IX --> X[X ยท The Bard Forge]
click Pre "/quests/codex/zer0-to-her0-cmstyle/"
click I "/quests/0001/self-operating-website-01-the-summoning/"
click II "/quests/0100/self-operating-website-02-the-proving-grounds/"
click III "/quests/1000/self-operating-website-03-the-war-machine/"
click IV "/quests/1001/self-operating-website-04-the-sigils-of-trust/"
click V "/quests/1010/self-operating-website-05-the-content-forge/"
click VI "/quests/1100/self-operating-website-06-the-editors-eye/"
click VII "/quests/1101/self-operating-website-07-the-named-familiars/"
click VIII "/quests/0101/self-operating-website-08-the-cartographer/"
click IX "/quests/1110/self-operating-website-09-the-chronicle/"
click X "/quests/1100/self-operating-website-10-the-bard-forge/"
๐งพ The Canonical Build Ledger¶
All 40 merged branches of the reference build (PR numbers + squash-merge SHAs are quoted from issue #365's deterministic collector โ not re-derived here)
The full ledger of 40 merged branches (+16,223 / โ499 lines), with PR numbers, squash-merge SHAs, dates, diffstats, branch names, and titles, lives in the source issue. Each is in the `bamr87/lifehacker.dev` repo. โก๏ธ **Read the full ledger:** [issue #365](https://github.com/bamr87/it-journey/issues/365) ยท source repo [`bamr87/lifehacker.dev`](https://github.com/bamr87/lifehacker.dev) Each chapter's **๐ Reproduce it** section cites the specific PRs and commits it maps to, so you can study the real diff that taught the lesson.๐ Rewards & Progression¶
๐๏ธ Capstone Badges - ๐ The Self-Operating Architect โ you built a site that proposes its own changes behind a human gate - ๐ Loop Breaker โ you tamed the dragon that wakes itself forever
๐ ๏ธ Skills Unlocked - Autonomous CI/CD pipeline design ยท AI agent + skill fleet authoring ยท Least-privilege automation with a human gate
๐ Progression Points: +200 XP for the hub, ~955 XP across the chapters
๐ฎ Next Adventures¶
- ๐ฏ Begin the campaign: Chapter I โ The Summoning
- ๐ Revisit the prequel: Epic Quest: Zer0-to-Her0 CMStyle
- ๐ช The closing twist: Chapter X โ The Bard Forge
- ๐ค Sibling campaign: Epic Quest: The Agentic Codex โ master the agents that power a fleet like this one
๐ Resource Codex¶
- GitHub Actions documentation โ the engine every familiar runs on
- Claude Code โ the agent that drives the fleet
- Jekyll documentation โ the static castle
- Source build:
bamr87/lifehacker.devโ the real 40-branch reference
๐ค Campaign Completion Checklist¶
- โ Completed all ten chapters in order
- โ Broke the Self-Retrigger Loop boss
- โ Earned the Security Guardian and Familiar Master badges
- โ Your site proposes its own changes behind a human merge button
๐ธ๏ธ Knowledge Graph¶
Structured wiki-links connect this quest to the IT-Journey knowledge graph. Open the Obsidian Graph View to explore connections.
Overworld: [[๐ฐ Overworld - Master Quest Map]] Prequel: [[Epic Quest: Zer0-to-Her0 CMStyle]] Chapters: [[The Summoning]] ยท [[The Proving Grounds]] ยท [[The War Machine]] ยท [[The Sigils of Trust]] ยท [[The Content Forge]] ยท [[The Editor's Eye]] ยท [[The Named Familiars]] ยท [[The Cartographer]] ยท [[The Chronicle]] ยท [[The Bard Forge]] Obsidian docs: [[Obsidian Knowledge Graph and Wiki Links]]