This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"id": "decision-framework",
|
||||
"name": "Decision Framework",
|
||||
"description": "Structured decision making with risk assessment and retrospectives",
|
||||
"skills": ["decision-matrix", "risk-assessment", "retrospective"]
|
||||
}
|
||||
51
packages/sdk/src/capability-packs/index.ts
Normal file
51
packages/sdk/src/capability-packs/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
export interface CapabilityPack {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
skills: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the directory containing capability pack JSON manifests.
|
||||
* Resolves to the source directory containing .json files.
|
||||
*/
|
||||
export function getCapabilityPacksDir(): string {
|
||||
// When running from compiled output (dist/), go up to package root then into src/
|
||||
const srcDir = path.resolve(__dirname, '..', '..', 'src', 'capability-packs');
|
||||
if (fs.existsSync(srcDir) && fs.readdirSync(srcDir).some(f => f.endsWith('.json'))) {
|
||||
return srcDir;
|
||||
}
|
||||
// Fallback: same directory (running directly from source)
|
||||
return __dirname;
|
||||
}
|
||||
|
||||
/**
|
||||
* List all capability packs, sorted by name.
|
||||
*/
|
||||
export function listCapabilityPacks(): CapabilityPack[] {
|
||||
const dir = getCapabilityPacksDir();
|
||||
if (!fs.existsSync(dir)) return [];
|
||||
return fs.readdirSync(dir)
|
||||
.filter(f => f.endsWith('.json'))
|
||||
.map(f => {
|
||||
const content = fs.readFileSync(path.join(dir, f), 'utf-8');
|
||||
return JSON.parse(content) as CapabilityPack;
|
||||
})
|
||||
.sort((a, b) => a.name.localeCompare(b.name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a single pack manifest by ID.
|
||||
*/
|
||||
export function getPackManifest(packId: string): CapabilityPack | null {
|
||||
const dir = getCapabilityPacksDir();
|
||||
const filePath = path.join(dir, `${packId}.json`);
|
||||
if (!fs.existsSync(filePath)) return null;
|
||||
return JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
||||
}
|
||||
6
packages/sdk/src/capability-packs/planning-master.json
Normal file
6
packages/sdk/src/capability-packs/planning-master.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"id": "planning-master",
|
||||
"name": "Planning Master",
|
||||
"description": "Daily planning, task breakdown, and execution workflows",
|
||||
"skills": ["daily-plan", "task-breakdown", "plan-execute", "decision-matrix"]
|
||||
}
|
||||
6
packages/sdk/src/capability-packs/research-workflow.json
Normal file
6
packages/sdk/src/capability-packs/research-workflow.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"id": "research-workflow",
|
||||
"name": "Research Workflow",
|
||||
"description": "Complete research pipeline: investigate, synthesize, explain",
|
||||
"skills": ["research-synthesis", "explain-concept", "research-team"]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"id": "team-collaboration",
|
||||
"name": "Team Collaboration",
|
||||
"description": "Catch up, share status, prep meetings, and pair review",
|
||||
"skills": ["catch-up", "status-update", "meeting-prep", "review-pair"]
|
||||
}
|
||||
6
packages/sdk/src/capability-packs/writing-suite.json
Normal file
6
packages/sdk/src/capability-packs/writing-suite.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"id": "writing-suite",
|
||||
"name": "Writing Suite",
|
||||
"description": "Draft, compare, and extract actions from documents",
|
||||
"skills": ["draft-memo", "compare-docs", "extract-actions"]
|
||||
}
|
||||
Reference in New Issue
Block a user