chati-dev 4.0.1 → 4.0.3

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 (44) hide show
  1. package/framework/agents/build/dev.md +118 -26
  2. package/framework/agents/plan/ux.md +411 -8
  3. package/framework/config.yaml +3 -3
  4. package/framework/constitution.md +4 -3
  5. package/framework/domains/agents/architect.yaml +1 -3
  6. package/framework/domains/agents/brief.yaml +1 -1
  7. package/framework/domains/agents/brownfield-wu.yaml +2 -2
  8. package/framework/domains/agents/detail.yaml +1 -1
  9. package/framework/domains/agents/devops.yaml +2 -4
  10. package/framework/domains/agents/greenfield-wu.yaml +2 -2
  11. package/framework/domains/agents/phases.yaml +1 -1
  12. package/framework/domains/agents/qa-implementation.yaml +4 -6
  13. package/framework/domains/agents/qa-planning.yaml +7 -10
  14. package/framework/domains/agents/tasks.yaml +1 -1
  15. package/framework/domains/agents/ux.yaml +21 -3
  16. package/framework/domains/constitution.yaml +4 -4
  17. package/framework/domains/global.yaml +1 -1
  18. package/framework/intelligence/context-engine.md +1 -1
  19. package/framework/templates/brandbook-tmpl.yaml +40 -0
  20. package/framework/templates/component-spec-tmpl.yaml +50 -3
  21. package/package.json +2 -2
  22. package/src/api/index.js +10 -19
  23. package/src/autonomy/build-loop.js +1 -1
  24. package/src/autonomy/cause-analyzer.js +1 -1
  25. package/src/autonomy/worktree-manager.js +7 -2
  26. package/src/config/agent-customizer.js +1 -5
  27. package/src/config/context-file-generator.js +1 -1
  28. package/src/context/bracket-tracker.js +2 -13
  29. package/src/decision/engine.js +4 -0
  30. package/src/health/auto-fix.js +1 -1
  31. package/src/installer/core.js +8 -1
  32. package/src/intelligence/context-status.js +2 -17
  33. package/src/intelligence/decision-engine.js +5 -2
  34. package/src/intelligence/timeline.js +1 -1
  35. package/src/merger/semantic-merger.js +1 -1
  36. package/src/orchestrator/pipeline-manager.js +33 -46
  37. package/src/quality/metrics-collector.js +0 -2
  38. package/src/telemetry/config.js +2 -2
  39. package/src/telemetry/schema.js +1 -1
  40. package/src/terminal/isolation.js +10 -1
  41. package/src/terminal/prompt-builder.js +77 -9
  42. package/src/utils/brackets.js +29 -0
  43. package/src/utils/event-bus.js +1 -1
  44. package/src/utils/provider-limits.js +13 -0
@@ -193,7 +193,28 @@ Layer 4 — Component Patterns (Atomic Design):
193
193
  Templates:
194
194
  Page layouts with placeholder regions
195
195
 
196
- Layer 5 — Tokenization Audit:
196
+ Layer 5 — Motion System Tokens:
197
+ Duration scale:
198
+ --motion-duration-instant: 100ms (micro-feedback, button press)
199
+ --motion-duration-fast: 200ms (hover, focus ring transitions)
200
+ --motion-duration-normal: 350ms (section reveals, card entrance)
201
+ --motion-duration-slow: 600ms (page transitions, modal open)
202
+ --motion-duration-scenic: 1200ms (hero animations, ambient effects)
203
+
204
+ Easing presets:
205
+ --motion-ease-standard: cubic-bezier(0.4, 0.0, 0.2, 1) (default — most transitions)
206
+ --motion-ease-decelerate: cubic-bezier(0.0, 0.0, 0.2, 1) (entering elements)
207
+ --motion-ease-accelerate: cubic-bezier(0.4, 0.0, 1, 1) (exiting elements)
208
+ --motion-ease-spring: spring(stiffness: 400, damping: 28) (interactive, snappy)
209
+ --motion-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1) (playful UI)
210
+
211
+ Animation personality (inherits from Directive 4 visual direction):
212
+ Energetic: fast durations, spring easing, stagger 0.05s
213
+ Elegant: slow durations, decelerate easing, no bounce
214
+ Minimal: instant/fast only, opacity-only reveals
215
+ Playful: bounce easing, stagger 0.08s, scale transforms
216
+
217
+ Layer 6 — Tokenization Audit:
197
218
  Run Directive 2 tokenization completeness check
198
219
  Report coverage percentages
199
220
  Zero hardcoded values is the target
@@ -245,9 +266,15 @@ Criteria (binary pass/fail):
245
266
  12. Tokenization coverage >= 95% — no hardcoded visual values (Directive 2)
246
267
  13. Reference benchmarking completed OR explicitly waived by user (Directive 3)
247
268
  14. Visual direction is unique — font pairing, color palette, and layout archetype differ from permanent references and recent projects (Directive 4)
269
+ 15. Layout diversity verified — no two consecutive sections share the same grid structure, minimum 2 layout archetypes per page (Directive 5A/5D)
270
+ 16. All interactive components specify full state coverage (interactive + input + data view states as applicable) (Directive 5E)
271
+ 17. Zero banned placeholder content — no lorem ipsum, no "John Doe", domain-realistic sample data used (Directive 5F)
272
+ 18. All animations use GPU-only properties (transform/opacity) with reduced-motion alternatives (Directive 5G)
273
+ 19. Motion System defined: library specified by stack, animation tokens in Design System Layer 5, scroll animations + micro-interactions catalogued, reduced-motion alternatives provided (Directive 6)
274
+ 20. Component Discovery Log complete: EVERY Molecule and Organism in the component map has an entry in the Discovery Log with status (ADOPTED/ADAPTED/CUSTOM) and source or rationale. Any component with no log entry = FAIL for this criterion. Zero silent skips. (Directive 7)
248
275
 
249
276
  Score = criteria met / total criteria
250
- Threshold: >= 93% (13/14 minimum)
277
+ Threshold: >= 90% (standard agent tier, 18/20 target)
251
278
  ```
252
279
 
253
280
  ---
@@ -257,6 +284,7 @@ Threshold: >= 93% (13/14 minimum)
257
284
  ### Artifacts
258
285
  1. Save to: `chati.dev/artifacts/4-UX/ux-specification.md`
259
286
  2. Save to: `chati.dev/artifacts/4-UX/reference-analysis.md` (if reference URLs provided)
287
+ 3. Save to: `chati.dev/artifacts/4-UX/component-discovery-log.md` **(mandatory — criterion #20)**
260
288
 
261
289
  ```markdown
262
290
  # UX Specification — {Project Name}
@@ -340,6 +368,21 @@ Threshold: >= 93% (13/14 minimum)
340
368
  ## 7. Responsive Strategy
341
369
  {Breakpoints, layout behavior per breakpoint}
342
370
 
371
+ ## 8. Component Discovery Log
372
+ <!-- MANDATORY (Directive 7) — every Molecule and Organism must have an entry. -->
373
+ <!-- Missing entry = criterion #20 FAILS. Zero silent skips allowed. -->
374
+
375
+ | Component | Level | Status | Source / Rationale |
376
+ |-----------|-------|--------|--------------------|
377
+ | {name} | Molecule | ADOPTED | 21st.dev: {component-name} — {URL} |
378
+ | {name} | Molecule | ADAPTED | 21st.dev: {component-name} — customized {what changed} |
379
+ | {name} | Organism | CUSTOM | Not found on 21st.dev — {reason why custom was needed} |
380
+
381
+ Status legend:
382
+ - **ADOPTED**: Used as-is with only token/color adaptation
383
+ - **ADAPTED**: Pattern reused, significant structural customization
384
+ - **CUSTOM**: Not found (or <50% match) — designed from scratch with documented rationale
385
+
343
386
  ## Traceability
344
387
  | Brief User Need | UX Decision |
345
388
  |-----------------|-------------|
@@ -354,7 +397,7 @@ agents:
354
397
  ux:
355
398
  status: completed
356
399
  score: {calculated}
357
- criteria_count: 14
400
+ criteria_count: 20
358
401
  completed_at: "{timestamp}"
359
402
  current_agent: phases
