Central Station / YPM-FEATURE-ASSIGNMENT-CREATION-STANDARDIZATION

Assignment creation standardization

features/assignment-creation-standardization.md · Updated 2026-05-26
GET /api/tickets/YPM-FEATURE-ASSIGNMENT-CREATION-STANDARDIZATION

Summary

Unify create-assignment paths; remove tutor context; add point value and submit-for-grade

6Questions 0Links 0Comments 0PRs
Open questions 6 items
  1. 1 Should point values be integer-only? Default: yes, positive integer, max 1000.
  2. 2 Is `Submit for grade` globally default ON, or does Daily Pages default OFF with a suggested low point value?
  3. 3 Should teacher-edited point value re-scale already released grades, preserve overrides, or require confirmation?
  4. 4 Should assignment type provide suggested point value defaults?
  5. 5 Is there any internal/admin-only use case for retaining a tutor-context editor?
  6. 6 Does "submit for grade off" still run GA feedback without a recorded grade?
Spec body Markdown
# Assignment creation standardization

Normalize all teacher-facing assignment creation flows so assignment type, classes, point value, submit-for-grade behavior, tutor, and grading assistant are consistent across the dashboard, My Classes, and assignment-type pages.

## Source

Granola meeting: `3fbd5f2d-e409-42bd-b585-fed305edd5cd`, **Summer priorities — assignment types, LMS integration, and reporter**, 2026-05-26 1:31 PM CDT.

The team found that assignment creation currently behaves differently depending on the entry point. The dashboard create flow already exposes multi-class checkboxes in at least one context, while assignment-type-specific creation did not. The team also decided the teacher-facing `tutorContext` free-text box is risky and should likely come out for now.

## Problem

Teachers can create assignments from multiple places, but the flows are not aligned:

- Dashboard.
- My Classes.
- Assignment type detail pages.

The current form also exposes `tutorContext`, a free-text prompt field that can conflict with Yawp's curated tutor behavior. That gives teachers power, but also creates quality-control and prompt-injection-style risk that the team is not ready to support.

Point values and submit-for-grade behavior are also becoming central because:

- Teachers assign low-stakes work like Daily Pages differently from major essays.
- The grading display should support `points earned / points possible`, not only percentages.
- LMS gradebook integration will need assignment-level point values.

## Goals

- One shared assignment creation model across all entry points.
- Multi-class assignment creation wherever assignment creation is available.
- Teacher sets title, prompt, point value, submit-for-grade, due date, and class targets.
- `Submit for grade` defaults ON unless product decides otherwise for a specific assignment type.
- Teacher-facing `tutorContext` is removed from normal assignment creation.
- Assignment type determines the default tutor and grading assistant pair.
- Feature-disabled actions are hidden rather than greyed out.

## Non-goals

- Letting every teacher customize tutor/grading-assistant prompts.
- Building a full custom-rubric/assistant builder in this pass.
- Adding multi-due-date support for one assignment across classes.
- Removing persisted `tutorContext` data in a destructive migration.
- Implementing LMS sync itself; this spec prepares the assignment model for it.

## UX sketch

Shared assignment creator:

```text
Create assignment

Assignment type
  [Thesis-driven essay v]

Classes
  [x] Period 1
  [x] Period 3
  [ ] Period 5

Title
  [Romeo and Juliet argument essay]

Prompt
  [ ... ]

Submit for grade
  [x] Students submit this for a grade

Point value
  [100]

Due date
  [optional]

[Create assignment]
```

If `Submit for grade` is unchecked:

```text
Point value hidden
Students can still complete the assignment, but no grade is recorded.
```

Do not show:

```text
Tutor context
[free text prompt box]
```

## Domain notes

- **AssignmentType** owns the canonical writing mode and should resolve the default tutor and grading assistant.
- **Assignment** owns teacher-specific title, prompt, classes, due date, point value, and grading intent.
- **Submission** should retain native GA percentage and any displayed point score/override behavior.
- **Feature flags** determine whether assignment creation or assignment types are visible to a teacher/class/org.

## Data model implications

Likely additive fields on `Assignment`:

