关闭中断的七天试运行任务(07-16-legacy-task-runbook-closeout)
这个提交包含在:
@@ -62,6 +62,78 @@ rollback and future self-maintenance.
|
||||
- New work may mention an old Issue CSV for traceability, but must not require
|
||||
a new CSV unless the user explicitly requests legacy/export evidence.
|
||||
|
||||
## Scenario: Interrupted Or Superseded Task Closeout
|
||||
|
||||
### 1. Scope / Trigger
|
||||
|
||||
- Trigger: a Trellis task is interrupted, expired, cancelled or superseded and
|
||||
should leave the active-task list even though its original goal was not met.
|
||||
- Purpose: keep lifecycle state clean without turning archival metadata into a
|
||||
false claim that acceptance criteria or business outcomes were completed.
|
||||
|
||||
### 2. Signatures
|
||||
|
||||
- Command: `python3 ./.trellis/scripts/task.py archive <task-name>`.
|
||||
- Effects: moves the task under `.trellis/tasks/archive/<year-month>/`, writes
|
||||
`task.json.status=completed` and sets `completedAt`.
|
||||
|
||||
### 3. Contracts
|
||||
|
||||
- For interrupted or superseded tasks, `status=completed` means lifecycle
|
||||
closed; it does not mean the original goal or every acceptance criterion was
|
||||
achieved.
|
||||
- Before archive, add a `Lifecycle Closeout` section to `prd.md` and a concise
|
||||
`task.json.notes` summary covering: what was actually completed, what is
|
||||
missing, why the task stopped and which future task or condition replaces it.
|
||||
- Leave unmet acceptance checkboxes unchecked. Never create missing dates,
|
||||
tests, human confirmation or production evidence merely to make the archived
|
||||
task look complete.
|
||||
- Current indexes or runbooks must use the same closeout semantics when the task
|
||||
previously represented an active operational fact.
|
||||
|
||||
### 4. Validation & Error Matrix
|
||||
|
||||
- All acceptance criteria achieved with evidence -> normal completed archive.
|
||||
- Goal incomplete but closeout section and notes are explicit -> lifecycle
|
||||
archive is allowed; downstream readers must not infer goal completion.
|
||||
- Goal incomplete and closeout evidence is absent -> do not archive yet.
|
||||
- Historical evidence missing -> record it as missing; do not reconstruct or
|
||||
backdate evidence.
|
||||
|
||||
### 5. Good/Base/Bad Cases
|
||||
|
||||
- Good: a seven-day trial with only Day 1-Day 4 records is archived with the
|
||||
missing days, absent human closure and successor trial stated explicitly.
|
||||
- Base: a fully verified implementation is archived with its implementation and
|
||||
deployment commits referenced.
|
||||
- Bad: mark Day 5-Day 7 complete or check all PRD boxes only because the task is
|
||||
old and should disappear from the active list.
|
||||
|
||||
### 6. Tests Required
|
||||
|
||||
- `python3 ./.trellis/scripts/task.py validate <task-or-archive-path>`.
|
||||
- Inspect archived `task.json` for `status`, `completedAt` and truthful `notes`.
|
||||
- Run `node scripts/qa/check-trellis-governance.mjs` and `git diff --check`.
|
||||
- When the task affects current operational truth, run the documentation audit
|
||||
and verify index/runbook wording matches the closeout outcome.
|
||||
|
||||
### 7. Wrong vs Correct
|
||||
|
||||
#### Wrong
|
||||
|
||||
```json
|
||||
{ "status": "completed", "notes": "7 天试运行完成" }
|
||||
```
|
||||
|
||||
#### Correct
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "completed",
|
||||
"notes": "生命周期关闭:仅完成 Day 1-Day 4,原目标未完成;未来由新任务从 Day 1 替代。"
|
||||
}
|
||||
```
|
||||
|
||||
## Scenario: Codex Inline Context Manifests
|
||||
|
||||
### 1. Scope / Trigger
|
||||
|
||||
在新工单中引用
屏蔽一个用户