feat: composer workflow restructure and factory hardening#126
Open
FrkAk wants to merge 43 commits into
Open
Conversation
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.
Summary
Task Reference: [MYMR-237]
Three stacked rounds of composer work, making it a PR-terminal software factory: a Mymir task goes research → plan → implement → CI gate → review → bounded fix loop → opened PR, with crash-safe recovery and a GitHub-feedback rework round-trip. HOTL owns merging; composer terminates at the opened PR.
Round 1 — workflow restructure (
63b7e91..4e3c51d):skills/composer/SKILL.mdrewritten as a lean workflow: sharedSTATUSvocabulary (DONE/DONE_WITH_CONCERNS/NEEDS_DECISION/BLOCKED), todo-anchored loop with digraph, continuous execution, structural stop conditions, red-flags table, CSO-fixed description./goalharness removed entirely.skills/composer/references/replace full mymir-spec force-loads in the four phase agents (researcher spec context ~4,950 → ~2,650 words; reviewer ~6,500 → ~900); extract headings carry canonical source prefixes so citations resolve.Round 2 — factory hardening (
9b5e173..97c9c15):[taskRef]bracket verification, environmentalghfailure handling, backlog transient retry + stranded-task report, stale-claim sweep, headless gate skip, provisional propagation on escalated verdicts, branch-collision check, foreign-commit re-evaluation, terminal-write status re-read.isolation: worktree, live-verified incl. signed-commit push from inside a subagent worktree); default-branch derivation replaces hardcodedmain; merge-forward policy before PR and each fix rotation; claim-ownership semantics with branch-evidence fallback.timeout 600 gh pr checks --watch, exit-code mapped) before dispatching review; pending/unresolved CI caps the verdict atrequest-changes..mymir/composer-<project>.md(event vocabulary, increment-before-dispatch rotation counter, grep-derived counters, recovery algorithm, archive rotation)./mymir:composer rework <taskRef|pr-url>— reviewer-led intake fetches unresolved GitHub review threads (GraphQL, outdated-anchor re-location), re-verifies against HEAD, feeds the existing fix loop with a fresh 2-rotation budget; implementer may post one summary comment, never resolves threads.depth='agent'fetch; estimate-based model selection with 7 opus-forcing guardrails (reviewer never downgraded); app fix:formatCriterianow renders acceptance-criterion ids (lib/context/format.ts), closing a bug where the researcher's documented by-id AC rewrite appended duplicates — TDD'd intests/context/format.test.ts, 5 golden snapshots regenerated.--pipelined): conservative variant, lookahead 1, 7-row brief-invalidation table, kill switch after two consecutive invalidations.scripts/check-plugins.tsgains two CI gates:@-include target resolution across every plugin (a dangling include silently strips an agent's rules at runtime) and canonical hash pins for the composer extracts (references/sources.json) — any edit to a pinned mymir reference fails CI until the extracts are reviewed and the pin refreshed viabun run sync:plugins.Round 3 — fresh-eyes review fixes (
74eb69b,cf3fcb9): 10 confirmed defects, each verified against server code or reproduced shell behavior before fixing:git checkout "$DEFAULT_BRANCH", which git refuses (exit 128) inside the worktree isolation its own frontmatter mandates; now fetches and branches fromorigin/$DEFAULT_BRANCHwithout checking out.in_progressentry (HOTL flip); dispatches now carry aRework.prefix.{id, checked}; the MCP schema requirestext); now{id, text, checked}.depth='review'fetch that defeats the reviewer's own two-phase isolation; dropped to the contract's 3-line dispatch shape.review.mdpre-flight conditioned onfiles, whichdepth='working'mechanically excludes; reworded to the missing-PR-handle check.--pipelinedparsed as single-task under the invocation rule; the prefetch brief had no run-log event and risked breaking the last-PICKrecovery invariant (newBRIEFevent, prefetch logs noPICK).artifacts.md§2 tag-vocab guidance correctedoverview→metawith extract + mirror sync and pin refresh.Committed regression suite (
skills/composer/tests/scenarios.md, now 20 scenarios with RED→GREEN provenance) — all pass against this branch. Platform mirrors (codex / cursor / antigravity) synced for the review skill, reviewer-rules extract, and mymir references.Type of change
Testing
bun test tests/context tests/api/task-context.test.ts(36 pass)bun run lint)bun run typecheck)bun run check:plugins(mirror sync, include resolution, extract pins) andbun run format:checkpassPlugin markdown verified by the committed 20-scenario pressure suite dispatched as fresh subagents (loopholes found during runs were countered and re-tested). Live worktree-isolation smoke test confirmed branch/commit/push from inside a plugin-agent worktree.
Notes for reviewer
/mymir:composer <task>run + rework round-trip) requires this branch installed as the plugin source and a fresh session; checklist in the repo-external plan doc.decompose-*agents still force-load full mymir specs; converting them to slim extracts is deliberate future work. The rework GraphQL intake reads the first 100 review threads (nohasNextPagepagination yet) — documented future work.assigneeIdswiring documented as the upgrade path).