Skip to content

Standup report renderer (ja/en) with golden tests #22

Description

@Saber5656

Title

Standup report renderer (ja/en) with golden tests

Summary

Implement the standup Markdown templates (Yesterday / Today / Blockers) for
Japanese and English with per-project one-liners, following DESIGN.md §9.2,
reusing the render infrastructure from 20.

Context

Standup output is the report users paste into team chat — it must be short,
scannable, and safe (redaction footer visible). The one-liner compression
rules here (subjects list truncation etc.) define its character.

Scope

  • internal/render/standup.go, templates/standup.ja.md.tmpl,
    templates/standup.en.md.tmpl, goldens, tests.

Detailed Requirements

  1. func Standup(r *model.Report) (string, error) — requires
    r.Standup != nil (error otherwise).
  2. Structure:
    1. Header: # Standup 2026-07-10 (木) (same weekday/zone rules as 20).
    2. ## 昨日 (2026-07-09) / ## Yesterday (2026-07-09) — the actual
      yesterday-bucket date (Friday on Mondays): per-project bullet:
      - **<project>** — 3 commits: subj1; subj2; +1 more · 2 agent sessions: title1; title2 — rules: ≤ 2 subjects then +N more
      (ja: 他N件), ≤ 2 session titles same rule, segments joined with
      ·, omit absent segments; shell-only activity (no projects) →
      single bullet - shell: N commands / - シェル操作: N件.
      Empty bucket → - (活動記録なし) / - (no recorded activity).
    3. ## 今日 / ## Today — same rules over the today bucket.
    4. ## ブロッカー / ## Blockers — always exactly:
      - (なし — 手動で記入してください) /
      - (none recorded — fill in manually);
      when r.Narrative.Text != "" append subsection
      ローカルLLMの示唆: / Suggested by local model: followed by the
      narrative text block (24 builds standup narratives as
      blocker/summary suggestions; visually attributed, DESIGN §9.2).
    5. Footer: same one-liner as 20.
  3. All content through escText/escCell equivalents (bullets are text
    context); subjects/titles use sanitize.Line output already, but
    escaping is still the renderer's responsibility.
  4. Goldens: (ja, en) × (typical two-bucket report, empty-yesterday +
    nonempty-today, both-empty, with-narrative) — 8 files.
  5. Length discipline: a typical report (3 projects × 4 commits) must fit in
    ≤ 25 lines (asserted on the typical fixture — standup is a summary, not
    a dump).

Acceptance Criteria

  • Goldens byte-exact cross-platform; -update supported.
  • Monday fixture shows Friday as the yesterday date in the heading.
  • Truncation rules (+N more/他N件) exact at boundaries 2 and 3.
  • Blockers placeholder always present; narrative subsection only with
    narrative.
  • Structural parity test between ja and en (same headings/order).
  • Line-count discipline test passes.
  • ≥ 90% coverage maintained on the render package.

Validation

go test -race -cover ./internal/render/ in PR; attach ja+en typical
goldens in the PR description.

Dependencies

06, 18, 19, 20 (shared infrastructure).

Non-goals

Collection/wiring (26), automatic blocker detection (v1 non-goal), custom
formats.

Design References

  • docs/DESIGN.md §9.2

Source of truth: docs/issues/21-render-standup.md (PR #1, branch docs/v1-design). If this issue and the repo docs disagree, the docs win. Execution order and dependencies: docs/ISSUE_PLAN.md (this is issue 21 of 33).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions