Skip to content

moooon

Motir

Vibe your whole project. Bring an idea — Motir's three AI layers plan it, track it, and ship it, end to end. You're looking at Motir, built in Motir.

  • Vibe Project
  • Open Source
  • AI Agent
  • AI Loop
1
requests
0
upvotes
144
planned
1,362
shipped

Motir · Work items

MOTIR-3329Done

An admin can SEE the project's lessons — list and detail in AI-planning settings, permission-guarded

The first slice, and the one that makes the rest reviewable: an admin opens Settings → Project → AI planning and can read every lesson bound to this project.

A list — the lessons this project taught its planner, most-recently-relevant first. Each row shows enough to decide whether to open it: the takeaway, when it was last seen, how many times it has recurred, and the axes it applies to.

A detail view — the full lesson: title, body, why, howToApply, its kind/type/phase axes, its sourceRef provenance, createdAt and lastOccurredAt. This is the screen that answers "why is the planner telling me this?", so it shows the reasoning, not a summary of it.

Tenant only. Global lessons are the product's curated corpus and are not this project's to inspect here; the read is scoped to aiProjectId = <this project>. The empty state is the common case at first and is a real design problem, not a placeholder: a project with no lessons yet should learn what would appear here and why.

Permission-guarded. New keys in the catalog, granted to the built-in admin role — and the guard is on the DATA, not only the control. A user without the permission does not receive the lessons in the payload; hiding a rendered list client-side is not a permission.

The design comes first and draws the whole surface in one pass — list, detail, empty state, the retired treatment and the retire affordance the next story builds. Drawing them separately means drawing the list twice.

Acceptance criteria

  • design/ai-settings/ carries a three-file asset covering list, detail, empty state, the retired row treatment and the retire affordance, plus the ACCESS PATH — how a person reaches this from the settings surface they are already on.
  • An admin sees a list of this project's lessons and can open one to read it in full, in the live app.
  • Only tenant lessons for this project appear; a global lesson never does, and neither does another project's — asserted at the query, not the view.
  • A user without the permission receives no lesson data from the API and sees no entry point.
  • New permission keys are in lib/permissions/catalog.ts and granted to the admin built-in role.
  • The empty state is designed and implemented, and says what would appear here.
  • Copy lands in both en and zh catalogs.
  • An E2E walks: sign in as admin → open AI-planning settings → see the list → open a lesson → read it.

Context refs

  • motir-core app/(authed)/settings/project/ai-planning/page.tsx, _components/AiPlanningSettingsEditor.tsx — the surface and its t('aiPlanning.…') catalog.
  • motir-core design/ai-settings/ai-planning-settings.mock.html, design-notes.md — the asset to extend; today with zero lesson content.
  • motir-core lib/permissions/catalog.ts, lib/permissions/builtinRoles.ts.
  • motir-ai src/repositories/lessonRepository.ts — the row shape and the scope = 'global' OR aiProjectId = … clause this narrows.
  • MOTIR-3294 — the axes shown on each lesson.