Scrum4Me/prisma/migrations
Janpeter Visser d84cdf664f
feat(PBI-67): IDEA_REVIEW_PLAN — iterative multi-model plan review (#199)
* feat(ideas): upload-plan knop — short-circuit van Make-Plan AI-flow

Voegt een 'Upload plan' knop toe in idea-row-actions (verschijnt in zowel
list als idea-detail). Klik → file picker → kies .md → server-side parse +
opslaan; idea-status springt naar PLAN_READY. Vandaaruit de bestaande
'Maak PBI' knop voor materialize.

Server (uploadPlanMdAction):
- Toegestaan vanuit DRAFT, GRILLED, PLAN_FAILED, PLAN_READY
- DRAFT → skip-grill: status gaat direct naar PLAN_READY
- PLAN_READY overschrijft het bestaande plan (consistent met
  updatePlanMdAction, geen confirmation)
- Geblokkeerd in GRILLING/PLANNING (job loopt), PLANNED (al gematerialiseerd)
- Parse-failure → 422 + details (NIET opslaan, zodat een onparseerbaar plan
  nooit in de DB belandt)
- Empty / >100k chars → 422
- Schrijft IdeaLog NOTE met from_status + length
- Rate-limit + demo-guard + ownership-check via loadOwnedIdea (zelfde
  patroon als updatePlanMdAction)

UI (idea-row-actions.tsx):
- Hidden <input type=file accept=".md,.markdown,text/markdown,text/plain">
- FileReader → text → action
- Toast bij success + router.refresh()
- Blocked-tooltip in andere statussen

Tests: 10 nieuwe in __tests__/actions/ideas-crud.test.ts dekkend voor:
happy paths (DRAFT/GRILLED/PLAN_READY-overwrite/PLAN_FAILED), blocks
(PLANNED/GRILLING), validation (empty/oversized/parse-fail), 404.
Full suite groen: 849/849.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Add reviews for Bootstrap-wizard plans v3.2 to v3.4

- Review v3.2: Addressed executor model, fire-and-forget issues, and PAT handling.
- Review v3.3: Improved transaction handling, stale recovery, and ID generation.
- Review v3.4: Finalized GitHub permissions, catalog versioning, and E2E verification queries.
- Updated recommendations for each version to enhance implementation readiness.

* docs(plans): M8 bootstrap-wizard upload-variant v1.4 — backtick-paden

Upload-variant van het volledige technische plan (docs/plans/M8-bootstrap-wizard.md),
bedoeld voor de "Upload plan"-functie. Genereert 1 PBI + 4 Stories + 22 Tasks
via materializeIdeaPlanAction.

v1.4-aanpassingen tov eerdere generatie-iteratie:
- Alle bestandspaden in implementation_plan in backticks (path-extractor matchen)
- Expliciete "Bestanden:" blok per task vóór de stappen
- Alle tasks op verify_required: ALIGNED_OR_PARTIAL (was deels ALIGNED — te strict
  voor ADR-stubs en multi-file edits)

Fixt forward-only: T-963 cancelled_by_self door DIVERGENT verifier-verdict.
Re-upload van dit bestand produceert tasks die door verify_task_against_plan
als ALIGNED of PARTIAL geclassificeerd kunnen worden.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* PBI-67: Add review-plan support to Idea model and job config

- Add plan_review_log and reviewed_at fields to Idea model
- Add REVIEWING_PLAN, PLAN_REVIEW_FAILED, PLAN_REVIEWED to IdeaStatus enum
- Add IDEA_REVIEW_PLAN to ClaudeJobKind enum
- Add IDEA_REVIEW_PLAN config to job-config.ts with model=opus, thinking_budget=6000
- Create migration record for schema changes (applied via db push)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* PBI-67 Phase 2: Add update-idea-plan-reviewed MCP tool

- Create src/tools/update-idea-plan-reviewed.ts: saves review-log and transitions idea status to PLAN_REVIEWED
- Add PLAN_REVIEW_RESULT to IdeaLogType enum (both repos)
- Register tool in src/index.ts
- Update Prisma schemas (both repos): add plan_review_log and reviewed_at fields to Idea model
- Add REVIEWING_PLAN, PLAN_REVIEW_FAILED, PLAN_REVIEWED to IdeaStatus enum (MCP schema)
- Add IDEA_REVIEW_PLAN to ClaudeJobKind enum (MCP schema)
- Tool includes transaction safety and convergence metrics logging

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* feat(PBI-67): IDEA_REVIEW_PLAN Phases 3-6 — server actions, UI components, prompt & tests

- Phase 3: startReviewPlanJobAction, cancelIdeaJobAction, status transitions
  (REVIEWING_PLAN / PLAN_REVIEWED / PLAN_REVIEW_FAILED), status colors,
  job-card/jobs-column filters, idea-list status tabs
- Phase 4: review-plan-job.md prompt (multi-model orchestration with codex
  injection + active plan revision via update_idea_plan_md after each round),
  runbook, 13 unit tests
- Phase 5: ReviewLogViewer component (rounds, convergence, approval, issues),
  idea-detail integration, proper ReviewLog TypeScript types exported from component
- Phase 6.1: wait-for-job discriminator wired (IDEA_REVIEW_PLAN), plan-revision
  step made mandatory in prompt (was previously optional/missing)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 03:35:02 +02:00
..
20260424123750_init fix: SQLite migraties vervangen door PostgreSQL migratie voor Neon 2026-04-24 14:38:01 +02:00
20260425102419_add_task_implementation_plan feat: ProductMember — team management for product backlogs 2026-04-25 13:09:44 +02:00
20260425103147_add_todo_product_id feat: Todo altijd gekoppeld aan product backlog 2026-04-25 12:35:40 +02:00
20260425110346_add_product_members feat: ProductMember — team management for product backlogs 2026-04-25 13:09:44 +02:00
20260425112843_add_user_profile feat: gebruikersprofiel met avatar, bio en uitgebreide beschrijving 2026-04-25 13:30:38 +02:00
20260425210710_add_review_task_status feat(ST-350): add Story.assignee_id schema migration 2026-04-26 16:03:29 +02:00
20260426140229_add_story_assignee feat(ST-350): add Story.assignee_id schema migration 2026-04-26 16:03:29 +02:00
20260426193458_add_user_email feat(ST-507): add optional email field to User schema 2026-04-26 19:37:38 +02:00
20260426195800_add_todo_description feat(ST-509): add optional description column (max 2000 chars) to Todo 2026-04-26 19:59:52 +02:00
20260426202231_add_entity_codes feat(ST-507): add optional code fields to Product, Pbi and Story 2026-04-26 20:36:26 +02:00
20260426214905_add_story_log_metadata Todo description, entity codes, REST API extensions and Claude Code hardening (ST-509/511/512/513) (#2) 2026-04-26 23:40:54 +02:00
20260426230316_add_solo_realtime_triggers feat(M8): Realtime Solo Paneel via Postgres LISTEN/NOTIFY (ST-801..ST-806) (#8) 2026-04-27 13:59:32 +02:00
20260427000216_extend_realtime_payload feat(M8): Realtime Solo Paneel via Postgres LISTEN/NOTIFY (ST-801..ST-806) (#8) 2026-04-27 13:59:32 +02:00
20260427165329_add_user_active_product_id feat(M9): active product backlog — persistent active PB, NavBar splits, sprint card styling (#10) 2026-04-27 20:25:13 +02:00
20260427200734_add_login_pairing M10: Password-loze inlog via QR-pairing (ST-1001..ST-1008) (#12) 2026-04-28 00:01:04 +02:00
20260427224849_add_claude_questions M11: Claude vraagt, gebruiker antwoordt (ST-1101..ST-1108) (#13) 2026-04-29 11:38:23 +02:00
20260429150643_add_pbi_status M12 / ST-1109: PBI krijgt een status (Ready / Blocked / Done) (#16) 2026-04-29 17:52:34 +02:00
20260429165857_add_claude_job M13: Claude job queue — 'Voer uit'-knop + worker presence (ST-1111) (#18) 2026-04-29 19:51:48 +02:00
20260429171047_add_claude_worker M13: Claude job queue — 'Voer uit'-knop + worker presence (ST-1111) (#18) 2026-04-29 19:51:48 +02:00
20260430171227_add_claude_job_plan_snapshot feat: plan_snapshot field on ClaudeJob + architecture doc (#23) 2026-04-30 19:43:47 +02:00
20260501095454_add_claude_job_pushed_at Promote task naar IN_PROGRESS bij ClaudeJob CLAIMED/RUNNING (#25) 2026-05-01 12:01:27 +02:00
20260501100629_add_verify_result_and_verify_only M13: Veilige Claude-agent-workflow (Scrum4Me-side) (#26) 2026-05-01 13:42:18 +02:00
20260501110000_sync_task_status_from_claude_job Solo Paneel header refactor + agent-workflow hardening (#24) 2026-05-01 11:41:35 +02:00
20260501111511_add_claude_job_retry_count M13: Veilige Claude-agent-workflow (Scrum4Me-side) (#26) 2026-05-01 13:42:18 +02:00
20260501112415_add_product_auto_pr M13: Veilige Claude-agent-workflow (Scrum4Me-side) (#26) 2026-05-01 13:42:18 +02:00
20260501112642_add_claude_job_pr_url M13: Veilige Claude-agent-workflow (Scrum4Me-side) (#26) 2026-05-01 13:42:18 +02:00
20260501130000_promote_task_to_in_progress_on_claim Promote task naar IN_PROGRESS bij ClaudeJob CLAIMED/RUNNING (#25) 2026-05-01 12:01:27 +02:00
20260502132322_add_sprint_dates_and_jobs_index Foundation: route, recharts, sprint-dates migration, chart-colors helper (#46) 2026-05-02 15:58:15 +02:00
20260502153500_add_task_verify_required Verify-gate uitbreiden: DIVERGENT/PARTIAL vereist agent-acknowledgement (#53) 2026-05-02 17:45:19 +02:00
20260502175000_add_task_repo_url feat(schema): Task.repo_url — cross-repo override for agent worktree (#54) 2026-05-02 18:02:01 +02:00
20260502190200_add_pbi_notify_trigger feat(schema): add notify_pbi_change trigger so PBI INSERT/UPDATE/DELETE emits NOTIFY on scrum4me_changes (#58) 2026-05-02 21:10:03 +02:00
20260503145506_add_pbi_pr_link ST-migvir40: Schema: Pbi.pr_url + pr_merged_at + Prisma-migratie (#67) 2026-05-03 17:02:47 +02:00
20260504055000_codes_required_and_task_code feat(codes): code NOT NULL voor PBI/Story + Task.code + product_id denorm 2026-05-04 08:36:19 +02:00
20260504172747_add_ideas_and_grill_jobs db: M12 migration — ideas + idea_logs + check-constraints + pg_notify update (T-492) 2026-05-04 19:35:28 +02:00
20260505000000_add_admin_role_must_reset_cancelled feat(ST-nma6ylbl): Prisma-migratie ADMIN enum + must_reset_password + CANCELLED-status 2026-05-05 14:18:10 +02:00
20260505120000_add_user_question_plan_chat feat(ST-bsjoqjnr): UserQuestion model + PLAN_CHAT enum-waarde 2026-05-05 17:26:22 +02:00
20260505230512_add_skipped_to_claude_job_status feat(T-571): voeg SKIPPED toe aan ClaudeJobStatus enum 2026-05-05 23:05:38 +02:00
20260506001700_story_logs_notify feat(T-559): pg_notify-trigger op story_logs voor sync-tab realtime 2026-05-06 00:16:52 +02:00
20260506010000_add_idea_product_secondary feat(schema): IdeaProduct junction model + relaties op Idea en Product 2026-05-06 02:16:26 +02:00
20260506010013_add_token_usage_fields feat(ST-mgsu85hr): Prisma schema — token-velden op ClaudeJob + ModelPrice model (#112) 2026-05-06 03:02:00 +02:00
20260506014222_add_worker_quota_gate feat(ST-qfpqpxzy): DB schema + settings-UI voor min_quota_pct worker-drempel (#118) 2026-05-06 03:45:59 +02:00
20260506101436_restore_todos_table fix(db): restore todos table after out-of-band drop (#131) 2026-05-06 10:18:20 +02:00
20260506114500_sprint_run_and_failed_statuses PBI-46: Sprint-niveau jobflow met cascade-FAIL (F1/F2/F4 Scrum4Me) (#136) 2026-05-06 16:43:57 +02:00
20260506182000_add_job_shas_and_pause_context PBI-47: schema, pause_context Zod, resumePausedSprintRunAction, PAUSED-banner UI (#137) 2026-05-06 22:17:11 +02:00
20260507000000_migrate_todos_to_ideas ST-1239: Atomische database-migratie — todos naar ideas + droppen todos-tabel (#132) 2026-05-06 12:25:37 +02:00
20260507103000_sprint_implementation PBI-50: SPRINT_IMPLEMENTATION single-session sprint runner (Scrum4Me-side) (#139) 2026-05-07 13:05:02 +02:00
20260507195507_add_sprint_code feat(PBI-59): Sprint.code (SP-N sequentieel per product) (#153) 2026-05-07 20:10:16 +02:00
20260507200000_add_push_subscriptions Sprint: pbi-55 (#156) 2026-05-07 21:46:01 +02:00
20260507210000_sprint_lifecycle feat(PBI-63): meerdere sprints per product + EXCLUDED + sprint-switcher (#161) 2026-05-08 00:15:04 +02:00
20260508085909_add_job_model_selection_fields feat(PBI-67): model + mode-selectie per ClaudeJob-kind (#169) 2026-05-08 11:20:10 +02:00
20260510113221_add_user_settings_json feat(PBI-76): user-settings DB-store infrastructure (Phase 0) (#185) 2026-05-10 12:44:32 +02:00
20260514000000_add_review_plan_support feat(PBI-67): IDEA_REVIEW_PLAN — iterative multi-model plan review (#199) 2026-05-14 03:35:02 +02:00
migration_lock.toml fix: SQLite migraties vervangen door PostgreSQL migratie voor Neon 2026-04-24 14:38:01 +02:00