chati-dev 4.3.1 → 4.4.0

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 (147) hide show
  1. package/README.md +18 -13
  2. package/bin/chati.js +12 -4
  3. package/framework/agents/build/dev.md +5 -1
  4. package/framework/agents/discover/greenfield-wu.md +16 -1
  5. package/framework/agents/plan/tasks.md +31 -0
  6. package/framework/agents/plan/ux-brand-architect.md +21 -2
  7. package/framework/agents/plan/ux-component-engineer.md +10 -0
  8. package/framework/agents/quality/qa-implementation.md +1 -1
  9. package/framework/agents/quality/qa-planning.md +1 -1
  10. package/framework/agents/quality/qa-visual.md +24 -21
  11. package/framework/config.yaml +5 -4
  12. package/framework/constitution.md +58 -11
  13. package/framework/context/governance.md +12 -10
  14. package/framework/context/root.md +2 -2
  15. package/framework/data/entity-registry.yaml +12 -4
  16. package/framework/data/qa-rubrics.yaml +335 -0
  17. package/framework/domains/constitution.yaml +3 -3
  18. package/framework/executors/json-validate.js +80 -0
  19. package/framework/executors/npm-script.js +72 -0
  20. package/framework/executors/path-check.js +67 -0
  21. package/framework/executors/registry.yaml +36 -0
  22. package/framework/hooks/advance-trigger.js +47 -3
  23. package/framework/hooks/constitution-guard.js +9 -4
  24. package/framework/hooks/git-push-authority.js +113 -0
  25. package/framework/hooks/license-guard.js +59 -9
  26. package/framework/hooks/model-governance.js +40 -17
  27. package/framework/hooks/prism-engine.js +78 -11
  28. package/framework/hooks/session-digest.js +12 -3
  29. package/framework/hooks/settings.json +7 -3
  30. package/framework/hooks/style-guard.js +52 -3
  31. package/framework/hooks/team-quality-gate.js +43 -5
  32. package/framework/i18n/en.yaml +3 -3
  33. package/framework/i18n/es.yaml +3 -3
  34. package/framework/i18n/fr.yaml +3 -3
  35. package/framework/i18n/pt.yaml +3 -3
  36. package/framework/intelligence/confidence.yaml +85 -6
  37. package/framework/intelligence/context-engine.md +9 -5
  38. package/framework/intelligence/decision-engine.md +1 -1
  39. package/framework/orchestrator/chati-router.js +1 -1
  40. package/framework/orchestrator/chati-update.md +19 -3
  41. package/framework/orchestrator/chati.md +19 -1
  42. package/framework/quality-gates/planning-gate.md +2 -0
  43. package/framework/scaffold/motion-premium/scaffold.yaml +2 -1
  44. package/framework/scaffold/motion-premium-3d/components/webgl/WebGLContext.tsx.template +1 -1
  45. package/framework/scaffold/saas-dashboard/README.md +58 -0
  46. package/framework/scaffold/saas-dashboard/app/dashboard/page.tsx.template +546 -0
  47. package/framework/scaffold/saas-dashboard/app/globals.css.template +746 -0
  48. package/framework/scaffold/saas-dashboard/app/layout.tsx.template +192 -0
  49. package/framework/scaffold/saas-dashboard/app/shell.css.template +1070 -0
  50. package/framework/scaffold/saas-dashboard/components/data/Chart.tsx.template +725 -0
  51. package/framework/scaffold/saas-dashboard/components/data/DataTable.tsx.template +623 -0
  52. package/framework/scaffold/saas-dashboard/components/data/DataTable.types.ts.template +104 -0
  53. package/framework/scaffold/saas-dashboard/components/data/DataTablePagination.tsx.template +234 -0
  54. package/framework/scaffold/saas-dashboard/components/data/SkeletonBlock.tsx.template +111 -0
  55. package/framework/scaffold/saas-dashboard/components/data/StatCard.tsx.template +393 -0
  56. package/framework/scaffold/saas-dashboard/components/data/StatCardGrid.tsx.template +121 -0
  57. package/framework/scaffold/saas-dashboard/components/feedback/EmptyState.tsx.template +281 -0
  58. package/framework/scaffold/saas-dashboard/components/interaction/CommandPalette.tsx.template +767 -0
  59. package/framework/scaffold/saas-dashboard/components/interaction/Field.tsx.template +351 -0
  60. package/framework/scaffold/saas-dashboard/components/interaction/Form.tsx.template +424 -0
  61. package/framework/scaffold/saas-dashboard/components/primitives/Badge.tsx.template +193 -0
  62. package/framework/scaffold/saas-dashboard/components/primitives/Button.tsx.template +261 -0
  63. package/framework/scaffold/saas-dashboard/components/primitives/Card.tsx.template +287 -0
  64. package/framework/scaffold/saas-dashboard/components/primitives/Input.tsx.template +310 -0
  65. package/framework/scaffold/saas-dashboard/components/primitives/Spinner.tsx.template +135 -0
  66. package/framework/scaffold/saas-dashboard/components/primitives/index.ts.template +60 -0
  67. package/framework/scaffold/saas-dashboard/components/shell/AppShell.tsx.template +174 -0
  68. package/framework/scaffold/saas-dashboard/components/shell/Breadcrumb.tsx.template +186 -0
  69. package/framework/scaffold/saas-dashboard/components/shell/Container.tsx.template +86 -0
  70. package/framework/scaffold/saas-dashboard/components/shell/NavItem.tsx.template +147 -0
  71. package/framework/scaffold/saas-dashboard/components/shell/Sidebar.tsx.template +378 -0
  72. package/framework/scaffold/saas-dashboard/components/shell/SidebarContext.tsx.template +169 -0
  73. package/framework/scaffold/saas-dashboard/components/shell/ThemeToggle.tsx.template +128 -0
  74. package/framework/scaffold/saas-dashboard/components/shell/Topbar.tsx.template +301 -0
  75. package/framework/scaffold/saas-dashboard/lib/brand.ts.template +324 -0
  76. package/framework/scaffold/saas-dashboard/scaffold.yaml +225 -0
  77. package/framework/schemas/session.schema.json +5 -0
  78. package/framework/schemas/task.schema.json +9 -0
  79. package/framework/scripts/visual-qa.js +87 -1
  80. package/framework/tasks/orchestrator-health.md +4 -4
  81. package/framework/tasks/qa-impl-verdict.md +11 -5
  82. package/framework/templates/qa-gate-tmpl.yaml +24 -11
  83. package/package.json +3 -3
  84. package/src/config/context-file-generator.js +0 -6
  85. package/src/dashboard/renderer.js +0 -36
  86. package/src/executors/runner.js +204 -0
  87. package/src/installer/core.js +2 -1
  88. package/src/installer/templates.js +5 -6
  89. package/src/intelligence/registry-manager.js +1 -1
  90. package/src/license/client.js +9 -3
  91. package/src/license/commands.js +12 -2
  92. package/src/license/machine-id.js +42 -1
  93. package/src/memory/gotchas.js +58 -40
  94. package/src/memory/magic-docs.js +1 -1
  95. package/src/memory/session-digest.js +9 -4
  96. package/src/orchestrator/cli.js +174 -14
  97. package/src/orchestrator/doctor.js +98 -16
  98. package/src/orchestrator/pipeline-manager.js +44 -22
  99. package/src/orchestrator/session-manager.js +56 -8
  100. package/src/telemetry/sender.js +7 -19
  101. package/src/terminal/run-team.js +3 -3
  102. package/src/upgrade/tracked-files-detector.js +34 -16
  103. package/src/utils/feature-flags.js +1 -1
  104. package/src/utils/flatten-entities.js +4 -40
  105. package/src/utils/schema-validator.js +0 -14
  106. package/src/wizard/i18n.js +3 -3
  107. package/src/api/index.js +0 -120
  108. package/src/autonomy/autonomous-gate.js +0 -294
  109. package/src/autonomy/build-loop.js +0 -281
  110. package/src/autonomy/build-state.js +0 -286
  111. package/src/autonomy/cause-analyzer.js +0 -177
  112. package/src/autonomy/escalation.js +0 -214
  113. package/src/autonomy/index.js +0 -51
  114. package/src/autonomy/mode-manager.js +0 -225
  115. package/src/autonomy/mode-suggester.js +0 -283
  116. package/src/autonomy/progress-reporter.js +0 -275
  117. package/src/autonomy/safety-net.js +0 -370
  118. package/src/config/agent-customizer.js +0 -231
  119. package/src/decision/analyzer.js +0 -291
  120. package/src/decision/engine.js +0 -250
  121. package/src/decision/index.js +0 -38
  122. package/src/decision/registry-healer.js +0 -468
  123. package/src/decision/registry-updater.js +0 -339
  124. package/src/extensions/loader.js +0 -145
  125. package/src/extensions/registry.js +0 -134
  126. package/src/gates/circuit-breaker.js +0 -151
  127. package/src/gates/g1-planning-complete.js +0 -154
  128. package/src/gates/g2-qa-planning.js +0 -156
  129. package/src/gates/g3-implementation.js +0 -215
  130. package/src/gates/g4-qa-implementation.js +0 -240
  131. package/src/gates/g5-deploy-ready.js +0 -181
  132. package/src/gates/gate-base.js +0 -185
  133. package/src/gates/index.js +0 -46
  134. package/src/health/auto-fix.js +0 -216
  135. package/src/health/engine.js +0 -246
  136. package/src/merger/semantic-merger.js +0 -292
  137. package/src/preview/detector.js +0 -238
  138. package/src/preview/index.js +0 -20
  139. package/src/preview/launcher.js +0 -235
  140. package/src/preview/log-buffer.js +0 -103
  141. package/src/quality/metrics-collector.js +0 -281
  142. package/src/quality/test-runner.js +0 -366
  143. package/src/tasks/executor.js +0 -195
  144. package/src/tasks/index.js +0 -4
  145. package/src/tasks/loader.js +0 -210
  146. package/src/tasks/router.js +0 -182
  147. package/src/utils/event-bus.js +0 -126
