@riotprompt/riotplan 0.0.3 β†’ 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "@riotprompt/riotplan",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Framework for long-lived, stateful AI workflows (plans)",
5
5
  "type": "module",
6
- "main": "./dist/index.cjs",
7
- "module": "./dist/index.js",
6
+ "main": "./dist/index.js",
8
7
  "types": "./dist/index.d.ts",
9
8
  "exports": {
10
9
  ".": {
11
10
  "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.cjs"
11
+ "import": "./dist/index.js"
14
12
  }
15
13
  },
14
+ "engines": {
15
+ "node": ">=24.0.0"
16
+ },
16
17
  "scripts": {
17
18
  "clean": "rm -rf dist",
18
19
  "build": "vite build",
@@ -38,14 +39,13 @@
38
39
  "url": "https://github.com/kjerneverk/riotplan"
39
40
  },
40
41
  "dependencies": {
41
- "glob": "^11.0.3",
42
42
  "js-yaml": "^4.1.1",
43
43
  "marked": "^16.0.0"
44
44
  },
45
45
  "peerDependencies": {
46
- "@riotprompt/agentic": "^0.0.4",
47
- "@riotprompt/execution": "^0.0.3",
48
- "@riotprompt/riotprompt": "^0.0.20"
46
+ "@riotprompt/agentic": "^0.0.5",
47
+ "@riotprompt/execution": "^0.0.4",
48
+ "@riotprompt/riotprompt": "^0.0.21"
49
49
  },
