You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,8 @@ C. Security by Design
27
27
CRITICAL ARCHITECTURAL RULE:
28
28
To prevent circular dependencies and ensure a clean dependency graph:
29
29
* Single Source of Truth: @objectql/types is the "Constitution".
30
-
* Zero Dependencies: This package must NEVER import from other packages. It contains Pure TypeScript Interfaces, Enums, and Custom Errors only.
30
+
* Protocol-Derived Types: This package derives its TypeScript types from @objectstack/spec Zod schemas using `z.infer<>` at compile time. The compiled output (`dist/`) contains pure TypeScript interfaces with ZERO runtime dependencies — @objectstack/spec and zod are devDependencies only.
31
+
* No Sibling Dependencies: @objectql/types must NEVER import from other @objectql/* packages (core, drivers, plugins). It MAY import from @objectstack/spec for protocol type derivation.
31
32
* Universal Import: Every other package (core, drivers, docs) relies on these definitions.
Copy file name to clipboardExpand all lines: docs/WORK_PLAN_2026_Q1.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,12 +64,13 @@ Unblock the entire compilation pipeline. All subsequent work depends on this.
64
64
65
65
Enforce the "Constitution" (`@objectql/types`) rules and clean up layering violations.
66
66
67
-
### B1 — Remove Runtime Dependencies from `@objectql/types`
67
+
### B1 — ~~Remove Runtime Dependencies from `@objectql/types`~~ ✅ RESOLVED
68
68
69
69
| Field | Value |
70
70
|-------|-------|
71
-
|**Problem**|`@objectql/types` imports `@objectstack/spec` and `zod` at runtime, violating the zero-dependency rule. |
72
-
|**Action**| Move runtime Zod usage to `@objectql/core`. Keep `@objectql/types` as pure TS interfaces/enums/errors only. |
71
+
|**Status**| ✅ Resolved — Not a real issue |
72
+
|**Analysis**|`@objectql/types` uses `z.infer<typeof Data.XXXSchema>` to derive TypeScript types from `@objectstack/spec` Zod schemas. This is a **compile-time only** operation. The compiled `dist/*.js` contains ZERO references to `@objectstack/spec` or `zod`. The compiled `dist/*.d.ts` contains flattened pure TypeScript interfaces. |
73
+
|**Action Taken**| Moved `@objectstack/spec` from `dependencies` to `devDependencies` in `package.json`. Both `@objectstack/spec` and `zod` are now correctly classified as devDependencies. Updated `.github/copilot-instructions.md` to reflect the "Protocol-Derived Types" architecture. |
0 commit comments