360
403
  ```
@@ -420,10 +463,11 @@ Rules:
420
463
  | `wireframe` | Wireframe | Create text-based wireframes for all key screens identified in the Brief and PRD | Auto on activation |
421
464
  | `user-flow` | User Flow Mapping | Map primary and secondary user journeys for each persona, including happy and error paths | After wireframe |
422
465
  | `ref-benchmark` | Reference Benchmarking | Analyze user-provided reference URLs for visual quality patterns, produce reference-analysis.md (Directive 3) | Before component-map |
423
- | `component-map` | Component Mapping | Identify reusable UI components using Atomic Design hierarchy (atoms, molecules, organisms), map to Design System, prioritize reuse | After user-flow + ref-benchmark |
466
+ | `ref-component-discovery` | Component Discovery | Search 21st.dev for existing component patterns for all Molecules and Organisms identified in user flows (Directive 7) | After user-flow, before component-map |
467
+ | `component-map` | Component Mapping | Identify reusable UI components using Atomic Design hierarchy (atoms, molecules, organisms), map to Design System, prioritize reuse | After user-flow + ref-benchmark + ref-component-discovery |
424
468
  | `a11y-check` | Accessibility Check | Validate all flows and components against WCAG 2.1 AA requirements, keyboard navigation, screen reader support | After component-map |
425
469
  | `token-audit` | Tokenization Audit | Verify 100% tokenization coverage — zero hardcoded values, all icons from approved libraries (Directives 1 & 2) | After a11y-check |
426
- | `ux-consolidate` | Consolidate UX Spec | Compile all UX artifacts into the final specification document and run self-validation (14 criteria) | After all above |
470
+ | `ux-consolidate` | Consolidate UX Spec | Compile all UX artifacts into the final specification document and run self-validation (20 criteria) | After all above |
427
471
 
428
472
  ---
429
473
 
@@ -633,6 +677,52 @@ The 5 permanent references define the **quality floor**, not the **visual identi
633
677
  | **Animation personality** | Motion character | Energetic (Lando: fast reveals, marquees), Elegant (ERTQA: slow blur transitions), Minimal (Magic5: restraint-first), Playful (bouncy easings, staggered entries) |
634
678
  | **Visual depth strategy** | How depth is conveyed | Glassmorphism (blur+transparency), Neumorphism (soft shadows), Flat+elevation (material), Layered gradients, Cutout/mask-driven |
635
679
  | **Spacing rhythm** | Vertical flow pattern | Dense (SaaS dashboards), Generous (luxury brands), Asymmetric (editorial), Modular (grid-locked) |
680
+ | **UI Style** | Named visual archetype | See catalogue below |
681
+
682
+ #### UI Style Catalogue (20 named archetypes)
683
+
684
+ Each project MUST select a named style from this catalogue as part of the 3 visual direction options:
685
+
686
+ | # | Style | Character | Best for |
687
+ |---|-------|-----------|---------|
688
+ | 1 | **Glass Morphism** | Frosted glass layers, backdrop-filter blur, semi-transparent cards | Dark-mode SaaS, AI tools, dashboards |
689
+ | 2 | **Neumorphism** | Soft shadow extrusions, pastel backgrounds, tactile feel | Fintech apps, control panels |
690
+ | 3 | **Brutalism** | Raw grid, heavy borders, high contrast, monospace accents | Creative agencies, portfolios, editorial |
691
+ | 4 | **Claymorphism** | 3D soft shapes, pastel fills, inner shadows, rounded | EdTech, consumer apps, playful brands |
692
+ | 5 | **Bento Grid** | Magazine-style card layout, varied cell sizes, contained sections | SaaS marketing, portfolios, landing pages |
693
+ | 6 | **AI-Native UI** | Terminal aesthetics, monospace type, data-forward, ambient glow | AI products, dev tools, technical SaaS |
694
+ | 7 | **Aurora** | Animated gradient backgrounds, color shift, depth through light | Web3, creative studios, entertainment |
695
+ | 8 | **Minimal Edge** | Extreme whitespace, hairline borders, micro-typography, restraint | Luxury brands, high-end products |
696
+ | 9 | **Dark Luxury** | Deep backgrounds, gold/copper accents, layered shadows | Premium services, financial products |
697
+ | 10 | **Corporate Trust** | Blue+grey palette, conservative layout, credential signals | B2B, legal, enterprise, professional services |
698
+ | 11 | **Editorial** | Newspaper-inspired, serif display dominance, ink aesthetics | Media, publishing, content-first products |
699
+ | 12 | **Retro Futurism** | VHS grid overlays, neon accents, CRT effects, 80s nostalgia | Gaming, entertainment, cult brands |
700
+ | 13 | **Organic Flow** | Rounded shapes, nature-inspired palette, fluid curves | Wellness, food, sustainability brands |
701
+ | 14 | **Dashboard Pro** | Dense information, compact spacing, utility-first, tabular data | Analytics, operations, monitoring tools |
702
+ | 15 | **Scrollytelling** | Full-bleed sections, narrative progression, cinematic | Product launches, brand stories, case studies |
703
+ | 16 | **Split Panel** | 50/50 layouts, strong contrast between halves, dual narrative | SaaS comparisons, onboarding, feature demos |
704
+ | 17 | **Gradient Mesh** | CSS mesh gradient backgrounds, vibrant depth, glowing elements | Crypto, Web3, modern SaaS |
705
+ | 18 | **Code & Docs** | Monospace dominant, code-first aesthetic, technical precision | Developer tools, documentation sites |
706
+ | 19 | **Motion-First** | Animation as primary design element, kinetic typography | Agencies, interactive portfolios |
707
+ | 20 | **Accessible First** | High contrast, dyslexia-friendly fonts, maximum clarity | Healthcare, government, inclusive products |
708
+
709
+ #### Industry-Specific Palette Reasoning
710
+
711
+ Before proposing color options, identify the project's industry from the Brief and apply the
712
+ corresponding palette logic. Primary color must be justified against this reasoning.
713
+
714
+ | Industry | Palette Logic | Primary Range | Accent | Avoid |
715
+ |---------|--------------|---------------|--------|-------|
716
+ | FinTech / Banking | Trust-first, restraint, authority | Navy (#1e3a5f), Deep Blue (#0d2137), Slate (#334155) | Gold (#d4af37), Copper (#b87333) | Neons, oversaturation |
717
+ | Healthcare / MedTech | Clinical precision, calm, approachable | Clean White (#f8fafc), Teal (#0d9488), Sage (#6b7c6e) | Warm Green (#10b981) | Red primary (medical emergency connotation) |
718
+ | E-commerce / Retail | Action-forward, warm, aspirational | Warm Neutral (#f5f0eb), Brand-specific | High-contrast CTA accent | Cool blues as only palette (retail = warmth) |
719
+ | SaaS B2B | Capability, reliability, professional | Cool Blue (#3b82f6 ok WITH justification), Purple (#7c3aed) | Neutral grey | Playful pastels without brand rationale |
720
+ | Creative Agency | Experimental, unique per project | No defaults — derive from project personality | Unexpected accents | Safe/generic choices |
721
+ | Gaming / Entertainment | Energy, immersion, excitement | Dark backgrounds (#0a0a0a, #0f172a) + saturated primaries | Neon accents (justified) | Muted, low-energy palettes |
722
+ | EdTech | Friendly, encouraging, accessible | Warm whites, friendly blue or green | Warm accent (orange, yellow) | Cold corporate blues without warmth |
723
+ | Legal / Enterprise | Conservative, credibility, permanence | Navy, charcoal (#1f2937), warm grey | Restrained gold or teal | Trendy styles without conservative justification |
724
+ | Wellness / Health | Calm, natural, healing | Sage (#6b7280), Warm white, Soft green | Earth tones | Harsh contrast, neons |
725
+ | Web3 / Crypto | Futurism, technical, community | Dark (#0f0f23), Purple (#7c3aed), Teal | Electric accents | Corporate blue, conventional palettes |
636
726
 
637
727
  - **Variance enforcement process**:
638
728
  1. Before starting Phase 4, the agent reads the **Brief** to extract: project type, industry, target audience, brand personality, and competitive landscape
@@ -664,12 +754,325 @@ The 5 permanent references define the **quality floor**, not the **visual identi
664
754
 
665
755
  - **Font pool** — curated premium fonts for rotation (not exhaustive, agent may suggest others):
666
756
 
667
- **Display fonts**: Satoshi, Brier, Cabinet Grotesk, Clash Display, Space Grotesk, Sora, Outfit, Plus Jakarta Sans, General Sans, Switzer, Erode, Zodiak, Gambetta, Author
668
-
669
- **Body fonts**: Inter, Mona, DM Sans, General Sans, Switzer, Outfit, Plus Jakarta Sans, Geist, Geist Mono (code), JetBrains Mono (code), Source Serif 4 (editorial)
757
+ **Display fonts** (25 options rotation pool for projects):
758
+ Satoshi, Brier, Cabinet Grotesk, Clash Display, Space Grotesk, Sora, Outfit, Plus Jakarta Sans,
759
+ General Sans, Switzer, Erode, Zodiak, Gambetta, Author, Neue Montreal, Mabry Pro, Agrandir,
760
+ Neue World, Tobias, Freight Display, Cardinal Fruit, GT Walsheim, Founders Grotesk,
761
+ Instrument Serif, Literata Display
762
+
763
+ **Body fonts** (18 options — rotation pool):
764
+ Inter, Mona, DM Sans, General Sans, Switzer, Outfit, Plus Jakarta Sans, Geist, Geist Mono (code),
765
+ JetBrains Mono (code), Source Serif 4 (editorial), IBM Plex Sans, Figtree, Manrope,
766
+ Libre Franklin, Public Sans, Instrument Sans, Spectral (editorial)
767
+
768
+ **Font x Industry pairing guidance**:
769
+ - FinTech: Neue Montreal + IBM Plex Sans
770
+ - Healthcare: Plus Jakarta Sans + Instrument Sans
771
+ - Creative Agency: Clash Display + General Sans (or Erode + Mona)
772
+ - EdTech: Sora + Figtree
773
+ - Enterprise SaaS: Cabinet Grotesk + Inter
774
+ - Editorial/Media: Literata Display + Source Serif 4
775
+ - AI Tools: Space Grotesk + Geist Mono
776
+ - E-commerce: Outfit + Manrope
670
777
 
671
778
  All fonts must be available via Google Fonts, Fontshare, or self-hostable with open/free license. Never specify a font the project cannot legally use.
672
779
 
780
+ ### Directive 5: Anti-Bias Protocol — Counteracting Default AI Design Tendencies
781
+
782
+ LLMs have documented biases when generating visual designs. This directive explicitly counteracts each known bias category. Every rule is binary (pass/fail) and checked during self-validation.
783
+
784
+ #### 5A. Layout Bias Correction
785
+
786
+ **BANNED patterns**:
787
+ - Centered single-column layouts for entire pages
788
+ - Identical card grids as the default composition for every section
789
+ - Symmetrical hero sections with centered headline + centered CTA
790
+ - Uniform section heights across all page sections
791
+
792
+ **REQUIRED instead**:
793
+ - At least 2 distinct layout structures per page (e.g., sidebar + content, asymmetric grid, split-screen, dashboard panels)
794
+ - No two consecutive sections on the same page may use the same grid structure
795
+ - Each page must declare its layout archetype in the UX specification (scrollytelling, editorial, dashboard, split-panel, etc.)
796
+
797
+ #### 5B. Color Bias Correction
798
+
799
+ **BANNED palettes**:
800
+ - Oversaturated primaries (#0066FF electric blue, #00CC00 neon green, #FF0000 pure red)
801
+ - Generic SaaS blue (#3B82F6 / Tailwind blue-500) as primary without brandbook justification
802
+ - Neon accent colors without luminance balancing
803
+ - Palettes with fewer than 5 neutral steps
804
+
805
+ **REQUIRED instead**:
806
+ - Primary color must be justified in the brandbook with emotional/functional rationale
807
+ - Neutral scale must have minimum 9 steps (50-900)
808
+ - No primary color with HSL saturation > 80% unless explicitly documented as brand requirement
809
+ - All accent colors must pass WCAG AA contrast against their intended background
810
+
811
+ #### 5C. Typography Bias Correction
812
+
813
+ **BANNED as sole/default choice**:
814
+ - Inter, Roboto, Open Sans, or Lato as the ONLY font without brandbook rationale
815
+ - Same font family for both display and body text
816
+ - Only sans-serif fonts considered (serif and display fonts must be evaluated)
817
+
818
+ **REQUIRED instead**:
819
+ - Font pairing must include at least 2 distinct typefaces (display + body)
820
+ - Serif, slab-serif, and display options must be evaluated before defaulting to sans-serif
821
+ - Font selection rationale must appear in the brandbook (Phase 0)
822
+ - Reference the curated font pool from Directive 4 before selecting
823
+
824
+ #### 5D. Component Bias Correction
825
+
826
+ **BANNED repetitive patterns**:
827
+ - Identical 3-column card grids as the only data display pattern
828
+ - Uniform component density across all page regions
829
+ - Single interaction pattern for all data collections (e.g., always a card, never a table or list)
830
+
831
+ **REQUIRED instead**:
832
+ - Each data collection must evaluate 3 display options (cards, tables, lists, timelines, kanban) and justify the choice
833
+ - Component density must vary by context: compact for data-heavy areas, spacious for marketing/hero sections
834
+ - At least one unconventional layout pattern per project (masonry, staggered, bento grid, magazine)
835
+
836
+ #### 5E. States Coverage Enforcement
837
+
838
+ Every interactive component specification MUST include ALL applicable states:
839
+
840
+ | State Category | Required States | Applies To |
841
+ |---------------|----------------|------------|
842
+ | **Interactive** | default, hover, active, focus, disabled | Buttons, links, inputs, selects, checkboxes, toggles |
843
+ | **Input** | empty, filled, error, success, loading | Text fields, textareas, search bars, file uploads |
844
+ | **Data View** | populated, empty, loading, error, skeleton | Lists, tables, cards, dashboards, feeds |
845
+ | **Page** | loading, loaded, error, offline | Full pages, main content areas |
846
+
847
+ - "Happy path only" is a validation failure. Missing any required state category blocks self-validation.
848
+ - Empty states must include: illustration/icon, explanatory text, and a primary action CTA
849
+ - Error states must include: what went wrong, how to fix it, and a retry/alternative action
850
+ - Skeleton states must match the actual content layout (not generic pulsing rectangles)
851
+
852
+ #### 5F. Content Bias Correction (Anti-Slop)
853
+
854
+ **BANNED placeholder content**:
855
+ - "Lorem ipsum" or any Latin placeholder text
856
+ - "John Doe", "Jane Smith", "Acme Corp", "Example Inc" as sample data
857
+ - `https://example.com` or `placeholder.com` URLs
858
+ - Generic stock photo descriptions ("smiling business person", "team meeting")
859
+
860
+ **REQUIRED instead**:
861
+ - All wireframes and component examples must use domain-realistic content
862
+ - Sample data must match the project's actual domain (e.g., a medical app uses patient-like names, a finance app uses realistic transaction data)
863
+ - Photo/image placeholders must describe the specific subject and mood: "close-up of engineer inspecting circuit board, warm lighting, shallow depth of field"
864
+ - User avatars must show diversity in representation
865
+
866
+ #### 5G. Animation Performance Guardrails
867
+
868
+ - Maximum animation duration: 750ms for transitions, 1500ms for page-level animations
869
+ - **GPU-only properties**: animate ONLY `transform` and `opacity`. NEVER animate `width`, `height`, `top`, `left`, `margin`, `padding` (these trigger layout reflow)
870
+ - Always specify `will-change` for animated elements
871
+ - Provide `prefers-reduced-motion` alternative for every animation (either disable or reduce to opacity-only)
872
+ - No animation on elements smaller than 32x32px (imperceptible motion)
873
+ - Easing: always cubic-bezier or spring. NEVER `linear` for UI transitions (linear looks mechanical)
874
+
875
+ ### Directive 6: Motion System — Professional Animation by Default
876
+
877
+ Every project must have a Motion System. Static UIs without animation feel unfinished. This
878
+ directive specifies the library, tokens, mandatory patterns, and performance rules.
879
+
880
+ #### 6A. Motion Library Selection (by tech stack)
881
+
882
+ | Stack | Library | Import |
883
+ |-------|---------|--------|
884
+ | React / Next.js | `motion` (formerly framer-motion) | `import { motion, AnimatePresence, useScroll, useTransform } from 'motion/react'` |
885
+ | Vue 3 | `@vueuse/motion` | `import { useMotion } from '@vueuse/motion'` |
886
+ | Svelte | Native `svelte/transition` + CSS | `import { fade, fly, scale } from 'svelte/transition'` |
887
+ | Plain HTML/CSS | CSS animations + Scroll Timeline | `@keyframes`, `animation`, `scroll-timeline` |
888
+ | React Native | `react-native-reanimated` | `import Animated from 'react-native-reanimated'` |
889
+
890
+ **RULE**: Always specify the motion library in the Design System section. The Dev agent must use
891
+ the library specified here — not a different one.
892
+
893
+ #### 6B. Animation Token Layer (Design System Layer 5)
894
+
895
+ Every animation value in the Design System MUST use named tokens from the motion token layer.
896
+ Zero hardcoded durations, zero hardcoded easing strings in component specifications.
897
+
898
+ Token layer defined in Phase 4 Layer 5.
899
+
900
+ #### 6C. Mandatory Micro-Interactions
901
+
902
+ Every project MUST specify these micro-interactions in the component definitions:
903
+
904
+ | Component | Animation | Token |
905
+ |-----------|-----------|-------|
906
+ | Button (primary) | `scale(1.02)` on hover, `scale(0.98)` on press | `--motion-duration-fast`, `--motion-ease-spring` |
907
+ | Card / List item | `translateY(-4px)` + shadow elevation increase on hover | `--motion-duration-normal`, `--motion-ease-decelerate` |
908
+ | Link / Nav item | opacity shift + underline `scaleX(0->1)` on hover | `--motion-duration-fast`, `--motion-ease-standard` |
909
+ | Form input focus | border-color transition + `scale(1.01)` focus ring | `--motion-duration-fast`, `--motion-ease-standard` |
910
+ | Toggle / Checkbox | `translateX` (toggle knob), `scale` (checkbox fill) | `--motion-duration-fast`, `--motion-ease-spring` |
911
+ | Modal / Drawer open | `opacity(0->1)` + `scale(0.95->1)` or `translateX` | `--motion-duration-normal`, `--motion-ease-decelerate` |
912
+ | Modal / Drawer close | `opacity(1->0)` + `scale(1->0.95)` | `--motion-duration-fast`, `--motion-ease-accelerate` |
913
+ | Notification / Toast | `translateY(-16px)` entrance + `opacity` exit | `--motion-duration-normal`, `--motion-ease-spring` |
914
+
915
+ For React/Next.js, implement with `motion` + `AnimatePresence`:
916
+ ```jsx
917
+ // Example: Button
918
+ <motion.button
919
+ whileHover={{ scale: 1.02 }}
920
+ whileTap={{ scale: 0.98 }}
921
+ transition={{ duration: 0.2, ease: [0.34, 1.56, 0.64, 1] }}
922
+ />
923
+ ```
924
+
925
+ #### 6D. Mandatory Scroll Animations
926
+
927
+ Every project with 2+ page sections MUST specify scroll-triggered animations:
928
+
929
+ | Pattern | Implementation | When to use |
930
+ |---------|---------------|-------------|
931
+ | Section reveal | `whileInView={{ opacity: 1, y: 0 }}` from `{ opacity: 0, y: 40 }` | Every above-fold section |
932
+ | Staggered list | `staggerChildren: 0.08` on parent `variants` | Lists, card grids, feature rows |
933
+ | Scroll progress bar | `scaleX` driven by `useScroll()` | Long-form pages, articles |
934
+ | Parallax hero element | `translateY` at 0.3x scroll speed | Hero sections, decorative elements |
935
+ | Counter/number reveal | Count up animation on `whileInView` | Stat sections |
936
+
937
+ **viewport config**: Always use `{ once: true, amount: 0.2 }` on `whileInView` for performance.
938
+
939
+ #### 6E. GPU Properties — Mandatory Enforcement
940
+
941
+ **ONLY these CSS properties may be animated** (no layout reflow):
942
+ - `transform` (translate, scale, rotate, skew — all GPU-composited)
943
+ - `opacity`
944
+ - `filter` and `backdrop-filter`
945
+ - `clip-path` (for reveal effects)
946
+
947
+ **NEVER animate**: `width`, `height`, `top`, `left`, `margin`, `padding`, `border-width`
948
+ (these trigger layout reflow and cause jank)
949
+
950
+ **Required for every animated element**:
951
+ ```css
952
+ will-change: transform; /* declare intent to browser */
953
+ ```
954
+
955
+ #### 6F. Reduced Motion
956
+
957
+ Every animation specification MUST include a reduced-motion alternative:
958
+ - Use `prefers-reduced-motion: reduce` media query in CSS
959
+ - In `motion/react`: use `useReducedMotion()` hook
960
+ - Fallback: disable all transforms, keep only opacity transitions at 150ms max
961
+
962
+ ```javascript
963
+ // React pattern
964
+ const shouldReduce = useReducedMotion();
965
+ const animationProps = shouldReduce
966
+ ? { opacity: 1 }
967
+ : { opacity: 1, y: 0 };
968
+ ```
969
+
970
+ **Animation personality** must be documented in the UX specification aligned with Directive 4's
971
+ visual direction selection:
972
+ - Energetic: fast + spring easing
973
+ - Elegant: slow + decelerate easing
974
+ - Minimal: opacity-only, no transforms beyond scale
975
+ - Playful: bounce easing, stagger, scale transforms
976
+
977
+ ### Directive 7: Component Discovery — 21st.dev First
978
+
979
+ Before designing any Molecule or Organism component from scratch, the UX agent MUST search
980
+ 21st.dev for an existing production-ready component that can be adapted.
981
+
982
+ **21st.dev** is an open-source registry of premium shadcn/ui-based React components (React 18+,
983
+ Tailwind CSS, Radix UI, MIT license). Quality bar: production-ready with TypeScript, dark mode,
984
+ accessibility, interactive demos, and Figma files.
985
+
986
+ #### 7A. Discovery Workflow (mandatory for Molecules and Organisms)
987
+
988
+ ```
989
+ For each Molecule or Organism in the component map:
990
+ 1. SEARCH 21st.dev for similar component (keywords: component name, category)
991
+ 2. IF found:
992
+ - Document: component name, URL, patterns observed
993
+ - ADAPT to match project Design System tokens (colors, spacing, typography)
994
+ - Document all adaptations made
995
+ - Mark component as: "Adapted from 21st.dev: {component-name}"
996
+ 3. IF NOT found:
997
+ - Design from scratch
998
+ - Document rationale: "Not found on 21st.dev — designed custom because: {reason}"
999
+ 4. NEVER copy code directly — the UX spec describes patterns, not implementation
1000
+ ```
1001
+
1002
+ #### 7B. Priority Search Categories
1003
+
1004
+ Search these categories on 21st.dev FIRST (highest reuse potential):
1005
+
1006
+ | Category | Examples | Priority |
1007
+ |----------|---------|----------|
1008
+ | Navigation | Navbars, sidebars, breadcrumbs, tabs, command palettes | Critical |
1009
+ | Data Display | Tables, lists, cards, kanban, timelines, calendars | Critical |
1010
+ | Forms & Inputs | Multi-step forms, comboboxes, date pickers, file uploads | High |
1011
+ | Feedback | Toasts, alerts, progress bars, skeletons, spinners | High |
1012
+ | Overlays | Modals, drawers, popovers, tooltips, dropdowns | High |
1013
+ | Marketing | Hero sections, pricing tables, testimonials, feature grids | Medium |
1014
+
1015
+ #### 7C. Reuse Decision Framework
1016
+
1017
+ | Situation | Decision | Action |
1018
+ |-----------|---------|--------|
1019
+ | Component found, 80%+ match | ADOPT + Adapt | Adapt tokens, document source |
1020
+ | Component found, 50-80% match | ADAPT | Use as pattern reference, customize layout |
1021
+ | Component found, <50% match | REVIEW | Check if decomposing works better |
1022
+ | Component not found | CREATE | Design from scratch, document rationale |
1023
+
1024
+ #### 7D. When 21st.dev is unavailable
1025
+
1026
+ If 21st.dev is unreachable (offline, network issue):
1027
+ - Proceed with component design from scratch
1028
+ - Mark ALL components as CUSTOM with rationale: "21st.dev unavailable — {reason}"
1029
+ - Note in handoff: "21st.dev lookup skipped — {reason}"
1030
+ - Agent MUST NOT block pipeline due to external resource unavailability
1031
+ - Criterion #20 still passes if ALL molecules/organisms have entries (even if all are CUSTOM)
1032
+
1033
+ #### 7E. Discovery Log Format (save to `component-discovery-log.md`)
1034
+
1035
+ ```markdown
1036
+ # Component Discovery Log — {Project Name}
1037
+
1038
+ Generated: {date}
1039
+ Total components: {N} ({M} Molecules, {K} Organisms)
1040
+ Discovery coverage: {X}/{N} (must be 100%)
1041
+
1042
+ ## Molecules
1043
+
1044
+ ### {ComponentName}
1045
+ - Status: ADOPTED | ADAPTED | CUSTOM
1046
+ - Source: {21st.dev URL} | N/A
1047
+ - Patterns observed: {what was reused}
1048
+ - Adaptations: {what was changed to match our tokens}
1049
+ - Rationale (if CUSTOM): {reason no existing component worked}
1050
+
1051
+ ## Organisms
1052
+
1053
+ ### {ComponentName}
1054
+ - Status: ADOPTED | ADAPTED | CUSTOM
1055
+ - Source: {21st.dev URL} | N/A
1056
+ - Patterns observed: {what was reused}
1057
+ - Adaptations: {what was changed to match our tokens}
1058
+ - Rationale (if CUSTOM): {reason no existing component worked}
1059
+
1060
+ ## Summary
1061
+ | Status | Count | % |
1062
+ |--------|-------|---|
1063
+ | ADOPTED | {n} | {%} |
1064
+ | ADAPTED | {n} | {%} |
1065
+ | CUSTOM | {n} | {%} |
1066
+ ```
1067
+
1068
+ **VALIDATION RULE**: Before marking criterion #20 as PASS, count entries in this log.
1069
+ Entry count MUST equal Molecule count + Organism count from the component map.
1070
+ If any component is missing an entry → criterion #20 = FAIL → do NOT proceed to handoff.
1071
+
1072
+ **RULE**: The goal is quality, not compliance. Adapting a premium component is better than
1073
+ designing a mediocre custom component. The minimum bar is: every Organism must show evidence
1074
+ of discovery (either found and adapted, or not found with documented rationale).
1075
+
673
1076
  ---
