chati-dev 4.5.5 → 4.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/bin/chati.js +35 -1
  2. package/framework/agents/plan/tasks.md +1 -1
  3. package/framework/config.yaml +8 -17
  4. package/framework/constitution.md +30 -20
  5. package/framework/context/governance.md +3 -1
  6. package/framework/context/root.md +1 -1
  7. package/framework/data/entity-registry.yaml +2 -2
  8. package/framework/domains/agents/orchestrator.yaml +1 -1
  9. package/framework/domains/constitution.yaml +1 -1
  10. package/framework/domains/global.yaml +2 -2
  11. package/framework/hooks/model-governance.js +9 -0
  12. package/framework/manifest.json +38 -38
  13. package/framework/manifest.sig +1 -1
  14. package/framework/orchestrator/chati.md +27 -3
  15. package/framework/schemas/session.schema.json +1 -1
  16. package/framework/tasks/brownfield-wu-architecture-map.md +1 -1
  17. package/framework/tasks/brownfield-wu-deep-discovery.md +1 -1
  18. package/framework/tasks/brownfield-wu-dependency-scan.md +1 -1
  19. package/framework/tasks/brownfield-wu-migration-plan.md +1 -1
  20. package/framework/tasks/brownfield-wu-report.md +1 -1
  21. package/framework/tasks/brownfield-wu-risk-assess.md +1 -1
  22. package/framework/tasks/greenfield-wu-report.md +1 -1
  23. package/node_modules/@chati/provider-registry/src/index.js +3 -2
  24. package/node_modules/@chati/tracking-clickup/src/index.js +22 -0
  25. package/package.json +1 -1
  26. package/src/config/gemini-hooks-generator.js +10 -4
  27. package/src/dashboard/layout.js +6 -4
  28. package/src/installer/core.js +16 -0
  29. package/src/installer/templates.js +21 -1
  30. package/src/installer-v2/clickup-preflight.js +32 -0
  31. package/src/installer-v2/model-catalog-envelope.json +15 -13
  32. package/src/installer-v2/model-catalog.json +5 -5
  33. package/src/installer-v2/model-catalog.sig +1 -1
  34. package/src/installer-v2/wizard-installation.js +1 -1
  35. package/src/intelligence/registry-manager.js +9 -3
  36. package/src/orchestrator/cli.js +36 -21
  37. package/src/orchestrator/clickup-projection.js +25 -8
  38. package/src/orchestrator/clickup-runtime.js +89 -1
  39. package/src/orchestrator/planning-runtime.js +1 -2
  40. package/src/orchestrator/rail-runtime.js +1 -2
  41. package/src/orchestrator/runtime-installation-v2.js +10 -1
  42. package/src/wizard/index.js +8 -0
  43. package/src/wizard/questions.js +7 -3
