@linimin/pi-letscook 0.1.50 → 0.1.52
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/CHANGELOG.md +19 -0
- package/README.md +87 -52
- package/extensions/completion/driver.ts +199 -134
- package/extensions/completion/index.ts +20 -7
- package/extensions/completion/input-routing.ts +818 -0
- package/extensions/completion/prompt-surfaces.ts +375 -1
- package/extensions/completion/proposal.ts +1 -1
- package/extensions/completion/role-runner.ts +310 -3
- package/extensions/completion/types.ts +114 -0
- package/package.json +1 -1
- package/scripts/cook-trigger-routing-test.sh +1122 -0
- package/scripts/release-check.sh +29 -21
package/scripts/release-check.sh
CHANGED
|
@@ -4,45 +4,52 @@ set -euo pipefail
|
|
|
4
4
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
5
5
|
cd "$ROOT"
|
|
6
6
|
|
|
7
|
-
echo "[release-check] running control-plane validation,
|
|
7
|
+
echo "[release-check] running control-plane validation, /cook public parity, workflow-aware router coverage, role-runner extraction, startup/refocus/context regressions, canonical evidence artifact, active-slice contract, observability, legacy cleanup, evaluator calibration, and rubric contract coverage"
|
|
8
8
|
bash .agent/verify_completion_control_plane.sh
|
|
9
9
|
|
|
10
|
-
echo "[release-check] verifying public /cook parity"
|
|
10
|
+
echo "[release-check] verifying public /cook parity and workflow-aware router docs/help"
|
|
11
11
|
python3 - <<'PY'
|
|
12
12
|
import re
|
|
13
13
|
from pathlib import Path
|
|
14
14
|
|
|
15
15
|
checks = {
|
|
16
16
|
"README.md": [
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"Assistant/summary artifacts or plan/spec/design-doc/proposal-only context do not refocus the workflow.",
|
|
27
|
-
"Optional `/cook <hint>` text biases that routing and candidate ranking toward the hinted implementation intent",
|
|
17
|
+
"Natural-language routing is optional and shipped in three modes: `off` disables it, `assist` offers short confirm-first handoffs after clear workflow discussion, and `router` reviews each non-bypass user turn before implementation starts while leaving ordinary questions in the main chat.",
|
|
18
|
+
"Set `PI_COMPLETION_TRIGGER_MODE` before starting Pi if you want to change how natural-language routing behaves:",
|
|
19
|
+
"- `off` — natural-language routing is disabled. Only explicit `/cook` or `/cook <hint>` can enter the workflow.",
|
|
20
|
+
"- `assist` *(default)* — after clear discussion of a concrete repo change, short execution handoff phrases such as `開始做`, `開始實作`, or `go ahead` can offer to enter the same `/cook` flow before the primary agent starts implementation work.",
|
|
21
|
+
"- `router` — the workflow-aware router reviews each non-bypass normal user turn before implementation starts.",
|
|
22
|
+
"the original message only reaches the normal chat path if you explicitly choose **Send as normal chat**",
|
|
23
|
+
"Explicit `/cook` is always the canonical fallback, even when natural-language routing is enabled in `assist` or `router` mode.",
|
|
24
|
+
"router-mode false positives and classifier failures stay fail-closed unless you explicitly choose **Send as normal chat**",
|
|
25
|
+
"bash ./scripts/cook-trigger-routing-test.sh",
|
|
28
26
|
],
|
|
29
27
|
"CHANGELOG.md": [
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
28
|
+
"updated README/help/release parity copy to describe the shipped `off` / `assist` / `router` natural-language routing behavior truthfully while keeping `/cook` as the canonical confirm-first workflow boundary and manual fallback",
|
|
29
|
+
"documented the explicit router-mode **Send as normal chat** recovery path as a user choice, not as a silent downgrade, and kept public copy scoped to currently shipped router behavior rather than future auto-mode plans",
|
|
30
|
+
"made `npm run release-check` fail closed on the shipped workflow-aware router docs/help contract while continuing to rerun `bash ./scripts/cook-trigger-routing-test.sh` alongside the existing `/cook` smoke/refocus/context regressions",
|
|
33
31
|
],
|
|
34
32
|
"extensions/completion/index.ts": [
|
|
35
|
-
'description: "/cook workflow: start, continue, refocus, or start the next round
|
|
33
|
+
'description: "/cook workflow: start, continue, refocus, or start the next round; /cook stays canonical while natural-language routing can be off, assist, or router"',
|
|
36
34
|
'const COOK_BARE_ONLY_GUIDANCE =',
|
|
37
|
-
'"/cook
|
|
38
|
-
'"/cook failed closed because recent discussion did not produce a clear execution-ready Mission/Scope/Constraints/Acceptance proposal for concrete repo changes.
|
|
35
|
+
'"/cook remains the canonical workflow boundary. Natural-language routing can stay off, run in assist mode for short confirm-first handoffs, or run in router mode to review each non-bypass user turn before implementation starts, but the shared /cook flow still owns mission selection and confirmation."',
|
|
36
|
+
'"/cook failed closed because recent discussion did not produce a clear execution-ready Mission/Scope/Constraints/Acceptance proposal for concrete repo changes. Assist and router modes only offer the same /cook flow, and router recovery only replays to normal chat when you explicitly choose Send as normal chat, so clarify the concrete repo changes in the main chat and rerun /cook."',
|
|
39
37
|
],
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
forbidden = {
|
|
43
|
-
"README.md": [
|
|
41
|
+
"README.md": [
|
|
42
|
+
"Assist-mode natural-language handoff can also offer to enter that same `/cook` flow before the primary agent starts implementation work, but `/cook` remains the canonical workflow boundary.",
|
|
43
|
+
"## Natural-language handoff (assist mode)",
|
|
44
|
+
],
|
|
44
45
|
"CHANGELOG.md": ["compatibility" + " shim"],
|
|
45
|
-
"extensions/completion/index.ts": [
|
|
46
|
+
"extensions/completion/index.ts": [
|
|
47
|
+
'description: "/cook workflow: start, continue, refocus, or start the next round; assist-mode natural-language handoff can offer the same /cook boundary"',
|
|
48
|
+
'"/cook remains the canonical workflow boundary. Assist-mode natural-language handoff can offer to enter the same /cook flow before implementation starts, while mission selection still comes from recent discussion, repo truth, and the approval-only confirmation flow."',
|
|
49
|
+
'"/cook failed closed because recent discussion did not produce a clear execution-ready Mission/Scope/Constraints/Acceptance proposal for concrete repo changes. Natural-language handoff only offers to enter the same /cook flow, so clarify the concrete repo changes in the main chat and rerun /cook."',
|
|
50
|
+
"temporary" + " compatibility" + " shim, pass /cook",
|
|
51
|
+
"optional inline /cook hint",
|
|
52
|
+
],
|
|
46
53
|
}
|
|
47
54
|
|
|
48
55
|
for path, needles in checks.items():
|
|
@@ -58,6 +65,7 @@ for path, needles in forbidden.items():
|
|
|
58
65
|
raise SystemExit(f"[release-check] found stale compatibility wording in {path}: {needle}")
|
|
59
66
|
PY
|
|
60
67
|
|
|
68
|
+
bash ./scripts/cook-trigger-routing-test.sh
|
|
61
69
|
npm run smoke-test
|
|
62
70
|
npm run refocus-test
|
|
63
71
|
npm run context-proposal-test
|