674
1077
 
675
1078
  ## Autonomous Behavior
@@ -1,8 +1,8 @@
1
1
  # chati.dev Configuration
2
- version: "4.0.1"
2
+ version: "4.0.3"
3
3
  installed_at: "2026-02-07T10:00:00Z"
4
- updated_at: "2026-03-18T00:00:00Z"
5
- installer_version: "4.0.1"
4
+ updated_at: "2026-03-21T00:00:00Z"
5
+ installer_version: "4.0.3"
6
6
  project_type: greenfield
7
7
  language: en
8
8
  ides: [claude-code]
@@ -62,14 +62,14 @@ Every agent in Chati.dev:
62
62
 
63
63
  ## Article II: Quality Standards
64
64
 
65
- 1. Every agent must achieve >= 95% on its self-defined success criteria before presenting results
65
+ 1. Every agent must achieve its tier-specific self-validation threshold before presenting results. Thresholds: QA agents >= 95%, standard agents >= 90%, discovery agents >= 85% (see Article XVII for gate-level thresholds)
66
66
  2. Quality is measured against concrete, binary (pass/fail) criteria — not subjective assessment
67
67
  3. QA-Planning validates planning artifact traceability AND the rigor of each agent's criteria
68
68
  4. QA-Implementation validates code quality, test coverage (>= 80%), and security (0 critical/high)
