MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-69

2.1 Issue types + the type-parent rule layer

Done
Description

The first story of the PM core. Establishes the five user-facing issue types (epic / story / task / bug / subtask) on top of Story 1.4's work_item model, the service-layer enforcement of the kind-parent rules, and the type metadata (icon, color, allowed children) every later issue-tracking surface reads. After this story, the rest of Epic 2 (create/edit, detail, list) and Epic 3 (boards) have a typed, validated issue primitive to build on.

Prerequisites: Story 1.4 ships the work_item table with kind (epic/story/task/bug/subtask), parent_id, status, and the DB-level kind-parent constraints + depth limit. Story 1.3 ships projects + the per-project work-item-key counter. This Story does NOT re-create the schema — it adds the product layer (type metadata + service-layer rules + issue-key assignment) on top. All work follows motir-core/CLAUDE.md's 4-layer architecture (Route → Service → Repository → Prisma).

Verification

  • Pull the Story branch, pnpm install && pnpm prisma generate.
  • pnpm test — the 2.1.4 integration suite proves type metadata, validation (both layers), and key concurrency.
  • From a REPL or a scratch route, create an epic → story → task → bug and confirm sequential keys; attempt an illegal parent (task → epic) and confirm a clean 422 INVALID_PARENT_TYPE.