Curriculum Test Generator – Architecture Diagrams

Curriculum Test Generator – Architecture Diagrams

Repository: github.com/strider73/contour_questionbook_creator


1. Main Orchestrator: curriculum-test-generator

Coordinates the entire test generation workflow, running 3 agents SEQUENTIALLY.

Flow: User Inputs (Workbook PDF + Test PDF, or Scenario B textbook scan) → 3 Sequential Agent Steps → Final Output

The orchestrator uses resume logic: before running a step, it checks whether that step’s output file already exists, and skips the step if so. This lets a failed or interrupted run be resumed without redoing completed work.

Sub-Agents Called (in order):

  • Step 1: curriculum-analyzer → curriculum_context.md
  • Step 2: test-contents-extractor → ExtractedQuestions.md + images/
  • Step 3: curriculum-aligned-question-generator → PDF + ANSWERS.md + new_images/

Note: Pattern-library extraction (question_format_patterns.md) is a file output produced along the way by curriculum-aligned-question-generator — it is not a separate orchestrated step.


2. curriculum-analyzer

Analyzes reference workbooks to extract curriculum context.

4-Step Workflow:

  1. Read the Workbook (PDF)
  2. Analyze Content Structure
  3. Document Curriculum Context
  4. Quality Verification

Output: curriculum_context.md with 8 sections (Topics, Formulas, Worked Examples, Difficulty Benchmarks, Solution Strategies, Common Patterns, Visual Diagram Patterns, Constraints)


3. test-contents-extractor

Extracts questions and diagrams from test PDF using DIAGRAM-FIRST approach.

6-Step Workflow:

  • Step 0: Setup folders
  • Step 1: Convert PDF to images
  • Step 2: DIAGRAM-FIRST analysis
  • Step 3: Vision-guided diagram extraction
  • Step 4: OCR text extraction
  • Final: Create ExtractedQuestions.md

Diagram Classification:

  • Type A (Input): Student needs to answer
  • Type B (Output): Student must create
  • Type C (Reference): Context only

Skills: contents-extractor (convert_pages.py, extract_diagram.py, extract_text.py)


4. curriculum-aligned-question-generator

Generates FRESH test questions based on testing aspects.

3 Priority Sources:

  1. ExtractedQuestions.md (testing aspects)
  2. curriculum_context.md (knowledge range)
  3. question-variation-types skill (fallback)

8-Step Workflow:

  1. Create folders
  2. Read inputs
  3. Process questions
  4. Generate NEW diagrams
  5. Build test
  6. Answer images
  7. ANSWERS.md
  8. Final PDF (this step also produces question_format_patterns.md as a file output — see note below)

Skills: diagram-generator, test-pdf-generator, question-variation-types


5. Pattern Library File Output (Not a Separate Step)

As part of curriculum-aligned-question-generator’s workflow, the pipeline discovers and adds NEW question format patterns to a global library file: question_format_patterns.md. This is a byproduct file written during Step 4 above — it is not its own orchestrated pipeline step.

Flow:

  1. For each question → Identify FORMAT PATTERN
  2. Check: Does pattern EXIST in library?
    • YES → SKIP
    • NO → ADD to library!

Result: Pattern Library GROWS with each test processed.

Existing Patterns: Direct Recall, Calculation, Show/Prove, Solve Equation, Graph Sketch, Graph Reading, Context Translation, Multi-Part, Real-World Model, … (grows over time)


Summary

Component Input Output
curriculum-test-generator (orchestrator, resume logic) Workbook + Test PDF (or Scenario B textbook scan) Final test + answers
Step 1: curriculum-analyzer Workbook PDF curriculum_context.md
Step 2: test-contents-extractor Test PDF ExtractedQuestions.md + images/
Step 3: curriculum-aligned-question-generator Both above PDF + ANSWERS.md + new_images/ + question_format_patterns.md (file output, not a separate step)

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top