juvix-intents
БесплатноБез исполняемых скриптовНе проверенJuvix intent-centric language for Anoma with Geb compilation and GF(3) typed resources
от plurigrid★ 73 звезды на GitHubОб этом скилле
Juvix Intents (+1)
Intent-centric language compiling to Geb categorical semantics
Trit: +1 (PLUS - generative) Compiles to: Geb → Vampir → ZK proofs
Overview
Juvix is Anoma's intent-centric programming language:
Juvix Source → Core → Geb Morphisms → Vampir IR → ZK Circuit
↑ ↑ ↑ ↑
Types Normalize Categorify Arithmetize
Obstruction Types
module Obstruction;
-- GF(3) trit type
type GF3 := Minus | Ergodic | Plus;
-- Trit arithmetic (mod 3)
add : GF3 -> GF3 -> GF3
add Minus Minus := Plus -- (-1) + (-1) = +1 (mod 3)
add Minus Ergodic := Minus -- (-1) + 0 = -1
add Minus Plus := Ergodic -- (-1) + (+1) = 0
add Ergodic x := x -- 0 + x = x
add Plus Minus := Ergodic -- (+1) + (-1) = 0
add Plus Ergodic := Plus -- (+1) + 0 = +1
add Plus Plus := Minus; -- (+1) + (+1) = -1 (mod 3)
-- Obstruction from Bumpus decomposition failure
type Obstruction := mkObstruction {
sexp : ByteArray; -- S-expression witness
trit : GF3; -- Triadic charge
h1Class : Nat; -- Cohomology class (>0 = obstruction)
treewidth : Nat; -- Exceeded threshold
color : Word64; -- Gay.jl deterministic color
seed : Word64 -- SplitMix64 seed
};
-- Check if decomposition failed
isObstruction : Obstruction -> Bool
isObstruction obs := h1Class obs > 0;
-- VCG externality payment
vcgExternality : Obstruction -> Nat
vcgExternality obs :=
let baseCost := 1000000 -- 0.001 APT
multiplier := 10000 -- 100%
in (h1Class obs) * baseCost * multiplier / 10000;
Intent Types
module Intent;
import Obstruction;
-- Resource type (what can be nullified/committed)
type Resource :=
| ObstructionRes Obstruction
| TokenRes Token
| ReceiptRes ChainId ByteArray;
-- Intent: preference over state transitions
type Intent := mkIntent {
owner : Address;
nullify : List Resource; -- Resources to consume
commit : List Resource; -- Resources to produce
constraints : List Constraint
};
-- Constraint on intent satisfaction
type Constraint :=
| VcgPayment Nat -- Minimum VCG payment
| GF3Balance -- Sum of trits must be 0 (mod 3)
| SpectralGap Float; -- Minimum spectral gap preserved
-- Cross-chain pass intent
passObstruction : Address -> Obstruction -> ChainId -> Intent
passObstruction owner obs target :=
mkIntent {
owner := owner;
nullify := [ObstructionRes obs];
commit := [ReceiptRes target (hash obs)];
constraints := [VcgPayment (vcgExternality obs), GF3Balance]
};
Compilation to Geb
module GebCompile;
import Intent;
import Geb;
-- Compile intent to Geb morphism
compileIntent : Intent -> Geb.Morphism
compileIntent intent :=
-- Intent = pair of (nullify, commit)
-- Nullify: inject-left to void (consume)
-- Commit: inject-right from void (produce)
Geb.pair
(compileNullify (nullify intent))
(compileCommit (commit intent));
-- Compile nullification
compileNullify : List Resource -> Geb.Morphism
compileNullify [] := Geb.terminal Geb.so1
compileNullify (r :: rs) :=
Geb.pair
(Geb.injectLeft (compileResource r) Geb.so0)
(compileNullify rs);
-- Compile commitment
compileCommit : List Resource -> Geb.Morphism
compileCommit [] := Geb.init Geb.so0
compileCommit (r :: rs) :=
Geb.pair
(Geb.injectRight Geb.so0 (compileResource r))
(compileCommit rs);
-- Resource to Geb type
compileResource : Resource -> Geb.Object
compileResource (ObstructionRes obs) :=
Geb.prod
(Geb.prod Geb.so1 Geb.so1) -- (sexp, trit)
(Geb.prod Geb.so1 Geb.so1); -- (h1Class, color)
compileResource (TokenRes tok) := Geb.so1;
compileResource (ReceiptRes _ _) := Geb.so1;
Free Monad for Obstruction Game
module ObstructionMonad;
import Obstruction;
-- Functor for obstruction game
type ObstructionF (a : Type) :=
| NoObstruction a -- Decomposition succeeded
| WithObstruction Obstruction a; -- Decomposition failed → H¹ ≠ 0
-- Free monad
type Free (f : Type -> Type) (a : Type) :=
| Pure a
| Roll (f (Free f a));
-- Obstruction monad = Free ObstructionF
ObstructionMonad : Type -> Type
ObstructionMonad := Free ObstructionF;
-- Attempt decomposition (creates obstruction if tw > threshold)
attemptDecomposition : ByteArray -> Nat -> Word64 -> ObstructionMonad Unit
attemptDecomposition sexp tw seed :=
if tw <= 3
then Pure unit
else
let h1 := tw - 3
trit := toGF3 ((seed `xor` (natToWord64 tw)) `mod` 3)
color := gayColor seed tw
obs := mkObstruction sexp trit h1 tw color seed
in Roll (WithObstruction obs (Pure unit));
-- Bind preserves spectral gap
bind : ObstructionMonad a -> (a -> ObstructionMonad b) -> ObstructionMonad b
bind (Pure a) k := k a
bind (Roll (NoObstruction rest)) k := Roll (NoObstruction (bind rest k))
bind (Roll (WithObstruction obs rest)) k :=
Roll (WithOb
Установить juvix-intents в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл juvix-intents?
Juvix intent-centric language for Anoma with Geb compilation and GF(3) typed resources
Как установить скилл juvix-intents?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл juvix-intents запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic