@seanyao/roll 2026.423.1 → 2026.424.2
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 +4 -53
- package/conventions/global/project_rules.md +28 -0
- package/conventions/templates/backend-service/project_rules.md +16 -0
- package/conventions/templates/cli/project_rules.md +16 -0
- package/conventions/templates/frontend-only/project_rules.md +14 -0
- package/conventions/templates/fullstack/project_rules.md +15 -0
- package/package.json +1 -1
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.424.2"
|
|
8
8
|
ROLL_HOME="${ROLL_HOME:-${HOME}/.roll}"
|
|
9
9
|
ROLL_CONFIG="${ROLL_HOME}/config.yaml"
|
|
10
10
|
ROLL_GLOBAL="${ROLL_HOME}/conventions/global"
|
|
@@ -235,6 +235,7 @@ ai_gemini: ~/.gemini|GEMINI.md|GEMINI.md
|
|
|
235
235
|
ai_kimi: ~/.kimi|AGENTS.md|AGENTS.md
|
|
236
236
|
ai_codex: ~/.codex|AGENTS.md|AGENTS.md
|
|
237
237
|
ai_cursor: ~/.cursor|.cursor-rules|.cursor-rules
|
|
238
|
+
ai_trae: ~/.trae|user_rules.md|project_rules.md
|
|
238
239
|
ai_openclaw: ~/.openclaw/workspace|AGENTS.md|AGENTS.md
|
|
239
240
|
|
|
240
241
|
# User preferences
|
|
@@ -350,7 +351,7 @@ _sync_convention_for_tool() {
|
|
|
350
351
|
local main_dst="$2" # target: ~/.claude/CLAUDE.md
|
|
351
352
|
local force="$3"
|
|
352
353
|
|
|
353
|
-
[[ -f "$src" ]] || return
|
|
354
|
+
[[ -f "$src" ]] || return 0
|
|
354
355
|
local dst_dir
|
|
355
356
|
dst_dir="$(dirname "$main_dst")"
|
|
356
357
|
|
|
@@ -881,56 +882,6 @@ detect_project_type() {
|
|
|
881
882
|
fi
|
|
882
883
|
}
|
|
883
884
|
|
|
884
|
-
# ─── Helper: detect AI tools from existing convention files ──────────────────
|
|
885
|
-
detect_tools() {
|
|
886
|
-
local dir="$1"
|
|
887
|
-
local tools=""
|
|
888
|
-
[[ -f "$dir/.claude/CLAUDE.md" ]] && tools+="claude,"
|
|
889
|
-
[[ -f "$dir/GEMINI.md" ]] && tools+="gemini,"
|
|
890
|
-
[[ -f "$dir/.cursor-rules" ]] && tools+="cursor,"
|
|
891
|
-
echo "${tools%,}"
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
# ─── Helper: refresh a single project ────────────────────────────────────────
|
|
895
|
-
refresh_project() {
|
|
896
|
-
local project_dir="$1"
|
|
897
|
-
local project_name
|
|
898
|
-
project_name="$(basename "$project_dir")"
|
|
899
|
-
|
|
900
|
-
local ptype
|
|
901
|
-
ptype="$(detect_project_type "$project_dir")"
|
|
902
|
-
|
|
903
|
-
if [[ "$ptype" == "unknown" ]]; then
|
|
904
|
-
warn " ${BOLD}$project_name${NC}: cannot detect project type — skipping 无法检测项目类型 — 已跳过"
|
|
905
|
-
return 1
|
|
906
|
-
fi
|
|
907
|
-
|
|
908
|
-
local tools
|
|
909
|
-
tools="$(detect_tools "$project_dir")"
|
|
910
|
-
|
|
911
|
-
local tpl_dir="$ROLL_TEMPLATES/$ptype"
|
|
912
|
-
if [[ ! -d "$tpl_dir" ]]; then
|
|
913
|
-
warn " ${BOLD}$project_name${NC}: template '$ptype' not found — skipping 模板 '$ptype' 未找到 — 已跳过"
|
|
914
|
-
return 1
|
|
915
|
-
fi
|
|
916
|
-
|
|
917
|
-
info " ${BOLD}$project_name${NC} ($ptype | ${tools:-AGENTS.md only}) 正在处理: ${BOLD}$project_name${NC}"
|
|
918
|
-
|
|
919
|
-
merge_convention "AGENTS.md" "$tpl_dir" "$project_dir" " AGENTS.md"
|
|
920
|
-
|
|
921
|
-
if echo "$tools" | grep -q "claude"; then
|
|
922
|
-
mkdir -p "$project_dir/.claude"
|
|
923
|
-
merge_convention "CLAUDE.md" "$tpl_dir" "$project_dir/.claude" " .claude/CLAUDE.md"
|
|
924
|
-
fi
|
|
925
|
-
if echo "$tools" | grep -q "gemini"; then
|
|
926
|
-
merge_convention "GEMINI.md" "$tpl_dir" "$project_dir" " GEMINI.md"
|
|
927
|
-
fi
|
|
928
|
-
if echo "$tools" | grep -q "cursor"; then
|
|
929
|
-
merge_convention ".cursor-rules" "$tpl_dir" "$project_dir" " .cursor-rules"
|
|
930
|
-
fi
|
|
931
|
-
|
|
932
|
-
return 0
|
|
933
|
-
}
|
|
934
885
|
|
|
935
886
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
936
887
|
# COMMAND: hooks <subcommand>
|
|
@@ -1043,7 +994,7 @@ cmd_status() {
|
|
|
1043
994
|
|
|
1044
995
|
echo ""
|
|
1045
996
|
echo -e "${BOLD}Global conventions: 全局约定${NC}"
|
|
1046
|
-
for f in AGENTS.md CLAUDE.md GEMINI.md .cursor-rules; do
|
|
997
|
+
for f in AGENTS.md CLAUDE.md GEMINI.md .cursor-rules project_rules.md; do
|
|
1047
998
|
if [[ -f "$ROLL_GLOBAL/$f" ]]; then
|
|
1048
999
|
echo -e " ${GREEN}+${NC} $f"
|
|
1049
1000
|
else
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Global Preferences — Trae IDE
|
|
2
|
+
|
|
3
|
+
> Extends AGENTS.md in this directory — read that first for shared conventions.
|
|
4
|
+
> This file adds Trae IDE-specific configuration only.
|
|
5
|
+
|
|
6
|
+
## Identity
|
|
7
|
+
|
|
8
|
+
- Git: `Sean Yao <sean.dlut@gmail.com>`
|
|
9
|
+
- Default branch: `main`
|
|
10
|
+
|
|
11
|
+
## Commit Message Format
|
|
12
|
+
|
|
13
|
+
- Format: `<type>: <description>` (遵循 Git Hook 自动生成的前缀)
|
|
14
|
+
- TCR micro-commits: `tcr: <description>` (No prefix)
|
|
15
|
+
- Types: Story N, Fix, Refactor, Docs, Chore
|
|
16
|
+
|
|
17
|
+
## Trae-Specific
|
|
18
|
+
|
|
19
|
+
- When a project has Roll workflow, follow the AGENTS.md conventions and use Roll skills.
|
|
20
|
+
- Use Solo mode for complex multi-step tasks.
|
|
21
|
+
- Prefer targeted edits over full file rewrites.
|
|
22
|
+
- For file operations, verify the file exists before modifying.
|
|
23
|
+
|
|
24
|
+
## Frontend Default Stack
|
|
25
|
+
|
|
26
|
+
- React + shadcn/ui + Tailwind CSS is the default.
|
|
27
|
+
- Use shadcn/ui components first. Custom only when shadcn doesn't cover it.
|
|
28
|
+
- Tailwind utility classes only. No inline styles, no CSS modules.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Project Preferences — Backend Service (Trae IDE)
|
|
2
|
+
|
|
3
|
+
> Extends global project_rules.md + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- Node.js / TypeScript / Express or Hono or Fastify
|
|
8
|
+
- Database: Prisma or Drizzle ORM
|
|
9
|
+
- Testing: Vitest + Supertest
|
|
10
|
+
|
|
11
|
+
## Trae Notes
|
|
12
|
+
|
|
13
|
+
- No frontend in this project. API-only service.
|
|
14
|
+
- Write integration tests that hit real endpoints, not mocked handlers.
|
|
15
|
+
- Run `npm run build && npm run test` before pushing.
|
|
16
|
+
- Follow the project AGENTS.md for architecture constraints and Roll workflow.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Project Preferences — CLI Tool (Trae IDE)
|
|
2
|
+
|
|
3
|
+
> Extends global project_rules.md + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- Node.js / TypeScript
|
|
8
|
+
- CLI framework: commander or citty
|
|
9
|
+
- Testing: Vitest
|
|
10
|
+
|
|
11
|
+
## Trae Notes
|
|
12
|
+
|
|
13
|
+
- No server, no frontend. CLI tool only.
|
|
14
|
+
- Test commands by running them, not just unit tests.
|
|
15
|
+
- Run `npm run build && node dist/index.js --help` before pushing.
|
|
16
|
+
- Follow the project AGENTS.md for architecture constraints and Roll workflow.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Project Preferences — Frontend Only (Trae IDE)
|
|
2
|
+
|
|
3
|
+
> Extends global project_rules.md + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- React + shadcn/ui + Tailwind CSS + Vite
|
|
8
|
+
- Testing: Vitest + Playwright
|
|
9
|
+
|
|
10
|
+
## Trae Notes
|
|
11
|
+
|
|
12
|
+
- No backend in this project. All data via external API consumption.
|
|
13
|
+
- Run `npm run build` to verify production bundle compiles before pushing.
|
|
14
|
+
- Follow the project AGENTS.md for architecture constraints and Roll workflow.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Project Preferences — Fullstack Web (Trae IDE)
|
|
2
|
+
|
|
3
|
+
> Extends global project_rules.md + project AGENTS.md.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- Frontend: React + shadcn/ui + Tailwind CSS + Vite
|
|
8
|
+
- Backend: Node.js API (Express/Hono/Fastify)
|
|
9
|
+
- Testing: Vitest (unit) + Playwright (E2E)
|
|
10
|
+
|
|
11
|
+
## Trae Notes
|
|
12
|
+
|
|
13
|
+
- When modifying API contracts, update both `api/types.ts` and `src/shared/types/` in the same commit.
|
|
14
|
+
- Run `npm run build` to verify both frontend and backend compile before pushing.
|
|
15
|
+
- Follow the project AGENTS.md for architecture constraints and Roll workflow.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seanyao/roll",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.424.2",
|
|
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"
|