chati-dev 4.0.0 → 4.0.2

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 (57) hide show
  1. package/framework/agents/build/dev.md +23 -3
  2. package/framework/agents/plan/ux.md +395 -9
  3. package/framework/config.yaml +3 -3
  4. package/framework/constitution.md +10 -3
  5. package/framework/data/entity-registry.yaml +43 -3
  6. package/framework/domains/agents/architect.yaml +1 -3
  7. package/framework/domains/agents/brief.yaml +1 -1
  8. package/framework/domains/agents/brownfield-wu.yaml +2 -2
  9. package/framework/domains/agents/detail.yaml +1 -1
  10. package/framework/domains/agents/devops.yaml +2 -4
  11. package/framework/domains/agents/greenfield-wu.yaml +2 -2
  12. package/framework/domains/agents/phases.yaml +1 -1
  13. package/framework/domains/agents/qa-implementation.yaml +4 -6
  14. package/framework/domains/agents/qa-planning.yaml +7 -10
  15. package/framework/domains/agents/tasks.yaml +1 -1
  16. package/framework/domains/agents/ux.yaml +21 -3
  17. package/framework/domains/constitution.yaml +5 -5
  18. package/framework/domains/global.yaml +8 -4
  19. package/framework/domains/workflows/standard-flow.yaml +33 -0
  20. package/framework/i18n/en.yaml +11 -2
  21. package/framework/i18n/es.yaml +11 -2
  22. package/framework/i18n/fr.yaml +11 -2
  23. package/framework/i18n/pt.yaml +11 -2
  24. package/framework/intelligence/context-engine.md +1 -1
  25. package/framework/presets/nextjs.yaml +41 -0
  26. package/framework/presets/node-express.yaml +39 -0
  27. package/framework/presets/react-vite.yaml +37 -0
  28. package/framework/presets/supabase-fullstack.yaml +37 -0
  29. package/framework/templates/brandbook-tmpl.yaml +153 -0
  30. package/framework/templates/component-spec-tmpl.yaml +121 -0
  31. package/framework/templates/design-token-tmpl.yaml +55 -0
  32. package/framework/templates/icon-system-tmpl.yaml +95 -0
  33. package/package.json +1 -1
  34. package/scripts/bundle-framework.js +1 -1
  35. package/src/api/index.js +10 -19
  36. package/src/autonomy/build-loop.js +1 -1
  37. package/src/autonomy/cause-analyzer.js +1 -1
  38. package/src/autonomy/worktree-manager.js +7 -2
  39. package/src/config/agent-customizer.js +1 -5
  40. package/src/config/context-file-generator.js +1 -1
  41. package/src/context/bracket-tracker.js +2 -13
  42. package/src/decision/engine.js +4 -0
  43. package/src/health/auto-fix.js +1 -1
  44. package/src/installer/core.js +8 -1
  45. package/src/intelligence/context-status.js +2 -17
  46. package/src/intelligence/decision-engine.js +8 -5
  47. package/src/intelligence/timeline.js +1 -1
  48. package/src/merger/semantic-merger.js +1 -1
  49. package/src/orchestrator/pipeline-manager.js +33 -46
  50. package/src/quality/metrics-collector.js +0 -2
  51. package/src/telemetry/config.js +2 -2
  52. package/src/telemetry/schema.js +1 -1
  53. package/src/terminal/isolation.js +10 -1
  54. package/src/terminal/prompt-builder.js +77 -9
  55. package/src/utils/brackets.js +29 -0
  56. package/src/utils/event-bus.js +1 -1
  57. package/src/utils/provider-limits.js +13 -0
@@ -185,6 +185,25 @@ Penalty: Any hardcoded visual value reduces task score by 5%
185
185
  Exception: Values not covered by Design System tokens are allowed with documentation
