feat: add Architecture tab to PRD page and inject arch into COO context
- PRD page now has a tabbed view: PRD | Architecture Architecture tab renders apps, packages, infrastructure, integrations, and risk notes as structured cards. Only shown when arch doc exists. - Advisor route now includes the architecture summary and key fields in the COO's knowledge context so the orchestrator knows what's been planned technically Made-with: Cursor
This commit is contained in:
@@ -46,6 +46,7 @@ async function buildKnowledgeContext(projectId: string, email: string): Promise<
|
||||
const vision = (d.productVision as string) ?? (d.vision as string) ?? '';
|
||||
const giteaRepo = (d.giteaRepo as string) ?? '';
|
||||
const prd = (d.prd as string) ?? '';
|
||||
const architecture = d.architecture as Record<string, unknown> | null ?? null;
|
||||
const apps = (d.apps as Array<{ name: string; domain?: string; coolifyServiceUuid?: string }>) ?? [];
|
||||
const coolifyProjectUuid = (d.coolifyProjectUuid as string) ?? '';
|
||||
const theiaUrl = (d.theiaWorkspaceUrl as string) ?? '';
|
||||
@@ -73,6 +74,15 @@ Operating principles:
|
||||
if (coolifyProjectUuid) lines.push(`Coolify project UUID: ${coolifyProjectUuid} — use coolify_list_applications to find its apps`);
|
||||
if (theiaUrl) lines.push(`Theia IDE: ${theiaUrl}`);
|
||||
|
||||
// Architecture document
|
||||
if (architecture) {
|
||||
const archApps = (architecture.apps as Array<{ name: string; type: string; description: string }> ?? [])
|
||||
.map(a => ` - ${a.name} (${a.type}): ${a.description}`).join('\n');
|
||||
const archInfra = (architecture.infrastructure as Array<{ name: string; reason: string }> ?? [])
|
||||
.map(i => ` - ${i.name}: ${i.reason}`).join('\n');
|
||||
lines.push(`\n## Technical Architecture\nSummary: ${architecture.summary ?? ''}\n\nApps:\n${archApps}\n\nInfrastructure:\n${archInfra}`);
|
||||
}
|
||||
|
||||
// PRD or discovery phases
|
||||
if (prd) {
|
||||
// Claude Sonnet has a 200k token context — pass the full PRD, no truncation needed
|
||||
|
||||
Reference in New Issue
Block a user