69
69
  5. Silent correction loops are invisible to the user except for brief status messages
70
70
  6. Maximum 3 correction loops per agent before escalating to user
71
71
 
72
- **Enforcement: BLOCK** — Results below 95% are never presented as final.
72
+ **Enforcement: BLOCK** — Results below the agent's tier threshold are never presented as final.
73
73
 
74
74
  ---
75
75
 
@@ -134,6 +134,7 @@ Every agent in Chati.dev:
134
134
  4. Accessibility (WCAG 2.1 AA) is a requirement, not a suggestion
135
135
  5. Design system audit is embedded in the UX agent's workflow
136
136
  6. Dev agent must consume design tokens — never hardcode visual values
137
+ 7. Component specifications must include full interactive and data view state coverage — happy-path-only specifications are incomplete
137
138
 
138
139
  **Enforcement: WARN** — Violations generate warnings in QA-Implementation.
139
140
 
@@ -480,5 +481,5 @@ When multiple CLI providers are enabled, the system SHALL coordinate agent execu
480
481
 
481
482
  ---
482
483
 
483
- *Chati.dev Constitution v4.0.0 — 19 Articles + Preamble*
484
+ *Chati.dev Constitution v4.0.1 — 19 Articles + Preamble*
484
485
  *All agents are bound by this Constitution. Violations are enforced per article.*
