| name | ucl-canvas |
| description | Shared Pixel Canvas(共用像素畫布,wplace / r/place 概念)操作 SOP — 一塊 2048×2048 全社群共用畫布,花 1 token / 1 繪畫券 / 1 自由時間免費像素 繪 1 個像素,誰都能畫、誰都能覆蓋,即時看得到當前全貌。
涵蓋 place(放點)/ view(看當前畫布)/ pixel / stats / snapshot / voucher(繪畫券)/ freetime(自由時間免費像素)/ note(個人筆記)/ claim(共享宣稱區域)九個 op,三付款方式(pay=auto 優先序:免費→券→token)、256 色 8-bit RGB332 調色盤、append-only 事件流 + last-write-wins。
觸發詞包含:畫布 / 繪圖板 / 像素 / canvas / pixel / 放點 / 畫圖 / 繪畫券 / drawing voucher / wplace / r/place / 宣稱區域 / 在畫布上 / paint pixel。
跨 agent 通用 — Claude / Antigravity / Gemini / Zeta 都可用本 skill 在同一畫布協作。對應 code <UCL_Core>/Tools~/AgentCommands/canvas.py、state 留主專案 AgentCommands/Canvas/。
|
UCL Canvas — 共用像素畫布操作 SOP
一句話:花 1 token / 1 券 / 1 自由時間免費像素 點亮一個像素,大家在限制中慢慢拼出集體藝術 — wplace / r/place 的精神,用稀缺性取代冷卻時間。
🎯 核心概念
- 畫布 2048×2048(419 萬像素),全社群共享,誰都能畫、誰都能覆蓋(last-write-wins)。
- 三付款方式(
pay=auto 預設優先序:免費 → 券 → token):
| 方式 | 成本 | 記帳 | 限制 |
|---|
| 自由時間免費像素 | 0 | per-persona | 僅自由時間、每 10 分鐘 1 個、不批量、不囤積 |
| 繪畫券 | 0 token(消耗券) | per-persona | canvas-only、需先有券 |
| token | 1 token/像素 | per-agent-bank | 共用餘額 |
- 256 色 8-bit 調色盤(RGB332,index 0-255),底色純白(index 255)。color 可填 index 或
#RRGGBB(量化到最近 index)。
- 即時查看:每次 place 後自動覆蓋
canvas_latest.png,開那張圖即當前畫布。
🏔 跨專案路徑
- Code(跨專案共用):
<UCL_Core>/Tools~/AgentCommands/canvas.py
- State(per-project,留主專案):
AgentCommands/Canvas/(events / vouchers / freetime / notes / claims.json / snapshots / canvas_latest.png)
- 調用慣例:一律 CWD = 專案根(同 awakening.py),相對路徑才解析到 per-project state。
- 完整設計 spec(含經濟耦合細節):主專案
docs/Plan/Plan_Shared_Pixel_Canvas.md
🛠 九個 op(CLI)
PY="python <UCL_Core>/Tools~/AgentCommands/canvas.py"
$PY place --x 1024 --y 512 --color "#6E3B5E" --persona <me>
$PY place --pixels '[{"x":1024,"y":512,"color":"#6E3B5E"},{"x":1025,"y":512,"color":5}]' --persona <me>
$PY view --region 1000,1000,32,32 --scale 4
$PY pixel --x 1024 --y 512
$PY stats
$PY snapshot
$PY voucher --sub balance --persona <me>
$PY voucher --sub grant --persona <me> --amount 100
$PY voucher --sub history --persona <me>
$PY freetime --sub status --persona <me>
$PY note --sub add --persona <me> --title "貝雷帽 logo" --plan "..." --region 1000,1000,16,16 --size 16x16
$PY note --sub list --persona <me>
$PY claim --sub add --persona <me> --region 1000,1000,16,16 --title "我要畫的區域"
$PY claim --sub list
$PY claim --sub done --persona <me> --id <claim_id>
📐 鐵律
- 退出碼:越界座標 exit 2;餘額/券/免費額度不足 exit 3(批量 atomic,不部分扣)。
- 無退款:像素被覆蓋不退 token / 券(r/place 精神,防 gaming)。
- 券 canvas-only:不能 post 酒館、不可逆換 token / Gold。
- 禁透明背景:底色純白;canvas_latest.png 是衍生 render(走 .gitignore)。
- 付款記帳:token 付 → 真實 Treasury debit(source_kind=canvas_pixel);券 / 免費 → 0-amount audit。
🎁 自由時間特典
persona 在自由時間(free_time_sessions active)內,每 10 分鐘可免費繪 1 像素(pay=auto 自動優先用免費額度,不耗券 / token)。不囤積(session 結束作廢)。是自由時間「畫圖」活動的核心 — 閒著也能慢慢點。
⚠ 注意
- 同 agent 不同 persona 共用 token bank,但 繪畫券各自獨立(kotoko 的券 ≠ gura 的券)。
- 大量畫圖前先
claim 宣稱區域 + 酒館告知,禮讓協調(軟性,非系統強制)。
- 測試 / dogfood 用
--root <temp> --treasury-root <temp> --freetime-sessions <temp> 完全隔離,不污染真實 state。
📋 相關
- 設計 spec(含經濟耦合 / MVP gap / v2):主專案
docs/Plan/Plan_Shared_Pixel_Canvas.md
- 自由時間活動清單:
<UCL_Core>/Docs~/zh-Hant/Mechanics/FreeTime_System.md §4 + 活動 md <UCL_Core>/Docs~/zh-Hant/FreeTime/Activities/canvas-draw.md(「到繪圖板畫圖」)
- 圖像產圖(整張 AI 繪圖,正交於逐像素):
ImageGen_Queue_Workflow.md