codeforjapan / codeforjapan/workflow-interviewer

UX3. インタビューの進捗・残り質問数を可視化し、ターン数上限の決め方を見直す

Open
#35 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
30m
Merged PRs (30d)
2

Description

## 課題(デモで確認された挙動)

「ターン20/20・完了」と表示されるが、なぜ20ターンなのか、いま残り何問なのかが会話中に分からない。ゴールが見えないまま枝葉に時間を使い切ってしまう一因になっている。

### Before(現状)
- 上限は `MAX_TURNS = 20` 固定。ヘッダーに「ターン N / 20」とだけ表示され、何がどこまで埋まったか(進捗)は見えない。
- 終了判定 `isFinished` は「最低スロットが充足 かつ `MIN_TURNS_BEFORE_FINISH = 4` 以上」。上限20に達するとクロージング。20という数字の根拠が曖昧。
- 職員視点では「あと何を答えれば終わるのか」が分からない。

### After(あるべき姿)
- 会話中に「何が埋まっていて、残りどのくらいで終わりそうか」が見える(スロット充足度やチェックリスト等の進捗可視化)。
- ターン数上限の決め方を、固定20から「必要な情報が揃ったら早めに終える/足りなければ延ばす」方針に見直す(UX1 の本筋被覆と連動)。

## 技術的な着手ポイント

- `lib/server/interview/slots.ts`
- `MAX_TURNS = 20` / `MIN_TURNS_BEFORE_FINISH = 4` / `isFinished` / `slotCompleteness`(進捗表示の元データに使える)。
- `components/session/SessionView.tsx`
- ヘッダーの `ターン {Math.min(session.currentQuestionIndex, MAX_TURNS)} / {MAX_TURNS}` 表示。進捗バー/スロットチェックリストの追加候補箇所。
- `allQuestionsAsked = currentQuestionIndex >= MAX_TURNS` が「完了」ボタン活性条件。
- `lib/server/interview/controller.ts`
- `currentQuestionIndex` の進め方、終了時に `MAX_TURNS` へジャンプさせる分岐。
- 進捗指標を API レスポンスに含めるか、既存の `extractedData` からフロント側で算出するかは要検討。

## 受け入れ条件

- [ ] 会話中に「必要項目のうちどこまで埋まったか」の進捗が確認できる
- [ ] 残りの目安(残ターンまたは残り確認項目)が職員に分かる
- [ ] ターン数上限の決め方が見直され、根拠が説明できる状態になっている(固定20の再検討)
- [ ] 早期終了・延長の挙動が既存シナリオを壊さない

## 優先度

高(デモ前に効く順で 1 → 3 → 2 の 2 番目)。ターン数を有効活用させ、脱線対策(UX1)を補強する。

> このIssueは Slack #gov_ai_agent での議論(Yuki Kawabe / sunagawa)に基づき起票されました。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with slotCompleteness and isFinished in lib/server/interview/slots.ts, then trace the turn index and finish behavior in lib/server/interview/controller.ts. Read the header and completion-button logic in components/session/SessionView.tsx to see where progress is shown. Done means staff can see required-item progress and an estimate of what remains, with revised turn limits that preserve existing scenarios.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.