From b26b9cda7b069315854ff89452dd2d8be3aa7d05 Mon Sep 17 00:00:00 2001 From: dotta Date: Fri, 20 Mar 2026 08:05:55 -0500 Subject: [PATCH] fix: strip agents and projects sections from COMPANY.md export body COMPANY.md now contains only the company description in frontmatter, without the agents list and projects list that were previously rendered in the markdown body. The README.md already contains this info. Co-Authored-By: Paperclip --- server/src/services/company-portability.ts | 26 +--------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/server/src/services/company-portability.ts b/server/src/services/company-portability.ts index 380658f5..c0bb8a54 100644 --- a/server/src/services/company-portability.ts +++ b/server/src/services/company-portability.ts @@ -1303,17 +1303,6 @@ async function withSkillSourceMetadata(skill: CompanySkill, markdown: string) { return buildMarkdown(frontmatter, parsed.body); } -function renderCompanyAgentsSection(agentSummaries: Array<{ slug: string; name: string }>) { - const lines = ["# Agents", ""]; - if (agentSummaries.length === 0) { - lines.push("- _none_"); - return lines.join("\n"); - } - for (const agent of agentSummaries) { - lines.push(`- ${agent.slug} - ${agent.name}`); - } - return lines.join("\n"); -} function parseYamlScalar(rawValue: string): unknown { const trimmed = rawValue.trim(); @@ -2210,19 +2199,6 @@ export function companyPortabilityService(db: Db, storage?: StorageService) { } const companyPath = "COMPANY.md"; - const companyBodySections: string[] = []; - if (include.agents) { - const companyAgentSummaries = agentRows.map((agent) => ({ - slug: idToSlug.get(agent.id) ?? "agent", - name: agent.name, - })); - companyBodySections.push(renderCompanyAgentsSection(companyAgentSummaries)); - } - if (selectedProjectRows.length > 0) { - companyBodySections.push( - ["# Projects", "", ...selectedProjectRows.map((project) => `- ${projectSlugById.get(project.id) ?? project.id} - ${project.name}`)].join("\n"), - ); - } files[companyPath] = buildMarkdown( { name: company.name, @@ -2230,7 +2206,7 @@ export function companyPortabilityService(db: Db, storage?: StorageService) { schema: "agentcompanies/v1", slug: rootPath, }, - companyBodySections.join("\n\n").trim(), + "", ); if (include.company && company.logoAssetId) {