Skip to content

feat: qctl implementer-backend seam (Part A, contract-first) - #15

Merged
rasatpetabit merged 12 commits into
mainfrom
qctl-implementer-backend
Jun 2, 2026
Merged

feat: qctl implementer-backend seam (Part A, contract-first)#15
rasatpetabit merged 12 commits into
mainfrom
qctl-implementer-backend

Conversation

@rasatpetabit

Copy link
Copy Markdown
Owner

Summary

Wires a pluggable implementer backend into the masterplan plugin so execute
waves and github-coordination followers can eventually offload task
implementation to the petabit-sysadmin Qwen Work Fabric (pi/qctl worker
on the skynet1 GPU fleet) instead of always dispatching masterplan:mp-implementer.

This is Part A only — the masterplan-side seam — built contract-first.
The live binding is deferred until the fabric ships qctl (its task 11) and
gate.py (its task 12). Part B (the qctl results-contract) is doc-only and
captured in the design spec.

Hard invariant — held and verified: with the feature flag off (the default),
masterplan ships byte-for-byte identical to today. The flag is a strict
config.implementer.qctl.enabled === true; buildSeedState never emits an
implementer block, so existing bundles are unchanged and the absent block reads
as default-off.

What changed

  • lib/routing.mjsresolveImplementerBackend(task, config, env) + the
    kind-discriminated descriptor union ({kind:'agent'} default / {kind:'qctl', …}
    only when the flag is on). Sibling to routeTask (untouched).
  • lib/wave.mjsprepareWave/leanPayload stamp the per-task backend
    descriptor onto the wave payload.
  • bin/masterplan.mjsprepare-wave threads state.implementer ?? {} into
    the routing config.
  • workflows/execute.workflow.jsimplement(t) gains a single top-of-function
    guard: qctlNotYetBound blocked digest (not a throw — a throw would null
    the pipeline item → silent vanish → re-dispatch loop); everything else → today's
    dispatch path, byte-identical.
  • commands/masterplan.md §7 follow — resolves the lead-stamped descriptor
    instead of hard-coding mp-implementer; NotYetBound → mp:blocked (never re-adds
    mp:open, which would re-queue the unserviceable task into a claim/release loop).
  • docs/config-schema.md — documents implementer.qctl.enabled (default false).
  • docs/superpowers/{specs,plans}/ — the approved design + 7-task TDD plan.
  • test/ — resolver coverage, byte-identical-default, flag-off-never-qctl, and
    NotYetBound-guard tests.

Also rides along: 04f8a54 (out-of-band Codex-review de-bloat — suppress the
gstack review skill dump + harden agents/mp-codex-reviewer.md).

Test Plan

  • node --test test/510 pass / 0 fail
  • Codex defect pass — 2 P2s found, both fixed (6caaa16), 0 blocking
  • Flag-off byte-identical invariant audited (4 code files additions-only;
    buildSeedState emits no implementer)
  • Live binding (deferred): swap the NotYetBound guard + flip the flag once the
    Qwen Work Fabric ships qctl + gate.py

🤖 Generated with Claude Code

rasatpetabit and others added 12 commits June 1, 2026 22:47
Approved brainstorming design for wiring the petabit-sysadmin Qwen Work
Fabric's pi/qctl worker as a pluggable implementer backend. Kind-discriminated
descriptor seam ({kind:'agent'} default byte-identical / {kind:'qctl'} flagged
off), the qctl results-contract (portable patch vs base; masterplan D6
verify-scope authoritative), live binding deferred until the fabric ships
qctl (task 11) + gate.py (task 12). Also lands the predecessor fit/gap analysis.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…/model

Reconcile §A1-A3/A6/B1 to the minimal descriptor shape: the agent kind
carries only the discriminant (the existing execute.workflow.js
implAgentType/implModel seam already holds agentType/model), and the qctl
NotYetBound path returns a status:'blocked' digest rather than throwing
(a throw nulls the pipeline item → silent re-dispatch loop). repo/base
move to binding-time stamping; resolver emits only task-intrinsic fields.
Makes the flag-off==today invariant visually auditable (one guard block).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
7-task TDD plan for the masterplan-side seam from the approved design spec
(12f6d11): resolveImplementerBackend resolver, prepareWave backend attach,
state.implementer config thread, execute NotYetBound guard, follow-prose
resolve, config-schema flag, full-suite + byte-identical audit + Codex pass.
Hard invariant: flag off => byte-for-byte identical to today.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ctl behind flag)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codex auto-elected the third-party gstack `review` skill on any diff-review
prompt and cat'd its 1628-line SKILL.md into the trace (~3240-line output,
verdict buried). gstack/review is model-elected (not hook-injected) and Codex
has no skills-off flag. mp-codex-reviewer already digests the dump away, so the
visible bloat came from direct cross-repo `codex exec` / `/codex:review` passes.

- agents/mp-codex-reviewer.md: instruct Codex not to activate/read/echo any
  skill in its review invocation -- belt-and-suspenders, and stops Codex
  wasting wall-time reading the skill body even though this agent returns a
  digest.
- (global, not in repo) gstack `review` skill disabled in ~/.codex/skills via
  SKILL.md rename; reversible restore script recorded there.

Verified: fresh codex rollout catalog has 0 review-skill entries (71 other
gstack skills intact); suite 503/0; doctor exit 0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… {})

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…entical)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…mplementer

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ocked not mp:open

Addresses two Codex P2 findings on the qctl-enabled follower path (docs-only;
flag-off shipping path untouched):
- A github-coordination follower builds from the issue + mp-coord contract ref
  and does NOT carry lead state.yml, so resolving the backend from
  follower-local state.implementer always yields {} -> {kind:'agent'} and
  silently bypasses the lead's flag. Resolution is now lead-side at publish
  time, carried in the issue/contract; threading deferred to binding time.
- NotYetBound previously re-added mp:open, re-queuing the unserviceable task
  into a claim/comment/release loop. Now removes the assignee + mp:claimed and
  adds mp:blocked, leaving it out of the claimable queue.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t, flag-off byte-identical

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rasatpetabit
rasatpetabit merged commit 4fd2356 into main Jun 2, 2026
2 checks passed
@rasatpetabit
rasatpetabit deleted the qctl-implementer-backend branch June 2, 2026 14:50
rasatpetabit added a commit that referenced this pull request Jun 3, 2026
Orphan plan+spec under docs/superpowers/ brought under the v8 schema:
- seeded bundle, copied spec.md + plan.md, built plan.index.json (7 tasks, 5 waves)
- all 7 tasks marked done (Part A implemented + merged in #15)
- verification recorded at HEAD; suite 118/118 green on the qctl test surface
- status archived (completed orphan record)

Stops masterplan-detect re-suggesting /masterplan import each session.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
rasatpetabit added a commit that referenced this pull request Jun 3, 2026
The qctl-implementer-backend Part A plan+spec were imported into an
archived v8 bundle in 1973442 (merged in #15), but the source files
were left in docs/superpowers/{plans,specs}/. They are byte-identical
to the bundle copies, so relocate them to archived-{plans,specs}/ to
complete the import lifecycle and empty the active working dirs. Trail
recorded via a source_archived event on the (still-archived) bundle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant