| name | improve-tbta |
| description | Systematically work through TBTA features using a 10-phase workflow with proper task isolation and context management. Use when user wants to improve TBTA features, work on TBTA, or continue TBTA feature work. |
TBTA Feature Workflow
Overview
This skill guides systematic work through TBTA (The Bible Translator's Assistant) features using a structured 10-phase approach. Each phase is executed independently to prevent context pollution, with progress tracked in a status file.
When to Use
Use this skill when user says:
- "improve tbta" or "improve tbta features"
- "work on tbta" or "work on the next tbta feature"
- "continue tbta feature work" or "next tbta task"
Core Workflow: 10-Phase Approach
Each phase is a separate task to prevent context pollution. Agent completes one phase, updates status, and stops. User says "improve tbta" to continue.
Phase 1: Feature Selection & Setup
Goal: Identify next feature to work on, load context Outputs: Feature selected, initial context loaded Time: 15 minutes
Phase 2: Training Set Design
Goal: Design 15-20 training verses covering all values equally
Outputs: training/TRAINING-SET.md with equal value coverage
Time: 1-2 hours
Phase 3: Training Analysis (TBTA Access Allowed)
Goal: Access TBTA for training set, discover patterns, document learnings
Outputs: training/TBTA-ANNOTATIONS.md, training/PATTERNS-LEARNED.md
Time: 2-3 hours
Phase 4: Algorithm Development
Goal: Create algorithm v1.0 based on training patterns, LOCK with git commit
Outputs: training/ALGORITHM-v1.md (locked with commit SHA)
Time: 1-2 hours
Phase 5: Test Set Design (Equal Value Coverage)
Goal: Design adversarial (hard) and random (typical) test sets with equal examples per value
Outputs: adversarial-test/TEST-SET.md, random-test/TEST-SET.md
Time: 2-3 hours
Phase 6: Make Predictions (NO TBTA ACCESS)
Goal: Apply algorithm v1.0 to both test sets WITHOUT checking TBTA, LOCK predictions
Outputs: adversarial-test/PREDICTIONS-locked.md, random-test/PREDICTIONS-locked.md (commit SHAs)
Time: 2-3 hours
Phase 7: Validation & Accuracy Calculation
Goal: Check TBTA for test sets, calculate accuracy overall and per-value
Outputs: adversarial-test/RESULTS.md, random-test/RESULTS.md with per-value breakdown
Time: 1-2 hours
Phase 8: Error Analysis & Algorithm Refinement
Goal: Exhaustive 6-step debugging for every error, update algorithm v2.0
Outputs: ERROR-ANALYSIS.md, ALGORITHM-v2.md
Time: 3-5 hours
Phase 9: Documentation & Cross-Feature Learning
Goal: Update feature README, contribute learnings to CROSS-FEATURE-LEARNINGS.md Outputs: Complete feature documentation Time: 1-2 hours
Phase 10: Peer Review & Finalization
Goal: Have another agent review work, integrate feedback, mark complete Outputs: Feature marked as complete in status file Time: 1-2 hours
Status Tracking
Status file: /plan/tbta-rebuild-with-llm/features/FEATURE-WORKFLOW-STATUS.yaml
This file tracks:
- Current phase for each feature
- Completed phases
- Feature status (not_started | in_progress | complete | blocked)
- Next action
- Accuracy targets and results
Phase Execution Details
Phase 1: Feature Selection & Setup
Agent Instructions:
Read status file:
/plan/tbta-rebuild-with-llm/features/FEATURE-WORKFLOW-STATUS.yamlIdentify next feature:
- Find features with
status: in_progress→ continue current phase - If none, find first
status: not_started→ start Phase 1 - Priority order (if choosing new):
- number-systems (if not complete)
- degree (if not complete)
- person-systems
- participant-tracking
- discourse-genre
- proximity
- polarity
- verb-tam
- time-granularity
- surface-realization
- honorifics-register
- illocutionary-force
- (other features as added)
- Find features with
Load core context (these docs ALWAYS):
/plan/tbta-rebuild-with-llm/README.md(overview)/plan/tbta-rebuild-with-llm/METHODOLOGY-ADVERSARIAL.md(testing protocol)/plan/tbta-rebuild-with-llm/features/CROSS-FEATURE-LEARNINGS.md(universal patterns)
Load feature-specific context:
/plan/tbta-rebuild-with-llm/features/{feature}/README.md/plan/tbta-rebuild-with-llm/features/{feature}/METHODOLOGY-STATUS.md(if exists)
Execute current phase (detailed instructions below for each phase)
Update status file after completing phase
STOP - Do NOT continue to next phase. Wait for user to say "improve tbta"
Phase 2: Training Set Design
Goal: Create balanced training set with equal value coverage
Steps:
- Read feature README to identify all possible values
- Calculate:
training_verses = 2 × number_of_values(minimum 12, maximum 30) - For each value, select 2 example verses:
- Mix of Greek (NT) and Hebrew (OT)
- Mix of clear and moderately ambiguous cases
- Diverse books (don't over-sample from one book)
- Create
training/TRAINING-SET.mdwith template - Commit:
git add training/TRAINING-SET.md && git commit -m "feat(tbta/{feature}): design balanced training set ({N} values × 2 = {total} verses)" - Update status file:
current_phase: 3
Phase 3: Training Analysis
Goal: Access TBTA, discover patterns
Steps:
- Access TBTA data for training verses (method TBD - may need user assistance)
- Create
training/TBTA-ANNOTATIONS.md - Analyze patterns, create
training/PATTERNS-LEARNED.md - Commit both files
- Update status:
current_phase: 4
Phase 4: Algorithm Development
Goal: Formalize decision rules into algorithm v1.0
Steps:
- Based on patterns, create
training/ALGORITHM-v1.md - Commit:
git add training/ALGORITHM-v1.md && git commit -m "feat(tbta/{feature}): lock algorithm v1.0 based on training patterns" - Record commit SHA in algorithm file
- Update status:
current_phase: 5
Phase 5: Test Set Design
Goal: Design adversarial and random test sets with equal value coverage
Steps:
Adversarial Test Set (
adversarial-test/TEST-SET.md):- 2 examples per value (same as training)
- Hard cases: morphology-semantics conflicts, boundary ambiguities, rare values
- NO overlap with training set
Random Test Set (
random-test/TEST-SET.md):- 2 examples per value (matches adversarial structure)
- Clearer cases: morphology aligns with semantics
- NO overlap with training or adversarial sets
Commit both:
git add adversarial-test/TEST-SET.md random-test/TEST-SET.md && git commit -m "feat(tbta/{feature}): design balanced test sets with equal value coverage"Update status:
current_phase: 6
Phase 6: Make Predictions
Goal: Apply algorithm v1.0 WITHOUT checking TBTA, lock predictions
CRITICAL: Do NOT access TBTA data for test verses!
Steps:
- For adversarial test set, create
adversarial-test/PREDICTIONS-locked.md - For random test set, create
random-test/PREDICTIONS-locked.md - Commit:
git add */PREDICTIONS-locked.md && git commit -m "feat(tbta/{feature}): lock predictions for both test sets (NO TBTA CHECKED)" - Record commit SHA in both prediction files
- Update status:
current_phase: 7
Phase 7: Validation
Goal: NOW check TBTA, calculate accuracy
Steps:
- Access TBTA data for adversarial test verses
- Create
adversarial-test/RESULTS.mdwith overall and per-value accuracy - Repeat for random test set:
random-test/RESULTS.md - Calculate gap:
random_accuracy - adversarial_accuracy(expected: 15-25 points) - Commit results
- Update status:
current_phase: 8
Phase 8: Error Analysis & Refinement
Goal: Exhaustive debugging for EVERY error, update algorithm
Steps:
For each error, apply 6-step exhaustive debugging:
- Verify Data Accuracy
- Re-analyze Source Text
- Re-analyze Context
- Cross-Reference Sources (3+ translations, LXX/Vulgate)
- Test Hypotheses
- Final Determination (TBTA correct OR potential error)
Create
ERROR-ANALYSIS.mdwith all errors analyzedCreate
ALGORITHM-v2.mdwith updated rulesCommit both files
Update status:
current_phase: 9
Phase 9: Documentation & Cross-Feature Learning
Goal: Complete feature documentation, share learnings
Steps:
- Update feature README with summary, results, limitations
- Update
/plan/tbta-rebuild-with-llm/features/CROSS-FEATURE-LEARNINGS.md - Create
COMPLETION-SUMMARY.md - Commit all documentation
- Update status:
current_phase: 10
Phase 10: Peer Review & Finalization
Goal: Independent review, integrate feedback, mark complete
Steps:
- Launch peer review agent (separate Task)
- Address peer review feedback
- Update status file with
status: complete - Commit:
git commit -m "feat(tbta/{feature}): mark feature as complete after peer review" - STOP - Feature complete. Next invocation will start Phase 1 on next feature.
Context Management Strategy
To prevent context pollution:
Minimize doc loading:
- Core docs (3 files): Always load
- Feature-specific: Only current feature
- Training data: Only when needed (Phase 3)
- Test data: Only when needed (Phase 7)
One phase per session:
- Agent completes phase → updates status → STOPS
- User says "improve tbta" → new session, fresh context
Incremental file creation:
- Each phase creates 1-3 files
- Don't load all files at once
- Reference file paths, don't load content unnecessarily
Status file as single source of truth:
- Always check status file first
- Status file tells agent exactly what to do next
- No need to load all features to figure out next task
Error Handling
If agent gets stuck:
- Check status file for current phase
- Reload core docs only
- Re-read phase instructions
- If still stuck, user can manually advance: update status file to skip phase
If TBTA data unavailable:
- Document in phase notes
- Proceed with best effort (use existing documentation)
- Mark as "needs TBTA validation" in status
If test sets don't meet criteria:
- Document issues in phase notes
- Redesign (back to Phase 5)
- Update status:
current_phase: 5, notes: "Redesigning for equal coverage"
Quick Start Example
First invocation:
User: "improve tbta"
Agent:
1. Read FEATURE-WORKFLOW-STATUS.yaml
2. Find: number-systems, phase 6
3. Load: methodology docs + number-systems algorithm v1.0
4. Execute: Phase 6 (make predictions WITHOUT TBTA)
5. Create: PREDICTIONS-locked.md files
6. Commit + update status
7. Report: "Phase 6 complete for number-systems. Predictions locked. Ready for Phase 7 (validation)."
8. STOP
Second invocation:
User: "improve tbta"
Agent:
1. Read status: number-systems, phase 7
2. Load: methodology + test sets
3. Execute: Phase 7 (check TBTA, calculate accuracy)
4. Create: RESULTS.md files
5. Commit + update status
6. Report: "Phase 7 complete. Adversarial: X%, Random: Y%. Ready for Phase 8 (error analysis)."
7. STOP
Success Criteria
Per-phase completion:
- All required files created
- Files follow templates
- Equal value coverage maintained (Phases 2, 5)
- Git commits with clear messages
- Status file updated
- Agent stopped (didn't continue to next phase)
Per-feature completion:
- All 10 phases completed
- Accuracy targets met (adversarial 60-70%, random 80-90%, gap 15-25 points)
- Error analysis thorough (6 steps for each error)
- Documentation complete
- Peer reviewed
- Status marked as complete
Overall project completion:
- All 12+ features complete
- Cross-feature learnings documented
- Methodology refined based on learnings
- Ready for comprehensive validation (Phase 3 after Q1 2026)
Skill Status: Ready for activation Next action: User says "improve tbta" Expected: Agent loads status, identifies current phase, executes it, and STOPS