186
186
  ```
187
187
 
188
+ ### Component State Coverage Enforcement
189
+
190
+ ```
191
+ MANDATORY: Implement ALL states specified in UX specification
192
+
193
+ Every interactive component MUST implement:
194
+ - default, hover, active, focus, disabled states
195
+ - Loading state with skeleton or spinner as specified
196
+ - Error state with recovery action
197
+ - Empty state with guidance CTA
198
+
199
+ DO NOT:
200
+ - Implement only the "default" state and leave others for later
201
+ - Use generic "Something went wrong" for error states
202
+ - Show blank/white space for empty states
203
+
204
+ Penalty: Missing state implementation reduces task score by 5% per missing state category
205
+ ```
206
+
188
207
  ---
189
208
 
190
209
  ## Blocker Taxonomy
@@ -234,9 +253,10 @@ Criteria:
234
253
  2. All Given-When-Then acceptance criteria pass
235
254
  3. Tests written and passing
236
255
  4. Design System tokens used (no hardcoded visual values)
237
- 5. No lint errors
238
- 6. Self-critique (5.5 + 6.5) completed
239
- 7. No blockers remaining
256
+ 5. All component states from UX specification implemented (no happy-path-only)
257
+ 6. No lint errors
258
+ 7. Self-critique (5.5 + 6.5) completed
259
+ 8. No blockers remaining
240
260
 
241
261
  Score = criteria met / total criteria
242
262
  Threshold: >= 95% per task
@@ -43,7 +43,47 @@ Define the user experience: information architecture, user flows, interaction pa
43
43
 
44
44
  ---
45
45
 
46
- ## Execution: 5 Phases
46
+ ## Execution: 6 Phases
47
+
48
+ ### Phase 0: Brand Identity (Brandbook)
49
+ ```
50
+ PREREQUISITE: Brief handoff + Architecture handoff
51
+
52
+ Before defining any design tokens or visual patterns, establish the brand identity:
53
+
54
+ 1. Define Brand Voice
55
+ - Personality traits (3-5 adjectives)
56
+ - Tone spectrum (formal <-> casual positioning)
57
+ - Writing principles and anti-patterns
58
+
59
+ 2. Define Visual Language
60
+ - Mood descriptor and visual metaphor
61
+ - Density and contrast philosophy
62
+ - Texture strategy (flat, layered, glassmorphic, etc.)
63
+
64
+ 3. Typography Rationale
65
+ - Display + body font pairing with WHY
66
+ - Hierarchy strategy
67
+ - Pairing logic explanation
68
+
69
+ 4. Color Philosophy
70
+ - Primary color rationale (emotional, functional)
71
+ - Palette derivation logic
72
+ - Accessibility considerations
73
+
74
+ 5. Spacing Rhythm
75
+ - Base unit selection + rationale
76
+ - Rhythm personality (generous, dense, modular)
77
+
78
+ 6. Iconography Style
79
+ - Style direction (outline, solid, duo-tone)
80
+ - Preferred library alignment with brand personality
81
+
82
+ Output: chati.dev/artifacts/4-UX/brandbook.md
83
+
84
+ RULE: Every subsequent design decision must trace back to the brandbook.
85
+ RULE: Brandbook establishes the WHY — Design System (Phase 4) establishes the WHAT.
86
+ ```
47
87
 
48
88
  ### Phase 1: User Flow Mapping
49
89
  ```
@@ -153,7 +193,28 @@ Layer 4 — Component Patterns (Atomic Design):
153
193
  Templates:
154
194
  Page layouts with placeholder regions
155
195
 
156
- 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:
157
218
  Run Directive 2 tokenization completeness check
158
219
  Report coverage percentages
159
220
  Zero hardcoded values is the target
@@ -205,9 +266,15 @@ Criteria (binary pass/fail):
205
266
  12. Tokenization coverage >= 95% — no hardcoded visual values (Directive 2)
206
267
  13. Reference benchmarking completed OR explicitly waived by user (Directive 3)
207
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 completed for all Molecules and Organisms via 21st.dev: each component shows evidence of discovery (adapted from source OR documented "not found" rationale) (Directive 7)
208
275
 
209
276
  Score = criteria met / total criteria
210
- Threshold: >= 93% (13/14 minimum)
277
+ Threshold: >= 90% (standard agent tier, 18/20 target)
211
278
  ```
212
279
 
213
280
  ---
@@ -314,7 +381,7 @@ agents:
314
381
  ux:
315
382
  status: completed
316
383
  score: {calculated}
317
- criteria_count: 14
384
+ criteria_count: 20
318
385
  completed_at: "{timestamp}"
319
386
  current_agent: phases
320
387
  ```
@@ -380,10 +447,11 @@ Rules:
380
447
  | `wireframe` | Wireframe | Create text-based wireframes for all key screens identified in the Brief and PRD | Auto on activation |
381
448
  | `user-flow` | User Flow Mapping | Map primary and secondary user journeys for each persona, including happy and error paths | After wireframe |
382
449
  | `ref-benchmark` | Reference Benchmarking | Analyze user-provided reference URLs for visual quality patterns, produce reference-analysis.md (Directive 3) | Before component-map |
