---
name: course-build
description: "Build or populate a Canvas course, including importing a course plan or planning map — detects existing template structure or builds from scratch."
---

# Course Build Orchestrator Skill

> **HPI/ID standard** — this skill applies the HPI/ID practitioner standard automatically (CLAUDE.md §Operating Standard: HPI/ID Practitioner). Ground decisions in `standards/instructional-design.md` — design sections 1–12 and the HPI diagnostic layer in Section 13. Name the framework behind every judgment; every design recommendation carries gap → data → principle → mechanism.

> **Assurance by design.** This skill applies `standards/assessment-assurance-design.md` automatically (CLAUDE.md §Operating Standard: Assurance by Design). Phase 3 (assessment architecture) confirms the module's assessment mix secures at least one anchor for the grade.


> **Plugin**: ASU Canvas Course Builder
> **Invokes**: syllabus-generator, quiz-generator, assignment-generator, discussion-generator, rubric-creator, interactive-content, notebooklm, images, course-audit, alignment, instructor-guide
> **Scripts**: `scripts/canvas_api.py`, `scripts/course_navigator.py`, `scripts/staging_manager.py`, `scripts/push_to_canvas.py`

## Purpose
Guide an instructional designer through building a complete Canvas LMS course. This skill operates in two modes:

## Staging-Server Preview (Write Safety Guard)

Every Canvas write in this skill follows `CLAUDE.md` §Write Safety Guard. Do not skip the preview step:

1. **Stage first** — write the content to `courses/{id}/staging/pages/{key}` via `scripts/staging_manager.py`. Never call a Canvas body write without a staged artifact.
2. **Start the preview server** — run `scripts/ensure_staging_server.py` (idempotent; returns the base URL whether or not the server was already up).
3. **Show the preview URL** — print `http://127.0.0.1:8111/courses/{id}/preview/pages/{key}` on its own line. Always `127.0.0.1`, never `localhost`.
4. **Require an explicit push verb** — accept only `push`, `approved`, `deploy`, `ship it`, or an equivalent affirmative with deployment intent. Do NOT accept `ok`/`yes`/`sure`/`confirm` alone — re-ask if the reply is ambiguous.
5. **Push via the script** — `scripts/push_to_canvas.py` only (backup → push → verify → clear-staging). Never call `canvas_api.update_*` directly.

Object creation (module shells, assignment shells) still requires the announce + preview-URL-location + explicit-push-verb per §Write Safety Guard step 6 even though there is no stageable HTML body.

## Canvas Templates
When these trigger phrases are active, load the spec doc instead of duplicating template content:
- **SDO JD Online** — triggers: "Use SDO JD template", "SDO-JDO template", "JD Online template", "Sandra Day template".
  Spec: `standards/canvas-templates/sdo-jdo-online-template.md`
- **ASU Online QM** — triggers: "Use ASU Online QM template", "ASU Online template", "QM template", "Quality Matters template".
  Spec: `standards/canvas-templates/asu-online-qm-template.md`
- This skill must mirror the active template's module sequence, SubHeader structure, and visual signatures per the spec doc.
Do not paste template tables or HTML bodies here; reference the spec doc.

### Mode 1: Template Populator ("Accelerate")
**Default mode** — used when the course shell already has an ASU template imported.

Detects the existing structure (modules, pages, assessments) and populates them with content based on a syllabus. This matches the standard ASU workflow: template → populate → tweak → publish.

**When to use**: Any course that starts from the ASU Online course template (or a derivative).

### Mode 2: Custom Build ("Elevate")
**Opt-in mode** — used when building a course with a non-standard structure.

Builds the pedagogically-driven Gold Standard module structure from scratch with all 7 phases.

**When to use**: New program launches, major course redesigns, or courses that need the full custom build experience.

### How Mode Is Selected

The mode is determined automatically:

1. Fetch the course's existing modules and items: `${ASUCB_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}}/bin/python3 scripts/course_navigator.py --course-id {COURSE_ID} --json`
2. **If modules exist with recognizable template structure** → **Template Populator mode**
   - Recognizable patterns: Overview, Task List, Learning Materials, Readings, Videos, Coursework, Assignment, Practice Quiz, Graded Quiz, Discussion
   - Also recognizes ASUCB Gold Standard: Overview, Prepare to Learn, Lesson, Knowledge Check, Guided Practice, Create an Artifact, Conclusion
3. **If the course is empty** → Ask the user:

**Question**: "This course is empty. How would you like to start?"

| Label | Description |
|---|---|
| **Import ASU template** | Import the standard ASU Online template, then populate with content |
| **Build custom structure** | Create the Gold Standard 7-page module structure from scratch |

- **Import ASU template**: Use `canvas_api.create_content_migration()` to import from a template course (source course ID from user or config), then switch to Template Populator mode
- **Build custom structure**: Proceed to Custom Build mode (Phase 0+)