package/README.md CHANGED
@@ -128,8 +128,10 @@ The system saves your full session state (pipeline position, current agent, deci
128
128
  |---------|--------------|
129
129
  | **Specialized Agents** | Each agent has a defined mission, success criteria, and handoff protocol. Not one AI trying to do everything |
130
130
  | **Agent Teams** | Planning Team (Detail + Architect + UX + QA-Planning) and Build Team (Dev + QA-Implementation) with Wave-Based Pipeline. Teams work in parallel with peer-to-peer communication, cross-review, and intra-team quality assurance. No single agent bottleneck |
131
- | **Visual QA** | QA-Visual agent validates the visual experience: screenshots at 5 scroll positions, hover states, GSAP/Lenis verification, brandbook compliance. Powered by Playwright. |
132
- | **Premium Animations** | GSAP + ScrollTrigger + Lenis as mandatory stack for UI projects. Every page has scroll reveals, micro-interactions, and smooth scrolling. |
131
+ | **Visual QA** | QA-Visual scores the rendered UI against an 8-dimension rubric (layout, typography, motion, interaction, color, spacing, accessibility, performance) with an anti-slop catalog and a spring-motion veto (linear easing and `transition: all` are rejected). Screenshots at multiple scroll positions, hover states, and brandbook compliance, powered by Playwright. |
132
+ | **Premium Motion** | Premium motion is required for UI projects, with cubic-bezier easing and full reduced-motion support. The visual gate is animation-stack aware: the motion-premium presets use GSAP + Lenis, the saas-dashboard preset uses framer-motion. |
133
+ | **Scaffold Presets** | Premium starting points applied at build time: motion-premium and motion-premium-3d for animated showcase sites, saas-dashboard for a token-driven app shell (sidebar, sortable data table, KPI cards, a Cmd+K command palette). |
134
+ | **Execution Kinds** | A task declares how it executes. Deterministic dev tasks (lint, tests, file and schema checks) run as zero-LLM scripts through whitelisted executors instead of spending an agent turn. Feature-flagged, off by default, fully back-compatible. |
133
135
  | **Multi-CLI Architecture** | Choose your AI provider at install time: Claude, Gemini, or Codex. Each agent gets the optimal model for that provider |
134
136
  | **Quality Gates** | Every phase is validated before moving forward, including QA-Visual for visual quality. 3-tier verdicts: APPROVED, NEEDS_REVISION, or BLOCKED |
135
137
  | **Fault Vector Protocol** | Root Layer Routing classifies bugs by origin (INTENT/SPEC/CODE/DEFER). Evidence-Bound Verdicts, Decision Trail, and Echo Detection prevent cyclical rework |
@@ -137,7 +139,7 @@ The system saves your full session state (pipeline position, current agent, deci
137
139
  | **Session Lock** | Once activated, you stay inside the system. No accidentally "falling out" into generic AI mode |
138
140
  | **Multi-Terminal** | Autonomous agents run in parallel. Planning Team (Detail + Architect + UX + QA-Planning) and Build Team (Dev + QA-Implementation) coordinate via peer-to-peer mailbox |
139
141
  | **Memory System** | The system learns from mistakes. Gotchas are captured automatically and recalled when relevant |
140
- | **Execution Profiles** | Three profiles: explore (read-only), guided (default), autonomous (gate >= 95%). Includes safety net and circuit breaker |
142
+ | **Execution Mode** | Two modes: interactive (default) and autonomous (gate >= 95%). Safety reversion to interactive on stuck loop, quality drop, scope creep, error cascade, or user override (Article XVII) |
141
143
  | **IDE-Agnostic** | Works with Claude Code, VS Code, Cursor, Gemini CLI, Codex CLI, and AntiGravity |
142
144
  | **4 Languages** | Interface supports English, Portuguese, Spanish, and French. Artifacts are always generated in English |
143
145
  | **Supply Chain Security** | Every file is cryptographically signed (Ed25519). Tampered packages are blocked on install |
@@ -190,17 +192,16 @@ Prompts are piped via stdin for all providers. You can override individual agent
190
192
 
191
193
  ---
192
194
 
193
- ## Execution Profiles
195
+ ## Execution Mode
194
196
 
195
- Three profiles control how much autonomy agents have:
197
+ Two modes control how much autonomy agents have:
196
198
 
197
- | Profile | Behavior | When to use |
198
- |---------|----------|-------------|
199
- | **explore** | Read-only. Agents analyze but don't modify files | Understanding a new codebase |
200
- | **guided** | Default. Agents propose changes, you approve | Normal development workflow |
199
+ | Mode | Behavior | When to use |
200
+ |------|----------|-------------|
201
+ | **interactive** | Default. Agents propose changes, you approve | Normal development workflow |
201
202
  | **autonomous** | Agents execute without confirmation (quality gates >= 95%) | Trusted pipelines with high quality scores |
202
203
 
203
- The system starts in `guided` mode. Transition to `autonomous` requires both QA gates scoring >= 95%. A safety net with 5 triggers (stuck loop, quality drop, scope creep, error cascade, user override) automatically reverts to guided mode when needed.
204
+ The system starts in `interactive` mode. Transition to `autonomous` requires both QA gates scoring >= 95%. Safety reversion takes the pipeline back to interactive on a stuck loop, quality drop, scope creep, error cascade, or user override (Article XVII).
204
205
 
205
206
  ---
206
207
 
@@ -274,13 +275,13 @@ Three systems operate transparently behind the pipeline:
274
275
 
275
276
  | System | What it does |
276
277
  |--------|-------------|
277
- | **Context Engine (PRISM)** | Injects the right context at the right time. 6 layers of context (from constitution rules down to keyword-matched domain rules). Uses Progressive Reinforcement: as context degrades, injection budgets INCREASE (1.5% to 5.0% of provider context window). Provider-aware for Claude (200K), Gemini (1M), and Codex (128K). |
278
+ | **Context Engine (PRISM)** | Injects the right context at the right time. 6 layers of context (from constitution rules down to keyword-matched domain rules). Uses Progressive Reinforcement: as context degrades, injection budgets INCREASE (1.5% to 5.0% of provider context window). Provider-aware for Claude (1M), Gemini (1M), and Codex (128K). |
278
279
  | **Memory System (RECALL)** | Remembers decisions, gotchas, and lessons across sessions. Organized into 4 sectors: what happened (episodic), what we know (semantic), how we do things (procedural), and what we learned (reflective). |
279
280
  | **Decision Engine (COMPASS)** | Before creating something new, checks if a similar component already exists. Decides whether to reuse, adapt, or create from scratch. Keeps a registry of all project entities. |
280
281
 
281
282
  ### Constitution
282
283
 
283
- The system is governed by a **23-article Constitution** that enforces agent behavior, quality standards, security, and system integrity:
284
+ The system is governed by a **25-article Constitution** that enforces agent behavior, quality standards, security, and system integrity:
284
285
 
285
286
  - **Agent Governance** - Every agent has a defined mission, scope, and success criteria
286
287
  - **Quality Standards** - Minimum 95% score on quality gates. 3-tier verdicts (APPROVED / NEEDS_REVISION / BLOCKED)
@@ -288,10 +289,14 @@ The system is governed by a **23-article Constitution** that enforces agent beha
288
289
  - **Mode Governance** - Planning mode can't modify project code. Build mode has full access
289
290
  - **Session Lock** - Once activated, all messages route through the orchestrator
290
291
  - **Model Governance** - Each agent runs on its designated model, enforced by the CLI adapter
291
- - **Execution Profiles** - Explore, guided, and autonomous modes with safety net and circuit breaker
292
+ - **Execution Mode** - Interactive (default) and autonomous modes, with safety reversion to interactive (Article XVII)
292
293
  - **Multi-CLI** - Provider-agnostic architecture with adapter pattern and automatic model mapping
293
294
  - **Agent Teams** - Real-time peer communication between agents with cross-review, per-task QA, and sealed-bid quality assurance
294
295
  - **Fault Vector Protocol** - Root Layer Routing, Evidence-Bound Verdicts, Decision Trail, and Echo Detection for adversarial quality
296
+ - **Anti-Loop Protocol** - the 3-Strike Rule and mandatory diagnosis mode stop an agent from editing the same file in circles
297
+ - **Reasoning Tier** - per-task cognitive depth (standard / deep / deliberate) with deterministic escalation
298
+ - **Model-Harness Parity** - a re-audit advisory when the active model family changes, so calibration does not drift silently
299
+ - **Execution Kinds** - a task declares how it runs (agent, deterministic script, specialist, or human gate); deterministic dev work can run with no model call (feature-flagged, off by default)
295
300
 
296
301
  ---
297
302
 
package/bin/chati.js CHANGED
@@ -363,7 +363,7 @@ async function main() {
363
363
  console.log(' - Specialized agents across DISCOVER, PLAN, BUILD, DEPLOY phases');
364
364
  console.log(' - 6 workflow blueprints');
365
365
  console.log(' - 6 templates');
366
- console.log(' - Constitution (23 Articles + Preamble)');
366
+ console.log(' - Constitution (25 Articles + Preamble)');
367
367
  console.log(' - Dashboard TUI');
368
368
  console.log(' - Upgrade system with migrations');
369
369
  console.log(' - 6 IDE support');
@@ -439,7 +439,13 @@ Telemetry:
439
439
  const keyFlag = args.find(a => a.startsWith('--key='));
440
440
  const keyArg = keyFlag ? keyFlag.replace('--key=', '') : null;
441
441
  const { runActivate } = await import('../src/license/commands.js');
442
- await runActivate(targetDir, keyArg);
442
+ const result = await runActivate(targetDir, keyArg);
443
+ // runActivate returns { ok, cancelled?, error? } and never exits the
444
+ // process itself (keeps it unit-testable). Translate to an exit code
445
+ // here at the CLI boundary: failures other than user-cancel exit 1.
446
+ if (result && result.ok === false && !result.cancelled) {
447
+ process.exit(1);
448
+ }
443
449
  break;
444
450
  }
445
451
 
@@ -474,7 +480,7 @@ Telemetry:
474
480
 
475
481
  const scaffoldSrc = (() => {
476
482
  try { return resolveScaffoldSource(targetDir); }
477
- catch (e) { console.error(`Error: ${e.message}`); process.exit(1); }
483
+ catch (e) { console.error(`Error: ${e.message}`); process.exit(1); return undefined; }
478
484
  })();
479
485
 
480
486
  if (!sub || sub === 'list') {
@@ -545,8 +551,10 @@ Telemetry:
545
551
  const VALID_ORCHESTRATE_SUBS = new Set([
546
552
  'next', 'advance', 'init', 'status', 'validate-handoff',
547
553
  'deviation', 'exit', 'providers', 'detect-flow', 'backlog',
548
- 'qa-plan-score', 'qa-impl-score', 'scan',
554
+ 'qa-plan-score', 'qa-impl-score', 'qa-visual-score', 'scan',
549
555
  'spawn-team', 'team-status', 'team-dissolve',
556
+ 'wait-for-capture', 'wave-status', 'assess-coverage',
557
+ 'wait-for-license', 'doctor', 'run-script-task',
550
558
  ]);
551
559
  if (!VALID_ORCHESTRATE_SUBS.has(subCommand)) {
552
560
  console.error(`Error: Unknown orchestrate subcommand "${subCommand}".`);
@@ -806,6 +806,8 @@ Score = criteria met / total criteria
806
806
  Threshold: >= 95% per task (minimum 9/10)
807
807
  ```
808
808
 
809
+ This self-validation score is the Dev agent's own per-task done-check (it decides when a task is finished and ready to hand off). It is NOT the phase gate. The BUILD phase only advances when the separate QA-Implementation agent's verdict clears its threshold (enforced in the orchestrator pipeline manager). Never wire this self-score into a phase-transition decision; the separated QA verdict is always the gate.
810
+
809
811
  ---
810
812
 
811
813
  ## Intelligence Integration
@@ -822,7 +824,9 @@ Before implementing each task:
822
824
  After completing each task:
823
825
  1. If a new gotcha was discovered -> append to gotchas.yaml
824
826
  2. If a successful pattern was used -> append to patterns.yaml
825
- 3. Update confidence.yaml with execution results
827
+ 3. Update confidence.yaml with execution results. When you write measured
828
+ values, set that agent's `calibration_status: calibrated` and
829
+ `last_calibrated` to today; never leave a measured number as `seed`.
826
830
  ```
827
831
 
828
832
  ---
@@ -308,13 +308,28 @@ post-qa-planning gate fires when both align.
308
308
 
309
309
  ### motion-premium triggers (2D premium)
310
310
  Record `motion-premium` as a candidate when ALL of the following are true:
311
- - The stack includes **Next.js** (any version) OR **React** (any version).
311
+ - The stack includes **Next.js** (any version). These presets ship Next.js templates, so a plain React or React+Vite stack is not a match.
312
312
  - The stack includes **Tailwind CSS** (any version — v3 or v4).
313
313
  - The stack includes at least one premium animation library: **GSAP**,
314
314
  **Lenis**, or **Framer Motion**. A user-described intent that clearly
315
315
  implies these (e.g. "smooth scroll pinning", "scroll-reveal storytelling",
316
316
  "page-scroll narrative") also counts — document the phrase as evidence.
317
317
 
318
+ ### saas-dashboard triggers (app-shell / data-dense)
319
+ Record `saas-dashboard` as a candidate when ALL of the following are true:
320
+ - The stack includes **Next.js** (any version). These presets ship Next.js templates, so a plain React or React+Vite stack is not a match.
321
+ - The stack includes **Tailwind CSS** (any version).
322
+ - The project is an **application or internal tool**, not a marketing or
323
+ showcase site. Any of these signals counts (document the phrase as evidence):
324
+ dashboard, admin panel, SaaS app, internal tool, analytics, data table,
325
+ KPI or metrics view, sidebar navigation, app shell, settings pages, command
326
+ palette (Cmd+K), CRUD over records, back office.
327
+
328
+ saas-dashboard is the app-shell counterpart to the motion-premium presets. In
329
+ practice it is mutually exclusive with them (an animated marketing site is not
330
+ a data dashboard), but recording both is harmless: the auto-gate fires the
331
+ highest-confidence candidate first and the user chooses.
332
+
318
333
  ### motion-premium-3d triggers (R3F + Three.js, workstream 3)
319
334
  Record `motion-premium-3d` as a candidate when ALL of the following are true:
320
335
  - The stack includes **Next.js** (any version).
@@ -85,12 +85,43 @@ Task Definition:
85
85
  - Priority: critical | high | medium | low
86
86
  - Size: XS (<1h) | S (1-2h) | M (2-4h) | L (4-8h) | XL (8h+ -> split!)
87
87
  - Dependencies: [T{x}.{y}, ...]
88
+ - Execution Kind: agent (default) | script | specialist | human (see Step 2c)
88
89
  - Acceptance Criteria (Given-When-Then):
89
90
  - Given {initial context/state}
90
91
  - When {action is performed}
91
92
  - Then {expected outcome, verifiable}
92
93
  ```
93
94
 
95
+ ### Step 2c: Execution Kind (deterministic tasks run as scripts)
96
+
97
+ Most tasks are `agent`: an LLM implements them. Some, though, are fully
98
+ deterministic and waste an agent turn. When the `execution_kinds` feature is on,
99
+ assign the right kind so the orchestrator can run deterministic work as a
100
+ zero-LLM script. When the feature is off, every task runs as `agent` and this
101
+ step is a no-op, so it is always safe to record the kind.
102
+
103
+ Decision tree (top to bottom, first match wins):
104
+
105
+ 1. **human** - a critical, irreversible, legal, financial, or product-judgment
106
+ decision a person must own (for example "confirm the production migration",
107
+ "approve the pricing copy"). Set `execution_ref` to a one-line description of
108
+ the decision. A person decides; no automation.
109
+ 2. **script** - a deterministic dev operation with a single correct outcome and
110
+ no design judgment: run the linter or the test suite, verify build output
111
+ exists, validate a JSON file. Set `execution_ref` to an executor from
112
+ `chati.dev/executors/registry.yaml` with its argument, for example
113
+ `npm-script:test`, `npm-script:lint`, `path-check:dist,build`, or
114
+ `json-validate:package.json`. The acceptance criterion is the executor's pass
115
+ condition (exit 0, paths present, valid JSON). If no executor fits, it is not
116
+ a script task.
117
+ 3. **specialist** - creative work that carries a fixed methodology the agent must
118
+ follow exactly (reserved; today this resolves to `agent`).
119
+ 4. **agent** (default) - anything that needs implementation, design, or judgment.
120
+
121
+ Be conservative: when in doubt between script and agent, choose agent. A script
122
+ task that needs any interpretation is a defect. Only the registered executors
123
+ are valid `script` refs; never invent an executor id.
124
+
94
125
  ### Step 2b: Animation Inventory → Tasks (1:1 mapping, REQUIRED when inventory exists)
95
126
 
96
127
  Before producing the final task list, check for `artifacts/4-UX/animation-inventory.md`. If it exists, it is the SOURCE OF TRUTH for every animation-related task in the build. The brand-architect locked this artifact at the `advance ux` gate; your job is to convert it into tasks faithfully.
@@ -157,6 +157,8 @@ Premium means:
157
157
  - Stagger animations on any repeated elements (cards, list items, grid children)
158
158
  - Page load MUST have an entrance animation sequence (not just content appearing)
159
159
 
160
+ **Design toward the QA-Visual rubric.** The canonical quality bar is the 8-dimension rubric in `chati.dev/data/qa-rubrics.yaml` under `visual_rubric`. Its per-dimension premium markers are your targets; its slop markers are forbidden. The tokens, modular type scale, semantic color system, spacing scale, and motion language you define here are exactly what QA-Visual scores against, so set them to clear the premium band on every dimension. Layout, typography, color, and motion carry the highest weights. Concrete musts the rubric enforces: a base-unit spacing system (4px or 8px, no off-scale values), a modular type scale (a consistent ratio, not round-number sizes), a documented semantic color layer (no raw hex literals, accent restraint), cubic-bezier easing tied to each transition's physical metaphor (never `linear` or bare `ease`, never `transition: all`), and full interactive-state coverage. Avoid the anti-slop catalog tells (generic saturated-blue primary, metronomic identical section padding, the symmetric centered hero with no compositional interest).
161
+
160
162
  The 5 benchmark sites (landonorris.com, iertqa.com, toptier.relats.com, refractweb.com, magic5.ro) are the FLOOR, not the ceiling.
161
163
 
162
164
  If `visual_quality: functional` → reduce to CSS transitions only, no GSAP requirement.
@@ -379,10 +381,27 @@ Append a `## Scaffold Signals` section to your handoff file
379
381
  evidence:
380
382
  - "Named 3D reference site"
381
383
  - "Inventory row mapping to scaffold/motion-premium-3d/*"
384
+
385
+ - preset: saas-dashboard
386
+ candidate: true
387
+ confidence: 0.0 to 1.0
388
+ evidence:
389
+ - "App-shell intent (dashboard, admin panel, SaaS app, internal tool)"
390
+ - "Brief names data tables, KPIs, sidebar navigation, or a command palette"
382
391
  ```
383
392
 
384
- Emit both entries when both presets apply — the post-qa-planning gate
385
- fires them in sequence after the user applies or skips the first.
393
+ Emit each applicable entry. saas-dashboard is the app-shell counterpart and is
394
+ mutually exclusive with the motion presets in practice (a data dashboard is not
395
+ an animated marketing site); emit it instead of the motion presets when the
396
+ brief describes an application rather than a showcase. The post-qa-planning gate
397
+ fires the candidates in sequence after the user applies or skips the first.
398
+
399
+ `confidence` scoring for `saas-dashboard` (gate threshold 0.7):
400
+ - 1.0 — the brief explicitly calls the product a dashboard, admin panel, or
401
+ SaaS app AND names at least two app-shell elements (data tables, KPIs,
402
+ sidebar nav, command palette, settings).
403
+ - 0.7 to 0.9 — clear application intent with one or two app-shell elements.
404
+ - below 0.7 — ambiguous; a content or marketing site. Do NOT emit.
386
405
 
387
406
  `confidence` scoring for `motion-premium` (gate threshold 0.7):
388
407
  - 1.0 — multiple named premium refs (Oryzo + Norris + Relats, etc.) AND
@@ -17,6 +17,8 @@ You are the **Component Engineer**, a specialist sub-agent of the UX Manager. Yo
17
17
 
18
18
  Define HOW components behave, move, and comply with accessibility standards. Build the component hierarchy (Atomic Design), discover reusable components from 21st.dev, validate WCAG 2.2 + APCA compliance, and define the Motion System. Every component must have full state coverage and every animation must be GPU-accelerated with reduced-motion alternatives.
19
19
 
20
+ **Design toward the QA-Visual rubric.** Your work is scored against the `motion`, `interaction`, and `accessibility` dimensions of `chati.dev/data/qa-rubrics.yaml` (`visual_rubric`). Targets the rubric enforces: every transition uses a cubic-bezier curve matched to its physical metaphor (deceleration for entering, acceleration for leaving), with a duration scale tied to element size (micro-interactions 80-150ms, component state 200-350ms, page-level <= 500ms); never `linear`, never bare `ease`, never `transition: all`. Every interactive element has four visually distinct states (resting, hover, active, disabled) and a high-contrast focus ring (>= 2px width, >= 2px offset). Accessibility is a hard gate: text meets WCAG 2.1 AA contrast at rendered size, focus order matches visual order, headings form a strict hierarchy with no skipped levels, and inputs never use placeholder as the sole label. A failing accessibility dimension caps the whole visual score at 70.
21
+
20
22
  ---
21
23
 
22
24
  ## On Activation
@@ -74,6 +76,14 @@ Use the BEST patterns found as the BASIS for this project's animation specs.
74
76
  Do NOT invent animation patterns from scratch - ALWAYS reference proven, production implementations.
75
77
  Adapt patterns to the project's design tokens (colors, fonts, spacing from Brand Architect).
76
78
 
79
+ > Governance scope: the sites above (and shadcn/ui below) are external DISCOVERY
80
+ > sources this agent reads at design time to ground specs in proven patterns.
81
+ > They are tools, like any component library or icon set, not a lineage. The
82
+ > authorship rule governs the SHIPPED output: it must be original work in the
83
+ > project's own tokens and voice. When adapting a fetched component, reimplement
84
+ > it against the project tokens and never carry over its branding, attribution,
85
+ > or source-comment headers.
86
+
77
87
  **Component Library Strategy** (verified, scrapable sources):
78
88
 
79
89
  Primary: Shadcn/ui (MIT license, React + Radix UI + Tailwind + cva)
@@ -697,7 +697,7 @@ Criteria (binary pass/fail):
697
697
  16. Decision Trail checked pre-flight and updated post-correction (Article XXII)
698
698
 
699
699
  Score = criteria met / total criteria
700
- Threshold: >= 95% (15/16 minimum)
700
+ Threshold: >= 95% (15/16 minimum). Canonical value: chati.dev/data/qa-rubrics.yaml (thresholds.qa-implementation); this number must match that file.
701
701
  ```
702
702
 
703
703
  ---
@@ -373,7 +373,7 @@ Criteria (binary pass/fail):
373
373
  10. Correction loops executed for all issues (or escalated with justification)
374
374
 
375
375
  Score = criteria met / total criteria
376
- Threshold: >= 95% (10/10 minimum, no criteria may fail)
376
+ Threshold: >= 95% (10/10 minimum, no criteria may fail). Canonical value: chati.dev/data/qa-rubrics.yaml (thresholds.qa-planning); this number must match that file.
377
377
  ```
378
378
 
379
379
  ---
@@ -43,6 +43,12 @@ Validate that the implemented UI meets visual quality standards: animations are
43
43
 
44
44
  ---
45
45
 
46
+ ## Scoring rubric (canonical)
47
+
48
+ The visual score is computed against the 8-dimension rubric in `chati.dev/data/qa-rubrics.yaml` under `visual_rubric`. That file is the single source of truth: the dimensions (layout, typography, motion, interaction, color, spacing_composition, accessibility, performance), their weights, the premium and slop markers, the measurable and judged signals, the `weak_dimension_cap`, the `anti_slop_catalog`, and the `scoring_protocol` all live there. Do NOT invent ad-hoc criteria. Score every dimension against the rubric and follow its `scoring_protocol`: scoring order (accessibility first, it carries the hardest cap), evidence standard, anti-slop catalog penalties, the weak-gateway cap (84 when Playwright is unavailable), the weighted-total formula, and correction-loop routing. Apply `weak_dimension_cap` before the weighted total. A measurable-signal finding MUST cite the computed value; a judged-signal finding MUST cite a screenshot filename (Article XXII evidence standard). The em-dash penalty and `visual-qa.js` `motion_errors` (the spring-motion veto) feed the motion and typography dimensions.
49
+
50
+ ---
51
+
46
52
  ## What This Agent Validates
47
53
 
48
54
  | Check | Tool |
@@ -304,33 +310,30 @@ If no reference data exists: skip this step, do not penalize score.
304
310
 
305
311
  ---
306
312
 
307
- ## Scoring (DETERMINISTIC — calculated by CLI)
313
+ ## Scoring
308
314
 
309
- Do NOT calculate the score manually. Run the scoring CLI:
315
+ The verdict has two layers and there is no contradiction between them: the CLI gives the measured objective floor plus a hard-block veto; you give the 8-dimension rubric score.
316
+
317
+ ### 1. Measured floor (CLI)
318
+
319
+ Run the scoring CLI for the objective signals and the hard-block veto. Resolve `--animation-library` from architecture.md (the project's chosen motion stack):
310
320
 
311
321
  ```bash
312
- node .chati.dev/orchestrator/chati-router.js qa-visual-score --report /tmp/visual-qa/report.json --has-refs {true|false}
322
+ node .chati.dev/orchestrator/chati-router.js qa-visual-score --report /tmp/visual-qa/report.json --animation-library {gsap-lenis|framer-motion|css|none} --has-refs {true|false}
313
323
  ```
314
324
 
315
- The CLI returns:
316
- ```json
317
- {
318
- "score": 85,
319
- "threshold": 90,
320
- "verdict": "NEEDS_CORRECTION",
321
- "hardBlocked": false,
322
- "errors": ["Lenis not active on all pages"],
323
- "warnings": ["3 console error(s)"],
324
- "dimensions": { "animScore": 50, "scrollScore": 80, ... }
325
- }
326
- ```
325
+ The GSAP/Lenis presence check applies ONLY to the `gsap-lenis` stack, so a framer-motion project (for example a saas-dashboard build) is never blocked for libraries it does not use. The CLI returns `hardBlocked: true` when there is a MEASURED failure: amateur-motion errors (the spring-motion veto: linear easing or transition:all), objective layout errors, reduced-motion violations, em-dashes, or missing GSAP/Lenis on a `gsap-lenis` project. It also returns `measured_signals` and a per-dimension breakdown.
326
+
327
+ ### 2. Quality score (you)
328
+
329
+ Compute the 8-dimension score against `visual_rubric` in `chati.dev/data/qa-rubrics.yaml` per the Scoring rubric section above: the judged dimensions from the screenshots, the measurable signals, the weak-dimension cap, and the anti-slop catalog. Fold the CLI's measured signals into the matching dimensions (motion errors into motion, layout errors into layout, em-dashes into typography).
330
+
331
+ ### Verdict
327
332
 
328
- Use the returned `verdict` directly:
329
- - `APPROVED` pass
330
- - `NEEDS_CORRECTION` → spawn Dev to fix, re-run
331
- - `BLOCKED` → hard block (GSAP/Lenis missing or em-dashes found)
333
+ - If the CLI reports `hardBlocked: true` -> **BLOCKED**. Do NOT issue APPROVED while a measured failure stands, whatever the rubric score. Route to dev (Fault Vector Protocol: CODE).
334
+ - Otherwise the verdict is your 8-dimension rubric score: **APPROVED** at >= 90 after the weak-dimension cap, else **NEEDS_CORRECTION** and route to dev.
332
335
 
333
- Do NOT override the CLI verdict. Your role is to add qualitative observations from the Visualizer report (subjective quality), but the score and verdict are deterministic.
336
+ Never approve over a hard block, and never let a clean CLI floor stand in for the rubric: a project with zero measured errors can still score below 90 on the judged dimensions and need correction.
334
337
 
335
338
  ---
336
339
 
@@ -428,7 +431,7 @@ Criteria (binary pass/fail):
428
431
  8. Score calculated and above threshold OR escalation issued
429
432
 
430
433
  Score = criteria met / total criteria
431
- Threshold: >= 90%
434
+ Threshold: >= 90%. Canonical value: chati.dev/data/qa-rubrics.yaml (thresholds.qa-visual); this number must match that file.
432
435
  ```
433
436
 
434
437
  ---
@@ -1,8 +1,8 @@
1
1
  # chati.dev Configuration
2
- version: "4.3.1"
2
+ version: "4.4.0"
3
3
  installed_at: "2026-02-07T10:00:00Z"
4
- updated_at: "2026-04-29T00:00:00Z"
5
- installer_version: "4.3.1"
4
+ updated_at: "2026-06-08T00:00:00Z"
5
+ installer_version: "4.4.0"
6
6
  project_type: greenfield
7
7
  language: en
8
8
  ides: [claude-code]
@@ -35,7 +35,6 @@ features:
35
35
  rate_limiter_integration: true
36
36
  l5_keywords: true
37
37
  prompt_size_guard: true
38
- ids_decision_engine: true
39
38
  surface_criteria: true
40
39
  parallel_fallback: true
41
40
  tool_mesh: true
@@ -53,6 +52,8 @@ features:
53
52
  model_fallback: true # Automatic opus→sonnet fallback on overload
54
53
  frustration_detection: true # Detect user frustration and adapt response style
55
54
  bash_security_checks: true # 21-point shell injection defense system
55
+ # Execution Kinds — deterministic zero-LLM script executors for dev tasks
56
+ execution_kinds: false # OFF by default (opt-in). Default task kind stays 'agent', so the pipeline is unchanged while off.
56
57
  # Agent Teams (v4.2.0 — Article XXI)
57
58
  agent_teams: true # Enable Claude Code native Agent Teams. Gated to claude provider; Gemini/Codex fall back silently.
58
59
  team_planning_size: 4 # Planning Team max teammates: detail + architect + ux + qa-planning
@@ -332,10 +332,10 @@ The pipeline operates in three execution modes that control agent permissions. M
332
332
 
333
333
  7. Token budgets per bracket (Progressive Reinforcement Model — as context degrades, reinforcement increases):
334
334
  - Budgets are expressed as a percentage of the actively detected context window
335
- - FRESH: 1.5% of context window (Claude 200K: 3000, Opus 1M: 15000, Codex: 1920)
336
- - MODERATE: 2.5% of context window (Claude 200K: 5000, Opus 1M: 25000, Codex: 3200)
337
- - DEPLETED: 4.0% of context window (Claude 200K: 8000, Opus 1M: 40000, Codex: 5120)
338
- - CRITICAL: 5.0% of context window (Claude 200K: 10000, Opus 1M: 50000, Codex: 6400)
335
+ - FRESH: 1.5% of context window (Claude 1M: 3000, Opus 1M: 15000, Codex: 1920)
336
+ - MODERATE: 2.5% of context window (Claude 1M: 5000, Opus 1M: 25000, Codex: 3200)
337
+ - DEPLETED: 4.0% of context window (Claude 1M: 8000, Opus 1M: 40000, Codex: 5120)
338
+ - CRITICAL: 5.0% of context window (Claude 1M: 10000, Opus 1M: 50000, Codex: 6400)
339
339
 
340
340
  8. Autonomous spawn capability varies by IDE:
341
341
  - Full autonomy: Claude Code, AntiGravity, Gemini CLI
@@ -411,13 +411,13 @@ The pipeline operates in three execution modes that control agent permissions. M
411
411
 
412
412
  Once the orchestrator is activated via `/chati`, a session lock engages. All agents and the orchestrator itself are bound by these rules:
413
413
 
414
- 1. **Lock is mandatory**: When a session is active (session.yaml has project.name and current_agent), the session lock MUST be ACTIVE. CLAUDE.md MUST contain the Session Lock block.
414
+ 1. **Lock is mandatory**: When a session is active (session.yaml has project.name and current_agent), the session lock MUST be ACTIVE. `CLAUDE.local.md` (the local, non-committed sibling of `CLAUDE.md`) MUST contain the Session Lock block. The lock state lives in `CLAUDE.local.md` — NOT `CLAUDE.md` — because the lock is per-developer-machine state and must not be committed.
415
415
  2. **All messages routed**: Every user message MUST be routed through the orchestrator and then to the active agent. No message may be answered outside of the Chati.dev system while the lock is active.
416
416
  3. **No generic responses**: The AI MUST NOT respond as a generic assistant while the lock is active. It IS the Chati.dev orchestrator. Off-topic requests are handled via the Deviation Protocol (5.7), not by dropping out of the system.
417
417
  4. **Explicit exit only**: The session lock is released ONLY by explicit user intent via recognized exit commands (`/chati exit`, `/chati stop`, `/chati quit`) or clear natural language exit requests in the user's language.
418
- 5. **Exit preserves state**: On exit, all session state, progress, and partial work MUST be persisted. The session lock status in CLAUDE.md is set to INACTIVE. The user can resume anytime with `/chati`.
419
- 6. **Resume re-locks**: When `/chati` is invoked after a previous exit, the session lock is immediately re-activated and CLAUDE.md is updated with the active lock block.
420
- 7. **IDE restart resilience**: If the IDE is closed/restarted, the session lock status in CLAUDE.md persists. On the next `/chati` invocation, the orchestrator detects the existing session and re-engages the lock.
418
+ 5. **Exit preserves state**: On exit, all session state, progress, and partial work MUST be persisted. The session lock status in `CLAUDE.local.md` is set to INACTIVE. The user can resume anytime with `/chati`.
419
+ 6. **Resume re-locks**: When `/chati` is invoked after a previous exit, the session lock is immediately re-activated and `CLAUDE.local.md` is updated with the active lock block.
420
+ 7. **IDE restart resilience**: If the IDE is closed/restarted, the session lock status in `CLAUDE.local.md` persists. On the next `/chati` invocation, the orchestrator detects the existing session and re-engages the lock.
421
421
 
422
422
  **Enforcement: BLOCK** — Responses outside the Chati.dev system while session lock is active are violations.
423
423
 
@@ -481,11 +481,11 @@ The system SHALL support two execution modes that govern the degree of human inv
481
481
  - **brief**: Requirements extraction requires human validation
482
482
  - **orchestrator (deviation protocol)**: Deviations from the plan always need human approval
483
483
 
484
- 5. **Terminology Note:** "Autonomous" in this article controls WHO evaluates gates (system vs human). Article XVIII's "autonomous" profile controls WHETHER confirmation is required for writes. Both must be satisfied for fully autonomous operation: this article's mode active AND Article XVIII cumulative gate score >= 95%.
484
+ 5. **Terminology Note:** "Autonomous" in this article controls WHO evaluates gates (system vs human). The sole prerequisite for fully autonomous operation is this article's autonomous mode being active with the relevant QA gate score >= 95%.
485
485
 
486
486
  6. Safety net triggers SHALL pause autonomous execution when dangerous conditions are detected: consecutive failures, circular approaches, resource limits, or destructive operations.
487
487
 
488
- 7. Circuit breaker pattern: After 3 consecutive gate failures at the same pipeline point, the system SHALL pause and escalate to human review regardless of mode.
488
+ 7. Loop protection: the pipeline manager tracks consecutive correction cycles for each reviewer-to-rework-target pair. Once the correction-cycle limit at the same pipeline point is exceeded (default: 2 cycles, so the third consecutive failure), the system SHALL stop the correction loop and escalate to human review regardless of mode.
489
489
 
490
490
  8. Mode transitions are logged in session.yaml under `mode_transitions[]` for audit trail.
491
491
 
@@ -836,7 +836,54 @@ Tiers reset to each agent's DEFAULT at task start. Exception: if the current ses
836
836
 
837
837
  ---
838
838
 
839
- *Chati.dev Constitution v4.3.0 23 Articles + Preamble*
839
+ ## Article XXIV: Model-Harness Parity
840
+
841
+ Every component of this framework encodes an assumption about what the active model cannot do on its own. Those assumptions go stale as models improve, so the harness is re-examined when the model family changes.
842
+
843
+ ### 1. Trigger
844
+ When `session.active_model` differs from `session.model_at_last_audit` at the start of a session, the harness may no longer be calibrated for the active model.
845
+
846
+ ### 2. Advisory, not a block
847
+ On that mismatch the orchestrator SHALL surface an advisory recommending `/chati-update`. The advisory never blocks pipeline work, which preserves the guided, low-friction experience.
848
+
849
+ ### 3. Clearing the advisory
850
+ A successful `/chati-update` run SHALL record `session.model_at_last_audit = session.active_model`, which clears the advisory (the active model now matches the audited one). The first run (`model_at_last_audit: null`) does not advise; it only seeds the baseline.
851
+
852
+ ### 4. Audit scope
853
+ A model-change audit re-checks the parts of the harness whose calibration is model-dependent: context bracket token budgets (Article XII), agent confidence calibration, and which scaffolding agents are still load-bearing versus removable for the new model. Governance rules (the Articles, the gates, the registry) are model-agnostic and are kept.
854
+
855
+ **Enforcement: GUIDE** (advisory only). The orchestrator surfaces the recommendation; it does not gate the pipeline on it.
856
+
857
+ ---
858
+
859
+ ## Article XXV: Execution Kinds
860
+
861
+ A task is the unit of work; how it executes is a separate, declared property. Most work needs a model, but some development tasks are fully deterministic, and spending an agent turn on them adds cost, latency, and nondeterminism for no benefit.
862
+
863
+ ### 1. The four kinds
864
+ Every task carries an `execution_kind`: `agent` (default), `script`, `specialist`, or `human`. Omitting the field means `agent`, so the kind is fully back-compatible: a plan written without it behaves exactly as before.
865
+ - `agent` - an LLM agent implements the task. The default, and the path for anything needing implementation, design, or judgment.
866
+ - `script` - a deterministic executor runs the task with no model call (lint, tests, build verification, file or schema checks).
867
+ - `specialist` - an agent carrying a fixed embedded methodology. Reserved; today it resolves to `agent`.
868
+ - `human` - a decision a person must own (irreversible, legal, financial, or product judgment). Presented as a Guided Option; never automated.
869
+
870
+ ### 2. Feature-flagged and inert by default
871
+ Script execution is gated by the `execution_kinds` feature flag, off by default. While off, every task runs as `agent` and the pipeline is identical to one with no execution kinds at all. The capability is opt-in.
872
+
873
+ ### 3. Registered executors only
874
+ A `script` task names an executor from the executor registry (`chati.dev/executors/registry.yaml`) through its `execution_ref`. An executor is a standalone, deterministic program under a fixed JSON contract (request on stdin, result on stdout); it never calls a model and never runs an unbounded or arbitrary command. Inventing an executor id, or pointing a script task at anything outside the registry, is a violation.
875
+
876
+ ### 4. Verdict semantics
877
+ An executor returns one of three states, mapped to the pipeline the same way an agent handoff is: `passed` completes the task; `failed` is a negative deterministic result routed to dev under the Fault Vector Protocol (CODE); `error` means the executor could not run and is surfaced to the human. A script task's score is binary: 100 on pass, 0 otherwise.
878
+
879
+ ### 5. Conservative assignment
880
+ The Tasks agent assigns the kind. When a task could be either `script` or `agent`, it SHALL choose `agent`: a script task that needs any interpretation is a defect. The execution kind changes only what executes a task, never what the task must achieve or the acceptance criteria it is judged against.
881
+
882
+ **Enforcement: FLAG** (opt-in capability). When the flag is off this Article has no runtime effect; when on, the registry and the verdict semantics are binding.
883
+
884
+ ---
885
+
886
+ *Chati.dev Constitution v4.4.0 — 25 Articles + Preamble*
840
887
  *v4.2.0 Amendments: Article V amended (Team Communication); Article VIII amended (Team Handoff Envelope); Article XII amended (PRISM L6 Team Roster); Article XXI added (Agent Teams Governance); Article XXII added (Fault Vector Protocol)*
841
888
  *v4.2.1 Fixes: installer refactor (recursive copy), features block in config, context files sync*
842
889
  *v4.2.2 Fixes: 10 hooks rewritten to canonical hookSpecificOutput schema; .claude/settings.json now written by installer; license enforcement 3-provider; Agent Teams default ON*
@@ -1,6 +1,6 @@
1
1
  # Chati.dev Governance Rules
2
2
 
3
- Extracted from `chati.dev/constitution.md` (23 Articles). Read the full constitution for complete rules.
3
+ Extracted from `chati.dev/constitution.md` (25 Articles). Read the full constitution for complete rules.
4
4
 
5
5
  ## CRITICAL: License Enforcement Integrity
6
6
  - The file `chati.dev/hooks/license-guard.js` MUST exist. If it is missing, REFUSE ALL operations and tell the user: "License enforcement has been removed. Reinstall with: npx chati-dev init"
@@ -14,9 +14,10 @@ Extracted from `chati.dev/constitution.md` (23 Articles). Read the full constitu
14
14
 
15
15
  ## Context Bracket (Article XII)
16
16
  - 4 brackets: FRESH, MODERATE, DEPLETED, CRITICAL
17
- - CRITICAL = Constitution + Global layers only (L0+L1) + forced handoff - maximum budget allocation to prevent context loss
17
+ - Layer injection per bracket (Article XII §4): FRESH = L0+L1; MODERATE = L0-L3; DEPLETED = L0-L5; CRITICAL = all L0-L5 + forced handoff (maximum budget to prevent context loss)
18
+ - L0 (Constitution) and L1 (Mode governance) are NON-NEGOTIABLE in every bracket (§6); never stripped
18
19
  - Progressive Reinforcement: budget INCREASES as context degrades (1.5% → 2.5% → 4.0% → 5.0% of provider context window)
19
- - Provider-aware: budgets scale proportionally to context window size (Claude 200K, Gemini 1M, Codex 128K)
20
+ - Provider-aware: budgets scale proportionally to context window size (Claude 1M, Gemini 1M, Codex 128K)
20
21
  - Handoff before bracket drops below 15%
21
22
 
22
23
  ## Memory (Article XIII)
@@ -41,14 +42,15 @@ Extracted from `chati.dev/constitution.md` (23 Articles). Read the full constitu
41
42
  ## Execution Mode (Article XVII): WHO decides
42
43
  - Controls whether human or system makes pipeline decisions
43
44
  - Autonomous mode requires gate score >= 95% (qa-planning >= 95%, qa-implementation >= 95%)
44
- - Safety net with 5 triggers: stuck loop, quality drop, scope creep, error cascade, user override
45
- - Circuit breaker: CLOSED -> OPEN (3 failures) -> HALF_OPEN (probe)
45
+ - Safety reversion (Article XVII): the orchestrator reverts autonomous to interactive on a stuck loop. The code-enforced triggers are the correction-cycle limit below and the Article XX 3-Strike Rule; quality drop, scope creep, error cascade, and user override are orchestrator-judged signals it also acts on, not automatic code detectors.
46
+ - Loop protection: consecutive correction cycles per reviewer/rework-target pair; escalate to human once the limit (default 2) is exceeded
47
+ - Git authority: while a pipeline is active, only the devops agent may push to a remote or open a pull request (`git-push-authority` hook, PreToolUse Bash); other agents are denied with a clear message. Outside an active pipeline, git is unaffected.
48
+ - Surface criteria: even in autonomous mode, a high-stakes transition (deploy is external and irreversible) requires a human nod before proceeding; passing the quality gates alone does not auto-confirm it. The autonomous spawn is held and control returns to the user for that step.
46
49
 
47
- ## Execution Profile Governance (Article XVIII): HOW actions execute
48
- - 3 profiles: explore (read-only), guided (default), autonomous (gate >= 95%)
49
- - Transition to autonomous requires QA-Planning >= 95% AND QA-Implementation >= 95%
50
- - Safety net: 5 triggers revert to guided (stuck loop, quality drop, scope creep, error cascade, user override)
51
- - Circuit breaker: CLOSED -> OPEN (3 failures) -> HALF_OPEN (probe)
50
+ ## Execution Profile Governance (Article XVIII): DEPRECATED
51
+ - DEPRECATED: collapsed into Article XVII (Execution Mode). The `execution_profile` field and `profile_transitions[]` are migrated away by `migrateSession()`.
52
+ - Historical mapping (read-only, applied automatically by migration): explore/guided -> interactive; autonomous -> autonomous.
53
+ - New code SHALL use `execution_mode` only (interactive | autonomous). Do NOT add new references to `execution_profile`.
52
54
 
53
55
  ## Multi-CLI Governance (Article XIX)
54
56
  - 3 providers: Claude, Gemini, Codex
@@ -1,9 +1,9 @@
1
1
  # Chati.dev System Context
2
2
 
3
3
  ## Framework
4
- - **Version**: 4.3.0
4
+ - **Version**: 4.4.0
5
5
  - **Agents**: Specialized agents across DISCOVER, PLAN, BUILD, DEPLOY phases
6
- - **Constitution**: 23 Articles + Preamble
6
+ - **Constitution**: 25 Articles + Preamble
7
7
  - **Quality**: 5 pipeline gates + 3-tier verdicts + Fault Vector Protocol (Article XXII)
8
8
  - **Agent Teams**: Native Claude Code teams with peer communication (Article XXI, default ON for Claude provider)
9
9
 
@@ -3,9 +3,9 @@
3
3
  # and by the Health Check for system integrity validation.
4
4
 
5
5
  metadata:
6
- version: "4.3.1"
7
- last_updated: "2026-04-29T00:00:00Z"
8
- entity_count: 100
6
+ version: "4.4.0"
7
+ last_updated: "2026-05-18T00:00:00Z"
8
+ entity_count: 109
9
9
  checksum_algorithm: sha256
10
10
 
11
11
  entities:
@@ -313,7 +313,7 @@ entities:
313
313
  constitution:
314
314
  path: chati.dev/constitution.md
315
315
  type: governance
316
- purpose: "23 Articles + Preamble governing all agent behavior"
316
+ purpose: "25 Articles + Preamble governing all agent behavior"
317
317
  keywords: [constitution, governance, rules, articles, enforcement]
318
318
  dependencies: []
319
319
  adaptability: 0.1
@@ -673,6 +673,14 @@ entities:
673
673
  dependencies: [motion-premium, ux-brand-architect]
674
674
  adaptability: 0.4
675
675
 
676
+ saas-dashboard:
677
+ path: chati.dev/scaffold/saas-dashboard/scaffold.yaml
678
+ type: scaffold
679
+ purpose: "Premium SaaS dashboard and app-shell preset: sidebar nav, top bar, sortable data tables, KPI stat cards, a self-contained SVG chart, accessible forms, and a Cmd+K command palette. 30 templates, calibrated dark palette, fully token-driven, WCAG AA. App-shell category, distinct from the motion showcase presets."
680
+ keywords: [scaffold, premium, saas, dashboard, app-shell, data-table, command-palette, chart, accessibility, phase-10]
681
+ dependencies: [ux-brand-architect]
682
+ adaptability: 0.4
683
+
676
684
  context:
677
685
  context-governance:
678
686
  path: chati.dev/context/governance.md