codeforjapan / codeforjapan/workflow-interviewer
A3. DB スキーマ拡張 (task_slug, connections/exceptions/gaps/incidents)
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 30m
- Merged PRs (30d)
- 2
Description
親: #1
## 目的
`extractedData` を線形 steps[] のみから「つながり・例外・ギャップ・インシデント」を持つ構造に拡張し、対象業務を識別する `task_slug` を持たせる。
## 実装範囲
- `lib/db/schema.ts` 更新
- `sessions.task_slug: text` を追加(例: \"inkan-toroku\")。null許容で後方互換
- `extractedData` の TypeScript 型を拡張:
- `connections[]`: 業務間/部署/外部機関リンク。{ id, fromStepId, target: { type: \"workflow\" | \"department\" | \"external\" | \"system\", label, ref? }, note }
- `exceptions[]`: { id, relatedStepId, label, condition, frequency? }
- `gaps[]`: { id, kind: \"add\" | \"missing\" | \"order\" | \"local-rule\", standardStepRef?, actualStepRef?, reason, severity?, matchedKnownGap?: string }
- `incidents[]`: { id, relatedStepId?, scenario, severity, knownIncidentRef?: string }
- `drizzle/0002_*.sql` マイグレーション生成(既存セッションのデフォルト値を後方互換に)
- 関連型のExportを `lib/server/interview/schema.ts` と整合
## 完了条件
- マイグレーションが Supabase ローカルに適用できる
- 既存セッションが壊れない(連邦の `extractedData` に空の新フィールドが追加される)
- 後続 Issue(B2 以降)がこの型を import して使える
## 関連
- 現状スキーマ: `lib/db/schema.ts`, `lib/server/interview/schema.ts`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.