Feature: interactive answer capture (catalog ask) #137

Open
opened 2026-10-13 05:46:54 +02:00 by michael · 2 comments
Owner

Goal

Capture answers during the conversation: fragjan asks, the user answers
in $EDITOR (e.g. EDITOR=hx), fragjan saves after every question.

Behaviour

  • fragjan catalog ask <answers-file> [--phase] [--area] [--audience]
  • Creates the answers file if missing
  • Asks only open questions, in catalog order
  • Opens <answers-dir>/antworten/<question_id>.md in $EDITOR,
    question shown as HTML comment (<!-- -->, no clash with headings)
  • Then asks in the terminal: status, critical, priority, dates, files
  • Empty answer = skip (stays open), - = not_applicable, q = quit
  • Ad-hoc question: add a new question (id, text, section) mid-session,
    stored under questions: in the answers file
  • Answers file written with yaml.dump()

Dependencies

  • sys:run_interactive(cmd) in daw-lua-common (TTY passthrough;
    run() / run_rc() use io.popen and capture output)
  • Line input via berhtjan-cli or daw.common.sys -- decide when common
    is migrated

Out of scope

  • Web form (later, like interim-crm)

Refs: DAW/fragjan#136

## Goal Capture answers during the conversation: fragjan asks, the user answers in `$EDITOR` (e.g. `EDITOR=hx`), fragjan saves after every question. ## Behaviour - `fragjan catalog ask <answers-file> [--phase] [--area] [--audience]` - Creates the answers file if missing - Asks only open questions, in catalog order - Opens `<answers-dir>/antworten/<question_id>.md` in `$EDITOR`, question shown as HTML comment (`<!-- -->`, no clash with headings) - Then asks in the terminal: status, critical, priority, dates, files - Empty answer = skip (stays open), `-` = not_applicable, `q` = quit - Ad-hoc question: add a new question (id, text, section) mid-session, stored under `questions:` in the answers file - Answers file written with `yaml.dump()` ## Dependencies - `sys:run_interactive(cmd)` in daw-lua-common (TTY passthrough; `run()` / `run_rc()` use `io.popen` and capture output) - Line input via berhtjan-cli or `daw.common.sys` -- decide when common is migrated ## Out of scope - Web form (later, like interim-crm) Refs: DAW/fragjan#136
Author
Owner

Update after #139 (0.5.1)

The answers model changed; catalog ask must write the new schema:

  • findings as dated list (append only, never overwrite); ask writes
    full timestamps (YYYY-MM-DDTHH:MM+HH:MM), hand-written entries may
    use date or date + time
  • statements reference conversations (party and date live there)
  • set updated when saving
  • answer text in antworten/<id>.md, evidence as
    { path, visibility }
  • catalog init was restored in #136 and creates answers file and
    templates; ask builds on it instead of replacing it
  • catalog sheet covers the paper/Helix conversation guide; ask is the
    interactive variant
## Update after #139 (0.5.1) The answers model changed; `catalog ask` must write the new schema: - `findings` as dated list (append only, never overwrite); ask writes full timestamps (YYYY-MM-DDTHH:MM+HH:MM), hand-written entries may use date or date + time - `statements` reference `conversations` (party and date live there) - set `updated` when saving - answer text in `antworten/<id>.md`, evidence as `{ path, visibility }` - `catalog init` was restored in #136 and creates answers file and templates; ask builds on it instead of replacing it - `catalog sheet` covers the paper/Helix conversation guide; ask is the interactive variant
Author
Owner

The question mechanism of this issue and the questions of the module-manager (DAW/daw-module-manager#24) are meant to be one mechanism that is the same in every UI (CLI, web, API, desktop). Asking in the editor (EDITOR) followed by prompts in the terminal is one way a terminal UI can offer an answer, not the protocol. The question, the form of the answer (daw_field_type/v1) and the delivery of both are to be neutral, and storing the answers afterwards is not a task of the UI layer (an answers-file module could do it). A first validation of the delivery path with one yes/no question of the module-manager is planned. This issue follows when that works end to end. The design above is not changed by this comment.

The question mechanism of this issue and the questions of the module-manager (DAW/daw-module-manager#24) are meant to be one mechanism that is the same in every UI (CLI, web, API, desktop). Asking in the editor (EDITOR) followed by prompts in the terminal is one way a terminal UI can offer an answer, not the protocol. The question, the form of the answer (daw_field_type/v1) and the delivery of both are to be neutral, and storing the answers afterwards is not a task of the UI layer (an answers-file module could do it). A first validation of the delivery path with one yes/no question of the module-manager is planned. This issue follows when that works end to end. The design above is not changed by this comment.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#137
No description provided.