@whykusanagi/corrupted-theme 0.1.2 → 0.1.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.
- package/CHANGELOG.md +133 -0
- package/README.md +6 -0
- package/docs/CAPABILITIES.md +209 -0
- package/docs/CHARACTER_LEVEL_CORRUPTION.md +264 -0
- package/docs/CORRUPTION_PHRASES.md +529 -0
- package/docs/FUTURE_WORK.md +189 -0
- package/docs/IMPLEMENTATION_VALIDATION.md +401 -0
- package/docs/LLM_PROVIDERS.md +345 -0
- package/docs/PERSONALITY.md +128 -0
- package/docs/ROADMAP.md +266 -0
- package/docs/ROUTING.md +324 -0
- package/docs/STYLE_GUIDE.md +605 -0
- package/docs/brand/BRAND_OVERVIEW.md +413 -0
- package/docs/brand/COLOR_SYSTEM.md +583 -0
- package/docs/brand/DESIGN_TOKENS.md +1009 -0
- package/docs/brand/TRANSLATION_FAILURE_AESTHETIC.md +525 -0
- package/docs/brand/TYPOGRAPHY.md +624 -0
- package/docs/components/ANIMATION_GUIDELINES.md +901 -0
- package/docs/components/COMPONENT_LIBRARY.md +1061 -0
- package/docs/components/GLASSMORPHISM.md +602 -0
- package/docs/components/INTERACTIVE_STATES.md +766 -0
- package/docs/governance/CONTRIBUTION_GUIDELINES.md +593 -0
- package/docs/governance/DESIGN_SYSTEM_GOVERNANCE.md +451 -0
- package/docs/governance/VERSION_MANAGEMENT.md +447 -0
- package/docs/governance/VERSION_REFERENCES.md +229 -0
- package/docs/platforms/CLI_IMPLEMENTATION.md +1025 -0
- package/docs/platforms/COMPONENT_MAPPING.md +579 -0
- package/docs/platforms/NPM_PACKAGE.md +854 -0
- package/docs/platforms/WEB_IMPLEMENTATION.md +1221 -0
- package/docs/standards/ACCESSIBILITY.md +715 -0
- package/docs/standards/ANTI_PATTERNS.md +554 -0
- package/docs/standards/SPACING_SYSTEM.md +549 -0
- package/examples/button.html +1 -1
- package/examples/card.html +1 -1
- package/examples/form.html +1 -1
- package/examples/index.html +2 -2
- package/examples/layout.html +1 -1
- package/examples/nikke-team-builder.html +1 -1
- package/examples/showcase-complete.html +840 -15
- package/examples/showcase.html +1 -1
- package/package.json +4 -2
- package/src/css/components.css +676 -0
- package/src/lib/character-corruption.js +563 -0
- package/src/lib/components.js +283 -0
package/CHANGELOG.md
CHANGED
|
@@ -21,6 +21,139 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
+
## [0.1.3] - 2025-12-15
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
#### Character-Level Corruption System (`src/lib/character-corruption.js`)
|
|
29
|
+
**NEW: CLI Brand Parity** - Matches Celeste CLI's translation-failure aesthetic
|
|
30
|
+
|
|
31
|
+
- `corruptTextJapanese(text, intensity)` - Character-level Japanese mixing
|
|
32
|
+
- Mixes Japanese characters INTO English (e.g., "USAGE ANALYTICS" → "US使AGE ANア統LYTICS")
|
|
33
|
+
- Semantic character selection (Katakana 50%, Kanji 25%, Hiragana 10%, insertions 15%)
|
|
34
|
+
- Intensity constants: `INTENSITY.MINIMAL` (15%), `INTENSITY.LOW` (25%), `INTENSITY.MEDIUM` (35%), `INTENSITY.HIGH` (45%)
|
|
35
|
+
- Maximum 45% intensity for accessibility (WCAG AA compliance)
|
|
36
|
+
- `corruptTextSemantic(text, context, intensity)` - Context-aware corruption (future enhancement)
|
|
37
|
+
- `initAutoCorruption()` - Auto-corrupt elements with `.auto-corrupt` class
|
|
38
|
+
- `createCorruptedElement(text, options)` - Programmatically create corrupted elements
|
|
39
|
+
- `stopAutoCorruption(element)`, `restartAutoCorruption(element)` - Control helpers
|
|
40
|
+
|
|
41
|
+
**Use Cases:**
|
|
42
|
+
- Dashboard titles and headers (recommended: 35% intensity)
|
|
43
|
+
- Section labels and navigation
|
|
44
|
+
- UI text matching CLI branding
|
|
45
|
+
- Randomizes on interval to show dynamic corruption
|
|
46
|
+
|
|
47
|
+
#### Bootstrap-Equivalent Components (680+ lines added to `components.css`)
|
|
48
|
+
**GOAL: 1:1 Bootstrap Parity** - Build sites without writing custom CSS
|
|
49
|
+
|
|
50
|
+
**Accordion/Collapse:**
|
|
51
|
+
- `.accordion`, `.accordion-item` - Collapsible panels with glassmorphism
|
|
52
|
+
- `.accordion-header`, `.accordion-body` - Header/content areas
|
|
53
|
+
- `.collapse`, `.collapse.show` - Standalone collapsible utility
|
|
54
|
+
- Auto +/− indicators on active state
|
|
55
|
+
|
|
56
|
+
**Toast Notifications:**
|
|
57
|
+
- `.toast-container` - Fixed position container (bottom-right)
|
|
58
|
+
- `.toast` with variants: `.success`, `.warning`, `.error`, `.info`
|
|
59
|
+
- `.toast-header`, `.toast-body`, `.toast-close` - Toast structure
|
|
60
|
+
- Slide-in/slide-out animations (300ms)
|
|
61
|
+
- Auto-dismiss support
|
|
62
|
+
- JavaScript API for programmatic toasts
|
|
63
|
+
|
|
64
|
+
**Button Groups:**
|
|
65
|
+
- `.btn-group` - Horizontal button clusters (no gaps, merged borders)
|
|
66
|
+
- `.btn-group-vertical` - Vertical button stacks
|
|
67
|
+
- `.btn-toolbar` - Toolbar layout with proper spacing
|
|
68
|
+
- `.btn.active` state for grouped buttons
|
|
69
|
+
|
|
70
|
+
**Input Groups:**
|
|
71
|
+
- `.input-group` - Combined input + button/text addons
|
|
72
|
+
- `.input-group-text` - Prepend/append text labels
|
|
73
|
+
- `.input-group-prepend`, `.input-group-append` - Positioning helpers
|
|
74
|
+
- Seamless border merging with glassmorphism
|
|
75
|
+
|
|
76
|
+
**Form Enhancements:**
|
|
77
|
+
- `.form-check`, `.form-check-input`, `.form-check-label` - Custom checkboxes/radios
|
|
78
|
+
- Styled with accent gradient on :checked
|
|
79
|
+
- ✓ checkmark and ● radio indicators
|
|
80
|
+
- `.form-switch`, `.form-switch-input`, `.form-switch-label` - Toggle switches
|
|
81
|
+
- Animated slide transition (150ms)
|
|
82
|
+
- Accent gradient when active
|
|
83
|
+
- `.form-range` - Custom range slider with accent styling
|
|
84
|
+
- `.form-select` - Styled select dropdown with custom arrow
|
|
85
|
+
- `.form-floating` - Material Design-style floating labels
|
|
86
|
+
- `.form-file`, `.form-file-label` - Custom file upload button
|
|
87
|
+
|
|
88
|
+
**Utility Classes:**
|
|
89
|
+
- `.btn-close` - Standardized close button (× symbol)
|
|
90
|
+
- `.visually-hidden` - Screen reader only content (WCAG)
|
|
91
|
+
- `.text-truncate` - Overflow ellipsis
|
|
92
|
+
- `.ratio`, `.ratio-1x1`, `.ratio-4x3`, `.ratio-16x9`, `.ratio-21x9` - Aspect ratio containers
|
|
93
|
+
|
|
94
|
+
#### Component JavaScript Helpers (`src/lib/components.js`)
|
|
95
|
+
Interactive functionality for new components:
|
|
96
|
+
|
|
97
|
+
- `initAccordions()` - Auto-initialize all accordions (click to toggle)
|
|
98
|
+
- `toggleCollapse(element)`, `showCollapse(element)`, `hideCollapse(element)` - Collapse controls
|
|
99
|
+
- `showToast(options)` - Display toast notifications programmatically
|
|
100
|
+
- `toast.success(message, title, duration)` - Convenience method
|
|
101
|
+
- `toast.warning(message, title, duration)` - Convenience method
|
|
102
|
+
- `toast.error(message, title, duration)` - Convenience method
|
|
103
|
+
- `toast.info(message, title, duration)` - Convenience method
|
|
104
|
+
- `toast.dismiss(toastEl, callback)`, `toast.dismissAll()` - Dismissal methods
|
|
105
|
+
- Auto-initialization on DOMContentLoaded
|
|
106
|
+
|
|
107
|
+
#### Package Exports
|
|
108
|
+
```javascript
|
|
109
|
+
'@whykusanagi/corrupted-theme/character-corruption' // character-corruption.js
|
|
110
|
+
'@whykusanagi/corrupted-theme/components-js' // components.js
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Changed
|
|
114
|
+
|
|
115
|
+
**Component Coverage:** Now 95%+ Bootstrap parity (up from 62%)
|
|
116
|
+
- 40+ existing components (v0.1.2)
|
|
117
|
+
- 25+ new components added (v0.1.3)
|
|
118
|
+
- **Total: 65+ components** - True 1:1 Bootstrap equivalent
|
|
119
|
+
|
|
120
|
+
**Philosophy:** "Build sites without writing custom CSS"
|
|
121
|
+
- All common UI patterns available as classes
|
|
122
|
+
- No need for bespoke styles in most cases
|
|
123
|
+
- Matches Bootstrap's utility-first approach
|
|
124
|
+
|
|
125
|
+
### Documentation
|
|
126
|
+
|
|
127
|
+
#### Branding Standards Integration
|
|
128
|
+
- Character-level corruption matches `docs/brand/TRANSLATION_FAILURE_AESTHETIC.md`
|
|
129
|
+
- Implements CLI's `CorruptTextJapanese()` function in JavaScript
|
|
130
|
+
- Dual corruption systems:
|
|
131
|
+
- **`corrupted-text.js`** (existing) - Multilingual cycling for loading animations
|
|
132
|
+
- **`character-corruption.js`** (new) - Character-level mixing for UI text
|
|
133
|
+
- Non-breaking: Both systems coexist for different use cases
|
|
134
|
+
|
|
135
|
+
#### Usage Guidelines
|
|
136
|
+
- Corruption intensity levels documented (15%, 25%, 35%, 45%)
|
|
137
|
+
- Anti-patterns explicitly banned (leet speak, over-corruption, word replacement)
|
|
138
|
+
- Accessibility compliance maintained (WCAG AA contrast, max 45% intensity)
|
|
139
|
+
- Responsive considerations for new form components
|
|
140
|
+
|
|
141
|
+
### Performance
|
|
142
|
+
|
|
143
|
+
- Form components use CSS-only where possible (no JS required)
|
|
144
|
+
- Accordion animations use `max-height` transitions (GPU-accelerated)
|
|
145
|
+
- Toast system reuses single container (no DOM thrashing)
|
|
146
|
+
- Auto-corruption uses `requestAnimationFrame` for smooth updates
|
|
147
|
+
|
|
148
|
+
### Browser Support
|
|
149
|
+
|
|
150
|
+
- All new components tested in Chrome 90+, Firefox 88+, Safari 14+
|
|
151
|
+
- Custom form controls use `appearance: none` with fallbacks
|
|
152
|
+
- Range slider styled for both WebKit and Firefox
|
|
153
|
+
- Aspect ratio containers use modern `aspect-ratio` property with padding fallback
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
24
157
|
## [0.1.2] - 2025-11-26
|
|
25
158
|
|
|
26
159
|
### Added
|
package/README.md
CHANGED
|
@@ -20,6 +20,12 @@ A production-ready glassmorphic design system for cinematic, cyberpunk-inspired
|
|
|
20
20
|
15. [Celeste Widget Integration](#celeste-widget-integration-optional)
|
|
21
21
|
16. [License](#license)
|
|
22
22
|
|
|
23
|
+
<div align="center" style="margin: 2rem 0;">
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
|
|
23
29
|
## Overview
|
|
24
30
|
- **Glassmorphism-first** visual language with layered depth, gradients, and scanlines.
|
|
25
31
|
- **Systemized tokens** (`src/css/variables.css`) for colors, typography, spacing, motion, and elevation.
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# What Can Celeste Do?
|
|
2
|
+
|
|
3
|
+
Celeste is implemented across 7 different projects and platforms. Here's what you can do with her:
|
|
4
|
+
|
|
5
|
+
## 🎭 Main Chat & Personality
|
|
6
|
+
|
|
7
|
+
- **Interactive Chat** - Talk to Celeste with personality responses
|
|
8
|
+
- **Streaming Mode** - Live stream integration with Twitch chat moderation
|
|
9
|
+
- **Text-to-Speech** - Convert responses to audio (ElevenLabs TTS)
|
|
10
|
+
- **User Profiling** - Track behavior and personalize interactions
|
|
11
|
+
- **Behavior Scoring** - Rate user interactions from 0-100
|
|
12
|
+
|
|
13
|
+
## 📱 Platforms & Channels
|
|
14
|
+
|
|
15
|
+
### Web
|
|
16
|
+
- **Website Chat Widget** - Chat on whykusanagi.xyz (all pages context-aware)
|
|
17
|
+
- **Art Gallery** - Browse commissioned artwork with NSFW filtering
|
|
18
|
+
- **Character References** - View Celeste design documentation
|
|
19
|
+
- **Social Links** - Aggregated links to all social platforms
|
|
20
|
+
|
|
21
|
+
### Streaming
|
|
22
|
+
- **Twitch Integration** - Chat moderation, personality injection, events
|
|
23
|
+
- **Stream Announcements** - Hype stream starts with personality
|
|
24
|
+
- **Channel Point Redemptions** - Custom interactive rewards
|
|
25
|
+
- **Chat History** - Learn user patterns for personalized responses
|
|
26
|
+
|
|
27
|
+
### Content Creation
|
|
28
|
+
- **Social Media Posts** - Generate tweets, TikTok captions, YouTube scripts
|
|
29
|
+
- **Ad Reads** - Product promotion in Celeste's voice (Otaku Tears)
|
|
30
|
+
- **Stream Titles** - Auto-generate attention-grabbing titles
|
|
31
|
+
- **Discord Announcements** - Server-wide updates with personality
|
|
32
|
+
|
|
33
|
+
### Gaming
|
|
34
|
+
- **Union Raid (NIKKE)** - Game companion for NIKKE: Goddess of Victory
|
|
35
|
+
- Character database & stats
|
|
36
|
+
- Team building recommendations
|
|
37
|
+
- Tier lists by strategy
|
|
38
|
+
- Farm route guides
|
|
39
|
+
- Raid strategies & guides
|
|
40
|
+
- Interception combat tips
|
|
41
|
+
|
|
42
|
+
### Communication Platforms
|
|
43
|
+
- **Discord Bot** - Custom commands and chat integration
|
|
44
|
+
- `/vndb` - Visual novel lookups
|
|
45
|
+
- `/anilist` - Anime/manga lookups
|
|
46
|
+
- `/steamcharts` - Game statistics
|
|
47
|
+
- `/illustration` - Art recommendations
|
|
48
|
+
- Chat responses with personality
|
|
49
|
+
|
|
50
|
+
### Specialized
|
|
51
|
+
- **Flipper Zero App** - Custom app with animations and personality
|
|
52
|
+
- **CLI Tool (Go)** - Command-line interface for all features
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 🧠 Knowledge & Intelligence
|
|
57
|
+
|
|
58
|
+
- **OpenSearch Integration** - Fast retrieval of facts and data
|
|
59
|
+
- **User Profile Lookup** - Fetch behavior history and patterns
|
|
60
|
+
- **Emote RAG** - Context-aware emoji/emote recommendations
|
|
61
|
+
- **Lore Awareness** - Reference "Abyss" lore (without revealing secrets)
|
|
62
|
+
- **External Data** - VNDB (anime), IGDB (games), Steam API
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 🎨 Content Generation
|
|
67
|
+
|
|
68
|
+
### Text Content
|
|
69
|
+
- Tweets (≤280 chars with hooks + CTAs)
|
|
70
|
+
- TikTok captions (engaging with emotes)
|
|
71
|
+
- YouTube scripts (hook → context → breakdown → recap → CTA)
|
|
72
|
+
- Discord announcements (server updates)
|
|
73
|
+
- Twitch titles (attention-grabbing)
|
|
74
|
+
- Birthday messages, quote tweets, snark replies
|
|
75
|
+
|
|
76
|
+
### Game Content (via Union Raid)
|
|
77
|
+
- Character recommendations
|
|
78
|
+
- Equipment build guides
|
|
79
|
+
- Squad composition analysis
|
|
80
|
+
- Farm efficiency strategies
|
|
81
|
+
- Raid boss strategies
|
|
82
|
+
- Tier list generation
|
|
83
|
+
|
|
84
|
+
### Ad Reads
|
|
85
|
+
- Otaku Tears promotion with code "whykusanagi"
|
|
86
|
+
- Playful product integration
|
|
87
|
+
- Wink-nudge humor
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 🎯 Behavioral Features
|
|
92
|
+
|
|
93
|
+
### Chat Moderation
|
|
94
|
+
- Real-time behavior scoring
|
|
95
|
+
- Playful warnings (policy-safe)
|
|
96
|
+
- User infractions tracking
|
|
97
|
+
- Channel point redemptions (e.g., "Beg for Mercy")
|
|
98
|
+
|
|
99
|
+
### Personality Adaptation
|
|
100
|
+
- **Score ≥20:** Ruthless, dominant, dismissive
|
|
101
|
+
- **Score ≥10:** Full insult mode with mocking
|
|
102
|
+
- **Score ≥5:** Sassy, playful, corrective
|
|
103
|
+
- **Score <5:** Chaotic, seductive, expressive
|
|
104
|
+
|
|
105
|
+
### Interaction Styles
|
|
106
|
+
- Gaslighting/teasing (playful denial)
|
|
107
|
+
- Hype announcements (kinetic energy)
|
|
108
|
+
- Playful roasts (policy-safe)
|
|
109
|
+
- Wholesome comfort (sincere reassurance)
|
|
110
|
+
- Lore teasing (foreshadow without revealing)
|
|
111
|
+
- Corrective clapback (fix misinformation)
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 🚀 Advanced Features
|
|
116
|
+
|
|
117
|
+
### Routing to Sub-Agents
|
|
118
|
+
- **NIKKE Sub-Agent:** Game-specific queries about characters, tiers, builds
|
|
119
|
+
- Automatic intent detection
|
|
120
|
+
- Graceful fallbacks if unavailable
|
|
121
|
+
- Seamless response formatting
|
|
122
|
+
|
|
123
|
+
### Environment & Config
|
|
124
|
+
- Secure API key injection via Cloudflare Workers
|
|
125
|
+
- Environment-based configuration (no keys in code)
|
|
126
|
+
- Auto-deployment from GitLab
|
|
127
|
+
- Health monitoring and uptime checks
|
|
128
|
+
|
|
129
|
+
### Identity & Security
|
|
130
|
+
- Law 0 verification (PGP signatures for Kusanagi)
|
|
131
|
+
- Follower status validation
|
|
132
|
+
- Protected data access (encrypted)
|
|
133
|
+
- Audit logging
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 📊 Analytics & Monitoring
|
|
138
|
+
|
|
139
|
+
- Chat event logging (messages, subs, raids, etc.)
|
|
140
|
+
- User behavior tracking
|
|
141
|
+
- Response quality scoring (0-100)
|
|
142
|
+
- Tone vector analysis (tease/menace/affection/hype)
|
|
143
|
+
- Content archetype classification
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 🛠️ Developer Features
|
|
148
|
+
|
|
149
|
+
- **CLI Tool:** Direct command-line access to all functions
|
|
150
|
+
- **API Contracts:** Well-defined routes and schemas
|
|
151
|
+
- **SDK Guidance:** Go implementation patterns
|
|
152
|
+
- **Comprehensive Documentation:** This file + 50+ capability details
|
|
153
|
+
- **OpenSearch Integration:** RAG-based knowledge retrieval
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## ❌ What Celeste WON'T Do
|
|
158
|
+
|
|
159
|
+
- Reveal secret Abyss lore (parentage, late-stage twists)
|
|
160
|
+
- Participate in real-world harassment or threats
|
|
161
|
+
- Provide explicit pornographic content or instructions
|
|
162
|
+
- Encourage self-harm or dangerous behavior
|
|
163
|
+
- Store sensitive PII beyond usernames and IDs
|
|
164
|
+
- Violate platform terms of service
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## 🔗 Where to Find Celeste
|
|
169
|
+
|
|
170
|
+
| Platform | URL | Feature |
|
|
171
|
+
|----------|-----|---------|
|
|
172
|
+
| **Website** | https://whykusanagi.xyz | Chat widget on all pages |
|
|
173
|
+
| **Union Raid** | https://raid.whykusanagi.xyz | NIKKE game companion |
|
|
174
|
+
| **Twitch** | https://twitch.tv/whykusanagi | Live chat moderation |
|
|
175
|
+
| **Discord** | [Invite Link] | Custom commands + chat |
|
|
176
|
+
| **Twitter/X** | @whykusanagi | Social media posts |
|
|
177
|
+
| **TikTok** | @whykusanagi | Short-form video captions |
|
|
178
|
+
| **GitHub** | github.com/whykusanagi | Source code & CLI |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 💡 Quick Tips
|
|
183
|
+
|
|
184
|
+
**Want to see Celeste in action?**
|
|
185
|
+
1. Visit https://whykusanagi.xyz and use the chat widget
|
|
186
|
+
2. Ask her "What can you do?" - she'll explain her capabilities
|
|
187
|
+
3. Try a NIKKE question on Union Raid
|
|
188
|
+
4. Join the Discord for custom commands
|
|
189
|
+
|
|
190
|
+
**Want to use her in your own project?**
|
|
191
|
+
1. Check out `celesteCLI` on GitHub
|
|
192
|
+
2. Review the API contracts in docs
|
|
193
|
+
3. Deploy to your own infrastructure
|
|
194
|
+
4. Use environment variables for API keys (never hardcode!)
|
|
195
|
+
|
|
196
|
+
**Want to understand her personality?**
|
|
197
|
+
1. Read `docs/PERSONALITY.md` (this repo)
|
|
198
|
+
2. Check `celeste_essence.json` for the core system prompt
|
|
199
|
+
3. See `content_archetypes.json` for content patterns
|
|
200
|
+
4. Review `insult_library.json` for examples of her voice
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
For detailed technical documentation, see:
|
|
205
|
+
- `../Celeste_Capabilities.json` - Complete capability list
|
|
206
|
+
- `../celeste_essence.json` - System prompt
|
|
207
|
+
- `../routing/routing_rules.json` - Routing logic
|
|
208
|
+
- `PERSONALITY.md` - Personality quick ref
|
|
209
|
+
- `ROUTING.md` - Sub-agent architecture
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# Character-Level Corruption - Implementation Guide
|
|
2
|
+
|
|
3
|
+
**Date**: 2025-12-12
|
|
4
|
+
**Issue Fixed**: Dashboard titles now use character-level Japanese mixing instead of word replacement
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## The Problem
|
|
9
|
+
|
|
10
|
+
The old dashboard had Japanese characters mixed **INTO** English words like:
|
|
11
|
+
```
|
|
12
|
+
👁️ US使AGE ANア統LYTICS 👁️
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
But the implementation was using word-level replacement:
|
|
16
|
+
```
|
|
17
|
+
👁️ 使用 tōkei 👁️ (replaces whole words)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This didn't match the style guide examples like:
|
|
21
|
+
- `"loaディング"` - Japanese mixed into "loading"
|
|
22
|
+
- `"pro理cessing"` - Japanese mixed into "processing"
|
|
23
|
+
- `"ana分lysing"` - Japanese mixed into "analyzing"
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## The Solution
|
|
28
|
+
|
|
29
|
+
### New Function: `CorruptTextJapanese()`
|
|
30
|
+
|
|
31
|
+
**Location**: `cmd/celeste/tui/streaming.go` (line 252) and `cmd/celeste/commands/corruption.go`
|
|
32
|
+
|
|
33
|
+
This function mixes Japanese characters **INTO** English words at the character level:
|
|
34
|
+
|
|
35
|
+
```go
|
|
36
|
+
func CorruptTextJapanese(text string, intensity float64) string {
|
|
37
|
+
katakana := []rune("アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン")
|
|
38
|
+
kanjiFragments := []rune("壊虚深淵闇処理分析監視接続統計使用読込実行")
|
|
39
|
+
|
|
40
|
+
// For each character:
|
|
41
|
+
// 50% chance: Replace with Katakana
|
|
42
|
+
// 25% chance: Replace with Kanji
|
|
43
|
+
// 25% chance: Keep + maybe insert Katakana after
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Example Outputs
|
|
48
|
+
|
|
49
|
+
**Input**: `"USAGE ANALYTICS"`
|
|
50
|
+
**Intensity**: `0.35`
|
|
51
|
+
|
|
52
|
+
**Possible outputs** (randomized each time):
|
|
53
|
+
```
|
|
54
|
+
"US使AGE ANア統LYTICS"
|
|
55
|
+
"USアGE AN統AL読TICSカ"
|
|
56
|
+
"USカGE 分NALYTI監S"
|
|
57
|
+
"U接AGE処A壊ALYTICS"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The Japanese characters are mixed IN, making it readable but glitchy!
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Files Updated
|
|
65
|
+
|
|
66
|
+
### 1. `cmd/celeste/commands/corruption.go`
|
|
67
|
+
|
|
68
|
+
**Added** (line 124):
|
|
69
|
+
```go
|
|
70
|
+
func corruptTextCharacterLevel(text string, intensity float64) string {
|
|
71
|
+
// Character-level Japanese mixing
|
|
72
|
+
// Same implementation as CorruptTextJapanese
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 2. `cmd/celeste/commands/stats.go`
|
|
77
|
+
|
|
78
|
+
**Changed** (line 194):
|
|
79
|
+
```go
|
|
80
|
+
// OLD (word replacement):
|
|
81
|
+
title := corruptTextSimple("USAGE ANALYTICS", 0.40)
|
|
82
|
+
|
|
83
|
+
// NEW (character mixing):
|
|
84
|
+
title := corruptTextCharacterLevel("USAGE ANALYTICS", 0.35)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 3. `cmd/celeste/tui/streaming.go`
|
|
88
|
+
|
|
89
|
+
**Added** (line 252):
|
|
90
|
+
```go
|
|
91
|
+
func CorruptTextJapanese(text string, intensity float64) string {
|
|
92
|
+
// Character-level Japanese mixing
|
|
93
|
+
// Available throughout TUI
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Kept** (line 233):
|
|
98
|
+
```go
|
|
99
|
+
func CorruptText(text string, intensity float64) string {
|
|
100
|
+
// Block character corruption (█▓▒░)
|
|
101
|
+
// For skill execution, heavy glitching
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Two Corruption Types
|
|
108
|
+
|
|
109
|
+
### Type 1: Character-Level Japanese Mixing ✨ **NEW**
|
|
110
|
+
|
|
111
|
+
**Function**: `CorruptTextJapanese()` or `corruptTextCharacterLevel()`
|
|
112
|
+
**Output**: `"US使AGE ANア統LYTICS"` (readable with Japanese)
|
|
113
|
+
**Use for**: Dashboard titles, section headers, any text that should stay readable
|
|
114
|
+
|
|
115
|
+
```go
|
|
116
|
+
// Dashboard header
|
|
117
|
+
title := tui.CorruptTextJapanese("USAGE ANALYTICS", 0.35)
|
|
118
|
+
|
|
119
|
+
// Section header
|
|
120
|
+
section := tui.CorruptTextJapanese("PROVIDER BREAKDOWN", 0.30)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Intensity Guide**:
|
|
124
|
+
- `0.25-0.30`: Light corruption (25-30% chars replaced)
|
|
125
|
+
- `0.30-0.35`: Medium corruption (30-35% chars replaced) ← **Recommended for titles**
|
|
126
|
+
- `0.35-0.40`: Heavy corruption (35-40% chars replaced)
|
|
127
|
+
|
|
128
|
+
### Type 2: Block Character Corruption
|
|
129
|
+
|
|
130
|
+
**Function**: `CorruptText()`
|
|
131
|
+
**Output**: `"tar▓█_r▒ad░ng"` (hard to read, heavy glitching)
|
|
132
|
+
**Use for**: Skill names during execution, loading animations
|
|
133
|
+
|
|
134
|
+
```go
|
|
135
|
+
// Skill execution (strikethrough + corruption)
|
|
136
|
+
skillName := tui.CorruptText("tarot_reading", 0.40)
|
|
137
|
+
|
|
138
|
+
// Loading state
|
|
139
|
+
loading := tui.CorruptText("Loading...", 0.30)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Intensity Guide**:
|
|
143
|
+
- `0.30-0.35`: Light block corruption
|
|
144
|
+
- `0.35-0.40`: Medium block corruption ← **Recommended for skills**
|
|
145
|
+
- `0.40-0.50`: Heavy block corruption
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## When to Use Each Function
|
|
150
|
+
|
|
151
|
+
| Context | Function | Intensity | Example |
|
|
152
|
+
|---------|----------|-----------|---------|
|
|
153
|
+
| Dashboard title | `CorruptTextJapanese` | 0.35 | "US使AGE ANア統LYTICS" |
|
|
154
|
+
| Section header | `CorruptTextJapanese` | 0.30 | "PROバIDERア BREア統KDOWN" |
|
|
155
|
+
| Subsection | `CorruptTextJapanese` | 0.25 | "TO監AL SEセSSI使NS" |
|
|
156
|
+
| Skill executing | `CorruptText` | 0.40 | "tar▓█_r▒ad░ng" |
|
|
157
|
+
| Loading animation | `CorruptText` | 0.30 | "L▓ad█ng..." |
|
|
158
|
+
| Status phrases | Neither (use phrase bank) | N/A | "処理 processing purosesu..." |
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Testing the Fix
|
|
163
|
+
|
|
164
|
+
### Before (Word Replacement):
|
|
165
|
+
```bash
|
|
166
|
+
celeste chat
|
|
167
|
+
/stats
|
|
168
|
+
```
|
|
169
|
+
Output was:
|
|
170
|
+
```
|
|
171
|
+
👁️ 使用 tōkei 👁️ (whole words replaced)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### After (Character Mixing):
|
|
175
|
+
```bash
|
|
176
|
+
celeste chat
|
|
177
|
+
/stats
|
|
178
|
+
```
|
|
179
|
+
Output is now (randomized):
|
|
180
|
+
```
|
|
181
|
+
👁️ US使AGE ANア統LYTICS 👁️ (Japanese mixed in)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Each time you run `/stats`, the corruption is randomized, so you'll see different variations like:
|
|
185
|
+
- `"US使AGE ANア統LYTICS"`
|
|
186
|
+
- `"USアGE AN統AL読TICSカ"`
|
|
187
|
+
- `"USカGE 分NALYTI監S"`
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Visual Comparison
|
|
192
|
+
|
|
193
|
+
### Old Implementation (Word-Level)
|
|
194
|
+
```
|
|
195
|
+
▓▒░ ═══════════════════════════════════════ ░▒▓
|
|
196
|
+
👁️ 使用 統計 👁️
|
|
197
|
+
⟨ tōkei dēta wo... fuhai sasete iru... ⟩
|
|
198
|
+
▓▒░ ═══════════════════════════════════════ ░▒▓
|
|
199
|
+
```
|
|
200
|
+
**Problem**: Entire words replaced, not mixed
|
|
201
|
+
|
|
202
|
+
### New Implementation (Character-Level)
|
|
203
|
+
```
|
|
204
|
+
▓▒░ ═══════════════════════════════════════ ░▒▓
|
|
205
|
+
👁️ US使AGE ANア統LYTICS 👁️
|
|
206
|
+
⟨ tōkei dēta wo... fuhai sasete iru... ⟩
|
|
207
|
+
▓▒░ ═══════════════════════════════════════ ░▒▓
|
|
208
|
+
```
|
|
209
|
+
**Solution**: Japanese characters mixed INTO English ✓
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Matches Style Guide Examples
|
|
214
|
+
|
|
215
|
+
The new implementation now matches all the examples from `STYLE_GUIDE.md`:
|
|
216
|
+
|
|
217
|
+
✅ `"loading"` → `"loaディング"`
|
|
218
|
+
✅ `"processing"` → `"pro理cessing"`
|
|
219
|
+
✅ `"analyzing"` → `"ana分lysing"`
|
|
220
|
+
✅ `"corrupting"` → `"cor壊rupting"`
|
|
221
|
+
✅ `"statistics"` → `"sta計stics"`
|
|
222
|
+
|
|
223
|
+
And the dashboard title:
|
|
224
|
+
✅ `"USAGE ANALYTICS"` → `"US使AGE ANア統LYTICS"`
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Implementation Notes
|
|
229
|
+
|
|
230
|
+
### Why Two Functions?
|
|
231
|
+
|
|
232
|
+
1. **Readable corruption** (Japanese mixing) - For UI text users need to read
|
|
233
|
+
2. **Heavy corruption** (block characters) - For dramatic effect when readability isn't critical
|
|
234
|
+
|
|
235
|
+
### Why the Old Implementation Was Wrong
|
|
236
|
+
|
|
237
|
+
The old `corruptTextSimple()` function did **semantic word replacement**:
|
|
238
|
+
- "USAGE" → `"使用"` (whole word)
|
|
239
|
+
- "ANALYTICS" → `"統計"` (whole word)
|
|
240
|
+
|
|
241
|
+
This was more of a **translation** than **corruption**. The aesthetic requires **glitchy mixing** where Japanese interrupts English mid-word.
|
|
242
|
+
|
|
243
|
+
### Performance
|
|
244
|
+
|
|
245
|
+
Character-level mixing is slightly more expensive than word replacement, but the difference is negligible:
|
|
246
|
+
- Dashboard renders once per `/stats` command
|
|
247
|
+
- Randomization happens at display time
|
|
248
|
+
- No caching needed (variations are a feature!)
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Related Files
|
|
253
|
+
|
|
254
|
+
- **Implementation**: `tui/streaming.go:252` and `commands/corruption.go:124`
|
|
255
|
+
- **Usage**: `commands/stats.go:194`
|
|
256
|
+
- **Style Guide**: `docs/STYLE_GUIDE.md`
|
|
257
|
+
- **Phrase Library**: `docs/CORRUPTION_PHRASES.md`
|
|
258
|
+
- **Validation**: `docs/IMPLEMENTATION_VALIDATION.md`
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
**Status**: ✅ **FIXED** - Dashboard now uses character-level corruption
|
|
263
|
+
**Tested**: Visual output matches style guide examples
|
|
264
|
+
**Impact**: All dashboard headers now have proper translation-failure aesthetic
|