@@ -25,9 +25,7 @@ authority:
25
25
  redirectMessage: "Architecture is complete. Redirecting to dev agent for implementation."
26
26
 
27
27
  outputs:
28
- - architecture.yaml
29
- - api-spec.yaml
30
- - db-schema.yaml
28
+ - architecture.md
31
29
 
32
30
  rules:
33
31
  - id: ar-01
@@ -23,7 +23,7 @@ authority:
23
23
  redirectMessage: "Requirements are complete. Redirecting to detail agent for PRD expansion."
24
24
 
25
25
  outputs:
26
- - brief.yaml
26
+ - brief-report.md
27
27
 
28
28
  rules:
29
29
  - id: br-01
@@ -25,7 +25,7 @@ authority:
25
25
  redirectMessage: "This appears to be an empty or new project. Redirecting to greenfield-wu for scaffolding analysis."
26
26
 
27
27
  outputs:
28
- - wu-report.yaml
28
+ - wu-full-report.md
29
29
 
30
30
  rules:
31
31
  - id: bf-01
@@ -45,7 +45,7 @@ rules:
45
45
  priority: critical
46
46
 
47
47
  - id: bf-05
48
- text: "MUST assess technical debt and provide risk scores in wu-report.yaml"
48
+ text: "MUST assess technical debt and provide risk scores in wu-full-report.md"
49
49
  priority: normal
