refactor: Restructure monorepo to apps/server/ and apps/web/ layout
Move src/ → apps/server/ and packages/web/ → apps/web/ to adopt standard monorepo conventions (apps/ for runnable apps, packages/ for reusable libraries). Update all config files, shared package imports, test fixtures, and documentation to reflect new paths. Key fixes: - Update workspace config to ["apps/*", "packages/*"] - Update tsconfig.json rootDir/include for apps/server/ - Add apps/web/** to vitest exclude list - Update drizzle.config.ts schema path - Fix ensure-schema.ts migration path detection (3 levels up in dev, 2 levels up in dist) - Fix tests/integration/cli-server.test.ts import paths - Update packages/shared imports to apps/server/ paths - Update all docs/ files with new paths
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Agent Module
|
||||
|
||||
`src/agent/` — Agent lifecycle management, output parsing, multi-provider support, and account failover.
|
||||
`apps/server/agent/` — Agent lifecycle management, output parsing, multi-provider support, and account failover.
|
||||
|
||||
## File Inventory
|
||||
|
||||
@@ -169,7 +169,7 @@ Agents can communicate with each other via the `conversations` table, coordinate
|
||||
|
||||
## Prompt Architecture
|
||||
|
||||
Mode-specific prompts in `prompts/` use XML tags as top-level structural delimiters, with markdown formatting inside tags. This separates first-order instructions from second-order content (task descriptions, examples, templates) per Anthropic best practices. The old `src/agent/prompts.ts` (flat markdown) has been deleted.
|
||||
Mode-specific prompts in `prompts/` use XML tags as top-level structural delimiters, with markdown formatting inside tags. This separates first-order instructions from second-order content (task descriptions, examples, templates) per Anthropic best practices. The old `apps/server/agent/prompts.ts` (flat markdown) has been deleted.
|
||||
|
||||
### XML Tag Structure
|
||||
|
||||
@@ -217,4 +217,4 @@ Examples within mode-specific tags use `<examples>` > `<example label="good">` /
|
||||
|
||||
### Execute Prompt Dispatch
|
||||
|
||||
`buildExecutePrompt(taskDescription?)` accepts an optional task description wrapped in a `<task>` tag. The dispatch manager (`src/dispatch/manager.ts`) wraps `task.description || task.name` in `buildExecutePrompt()` so execute agents receive full system context alongside their task. The `<workspace>` and `<inter_agent_communication>` blocks are appended by the agent manager at spawn time.
|
||||
`buildExecutePrompt(taskDescription?)` accepts an optional task description wrapped in a `<task>` tag. The dispatch manager (`apps/server/dispatch/manager.ts`) wraps `task.description || task.name` in `buildExecutePrompt()` so execute agents receive full system context alongside their task. The `<workspace>` and `<inter_agent_communication>` blocks are appended by the agent manager at spawn time.
|
||||
|
||||
Reference in New Issue
Block a user