⚡ VibesPro™ Integration

Code generation and projections via chat and IDE actions.


Code Generation Pipeline

1
2
3
4
5
┌─────────────┐     ┌──────────┐     ┌──────────────┐     ┌────────────┐
│  .sea spec  │────▶│   AST    │────▶│   Manifest   │────▶│ Generated  │
│             │     │          │     │              │     │   Code     │
└─────────────┘     └──────────┘     └──────────────┘     └────────────┘
     validate          parse           transform           codegen

Generate Code (LibreChat)

Full Pipeline

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
You: Generate code for the case-management bounded context

SEA™: Running VibesPro™ pipeline...

Step 1/4: Parsing AST
✅ 12 entities, 8 flows, 5 policies

Step 2/4: Generating IR
✅ Intermediate representation created

Step 3/4: Creating Manifest
✅ CQRS contracts, port definitions

Step 4/4: Code Generation
✅ TypeScript output

Generated files:
├── libs/case-management/domain/src/gen/
│   ├── entities.ts (Case, Stage, Task)
│   ├── value-objects.ts (Milestone, CaseStatus)
│   ├── events.ts (CaseCreated, StageTransitioned)
│   └── commands.ts (CreateCase, TransitionStage)
├── libs/case-management/ports/src/gen/
│   └── case-repository.port.ts
└── libs/case-management/adapters/src/gen/
    └── case-repository.adapter.ts

Single Entity

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
You: Generate TypeScript types for the Case entity only

SEA™: Generated Case entity types:

```typescript
// libs/case-management/domain/src/gen/case.entity.ts

export interface CaseProps {
  readonly id: CaseId;
  readonly title: string;
  readonly status: CaseStatus;
  readonly stages: Stage[];
  readonly createdAt: Date;
}

export class Case {
  private constructor(private readonly props: CaseProps) {}
  
  static create(props: Omit<CaseProps, 'id' | 'createdAt'>): Case {
    // INV-CASE-001: Title must not be empty
    if (!props.title.trim()) {
      throw new DomainError('Case title is required');
    }
    return new Case({
      ...props,
      id: CaseId.generate(),
      createdAt: new Date(),
    });
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---

## Zed IDE Actions

### Generate from Current File

1. Open `docs/specs/case-management/case-management.sea`
2. Cmd+Shift+G or Command Palette → "SEA™: Generate Code"
3. Output appears in Problems panel and file explorer

### Quick Generate via Agent

In the agent panel:

Generate types for case-management, TypeScript with Zod validation

1
2
3
4
5
6
7
---

## Projection Types

### CALM Architecture

You: Generate CALM diagram for governance context

SEA™: CALM Projection (SDS-008):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "$schema": "https://calm.finos.org/schema/1.0",
  "nodes": [
    {
      "id": "policy-service",
      "type": "service",
      "description": "Policy evaluation service"
    },
    {
      "id": "policy-db",
      "type": "database",
      "description": "Policy rule storage"
    }
  ],
  "relationships": [
    {
      "type": "uses",
      "source": "policy-service",
      "target": "policy-db"
    }
  ]
}

Visualize: open generated/governance.calm.svg

1
2
3
### RDF Triples

You: Export governance domain as RDF

SEA™: Generated Turtle format:

1
2
3
4
5
6
7
8
9
10
11
12
@prefix sea: <http://sea-forge.com/schema/core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

sea:PolicyRule a sea:Entity ;
    rdfs:label "PolicyRule" ;
    sea:domain "governance" ;
    sea:invariant "INV-POL-001" .

sea:EvaluatePolicy a sea:Flow ;
    sea:from sea:PolicyEngine ;
    sea:to sea:PolicyRule ;
    sea:cqrsKind "command" .

Loaded to Knowledge Graph: ✅

1
2
3
### SBVR Rules

You: Extract business rules as SBVR

SEA™: SBVR Projection:

Vocabulary:

Rules:

  1. It is obligatory that each Policy Rule has exactly one owner.
  2. It is prohibited that an Agent approves its own recommendations.
  3. It is necessary that each mutation is logged to the audit trail.

Output: generated/governance.sbvr.md

1
2
3
4
5
6
7
---

## Generator Customization

### Template Override

You: Generate Case entity using our custom template at templates/entity.ts.hbs

SEA™: Using custom template… Generated with template: templates/entity.ts.hbs Output: libs/case-management/domain/src/gen/case.entity.ts

1
2
3
### Language Selection

You: Generate case-management in Python with Pydantic

SEA™: Python generation not yet supported. Available:

Would you like TypeScript + Zod instead?

1
2
3
4
5
6
7
---

## Verification

### Check Determinism

You: Verify the generator is deterministic for case-management

SEA™: Running determinism check…

Run 1: SHA256 = abc123… Run 2: SHA256 = abc123… Run 3: SHA256 = abc123…

✅ Deterministic: All outputs identical

1
2
3
### Diff Generated Code

You: Show changes between current and regenerated code

SEA™: Regenerating and comparing…

1
2
3
4
5
6
7
--- libs/case-management/domain/src/gen/case.entity.ts (current)
+++ libs/case-management/domain/src/gen/case.entity.ts (regenerated)
@@ -15,6 +15,7 @@
   readonly status: CaseStatus;
   readonly stages: Stage[];
+  readonly assignee?: UserId;  // Added from spec update
   readonly createdAt: Date;

1 file changed, 1 insertion. ```


Best Prompts for VibesPro™

Task Prompt
Full generate “Generate code for [context]”
Single entity “Generate types for [Entity] only”
CALM diagram “Create CALM architecture for [context]”
RDF export “Export [context] to RDF/Turtle”
Check determinism “Verify generator determinism for [context]”

See Also:


Last Updated: January 2026