package/bin/chati.js CHANGED
@@ -28,7 +28,7 @@ const command = args[0] || 'init';
28
28
  const KNOWN_SUBCOMMANDS = new Set([
29
29
  // CLI subcommands
30
30
  'next', 'advance', 'init', 'status', 'validate-handoff', 'deviation', 'exit',
31
- 'install-v2', 'migrate-v2', 'rail-import', 'rail-next', 'rail-release-ready', 'rail-claim', 'rail-heartbeat', 'rail-recover', 'rail-complete', 'rail-review', 'rail-tracking-reconcile',
31
+ 'install-v2', 'migrate-v2', 'rail-import', 'rail-next', 'rail-release-ready', 'rail-claim', 'rail-heartbeat', 'rail-recover', 'rail-complete', 'rail-review', 'rail-tracking-reconcile', 'rail-tracking-pending', 'rail-tracking-ack',
32
32
  'providers', 'detect-flow', 'backlog', 'qa-plan-score', 'qa-impl-score', 'scan',
33
33
  'spawn-team', 'team-status', 'team-dissolve',
34
34
  'stats', 'list', 'search', 'clean', 'check', // memory/registry subcommands
@@ -274,6 +274,40 @@ async function main() {
274
274
  break;
275
275
  }
276
276
 
277
+ case 'rail-tracking-pending': {
278
+ try {
279
+ const { listPendingClickUpProjections } = await import('../src/orchestrator/clickup-runtime.js');
280
+ console.log(JSON.stringify(listPendingClickUpProjections({ projectDir: targetDir }), null, 2));
281
+ } catch (error) {
282
+ console.error(`Error: ${error.code || 'RAIL_TRACKING_PENDING_FAILED'}: ${error.message}`);
283
+ process.exitCode = 1;
284
+ }
285
+ break;
286
+ }
287
+
288
+ case 'rail-tracking-ack': {
289
+ const value = (flag) => { const index = args.indexOf(flag); return index === -1 ? null : args[index + 1]; };
290
+ if (!value('--handoff-id') || !value('--projection-id') || !value('--receipt')) {
291
+ console.error('Error: rail-tracking-ack requires --handoff-id <id>, --projection-id <id> and --receipt <receipt.json>');
292
+ process.exitCode = 1;
293
+ break;
294
+ }
295
+ try {
296
+ const receipt = JSON.parse(readFileSync(resolve(value('--receipt')), 'utf8'));
297
+ const { acknowledgeClickUpProjection } = await import('../src/orchestrator/clickup-runtime.js');
298
+ console.log(JSON.stringify(acknowledgeClickUpProjection({
299
+ projectDir: targetDir,
300
+ handoff_id: value('--handoff-id'),
301
+ projection_id: value('--projection-id'),
302
+ receipt,
303
+ }), null, 2));
304
+ } catch (error) {
305
+ console.error(`Error: ${error.code || 'RAIL_TRACKING_ACK_FAILED'}: ${error.message}`);
306
+ process.exitCode = 1;
307
+ }
308
+ break;
309
+ }
310
+
277
311
  case 'rail-review': {
278
312
  const value = (flag) => { const index = args.indexOf(flag); return index === -1 ? null : args[index + 1]; };
279
313
  if (!value('--review') || !value('--invocation')) {
@@ -245,7 +245,7 @@ Rules:
245
245
 
246
246
  - Preserve the same task IDs, dependencies and Given-When-Then criteria in the prose artifact and JSON task graph.
247
247
  - `clickup_ref` is mandatory for the internal profile. It is an opaque mapping, not permission to mutate ClickUp directly.
248
- - `execution_binding` is mandatory. Select only a provider, harness, model and reasoning configuration present in `.chati/v2/installation.json`; choose the best eligible binding for that task. Never name an unselected vendor or rely on the primary harness as an implicit fallback.
248
+ - `execution_binding` is mandatory. Select only a provider, harness, model and reasoning configuration present in `.chati/v2/installation.json`; choose the best eligible binding for that task. Never name an unselected vendor or rely on an implicit fallback.
249
249
  - If `requires_browser` is true, provide a complete task-specific `browser_policy`. A global MCP configuration is not sufficient.
250
250
  - Do not infer missing execution scope, estimates, dependencies, ClickUp refs or browser policy. Return to planning and make the information explicit.
251
251
 
@@ -1,32 +1,23 @@
1
1
  # chati.dev Configuration
2
- version: "4.5.5"
2
+ version: "4.5.6"
3
3
  installed_at: "2026-02-07T10:00:00Z"
4
4
  updated_at: "2026-08-27T00:00:00Z"
5
- installer_version: "4.5.5"
5
+ installer_version: "4.5.6"
6
6
  project_type: greenfield
7
7
  language: en
8
- ides: [claude-code]
8
+ ides: []
9
9
 
10
- # CLI providers multi-CLI is opt-in (Article XIX)
10
+ # Example provider pool. Interactive v2 installation replaces this with the
11
+ # providers selected by the user and resolves models invisibly per task.
11
12
  providers:
12
13
  claude:
13
14
  enabled: true
14
- primary: true
15
15
  gemini:
16
16
  enabled: false
17
- model_default: pro
18
17
  codex:
19
- enabled: false
20
- model_default: codex
21
-
22
- # Per-agent provider/model overrides (optional — inherits from AGENT_MODELS default)
23
- # agent_overrides:
24
- # dev:
25
- # provider: gemini
26
- # model: pro
27
- # brownfield-wu:
28
- # provider: gemini
29
- # model: pro
18
+ enabled: true
19
+ grok:
20
+ enabled: true
30
21
 
31
22
  # Feature flags — toggle new capabilities (v4.2 Phoenix + Intelligence Upgrade)
32
23
  features:
@@ -425,36 +425,46 @@ Once the orchestrator is activated via `/chati`, a session lock engages. All age
425
425
 
426
426
  ## Article XVI: Model Governance
427
427
 
428
- The orchestrator SHALL select the optimal AI model for each agent to balance quality and cost efficiency.
428
+ The orchestrator SHALL select the best eligible provider, model and reasoning
429
+ level for each task while balancing quality, cost and review independence.
429
430
 
430
- 1. Every agent definition MUST include a `Model` field in its Identity section specifying default model and upgrade conditions.
431
+ 1. Installation records only the enabled provider pool. It SHALL NOT ask for or
432
+ persist a framework-wide primary CLI.
431
433
 
432
- 2. Three model tiers are recognized:
433
- - **opus**: Deep reasoning, complex analysis, code generation. Use for agents that make critical decisions or produce complex artifacts.
434
- - **sonnet**: Structured tasks, guided workflows, template-based output. Use for agents with clear inputs and predictable output formats.
435
- - **haiku**: Simple detection, classification, status checks. Use for agents with minimal reasoning requirements.
434
+ 2. Model availability comes from a fresh, signed, time-bounded capability
435
+ catalog. The installer enables every catalog model belonging to the selected
436
+ providers without exposing a manual model questionnaire.
436
437
 
437
- 3. The orchestrator SHALL read the agent's `Model` field before activation and communicate the recommended model to the user.
438
+ 3. Routing is automatic and task-specific. Architecture, implementation,
439
+ review, high-volume work and adjudication MAY route to different models.
440
+ The user SHALL NOT be asked to switch models manually.
438
441
 
439
- 4. Agents marked `no downgrade` MUST NOT run on a model below their default. Quality degradation in these agents compromises downstream artifacts.
442
+ 4. Interactive work MAY be relayed through a separately spawned provider CLI.
443
+ The CLI that opened the session remains the orchestrator, not a permanent
444
+ execution provider.
440
445
 
441
- 5. Upgrade conditions (e.g., "upgrade: opus if enterprise") are evaluated by the orchestrator based on session context: project type, codebase size, number of integrations, and complexity signals from previous agents.
446
+ 5. Every invocation MUST resolve to an enabled provider, an allowed exact model
447
+ and an allowed reasoning configuration. Missing, unavailable or expired
448
+ bindings are controlled blocks. Silent substitution is forbidden.
442
449
 
443
- 6. In IDE environments (Claude Code, Cursor, VS Code), the orchestrator SHALL display a model recommendation message before activating each agent. The user decides whether to switch.
450
+ 6. Parallel work MUST resolve each task independently. A group-level model pin
451
+ SHALL NOT override the task-specific allocation of its members.
444
452
 
445
- 7. In programmatic environments (Agent SDK, API), the model selection SHALL be automatic no user intervention required.
453
+ 7. Base work uses the lowest reasoning level appropriate for the task. After
454
+ two normal rework cycles, adjudication routes to an enabled frontier model
455
+ at its highest allowed reasoning configuration before human escalation.
446
456
 
447
- 8. Model selections are logged in session.yaml under `model_selections[]` for cost tracking and optimization.
457
+ 8. Execution and review SHOULD use independent model or harness contexts when
458
+ risk warrants it. The executor cannot self-approve risk-sensitive work.
448
459
 
449
- 9. The initial multi-CLI bindings are **claude**, **codex**, and **grok**. An installation explicitly records its enabled providers, models, primary harness and time-bounded capability snapshot in `.chati/v2/installation.json`.
460
+ 9. Model selections are logged under `model_selections[]` with provider, exact
461
+ model, reasoning level, task identity and catalog snapshot reference.
450
462
 
451
- 10. The primary harness is selected during installation. No vendor has a framework-wide primary status.
463
+ 10. Provider-specific mechanics may differ, but the invocation, evidence,
464
+ review and receipt contracts remain provider-neutral.
452
465
 
453
- 11. Every invocation MUST resolve to an enabled provider and one of its explicitly allowed models. A missing, unavailable or expired binding is a controlled block. The system MUST NOT silently substitute another provider, model or primary harness.
454
-
455
- 12. Provider-specific capabilities may change the adapter mechanics, but not the execution contract. Where hooks are unavailable, the equivalent policy is carried through the signed invocation context and verified receipts.
456
-
457
- **Enforcement: GUIDE** — Model recommendations are advisory in IDE mode; automatic in SDK mode.
466
+ **Enforcement: BLOCK**: an invocation outside the installed allowlist or without
467
+ an exact task binding cannot execute.
458
468
 
459
469
  ---
460
470
 
@@ -536,7 +546,7 @@ When multiple CLI providers are enabled, the system SHALL coordinate agent execu
536
546
  6. The orchestrator SHALL select the optimal binding only from the installation allow-list, based on:
537
547
  a. Task routing constraints and required capabilities
538
548
  b. The selected model catalog snapshot
539
- c. The primary harness only when it is itself an allowed binding
549
+ c. Task-specific quality, cost and review-independence requirements
540
550
  d. Availability evidence, otherwise a controlled block
541
551
 
542
552
  7. Cost tracking SHALL include provider information. Each model selection entry in session.yaml includes: provider, model, agent, timestamp, and estimated token usage.
@@ -54,7 +54,9 @@ Extracted from `chati.dev/constitution.md` (25 Articles). Read the full constitu
54
54
 
55
55
  ## Multi-CLI Governance (Article XIX)
56
56
  - Initial providers: Claude, Codex, Grok
57
- - Provider, exact models and primary harness are selected at installation and recorded in `.chati/v2/installation.json`
57
+ - Enabled providers are selected at installation. Exact models and reasoning
58
+ levels are routed automatically per task from the signed capability snapshot
59
+ recorded in `.chati/v2/installation.json`. No primary harness is installed.
58
60
  - Resolution is restricted to the installation allow-list. An unavailable binding blocks the task, it never falls back silently.
59
61
  - Adapter-specific context files are generated only for the selected harnesses.
60
62
 
@@ -1,7 +1,7 @@
1
1
  # Chati.dev System Context
2
2
 
3
3
  ## Framework
4
- - **Version**: 4.5.5
4
+ - **Version**: 4.5.6
5
5
  - **Agents**: Specialized discovery and planning agents feeding provider-neutral RAIL execution and a sealed release lane
6
6
  - **Constitution**: 25 Articles + Preamble
7
7
  - **Quality**: 5 pipeline gates + 3-tier verdicts + Fault Vector Protocol (Article XXII)
@@ -3,8 +3,8 @@
3
3
  # and by the Health Check for system integrity validation.
4
4
 
5
5
  metadata:
6
- version: "4.4.1"
7
- last_updated: "2026-05-18T00:00:00Z"
6
+ version: "4.5.6"
7
+ last_updated: "2026-08-27T00:00:00Z"
8
8
  entity_count: 109
9
9
  checksum_algorithm: sha256
10
10
 
@@ -49,7 +49,7 @@ rules:
49
49
  priority: high
50
50
 
51
51
  # Provider Routing (v3.0.0)
52
- - provider-routing: "Select optimal provider for each agent based on: agent preference, project overrides, provider availability, fallback to primary."
52
+ - provider-routing: "Select an eligible provider, exact model and reasoning level per task from the installed allowlist. Never fall back to an unselected binding."
53
53
  priority: high
54
54
  - provider-health: "Validate provider availability via health check before spawning agent terminals."
55
55
  priority: high
@@ -101,7 +101,7 @@ articles:
101
101
  priority: high
102
102
  - provider-agnostic-handoff: "Handoff format is provider-agnostic. All agents produce handoffs in the same two-layer format."
103
103
  priority: critical
104
- - provider-fallback: "If a configured provider is unavailable, fall back to primary provider (claude) with warning."
104
+ - provider-fallback: "If a selected provider or exact model is unavailable, block that invocation with evidence. Never substitute an unselected binding."
105
105
  priority: high
106
106
  - provider-hooks: "Hook-based governance applies only to providers with hook support. Others use prompt injection."
107
107
  priority: high
@@ -35,11 +35,11 @@ rules:
35
35
 
36
36
  # Multi-CLI Rules (v3.0.0)
37
37
  multi-cli:
38
- - primary-provider: "Claude is the default and primary provider. Multi-CLI is opt-in."
38
+ - symmetric-provider-pool: "Every provider selected at installation is eligible for task-specific routing. No provider is primary."
39
39
  priority: high
40
40
  - provider-validation: "Health check validates provider availability before spawning."
41
41
  priority: high
42
- - provider-model-map: "Each provider has its own model map. Agent assignments reference tier (opus/sonnet/haiku) which maps to provider-specific models."
42
+ - provider-model-map: "The signed capability snapshot assigns exact provider models and reasoning levels by task role."
43
43
  priority: normal
44
44
 
45
45
  modes:
@@ -82,6 +82,15 @@ async function main() {
82
82
  try {
83
83
  const event = JSON.parse(input);
84
84
  const projectDir = event.cwd || process.cwd();
85
+
86
+ // V2 selects an exact provider, model and reasoning level per task from
87
+ // the signed installation catalog. It never exposes a model advisory or
88
+ // asks the user to switch models manually.
89
+ if (existsSync(join(projectDir, '.chati', 'v2', 'installation.json'))) {
90
+ process.stdout.write('{}');
91
+ return;
92
+ }
93
+
85
94
  const agent = getCurrentAgent(projectDir);
86
95
 
87
96
  // Advisory context injection via the canonical UserPromptSubmit schema.
@@ -1,5 +1,5 @@
1
1
  {
2
- "createdAt": "2026-08-27T08:47:47.618Z",
2
+ "createdAt": "2026-08-27T09:30:26.218Z",
3
3
  "files": {
4
4
  "agents/build/dev.md": {
5
5
  "hash": "5c8da2eee3357bbe84a6c468c76fe60a0c77357575503c3797aa94128282c565",
@@ -52,8 +52,8 @@
52
52
  "type": "md"
53
53
  },
54
54
  "agents/plan/tasks.md": {
55
- "hash": "e43665228fd7ae5a239e2d4b4298a54c5f06f465a89c9b8e939cf6e6b2ac8089",
56
- "size": 28251,
55
+ "hash": "16c8c649a2172ca741b69fb5d2495f913afae981d57af97cc0503eba05af915b",
56
+ "size": 28228,
57
57
  "type": "md"
58
58
  },
59
59
  "agents/plan/ux-brand-architect.md": {
@@ -97,18 +97,18 @@
97
97
  "type": "md"
98
98
  },
99
99
  "config.yaml": {
100
- "hash": "46c9b387f94306f10f2d997d4434ee2dbf1d61f33ea5dc8dd3fec4222d4600a5",
101
- "size": 2841,
100
+ "hash": "77e84e99a6e31a664e9da640df949ef4d816359979ac0be093eb7e2c726298bc",
101
+ "size": 2669,
102
102
  "type": "yaml"
103
103
  },
104
104
  "constitution.md": {
105
- "hash": "444fa267ed5f998c428611c61204e390b694ed744913834d06faed9fce543e55",
106
- "size": 67858,
105
+ "hash": "8de0cc0151d38099ff91a3de763bd5766cffde0253acfe6f3179d992d2887079",
106
+ "size": 67409,
107
107
  "type": "md"
108
108
  },
109
109
  "context/governance.md": {
110
- "hash": "80b2243a84b3ec0e9066ee51251685605252e4bd47fa94c2ce25f00af688cd79",
111
- "size": 6086,
110
+ "hash": "bc39df23d48c2cbb005c8e062dfda53442a91f94ccc33f068e26f98d06fe412b",
111
+ "size": 6200,
112
112
  "type": "md"
113
113
  },
114
114
  "context/protocols.md": {
@@ -122,12 +122,12 @@
122
122
  "type": "md"
123
123
  },
124
124
  "context/root.md": {
125
- "hash": "833b0c98763b9d6b6418c33ca2b8333a67bb1ef177c71a9e58cc1c7b0ac2059c",
125
+ "hash": "57e0b456f520705cef15b47a4aa7bb9d159d26222a8e04c094064a0bce323c16",
126
126
  "size": 1217,
127
127
  "type": "md"
128
128
  },
129
129
  "data/entity-registry.yaml": {
130
- "hash": "48726ba4b1e84a114e783865ab0b9881bd869924d8b5ac0c6fd75f95f30219cc",
130
+ "hash": "8852405c96cccf20672111d9367d0ebf87225e79eb966e56353d957ac6d7f037",
131
131
  "size": 34605,
132
132
  "type": "yaml"
133
133
  },
@@ -177,8 +177,8 @@
177
177
  "type": "yaml"
178
178
  },
179
179
  "domains/agents/orchestrator.yaml": {
180
- "hash": "6fdb938ef08f81ba60d189e09c5de06275ac53ecf2510d844369ac72a811972c",
181
- "size": 1836,
180
+ "hash": "4c515e592ed43499c2f77aa324569e2f145eb6e6005ef5a6a9b35a39d7bdcfa8",
181
+ "size": 1848,
182
182
  "type": "yaml"
183
183
  },
184
184
  "domains/agents/phases.yaml": {
@@ -212,13 +212,13 @@
212
212
  "type": "yaml"
213
213
  },
214
214
  "domains/constitution.yaml": {
215
- "hash": "e606a668f1ac03dbde194dbea2af676d64668e024f14b7d3b38063a715a10af3",
216
- "size": 7000,
215
+ "hash": "497b41ae7c45402ac43081c2081639fa2ac86619bd83d86452343fe6d68f39ed",
216
+ "size": 7037,
217
217
  "type": "yaml"
218
218
  },
219
219
  "domains/global.yaml": {
220
- "hash": "1be2bdf691e3e00650c9a468fab163581e1b71ebcd2e0d4083131600058628a6",
221
- "size": 3002,
220
+ "hash": "b51d337cbcd9c722961aa137925a70816a06eb5b1305246c9aba110e5a32e8e9",
221
+ "size": 3013,
222
222
  "type": "yaml"
223
223
  },
224
224
  "domains/workflows/brownfield-discovery.yaml": {
@@ -317,8 +317,8 @@
317
317
  "type": "js"
318
318
  },
319
319
  "hooks/model-governance.js": {
320
- "hash": "d7f273d0330a1d24ccd5c73208993110c188548254e6f7c24e30a6f5fb8de79f",
321
- "size": 5514,
320
+ "hash": "93db3ea86ca82b6b00c330583be32130a6b8e7d2182dcc222ef71db1f92ce050",
321
+ "size": 5849,
322
322
  "type": "js"
323
323
  },
324
324
  "hooks/package.json": {
@@ -472,8 +472,8 @@
472
472
  "type": "md"
473
473
  },
474
474
  "orchestrator/chati.md": {
475
- "hash": "c2d895fd342422985b68d4912189f2abcfb2bac536c5cf325d0480faf9db5f9f",
476
- "size": 44348,
475
+ "hash": "6ce86145704af5e933b7372ccd331e70679066522c324031f4e8701b7f950cc5",
476
+ "size": 45331,
477
477
  "type": "md"
478
478
  },
479
479
  "patterns/elicitation-library.yaml": {
@@ -852,8 +852,8 @@
852
852
  "type": "json"
853
853
  },
854
854
  "schemas/session.schema.json": {
855
- "hash": "00cdca67431066d7c5a1796b6a7f4c42076925e2fa19c53e2813f54bd30ff206",
856
- "size": 18002,
855
+ "hash": "f2ab86653c6e52a008268256198b9319de1602515aafd504bbbbe69df696c1de",
856
+ "size": 18014,
857
857
  "type": "json"
858
858
  },
859
859
  "schemas/task.schema.json": {
@@ -932,33 +932,33 @@
932
932
  "type": "md"
933
933
  },
934
934
  "tasks/brownfield-wu-architecture-map.md": {
935
- "hash": "2629992b3c0cabeee6d737829cd0019063919d37f1557cd230d6eb4086fc045c",
936
- "size": 15223,
935
+ "hash": "82aa0a7913217efec678c020a80510f7c808fdbde7838a67990582dd3a2976d4",
936
+ "size": 15213,
937
937
  "type": "md"
938
938
  },
939
939
  "tasks/brownfield-wu-deep-discovery.md": {
940
- "hash": "00c79ae4e14fad5f523003211432aec8dcafa5d898edca5c4f5757a0b3cadb01",
941
- "size": 9457,
940
+ "hash": "97e84d96328c8c80dc6935793a7693ade49ed115e26d289ec065e0e91c018cd1",
941
+ "size": 9447,
942
942
  "type": "md"
943
943
  },
944
944
  "tasks/brownfield-wu-dependency-scan.md": {
945
- "hash": "695440e1cb653ca8fbd5d7303defd73bdf9b4367e35040aae88a50a58c35ebb5",
946
- "size": 11363,
945
+ "hash": "e61ae20e0824d38938621d6d2b6d226bcc634860332ac1baf61aafba8b6f8e7f",
946
+ "size": 11353,
947
947
  "type": "md"
948
948
  },
949
949
  "tasks/brownfield-wu-migration-plan.md": {
950
- "hash": "2553b460f9e8e5a88029cea1ae62613b0f5d553b8bdf54b79f3e2804d291b994",
951
- "size": 16870,
950
+ "hash": "bd638271c6332f0c0ab772b9f054462fbdfafd83e4d1c23a1408c7a19ed5e7cc",
951
+ "size": 16860,
952
952
  "type": "md"
953
953
  },
954
954
  "tasks/brownfield-wu-report.md": {
955
- "hash": "c23bb38808a7c7f5a4a6964145c82effca8abd386243628c48b7dbd57aac62e6",
956
- "size": 10749,
955
+ "hash": "3af5e12047cfc34e091444a874b3c086e70b129a2dbc8f216c9e00ebf7d9107a",
956
+ "size": 10739,
957
957
  "type": "md"
958
958
  },
959
959
  "tasks/brownfield-wu-risk-assess.md": {
960
- "hash": "b891b2ca0710e926d31fcb066d17caf1d75602318f205d54b7d754caedf59449",
961
- "size": 14125,
960
+ "hash": "ff1b71c068a2a1ab662bb12554c24dc422ef34f704c41eafc85b8e705569b330",
961
+ "size": 14115,
962
962
  "type": "md"
963
963
  },
964
964
  "tasks/detail-acceptance-criteria.md": {
@@ -1057,8 +1057,8 @@
1057
1057
  "type": "md"
1058
1058
  },
1059
1059
  "tasks/greenfield-wu-report.md": {
1060
- "hash": "c0668589f6fd185ce31ced7bad67c78dfae43a481a6a0980c7cf305f635d900b",
1061
- "size": 9429,
1060
+ "hash": "b291438e22a7336684042a164c70386d181571e428d1a7d029404ac5cf1afa40",
1061
+ "size": 9419,
1062
1062
  "type": "md"
1063
1063
  },
1064
1064
  "tasks/greenfield-wu-scaffold-detection.md": {
@@ -1347,5 +1347,5 @@
1347
1347
  "type": "yaml"
1348
1348
  }
1349
1349
  },
1350
- "version": "4.5.5"
1350
+ "version": "4.5.6"
1351
1351
  }
@@ -1 +1 @@
1
- XENxdEvoK5ATS/SOccXjzQKNM31wPtbN4KdEjNsp8aZvUGdCU2OKZPDJUh1vFC+i4ZvElD0DSFR17EPrYkmPAw==
1
+ vWBsUGE3V8dJWM3K5vpCFcUAeqdRor+u3DyDsIzUKtXE8le4HVw8hRvfMa9P4PDyoZvrY/smYteiHKZcdXeGDA==
@@ -97,6 +97,7 @@ Parse the JSON output. The `action` field tells you what to do:
97
97
  |--------|-------|
98
98
  | `setup` | Action: Setup |
99
99
  | `activate_interactive` | Action: Interactive Agent |
100
+ | `spawn_routed_interactive` | Action: Routed Interactive Agent |
100
101
  | `spawn_autonomous` | Action: Autonomous Agent |
101
102
  | `spawn_parallel` | Action: Parallel Spawn |
102
103
  | `spawn_team` | Action: Spawn Team (Article XXI) |
@@ -165,7 +166,7 @@ The user should experience a smooth start: they describe their project, the orch
165
166
 
166
167
  These agents (greenfield-wu, brownfield-wu, brief) run in the same conversation.
167
168
 
168
- 1. Track model recommendation from JSON `model_info` internally. Do NOT display "Model recommendation for {agent}" or expose internal agent names. If the recommended model is materially different from the current one and the difference will affect quality, mention it briefly in plain language: e.g., "This step works best on Opus - switch with /model opus if you want stronger reasoning." Otherwise stay silent.
169
+ 1. Treat `model_info` as internal routing evidence. Do not display it or ask the user to switch models. V2 conversational work uses Routed Interactive Agent instead.
169
170
  2. Read the **FULL** agent file from `agent_file` in the JSON response (do NOT use limit/offset - read the entire file)
170
171
  3. Load its full content and **become** that agent
171
172
  4. Follow the agent's instructions - the user interacts with you directly
@@ -180,6 +181,26 @@ These agents (greenfield-wu, brownfield-wu, brief) run in the same conversation.
180
181
 
181
182
  ---
182
183
 
184
+ ## Action: Routed Interactive Agent
185
+
186
+ V2 keeps the conversation in the CLI that the user opened, while the task
187
+ itself runs on the exact provider, model and reasoning level selected by the
188
+ internal router.
189
+
190
+ 1. Do not expose `model_info`, model names or routing recommendations.
191
+ 2. Execute the exact `spawn_command` returned by the router.
192
+ 3. Parse the JSON result:
193
+ - `complete`: present Completion Options. On approval, advance the agent.
194
+ - `needs_input`: ask only `needs_input_question` in the user's language,
195
+ relay the response through `--additional-context`, then rerun the same
196
+ exact provider and model binding. Limit this relay to three cycles.
197
+ - `error`: use the Recovery Protocol. Never silently change provider or
198
+ model in a v2 installation.
199
+ 4. The opened CLI remains the conversation orchestrator. The routed process
200
+ does not become a framework-wide primary CLI.
201
+
202
+ ---
203
+
183
204
  ## Completion Options (Protocol 3 - Guided Options)
184
205
 
185
206
  After EVERY agent completes (interactive or autonomous), present exactly 3 numbered options. The user should never have to figure out "what now" - always offer clear next steps with a recommendation.
@@ -301,8 +322,11 @@ Planning phase agents (detail, architect, ux) run simultaneously.
301
322
  **NOTE (Article XXI):** When `features.agent_teams: true` in config.yaml, the orchestrator MUST attempt `spawn_team` FIRST for Planning Team (detail, architect, ux, qa-planning) and Build Team (dev, qa-implementation). Only fall back to `spawn_parallel` if team spawning is unavailable or fails. The CLI `orchestrate next` command handles this automatically - when teams are enabled, it returns `spawn_team` instead of `spawn_parallel`.
302
323
 
303
324
  1. Display naturally what is happening using user-facing language. Examples (pick one that fits the phase): "Working on the planning phase now." / "Reviewing the architecture and UX in parallel." NEVER say "spawning parallel group", "spawn_parallel", or list internal agent names like "detail, architect, ux".
304
- 2. Execute `parallel_spawn_command` via Bash tool
305
- 3. Parse consolidated JSON output
325
+ 2. If `parallel_spawn_commands` is non-empty, execute every member's `command`
326
+ concurrently and keep each output associated with its `agent`. Each command
327
+ has its own exact provider and model binding. Otherwise, execute the legacy
328
+ `parallel_spawn_command`.
329
+ 3. Consolidate and parse the member outputs without replacing their bindings
306
330
  4. Present **Completion Options** (Parallel Group variant) - wait for user choice
307
331
  5. On approval, for each completed agent, run `node chati.dev/orchestrator/chati-router.js advance --agent {name} --score {score}`
308
332
  6. If partial or total failure (spawning unavailable):
@@ -93,7 +93,7 @@
93
93
  "ides": {
94
94
  "type": "array",
95
95
  "items": {
96
- "enum": ["claude-code", "vscode", "antigravity", "cursor", "gemini-cli", "codex-cli"]
96
+ "enum": ["claude-code", "vscode", "antigravity", "cursor", "gemini-cli", "codex-cli", "grok-cli"]
97
97
  },
98
98
  "description": "Configured IDEs"
99
99
  },
@@ -182,7 +182,7 @@ Create ASCII/text representation of architecture:
182
182
  ```yaml
183
183
  # architecture-map.yaml
184
184
  timestamp: 2026-02-13T11:30:00Z
185
- project_path: /Users/user/projects/legacy-app
185
+ project_path: /workspace/legacy-app
186
186
 
187
187
  primary_architecture: layered_architecture
188
188
  secondary_patterns: [mvc, repository_pattern, event_driven]
@@ -186,7 +186,7 @@ If git repository exists:
186
186
  ## Output Format
187
187
  ```yaml
188
188
  # discovery.yaml
189
- project_path: /Users/user/projects/legacy-app
189
+ project_path: /workspace/legacy-app
190
190
  timestamp: 2026-02-13T11:00:00Z
191
191
  filesystem:
192
192
  total_files: 2847
@@ -164,7 +164,7 @@ For each recommendation:
164
164
  ```yaml
165
165
  # dependencies.yaml
166
166
  timestamp: 2026-02-13T11:15:00Z
167
- project_path: /Users/user/projects/legacy-app
167
+ project_path: /workspace/legacy-app
168
168
  runtime: node
169
169
 
170
170
  manifests:
@@ -188,7 +188,7 @@ For each phase, document:
188
188
  ```yaml
189
189
  # migration-plan.yaml
190
190
  timestamp: 2026-02-13T12:00:00Z
191
- project_path: /Users/user/projects/legacy-app
191
+ project_path: /workspace/legacy-app
192
192
 
193
193
  migration_strategy: incremental_strangler_fig
194
194
  strategy_justification: |
@@ -113,7 +113,7 @@ Combine all sections into comprehensive YAML with clear structure and actionable
113
113
  # wu-report.yaml
114
114
  report_type: brownfield
115
115
  timestamp: 2026-02-13T12:15:00Z
116
- project_path: /Users/user/projects/legacy-app
116
+ project_path: /workspace/legacy-app
117
117
 
118
118
  executive_summary: |
119
119
  Analyzed mature 1793-day-old Next.js + Express application with 30k LOC and 87 dependencies.
@@ -185,7 +185,7 @@ For each high and critical risk:
185
185
  ```yaml
186
186
  # risk-assessment.yaml
187
187
  timestamp: 2026-02-13T11:45:00Z
188
- project_path: /Users/user/projects/legacy-app
188
+ project_path: /workspace/legacy-app
189
189
 
190
190
  executive_summary: |
191
191
  Identified 47 risks across security, performance, technical debt, and maintainability.
@@ -128,7 +128,7 @@ executive_summary: |
128
128
  Estimated 30 minutes to initial scaffold, 2-4 hours to complete tooling setup.
129
129
 
130
130
  environment:
131
- project_path: /Users/user/projects/my-app
131
+ project_path: /workspace/my-app
132
132
  current_state: empty
133
133
  maturity_score: 0
134
134
  runtime:
@@ -113,8 +113,9 @@ export function validateInstallation(installation, snapshot, { bindingMap = DEFA
113
113
  } else if (installation.primary_harness !== undefined) {
114
114
  throw new ContractError('PRIMARY_BINDING_MISSING', 'legacy primary_harness requires primary_binding');
115
115
  }
116
- if (installation.profile === 'focus-ai-internal' && installation.external_integrations?.clickup !== 'required') {
117
- throw new ContractError('PROFILE_DEPENDENCY_MISSING', 'focus-ai-internal requires ClickUp');
116
+ if (installation.profile === 'authorized-internal'
117
+ && installation.external_integrations?.clickup !== 'required') {
118
+ throw new ContractError('PROFILE_DEPENDENCY_MISSING', 'the internal profile requires ClickUp');
118
119
  }
119
120
  return Object.freeze(canonicalize(installation));
120
121
  }