文件
wangsli和Claude Sonnet 5 c4025083af 落地任务复用治理规则与 worktree 对齐检查 [09-09-trellis-workflow-alignment]
2026-09-09 本地已验证完成、待交审的治理修复,一直未提交:

- 6 个 skill(trellis-before-dev/brainstorm/check/continue/finish-work/start)
  统一改为"先检查当前和直接相关既有任务,复用优先于新建",取代原来"复杂任务
  先请求新建 task"的默认动作;新增 worktree/active-task 一致性校验步骤。
- project-governance.md 新增两节:Task Reuse(任务复用判据)、Active Task And
  Worktree Alignment(激活任务与实际执行 worktree 一致性检查,防止跨 worktree
  会话把上一个任务的 workflow-state 当成当前任务)。
- workflow.md 的 Request Triage / Parent-Child 章节、no_task 面包屑同步改写。

本地已过 task validate、check-trellis-governance.mjs、check-process-contract.mjs、
audit-docs.mjs、git diff --check;无业务代码改动。

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-25 20:40:28 +08:00

1.7 KiB

name, description
name description
trellis-before-dev Load the task and affected-layer guidelines before implementation or when scope changes. Not for pure consultation or repeated reading of unchanged context.

Before Development

On entry or a scope/worktree change, verify official task.py current --source in the execution root matches the intended approved task. Correct a mismatch with task.py start <task> and read back current/phase before editing. Reuse this verification while unchanged; follow project-governance.md → Active Task And Worktree Alignment for degraded identity and worktree boundaries.

  1. Read the current PRD and applicable design/implementation notes if not already current in context.
  2. Identify the smallest behavior gap, affected files, exclusions and validation commands. Reuse the approved plan rather than writing another checklist.
  3. Discover package indexes only when the affected layer is unknown. Read its relevant coding and quality contracts; follow references needed for this change.
  4. Read cross-layer or reuse guides only when shared contracts, multiple layers, shared constants or new abstractions are involved.
  5. Once the plan is approved, continue through implementation and relevant validation. Ask again only for material changes to scope, risk or acceptance, or separately protected operations.
  6. Keep unrelated dirty files and pre-existing failures out of scope. A local refactor requires evidence that behavior stays unchanged.

Do not force full document reads, repeat unchanged context, require unavailable tools, or turn a rule-only task into full business testing. Preserve privacy, production and independent-review boundaries from AGENTS.md.