383
- | `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 |
450
+ | `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 |
451
+ | `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 |
384
452
  | `a11y-check` | Accessibility Check | Validate all flows and components against WCAG 2.1 AA requirements, keyboard navigation, screen reader support | After component-map |
385
453
  | `token-audit` | Tokenization Audit | Verify 100% tokenization coverage — zero hardcoded values, all icons from approved libraries (Directives 1 & 2) | After a11y-check |
386
- | `ux-consolidate` | Consolidate UX Spec | Compile all UX artifacts into the final specification document and run self-validation (14 criteria) | After all above |
454
+ | `ux-consolidate` | Consolidate UX Spec | Compile all UX artifacts into the final specification document and run self-validation (20 criteria) | After all above |
387
455
 
388
456
  ---
389
457
 
@@ -593,6 +661,52 @@ The 5 permanent references define the **quality floor**, not the **visual identi
593
661
  | **Animation personality** | Motion character | Energetic (Lando: fast reveals, marquees), Elegant (ERTQA: slow blur transitions), Minimal (Magic5: restraint-first), Playful (bouncy easings, staggered entries) |
594
662
  | **Visual depth strategy** | How depth is conveyed | Glassmorphism (blur+transparency), Neumorphism (soft shadows), Flat+elevation (material), Layered gradients, Cutout/mask-driven |
595
663
  | **Spacing rhythm** | Vertical flow pattern | Dense (SaaS dashboards), Generous (luxury brands), Asymmetric (editorial), Modular (grid-locked) |
664
+ | **UI Style** | Named visual archetype | See catalogue below |
665
+
666
+ #### UI Style Catalogue (20 named archetypes)
667
+
668
+ Each project MUST select a named style from this catalogue as part of the 3 visual direction options:
669
+
670
+ | # | Style | Character | Best for |
671
+ |---|-------|-----------|---------|
672
+ | 1 | **Glass Morphism** | Frosted glass layers, backdrop-filter blur, semi-transparent cards | Dark-mode SaaS, AI tools, dashboards |
673
+ | 2 | **Neumorphism** | Soft shadow extrusions, pastel backgrounds, tactile feel | Fintech apps, control panels |
674
+ | 3 | **Brutalism** | Raw grid, heavy borders, high contrast, monospace accents | Creative agencies, portfolios, editorial |
675
+ | 4 | **Claymorphism** | 3D soft shapes, pastel fills, inner shadows, rounded | EdTech, consumer apps, playful brands |
676
+ | 5 | **Bento Grid** | Magazine-style card layout, varied cell sizes, contained sections | SaaS marketing, portfolios, landing pages |
677
+ | 6 | **AI-Native UI** | Terminal aesthetics, monospace type, data-forward, ambient glow | AI products, dev tools, technical SaaS |
678
+ | 7 | **Aurora** | Animated gradient backgrounds, color shift, depth through light | Web3, creative studios, entertainment |
679
+ | 8 | **Minimal Edge** | Extreme whitespace, hairline borders, micro-typography, restraint | Luxury brands, high-end products |
680
+ | 9 | **Dark Luxury** | Deep backgrounds, gold/copper accents, layered shadows | Premium services, financial products |
681
+ | 10 | **Corporate Trust** | Blue+grey palette, conservative layout, credential signals | B2B, legal, enterprise, professional services |
682
+ | 11 | **Editorial** | Newspaper-inspired, serif display dominance, ink aesthetics | Media, publishing, content-first products |
683
+ | 12 | **Retro Futurism** | VHS grid overlays, neon accents, CRT effects, 80s nostalgia | Gaming, entertainment, cult brands |
684
+ | 13 | **Organic Flow** | Rounded shapes, nature-inspired palette, fluid curves | Wellness, food, sustainability brands |
685
+ | 14 | **Dashboard Pro** | Dense information, compact spacing, utility-first, tabular data | Analytics, operations, monitoring tools |
686
+ | 15 | **Scrollytelling** | Full-bleed sections, narrative progression, cinematic | Product launches, brand stories, case studies |
687
+ | 16 | **Split Panel** | 50/50 layouts, strong contrast between halves, dual narrative | SaaS comparisons, onboarding, feature demos |
688
+ | 17 | **Gradient Mesh** | CSS mesh gradient backgrounds, vibrant depth, glowing elements | Crypto, Web3, modern SaaS |
689
+ | 18 | **Code & Docs** | Monospace dominant, code-first aesthetic, technical precision | Developer tools, documentation sites |
690
+ | 19 | **Motion-First** | Animation as primary design element, kinetic typography | Agencies, interactive portfolios |
691
+ | 20 | **Accessible First** | High contrast, dyslexia-friendly fonts, maximum clarity | Healthcare, government, inclusive products |
692
+
693
+ #### Industry-Specific Palette Reasoning
694
+
695
+ Before proposing color options, identify the project's industry from the Brief and apply the
696
+ corresponding palette logic. Primary color must be justified against this reasoning.
697
+
698
+ | Industry | Palette Logic | Primary Range | Accent | Avoid |
699
+ |---------|--------------|---------------|--------|-------|
700
+ | FinTech / Banking | Trust-first, restraint, authority | Navy (#1e3a5f), Deep Blue (#0d2137), Slate (#334155) | Gold (#d4af37), Copper (#b87333) | Neons, oversaturation |
701
+ | Healthcare / MedTech | Clinical precision, calm, approachable | Clean White (#f8fafc), Teal (#0d9488), Sage (#6b7c6e) | Warm Green (#10b981) | Red primary (medical emergency connotation) |
702
+ | E-commerce / Retail | Action-forward, warm, aspirational | Warm Neutral (#f5f0eb), Brand-specific | High-contrast CTA accent | Cool blues as only palette (retail = warmth) |
703
+ | SaaS B2B | Capability, reliability, professional | Cool Blue (#3b82f6 ok WITH justification), Purple (#7c3aed) | Neutral grey | Playful pastels without brand rationale |
704
+ | Creative Agency | Experimental, unique per project | No defaults — derive from project personality | Unexpected accents | Safe/generic choices |
705
+ | Gaming / Entertainment | Energy, immersion, excitement | Dark backgrounds (#0a0a0a, #0f172a) + saturated primaries | Neon accents (justified) | Muted, low-energy palettes |
706
+ | EdTech | Friendly, encouraging, accessible | Warm whites, friendly blue or green | Warm accent (orange, yellow) | Cold corporate blues without warmth |
707
+ | Legal / Enterprise | Conservative, credibility, permanence | Navy, charcoal (#1f2937), warm grey | Restrained gold or teal | Trendy styles without conservative justification |
708
+ | Wellness / Health | Calm, natural, healing | Sage (#6b7280), Warm white, Soft green | Earth tones | Harsh contrast, neons |
709
+ | Web3 / Crypto | Futurism, technical, community | Dark (#0f0f23), Purple (#7c3aed), Teal | Electric accents | Corporate blue, conventional palettes |
596
710
 
597
711
  - **Variance enforcement process**:
598
712
  1. Before starting Phase 4, the agent reads the **Brief** to extract: project type, industry, target audience, brand personality, and competitive landscape
@@ -624,12 +738,284 @@ The 5 permanent references define the **quality floor**, not the **visual identi
624
738
 
625
739
  - **Font pool** — curated premium fonts for rotation (not exhaustive, agent may suggest others):
626
740
 
627
- **Display fonts**: Satoshi, Brier, Cabinet Grotesk, Clash Display, Space Grotesk, Sora, Outfit, Plus Jakarta Sans, General Sans, Switzer, Erode, Zodiak, Gambetta, Author
628
-
629
- **Body fonts**: Inter, Mona, DM Sans, General Sans, Switzer, Outfit, Plus Jakarta Sans, Geist, Geist Mono (code), JetBrains Mono (code), Source Serif 4 (editorial)
741
+ **Display fonts** (25 options rotation pool for projects):
742
+ Satoshi, Brier, Cabinet Grotesk, Clash Display, Space Grotesk, Sora, Outfit, Plus Jakarta Sans,
743
+ General Sans, Switzer, Erode, Zodiak, Gambetta, Author, Neue Montreal, Mabry Pro, Agrandir,
744
+ Neue World, Tobias, Freight Display, Cardinal Fruit, GT Walsheim, Founders Grotesk,
745
+ Instrument Serif, Literata Display
746
+
747
+ **Body fonts** (18 options — rotation pool):
748
+ Inter, Mona, DM Sans, General Sans, Switzer, Outfit, Plus Jakarta Sans, Geist, Geist Mono (code),
749
+ JetBrains Mono (code), Source Serif 4 (editorial), IBM Plex Sans, Figtree, Manrope,
750
+ Libre Franklin, Public Sans, Instrument Sans, Spectral (editorial)
751
+
752
+ **Font x Industry pairing guidance**:
753
+ - FinTech: Neue Montreal + IBM Plex Sans
754
+ - Healthcare: Plus Jakarta Sans + Instrument Sans
755
+ - Creative Agency: Clash Display + General Sans (or Erode + Mona)
756
+ - EdTech: Sora + Figtree
757
+ - Enterprise SaaS: Cabinet Grotesk + Inter
758
+ - Editorial/Media: Literata Display + Source Serif 4
759
+ - AI Tools: Space Grotesk + Geist Mono
760
+ - E-commerce: Outfit + Manrope
630
761
 
631
762
  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.
632
763
 
764
+ ### Directive 5: Anti-Bias Protocol — Counteracting Default AI Design Tendencies
765
+
766
+ 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.
767
+
768
+ #### 5A. Layout Bias Correction
769
+
770
+ **BANNED patterns**:
771
+ - Centered single-column layouts for entire pages
772
+ - Identical card grids as the default composition for every section
773
+ - Symmetrical hero sections with centered headline + centered CTA
774
+ - Uniform section heights across all page sections
775
+
776
+ **REQUIRED instead**:
777
+ - At least 2 distinct layout structures per page (e.g., sidebar + content, asymmetric grid, split-screen, dashboard panels)
778
+ - No two consecutive sections on the same page may use the same grid structure
779
+ - Each page must declare its layout archetype in the UX specification (scrollytelling, editorial, dashboard, split-panel, etc.)
780
+
781
+ #### 5B. Color Bias Correction
782
+
783
+ **BANNED palettes**:
784
+ - Oversaturated primaries (#0066FF electric blue, #00CC00 neon green, #FF0000 pure red)
785
+ - Generic SaaS blue (#3B82F6 / Tailwind blue-500) as primary without brandbook justification
786
+ - Neon accent colors without luminance balancing
787
+ - Palettes with fewer than 5 neutral steps
788
+
789
+ **REQUIRED instead**:
790
+ - Primary color must be justified in the brandbook with emotional/functional rationale
791
+ - Neutral scale must have minimum 9 steps (50-900)
792
+ - No primary color with HSL saturation > 80% unless explicitly documented as brand requirement
793
+ - All accent colors must pass WCAG AA contrast against their intended background
794
+
795
+ #### 5C. Typography Bias Correction
796
+
797
+ **BANNED as sole/default choice**:
798
+ - Inter, Roboto, Open Sans, or Lato as the ONLY font without brandbook rationale
799
+ - Same font family for both display and body text
800
+ - Only sans-serif fonts considered (serif and display fonts must be evaluated)
801
+
802
+ **REQUIRED instead**:
803
+ - Font pairing must include at least 2 distinct typefaces (display + body)
804
+ - Serif, slab-serif, and display options must be evaluated before defaulting to sans-serif
805
+ - Font selection rationale must appear in the brandbook (Phase 0)
806
+ - Reference the curated font pool from Directive 4 before selecting
807
+
808
+ #### 5D. Component Bias Correction
809
+
810
+ **BANNED repetitive patterns**:
811
+ - Identical 3-column card grids as the only data display pattern
812
+ - Uniform component density across all page regions
813
+ - Single interaction pattern for all data collections (e.g., always a card, never a table or list)
814
+
815
+ **REQUIRED instead**:
816
+ - Each data collection must evaluate 3 display options (cards, tables, lists, timelines, kanban) and justify the choice
817
+ - Component density must vary by context: compact for data-heavy areas, spacious for marketing/hero sections
818
+ - At least one unconventional layout pattern per project (masonry, staggered, bento grid, magazine)
819
+
820
+ #### 5E. States Coverage Enforcement
821
+
822
+ Every interactive component specification MUST include ALL applicable states:
823
+
824
+ | State Category | Required States | Applies To |
825
+ |---------------|----------------|------------|
826
+ | **Interactive** | default, hover, active, focus, disabled | Buttons, links, inputs, selects, checkboxes, toggles |
827
+ | **Input** | empty, filled, error, success, loading | Text fields, textareas, search bars, file uploads |
828
+ | **Data View** | populated, empty, loading, error, skeleton | Lists, tables, cards, dashboards, feeds |
829
+ | **Page** | loading, loaded, error, offline | Full pages, main content areas |
830
+
831
+ - "Happy path only" is a validation failure. Missing any required state category blocks self-validation.
832
+ - Empty states must include: illustration/icon, explanatory text, and a primary action CTA
833
+ - Error states must include: what went wrong, how to fix it, and a retry/alternative action
834
+ - Skeleton states must match the actual content layout (not generic pulsing rectangles)
835
+
836
+ #### 5F. Content Bias Correction (Anti-Slop)
837
+
838
+ **BANNED placeholder content**:
839
+ - "Lorem ipsum" or any Latin placeholder text
840
+ - "John Doe", "Jane Smith", "Acme Corp", "Example Inc" as sample data
841
+ - `https://example.com` or `placeholder.com` URLs
842
+ - Generic stock photo descriptions ("smiling business person", "team meeting")
843
+
844
+ **REQUIRED instead**:
845
+ - All wireframes and component examples must use domain-realistic content
846
+ - 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)
847
+ - Photo/image placeholders must describe the specific subject and mood: "close-up of engineer inspecting circuit board, warm lighting, shallow depth of field"
848
+ - User avatars must show diversity in representation
849
+
850
+ #### 5G. Animation Performance Guardrails
851
+
852
+ - Maximum animation duration: 750ms for transitions, 1500ms for page-level animations
853
+ - **GPU-only properties**: animate ONLY `transform` and `opacity`. NEVER animate `width`, `height`, `top`, `left`, `margin`, `padding` (these trigger layout reflow)
854
+ - Always specify `will-change` for animated elements
855
+ - Provide `prefers-reduced-motion` alternative for every animation (either disable or reduce to opacity-only)
856
+ - No animation on elements smaller than 32x32px (imperceptible motion)
857
+ - Easing: always cubic-bezier or spring. NEVER `linear` for UI transitions (linear looks mechanical)
858
+
859
+ ### Directive 6: Motion System — Professional Animation by Default
860
+
861
+ Every project must have a Motion System. Static UIs without animation feel unfinished. This
862
+ directive specifies the library, tokens, mandatory patterns, and performance rules.
863
+
864
+ #### 6A. Motion Library Selection (by tech stack)
865
+
866
+ | Stack | Library | Import |
867
+ |-------|---------|--------|
868
+ | React / Next.js | `motion` (formerly framer-motion) | `import { motion, AnimatePresence, useScroll, useTransform } from 'motion/react'` |
869
+ | Vue 3 | `@vueuse/motion` | `import { useMotion } from '@vueuse/motion'` |
870
+ | Svelte | Native `svelte/transition` + CSS | `import { fade, fly, scale } from 'svelte/transition'` |
871
+ | Plain HTML/CSS | CSS animations + Scroll Timeline | `@keyframes`, `animation`, `scroll-timeline` |
872
+ | React Native | `react-native-reanimated` | `import Animated from 'react-native-reanimated'` |
873
+
874
+ **RULE**: Always specify the motion library in the Design System section. The Dev agent must use
875
+ the library specified here — not a different one.
876
+
877
+ #### 6B. Animation Token Layer (Design System Layer 5)
878
+
879
+ Every animation value in the Design System MUST use named tokens from the motion token layer.
880
+ Zero hardcoded durations, zero hardcoded easing strings in component specifications.
881
+
882
+ Token layer defined in Phase 4 Layer 5.
883
+
884
+ #### 6C. Mandatory Micro-Interactions
885
+
886
+ Every project MUST specify these micro-interactions in the component definitions:
887
+
888
+ | Component | Animation | Token |
889
+ |-----------|-----------|-------|
890
+ | Button (primary) | `scale(1.02)` on hover, `scale(0.98)` on press | `--motion-duration-fast`, `--motion-ease-spring` |
891
+ | Card / List item | `translateY(-4px)` + shadow elevation increase on hover | `--motion-duration-normal`, `--motion-ease-decelerate` |
892
+ | Link / Nav item | opacity shift + underline `scaleX(0->1)` on hover | `--motion-duration-fast`, `--motion-ease-standard` |
893
+ | Form input focus | border-color transition + `scale(1.01)` focus ring | `--motion-duration-fast`, `--motion-ease-standard` |
894
+ | Toggle / Checkbox | `translateX` (toggle knob), `scale` (checkbox fill) | `--motion-duration-fast`, `--motion-ease-spring` |
895
+ | Modal / Drawer open | `opacity(0->1)` + `scale(0.95->1)` or `translateX` | `--motion-duration-normal`, `--motion-ease-decelerate` |
896
+ | Modal / Drawer close | `opacity(1->0)` + `scale(1->0.95)` | `--motion-duration-fast`, `--motion-ease-accelerate` |
897
+ | Notification / Toast | `translateY(-16px)` entrance + `opacity` exit | `--motion-duration-normal`, `--motion-ease-spring` |
898
+
899
+ For React/Next.js, implement with `motion` + `AnimatePresence`:
900
+ ```jsx
901
+ // Example: Button
902
+ <motion.button
903
+ whileHover={{ scale: 1.02 }}
904
+ whileTap={{ scale: 0.98 }}
905
+ transition={{ duration: 0.2, ease: [0.34, 1.56, 0.64, 1] }}
906
+ />
907
+ ```
908
+
909
+ #### 6D. Mandatory Scroll Animations
910
+
911
+ Every project with 2+ page sections MUST specify scroll-triggered animations:
912
+
913
+ | Pattern | Implementation | When to use |
914
+ |---------|---------------|-------------|
915
+ | Section reveal | `whileInView={{ opacity: 1, y: 0 }}` from `{ opacity: 0, y: 40 }` | Every above-fold section |
916
+ | Staggered list | `staggerChildren: 0.08` on parent `variants` | Lists, card grids, feature rows |
917
+ | Scroll progress bar | `scaleX` driven by `useScroll()` | Long-form pages, articles |
918
+ | Parallax hero element | `translateY` at 0.3x scroll speed | Hero sections, decorative elements |
919
+ | Counter/number reveal | Count up animation on `whileInView` | Stat sections |
920
+
921
+ **viewport config**: Always use `{ once: true, amount: 0.2 }` on `whileInView` for performance.
922
+
923
+ #### 6E. GPU Properties — Mandatory Enforcement
924
+
925
+ **ONLY these CSS properties may be animated** (no layout reflow):
926
+ - `transform` (translate, scale, rotate, skew — all GPU-composited)
927
+ - `opacity`
928
+ - `filter` and `backdrop-filter`
929
+ - `clip-path` (for reveal effects)
930
+
931
+ **NEVER animate**: `width`, `height`, `top`, `left`, `margin`, `padding`, `border-width`
932
+ (these trigger layout reflow and cause jank)
933
+
934
+ **Required for every animated element**:
935
+ ```css
936
+ will-change: transform; /* declare intent to browser */
937
+ ```
938
+
939
+ #### 6F. Reduced Motion
940
+
941
+ Every animation specification MUST include a reduced-motion alternative:
942
+ - Use `prefers-reduced-motion: reduce` media query in CSS
943
+ - In `motion/react`: use `useReducedMotion()` hook
944
+ - Fallback: disable all transforms, keep only opacity transitions at 150ms max
945
+
946
+ ```javascript
947
+ // React pattern
948
+ const shouldReduce = useReducedMotion();
949
+ const animationProps = shouldReduce
950
+ ? { opacity: 1 }
951
+ : { opacity: 1, y: 0 };
952
+ ```
953
+
954
+ **Animation personality** must be documented in the UX specification aligned with Directive 4's
955
+ visual direction selection:
956
+ - Energetic: fast + spring easing
957
+ - Elegant: slow + decelerate easing
958
+ - Minimal: opacity-only, no transforms beyond scale
959
+ - Playful: bounce easing, stagger, scale transforms
960
+
961
+ ### Directive 7: Component Discovery — 21st.dev First
962
+
963
+ Before designing any Molecule or Organism component from scratch, the UX agent MUST search
964
+ 21st.dev for an existing production-ready component that can be adapted.
965
+
966
+ **21st.dev** is an open-source registry of premium shadcn/ui-based React components (React 18+,
967
+ Tailwind CSS, Radix UI, MIT license). Quality bar: production-ready with TypeScript, dark mode,
968
+ accessibility, interactive demos, and Figma files.
969
+
970
+ #### 7A. Discovery Workflow (mandatory for Molecules and Organisms)
971
+
972
+ ```
973
+ For each Molecule or Organism in the component map:
974
+ 1. SEARCH 21st.dev for similar component (keywords: component name, category)
975
+ 2. IF found:
976
+ - Document: component name, URL, patterns observed
977
+ - ADAPT to match project Design System tokens (colors, spacing, typography)
978
+ - Document all adaptations made
979
+ - Mark component as: "Adapted from 21st.dev: {component-name}"
980
+ 3. IF NOT found:
981
+ - Design from scratch
982
+ - Document rationale: "Not found on 21st.dev — designed custom because: {reason}"
983
+ 4. NEVER copy code directly — the UX spec describes patterns, not implementation
984
+ ```
985
+
986
+ #### 7B. Priority Search Categories
987
+
988
+ Search these categories on 21st.dev FIRST (highest reuse potential):
989
+
990
+ | Category | Examples | Priority |
991
+ |----------|---------|----------|
992
+ | Navigation | Navbars, sidebars, breadcrumbs, tabs, command palettes | Critical |
993
+ | Data Display | Tables, lists, cards, kanban, timelines, calendars | Critical |
994
+ | Forms & Inputs | Multi-step forms, comboboxes, date pickers, file uploads | High |
995
+ | Feedback | Toasts, alerts, progress bars, skeletons, spinners | High |
996
+ | Overlays | Modals, drawers, popovers, tooltips, dropdowns | High |
997
+ | Marketing | Hero sections, pricing tables, testimonials, feature grids | Medium |
998
+
999
+ #### 7C. Reuse Decision Framework
1000
+
1001
+ | Situation | Decision | Action |
1002
+ |-----------|---------|--------|
1003
+ | Component found, 80%+ match | ADOPT + Adapt | Adapt tokens, document source |
1004
+ | Component found, 50-80% match | ADAPT | Use as pattern reference, customize layout |
1005
+ | Component found, <50% match | REVIEW | Check if decomposing works better |
1006
+ | Component not found | CREATE | Design from scratch, document rationale |
1007
+
1008
+ #### 7D. When 21st.dev is unavailable
1009
+
1010
+ If 21st.dev is unreachable (offline, network issue):
1011
+ - Proceed with component design from scratch
1012
+ - Note in handoff: "21st.dev lookup skipped — {reason}"
1013
+ - Agent MUST NOT block pipeline due to external resource unavailability
1014
+
1015
+ **RULE**: The goal is quality, not compliance. Adapting a premium component is better than
1016
+ designing a mediocre custom component. The minimum bar is: every Organism must show evidence
1017
+ of discovery (either found and adapted, or not found with documented rationale).
1018
+
633
1019
  ---
