@vibe-agent-toolkit/vat-development-agents 0.1.29 → 0.1.30-rc.2

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.
Files changed (33) hide show
  1. package/dist/.claude/plugins/marketplaces/vat-skills/CHANGELOG.md +20 -0
  2. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/.claude-plugin/plugin.json +1 -1
  3. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/audit/SKILL.md +21 -16
  4. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/authoring/SKILL.md +30 -12
  5. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/authoring/resources/skill-quality-checklist.md +42 -0
  6. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/debugging/SKILL.md +4 -4
  7. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/vibe-agent-toolkit/SKILL.md +6 -6
  8. package/dist/generated/resources/skills/vat-agent-authoring.js +3 -3
  9. package/dist/generated/resources/skills/vat-audit.js +5 -5
  10. package/dist/skills/audit/SKILL.md +21 -16
  11. package/dist/skills/authoring/SKILL.md +30 -12
  12. package/dist/skills/authoring/resources/skill-quality-checklist.md +42 -0
  13. package/dist/skills/debugging/SKILL.md +4 -4
  14. package/dist/skills/vibe-agent-toolkit/SKILL.md +6 -6
  15. package/package.json +4 -4
  16. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/debugging/resources/CLAUDE.md +0 -539
  17. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/debugging/resources/debug-and-test-vat-fixes.md +0 -111
  18. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/debugging/resources/writing-tests.md +0 -577
  19. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/vibe-agent-toolkit/resources/adding-runtime-adapters.md +0 -628
  20. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/vibe-agent-toolkit/resources/agent-authoring.md +0 -905
  21. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/vibe-agent-toolkit/resources/compiling-markdown-to-typescript.md +0 -501
  22. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/vibe-agent-toolkit/resources/getting-started.md +0 -360
  23. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/vibe-agent-toolkit/resources/orchestration.md +0 -859
  24. package/dist/.claude/plugins/marketplaces/vat-skills/plugins/vibe-agent-toolkit/skills/vibe-agent-toolkit/resources/rag-usage-guide.md +0 -770
  25. package/dist/skills/debugging/resources/CLAUDE.md +0 -539
  26. package/dist/skills/debugging/resources/debug-and-test-vat-fixes.md +0 -111
  27. package/dist/skills/debugging/resources/writing-tests.md +0 -577
  28. package/dist/skills/vibe-agent-toolkit/resources/adding-runtime-adapters.md +0 -628
  29. package/dist/skills/vibe-agent-toolkit/resources/agent-authoring.md +0 -905
  30. package/dist/skills/vibe-agent-toolkit/resources/compiling-markdown-to-typescript.md +0 -501
  31. package/dist/skills/vibe-agent-toolkit/resources/getting-started.md +0 -360
  32. package/dist/skills/vibe-agent-toolkit/resources/orchestration.md +0 -859
  33. package/dist/skills/vibe-agent-toolkit/resources/rag-usage-guide.md +0 -770
@@ -1,501 +0,0 @@
1
- ---
2
- title: Compiling Markdown to TypeScript
3
- description: Overview of markdown-to-TypeScript compilation, benefits, and workflows
4
- category: guide
5
- tags: [resource-compiler, typescript, markdown, overview]
6
- audience: beginner
7
- ---
8
-
9
- # Compiling Markdown to TypeScript
10
-
11
- Transform markdown files into TypeScript modules with full type safety and IDE support.
12
-
13
- ---
14
-
15
- ## What This Guide Covers
16
-
17
- - What markdown-to-TypeScript compilation is
18
- - Why you would use it
19
- - How the compilation process works
20
- - Complete workflow overview
21
- - When to use compiled resources vs alternatives
22
-
23
- ---
24
-
25
- ## What is Resource Compilation?
26
-
27
- The `@vibe-agent-toolkit/resource-compiler` transforms markdown files into TypeScript modules that can be imported directly in your code with full IDE support.
28
-
29
- ### Input: Markdown File
30
-
31
- ```markdown
32
- <!-- prompts/system.md -->
33
- ---
34
- title: System Prompts
35
- version: 1.0
36
- ---
37
-
38
- # System Prompts
39
-
40
- ## Technical Assistant
41
-
42
- You are a technical assistant helping engineers solve problems.
43
-
44
- ## Code Reviewer
45
-
46
- You are reviewing code for quality and maintainability.
47
- ```
48
-
49
- ### Output: TypeScript Module
50
-
51
- ```typescript
52
- // Generated: prompts/system.js + system.d.ts
53
- export const meta = {
54
- title: "System Prompts",
55
- version: 1.0
56
- };
57
-
58
- export const text = "# System Prompts\n\n## Technical Assistant\n...";
59
-
60
- export const fragments = {
61
- technicalAssistant: {
62
- header: "## Technical Assistant",
63
- body: "You are a technical assistant...",
64
- text: "## Technical Assistant\n\nYou are..."
65
- },
66
- codeReviewer: {
67
- header: "## Code Reviewer",
68
- body: "You are reviewing code...",
69
- text: "## Code Reviewer\n\nYou are..."
70
- }
71
- };
72
-
73
- export type FragmentName = "technicalAssistant" | "codeReviewer";
74
- ```
75
-
76
- ### Usage: Type-Safe Import
77
-
78
- ```typescript
79
- import * as Prompts from './prompts/system.js';
80
-
81
- // Full IDE support!
82
- console.log(Prompts.meta.title); // "System Prompts"
83
- console.log(Prompts.fragments.technicalAssistant.text); // Full fragment
84
- console.log(Prompts.fragments.codeReviewer.body); // Body only
85
- ```
86
-
87
- ---
88
-
89
- ## Why Use Resource Compilation?
90
-
91
- ### 1. Type Safety
92
-
93
- **Without compilation:**
94
- ```typescript
95
- // ❌ Runtime errors, no autocomplete
96
- const prompt = fs.readFileSync('./prompt.md', 'utf-8');
97
- const sections = prompt.split('##'); // Fragile parsing
98
- ```
99
-
100
- **With compilation:**
101
- ```typescript
102
- // ✅ Full type safety and IDE support
103
- import * as Prompts from './prompts/system.js';
104
- const prompt = Prompts.fragments.technicalAssistant.text; // Autocomplete!
105
- ```
106
-
107
- ### 2. Structured Access
108
-
109
- **Without compilation:**
110
- ```typescript
111
- // ❌ Manual parsing, error-prone
112
- const content = readFileSync('doc.md', 'utf-8');
113
- const sections = content.split(/^## /m);
114
- const intro = sections.find(s => s.startsWith('Introduction'));
115
- ```
116
-
117
- **With compilation:**
118
- ```typescript
119
- // ✅ Direct property access
120
- import * as Docs from './docs/guide.js';
121
- const intro = Docs.fragments.introduction.text;
122
- ```
123
-
124
- ### 3. Frontmatter as Typed Objects
125
-
126
- **Without compilation:**
127
- ```typescript
128
- // ❌ String parsing with type issues
129
- const parsed = matter(readFileSync('doc.md', 'utf-8'));
130
- const version = parsed.data.version as number; // Manual typing
131
- ```
132
-
133
- **With compilation:**
134
- ```typescript
135
- // ✅ Typed metadata
136
- import * as Docs from './docs/guide.js';
137
- const version: number = Docs.meta.version; // Type-safe!
138
- ```
139
-
140
- ### 4. Version Control & Distribution
141
-
142
- **Without compilation:**
143
- - Copy markdown files manually
144
- - Risk inconsistent versions
145
- - No dependency management
146
-
147
- **With compilation:**
148
- ```bash
149
- # ✅ Use npm for versioning and distribution
150
- npm install @acme/prompts@^2.1.0
151
- ```
152
-
153
- ---
154
-
155
- ## How It Works
156
-
157
- ### Compilation Process
158
-
159
- ```
160
- ┌────────────────────┐
161
- │ Source Markdown │
162
- │ (with frontmatter) │
163
- └──────┬─────────────┘
164
-
165
- │ Parse
166
-
167
- ┌────────────────────┐
168
- │ Abstract Syntax │
169
- │ Tree (AST) │
170
- └──────┬─────────────┘
171
-
172
- │ Extract
173
-
174
- ┌────────────────────┐
175
- │ • Frontmatter │
176
- │ • H2 Fragments │
177
- │ • Full Text │
178
- └──────┬─────────────┘
179
-
180
- │ Generate
181
-
182
- ┌────────────────────┐
183
- │ • JavaScript (ES6) │
184
- │ • TypeScript .d.ts │
185
- └────────────────────┘
186
- ```
187
-
188
- ### Fragment Extraction
189
-
190
- The compiler automatically extracts H2 sections as fragments:
191
-
192
- ```markdown
193
- ## Introduction
194
- This is the intro.
195
-
196
- ## Setup
197
- This is the setup section.
198
- ```
199
-
200
- Becomes:
201
-
202
- ```typescript
203
- export const fragments = {
204
- introduction: {
205
- header: "## Introduction",
206
- body: "This is the intro.",
207
- text: "## Introduction\n\nThis is the intro."
208
- },
209
- setup: {
210
- header: "## Setup",
211
- body: "This is the setup section.",
212
- text: "## Setup\n\nThis is the setup section."
213
- }
214
- };
215
- ```
216
-
217
- ### Slug Generation
218
-
219
- Fragment names are slugified from H2 headings:
220
-
221
- | Heading | Fragment Name |
222
- |---------|---------------|
223
- | `## Technical Assistant` | `technicalAssistant` |
224
- | `## API Reference` | `apiReference` |
225
- | `## Getting Started` | `gettingStarted` |
226
- | `## OAuth 2.0 Flow` | `oauth20Flow` |
227
-
228
- ---
229
-
230
- ## Complete Workflow
231
-
232
- ### Local Development Workflow
233
-
234
- ```
235
- ┌─────────────────────────────────────────────┐
236
- │ 1. Write Markdown │
237
- │ resources/prompts/system.md │
238
- └──────────────┬──────────────────────────────┘
239
-
240
- │ vat-compile-resources compile
241
-
242
- ┌─────────────────────────────────────────────┐
243
- │ 2. Generated TypeScript │
244
- │ generated/resources/prompts/system.js │
245
- │ generated/resources/prompts/system.d.ts │
246
- └──────────────┬──────────────────────────────┘
247
-
248
- │ import in code
249
-
250
- ┌─────────────────────────────────────────────┐
251
- │ 3. Use in Application │
252
- │ src/agent.ts │
253
- │ import * as P from '../generated/...' │
254
- └─────────────────────────────────────────────┘
255
- ```
256
-
257
- ### Package Distribution Workflow
258
-
259
- ```
260
- ┌────────────────────────────────────────────────┐
261
- │ ProjectX: Create Package │
262
- │ │
263
- │ 1. Write markdown in resources/ │
264
- │ 2. Compile → generated/ │
265
- │ 3. Build TypeScript → dist/ │
266
- │ 4. Copy generated/ → dist/generated/ │
267
- │ 5. Copy resources/ → dist/resources/ │
268
- │ 6. npm publish │
269
- └────────────┬───────────────────────────────────┘
270
-
271
- │ npm install @acme/knowledge-base
272
-
273
- ┌────────────────────────────────────────────────┐
274
- │ ProjectY: Consume Package │
275
- │ │
276
- │ 1. npm install @acme/knowledge-base │
277
- │ 2. import * as KB from '@acme/kb/generated/...'│
278
- │ 3. Use KB.fragments.* in code │
279
- │ 4. Or use original markdown for RAG/custom │
280
- └────────────────────────────────────────────────┘
281
- ```
282
-
283
- ---
284
-
285
- ## When to Use Compiled Resources
286
-
287
- ### ✅ Great For
288
-
289
- **AI Agent Prompts**
290
- - Store prompts in version-controlled markdown
291
- - Type-safe access to prompt fragments
292
- - Dynamic composition at runtime
293
-
294
- **Knowledge Bases for RAG**
295
- - Package documentation as npm modules
296
- - Support both compiled and custom chunking
297
- - Version control your knowledge
298
-
299
- **Template Systems**
300
- - Multi-language content (i18n)
301
- - Dynamic email/notification generation
302
- - Type-safe template access
303
-
304
- **Shared Documentation**
305
- - Distribute docs across projects
306
- - Consistent content with versioning
307
- - Type-safe references
308
-
309
- ### ❌ Not Ideal For
310
-
311
- **Static Site Generation**
312
- - Use SSG tools like Docusaurus, VitePress
313
- - Compiled resources add unnecessary build complexity
314
-
315
- **Simple File Reading**
316
- - If you only need to read one markdown file once
317
- - Direct `fs.readFile()` is simpler
318
-
319
- **Highly Dynamic Content**
320
- - Content changes frequently at runtime
321
- - Database or CMS is better suited
322
-
323
- **Binary/Media Assets**
324
- - Images, videos, audio files
325
- - Use standard asset bundling instead
326
-
327
- ---
328
-
329
- ## Quick Example
330
-
331
- ### 1. Install
332
-
333
- ```bash
334
- npm install -D @vibe-agent-toolkit/resource-compiler
335
- ```
336
-
337
- ### 2. Create Markdown
338
-
339
- ```markdown
340
- <!-- resources/prompts.md -->
341
- ---
342
- title: AI Prompts
343
- version: 1.0
344
- ---
345
-
346
- # AI Prompts
347
-
348
- ## Helper
349
-
350
- You are a friendly AI assistant.
351
-
352
- ## Expert
353
-
354
- You are a technical expert.
355
- ```
356
-
357
- ### 3. Compile
358
-
359
- ```bash
360
- npx vat-compile-resources compile resources/ generated/
361
- ```
362
-
363
- ### 4. Import and Use
364
-
365
- ```typescript
366
- import * as Prompts from './generated/prompts.js';
367
-
368
- console.log(Prompts.meta.title); // "AI Prompts"
369
- console.log(Prompts.fragments.helper.text); // Full helper section
370
- console.log(Prompts.fragments.expert.body); // Expert prompt body
371
-
372
- // Type-safe fragment names
373
- const names: Array<keyof typeof Prompts.fragments> = ['helper', 'expert'];
374
- ```
375
-
376
- ---
377
-
378
- ## Compilation Options
379
-
380
- ### CLI Commands
381
-
382
- ```bash
383
- # Compile all markdown to JavaScript + TypeScript
384
- npx vat-compile-resources compile resources/ generated/
385
-
386
- # Generate type declarations only (for TypeScript transformer)
387
- npx vat-compile-resources generate-types resources/
388
-
389
- # Watch mode (auto-recompile on changes)
390
- npx vat-compile-resources compile resources/ generated/ --watch
391
-
392
- # Verbose output
393
- npx vat-compile-resources compile resources/ generated/ --verbose
394
-
395
- # Custom glob pattern
396
- npx vat-compile-resources compile src/ dist/ --pattern "docs/**/*.md"
397
- ```
398
-
399
- ### Programmatic API
400
-
401
- ```typescript
402
- import { compileMarkdownResources } from '@vibe-agent-toolkit/resource-compiler/compiler';
403
-
404
- const results = await compileMarkdownResources({
405
- inputDir: 'resources',
406
- outputDir: 'generated',
407
- pattern: '**/*.md',
408
- verbose: true,
409
- });
410
-
411
- results.forEach(result => {
412
- console.log(`✓ Compiled ${result.sourcePath} → ${result.jsPath}`);
413
- });
414
- ```
415
-
416
- ---
417
-
418
- ## Two Compilation Modes
419
-
420
- ### 1. Pre-Compilation (Recommended)
421
-
422
- Compile markdown to JavaScript during build:
423
-
424
- ```json
425
- {
426
- "scripts": {
427
- "generate": "vat-compile-resources compile resources/ generated/",
428
- "build": "npm run generate && tsc"
429
- }
430
- }
431
- ```
432
-
433
- **Pros:**
434
- - Fast runtime (no compilation overhead)
435
- - Works with any bundler
436
- - Easy to debug (inspect generated .js files)
437
-
438
- **Cons:**
439
- - Extra build step
440
- - Generated files need to be copied to dist
441
-
442
- ### 2. TypeScript Transformer (Advanced)
443
-
444
- Transform `.md` imports during TypeScript compilation:
445
-
446
- ```typescript
447
- // tsconfig.json
448
- {
449
- "compilerOptions": {
450
- "plugins": [{
451
- "transform": "@vibe-agent-toolkit/resource-compiler/transformer"
452
- }]
453
- }
454
- }
455
-
456
- // Import markdown directly
457
- import * as Doc from './doc.md';
458
- ```
459
-
460
- **Pros:**
461
- - No build step for resources
462
- - Direct markdown imports
463
-
464
- **Cons:**
465
- - Requires ts-patch
466
- - Slower TypeScript compilation
467
- - More complex setup
468
-
469
- **Recommendation:** Use pre-compilation for most projects.
470
-
471
- ---
472
-
473
- ## Next Steps
474
-
475
- ### For Package Publishers
476
- Read [Publishing TypeScript Resource Packages]() to learn how to:
477
- - Set up package structure
478
- - Configure build scripts
479
- - Publish to npm
480
- - Include both compiled and original markdown
481
-
482
- ### For Package Consumers
483
- Read [Consuming TypeScript Resources]() to learn how to:
484
- - Install and import packages
485
- - Use type-safe compiled resources
486
- - Access original markdown for flexibility
487
- - Integrate with your project
488
-
489
- ### For Specific Use Cases
490
- - **Building AI agents?** → [Building Agent Prompt Libraries]()
491
- - **Creating RAG systems?** → [Creating RAG Knowledge Bases]()
492
- - **Building templates?** → [Template System Patterns]()
493
-
494
- ---
495
-
496
- ## See Also
497
-
498
- - [Resource Compiler README]() - Package documentation
499
- - [Publishing Packages]() - Create and publish resource packages
500
- - [Consuming Packages]() - Use published packages
501
- - [Guide Index]() - All resource compiler guides