This repository is an npm workspace monorepo:
apps/server: Express API + Vite middleware integration (src/index.ts).apps/web: Vite frontend workflow editor (src/app/workflow-editor.ts).packages/types: Shared TypeScript contracts.packages/workflow-engine: Reusable workflow runtime.design-system/: Git submodule with UI tokens/components.data/runs/: Runtime run snapshots (gitignored)..config/config.json: Provider/model definitions (committed)..config/default-workflow.json: Optional startup workflow (gitignored).
Server routes:
POST /api/run-stream(SSE run, primary)POST /api/run(batch JSON run)POST /api/resume-stream(SSE resume, primary)POST /api/resume(batch JSON resume)GET /api/run/:runId(active/persisted run fetch)GET /api/config(provider/model config)GET /api/default-workflow(optional startup workflow)
npm install: Install all workspace dependencies.npm run dev: Start integrated server + UI onhttp://localhost:3000.npm run dev:web: Run frontend-only Vite dev server.npm run build: Build server and web app.npm run build:packages: Build shared packages.npm run lint: Run ESLint.npm run typecheck: Typecheck server and web workspaces.npm test: Run repo test gate (workflow-engine+ server typecheck scripts).
- Language: TypeScript with
strictmode. - Use
import typewhere applicable (@typescript-eslint/consistent-type-imports). - Prefix unused parameters/locals with
_. - Naming patterns: kebab-case files, PascalCase classes, UPPER_SNAKE_CASE constants.
- Avoid reformatting unrelated code.
- CI checks in
.github/workflows/pr.yml:lint,build:packages,typecheck,build. - Web workspace uses Vitest (
npm --workspace apps/web run test). - Prefer targeted
*.test.tsfiles near changed behavior.
- Prefer short, imperative commit subjects.
- Conventional prefixes are common (
feat(web):,fix:,chore:). - Keep commits scoped to one logical change.
- PRs should include purpose, risk/impact, and validation steps.
- For UI changes in
apps/web, include screenshots or recordings.
- Set
OPENAI_API_KEYbefore running agent workflows. - Never commit secrets,
.envfiles, or generated data fromdata/runs/.
- Treat
design-system/as source of truth for UI primitives. - Prefer submodule tokens/components over custom alternatives.
- If a needed component is missing in
design-system/, consult user before adding alternatives. - In fresh worktrees, run
git submodule update --init --recursive.
- Links between agents and subagents are tool-delegation edges, not execution edges.
- Hierarchies of subagents must remain acyclic.
- Targets of subagent links are tool-only and cannot participate in regular execution edges.
docs/README.mddocs/api.mddocs/workflow-semantics.mdapps/web/docs/run-readiness.md