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.
- package/README.md +18 -13
- package/bin/chati.js +12 -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 +58 -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/orchestrator/chati-router.js +1 -1
- package/framework/orchestrator/chati-update.md +19 -3
- package/framework/orchestrator/chati.md +19 -1
- 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 +3 -3
- 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 +2 -1
- package/src/installer/templates.js +5 -6
- package/src/intelligence/registry-manager.js +1 -1
- 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 +1 -1
- package/src/memory/session-digest.js +9 -4
- package/src/orchestrator/cli.js +174 -14
- 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-team.js +3 -3
- package/src/upgrade/tracked-files-detector.js +34 -16
- package/src/utils/feature-flags.js +1 -1
- 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,192 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* layout.tsx -- Root App Router Layout
|
|
3
|
+
* ============================================================
|
|
4
|
+
* WHY THIS FILE EXISTS
|
|
5
|
+
* --------------------
|
|
6
|
+
* Next.js App Router requires a root layout.tsx to wrap every
|
|
7
|
+
* route in the application. This file is the outermost server
|
|
8
|
+
* component and is responsible for exactly three concerns:
|
|
9
|
+
*
|
|
10
|
+
* 1. HTML document frame: <html> and <body> with the correct
|
|
11
|
+
* lang attribute, data-theme attribute (dark by default),
|
|
12
|
+
* and font CSS variables injected by next/font.
|
|
13
|
+
*
|
|
14
|
+
* 2. Font loading: Inter Variable (sans) and JetBrains Mono
|
|
15
|
+
* Variable (mono) are loaded via next/font/google so they
|
|
16
|
+
* are self-hosted, subset, and swap-safe. Font-feature-
|
|
17
|
+
* settings are applied to Inter to enable optical kerning
|
|
18
|
+
* (calt), stylistic sets for cleaner numerals (cv02, cv03,
|
|
19
|
+
* cv04), and tabular figures (tnum) for aligned metric
|
|
20
|
+
* columns in the dashboard.
|
|
21
|
+
*
|
|
22
|
+
* 3. Provider mounting: AppShell wraps all children. It owns
|
|
23
|
+
* the SidebarContext, the responsive grid, and the sticky
|
|
24
|
+
* Topbar. No layout logic lives in this file -- it
|
|
25
|
+
* delegates entirely to AppShell.
|
|
26
|
+
*
|
|
27
|
+
* DECISIONS
|
|
28
|
+
* ---------
|
|
29
|
+
* - data-theme='dark' is set on <html>. The ThemeToggle client
|
|
30
|
+
* component flips this attribute and persists the preference
|
|
31
|
+
* to localStorage. The server renders dark by default so
|
|
32
|
+
* there is no flash-of-unstyled-content on first paint.
|
|
33
|
+
*
|
|
34
|
+
* - Viewport meta is omitted here because Next.js App Router
|
|
35
|
+
* exports it via the `viewport` export (see below). Setting
|
|
36
|
+
* it in both places would cause a conflict.
|
|
37
|
+
*
|
|
38
|
+
* - globals.css is imported here (the single import point).
|
|
39
|
+
* Every other file receives token access via CSS custom
|
|
40
|
+
* properties; no component file imports globals.css again.
|
|
41
|
+
*
|
|
42
|
+
* - The <body> receives the Inter Variable class from next/font
|
|
43
|
+
* which injects --font-sans onto :root automatically when
|
|
44
|
+
* used with `variable` mode. This aligns with the token
|
|
45
|
+
* --font-sans defined in globals.css.
|
|
46
|
+
*
|
|
47
|
+
* WHAT THIS FILE DOES NOT DO
|
|
48
|
+
* --------------------------
|
|
49
|
+
* - It does not contain any interactive logic (it is a server
|
|
50
|
+
* component).
|
|
51
|
+
* - It does not set max-width or horizontal padding (Container
|
|
52
|
+
* is the sole authority for those).
|
|
53
|
+
* - It does not manage scroll position or focus (AppShell and
|
|
54
|
+
* individual route pages own those concerns).
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
import React from 'react';
|
|
58
|
+
import type { Metadata, Viewport } from 'next'
|
|
59
|
+
import { Inter, JetBrains_Mono } from 'next/font/google'
|
|
60
|
+
import './globals.css'
|
|
61
|
+
import './shell.css'
|
|
62
|
+
import { AppShell } from '@/components/shell/AppShell'
|
|
63
|
+
import { SidebarProvider } from '@/components/shell/SidebarContext'
|
|
64
|
+
import { CommandPaletteProvider } from '@/components/interaction/CommandPalette'
|
|
65
|
+
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
67
|
+
// Font configuration
|
|
68
|
+
// ---------------------------------------------------------------------------
|
|
69
|
+
// Inter Variable: the primary sans-serif typeface. We load the full variable
|
|
70
|
+
// axis (wght 100-900) so we can use all weight steps defined in our type
|
|
71
|
+
// scale without separate file requests. The `variable` option emits a CSS
|
|
72
|
+
// custom property (--font-inter) that we reference in globals.css.
|
|
73
|
+
// Subsets: latin is sufficient for the initial target market; add 'latin-ext'
|
|
74
|
+
// when supporting Eastern European locales.
|
|
75
|
+
const inter = Inter({
|
|
76
|
+
subsets: ['latin'],
|
|
77
|
+
axes: ['opsz'], // optical size axis for refined rendering at display sizes
|
|
78
|
+
variable: '--font-inter',
|
|
79
|
+
display: 'swap',
|
|
80
|
+
preload: true,
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
// JetBrains Mono Variable: used for code blocks, metric displays, and any
|
|
84
|
+
// tabular numeric context. Loaded lighter (wght 400-700 range) to keep the
|
|
85
|
+
// font bundle small. The `variable` option emits --font-jetbrains-mono.
|
|
86
|
+
const jetbrainsMono = JetBrains_Mono({
|
|
87
|
+
subsets: ['latin'],
|
|
88
|
+
variable: '--font-jetbrains-mono',
|
|
89
|
+
display: 'swap',
|
|
90
|
+
preload: false, // mono is not render-blocking for the initial paint
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
// ---------------------------------------------------------------------------
|
|
94
|
+
// Static metadata
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
// These values are the application defaults. Individual route segments can
|
|
97
|
+
// override them via their own `export const metadata` declarations.
|
|
98
|
+
export const metadata: Metadata = {
|
|
99
|
+
title: {
|
|
100
|
+
template: '%s | Dashboard',
|
|
101
|
+
default: 'Dashboard',
|
|
102
|
+
},
|
|
103
|
+
description: 'Your application dashboard.',
|
|
104
|
+
robots: {
|
|
105
|
+
index: false, // dashboards are authenticated; never indexed
|
|
106
|
+
follow: false,
|
|
107
|
+
},
|
|
108
|
+
// Open Graph is intentionally minimal for an authenticated product.
|
|
109
|
+
// Marketing pages in a separate route group would carry richer OG tags.
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
// Viewport configuration
|
|
114
|
+
// ---------------------------------------------------------------------------
|
|
115
|
+
// Setting width=device-width and initial-scale=1 ensures the layout renders
|
|
116
|
+
// correctly on mobile devices. interactiveWidget prevents the virtual
|
|
117
|
+
// keyboard from resizing the viewport (resizes-visual keeps the layout
|
|
118
|
+
// stable when a mobile keyboard opens inside a form field).
|
|
119
|
+
export const viewport: Viewport = {
|
|
120
|
+
width: 'device-width',
|
|
121
|
+
initialScale: 1,
|
|
122
|
+
themeColor: [
|
|
123
|
+
{ media: '(prefers-color-scheme: dark)', color: '#0f1420' },
|
|
124
|
+
{ media: '(prefers-color-scheme: light)', color: '#f7f8fa' },
|
|
125
|
+
],
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// ---------------------------------------------------------------------------
|
|
129
|
+
// Root layout component
|
|
130
|
+
// ---------------------------------------------------------------------------
|
|
131
|
+
export default function RootLayout({
|
|
132
|
+
children,
|
|
133
|
+
}: {
|
|
134
|
+
children: React.ReactNode
|
|
135
|
+
}) {
|
|
136
|
+
return (
|
|
137
|
+
<html
|
|
138
|
+
lang="en"
|
|
139
|
+
// Dark theme is the designed default for this dashboard preset.
|
|
140
|
+
// ThemeToggle (client component) will update this attribute on
|
|
141
|
+
// the fly and persist the user's choice to localStorage.
|
|
142
|
+
data-theme="dark"
|
|
143
|
+
// Suppress hydration warning: ThemeToggle reads localStorage on
|
|
144
|
+
// mount and may update data-theme, causing a server/client
|
|
145
|
+
// mismatch. Suppressing at the html element is the conventional
|
|
146
|
+
// Next.js pattern for theme persistence without a flash.
|
|
147
|
+
suppressHydrationWarning
|
|
148
|
+
className={`${inter.variable} ${jetbrainsMono.variable}`}
|
|
149
|
+
>
|
|
150
|
+
<head>
|
|
151
|
+
{/*
|
|
152
|
+
* Font-feature-settings for Inter: injected as a global style so
|
|
153
|
+
* it applies as early as possible. We enable:
|
|
154
|
+
* calt -- contextual alternates (optical kerning pairs)
|
|
155
|
+
* cv02 -- alternate figure style (cleaner '1')
|
|
156
|
+
* cv03 -- alternate figure style (open '6' and '9')
|
|
157
|
+
* cv04 -- alternate figure style (open '4')
|
|
158
|
+
* tnum -- tabular figures (monospaced width numbers for columns)
|
|
159
|
+
* These features are non-layout-shifting so they are safe to
|
|
160
|
+
* apply globally; they do not affect glyph advance widths except
|
|
161
|
+
* where tnum is used (columns automatically align).
|
|
162
|
+
*/}
|
|
163
|
+
<style>{`
|
|
164
|
+
:root {
|
|
165
|
+
--font-sans: var(--font-inter), system-ui, -apple-system, sans-serif;
|
|
166
|
+
--font-mono: var(--font-jetbrains-mono), ui-monospace, 'Cascadia Code', monospace;
|
|
167
|
+
}
|
|
168
|
+
body {
|
|
169
|
+
font-family: var(--font-sans);
|
|
170
|
+
font-feature-settings: 'calt' 1, 'cv02' 1, 'cv03' 1, 'cv04' 1;
|
|
171
|
+
}
|
|
172
|
+
code, pre, kbd, samp, .tabular-nums {
|
|
173
|
+
font-family: var(--font-mono);
|
|
174
|
+
font-feature-settings: 'tnum' 1;
|
|
175
|
+
}
|
|
176
|
+
`}</style>
|
|
177
|
+
</head>
|
|
178
|
+
<body>
|
|
179
|
+
{/*
|
|
180
|
+
* SidebarProvider wraps the entire shell so any component in the
|
|
181
|
+
* tree can read or modify collapse state without prop drilling.
|
|
182
|
+
* AppShell consumes SidebarContext to build the responsive grid.
|
|
183
|
+
*/}
|
|
184
|
+
<SidebarProvider>
|
|
185
|
+
<CommandPaletteProvider>
|
|
186
|
+
<AppShell>{children}</AppShell>
|
|
187
|
+
</CommandPaletteProvider>
|
|
188
|
+
</SidebarProvider>
|
|
189
|
+
</body>
|
|
190
|
+
</html>
|
|
191
|
+
)
|
|
192
|
+
}
|