feat(cli): add --debug flag to print primitive metrics #87

Closed
opened 2026-05-26 20:43:00 +02:00 by michael · 1 comment
Owner

Goal

Add --debug flag to fragjan CLI that enables verbose primitive output.

When --debug is active, runner.lua prints raw metrics for each primitive
call to stderr, e.g.:

[DEBUG] core/runner.lua: metrics: {"match_count":1,"matches":[...]}

Useful for diagnosing silent rule misses (wrong pattern, whitespace issues,
unexpected primitive output).

Acceptance criteria

  • --debug flag accepted by fragjan code and fragjan article commands
  • metrics printed to stderr per primitive call when --debug active
  • no output when --debug not set
## Goal Add --debug flag to fragjan CLI that enables verbose primitive output. When --debug is active, runner.lua prints raw metrics for each primitive call to stderr, e.g.: [DEBUG] core/runner.lua: metrics: {"match_count":1,"matches":[...]} Useful for diagnosing silent rule misses (wrong pattern, whitespace issues, unexpected primitive output). ## Acceptance criteria - [ ] --debug flag accepted by fragjan code and fragjan article commands - [ ] metrics printed to stderr per primitive call when --debug active - [ ] no output when --debug not set
Author
Owner

Implemented: --debug flag prints primitive metrics per rule/file call to stderr. Works for both fragjan code and fragjan article commands.

Implemented: --debug flag prints primitive metrics per rule/file call to stderr. Works for both fragjan code and fragjan article commands.
michael 2026-05-27 08:26:58 +02:00
michael added this to the Basic Version milestone 2026-05-30 16:04:44 +02:00
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#87
No description provided.