50
50
  "peerDependenciesMeta": {
51
51
  "@riotprompt/agentic": {
package/dist/index.cjs DELETED
@@ -1,82 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const PLAN_CONVENTIONS = {
4
- /** Meta-prompt file patterns */
5
- metaPromptPatterns: [
6
- "{code}-prompt.md",
7
- "prompt-of-prompts.md",
8
- "{code}.md"
9
- ],
10
- /** Step file pattern */
11
- stepPattern: /^(\d{2})-(.+)\.md$/,
12
- /** Standard files */
13
- standardFiles: {
14
- summary: "SUMMARY.md",
15
- status: "STATUS.md",
16
- executionPlan: "EXECUTION_PLAN.md",
17
- readme: "README.md"
18
- },
19
- /** Standard directories */
20
- standardDirs: {
21
- plan: "plan",
22
- analysis: "analysis",
23
- architecture: "architecture",
24
- implementation: "implementation",
25
- testing: "testing"
26
- },
27
- /** Status emoji mapping */
28
- statusEmoji: {
29
- pending: "⬜",
30
- in_progress: "πŸ”„",
31
- completed: "βœ…",
32
- failed: "❌",
33
- blocked: "⏸️",
34
- skipped: "⏭️"
35
- }
36
- };
37
- const VERSION = "0.0.1";
38
- async function loadPlan(_path) {
39
- throw new Error(
40
- "riotplan.loadPlan is not yet implemented. Coming in v0.1.0!"
41
- );
42
- }
43
- async function createPlan(_config) {
44
- throw new Error(
45
- "riotplan.createPlan is not yet implemented. Coming in v0.1.0!"
46
- );
47
- }
48
- function parseStatus(_content) {
49
- throw new Error(
50
- "riotplan.parseStatus is not yet implemented. Coming in v0.1.0!"
51
- );
52
- }
53
- function generateStatus(_plan) {
54
- throw new Error(
55
- "riotplan.generateStatus is not yet implemented. Coming in v0.1.0!"
56
- );
57
- }
58
- async function executeStep(_plan, _stepNumber, _context) {
59
- throw new Error(
60
- "riotplan.executeStep is not yet implemented. Coming in v0.1.0!"
61
- );
62
- }
63
- async function resumePlan(_plan, _context) {
64
- throw new Error(
65
- "riotplan.resumePlan is not yet implemented. Coming in v0.1.0!"
66
- );
67
- }
68
- function updatePlanState(_plan, _stepNumber, _result) {
69
- throw new Error(
70
- "riotplan.updatePlanState is not yet implemented. Coming in v0.1.0!"
71
- );
72
- }
73
- exports.PLAN_CONVENTIONS = PLAN_CONVENTIONS;
74
- exports.VERSION = VERSION;
75
- exports.createPlan = createPlan;
76
- exports.executeStep = executeStep;
77
- exports.generateStatus = generateStatus;
78
- exports.loadPlan = loadPlan;
79
- exports.parseStatus = parseStatus;
80
- exports.resumePlan = resumePlan;
81
- exports.updatePlanState = updatePlanState;
82
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/types.ts","../src/index.ts"],"sourcesContent":["/**\n * RiotPlan Type Definitions\n *\n * Types for long-lived, stateful AI workflows (plans).\n *\n * A plan consists of:\n * - A directory (the plan code/name)\n * - A meta-prompt (prompt-of-prompts)\n * - Numbered step files (01-STEP.md, 02-STEP.md, etc.)\n * - Status tracking (STATUS.md)\n * - Execution strategy (EXECUTION_PLAN.md)\n * - Summary (SUMMARY.md)\n * - Optional analysis directory\n */\n\n// ===== TASK STATUS =====\n\n/**\n * Status of a task, phase, or step\n */\nexport type TaskStatus =\n | \"pending\" // Not started (⬜)\n | \"in_progress\" // Currently active (πŸ”„)\n | \"completed\" // Done (βœ…)\n | \"failed\" // Failed with error (❌)\n | \"blocked\" // Waiting on dependency (⏸️)\n | \"skipped\"; // Intentionally skipped (⏭️)\n\n/**\n * Priority level\n */\nexport type Priority = \"high\" | \"medium\" | \"low\";\n\n// ===== PLAN STRUCTURE =====\n\n/**\n * A single step in a plan (corresponds to a numbered file like 01-STEP.md)\n */\nexport interface PlanStep {\n /** Step number (1, 2, 3...) */\n number: number;\n\n /** Step code/slug (extracted from filename, e.g., \"execution-interfaces\") */\n code: string;\n\n /** Full filename (e.g., \"01-execution-interfaces.md\") */\n filename: string;\n\n /** Human-readable title */\n title: string;\n\n /** Step description */\n description?: string;\n\n /** Current status */\n status: TaskStatus;\n\n /** Dependencies on other steps (by number) */\n dependencies?: number[];\n\n /** When this step was started */\n startedAt?: Date;\n\n /** When this step was completed */\n completedAt?: Date;\n\n /** Duration in milliseconds */\n duration?: number;\n\n /** Notes or issues encountered */\n notes?: string;\n\n /** Path to the step file */\n filePath: string;\n}\n\n/**\n * A phase grouping multiple steps\n */\nexport interface PlanPhase {\n /** Phase number */\n number: number;\n\n /** Phase name */\n name: string;\n\n /** Description */\n description?: string;\n\n /** Steps in this phase */\n steps: number[]; // Step numbers\n\n /** Phase status (derived from step statuses) */\n status: TaskStatus;\n\n /** Estimated duration */\n estimatedDuration?: string;\n\n /** Actual duration */\n actualDuration?: string;\n}\n\n/**\n * Blocker preventing progress\n */\nexport interface Blocker {\n /** Unique identifier */\n id: string;\n\n /** Description of the blocker */\n description: string;\n\n /** Severity */\n severity: Priority;\n\n /** Affected steps */\n affectedSteps: number[];\n\n /** When created */\n createdAt: Date;\n\n /** When resolved */\n resolvedAt?: Date;\n\n /** Resolution notes */\n resolution?: string;\n}\n\n/**\n * Issue encountered during execution\n */\nexport interface Issue {\n /** Unique identifier */\n id: string;\n\n /** Issue title */\n title: string;\n\n /** Description */\n description: string;\n\n /** Severity */\n severity: Priority;\n\n /** Related step */\n step?: number;\n\n /** When encountered */\n createdAt: Date;\n\n /** When resolved */\n resolvedAt?: Date;\n\n /** How it was resolved */\n resolution?: string;\n}\n\n// ===== PLAN METADATA =====\n\n/**\n * Plan metadata from the directory and files\n */\nexport interface PlanMetadata {\n /** Plan code (directory name, e.g., \"big-splitup\") */\n code: string;\n\n /** Human-readable name */\n name: string;\n\n /** Description from SUMMARY.md or meta-prompt */\n description?: string;\n\n /** Version (for tracking changes to the plan itself) */\n version?: string;\n\n /** Author */\n author?: string;\n\n /** Tags for categorization */\n tags?: string[];\n\n /** When the plan was created */\n createdAt?: Date;\n\n /** Path to the plan directory */\n path: string;\n}\n\n// ===== PLAN FILES =====\n\n/**\n * Standard plan files\n */\nexport interface PlanFiles {\n /** Meta-prompt file (e.g., \"big-splitup-prompt.md\" or \"prompt-of-prompts.md\") */\n metaPrompt?: string;\n\n /** Summary file */\n summary?: string;\n\n /** Status file */\n status?: string;\n\n /** Execution plan file */\n executionPlan?: string;\n\n /** README file */\n readme?: string;\n\n /** Step files in order */\n steps: string[];\n\n /** Analysis directory */\n analysisDir?: string;\n\n /** Other directories (architecture/, implementation/, testing/) */\n subdirectories: string[];\n}\n\n// ===== PLAN STATE =====\n\n/**\n * Current state of plan execution\n */\nexport interface PlanState {\n /** Overall plan status */\n status: TaskStatus;\n\n /** Current step being executed */\n currentStep?: number;\n\n /** Last completed step */\n lastCompletedStep?: number;\n\n /** When execution started */\n startedAt?: Date;\n\n /** When last updated */\n lastUpdatedAt: Date;\n\n /** When completed */\n completedAt?: Date;\n\n /** Active blockers */\n blockers: Blocker[];\n\n /** Issues encountered */\n issues: Issue[];\n\n /** Progress percentage (0-100) */\n progress: number;\n}\n\n// ===== COMPLETE PLAN =====\n\n/**\n * Complete plan definition\n */\nexport interface Plan {\n /** Plan metadata */\n metadata: PlanMetadata;\n\n /** Plan files */\n files: PlanFiles;\n\n /** Plan steps */\n steps: PlanStep[];\n\n /** Plan phases (optional grouping) */\n phases?: PlanPhase[];\n\n /** Current state */\n state: PlanState;\n}\n\n// ===== EXECUTION =====\n\n/**\n * Context for plan execution\n */\nexport interface PlanContext {\n /** Working directory */\n workingDirectory: string;\n\n /** The plan being executed */\n plan: Plan;\n\n /** Logger instance */\n logger?: any;\n\n /** Storage for artifacts */\n storage?: any;\n\n /** Environment variables */\n env?: Record<string, string>;\n}\n\n/**\n * Result of executing a step\n */\nexport interface StepResult {\n /** Whether the step succeeded */\n success: boolean;\n\n /** Step number */\n step: number;\n\n /** Output from execution */\n output?: string;\n\n /** Error if failed */\n error?: Error;\n\n /** Duration in milliseconds */\n duration: number;\n\n /** Artifacts produced */\n artifacts?: string[];\n}\n\n/**\n * Result of executing a plan\n */\nexport interface PlanResult {\n /** Whether the plan completed successfully */\n success: boolean;\n\n /** Steps that were executed */\n executedSteps: number[];\n\n /** Steps that succeeded */\n completedSteps: number[];\n\n /** Steps that failed */\n failedSteps: number[];\n\n /** Steps that were skipped */\n skippedSteps: number[];\n\n /** Total duration */\n duration: number;\n\n /** Final plan state */\n finalState: PlanState;\n}\n\n// ===== SERIALIZATION =====\n\n/**\n * STATUS.md schema for parsing/generating\n */\nexport interface StatusDocument {\n /** Document title */\n title: string;\n\n /** Current state summary */\n currentState: {\n status: TaskStatus;\n currentStep?: string;\n lastCompleted?: string;\n startedAt?: string;\n lastUpdated?: string;\n };\n\n /** Step progress table */\n stepProgress: Array<{\n step: string;\n name: string;\n status: TaskStatus;\n started?: string;\n completed?: string;\n notes?: string;\n }>;\n\n /** Blockers section */\n blockers: string[];\n\n /** Issues section */\n issues: string[];\n\n /** Notes section */\n notes?: string;\n}\n\n/**\n * EXECUTION_PLAN.md schema\n */\nexport interface ExecutionPlanDocument {\n /** Strategy description */\n strategy: string;\n\n /** Prerequisites */\n prerequisites: string[];\n\n /** Phases with their steps */\n phases: Array<{\n name: string;\n description: string;\n steps: string[];\n }>;\n\n /** Quality gates */\n qualityGates?: string[];\n\n /** Rollback instructions */\n rollback?: string;\n}\n\n// ===== PLAN CONVENTIONS =====\n\n/**\n * File naming conventions\n */\nexport const PLAN_CONVENTIONS = {\n /** Meta-prompt file patterns */\n metaPromptPatterns: [\n \"{code}-prompt.md\",\n \"prompt-of-prompts.md\",\n \"{code}.md\",\n ],\n\n /** Step file pattern */\n stepPattern: /^(\\d{2})-(.+)\\.md$/,\n\n /** Standard files */\n standardFiles: {\n summary: \"SUMMARY.md\",\n status: \"STATUS.md\",\n executionPlan: \"EXECUTION_PLAN.md\",\n readme: \"README.md\",\n },\n\n /** Standard directories */\n standardDirs: {\n plan: \"plan\",\n analysis: \"analysis\",\n architecture: \"architecture\",\n implementation: \"implementation\",\n testing: \"testing\",\n },\n\n /** Status emoji mapping */\n statusEmoji: {\n pending: \"⬜\",\n in_progress: \"πŸ”„\",\n completed: \"βœ…\",\n failed: \"❌\",\n blocked: \"⏸️\",\n skipped: \"⏭️\",\n } as Record<TaskStatus, string>,\n} as const;\n\n","/**\n * RiotPlan - Framework for long-lived, stateful AI workflows\n *\n * A plan is a structured way to manage multi-step AI-assisted tasks that:\n * - Span multiple sessions/days\n * - Have persistent state (STATUS.md)\n * - Are organized into numbered steps\n * - Can be interrupted and resumed\n * - Track progress with checkboxes and statuses\n *\n * @example Plan directory structure:\n * ```\n * my-plan/\n * β”œβ”€β”€ my-plan-prompt.md # Meta-prompt (prompt-of-prompts)\n * β”œβ”€β”€ SUMMARY.md # Overview of the approach\n * β”œβ”€β”€ EXECUTION_PLAN.md # Step-by-step strategy\n * β”œβ”€β”€ STATUS.md # Current state (auto-updated)\n * β”œβ”€β”€ plan/ # Step files (optional subdirectory)\n * β”‚ β”œβ”€β”€ 01-first-step.md\n * β”‚ β”œβ”€β”€ 02-second-step.md\n * β”‚ └── ...\n * └── analysis/ # Analysis output (optional)\n * ```\n */\n\n// ===== EXPORTS =====\n\n// Types\nexport type {\n TaskStatus,\n Priority,\n PlanStep,\n PlanPhase,\n Blocker,\n Issue,\n PlanMetadata,\n PlanFiles,\n PlanState,\n Plan,\n PlanContext,\n StepResult,\n PlanResult,\n StatusDocument,\n ExecutionPlanDocument,\n} from \"./types.js\";\n\n// Constants\nexport { PLAN_CONVENTIONS } from \"./types.js\";\n\n// Version\nexport const VERSION = \"0.0.1\";\n\n// ===== STUB IMPLEMENTATIONS =====\n// These will be implemented as the project develops\n\n/**\n * Load a plan from a directory\n *\n * @param path - Path to the plan directory\n * @returns The loaded plan\n *\n * @example\n * ```typescript\n * const plan = await loadPlan('./prompts/big-splitup');\n * console.log(plan.metadata.code); // 'big-splitup'\n * console.log(plan.steps.length); // 11\n * ```\n *\n * @stub Not yet implemented\n */\nexport async function loadPlan(_path: string): Promise<never> {\n throw new Error(\n \"riotplan.loadPlan is not yet implemented. Coming in v0.1.0!\"\n );\n}\n\n/**\n * Create a new plan\n *\n * @param config - Plan configuration\n * @returns The created plan\n *\n * @example\n * ```typescript\n * const plan = await createPlan({\n * code: 'my-feature',\n * name: 'My Feature Implementation',\n * path: './prompts/my-feature',\n * steps: [\n * { title: 'Setup', description: 'Initial setup' },\n * { title: 'Implementation', description: 'Core work' },\n * { title: 'Testing', description: 'Verify it works' },\n * ]\n * });\n * ```\n *\n * @stub Not yet implemented\n */\nexport async function createPlan(_config: {\n code: string;\n name: string;\n path: string;\n description?: string;\n steps?: Array<{ title: string; description?: string }>;\n}): Promise<never> {\n throw new Error(\n \"riotplan.createPlan is not yet implemented. Coming in v0.1.0!\"\n );\n}\n\n/**\n * Parse a STATUS.md file\n *\n * @param content - The STATUS.md content\n * @returns Parsed status document\n *\n * @stub Not yet implemented\n */\nexport function parseStatus(_content: string): never {\n throw new Error(\n \"riotplan.parseStatus is not yet implemented. Coming in v0.1.0!\"\n );\n}\n\n/**\n * Generate a STATUS.md file\n *\n * @param plan - The plan to generate status for\n * @returns STATUS.md content\n *\n * @stub Not yet implemented\n */\nexport function generateStatus(_plan: unknown): never {\n throw new Error(\n \"riotplan.generateStatus is not yet implemented. Coming in v0.1.0!\"\n );\n}\n\n/**\n * Execute a plan step\n *\n * @param plan - The plan\n * @param stepNumber - Step to execute\n * @param context - Execution context\n * @returns Step result\n *\n * @stub Not yet implemented\n */\nexport async function executeStep(\n _plan: unknown,\n _stepNumber: number,\n _context?: unknown\n): Promise<never> {\n throw new Error(\n \"riotplan.executeStep is not yet implemented. Coming in v0.1.0!\"\n );\n}\n\n/**\n * Resume a plan from its current state\n *\n * @param plan - The plan to resume\n * @param context - Execution context\n * @returns Plan result\n *\n * @stub Not yet implemented\n */\nexport async function resumePlan(\n _plan: unknown,\n _context?: unknown\n): Promise<never> {\n throw new Error(\n \"riotplan.resumePlan is not yet implemented. Coming in v0.1.0!\"\n );\n}\n\n/**\n * Update plan state after step completion\n *\n * @param plan - The plan\n * @param stepNumber - Completed step\n * @param result - Step result\n * @returns Updated plan\n *\n * @stub Not yet implemented\n */\nexport function updatePlanState(\n _plan: unknown,\n _stepNumber: number,\n _result: unknown\n): never {\n throw new Error(\n \"riotplan.updatePlanState is not yet implemented. Coming in v0.1.0!\"\n );\n}\n\n"],"names":[],"mappings":";;AA6ZO,MAAM,mBAAmB;AAAA;AAAA,EAE5B,oBAAoB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA;AAAA,EAIJ,aAAa;AAAA;AAAA,EAGb,eAAe;AAAA,IACX,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,eAAe;AAAA,IACf,QAAQ;AAAA,EAAA;AAAA;AAAA,EAIZ,cAAc;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,SAAS;AAAA,EAAA;AAAA;AAAA,EAIb,aAAa;AAAA,IACT,SAAS;AAAA,IACT,aAAa;AAAA,IACb,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,EAAA;AAEjB;AChZO,MAAM,UAAU;AAoBvB,eAAsB,SAAS,OAA+B;AAC1D,QAAM,IAAI;AAAA,IACN;AAAA,EAAA;AAER;AAwBA,eAAsB,WAAW,SAMd;AACf,QAAM,IAAI;AAAA,IACN;AAAA,EAAA;AAER;AAUO,SAAS,YAAY,UAAyB;AACjD,QAAM,IAAI;AAAA,IACN;AAAA,EAAA;AAER;AAUO,SAAS,eAAe,OAAuB;AAClD,QAAM,IAAI;AAAA,IACN;AAAA,EAAA;AAER;AAYA,eAAsB,YAClB,OACA,aACA,UACc;AACd,QAAM,IAAI;AAAA,IACN;AAAA,EAAA;AAER;AAWA,eAAsB,WAClB,OACA,UACc;AACd,QAAM,IAAI;AAAA,IACN;AAAA,EAAA;AAER;AAYO,SAAS,gBACZ,OACA,aACA,SACK;AACL,QAAM,IAAI;AAAA,IACN;AAAA,EAAA;AAER;;;;;;;;;;"}