---

## Template Populator Mode

When the course already has template structure:

### Step 1: Map Template to Content Buckets

Scan existing pages and classify them by **content role**, not exact name. Programs customize templates — some merge pages, rename items, or add extras. Match flexibly:

| Content Role | Name Patterns to Match | Action |
|---|---|---|
| **Overview** | "Overview", "Module Overview", "Introduction" | Populate with objectives, roadmap, time estimate |
| **Task List / Schedule** | "Task List", "To-Do", "Schedule", "Checklist" | Generate task checklist from assessment schedule |
| **Learning Content** | "Learning Materials", "Readings", "Content", "Lesson", "Topics" | Populate with key concepts tied to MLOs |
| **Video / Media** | "Videos", "Media", "Lecture" | Add video embeds or placeholders |
| **Discussion** | Discussion topic items (Canvas type = Discussion) | Generate prompt via discussion-generator |
| **Assignment / Artifact** | Assignment items — "Assignment", "Coursework", "Artifact", "Project" | Generate instructions via assignment-generator |
| **Practice Quiz** | Quiz items containing "Practice", "Ungraded", "Self-Check" | Generate practice quiz via quiz-generator |
| **Graded Quiz** | Quiz items containing "Graded", "Quiz", "Exam" (not "Practice") | Generate graded quiz via quiz-generator |
| **Resources** | "Resources", "Supplementary", "Additional Reading" | Populate with curated resource links |
| **Conclusion** | "Conclusion", "Wrap Up", "Summary", "Next Steps" | Populate with takeaways + discussion link |
| **Section Divider** | SubHeader items | Preserve as-is |
| **Exam Module** | Module with "Exam", "Midterm", "Final" in name | Populate reminders + exam content or leave placeholder |
| **Instructor-Only** | "Facilitation Guide", "Instructor Notes", "Faculty Resources" | **Skip** — do not populate |
| **Tool Setup** | "Links and Tools", "Getting Started with Tools" | **Skip** — tool configuration pages |
| **Module 0 Items** | "Welcome", "Meet Your Instructor", "Office Hours", "Community Forum" | Populate where possible; `[FACULTY: ...]` for personal items |

**Unrecognized pages**: If a page doesn't match any pattern, show it to the user: "I found [page name] in Module N but I'm not sure what kind of content goes here. What should I do with it?" Options: populate as learning content / skip / tell me what it is.

### Step 2: Confirm Mapping

Show the user the detected structure and mapping:

```
Detected Template Structure:
  Module 1: [Title]
    → Overview           → Will populate with objectives + roadmap
    → Task List          → Will populate with module tasks
    → Learning Materials → Will populate with curated resources
    → Assignment         → Will generate artifact instructions + rubric
    → Discussion         → Will generate discussion prompt + rubric
    → Practice Quiz      → Will generate knowledge check (5Q)

  [Repeat for each module]

Does this mapping look right? I can adjust before proceeding.
```

### Step 3: Content Detection Protocol

Before populating any page, classify its content state:

1. **Fetch page HTML**: `canvas_api.get_page(config, slug)`
2. **Scan for markers**: `[Instructors: ...]`, `[FACULTY: ...]`, `[INSERT ...]`, `[TODO]`, `Lorem ipsum`, `<p>&nbsp;</p>`
3. **Classify and act**:

| State | How to detect | Action |
|---|---|---|
| **Empty** | Body is blank, whitespace only, or just `<p>&nbsp;</p>` | Populate fully — no confirmation needed |
| **Placeholders only** | All meaningful text matches placeholder patterns | Replace placeholders — report what was replaced |
| **Custom + placeholders** | Non-placeholder text exists alongside markers | Show summary: "This page has custom content: [first 100 chars]. **Replace all** / **Merge** (keep custom + add new) / **Skip**?" |
| **Fully populated** | No placeholders, substantial content present | Skip — "This page already has content. Want me to review it instead?" |

4. **For merge**: Preserve existing custom content blocks, only replace sections that still have placeholder markers
5. **Log every classification**: After processing, report: "Page [slug]: [state] → [action taken]"

### Step 4: Populate Content

For each page that passed content detection (not skipped):
1. Generate content following the Audit-Compliant Content Standards (reference the standards-to-page-role mapping)
2. **Preserve template formatting** where present — insert new content into existing structure, don't overwrite the entire page
3. **Stage changes**: Use `staging_manager.py` to stage modified HTML
4. **Preview**: Show the user staged content before pushing
5. **Push**: After approval, use `push_to_canvas.py`

**Progress reporting**: After each page, report status:
```
✓ Module 1: Overview populated (1/7 modules)
✓ Module 1: Learning Materials populated (1/7 modules)
  → Module 1: Populating Lesson page... (1/7 modules)
```

