Skip to content

fix(summarise): use template.lock/RhizaTemplate model for template info; add output customisation flags#470

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/review-summarise-function
Draft

fix(summarise): use template.lock/RhizaTemplate model for template info; add output customisation flags#470
Copilot wants to merge 2 commits intomainfrom
copilot/review-summarise-function

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

rhiza summarise hardcoded jebel-quant/rhiza as the template reference whenever template.yml was absent or used the newer repository:/ref: key format. The last-sync grep also hardcoded "rhiza" in commit patterns, missing non-rhiza templates entirely.

Bug fixes

  • get_template_info() — replaced ad-hoc line-by-line YAML parsing with TemplateLock.from_yaml() (preferred, authoritative) → RhizaTemplate.from_yaml() fallback. Handles both template-repository/repository and template-branch/ref key formats. Returns ("", "") instead of hardcoding "jebel-quant/rhiza" when no config exists.
  • get_last_sync_date() — reads synced_at from template.lock first; builds git-log grep patterns from the actual template short name instead of the literal string "rhiza".

New output customisation options

CLI flag Effect
--no-header / --no-footer Suppress header or footer blocks
--no-categories Flat file list instead of grouped categories
--format markdown|plain|json Switch output format
--title <str> Override the section heading
--compare <ref> Diff working tree against a git ref instead of staged index
--template <file.j2> Render output via a custom Jinja2 template

The Jinja2 template context exposes: template_repo, template_branch, last_sync, sync_date, changes (added/modified/deleted lists), categories (dict), title.

Categorisation improvements

src/Source Code, docs/Documentation (alongside existing book/).

…on options

Agent-Logs-Url: https://github.com/Jebel-Quant/rhiza-cli/sessions/234c325c-d54a-467a-a73f-eb7e0fa17f74

Co-authored-by: HarryCampion <40582604+HarryCampion@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants