feat: clarify config ownership boundaries and enable subagent dispatch by default (#188)#189
Open
skr19930617 wants to merge 1 commit into
Conversation
…h by default (#188) Establish `.specflow/config.yaml` as the canonical home for specflow shared workflow policy (committed) and `.specflow/config.env` for local runtime / operator preferences (gitignored). Specflow settings SHALL NOT live in `openspec/config.yaml` — that file is reserved for OpenSpec's own configuration. - Add `readSpecflowSharedConfig()` loader: reads canonical `.specflow/config.yaml`, probes the legacy `openspec/config.yaml` location for misplaced specflow keys and emits a one-time per-process deprecation warning naming the canonical destination. Legacy values are ignored — there is no silent backward-compatible read path. - Flip `DEFAULT_DISPATCH_CONFIG.enabled` from `false` to `true` ("enabled by default, explicit opt-out"). Dispatcher eligibility guards (`task-graph.json` present, `size_score > threshold`) are unchanged. Operators who require pre-feature behavior set `apply.subagent_dispatch.enabled: false` in `.specflow/config.yaml`. - Add `verifyLocalSubagentRuntime()` plus `LocalSubagentRuntimeError`: default-engaged dispatch verifies the operator's local subagent runtime (CLI executability via `access(X_OK)`, valid agent identifiers in `.specflow/config.env`) BEFORE any subagent spawn, worktree creation, or `advance()` call. On failure, the apply stops with an actionable error citing both fix paths (resolve local runtime, or set `apply.subagent_dispatch.enabled: false`). - Add borderline shared→local override path with `max_concurrency` as the first concrete instance: yaml is the shared default, env var `SPECFLOW_APPLY_SUBAGENT_DISPATCH_MAX_CONCURRENCY` is the per-operator override. An invalid env override falls back to yaml, not the global default. - New `.specflow/config.yaml` starter template, registered in `templateFileAliases` and `templateContracts`. Both `specflow-init` (fresh) and `specflow-init --update` install the file. README and slash-command guides updated. - Spec deltas: NEW `config-ownership-boundaries`; MODIFIED `bundle-subagent-execution`, `review-orchestration`, `review-autofix-progress-observability`, `slash-command-guides`. `bundle-subagent-execution`'s opt-in requirement rewrites and a new fail-fast requirement covers the runtime-prereq scenario. - Tests: added `specflow-config.test.ts`, `dispatch-runtime-check.test.ts`, and an orchestration-level test asserting that `runDispatchedWindow()` throws `LocalSubagentRuntimeError` BEFORE any mutation when the local runtime is invalid. Updated existing tests pinning the old default to use the new canonical file path. Full test suite (1015 tests) green. Issue: #188
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
.specflow/config.yaml(committed) as the canonical home for specflow shared workflow policy and.specflow/config.env(gitignored) for local runtime / operator preferences. Specflow settings stop living inopenspec/config.yaml; legacy entries are detected and ignored with a one-time per-process deprecation warning naming the canonical destination.DEFAULT_DISPATCH_CONFIG.enabledfromfalsetotrue("enabled by default, explicit opt-out"). Eligibility guards (task-graph.jsonpresent,size_score > threshold) are unchanged. Operators setapply.subagent_dispatch.enabled: falsein.specflow/config.yamlto opt out.verifyLocalSubagentRuntime()plusLocalSubagentRuntimeError: default-engaged dispatch verifies the local subagent runtime (CLI executability viaaccess(X_OK), valid agent identifiers in.specflow/config.env) BEFORE any worktree creation,advance()call, or subagent spawn — fails fast with an actionable error citing both fix paths.apply.subagent_dispatch.max_concurrencyas the first concrete instance: env varSPECFLOW_APPLY_SUBAGENT_DISPATCH_MAX_CONCURRENCYoverrides the yaml default per-operator. An invalid env override falls back to yaml, not the global default..specflow/config.yamlstarter template, registered intemplateFileAliases/templateContracts. Bothspecflow-init(fresh) andspecflow-init --updateinstall the file. README and slash-command guides updated. New spec capabilityconfig-ownership-boundaries; modifiedbundle-subagent-execution,review-orchestration,review-autofix-progress-observability,slash-command-guides.Issue
Closes #188
Test plan
npm run typecheckpassesnpm run buildpassesnpm run lint— 0 errors (warnings only, all pre-existing patterns)npm run validate:contractspasses.specflow/config.yaml, dispatch engages by default when atask-graph.jsonis present with at least onesize_score > thresholdbundleapply.subagent_dispatch.*still inopenspec/config.yaml, the loader emits the deprecation warning naming.specflow/config.yamlas the canonical destination and the legacy value is ignoredPATHReviewer notes
The impl review ledger from this run shows
has_open_high(1 high + 4 medium findings) — all five findings were addressed in code in the same round but a second review pass was skipped because the diff exceededdiff_warn_threshold. The full test suite is green after the fixes; seeopenspec/changes/archive/2026-04-28-clarify-config-ownership-boundaries-and-enable-subagent-dispatch-by-default/approval-summary.mdfor the per-finding fix mapping.