maximus Posted 14 hours ago Posted 14 hours ago Export your ProcessWire site structure as comprehensive, AI-optimized documentation for ChatGPT, Claude, Copilot, and other AI coding assistants. What It Does Context automatically generates complete documentation of your ProcessWire site in formats specifically optimized for working with AI: π Site Structure Complete page hierarchy exported as JSON, TOON, and ASCII tree Shows all relationships, templates, URLs, and metadata Smart collapsing for large page lists π Templates & Fields All template definitions with complete field configurations Field types, options, requirements, default values Special handling for Repeater, Matrix, Table fields π¦ Content Samples Real page examples exported for each template Shows actual data formats and field usage Helps AI understand your content patterns πΎ Code Snippets Customized selector patterns for your site type Helper functions and utility code API implementation examples π€ AI Prompts Ready-to-use project context file Template creation prompts Debugging assistance prompts Dual Format Export (The Game Changer!) Context exports in two formats simultaneously: JSON Format Standard format for development tools, APIs, and compatibility TOON Format (AI-Optimized) β¨ Token-Oriented Object Notation designed specifically for AI prompts: 30-60% fewer tokens than JSON Significantly reduces API costs Same data, more compact representation No external dependencies - pure PHP Real Savings Example For a typical ProcessWire site with 50 templates: structure.json (15,000 tokens) β structure.toon (8,500 tokens) = 43% savings templates.json (8,000 tokens) β templates.toon (4,000 tokens) = 50% savings samples/*.json (12,000 tokens) β samples/*.toon (6,500 tokens) = 46% savings Cost Impact (Claude Sonnet pricing): JSON export: $0.105 per AI interaction TOON export: $0.057 per AI interaction Save ~$5/month if you use AI assistants 100 times/month Installation cd /site/modules/ git clone https://github.com/mxmsmnv/Context.git Then in admin: Modules β Refresh β Install Or download from ProcessWire Modules Directory Quick Start Setup β Modules β Context β Configure Choose your site type (Blog, E-commerce, Business, Catalog, Generic) β Enable "Export TOON Format" (recommended for AI work!) Enable optional features: β Export Content Samples β Create Code Snippets β Create AI Prompts Click "Export Context for AI" Files appear in /site/assets/context/ Generated Files /site/assets/context/ βββ README.md # Complete documentation βββ structure.json / .toon # Page hierarchy βββ structure.txt # ASCII tree βββ templates.json / .toon # All templates & fields βββ config.json / .toon # Site configuration βββ modules.json / .toon # Installed modules βββ classes.json / .toon # Custom Page classes β βββ samples/ # Real content examples β βββ product-samples.json β βββ product-samples.toon # 46% smaller! β βββ snippets/ # Code patterns β βββ selectors.php # Customized for your site type β βββ helpers.php # Utility functions β βββ api-examples.php # REST API examples β βββ prompts/ # AI instructions βββ project-context.md # Complete project overview Using with AI Assistants Upload TOON files to save tokens and costs: π structure.toon π templates.toon π prompts/project-context.md Then ask your AI assistant: "Help me create a blog post template with title, body, author, categories, and featured image. Follow the existing patterns from templates.toon" The AI has complete context of your site and can generate code that follows your exact patterns! Site Type Customization Code snippets automatically adapt to your site type: Blog / News / Magazine Post listings, author archives, category filtering Recent posts, popular content, related articles E-commerce / Online Store Product listings, cart logic, order processing Inventory management, payment integration Business / Portfolio / Agency Service pages, team members, case studies Testimonials, project galleries Catalog / Directory / Listings Brand hierarchies, category filters Advanced search, sorting, pagination Generic / Mixed Content General purpose patterns for any site type Features Overview Always Exported (Core) β Complete page tree structure β All templates with field definitions β Site configuration and settings β Installed modules list β Custom Page classes β README with complete documentation Optional (Configurable) βοΈ Content samples (1-10 per template) βοΈ API JSON schemas βοΈ URL routing structure βοΈ Performance metrics βοΈ Code snippets library βοΈ AI prompt templates βοΈ IDE integration files (.cursorrules, .claudecode.json) Advanced Settings Auto-update on template/field changes Maximum tree depth (3-20 levels) JSON children limit (prevent huge files) Compact mode for large lists Custom AI instructions Why TOON Format? TOON is specifically designed for AI prompts. Here's the difference: JSON (verbose): { "products": [ {"id": 1, "title": "Dark Chocolate", "price": 12.99}, {"id": 2, "title": "Milk Chocolate", "price": 9.99} ] } TOON (compact): products[2]{id,title,price}: 1,Dark Chocolate,12.99 2,Milk Chocolate,9.99 Same data, 50% fewer tokens! Use Cases π€ AI-Assisted Development Upload your site context to Claude/ChatGPT and get code that follows your exact patterns π Developer Onboarding New team members get complete site documentation instantly π Site Migration Export complete site structure for documentation or migration planning π Code Standards Maintain consistency across your team with AI that knows your patterns π° Cost Optimization Reduce AI API costs by 30-60% with TOON format Links GitHub: https://github.com/mxmsmnv/Context TOON Format Spec: https://toonformat.dev Screenshots Spoiler Example Workflow Export your site Click one button, get complete documentation in both JSON and TOON formats Upload to AI Upload .toon files to Claude/ChatGPT for maximum efficiency Build features faster AI knows your exact site structure, templates, and patterns Save money Use 30-60% fewer tokens on every AI interaction Perfect for ProcessWire developers who use AI coding assistants! The TOON format support makes it significantly more cost-effective to work with Claude, ChatGPT, and similar tools. Questions? Suggestions? Let me know! π 1 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now