Asi hof

'Hofstadter-io hof: CUE-powered code generation with flow engine and

install
source · Clone the upstream repo
git clone https://github.com/plurigrid/asi
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/plurigrid/asi "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/hof" ~/.claude/skills/plurigrid-asi-hof && rm -rf "$T"
manifest: skills/hof/SKILL.md
source content

Hof (-1)

CUE-based code generation. Now building VS Code coding agent.

Trit: -1 (MINUS - reductive/extractive code generation) Language: Go (core), CUE (schemas), TypeScript (VS Code) Branch:

_next
(active development)

DeepWiki vs Repo Divergence Analysis

DeepWiki ClaimsActual Repo StateDivergence
"Code Generation System"✓ lib/gen, schemas/LOW
"Module System"✓ lib/modLOW
"Task Engine / Flow"✓ flow/, flow.cueLOW
"TUI Eval Module"Deprecated, now VS CodeHIGH
"Formatters"✓ formatters/LOW

Key Finding: Major pivot to VS Code agent (lib/agent, extensions/vscode/).

Current Focus (from AGENTS.md)

We are currently developing a vscode extension for a custom coding agent setup, 
a copilot alternative and then some.

- lib/agent        - backend server (Go + ADK)
- extensions/vscode/extension  - extension core
- extensions/vscode/webviews/chat  - chat interface

Tech Stack

LayerTechnology
CoreGo, CUE
AgentADK-Go (Agent Development Kit)
VS CodeTypeScript, pnpm, vite, react
UItanstack, shadcn, tailwind
CIDagger, Docker

CUE Code Generation

// schemas/gen.cue - Generator schema
#Generator: {
    // Input data
    In: {...}
    
    // Output files
    Out: [...#File]
    
    // Templates
    Templates: [...#Template]
    
    // Partials (reusable snippets)
    Partials: [...#Template]
}

#File: {
    Filepath: string
    Contents: string | bytes
}

#Template: {
    Name: string
    Source: string
}

Flow Engine

// flow.cue - Task orchestration
package flow

import "hof.io/flow"

// Define tasks
@flow(build)
build: {
    gen: flow.#Gen & {
        Generator: "..."
    }
    
    fmt: flow.#Exec & {
        cmd: "gofmt -w ."
        dep: [gen]
    }
}

Veggie: The _next Branch Coding Agent

Name: Veggie (veg)
Status: Active development (commits daily Dec 2025)
Architecture: Dagger-powered virtualized workspaces + ADK-Go + MCP

Architecture

VS Code Extension ──WebSocket──► Agent Runtime ──► Dagger Environs
     │                               │
     │                               ├──► Tools (fs, exec, cache)
     │                               ├──► MCP (GitHub, Tavily)
     └── React Webviews              └──► LLM Models (Gemini, etc)

Tools Available

ToolDescription
fs_read/write/edit
File ops via Dagger
fs_list/glob/grep
File discovery
exec
Shell execution
cache_*
Persistent state

MCP Integrations

ToolsetEndpoint
GitHub
api.githubcopilot.com
Tavily
mcp.tavily.com
LocalIn-memory demo

Agent Config (CUE)

type Agent struct {
    Name, Model, Instruction string
    Tools, Toolsets, Mcp     []string
    SubAgents                []string
    Environ                  string // Dagger container
}

Project Structure

hofstadter-io/hof/
├── AGENTS.md           # AI agent instructions
├── lib/
│   ├── agent/          # Veggie backend (ADK-Go)
│   │   ├── agents/     # CUE config loading
│   │   ├── runtime/    # WebSocket server, session mgmt
│   │   ├── tools/      # filesys, exec, cache, mcp
│   │   └── models/     # LLM clients (gemini.go)
│   ├── gen/            # Code generator (legacy)
│   └── chat/           # LLM chat (openai, google, cosign)
├── extensions/vscode/
│   ├── extension/      # VS Code extension (TypeScript)
│   └── webviews/       # React chat UI (shadcn, tailwind)
├── flow/               # CUE workflow engine
└── schemas/            # CUE schemas

Usage

# Install hof
go install github.com/hofstadter-io/hof/cmd/hof@latest

# Initialize project
hof mod init my-project