### Step 5: Generate Assessments

Same as Phase 3 in Custom Build — invoke quiz-generator, assignment-generator, discussion-generator, rubric-creator for each module.

**Progress reporting**: After each assessment:
```
✓ Module 1: Knowledge Check created — 5 questions, 15 pts (1/7 modules)
✓ Module 1: Discussion created — Type A, 25 pts (1/7 modules)
```

### Step 6: QA

Run `course-audit` Accessibility Audit Mode and Deep Audit on the populated course.

### Step 7: Summary + Handoff

After build completes, display:

```
═══ Course Build Complete ═══

Content:
  ✅ [N] modules populated ([M] pages)
  ✅ [N] knowledge checks created
  ✅ [N] assignments created with rubrics
  ✅ [N] discussions created with rubrics

Standards Compliance:
  ✅ [X]/25 ASU design standards satisfied by generated content
  ✅ WCAG 2.1 AA: [status]

⚠️ Standards Requiring Instructor/SME Action:
  - Standard 13: Verify content accuracy (SME review)
  - Standard 15: Review for diverse perspectives
  - Standard 18: Record welcome + lecture videos
  - Standard 23: Verify third-party tools are ASU-licensed
  - Standard 25: Confirm OER prioritization

⚠️ Instructor Tasks:
  - Record and upload instructor videos
  - Complete Meet Your Instructor page
  - Set due dates (or confirm generated dates)
  - Review and publish

Run an audit for a full report, or start editing individual modules.
```

Present an `AskUserQuestion`:

| Label | Description |
|---|---|
| **Run full audit** | Check all 25 design standards + WCAG + CRC |
| **Quick spot-check** | Verify the 7 essential standards only |
| **I'm good for now** | Skip — I'll review manually |

---

## Custom Build Mode

When building from scratch, proceed through the full phase workflow below.

## Prerequisites
- Canvas API credentials configured (CANVAS_TOKEN, CANVAS_DOMAIN, CANVAS_COURSE_ID)
- An empty or near-empty Canvas course shell
- The instructor/designer has course content available (learning objectives, content outline, or source materials)

## Needs Analysis Advisory

After the setup gate confirms the active course, check `courses/{courseId}/course-config.json` for a `needs_analysis` block.

- If `needs_analysis` exists: acknowledge it briefly and proceed. Example: "Needs analysis found — I’ll use that context as I build."
- If `needs_analysis` is missing: advise, but do not block. Example: "I can build now, but a needs analysis usually improves alignment before course design. Want to run `/needs-analysis` first or continue building?"
- If the user declines, continue directly into the build workflow with no further friction.
- Treat this as an advisory design checkpoint only, not a required gate.

---

## Audit-Compliant Content Standards

**Build it right the first time** — every content generation step should satisfy the applicable ASU design standards from the start, not rely on post-build auditing to catch gaps.

Reference files:
- `standards/asu-design-standards.yaml` — 25 standards, 173 criteria (★ = essential)
- `standards/asu-design-standards-enrichment.yaml` — expectations, examples, and research per standard

### Standards-to-Page-Role Mapping

| Page Role | Standards Satisfied | Key Requirements |
|---|---|---|
| **Module Overview** | ★01, ★02, 03, 05, ★06 | CLOs present + measurable, MLOs with Bloom's verbs, alignment visible to learners, welcoming tone, estimated completion time |
| **Learning Content / Lesson** | ★12, 14, 16, 19 | Materials tied to specific MLOs, real-world relevance, ≥2 content formats, active learning opportunity |
| **Knowledge Check** | ★08, 10, 11 | Questions aligned to module objectives, Bloom's progression, varied question types |
| **Assignments / Artifacts** | ★08, 09, 10 | Instructions state which CLOs/MLOs are evaluated, rubric attached with clear criteria, varied assessment formats across course |
| **Discussions** | ★08, 09, 10, 19 | Prompt requires reasoning (not recall), rubric attached, peer engagement component |
| **Syllabus** | 04 (B-04.1 — B-04.20) | All 20 syllabus criteria: description, credit hours, contact info, communication, objectives, outcomes, Gold statement, tech requirements, access statement, coursework submission, late policy, grade breakdown, grade scale, integrity, AI policy, office hours, disclaimer, no outdated info |
| **Module 0 / Getting Started** | 04, 05, 17, 21 | Welcome page, syllabus, community forum with response expectations, intro discussion, support resource links |
| **Navigation** | 04 (B-04.31 — B-04.39) | Required tabs (Syllabus, Modules, Resources, Accessibility, ASU Course Policies, Time in AZ), home page set, banner + course image |
| **Guided Practice** | 11, 19 | Cognitive skills development, active learning (not passive consumption) |

### Essential Standards (★ — Must Always Pass)

