SEA-Forge Capability Analysis

Date: 2026-01-29
Version Analyzed: dev (project_state.md reports v0.6.1 on 2026-01-22)
Analysis Scope: Evidence-based capability summary from codebase


1. Core Capabilities (Implemented / Present in Repo)

Semantic Modeling / Specifications

Capability Implementation Status
SEA DSL Parser Rust CLI (apps/sea-forge-cli/) with sea parse / sea validate wiring in just/62-compiler.just ✅ Present
SDS YAML Validation tools/validate_sds.py + tools/schemas/sds.schema.json ✅ Present
AST Schema Validation tools/schemas/ast-v3.schema.json ✅ Present
IR Schema Validation tools/schemas/sea_ir.schema.json ✅ Present
Manifest Schema Validation tools/schemas/manifest.schema.json ✅ Present

Evidence: Schemas in tools/schemas/, SDS validator at tools/validate_sds.py, compiler recipes in just/62-compiler.just.


Compilation / Transformation Pipeline

Stage Tool Status
SEA → AST just sea-parse (uses sea parse from CLI) ✅ Present
AST Normalization tools/normalize_ast.py ✅ Present
AST → IR tools/ast_to_ir.py ✅ Present
IR → Manifest tools/ir_to_manifest.py ✅ Present
IR → KG (TTL/RDF) tools/ir_to_kgs.py ✅ Present
SDS → Manifest tools/codegen/sds_to_manifest.py ✅ Present
SDS → CALM Arch tools/sds_to_calm.py ✅ Present
Full Pipeline just pipeline <ctx> / pipeline-all ✅ Present

Evidence: Compiler recipes in just/62-compiler.just, tools in tools/.


Validation / Governance / Invariant Checking

Capability Implementation Enforcement Point
Flow Annotation Linting tools/flow_lint.py Compile-time
CQRS Annotation Checks flow_lint.py rules Compile-time
SHACL Shape Validation tools/kg_validate.py, tools/shape_lint.py Validation-time
Local Triple Validation tools/validate_local_triples.py Validation-time
Shape Impact Analysis tools/shape_impact_analysis.py Validation-time
Behavior Drift Gate scripts/ci/behavior_drift_gate.sh / .py (supports strict mode) CI-time
Drift Detection/Remediation CLI tools/drift_heal.py Dev/CI
Policy Checks (SK Plugin) libs/sea/adapters/semantic-kernel/src/plugins/governance_check.py Runtime

Evidence: tools in tools/, CI recipes in just/50-ci.just, drift commands in just/60-spec.just, Semantic Kernel plugin in libs/sea/adapters/semantic-kernel/.


Code / Artifact Generation

Generator Implementation Output
Manifest Codegen tools/codegen/gen.py Domain, Ports, App, Adapters, API layers
Adapter Template Generator tools/codegen/gen_adapter_template.py Adapter scaffolds
Integration Test Generator tools/codegen/gen_test_template.py Pytest templates
Gap Report tools/codegen/gap_report.py Missing adapters, packages, env vars
Service Generator tools/codegen/gen_service.py Service scaffolding
Nx Bounded Context Generator generators/bounded-context/ Nx workspace scaffolding
Nx Adapter Generator generators/adapter/ TS adapter scaffolding
Nx API Surface Generator generators/api-surface/ API layer scaffolding

Templates: Jinja2 templates under tools/codegen/templates/.

Supported Adapter Patterns (per tools/codegen/gen_adapter_template.py):


CLI Tooling

CLI Language Location Commands
sea-forge Rust apps/sea-forge-cli/ apply, doctor, down, init, logs, setup, status, up, validate, watch

Evidence: apps/sea-forge-cli/src/commands/.


Applications (Repo)

App Location Notes
API apps/api/ App source present
Sea Forge CLI apps/sea-forge-cli/ Rust CLI
MQ Worker apps/sea-mq-worker/ NATS worker
Workbench apps/workbench/ React UI
Docs Site apps/docs-site/ Documentation site

Services (Repo)

Service Location Notes
Policy Gateway services/policy-gateway/ OPA + LiteLLM proxy
Knowledge Graph services/knowledge-graph/ Oxigraph + SPARQL
A2A services/a2a/ Agent-to-Agent service
Embedding services/embedding/ Embedding service
LLM Provider services/llm-provider/ Model routing abstraction
Evidence Ingest services/evidence-ingest/ Service present
Intent Ingest services/intent-ingest/ Service present
Workbench BFF services/workbench-bff/ API for Workbench (drift endpoints)

AI/Agent Integration Hooks

Integration Implementation Status
Semantic Kernel Plugin libs/sea/adapters/semantic-kernel/ ✅ Present
A2A Adapter libs/sea/adapters/a2a/ ✅ Present
ACP Adapter libs/sea/adapters/acp/ ✅ Present

Semantic Kernel Functions (from governance_check.py):


2. Supported Workflows

Workflow 1: Spec → Compile → Generate

1
just pipeline <context>

Steps: SDS validate → SEA validate → SEA parse → AST → IR → Manifest
Evidence: just/62-compiler.just.


Workflow 2: Last-Mile Adapter Generation

1
just last-mile <context>

Phases: Gap Analysis → Generate Adapters + Tests → Verify Gaps → Env Setup → Tests → Semantic Check
Evidence: just/64-lastmile.just.


Workflow 3: Drift Detection & Remediation (Spec/Code)

1
2
3
4
just drift-scan
just drift-check <context>
just drift-heal
just drift-report

