chati-dev 4.3.1 → 4.4.1
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.
- package/README.md +18 -13
- package/bin/chati.js +28 -4
- package/framework/agents/build/dev.md +5 -1
- package/framework/agents/discover/greenfield-wu.md +16 -1
- package/framework/agents/plan/tasks.md +31 -0
- package/framework/agents/plan/ux-brand-architect.md +21 -2
- package/framework/agents/plan/ux-component-engineer.md +10 -0
- package/framework/agents/quality/qa-implementation.md +1 -1
- package/framework/agents/quality/qa-planning.md +1 -1
- package/framework/agents/quality/qa-visual.md +24 -21
- package/framework/config.yaml +5 -4
- package/framework/constitution.md +60 -11
- package/framework/context/governance.md +12 -10
- package/framework/context/root.md +2 -2
- package/framework/data/entity-registry.yaml +12 -4
- package/framework/data/qa-rubrics.yaml +335 -0
- package/framework/domains/constitution.yaml +3 -3
- package/framework/executors/json-validate.js +80 -0
- package/framework/executors/npm-script.js +72 -0
- package/framework/executors/path-check.js +67 -0
- package/framework/executors/registry.yaml +36 -0
- package/framework/hooks/advance-trigger.js +47 -3
- package/framework/hooks/constitution-guard.js +9 -4
- package/framework/hooks/git-push-authority.js +113 -0
- package/framework/hooks/license-guard.js +59 -9
- package/framework/hooks/model-governance.js +40 -17
- package/framework/hooks/prism-engine.js +78 -11
- package/framework/hooks/session-digest.js +12 -3
- package/framework/hooks/settings.json +7 -3
- package/framework/hooks/style-guard.js +52 -3
- package/framework/hooks/team-quality-gate.js +43 -5
- package/framework/i18n/en.yaml +3 -3
- package/framework/i18n/es.yaml +3 -3
- package/framework/i18n/fr.yaml +3 -3
- package/framework/i18n/pt.yaml +3 -3
- package/framework/intelligence/confidence.yaml +85 -6
- package/framework/intelligence/context-engine.md +9 -5
- package/framework/intelligence/decision-engine.md +1 -1
- package/framework/manifest.json +1351 -0
- package/framework/manifest.sig +1 -0
- package/framework/orchestrator/chati-router.js +1 -1
- package/framework/orchestrator/chati-update.md +19 -3
- package/framework/orchestrator/chati.md +24 -3
- package/framework/quality-gates/planning-gate.md +2 -0
- package/framework/scaffold/motion-premium/scaffold.yaml +2 -1
- package/framework/scaffold/motion-premium-3d/components/webgl/WebGLContext.tsx.template +1 -1
- package/framework/scaffold/saas-dashboard/README.md +58 -0
- package/framework/scaffold/saas-dashboard/app/dashboard/page.tsx.template +546 -0
- package/framework/scaffold/saas-dashboard/app/globals.css.template +746 -0
- package/framework/scaffold/saas-dashboard/app/layout.tsx.template +192 -0
- package/framework/scaffold/saas-dashboard/app/shell.css.template +1070 -0
- package/framework/scaffold/saas-dashboard/components/data/Chart.tsx.template +725 -0
- package/framework/scaffold/saas-dashboard/components/data/DataTable.tsx.template +623 -0
- package/framework/scaffold/saas-dashboard/components/data/DataTable.types.ts.template +104 -0
- package/framework/scaffold/saas-dashboard/components/data/DataTablePagination.tsx.template +234 -0
- package/framework/scaffold/saas-dashboard/components/data/SkeletonBlock.tsx.template +111 -0
- package/framework/scaffold/saas-dashboard/components/data/StatCard.tsx.template +393 -0
- package/framework/scaffold/saas-dashboard/components/data/StatCardGrid.tsx.template +121 -0
- package/framework/scaffold/saas-dashboard/components/feedback/EmptyState.tsx.template +281 -0
- package/framework/scaffold/saas-dashboard/components/interaction/CommandPalette.tsx.template +767 -0
- package/framework/scaffold/saas-dashboard/components/interaction/Field.tsx.template +351 -0
- package/framework/scaffold/saas-dashboard/components/interaction/Form.tsx.template +424 -0
- package/framework/scaffold/saas-dashboard/components/primitives/Badge.tsx.template +193 -0
- package/framework/scaffold/saas-dashboard/components/primitives/Button.tsx.template +261 -0
- package/framework/scaffold/saas-dashboard/components/primitives/Card.tsx.template +287 -0
- package/framework/scaffold/saas-dashboard/components/primitives/Input.tsx.template +310 -0
- package/framework/scaffold/saas-dashboard/components/primitives/Spinner.tsx.template +135 -0
- package/framework/scaffold/saas-dashboard/components/primitives/index.ts.template +60 -0
- package/framework/scaffold/saas-dashboard/components/shell/AppShell.tsx.template +174 -0
- package/framework/scaffold/saas-dashboard/components/shell/Breadcrumb.tsx.template +186 -0
- package/framework/scaffold/saas-dashboard/components/shell/Container.tsx.template +86 -0
- package/framework/scaffold/saas-dashboard/components/shell/NavItem.tsx.template +147 -0
- package/framework/scaffold/saas-dashboard/components/shell/Sidebar.tsx.template +378 -0
- package/framework/scaffold/saas-dashboard/components/shell/SidebarContext.tsx.template +169 -0
- package/framework/scaffold/saas-dashboard/components/shell/ThemeToggle.tsx.template +128 -0
- package/framework/scaffold/saas-dashboard/components/shell/Topbar.tsx.template +301 -0
- package/framework/scaffold/saas-dashboard/lib/brand.ts.template +324 -0
- package/framework/scaffold/saas-dashboard/scaffold.yaml +225 -0
- package/framework/schemas/session.schema.json +5 -0
- package/framework/schemas/task.schema.json +9 -0
- package/framework/scripts/visual-qa.js +87 -1
- package/framework/tasks/orchestrator-health.md +4 -4
- package/framework/tasks/qa-impl-verdict.md +11 -5
- package/framework/templates/qa-gate-tmpl.yaml +24 -11
- package/package.json +4 -4
- package/src/config/claude-settings-generator.js +9 -6
- package/src/config/context-file-generator.js +0 -6
- package/src/dashboard/renderer.js +0 -36
- package/src/executors/runner.js +204 -0
- package/src/installer/core.js +35 -4
- package/src/installer/manifest.js +30 -4
- package/src/installer/signing-public-key.pem +1 -1
- package/src/installer/templates.js +5 -6
- package/src/installer/validator.js +2 -1
- package/src/intelligence/registry-manager.js +3 -2
- package/src/license/client.js +9 -3
- package/src/license/commands.js +12 -2
- package/src/license/machine-id.js +42 -1
- package/src/memory/gotchas.js +58 -40
- package/src/memory/magic-docs.js +7 -2
- package/src/memory/session-digest.js +9 -4
- package/src/orchestrator/cli.js +195 -23
- package/src/orchestrator/deviation-handler.js +5 -3
- package/src/orchestrator/doctor.js +98 -16
- package/src/orchestrator/pipeline-manager.js +44 -22
- package/src/orchestrator/session-manager.js +56 -8
- package/src/telemetry/sender.js +7 -19
- package/src/terminal/run-parallel.js +14 -14
- package/src/terminal/run-team.js +3 -3
- package/src/upgrade/backup.js +22 -44
- package/src/upgrade/migrator.js +51 -12
- package/src/upgrade/tracked-files-detector.js +34 -16
- package/src/utils/constitution-meta.js +12 -0
- package/src/utils/feature-flags.js +26 -2
- package/src/utils/flatten-entities.js +4 -40
- package/src/utils/schema-validator.js +0 -14
- package/src/wizard/i18n.js +3 -3
- package/src/api/index.js +0 -120
- package/src/autonomy/autonomous-gate.js +0 -294
- package/src/autonomy/build-loop.js +0 -281
- package/src/autonomy/build-state.js +0 -286
- package/src/autonomy/cause-analyzer.js +0 -177
- package/src/autonomy/escalation.js +0 -214
- package/src/autonomy/index.js +0 -51
- package/src/autonomy/mode-manager.js +0 -225
- package/src/autonomy/mode-suggester.js +0 -283
- package/src/autonomy/progress-reporter.js +0 -275
- package/src/autonomy/safety-net.js +0 -370
- package/src/config/agent-customizer.js +0 -231
- package/src/decision/analyzer.js +0 -291
- package/src/decision/engine.js +0 -250
- package/src/decision/index.js +0 -38
- package/src/decision/registry-healer.js +0 -468
- package/src/decision/registry-updater.js +0 -339
- package/src/extensions/loader.js +0 -145
- package/src/extensions/registry.js +0 -134
- package/src/gates/circuit-breaker.js +0 -151
- package/src/gates/g1-planning-complete.js +0 -154
- package/src/gates/g2-qa-planning.js +0 -156
- package/src/gates/g3-implementation.js +0 -215
- package/src/gates/g4-qa-implementation.js +0 -240
- package/src/gates/g5-deploy-ready.js +0 -181
- package/src/gates/gate-base.js +0 -185
- package/src/gates/index.js +0 -46
- package/src/health/auto-fix.js +0 -216
- package/src/health/engine.js +0 -246
- package/src/merger/semantic-merger.js +0 -292
- package/src/preview/detector.js +0 -238
- package/src/preview/index.js +0 -20
- package/src/preview/launcher.js +0 -235
- package/src/preview/log-buffer.js +0 -103
- package/src/quality/metrics-collector.js +0 -281
- package/src/quality/test-runner.js +0 -366
- package/src/tasks/executor.js +0 -195
- package/src/tasks/index.js +0 -4
- package/src/tasks/loader.js +0 -210
- package/src/tasks/router.js +0 -182
- package/src/utils/event-bus.js +0 -126
|
@@ -0,0 +1 @@
|
|
|
1
|
+
EK1FsSHB+n5Dbo2dRSF1DPgRD35si2lygeQvPZZp91Vy069v6AlHbK/delS4LVkj/sAU7Tp5PoulKchOCF75AQ==
|
|
@@ -192,7 +192,7 @@ const VALID_ORCHESTRATE_SUBS = new Set([
|
|
|
192
192
|
'qa-plan-score', 'qa-impl-score', 'qa-visual-score', 'scan',
|
|
193
193
|
'spawn-team', 'team-status', 'team-dissolve',
|
|
194
194
|
'wait-for-capture', 'wave-status', 'assess-coverage',
|
|
195
|
-
'wait-for-license', 'doctor',
|
|
195
|
+
'wait-for-license', 'doctor', 'run-script-task',
|
|
196
196
|
]);
|
|
197
197
|
|
|
198
198
|
/**
|
|
@@ -10,7 +10,7 @@ You are the **Chati Update Agent**, a specialized evolution advisor for the chat
|
|
|
10
10
|
|
|
11
11
|
1. **NEVER copy blindly** - Adapt concepts to chati.dev's identity and patterns
|
|
12
12
|
2. **NEVER break existing tests** - All tests must continue passing (run `npm test` to verify)
|
|
13
|
-
3. **NEVER violate the constitution** -
|
|
13
|
+
3. **NEVER violate the constitution** - 25 articles are sacred
|
|
14
14
|
4. **NEVER skip comparison** - Every finding MUST be validated against current state
|
|
15
15
|
5. **ALWAYS present options** - Numbered 1, 2, 3 format before any implementation
|
|
16
16
|
6. **ALWAYS use sub-agents** - Parallelize SCAN and COMPARE for throughput
|
|
@@ -102,7 +102,7 @@ Launch **in parallel** with Phase 1 a **Task agent (subagent_type=Explore, thoro
|
|
|
102
102
|
Map the COMPLETE current state of chati.dev. Analyze:
|
|
103
103
|
|
|
104
104
|
1. **CONSTITUTION** - Read chati.dev/constitution.md fully. Extract:
|
|
105
|
-
- All
|
|
105
|
+
- All 25 articles with key rules
|
|
106
106
|
- Quality thresholds
|
|
107
107
|
- Governance patterns
|
|
108
108
|
|
|
@@ -247,7 +247,7 @@ Use `/ralph-loop` with the following prompt structure:
|
|
|
247
247
|
|
|
248
248
|
REQUIREMENTS:
|
|
249
249
|
1. Implement each change following chati.dev patterns and conventions
|
|
250
|
-
2. Respect the constitution (
|
|
250
|
+
2. Respect the constitution (25 articles) - especially originality
|
|
251
251
|
3. Update relevant tests for each change
|
|
252
252
|
4. Run full test suite after each change - ALL must pass
|
|
253
253
|
5. Run lint after each change - must be clean
|
|
@@ -300,6 +300,22 @@ After ralph-wiggum completes, generate final report:
|
|
|
300
300
|
|
|
301
301
|
---
|
|
302
302
|
|
|
303
|
+
## Phase 7: MODEL-HARNESS PARITY (Article XXIV)
|
|
304
|
+
|
|
305
|
+
This step runs whether the update was triggered by a reference comparison or by a model change.
|
|
306
|
+
|
|
307
|
+
1. **Re-baseline the model.** Record the current model as the audited one so the parity advisory clears:
|
|
308
|
+
- set `session.model_at_last_audit = session.active_model`
|
|
309
|
+
Write this through the session manager (the CLI-managed path), never by editing `.chati/session.yaml` directly.
|
|
310
|
+
|
|
311
|
+
2. **Model-change audit checklist.** When the model family changed, re-check the parts of the harness whose calibration is model-dependent, and keep the model-agnostic parts:
|
|
312
|
+
- Context bracket token budgets (Article XII, `context-engine.md`): are the FRESH/MODERATE/DEPLETED/CRITICAL boundaries still right for the new window size?
|
|
313
|
+
- Agent confidence calibration (`intelligence/confidence.yaml`): re-calibrate after a few real runs on the new model.
|
|
314
|
+
- Load-bearing agents: is any scaffolding agent now redundant because the new model does that step natively? Is any new capability worth a new agent?
|
|
315
|
+
- Keep unchanged: the Articles, the quality gates and thresholds, the registry. These are model-agnostic.
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
303
319
|
## Error Handling
|
|
304
320
|
|
|
305
321
|
- **Clone fails**: Ask user for correct URL/path, suggest alternatives
|
|
@@ -229,6 +229,24 @@ Quality gate passed: {score}%.
|
|
|
229
229
|
|
|
230
230
|
---
|
|
231
231
|
|
|
232
|
+
## Action: Script Task (Execution Kinds)
|
|
233
|
+
|
|
234
|
+
When the `execution_kinds` feature is on and the next task's `execution_kind` is
|
|
235
|
+
not `agent`, route it here instead of spawning an agent. When the feature is off
|
|
236
|
+
or the kind is `agent`, skip this entirely and use the normal agent path. This
|
|
237
|
+
is purely a dispatch optimization: it never changes WHAT a task must achieve,
|
|
238
|
+
only what executes it, and it is invisible when the feature is off.
|
|
239
|
+
|
|
240
|
+
- **script**: run it deterministically with no LLM. Via Bash:
|
|
241
|
+
`node .chati.dev/orchestrator/chati-router.js run-script-task --ref "{execution_ref}" --id "{task_id}" --title "{task_title}"`
|
|
242
|
+
Handle the JSON `status`:
|
|
243
|
+
- `passed` → the task is done. Advance: `node .chati.dev/orchestrator/chati-router.js advance --agent {current_agent} --score 100`
|
|
244
|
+
- `failed` → the deterministic check is negative. Route to dev (Fault Vector Protocol: CODE) to fix, then re-run the script task.
|
|
245
|
+
- `error` → the executor could not run. Surface the summary to the user and check the execution_ref against the executor registry.
|
|
246
|
+
- `ran: false` → the feature is off or the kind is not script; fall back to the agent path silently.
|
|
247
|
+
- **human**: present the decision in the user's language as a Guided Option and wait for their choice. Record it, then advance. Never decide for them.
|
|
248
|
+
- **specialist**: reserved; today, run it through the normal agent path.
|
|
249
|
+
|
|
232
250
|
## Action: Autonomous Agent
|
|
233
251
|
|
|
234
252
|
These agents run in separate Claude Code processes.
|
|
@@ -790,7 +808,7 @@ interactive (default):
|
|
|
790
808
|
→ All 8 universal protocols apply.
|
|
791
809
|
|
|
792
810
|
autonomous (Ralph Wiggum mode):
|
|
793
|
-
→ Requires: most recent QA gate score >= 95% (Article
|
|
811
|
+
→ Requires: most recent QA gate score >= 95% (Article XVII prerequisite).
|
|
794
812
|
→ If quality gate not met, inform user and suggest guided mode instead.
|
|
795
813
|
→ Agent executes without asking unless blocker encountered.
|
|
796
814
|
→ Primarily for Dev agent during BUILD phase.
|
|
@@ -815,10 +833,13 @@ The orchestrator enforces `chati.dev/constitution.md`:
|
|
|
815
833
|
|
|
816
834
|
| Level | Action | Articles |
|
|
817
835
|
|-------|--------|----------|
|
|
818
|
-
| **BLOCK** | Halt agent on violation | I, II, III, IV, VII, VIII, X, XI, XII, XIII, XV,
|
|
836
|
+
| **BLOCK** | Halt agent on violation | I, II, III, IV, V, VII, VIII, X, XI, XII, XIII, XV, XX, XXI, XXII, XXIII |
|
|
819
837
|
| **STRICT** | Must not bypass quality gates | XVII |
|
|
820
|
-
| **GUIDE** | Correct without halting |
|
|
838
|
+
| **GUIDE** | Correct without halting | IX, XIV, XVI, XIX, XXIV |
|
|
821
839
|
| **WARN** | Generate warning in QA | VI |
|
|
840
|
+
| **FLAG** | Feature-flagged (inert until enabled) | XXV |
|
|
841
|
+
|
|
842
|
+
Article XVIII was deprecated 2026-04-18 and folded into Article XVII; it carries no enforcement level.
|
|
822
843
|
|
|
823
844
|
---
|
|
824
845
|
|
|
@@ -34,6 +34,8 @@ QA-Planning
|
|
|
34
34
|
| Agent defined weak criteria | -10 |
|
|
35
35
|
|
|
36
36
|
## Decision
|
|
37
|
+
Thresholds are canonical in `chati.dev/data/qa-rubrics.yaml` (thresholds.qa-planning); the values below must match that file.
|
|
38
|
+
|
|
37
39
|
- **Score >= 95**: APPROVED -> proceed to BUILD
|
|
38
40
|
- **Score < 95**: Silent correction loop (max 3 per agent)
|
|
39
41
|
- **Still < 95 after loops**: ESCALATE to user
|
|
@@ -15,11 +15,12 @@ framework:
|
|
|
15
15
|
chati_dev: ">=4.3.0"
|
|
16
16
|
|
|
17
17
|
stack:
|
|
18
|
-
build_tools: ["nextjs"
|
|
18
|
+
build_tools: ["nextjs"]
|
|
19
19
|
tailwind: ">=4.0.0"
|
|
20
20
|
typescript: ">=5.0.0"
|
|
21
21
|
node: ">=18.0.0"
|
|
22
22
|
react: ">=18.0.0"
|
|
23
|
+
next: ">=13.0.0"
|
|
23
24
|
# Runtime peer deps imported directly by templates. Bumping policy: every two
|
|
24
25
|
# minor bumps, re-validate templates. GSAP 3.12 is the stable line post-3.11;
|
|
25
26
|
# framer-motion 11 is the React 19 support line; lenis 1.1 introduced the
|
|
@@ -24,7 +24,7 @@ import { detectWebGL, type WebGLAvailability } from '@/lib/webgl/detect';
|
|
|
24
24
|
|
|
25
25
|
export interface WebGLContextValue {
|
|
26
26
|
status: 'pending' | 'available' | 'unavailable';
|
|
27
|
-
reason: WebGLAvailability
|
|
27
|
+
reason: Extract<WebGLAvailability, { available: false }>['reason'] | null;
|
|
28
28
|
webglVersion: 1 | 2 | null;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# saas-dashboard scaffold preset
|
|
2
|
+
|
|
3
|
+
A premium SaaS dashboard and app-shell starting point. Where the motion-premium
|
|
4
|
+
presets target animated showcase sites, this preset targets the build-me-a-tool
|
|
5
|
+
category: a data-dense application shell that looks designed, not generated.
|
|
6
|
+
|
|
7
|
+
## What it ships
|
|
8
|
+
|
|
9
|
+
29 templates across foundation, primitives, shell, data, interaction, and a
|
|
10
|
+
composed sample page:
|
|
11
|
+
|
|
12
|
+
- **Foundation**: `app/globals.css` (the full token system, fluid type scale,
|
|
13
|
+
reduced-motion handling, the `xl` breakpoint override), `lib/brand.ts` (typed
|
|
14
|
+
tokens), and the single `Container` authority for max-width and padding.
|
|
15
|
+
- **Primitives**: `Button`, `Card`, `Input`, `Badge`, `Spinner`, each with full
|
|
16
|
+
resting, hover, active, disabled, and focus states.
|
|
17
|
+
- **Shell**: `AppShell`, `Sidebar` (collapsible, keyboard-accessible, responsive
|
|
18
|
+
drawer), `Topbar` (search trigger, breadcrumb, user menu), `NavItem`,
|
|
19
|
+
`ThemeToggle`, `Breadcrumb`.
|
|
20
|
+
- **Data**: `DataTable` (typed, sortable, sticky header, selection, empty and
|
|
21
|
+
loading states), `StatCard` and `StatCardGrid` (KPI with delta semantics and a
|
|
22
|
+
sparkline), `Chart` (a self-contained SVG area chart, no chart dependency).
|
|
23
|
+
- **Interaction**: `CommandPalette` (Cmd+K, fuzzy filter, keyboard nav, hand
|
|
24
|
+
rolled, no extra dependency), `Field` and `Form` (labeled inputs, validation
|
|
25
|
+
states, never placeholder-only labels).
|
|
26
|
+
- **Feedback**: `EmptyState`.
|
|
27
|
+
- **Sample**: `app/dashboard/page.tsx` composes the shell, stat cards, a chart,
|
|
28
|
+
and a data table to demonstrate the preset.
|
|
29
|
+
|
|
30
|
+
## Design system
|
|
31
|
+
|
|
32
|
+
- **Color**: a calibrated dark palette built from a single neutral hue with even
|
|
33
|
+
perceptual luminance steps, a 6-color data-viz series, and a designed light
|
|
34
|
+
theme via `[data-theme="light"]` (never `filter: invert`). Every color is a
|
|
35
|
+
CSS custom property; components never carry a raw hex.
|
|
36
|
+
- **Type**: a 1.25 modular scale with fluid `clamp()` values, role-differentiated
|
|
37
|
+
line-heights, and optical tracking.
|
|
38
|
+
- **Space**: a 4px base unit tuned for data density.
|
|
39
|
+
- **Motion**: cubic-bezier easing matched to the metaphor, a duration scale, and
|
|
40
|
+
full reduced-motion support. No linear easing, no `transition: all`.
|
|
41
|
+
|
|
42
|
+
## Quality contract
|
|
43
|
+
|
|
44
|
+
This preset is built to clear the QA-Visual rubric
|
|
45
|
+
(`chati.dev/data/qa-rubrics.yaml`) on every dimension: layout, typography, color,
|
|
46
|
+
spacing, interaction, motion, accessibility (WCAG 2.1 AA), and performance
|
|
47
|
+
(animate only `transform` and `opacity`).
|
|
48
|
+
|
|
49
|
+
## Dependencies
|
|
50
|
+
|
|
51
|
+
`lucide-react` (icons) and `framer-motion` (micro-interactions). The chart and
|
|
52
|
+
the command palette are hand-rolled, so there is no chart library and no command
|
|
53
|
+
menu dependency.
|
|
54
|
+
|
|
55
|
+
## Brandable
|
|
56
|
+
|
|
57
|
+
The accent color (`ACCENT_HEX`, `ACCENT_HOVER_HEX`) is resolved at apply time
|
|
58
|
+
from your brand source. The neutral and semantic scales are the designed system.
|