These 7 standards are marked essential in the YAML and must be satisfied in every course build:

1. **★01 Course-Level Alignment** — CLOs are measurable, aligned with program objectives
2. **★02 Module-Level Alignment** — MLOs are measurable, aligned with CLOs
3. **★06 Clear Workload Expectations** — Time estimates on every module overview, credit-hour alignment
4. **★08 Assessments Align with Objectives** — Every assessment maps to specific CLOs/MLOs
5. **★12 Materials Align with Objectives** — Every resource ties to an MLO
6. **★22 Material Accessibility** — WCAG 2.1 AA: heading hierarchy, alt text, link text, tables, color contrast, language attributes
7. **★23 Tool Accessibility** — Third-party tools are ASU-licensed and vetted (requires SME verification — flag in handoff)

### WCAG 2.1 AA Rules (Standard 22) — Apply to ALL Generated HTML

- **Headings**: H2 → H3 → H4 hierarchy. Never skip levels. Never use H1 (Canvas reserves it).
- **Images**: Every `<img>` gets descriptive `alt` text. Decorative images: `alt="" role="presentation"`.
- **Links**: Descriptive text. Never "click here" / "read more." External links: `target="_blank" rel="noopener noreferrer"` + screen-reader "(opens in new tab)."
- **Tables**: `<thead>`, `<th scope="col">` or `<th scope="row">`. Never layout tables.
- **Lists**: `<ul>` or `<ol>`. Never manual numbering or bullet characters.
- **Color**: Never color alone to convey meaning. Minimum 4.5:1 contrast (3:1 for large text).

### Standards Requiring SME/Instructor Action (Flag in Handoff)

These cannot be fully automated — flag with specific action items:

| Standard | Why it needs SME | Action item |
|---|---|---|
| 13: High-Quality Content | Content accuracy requires subject-matter verification | "SME must verify factual accuracy of all learning content" |
| 15: Universally Designed Content | Diverse perspectives and global representation need curation | "Review for inclusive examples and diverse perspectives" |
| 18: Instructor-Created Media | Requires actual instructor recordings | "Record welcome video and lecture videos" |
| 23: Tool Accessibility | Third-party tool verification | "Verify all tools are ASU-licensed and accessible" |
| 25: Low-Cost Resources | OER prioritization needs SME input | "Confirm resource selections prioritize open/low-cost materials" |

---

## Dry-Run Mode

Run with `--dry-run` (or the user says "do a dry run") to preview what the orchestrator will create **without touching Canvas**. This lets designers review the plan before committing.

### What Dry-Run Does
- **Phase 0** (Interview): Runs normally — the interview gathers input regardless
- **Phase 1** (Structure): Instead of creating modules/pages via API, prints a table of what **would** be created:
  ```
  DRY RUN — Canvas Structure Plan:
  Module 0: Getting Started
    → Page: Welcome & Course Tour (welcome-course-tour)
    → Page: Syllabus & Course Policies (syllabus-and-course-policies)
    ...
  Module 1: [Title]
    → Page: Module Overview (m1-overview)
    → Page: Prepare to Learn (m1-prepare-to-learn)
    ...
  Total: N modules, M pages
  ```
- **Phase 2** (Content): Generates page HTML locally but does NOT push to Canvas. Saves files to `./dry-run-output/` for review.
- **Phase 3** (Assessments): Generates assessment content (quiz questions, assignment instructions, rubrics, discussion prompts) and prints a summary:
  ```
  DRY RUN — Assessment Plan:
  Module 1:
    → Knowledge Check: 5 questions, 15 pts
    → Create an Artifact: "Clinical Case: Shock" (30 pts, 3-criterion rubric)
    → Discussion: "Compensation Dilemma" (25 pts, Type B)
    → Guided Practice: 10 pts (completion)
  ...
  Assignment Groups: [weights]
  Total: X points
  ```
- **Phases 4-5** (Media & Interactives): Skipped — prints a note that these phases require manual steps
- **Phase 6** (QA): Skipped — nothing to audit yet
- **Phase 7** (Publish): Skipped

### Dry-Run Output
Produces a `dry-run-report.md` in the working directory containing:
1. Course structure map (modules and pages)
2. Assessment inventory (types, points, objectives)
3. Grading weight breakdown
4. CLO-to-assessment alignment matrix
5. Estimated build time for the full course

### Transitioning to Live Build
After reviewing the dry-run output, the user runs `/course-build` again (without `--dry-run`). The interview is skipped if `course-config.json` already exists — the orchestrator picks up from Phase 1 and creates everything in Canvas.

