Skip to content

[3/7] Markdown & JSON output for N-level headings #179

Description

@shouze

Context

src/output.ts buildMarkdownOutput currently hardcodes ## ${group.sectionLabel} with no depth concept. buildJsonOutput has no section/team information at all today (flat results[]). ReplayOptions / buildReplayCommand serialize --group-by-team-prefix as a flat comma-separated string.

Part of EPIC #125. Depends on #177, #178.

Solution

  • Update buildMarkdownOutput to emit heading depth derived from the tree level from [1/7] Data model & core hierarchical grouping algorithm #177 (##, ###, ####, ...), capped at a sane max (e.g. H6).
  • Design and implement a JSON output shape carrying the hierarchy (nested sections tree, or a flat list with level/path per repo - decide and document as a breaking change).
  • Update ReplayOptions / buildReplayCommand to serialize the chain syntax (/ for depth, , for independent chains) and the consolidation flag from [2/7] Advanced consolidated rendering #178.
  • Keep docs/usage/team-grouping.md markdown example blocks in sync (full doc rewrite is issue v1.0.4 #7, but keep code samples correct here to ease review).

Acceptance Criteria

  • A 2-level grouped result renders ## for the top level and ### for the nested level in markdown output.
  • A 3-level grouped result renders up to ####.
  • JSON output exposes the hierarchy in a documented, stable shape.
  • The replay command reproduces the exact chain + consolidation flags used for the original run.

Definition of Done

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions