UNPKG

aiwg

Version:

Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo

242 lines 6.59 kB
/** * Cross-Framework Operations * * Enables cross-framework linking and multi-project orchestration for * polyglot process management (SDLC + Marketing + Agile coexistence). * * Features: * - Link work items across frameworks * - Bidirectional metadata updates * - Work graph visualization (Mermaid) * - Orphaned link detection * - Archive and restore work items * - List all work across frameworks * * @module src/plugin/cross-framework-ops */ /** * Relationship types for cross-framework links */ export type RelationshipType = 'promotes' | 'promoted-by' | 'implements' | 'implemented-by' | 'blocks' | 'blocked-by' | 'depends-on' | 'required-by' | 'relates-to'; /** * Work link representing a cross-framework relationship */ export interface WorkLink { /** Target framework ID */ framework: string; /** Target work item ID */ id: string; /** Target work item type */ type: string; /** Relationship type */ relationship: RelationshipType; /** When link was created */ linkedDate: string; } /** * Work item metadata */ export interface WorkMetadata { /** Framework this work belongs to */ framework: string; /** Work item ID */ id: string; /** Work item type (project, campaign, story, etc.) */ type: string; /** Current status */ status: 'active' | 'archived' | 'completed'; /** Phase or stage */ phase?: string; /** Creation date */ createdAt: string; /** Last modified date */ updatedAt: string; /** Cross-framework links */ linkedWork: WorkLink[]; } /** * Link operation result */ export interface LinkResult { /** Whether operation succeeded */ success: boolean; /** Source work item */ source: { framework: string; id: string; }; /** Target work item */ target: { framework: string; id: string; }; /** Relationship type */ relationship: RelationshipType; /** Error message if failed */ error?: string; } /** * Work summary for listing */ export interface WorkSummary { /** Framework ID */ framework: string; /** Work item ID */ id: string; /** Work item type */ type: string; /** Current status */ status: string; /** Phase or stage */ phase?: string; /** Number of linked work items */ linkCount: number; } /** * Orphaned link information */ export interface OrphanedLink { /** Source work item */ source: { framework: string; id: string; }; /** Target that no longer exists */ target: { framework: string; id: string; }; /** Relationship */ relationship: RelationshipType; } /** * Get inverse relationship type */ export declare function getInverseRelationship(relationship: RelationshipType): RelationshipType; /** * CrossFrameworkOps - Manage cross-framework work linking * * @example * ```typescript * const ops = new CrossFrameworkOps('~/.local/share/ai-writing-guide'); * * // Link SDLC project to marketing campaign * await ops.linkWork('sdlc-complete', 'plugin-system', 'marketing-flow', 'plugin-launch', 'promotes'); * * // List all links * const links = await ops.listLinks('sdlc-complete', 'plugin-system'); * * // Visualize work graph * const mermaid = await ops.visualizeWorkGraph(); * ``` */ export declare class CrossFrameworkOps { private aiwgRoot; private registryPath; constructor(aiwgRoot: string); /** * Link two work items across frameworks * * @param sourceFramework - Source framework ID * @param sourceId - Source work item ID * @param targetFramework - Target framework ID * @param targetId - Target work item ID * @param relationship - Relationship type * @returns Link result */ linkWork(sourceFramework: string, sourceId: string, targetFramework: string, targetId: string, relationship: RelationshipType): Promise<LinkResult>; /** * Remove link between two work items * * @param sourceFramework - Source framework ID * @param sourceId - Source work item ID * @param targetFramework - Target framework ID * @param targetId - Target work item ID * @returns Link result */ unlinkWork(sourceFramework: string, sourceId: string, targetFramework: string, targetId: string): Promise<LinkResult>; /** * List all links for a work item * * @param frameworkId - Framework ID * @param workId - Work item ID * @returns Array of links */ listLinks(frameworkId: string, workId: string): Promise<WorkLink[]>; /** * List all work items across all frameworks * * @param frameworkId - Optional framework filter * @returns Array of work summaries */ listAllWork(frameworkId?: string): Promise<WorkSummary[]>; /** * Visualize work graph in Mermaid format * * @param frameworkId - Optional framework filter * @returns Mermaid diagram string */ visualizeWorkGraph(frameworkId?: string): Promise<string>; /** * Detect orphaned links (links to non-existent work items) * * @returns Array of orphaned links */ detectOrphanedLinks(): Promise<OrphanedLink[]>; /** * Clean up orphaned links * * @returns Number of links removed */ cleanOrphanedLinks(): Promise<number>; /** * Archive a work item * * @param frameworkId - Framework ID * @param workId - Work item ID * @param _reason - Archive reason * @returns Whether archive succeeded */ archiveWork(frameworkId: string, workId: string, _reason: string): Promise<boolean>; /** * Check if a framework exists in the registry */ private frameworkExists; /** * Check if a work item exists */ private workExists; /** * Get work item metadata */ private getWorkMetadata; /** * Save work item metadata */ private saveWorkMetadata; /** * Get framework info from registry */ private getFrameworkInfo; /** * Get all projects in a framework */ private getFrameworkProjects; /** * Load registry file */ private loadRegistry; /** * Move directory recursively */ private moveDirectory; /** * Copy directory recursively */ private copyDirectory; } /** * Create CrossFrameworkOps with default AIWG root */ export declare function createCrossFrameworkOps(): CrossFrameworkOps; //# sourceMappingURL=cross-framework-ops.d.ts.map