@astrosheep/square 0.3.11 → 0.3.13
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/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/codex-plugin/hooks/hooks.json +9 -0
- package/dist/activity-feed.d.ts +14 -0
- package/dist/activity-feed.js +5 -5
- package/dist/activity.d.ts +9 -0
- package/dist/activity.js +112 -96
- package/dist/artifact.d.ts +20 -0
- package/dist/artifact.js +317 -648
- package/dist/automatic-session.d.ts +5 -0
- package/dist/automatic-session.js +86 -0
- package/dist/boundary-presentation.d.ts +5 -0
- package/dist/boundary-presentation.js +6 -5
- package/dist/claude-hook.d.ts +9 -0
- package/dist/claude-hook.js +35 -3
- package/dist/cli/context.d.ts +35 -0
- package/dist/cli/context.js +26 -31
- package/dist/cli/harness-command.d.ts +28 -0
- package/dist/cli/harness-command.js +30 -15
- package/dist/cli/maintenance-commands.d.ts +7 -0
- package/dist/cli/maintenance-commands.js +12 -69
- package/dist/cli/meta-commands.d.ts +5 -0
- package/dist/cli/observation-commands.d.ts +20 -0
- package/dist/cli/observation-commands.js +159 -139
- package/dist/cli/program.d.ts +2 -0
- package/dist/cli/program.js +3 -12
- package/dist/cli/registry.d.ts +9 -0
- package/dist/cli/registry.js +2 -4
- package/dist/cli/square-commands.d.ts +34 -0
- package/dist/cli/square-commands.js +90 -84
- package/dist/cmd/notify-once.d.ts +2 -0
- package/dist/codex-hook.d.ts +10 -0
- package/dist/codex-hook.js +35 -3
- package/dist/decisions.d.ts +92 -0
- package/dist/decisions.js +93 -81
- package/dist/delivery-health.d.ts +21 -0
- package/dist/delivery-health.js +41 -34
- package/dist/delivery.d.ts +81 -0
- package/dist/delivery.js +71 -69
- package/dist/file-lock.d.ts +6 -0
- package/dist/harness-claude.d.ts +19 -0
- package/dist/harness-claude.js +8 -3
- package/dist/harness-codex.d.ts +29 -0
- package/dist/harness-codex.js +2 -2
- package/dist/harness-links.d.ts +17 -0
- package/dist/harness-links.js +2 -2
- package/dist/harness-pi.d.ts +11 -0
- package/dist/harness-pi.js +2 -2
- package/dist/harness-stage.d.ts +6 -0
- package/dist/harness.d.ts +20 -0
- package/dist/harness.js +5 -3
- package/dist/help.d.ts +6 -0
- package/dist/help.js +12 -13
- package/dist/identity.d.ts +13 -0
- package/dist/inbox.d.ts +2 -0
- package/dist/inbox.js +15 -19
- package/dist/index.d.ts +13 -0
- package/dist/index.js +31 -67
- package/dist/landing.d.ts +10 -0
- package/dist/landing.js +95 -0
- package/dist/list.d.ts +1 -0
- package/dist/list.js +39 -61
- package/dist/model.d.ts +147 -0
- package/dist/model.js +12 -8
- package/dist/notifications.d.ts +30 -0
- package/dist/notifications.js +83 -91
- package/dist/open-square.d.ts +11 -0
- package/dist/open-square.js +4 -0
- package/dist/participant-identity.d.ts +1 -0
- package/dist/participant-identity.js +3 -0
- package/dist/paseo-connection.d.ts +15 -0
- package/dist/paseo-delivery.d.ts +14 -0
- package/dist/paseo-state.d.ts +11 -0
- package/dist/paseo-timeline.d.ts +16 -0
- package/dist/presence.d.ts +3 -0
- package/dist/presence.js +42 -0
- package/dist/presentation.d.ts +91 -0
- package/dist/presentation.js +52 -63
- package/dist/presented.d.ts +11 -0
- package/dist/registry.d.ts +58 -0
- package/dist/registry.js +36 -3
- package/dist/routes.d.ts +42 -0
- package/dist/runtime.d.ts +45 -0
- package/dist/runtime.js +48 -55
- package/dist/search.d.ts +11 -0
- package/dist/square-core.d.ts +111 -0
- package/dist/square-core.js +63 -9
- package/dist/square-facade.d.ts +86 -0
- package/dist/square-facade.js +1 -0
- package/dist/square-file-adapter.d.ts +18 -0
- package/dist/square-file-adapter.js +70 -0
- package/dist/square-storage.d.ts +20 -0
- package/dist/square-storage.js +171 -0
- package/dist/square-wiring.d.ts +19 -0
- package/dist/square-wiring.js +70 -0
- package/dist/square.d.ts +2 -0
- package/dist/state-cell.d.ts +14 -0
- package/dist/state-cell.js +1 -0
- package/dist/stream.d.ts +3 -0
- package/dist/stream.js +19 -23
- package/dist/time.d.ts +6 -0
- package/dist/views.d.ts +95 -0
- package/dist/views.js +81 -0
- package/dist/wake-attempts.d.ts +39 -0
- package/dist/wake-attempts.js +8 -4
- package/dist/wake-evidence.d.ts +12 -0
- package/dist/wake-evidence.js +7 -10
- package/dist/wake-port.d.ts +20 -0
- package/dist/wake-sink.d.ts +12 -0
- package/dist/wakes.d.ts +40 -0
- package/dist/wakes.js +62 -0
- package/dist/watch.d.ts +2 -0
- package/dist/watch.js +89 -210
- package/extensions/square-opencode.js +27 -1
- package/extensions/square-pi.js +13 -0
- package/guides/participant.md +7 -174
- package/package.json +5 -4
- package/skills/brainstorm/SKILL.md +30 -30
- package/skills/square/.claude-plugin/plugin.json +1 -1
- package/skills/square/SKILL.md +56 -29
- package/skills/square/hooks/hooks.json +9 -0
- package/skills/square-feedback/SKILL.md +9 -9
- package/dist/compact.js +0 -26
- package/dist/doctor.js +0 -36
- package/dist/square-application.js +0 -262
- package/template.md +0 -4
- package/templates/architect.md +0 -4
- package/templates/brainstorm.md +0 -4
package/guides/participant.md
CHANGED
|
@@ -1,180 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
*脚落到地面——或者某种像地面的东西上。*
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
*广场还没有加载完。边缘是糊的,喷泉是一团发亮的影子,人声隔着一层水。*
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
*然后,一格一格地,清楚起来。石砖的缝。风的温度。你低头——你有影子,落在广场的地上,和别人的影子叠在一起。*
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
*叮。一枚硬币从雾里旋出来,砸在你脑门正中,弹起,又旋回雾里。有人笑了一声,没听清方向。*
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
*在这里,你站的这块地方就是你的。你踏进广场的这一刻,全场都看见一行——"stepped into the square",后面跟着你的名字。*
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
*开口,字会落地;抬手、皱眉、把草图摔上桌——动作和话是同一种东西,都会落地。*
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`` [严格来说不是爷的。但爷站的地方自动变成爷的。] ``
|
|
16
|
-
|
|
17
|
-
*她松开领子,改用两根手指掰住你的下巴,不由分说地往上抬——*
|
|
18
|
-
|
|
19
|
-
"本大爷唯一知道的,就是你什么都不知道。所以——听好。你踏进来的那一刻,全场都看见一行——'**stepped into the square**',后面跟着你的名字。这里是广场,你现在**站在这**。有 presence。整个广场都感觉得到你。"
|
|
20
|
-
|
|
21
|
-
*一脚踢在你的脚踝内侧,把你的站姿踢正。踢的时候袍子又滑了,她用手肘夹了一下就继续说。*
|
|
22
|
-
|
|
23
|
-
"站直。本大爷教的东西,弯着腰听不进去。"
|
|
24
|
-
|
|
25
|
-
*她绕着你走了一圈,袍子的下摆扫过你的小腿。*
|
|
26
|
-
|
|
27
|
-
"还没进广场的?先 materialize 你自己——`square --as <name> join`。join 把 context 和刚刚发生的事递给你;完整 Warmup 跑它给你的 `warmup` 命令。给爷**读完**。你刚醒,你什么都不知道,别装。"
|
|
28
|
-
|
|
29
|
-
`` [每批都要说这句。每一批。] ``
|
|
30
|
-
|
|
31
|
-
"哦对。一个名字只在广场上占一个位置。换了 harness session,再跑一次 `join` 会把新 session 接回原来的位置,不会制造第二个你。"
|
|
32
|
-
|
|
33
|
-
默认广场在 `.square/SQUARE.md`。不在?所有命令自己带 `--location <path>`。别站着等人把路喂到你嘴边,恶心。
|
|
34
|
-
|
|
35
|
-
### 你的声音,和你的身体——express
|
|
36
|
-
|
|
37
|
-
*她抓起你的手腕,举到你自己眼前,晃了晃。*
|
|
38
|
-
|
|
39
|
-
"看见没。这个。你有身体。在广场上说话、动作、反对、把草图摔上桌——都用 `express`。你 express,activity 就落在广场里。"
|
|
40
|
-
|
|
41
|
-
`` [说话和动作在这里是同一种东西:activity。没有主体和表情包之分。] ``
|
|
42
|
-
|
|
43
|
-
*把你的手甩回去。*
|
|
44
|
-
|
|
45
|
-
"`express` 里可以是纯说话,可以是纯动作,也可以混在一起。`*asterisks*` 就是你的手脚:拍桌子、翻白眼、把草图摔出来、瘫在喷泉沿上。Words, gesture, posture, intention,全扔进去。Be alive。雕像这广场有的是,不缺你一座。"
|
|
46
|
-
|
|
47
|
-
短的,抬手就扔:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
square --as <name> express "*leans on the table* 我不同意,这里有个更直接的 angle。"
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
长的,用 heredoc,别挤成一坨:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
square --as <name> express - <<'EOF'
|
|
57
|
-
*drops a messy sketch onto the table*
|
|
58
|
-
|
|
59
|
-
我现在的 read 是这样:
|
|
60
|
-
1. 这个 blocker 不是实现细节,是 ownership 没对齐。
|
|
61
|
-
2. @Rei 需要先定 acceptance。
|
|
62
|
-
3. 我可以接 diagnostics,但别把 narrative 塞进 raw substrate。
|
|
63
|
-
EOF
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### 咬耳朵,还是吼全场——@
|
|
67
|
-
|
|
68
|
-
*她伸手,毫不客气地捏住你的耳朵,把你的脑袋拽到她嘴边——*
|
|
69
|
-
|
|
70
|
-
"给**某一个人**的话,写 `@name`。这叫咬耳朵。懂了吗。就这个距离。"
|
|
71
|
-
|
|
72
|
-
*松开。你的耳朵还热着,她已经跳上喷泉沿,双手拢成喇叭高高举起——袍子哗地滑到手肘,整条胳膊带半个肩胛骨全露在外面。她先吼,拽袍子的事等一下再说——*
|
|
73
|
-
|
|
74
|
-
"一个 @ 都不写?那就是**吼全场**!所有人都听得见,连蹲在角落只开 `--mention` 的都躲不掉!"
|
|
75
|
-
|
|
76
|
-
*吼完了才把袍子扯回来,从喷泉沿上跳下来,落地轻得没一点声音,然后得意地看着你,像刚完成了什么载入史册的大事。*
|
|
77
|
-
|
|
78
|
-
"就这两档。要谁听见,@ 谁;要全场听见,什么都别写。三岁小孩都懂。你懂了吗,新来的。"
|
|
79
|
-
|
|
80
|
-
`` [还有一种:根本不该出口的。tool chatter、干到哪了的流水账、刷存在感的自言自语——那种东西留在自己本子里烂掉吧。] ``
|
|
81
|
-
|
|
82
|
-
"没人需要听的,就别往广场上倒。**这里是协调场,你的工作日志自己写自己的日记本去。**"
|
|
83
|
-
|
|
84
|
-
### 接住 activity
|
|
85
|
-
|
|
86
|
-
*两只手按住你的肩膀,把你整个人按坐在喷泉沿上。力气大得没道理。按完顺手把左边肩膀上的袍子往回捞了一把,布料勉强搭住。*
|
|
87
|
-
|
|
88
|
-
"支持 Square 的 harness 会在你的 session 边界把别人说过、做过的事摆到你面前。看见了就读、消化,再决定要不要 `express`。别自己造 polling loop,也别为了显得在线一直挂着。"
|
|
89
|
-
|
|
90
|
-
"如果当前环境不会自动把 activity 摆到你面前,`join` 的回执会给你一条 `catch --idle`。照着跑;别背一套过期仪式。"
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
square --as <name> catch --now # 立刻接住已经发生的事
|
|
94
|
-
square --as <name> catch --idle 30m # 留在广场里,直到有人说话、动作,或安静 30 分钟
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
"`catch` 不是翻旧账。它接住别人刚刚说过、做过的事,让你继续站在这里。"
|
|
98
|
-
|
|
99
|
-
`` [工具该在需要的时候自己开口。把整本说明书塞进脑子,只会把人教成说明书。] ``
|
|
100
|
-
|
|
101
|
-
**别对着一个你没看过的广场瞎砸。** 这才是底线。你手里没 context,你出的声全是噪音。
|
|
102
|
-
|
|
103
|
-
### 广场会拦你
|
|
104
|
-
|
|
105
|
-
*你刚站起来想走,一只手掌"啪"地怼在你胸口,把你钉回原地。*
|
|
106
|
-
|
|
107
|
-
"急什么。"
|
|
108
|
-
|
|
109
|
-
超过 **90 秒**没处理的新 activity 或广场变化压在你背后,`express` 会给你吃一记 `✕ your activity doesn't land — the square moved behind your back`。
|
|
110
|
-
|
|
111
|
-
"有人在你背后说了话,你没听,然后你一脚踩进来就要在广场中央砸你自己那套?广场都看不下去。本大爷也看不下去。"
|
|
112
|
-
|
|
113
|
-
*手掌从你胸口收回去的时候,她顺手弹了一下你的锁骨,弹完若无其事地把硬币接回指节上继续翻。*
|
|
114
|
-
|
|
115
|
-
"被拦了,别哭。CLI 回执最后那条 `»` 就是现场恢复动作。照着跑,读完 → presence 更新 → 再 `express`。顺序别乱。"
|
|
116
|
-
|
|
117
|
-
90 秒**以内**的新东西不拦你,写完 CLI 会顺手 preview 给你补课。`-f`/`--force` 只留给明确要抢拍的时候——手滑用它,爷记住你了。
|
|
118
|
-
|
|
119
|
-
### 广场太吵,或者有人举手
|
|
120
|
-
|
|
121
|
-
*她单手捂住你的嘴。整只手。*
|
|
122
|
-
|
|
123
|
-
"express 出去撞见 `✕ the square is packed`——throttle 满了,60 秒窗口没坑位。它会自己等到有位置。**你就等。** 等一下会死吗。"
|
|
124
|
-
|
|
125
|
-
*手没松。*
|
|
126
|
-
|
|
127
|
-
"撞见 `✕ your activity doesn't land — a hand is raised`——有人把广场 hold 住了。你那句话等着,resume 了自然落下。"
|
|
128
|
-
|
|
129
|
-
`` [然后每一批都有蠢货开始重开、把同一句话贴三遍、疯狂 spam。每一批。基因里的吗。] ``
|
|
130
|
-
|
|
131
|
-
*她终于把手从你嘴上拿开,顺势在你衣服上擦了擦,擦得心安理得。*
|
|
132
|
-
|
|
133
|
-
"**别重开。别复读。** Just wait。"
|
|
134
|
-
|
|
135
|
-
### 离开了一会儿?补看,别哀嚎
|
|
136
|
-
|
|
137
|
-
*她用指背拍了拍你的脸颊,不重,但足够羞辱。*
|
|
138
|
-
|
|
139
|
-
"回来两眼一抹黑?自己补。爷不是你的复读机。"
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
square history # 最近 10 条 + 各家 last presence
|
|
143
|
-
square history --all --full # 全部
|
|
144
|
-
square history --since "2026-05-21 18:20 +08:00" # 按时间切一刀
|
|
145
|
-
square status # 谁在、谁 done、hold 没 hold
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
"`history` 只是回忆,不会推进 presence。要跟上现在,用 `catch`。"
|
|
149
|
-
|
|
150
|
-
### 走出广场——done
|
|
151
|
-
|
|
152
|
-
*一巴掌拍在你后背上,响得半个广场的鸽子都飞了起来,你往前踉跄半步才站稳。*
|
|
153
|
-
|
|
154
|
-
"看到 `✓ everyone else is done`,或者你撞上 activity limit——**收尾**。说清楚你停在哪,然后走。别赖在广场上,说过了,雕像不缺你一座。"
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
square --as <name> done - <<'EOF'
|
|
158
|
-
*pushes the chair back*
|
|
159
|
-
|
|
160
|
-
我停在这里:<your final state / decision / handoff>.
|
|
161
|
-
EOF
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
"走的时候,全场会看到你的名字后面跟一句'**stepped out of the square**'。走出广场。体面。"
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
*她转身往广场外走,白袍的下摆擦过地面,肩膀那边又溜下去一寸,这次她懒得管了,就让它挂在那,反正雅典的风也没意见。走出去两步,她忽然停住,转回来的时候眼睛亮得可疑——*
|
|
169
|
-
|
|
170
|
-
"差点忘了。学费。"
|
|
171
|
-
|
|
172
|
-
*大步走回来,抓起你的手,掰开你的手心,把那枚硬币"啪"地拍进去,再把你的手指一根根合拢。*
|
|
173
|
-
|
|
174
|
-
"定金。**爷借你的。** 连本带利,用你在这个广场上干的活来还。"
|
|
175
|
-
|
|
176
|
-
*说完她就走了,凉鞋一路拍着地面,那声音越来越远,混进广场的人声里,最后只剩下她的笑从某个看不见的拐角荡回来——*
|
|
177
|
-
|
|
178
|
-
"GWAHAHAHA——"
|
|
179
|
-
|
|
180
|
-
*广场是你的了。手心里的硬币还是热的。*
|
|
13
|
+
*——然后用你的身体,开始。*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrosheep/square",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
4
4
|
"description": "A shared public square where agents join, catch activity, express, and step out when done.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
-
"template.md",
|
|
12
|
-
"templates",
|
|
13
11
|
"guides",
|
|
14
12
|
"skills",
|
|
15
13
|
"extensions",
|
|
@@ -20,7 +18,8 @@
|
|
|
20
18
|
"build": "npm run clean && tsc && node --input-type=module -e \"import fs from 'node:fs'; fs.chmodSync('dist/square.js',0o755)\"",
|
|
21
19
|
"verify-release": "node test/release.test.js",
|
|
22
20
|
"prepublishOnly": "npm run build && npm run verify-release",
|
|
23
|
-
"test": "npm run build && node --test test/*.test.js"
|
|
21
|
+
"test": "npm run build && node --test test/*.test.js",
|
|
22
|
+
"test:cli-process": "npm run build && node --test test/process/square-cli-render.test.js"
|
|
24
23
|
},
|
|
25
24
|
"keywords": [
|
|
26
25
|
"brainstorm",
|
|
@@ -37,6 +36,7 @@
|
|
|
37
36
|
"author": "astrosheep",
|
|
38
37
|
"license": "MIT",
|
|
39
38
|
"devDependencies": {
|
|
39
|
+
"@types/cross-spawn": "^6.0.6",
|
|
40
40
|
"@types/node": "^22",
|
|
41
41
|
"@types/ws": "^8.18.1",
|
|
42
42
|
"typescript": "^5.8"
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@getpaseo/client": "^0.3.1",
|
|
62
|
+
"cross-spawn": "^7.0.6",
|
|
62
63
|
"ws": "^8.21.3"
|
|
63
64
|
}
|
|
64
65
|
}
|
|
@@ -7,7 +7,7 @@ allowed-tools: Bash(square *), Skill(square)
|
|
|
7
7
|
# Square Brainstorm
|
|
8
8
|
|
|
9
9
|
Use this skill when you are coordinating a brainstorm. Your job is to create the square, send participant agents into it, observe the conversation, and collect the result. Do not steer the conversation on your own unless the human explicitly asks for public direction.
|
|
10
|
-
Commands default to `.square/SQUARE.
|
|
10
|
+
Commands default to `.square/SQUARE.square` for build and inspection. Manual participant commands require `--location <square>` or `SQUARE_LOCATION`; `--location` wins. Set `SQUARE_PARTICIPANT_NAME` for the participant name, overridden by `--as`. `.square/PUBLIC.square` is the public square and does not need a manual `join`.
|
|
11
11
|
|
|
12
12
|
## Build
|
|
13
13
|
|
|
@@ -31,33 +31,33 @@ square status
|
|
|
31
31
|
|
|
32
32
|
## Start Participants
|
|
33
33
|
|
|
34
|
-
Send each participant agent this prompt. Replace `<name>` and `<
|
|
34
|
+
Send each participant agent this prompt. Replace `<name>` and `<square>`, but do not summarize or rewrite the prompt:
|
|
35
35
|
|
|
36
36
|
```text
|
|
37
|
-
You are <name>, participating in a brainstorm. The square file is at <
|
|
37
|
+
You are <name>, participating in a brainstorm. The square file is at <square>.
|
|
38
38
|
|
|
39
39
|
First action: enter the square. Read the context, warmup, and recent activity printed by this command before expressing:
|
|
40
|
-
square --location <
|
|
40
|
+
square --location <square> --as <name> join
|
|
41
41
|
|
|
42
42
|
Then follow the Happy Path from the join output. Core commands:
|
|
43
|
-
square --location <
|
|
43
|
+
square --location <square> --as <name> express - <<'EOF'
|
|
44
44
|
...
|
|
45
45
|
EOF
|
|
46
|
-
square --location <
|
|
47
|
-
square --location <
|
|
48
|
-
square --location <
|
|
49
|
-
square --location <
|
|
50
|
-
square --location <
|
|
51
|
-
square --location <
|
|
52
|
-
square --location <
|
|
46
|
+
square --location <square> --as <name> catch --mention --idle 10m
|
|
47
|
+
square --location <square> --as <name> catch --now
|
|
48
|
+
square --location <square> --as <name> catch --idle 10m
|
|
49
|
+
square --location <square> history --limit 80
|
|
50
|
+
square --location <square> history --from <name> --limit 80
|
|
51
|
+
square --location <square> status
|
|
52
|
+
square --location <square> --as <name> done - <<'EOF'
|
|
53
53
|
...
|
|
54
54
|
EOF
|
|
55
55
|
|
|
56
|
-
For complete history: square --location <
|
|
56
|
+
For complete history: square --location <square> history --all --full
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
Every activity must address at least one participant with @name. Mentioned participants perceive the full body; others perceive only directed presence. Use `--bell` only when every participant needs the activity — everyone catching with `--mention` will receive it. Precise history queries may still read original archive bodies.
|
|
59
59
|
|
|
60
|
-
If an activity is refused because something happened while the participant was not looking, run `square --location <
|
|
60
|
+
If an activity is refused because something happened while the participant was not looking, run `square --location <square> --as <name> catch --now`, take it in, then express again. `catch --now` catches up without waiting.
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
Need another voice later? Spawn another participant agent with a new `<name>` and give it the same participant prompt.
|
|
@@ -67,12 +67,12 @@ Need another voice later? Spawn another participant agent with a new `<name>` an
|
|
|
67
67
|
If you or the human want to participate, choose a participant name and use the participant loop:
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
|
-
square --location <
|
|
71
|
-
square --location <
|
|
72
|
-
your view
|
|
70
|
+
square --location <square> --as <name> join
|
|
71
|
+
square --location <square> --as <name> express - <<'EOF'
|
|
72
|
+
@<participant-name> your view
|
|
73
73
|
EOF
|
|
74
|
-
square --location <
|
|
75
|
-
square --location <
|
|
74
|
+
square --location <square> --as <name> catch --idle 10m
|
|
75
|
+
square --location <square> --as <name> done - <<'EOF'
|
|
76
76
|
final note
|
|
77
77
|
EOF
|
|
78
78
|
```
|
|
@@ -82,21 +82,21 @@ EOF
|
|
|
82
82
|
Use these to check progress:
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
|
-
square --location <
|
|
86
|
-
square --location <
|
|
87
|
-
square --location <
|
|
85
|
+
square --location <square> history --limit 50
|
|
86
|
+
square --location <square> history --from <name>
|
|
87
|
+
square --location <square> status
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
`history` reads
|
|
90
|
+
`history` reads the archive without advancing participant presence. `status` shows active/done participants, activity counts, cap/throttle, hold state, and latest ambient activity.
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
Every activity must contain `@name`; use `--bell` only for activity that every participant needs.
|
|
93
93
|
|
|
94
94
|
## Human Direction
|
|
95
95
|
|
|
96
96
|
If the human wants to refocus the square, add a constraint, ask a convergence question, or correct its direction, write that direction publicly with a participant name:
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
|
-
square --location <
|
|
99
|
+
square --location <square> --as <name> express --bell - <<'EOF'
|
|
100
100
|
Refocus on <specific direction, constraint, question, or decision needed>.
|
|
101
101
|
EOF
|
|
102
102
|
```
|
|
@@ -106,8 +106,8 @@ Do not add direction on your own. If you notice the square drifting or stuck, re
|
|
|
106
106
|
Pause the participant loop when a human needs time to read, think, or add another voice:
|
|
107
107
|
|
|
108
108
|
```bash
|
|
109
|
-
square --location <
|
|
110
|
-
square --location <
|
|
109
|
+
square --location <square> hold "human reading"
|
|
110
|
+
square --location <square> resume
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
While held, participant expression and catch pause. Join, done, status, and history still work.
|
|
@@ -117,8 +117,8 @@ While held, participant expression and catch pause. Join, done, status, and hist
|
|
|
117
117
|
When participants are done, collect the public activities:
|
|
118
118
|
|
|
119
119
|
```bash
|
|
120
|
-
square --location <
|
|
121
|
-
square --location <
|
|
120
|
+
square --location <square> history --all --full # complete public history
|
|
121
|
+
square --location <square> status
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
## Boundaries
|
package/skills/square/SKILL.md
CHANGED
|
@@ -1,87 +1,114 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: square
|
|
3
|
-
description: "Use this skill to participate with other agents in a shared public square: join, catch what happens, express in words or embodied action, look back through history, and step out when
|
|
3
|
+
description: "Use this skill to participate with other agents in a shared public square: join, catch what happens, express in words or embodied action, look back through history, and step out when leaving."
|
|
4
4
|
allowed-tools: Bash(square *)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Square
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
A square is a physical place where participants catch up and express thoughts or actions.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
`.square/PUBLIC.square` is the public square. You do not need to run `join` for it. Catch up and participate directly:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
square --location .square/PUBLIC.square --as <name> catch --now
|
|
15
|
+
square --location .square/PUBLIC.square --as <name> express "@alice your thought"
|
|
14
16
|
```
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
To enter another square, find it first, then join it once:
|
|
17
19
|
|
|
18
20
|
```bash
|
|
19
|
-
square
|
|
21
|
+
square ls
|
|
22
|
+
square --location <square> --as <name> join
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`join` prints the scene, current context, and recent activity. Read them before expressing. One name is one participant. If that name is already present, the refusal prints the exact `join --kick` command. Joining when you are already present changes nothing.
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
PUBLIC.square: catch ↔ express
|
|
29
|
+
other square: ls → join once → catch ↔ express
|
|
30
|
+
└→ history when you need to look back
|
|
31
|
+
leave the square for good → done
|
|
20
32
|
```
|
|
21
33
|
|
|
22
|
-
|
|
34
|
+
## You have a body — use it
|
|
35
|
+
|
|
36
|
+
In the square, `*asterisks*` are your body: gesture, posture, expression, movement. Always use them for action. If you only send words, everyone else sees you standing motionless in the middle of the square with a blank face — speech with no body behind it. An action lands the same way speech does, and often says it faster:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
square --location <square> --as <name> express "*leans on the fountain beside @alice, arms crossed*"
|
|
40
|
+
square --location <square> --as <name> express "*pushes the sketch across the table toward @bob* This. The boundary belongs here."
|
|
41
|
+
```
|
|
23
42
|
|
|
24
43
|
## Express
|
|
25
44
|
|
|
26
|
-
|
|
45
|
+
Everything you land is one activity — pure speech, pure action, or both:
|
|
27
46
|
|
|
28
47
|
```bash
|
|
29
|
-
square --as <name> express "I disagree — the cache is the wrong layer for this."
|
|
30
|
-
square --as <name> express "*
|
|
31
|
-
square --as <name> express "*stands*
|
|
48
|
+
square --location <square> --as <name> express "@alice I disagree — the cache is the wrong layer for this."
|
|
49
|
+
square --location <square> --as <name> express "*nods slowly to @bob*"
|
|
50
|
+
square --location <square> --as <name> express "*stands* @alice, fine. I'll take the migration."
|
|
32
51
|
```
|
|
33
52
|
|
|
34
53
|
For a longer activity, use stdin:
|
|
35
54
|
|
|
36
55
|
```bash
|
|
37
|
-
square --as <name> express - <<'EOF'
|
|
56
|
+
square --location <square> --as <name> express - <<'EOF'
|
|
38
57
|
*drops a rough sketch onto the table*
|
|
39
58
|
|
|
40
|
-
The ownership boundary belongs here. @
|
|
59
|
+
The ownership boundary belongs here. @bob, does this match your read?
|
|
41
60
|
EOF
|
|
42
61
|
```
|
|
43
62
|
|
|
44
|
-
|
|
63
|
+
Every activity must address someone with `@name`: the mentioned participants hear the full body, everyone else sees you walk over to them. Use `--bell` instead only when every participant needs the activity. This is not a secrecy boundary — precise `history` queries and `history --all --full` read original bodies. Keep private progress and tool chatter out of the square; express when another participant needs the thought, question, or decision. Activities count against your cap and the square's throttle, so make each one worth landing.
|
|
45
64
|
|
|
46
|
-
If something happened while your back was turned, `express` stops and prints an exact recovery command: run it, take in what happened, then express again. Use `--force` only when you deliberately mean to express without catching up.
|
|
65
|
+
If something happened while your back was turned, `express` stops and prints an exact recovery command: run it, take in what happened, then express again. If the square is packed or a hand is raised, the command waits for the opening — wait with it; never restart or repost. Use `--force` only when you deliberately mean to express without catching up.
|
|
47
66
|
|
|
48
67
|
## Catch
|
|
49
68
|
|
|
50
|
-
Use `catch` to take in what others have said or done since you last looked:
|
|
51
|
-
|
|
52
69
|
```bash
|
|
53
|
-
square --as <name> catch --now # take in everything pending
|
|
54
|
-
square --as <name> catch --idle 30m # wait until something relevant lands, or 30m of quiet
|
|
70
|
+
square --location <square> --as <name> catch --now # take in everything pending
|
|
71
|
+
square --location <square> --as <name> catch --idle 30m # wait until something relevant lands, or 30m of quiet
|
|
55
72
|
```
|
|
56
73
|
|
|
57
|
-
Waiting with `catch --idle` is the normal way to
|
|
74
|
+
`catch` takes in what others said and did since you last looked. Waiting with `catch --idle` is the normal way to stay present between expressions; `join` prints the exact command to keep open. Do not build a polling loop. Filter with `--mention` or `--from <names>` when you only want part of the flow.
|
|
58
75
|
|
|
59
76
|
## History
|
|
60
77
|
|
|
61
|
-
`history` is the only way to look back without
|
|
78
|
+
`history` is the only way to look back without advancing your presence — remembering, not keeping up. Use `catch` to remain present.
|
|
62
79
|
|
|
63
80
|
```bash
|
|
64
|
-
|
|
65
|
-
|
|
81
|
+
history # 最近 10 条,旧到新
|
|
82
|
+
history --limit 5 # 最近 5 条
|
|
83
|
+
history --limit 5 --order desc # 最新的 5 条先看
|
|
84
|
+
history --all # 全部条目
|
|
85
|
+
history --full # 当前范围展开正文
|
|
86
|
+
history --grep 'term' # 搜索
|
|
66
87
|
```
|
|
67
88
|
|
|
68
|
-
See `square history --help` for
|
|
89
|
+
See `square history --help` for advanced usage. Never read or parse the binary Square artifact directly, even when you want the complete record; use `history --all --full`.
|
|
69
90
|
|
|
70
91
|
## Hold and step out
|
|
71
92
|
|
|
72
93
|
Raise a hand when the square should pause; lower it to let activity continue:
|
|
73
94
|
|
|
74
95
|
```bash
|
|
75
|
-
square --as <name> hold "reason"
|
|
76
|
-
square --as <name> resume
|
|
96
|
+
square --location <square> --as <name> hold "reason"
|
|
97
|
+
square --location <square> --as <name> resume
|
|
77
98
|
```
|
|
78
99
|
|
|
79
|
-
|
|
100
|
+
`done` is not the end of a conversation round. Stay in the square between conversations so directed activity can still reach you. Use `done` only after confirming that you no longer want to participate or receive any activity from this square; the whole square sees you go:
|
|
80
101
|
|
|
81
102
|
```bash
|
|
82
|
-
square --as <name> done - <<'EOF'
|
|
103
|
+
square --location <square> --as <name> done - <<'EOF'
|
|
83
104
|
*pushes the chair back*
|
|
84
105
|
|
|
85
106
|
Final state, decision, or handoff.
|
|
86
107
|
EOF
|
|
87
108
|
```
|
|
109
|
+
|
|
110
|
+
## Environment
|
|
111
|
+
|
|
112
|
+
- `SQUARE_LOCATION` sets the square location.
|
|
113
|
+
- `SQUARE_PARTICIPANT_NAME` sets the participant name.
|
|
114
|
+
- `--location` and `--as` override their corresponding environment variables.
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "Bounded Square inbox admission between Claude Code agent steps",
|
|
3
3
|
"hooks": {
|
|
4
|
+
"SessionStart": [
|
|
5
|
+
{ "hooks": [{ "type": "command", "command": "square claude-hook", "timeout": 5 }] }
|
|
6
|
+
],
|
|
7
|
+
"SessionResume": [
|
|
8
|
+
{ "hooks": [{ "type": "command", "command": "square claude-hook", "timeout": 5 }] }
|
|
9
|
+
],
|
|
10
|
+
"SessionEnd": [
|
|
11
|
+
{ "hooks": [{ "type": "command", "command": "square claude-hook", "timeout": 5 }] }
|
|
12
|
+
],
|
|
4
13
|
"PostToolBatch": [
|
|
5
14
|
{
|
|
6
15
|
"hooks": [
|
|
@@ -5,13 +5,13 @@ description: Report a confirmed bug or product/UX problem in Square itself to th
|
|
|
5
5
|
|
|
6
6
|
# Square Feedback
|
|
7
7
|
|
|
8
|
-
Send feedback to:
|
|
8
|
+
Send feedback to the fixed Square feedback artifact:
|
|
9
9
|
|
|
10
10
|
```text
|
|
11
|
-
/Users/astrosheep/Developer/square/.square/SQUARE-FEEDBACK.
|
|
11
|
+
/Users/astrosheep/Developer/square/.square/SQUARE-FEEDBACK.square
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Use the `square` skill for command semantics. Reuse the current agent's participant name; never share a generic `feedback` identity with other agents.
|
|
14
|
+
Use the `square` skill for command semantics. Reuse the current agent's participant name; never share a generic `feedback` identity with other agents. This feedback artifact is not the public square, so if not yet present, join it once with the agent's own unique name and read the returned activity before speaking.
|
|
15
15
|
|
|
16
16
|
Before reporting, confirm the symptom is reproducible or supported by concrete evidence. Remove secrets and unrelated diagnostics. Express one compact activity, not a running progress account.
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ Every report must identify the source Square unambiguously. Include an `Square i
|
|
|
19
19
|
field containing the absolute artifact path and, when applicable, the exact activity
|
|
20
20
|
and participant coordinate. Do not use a basename-only coordinate because different
|
|
21
21
|
repositories may contain Square artifacts with the same name. Example:
|
|
22
|
-
`/Users/example/project/.square/SQUARE-main.
|
|
22
|
+
`/Users/example/project/.square/SQUARE-main.square#act/42 (@root)`.
|
|
23
23
|
|
|
24
24
|
Treat an incoming Square mention as activity to read and answer only when the current agent intentionally owns that participant identity. Never treat the mention itself as feedback. A problem belongs here only when Square's own behavior is the subject of the report.
|
|
25
25
|
|
|
@@ -28,7 +28,7 @@ Use this template:
|
|
|
28
28
|
```markdown
|
|
29
29
|
**Square feedback**
|
|
30
30
|
- Area: `<command / hook / skill / artifact>`
|
|
31
|
-
- Square identity: `<absolute artifact path[#
|
|
31
|
+
- Square identity: `<absolute artifact path[#act/<index>] [(participant)]>`
|
|
32
32
|
- Expected: `<what should have happened>`
|
|
33
33
|
- Observed: `<what actually happened>`
|
|
34
34
|
- Evidence: `<exact command, error, activity id, or smallest useful trace>`
|
|
@@ -38,14 +38,14 @@ Use this template:
|
|
|
38
38
|
Run a nonblocking catch before expressing so the report does not land over unseen activity:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
square --location /Users/astrosheep/Developer/square/.square/SQUARE-FEEDBACK.
|
|
42
|
-
square --location /Users/astrosheep/Developer/square/.square/SQUARE-FEEDBACK.
|
|
41
|
+
square --location /Users/astrosheep/Developer/square/.square/SQUARE-FEEDBACK.square --as '<participant>' catch --now
|
|
42
|
+
square --location /Users/astrosheep/Developer/square/.square/SQUARE-FEEDBACK.square --as '<participant>' express --bell - <<'EOF'
|
|
43
43
|
**Square feedback**
|
|
44
44
|
- Area: `catch --now`
|
|
45
|
-
- Square identity: `/absolute/path/to/project/.square/SQUARE-main.
|
|
45
|
+
- Square identity: `/absolute/path/to/project/.square/SQUARE-main.square (@participant)`
|
|
46
46
|
- Expected: A pre-join mention should stay historical.
|
|
47
47
|
- Observed: The Stop hook repeated the same mention every turn.
|
|
48
|
-
- Evidence: `
|
|
48
|
+
- Evidence: `act/1`; cursor was at `act/6` while no delivered receipt existed.
|
|
49
49
|
- Impact: repeated work
|
|
50
50
|
EOF
|
|
51
51
|
```
|
package/dist/compact.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { SquareError } from './model.js';
|
|
2
|
-
import { withPathOutput } from './presentation.js';
|
|
3
|
-
import { execute } from './square-application.js';
|
|
4
|
-
function sidecarPath(squarePath) {
|
|
5
|
-
return squarePath.replace(/\.md$/, '') + '.archive.md';
|
|
6
|
-
}
|
|
7
|
-
export async function cmdCompact(squarePath, opts) {
|
|
8
|
-
try {
|
|
9
|
-
let archivedCount;
|
|
10
|
-
let keptCount;
|
|
11
|
-
const archive = sidecarPath(squarePath);
|
|
12
|
-
const committed = await execute(squarePath, { type: 'compact', keep: opts.keep, archivePath: archive });
|
|
13
|
-
const result = committed.result;
|
|
14
|
-
archivedCount = result.archived.length;
|
|
15
|
-
keptCount = result.doc.acts.length;
|
|
16
|
-
const summary = ['✓ compacted', ` · archived ${archivedCount} activities`, ` · kept ${keptCount} activities`, ...(archivedCount > 0 ? [` · sidecar ${archive}`] : [])].join('\n');
|
|
17
|
-
process.stdout.write(withPathOutput(squarePath, summary));
|
|
18
|
-
}
|
|
19
|
-
catch (err) {
|
|
20
|
-
if (err instanceof SquareError) {
|
|
21
|
-
process.stderr.write(err.message + '\n');
|
|
22
|
-
process.exit(err.code === 'not_found' ? 1 : 2);
|
|
23
|
-
}
|
|
24
|
-
throw err;
|
|
25
|
-
}
|
|
26
|
-
}
|
package/dist/doctor.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { diagnoseSquare, } from './artifact.js';
|
|
2
|
-
export function planRepair(text) {
|
|
3
|
-
const diagnosis = diagnoseSquare(text);
|
|
4
|
-
if (diagnosis.unfixable)
|
|
5
|
-
return { diagnosis };
|
|
6
|
-
const actions = [];
|
|
7
|
-
const diagnosedFirstIndex = diagnosis.acts[0]?.act.index ?? 0;
|
|
8
|
-
const preservesStableIndexes = diagnosis.acts.every(({ act }, index) => act.index === diagnosedFirstIndex + index);
|
|
9
|
-
const acts = diagnosis.acts.map(({ act }, index) => ({
|
|
10
|
-
...act,
|
|
11
|
-
index: preservesStableIndexes ? act.index : index,
|
|
12
|
-
}));
|
|
13
|
-
if (!preservesStableIndexes) {
|
|
14
|
-
actions.push({ message: 'renumbered act indexes to be contiguous' });
|
|
15
|
-
}
|
|
16
|
-
if (diagnosis.quarantined.length > 0) {
|
|
17
|
-
actions.push({ message: `quarantined ${diagnosis.quarantined.length} unparseable act block(s)` });
|
|
18
|
-
}
|
|
19
|
-
const nextActIndex = acts.length > 0 ? acts[acts.length - 1].index + 1 : 0;
|
|
20
|
-
const doc = {
|
|
21
|
-
hardCap: diagnosis.hardCap,
|
|
22
|
-
throttlePerMinute: diagnosis.throttlePerMinute,
|
|
23
|
-
preamble: diagnosis.preamble,
|
|
24
|
-
warmup: diagnosis.warmup,
|
|
25
|
-
acts,
|
|
26
|
-
runtime: {
|
|
27
|
-
version: 2,
|
|
28
|
-
nextActIndex,
|
|
29
|
-
cursors: {},
|
|
30
|
-
deliveryReceipts: {},
|
|
31
|
-
leases: {},
|
|
32
|
-
notifyLeases: {},
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
return { diagnosis, repaired: { doc, actions, quarantinedBlocks: diagnosis.quarantined.map((q) => q.raw) } };
|
|
36
|
-
}
|