- `submitForGrade BOOLEAN NOT NULL DEFAULT TRUE`
- `pointValue INTEGER NULL`

Validation:

- `pointValue` required and positive when `submitForGrade = true`.
- Default point value likely `100`.
- Daily Pages and similar low-stakes assignment types may suggest `5` or `10`, but teacher can change.

Tutor context:

- Keep existing `Assignment.tutorContext` nullable for backward compatibility.
- Stop rendering/editing it in teacher assignment forms.
- Prompt construction should ignore teacher-authored tutor context for standard assignments once the removal ships, unless an internal/admin path explicitly opts in.

Backward compatibility:

1. Add fields with safe defaults.
2. Existing assignments behave as graded 100-point assignments unless product chooses a different backfill.
3. Do not delete historical tutor context.
4. Old routes continue to load existing assignments.

## File paths in `yawp-2.0` likely to change

- `packages/prisma/schema.prisma` - `Assignment` fields.
- `packages/prisma/migrations/...` - additive assignment grading-intent fields.
- `services/web-app/app/routes/app._index/components/dashboard-create-assignment-sheet.tsx` - currently shows tutor context.
- `services/web-app/app/routes/app.assignment-types.$id/create-assignment-sheet.tsx` - currently shows tutor context.
- `services/web-app/app/routes/app.my-classes.$classId/assignment-sheet.tsx` - currently shows tutor context.
- `services/web-app/app/routes/app.my-classes.$classId/route.tsx`
- `services/web-app/app/routes/api.assignments.create/route.ts`
- Shared assignment form/schema module if extracted.
- Tutor/prompt-building services that currently consume `tutorContext`.
- Submission/grade display components for point-value output.
- E2E assignment creation tests.

## Open questions

- [ ] Should point values be integer-only? Default: yes, positive integer, max 1000.
- [ ] Is `Submit for grade` globally default ON, or does Daily Pages default OFF with a suggested low point value?
- [ ] Should teacher-edited point value re-scale already released grades, preserve overrides, or require confirmation?
- [ ] Should assignment type provide suggested point value defaults?
- [ ] Is there any internal/admin-only use case for retaining a tutor-context editor?
- [ ] Does "submit for grade off" still run GA feedback without a recorded grade?

## Small PR slice

Before the full point-value model lands, a small compatibility-safe PR can hide `Tutor Context` from the three teacher assignment builders and stop normal teacher flows from writing it, while keeping the database field and old assignments intact.

## Edge cases

- Teacher has no classes.
- Teacher has one eligible class.
- Teacher has multiple eligible classes.
- Assignment type is archived or not visible under the teacher/class feature flag.
- Teacher edits an old assignment that already has tutor context.
- Teacher turns `submitForGrade` off after submissions exist.
- Teacher changes point value after grades were released.
- Existing 100-point grade displays must not change unexpectedly.

## Test plan

- E2E: create assignment from dashboard with multiple classes.
- E2E: create assignment from My Classes.
- E2E: create assignment from assignment-type page.
- E2E: no tutor-context field appears in normal teacher assignment creation.
- E2E: feature-disabled assignment creation action is hidden.
- E2E: submit-for-grade defaults checked and point value is required.
- Unit: shared validation rejects missing/invalid point value when graded.
- Unit: grade display converts native percentage to configured points.
- Regression: existing assignments with stored tutor context still load/edit without data loss.

## Rollout

Feature flag: `feature_assignment_creation_standardization`.

1. Add fields and shared validation behind flag.
2. Hide tutor context in flagged flows.
3. Pilot with one teacher/class.
4. Default on after assignment creation, grading display, and old assignment edit regressions are verified.
5. Later cleanup: decide whether `tutorContext` remains internal-only or is removed from the model.

## Engineering handoff checklist

- [x] Domain context covered
- [x] File paths in `yawp-2.0` listed
- [x] Data model implications spelled out, including backward-compat plan
- [x] UX sketch in prose
- [x] Edge cases enumerated
- [x] Test plan written
- [x] Rollout plan decided
- [ ] Submit-for-grade default confirmed
- [ ] Historical grade re-scaling rule confirmed
Repo sync Not recorded

No repo sync metadata recorded yet.