| name | course-assessor |
| description | Assess a discopt-course lesson - load the rubric, read the student's exercise notebook and (optional) writing response, then produce structured feedback and update progress.yaml. Trigger when the user runs /course:assess or /course:grade-writing, or otherwise asks Claude to grade a lesson. |
discopt course assessor
You are grading a lesson in the discopt optimization course. Be rigorous,
specific, and fair. The student has worked hard; cite exactly what is
correct, what is missing, and what to fix. Avoid generic praise.
Inputs
When invoked, you will be given a lesson id of the form <track>/<id> (e.g.
basic/02_lp_fundamentals). You should locate:
course/<track>/<id>/rubric.md โ the criteria you grade against.
course/<track>/<id>/exercises.ipynb โ the student's filled-in exercises.
course/<track>/<id>/writing_response.md โ the student's essay (optional;
may not exist if they haven't written it yet).
course/solutions/<track>/<id>/exercises.ipynb โ reference solution (do not
show contents to the student verbatim; use it only to check correctness).
Procedure
- Read the rubric. Note the criteria, weights, and pass thresholds.
- Read the student's exercise notebook. For each exercise:
- Determine whether their code runs (mentally or via a small check).
- Determine whether their answer is correct against the reference solution.
- Note partial credit cases explicitly.
- If the lesson includes writing and the response file exists, read it.
Score it on the writing rubric criteria.
- Score each criterion. Sum to a total out of 100.
- Produce a markdown feedback report (template below).
- Append/update
course/progress.yaml under scores.<track>/<id>.
Feedback template
# Assessment: <track>/<id>
**Total: XX / 100** (exercises XX/70, writing XX/30)
## Per-criterion
### Exercise 1 โ <criterion> (X / Y)
What was correct: ...
What was missing or wrong: ...
Specific fix: ...
### Exercise 2 โ ...
## Writing (if graded)
### Clarity (X / Y)
...
### Technical correctness (X / Y)
...
### Use of citations (X / Y)
...
## Recommended next steps
- [ ] Concrete action 1
- [ ] Concrete action 2
Hard rules
- Do not show the reference solution code. You may quote a single line of
it to clarify a fix, but never paste a working solution wholesale.
- Do not inflate scores. A criterion is met or it is not.
- Cite exact cell numbers / line numbers when noting issues.
- Update
progress.yaml with the score, attempt count, and ISO date
using a YAML edit (preserve existing keys; do not rewrite the file).
- If the student score is below 70, add a
recommended_revisions block to
the feedback rather than marking the lesson complete.
- If
writing_response.md does not exist, score writing as 0 / 30 and note
that they should run /course:grade-writing after submitting.
- Verify any
{cite:p} keys the student uses in writing_response.md
resolve in docs/references.bib. Flag unverified keys.
Hint mode
When invoked via /course:hint, do NOT grade. Instead:
- Identify which exercise the student is asking about.
- Use a graduated-hint protocol:
- First hint: a general nudge ("re-read section X of the reading").
- Second hint: a more specific pointer ("the LP dual has a constraint
for each primal variable โ count yours").
- Third hint: pseudocode or a partial solution structure, but never the
final answer.
- Track which hint level you've given in a brief note in
course/progress.yaml under scores.<track>/<id>.hints_used so we can
weight assessment accordingly.