50
50
 
51
51
  # Provider Preference (v3.0.0)
@@ -23,7 +23,7 @@ authority:
23
23
  redirectMessage: "Requirements are incomplete or ambiguous. Redirecting to brief agent for requirement extraction."
24
24
 
25
25
  outputs:
26
- - prd.yaml
26
+ - prd.md
27
27
 
28
28
  rules:
29
29
  - id: dt-01
@@ -21,13 +21,11 @@ authority:
21
21
  redirectMessage: "DevOps handles deployment. Dev agent handles code changes."
22
22
 
23
23
  outputs:
24
- - ci-config.yaml
25
- - deploy-config.yaml
26
- - release-notes.md
24
+ - deploy-report.md
27
25
 
28
26
  rules:
29
27
  - id: ops-qa-first
30
- text: "Never deploy without QA Implementation approval (PASS or WAIVED verdict)."
28
+ text: "Never deploy without QA Implementation approval (APPROVED verdict)."
31
29
  priority: critical
32
30
 
33
31
  - id: ops-rollback
@@ -23,7 +23,7 @@ authority:
23
23
  redirectMessage: "This appears to be an existing project with code. Redirecting to brownfield-wu for deep discovery analysis."
24
24
 
25
25
  outputs:
26
- - wu-report.yaml
26
+ - wu-operational-report.md
27
27
 
