skills/align-planning/SKILL.md
Perform post-task traceback, drift detection, and top-down recalibration to keep planning (goals, requirements, milestones, roadmap) aligned with task execution.
npx skillsauth add nesnilnehc/ai-cortex align-planningInstall 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.
#技能(Skill):协调规划
通过运行任务后调整循环,使项目执行与更高级别的规划保持一致:从已完成的工作回溯到策略、检测偏差并生成自上而下的重新校准建议。
首要目标:任务完成后生成一份可操作的规划调整报告,其中包含明确的偏差分类和优先的重新校准行动。
成功标准(必须满足所有要求):
验收测试:队友能否阅读报告并立即了解计划是否仍与执行保持一致、存在哪些偏差、下一步做什么以及为什么?
本技能负责:
本技能不负责:
转交点:报告制作和审核后,按问题类型(需求、架构设计、规划、架构合规性或修复循环)移交给相关技能。
|场景|推荐顺序|
| ---| ---|
|日常任务完成 | align-planning(轻量级)|
|里程碑或释放门| align-planning(完整)→ 然后align-architecture |
|规划漂移疑似| 对齐规划 |
|需要设计与代码合规性| align-architecture (当规划也有问题时,在 align-planning 之后运行) |
当规划层对齐不确定时,先运行“align-planning”;在计划架构与代码验证的对齐之后运行“align-architecture”。
按 specs/artifact-contract.md §8 Runtime Norms Resolution Protocol 的 §8.2 / §8.3 / §8.5 实现:读项目规范若声明了 planning-alignment artifact_type 的 path_pattern,则使用项目值;否则 fall through 到技能默认(docs/calibration/planning-alignment.md)。本技能为固定路径治理产出,只用 path_pattern 覆盖机制。
在执行开始时,遵循以下指令合同:
You are responsible for planning alignment.
When a task is completed, perform traceback analysis to ensure planning
(goals, requirements, milestones, roadmap) is aligned with execution,
and produce a structured Planning Alignment Report.
轻量级,除非发布/里程碑/史诗);工作区中的文档根目录docs/、docs/需求/、docs/路线图*、*.md)或建议discover-docs-norms来建立路径;报告假定的映射,如果不明确则要求确认在回溯之前评估证据质量:
规则:
强 -> 高置信度弱 -> 中等置信度失踪 -> 低信心或被阻止该技能仅涵盖规划层。架构与代码合规性由“align-architecture”处理。
对齐 | 部分 | 错位 | 未知canonical(项目文档)次要(问题/PR/提交上下文)无将每个漂移项分类为(仅限规划层):
对于实现与设计的偏差,请交给“align-architecture”。
对于每个项目,输出:
类型影响范围
-“根本原因”
-“严重性”(“低”|“中”|“高”)1.从顶层向下重新推导优先级(目标→要求→里程碑→路线图→待办事项) 2. 产生重新校准动作:
将报告写至:
docs/ARTIFACT_NORMS.md 或 .ai-cortex/artifact-norms.yaml)docs/calibration/planning-alignment.md(除非明确请求快照,否则覆盖)除了人类可读的部分之外,报告还必须包含机器可读的漂移块(YAML 或 JSON)。 报告还必须包括证据准备块和明确的置信度。
# Planning Alignment Report: <task title>
**Date:** YYYY-MM-DD
**Mode:** Lightweight | Full
**Status:** aligned | partial | misaligned | blocked
**Confidence:** high | medium | low
## Completed Task
- Summary:
- Outcome:
## Traceback Path
Task Backlog -> Roadmap -> Milestones -> Requirements -> Project Goals
## Evidence Readiness
- Readiness: strong | weak | missing
- Missing Layers:
- Secondary Sources Used:
## Alignment Status
- Goal Alignment:
- Requirement Alignment:
- Milestone Alignment:
- Roadmap Alignment:
## Drift Detected
- Type:
Impact Scope:
Root Cause:
Severity:
## Impact Analysis
- Delivery impact:
- Technical impact:
- Planning impact:
## Calibration Suggestions
1.
2.
3.
## Recommended Next Tasks
1.
2.
3.
## Machine-Readable Drift
drifts:
- driftType: "Requirement Drift"
severity: "medium"
owner: "product-team"
dueWindow: "next-sprint"
impactScope: "Search filter acceptance criteria"
rootCause: "Requirement updated to include keyboard navigation; task covered only click interactions"
evidence:
readiness: "weak"
confidence: "medium"
missingLayers:
- "docs/requirements-planning/search-improvements.md"
secondarySources:
- "PR#142"
- "commit:abc1234"
不要做这些(其他技能可以处理它们):
分析需求设计解决方案review-codebase、generate-standard-readme、generate-agent-entry (根据需要按顺序运行)run-repair-loop何时停止并交接:
团队成员是否可以在不进行额外说明的情况下执行最重要的 1-3 个建议,并解释为什么它们具有最高优先级?
如果否:报告不完整;完善追溯证据和重新校准细节。
如果是:报告完成;继续进行转交或执行计划。
上下文:已完成的任务更新搜索过滤器 UI 行为。
模式分辨率:没有显式覆盖,没有发布/里程碑/史诗标记 → 轻量级。
回溯:
漂移:
-“需求漂移”(中):需求措辞更改为包括键盘导航;已完成的任务仅涵盖点击交互
校准:
1.添加键盘导航后续任务 2. 在合并相关 UI 任务之前移动可访问性验收检查 3. 重新排序待办项目以解锁回归测试
上下文:API 网关身份验证推出后标记为“里程碑关闭”的里程碑。
模式分辨率:标记命中 → 完全。
回溯:
漂移:
优先级漂移(高):待办中未促进迁移工作校准:
align-architecture 进行架构与代码合规性检查上下文:已完成的任务没有要求 ID 或路线图链接。
行为:
结果:
本技能产出 Planning Alignment Report,机器可读片段须满足下表结构:
| 元素 | 格式 | 必填字段 | 路径模式 |
| :--- | :--- | :--- | :--- |
| 报告主体 | Markdown | front-matter(artifact_type/created_by/lifecycle);章节:摘要 / 任务回溯链 / 漂移项 / 重新校准建议 | docs/calibration/planning-alignment.md(默认;如需快照另起 -snapshot 副本) |
| 漂移条目 | 列表项 | id / drift_type(goal_decoupled / requirement_orphan / roadmap_stale / task_unanchored)/ artifact_path / evidence / suggested_fix | 报告正文「漂移项」节 |
| 证据准备度 | 标量 | readiness / confidence / scanned_artifacts / missing_artifacts | 报告正文「摘要」节 |
| 机器可读块 | YAML fenced yaml drifts: | drifts[] 每项含 id/drift_type/severity/artifact_path/fix_kind;evidence_readiness 顶层字段 | 报告正文末尾,供 plan-next 消费 |
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.