color-envelope-preserving
БесплатноБез исполняемых скриптовНе проверенGF(3) color envelope preservation across navigator compositions
от plurigrid★ 73 звезды на GitHubОб этом скилле
Color Envelope Preserving
Core Concept
Every navigation path carries a color envelope - a GF(3) ternary assignment that propagates through the path composition. This skill ensures that composed Navigators maintain color conservation (the envelope sums to 0 mod 3) across all compositions.
GF(3) Color Trits:
- -1 (Red/MINUS) - Conservative/filtering paths
- 0 (Green/ERGODIC) - Neutral/structural paths
- +1 (Blue/PLUS) - Generative/enriching paths
The envelope invariant: Any valid Navigator composition must have trits that sum to 0 (mod 3).
Why Color Envelopes?
Determinism Through Color
Every navigation operation is seeded with a color value. Same color seed → same traversal order → same results every time.
# With SplitMix64 seeding from color
nav = @late_nav([ALL, pred(iseven)])
↓ (color=-1)
deterministic traversal order
Conservation Law
When two Navigators compose:
nav1 = @late_nav([ALL, pred(f)]) # trit = -1
nav2 = @late_nav([keypath("x")]) # trit = 0
nav_composed = compose_navigators(nav1, nav2)
# Check: (-1) + 0 = -1 ≠ 0
# => INVALID! Cannot compose these Navigators.
A valid composition requires a third Navigator to balance:
nav3 = @late_nav([keypath("y")]) # trit = +1
# Check: (-1) + 0 + (+1) = 0 ✓
# => VALID! Complete GF(3) triad.
Architecture
Color Assignment Algorithm
Each Navigator's trit is determined by its semantic role:
| Path Type | Trit | Justification |
|---|---|---|
[ALL] |
-1 | Expands cardinality (conservative gate) |
[pred(f)] |
-1 | Filters/restricts domain |
[keypath(k)] |
0 | Neutral structural access |
[INDEX(i)] |
0 | Direct indexing (no change) |
[APPEND(x)] |
+1 | Adds value (generative) |
[TRANSFORM(f)] |
+1 | Enriches/generates new form |
| Composition of above | Sum of trits | Trits compose additively |
Color Propagation
Input structure (color = c_in)
↓
Apply Navigator with trit = t_nav
↓
Output structure (color = c_in + t_nav mod 3)
↓
Apply next Navigator with trit = t_nav2
↓
Final color = c_in + t_nav + t_nav2 mod 3
Envelope Invariant Checker
function verify_envelope(navigator_chain::Vector{Navigator})
total_trit = sum(nav.trit for nav in navigator_chain) % 3
return total_trit == 0 # Valid if sums to 0 mod 3
end
API
Color Assignment
assign_trit(navigator::Navigator) :: Int
Determines the GF(3) trit for a Navigator.
nav = @late_nav([ALL, pred(f)])
trit = assign_trit(nav) # => -1 (filtering/expansion)
nav = @late_nav([keypath("x")])
trit = assign_trit(nav) # => 0 (structural)
nav = @late_nav([APPEND(value)])
trit = assign_trit(nav) # => +1 (generative)
color_seed(navigator::Navigator) :: UInt64
Generates a deterministic SplitMix64 seed from the Navigator's trit and structure.
nav = @late_nav([ALL, pred(iseven)])
seed = color_seed(nav) # => UInt64 derived from trit=-1, hash(path)
# Same Navigator always produces same seed
seed2 = color_seed(nav)
@assert seed == seed2 # ✓
Envelope Verification
verify_envelope(navs::Vector{Navigator}) :: Bool
Checks if a chain of Navigators maintains color conservation.
nav1 = @late_nav([ALL, pred(f)]) # trit = -1
nav2 = @late_nav([keypath("x")]) # trit = 0
nav3 = @late_nav([TRANSFORM(g)]) # trit = +1
verify_envelope([nav1, nav2, nav3]) # => true ((-1) + 0 + (+1) = 0 ✓)
verify_envelope([nav1, nav2]) # => false ((-1) + 0 = -1 ≠ 0)
complete_triad(nav1, nav2) :: Navigator
Given two Navigators, generates the third Navigator that completes the GF(3) triad.
nav1 = @late_nav([ALL, pred(f)]) # trit = -1
nav2 = @late_nav([keypath("x")]) # trit = 0
nav3 = complete_triad(nav1, nav2)
# => Navigator with trit = +1 (auto-generated)
verify_envelope([nav1, nav2, nav3]) # => true ✓
Deterministic Seeding
deterministic_select(nav, structure) :: Vector
Performs nav_select with color-seeded determinism guarantee.
nav = @late_nav([ALL, pred(iseven)])
results1 = deterministic_select(nav, [1,2,3,4,5,6])
results2 = deterministic_select(nav, [1,2,3,4,5,6])
@assert results1 == results2 # Always identical ✓
with_color_context(nav, color::Int) :: Function
Executes a Navigator selection with explicit color context.
nav = @late_nav([ALL, pred(iseven)])
# Force execution with color = +1
results = with_color_context(nav, +1) do
nav_select(nav, [1,2,3,4,5,6], x -> [x])
end
Integration with Inline Caching
The cache key for a Navigator includes both the path expression AND the color envelope:
cache_key = hash((path_expr, trit))
# => Different cache entries for nav with trit=-1 vs trit=+1
This ensures:
- Same path, different color → different cached Navigator
Установить color-envelope-preserving в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл color-envelope-preserving?
GF(3) color envelope preservation across navigator compositions
Как установить скилл color-envelope-preserving?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл color-envelope-preserving запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic