Feature: question catalog as rule pack type #136
Labels
No labels
coordination/cross-repo
coordination/needed
effort
large
effort
medium
effort
small
meta/duplicate
meta/planning
meta/wontfix
priority
high
priority
low
priority
medium
session
blocker
session
handover
session
next
status
blocked
status
done
status
in-progress
status
review
status
to-go
type
admin
type/architecture
type
bug
type
config
type
deployment
type
docs
type/documentation
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type
research
type
security
type/task
type/tech-debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DAW/fragjan#136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
fragjan can represent structured question catalogs in addition to file checks.
First use case: taking over an IT lead role in an interim mandate --
prepare questions, record answers, generate a status report.
Decisions
fragjan_pack/v1) withincludes.questionsnext to
includes.rules, installed like any other pack.fragjan_question/v1-- the rule schema is not extended(questions have no primitive and no severity).
phases,audiencesandsectionsunder
catalog:. The validator rejects unknown values; section orderdefines report order.
(
fragjan_answers/v1), never inside fragjan orvar/rules/.Reasons:
make upgrade-rulesoverwritesvar/rules/, answers areconfidential customer data, one catalog serves many mandates.
daw_error/v1).Migrated together with the rest of fragjan, not separately.
Schemas (minimal)
Question:
question_id,text,area,phase,audience(list),sectionAnswers:
pack_id,answers.<question_id>.status(
open|answered|not_applicable),answers.<question_id>.textCommands
fragjan catalog list --pack <id> [--phase] [--area] [--audience]fragjan catalog init --pack <id> <answers-file>-- template, allopenfragjan catalog report <answers-file>-- Markdown, grouped by section,open items at the end
Acceptance criteria
fragjan_question/v1andfragjan_answers/v1validated incore/validator/includes.questionsandcatalog:blockcore/commands/catalog.luawithlist,init,reportDAW/fragjan-templatesOut of scope
DAW/fragjan-templates)daw_error/v1Scope update and final answers schema
Scope
catalog list,catalog reportcatalog initdropped -- answers file is created bycatalog askWhy text moves out of YAML
daw.common.yaml1.2.0 cannot round-trip multiline text:dump()writes
\nescapes thatload()reads back literally, and blockscalars (
|) makeload()throw instead of returningnil, err.Answer text therefore lives in Markdown files next to the answers file.
Answers schema (fragjan_answers/v1, still unreleased)
answeredwithouttext_file-> warningdatechecked for format YYYY-MM-DD onlytext_file/ localfileschecked by the file layer,not the validator (missing -> warning)
Report blocks
critical: true, A -> B -> C -> D -> none, then catalog orderdates, chronological, past dates markedopenand unanswered questionsNotes for later (out of scope)
prioritydescribes an answer, not a task. Splitting intofindings/measures may follow.
answeredmeans documented, not verified.text = 123style type questions foropenanswers not defined.Schema update: catalog sections are { id, title } in YAML block form only (flow maps like {id: x} parse silently wrong). Answers gain optional title and updated (YYYY-MM-DD, set by hand until #137).
Done: catalog packs (loader, validators for catalog/questions/answers), catalog list and catalog report (Markdown file, default bericht.md next to answers). Deployment note: update fragjan before installing catalog packs -- older loaders fault on packs without includes.rules. Follow-ups: #137 (ask), #138 (loader cleanup), daw-lua-common#61, output via berhtjan.
Final notes:
(1) Correction to #7990 -- a referenced text_file that cannot be read is an error (no report written); only missing local evidence files are warnings.
(2) Acceptance criteria: validators, loader, init/list/report, exit 10 on unknown values and Lua 5.1/5.4 tests are done. catalog init restored: creates antworten.yaml (all questions open) and one Markdown template per question; manual workflow until #137. Test catalog lives as fixtures in fragjan test/fixtures/catalog instead of fragjan-templates.
(3) Critical points exclude not_applicable answers.
(4) Makefile: update-rules/upgrade-rules abort when var/rules and the system rules dir are the same symlinked directory.
(5) question_id restricted to letters, digits, - and _ (catalog and ad-hoc), since it becomes a file name in catalog init.
Update to (4) in #8026, superseded by
d2847e7: installed rule packs are always copies (cp -rpL). upgrade-rules replaces a symlinked system rules dir with copies; update-rules aborts and make install warns if the system rules dir is a symlink. The dev var/rules symlink to fragjan-templates stays intended.