5db4b014a94a6b0769411ed6b8a381a2b0835504
Brings every tense guide and grammar note in the app up to teacher-
handout depth via parallel research subagents drafting against a
shared "thorough" checklist (TL;DR, usages, conjugation table, common
irregulars, mnemonic, top pitfalls, contrast with neighbour topic,
real-world dialogue example).
Tense guides — Conjuga/conjuga_data.json (tenseGuides[].body)
All 19 remaining guides rewritten. The 20th (subj_presente) was
enriched in the prior commit. Each body now ~4-5.5K chars (vs the
500-1500 chars of the pre-pass reference cards), covering:
- All five indicative tenses, both conditionals, both imperatives.
- Full subjunctive set including the archaic futuro / futuro
perfecto, framed honestly with "recognise, don't produce" guidance.
- Per-tense conjugation patterns and the top 5-15 irregular verbs.
- Tense-vs-tense contrasts (preterite↔imperfect, future↔ir-a,
-ra↔-se past subjunctive, etc.).
- Pitfalls that English speakers actually make.
Grammar notes — Conjuga/Conjuga/Models/GrammarNote.swift
All 36 notes audited and rewritten where the existing body was
missing one of: explicit mnemonic, contrast pair, pitfalls section,
or coverage of a key sub-topic. None copied verbatim — every note
got at least one of those slotted in. Notable additions:
- DOCTOR/PLACE, WEIRDO, ESCAPA, RID, PRODDS, BANGS, RRPIA mnemonics
where missing.
- commands-imperative: nosotros + vosotros forms were entirely
absent; both added with the -d/-os and present-subjunctive rules.
- relative-pronouns: el que/el cual distinction, cuyo, lo que/lo
cual, donde/adonde.
- se-constructions: all 6 uses including the le→se substitution.
- irregular-yo-verbs: impact on subjunctive and negative tú command.
- Plus 5-item pitfalls sections on every note that lacked one.
Tooling — Conjuga/Scripts/guide-enrichment/
- PLAN.md (prior commit) — the audit, checklist, and priority order
that drove this pass.
- apply_drafts.py (new) — reads drafts/out/*.md, swaps tense guides
into the JSON and grammar notes into the Swift source via regex on
the GrammarNote(...) declarations. Handles multi-block `#` comment
headers some agents emitted. drafts/in/ and drafts/out/ are
gitignored — regeneratable from current state.
DataLoader.swift — courseDataVersion 8 → 9 so existing installs re-
seed all guides on next launch.
Verification:
- `swift -frontend -parse` on GrammarNote.swift succeeds (exit 0).
- JSON validates (python3 json.load round-trip).
- Triple-quote count is even (72 = 36 pairs, matching 36 notes).
- Full xcodebuild verify deferred — local SDK install was disrupted
by an Xcode update; will retest as part of the next ad-hoc deploy.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Conjuga
A Spanish-learning iOS app that combines verb conjugation practice, a full textbook reader, an AI conversation partner, offline dictionary lookups, grammar exercises, and more. Runs entirely on-device where possible (Foundation Models, Speech framework, Vision OCR).
Features
Verb practice
- Six conjugation modes — flashcards, typing, multiple choice, handwriting (Apple Pencil / finger), sentence builder, and full-table (conjugate all persons at once)
- Focus modes — weak verbs (SM-2 spaced repetition), irregularity drills (spelling / stem / unique), common tenses
- 1,750 verbs across 5 levels (Basic → Expert) with 209 K pre-conjugated forms and 23 K irregular-span annotations
- 20 tenses — every indicative, subjunctive, conditional, and imperative tense, each with character-level irregular highlighting
- Verb list filters — search by level, by irregularity (Any / Spelling Change / Stem Change / Unique Irregular), or by reflexive only (curated 100-verb list); filters compose
- Practice pool filters (Settings) — multi-select per level, per tense, per irregular-type, plus a "reflexive verbs only" toggle. Practice pool = intersection of all four.
- Verb detail pages — conjugation table, six AI-generated example sentences (one per core tense), and reflexive infinitive + preposition hint for curated reflexive verbs
- Text-to-speech on any form
Content & study
- Textbook reader — 30 chapters of Complete Spanish Step-by-Step with 251 interactive exercises (keyboard + Apple Pencil), 931 OCR'd vocab tables rendered as Spanish→English grids (~3 100 paired cards extracted via bounding-box OCR)
- Course decks — weekly vocab decks with example sentences, week tests, and cumulative checkpoint exams
- Stem-change toggle on Week 4 flashcard decks (E-IE, E-I, O-UE, U-UE) showing inline present-tense conjugations
- Grammar guide — 20 tense guides with usage rules and examples + 36 grammar topic notes (ser/estar, por/para, preterite/imperfect, reflexives, subjunctive triggers, etc.), each with 100+ practice exercises
- Grammar exercises — interactive quizzes for 5 core topics (ser/estar, por/para, preterite/imperfect, subjunctive, personal a)
- Curated YouTube videos — 54 hand-picked videos attached to guide and grammar items (preference for The Language Tutor's numbered lessons + BaseLang). Each item offers three actions: Stream (opens YouTube app / Safari), Download (YouTubeKit extraction + AVFoundation mux for modern adaptive-stream videos), Play (full-screen AVPlayer from local MP4). Settings → Downloaded Videos lists all downloads with total size, per-item delete, and a 500 MB warning.
AI & speech
- Conversational practice — on-device AI chat partner (Apple Foundation Models) with 10 scenario types; chat bubbles have tappable words that open dictionary / on-demand AI lookup
- AI short stories — generated stories with tappable words and comprehension quizzes
- Listening practice — listen-and-type + pronunciation scoring via the Speech framework
- Pronunciation check — word-by-word match scoring
Vocabulary & tools
- Offline dictionary — reverse index of 175 K verb forms + 200 common words, cached to disk for instant lookups
- Vocab SRS review — spaced repetition over course vocabulary with Again / Hard / Good / Easy rating
- Cloze practice — fill-in-the-blank sentences with distractor generation
- Lyrics practice — search, translate, and read Spanish song lyrics; long-press any word for an instant definition + tense/person readout (for verbs)
Tracking & sync
- Progress — streaks, daily goals, accuracy stats, achievement badges, study-time tracking per day
- CloudKit sync — review progress, test results, saved stories, conversations, and textbook attempts sync across devices
- Widgets — combined dashboard + word-of-the-day, refreshed daily and on backgrounding
Architecture
- SwiftUI + SwiftData with a dual-store configuration:
- Local store (App Group
group.com.conjuga.app) — reference data + per-device artifacts: verbs, forms, irregular spans, tense guides, course decks, vocab cards, textbook chapters, and downloaded videos. Seeded from bundled JSON on first launch. Self-healing re-seeds trigger on version bumps or if rows are missing on disk. - Cloud store (CloudKit
iCloud.com.conjuga.app, private database) — user data: review cards, course reviews, user progress, test results, daily logs, saved songs, stories, conversations, textbook exercise attempts.
- Local store (App Group
- SharedModels Swift Package shared between the app and widget extension. Widget schema must include every local-store entity or SwiftData destructively migrates the shared store.
- Foundation Models for on-device AI generation (
@Generablestructs for typed output) — conversation partner, short stories, verb-detail example sentences. - Vision framework for OCR of textbook pages and vocabulary images.
- Speech framework for recognition and pronunciation scoring.
- YouTubeKit (SPM) for video stream URL extraction, paired with AVFoundation (
AVMutableComposition+AVAssetExportSessionpassthrough) to mux separate DASH video + audio tracks into a single MP4 when progressive streams aren't available. - Textbook extraction pipeline (
Conjuga/Scripts/textbook/) — XHTML and answer-key parsers, macOS Vision image OCR + PDF page OCR, bounding-box vocab pair extractor, NSSpellChecker-based validator, and language-aware auto-fixer. - Video curation tooling (
Conjuga/Scripts/generate_videos_markdown.py) — regeneratesConjuga/youtube_videos.mdwith per-video channel, upload date, duration, view count, and like count (pulled via yt-dlp).
Requirements
- iOS 26+ (Foundation Models, Liquid Glass, modern Swift concurrency)
- Xcode 26+
- Apple Intelligence-capable device for AI features (conversation partner, AI stories, verb-detail examples); other features degrade gracefully
Building
Open Conjuga/Conjuga.xcodeproj in Xcode and run on a simulator or device. Reference data seeds automatically on first launch. To regenerate textbook content, run Conjuga/Scripts/textbook/run_pipeline.sh locally — the generated textbook_data.json / textbook_vocab.json are committed so fresh clones build without the pipeline.
Description
Languages
Swift
86.1%
Python
11.9%
HTML
1.7%
Shell
0.3%