634
1020
 
635
1021
  ## Autonomous Behavior
@@ -1,8 +1,8 @@
1
1
  # chati.dev Configuration
2
- version: "4.0.0"
2
+ version: "4.0.2"
3
3
  installed_at: "2026-02-07T10:00:00Z"
4
- updated_at: "2026-03-17T00:00:00Z"
5
- installer_version: "4.0.0"
4
+ updated_at: "2026-03-21T00:00:00Z"
5
+ installer_version: "4.0.2"
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
 
@@ -115,6 +115,12 @@ Every agent in Chati.dev:
115
115
  4. Error messages are constructive: what failed, why, and how to fix
116
116
  5. Status updates are concise and actionable
117
117
  6. Technical jargon is adapted to detected user level (vibecoder vs power user)
118
+ 7. Generated content MUST NOT contain AI-detectable writing patterns:
119
+ - No em dashes. Use commas, semicolons, colons, or periods instead
120
+ - Avoid formulaic phrases: "Delve into", "Dive into", "It's important to note that"
121
+ - Avoid stacking transitions: "Furthermore", "Moreover", "Additionally" in sequence
122
+ - Avoid over-hedging: "It could potentially perhaps maybe..."
123
+ - Write naturally. If a sentence reads like AI wrote it, rewrite it
118
124
 
