feat(FN-1968): add skill manifest previews to agent import

- Add SkillManifest support in core with parseSkillManifest and skills directory parsing/export wiring
- Extend /api/agents/import responses with dry-run skill previews and skillsCount metadata
- Show parsed package skills in AgentImportModal with dedicated preview UI and styles
- Add parser, API route, and modal tests covering skill manifest parsing and preview rendering
- Keep mission interview assertion generation explicit for milestone/slice fallbacks and update memory guidance for dashboard build resolution
This commit is contained in:
Fusion
2026-04-16 16:05:12 -07:00
committed by gsxdsm
parent 47f19676ae
commit fc33ea89ee
11 changed files with 259 additions and 10 deletions

View File

@@ -18,6 +18,7 @@ import type {
AgentManifest,
CompanyManifest,
ProjectManifest,
SkillManifest,
TaskManifest,
TeamManifest,
} from "./agent-companies-types.js";
@@ -344,6 +345,15 @@ export function parseTaskManifest(content: string): TaskManifest {
return parseTypedManifest<TaskManifest>(content, "task");
}
export function parseSkillManifest(content: string): SkillManifest {
const { frontmatter, body } = parseYamlFrontmatter(content);
requireName(frontmatter, "skill");
return {
...(frontmatter as unknown as SkillManifest),
instructionBody: body,
};
}
function parseManifestFile<T>(filePath: string, parser: (content: string) => T): T {
try {
return parser(readFileSync(filePath, "utf-8"));
@@ -443,6 +453,7 @@ export function parseCompanyDirectory(dirPath: string): AgentCompaniesPackage {
parseProjectManifest,
),
tasks: parseManifestSubdirectories(resolvedPath, "tasks", "TASK.md", parseTaskManifest),
skills: parseManifestSubdirectories(resolvedPath, "skills", "SKILL.md", parseSkillManifest),
};
}