# Generate code from CUE
hof gen ./design/... -T ./templates

# Run flow
hof flow build

# Development (VS Code extension)
cd extensions/vscode
pnpm install
pnpm dev

GF(3) Triad with Config Languages

CUE (+1)    + Nickel (0)  + Hof (-1)    = 0 ✓
 │              │             │
 │              │             └── Consumes schemas, emits code
 │              └── Mediates types/contracts
 └── Generates schemas via unification

Sexp Neighborhood

SkillTritBridge to Hof
cue-lang+1Hof consumes CUE schemas
nickel0Alternative config, gradual typing
lispsyntax-acset0Config → sexp → ACSet
borkdude+1Babashka for scripting
geb+1Categorical config semantics

VS Code Agent Architecture

┌─────────────────────────────────────────────────────────┐
│                   HOF VS CODE AGENT                      │
├─────────────────────────────────────────────────────────┤
│                                                          │
│   VS Code Extension                                      │
│   ┌─────────────────────────────────────────────────┐   │
│   │ extensions/vscode/extension/                     │   │
│   │ - Commands, activation                           │   │
│   │ - Webview hosting                                │   │
│   └─────────────────────────────────────────────────┘   │
│                          │                               │
│                          ▼                               │
│   React Webviews                                         │
│   ┌─────────────────────────────────────────────────┐   │
│   │ extensions/vscode/webviews/chat/                 │   │
│   │ - tanstack, shadcn, tailwind                     │   │
│   │ - Chat interface                                 │   │
│   └─────────────────────────────────────────────────┘   │
│                          │                               │
│                          ▼                               │
│   Agent Backend (ADK-Go)                                 │
│   ┌─────────────────────────────────────────────────┐   │
│   │ lib/agent/                                       │   │
│   │ - Tool execution                                 │   │
│   │ - LLM integration                                │   │
│   │ - Flow orchestration                             │   │
│   └─────────────────────────────────────────────────┘   │
│                                                          │
└─────────────────────────────────────────────────────────┘

Key Dependencies

DependencyPurpose
google.golang.org/adk
Agent Development Kit
dagger.io/dagger
Container virtualization
gorm.io/gorm
Session persistence
github.com/gorilla/websocket
Client communication
cuelang.org/go/cue
Agent configuration

Commit Pattern

(veg) implement clone & splice handlers  ← AI-generated
(human) swap button order in session-menu ← Manual

Trit: -1 (MINUS - code generation is reductive extraction) Key Property: CUE → code generation, now VS Code agent pivot Active Branch:

_next
Full Architecture: See ~/ies/VEGGIE_ARCHITECTURE_COMPLETE.md


End-of-Skill Interface

Integration with Sexp Skills

┌─────────────────────────────────────────────────────────────────┐
│                    CONFIG LANG TRIAD                             │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│   CUE (+1)              Nickel (0)              Hof (-1)        │
│   ┌──────────────┐     ┌──────────────┐       ┌──────────────┐  │
│   │ Lattice-based│     │ Gradual      │       │ Code gen     │  │
│   │ unification  │     │ typing +     │       │ from CUE     │  │
│   │              │     │ contracts    │       │ schemas      │  │
│   └──────────────┘     └──────────────┘       └──────────────┘  │
│          │                    │                      │           │
│          └────────────────────┼──────────────────────┘           │
│                               │                                  │
│                               ▼                                  │
│                    ┌──────────────────────┐                     │
│                    │ lispsyntax-acset (0) │                     │
│                    │ All configs → sexp   │                     │
│                    └──────────────────────┘                     │
│                                                                  │
│   Σ(trits) = +1 + 0 + (-1) = 0 ✓  GF(3) CONSERVED              │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Related Skills

SkillTritRelationship
cue-lang+1Schema source
nickel0Alternative config
gay-mcp+1Colors generated code
codex-self-rewriting0Self-modifying patterns

Autopoietic Marginalia

The interaction IS the skill improving itself.

Every use of this skill is an opportunity for worlding:

  • MEMORY (-1): Record what was learned
  • REMEMBERING (0): Connect patterns to other skills
  • WORLDING (+1): Evolve the skill based on use

Add Interaction Exemplars here as the skill is used.