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
stato crystallize --web --raw | pbcopyThis 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
stato import-bundle stato_bundle.pyThis command:
- Parses the bundle using
ast.parse(safe, noexecon untrusted input) - Extracts each module (skills from the
SKILLSdict, plusPLAN,MEMORY,CONTEXTstrings) - Validates every module through the 7-pass compiler
- Writes valid modules to
.stato/ - Generates bridge files for your coding agent
Import Options
# Import and generate bridges for all platformsstato import-bundle stato_bundle.py --platform all
# Preview without writingstato import-bundle stato_bundle.py --dry-run
# Generate bridge for a specific platformstato import-bundle stato_bundle.py --platform cursorBundle Format
The bundle file uses a simple convention:
| Variable | Type | Content |
|---|---|---|
SKILLS | dict[str, str] | Mapping of skill names to Python class source strings |
PLAN | str | Python class source for the plan module |
MEMORY | str | Python class source for the memory module |
CONTEXT | str | Python 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.