Skip to content

Commit 726ce9b

Browse files
committed
feat: add ObjectStack Protocol Roadmap outlining strategic phases and goals
1 parent bfc66c3 commit 726ce9b

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

PROTOCOL_ROADMAP.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# 🚀 ObjectStack Protocol Roadmap
2+
3+
This document outlines the strategic evolution of the ObjectStack specifications. The goal is to move from a "Definition Language" to a "Executable Knowledge Graph".
4+
5+
## 📅 Phase 1: Hardening & Standardization (Current)
6+
**Focus:** Strict typing, Zod v4 compliance, and stability.
7+
8+
- [x] **Zod v4 Upgrade**: strict `z.record()` and inferred types.
9+
- [x] **Monorepo Structure**: Isolated `spec` package.
10+
- [x] **Doc Generation**: Automated reference docs from schemas.
11+
12+
## 📅 Phase 2: Expression & Logic (Next Quarter)
13+
**Focus:** Making strings executable and safe.
14+
15+
### 1. Formula Protocol (`data/formula.zod.ts`)
16+
Currently, formulas are raw strings. We need a standardized AST (Abstract Syntax Tree) to ensuring formulas can run anywhere (SQL, MongoDB, Browser, Node.js).
17+
* **Goal**: `z.string()` -> `FormulaASTNode`.
18+
* **Features**: Type checking for formulas at design time.
19+
20+
### 2. Refined Plugin Context (`system/plugin.zod.ts`)
21+
Move from loose `z.function()` definitions to strict Service Contracts.
22+
* **Goal**: Replace `z.any()` arguments with specific Schemas (e.g., `ObjectQLRequestSchema`).
23+
* **Benefit**: Plugin authors get full IntelliSense for the host API.
24+
25+
### 3. Flow Component Protocol (`automation/flow-component.zod.ts`)
26+
Define the input/output contract for Flow Nodes so the UI can auto-generate configuration panels.
27+
* **Goal**: Replace `config: z.record(z.any())` with `configSchema: JSONSchema`.
28+
29+
## 📅 Phase 3: AI & Agents (Future)
30+
**Focus:** Autonomous behaviors and cognitive architectures.
31+
32+
### 1. Agent Memory Protocol (`ai/memory.zod.ts`)
33+
Standardize how agents store and retrieve conversation history and facts.
34+
* **Components**: Short-term (Window), Long-term (Vector), Episodic.
35+
36+
### 2. Tooling Protocol (`ai/tool.zod.ts`)
37+
Universal definition for tools that can be consumed by Agents, APIs, and Humans.
38+
* **Strategy**: align with OpenAI Function Calling format but add permissioning layer.
39+
40+
### 3. Evaluation Protocol (`ai/eval.zod.ts`)
41+
files to define test cases for Agents (Inputs -> Expected Reasoning -> Expected Output).
42+
43+
## 📅 Phase 4: SDK Generation
44+
**Focus:** Developer Experience.
45+
46+
- **Auto-generated SDKs**: Use `zod-to-ts` and `openapi-generator` to build `@objectstack/client` directly from the `spec`.
47+
- **UI Component Generation**: Generate React form components from `ui/*.zod.ts` definitions.
48+
49+
## 🔍 Optimization Opportunities
50+
51+
| Area | Issue | Proposed Solution |
52+
| :--- | :--- | :--- |
53+
| **Performance** | Large recursive schemas (Flow/Tree) slow down TS. | Use `z.lazy()` and interface separation. |
54+
| **Validation** | Frontend/Backend validation duplication. | Share `FieldSchema` directly with React Hook Form. |
55+
| **Database** | Driver-specific options in generic schemas. | Use **Discriminated Unions** for Driver Configs (e.g., `type: 'postgres'` vs `type: 'mongo'`). |
56+
57+
---
58+
59+
> *This roadmap is a living document. Updates are driven by community feedback and implementation challenges.*

0 commit comments

Comments
 (0)