Evidence: just/60-spec.just, CLI at tools/drift_heal.py, drift API routes in services/workbench-bff/src/api/drift_routes.py.


Workflow 4: Behavior Drift Gate (CI)

1
just ci-drift

Runs scripts/ci/behavior_drift_gate.sh (warn mode locally), with a Python variant available. If the behavior API is unavailable, the gate loads fixtures (scripts/tests/fixtures/behavior_drift_fixtures.json).


Workflow 5: Determinism Check

1
just ci-determinism

Evidence: just/50-ci.just + tools/run_codegen_affected.sh (if present).


Workflow 6: Performance Test Suite

1
just test-performance

Runs pytest tests/performance -v with baseline-based thresholds.
Evidence: just/40-test.just, tests/performance/. Latest Run: 2026-01-29 — just test-performance (2 passed, 1 skipped).


Workflow 7: Chaos Testing Suite

1
2
3
just chaos-up
just run-chaos <scenario>
just chaos-down

Evidence: just/80-devservices.just, tests/chaos/run_chaos.py, infra/docker/docker-compose.chaos.yml. Note: Smoke tests present in tests/chaos/test_runner.py. Latest Run: 2026-01-29 — pytest tests/chaos -v (2 passed).


3. Guardrails, Constraints, and Guarantees

Compile-Time Enforcement

Invariant Enforcing Code
Flows require @cqrs annotation tools/flow_lint.py
Commands require @tx (configurable) tools/flow_lint.py
Events require @outbox tools/flow_lint.py
Codegen output roots constrained tools/codegen/gen.py:_validate_output_roots
Pipeline schema validation tools/ast_to_ir.py, tools/ir_to_manifest.py

Validation-Time Enforcement

Invariant Enforcing Code
SDS conforms to sds.schema.json tools/validate_sds.py
SHACL shapes conflict-free tools/shape_lint.py
RDF graphs conform to SHACL tools/kg_validate.py

Runtime Enforcement (Plugin)

Invariant Enforcing Code
Operations checked against policies GovernanceCheckPlugin.check_policy()
Authority boundaries (SDS-031) GovernanceCheckPlugin.validate_authority()
Invariant preservation (REF-012) GovernanceCheckPlugin.check_invariants()

4. Drift / Misalignment Handling

What Exists

Mechanism Location Scope
Spec/Code Drift Scanner + Remediator tools/drift_heal.py CLI workflows, auto-fixable drift
Drift API (Scan/Analyze/Remediate) services/workbench-bff/src/api/drift_routes.py Workbench API
Behavior Drift Gate scripts/ci/behavior_drift_gate.sh CI drift threshold checks (strict mode supported)
Determinism Check just ci-determinism Repo clean after codegen
Drift Remediation PRs services/workbench-bff/src/adapters/pr_creator.py GitHub PR creation for auto-remediation

Notes:


5. What Is Missing or Unclear (Based on Evidence)

Likely Missing / Deferred

Area Evidence
WASM publishing Not verified in repo (publishing artifacts not present)
Zed extension publishing Not verified in repo (extension publish pipeline not present)

Observed Uncertainties


6. One-Paragraph “What This System Really Is”

SEA-Forge is a spec-first compiler and generator stack for SEA DSL and SDS that produces manifests and code from schemas, with deterministic regeneration checks and a drift detection/remediation layer. The repo contains Rust CLI tooling, Python compilation/validation utilities, Nx generators, multiple services (policy gateway, knowledge graph, ingest, workbench BFF), and UI applications. Governance enforcement is wired via Semantic Kernel plugins and OPA integrations, while drift detection includes spec/code scanning, remediation PRs, and a CI behavior drift gate (strict mode supported). The evidence suggests a mature compilation pipeline and strong guardrails, with some deployment and publishing items still in progress.


7. Evidence-Backed Capability List

SEA-Forge currently supports:


8. Notes for Documentation Accuracy

project_state.md vs. Repo Evidence

docs/workdocs/project_state.md (2026-01-22) claims ~90% completion and automatic drift remediation. The repo now contains a drift CLI + API routes and CI gate to support those claims. Where the report mentions “published” artifacts (WASM, extensions), those remain unverified in the codebase.

README vs. Reality


9. Skeptical Senior Engineer’s Assessment

✅ Would Trust Today

Capability Why
Compilation pipeline (SEA→AST→IR→Manifest) Clear tooling + schema validation in place
SDS/AST/IR/Manifest validation JSON-schema validators + explicit recipes
Flow annotation linting Single source of truth with explicit rules
Determinism check Repo clean check is simple and reliable
Drift CLI basic detection Implemented in tools/drift_heal.py with analyzers and reports
Behavior drift gate (strict mode) Explicit strict flag prevents fixture fallback in production
Workbench auth (OIDC + JWKS) Backend verifies JWT signatures and enforces OIDC in production
Knowledge graph reasoning Reasoning profiles wired through API + adapter + reasoner

⚠️ Would Be Cautious About

Capability Concern
Drift remediation PR creation Requires external GitHub token/config; needs integration validation
Workbench governance UI Requires runtime services + configured IdP to validate in deployment

🚫 Would NOT Rely On Yet

Capability Why Not
WASM distribution Publishing unverified in repo
Zed extension Pending publish flow

Bottom Line

For production: SEA-Forge is a solid spec-first compiler + generator system with determinism checks and a real drift detection/remediation surface.
Still verify: Publishing flows and external LSP wiring before hard commitments.