Skip to content

B2. 抽出スキーマ拡張と KB からの connections 初期注入 #5

@yu23ki14

Description

@yu23ki14

親: #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions