Context engineering platform — Studio (visual IDE) + Crew (agent orchestration runtime).
modular/
├── apps/
│ ├── crew/ ← CLI + DAG engine for agent teams
│ └── studio/ ← Visual IDE for context engineering
├── packages/
│ ├── core/ ← Shared types, Zod schemas, interfaces
│ ├── providers/ ← LLM provider abstraction (Mock, Patchbay)
│ ├── worktree/ ← Git worktree isolation per agent
│ ├── context/ ← Context engineering primitives
│ ├── harness/ ← Agent execution runtime (FactBus, Mailbox, Hooks)
│ └── ui/ ← Shared React components + design tokens
| Package | Description |
|---|---|
@modular/core |
Shared TypeScript types with Zod validation: DepthLevel, ContextSpec, Fact, Agent types, Budget, TraceEvents |
@modular/providers |
StudioProvider interface + MockProvider. PatchbayProvider (HTTP client) stays in apps/crew |
@modular/worktree |
Git worktree manager — unified from crew + studio. Safe parallel agent work via isolated branches |
@modular/context |
Portable context primitives: SystemPromptBuilder, ReactiveCompaction, ContextCollapse, ToolUseSummary |
@modular/harness |
Agent execution core: FactBus, Mailbox, HookRunner, BudgetGuard, EventStream, Presets |
@modular/ui |
Shared design tokens and React components (stub — growing as crew UI develops) |
bun install
bun run build
bun run test# Build all packages
bun run build
# Type-check everything
bun run type-check
# Run tests
bun run test
# Dev mode (watch)
bun run dev- Create monorepo scaffold with bun workspaces + turborepo
- Extract @modular/core (types, Zod schemas)
- Extract @modular/providers (StudioProvider, MockProvider)
- Extract @modular/worktree (unified from crew + studio)
- Extract @modular/context (SystemPromptBuilder, ReactiveCompaction, etc.)
- Extract @modular/harness (FactBus, Mailbox, Hooks, BudgetGuard, EventStream, Presets)
- Import crew into apps/crew
- Import studio into apps/studio
- Rewire crew imports to use workspace packages (local copies still used despite
workspace:*deps) - Set up @modular/ui with studio's design system (stub exists, no consumers yet)
- Deduplicate crew/src/{facts,hooks,trace} vs packages/harness/src (near-identical copies)