@linimin/pi-letscook 0.1.53 → 0.1.55
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 +12 -0
- package/README.md +17 -38
- package/extensions/completion/driver.ts +44 -110
- package/extensions/completion/index.ts +10 -74
- package/extensions/completion/prompt-surfaces.ts +53 -380
- package/extensions/completion/proposal.ts +5 -65
- package/extensions/completion/role-runner.ts +4 -311
- package/extensions/completion/state-store.ts +212 -5
- package/extensions/completion/transcription.ts +0 -8
- package/extensions/completion/types.ts +0 -114
- package/package.json +15 -4
- package/scripts/active-slice-contract-test.sh +61 -6
- package/scripts/context-proposal-test.sh +33 -29
- package/scripts/legacy-cleanup-test.sh +11 -0
- package/scripts/refocus-test.sh +10 -11
- package/scripts/release-check.sh +21 -29
- package/scripts/role-runner-contract-test.sh +1 -2
- package/scripts/rubric-contract-test.sh +0 -1
- package/scripts/smoke-test.sh +14 -10
- package/extensions/completion/input-routing.ts +0 -819
- package/scripts/cook-trigger-routing-test.sh +0 -1122
|
@@ -21,10 +21,9 @@ const assertNotIncludes = (file, snippet) => {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
assertIncludes('extensions/completion/role-runner.ts', 'import { completionRootKey, findCompletionRoot, findRepoRoot
|
|
24
|
+
assertIncludes('extensions/completion/role-runner.ts', 'import { completionRootKey, findCompletionRoot, findRepoRoot } from "./state-store";');
|
|
25
25
|
assertIncludes('extensions/completion/role-runner.ts', 'import { parseReportFields, transcribeRoleOutput, type TranscriptionResult } from "./transcription";');
|
|
26
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
27
|
assertIncludes('extensions/completion/role-runner.ts', 'const systemPromptTemp = await writeTempFile(params.root, "pi-completion-role-", agent.systemPrompt);');
|
|
29
28
|
assertIncludes('extensions/completion/role-runner.ts', 'const reportFields = parseReportFields(output);');
|
|
30
29
|
assertIncludes('extensions/completion/role-runner.ts', 'const transcription = exitCode === 0 ? await transcribeRoleOutput(params.role, params.root, output, reportFields) : undefined;');
|
|
@@ -83,7 +83,6 @@ assertIncludes('extensions/completion/prompt-surfaces.ts', '`- task_type: ${deps
|
|
|
83
83
|
assertIncludes('extensions/completion/prompt-surfaces.ts', '`- evaluation_profile: ${deps.currentEvaluationProfile(snapshot) ?? "(missing)"}`');
|
|
84
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', 'import { parseFirstNumber, parseYesNo } from "./transcription";');
|
|
87
86
|
assertIncludes('extensions/completion/role-runner.ts', 'import { parseReportFields, transcribeRoleOutput, type TranscriptionResult } from "./transcription";');
|
|
88
87
|
assertIncludes('extensions/completion/transcription.ts', 'roleReporting.transcribeCanonicalRoleReport');
|
|
89
88
|
assertIncludes('extensions/completion/role-reporting.js', 'Missing Rubric heading for ${role}.');
|
package/scripts/smoke-test.sh
CHANGED
|
@@ -60,14 +60,11 @@ INLINE_REJECTION_PROPOSAL_SNAPSHOT="$TMPDIR/inline-arg-proposal.json"
|
|
|
60
60
|
INLINE_REJECTION_CHOOSER_SNAPSHOT="$TMPDIR/inline-arg-chooser.json"
|
|
61
61
|
BOOTSTRAP_SESSION="$TMPDIR/session-smoke-bootstrap.jsonl"
|
|
62
62
|
BOOTSTRAP_DISCUSSION=$'Mission: Exercise smoke-test bootstrap.\nScope:\n- Materialize the canonical completion control-plane files.\n- Keep the smoke test on supported /cook startup behavior.\nConstraints:\n- Keep startup proposal confirmation approval-only.\nAcceptance:\n- Scaffold canonical files and kickoff prompts for the smoke fixture.'
|
|
63
|
-
INLINE_HINT_ANALYST_OUTPUT='{"mission":"Smoke-test inline hint startup mission.","scope":["Materialize the canonical completion control-plane files."],"constraints":["Keep startup proposal confirmation approval-only."],"acceptance":["Scaffold canonical files and kickoff prompts for the smoke fixture."],"task_type":"completion-workflow","evaluation_profile":"completion-rubric-v1","confidence":0.91}'
|
|
64
63
|
|
|
65
64
|
mkdir -p "$ROOT"
|
|
66
65
|
cd "$ROOT"
|
|
67
66
|
git init -q
|
|
68
67
|
|
|
69
|
-
PI_COMPLETION_CONTEXT_PROPOSAL_ACTION=cancel \
|
|
70
|
-
PI_COMPLETION_CONTEXT_PROPOSAL_ANALYST_OUTPUT="$INLINE_HINT_ANALYST_OUTPUT" \
|
|
71
68
|
PI_COMPLETION_SKIP_DRIVER_KICKOFF=1 \
|
|
72
69
|
PI_COMPLETION_TEST_ACTIVE_WORKFLOW_ROUTING_PATH="$INLINE_REJECTION_ROUTING_SNAPSHOT" \
|
|
73
70
|
PI_COMPLETION_TEST_CONTEXT_PROPOSAL_PATH="$INLINE_REJECTION_PROPOSAL_SNAPSHOT" \
|
|
@@ -76,20 +73,19 @@ pi -e "$PKG_ROOT" -p "/cook smoke-test mission" \
|
|
|
76
73
|
>"$TMPDIR/pi-completion-smoke-inline-arg.out" 2>"$TMPDIR/pi-completion-smoke-inline-arg.err"
|
|
77
74
|
|
|
78
75
|
python3 - "$TMPDIR/pi-completion-smoke-inline-arg.out" "$TMPDIR/pi-completion-smoke-inline-arg.err" "$INLINE_REJECTION_ROUTING_SNAPSHOT" "$INLINE_REJECTION_PROPOSAL_SNAPSHOT" "$INLINE_REJECTION_CHOOSER_SNAPSHOT" <<'PY'
|
|
79
|
-
import json
|
|
80
76
|
import sys
|
|
81
77
|
from pathlib import Path
|
|
82
78
|
|
|
83
79
|
output = Path(sys.argv[1]).read_text() + Path(sys.argv[2]).read_text()
|
|
84
80
|
routing = Path(sys.argv[3])
|
|
85
|
-
proposal =
|
|
81
|
+
proposal = Path(sys.argv[4])
|
|
86
82
|
chooser = Path(sys.argv[5])
|
|
87
83
|
|
|
88
|
-
assert not Path('.agent').exists(), 'startup /cook
|
|
89
|
-
assert not routing.exists(), 'startup /cook
|
|
90
|
-
assert proposal
|
|
91
|
-
assert not chooser.exists(), 'startup /cook
|
|
92
|
-
assert '
|
|
84
|
+
assert not Path('.agent').exists(), 'startup /cook inline-args rejection should leave canonical state untouched'
|
|
85
|
+
assert not routing.exists(), 'startup /cook inline-args rejection should not open active-workflow routing before a workflow exists'
|
|
86
|
+
assert not proposal.exists(), 'startup /cook inline-args rejection should not emit a startup-brief proposal snapshot'
|
|
87
|
+
assert not chooser.exists(), 'startup /cook inline-args rejection should not open the existing-workflow chooser before a workflow exists'
|
|
88
|
+
assert '/cook no longer accepts inline arguments.' in output, 'startup /cook inline-args rejection should explain the bare-only entry contract'
|
|
93
89
|
PY
|
|
94
90
|
|
|
95
91
|
write_session "$BOOTSTRAP_SESSION" "$ROOT" "$BOOTSTRAP_DISCUSSION"
|
|
@@ -105,6 +101,7 @@ for file in .agent/profile.json .agent/state.json .agent/plan.json .agent/active
|
|
|
105
101
|
[[ -f "$file" ]] || { echo "missing canonical bootstrap file: $file" >&2; exit 1; }
|
|
106
102
|
done
|
|
107
103
|
|
|
104
|
+
git ls-files --error-unmatch .agent/README.md .agent/mission.md .agent/profile.json .agent/verify_completion_stop.sh .agent/verify_completion_control_plane.sh >/dev/null
|
|
108
105
|
bash .agent/verify_completion_control_plane.sh >/dev/null
|
|
109
106
|
bash .agent/verify_completion_stop.sh >/dev/null
|
|
110
107
|
|
|
@@ -133,6 +130,13 @@ assert active['task_type'] == expected_task_type, 'active-slice.json task_type m
|
|
|
133
130
|
assert active['evaluation_profile'] == expected_eval_profile, 'active-slice.json evaluation_profile mismatch after bootstrap'
|
|
134
131
|
assert active['implementation_surfaces'] == [], 'active-slice.json should scaffold empty implementation_surfaces'
|
|
135
132
|
assert active['verification_commands'] == [], 'active-slice.json should scaffold empty verification_commands'
|
|
133
|
+
brief = state['advisory_startup_brief']
|
|
134
|
+
assert brief['kind'] == 'startup_brief', 'state.json should preserve the confirmed startup brief as advisory intake'
|
|
135
|
+
assert brief['mission'] == state['mission_anchor'], 'advisory startup brief mission should match the canonical mission anchor after bootstrap'
|
|
136
|
+
assert brief['scope'] == ['Materialize the canonical completion control-plane files.', 'Keep the smoke test on supported /cook startup behavior.'], 'advisory startup brief should preserve scope items'
|
|
137
|
+
assert brief['constraints'] == ['Keep startup proposal confirmation approval-only.'], 'advisory startup brief should preserve constraints'
|
|
138
|
+
assert brief['acceptance'] == ['Scaffold canonical files and kickoff prompts for the smoke fixture.'], 'advisory startup brief should preserve acceptance'
|
|
139
|
+
assert brief['notes'] == ['No additional operator notes were derived from recent discussion.'], 'advisory startup brief should still preserve operator-note structure when no explicit notes exist'
|
|
136
140
|
assert evidence['artifact_type'] == 'completion-verification-evidence', 'verification-evidence.json artifact_type mismatch after bootstrap'
|
|
137
141
|
assert evidence['subject_type'] == 'none', 'verification-evidence.json should scaffold idle subject_type'
|
|
138
142
|
assert evidence['verification_commands'] == [], 'verification-evidence.json should scaffold empty verification_commands'
|