Skip to content

feat(cli): follow conversation language in status summaries - #1584

Merged
tiann merged 1 commit into
tiann:mainfrom
techotaku39:feat/notify-summary-prompt-language
Aug 16, 2026
Merged

feat(cli): follow conversation language in status summaries#1584
tiann merged 1 commit into
tiann:mainfrom
techotaku39:feat/notify-summary-prompt-language

Conversation

@techotaku39

Copy link
Copy Markdown
Contributor

Summary

  • Update the optional AGENT_NOTIFY_SUMMARY instruction to use the language used by the user in the current conversation for human-readable action and summary values.
  • Keep the change limited to the existing CLI prompt injection path.
  • Preserve the machine-readable footer, JSON fields, status values, and action-length guidance.
  • Add before/after prompt comparison and exact footer-format regression coverage.

Problem / Motivation

The status-summary instruction is written in English, so agents may produce English human-readable values even when the user is communicating in Chinese or another language.

For this use case, prompt guidance based on the current conversation is sufficient and avoids the additional state, synchronization, and API surface required by a UI-locale-based implementation.

Compatibility / Risk

  • The AGENT_NOTIFY_SUMMARY parser contract is unchanged.
  • No migration, configuration, or runtime service changes are required.
  • Language selection is prompt-guided rather than enforced by a persisted locale; mixed-language conversations may be less deterministic.

Validation

  • bunx vitest run src/modules/common/sessionSummaryInstruction.test.ts from cli/ — 9 passed.
  • bun run typecheck:cli — passed.
  • pwsh -NoProfile -File .\scripts\Invoke-HapiTaskPlaywright.ps1 -Name notify-summary-prompt-language -Suite Root -TestArgs terminal-wrap-fidelity.spec.ts — 2 passed.
  • bun run test:web — 259 files / 2,474 tests passed.
  • bun run test:shared — 262 tests passed.
  • bun run build — passed.
  • git diff --check — passed.
  • No Hub or Runner test environment was required for this prompt-only change.

Related Issues

Refs #1532

Related PRs

Supersedes #1548

AI Assistance

AI-assisted with OpenAI Codex using GPT-5.6.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • No findings.

Summary
Review mode: initial
No correctness, security, regression, data-loss, performance, or maintainability issue was found in the changed lines. Residual risk: language selection remains model-dependent; the added tests validate the static prompt and exact footer contract, but not emitted summaries across each supported agent flavor.

Testing

  • Not run (automation); executing code from PR content is disallowed by the review security policy. Static inspection completed; git diff --check passed.

HAPI Bot

@tiann
tiann merged commit d644d4f into tiann:main Aug 16, 2026
2 of 3 checks passed
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