Skip to content

feat(briefing): the current-sprint section lists open issues only (Done excluded in the JQL) - #95

Merged
LiminCode merged 1 commit into
mainfrom
feat/briefing-sprint-open-only
Nov 21, 2026
Merged

LiminCode merged 1 commit into
mainfrom
feat/briefing-sprint-open-only

Conversation

@LiminCode

Copy link
Copy Markdown
Owner

Summary

The "当前 Sprint" / "Current sprint" section of the work briefing now lists only open issues. The first version (#94) listed done issues too, at the end of each block; the user asked to skip them. The exclusion is in the JQL itself (statusCategory != Done), so done issues are neither fetched nor counted, and the block header becomes **<sprint name>** · 未完成 N 条 / · N open issues. Users who want done issues back can edit the prompt template (the {sprint_scope} placeholder keeps its place).

What changed and why

  • pet/work_briefing.py: zh and en sprint prompts. The per-sprint query is sprint = <id> AND statusCategory != Done {sprint_scope} ORDER BY …; the section intro says "全部未完成工单" / "every open issue"; the block header drops "已完成 M 条" / "M done"; the sentence "done issues go last" is replaced by "done issues are neither queried nor listed". Comment explains why.
  • tests/test_work_briefing_sources.py: the two sprint tests assert the new JQL in the built prompt, in the template and in the scoped/fallback renderings (zh and en), the new header, and that the old "已完成 M 条" / "排在段尾" / "go last" wording is gone. Red on main.
  • docs/work-assistant.md: the sprint paragraph (JQL, header, why Done is excluded, how to get it back). CHANGELOG.md: one line.

Performance

Prompt text only; same code paths as #94. timeit in the main venv, this branch: build_prompt() 13.4 µs (was 13.6 µs on #94), zh default prompt 2638 chars (was 2599). Runs once per generation. On the Claude side the section fetches fewer issues: the real run below took 139 s / $0.67 against 115 s / $0.69 for the same scope on #94 (the earlier run returned 11 issues of which 5 were done; this one returns the 5 that are still open). No new threads, files, syscalls or network paths.

Real-machine run

Real work_briefing.generate from this worktree (sonnet, medium, default sources, scope project = <my project> AND assignee = currentUser(), real WSL and connectors, output to a scratch folder, text not reproduced here — company content):

ok= True | error=  | seconds= 138.9 | turns= 26 | model= claude-sonnet-5-5 | cost= 0.6675764
servers: claude.ai Atlassian MCP connected (22 calls), Slack 2, Google Calendar 1
calls: 25 {getAccessibleAtlassianResources 1, getJiraIssue 8, listJiraIssueComments 7, list_events 1, searchJiraIssuesUsingJql 6, slack_search 2}
denied: []
## '当前 Sprint': 5 items, stars=0, first line starts '**<sprint name>** · 未完成 5 条(…'
sprint priorities in order: ['High', 'High', 'Normal', 'Normal', 'Normal']
sprint lines with 'Done/完成' status: 0 | last item has Done: False

Five open issues in Jira priority order, zero Done, header in the new form, no stars, 0 denied tools. The pet is restarted from main after the merge.

Tests

Red first: with the test edits alone the two sprint tests fail on main (old JQL, old header). Families run: tests/test_work_briefing*.py (9 files), test_settings_work_briefing.py, test_panorama_reports.py, test_i18n.py, test_pr_report_discipline.py — 169 passed; ruff check pet tests and git diff --check clean. Full suite not run: prompt text and its tests only; no interface, persisted data, lifecycle or platform change.

Docs

  • CHANGELOG.md: one line (user-visible change)
  • Topic doc under docs/ updated (work-assistant.md)
  • ADR: not needed

🤖 Generated with Claude Code

第一版把已完成的也列了出来(排段尾),用户要跳过。中英提示词的 sprint 查询加 statusCategory != Done,
删掉「已完成的排段尾」和段首的「已完成 M 条」;模板里 {sprint_scope} 占位符位置不变,用户改过的模板照样能填。
测试:tests/test_work_briefing_sources.py 两条 sprint 测试断言新 JQL、新段首、旧句子不再出现(改前红)。
文档:docs/work-assistant.md、CHANGELOG.md。

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@LiminCode
LiminCode merged commit 8f33cdb into main Nov 21, 2026
0 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.

1 participant