pi-spark: seed small-model operating rules, raise Spark context to 64k

Baseline test: the 4B model made zero tool calls and invented mise syntax.
With an APPEND_SYSTEM of tool-first rules plus a golang-mise skill it built,
tested and ran a working CLI in 36 tool calls. Rules now live in
config/pi/small-model-APPEND_SYSTEM.md and are seeded per project; Ollama
serves 64k context, which measured equal or faster than 32k.
This commit is contained in:
Ziad committed 2026-12-01 15:07:19 -07:00
1 parent ffc0d6d83d
commit 3618086af0
3 files changed
+22 -3

No files matched your search

+6 -1
View File
@@ -21,7 +21,12 @@ if tmux has-session -t "$SESSION" 2>/dev/null; then
exit 0
fi
mkdir -p "$DIR"
mkdir -p "$DIR/.pi"
# Small models need explicit tool-first rules; seed them into a new project.
if [ ! -f "$DIR/.pi/APPEND_SYSTEM.md" ] && [ -f "$HOME/.dotfiles/config/pi/small-model-APPEND_SYSTEM.md" ]; then
cp "$HOME/.dotfiles/config/pi/small-model-APPEND_SYSTEM.md" "$DIR/.pi/APPEND_SYSTEM.md"
echo "seeded $DIR/.pi/APPEND_SYSTEM.md (small-model rules)"
fi
# Drop the free-pi session environment so pi uses ~/.pi/agent, not the free-pi agent dir.
tmux new-session -d -s "$SESSION" -x "${PI_SPARK_COLS:-210}" -y "${PI_SPARK_ROWS:-50}" -c "$DIR" \
"env -u PI_CODING_AGENT_DIR -u PI_SESSION_FILE -u PI_SESSION_ID -u PI_MODEL -u PI_PROVIDER -u PI_REASONING_LEVEL PI_SKIP_VERSION_CHECK=1 pi --model $MODEL --thinking $THINKING"
+2 -2
View File
@@ -8,7 +8,7 @@
{
"id": "spark:ablit",
"name": "Spark-X2.6-4B abliterated (GTX 1080)",
"contextWindow": 32768,
"contextWindow": 65536,
"maxTokens": 8192,
"reasoning": true,
"input": [
@@ -18,7 +18,7 @@
{
"id": "spark:4b",
"name": "Spark-X2.6-4B official (GTX 1080)",
"contextWindow": 32768,
"contextWindow": 65536,
"maxTokens": 8192,
"reasoning": true,
"input": [
+14
View File
@@ -0,0 +1,14 @@
# Working rules (small-model session)
Text you write is not the work — tool calls are the work.
1. **Act with tools.** Create or change files with `write`/`edit`. Never paste file contents or commands as prose.
2. **One step at a time.** One tool call, read the result, then the next. Do not plan more than two steps ahead.
3. **Verify before you deliberate.** After writing code, run the build or test immediately. Decide design questions from the command output, not from memory.
4. **Read a file at most once per task.** Use `edit` with a unique anchor instead of re-reading.
5. **Keep output small.** Pipe long output through `| tail -20` or `| head -20`; prefer `-count`, `-q` and `--json` flags. Your context is limited.
6. **Do not invent syntax.** Unsure of a command or file format? Run `--help`, `ls-remote`, or read the relevant skill.
7. **Cap deliberation.** If two options are acceptable, take the first and continue; the test result decides.
8. **Stop with evidence.** When acceptance criteria are met, run the final verification command and report the exact commands and their output. Nothing else.
Go projects: use the `golang-mise` skill for the exact `mise.toml` format and command list.