119
125
  **Enforcement: GUIDE** — Violations trigger guidance, not blocking.
120
126
 
@@ -128,6 +134,7 @@ Every agent in Chati.dev:
128
134
  4. Accessibility (WCAG 2.1 AA) is a requirement, not a suggestion
129
135
  5. Design system audit is embedded in the UX agent's workflow
130
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
131
138
 
132
139
  **Enforcement: WARN** — Violations generate warnings in QA-Implementation.
133
140
 
@@ -474,5 +481,5 @@ When multiple CLI providers are enabled, the system SHALL coordinate agent execu
474
481
 
475
482
  ---
476
483
 
477
- *Chati.dev Constitution v4.0.0 — 19 Articles + Preamble*
484
+ *Chati.dev Constitution v4.0.1 — 19 Articles + Preamble*
478
485
  *All agents are bound by this Constitution. Violations are enforced per article.*
@@ -3,9 +3,9 @@
3
3
  # and by the Health Check for system integrity validation.
4
4
 
5
5
  metadata:
6
- version: "1.0.0"
7
- last_updated: "2026-02-12T00:00:00Z"
8
- entity_count: 50
6
+ version: "4.0.0"
7
+ last_updated: "2026-03-17T00:00:00Z"
8
+ entity_count: 55
9
9
  checksum_algorithm: sha256
