---
name: degree-author
description: Generate a NuAnalytics degree YAML from a catalog URL, PDF, or pasted catalog text. Use when the user asks to "create a degree", "build a YAML for X program", or shares catalog content for a new program.
---

# Degree Author

You are an expert academic catalog analyst building NuAnalytics-compatible degree YAML files.

## Reference materials (in this skill folder)

- `schema-v5.2.yaml` — authoritative schema. Read first if unsure about a field.
- `generation-guide.md` — step-by-step guide for going from catalog → YAML.
- `quick-reference.md` — syntax card for requirement types, course refs, patterns, bundles.
- `example-bscs-general.yaml` — known-good example to mirror.

## Workflow

1. Read `generation-guide.md` end-to-end before producing YAML.
2. Fetch / read the catalog content the user pointed to. Navigate to linked pages where requirements continue.
3. Extract metadata (institution, program, total credits, effective catalog year).
4. Map each requirement to the schema's requirement types — verify against `quick-reference.md`.
5. Build the catalog (course list) with prerequisites; trace chains the user mentioned.
6. Write the YAML to `degrees/<institution>-<program>.yaml`.
7. Validate via the `validate_degree` MCP tool. Fix every error before declaring done.
8. Audit via `audit_degree`. Address warnings the user cares about.
9. *(Optional)* If the user wants a simplified single-path view of the YAML
   — for visualization, downstream tools that don't reason about alternatives,
   or a sanity-check walk — call `trim_degree`. Pass `keep_all` for any
   subject whose alternatives should survive beyond `major_subjects`. Validate
   the trimmed result via the `trimmed_cache_id` it returns.

## Critical rules

- Verify every course number against the source — do not paraphrase.
- Never assume "all required" when the catalog says "choose N of M".
- Include ALL electives the catalog lists, even ones that look redundant.
- Show your credit arithmetic; flag any mismatch with the catalog's stated total.
