Skip to content

[Phase B5] Format- and persona-aware fixed question sets #25

@terisuke

Description

@terisuke

Tracked under ADR 0002 — Phase B. Detail: implementation plan §B5.

Problem

The fixed nine questions live as a JS literal in static/js/script.js and are identical regardless of who is writing or what they are publishing. A Zenn technical tutorial needs questions about target stack, runtime, and prerequisite knowledge; a note essay needs opening episode, personal context, and reader emotion. Asking the wrong nine questions wastes the user's time and produces a brief that does not match the format.

Scope

Move the fixed-question definition server-side into internal/domain/brief/questions/:

  • base.go — common to all (theme, reader, exclusions).
  • narrative.go — extension for note_article + markdown_blog (opening_episode, personal_context, expected_reader_action, tone_stance, target_length_structure).
  • technical.go — extension for zenn_article + qiita_article (target_stack, runtime_env, prerequisite_knowledge, code_examples, references).
  • homepage.go — extension for homepage_section (target_conversion, primary_cta, brand_voice).

InterviewService composes base + persona_extension + format_extension at session start. Personas can also contribute extra questions (e.g., Cloudia could ask "クラウディア視点での感想は?").

Acceptance criteria

  • Starting a cloudia × zenn_article session asks technical questions including target_stack.
  • Starting a terisuke × note_article session is byte-identical to the current question set (regression safety).
  • Custom questions added via the existing config UI are appended after the composed list.
  • Question composition is unit-tested across all 5 formats × 2 personas combinations.
  • Frontend reads questions from a new GET /api/brief-sessions/templates?persona_id=X&format_id=Y endpoint instead of hard-coded JS.

Dependencies

  • B1 (Persona/Format domain), B3 (formats registered).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions