skills/prioritize-backlog/SKILL.md
Force a clean re-score of every backlog item with four frameworks (RICE, WSJF, MoSCoW, ICE) in parallel — ignores any existing priority, auto-detects multi-file or single-file backlog layouts, surfaces framework disagreements, and captures the user's final decision with rationale.
npx skillsauth add nesnilnehc/ai-cortex prioritize-backlogInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
用多个价值框架并行评估一批 backlog 条目,呈现框架间的分歧,由用户做出优先级决策并记录依据。
首要目标:对一批 backlog 条目(无视当前 priority 状态)执行强制全量重评,给出用户确认后的新 priority 与 priority_decision,并写回各自所在的 backlog 形态(多文件目录或单文件)。
成功标准(必须全部满足):
priority 由用户确认,不是算法输出priority_decision 字段(含 previous 旧值快照,便于回看本次覆盖了什么)multi-file / yaml-list / h2-yaml / table),并按该形态执行写回验收测试:读者能否从 backlog 条目的 frontmatter / yaml 块 / 表格行直接看到新 priority + 决策依据 + 被覆盖的旧值,不用反查对话?
本技能负责:
本技能不负责:
capture-work-items)promote-roadmap-items)previous 单字段;如需 history 由调用方负责)交接点:评分完成后交给 promote-roadmap-items 做 backlog → roadmap 晋升。
capture-work-items 批量捕获后建议触发plan-next 输出的大缺口被 capture 后进入评分backlog.md)也能直接处理形态探测(按优先级尝试,命中即停)
| 优先级 | 形态 | 探测条件 |
|---|---|---|
| 1 | multi-file | docs/process-management/backlog/ 或 docs/backlog/ 存在,且至少一个 *.md 文件含 artifact_type: backlog-item 或 priority: frontmatter 字段 |
| 2 | yaml-list | 单文件 docs/process-management/backlog.md 或 docs/backlog.md 存在,frontmatter 或顶层 YAML 含 items: 数组 |
| 3 | h2-yaml | 同上单文件,正文中存在 ## <title> 标题紧随 yaml … 代码块 |
| 4 | table | 同上单文件,正文存在含 Title 与 Priority(或等价列)的 Markdown 表格 |
优先吃项目自定义路径(若存在 .ai-cortex/artifact-norms.yaml 或 docs/ARTIFACT_NORMS.md 中的 backlog-item.path_pattern)。
全未命中 → halt 报告"未发现可识别的 backlog 形态",提示先运行 capture-work-items。
检测到混合形态(既有目录又有单文件)→ 默认采用 multi-file 并在报告里告知用户单文件被忽略;不双写,避免不一致。
读取 docs/project-overview/strategic-goals.md(用于 WSJF 的 Cost of Delay 判断和 MoSCoW 的 Must 判断)。
枚举全部条目(不再筛选 priority: unset):把已有 priority / priority_decision 仅作 audit log 显示,不参与新评分,避免锚点偏差。
若条目总数 = 1 → halt 并警告:"单条评分会丢失对比性。建议至少 2 条一起评。是否继续?"
对每个条目同时计算:
RICE = (Reach × Impact × Confidence) / Effort
映射为优先级等级: | RICE 分数 | 级别 | |---|---| | ≥ 1000 | P0 | | 200-1000 | P1 | | 50-200 | P2 | | < 50 | P3 |
(阈值是默认示例,项目可自定)
WSJF = Cost of Delay / Job Size
映射为优先级等级(按当前 backlog 的 WSJF 分位数): | WSJF 分位 | 级别 | |---|---| | Top 10% | P0 | | 10-30% | P1 | | 30-70% | P2 | | Bottom 30% | P3 |
按承诺层级分类:
ICE = Impact × Confidence × Ease
映射: | ICE 分数 | 级别 | |---|---| | ≥ 500 | P0 | | 200-500 | P1 | | 50-200 | P2 | | < 50 | P3 |
对每个条目计算框架间最大分歧:
| 分歧级差 | 处理 | |---|---| | ≤ 1 级(如 P1 vs P2) | 默认采用 RICE 结果,无需人工决策 | | ≥ 2 级(如 P0 vs P3) | 显式 surface,必须人工决策 |
分歧阈值项目可自定(默认 2 级)。
输出格式:
## Batch Scoring Summary
| # | Title | RICE | WSJF | MoSCoW | ICE | 分歧 | 建议 |
|---|---|---|---|---|---|---|---|
| 1 | ... | P1 | P1 | Should | P2 | 1 级 | 自动采 P1 |
| 2 | ... | P3 | P1 | Could | P3 | 2 级 | **需人工** |
| ... |
## 需人工决策的条目(分歧 ≥ 2 级)
### Item #2: <title>
- RICE=P3 理由:Reach 仅 10 人、Effort 8 周
- WSJF=P1 理由:Q3 里程碑依赖本项,Cost of Delay 高
- MoSCoW=Could
- ICE=P3
**分歧焦点**:时间敏感性(WSJF)vs 规模(RICE)
**请决策**:P? 理由?
对每个条目:
确定最终 priority(自动采信或用户输入)。
构造 priority_decision 字段内容,必含 previous:
priority_decision:
final: P<N>
previous: P<N> | unset
frameworks:
rice: P<N>
wsjf: P<N>
moscow: Must | Should | Could | Won't
ice: P<N>
rationale: <one-sentence reason if disagreement was ≥ 2 levels>
decided_by: auto | user
decided_at: <ISO date>
按形态写回:
| 形态 | 写回方式 |
|---|---|
| multi-file | 更新各 *.md 文件 frontmatter 的 priority + priority_decision |
| yaml-list | 修改单文件中 items[i].priority + items[i].priority_decision,保持 YAML 缩进与键序 |
| h2-yaml | 替换该条目对应 yaml 代码块内的 priority + priority_decision,保持代码块位置 |
| table | 更新表格 Priority 单元格;priority_decision 写到表格下方 ## Priority Decisions 小节,按条目锚点列出 |
写回前确认:旧值已记录到 priority_decision.previous,避免被静默吞掉。
报告头必须包含:
Backlog mode: multi-file | yaml-list | h2-yaml | tableRe-scored items: N (含 X 条覆盖了原 priority;Y 条原为 unset)报告体:
promote-roadmap-items 批量晋升)输入:见 frontmatter input_schema —— backlog 目录、strategic-goals.md、可选阈值覆盖。
输出:对话批量评分表 + 每个 backlog 文件 frontmatter 被更新(priority 和 priority_decision 字段)。
priority 与 priority_decision,旧值仅以 previous 单字段保留,不做历史归档(保持技能单一职责,归档由调用方负责)capture-work-items 的职责)不做(其他技能负责):
| 动作 | 归属 |
|---|---|
| 创建新 backlog 条目 | capture-work-items |
| 把 backlog 条目晋升进 roadmap | promote-roadmap-items |
| 任务拆分 | AgentFabric runtime(不在 AI Cortex 范围) |
| 需求详细记录 | capture-work-items |
priority_decision.rationale —— 必须具体引用框架或数据priority_decision.previous 必须写入;让用户能在一处看到本次改动了什么multi-file / yaml-list / h2-yaml / table)并按形态写回capture-work-itemspriority_decision 写回,含 frameworks 结果、rationale(若分歧)、previous 旧值快照Backlog mode、覆盖统计、优先级分布、下一步建议promote-roadmap-items输入:docs/process-management/backlog/ 下 5 个条目,混合状态 —— 3 个 priority: unset、1 个 priority: P2(旧)、1 个 priority: P3(旧)。
形态探测:命中 multi-file。
输出摘要:
Backlog mode: multi-file
Re-scored items: 5 (含 2 条覆盖了原 priority;3 条原为 unset)
## Batch Scoring Summary
| # | Title | 旧 | RICE | WSJF | MoSCoW | ICE | 分歧 | 建议 |
|---|---|---|---|---|---|---|---|---|
| 1 | 支付 API 响应时间优化 | unset | P1 | P1 | Should | P1 | 0 级 | **自动 P1** |
| 2 | ARTIFACT_NORMS 格式升级 | P3 | P3 | P3 | Could | P3 | 0 级 | **自动 P3(与旧值一致)** |
| 3 | Q3 支持多币种 | unset | P2 | P0 | Must | P2 | 2 级 | **需人工** |
| 4 | 登录错误 500 修复 | P2 | P1 | P2 | Should | P1 | 1 级 | **自动 P1(覆盖旧 P2)** |
| 5 | 新增技术债:重构 auth 模块 | unset | P3 | P2 | Could | P2 | 1 级 | 自动 P3 |
## 需人工决策:Item #3
(同前略)
写回结果片段(Item #4,被覆盖的条目):
priority: P1
priority_decision:
final: P1
previous: P2
frameworks:
rice: P1
wsjf: P2
moscow: Should
ice: P1
decided_by: auto
decided_at: 2026-04-17
输入:docs/backlog.md 维护一份"轻量 backlog",每条目是 H2 标题 + 行内 yaml 块:
## 支付 API 响应时间优化
```yaml
strategic_goal_id: goal-1
priority: P2
原因:…
strategic_goal_id: goal-1
priority: unset
…
**形态探测**:multi-file 路径不存在 → yaml-list 不命中 → **命中 `h2-yaml`**。
**写回方式**:替换每条对应的 yaml 代码块内的 `priority` + `priority_decision`,保留代码块外的描述正文不变;`priority_decision.previous` 写入旧值(一条原为 P2,一条为 unset)。
报告头:`Backlog mode: h2-yaml`、`Re-scored items: 2 (含 1 条覆盖了原 priority;1 条原为 unset)`。
---
development
Generate an LLM agent test suite (golden cases, mock-LLM unit tests, evaluator harness) from an agent implementation and its agent-test contract. Use when an agent has no tests, or a contract exists but the test code is missing.
development
After code changes, auto-detect the project's build system and local deployment method for a given directory, then build the project and restart its locally-deployed environment (Docker Compose / systemd / process manager). Never assumes — asks only when detection is ambiguous. Caches detected commands per project in .cortex/redeploy-local.yaml; re-invocations on the same project skip re-scanning until signal files change, the cache expires (30 days), or the skill version bumps.
tools
Publish a NATS message conforming to a cross-team contract, using NATS MCP tools. Authors the contract on first use if missing. Reads project-level cache (.cortex/nats.yaml) to avoid re-prompting basics across sessions.
tools
Drain pending NATS messages from a producer contract via NATS MCP tools (default batch / drain-style). Applies Tolerant Reader semantics and per-message ack/nak/term, returning aggregated stats. Reads project-level cache (.cortex/nats.yaml) to avoid re-prompting.