From 32bc53bb68d235abc9739aed9b5ff6b7c82fa458 Mon Sep 17 00:00:00 2001 From: hermes-bot Date: Wed, 5 Aug 2026 10:43:35 -0300 Subject: [PATCH] dev-orchestrator: decouple spec scaffold from fill, delegate exploration to OpenSpec native /opsx commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - cmd_spec now only scaffolds (OpenSpec change + worktree + deps), no auto-fill - Added cmd_fill as fallback for headless spec filling - Output guides user to /opsx:explore and /opsx:continue inside OpenCode - cmd_build (dev→QA loop) unchanged — core value proposition --- tooling/dev-orchestrator | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/tooling/dev-orchestrator b/tooling/dev-orchestrator index 86d1088..d53b45c 100755 --- a/tooling/dev-orchestrator +++ b/tooling/dev-orchestrator @@ -71,8 +71,27 @@ cmd_spec() { (cd "$wt" && [ -d .venv ] || python3 -m venv .venv && . .venv/bin/activate && pip install -e . -q 2>&1 | tail -1) || true fi - # ── orchestrator fills the spec ── - echo "── Orchestrator filling spec ──" + echo "" + _ok "Spec '$name' scaffolded at openspec/changes/$name/" + echo " Worktree: $wt" + echo "" + echo " ── Next: explore in OpenCode ──" + echo " opencode" + echo " Then use OpenSpec native commands:" + echo " /opsx:explore — discuss the feature, refine requirements" + echo " /opsx:continue — fill spec artifacts one by one" + echo "" + echo " After specs are filled → dev-orchestrator build $name" +} + +cmd_fill() { + local name="$1" + _guard + + local wt="$(_wt_path "$name")" + [ -d "openspec/changes/$name" ] || _die "spec not found: openspec/changes/$name. Run: dev-orchestrator spec $name" + + echo "── AI filling spec from conversation context ──" opencode run \ "You are filling an OpenSpec change for feature: $name. @@ -91,8 +110,7 @@ cmd_spec() { --workdir "$REPO" echo "" - _ok "Spec '$name' ready at openspec/changes/$name/" - echo " Worktree: $wt" + _ok "Spec '$name' filled at openspec/changes/$name/" echo " Review the spec, then: dev-orchestrator build $name" } @@ -247,6 +265,10 @@ case "${1:-}" in [ $# -ge 2 ] || _die "usage: dev-orchestrator spec " cmd_spec "$2" ;; + fill) + [ $# -ge 2 ] || _die "usage: dev-orchestrator fill " + cmd_fill "$2" + ;; build) [ $# -ge 2 ] || _die "usage: dev-orchestrator build " cmd_build "$2" @@ -263,12 +285,13 @@ case "${1:-}" in echo "" echo "commands:" echo " init Set up repo (run once per project)" - echo " spec Create OpenSpec + worktree + fill spec" + echo " spec Scaffold OpenSpec + worktree (no fill)" + echo " fill AI fills spec after exploration" echo " build Dev→QA loop in isolated worktree" echo " status Kanban view of features in flight" echo " clean Remove worktree + branch" echo "" - echo "flow: init → spec → [review] → build → [loop until QA passes]" + echo "flow: init → spec → [explore in OpenCode] → fill → build → [QA loop]" echo "" echo "worktrees live at: ../.worktrees//" echo "branches named: dev-flow/"