feat(loop): go-micro runs on micro loop (dogfood its own tool)#3657
Merged
Conversation
Replace go-micro's five hand-written loop workflows with ones generated by
`micro loop init --roles all`, making "go-micro builds itself with micro loop"
literally true rather than aspirational.
- Generate loop-planner/builder/triage/coherence/release.yml via the CLI with
go-micro's cadence and wiring (planner :59, builder :29, coherence 07:00,
release 23:00; CI gate "Harness (E2E)"; token CODEX_TRIGGER_TOKEN; base master;
tag prefix v). The old loop-architect.yml and loop-devrel.yml become
loop-planner.yml and loop-coherence.yml.
- Move the queue to .github/loop/PRIORITIES.md and add .github/loop/NORTH_STAR.md
(a concise steer pointing to internal/docs/THESIS.md), adopting the loop's
convention.
- Preserve go-micro's rich instructions as editable policy in
.github/loop/prompts/{planner,builder,triage,coherence}.md — the architect
founder-lens + adoption steer, the increment builder, harness-failure triage,
and the DevRel changelog/blog pass — faithfully ported from the old inline
prompts. Behavior is preserved; only the mechanism is now generated.
- CLI refinement the migration surfaced: prompts (and NORTH_STAR/PRIORITIES) are
now write-once — `micro loop init --force` refreshes workflow MECHANICS but
never clobbers customized POLICY. Added renderKeep + a test.
- Update internal/docs/CONTINUOUS_IMPROVEMENT.md (renamed workflows, moved queue,
the prompt-file model, and a note that these files are generated by micro loop).
Verified: build, go test ./cmd/micro/loop/..., golangci-lint (0 issues), gofmt;
`micro loop verify` passes; all generated workflows are valid YAML; re-running
init --force is idempotent and preserves policy.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
Verification of the migration surfaced that a dispatch workflow posted the prompt file's leading <!-- editorial --> header to the agent, and __ISSUE__ inside it got substituted too (e.g. "Keep 4242 literal"). Harmless (invisible in rendered markdown) but unclean and mildly confusing. The dispatch and triage body construction now strips <!-- --> blocks with `sed '/<!--/,/-->/d'` before substituting runtime tokens. Regenerated go-micro's workflows; added a test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL
This was referenced Jul 2, 2026
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.
PR 2 of 2. Makes "go-micro builds itself with
micro loop" literally true by replacing its five hand-written loop workflows with ones generated bymicro loop init --roles all.Opening this WITHOUT auto-merge — it rewires the live, load-bearing autonomous loop, so it's yours to review and merge when comfortable. It's fully revertable (the old workflows are one
git revertaway).What changed
loop-planner/builder/triage/coherence/release.ymlcome from the CLI, with go-micro's exact wiring: planner:59, builder:29, coherence07:00, release23:00; CI gateHarness (E2E); tokenCODEX_TRIGGER_TOKEN; basemaster; tag prefixv. (loop-architect.yml→loop-planner.yml,loop-devrel.yml→loop-coherence.yml; builder/triage/release keep their names.).github/loop/PRIORITIES.md; added.github/loop/NORTH_STAR.md(a concise steer pointing tointernal/docs/THESIS.md)..github/loop/prompts/{planner,builder,triage,coherence}.md— the architect founder-lens + adoption steer, the increment builder, harness-failure triage, and the DevRel changelog/blog pass — faithfully ported from the old inline prompts. Behavior is preserved; only the mechanism is generated.micro loop init --forcerefreshes workflow mechanics but never clobbers customized policy. AddedrenderKeep+ a test proving--forcekeeps a customized prompt and North Star while regenerating the workflow.internal/docs/CONTINUOUS_IMPROVEMENT.md(renamed workflows, moved queue, the prompt-file model, and a note that these files are generated bymicro loop).Review notes / behavior equivalence
gh-based PR + auto-merge, and the harness-failure trigger all match the originals.actions/checkout(to read its prompt file) andsed-substitutes__ISSUE__/__RUNURL__at runtime.ghauth uses the PAT viaGH_TOKEN, unaffected by checkout's credentials.loop-release.ymlcarries thepersist-credentials: falsefix, so the 403 we hit can't recur.Testing
go build ./...,go test ./cmd/micro/loop/...,golangci-lint(0 issues),gofmt— clean.micro loop verifypasses on the repo; all five generated workflows are valid YAML;micro loop init --roles all --forceis idempotent and preserves policy.Once merged, the safe way to update loop mechanics is
micro loop init --roles all --force(regenerates YAML, keeps prompts/North Star/queue). To change what a role does, edit its prompt.🤖 Generated with Claude Code
Generated by Claude Code