Skip to content

feat(loop): go-micro runs on micro loop (dogfood its own tool)#3657

Merged
asim merged 2 commits into
masterfrom
claude/loving-meitner-3Etoi
Jul 2, 2026
Merged

feat(loop): go-micro runs on micro loop (dogfood its own tool)#3657
asim merged 2 commits into
masterfrom
claude/loving-meitner-3Etoi

Conversation

@asim

@asim asim commented Jul 2, 2026

Copy link
Copy Markdown
Member

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 by micro 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 revert away).

What changed

  • Workflows are now generated. loop-planner/builder/triage/coherence/release.yml come from the CLI, with go-micro's exact wiring: planner :59, builder :29, coherence 07:00, release 23:00; CI gate Harness (E2E); token CODEX_TRIGGER_TOKEN; base master; tag prefix v. (loop-architect.ymlloop-planner.yml, loop-devrel.ymlloop-coherence.yml; builder/triage/release keep their names.)
  • Convention adopted. Queue moved to .github/loop/PRIORITIES.md; added .github/loop/NORTH_STAR.md (a concise steer pointing to internal/docs/THESIS.md).
  • Rich prompts preserved as policy. go-micro's real instructions live 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 generated.
  • CLI refinement the migration surfaced: prompts (and NORTH_STAR/PRIORITIES) are now write-oncemicro loop init --force refreshes workflow mechanics but never clobbers customized policy. Added renderKeep + a test proving --force keeps a customized prompt and North Star while regenerating the workflow.
  • Updated internal/docs/CONTINUOUS_IMPROVEMENT.md (renamed workflows, moved queue, the prompt-file model, and a note that these files are generated by micro loop).

Review notes / behavior equivalence

  • Cadence, token gating, fresh-issue-per-run, gh-based PR + auto-merge, and the harness-failure trigger all match the originals.
  • New: each dispatch workflow now does actions/checkout (to read its prompt file) and sed-substitutes __ISSUE__/__RUNURL__ at runtime. gh auth uses the PAT via GH_TOKEN, unaffected by checkout's credentials.
  • loop-release.yml carries the persist-credentials: false fix, so the 403 we hit can't recur.

Testing

  • go build ./..., go test ./cmd/micro/loop/..., golangci-lint (0 issues), gofmt — clean.
  • micro loop verify passes on the repo; all five generated workflows are valid YAML; micro loop init --roles all --force is 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

claude added 2 commits July 2, 2026 09:56
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
@asim asim merged commit 76961d5 into master Jul 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants