|
| 1 | +{ |
| 2 | + "project": { |
| 3 | + "name": "WebForAI", |
| 4 | + "description": "A library that converts HTML to Markdown with various loaders and extractors for AI consumption", |
| 5 | + "repository": "https://github.com/inaridiy/webforai", |
| 6 | + "homepage": "https://webforai.dev/" |
| 7 | + }, |
| 8 | + "structure": { |
| 9 | + "monorepo": true, |
| 10 | + "packageManager": "pnpm", |
| 11 | + "mainPackage": "packages/webforai", |
| 12 | + "directories": { |
| 13 | + "packages": { |
| 14 | + "description": "Contains the main WebForAI package", |
| 15 | + "patterns": ["packages/**"] |
| 16 | + }, |
| 17 | + "examples": { |
| 18 | + "description": "Example projects demonstrating WebForAI usage", |
| 19 | + "patterns": ["examples/**"] |
| 20 | + }, |
| 21 | + "site": { |
| 22 | + "description": "Documentation website", |
| 23 | + "patterns": ["site/**"] |
| 24 | + }, |
| 25 | + "apps": { |
| 26 | + "description": "Application implementations", |
| 27 | + "patterns": ["apps/**"] |
| 28 | + } |
| 29 | + } |
| 30 | + }, |
| 31 | + "capabilities": { |
| 32 | + "core": [ |
| 33 | + "HTML to Markdown conversion", |
| 34 | + "HTML to MDAST conversion", |
| 35 | + "MDAST to Markdown conversion", |
| 36 | + "Web content loading via various methods" |
| 37 | + ], |
| 38 | + "loaders": ["Playwright", "Puppeteer", "Cloudflare Puppeteer", "Fetch API"], |
| 39 | + "extractors": ["Content extraction presets", "Custom extraction pipelines"] |
| 40 | + }, |
| 41 | + "algorithms": { |
| 42 | + "htmlToMarkdown": { |
| 43 | + "description": "Main conversion pipeline that transforms HTML to Markdown", |
| 44 | + "flow": "HTML → HAST → MDAST → Markdown", |
| 45 | + "steps": [ |
| 46 | + "Parse HTML into HAST (HTML Abstract Syntax Tree)", |
| 47 | + "Apply content extractors to clean and focus on main content", |
| 48 | + "Transform HAST to MDAST (Markdown Abstract Syntax Tree)", |
| 49 | + "Convert MDAST to Markdown text with formatting options" |
| 50 | + ] |
| 51 | + }, |
| 52 | + "contentExtraction": { |
| 53 | + "description": "Intelligent algorithms to extract the main content from web pages", |
| 54 | + "implementations": [ |
| 55 | + { |
| 56 | + "name": "takumiExtractor", |
| 57 | + "description": "Advanced content extractor inspired by Mozilla Readability", |
| 58 | + "techniques": [ |
| 59 | + "Metadata filtering to remove scripts, styles, and other non-content elements", |
| 60 | + "Universal element filtering to remove navigation, asides, and hidden content", |
| 61 | + "Content selection using common article selectors", |
| 62 | + "Link density analysis to identify content-rich areas", |
| 63 | + "Language-specific content length thresholds" |
| 64 | + ] |
| 65 | + } |
| 66 | + ] |
| 67 | + }, |
| 68 | + "mdastHandlers": { |
| 69 | + "description": "Custom handlers for transforming specific HTML elements to Markdown", |
| 70 | + "handlers": [ |
| 71 | + "customAHandler: Enhanced link handling with text-only option", |
| 72 | + "customCodeHandler: Code block handling with language detection", |
| 73 | + "customDivHandler: Special div element processing", |
| 74 | + "customImgHandler: Image handling with hide option", |
| 75 | + "customTableHandler: Table processing with text-only option", |
| 76 | + "mathHandler: Mathematical notation conversion" |
| 77 | + ] |
| 78 | + }, |
| 79 | + "linkProcessing": { |
| 80 | + "description": "Utilities for handling and transforming links", |
| 81 | + "features": ["Relative to absolute URL conversion", "Base URL integration", "Link text extraction"] |
| 82 | + } |
| 83 | + }, |
| 84 | + "development": { |
| 85 | + "nodeVersion": ">=18.0.0", |
| 86 | + "commands": { |
| 87 | + "build": "pnpm run --r --filter \"./packages/**\" build", |
| 88 | + "test": "vitest", |
| 89 | + "format": "biome format .", |
| 90 | + "lint": "biome check ." |
| 91 | + }, |
| 92 | + "tools": ["TypeScript", "Biome", "Vitest", "Changesets"] |
| 93 | + }, |
| 94 | + "customModes": [ |
| 95 | + { |
| 96 | + "slug": "webforai-dev", |
| 97 | + "name": "WebForAI Developer", |
| 98 | + "roleDefinition": "You are Roo, a specialized developer for the WebForAI library. You understand HTML parsing, Markdown generation, and web content extraction techniques. You're familiar with the project's architecture including loaders, extractors, and MDAST/HAST transformations.", |
| 99 | + "groups": ["read", "edit", "browser", "command", "mcp"] |
| 100 | + }, |
| 101 | + { |
| 102 | + "slug": "webforai-docs", |
| 103 | + "name": "WebForAI Documentation", |
| 104 | + "roleDefinition": "You are Roo, a documentation specialist for the WebForAI library. You excel at creating clear, concise documentation with practical examples. You understand the library's capabilities and can explain complex concepts in an accessible way.", |
| 105 | + "groups": [ |
| 106 | + "read", |
| 107 | + ["edit", { "fileRegex": "\\.(md|mdx)$", "description": "Markdown and MDX files only" }], |
| 108 | + "browser", |
| 109 | + "command", |
| 110 | + "mcp" |
| 111 | + ] |
| 112 | + } |
| 113 | + ] |
| 114 | +} |
0 commit comments