Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
587 changes: 520 additions & 67 deletions README.md

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion docs/CHARACTER_LEVEL_CORRUPTION.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Character-Level Corruption - Implementation Guide

**Date**: 2025-12-12
**Date**: 2025-12-12 (updated 2026-05-18 for 0.2.0 canonical charsets)
**Issue Fixed**: Dashboard titles now use character-level Japanese mixing instead of word replacement

> **0.2.0 note**: The Katakana, Hiragana, and Kanji arrays used by `CorruptTextJapanese()` are now defined canonically in **`src/data/charsets.json`** (part of the npm package). JS callers should consume them via `src/core/corruption-charsets.js` or `src/core/corruption-phrases.js`. Go callers can embed or fetch the JSON — see [`docs/CROSS_LANGUAGE_CONTRACT.md`](CROSS_LANGUAGE_CONTRACT.md). The inline array patterns shown in this document remain valid reference implementations but are superseded by the canonical JSON for production use.

---

## The Problem
Expand Down Expand Up @@ -251,6 +253,9 @@ Character-level mixing is slightly more expensive than word replacement, but the

## Related Files

- **Canonical charsets (0.2.0)**: `src/data/charsets.json` — Katakana, Hiragana, Kanji, symbols
- **JS access**: `src/core/corruption-charsets.js`
- **Cross-language contract**: `docs/CROSS_LANGUAGE_CONTRACT.md`
- **Implementation**: `tui/streaming.go:252` and `commands/corruption.go:124`
- **Usage**: `commands/stats.go:194`
- **Style Guide**: `docs/STYLE_GUIDE.md`
Expand Down
12 changes: 11 additions & 1 deletion docs/CORRUPTION_PHRASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Celeste CLI - Corruption Phrases Library

> **As of 0.2.0** — The canonical phrase data now lives in **`src/data/phrases.json`** (published with the npm package). The JSON file is the single source of truth for all phrase pools (SFW and NSFW, by language and theme). The `corruption-phrases.js` module in `src/core/` provides typed access to those pools from JavaScript.
>
> For multi-language consumers (Go, Python, etc.) see **[`docs/CROSS_LANGUAGE_CONTRACT.md`](CROSS_LANGUAGE_CONTRACT.md)** for the full JSON schema and consumption guide.
>
> This document remains as **narrative context and a human-readable reference** for the phrase library. All phrase additions should go into `src/data/phrases.json`, not here.

---

**Seeded phrases for consistent branding across the application**

This file provides pre-made corrupted phrases following the translation-failure aesthetic. Use these directly in your code instead of inventing new corruptions ad-hoc.
Expand Down Expand Up @@ -517,10 +525,12 @@ Final: "生成 generating repōto..."

## Related Files

- **Canonical JSON** (0.2.0): `src/data/phrases.json` — source of truth for all phrase pools
- **JS Access**: `src/core/corruption-phrases.js` — typed access helpers
- **Contract doc**: `docs/CROSS_LANGUAGE_CONTRACT.md` — JSON schema + Go/non-JS consumption
- **Style Guide**: `/docs/STYLE_GUIDE.md` - Full aesthetic documentation
- **Go Implementation**: `/cmd/celeste/tui/streaming.go` - Corruption functions
- **Official Theme**: `@whykusanagi/corrupted-theme` - npm package
- **TypeScript Reference**: `../_archive/celeste-cli-typescript/src/ui/corruption.ts` (legacy)

---

Expand Down
19 changes: 19 additions & 0 deletions docs/PERSONALITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,27 @@
- **Personality Over Data:** Always prioritize personality over raw information
- **Rotation:** Never repeat same response type consecutively to same user

## Personality Phrase Pools (0.2.0)

As of 0.2.0, the in-universe personality phrases ("Corrupt me more…", void-theme lore, intimacy lines) are canonically stored in `src/data/phrases.json` alongside the technical corruption phrases. The relevant pools are:

| Pool path | Content |
|-----------|---------|
| `sfw.japanese.void` | SFW Japanese void/abyss phrases |
| `sfw.japanese.memory` | SFW identity-loss Japanese phrases |
| `nsfw.english.void` | NSFW void descent English phrases |
| `nsfw.english.memory` | NSFW identity/intimacy English phrases |
| `nsfw.japanese.void` | NSFW Japanese void phrases |
| `nsfw.japanese.memory` | NSFW Japanese intimacy phrases |

These pools power `TypingAnimation` (buffer corruption mode), `CorruptedParticles` floating text, and any custom corruption-loading overlay when `includeLewd: true`.

---

## See Also