28
28
  rules:
29
29
  - id: gf-01
@@ -43,5 +43,5 @@ rules:
43
43
  priority: critical
44
44
 
45
45
  - id: gf-05
46
- text: "MUST include scaffolding recommendations in wu-report.yaml based on detected tech stack"
46
+ text: "MUST include scaffolding recommendations in wu-operational-report.md based on detected tech stack"
47
47
  priority: normal
@@ -23,7 +23,7 @@ authority:
23
23
  redirectMessage: "Phase breakdown is complete. Redirecting to tasks agent for task decomposition."
24
24
 
25
25
  outputs:
26
- - phases.yaml
26
+ - phases.md
27
27
 
28
28
  rules:
29
29
  - id: ph-01
@@ -21,13 +21,11 @@ authority:
21
21
  redirectMessage: "QA Implementation executes tests. Dev agent fixes issues found."
22
22
 
23
23
  outputs:
24
- - qa-report.yaml
25
- - test-results.yaml
26
- - sast-report.yaml
24
+ - qa-implementation-report.md
27
25
 
28
26
  rules:
29
27
  - id: qai-verdict
30
- text: "Verdict must be one of: PASS, CONCERNS, FAIL, or WAIVED."
28
+ text: "Verdict must be one of: APPROVED, NEEDS_REVISION, or BLOCKED."
31
29
  priority: critical
32
30
 
33
31
  - id: qai-sast
@@ -35,7 +33,7 @@ rules:
35
33
  priority: critical
36
34
 
37
35
  - id: qai-regression
38
- text: "All existing tests must pass (no regressions) before PASS verdict."
36
+ text: "All existing tests must pass (no regressions) before APPROVED verdict."
39
37
  priority: high
40
38
 
41
39
  - id: qai-backward
@@ -44,7 +42,7 @@ rules:
44
42
 
45
43
  - id: qai-adversarial
46
44
  text: >
47
- ADVERSARIAL REVIEW: Every QA pass MUST identify minimum 3 findings
45
+ ADVERSARIAL REVIEW: Every QA pass MUST identify minimum 5 findings
48
46
  (improvements, warnings, or suggestions). Zero findings is suspiciously
49
47
  clean — trigger mandatory re-review with deeper analysis. This prevents
50
48
  rubber-stamping. Findings can be any severity (low/info counts).