Skip to content

Web AI Bridge

The web AI bridge lets you capture expertise from conversations with Claude.ai, Gemini, or ChatGPT and transfer it into a coding agent project. The process uses a single Python bundle file as the interchange format.

Three-Step Workflow

Step 1: Get the Prompt

Terminal window
stato crystallize --web --raw | pbcopy

This copies the web crystallize prompt to your clipboard. The prompt instructs the web AI to output a structured Python bundle file containing all the expertise from your conversation.

Step 2: Generate the Bundle

Paste the prompt into your web AI conversation. The AI will output a single Python file containing:

# stato_bundle.py (generated by web AI)
SKILLS = {
"qc_filtering": '''
class QualityControl:
name = "qc_filtering"
description = "Single-cell RNA-seq quality control"
version = "1.0.0"
default_params = {"min_genes": 200, "max_pct_mito": 20}
def run(self, adata):
...
''',
"normalize": '''
class Normalization:
...
''',
}
PLAN = '''
class AnalysisPlan:
name = "scrna_analysis"
objective = "Complete scRNA-seq analysis pipeline"
steps = [...]
'''
MEMORY = '''
class ProjectState:
phase = "analysis"
tasks = [...]
'''
CONTEXT = '''
class ProjectContext:
project = "cortex_scrna"
description = "Mouse cortex P14 scRNA-seq analysis"
'''

Save the AI’s output as stato_bundle.py.

Step 3: Import

Terminal window
stato import-bundle stato_bundle.py

This command:

  1. Parses the bundle using ast.parse (safe, no exec on untrusted input)
  2. Extracts each module (skills from the SKILLS dict, plus PLAN, MEMORY, CONTEXT strings)
  3. Validates every module through the 7-pass compiler
  4. Writes valid modules to .stato/
  5. Generates bridge files for your coding agent

Import Options

Terminal window
# Import and generate bridges for all platforms
stato import-bundle stato_bundle.py --platform all
# Preview without writing
stato import-bundle stato_bundle.py --dry-run
# Generate bridge for a specific platform
stato import-bundle stato_bundle.py --platform cursor

Bundle Format

The bundle file uses a simple convention:

VariableTypeContent
SKILLSdict[str, str]Mapping of skill names to Python class source strings
PLANstrPython class source for the plan module
MEMORYstrPython class source for the memory module
CONTEXTstrPython class source for the context module

All variables are optional. The parser extracts whatever is present.

Safety

The bundle parser uses ast.parse to read the file as an abstract syntax tree. It never calls exec on the bundle file itself. Only after extracting individual module source strings and validating them through the compiler does stato execute them in a sandbox (Pass 6 of the compiler).

This means a malicious bundle file cannot execute arbitrary code during parsing.