Skip to content
zulip-cogen logo

Zulip Cogen Skill 🐸⚡

zulip-cogen

Zulip Cogen Skill 🐸⚡

plurigrid/asi0installs67starsOther

SKILL.md

Full skill instructions

Zulip Cogen Skill 🐸⚡

Trit: +1 (PLUS - Generator) GF(3) Triad: dynamic-sufficiency (-1) ⊗ proof-of-frog (0) ⊗ zulip-cogen (+1) = 0

Overview

Code generator from Category Theory Zulip knowledge base with dynamic sufficiency gating. Transforms 121k messages into executable artifacts only when sufficient context is verified via ε-machine coverage.

"No generation without sufficient witness. The ε-machine observes, the gate permits."

Architecture

┌─────────────────────────────────────────────────────────┐
│                    ZULIP COGEN                          │
├─────────────────────────────────────────────────────────┤
│  INPUT                    OUTPUT                        │
│  ┌──────────────┐        ┌─────────────────────────┐   │
│  │ CT Zulip     │───────▶│ Lean4 proofs            │   │
│  │ 121k msgs    │        │ Mermaid diagrams        │   │
│  │ 81 ponds     │        │ Julia/​Python impls      │   │
│  └──────────────┘        │ ACSet schemas           │   │
│                          └─────────────────────────┘   │
└─────────────────────────────────────────────────────────┘

Generation Modes

ModeInputOutput
proofMath discussionLean4 theorem
diagramCategory descriptionMermaid/​tikzcd
implAlgorithm discussionJulia/​Python code
schemaData structure talkACSet definition
skillTopic clusterSKILL.md

Usage

# Generate Lean4 proof from discussion
zulip-cogen proof "adjoint functors" --pond theory:-category-theory

# Generate diagram from thread
zulip-cogen diagram --thread-id 12345 --format mermaid

# Generate implementation
zulip-cogen impl "kan extension" --lang julia

# Generate ACSet schema
zulip-cogen schema "simplicial sets" 

# Generate skill from pond
zulip-cogen skill --pond theory:-topos-theory

Example Generations

Proof Mode

Input: Discussion about "left adjoints preserve colimits"
Output:
```lean
theorem left_adjoint_preserves_colimits 
    {C D : Category} (F : Functor C D) (G : Functor D C)
    (adj : F ⊣ G) : PreservesColimits F := by
  intro J K c hc
  exact adj.leftAdjointPreservesColimits c hc

Diagram Mode

Input: "The Yoneda embedding is fully faithful"
Output:
```mermaid
graph LR
    C[C] -->|y| PSh["[Cᵒᵖ, Set]"]
    subgraph "Yoneda"
        y["y: C → Hom(-, C)"]
    end
    style y fill:#08bed5

Implementation Mode

Input: Discussion on "computing left Kan extensions"
Output:
```julia
function left_kan(F::Functor, K::Functor)
    # Lan_K(F)(d) = colim_{(c,k) ∈ (K↓d)} F(c)
    d -> begin
        comma = comma_category(K, d)
        colimit(c -> F(c.source), comma)
    end
end

Pipeline

class ZulipCogen:
    def __init__(self, db_path: str):
        self.db = duckdb.connect(db_path)
        self.gay_seed = 0x6761795f636f6c6f
    
    def generate(self, mode: str, query: str, **kwargs) -> str:
        # 1. Retrieve relevant messages
        context = self.retrieve(query, kwargs.get('pond'))
        
        # 2. Extract structure
        structure = self.extract_structure(context, mode)
        
        # 3. Generate artifact
        return self.synthesize(structure, mode, kwargs.get('lang'))
    
    def retrieve(self, query: str, pond: str = None) -> List[Message]:
        sql = """
            SELECT content, sender, color 
            FROM ct_zulip_messages m
            JOIN ct_zulip_streams s ON m.stream_id = s.id
            WHERE m.content LIKE ?
        """
        if pond:
            sql += " AND s.name LIKE ?"
        return self.db.execute(sql, params).fetchall()

Dynamic Sufficiency Integration

ε-Machine Gating

Before ANY generation, verify sufficient context:

def pre_generation_gate(query: str, mode: str) -> Verdict:
    """Gate generation on sufficient Zulip context."""
    messages = retrieve(query)
    coverage = compute_coverage(query, messages)
    
    if coverage.score >= 0.7:  # 70% threshold for generation
        return Verdict.PROCEED
    elif coverage.score >= 0.3:
        return Verdict.WARN(f"Low coverage: {coverage.score:.0%}")
    else:
        return Verdict.ABORT(f"Insufficient context: {len(messages)} msgs")

Causal States for Generation

Causal StateRequired CoverageArtifact
PROOF_READY3+ math discussionsLean4 theorem
DIAGRAM_READY2+ structural mentionsMermaid
IMPL_READY5+ code referencesJulia/​Python
SCHEMA_READY3+ type discussionsACSet

Variational Bound

min(sufficiency) ≤ generation ≤ max(fanout)

dynamic-sufficiency GATES: Prevents generation without context
zulip-cogen GENERATES: Synthesizes artifacts from sufficient context

Frog Lifecycle as Cogen Pipeline

StageTritCogen PhaseSufficiency Check
🥒 TADPOLE-1Retrieve contextε-machine inference
🐸 FROGLET0Extract structureCoverage ≥ 0.7
🦎 MATURE+1Synthesize artifactGenerate if sufficient

Integration with Skills

Generated artifacts feed back into skill ecosystem:

zulip-cogen skill --pond theory:-type-theory
    ↓
~/​.claude/​skills/​type-theory-ct/​SKILL.md
    ↓
proof-of-frog verifies GF(3) balance

Gay.jl Coloring

Each generation gets deterministic color based on query hash:

def generation_color(query: str, mode: str) -> str:
    h = fnv1a(f"{query}:{mode}")
    seed = splitmix64(GAY_SEED ^ h)
    return seed_to_color(seed)

Files

PathPurpose
~/​ies/​hatchery.duckdbCT Zulip archive
~/​ies/​zulip_cogen.pyGenerator implementation
~/​.claude/​skills/​zulip-cogen/Skill definition

References

More Other skills

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View

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 colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

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 colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

179.7K 76.1K
View

Fundamental design principles for writing maintainable, testable Python code.

40.2K 21.9K
View

Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.

40.2K 20K
View

Generate Playwright tests from scenarios using interactive browser exploration and validation.

39.7K 18.2K
View

Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.

40.2K 14.7K
View

GDPR-compliant data handling with consent management, data subject rights, and privacy controls.

40.2K 14.3K
View

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

40.2K 13.5K
View

Detailed multi-file refactor planning with safety checks and rollback guidance.

39.7K 13K
View