cc-devflow 4.5.16 → 4.5.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/cc-act/CHANGELOG.md +6 -0
- package/.claude/skills/cc-act/PLAYBOOK.md +2 -2
- package/.claude/skills/cc-act/SKILL.md +12 -2
- package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +6 -0
- package/.claude/skills/cc-act/references/closure-contract.md +3 -2
- package/.claude/skills/cc-act/scripts/evaluate-postmortem-trigger.sh +93 -0
- package/.claude/skills/cc-act/scripts/render-pr-brief.sh +26 -0
- package/CHANGELOG.md +18 -0
- package/docs/examples/example-bindings.json +1 -1
- package/docs/examples/local-handoff/README.md +1 -1
- package/docs/examples/pdca-loop/README.md +1 -1
- package/docs/guides/project-postmortem.md +8 -0
- package/package.json +1 -1
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# CC-Act Skill Changelog
|
|
2
2
|
|
|
3
|
+
## v1.9.3 - 2026-05-17
|
|
4
|
+
|
|
5
|
+
- add `evaluate-postmortem-trigger.sh` so FIX closeout, task-recorded incident markers, and session rework triggers produce an explicit postmortem gate decision
|
|
6
|
+
- render the postmortem trigger verdict into `pr-brief.md` so handoff material records whether an incident postmortem is required
|
|
7
|
+
- require final closeout to report either `POSTMORTEM_REQUIRED=no` or the written incident path instead of relying on implicit model memory
|
|
8
|
+
|
|
3
9
|
## v1.9.2 - 2026-05-17
|
|
4
10
|
|
|
5
11
|
- make `render-pr-brief.sh` resolve `Output language` from `task.md` or runtime config and render PR handoff headings, metadata, and placeholders in Chinese when configured
|
|
@@ -19,10 +19,10 @@ Everything else is Git history, PR history, or final response.
|
|
|
19
19
|
2. Run or cite the current validation commands.
|
|
20
20
|
3. Commit any remaining owned changes.
|
|
21
21
|
4. Build `pr-brief.md` only when PR/handoff needs it.
|
|
22
|
-
5.
|
|
22
|
+
5. Run `evaluate-postmortem-trigger.sh`; write incident postmortem when it returns `POSTMORTEM_REQUIRED=yes`.
|
|
23
23
|
6. Push/create/update PR when requested and available.
|
|
24
24
|
7. Archive completed change only after merge or explicit closeout.
|
|
25
25
|
|
|
26
26
|
## Blockers
|
|
27
27
|
|
|
28
|
-
Return to `cc-check` when evidence changed. Return to `cc-do` when implementation is unfinished. Do not patch around missing proof in Act.
|
|
28
|
+
Return to `cc-check` when evidence changed. Return to `cc-do` when implementation is unfinished. If the postmortem gate depends on session-only rework evidence, pass it as `--trigger <short-label>` instead of silently dropping it. Do not patch around missing proof in Act.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cc-act
|
|
3
|
-
version: 1.9.
|
|
3
|
+
version: 1.9.3
|
|
4
4
|
description: Use when verified work must be committed, handed off, pushed, or turned into a PR with the smallest durable delivery surface.
|
|
5
5
|
triggers:
|
|
6
6
|
- 准备提 PR
|
|
@@ -19,6 +19,7 @@ reads:
|
|
|
19
19
|
- docs/guides/project-postmortem.md
|
|
20
20
|
- ../cc-dev/scripts/resolve-cc-devflow.sh
|
|
21
21
|
- scripts/ensure-ship-branch.sh
|
|
22
|
+
- scripts/evaluate-postmortem-trigger.sh
|
|
22
23
|
writes:
|
|
23
24
|
- path: devflow/changes/<change-key>/handoff/pr-brief.md
|
|
24
25
|
durability: durable
|
|
@@ -39,12 +40,13 @@ effects:
|
|
|
39
40
|
entry_gate:
|
|
40
41
|
- "Resolve the CLI with `../cc-dev/scripts/resolve-cc-devflow.sh require config`."
|
|
41
42
|
- "Read `task.md`, Git status, latest commits, validation evidence, and current PR state when relevant."
|
|
43
|
+
- "Run `scripts/evaluate-postmortem-trigger.sh --dir <change-dir>` before deciding no incident postmortem is needed."
|
|
42
44
|
- "If verification changed during Act, return to `cc-check`."
|
|
43
45
|
- "Pick one mode: `create-pr`, `update-pr`, `local-handoff`, or `post-merge-closeout`."
|
|
44
46
|
exit_criteria:
|
|
45
47
|
- "All completed work is committed with coherent Conventional Commit messages."
|
|
46
48
|
- "PR mode writes or refreshes only `handoff/pr-brief.md`."
|
|
47
|
-
- "
|
|
49
|
+
- "Postmortem trigger gate is explicit: either `POSTMORTEM_REQUIRED=no` is reported, or the incident postmortem path is written."
|
|
48
50
|
- "No process file is created beyond the allowed durable outputs."
|
|
49
51
|
- "Push, PR, or local handoff status is explicit."
|
|
50
52
|
reroutes:
|
|
@@ -83,12 +85,20 @@ tool_budget:
|
|
|
83
85
|
|
|
84
86
|
## Postmortem
|
|
85
87
|
|
|
88
|
+
先运行:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
scripts/evaluate-postmortem-trigger.sh --dir devflow/changes/<change-key>
|
|
92
|
+
```
|
|
93
|
+
|
|
86
94
|
只在这些情况写 incident postmortem:
|
|
87
95
|
|
|
88
96
|
1. change key 是 `FIX-*`。
|
|
89
97
|
2. 暴露重复 AI、流程、测试、release、Git 或架构错误。
|
|
90
98
|
3. 用户明确要求记录教训。
|
|
91
99
|
|
|
100
|
+
如果本轮会话出现了返工、reroute、三次修补仍失败、发布/Git/验证工具异常,但这些信号还没有进入 `task.md` 或 Git history,调用脚本时用 `--trigger <short-label>` 把会话证据纳入本次 gate。没有触发时,最终响应也必须写明 `POSTMORTEM_REQUIRED=no`。
|
|
101
|
+
|
|
92
102
|
尸检报告必须基于 Git 证据和验证命令。不要把教训拆成额外原则文件。
|
|
93
103
|
|
|
94
104
|
## Commit Rule
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
1. Git commits are the process record.
|
|
12
12
|
2. PR text is rebuilt from current commits, diff, `task.md`, and fresh validation.
|
|
13
13
|
3. Incident postmortems are factual and evidence-backed.
|
|
14
|
-
4.
|
|
15
|
-
5.
|
|
14
|
+
4. `cc-act` must make the postmortem trigger decision explicit with `POSTMORTEM_REQUIRED=yes/no`.
|
|
15
|
+
5. No process file beyond the allowed durable outputs.
|
|
16
|
+
6. If verification changes during Act, return to `cc-check`.
|
|
16
17
|
|
|
17
18
|
## Exit
|
|
18
19
|
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
usage() {
|
|
6
|
+
cat <<'EOF'
|
|
7
|
+
Usage: evaluate-postmortem-trigger.sh --dir path/to/change [--repo-root path/to/repo] [--date YYYY-MM-DD] [--trigger label]
|
|
8
|
+
EOF
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
REQ_DIR=""
|
|
12
|
+
REPO_ROOT=""
|
|
13
|
+
TODAY=""
|
|
14
|
+
SESSION_TRIGGERS=""
|
|
15
|
+
|
|
16
|
+
while [[ $# -gt 0 ]]; do
|
|
17
|
+
case "$1" in
|
|
18
|
+
--dir) REQ_DIR="$2"; shift 2 ;;
|
|
19
|
+
--repo-root) REPO_ROOT="$2"; shift 2 ;;
|
|
20
|
+
--date) TODAY="$2"; shift 2 ;;
|
|
21
|
+
--trigger)
|
|
22
|
+
SESSION_TRIGGERS="${SESSION_TRIGGERS}${SESSION_TRIGGERS:+$'\n'}$2"
|
|
23
|
+
shift 2
|
|
24
|
+
;;
|
|
25
|
+
-h|--help) usage; exit 0 ;;
|
|
26
|
+
*) echo "Unknown arg: $1" >&2; usage; exit 1 ;;
|
|
27
|
+
esac
|
|
28
|
+
done
|
|
29
|
+
|
|
30
|
+
if [[ -z "$REQ_DIR" || ! -d "$REQ_DIR" ]]; then
|
|
31
|
+
usage
|
|
32
|
+
exit 1
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
if [[ -z "$TODAY" ]]; then
|
|
36
|
+
TODAY="$(date +%F)"
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
if [[ -z "$REPO_ROOT" ]]; then
|
|
40
|
+
REPO_ROOT="$(git -C "$REQ_DIR" rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
44
|
+
source "$script_dir/cc-act-common.sh"
|
|
45
|
+
|
|
46
|
+
change_dir="$(req_act_change_dir "$REQ_DIR")"
|
|
47
|
+
task_file="$(req_act_tasks_path "$change_dir")"
|
|
48
|
+
change_key="$(basename "$change_dir")"
|
|
49
|
+
incident_path="devflow/postmortems/incidents/$TODAY-$change_key.md"
|
|
50
|
+
index_path="devflow/postmortems/INDEX.md"
|
|
51
|
+
triggers=""
|
|
52
|
+
|
|
53
|
+
add_trigger() {
|
|
54
|
+
local trigger="$1"
|
|
55
|
+
|
|
56
|
+
[[ -n "$trigger" ]] || return 0
|
|
57
|
+
triggers="${triggers}${triggers:+$'\n'}$trigger"
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if [[ "$change_key" == FIX-* ]]; then
|
|
61
|
+
add_trigger "change-key:FIX"
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
if [[ -f "$task_file" ]]; then
|
|
65
|
+
if rg -i --quiet 'postmortem[ -]?(required|signal|trigger)[: ]+(yes|required|true)' "$task_file"; then
|
|
66
|
+
add_trigger "task:postmortem-required"
|
|
67
|
+
fi
|
|
68
|
+
if rg -i --quiet '(incident|failure|reroute|rework)[ -]?postmortem[: ]+(yes|required|true)' "$task_file"; then
|
|
69
|
+
add_trigger "task:incident-postmortem"
|
|
70
|
+
fi
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
while IFS= read -r trigger; do
|
|
74
|
+
[[ -n "$trigger" ]] || continue
|
|
75
|
+
add_trigger "session:$trigger"
|
|
76
|
+
done <<< "$SESSION_TRIGGERS"
|
|
77
|
+
|
|
78
|
+
if [[ -n "$triggers" ]]; then
|
|
79
|
+
required="yes"
|
|
80
|
+
trigger_text="$(printf '%s\n' "$triggers" | awk 'NF && !seen[$0]++' | paste -sd ',' -)"
|
|
81
|
+
else
|
|
82
|
+
required="no"
|
|
83
|
+
trigger_text="none"
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
cat <<EOF
|
|
87
|
+
POSTMORTEM_REQUIRED=$required
|
|
88
|
+
CHANGE_KEY=$change_key
|
|
89
|
+
TRIGGERS=$trigger_text
|
|
90
|
+
INDEX_PATH=$index_path
|
|
91
|
+
INCIDENT_PATH=$incident_path
|
|
92
|
+
TASK_FILE=$task_file
|
|
93
|
+
EOF
|
|
@@ -49,6 +49,16 @@ head_sha="$(git -C "$REPO_ROOT" rev-parse --short HEAD 2>/dev/null || true)"
|
|
|
49
49
|
status="$(git -C "$REPO_ROOT" status --short 2>/dev/null || true)"
|
|
50
50
|
commits="$(git -C "$REPO_ROOT" log --oneline -10 2>/dev/null || true)"
|
|
51
51
|
changed="$(git -C "$REPO_ROOT" diff --stat HEAD 2>/dev/null || true)"
|
|
52
|
+
postmortem_context="$("$script_dir/evaluate-postmortem-trigger.sh" --dir "$change_dir" --repo-root "$REPO_ROOT")"
|
|
53
|
+
|
|
54
|
+
postmortem_field() {
|
|
55
|
+
local key="$1"
|
|
56
|
+
printf '%s\n' "$postmortem_context" | awk -F= -v key="$key" '$1 == key { sub("^[^=]*=", ""); print; exit }'
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
postmortem_required="$(postmortem_field POSTMORTEM_REQUIRED)"
|
|
60
|
+
postmortem_triggers="$(postmortem_field TRIGGERS)"
|
|
61
|
+
postmortem_incident="$(postmortem_field INCIDENT_PATH)"
|
|
52
62
|
|
|
53
63
|
trim() {
|
|
54
64
|
sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
|
|
@@ -99,6 +109,10 @@ if [[ "$output_language" == "zh-CN" ]]; then
|
|
|
99
109
|
no_diff="没有未提交差异"
|
|
100
110
|
status_heading="工作树状态"
|
|
101
111
|
clean_status="干净"
|
|
112
|
+
postmortem_heading="尸检触发"
|
|
113
|
+
postmortem_required_label="是否需要尸检"
|
|
114
|
+
postmortem_triggers_label="触发原因"
|
|
115
|
+
postmortem_incident_label="尸检路径"
|
|
102
116
|
body_heading="PR 正文草稿"
|
|
103
117
|
summary_label="摘要"
|
|
104
118
|
summary_placeholder="<根据 task.md 和提交记录总结用户可见变化>"
|
|
@@ -121,6 +135,10 @@ else
|
|
|
121
135
|
no_diff="No uncommitted diff"
|
|
122
136
|
status_heading="Worktree Status"
|
|
123
137
|
clean_status="Clean"
|
|
138
|
+
postmortem_heading="Postmortem Trigger"
|
|
139
|
+
postmortem_required_label="Postmortem required"
|
|
140
|
+
postmortem_triggers_label="Triggers"
|
|
141
|
+
postmortem_incident_label="Incident path"
|
|
124
142
|
body_heading="PR Body Draft"
|
|
125
143
|
summary_label="Summary"
|
|
126
144
|
summary_placeholder="<summarize user-visible change from task.md and commits>"
|
|
@@ -171,6 +189,14 @@ render_prefixed_lines() {
|
|
|
171
189
|
echo
|
|
172
190
|
render_prefixed_lines "$status" "$clean_status"
|
|
173
191
|
echo
|
|
192
|
+
echo "## $postmortem_heading"
|
|
193
|
+
echo
|
|
194
|
+
echo "- $postmortem_required_label: ${postmortem_required:-unknown}"
|
|
195
|
+
echo "- $postmortem_triggers_label: ${postmortem_triggers:-none}"
|
|
196
|
+
if [[ "${postmortem_required:-no}" == "yes" ]]; then
|
|
197
|
+
echo "- $postmortem_incident_label: ${postmortem_incident:-unknown}"
|
|
198
|
+
fi
|
|
199
|
+
echo
|
|
174
200
|
echo "## $body_heading"
|
|
175
201
|
echo
|
|
176
202
|
echo "$summary_label:"
|
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
_No unreleased changes._
|
|
13
13
|
|
|
14
|
+
## [4.5.18] - 2026-05-17
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Published the mainline release metadata after `4.5.17` was already present on npm, keeping package manifests, changelog, and the release tag aligned to `main`.
|
|
19
|
+
|
|
20
|
+
## [4.5.17] - 2026-05-17
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- Added an explicit `cc-act` postmortem trigger gate through `evaluate-postmortem-trigger.sh`.
|
|
25
|
+
- Added `pr-brief.md` postmortem trigger output so closeout records whether an incident postmortem is required.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- Updated `cc-act` to require `POSTMORTEM_REQUIRED=yes/no` before declaring closeout complete.
|
|
30
|
+
- Updated project postmortem guidance so session-only rework, reroutes, or tool failures can be passed into the gate with `--trigger`.
|
|
31
|
+
|
|
14
32
|
## [4.5.16] - 2026-05-17
|
|
15
33
|
|
|
16
34
|
### Changed
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- Example version: `1.0.0`
|
|
6
6
|
- Last reviewed: `2026-04-17`
|
|
7
|
-
- Bound skills: `cc-roadmap@5.3.1`, `cc-plan@3.10.7`, `cc-do@1.7.2`, `cc-check@1.12.2`, `cc-act@1.9.
|
|
7
|
+
- Bound skills: `cc-roadmap@5.3.1`, `cc-plan@3.10.7`, `cc-do@1.7.2`, `cc-check@1.12.2`, `cc-act@1.9.3`
|
|
8
8
|
|
|
9
9
|
This example shows verified work that is **ready to move forward**, but `cc-act` still chooses `local-handoff`.
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- Example version: `1.0.0`
|
|
6
6
|
- Last reviewed: `2026-04-17`
|
|
7
|
-
- Bound skills: `cc-roadmap@5.3.1`, `cc-plan@3.10.7`, `cc-do@1.7.2`, `cc-check@1.12.2`, `cc-act@1.9.
|
|
7
|
+
- Bound skills: `cc-roadmap@5.3.1`, `cc-plan@3.10.7`, `cc-do@1.7.2`, `cc-check@1.12.2`, `cc-act@1.9.3`
|
|
8
8
|
|
|
9
9
|
This folder shows one minimal but complete `cc-roadmap -> cc-plan -> cc-do -> cc-check -> cc-act` loop.
|
|
10
10
|
|
|
@@ -13,6 +13,14 @@ Postmortems preserve recurring failures without turning every workflow step into
|
|
|
13
13
|
- repeated AI, test, release, Git, or architecture failure
|
|
14
14
|
- explicit user request
|
|
15
15
|
|
|
16
|
+
`cc-act` must make the decision explicit by running:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
.claude/skills/cc-act/scripts/evaluate-postmortem-trigger.sh --dir devflow/changes/<change-key>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If the trigger only exists in the current session, pass it as `--trigger <short-label>` so the final closeout does not silently drop rework or unusual failure evidence.
|
|
23
|
+
|
|
16
24
|
## Rules
|
|
17
25
|
|
|
18
26
|
- Use Git evidence, commands, and current files.
|