codeforjapan / codeforjapan/workflow-interviewer
B2. 抽出スキーマ拡張と KB からの connections 初期注入
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 30m
- Merged PRs (30d)
- 2
Description
親: #1
依存: #2 (A2), #3 (A3)
## 目的
OpenAI Structured Outputs の抽出スキーマを拡張し、connections / exceptions / incidents まで埋める。さらに対象業務の KB から `triggers` / `depends_on` を読み、connections の初期値として注入する。
## 実装範囲
- `lib/server/interview/schema.ts`: zod スキーマに新フィールドを追加
- `lib/server/interview/extract.ts`:
- system prompt に「他業務/部署/外部機関への connection も抽出する」「例外・差し戻しは exception として別管理」を追記
- 対象業務スラッグの flow-standard frontmatter から `triggers` / `depends_on` を connections に seed
- 既存の steps 抽出ロジックと整合(重複防止)
- セッション作成時に `task_slug` 必須 + KB のseed注入
## 完了条件
- セッションが業務スラッグ付きで開始される
- 初期状態で connections[] が KB frontmatter から数件入っている
- 職員の語りで新規 connection / exception / incident が抽出され DB に保存される
## 関連
- KB frontmatter 例: `docs/kb/workflows/_standardized-20/inkan-toroku/flow-standard.md`
- CONTRIBUTING の依存関係定義: `docs/kb/CONTRIBUTING.md`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with lib/server/interview/schema.ts and lib/server/interview/extract.ts, then inspect the flow-standard frontmatter example at docs/kb/workflows/_standardized-20/inkan-toroku/flow-standard.md and the dependency guidance in docs/kb/CONTRIBUTING.md. Trace session creation and the existing steps extraction flow. Done means task_slug is required, seeded connections appear at session start, and spoken connections, exceptions, and incidents are persisted without duplicates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100