@riotprompt/riotdoc 1.0.3-dev.0 → 1.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/README.md CHANGED
@@ -1,16 +1,18 @@
1
1
  # RiotDoc
2
2
 
3
- Structured document creation with AI assistance.
3
+ Template-driven document creation with AI assistance, full history tracking, and version control.
4
4
 
5
5
  ## Overview
6
6
 
7
- RiotDoc helps you create high-quality documents through a structured workflow:
8
- - Define voice and style
9
- - Create outlines
10
- - Generate drafts with varying AI assistance levels
11
- - Manage evidence and references
12
- - Revise and refine
13
- - Export final documents
7
+ RiotDoc is a structured document creation system that guides you through creating high-quality documents using:
8
+
9
+ - **Template-driven workflows** - Templates define questions, approaches, and document structure
10
+ - **Conversational guidance** - Ask 2-5 questions at a time, not overwhelming forms
11
+ - **Multiple approaches** - Choose the workflow that fits your situation
12
+ - **Full history tracking** - Every decision and conversation captured
13
+ - **Version control** - Track evolution from draft (v0.x) to published (v1.0)
14
+ - **Checkpoints** - Create snapshots for experimentation and recovery
15
+ - **AI assistance** - Varying levels from full generation to light editing
14
16
 
15
17
  ## Installation
16
18
 
@@ -37,6 +39,107 @@ riotdoc revise
37
39
  riotdoc export
38
40
  ```
39
41
 
42
+ ## MCP Server
43
+
44
+ RiotDoc includes an MCP server for AI assistant integration (Claude Desktop, Cursor, etc.):
45
+
46
+ ```bash
47
+ # Available as
48
+ riotdoc-mcp
49
+ ```
50
+
51
+ Configure in Claude Desktop or Cursor:
52
+
53
+ ```json
54
+ {
55
+ "mcpServers": {
56
+ "riotdoc": {
57
+ "command": "riotdoc-mcp"
58
+ }
59
+ }
60
+ }
61
+ ```
62
+
63
+ ## Key Features
64
+
65
+ ### Template-Driven
66
+
67
+ Templates act as scripts that tell prompts what to ask. Change a template → entire workflow adapts automatically.
68
+
69
+ ### Lifecycle-Aware
70
+
71
+ Questions are split by phase:
72
+ - **Idea/Draft Phase** - Things you know NOW (title, topic, angle)
73
+ - **Publishing Phase** - Things you figure out LATER (SEO, categories, images)
74
+
75
+ ### Approach-Driven
76
+
77
+ Multiple strategies for each document type:
78
+ - **Blog Post**: Quick & Direct, Structured, Multi-Post Series
79
+ - **Podcast**: Solo Episode, Interview, Co-hosted Discussion
80
+ - **Email**: Quick Message, Formal Communication, Newsletter
81
+
82
+ ### Full History
83
+
84
+ Everything is captured:
85
+ - Timeline of all events (`.history/timeline.jsonl`)
86
+ - Conversation history (`.history/prompts/001-xxx.md`)
87
+ - Version snapshots (`drafts/draft-v0.1.md`)
88
+ - Checkpoints for restoration
89
+
90
+ ## Documentation
91
+
92
+ ### Getting Started
93
+ - [User Guide](guide/index.md) - Complete usage guide
94
+ - [MCP Server](guide/mcp.md) - Model Context Protocol integration
95
+
96
+ ### For Users
97
+ - [Template System](docs/templates.md) - How templates work
98
+ - [Prompt Workflow](docs/prompt-workflow.md) - Document creation workflow
99
+ - [Version Numbering](docs/version-numbering.md) - Version management
100
+ - [Narrative Capture](docs/narrative-capture.md) - Conversation history
101
+
102
+ ### For Developers
103
+ - [Architecture](docs/architecture.md) - System design and components
104
+ - [Testing Guide](docs/testing-guide.md) - Testing strategies
105
+
106
+ ## Example Workflow
107
+
108
+ ```
109
+ 1. Create workspace:
110
+ "Create a blog post about Kubernetes basics"
111
+
112
+ 2. Select approach:
113
+ "I'll use the Structured approach for detailed coverage"
114
+
115
+ 3. Answer questions (2-5 at a time):
116
+ "Title: 'Kubernetes for Developers'"
117
+ "Topic: Container orchestration fundamentals"
118
+ "Angle: Focus on practical developer workflows"
119
+
120
+ 4. Draft document:
121
+ Creates v0.1 draft using template structure
122
+
123
+ 5. Revise:
124
+ "Expand the introduction and add more examples"
125
+ Creates v0.2 with revisions
126
+
127
+ 6. Publish:
128
+ Answer publishing questions (SEO, categories)
129
+ Publish as v1.0
130
+ ```
131
+
132
+ ## Templates
133
+
134
+ RiotDoc includes templates for:
135
+ - Blog posts
136
+ - Podcast scripts
137
+ - Email messages
138
+ - Project plans
139
+ - Research papers
140
+
141
+ Add your own by creating a template file following the [canonical structure](docs/templates.md).
142
+
40
143
  ## License
41
144
 
42
145
  Apache-2.0
@@ -0,0 +1,5 @@
1
+ const __viteBrowserExternal = {};
2
+ export {
3
+ __viteBrowserExternal as default
4
+ };
5
+ //# sourceMappingURL=__vite-browser-external-2Ng8QIWW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"__vite-browser-external-2Ng8QIWW.js","sources":["../__vite-browser-external"],"sourcesContent":["export default {}"],"names":[],"mappings":"AAAA,MAAA,wBAAe,CAAA;"}
package/dist/cli.js CHANGED
@@ -2,8 +2,9 @@ import { Command } from "commander";
2
2
  import chalk from "chalk";
3
3
  import inquirer from "inquirer";
4
4
  import { resolve, join } from "node:path";
5
- import { stat, readFile } from "node:fs/promises";
6
- import { c as createWorkspace, R as RIOTDOC_STRUCTURE, e as parse, b as loadVoice } from "./loader-Jj2cSi3H.js";
5
+ import { stat } from "node:fs/promises";
6
+ import { c as createWorkspace, b as loadVoice } from "./loader-DJHV70rz.js";
7
+ import { l as loadDocument, a as loadObjectives, b as buildOutlinePrompt, c as loadOutline } from "./loader-Cvfo7vBn.js";
7
8
  const DOCUMENT_TYPES = [
8
9
  { name: "Blog Post", value: "blog-post" },
9
10
  { name: "Podcast Script", value: "podcast-script" },
@@ -105,148 +106,6 @@ function registerCreateCommand(program) {
105
106
  }
106
107
  });
107
108
  }
108
- async function loadOutline(workspacePath) {
109
- const outlinePath = join(workspacePath, RIOTDOC_STRUCTURE.outlineFile);
110
- return await readFile(outlinePath, "utf-8");
111
- }
112
- function buildOutlinePrompt(objectives, voice, documentType) {
113
- return `Generate an outline for a ${documentType}.
114
-
115
- ## Objectives
116
-
117
- Primary Goal: ${objectives.primaryGoal}
118
-
119
- Secondary Goals:
120
- ${objectives.secondaryGoals.map((g) => `- ${g}`).join("\n")}
121
-
122
- Key Takeaways:
123
- ${objectives.keyTakeaways.map((t) => `- ${t}`).join("\n")}
124
-
125
- ${objectives.emotionalArc ? `Emotional Arc: ${objectives.emotionalArc}` : ""}
126
-
127
- ## Voice & Tone
128
-
129
- Tone: ${voice.tone}
130
- Point of View: ${voice.pointOfView}
131
-
132
- ## Output Format
133
-
134
- Create a markdown outline with:
135
- 1. A compelling hook/introduction
136
- 2. 3-5 main sections with bullet points
137
- 3. A conclusion with call to action
138
-
139
- Use ## for main sections, ### for subsections, and - for bullet points.
140
- `;
141
- }
142
- async function loadDocument(workspacePath) {
143
- try {
144
- const configPath = join(workspacePath, RIOTDOC_STRUCTURE.configFile);
145
- const content = await readFile(configPath, "utf-8");
146
- const config = parse(content);
147
- config.createdAt = new Date(config.createdAt);
148
- config.updatedAt = new Date(config.updatedAt);
149
- return {
150
- config,
151
- voice: { tone: "", pointOfView: "first", styleNotes: [], avoid: [] },
152
- objectives: { primaryGoal: "", secondaryGoals: [], keyTakeaways: [] },
153
- evidence: [],
154
- drafts: [],
155
- revisions: [],
156
- workspacePath
157
- };
158
- } catch {
159
- return null;
160
- }
161
- }
162
- async function loadObjectives(workspacePath) {
163
- const objectivesPath = join(workspacePath, RIOTDOC_STRUCTURE.objectivesFile);
164
- try {
165
- const content = await readFile(objectivesPath, "utf-8");
166
- return parseObjectivesMarkdown(content);
167
- } catch {
168
- return {
169
- primaryGoal: "",
170
- secondaryGoals: [],
171
- keyTakeaways: []
172
- };
173
- }
174
- }
175
- function parseObjectivesMarkdown(content) {
176
- const objectives = {
177
- primaryGoal: "",
178
- secondaryGoals: [],
179
- keyTakeaways: []
180
- };
181
- const goalMatch = content.match(/##\s*Primary\s+Goal\s*\n+([^\n#]+)/i);
182
- if (goalMatch) {
183
- objectives.primaryGoal = goalMatch[1].trim().replace(/^_|_$/g, "");
184
- }
185
- const lines = content.split("\n");
186
- const secondaryLines = [];
187
- let inSecondary = false;
188
- for (const line of lines) {
189
- if (/^##\s*Secondary\s+Goals$/i.test(line)) {
190
- inSecondary = true;
191
- continue;
192
- }
193
- if (inSecondary && /^##/.test(line)) {
194
- break;
195
- }
196
- if (inSecondary) {
197
- secondaryLines.push(line);
198
- }
199
- }
200
- if (secondaryLines.length > 0) {
201
- const sectionContent = secondaryLines.join("\n");
202
- const goals = sectionContent.matchAll(/^[-*]\s+(.+)$/gm);
203
- for (const goal of goals) {
204
- const text = goal[1].trim().replace(/^_|_$/g, "");
205
- if (text && !text.startsWith("Add")) {
206
- objectives.secondaryGoals.push(text);
207
- }
208
- }
209
- }
210
- const takeawayLines = [];
211
- let inTakeaways = false;
212
- for (const line of lines) {
213
- if (/^##\s*Key\s+Takeaways$/i.test(line)) {
214
- inTakeaways = true;
215
- continue;
216
- }
217
- if (inTakeaways && /^##/.test(line)) {
218
- break;
219
- }
220
- if (inTakeaways) {
221
- takeawayLines.push(line);
222
- }
223
- }
224
- if (takeawayLines.length > 0) {
225
- const sectionContent = takeawayLines.join("\n");
226
- const takeaways = sectionContent.matchAll(/^\d+\.\s+(.+)$/gm);
227
- for (const takeaway of takeaways) {
228
- const text = takeaway[1].trim().replace(/^_|_$/g, "");
229
- if (text && !text.startsWith("Define")) {
230
- objectives.keyTakeaways.push(text);
231
- }
232
- }
233
- }
234
- const ctaMatch = content.match(/##\s*Call\s+to\s+Action\s*\n+([^\n#]+)/i);
235
- if (ctaMatch) {
236
- const cta = ctaMatch[1].trim().replace(/^_|_$/g, "");
237
- if (cta && !cta.startsWith("What")) {
238
- objectives.callToAction = cta;
239
- }
240
- }
241
- const arcMatch = content.match(/##\s*Emotional\s+Arc\s*\n+([^\n#]+)/i);
242
- if (arcMatch) {
243
- const arc = arcMatch[1].trim().replace(/^_|_$/g, "");
244
- if (arc && !arc.startsWith("Describe")) {
245
- objectives.emotionalArc = arc;
246
- }
247
- }
248
- return objectives;
249
- }
250
109
  function registerOutlineCommand(program) {
251
110
  program.command("outline [path]").description("Generate or edit document outline").option("-g, --generate", "Generate outline with AI").option("-e, --edit", "Open outline for editing").action(async (pathArg, options) => {
252
111
  try {
@@ -265,7 +124,7 @@ function registerOutlineCommand(program) {
265
124
  console.log(chalk.gray(prompt));
266
125
  console.log(chalk.yellow("\n(AI integration pending - edit OUTLINE.md manually)"));
267
126
  } else if (options.edit) {
268
- const { spawn } = await import("./__vite-browser-external-l0sNRNKZ.js");
127
+ const { spawn } = await import("./__vite-browser-external-2Ng8QIWW.js");
269
128
  const editor = process.env.EDITOR || "vim";
270
129
  const outlinePath = `${workspacePath}/OUTLINE.md`;
271
130
  spawn(editor, [outlinePath], { stdio: "inherit" });
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sources":["../src/cli/commands/create.ts","../src/outline/generator.ts","../src/workspace/loader.ts","../src/objectives/loader.ts","../src/cli/commands/outline.ts","../src/cli/commands/draft.ts","../src/cli/commands/revise.ts","../src/cli/commands/cleanup.ts","../src/cli/commands/spellcheck.ts","../src/cli/commands/export.ts","../src/cli/commands/status.ts","../src/cli/cli.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport inquirer from \"inquirer\";\nimport { join, resolve } from \"node:path\";\nimport { stat } from \"node:fs/promises\";\nimport { createWorkspace } from \"../../workspace/creator.js\";\nimport type { DocumentConfig } from \"../../types.js\";\n\nexport interface CreateOptions {\n type?: DocumentConfig[\"type\"];\n title?: string;\n path?: string;\n}\n\nconst DOCUMENT_TYPES = [\n { name: \"Blog Post\", value: \"blog-post\" },\n { name: \"Podcast Script\", value: \"podcast-script\" },\n { name: \"Technical Documentation\", value: \"technical-doc\" },\n { name: \"Newsletter\", value: \"newsletter\" },\n { name: \"Custom\", value: \"custom\" },\n];\n\n/**\n * Prompt for document type\n */\nasync function promptForType(): Promise<DocumentConfig[\"type\"]> {\n const { type } = await inquirer.prompt([{\n type: \"list\",\n name: \"type\",\n message: \"Document type:\",\n choices: DOCUMENT_TYPES,\n }]);\n return type;\n}\n\n/**\n * Prompt for document title\n */\nasync function promptForTitle(name: string): Promise<string> {\n const defaultTitle = name\n .split(\"-\")\n .map(w => w.charAt(0).toUpperCase() + w.slice(1))\n .join(\" \");\n \n const { title } = await inquirer.prompt([{\n type: \"input\",\n name: \"title\",\n message: \"Document title:\",\n default: defaultTitle,\n }]);\n return title;\n}\n\n/**\n * Prompt for primary goal\n */\nasync function promptForGoal(): Promise<string> {\n const { goal } = await inquirer.prompt([{\n type: \"input\",\n name: \"goal\",\n message: \"What is the primary goal of this document?\",\n }]);\n return goal;\n}\n\n/**\n * Prompt for target audience\n */\nasync function promptForAudience(): Promise<string> {\n const { audience } = await inquirer.prompt([{\n type: \"input\",\n name: \"audience\",\n message: \"Who is the target audience?\",\n }]);\n return audience;\n}\n\n/**\n * Check if path already exists\n */\nasync function pathExists(path: string): Promise<boolean> {\n try {\n await stat(path);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Register the create command\n */\nexport function registerCreateCommand(program: Command): void {\n program\n .command(\"create <name>\")\n .description(\"Create a new document workspace\")\n .option(\"-t, --type <type>\", \"Document type (blog-post, podcast-script, technical-doc, newsletter, custom)\")\n .option(\"-T, --title <title>\", \"Document title\")\n .option(\"-p, --path <path>\", \"Base path (default: current directory)\")\n .action(async (name: string, options: CreateOptions) => {\n try {\n const basePath = options.path || process.cwd();\n const workspacePath = resolve(join(basePath, name));\n \n // Check if already exists\n if (await pathExists(workspacePath)) {\n console.error(chalk.red(`Directory already exists: ${workspacePath}`));\n process.exit(1);\n }\n \n console.log(chalk.cyan(\"\\n📝 Creating new document workspace\\n\"));\n \n // Get document type\n const type = options.type as DocumentConfig[\"type\"] || await promptForType();\n \n // Get title\n const title = options.title || await promptForTitle(name);\n \n // Get initial objectives\n const goal = await promptForGoal();\n const audience = await promptForAudience();\n \n // Create workspace\n console.log(chalk.gray(\"\\nCreating workspace...\"));\n \n await createWorkspace({\n path: workspacePath,\n id: name,\n title,\n type,\n objectives: {\n primaryGoal: goal,\n secondaryGoals: [],\n keyTakeaways: [],\n },\n });\n \n // Note: audience is collected but not yet stored in config\n // This will be added when we implement config management\n if (audience) {\n // Future: store audience in config\n }\n \n console.log(chalk.green(`\\n✅ Document workspace created: ${workspacePath}`));\n \n // Show next steps\n console.log(chalk.cyan(\"\\n📋 Next steps:\\n\"));\n console.log(chalk.gray(` 1. Edit voice/tone.md to define your writing voice`));\n console.log(chalk.gray(` 2. Edit OBJECTIVES.md to refine your goals`));\n console.log(chalk.gray(` 3. Run: riotdoc outline ${name}`));\n console.log(chalk.gray(` 4. Run: riotdoc draft ${name}`));\n \n console.log(chalk.cyan(`\\n📁 Workspace structure:`));\n console.log(chalk.gray(` ${name}/`));\n console.log(chalk.gray(` ├── riotdoc.yaml # Configuration`));\n console.log(chalk.gray(` ├── OBJECTIVES.md # Goals and objectives`));\n console.log(chalk.gray(` ├── OUTLINE.md # Document outline`));\n console.log(chalk.gray(` ├── voice/ # Voice and style`));\n console.log(chalk.gray(` ├── evidence/ # Research and references`));\n console.log(chalk.gray(` ├── drafts/ # Draft iterations`));\n console.log(chalk.gray(` └── export/ # Final output`));\n \n } catch (error) {\n console.error(chalk.red(\"Failed to create workspace:\"), error);\n process.exit(1);\n }\n });\n}\n","import { readFile, writeFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { RIOTDOC_STRUCTURE } from \"../constants.js\";\nimport type { DocumentObjectives, VoiceConfig } from \"../types.js\";\n\nexport interface OutlineSection {\n title: string;\n points: string[];\n subsections?: OutlineSection[];\n}\n\nexport interface Outline {\n title: string;\n hook: string;\n sections: OutlineSection[];\n conclusion: string;\n}\n\n/**\n * Load outline from workspace\n */\nexport async function loadOutline(workspacePath: string): Promise<string> {\n const outlinePath = join(workspacePath, RIOTDOC_STRUCTURE.outlineFile);\n return await readFile(outlinePath, \"utf-8\");\n}\n\n/**\n * Save outline to workspace\n */\nexport async function saveOutline(workspacePath: string, content: string): Promise<void> {\n const outlinePath = join(workspacePath, RIOTDOC_STRUCTURE.outlineFile);\n await writeFile(outlinePath, content, \"utf-8\");\n}\n\n/**\n * Build prompt for outline generation\n */\nexport function buildOutlinePrompt(\n objectives: DocumentObjectives,\n voice: VoiceConfig,\n documentType: string\n): string {\n return `Generate an outline for a ${documentType}.\n\n## Objectives\n\nPrimary Goal: ${objectives.primaryGoal}\n\nSecondary Goals:\n${objectives.secondaryGoals.map(g => `- ${g}`).join(\"\\n\")}\n\nKey Takeaways:\n${objectives.keyTakeaways.map(t => `- ${t}`).join(\"\\n\")}\n\n${objectives.emotionalArc ? `Emotional Arc: ${objectives.emotionalArc}` : \"\"}\n\n## Voice & Tone\n\nTone: ${voice.tone}\nPoint of View: ${voice.pointOfView}\n\n## Output Format\n\nCreate a markdown outline with:\n1. A compelling hook/introduction\n2. 3-5 main sections with bullet points\n3. A conclusion with call to action\n\nUse ## for main sections, ### for subsections, and - for bullet points.\n`;\n}\n\n/**\n * Parse outline markdown into structure\n */\nexport function parseOutline(content: string): Outline {\n const lines = content.split(\"\\n\");\n const outline: Outline = {\n title: \"\",\n hook: \"\",\n sections: [],\n conclusion: \"\",\n };\n \n let currentSection: OutlineSection | null = null;\n let inIntro = false;\n let inConclusion = false;\n \n for (const line of lines) {\n // Title\n if (line.startsWith(\"# \")) {\n outline.title = line.slice(2).trim();\n continue;\n }\n \n // Main section\n if (line.startsWith(\"## \")) {\n const title = line.slice(3).trim().toLowerCase();\n if (title.includes(\"intro\") || title.includes(\"hook\")) {\n inIntro = true;\n inConclusion = false;\n currentSection = null;\n } else if (title.includes(\"conclusion\")) {\n inIntro = false;\n inConclusion = true;\n currentSection = null;\n } else {\n inIntro = false;\n inConclusion = false;\n currentSection = { title: line.slice(3).trim(), points: [] };\n outline.sections.push(currentSection);\n }\n continue;\n }\n \n // Bullet point\n if (line.match(/^[-*]\\s+/)) {\n const point = line.replace(/^[-*]\\s+/, \"\").trim();\n if (inIntro) {\n outline.hook += (outline.hook ? \"\\n\" : \"\") + point;\n } else if (inConclusion) {\n outline.conclusion += (outline.conclusion ? \"\\n\" : \"\") + point;\n } else if (currentSection) {\n currentSection.points.push(point);\n }\n }\n }\n \n return outline;\n}\n\n/**\n * Format outline structure as markdown\n */\nexport function formatOutline(outline: Outline): string {\n const parts: string[] = [];\n \n parts.push(`# ${outline.title}\\n`);\n \n if (outline.hook) {\n parts.push(`## Introduction\\n`);\n parts.push(outline.hook.split(\"\\n\").map(p => `- ${p}`).join(\"\\n\"));\n parts.push(\"\");\n }\n \n for (const section of outline.sections) {\n parts.push(`## ${section.title}\\n`);\n parts.push(section.points.map(p => `- ${p}`).join(\"\\n\"));\n parts.push(\"\");\n }\n \n if (outline.conclusion) {\n parts.push(`## Conclusion\\n`);\n parts.push(outline.conclusion.split(\"\\n\").map(p => `- ${p}`).join(\"\\n\"));\n }\n \n return parts.join(\"\\n\");\n}\n","import { readFile, stat } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { parse } from \"yaml\";\nimport { RIOTDOC_STRUCTURE } from \"../constants.js\";\nimport type { RiotDoc, DocumentConfig } from \"../types.js\";\n\n/**\n * Load document from workspace\n */\nexport async function loadDocument(workspacePath: string): Promise<RiotDoc | null> {\n try {\n const configPath = join(workspacePath, RIOTDOC_STRUCTURE.configFile);\n const content = await readFile(configPath, \"utf-8\");\n const config = parse(content) as DocumentConfig;\n \n // Convert date strings to Date objects\n config.createdAt = new Date(config.createdAt);\n config.updatedAt = new Date(config.updatedAt);\n \n return {\n config,\n voice: { tone: \"\", pointOfView: \"first\", styleNotes: [], avoid: [] },\n objectives: { primaryGoal: \"\", secondaryGoals: [], keyTakeaways: [] },\n evidence: [],\n drafts: [],\n revisions: [],\n workspacePath,\n };\n } catch {\n return null;\n }\n}\n\n/**\n * Check if path is a RiotDoc workspace\n */\nexport async function isRiotDocWorkspace(path: string): Promise<boolean> {\n try {\n const configPath = join(path, RIOTDOC_STRUCTURE.configFile);\n await stat(configPath);\n return true;\n } catch {\n return false;\n }\n}\n","import { readFile } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { RIOTDOC_STRUCTURE } from \"../constants.js\";\nimport type { DocumentObjectives } from \"../types.js\";\n\n/**\n * Load objectives from workspace\n */\nexport async function loadObjectives(workspacePath: string): Promise<DocumentObjectives> {\n const objectivesPath = join(workspacePath, RIOTDOC_STRUCTURE.objectivesFile);\n \n try {\n const content = await readFile(objectivesPath, \"utf-8\");\n return parseObjectivesMarkdown(content);\n } catch {\n return {\n primaryGoal: \"\",\n secondaryGoals: [],\n keyTakeaways: [],\n };\n }\n}\n\n/**\n * Parse objectives markdown\n */\nfunction parseObjectivesMarkdown(content: string): DocumentObjectives {\n const objectives: DocumentObjectives = {\n primaryGoal: \"\",\n secondaryGoals: [],\n keyTakeaways: [],\n };\n \n // Extract primary goal\n const goalMatch = content.match(/##\\s*Primary\\s+Goal\\s*\\n+([^\\n#]+)/i);\n if (goalMatch) {\n objectives.primaryGoal = goalMatch[1].trim().replace(/^_|_$/g, \"\");\n }\n \n // Extract secondary goals\n // Use line-by-line parsing to avoid polynomial regex\n const lines = content.split('\\n');\n const secondaryLines: string[] = [];\n let inSecondary = false;\n \n for (const line of lines) {\n if (/^##\\s*Secondary\\s+Goals$/i.test(line)) {\n inSecondary = true;\n continue;\n }\n if (inSecondary && /^##/.test(line)) {\n break;\n }\n if (inSecondary) {\n secondaryLines.push(line);\n }\n }\n \n if (secondaryLines.length > 0) {\n const sectionContent = secondaryLines.join('\\n');\n const goals = sectionContent.matchAll(/^[-*]\\s+(.+)$/gm);\n for (const goal of goals) {\n const text = goal[1].trim().replace(/^_|_$/g, \"\");\n if (text && !text.startsWith(\"Add\")) {\n objectives.secondaryGoals.push(text);\n }\n }\n }\n \n // Extract key takeaways\n // Use line-by-line parsing to avoid polynomial regex\n const takeawayLines: string[] = [];\n let inTakeaways = false;\n \n for (const line of lines) {\n if (/^##\\s*Key\\s+Takeaways$/i.test(line)) {\n inTakeaways = true;\n continue;\n }\n if (inTakeaways && /^##/.test(line)) {\n break;\n }\n if (inTakeaways) {\n takeawayLines.push(line);\n }\n }\n \n if (takeawayLines.length > 0) {\n const sectionContent = takeawayLines.join('\\n');\n const takeaways = sectionContent.matchAll(/^\\d+\\.\\s+(.+)$/gm);\n for (const takeaway of takeaways) {\n const text = takeaway[1].trim().replace(/^_|_$/g, \"\");\n if (text && !text.startsWith(\"Define\")) {\n objectives.keyTakeaways.push(text);\n }\n }\n }\n \n // Extract call to action\n const ctaMatch = content.match(/##\\s*Call\\s+to\\s+Action\\s*\\n+([^\\n#]+)/i);\n if (ctaMatch) {\n const cta = ctaMatch[1].trim().replace(/^_|_$/g, \"\");\n if (cta && !cta.startsWith(\"What\")) {\n objectives.callToAction = cta;\n }\n }\n \n // Extract emotional arc\n const arcMatch = content.match(/##\\s*Emotional\\s+Arc\\s*\\n+([^\\n#]+)/i);\n if (arcMatch) {\n const arc = arcMatch[1].trim().replace(/^_|_$/g, \"\");\n if (arc && !arc.startsWith(\"Describe\")) {\n objectives.emotionalArc = arc;\n }\n }\n \n return objectives;\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { resolve } from \"node:path\";\nimport { loadOutline, buildOutlinePrompt } from \"../../outline/generator.js\";\nimport { loadDocument } from \"../../workspace/loader.js\";\nimport { loadVoice } from \"../../voice/loader.js\";\nimport { loadObjectives } from \"../../objectives/loader.js\";\n\nexport interface OutlineOptions {\n generate?: boolean;\n edit?: boolean;\n}\n\nexport function registerOutlineCommand(program: Command): void {\n program\n .command(\"outline [path]\")\n .description(\"Generate or edit document outline\")\n .option(\"-g, --generate\", \"Generate outline with AI\")\n .option(\"-e, --edit\", \"Open outline for editing\")\n .action(async (pathArg: string | undefined, options: OutlineOptions) => {\n try {\n const workspacePath = resolve(pathArg || process.cwd());\n \n // Load document state\n const doc = await loadDocument(workspacePath);\n if (!doc) {\n console.error(chalk.red(\"Not a RiotDoc workspace\"));\n process.exit(1);\n }\n \n if (options.generate) {\n // Generate outline with AI\n console.log(chalk.cyan(\"Generating outline...\"));\n \n const voice = await loadVoice(workspacePath);\n const objectives = await loadObjectives(workspacePath);\n \n const prompt = buildOutlinePrompt(objectives, voice, doc.config.type);\n \n // TODO: Call AI provider\n console.log(chalk.yellow(\"\\nOutline generation prompt:\"));\n console.log(chalk.gray(prompt));\n console.log(chalk.yellow(\"\\n(AI integration pending - edit OUTLINE.md manually)\"));\n \n } else if (options.edit) {\n // Open in editor\n const { spawn } = await import(\"node:child_process\");\n const editor = process.env.EDITOR || \"vim\";\n const outlinePath = `${workspacePath}/OUTLINE.md`;\n \n spawn(editor, [outlinePath], { stdio: \"inherit\" });\n \n } else {\n // Show current outline\n const outline = await loadOutline(workspacePath);\n console.log(chalk.cyan(\"\\n📋 Current Outline:\\n\"));\n console.log(outline);\n \n console.log(chalk.gray(\"\\nOptions:\"));\n console.log(chalk.gray(\" --generate Generate outline with AI\"));\n console.log(chalk.gray(\" --edit Open outline in editor\"));\n }\n \n } catch (error) {\n console.error(chalk.red(\"Failed:\"), error);\n process.exit(1);\n }\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\n\nexport interface DraftOptions {\n level?: string;\n from?: string;\n}\n\nexport function registerDraftCommand(program: Command): void {\n program\n .command(\"draft [path]\")\n .description(\"Create a new draft\")\n .option(\"-l, --level <level>\", \"AI assistance level (generate, expand, revise)\", \"expand\")\n .option(\"-f, --from <draft>\", \"Base on existing draft\")\n .action(async (_path: string | undefined, _options: DraftOptions) => {\n console.log(chalk.yellow(\"Draft command - AI integration pending\"));\n console.log(chalk.gray(\"\\nThis command will:\"));\n console.log(chalk.gray(\" 1. Load outline and objectives\"));\n console.log(chalk.gray(\" 2. Apply voice and style rules\"));\n console.log(chalk.gray(\" 3. Generate draft with specified assistance level\"));\n console.log(chalk.gray(\" 4. Save to drafts/ directory\"));\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\n\nexport interface ReviseOptions {\n draft?: string;\n message?: string;\n}\n\nexport function registerReviseCommand(program: Command): void {\n program\n .command(\"revise [path]\")\n .description(\"Add revision feedback\")\n .option(\"-d, --draft <number>\", \"Target draft number\")\n .option(\"-m, --message <message>\", \"Revision feedback\")\n .action(async (_path: string | undefined, _options: ReviseOptions) => {\n console.log(chalk.yellow(\"Revise command - implementation pending\"));\n console.log(chalk.gray(\"\\nThis command will:\"));\n console.log(chalk.gray(\" 1. Load specified draft\"));\n console.log(chalk.gray(\" 2. Collect revision feedback\"));\n console.log(chalk.gray(\" 3. Save to revisions/ directory\"));\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\n\nexport interface CleanupOptions {\n draft?: string;\n}\n\nexport function registerCleanupCommand(program: Command): void {\n program\n .command(\"cleanup [path]\")\n .description(\"Light editing pass (grammar, clarity)\")\n .option(\"-d, --draft <number>\", \"Target draft\")\n .action(async (_path: string | undefined, _options: CleanupOptions) => {\n console.log(chalk.yellow(\"Cleanup command - AI integration pending\"));\n console.log(chalk.gray(\"\\nThis command will:\"));\n console.log(chalk.gray(\" 1. Load draft\"));\n console.log(chalk.gray(\" 2. Apply light editing for grammar and clarity\"));\n console.log(chalk.gray(\" 3. Save cleaned version\"));\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\n\nexport interface SpellcheckOptions {\n draft?: string;\n}\n\nexport function registerSpellcheckCommand(program: Command): void {\n program\n .command(\"spellcheck [path]\")\n .description(\"Fix spelling and grammar only\")\n .option(\"-d, --draft <number>\", \"Target draft\")\n .action(async (_path: string | undefined, _options: SpellcheckOptions) => {\n console.log(chalk.yellow(\"Spellcheck command - implementation pending\"));\n console.log(chalk.gray(\"\\nThis command will:\"));\n console.log(chalk.gray(\" 1. Load draft\"));\n console.log(chalk.gray(\" 2. Check spelling and basic grammar\"));\n console.log(chalk.gray(\" 3. Report or fix issues\"));\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\n\nexport interface ExportOptions {\n draft?: string;\n output?: string;\n}\n\nexport function registerExportCommand(program: Command): void {\n program\n .command(\"export [path]\")\n .description(\"Export publication-ready document\")\n .option(\"-d, --draft <number>\", \"Source draft\")\n .option(\"-o, --output <file>\", \"Output file name\")\n .action(async (_path: string | undefined, _options: ExportOptions) => {\n console.log(chalk.yellow(\"Export command - implementation pending\"));\n console.log(chalk.gray(\"\\nThis command will:\"));\n console.log(chalk.gray(\" 1. Load specified draft\"));\n console.log(chalk.gray(\" 2. Apply final formatting\"));\n console.log(chalk.gray(\" 3. Export to export/ directory\"));\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { resolve } from \"node:path\";\nimport { loadDocument } from \"../../workspace/loader.js\";\n\nexport function registerStatusCommand(program: Command): void {\n program\n .command(\"status [path]\")\n .description(\"Show document status\")\n .action(async (pathArg: string | undefined) => {\n try {\n const workspacePath = resolve(pathArg || process.cwd());\n \n const doc = await loadDocument(workspacePath);\n if (!doc) {\n console.error(chalk.red(\"Not a RiotDoc workspace\"));\n process.exit(1);\n }\n \n console.log(chalk.cyan(\"\\n📊 Document Status\\n\"));\n console.log(chalk.gray(`Title: ${doc.config.title}`));\n console.log(chalk.gray(`Type: ${doc.config.type}`));\n console.log(chalk.gray(`Status: ${doc.config.status}`));\n console.log(chalk.gray(`Created: ${doc.config.createdAt.toLocaleDateString()}`));\n console.log(chalk.gray(`Updated: ${doc.config.updatedAt.toLocaleDateString()}`));\n \n if (doc.config.targetWordCount) {\n console.log(chalk.gray(`Target: ${doc.config.targetWordCount} words`));\n }\n \n console.log(chalk.cyan(\"\\n📁 Workspace: \") + chalk.gray(workspacePath));\n \n } catch (error) {\n console.error(chalk.red(\"Failed:\"), error);\n process.exit(1);\n }\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { registerCreateCommand } from \"./commands/create.js\";\nimport { registerOutlineCommand } from \"./commands/outline.js\";\nimport { registerDraftCommand } from \"./commands/draft.js\";\nimport { registerReviseCommand } from \"./commands/revise.js\";\nimport { registerCleanupCommand } from \"./commands/cleanup.js\";\nimport { registerSpellcheckCommand } from \"./commands/spellcheck.js\";\nimport { registerExportCommand } from \"./commands/export.js\";\nimport { registerStatusCommand } from \"./commands/status.js\";\n\nconst VERSION = \"1.0.0-dev.0\";\n\n/**\n * Create the CLI program\n */\nexport function createProgram(): Command {\n const program = new Command();\n \n program\n .name(\"riotdoc\")\n .description(\"Structured document creation with AI assistance\")\n .version(VERSION)\n .configureHelp({\n sortSubcommands: true,\n });\n \n // Register commands (implemented in subsequent steps)\n registerCreateCommand(program);\n registerOutlineCommand(program);\n registerDraftCommand(program);\n registerReviseCommand(program);\n registerCleanupCommand(program);\n registerSpellcheckCommand(program);\n registerExportCommand(program);\n registerStatusCommand(program);\n \n // Global options\n program\n .option(\"-v, --verbose\", \"Verbose output\")\n .option(\"--json\", \"Output as JSON\")\n .option(\"--no-color\", \"Disable colored output\");\n \n // Handle unknown commands\n program.on(\"command:*\", () => {\n console.error(chalk.red(`Unknown command: ${program.args.join(\" \")}`));\n console.log(`Run ${chalk.cyan(\"riotdoc --help\")} for usage.`);\n process.exit(1);\n });\n \n return program;\n}\n\n// All commands are now imported from separate files\n"],"names":[],"mappings":";;;;;;AAcA,MAAM,iBAAiB;AAAA,EACnB,EAAE,MAAM,aAAa,OAAO,YAAA;AAAA,EAC5B,EAAE,MAAM,kBAAkB,OAAO,iBAAA;AAAA,EACjC,EAAE,MAAM,2BAA2B,OAAO,gBAAA;AAAA,EAC1C,EAAE,MAAM,cAAc,OAAO,aAAA;AAAA,EAC7B,EAAE,MAAM,UAAU,OAAO,SAAA;AAC7B;AAKA,eAAe,gBAAiD;AAC5D,QAAM,EAAE,KAAA,IAAS,MAAM,SAAS,OAAO,CAAC;AAAA,IACpC,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,EAAA,CACZ,CAAC;AACF,SAAO;AACX;AAKA,eAAe,eAAe,MAA+B;AACzD,QAAM,eAAe,KAChB,MAAM,GAAG,EACT,IAAI,OAAK,EAAE,OAAO,CAAC,EAAE,YAAA,IAAgB,EAAE,MAAM,CAAC,CAAC,EAC/C,KAAK,GAAG;AAEb,QAAM,EAAE,MAAA,IAAU,MAAM,SAAS,OAAO,CAAC;AAAA,IACrC,MAAM;AAAA,IACN,MAAM;AAAA,IACN,S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M,KAAK,WAAW,IAAI,OAAO,eAAe,QAAQ,CAAC;AAAA,MACzE;AAEA,cAAQ,IAAI,MAAM,KAAK,kBAAkB,IAAI,MAAM,KAAK,aAAa,CAAC;AAAA,IAE1E,SAAS,OAAO;AACZ,cAAQ,MAAM,MAAM,IAAI,SAAS,GAAG,KAAK;AACzC,cAAQ,KAAK,CAAC;AAAA,IAClB;AAAA,EACJ,CAAC;AACT;AC1BA,MAAM,UAAU;AAKT,SAAS,gBAAyB;AACrC,QAAM,UAAU,IAAI,QAAA;AAEpB,UACK,KAAK,SAAS,EACd,YAAY,iDAAiD,EAC7D,QAAQ,OAAO,EACf,cAAc;AAAA,IACX,iBAAiB;AAAA,EAAA,CACpB;AAGL,wBAAsB,OAAO;AAC7B,yBAAuB,OAAO;AAC9B,uBAAqB,OAAO;AAC5B,wBAAsB,OAAO;AAC7B,yBAAuB,OAAO;AAC9B,4BAA0B,OAAO;AACjC,wBAAsB,OAAO;AAC7B,wBAAsB,OAAO;AAG7B,UACK,OAAO,iBAAiB,gBAAgB,EACxC,OAAO,UAAU,gBAAgB,EACjC,OAAO,cAAc,wBAAwB;AAGlD,UAAQ,GAAG,aAAa,MAAM;AAC1B,YAAQ,MAAM,MAAM,IAAI,oBAAoB,QAAQ,KAAK,KAAK,GAAG,CAAC,EAAE,CAAC;AACrE,YAAQ,IAAI,OAAO,MAAM,KAAK,gBAAgB,CAAC,aAAa;AAC5D,YAAQ,KAAK,CAAC;AAAA,EAClB,CAAC;AAED,SAAO;AACX;"}
1
+ {"version":3,"file":"cli.js","sources":["../src/cli/commands/create.ts","../src/cli/commands/outline.ts","../src/cli/commands/draft.ts","../src/cli/commands/revise.ts","../src/cli/commands/cleanup.ts","../src/cli/commands/spellcheck.ts","../src/cli/commands/export.ts","../src/cli/commands/status.ts","../src/cli/cli.ts"],"sourcesContent":["import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport inquirer from \"inquirer\";\nimport { join, resolve } from \"node:path\";\nimport { stat } from \"node:fs/promises\";\nimport { createWorkspace } from \"../../workspace/creator.js\";\nimport type { DocumentConfig } from \"../../types.js\";\n\nexport interface CreateOptions {\n type?: DocumentConfig[\"type\"];\n title?: string;\n path?: string;\n}\n\nconst DOCUMENT_TYPES = [\n { name: \"Blog Post\", value: \"blog-post\" },\n { name: \"Podcast Script\", value: \"podcast-script\" },\n { name: \"Technical Documentation\", value: \"technical-doc\" },\n { name: \"Newsletter\", value: \"newsletter\" },\n { name: \"Custom\", value: \"custom\" },\n];\n\n/**\n * Prompt for document type\n */\nasync function promptForType(): Promise<DocumentConfig[\"type\"]> {\n const { type } = await inquirer.prompt([{\n type: \"list\",\n name: \"type\",\n message: \"Document type:\",\n choices: DOCUMENT_TYPES,\n }]);\n return type;\n}\n\n/**\n * Prompt for document title\n */\nasync function promptForTitle(name: string): Promise<string> {\n const defaultTitle = name\n .split(\"-\")\n .map(w => w.charAt(0).toUpperCase() + w.slice(1))\n .join(\" \");\n \n const { title } = await inquirer.prompt([{\n type: \"input\",\n name: \"title\",\n message: \"Document title:\",\n default: defaultTitle,\n }]);\n return title;\n}\n\n/**\n * Prompt for primary goal\n */\nasync function promptForGoal(): Promise<string> {\n const { goal } = await inquirer.prompt([{\n type: \"input\",\n name: \"goal\",\n message: \"What is the primary goal of this document?\",\n }]);\n return goal;\n}\n\n/**\n * Prompt for target audience\n */\nasync function promptForAudience(): Promise<string> {\n const { audience } = await inquirer.prompt([{\n type: \"input\",\n name: \"audience\",\n message: \"Who is the target audience?\",\n }]);\n return audience;\n}\n\n/**\n * Check if path already exists\n */\nasync function pathExists(path: string): Promise<boolean> {\n try {\n await stat(path);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Register the create command\n */\nexport function registerCreateCommand(program: Command): void {\n program\n .command(\"create <name>\")\n .description(\"Create a new document workspace\")\n .option(\"-t, --type <type>\", \"Document type (blog-post, podcast-script, technical-doc, newsletter, custom)\")\n .option(\"-T, --title <title>\", \"Document title\")\n .option(\"-p, --path <path>\", \"Base path (default: current directory)\")\n .action(async (name: string, options: CreateOptions) => {\n try {\n const basePath = options.path || process.cwd();\n const workspacePath = resolve(join(basePath, name));\n \n // Check if already exists\n if (await pathExists(workspacePath)) {\n console.error(chalk.red(`Directory already exists: ${workspacePath}`));\n process.exit(1);\n }\n \n console.log(chalk.cyan(\"\\n📝 Creating new document workspace\\n\"));\n \n // Get document type\n const type = options.type as DocumentConfig[\"type\"] || await promptForType();\n \n // Get title\n const title = options.title || await promptForTitle(name);\n \n // Get initial objectives\n const goal = await promptForGoal();\n const audience = await promptForAudience();\n \n // Create workspace\n console.log(chalk.gray(\"\\nCreating workspace...\"));\n \n await createWorkspace({\n path: workspacePath,\n id: name,\n title,\n type,\n objectives: {\n primaryGoal: goal,\n secondaryGoals: [],\n keyTakeaways: [],\n },\n });\n \n // Note: audience is collected but not yet stored in config\n // This will be added when we implement config management\n if (audience) {\n // Future: store audience in config\n }\n \n console.log(chalk.green(`\\n✅ Document workspace created: ${workspacePath}`));\n \n // Show next steps\n console.log(chalk.cyan(\"\\n📋 Next steps:\\n\"));\n console.log(chalk.gray(` 1. Edit voice/tone.md to define your writing voice`));\n console.log(chalk.gray(` 2. Edit OBJECTIVES.md to refine your goals`));\n console.log(chalk.gray(` 3. Run: riotdoc outline ${name}`));\n console.log(chalk.gray(` 4. Run: riotdoc draft ${name}`));\n \n console.log(chalk.cyan(`\\n📁 Workspace structure:`));\n console.log(chalk.gray(` ${name}/`));\n console.log(chalk.gray(` ├── riotdoc.yaml # Configuration`));\n console.log(chalk.gray(` ├── OBJECTIVES.md # Goals and objectives`));\n console.log(chalk.gray(` ├── OUTLINE.md # Document outline`));\n console.log(chalk.gray(` ├── voice/ # Voice and style`));\n console.log(chalk.gray(` ├── evidence/ # Research and references`));\n console.log(chalk.gray(` ├── drafts/ # Draft iterations`));\n console.log(chalk.gray(` └── export/ # Final output`));\n \n } catch (error) {\n console.error(chalk.red(\"Failed to create workspace:\"), error);\n process.exit(1);\n }\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { resolve } from \"node:path\";\nimport { loadOutline, buildOutlinePrompt } from \"../../outline/generator.js\";\nimport { loadDocument } from \"../../workspace/loader.js\";\nimport { loadVoice } from \"../../voice/loader.js\";\nimport { loadObjectives } from \"../../objectives/loader.js\";\n\nexport interface OutlineOptions {\n generate?: boolean;\n edit?: boolean;\n}\n\nexport function registerOutlineCommand(program: Command): void {\n program\n .command(\"outline [path]\")\n .description(\"Generate or edit document outline\")\n .option(\"-g, --generate\", \"Generate outline with AI\")\n .option(\"-e, --edit\", \"Open outline for editing\")\n .action(async (pathArg: string | undefined, options: OutlineOptions) => {\n try {\n const workspacePath = resolve(pathArg || process.cwd());\n \n // Load document state\n const doc = await loadDocument(workspacePath);\n if (!doc) {\n console.error(chalk.red(\"Not a RiotDoc workspace\"));\n process.exit(1);\n }\n \n if (options.generate) {\n // Generate outline with AI\n console.log(chalk.cyan(\"Generating outline...\"));\n \n const voice = await loadVoice(workspacePath);\n const objectives = await loadObjectives(workspacePath);\n \n const prompt = buildOutlinePrompt(objectives, voice, doc.config.type);\n \n // TODO: Call AI provider\n console.log(chalk.yellow(\"\\nOutline generation prompt:\"));\n console.log(chalk.gray(prompt));\n console.log(chalk.yellow(\"\\n(AI integration pending - edit OUTLINE.md manually)\"));\n \n } else if (options.edit) {\n // Open in editor\n const { spawn } = await import(\"node:child_process\");\n const editor = process.env.EDITOR || \"vim\";\n const outlinePath = `${workspacePath}/OUTLINE.md`;\n \n spawn(editor, [outlinePath], { stdio: \"inherit\" });\n \n } else {\n // Show current outline\n const outline = await loadOutline(workspacePath);\n console.log(chalk.cyan(\"\\n📋 Current Outline:\\n\"));\n console.log(outline);\n \n console.log(chalk.gray(\"\\nOptions:\"));\n console.log(chalk.gray(\" --generate Generate outline with AI\"));\n console.log(chalk.gray(\" --edit Open outline in editor\"));\n }\n \n } catch (error) {\n console.error(chalk.red(\"Failed:\"), error);\n process.exit(1);\n }\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\n\nexport interface DraftOptions {\n level?: string;\n from?: string;\n}\n\nexport function registerDraftCommand(program: Command): void {\n program\n .command(\"draft [path]\")\n .description(\"Create a new draft\")\n .option(\"-l, --level <level>\", \"AI assistance level (generate, expand, revise)\", \"expand\")\n .option(\"-f, --from <draft>\", \"Base on existing draft\")\n .action(async (_path: string | undefined, _options: DraftOptions) => {\n console.log(chalk.yellow(\"Draft command - AI integration pending\"));\n console.log(chalk.gray(\"\\nThis command will:\"));\n console.log(chalk.gray(\" 1. Load outline and objectives\"));\n console.log(chalk.gray(\" 2. Apply voice and style rules\"));\n console.log(chalk.gray(\" 3. Generate draft with specified assistance level\"));\n console.log(chalk.gray(\" 4. Save to drafts/ directory\"));\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\n\nexport interface ReviseOptions {\n draft?: string;\n message?: string;\n}\n\nexport function registerReviseCommand(program: Command): void {\n program\n .command(\"revise [path]\")\n .description(\"Add revision feedback\")\n .option(\"-d, --draft <number>\", \"Target draft number\")\n .option(\"-m, --message <message>\", \"Revision feedback\")\n .action(async (_path: string | undefined, _options: ReviseOptions) => {\n console.log(chalk.yellow(\"Revise command - implementation pending\"));\n console.log(chalk.gray(\"\\nThis command will:\"));\n console.log(chalk.gray(\" 1. Load specified draft\"));\n console.log(chalk.gray(\" 2. Collect revision feedback\"));\n console.log(chalk.gray(\" 3. Save to revisions/ directory\"));\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\n\nexport interface CleanupOptions {\n draft?: string;\n}\n\nexport function registerCleanupCommand(program: Command): void {\n program\n .command(\"cleanup [path]\")\n .description(\"Light editing pass (grammar, clarity)\")\n .option(\"-d, --draft <number>\", \"Target draft\")\n .action(async (_path: string | undefined, _options: CleanupOptions) => {\n console.log(chalk.yellow(\"Cleanup command - AI integration pending\"));\n console.log(chalk.gray(\"\\nThis command will:\"));\n console.log(chalk.gray(\" 1. Load draft\"));\n console.log(chalk.gray(\" 2. Apply light editing for grammar and clarity\"));\n console.log(chalk.gray(\" 3. Save cleaned version\"));\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\n\nexport interface SpellcheckOptions {\n draft?: string;\n}\n\nexport function registerSpellcheckCommand(program: Command): void {\n program\n .command(\"spellcheck [path]\")\n .description(\"Fix spelling and grammar only\")\n .option(\"-d, --draft <number>\", \"Target draft\")\n .action(async (_path: string | undefined, _options: SpellcheckOptions) => {\n console.log(chalk.yellow(\"Spellcheck command - implementation pending\"));\n console.log(chalk.gray(\"\\nThis command will:\"));\n console.log(chalk.gray(\" 1. Load draft\"));\n console.log(chalk.gray(\" 2. Check spelling and basic grammar\"));\n console.log(chalk.gray(\" 3. Report or fix issues\"));\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\n\nexport interface ExportOptions {\n draft?: string;\n output?: string;\n}\n\nexport function registerExportCommand(program: Command): void {\n program\n .command(\"export [path]\")\n .description(\"Export publication-ready document\")\n .option(\"-d, --draft <number>\", \"Source draft\")\n .option(\"-o, --output <file>\", \"Output file name\")\n .action(async (_path: string | undefined, _options: ExportOptions) => {\n console.log(chalk.yellow(\"Export command - implementation pending\"));\n console.log(chalk.gray(\"\\nThis command will:\"));\n console.log(chalk.gray(\" 1. Load specified draft\"));\n console.log(chalk.gray(\" 2. Apply final formatting\"));\n console.log(chalk.gray(\" 3. Export to export/ directory\"));\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { resolve } from \"node:path\";\nimport { loadDocument } from \"../../workspace/loader.js\";\n\nexport function registerStatusCommand(program: Command): void {\n program\n .command(\"status [path]\")\n .description(\"Show document status\")\n .action(async (pathArg: string | undefined) => {\n try {\n const workspacePath = resolve(pathArg || process.cwd());\n \n const doc = await loadDocument(workspacePath);\n if (!doc) {\n console.error(chalk.red(\"Not a RiotDoc workspace\"));\n process.exit(1);\n }\n \n console.log(chalk.cyan(\"\\n📊 Document Status\\n\"));\n console.log(chalk.gray(`Title: ${doc.config.title}`));\n console.log(chalk.gray(`Type: ${doc.config.type}`));\n console.log(chalk.gray(`Status: ${doc.config.status}`));\n console.log(chalk.gray(`Created: ${doc.config.createdAt.toLocaleDateString()}`));\n console.log(chalk.gray(`Updated: ${doc.config.updatedAt.toLocaleDateString()}`));\n \n if (doc.config.targetWordCount) {\n console.log(chalk.gray(`Target: ${doc.config.targetWordCount} words`));\n }\n \n console.log(chalk.cyan(\"\\n📁 Workspace: \") + chalk.gray(workspacePath));\n \n } catch (error) {\n console.error(chalk.red(\"Failed:\"), error);\n process.exit(1);\n }\n });\n}\n","import { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { registerCreateCommand } from \"./commands/create.js\";\nimport { registerOutlineCommand } from \"./commands/outline.js\";\nimport { registerDraftCommand } from \"./commands/draft.js\";\nimport { registerReviseCommand } from \"./commands/revise.js\";\nimport { registerCleanupCommand } from \"./commands/cleanup.js\";\nimport { registerSpellcheckCommand } from \"./commands/spellcheck.js\";\nimport { registerExportCommand } from \"./commands/export.js\";\nimport { registerStatusCommand } from \"./commands/status.js\";\n\nconst VERSION = \"1.0.0-dev.0\";\n\n/**\n * Create the CLI program\n */\nexport function createProgram(): Command {\n const program = new Command();\n \n program\n .name(\"riotdoc\")\n .description(\"Structured document creation with AI assistance\")\n .version(VERSION)\n .configureHelp({\n sortSubcommands: true,\n });\n \n // Register commands (implemented in subsequent steps)\n registerCreateCommand(program);\n registerOutlineCommand(program);\n registerDraftCommand(program);\n registerReviseCommand(program);\n registerCleanupCommand(program);\n registerSpellcheckCommand(program);\n registerExportCommand(program);\n registerStatusCommand(program);\n \n // Global options\n program\n .option(\"-v, --verbose\", \"Verbose output\")\n .option(\"--json\", \"Output as JSON\")\n .option(\"--no-color\", \"Disable colored output\");\n \n // Handle unknown commands\n program.on(\"command:*\", () => {\n console.error(chalk.red(`Unknown command: ${program.args.join(\" \")}`));\n console.log(`Run ${chalk.cyan(\"riotdoc --help\")} for usage.`);\n process.exit(1);\n });\n \n return program;\n}\n\n// All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,OAAO;AACZ,cAAQ,MAAM,MAAM,IAAI,SAAS,GAAG,KAAK;AACzC,cAAQ,KAAK,CAAC;AAAA,IAClB;AAAA,EACJ,CAAC;AACT;AC1BA,MAAM,UAAU;AAKT,SAAS,gBAAyB;AACrC,QAAM,UAAU,IAAI,QAAA;AAEpB,UACK,KAAK,SAAS,EACd,YAAY,iDAAiD,EAC7D,QAAQ,OAAO,EACf,cAAc;AAAA,IACX,iBAAiB;AAAA,EAAA,CACpB;AAGL,wBAAsB,OAAO;AAC7B,yBAAuB,OAAO;AAC9B,uBAAqB,OAAO;AAC5B,wBAAsB,OAAO;AAC7B,yBAAuB,OAAO;AAC9B,4BAA0B,OAAO;AACjC,wBAAsB,OAAO;AAC7B,wBAAsB,OAAO;AAG7B,UACK,OAAO,iBAAiB,gBAAgB,EACxC,OAAO,UAAU,gBAAgB,EACjC,OAAO,cAAc,wBAAwB;AAGlD,UAAQ,GAAG,aAAa,MAAM;AAC1B,YAAQ,MAAM,MAAM,IAAI,oBAAoB,QAAQ,KAAK,KAAK,GAAG,CAAC,EAAE,CAAC;AACrE,YAAQ,IAAI,OAAO,MAAM,KAAK,gBAAgB,CAAC,aAAa;AAC5D,YAAQ,KAAK,CAAC;AAAA,EAClB,CAAC;AAED,SAAO;AACX;"}
package/dist/index.d.ts CHANGED
@@ -10,6 +10,64 @@ export declare type AssistanceLevel = "generate" | "expand" | "revise" | "cleanu
10
10
  */
11
11
  export declare function buildVoicePrompt(voice: VoiceConfig): string;
12
12
 
13
+ /**
14
+ * Checkpoint created event
15
+ */
16
+ export declare interface CheckpointCreatedEvent extends TimelineEvent {
17
+ type: "checkpoint_created";
18
+ data: {
19
+ /** Checkpoint name (kebab-case) */
20
+ name: string;
21
+ /** Description of checkpoint */
22
+ message: string;
23
+ /** Path to checkpoint snapshot (relative) */
24
+ snapshotPath?: string;
25
+ /** Path to prompt context (relative) */
26
+ promptPath?: string;
27
+ };
28
+ }
29
+
30
+ /**
31
+ * Checkpoint metadata structure
32
+ */
33
+ export declare interface CheckpointMetadata {
34
+ /** Checkpoint name */
35
+ name: string;
36
+ /** When created (ISO 8601) */
37
+ timestamp: string;
38
+ /** User-provided description */
39
+ message: string;
40
+ /** Current status */
41
+ status: string;
42
+ /** Snapshot of document files */
43
+ snapshot: {
44
+ timestamp: string;
45
+ config?: FileSnapshot;
46
+ outline?: FileSnapshot;
47
+ currentDraft?: FileSnapshot;
48
+ };
49
+ /** Context information */
50
+ context: {
51
+ /** List of .md files at checkpoint */
52
+ filesChanged: string[];
53
+ /** Timeline events since last checkpoint */
54
+ eventsSinceLastCheckpoint: number;
55
+ };
56
+ }
57
+
58
+ /**
59
+ * Checkpoint restored event
60
+ */
61
+ export declare interface CheckpointRestoredEvent extends TimelineEvent {
62
+ type: "checkpoint_restored";
63
+ data: {
64
+ /** Name of restored checkpoint */
65
+ checkpoint: string;
66
+ /** Timestamp of original checkpoint */
67
+ restoredFrom: string;
68
+ };
69
+ }
70
+
13
71
  /**
14
72
  * Create a new RiotDoc workspace
15
73
  */
@@ -61,6 +119,12 @@ export declare interface DocumentConfig {
61
119
  type: DocumentType;
62
120
  /** Current status */
63
121
  status: DocumentStatus;
122
+ /** Current version (e.g., "0.1", "1.0") */
123
+ version: string;
124
+ /** Whether document is published (v1.0+) or draft (v0.x) */
125
+ published: boolean;
126
+ /** Version history */
127
+ versionHistory: VersionHistoryEntry[];
64
128
  /** Creation timestamp */
65
129
  createdAt: Date;
66
130
  /** Last modified timestamp */
@@ -176,6 +240,16 @@ export declare interface EvidenceItem {
176
240
  incorporatedIn?: string;
177
241
  }
178
242
 
243
+ /**
244
+ * File snapshot in checkpoint
245
+ */
246
+ export declare interface FileSnapshot {
247
+ /** Whether file exists */
248
+ exists: boolean;
249
+ /** File content (if exists) */
250
+ content?: string;
251
+ }
252
+
179
253
  /**
180
254
  * Format style validation result for terminal
181
255
  */
@@ -196,6 +270,23 @@ export declare function loadGlossary(workspacePath: string): Promise<Map<string,
196
270
  */
197
271
  export declare function loadVoice(workspacePath: string): Promise<VoiceConfig>;
198
272
 
273
+ /**
274
+ * Narrative chunk event - captures raw conversational input
275
+ */
276
+ export declare interface NarrativeChunkEvent extends TimelineEvent {
277
+ type: "narrative_chunk";
278
+ data: {
279
+ /** Raw user input */
280
+ content: string;
281
+ /** Source of input */
282
+ source?: "typing" | "voice" | "paste" | "import";
283
+ /** Context about what prompted this */
284
+ context?: string;
285
+ /** Who is speaking */
286
+ speaker?: "user" | "assistant" | "system";
287
+ };
288
+ }
289
+
199
290
  /**
200
291
  * Parse style rules markdown
201
292
  */
@@ -298,11 +389,42 @@ export declare interface StyleViolation {
298
389
  severity: "error" | "warning" | "info";
299
390
  }
300
391
 
392
+ /**
393
+ * Base timeline event structure
394
+ */
395
+ export declare interface TimelineEvent {
396
+ /** ISO 8601 timestamp */
397
+ timestamp: string;
398
+ /** Event type identifier */
399
+ type: TimelineEventType;
400
+ /** Event-specific data */
401
+ data: Record<string, any>;
402
+ }
403
+
404
+ /**
405
+ * Timeline event types for document lifecycle
406
+ */
407
+ export declare type TimelineEventType = "document_created" | "outline_created" | "draft_created" | "revision_added" | "evidence_added" | "exported" | "version_incremented" | "version_published" | "narrative_chunk" | "checkpoint_created" | "checkpoint_restored";
408
+
301
409
  /**
302
410
  * Validate document content against style rules
303
411
  */
304
412
  export declare function validateStyle(content: string, rules: StyleRules): StyleValidationResult;
305
413
 
414
+ /**
415
+ * Version history entry
416
+ */
417
+ export declare interface VersionHistoryEntry {
418
+ /** Version number (e.g., "0.1", "1.0") */
419
+ version: string;
420
+ /** When this version was created */
421
+ timestamp: string;
422
+ /** Draft file path for this version */
423
+ draftPath?: string;
424
+ /** Notes about this version */
425
+ notes?: string;
426
+ }
427
+
306
428
  /**
307
429
  * Voice and tone configuration
308
430
  */
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { D, a, R, c, h, l, b, p, d } from "./loader-Jj2cSi3H.js";
2
+ import { D, a, R, c, h, l, b, p, d } from "./loader-DJHV70rz.js";
3
3
  import chalk from "chalk";
4
4
  const DocumentConfigSchema = z.object({
5
5
  id: z.string(),