@linimin/pi-letscook 0.1.45 → 0.1.47

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.
@@ -4,7 +4,7 @@ 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, bare /cook parity, startup/refocus/context regressions, canonical evidence artifact, active-slice contract, observability, evaluator calibration, and rubric contract coverage"
7
+ echo "[release-check] running control-plane validation, bare /cook parity, 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
10
  echo "[release-check] verifying public /cook parity"
@@ -14,9 +14,9 @@ from pathlib import Path
14
14
 
15
15
  checks = {
16
16
  "README.md": [
17
- "Bare `/cook` and `/cook <hint>` are the supported workflow entrypoints.",
18
- "If the recent context is fuzzy, `/cook <hint>` can provide a short high-priority user hint for the proposal analyst",
19
- "clarify the mission in the main chat before rerunning `/cook`",
17
+ "Bare `/cook` is the only supported workflow entrypoint.",
18
+ "`/cook <text>` is no longer supported; put mission text in the main chat, then rerun bare `/cook`.",
19
+ "clarify the mission in the main chat before rerunning bare `/cook`",
20
20
  "Matching or unclear discussion resumes from canonical `.agent/**` state.",
21
21
  "approval-only Start/Cancel gate",
22
22
  "Start new workflow from recent discussion",
@@ -24,27 +24,26 @@ checks = {
24
24
  "README/CHANGELOG updates still count as concrete repo changes",
25
25
  "assistant-produced summaries and plan/spec/design-doc/proposal-only artifacts do not",
26
26
  "Assistant/summary artifacts or plan/spec/design-doc/proposal-only context do not refocus the workflow.",
27
+ "`/cook <text>` is rejected without running proposal routing or rewriting workflow state.",
27
28
  ],
28
29
  "CHANGELOG.md": [
29
- "bare `/cook` as the only supported workflow entrypoint",
30
- "clarify the mission before rerunning bare `/cook`",
31
- "packaged parity now fails closed on the bare-only contract",
32
- "that old inline-argument path is no longer supported now that bare `/cook` is the only public entrypoint",
33
- "README/CHANGELOG/docs-only deliverables as concrete repo-change missions",
34
- "ignore assistant/branch/compaction summary artifacts for startup/refocus readiness",
35
- "plan/spec/design-doc/proposal-only context without rewriting canonical state",
30
+ "removed inline `/cook <text>` argument support so bare `/cook` is now the only supported workflow entrypoint",
31
+ "packaged release parity fail closed when command arguments are passed instead of discussion driving proposal derivation",
32
+ "historically allowed `/cook <hint>` as an analyst-only high-priority prompt",
33
+ "that inline-argument path has since been removed so bare `/cook` is now the only supported entrypoint",
36
34
  ],
37
35
  "extensions/completion/index.ts": [
38
- 'description: "Discussion-driven /cook workflow: start, continue, refocus, or start the next round"',
39
- "If an inline /cook hint is present, treat it as a high-priority user hint that may focus the mission, but do not ignore conflicting discussion or skip missing details.",
40
- "/cook failed closed because recent discussion and any optional inline /cook hint did not produce a clear execution-ready Mission/Scope/Constraints/Acceptance proposal for concrete repo changes. Clarify the concrete repo changes in the main chat and rerun /cook.",
36
+ 'description: "Bare /cook workflow: start, continue, refocus, or start the next round"',
37
+ 'const COOK_BARE_ONLY_GUIDANCE =',
38
+ '"/cook only supports the bare /cook entrypoint. Move mission text into the main chat, then rerun /cook."',
39
+ '"/cook failed closed because recent discussion did not produce a clear execution-ready Mission/Scope/Constraints/Acceptance proposal for concrete repo changes. Clarify the concrete repo changes in the main chat and rerun /cook."',
41
40
  ],
42
41
  }
43
42
 
44
43
  forbidden = {
45
- "README.md": ["compatibility" + " shim"],
44
+ "README.md": ["compatibility" + " shim", "/cook <hint>", "optional inline /cook hint"],
46
45
  "CHANGELOG.md": ["compatibility" + " shim"],
47
- "extensions/completion/index.ts": ["temporary" + " compatibility" + " shim, pass /cook"],
46
+ "extensions/completion/index.ts": ["temporary" + " compatibility" + " shim, pass /cook", "inline /cook hint", "optional inline /cook hint"],
48
47
  }
49
48
 
50
49
  for path, needles in checks.items():
@@ -63,9 +62,11 @@ PY
63
62
  npm run smoke-test
64
63
  npm run refocus-test
65
64
  npm run context-proposal-test
65
+ bash ./scripts/role-runner-contract-test.sh
66
66
  bash ./scripts/canonical-evidence-artifact-test.sh
67
67
  bash ./scripts/active-slice-contract-test.sh
68
68
  npm run observability-status-test
69
+ bash ./scripts/legacy-cleanup-test.sh
69
70
  npm run evaluator-calibration-test
70
71
  npm run rubric-contract-test
71
72
  npm pack --dry-run >/dev/null
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
+ cd "$ROOT"
6
+
7
+ node <<'NODE'
8
+ const fs = require('node:fs');
9
+
10
+ const read = (file) => fs.readFileSync(file, 'utf8');
11
+ const assertIncludes = (file, snippet) => {
12
+ const text = read(file);
13
+ if (!text.includes(snippet)) {
14
+ throw new Error(`${file} is missing required role-runner extraction text: ${snippet}`);
15
+ }
16
+ };
17
+ const assertNotIncludes = (file, snippet) => {
18
+ const text = read(file);
19
+ if (text.includes(snippet)) {
20
+ throw new Error(`${file} still contains stale inline role-runner text: ${snippet}`);
21
+ }
22
+ };
23
+
24
+ assertIncludes('extensions/completion/role-runner.ts', 'import { completionRootKey, findCompletionRoot, findRepoRoot, loadCompletionDataForReminder } from "./state-store";');
25
+ assertIncludes('extensions/completion/role-runner.ts', 'import { parseReportFields, transcribeRoleOutput, type TranscriptionResult } from "./transcription";');
26
+ assertIncludes('extensions/completion/role-runner.ts', 'const agent = await loadAgentDefinition(params.root, params.role);');
27
+ assertIncludes('extensions/completion/role-runner.ts', 'await loadCompletionDataForReminder(params.root);');
28
+ assertIncludes('extensions/completion/role-runner.ts', 'const systemPromptTemp = await writeTempFile(params.root, "pi-completion-role-", agent.systemPrompt);');
29
+ assertIncludes('extensions/completion/role-runner.ts', 'const reportFields = parseReportFields(output);');
30
+ assertIncludes('extensions/completion/role-runner.ts', 'const transcription = exitCode === 0 ? await transcribeRoleOutput(params.role, params.root, output, reportFields) : undefined;');
31
+ assertIncludes('extensions/completion/role-runner.ts', 'env: { ...process.env, PI_COMPLETION_ROLE: params.role },');
32
+ assertIncludes('extensions/completion/role-runner.ts', 'async function runContextProposalAnalystSubprocess(');
33
+ assertIncludes('extensions/completion/role-runner.ts', 'export async function analyzeContextProposalWithAgent(');
34
+ assertIncludes('extensions/completion/index.ts', 'import { analyzeContextProposalWithAgent, runCompletionRole } from "./role-runner";');
35
+ assertIncludes('extensions/completion/index.ts', 'const result = await runCompletionRole({');
36
+ assertIncludes('extensions/completion/index.ts', 'await analyzeContextProposalWithAgent({');
37
+ assertNotIncludes('extensions/completion/index.ts', 'const systemPromptTemp = await writeTempFile(runCwd, "pi-cook-proposal-analyst-", CONTEXT_PROPOSAL_ANALYST_SYSTEM_PROMPT);');
38
+ assertNotIncludes('extensions/completion/index.ts', 'const invocation = getPiInvocation(args);');
39
+ assertNotIncludes('extensions/completion/index.ts', 'async function loadAgentDefinition(');
40
+ assertNotIncludes('extensions/completion/index.ts', 'async function writeTempFile(');
41
+ assertNotIncludes('extensions/completion/index.ts', 'function getPiInvocation(');
42
+ NODE
43
+
44
+ echo "role-runner contract test passed"
@@ -77,13 +77,15 @@ assertIncludes('CHANGELOG.md', 'added canonical `task_type: completion-workflow`
77
77
  assertIncludes('CHANGELOG.md', 'threaded canonical `evaluation_profile` plus the active-slice implementation contract into reviewer/auditor/stop-judge reminder and dispatch surfaces');
78
78
  assertIncludes('CHANGELOG.md', 'made reviewer/auditor/stop-judge transcription fail closed on malformed rubric-bearing outputs while still accepting valid reports');
79
79
  assertIncludes('extensions/completion/index.ts', 'Canonical routing profile:\\n- task_type: ${taskType}\\n- evaluation_profile: ${evaluationProfile}');
80
- assertIncludes('extensions/completion/index.ts', '`Task type: ${currentTaskType(snapshot) ?? "(missing)"}`');
81
- assertIncludes('extensions/completion/index.ts', '`Evaluation profile: ${currentEvaluationProfile(snapshot) ?? "(missing)"}`');
82
- assertIncludes('extensions/completion/index.ts', '`task_type: ${currentTaskType(snapshot) ?? "(missing)"}`');
83
- assertIncludes('extensions/completion/index.ts', '`evaluation_profile: ${currentEvaluationProfile(snapshot) ?? "(missing)"}`');
84
- assertIncludes('extensions/completion/index.ts', 'Canonical evaluation handoff for ${role}:');
80
+ assertIncludes('extensions/completion/prompt-surfaces.ts', '`Task type: ${args.taskType ?? "(missing)"}`');
81
+ assertIncludes('extensions/completion/prompt-surfaces.ts', '`Evaluation profile: ${args.evaluationProfile ?? "(missing)"}`');
82
+ assertIncludes('extensions/completion/prompt-surfaces.ts', '`- task_type: ${deps.currentTaskType(snapshot) ?? "(missing)"}`');
83
+ assertIncludes('extensions/completion/prompt-surfaces.ts', '`- evaluation_profile: ${deps.currentEvaluationProfile(snapshot) ?? "(missing)"}`');
84
+ assertIncludes('extensions/completion/prompt-surfaces.ts', 'Canonical evaluation handoff for ${role}:');
85
85
  assertIncludes('extensions/completion/index.ts', 'buildEvaluationRoleReminderText(snapshot, nextRole)');
86
- assertIncludes('extensions/completion/index.ts', 'roleReporting.transcribeCanonicalRoleReport');
86
+ assertIncludes('extensions/completion/index.ts', 'import { parseFirstNumber, parseYesNo } from "./transcription";');
87
+ assertIncludes('extensions/completion/role-runner.ts', 'import { parseReportFields, transcribeRoleOutput, type TranscriptionResult } from "./transcription";');
88
+ assertIncludes('extensions/completion/transcription.ts', 'roleReporting.transcribeCanonicalRoleReport');
87
89
  assertIncludes('extensions/completion/role-reporting.js', 'Missing Rubric heading for ${role}.');
88
90
  assertIncludes('extensions/completion/role-reporting.js', 'Reviewer output cannot mark \'Acceptable as-is: yes\' when any rubric line is fail.');
89
91
  assertIncludes('extensions/completion/role-reporting.js', 'Auditor output must answer \'Tracked and unignored worktree is clean\' with yes or no.');
@@ -84,11 +84,11 @@ routing = Path(sys.argv[3])
84
84
  proposal = Path(sys.argv[4])
85
85
  chooser = Path(sys.argv[5])
86
86
 
87
- assert not Path('.agent').exists(), 'startup inline /cook hint cancel should leave canonical state untouched'
88
- assert not routing.exists(), 'startup inline /cook hint should not open active-workflow routing'
89
- assert proposal.exists(), 'startup inline /cook hint should still prepare a proposal for confirmation'
90
- assert not chooser.exists(), 'startup inline /cook hint should not open the chooser flow during startup'
91
- assert 'Cancelled recent-discussion workflow proposal.' in output, 'startup inline /cook hint cancel should surface the proposal cancellation message'
87
+ assert not Path('.agent').exists(), 'startup /cook <text> rejection should leave canonical state untouched'
88
+ assert not routing.exists(), 'startup /cook <text> rejection should not open active-workflow routing'
89
+ assert not proposal.exists(), 'startup /cook <text> rejection should not prepare a proposal snapshot'
90
+ assert not chooser.exists(), 'startup /cook <text> rejection should not open the chooser flow'
91
+ assert '/cook only supports the bare /cook entrypoint.' in output, 'startup /cook <text> rejection should explain the bare-only contract'
92
92
  PY
93
93
 
94
94
  write_session "$BOOTSTRAP_SESSION" "$ROOT" "$BOOTSTRAP_DISCUSSION"