### Resuming a Build (Build Progress Tracker)
On every `/course-build` invocation, check for `courses/{courseId}/build-progress.json`:
- **If it exists**: Read it and show the user where they left off. Example: "You were working on Module 3 — the Lesson page still needs images. Pick up there?" Let the user choose to continue from that point or restart a phase.
- **Optionally run drift check**: Call `${ASUCB_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}}/bin/python3 scripts/progress_tracker.py --course-id {ID} --check-drift` to flag pages modified outside the plugin since the last push.
- **During build**: Before generating content for any page, check if `courses/{courseId}/staging/pages/{slug}.html` already exists (e.g., from a mockup promote). If it does, confirm with the user: "I found a promoted mockup for [page]. Use it?" Similarly, check `courses/{courseId}/mockup/briefs/` for promoted assessment/discussion briefs before generating quizzes, assignments, or discussions.
- **After each page push**: The `push_to_canvas.py` hooks auto-update progress. For pages generated but not yet pushed (e.g., during content generation), call `${ASUCB_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}}/bin/python3 scripts/progress_tracker.py --course-id {ID} --update {MOD_NUM} {PAGE_TYPE} in-progress` to track work-in-progress.
- **After each module completes**: Call `${ASUCB_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}}/bin/python3 scripts/progress_tracker.py --course-id {ID} --history "built" "module {N}"` to log the milestone.
- **Phase transitions**: Call `${ASUCB_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}}/bin/python3 scripts/progress_tracker.py --course-id {ID} --set-phase {PHASE}` when moving between phases.

---

## Phase 0: Structured Interview

Before building anything, gather essential course information through a structured conversation.

### Planning Document Check

Before starting the interview, ask:

**"Do you have a course development map or syllabus?"**

| Option | Description |
|---|---|
| **I have a course development map** | Provide a file path (DOCX) or paste the text |
| **I have a syllabus** | Upload or paste a syllabus document |
| **Start from scratch** | Walk me through the course interview |

- **Course development map**: Use the Course Plan Import Path below. Parse -> display extracted structure with gap assessment -> user confirms -> write `course-config.json`. Then skip the interview and proceed directly to Phase 1 (Custom Build) or Template Populator (if template detected).
- **Syllabus**: Use the Course Plan Import Path below. Parse -> display -> confirm -> write config. Fill gaps through targeted questions (not the full interview). Then proceed to Phase 1 or Template Populator.
- **Start from scratch**: Proceed with the full interview below.

**If `course-config.json` already exists** (from a previous session or mockup promote): Skip this check. Read the existing config, show the user a summary, ask if they want to continue from where they left off or start fresh.

### Course Plan Import Path

Use this path when the user provides a course development map, syllabus, curriculum map, PDF, DOCX, PowerPoint, or pasted planning text. Preserve existing `course-config.json` keys when merging; only overwrite fields supported by the imported source.

**Document detection uses shape, not exact headings:**
- Course metadata block near the top: course name, credits, instructor, department, modality.
- Numbered outcomes list after an objectives/outcomes/results heading.
- Assessment mapping table or list connecting outcomes to assignments, quizzes, discussions, or projects.
- Module breakdown with module numbers, topics, objectives, activities, and learning materials.
- Policy-heavy sections such as grading, late work, integrity, and communication indicate a syllabus.

If sections 1-4 are present, treat it as a course development map. If policies dominate and module detail is sparse, treat it as a syllabus. If uncertain, ask one targeted question.

**CDM extraction maps to the live schema:**

| Source signal | `course-config.json` destination |
|---|---|
| Course prefix/number/name, credits, institution, department, description, prerequisites | `course.*` |
| Instructor name and email | `instructor.*` |
| Numbered course learning outcomes | top-level `clos[]` with `{id, text, primary_modules}` |
| Outcome-to-assessment mapping | `modules[].assessments` and CLO alignment |
| Module rows: number, title, topics | `modules[].number`, `modules[].title`, `modules[].topics[]` |
| Module objectives | `modules[].objectives[]` with `{id, text, clo, blooms}` |
| Activities, assignments, quizzes, discussions, guided practice | `modules[].assessments` |
| Learning materials or professional context | `modules[].professional_connections[]` |
| Technology, late work, academic integrity, AI, accommodations, grading | `policies.*` and `grading.categories[]` where supported |

**Needs analysis extraction:** When supported by the document, populate `needs_analysis.context.professional_context`, `needs_analysis.context.delivery_constraints`, `needs_analysis.task_analysis.prerequisites`, and `needs_analysis.learner_analysis.audience_notes`. Leave unsupported fields in their template-default form.

**Bloom inference:** classify leading objective verbs into Remember, Understand, Apply, Analyze, Evaluate, or Create. Use document-provided aligned outcomes to populate `clos[].primary_modules[]` and `modules[].objectives[].clo`.

**Graceful degradation:** If objectives, assessment mapping, module details, grading, technology, or policy sections are missing, do not fail. Display the extracted structure, list missing sections, and ask targeted follow-up questions.

