{
  "name": "Create Grammars with AI",
  "items": [
    {
      "id": "create-grammars-with-ai",
      "name": "Create Grammars with AI",
      "sections": {
        "Content": "\n\n# Create Grammars with AI\n\n**Transform public domain books and texts into interactive grammars using AI tools.**\n\nThis course shows you how to use Claude Code and NotebookLM to convert source material—books, PDFs, websites—into properly formatted grammar JSON files that work with recursive.eco.\n\n---\n\n## Basic Understanding\n\nThis section covers the concepts and tools you'll use. Read this first to understand the workflow before diving into the step-by-step process.\n\n### What You'll Learn\n\n- Understand the difference between AI models and AI products\n- Use NotebookLM to explore and understand source texts\n- Find public domain source material (Project Gutenberg, Wikimedia Commons)\n- Set up Claude Code with the grammar repository\n- Transform texts into grammar JSON in batches\n- Find and link images from Wikimedia Commons\n- Import your grammars into recursive.eco\n\n### Prerequisites\n\n- A GitHub account (free)\n- Access to Claude Code (claude.ai/code)\n- A Google account for NotebookLM (free)\n- Basic familiarity with GitHub (we'll walk through it)\n\n### Understanding AI Tools\n\nBefore we dive in, let's understand what we're working with.\n\n**What is an AI Model?**\n\nAn **AI model** is the underlying technology—a neural network trained on vast amounts of text and data. Think of it like an engine. Models include:\n\n- **Claude** (by Anthropic) - Powers Claude Code and claude.ai\n- **Gemini** (by Google) - Powers NotebookLM and other Google products\n- **GPT-4** (by OpenAI) - Powers ChatGPT\n\nThe model itself is just raw capability. It can understand language, reason about concepts, generate text, and follow instructions.\n\n**What is an AI Product?**\n\nAn **AI product** wraps a model in a specific interface designed for particular tasks. The same model can power very different products:\n\n| Product | Model | Best For |\n|---------|-------|----------|\n| **Claude Code** | Claude | Writing code, working with files, executing commands |\n| **NotebookLM** | Gemini | Understanding documents, research, audio summaries |\n| **ChatGPT** | GPT-4 | General conversation, creative writing |\n\nFor grammar creation, we use **two complementary products**:\n\n1. **NotebookLM** - To deeply understand your source texts\n2. **Claude Code** - To generate the grammar JSON files\n\n### Using NotebookLM for Source Understanding\n\n[NotebookLM](https://notebooklm.google.com/) is Google's research assistant. Its superpower is that it **only uses sources you provide**—no hallucination from general training data.\n\n**Why NotebookLM for Grammars?**\n\nWhen creating grammars from historical texts, you need to:\n- Understand the structure of the source (how many chapters? what categories?)\n- Extract key themes and concepts\n- Identify patterns across the text\n- Ask clarifying questions about ambiguous passages\n\nNotebookLM excels at all of this because it stays grounded in your actual sources.\n\n**Setting Up a NotebookLM Notebook:**\n\n1. Go to [notebooklm.google.com](https://notebooklm.google.com/)\n2. Click \"New Notebook\"\n3. Add your sources:\n   - **Upload PDFs** - Scanned books, academic papers\n   - **Paste text** - Copy from Project Gutenberg\n   - **Add URLs** - Web pages, online texts\n   - **Google Docs** - Your own notes or transcriptions\n\n**Example: Preparing an I Ching Grammar**\n\nSay you want to create an I Ching grammar from the Wilhelm-Baynes translation:\n\n1. Upload the PDF or paste the text into NotebookLM\n2. Ask: \"How is this text structured? What are the main sections for each hexagram?\"\n3. Ask: \"What consistent patterns appear across all 64 hexagrams?\"\n4. Ask: \"Summarize the key themes of hexagrams 1-8\"\n\nNotebookLM will analyze your specific source and give you grounded answers—not generic I Ching knowledge from its training.\n\n**NotebookLM Strengths:**\n\n| Strength | Use Case for Grammars |\n|----------|----------------------|\n| **Source-grounded** | Answers come from YOUR text, not general knowledge |\n| **Multi-source synthesis** | Combine multiple translations or commentaries |\n| **Audio Overview** | Generate podcast-style summaries to listen to while thinking |\n| **Citation tracking** | See exactly where each insight comes from |\n| **No hallucination** | Won't make up content that isn't in your sources |\n\n**Audio Overviews for Deep Understanding**\n\nOne unique NotebookLM feature: it can generate **audio summaries** of your sources as a conversation between two AI hosts. This is surprisingly useful for:\n\n- Getting a high-level overview before diving into details\n- Catching patterns you might miss when reading\n- \"Listening\" to your sources while doing other things\n\nTry it: After uploading your source, click \"Generate Audio Overview\" and let it create a 10-15 minute podcast about your text.\n\n**From NotebookLM to Claude Code**\n\nOnce you understand your source material through NotebookLM, you'll use Claude Code to generate the actual grammar files. The workflow:\n\n1. **NotebookLM**: Understand the structure, extract patterns, clarify ambiguities\n2. **Claude Code**: Generate JSON following the grammar format, find images, validate files\n\nNotebookLM helps you become an expert on your source. Claude Code helps you turn that expertise into working grammars.\n\n### Why Contribute to the Commons?\n\nWhen you contribute your grammars to the community repository:\n\n- **Your work benefits others** - Someone exploring tarot might discover your interpretation\n- **Others build on yours** - Grammars can be copied and extended\n- **The commons grows** - More perspectives on meaning-making systems\n- **You join a recursive public** - The people who use the infrastructure maintain and transform it\n\nThe goal isn't to create the \"definitive\" version of anything—it's to offer your perspective alongside others.\n\n### Tips for Better Results\n\n1. **Reference existing grammars** - Always point Claude to an example in the repo\n2. **Be specific about sections** - Tell Claude exactly what sections you want\n3. **Batch large sets** - 10-20 items per batch works well\n4. **Review between batches** - Catch formatting issues early\n5. **Use vetted image sources** - Wikimedia Commons, Met Museum, Art Institute of Chicago, Rawpixel (CC0 only), Cleveland Museum, Rijksmuseum — all render directly\n6. **Validate JSON** - Check for errors before importing\n\n### Example Prompts\n\n**Tarot Deck from Book:**\n\n```\nI have the text of \"The Pictorial Key to the Tarot\" by A.E. Waite.\nCreate a tarot grammar with all 78 cards.\n\nFor each card include:\n- id, name, sort_order\n- image_url from Wikimedia Commons (Rider-Waite deck)\n- sections: Interpretation, Reversed, Summary\n- keywords array\n\nStart with the Major Arcana (22 cards).\nFollow the format in schemas/tarot/rider-waite-recursive/grammar.json.\n```\n\n**I Ching from Chinese Source:**\n\n```\nHere is the original Chinese I Ching text.\nCreate a grammar with all 64 hexagrams.\n\nFor each hexagram include:\n- id, name, symbol (Unicode hexagram), sort_order\n- sections: Judgment, Image, Interpretation\n- lines property as an object: {\"1\": \"Line 1 text\", \"2\": \"Line 2 text\", ...}\n- metadata: number, chinese_name, pinyin, trigram_above, trigram_below\n\nImportant: Use the \"lines\" property for line readings, not individual\nsection keys. Journal reads changing lines from item.lines, not sections.\n\nWork in batches of 8 hexagrams at a time.\nFollow the format in schemas/iching/summary-ai.\n```\n\n**Astrology Interpretations:**\n\n```\nCreate an astrology grammar for planetary interpretations.\nInclude all 10 planets (Sun through Pluto), 12 signs, and\n6 major aspects (Conjunction, Opposition, Trine, Square, Sextile, Quincunx).\n\nFor each planet include:\n- id, name, symbol (Unicode), sort_order\n- category: \"planet\" (this controls how the astrology viewer groups items)\n- sections: Interpretation, Light, Shadow\n- keywords array\n\nFor signs: category: \"sign\"\nFor aspects: category: \"aspect\"\n\nFor Vedic (Jyotish) grammars, use Sanskrit names as \"name\"\nand add english_name to metadata for chart matching:\n  \"name\": \"Mangala\",\n  \"metadata\": { \"english_name\": \"Mars\" }\n\nFind appropriate astronomical images on Wikimedia Commons.\nFollow the format in schemas/astrology/L1-basic.json.\n```\n\n### Resources\n\n**AI Tools:**\n- [NotebookLM](https://notebooklm.google.com/) - Research assistant for understanding sources\n- [Claude Code](https://claude.ai/code) - Generate and validate grammar files\n\n**Source Material:**\n- [Project Gutenberg](https://www.gutenberg.org/) - Free ebooks\n- [Internet Archive](https://archive.org/) - Books, audio, video\n- [Sacred Texts](https://sacred-texts.com/) - Religious and esoteric texts\n\n**Public Domain Images (CC0, vetted for grammars):**\n- [Wikimedia Commons](https://commons.wikimedia.org/) - Millions of free images, historical tarot scans, symbols\n- [Rawpixel Public Domain](https://www.rawpixel.com/public-domain) - Vintage illustrations, museum-sourced art (CC0 only)\n- [Met Museum Open Access](https://www.metmuseum.org/art/collection/search) - 492,000+ CC0 images: Egyptian, Asian, medieval\n- [Art Institute of Chicago](https://www.artic.edu/collection) - 50,000+ CC0: prints, Japanese woodblocks, manuscripts\n- [Cleveland Museum of Art](https://www.clevelandart.org/art/collection/search) - 37,000+ CC0: Asian art, medieval, textiles\n- [Rijksmuseum](https://www.rijksmuseum.nl/en/search) - 700,000+ CC0: Dutch art, botanical, symbolic still life\n\nAll of these domains are supported by the recursive.eco image proxy. When prompting AI to find images, specify the source:\n```\nFind CC0 images from the Art Institute of Chicago for these cards.\nUse direct IIIF URLs from www.artic.edu.\n```\n\n**Utilities:**\n- [JSON Lint](https://jsonlint.com/) - Validate your JSON\n\n---\n\n## Learning by Doing\n\nThis section walks through the complete process step-by-step. Click to expand.\n\n### Step 1: Copy the Grammar Repository\n\nThe community grammar repository contains examples and the folder structure you'll use.\n\n1. Go to [github.com/PlayfulProcess/recursive.eco-schemas](https://github.com/PlayfulProcess/recursive.eco-schemas)\n2. Click the \"Fork\" button in the top right\n3. This creates your own copy at `github.com/YOUR-USERNAME/recursive.eco-schemas`\n\nNow you have your own copy where you can create grammars.\n\n### Step 2: Find Source Material\n\n**Project Gutenberg**\n\n[Project Gutenberg](https://www.gutenberg.org/) has over 70,000 free ebooks—perfect for creating grammars from classic texts.\n\nGreat sources for grammars:\n- I Ching translations (Wilhelm, Legge, Chinese originals)\n- Tarot interpretation books\n- Astrology texts\n- Philosophy and wisdom literature\n- Poetry collections\n\nExample: The Chinese I Ching text is available at Project Gutenberg and was used to create the `iching/chinese-classic` grammar.\n\n**Wikimedia Commons**\n\n[Wikimedia Commons](https://commons.wikimedia.org/) has millions of freely-licensed images, including:\n- Historical tarot card scans\n- Astrological symbols and charts\n- Public domain artwork\n- Manuscript illustrations\n\nClaude Code can search Wikimedia Commons and find image URLs that will work directly in your grammars.\n\nExample: The Rider-Waite tarot images in `tarot/rider-waite` all link to Wikimedia Commons URLs.\n\n### Step 3: Open in Claude Code\n\n1. Go to [claude.ai/code](https://claude.ai/code)\n2. Connect your GitHub account if prompted\n3. Open your forked repository: `YOUR-USERNAME/recursive.eco-schemas`\n\nClaude Code can now read all the example grammars and create new ones following the same format.\n\n### Step 4: Give Claude Your Source Material\n\nYou can provide source material in several ways:\n\n**Option A: Paste Text Directly**\n\nCopy text from Project Gutenberg or other sources and paste it into Claude Code:\n\n```\nHere is the text of the Tao Te Ching from Project Gutenberg:\n\n[paste text here]\n\nCreate a grammar JSON following the format in classics/tao-te-ching.\nEach chapter should be an item with sections for the verse and interpretation.\n```\n\n**Option B: Provide URLs**\n\nGive Claude URLs to fetch:\n\n```\nFetch the I Ching text from this Project Gutenberg URL:\nhttps://www.gutenberg.org/files/xxxxx/xxxxx-0.txt\n\nCreate an I Ching grammar with each hexagram as an item.\nFollow the format in iching/wilhelm-baynes.\n```\n\n**Option C: Upload Files**\n\nIf you have PDFs or documents, you can upload them to Claude Code and ask it to extract the content.\n\n### Step 5: Work in Batches\n\nFor large grammars (like a full tarot deck or all 64 hexagrams), working in batches is more reliable.\n\nExample prompt for batch processing:\n\n```\nCreate the first 8 hexagrams (1-8) for an I Ching grammar.\nUse the Chinese text from the source I provided.\nFollow this format:\n\n{\n  \"id\": \"hexagram-01\",\n  \"name\": \"乾 (Qián)\",\n  \"symbol\": \"䷀\",\n  \"sort_order\": 0,\n  \"category\": \"hexagram\",\n  \"sections\": {\n    \"Judgment\": \"The judgment text...\",\n    \"Image\": \"The image text...\",\n    \"Interpretation\": \"Overall meaning...\"\n  },\n  \"lines\": {\n    \"1\": \"Line 1 reading...\",\n    \"2\": \"Line 2 reading...\",\n    \"3\": \"Line 3 reading...\",\n    \"4\": \"Line 4 reading...\",\n    \"5\": \"Line 5 reading...\",\n    \"6\": \"Line 6 reading...\"\n  },\n  \"metadata\": {\n    \"number\": 1,\n    \"chinese_name\": \"乾\",\n    \"pinyin\": \"Qián\",\n    \"trigram_above\": \"heaven\",\n    \"trigram_below\": \"heaven\"\n  },\n  \"keywords\": [\"creative\", \"heaven\", \"strength\"]\n}\n\nI'll ask for hexagrams 9-16 next.\n```\n\nThen continue with:\n```\nNow create hexagrams 9-16 following the same format.\n```\n\nThis approach:\n- Gives Claude context from the first batch\n- Reduces errors from processing too much at once\n- Lets you review and adjust between batches\n\n### Step 6: Add Images from Public Domain Sources\n\nClaude Code can search public domain image sources and find URLs for your grammar items.\n\nExample prompt for Wikimedia Commons:\n\n```\nFor each of these tarot cards, find the Rider-Waite image on Wikimedia Commons\nand add the direct image URL to the item:\n\n- The Fool\n- The Magician\n- The High Priestess\n\nUse URLs in this format:\nhttps://upload.wikimedia.org/wikipedia/commons/...\n```\n\nExample prompt for museum collections:\n\n```\nFor each of these items, find a relevant CC0 image from the Met Museum\nOpen Access collection. Use direct URLs from images.metmuseum.org.\n```\n\n**Supported image domains:** Wikimedia Commons, Rawpixel (CC0), Met Museum, Art Institute of Chicago, Cleveland Museum of Art, Rijksmuseum. All are proxied by recursive.eco.\n\n**Important:** Use direct image URLs, not wiki/collection page URLs. Claude knows the difference.\n\n### Step 7: Wrap in Grammar Structure\n\nAfter generating all your items, ask Claude to wrap them in the full grammar structure:\n\n```\nWrap all the items we created into a complete grammar file.\nInclude _grammar_commons metadata with CC-BY-SA-4.0 license\nand my attribution. Set grammar_type to \"iching\".\nFollow the top-level structure in schemas/iching/summary-ai.\n```\n\nThe wrapper includes `_grammar_commons` (license and attribution), `name`, `description`, `grammar_type`, and the `items` array. Without it, the grammar won't import correctly.\n\n### Step 8: Validate Your Grammar\n\nBefore importing, check that your JSON is valid:\n\n1. Ask Claude: \"Validate this grammar JSON and check for any errors\"\n2. Or paste into [jsonlint.com](https://jsonlint.com/)\n\nCommon issues:\n- Missing commas between items\n- Unclosed quotes or brackets\n- Duplicate IDs\n\n**For I Ching grammars, also check:**\n- Line data is in the `lines` property (not just section keys)\n- `metadata` includes `trigram_above` and `trigram_below`\n- All 64 hexagrams present\n\n**For Tarot grammars, also check:**\n- `Interpretation` section exists (Journal needs this key)\n- `image_url` uses direct `upload.wikimedia.org` URLs, not wiki page URLs\n\n**For Astrology grammars, also check:**\n- `category` matches expected roles: `planet`, `sign`, `house`, or `aspect`\n- For Vedic grammars: include `english_name` in metadata to map to Western chart positions (e.g., `\"metadata\": { \"english_name\": \"Mars\" }` for Mangala)\n- Aspect items use `category: \"aspect\"` so the viewer shows grammar content in aspect details\n\n**Why does metadata matter?** You'll never type metadata into a form — it comes from AI generation and imports. But the viewers use it to power search filters (trigram pills for I Ching, arcana/suit filters for tarot) and Journal uses it for oracle features (changing lines, birth chart placements). Getting it right in the JSON means your grammar works everywhere.\n\n### Step 9: Test in the Viewer\n\nYou can test your grammar before officially publishing:\n\n1. Commit your grammar to your forked repo\n2. View it at:\n   ```\n   recursive.eco/pages/grammar-viewer.html?github=YOUR-USERNAME/recursive.eco-schemas/tarot/my-deck\n   ```\n\nIf something looks wrong, go back to Claude Code and fix it.\n\n### Step 10: Import to Recursive.eco\n\nOnce you're happy with your grammar:\n\n**Option A: Use Directly from GitHub**\n\nShare the viewer URL with others:\n```\nrecursive.eco/pages/grammar-viewer.html?github=YOUR-USERNAME/recursive.eco-schemas/path/to/grammar\n```\n\n**Option B: Import to Your Account**\n\n1. Go to [the Grammar Studio](https://flow.recursive.eco/create)\n2. Click \"New Grammar\"\n3. Use the Import feature with your GitHub URL\n4. Save as a draft or publish\n\n**Option C: Contribute to Community**\n\n1. Submit a pull request to `PlayfulProcess/recursive.eco-schemas`\n2. Your grammar becomes available to everyone\n3. Others can copy and build upon it\n\n---\n\n## Related Courses\n\nDepending on what you're building:\n\n- **[Learn Recursive.eco](/pages/courses/course-viewer.html?course=learn-recursive-eco)** - Complete guide to all tools, including the quickest way to start\n- **[Vibe Coding Wellness Tools](/pages/courses/course-viewer.html?course=vibe-coding-101)** - Build AI journaling tools and offer them to the Wellness altar\n- **[Short Movies DIY](/pages/courses/course-viewer.html?course=short-movies-diy)** - Create video sequences for Kids Stories altar\n- **[Magic Stories for Kids](/pages/courses/course-viewer.html?course=magic-stories-for-kids)** - Turn parenting wisdom into illustrated stories\n\nEach of these courses ends with something you can offer back to the community.\n\n---\n\n## What's Next?\n\nOnce you've created a grammar:\n\n1. **Use it in Journal** - Cast readings with your custom interpretations\n2. **Share via Library** - Share your grammar with the community\n3. **Iterate** - Edit and improve based on use\n4. **Combine** - Create grammars that reference multiple traditions\n\nThe loop continues.\n"
      },
      "sort_order": 0
    }
  ],
  "default_view": "course",
  "grammar_type": "course",
  "_recursive_eco_url": "https://flow.recursive.eco/g/fe2c3b4e-06f8-4f36-9035-eca044179e90?view=reading",
  "_recursive_eco_edit_url": "https://flow.recursive.eco/create/dashboard/unified/new?id=fe2c3b4e-06f8-4f36-9035-eca044179e90"
}
