ghpm-suggest
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseghpm-suggest
ghpm-suggest
PREREQUISITE: Readfor prerequisites and error handling.../ghpm-shared/SKILL.md
Recommend what to work on next by assembling session context and project state, then reasoning about the best options.
前置要求: 阅读了解前置条件和错误处理方式。../ghpm-shared/SKILL.md
通过整合会话上下文和项目状态,推理出最优选项,为你推荐下一步的工作内容。
Arguments
参数
- — open-ended recommendation
/ghpm-suggest - — any natural language constraint, e.g.:
/ghpm-suggest <constraint>- "I have 2 hours"
- "I want to switch context"
- "I want to focus on frontend work"
- "something small"
- —— 开放式推荐
/ghpm-suggest - —— 任何自然语言形式的约束条件,例如:
/ghpm-suggest <constraint>- "我有2小时时间"
- "我想切换工作上下文"
- "我想专注于前端工作"
- "一些小任务"
Session Context
会话上下文
The following is auto-injected at invocation time. If any value is empty, that context is unavailable — skip it gracefully.
- Current repo: !
git remote get-url origin 2>/dev/null - Current branch: !
git branch --show-current 2>/dev/null - Recent commits: !
git log --oneline -5 2>/dev/null - Changed files: !
git diff --stat HEAD~5..HEAD 2>/dev/null - GitHub user: !
gh api user --jq '.login' 2>/dev/null
以下内容会在调用时自动注入。如果任何值为空,则表示该上下文不可用——请优雅地跳过相关内容。
- 当前仓库: !
git remote get-url origin 2>/dev/null - 当前分支: !
git branch --show-current 2>/dev/null - 最近提交记录: !
git log --oneline -5 2>/dev/null - 已修改文件: !
git diff --stat HEAD~5..HEAD 2>/dev/null - GitHub用户: !
gh api user --jq '.login' 2>/dev/null
Workflow
工作流程
Phase 1: Gather Context
阶段1:收集上下文
-
Project config (required): Follow the startup sequence in.
../ghpm-shared/SKILL.md -
Project items (required): Load cache per. Focus on non-Done items: ReadyForDev, Planned, InProgress.
../ghpm-shared/references/cache.md -
Session context: Use the auto-injected values above. If GitHub user is available, find items assigned to them in cache. Find items in Done status assigned to user (these indicate completed work, but no completion date is available).
-
Relevant views (optional — skip if session context unavailable):
- If in a repo that matches a component, that component's view is relevant.
- Team standup views that match the user's assignments are relevant.
- Triage views are always relevant (unassigned work).
Degraded mode: If only project config and items are available (no git context, no user identity), suggest based purely on project state: prioritize ReadyForDev items with no assignee, then Planned items.
-
项目配置(必填):遵循中的启动流程。
../ghpm-shared/SKILL.md -
项目任务项(必填):根据加载缓存。重点关注未完成的任务项:ReadyForDev(待开发)、Planned(已规划)、InProgress(进行中)。
../ghpm-shared/references/cache.md -
会话上下文:使用上面自动注入的值。如果GitHub用户信息可用,在缓存中查找分配给该用户的任务项。同时查找分配给该用户的Done(已完成)状态任务项(这些代表已完成的工作,但无完成日期信息)。
-
相关视图(可选——如果会话上下文不可用则跳过):
- 如果当前仓库与某个组件匹配,则该组件的视图为相关视图。
- 与用户分配任务匹配的团队站会视图为相关视图。
- 分类筛选视图始终相关(未分配的工作)。
降级模式:如果仅能获取项目配置和任务项(无git上下文、无用户身份信息),则纯粹基于项目状态给出建议:优先推荐无负责人的ReadyForDev任务项,其次是Planned任务项。
Phase 2: Reason and Suggest
阶段2:推理并推荐
-
With all context assembled, reason about what to suggest. Consider:
- Proximity: items in the same repo/component as current work require less context-switching.
- Momentum: items related to recently completed work — the user has warm context.
- Status: ReadyForDev items are higher priority than Planned (already vetted).
- Dependencies: items unblocked by the user's recent completions (parent/sub-issue relationships if visible in cache).
- Size: if the user mentioned time constraints, prefer smaller items.
- Breadth: if the user wants to switch context, suggest items in different components.
- Assignee: prefer items already assigned to the user, then unassigned items.
-
User constraints from arguments adjust the reasoning:
- "2 hours" / "something small" → prefer XS/S sized items
- "switch context" → prefer items in DIFFERENT components than recent work
- "<component name>" → filter to that component
- No constraint → balance proximity with priority
-
整合所有上下文后,推理出推荐内容。考量因素包括:
- 关联性:与当前工作在同一仓库/组件的任务项需要更少的上下文切换。
- 工作惯性:与最近完成的工作相关的任务项——用户已有相关背景知识。
- 状态:ReadyForDev任务项的优先级高于Planned任务项(已通过审核)。
- 依赖关系:用户最近完成的任务项所解除阻塞的任务项(如果缓存中可见父/子任务关系)。
- 规模:如果用户提到时间约束,优先推荐规模较小的任务项。
- 广度:如果用户想要切换上下文,推荐不同组件的任务项。
- 负责人:优先推荐已分配给用户的任务项,其次是未分配的任务项。
-
参数中的用户约束条件会调整推理逻辑:
- "2小时" / "一些小任务" → 优先推荐XS/S规模的任务项
- "切换上下文" → 优先推荐与最近工作所在组件不同的任务项
- "<组件名称>" → 筛选出该组件的任务项
- 无约束条件 → 平衡关联性与优先级
Phase 3: Present Suggestions
阶段3:呈现推荐内容
- Format per conventions in . Present suggestions in tiers — a top recommendation, strong alternatives, and optionally a "change of pace" option. The exact count is flexible (3-5 is typical), but every suggestion should earn its place.
../ghpm-shared/references/format.md
For each suggestion, explain why now — what makes this the right item at this moment. Be specific: mention deadlines, recent momentum, blocking relationships, or team context. Also explain how it fits the constraint (e.g., "2-hour fit: migrate a batch of test files, each is self-contained").
Based on your context:
Repo: <current repo>
Recent work: <summary of recent commits>
<component/team> affinity: <inferred from context>- 按照中的约定格式呈现。将推荐内容分为不同层级——一个首选推荐、几个优质替代选项,可选一个“换个节奏”的选项。具体数量灵活调整(通常3-5个),但每个推荐都要有充分的理由。
../ghpm-shared/references/format.md
对于每个推荐项,解释为什么是现在——是什么让这个任务项在此时成为合适的选择。要具体:提及截止日期、最近的工作惯性、阻塞关系或团队上下文。同时解释它如何符合约束条件(例如,“2小时适配:迁移一批测试文件,每个文件都是独立的”)。
基于你的上下文:
仓库: <当前仓库>
最近工作: <最近提交记录摘要>
<组件/团队>关联: <从上下文中推断>Top Recommendation
首选推荐
1. <title>
1. <标题>
- Issue: <repo>#<num>
- URL: <github url>
- Status: <status>
- Why now: <specific reasoning — deadlines, momentum, blocking, team needs>
- <constraint> fit: <how this fits the user's time/energy/focus constraint>
- 任务项: <仓库>#<编号>
- 链接: <github链接>
- 状态: <状态>
- 为什么是现在: <具体理由——截止日期、工作惯性、阻塞关系、团队需求>
- <约束条件>适配: <该任务项如何符合用户的时间/精力/聚焦约束>
Strong Alternatives
优质替代选项
2. <title>
2. <标题>
...
...
3. <title>
3. <标题>
...
...
If You Want a Change of Pace
如果你想换个节奏
4. <title>
4. <标题>
- (optional tier for lower-priority or different-domain options)
Include a summary table at the end for quick scanning:
| Priority | Issue | Status | Rationale |
|---|---|---|---|
| 1 | ... | ... | one-line why |
- Include issue URL for easy navigation.
- If user constraint was provided, note how it influenced the suggestions.
- If no good candidates found, say so and suggest running `/ghpm-view triage` to find unassigned work.- (可选层级,用于低优先级或不同领域的选项)
在末尾添加一个汇总表格以便快速浏览:
| 优先级 | 任务项 | 状态 | 理由 |
|---|---|---|---|
| 1 | ... | ... | 一句话理由 |
- 包含任务项链接以便快速跳转。
- 如果用户提供了约束条件,说明它如何影响推荐内容。
- 如果未找到合适的候选任务项,请告知用户并建议运行`/ghpm-view triage`查找未分配的工作。Tips
提示
- Read-only — never modifies the project or its items.
- 只读模式——绝不会修改项目或其任务项。
See Also
另请参阅
- ghpm-shared — Prerequisites and error handling
- ghpm-status — Project health dashboard
- ghpm-view — Drill into a specific view
- ghpm-work — Start a work session on an issue
- ghpm-shared —— 前置要求和错误处理
- ghpm-status —— 项目健康仪表盘
- ghpm-view —— 深入查看特定视图
- ghpm-work —— 开始某个任务项的工作会话