Central Station / YPM-FEATURE-DAILY-PAGES-ASSIGNMENT-TYPE-MODEL

Daily Pages AssignmentType model

features/daily-pages-assignment-type-model.md · Updated 2026-05-25
GET /api/tickets/YPM-FEATURE-DAILY-PAGES-ASSIGNMENT-TYPE-MODEL

Summary

Capture May email decisions; decide what belongs on AssignmentType vs Assignment vs GA

5Questions 0Links 0Comments 0PRs
Open questions 5 items
  1. 1 Bryant: Should the first engineering step be a model inventory/design doc before code?
  2. 2 Bryant: Should Daily Pages behavior selection use a new stable slug/key on AssignmentType?
  3. 3 Brian/Kevin: Are Daily Pages grades always optional/low-stakes, or should schools be able to make them formal grades?
  4. 4 Brian/Kevin: Should a Daily Pages GA give full credit for any meaningful effort, or should it retain a real engagement scale?
  5. 5 Bryant: Does a per-assignment submit-for-grade/point-value setting belong in this model, given production does not currently have it?
Spec body Markdown
# Daily Pages AssignmentType model

Daily Pages should stay modeled through Yawp's normal AssignmentType / Assignment / Document / Submission concepts, but the current shape needs a deliberate pass before we layer custom grading, prompt libraries, and student insights on top.

## Source context

This captures the May 22-24 email thread between Bryant, Brian, and Kevin about Daily Pages, prompt libraries, assignment creation, grading, AI insights, and Kevin's prototype workflow.

## Current production facts

Read-only production check on 2026-05-25:

- `Daily Pages` already exists as an active `AssignmentType`.
- Current production row shape:
  - 1 `AssignmentModule`
  - 1 `AssignmentModuleInstruction`
  - 544 `Assignment` rows
  - 272 `Document` rows
  - 71 `Submission` rows
- `Assignment` currently stores: class, assignment type, title, prompt, optional tutor context, due date.
- Production `Assignment` does **not** currently have a per-assignment `submitForGrade`, `pointValue`, grading mode, rubric config, or submit-for-grade column.
- Submission/grading availability is currently controlled by document submission feature flags:
  - global `document_submission_enabled = false`
  - targeted school IDs in `document_submission_enabled_school_ids`
- `Submission` stores grade output fields (`score`, `rubricScores`, `overallScore`, `numericPercentage`, `letterGrade`, `gradedAt`, etc.), but not an assignment-level point value.

## Product decisions from the thread

- Treat Daily Pages as an official teacher-created assignment flow, not just a loose writing space.
- Teachers should be able to create a Daily Pages assignment from a prompt library or from scratch.
- Students should still be able to create their own Daily Pages documents inside the Daily Pages AssignmentType.
- Daily Pages feedback should be different from thesis essay feedback: shorter, warmer, idea-forward, and focused on possible future essay development.
- Daily Pages grading, when used, should be low-stakes and completion/engagement weighted.
- Prompt libraries may eventually be useful for other AssignmentTypes.
- Brian noticed prompt filtering should be strict: selecting a specific novel should show only that novel's prompts.
- The larger strategy is to make Daily Pages submissions usable as structured signal for assignment-level and student-level AI insights.

## Bryant's current design bias

Avoid bespoke Daily Pages special-casing in random routes. If Daily Pages behaves differently, that behavior should come from reusable AssignmentType configuration:

- Tutor instructions/configuration.
- Grading assistant mode or rubric profile.
- Prompt-library association and filters.
- Student-facing description/entry behavior.
- Optional future analytics configuration.

That still allows Daily Pages to be a real AssignmentType. It just means we should avoid branching all over the app with `if title === "Daily Pages"` unless there is no better stable key/config.

## Model questions to resolve

- Should AssignmentType own the GA/rubric profile, or should Assignment have a copy/snapshot of it at creation time?
- Do we need a stable AssignmentType slug/key? Current code and DB rows primarily expose IDs and titles; title matching is too fragile for behavior selection.
- Are `AssignmentModule` and `AssignmentModuleInstruction` doing the right job for single-step AssignmentTypes like Daily Pages, or are we over-modeling simple types?
- Should rubrics be first-class AssignmentType config instead of hardcoded prompt text in the grading route?
- If a teacher changes AssignmentType config later, do existing Assignments keep the old behavior or inherit the new behavior?
- Does the platform need per-assignment grading intent/point value, or is submission/grading still a school/org-level feature flag plus teacher workflow?

## Likely engineering tracks

1. **Inventory and name the model.**
   Produce a short production-backed map of AssignmentType, AssignmentModule, AssignmentModuleInstruction, Assignment, Document, and Submission. Include real production counts and examples.

2. **Add stable behavior configuration.**
   Prefer additive fields/tables over title matching. Candidates: AssignmentType slug, grading profile, tutor profile, prompt library scope, rubric profile.

3. **Daily Pages GA/rubric profile.**
   Route Daily Pages through a holistic, idea-focused GA using AssignmentType config, not scattered special handling.

4. **Prompt library filtering cleanup.**
   Fix the novel/source filter so a selected work only shows matching prompts.

5. **Insights readiness.**
   Decide whether Daily Pages GA should store structured per-submission signal now, so future student-level insights do not need to repeatedly scrape full text.

## Open questions

- [ ] Bryant: Should the first engineering step be a model inventory/design doc before code?
- [ ] Bryant: Should Daily Pages behavior selection use a new stable slug/key on AssignmentType?
- [ ] Brian/Kevin: Are Daily Pages grades always optional/low-stakes, or should schools be able to make them formal grades?
- [ ] Brian/Kevin: Should a Daily Pages GA give full credit for any meaningful effort, or should it retain a real engagement scale?
- [ ] Bryant: Does a per-assignment submit-for-grade/point-value setting belong in this model, given production does not currently have it?

## Test plan

- Production read-only checks for AssignmentType shape before migration/design changes.
- Unit tests for any AssignmentType behavior resolution helper.
- Regression tests proving thesis essay grading/tutor behavior remains unchanged.
- E2E coverage for Daily Pages prompt-library filtering and prompt-to-assignment creation.

## Rollout

Any schema or behavior change should be additive and feature-flagged. Existing Daily Pages assignments, documents, and submissions must keep working.

## Engineering handoff checklist

- [x] Domain context covered
- [x] File paths in `yawp-2.0` listed at a track level
- [x] Data model implications called out
- [ ] UX sketch in prose
- [x] Edge cases enumerated
- [x] Test plan written
- [ ] Rollout plan decided
Repo sync Not recorded

No repo sync metadata recorded yet.