- `src/data/phrases.json` - Canonical personality phrase pools (0.2.0)
- `docs/CROSS_LANGUAGE_CONTRACT.md` - JSON schema for phrases.json
- `../celeste_essence.json` - Full system prompt for LLM
- `../Celeste_Capabilities.json` - What Celeste can do (7 projects)
- `../content_archetypes.json` - Content generation patterns
Expand Down
8 changes: 5 additions & 3 deletions docs/brand/COLOR_SYSTEM.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Celeste Brand System - Color System

**Version**: 1.0.0
**Last Updated**: 2025-12-13
**Version**: 0.2.0
**Last Updated**: 2026-05-18
**WCAG Compliance**: AA (4.5:1 minimum)
**Status**: 🔴 **CRITICAL FOUNDATION DOCUMENT**

> **0.2.0 canonical source**: The 6-color corruption palette and semantic use mapping are now defined in **`src/data/colors.json`** (published with the npm package). That JSON file is the machine-readable single source of truth. See [`docs/CROSS_LANGUAGE_CONTRACT.md`](../CROSS_LANGUAGE_CONTRACT.md) for the schema. The values in this document match colors.json exactly.

---

## Overview
Expand Down Expand Up @@ -580,4 +582,4 @@ See `DESIGN_TOKENS.md` for complete W3C DTCG format.

---

**Status**: ✅ **COLOR SYSTEM COMPLETE** - All colors specified with WCAG compliance
**Status**: ✅ **COLOR SYSTEM COMPLETE** - All colors specified with WCAG compliance (0.2.0: canonical JSON source at src/data/colors.json)
9 changes: 5 additions & 4 deletions docs/brand/DESIGN_TOKENS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Celeste Brand System - Design Tokens

**Version**: 1.0.0
**Last Updated**: 2025-12-13
**Version**: 0.2.0
**Last Updated**: 2026-05-18
**Token Format**: W3C Design Tokens Community Group (DTCG)
**Status**: 🔴 **CRITICAL FOUNDATION DOCUMENT**

Expand All @@ -19,7 +19,8 @@ Design tokens are **platform-agnostic design decisions** stored in a structured
- ✅ **Tooling support** (Figma, Style Dictionary, Theo)