**Review before save:** Show course metadata, CLO count, module count, per-module objectives and assessments, and gaps. Let the user adjust modules, objectives, Bloom levels, CLO alignment, assessment types, points, order, or missing sections before writing.

**Save:** Write the adjusted result to `courses/{COURSE_ID}/course-config.json`, matching `templates/course-config.json`. If a config already exists, ask whether to merge or replace.

### Required Information
```
1. COURSE BASICS
   - Course title
   - Institution and department
   - Delivery format (online/hybrid/in-person)
   - Session duration (weeks)
   - Target audience and level
   - Credit hours
   - Course description

2. CONTENT STRUCTURE
   - Number of content modules (recommended: 6-10)
   - Module titles and key topics
   - Logical sequencing rationale

3. LEARNING OBJECTIVES
   - Course-Level Learning Objectives (CLOs): 5-10
   - Module-Level Objectives: 3-5 per module with Bloom's levels
   - Professional/clinical connections per module

4. ASSESSMENT STRATEGY
   - Assessment types to include (Knowledge Checks, Assignments, Discussions, Final)
   - Points per assessment type
   - Grading weights by category
   - Assessment-to-objective alignment

4b. SYLLABUS METADATA
   - Credit hours
   - Course description
   - General Studies Gold designation? (if yes: Gold statement)
   - Proctoring required? (if yes: tool name, student instructions)
   - Technology requirements
   - Course access statement
   - Grading turnaround time (days)

5. MEDIA STRATEGY
   - Will the course use NotebookLM for lecture videos? (recommended)
   - Will the course use NotebookLM for audio primers? (recommended)
   - Source materials available for NotebookLM (slides, textbook content, papers)

6. INTERACTIVE CONTENT
   - Desired interactive activity types (dialog cards, sequencing, branching, etc.)
   - Activities per module (recommended: 2-4)

7. COURSE POLICIES
   - Late work policy
   - Academic integrity statement
   - Generative AI policy
   - Accessibility accommodations
   - Communication expectations
   - Submitting coursework instructions
```

### Interview Output
Compile the interview responses into a **Course Syllabus** using the `syllabus-generator` skill. This becomes the source of truth for all subsequent phases.

---

## Phase 1: Create Canvas Structure

### Step 1: Create Modules
Create Canvas modules via the REST API:
- Module 0: Getting Started
- Modules 1-N: Content modules (from blueprint)

### Step 2: Create Page Stubs
For each content module, create 7 Canvas wiki pages following the Gold Standard structure:

