feat: control-plane template for thurbox orchestration#1
Merged
Conversation
Fill in the empty template repo: a control plane that holds the map of a user's projects and the orchestration of thurbox agent sessions run against them. The control plane holds the plan and the log; workers hold the branches. - registry/ — owner-parameterized map. sync-registry.sh reads the owners from registry/owners.txt rather than hardcoding them, and refuses to run when the file has no active entries instead of emitting an empty map. - orchestration/ — playbook and run-log templates, plus two worked playbooks. - extension.toml.in — rendered to a gitignored extension.toml at install time, because [[sessions]] repo_path cannot be a `~` (see below). - scripts/ — install, registry sync, checkout sync, worktree trust seeding. - .github/workflows/ci.yml — shellcheck, YAML validity, registry shape, all feeding a single "All Checks" gate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fills in the empty template repo. Someone clicks Use this template and gets a
working control plane: a repo holding the map of their projects and the
orchestration of thurbox agent sessions run against them.
The defining idea, carried over from the private repo this pattern was learned
in: the control plane holds the plan and the log; it never holds the workers'
branches. Real work happens in thurbox worker sessions, each in its own git
worktree in a real repo. What accumulates here is playbooks and run logs.
Layout
__REPO_PATH__and why it existsThe manifest ships as
extension.toml.inwith a__REPO_PATH__placeholder;scripts/install-extension.shrenders it to a gitignoredextension.tomlcarrying the clone's real absolute path, then installs.
This is not a style choice.
[[sessions]] repo_pathmust be an absolutepath: thurbox does not expand
~there.ExtensionDef::resolved_for_home()substitutes the
{home}token but never callsexpand_tilde, so a leadingtilde is taken literally and the session lands in a directory literally named
~. And{home}itself resolves to the extension home(
~/.config/thurbox/extensions/fleet), not the checkout — while the sessionmust open the checkout, because it needs
registry/andorchestration/inhand.
A template obviously cannot hardcode a path that exists on one machine. Hence
the placeholder. The installer sets
-euo pipefail, verifiesthurbox-cliexists, verifies it is inside a git repo, and refuses to install if the
placeholder survives substitution — a half-rendered manifest would otherwise
register a session pointing at a directory named
__REPO_PATH__. Bothextension.toml.inand the README explain the tilde behavior, so nobody"simplifies" it back to
~.Owner-parameterized registry
scripts/sync-registry.shreads its owners fromregistry/owners.txt(one perline,
#comments and blank lines ignored) instead of hardcoding them. With noactive entries it exits non-zero telling the user to edit the file, rather than
silently emitting an empty map.
registry/repos.generated.yamlships asvalid-but-empty YAML so a fresh clone parses before its first sync, and the CI
registry-shape check passes on it.
Deliberate omissions
[[automations]]. The only scheduled candidate is the registry sync,which commits and pushes to
main— so a human runs it and reads the diff.Noted in a comment in the manifest.
apply-protection.sh. It encoded one account's branch-protection andplan constraints; that is noise in a template.
registry/context/<repo>.mdfiles. Only the_TEMPLATE.mds — real ones would leak the source repo's history.Verification
shellcheck scripts/*.sh— clean.empty registry.
sed-renderedextension.toml.inparses as TOML withrepo_pathsubstituted.
sync-registry.shexercised end-to-end: refuses the placeholder-onlyowners.txtwith a non-zero exit, and with a real owner produced ashape-valid 23-repo registry (reverted before commit).
private repo names, no machine paths.
SKILL.mdkeeps the source's hard-won lessons (fast-forward the base branchbefore creating a worktree or you get correct work in a conflicting PR; remote
hosts need their own GitHub credentials;
session sendtypes and presses Enter,so long prompts go in a
BRIEF.md) with the machine-specific host names,cross-references, and dated PR anecdotes stripped.