From 12653477d6c06f6dc4f5be2fb52f8715cbf00a65 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Tue, 17 Mar 2026 02:12:24 +0000 Subject: [PATCH] =?UTF-8?q?feat(gateway):=20project=20bootstrap=20?= =?UTF-8?q?=E2=80=94=20docs=20structure=20+=20default=20agent=20(#190)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jason Woltje Co-committed-by: Jason Woltje --- .../src/workspace/project-bootstrap.service.ts | 13 ++++++++++++- apps/gateway/src/workspace/workspace.service.ts | 5 +++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/apps/gateway/src/workspace/project-bootstrap.service.ts b/apps/gateway/src/workspace/project-bootstrap.service.ts index c4afbae..5be60d3 100644 --- a/apps/gateway/src/workspace/project-bootstrap.service.ts +++ b/apps/gateway/src/workspace/project-bootstrap.service.ts @@ -45,7 +45,7 @@ export class ProjectBootstrapService { ownerType, }); - // 2. Create workspace directory + // 2. Create workspace directory (includes docs structure) const workspacePath = await this.workspace.create( { id: project.id, @@ -56,6 +56,17 @@ export class ProjectBootstrapService { params.repoUrl, ); + // 3. Create default agent config for the project + await this.brain.agents.create({ + name: 'default', + provider: '', + model: '', + projectId: project.id, + ownerId: params.userId, + isSystem: false, + status: 'active', + }); + this.logger.log(`Project ${project.id} bootstrapped at ${workspacePath}`); return { projectId: project.id, workspacePath }; diff --git a/apps/gateway/src/workspace/workspace.service.ts b/apps/gateway/src/workspace/workspace.service.ts index 5dc8ae4..a253ca2 100644 --- a/apps/gateway/src/workspace/workspace.service.ts +++ b/apps/gateway/src/workspace/workspace.service.ts @@ -64,6 +64,11 @@ export class WorkspaceService { this.logger.log(`Initialized git workspace at ${workspacePath}`); } + // Create standard docs structure + await fs.mkdir(path.join(workspacePath, 'docs', 'plans'), { recursive: true }); + await fs.mkdir(path.join(workspacePath, 'docs', 'reports'), { recursive: true }); + this.logger.log(`Created docs structure at ${workspacePath}`); + return workspacePath; }