Skip to content

feat(orchestration): dual-runtime OrchestrationPort foundation (ag-nk67 #orchestration-foundation)#598

Merged
boshu2 merged 9 commits into
mainfrom
feat/orchestration-foundation
May 29, 2026
Merged

feat(orchestration): dual-runtime OrchestrationPort foundation (ag-nk67 #orchestration-foundation)#598
boshu2 merged 9 commits into
mainfrom
feat/orchestration-foundation

Conversation

@boshu2
Copy link
Copy Markdown
Owner

@boshu2 boshu2 commented May 29, 2026

What

The dual-runtime OrchestrationPort foundation — the seam that gates the
[EPIC] AgentOps × Claude Managed Agents integration (dual-runtime) application epics.
Implements the 3-category model (Claude Workflow / NTM swarm / plain skill) behind a
single OrchestrationPort with safe degradation NTM → Claude-native → beads floor
and a global AGENTOPS_ORCHESTRATION=off opt-out.

Derived from a live 3-legged spike (~/dev/agentops-3cat-spike/): safe degradation is
solvable at the selection layer; parallel buys quality/independence not wall-clock at
small N; NTM is a multi-vendor control plane that runs Claude/Codex as panes.

What's in it (10 slices, agent-team driven)

  • Port + adapterscli/internal/ports/orchestration.go (idiomatic to existing ports pattern) + new cli/internal/orchestration/ pkg: Selector, ntm_probe (capability detection via ntm --robot-capabilities, not command -v), beads_floor + OrchestrationResult parity type, degradation-conformance test.
  • Live CLIao orchestrate select (--pin/--opt-out/--json); COMMANDS.md regenerated.
  • Contractsschemas/orchestration-{backend,result}.v1 + paired docs/contracts/ docs (structural-floor gated: 41 contracts).
  • Prose — swarm/shared/crank rewritten NTM>native>beads; gc demoted (soc-2rtm0); rpi_phased_stream.go doc-comment fixed.
  • Skillsautomation-shape-routing (the 3-category router) + workflow-builder + meta-skill authoring chain wired (context_rel); skill counts synced.
  • lib/orchestrate-select.sh selector seam.

Verification (local)

go build ./... clean · go vet clean · 56 Go tests pass (orchestration 31, ports 10, cmd/ao orchestrate 15) · structural-floor PASS (41) · lib/orchestrate-select.sh --self-test 6/6 · live command: --json→claude (NTM absent), --opt-out→beads, --pin claude→claude.

Notes

  • Bundles the foundation + the routing/authoring skills as one coherent dual-runtime arc.
  • NTM/Claude executors are stubs (the parity contract is real); concrete executors land in the application epics this gates.
  • Two-ladders distinction preserved (spawn-backend ladder A vs CLI phase-executor ladder B) — see docs/contracts/orchestration-ports.md.

Closes-scenario: ag-nk67#orchestration-foundation
Bounded-context: BC5-Runtime
Evidence: cli/internal/orchestration/conformance_test.go

Implements the 3-category model (Claude Workflow / NTM swarm / plain skill)
behind a single OrchestrationPort with safe degradation NTM -> Claude-native
-> beads floor and a global AGENTOPS_ORCHESTRATION=off opt-out.

- cli/internal/ports/orchestration.go: port + in-memory adapter (+ tests)
- cli/internal/orchestration/: Selector, ntm_probe (capability detection via
  ntm --robot-capabilities), beads_floor + OrchestrationResult parity type,
  degradation-conformance test (41 tests total)
- cli/cmd/ao/orchestrate.go: live 'ao orchestrate select' command (--pin/--opt-out/--json)
- schemas/orchestration-{backend,result}.v1 + paired docs/contracts (structural-floor gated)
- swarm/shared/crank prose rewritten NTM>native>beads; gc demoted (soc-2rtm0)
- automation-shape-routing + workflow-builder skills; meta-skill authoring chain wired
- lib/orchestrate-select.sh selector seam

Plan: .agents/plans/2026-05-29-dual-runtime-orchestration-foundation.md
Spike: ~/dev/agentops-3cat-spike/FINDINGS.md
Gates this commit must satisfy in CI: build, vet, structural-floor, skill-count sync.
boshu2 added 3 commits May 29, 2026 12:22
Resolves PR #598 CI failures from adding automation-shape-routing + workflow-builder:
- trim 3 skill descriptions to <=180 chars (skill-builder hint moved to body)
- resolve 2 trigger collisions (shape-routing front-door triggers made distinct)
- add skills-codex/ twins for both + regen hashes (codex-parity, override-coverage)
- catalog both in using-agentops (skills-integrity)
- agentops-skill-domain-map + domain-evolution-bdd 76->78 + 2 rows (registry-drift)
- classify 'orchestration' write-surface in agents-write-surfaces.md (correctness)

ag-nk67 #orchestration-foundation
…ills

Round-2 CI fixes on PR #598 (ag-nk67):
- skill-dispositions.yaml: add automation-shape-routing + workflow-builder rows; regen skill-domain-map golden
- codex twins reframed runtime-native (Codex spawn_agents/output_schema; drop .claude/workflows Claude-tool markers) -> validate-codex-runtime-sections 0 violations
- regen-codex-hashes; PRODUCT.md Codex artifact count 76->78 (doc-release gate)

ag-nk67 #orchestration-foundation
@boshu2 boshu2 enabled auto-merge (squash) May 29, 2026 16:52
boshu2 added 5 commits May 29, 2026 13:03
- make sync-hooks: embedded cli/embedded/skills/using-agentops in sync
- generate-registry.sh: SKU capability catalog (registry.json) regenerated for 78 skills
- generate-skill-catalog.sh: skill catalog refreshed

ag-nk67 #orchestration-foundation
…ry (ag-nk67)

- SelectionTrace json tags (chosen/reason/considered) so 'ao orchestrate select --json'
  emits snake_case -> satisfies cli-json-flag-machine-contracts canary
- regenerate docs/cli-surface.{md,json} to include the new orchestrate command

ag-nk67 #orchestration-foundation
…ag-nk67)

ao orchestrate (+1 top) + select (+1 sub) -> top=70 sub=175 all=245.
Update cli-command-surface-matrix.json expectation + smoke fixture thresholds.

ag-nk67 #orchestration-foundation
@boshu2 boshu2 merged commit e4e32a3 into main May 29, 2026
14 checks passed
@boshu2 boshu2 deleted the feat/orchestration-foundation branch May 29, 2026 18:42
boshu2 added a commit that referenced this pull request May 29, 2026
…face (ag-jima #regen-all-finalizer) (#602)

## What
A one-command finalizer for the ~8 derived registries/goldens a
skill/command addition makes stale.

- `scripts/regen-all.sh` — regenerates every derived artifact in
dependency order (skill counts → domain-map → SKU registry.json →
context-map → embedded skills → COMMANDS.md → cli-surface → codex
hashes).
- `scripts/regen-all.sh --check` — runs the matching drift validators
(no writes) as a pre-push gate.
- `make regen-all` / `make regen-check` targets.

## Why
PR #598 (`ag-nk67`) took **9 CI rounds** to merge — zero feature-code
failures; every red was a stale derived artifact discovered one CI round
at a time (each gate stops at first error, jobs are independent). This
composes the existing generators into one local pass so it's caught
before the first push. Codex twins stay manual (cannot be
auto-authored).

## Verification
`shellcheck --severity=error` clean; `make regen-check` → **all 9 gates
green** on current main.

Closes-scenario: ag-jima#regen-all-finalizer
Bounded-context: BC4-Factory
Evidence: scripts/regen-all.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant