@seanyao/roll 2026.424.3 → 2026.503.7
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/bin/roll
CHANGED
|
@@ -4,7 +4,7 @@ set -euo pipefail
|
|
|
4
4
|
# Roll — AI Agent Convention Manager
|
|
5
5
|
# Single source of truth for how all AI coding agents behave.
|
|
6
6
|
|
|
7
|
-
VERSION="2026.
|
|
7
|
+
VERSION="2026.503.7"
|
|
8
8
|
ROLL_HOME="${ROLL_HOME:-${HOME}/.roll}"
|
|
9
9
|
ROLL_CONFIG="${ROLL_HOME}/config.yaml"
|
|
10
10
|
ROLL_GLOBAL="${ROLL_HOME}/conventions/global"
|
|
@@ -64,6 +64,24 @@ lower_name() {
|
|
|
64
64
|
echo "$1" | tr '[:upper:]' '[:lower:]'
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
# Check if an AI tool is actually installed.
|
|
68
|
+
# Most tools create their own config dir; Trae on macOS uses Library/Application Support
|
|
69
|
+
# and expects roll to manage ~/.trae/ — so we detect via the app directory instead.
|
|
70
|
+
_is_ai_installed() {
|
|
71
|
+
local ai_dir="$1"
|
|
72
|
+
[[ -d "$ai_dir" ]] && return 0
|
|
73
|
+
local bn
|
|
74
|
+
bn="$(basename "$ai_dir" | sed 's/^\.//')"
|
|
75
|
+
case "$bn" in
|
|
76
|
+
trae)
|
|
77
|
+
[[ -d "$HOME/Library/Application Support/Trae" ]] ||
|
|
78
|
+
[[ -d "$HOME/.config/Trae" ]]
|
|
79
|
+
return
|
|
80
|
+
;;
|
|
81
|
+
esac
|
|
82
|
+
return 1
|
|
83
|
+
}
|
|
84
|
+
|
|
67
85
|
# ─── Helper: read config value ───────────────────────────────────────────────
|
|
68
86
|
config_get() {
|
|
69
87
|
local key="$1"
|
|
@@ -87,6 +105,53 @@ _get_ai_tools() {
|
|
|
87
105
|
done
|
|
88
106
|
}
|
|
89
107
|
|
|
108
|
+
# Add any ai_* keys from the default set that are missing from the user's config.
|
|
109
|
+
# Non-destructive: never removes or modifies existing entries.
|
|
110
|
+
_ensure_config_entries() {
|
|
111
|
+
[[ -f "$ROLL_CONFIG" ]] || return
|
|
112
|
+
|
|
113
|
+
local -a default_keys=(
|
|
114
|
+
"ai_claude:~/.claude|CLAUDE.md|CLAUDE.md"
|
|
115
|
+
"ai_gemini:~/.gemini|GEMINI.md|GEMINI.md"
|
|
116
|
+
"ai_kimi:~/.kimi|AGENTS.md|AGENTS.md"
|
|
117
|
+
"ai_codex:~/.codex|AGENTS.md|AGENTS.md"
|
|
118
|
+
"ai_cursor:~/.cursor|.cursor-rules|.cursor-rules"
|
|
119
|
+
"ai_trae:~/.trae|user_rules.md|project_rules.md"
|
|
120
|
+
"ai_openclaw:~/.openclaw/workspace|AGENTS.md|AGENTS.md"
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
local added=0
|
|
124
|
+
local tmp
|
|
125
|
+
tmp="$(mktemp)"
|
|
126
|
+
cp "$ROLL_CONFIG" "$tmp"
|
|
127
|
+
|
|
128
|
+
for entry in "${default_keys[@]}"; do
|
|
129
|
+
local key="${entry%%:*}"
|
|
130
|
+
local val="${entry#*:}"
|
|
131
|
+
if ! grep -qE "^${key}:" "$ROLL_CONFIG" 2>/dev/null; then
|
|
132
|
+
if grep -q "^# User preferences" "$tmp" 2>/dev/null; then
|
|
133
|
+
local new_tmp
|
|
134
|
+
new_tmp="$(mktemp)"
|
|
135
|
+
while IFS= read -r line; do
|
|
136
|
+
[[ "$line" == "# User preferences" ]] && echo "${key}: ${val}" >> "$new_tmp"
|
|
137
|
+
echo "$line" >> "$new_tmp"
|
|
138
|
+
done < "$tmp"
|
|
139
|
+
mv "$new_tmp" "$tmp"
|
|
140
|
+
else
|
|
141
|
+
echo "${key}: ${val}" >> "$tmp"
|
|
142
|
+
fi
|
|
143
|
+
added=$((added + 1))
|
|
144
|
+
warn "Added missing config entry: ${key} 已添加缺失配置项: ${key}"
|
|
145
|
+
fi
|
|
146
|
+
done
|
|
147
|
+
|
|
148
|
+
if [[ $added -gt 0 ]]; then
|
|
149
|
+
cp "$tmp" "$ROLL_CONFIG"
|
|
150
|
+
ok "Config updated with $added new entries 配置已更新,新增 $added 条目"
|
|
151
|
+
fi
|
|
152
|
+
rm -f "$tmp"
|
|
153
|
+
}
|
|
154
|
+
|
|
90
155
|
# Extract fields from a "<dir>|<config>|<src>" entry
|
|
91
156
|
_ai_dir() { echo "$1" | cut -d'|' -f1; }
|
|
92
157
|
_ai_config() { echo "$1" | cut -d'|' -f2; }
|
|
@@ -246,6 +311,9 @@ YAML
|
|
|
246
311
|
ok "Created: ~/.roll/config.yaml 已创建: ~/.roll/config.yaml"
|
|
247
312
|
fi
|
|
248
313
|
|
|
314
|
+
# Ensure all expected ai_* keys exist (handles upgrades where new tools were added)
|
|
315
|
+
_ensure_config_entries
|
|
316
|
+
|
|
249
317
|
}
|
|
250
318
|
|
|
251
319
|
# ─── Internal: create or repair per-skill symlinks (non-destructive) ─────────
|
|
@@ -258,7 +326,8 @@ _link_skills() {
|
|
|
258
326
|
while IFS= read -r entry; do
|
|
259
327
|
local ai_dir
|
|
260
328
|
ai_dir="$(_ai_dir "$entry")"
|
|
261
|
-
|
|
329
|
+
_is_ai_installed "$ai_dir" || continue
|
|
330
|
+
mkdir -p "$ai_dir"
|
|
262
331
|
|
|
263
332
|
local ai_name ai_dir_real skills_dir
|
|
264
333
|
ai_name="$(ai_tool_name "$ai_dir")"
|
|
@@ -355,8 +424,8 @@ _sync_convention_for_tool() {
|
|
|
355
424
|
local dst_dir
|
|
356
425
|
dst_dir="$(dirname "$main_dst")"
|
|
357
426
|
|
|
358
|
-
# Only proceed if
|
|
359
|
-
if [[ "$dst_dir" != "$HOME/.claude" ]] &&
|
|
427
|
+
# Only proceed if Claude (always) or the tool is installed
|
|
428
|
+
if [[ "$dst_dir" != "$HOME/.claude" ]] && ! _is_ai_installed "$dst_dir"; then
|
|
360
429
|
return
|
|
361
430
|
fi
|
|
362
431
|
mkdir -p "$dst_dir"
|
|
@@ -467,6 +536,7 @@ cmd_sync() {
|
|
|
467
536
|
info "Syncing from repo to AI tools... 正在从仓库同步到 AI 工具..."
|
|
468
537
|
echo ""
|
|
469
538
|
_pull_conventions "$force"
|
|
539
|
+
_ensure_config_entries
|
|
470
540
|
echo ""
|
|
471
541
|
_sync_conventions "$force"
|
|
472
542
|
echo ""
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
## Claude Code-Specific
|
|
19
19
|
|
|
20
|
-
- When a project has Roll skills, use them (`$roll-design`, `$roll-
|
|
20
|
+
- When a project has Roll skills, use them (`$roll-design`, `$roll-build`, `$roll-fix`, etc.).
|
|
21
21
|
- Use plan mode for complex multi-step tasks before executing.
|
|
22
22
|
- Prefer Edit tool over Bash for file modifications.
|
|
23
23
|
- Use Agent tool with worktree isolation for parallel independent subtasks.
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
|
|
14
14
|
- Use `$roll-design` to plan features that span frontend and backend.
|
|
15
15
|
- When modifying API contracts, update both `api/types.ts` and `src/shared/types/` in the same commit.
|
|
16
|
-
- Use worktree isolation for parallel frontend/backend Actions in `$roll-
|
|
16
|
+
- Use worktree isolation for parallel frontend/backend Actions in `$roll-build`.
|
|
17
17
|
- Run `npm run build` to verify both frontend and backend compile before pushing.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seanyao/roll",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.503.7",
|
|
4
4
|
"description": "Roll — Roll out features with AI agents",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "find tests/unit tests/integration -name '*.bats' | sort | xargs ./tests/helpers/bats-core/bin/bats"
|
package/skills/roll-.qa/SKILL.md
CHANGED
|
@@ -208,4 +208,4 @@ If project lacks Playwright setup:
|
|
|
208
208
|
|
|
209
209
|
- [Playwright Docs](https://playwright.dev/)
|
|
210
210
|
- [Visual Regression Guide](https://playwright.dev/docs/test-snapshots)
|
|
211
|
-
- Example implementation:
|
|
211
|
+
- Example implementation: `<owner>/<repo>/e2e/`
|
|
@@ -54,6 +54,28 @@ $roll-notes 今天的 code review 给了很好的反馈
|
|
|
54
54
|
...
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
## 写作风格(强制)
|
|
58
|
+
|
|
59
|
+
**禁止干巴巴的 checklist。禁止只有结论没有过程。必须有人的声音。**
|
|
60
|
+
|
|
61
|
+
### 叙事驱动
|
|
62
|
+
以时间线和事件推进为主线,像讲故事一样记录。不是 `补了功能,pytest 绿`,而是 `"电池剩余电量在哪里看?"我一愣,US-PLAT-003 的 AC 明明写了...`
|
|
63
|
+
|
|
64
|
+
### 技术细节嵌入叙事
|
|
65
|
+
代码、数据、命令行是故事的一部分,自然插入,不是附录。
|
|
66
|
+
|
|
67
|
+
### 对话与互动
|
|
68
|
+
记录用户的反馈、提问、情绪。日记是对话记录,不是独白。
|
|
69
|
+
|
|
70
|
+
### 诚实记录错误
|
|
71
|
+
失败、困惑、教训比成功更值得记录。
|
|
72
|
+
|
|
73
|
+
### 标题有画面感
|
|
74
|
+
不是功能清单。如 `每秒 20 行的噪音`、`22 个文件挤在一个抽屉里`。
|
|
75
|
+
|
|
76
|
+
### 结尾有收束
|
|
77
|
+
最后一段回到人的状态。如 `"值了"。"睡了"。push。`
|
|
78
|
+
|
|
57
79
|
## Rules
|
|
58
80
|
|
|
59
81
|
- **No planning**: Never write "明日待办" or "下一步"
|
|
@@ -10,7 +10,7 @@ One-command publish flow for roll maintainers.
|
|
|
10
10
|
|
|
11
11
|
## When Not to Use
|
|
12
12
|
|
|
13
|
-
- Non-maintainer users (this skill publishes
|
|
13
|
+
- Non-maintainer users (this skill publishes the package defined in `package.json` — confirm scope before running)
|
|
14
14
|
- Internal project releases — only for the `roll` CLI package itself
|
|
15
15
|
- Hotfixing code without a version bump (use `$roll-fix`)
|
|
16
16
|
- Generating user-facing release notes (use `$roll-.changelog`)
|
|
@@ -92,8 +92,8 @@ After publish, show:
|
|
|
92
92
|
```
|
|
93
93
|
✅ Released v{version}
|
|
94
94
|
🏷 Tag: v{version} pushed to origin
|
|
95
|
-
📦 npm published: @
|
|
96
|
-
🔗 https://www.npmjs.com/package
|
|
95
|
+
📦 npm published: {package_name}@{version} # package name read from package.json
|
|
96
|
+
🔗 https://www.npmjs.com/package/{package_name}
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
## Abort Conditions
|