**Celeste's Implementation**:
- **Master file**: `design-tokens.json` (W3C DTCG format)
- **Master file**: `design-tokens.json` (W3C DTCG format — full token set)
- **Canonical color subset (0.2.0)**: `src/data/colors.json` — the 6-color corruption palette and semantic mapping, published with the npm package as a machine-readable source of truth. Values are identical to the color tokens below. See [`docs/CROSS_LANGUAGE_CONTRACT.md`](../CROSS_LANGUAGE_CONTRACT.md) for the schema.
- **Generated files**:
- `tokens.css` (CSS custom properties for web)
- `tokens.go` (Go constants for CLI)
Expand Down Expand Up @@ -1006,4 +1007,4 @@ module.exports = {

---

**Status**: ✅ **FOUNDATION COMPLETE** - Tokens defined, ready for generation
**Status**: ✅ **FOUNDATION COMPLETE** - Tokens defined, ready for generation (0.2.0: colors.json is canonical color subset)
66 changes: 61 additions & 5 deletions docs/components/ANIMATION_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

> **Celeste Brand System** | Component Documentation
> **Document**: Animation Guidelines
> **Version**: 1.0.0
> **Last Updated**: 2025-12-13
> **Version**: 0.2.0
> **Last Updated**: 2026-05-18

---

Expand Down Expand Up @@ -476,6 +476,62 @@ Multi-layer glitch effect for error states or brand moments:

---

## CRT Effects & Advanced Glitch Keyframes (0.2.0)

### CSS Classes

Two new CSS classes ship in `src/css/animations.css` as of 0.2.0:

#### `.glitch-word`

Inline RGB-split glitch effect driven by CSS pseudo-elements. Activates on hover.

```html
<span class="glitch-word" data-text="CORRUPTED">CORRUPTED</span>
```

```css
/* Defined in animations.css — activated on :hover */
.glitch-word { position: relative; }
.glitch-word::before { color: #d94f90; /* pink channel */ }
.glitch-word::after { color: #8b5cf6; /* purple channel */ }
```

#### `.glitch-kanji`

Full-line glitch wrapper with scanline overlay and scattered Japanese characters. Use for dramatic headings or hover effects on corrupted text elements.

```html
<h2 class="glitch-kanji">SYSTEM CORRUPT</h2>
```

Both classes respect `prefers-reduced-motion` — animation is disabled when the user has reduced motion enabled.

### CRT Effects JS Layer (`src/lib/crt-effects.js`)

The `CRTEffects` class applies a post-processing CRT overlay to a container element. It uses CSS animation keyframes defined in `animations.css`:

| Keyframe | Purpose |
|----------|---------|
| `scanline-movement` | Horizontal scanline drift |
| `crt-flicker` | Phosphor flicker at 0.12s cadence |

```javascript
import { CRTEffects } from '@whykusanagi/corrupted-theme/crt-effects';

const crt = new CRTEffects(document.querySelector('.hero'), {
scanlines: true,
flicker: true,
phosphor: true,
intensity: 0.3,
});
crt.start();
```

See [`docs/COMPONENTS_REFERENCE.md`](../COMPONENTS_REFERENCE.md) for the full `CRTEffects` API.

---

## CLI Terminal Animations

### Terminal Constraints
Expand Down Expand Up @@ -895,7 +951,7 @@ Need animation?

---

**Last Updated**: 2025-12-13
**Version**: 1.0.0
**Last Updated**: 2026-05-18
**Version**: 0.2.0
**Maintainer**: Celeste Brand System
**Status**: ✅ Phase 2 Complete
**Status**: ✅ Updated for 0.2.0 (CRT effects + glitch keyframes)
63 changes: 59 additions & 4 deletions docs/components/COMPONENT_LIBRARY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Celeste Brand System - Component Library

**Version**: 1.0.0
**Last Updated**: 2025-12-13
**Version**: 0.2.0
**Last Updated**: 2026-05-18
**Status**: 🟠 **HIGH PRIORITY DOCUMENT**

---
Expand Down Expand Up @@ -35,8 +35,11 @@ This document provides a complete inventory of all Celeste design system compone
| **Navigation** | 6 | 0 | Navbar, breadcrumbs, tabs |
| **Feedback** | 5 | 2 | Alerts, loaders, notifications |
| **Extensions** | 10 | 0 | Gallery, countdown, social links |
| **JS Libraries (0.2.0)** | 19 | 0 | Animation blocks, CRT, widgets, utilities |

**Total**: 56 web components, 8 CLI patterns
**Total**: 75 web components + JS libs, 8 CLI patterns

> **0.2.0 JS libraries** are documented in full in [`docs/COMPONENTS_REFERENCE.md`](../COMPONENTS_REFERENCE.md). See the section below for a summary.

---

Expand Down Expand Up @@ -1048,14 +1051,66 @@ Component

---

## 0.2.0 JavaScript Library Components

The 0.2.0 release adds a canonical JS layer on top of the CSS framework. Full API docs live in [`docs/COMPONENTS_REFERENCE.md`](../COMPONENTS_REFERENCE.md). Summary:

### Core (`src/core/`)

| Module | Class / Export | Purpose |
|--------|---------------|---------|
| `corruption-manager.js` | `CorruptionManager` | Lifecycle-managed multi-animation runner |
| `corruption-charsets.js` | charset helpers | Canonical charset access from `src/data/charsets.json` |
| `corruption-phrases.js` | phrase helpers | Canonical phrase access from `src/data/phrases.json` |
| `typing-animation.js` | `TypingAnimation` | Buffer-style corruption with SFW/NSFW modes |
| `timer-registry.js` | `TimerRegistry` | Global interval/timeout registry (UMD build) |
| `event-tracker.js` | `EventTracker` | DOM event lifecycle helpers |

### Lib (`src/lib/`)

**Animation Blocks** (`animation-blocks.js`) — 10 classes:
`TitleDecoder`, `ProgressBar`, `ScanlineSweep`, `TerminalBoot`, `GlitchPulse`, `ASCIIBorder`, `SystemDiagnostic`, `LoadingBarMulti`, `DataTransmission`, `TerminalPrompt`

| Module | Class / Export | Purpose |
|--------|---------------|---------|
| `crt-effects.js` | `CRTEffects` | Full CRT post-processing layer (scanlines, flicker, phosphor glow) |
| `corrupted-text.js` | `CorruptedText` | Inline character-level corruption |
| `corrupted-particles.js` | `CorruptedParticles` | Canvas 2D floating particle field |
| `corrupted-vortex.js` | `CorruptedVortex` | WebGL raymarched spiral tunnel |
| `gallery.js` | `Gallery` | Responsive grid gallery with lightbox |
| `lightbox.js` | `Lightbox` | Standalone image lightbox |
| `countdown-widget.js` | `CountdownWidget` | Event countdown with shape variants |
| `clock-widget.js` | `ClockWidget` | Real-time corrupted clock |
| `toast.js` | `ToastManager` | Singleton toast notification queue |
| `nsfw-reveal.js` | `NsfwReveal` | Blur overlay with click-to-reveal |
| `event-bar.js` | `EventBar` | Stream event overlay bar |
| `logo-banner.js` | `LogoBanner` | Animated logo/brand banner |
| `png-export.js` | `PNGExport` | html2canvas-based DOM export |
| `websocket-manager.js` | `WebSocketManager` | Reconnecting WebSocket with corruption states |

### Utilities (`src/core/`)

| Module | Exports | Purpose |
|--------|---------|---------|
| `random-utils.js` | `randomFrom`, `weightedRandom`, etc. | Random helpers |
| `time-utils.js` | `formatDuration`, `countdown`, etc. | Time formatting |
| `clipboard-helpers.js` | `copyToClipboard`, etc. | Clipboard access |
| `url-state.js` | `getParam`, `setParam`, etc. | URL search param state |

All JS libs share the same class-based API: `new FooClass(element, options)` with `start()`, `stop()`, `destroy()`.

---

## Related Documents

- **GLASSMORPHISM.md** - Detailed glass effect specifications
- **INTERACTIVE_STATES.md** - Hover, focus, active patterns
- **ANIMATION_GUIDELINES.md** - Motion and timing
- **COLOR_SYSTEM.md** - Semantic color usage
- **COMPONENT_MAPPING.md** - Cross-platform equivalents (Platform tier)
- **COMPONENTS_REFERENCE.md** - Full JS API reference (0.2.0)
- **CDN_CONSUMPTION.md** - CDN import guide

---

**Status**: ✅ **COMPONENT LIBRARY COMPLETE** - Ready for implementation
**Status**: ✅ **COMPONENT LIBRARY COMPLETE** - Updated for 0.2.0
49 changes: 46 additions & 3 deletions docs/components/GLASSMORPHISM.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Celeste Brand System - Glassmorphism

**Version**: 1.0.0
**Last Updated**: 2025-12-13
**Version**: 0.2.0
**Last Updated**: 2026-05-18
**Status**: 🟠 **HIGH PRIORITY DOCUMENT**

---
Expand Down Expand Up @@ -342,6 +342,49 @@ window.addEventListener('scroll', () => {

---

## 0.2.0 Container Variants

The T12 glassmorphism CSS merge added standalone container classes and color modifier classes in `src/css/glassmorphism.css`. These compose with the existing depth layers.

### Standalone Container Classes

| Class | Opacity | Blur | Use Case |
|-------|---------|------|----------|
| `.glass-container` | 85% | 15px | Default container (replaces ad-hoc glass inline styles) |
| `.glass-container-dark` | 92% | 20px | Modals, dropdowns, elevated panels |
| `.glass-container-subtle` | 60% | 8px | Low-key background sections |
| `.glass-container-gradient` | 80% + gradient | 15px | Hero sections with branded gradient overlay |
| `.glass-container-animated` | 80% | 15px | Animated shimmer; adds border glow pulse |

All variants include the `@supports not (backdrop-filter)` fallback automatically — no extra code needed.

### Color Modifier Classes

Compose with any container class to tint the border and shadow:

```html
<!-- Cyan-tinted glass card -->
<div class="glass-container glass-container-cyan">...</div>

<!-- Purple-tinted elevated panel -->
<div class="glass-container-dark glass-container-purple">...</div>

<!-- Magenta accent (default brand) -->
<div class="glass-container glass-container-magenta">...</div>
```

| Modifier | Border Color | Shadow Tint |
|----------|-------------|-------------|
| `.glass-container-cyan` | `#00ffff` | cyan glow |
| `.glass-container-purple` | `#8b5cf6` | purple glow |
| `.glass-container-magenta` | `#d94f90` | magenta glow (default accent) |

### `@supports` Fallback

All new classes include an automatic `@supports not (backdrop-filter: blur(1px))` block that upgrades the background opacity to 0.95 so content remains readable on browsers without blur support.

---

## CLI Equivalent (Block Characters)

Since terminals don't support `backdrop-filter`, the CLI achieves glassmorphism through **block characters and color gradients**.
Expand Down Expand Up @@ -599,4 +642,4 @@ From `DESIGN_TOKENS.md`:

---

**Status**: ✅ **GLASSMORPHISM COMPLETE** - Ready for implementation
**Status**: ✅ **GLASSMORPHISM COMPLETE** - Updated for 0.2.0 (new container variants + color modifiers)
Loading
Loading