| # | Page | Slug Pattern |
|---|---|---|
| 1 | Module Overview | `m[#]-overview` |
| 2 | Prepare to Learn | `m[#]-prepare-to-learn` |
| 3 | Lesson: [Topic] | `m[#]-lesson-[topic]` |
| 4 | Knowledge Check [#] | `m[#]-knowledge-check` |
| 5 | Guided Practice [#] | `m[#]-guided-practice` |
| 6 | Create an Artifact [#] | `m[#]-create-artifact` |
| 7 | Conclusion & Next Steps | `m[#]-conclusion` |

For Module 0, create orientation pages:
- Welcome & Course Tour
- Syllabus & Course Policies
- Academic Integrity Agreement
- Introduction Discussion
- Pre-Assessment (diagnostic)

### Step 3: Add Pages to Modules
Add each page as a module item, in order. Set module prerequisites as needed.

### Optional Alignment Check
If syllabus CLOs and module overview objectives are already populated at the scaffolding checkpoint, call `/alignment` to produce a read-only CLO/MLO/assessment/material alignment report before continuing content generation.

---

## Phase 2: Populate Page Content

Use the page HTML templates from `templates/page-html/` as starting points. For each page:

1. Fill in module-specific content (objectives, topics, instructions)
2. Apply ASU Canvas standards (Maroon #8C1D40, Gold #FFC627, H2-H4 headings)
3. Push HTML to Canvas via the REST API

### Page Content Sources
- **Overview**: Module objectives, roadmap, estimated time
- **Prepare to Learn**: Audio primer embed (placeholder until media phase), dialog card space
- **Lesson**: Lecture video embed (placeholder until media phase), resource links, supplementary content
- **Knowledge Check**: Quiz link button (placeholder until assessment phase)
- **Guided Practice**: Interactive activity space (placeholder until interactive phase), submission button
- **Create an Artifact**: Assignment instructions (placeholder until assessment phase), submission button
- **Conclusion**: Discussion link, reflection, next module preview

---

## Phase 2.5: Course Imagery

After page content is populated but before assessments are created, add visual content to pages that benefit from images.

### 2.5a: Identify Image Opportunities

For each module, analyze the Lesson and Overview pages for image opportunities. Apply the **Search-First Principle** from `standards/image-generation-guidelines.md`: always try to find a real, vetted image before generating with AI.

| Opportunity | Primary Approach | Fallback | Reasoning |
|---|---|---|---|
| Real-world example, photograph | **Search first** | Generate only if none found + user approves | Real images are more authentic and trustworthy |
| Scientific/medical/biological reference | **Search first** (never skip) | **Do not AI-generate** — flag for user to source manually | AI produces inaccurate scientific imagery |
| Historical or cultural imagery | **Search first** (never skip) | **Do not AI-generate** | AI cannot produce historically accurate depictions |
| Process diagram, flowchart, cycle | **Generate** (Nano Banana) | N/A — these are custom by nature | No stock equivalent exists for course-specific processes |
| Abstract concept illustration | **Generate** (Nano Banana) | N/A | Course-specific conceptual visuals |
| Comparison visual, before/after | **Search first** | Generate if no good match + user approves | Real examples preferred when they exist |
| System/architecture overview | **Generate** (Nano Banana) | N/A | Custom to the course content |

**Layout awareness**: When planning images, consider where each will be placed and which component (full-width, side-by-side, comparison) fits best. Vary layouts across the page — don't stack 3 full-width images in a row. See the Image Placement & Layout Guidelines in `standards/image-generation-guidelines.md`.

Present the plan to the user:

```
📸 Image Plan
─────────────
Module 1: [Title]
  • Lesson page: [description] → Search (real-world example)
  • Lesson page: [description] → Generate (process diagram)
  • Overview page: [description] → Generate (concept illustration)

Module 2: [Title]
  • Lesson page: [description] → Search (scientific reference)
  ...

Total: ~[N] images across [M] modules
Estimated cost: ~$[X] for generated images
```

Present an `AskUserQuestion`:

**Question**: "Here's my image plan. How would you like to proceed?"

| Label | Description |
|---|---|
| **Approve and go** | Find and generate all recommended images |
| **Adjust the plan** | I want to change some of these |
| **Skip images** | Move on to assessments — I'll add images later |
| **Just one module** | Start with one module and see how it goes |

### 2.5b: Execute Image Plan

For each image in the approved plan:

1. **Search-first images**: Follow the `images` skill (Mode 1: Search). If search yields poor results after 2-3 query attempts, **do not silently switch to AI generation** — tell the user: *"I couldn't find a good vetted image for [concept]. Would you like me to generate one with AI, or skip this?"* Let the user decide.
2. **Generated images** (user-approved or inherently custom): Follow the `images` skill (Mode 2: Generate) using **Nano Banana by default** (build prompt → generate → user reviews → refine conversationally → finalize → upload → embed).
3. **Layout-aware placement**: When embedding, choose the right component (full-width, side-by-side, comparison) based on the page's existing layout. Vary layouts for visual rhythm. See `standards/image-generation-guidelines.md` for the Layout Decision Guide.

Process one module at a time. After each module, confirm before moving to the next.

### 2.5c: Image Summary

After all images are placed, present a summary:

```
📊 Image Summary
────────────────
Total images added: [N]
  Searched: [N] (CC-licensed from vetted sources)
  Generated: [N] (AI — Imagen 4)
Modules covered: [list]
SME review needed: [N] images flagged
All tracked in course-config.json
```

---

## Phase 3: Create Assessments

This phase applies `standards/assessment-assurance-design.md`. Each assessment generator invoked below runs its own by-design self-check; before moving to Phase 4, confirm the module's combined assessment mix secures at least one anchor for the grade (Two-Lane) and declares task-level AI use somewhere in the module.

For each content module, invoke the assessment skills:

### 3a: Knowledge Checks
Invoke `quiz-generator` for each module:
- Input: Module objectives, lecture content, alignment matrix
- Output: 5-question Canvas quiz (15 pts)
- Create the quiz in Canvas, add to module

### 3b: Create an Artifact Assignments
Invoke `assignment-generator` for each module:
- Input: Module objectives, recommended assignment type, professional context
- Output: Complete assignment with instructions (30 pts)
- Invoke `rubric-creator` for the matching rubric
- Create the assignment + rubric in Canvas, add to module

### 3c: Discussions
Invoke `discussion-generator` for each module:
- Input: Module objectives, recommended discussion type, professional context
- Output: Complete discussion prompt (25 pts)
- Invoke `rubric-creator` for the matching rubric
- Create the discussion topic in Canvas, add to module

### 3d: Guided Practice
Create Guided Practice assignment objects (completion-based, low points):
- Create Canvas assignment for each module
- Add to module

### 3e: Final Assessment (if applicable)
Create comprehensive final quiz/exam covering all modules.

### 3f: Assignment Groups
Create Canvas assignment groups with weighted grading:
- Knowledge Checks: [weight]%
- Guided Practice: [weight]%
- Create an Artifact: [weight]%
- Discussions: [weight]%
- Final Assessment: [weight]%

---

## Phase 4: Media Creation

### 4a: NotebookLM Audio Primers
For each module, invoke `notebooklm` (Mode 1: Audio Primer):
- Generate the customized NotebookLM prompt
- Guide user through NotebookLM notebook creation, source upload, and audio generation
- Upload generated audio to Canvas Files
- Embed in Prepare to Learn pages

### 4b: NotebookLM Lecture Videos
For each module, invoke `notebooklm` (Mode 2: Lecture Video):
- Classify module resources (anchor vs. supplementary)
- Generate the customized NotebookLM prompt
- Guide user through video generation
- Upload to Canvas Files
- Embed in Lesson pages

### 4c: Captions & Transcripts
After all media is uploaded:
- Generate VTT caption files (via Whisper or manual transcription)
- Upload captions: `python scripts/upload_captions.py <config.json>`
- Add expandable transcripts: `python scripts/add_transcripts.py <config.json>`

---

## Phase 5: Interactive Content

### 5a: Design Activities
For each module, invoke `interactive-content`:
- Design 2-4 activities per module (dialog cards, sequencing, fill-blanks, branching, quiz)
- Map each activity to specific learning objectives

### 5b: Generate HTML
Create the content data file and run:
```bash
python scripts/generator.py <content_data.py> --output-dir ./output
```

### 5c: Deploy to Canvas
Upload and embed activities:
```bash
python scripts/deploy_interactives.py <content_data.py> --output-dir ./output
```

---

## Phase 5.5: Student Support Resources (Optional)

Create a Student Support Resources page using `templates/page-html/resources.html`:
- Add to Module 0 (Getting Started)
- Contains links to SAILS, Canvas Help, tutoring, advising, counseling, Dean of Students
- All external links follow accessibility standards (`target="_blank"`, `rel="noopener noreferrer"`, sr-only text)

## Phase 6: Quality Assurance

### 6a: Accessibility Audit
Invoke `course-audit` Accessibility Audit Mode:
- Scan all pages for WCAG 2.1 AA compliance
- Fix any issues found (alt text, headings, contrast, etc.)

### 6b: Course QA Scan
Invoke `course-audit`:
- Verify structural completeness (7-item modules)
- Check assessment alignment
- Verify navigation and module items
- Check for placeholder text
- Verify grading setup

### 6c: Fix Issues
Invoke `bulk-edit` (Mode 3: Content Fix) for any bulk remediation needed.

### 6d: Course Readiness Check (Optional)
Invoke `course-audit` CRC Mode:
- Run the full ASU CRC 9-category checklist
- Produces a report usable by ID Assistants for formal sign-off
- Addresses any remaining CRC gaps before launch

### 6.5: Instructor Guide (Optional)
Invoke `instructor-guide`:
- Creates a hidden "Faculty Resources" module above Module 0 (unpublished)
- Generates 6 pages: Welcome, Teaching Notes, Announcements, Communication Timeline, Support Directory, Grading Tips
- All faculty-customizable items marked with `[FACULTY: Customize]`

---

## Phase 7: Publish

### Publish Checklist
Before publishing, verify:
- [ ] All pages have content (no placeholders remaining)
- [ ] All quizzes have questions and correct answers
- [ ] All assignments have rubrics attached
- [ ] All discussions have rubrics and "post first" enabled
- [ ] All media has captions and transcripts
- [ ] Accessibility audit passes (0 issues)
- [ ] QA scan passes
- [ ] Course Readiness Check passes (if run)
- [ ] Module prerequisites set correctly
- [ ] Assignment due dates configured
- [ ] Course navigation items correct (all required tabs enabled)
- [ ] Faculty Resources module unpublished (hidden from students)
- [ ] All `[FACULTY: ...]` placeholders documented for instructor review

### Publish Commands
- Publish all pages
- Publish all modules
- Verify published state

---

## Module Completion Checklist

For each module, track completion of all components:

```
Module [#]: [Title]
□ Overview page populated
□ Overview images added (if applicable)
□ Prepare to Learn page populated
□ Audio primer generated, uploaded, embedded, captioned
□ Lesson page populated
□ Lesson images added (searched or generated, with alt text and captions)
□ Lecture video generated, uploaded, embedded, captioned
□ Knowledge Check quiz created (5 questions, 15 pts)
□ Guided Practice page populated
□ Interactive activities generated and deployed (2-4)
□ Create an Artifact assignment created with rubric (30 pts)
□ Discussion topic created with rubric (25 pts)
□ Conclusion page populated
□ All pages added to module in correct order
□ Accessibility audit: 0 issues
```

## Output
The orchestrator produces:
1. Complete Canvas course with all modules, pages, assessments, media, and interactives
2. Course blueprint document (source of truth)
3. Accessibility audit report
4. QA scan report
5. Module completion tracking
