ForbocAI SDK & API Master Checklist
Tódó // Sýstém_Dóc
ᚠ ᛫ ᛟ ᛫ ᚱ ᛫ ᛒ ᛫ ᛟ ᛫ ᚲ
This document serves as the master checklist for building the ForbocAI SDK and its supporting API infrastructure. It consolidates the implementation plan with the architectural standards.
References
- Specs:
/Users/seandinwiddie/GitHub/forbocai/fern/openapi.yaml(Fern/OpenAPI source of truth) - Vision:
/Users/seandinwiddie/GitHub/forboc.ai(Source of Truth for “How it Works”) - Flagship Consumer:
/Users/seandinwiddie/GitHub/Forboc(The Game Engine) - Docs:
/Users/seandinwiddie/GitHub/forbocai(Fern/OpenAPI source of truth) - Standards:
/Users/seandinwiddie/GitHub/Forboc/notes/ref/standards/technology-maintenance(FP, CQRS, Redux) - API Service: Haskell Servant at
/Users/seandinwiddie/GitHub/api/hs/ - Deployment: Render.com (configured via
render.yaml)
/Users/seandinwiddie/GitHub/Forboc/notes/TODOs/system-todo.md /Users/seandinwiddie/GitHub/sdk /Users/seandinwiddie/GitHub/api
System Architecture & Data Flow
Core Philosophy: - ForbocAI (SDK): The Characters’ Brain/Mind - Infrastructure Layer. It acts as a “tiny harddrive” containing the Vector DB, SLM, and API connectors. It does not contain logic; it serves as the local infrastructure that executes the API’s directives. - Game Engine (Host): The World’s Brain/Mind - Execution Layer. It handles physics, state validation, and execution. - ForbocAI API: The Mind/Law - Logic Layer. The API performs the “Thinking” using proprietary deterministic logic (Pure Functions). It orchestrates the SDK but contains NO AI Models.
The Data Flow:
Game (World State) → SDK (Format/Store) → API (Logic/Decide) → SDK (Generate/Validate) → Game (Execute)
- Game: Reports event via Protocol (e.g., “Player hit Orc”).
- SDK: Formats event as
Observation, syncs to Local Vector DB, forwards to API. - API (Cloud): Runs Pure Logic Gates (deterministic rules, NO AI). Determines Intent and constructs Directive (System Prompt + Constraints).
- SDK (Local):
- Retrieval: Fetches relevant context from Vector DB.
- Generation: Uses Local SLM (Cortex) to generate specific content (dialogue/action) based on API’s Directive.
- Validation: Validates generated action against Protocol schema.
- SDK: Returns the final structured
Actionto the Game via Protocol. - Game: Executes the validated action within physics constraints.
Key Principle: The API provides the “Law” (logic), the SDK provides the “Voice” (generation), and the Game provides the “Reality” (execution).
Workflow & Standards
- API-First Development: Features are built safely in the cloud before reaching the client.
- Flow: User Stories -> BDD Tests (Haskell) -> API Endpoints -> SDK Integration.
- The API and SDK are built in tandem, but the API leads.
- No-Database Policy (API):
- The API is a Pure Logic Engine. It has NO Database. It holds no state.
- All state is managed by the SDK’s Local Vector DB (Micro-Database) and passed to the API in the
Contextof every request. - The API determines the next state based only on the input context (Pure Function).
Phase 1: SDK Core Development (Client-Side)
Goal: A lightweight, portable client library that defines the Agent interfaces and infrastructure (Vector DB, SLM, API Client). Strict FP & Immutability.
1.1 Architecture & Setup
1.2 Module Implementation
Note: Use Factory Pattern or Functional Composition. Avoid heavy Class Inheritance.
Phase 2: API Service (Proprietary Source)
Goal: The Central Logic Engine. The API handles “Thinking” (Pure Functional Logic & State) and orchestrates the SDK. The SDK handles “Generation” (Local Inference & Memory).
Stack: Haskell Servant, deployed to Render
2.1 Service Infrastructure
2.2 Domain Implementation
BDD Test Suite ✅ COMPLETED 2026-02-03
- Status: Complete feature files and Haskell step definitions
- Feature Files (
api/tests/bdd/features/):cortex.feature- Cortex initialization and inference scenariosagents.feature- Agent lifecycle and neuro-symbolic processingmemory.feature- Memory storage and semantic recallbridge.feature- Action validation and neuro-symbolic rulessoul.feature- IPFS export/import and NFT portabilityghost.feature- Automated QA testing sessions and results
- Haskell Step Definitions (
api/tests/bdd/hs/Steps/):Cortex.hs- Cortex test steps with HTTP clientGhost.hs- Ghost test steps with session management
- Test Runner:
api/tests/bdd/hs/Main.hs - Cabal Config:
api/tests/bdd/forbocai-bdd.cabal - To run tests:
cd api/tests/bdd && cabal run bdd-tests