feat(#2630): phase-estimation module, smart-zone config key, and cli verbs (#2661)

* feat(#2630): add phase-estimation module, smart-zone config key, and cli verbs

* fix(#2630): document smart_zone_tokens, refresh golden fixtures, fix null-proto property assertions

* fix(#2630): align smart_zone_tokens write/read validation and harden estimation tests

* chore(#2630): backfill changeset pr to 2661
This commit is contained in:
Tom Boucher
2026-07-26 01:42:47 -04:00
committed by GitHub
parent bf127b7d25
commit 46ba02acde
35 changed files with 1319 additions and 97 deletions

View File

@@ -268,6 +268,7 @@ const roadmap = require('./lib/roadmap.cjs');
const { detectAssumptionDelta } = require('./lib/assumption-delta.cjs');
const verify = require('./lib/verify.cjs');
const config = require('./lib/config.cjs');
const estimateCli = require('./lib/estimate-cli.cjs');
const template = require('./lib/template.cjs');
const milestone = require('./lib/milestone.cjs');
const commands = require('./lib/commands.cjs');
@@ -2182,6 +2183,10 @@ const HOST_COMMAND_ROUTERS = {
'config-set': routeConfigSet,
'config-set-model-profile': routeConfigSetModelProfile,
'config-get': routeConfigGet,
// Phase-effort estimation (#2630, ADR-2629). A PAIR of verbs, so leaves
// rather than a family — ADR-2346 promotes to a family only at >=3.
'estimate-check': ({ args, cwd, raw }) => estimateCli.cmdEstimateCheck(cwd, args.slice(1), raw),
'estimate-calibration': ({ args, cwd, raw }) => estimateCli.cmdEstimateCalibration(cwd, args.slice(1), raw),
'config-new-project': routeConfigNewProject,
'config-path': routeConfigPath,
'migrate-config': routeMigrateConfig,

View File

@@ -33,6 +33,7 @@
"_auto_chain_active": false,
"node_repair": true,
"node_repair_budget": 2,
"smart_zone_tokens": 100000,
"ui_phase": true,
"ui_safety_gate": true,
"text_mode": false,

View File

@@ -19,6 +19,7 @@
"workflow.auto_advance",
"workflow.node_repair",
"workflow.node_repair_budget",
"workflow.smart_zone_tokens",
"workflow.human_verify_mode",
"workflow.text_mode",
"workflow.research_before_questions",

View File

@@ -255,6 +255,7 @@ Set via `workflow.*` namespace in config.json (e.g., `"workflow": { "research":
| `workflow.auto_advance` | boolean | `false` | `true`, `false` | Auto-advance to next phase after completion |
| `workflow.node_repair` | boolean | `true` | `true`, `false` | Attempt automatic repair of failed plan nodes |
| `workflow.node_repair_budget` | number | `2` | Any positive integer | Max repair retries per failed node |
| `workflow.smart_zone_tokens` | number | `100000` | Any positive integer | Smart-zone token budget for phase-effort estimation (#2630, ADR-2629). A phase whose estimate exceeds this is flagged with a split recommendation — advisory only, never a block. A *policy default*, not a benchmark constant: degradation begins before the advertised context window is full, but the effective ceiling is model- and task-dependent, so the calibration loop corrects it per project. _Alias:_ `smart_zone_tokens` is the flat-key form used in `CONFIG_DEFAULTS`; `workflow.smart_zone_tokens` is the canonical namespaced form. |
| `workflow.ai_integration_phase` | boolean | `true` | `true`, `false` | Run /gsd:ai-integration-phase before planning AI system phases |
| `workflow.api_coverage_gate` | boolean | `true` | `true`, `false` | Require an explicit API-coverage decision (full-by-default, opt-out-not-opt-in) before a phase that integrates an external API/SDK/service can seal. At plan:pre prompts a COVERAGE.md matrix; at verify:pre a blocking gate fails the seal unless the matrix exists with every non-integrated capability an explicit, reasoned opt-out (#1562) |
| `workflow.ui_phase` | boolean | `true` | `true`, `false` | Generate UI-SPEC.md for frontend phases |