Skip to content

[2/7] Advanced consolidated rendering #178

Description

@shouze

Context

Issue #125's third proposal asks for a more compact rendering mode: instead of one heading per nesting level, collapse chains where a parent has a single meaningful branch into one heading with a summary suffix, e.g. gamme-lead-client (including p1, unset, etc.) instead of separate ##/### headings. This builds directly on the tree produced by #177.

Part of EPIC #125. Depends on #177.

Solution

  • Add a pure consolidation function (in src/group.ts or a new src/consolidate.ts) that walks the tree from [1/7] Data model &amp; core hierarchical grouping algorithm #177 and collapses single-branch-per-level chains into one node, synthesizing a label like "<parent> (including <child1>, <child2>, ...)".
  • Define and implement the activation mechanism: a dedicated CLI flag (name TBD, e.g. --group-by-team-prefix-consolidate) or a heuristic threshold - finalize and document the chosen approach in the PR.
  • Keep the underlying tree structure intact for JSON output (issue chore release v1.0.2 #3) even when the markdown rendering consolidates; document how the two interact.

Acceptance Criteria

  • A tree with a single child at every level below the root is collapsed into one heading with an "(including ...)" suffix listing the collapsed branch labels.
  • A tree with multiple children at some level is NOT collapsed at that level (only chains that are unambiguous are consolidated).
  • The activation flag/mode is off by default unless decided otherwise in the PR (document the decision).

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