feat(gateway): project bootstrap — docs structure + default agent #190

Merged
jason.woltje merged 1 commits from fix/project-bootstrap-enhancements into main 2026-03-17 02:12:25 +00:00
2 changed files with 17 additions and 1 deletions

View File

@@ -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 };

View File

@@ -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;
}