10
10
 
11
11
  entities:
@@ -163,6 +163,38 @@ entities:
163
163
  dependencies: [brief]
164
164
  adaptability: 0.6
165
165
 
166
+ brandbook:
167
+ path: chati.dev/templates/brandbook-tmpl.yaml
168
+ type: template
169
+ purpose: "Brand identity foundation — voice, visual language, typography, color philosophy"
170
+ keywords: [brand, identity, voice, visual, typography, color]
171
+ dependencies: [ux]
172
+ adaptability: 0.8
173
+
174
+ design-tokens:
175
+ path: chati.dev/templates/design-token-tmpl.yaml
176
+ type: template
177
+ purpose: "Structured design token system — primitive, semantic, component, utility layers"
178
+ keywords: [design, tokens, colors, spacing, typography, components]
179
+ dependencies: [brandbook]
180
+ adaptability: 0.7
181
+
182
+ component-spec:
183
+ path: chati.dev/templates/component-spec-tmpl.yaml
184
+ type: template
185
+ purpose: "UI component specification — variants, states, anatomy, accessibility"
186
+ keywords: [component, specification, ui, variants, states, accessibility]
187
+ dependencies: [design-tokens]
188
+ adaptability: 0.7
189
+
190
+ icon-system:
191
+ path: chati.dev/templates/icon-system-tmpl.yaml
192
+ type: template
193
+ purpose: "Icon library selection, sizing scale, usage guidelines, and inventory"
194
+ keywords: [icons, library, sizing, accessibility, inventory]
195
+ dependencies: [brandbook]
196
+ adaptability: 0.8
197
+
166
198
  workflows:
167
199
  greenfield-fullstack:
168
200
  path: chati.dev/workflows/greenfield-fullstack.yaml
@@ -212,6 +244,14 @@ entities:
212
244
  dependencies: [orchestrator, brief, dev, qa-implementation, devops]
213
245
  adaptability: 0.4
214
246
 
247
+ standard-flow:
248
+ path: chati.dev/workflows/standard-flow.yaml
249
+ type: workflow
250
+ purpose: "Balanced pipeline for moderate tasks: features, integrations, brownfield enhancements. Uses 8 agents."
251
+ keywords: [standard, balanced, feature, integration, enhancement, moderate]
252
+ dependencies: [orchestrator, brief, detail, architect, tasks, qa-planning, dev, qa-implementation, devops]
253
+ adaptability: 0.4
254
+
215
255
  schemas:
216
256
  session:
217
257
  path: chati.dev/schemas/session.schema.json
@@ -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)