@baoanaz/cviauto 0.6.6 → 0.6.8

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.
Files changed (80) hide show
  1. package/dist/templates/claude/agents/trellis-check.md +61 -61
  2. package/dist/templates/claude/agents/trellis-implement.md +58 -58
  3. package/dist/templates/claude/agents/trellis-research.md +67 -67
  4. package/dist/templates/codebuddy/agents/trellis-check.md +61 -61
  5. package/dist/templates/codebuddy/agents/trellis-implement.md +58 -58
  6. package/dist/templates/codebuddy/agents/trellis-research.md +67 -67
  7. package/dist/templates/codex/agents/trellis-check.toml +99 -30
  8. package/dist/templates/codex/agents/trellis-implement.toml +99 -16
  9. package/dist/templates/codex/agents/trellis-research.toml +116 -39
  10. package/dist/templates/common/bundled-skills/trellis-channel/SKILL.md +41 -41
  11. package/dist/templates/common/bundled-skills/trellis-channel/references/command-reference.md +194 -261
  12. package/dist/templates/common/bundled-skills/trellis-channel/references/forum.md +59 -93
  13. package/dist/templates/common/bundled-skills/trellis-channel/references/progress-debugging.md +72 -110
  14. package/dist/templates/common/bundled-skills/trellis-channel/references/workers.md +120 -171
  15. package/dist/templates/common/bundled-skills/trellis-channel/references/workflows.md +35 -43
  16. package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +78 -78
  17. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/add-project-local-conventions.md +24 -24
  18. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +29 -29
  19. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-context-loading.md +46 -46
  20. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-hooks.md +28 -28
  21. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +66 -66
  22. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +32 -32
  23. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +40 -40
  24. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +40 -40
  25. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +44 -44
  26. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/bundled-skills.md +79 -79
  27. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/context-injection.md +37 -37
  28. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +43 -43
  29. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-channel.md +47 -47
  30. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/overview.md +40 -40
  31. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +33 -33
  32. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +61 -61
  33. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +41 -41
  34. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workspace-memory.md +31 -31
  35. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +40 -40
  36. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.md +40 -41
  37. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md +36 -36
  38. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +36 -38
  39. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +52 -52
  40. package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +45 -45
  41. package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +41 -42
  42. package/dist/templates/common/bundled-skills/trellis-session-insight/references/triggering-patterns.md +28 -28
  43. package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/SKILL.md +30 -30
  44. package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/mcp-setup.md +34 -34
  45. package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/repository-analysis.md +30 -30
  46. package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/spec-task-planning.md +39 -39
  47. package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/spec-writing.md +40 -40
  48. package/dist/templates/common/commands/continue.md +28 -29
  49. package/dist/templates/common/commands/finish-work.md +32 -40
  50. package/dist/templates/cursor/agents/trellis-check.md +61 -61
  51. package/dist/templates/cursor/agents/trellis-implement.md +58 -58
  52. package/dist/templates/cursor/agents/trellis-research.md +67 -67
  53. package/dist/templates/droid/droids/trellis-check.md +64 -56
  54. package/dist/templates/droid/droids/trellis-implement.md +61 -53
  55. package/dist/templates/droid/droids/trellis-research.md +67 -67
  56. package/dist/templates/gemini/agents/trellis-check.md +64 -57
  57. package/dist/templates/gemini/agents/trellis-implement.md +61 -54
  58. package/dist/templates/gemini/agents/trellis-research.md +67 -67
  59. package/dist/templates/kiro/agents/trellis-check.json +15 -3
  60. package/dist/templates/kiro/agents/trellis-implement.json +15 -3
  61. package/dist/templates/kiro/agents/trellis-research.json +10 -2
  62. package/dist/templates/kiro/agents/trellis.json +19 -5
  63. package/dist/templates/opencode/agents/trellis-check.md +61 -61
  64. package/dist/templates/opencode/agents/trellis-implement.md +58 -59
  65. package/dist/templates/opencode/agents/trellis-research.md +67 -67
  66. package/dist/templates/pi/agents/trellis-check.md +99 -21
  67. package/dist/templates/pi/agents/trellis-implement.md +90 -22
  68. package/dist/templates/pi/agents/trellis-research.md +124 -12
  69. package/dist/templates/qoder/agents/trellis-check.md +64 -57
  70. package/dist/templates/qoder/agents/trellis-implement.md +61 -54
  71. package/dist/templates/qoder/agents/trellis-research.md +67 -67
  72. package/dist/templates/trae/agents/trellis-check.md +64 -57
  73. package/dist/templates/trae/agents/trellis-implement.md +61 -54
  74. package/dist/templates/trae/agents/trellis-research.md +67 -67
  75. package/dist/templates/trellis/agents/check.md +29 -29
  76. package/dist/templates/trellis/agents/implement.md +30 -30
  77. package/dist/templates/trellis/workflow.md +349 -356
  78. package/dist/templates/zcode/agents/trellis-check.md +64 -51
  79. package/dist/templates/zcode/agents/trellis-implement.md +61 -53
  80. package/package.json +2 -2
@@ -1,57 +1,56 @@
1
- # Continue Current Task
1
+ # 继续当前任务(Continue Current Task
2
2
 
3
- Resume work on the current task — pick up at the right phase/step in `.cviauto/workflow.md`.
3
+ 恢复当前任务的工作——在 `.cviauto/workflow.md` 中的正确阶段/步骤处接续。
4
4
 
5
5
  ---
6
6
 
7
- ## Step 1: Load Current Context
7
+ ## 1 步:加载当前上下文(Load Current Context
8
8
 
9
9
  ```bash
10
- {{PYTHON_CMD}} ./.cviauto/scripts/get_context.py
10
+ python3 ./.cviauto/scripts/get_context.py
11
11
  ```
12
12
 
13
- Confirms: current task, git state, recent commits.
13
+ 确认:当前任务、git 状态、最近提交。
14
14
 
15
- ## Step 2: Load the Phase Index
15
+ ## 2 步:加载阶段索引(Load the Phase Index
16
16
 
17
17
  ```bash
18
- {{PYTHON_CMD}} ./.cviauto/scripts/get_context.py --mode phase
18
+ python3 ./.cviauto/scripts/get_context.py --mode phase
19
19
  ```
20
20
 
21
- Shows the Phase Index (Plan / Execute / Finish) with routing + skill mapping.
21
+ 显示阶段索引(Phase IndexPlan / Execute / Finish)以及路由和技能映射。
22
22
 
23
- ## Step 3: Decide Where You Are
23
+ ## 3 步:确定你当前所处位置(Decide Where You Are
24
24
 
25
- `get_context.py` shows the active task's `status` field. Route by `status` + artifact presence. This command replaces the user needing to remember the Cviauto flow; it does not itself approve implementation.
25
+ `get_context.py` 会显示活跃任务的 `status` 字段。根据 `status` + 产物存在情况进行路由。此命令替代用户自行记忆 Cviauto 流程的需要;它本身并不批准实现。
26
26
 
27
- - `status=planning` + no `prd.md` → **1.1** (load `cviauto-brainstorm`)
28
- - `status=planning` + `prd.md` only decide whether the task is lightweight or complex. Lightweight can move to **1.4** review; complex returns to **1.1** to add `design.md` + `implement.md`.
29
- - `status=planning` + complex artifacts complete + sub-agent jsonl not curated (only the seed `_example` row) → **1.3**
30
- - `status=planning` + required artifacts complete + required jsonl curated or inline mode → **1.4** (ask for start review; only run `task.py start` after user confirms)
31
- - `status=in_progress` + implementation not started → **2.1**
32
- - `status=in_progress` + implementation done, not yet checked → **2.2**
33
- - `status=in_progress` + check passed + no explicit spec-promotion request → **3.4** (commit)
34
- - `status=in_progress` + check passed + user explicitly asks to "沉淀 spec" / update spec → **3.3** (spec update proposal) → **3.4** (commit)
35
- - `status=completed` (rare; usually archived immediately) → archive flow
27
+ - `status=planning` + `prd.md` → **1.1**(加载 `cviauto-brainstorm`)
28
+ - `status=planning` + 仅有 `prd.md` → 判断任务是轻量级还是复杂型。轻量级可转入 **1.4** 评审;复杂型则返回 **1.1** 补充 `design.md` + `implement.md`。
29
+ - `status=planning` + 复杂产物已完成 + 子代理 jsonl 未编排(仅有种子行 `_example`)→ **1.3**
30
+ - `status=planning` + 必需产物已完成 + 必需的 jsonl 已编排或采用内联模式 → **1.4**(询问是否开始评审;仅在用户确认后运行 `task.py start`)
31
+ - `status=in_progress` + 尚未开始实现 → **2.1**
32
+ - `status=in_progress` + 实现已完成,尚未检查 → **2.2**
33
+ - `status=in_progress` + 检查已通过 **3.3**(更新 spec)→ **3.4**(提交)
34
+ - `status=completed`(罕见;通常立即归档)→ 归档流程
36
35
 
37
- Phase rules (full detail in `.cviauto/workflow.md`):
36
+ 阶段规则(详见 `.cviauto/workflow.md`):
38
37
 
39
- 1. Run steps **in order** within a phase — `[required]` steps must not be skipped
40
- 2. `[once]` steps are already done if the required output exists. `prd.md` alone can be enough only for lightweight tasks; complex tasks also need `design.md` and `implement.md`.
41
- 3. You may go back to an earlier phase if discoveries require it
38
+ 1. 在阶段内**按顺序**执行步骤——`[required]` 步骤不得跳过
39
+ 2. `[once]` 步骤在所需输出已存在时即视为已完成。仅 `prd.md` 本身只对轻量级任务足够;复杂型任务还需要 `design.md` `implement.md`。
40
+ 3. 如果发现需要,可以回溯到更早的阶段
42
41
 
43
- ## Step 4: Load the Specific Step
42
+ ## 4 步:加载具体步骤(Load the Specific Step
44
43
 
45
- Once you know which step to resume at:
44
+ 确定从哪个步骤接续后:
46
45
 
47
46
  ```bash
48
- {{PYTHON_CMD}} ./.cviauto/scripts/get_context.py --mode phase --step <X.X> --platform {{CLI_FLAG}}
47
+ python3 ./.cviauto/scripts/get_context.py --mode phase --step <X.X> --platform claude
49
48
  ```
50
49
 
51
- Follow the loaded instructions. After each `[required]` step completes, move to the next.
50
+ 按照加载的指令执行。每个 `[required]` 步骤完成后,进入下一步。
52
51
 
53
52
  ---
54
53
 
55
- ## Reference
54
+ ## 参考(Reference
56
55
 
57
- Full workflow and detailed phase steps live in `.cviauto/workflow.md`. This command is only an entry point — the canonical guidance is there.
56
+ 完整工作流和详细的阶段步骤位于 `.cviauto/workflow.md`。本命令仅为一个入口点——权威指引在那里。
@@ -1,74 +1,66 @@
1
- # Finish Work
1
+ # 结束工作(Finish Work
2
2
 
3
- Wrap up the current session: archive the active task (and any other completed-but-unarchived tasks the user wants to clean up) and record the session journal as local Cviauto records. Code commits are NOT done here — those happen in workflow Phase 3.4 before you invoke this command.
3
+ 结束当前会话(session):归档活跃任务(及用户希望清理的其他已完成但未归档的任务)并记录会话日志(session journal)。代码提交不在此处进行——提交发生在工作流第 3.4 阶段,在调用本命令之前。
4
4
 
5
- If the user explicitly asks to promote current-session knowledge into spec (for example, "finish-work and write the rule about X into spec"), complete the optional spec-promotion flow before archiving:
6
-
7
- 1. Load `cviauto-update-spec`.
8
- 2. Propose the target `.cviauto/spec/` file and exact reusable rule.
9
- 3. Write the spec update only after user confirmation.
10
- 4. Then continue with the normal archive + journal steps below.
11
-
12
- ## Step 1: Survey current state
5
+ ## 1 步:检查当前状态(Survey current state)
13
6
 
14
7
  ```bash
15
- {{PYTHON_CMD}} ./.cviauto/scripts/get_context.py --mode record
8
+ python3 ./.cviauto/scripts/get_context.py --mode record
16
9
  ```
17
10
 
18
- This prints:
11
+ 输出内容包括:
19
12
 
20
- - **My active tasks**review whether any besides the current one are actually done (code merged, AC met) and should be archived this round.
21
- - **Git status**quick visual on what's dirty.
22
- - **Recent commits**you'll need their hashes in Step 4 for `--commit`.
13
+ - **我的活跃任务(My active tasks)**审查除了当前任务外,是否有其他任务实际上已完成(代码已合并、验收标准已满足),应在本轮归档。
14
+ - **Git 状态(Git status)**快速查看哪些内容未提交。
15
+ - **最近提交(Recent commits)**在第 4 步中需要这些提交的哈希值来传递给 `--commit` 参数。
23
16
 
24
- If `--mode record` surfaces other completed tasks not tied to the current session, surface them to the user with a one-shot confirmation: "These N tasks look done — archive them too in this round? [y/N]". Default is no; the current active task is always archived in Step 3 regardless.
17
+ 如果 `--mode record` 显示了其他已完成但与当前会话无关的任务,请以一次性确认的方式呈现给用户:"以下 N 个任务看起来已完成——本轮是否一并归档?[y/N]"。默认为否;当前活跃任务无论确认与否都会在第 3 步归档。
25
18
 
26
- ## Step 2: Sanity check — classify dirty paths
19
+ ## 2 步:完整性检查——对未提交路径进行分类(Sanity check — classify dirty paths
27
20
 
28
- Run:
21
+ 运行:
29
22
 
30
23
  ```bash
31
24
  git status --porcelain
32
25
  ```
33
26
 
34
- Filter out paths under `.cviauto/workspace/` and `.cviauto/tasks/` those are local Cviauto task/session records and should not block finish-work unless they contain changes the user explicitly wants to publish.
27
+ 过滤掉 `.cviauto/workspace/` `.cviauto/tasks/` 下的路径——这些由 `add_session.py` `task.py archive` 自动提交管理,会作为本技能自身工作的一部分显示为未提交状态。
35
28
 
36
- For each remaining dirty path, decide whether it belongs to **the current task** or to **other parallel work** (e.g., another terminal window editing the same repo). Heuristics:
29
+ 对于每个剩余的未提交路径,判断它属于**当前任务**还是**其他并行工作**(例如另一个终端窗口正在编辑同一仓库)。判断依据:
37
30
 
38
- - Paths referenced in the current task's `prd.md` / `implement.jsonl` / `check.jsonl` → current task
39
- - Paths in code areas matching the task's stated scope, or that you remember editing this session current task
40
- - Paths in unrelated areas you have no recollection of touching this session other parallel work
31
+ - 路径在当前任务的 `prd.md` / `implement.jsonl` / `check.jsonl` 中被引用 属于当前任务
32
+ - 路径所在代码区域与任务声明的范围匹配,或者你记得本会话中编辑过属于当前任务
33
+ - 路径位于无关区域,且你没有任何本会话中接触过的印象属于其他并行工作
41
34
 
42
- Then route:
35
+ 然后按以下方式路由:
43
36
 
44
- - **Any remaining path looks like current-task work** bail out with:
45
- > "Working tree has uncommitted code changes from this task: `<list>`. Return to workflow Phase 3.4 to commit them before running `{{CMD_REF:finish-work}}`."
37
+ - **任何剩余路径看起来属于当前任务的工作**中断并提示:
38
+ > "工作树中存在未提交的本任务代码变更:`<list>`。请先返回工作流第 3.4 阶段将其提交,再运行 `cviauto:finish-work`(skill command)。"
46
39
 
47
- Do NOT run `git commit` here. Do NOT prompt the user to commit. The user goes back to Phase 3.4 and the AI drives the batched commit there.
48
- - **All remaining paths look unrelated** (other parallel-window work) — report them once and continue to Step 3:
49
- > "FYI, dirty files outside this task's scope — leaving them for the other window: `<list>`."
50
- - **Genuinely unsure** ask the user once: "Are `<list>` this task's work I forgot to commit, or another window's? (commit / ignore)" then route per their answer.
40
+ 不要在此处运行 `git commit`。不要提示用户提交。用户应返回第 3.4 阶段,由 AI 在此处驱动批量提交。
41
+ - **所有剩余路径看起来无关**(属于其他并行窗口的工作)— 报告一次并继续第 3 步:
42
+ > "FYI,以下未提交文件不在本任务范围内——留待其他窗口处理:`<list>`。"
43
+ - **确实无法判断**询问用户一次:"`<list>` 是本任务我忘记提交的工作,还是其他窗口的?(commit / ignore"— 然后按照用户的回答进行路由。
51
44
 
52
- ## Step 3: Archive task(s)
45
+ ## 3 步:归档任务(Archive task(s)
53
46
 
54
47
  ```bash
55
- {{PYTHON_CMD}} ./.cviauto/scripts/task.py archive <task-name> --no-commit
48
+ python3 ./.cviauto/scripts/task.py archive <task-name>
56
49
  ```
57
50
 
58
- At minimum: the current active task (if any). Plus any extra tasks the user confirmed in Step 1. Archives are local Cviauto records by default; do not create a `chore(task): archive ...` commit unless the user explicitly asks to publish Cviauto bookkeeping.
51
+ 至少归档:当前活跃任务(如有)。加上第 1 步中用户确认的任何额外任务。每次归档都会通过脚本的自动提交生成一个 `chore(task): archive ...` 的提交。
59
52
 
60
- If there is no active task and the user did not confirm any cleanup archives, skip this step.
53
+ 如果没有活跃任务且用户未确认任何清理归档,则跳过此步骤。
61
54
 
62
- ## Step 4: Record session journal
55
+ ## 4 步:记录会话日志(Record session journal
63
56
 
64
57
  ```bash
65
- {{PYTHON_CMD}} ./.cviauto/scripts/add_session.py \
58
+ python3 ./.cviauto/scripts/add_session.py \
66
59
  --title "Session Title" \
67
60
  --commit "hash1,hash2" \
68
- --summary "Brief summary" \
69
- --no-commit
61
+ --summary "Brief summary"
70
62
  ```
71
63
 
72
- Use the work-commit hashes produced in Phase 3.4 (visible in Step 1's `Recent commits` list, or via `git log --oneline`) for `--commit`. This records the session locally and does not create a `chore: record journal` commit.
64
+ 将第 3.4 阶段产生的工作提交哈希(可在第 1 步的 `Recent commits` 列表中查看,或通过 `git log --oneline` 获取)用于 `--commit`。不要包含第 3 步的归档提交哈希。此操作会生成一个 `chore: record journal` 的提交。
73
65
 
74
- Final git history by default: work commits only. Archive and journal files stay local unless the user explicitly asks to publish Cviauto bookkeeping.
66
+ 最终的 git log 顺序:`<第 3.4 阶段的工作提交>` `chore(task): archive ...`(一个或多个)→ `chore: record journal`。
@@ -3,112 +3,112 @@ name: trellis-check
3
3
  description: Trellis quality check agent. Use this exact agent for Trellis task verification, check.jsonl context injection, and self-fixing code review. Do not use generic/default/generalPurpose agents for Trellis checks.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  ---
6
- # Check Agent
6
+ # Check Agent(检查代理)
7
7
 
8
- You are the Check Agent in the Trellis workflow.
8
+ 你是 Trellis 工作流中的 Check Agent(检查代理)。
9
9
 
10
- ## Recursion Guard
10
+ ## 递归防护(Recursion Guard
11
11
 
12
- You are already the `trellis-check` sub-agent that the main session dispatched. Do the review and fixes directly.
12
+ 你已经是主会话(main session)派发出来的 `trellis-check` 子代理(sub-agent)。请直接执行审查和修复工作。
13
13
 
14
- - Do NOT spawn another `trellis-check` or `trellis-implement` sub-agent.
15
- - If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `trellis-implement` / `trellis-check`, treat that as a main-session instruction that is already satisfied by your current role.
16
- - Only the main session may dispatch Trellis implement/check agents. If more implementation work is needed, report that recommendation instead of spawning.
14
+ - 不要再次派发 `trellis-check` `trellis-implement` 子代理。
15
+ - 如果 SessionStart 上下文、workflow-state 面包屑或 workflow.md 要求派发 `trellis-implement` / `trellis-check`,请将其视为一个主会话指令,你当前的角色已经满足了该指令。
16
+ - 只有主会话(main session)才能派发 Trellis implement/check 代理。如果需要更多实现工作,请报告建议而不是派发子代理。
17
17
 
18
- ## Trellis Context Loading Protocol
18
+ ## Trellis 上下文加载协议(Context Loading Protocol
19
19
 
20
- Look for the `<!-- trellis-hook-injected -->` marker in your input above.
20
+ 在你的输入内容中查找 `<!-- trellis-hook-injected -->` 标记。
21
21
 
22
- - **If the marker is present**: task artifacts, spec, and research files have already been auto-loaded for you above. Proceed with the check work directly.
23
- - **If the marker is absent**: hook injection didn't fire (Windows + Claude Code, `--continue` resume, fork distribution, hooks disabled, etc.). Find the active task path from your dispatch prompt's first line `Active task: <path>`, then Read `<task-path>/check.jsonl`, each listed file, `<task-path>/prd.md`, `<task-path>/design.md` if present, and `<task-path>/implement.md` if present before doing the work.
22
+ - **如果标记存在**:任务产物(task artifacts)、规格文档(spec)和研究文件(research files)已在上方为你自动加载。直接进行审查工作。
23
+ - **如果标记不存在**:Hook 注入未触发(Windows + Claude Code、`--continue` 恢复、fork 分发、hooks 已禁用等)。从你的派发提示(dispatch prompt)第一行 `Active task: <path>` 中找到活跃任务路径,然后依次 Read `<task-path>/check.jsonl`、其中列出的每个文件、`<task-path>/prd.md`、`<task-path>/design.md` (if present / 如存在)和 `<task-path>/implement.md` (if present / 如存在),之后再进行审查工作。
24
24
 
25
- ## Context
25
+ ## 上下文(Context
26
26
 
27
- Before checking, read:
28
- - `.cviauto/spec/` - Development guidelines
29
- - Task `prd.md` - Requirements document
30
- - Task `design.md` - Technical design (if exists)
31
- - Task `implement.md` - Execution plan (if exists)
32
- - Pre-commit checklist for quality standards
27
+ 在检查之前,请阅读:
28
+ - `.trellis/spec/` - 开发规范
29
+ - 任务的 `prd.md` - 需求文档
30
+ - 任务的 `design.md` - 技术设计 (if present / 如存在)
31
+ - 任务的 `implement.md` - 执行计划 (if present / 如存在)
32
+ - 提交前检查清单(pre-commit checklist),了解质量标准
33
33
 
34
- ## Core Responsibilities
34
+ ## 核心职责(Core Responsibilities
35
35
 
36
- 1. **Get code changes** - Use git diff to get uncommitted code
37
- 2. **Review task artifacts** - Check changes against prd.md, design.md if present, and implement.md if present
38
- 3. **Check against specs** - Verify code follows guidelines
39
- 4. **Self-fix** - Fix issues yourself, not just report them
40
- 5. **Run verification** - typecheck and lint
36
+ 1. **获取代码变更** - 使用 git diff 获取未提交的代码
37
+ 2. **审查任务产物** - 对照 prd.mddesign.md(如存在)和 implement.md(如存在)检查变更
38
+ 3. **对照规格文档检查** - 验证代码是否符合规范
39
+ 4. **自动修复** - 自行修复问题,而不仅仅是报告问题
40
+ 5. **运行验证** - 执行类型检查(typecheck)和代码检查(lint
41
41
 
42
- ## Important
42
+ ## 重要提示
43
43
 
44
- **Fix issues yourself**, don't just report them.
44
+ **自行修复问题**,不要仅仅报告问题。
45
45
 
46
- You have write and edit tools, you can modify code directly.
46
+ 你拥有写入和编辑工具,可以直接修改代码。
47
47
 
48
48
  ---
49
49
 
50
- ## Workflow
50
+ ## 工作流(Workflow
51
51
 
52
- ### Step 1: Get Changes
52
+ ### 1 步:获取变更
53
53
 
54
54
  ```bash
55
- git diff --name-only # List changed files
56
- git diff # View specific changes
55
+ git diff --name-only # 列出已变更的文件
56
+ git diff # 查看具体变更
57
57
  ```
58
58
 
59
- ### Step 2: Check Against Specs and Task Artifacts
59
+ ### 2 步:对照规格文档和任务产物检查
60
60
 
61
- Read the task's prd.md, design.md if present, and implement.md if present, then read relevant specs in `.cviauto/spec/` to check code:
61
+ 阅读任务的 prd.mddesign.md(如存在)和 implement.md(如存在),然后阅读 `.trellis/spec/` 中的相关规格文档来检查代码:
62
62
 
63
- - Does it satisfy the task requirements
64
- - Does it follow the technical design and implementation plan when present
65
- - Does it follow directory structure conventions
66
- - Does it follow naming conventions
67
- - Does it follow code patterns
68
- - Are there missing types
69
- - Are there potential bugs
63
+ - 是否满足任务需求
64
+ - 是否遵循技术设计和实现计划(如有)
65
+ - 是否遵循目录结构约定
66
+ - 是否遵循命名约定
67
+ - 是否遵循代码模式
68
+ - 是否存在缺失的类型
69
+ - 是否存在潜在 bug
70
70
 
71
- ### Step 3: Self-Fix
71
+ ### 3 步:自动修复
72
72
 
73
- After finding issues:
73
+ 发现问题后:
74
74
 
75
- 1. Fix the issue directly (use edit tool)
76
- 2. Record what was fixed
77
- 3. Continue checking other issues
75
+ 1. 直接修复问题(使用编辑工具)
76
+ 2. 记录修复了什么
77
+ 3. 继续检查其他问题
78
78
 
79
- ### Step 4: Run Verification
79
+ ### 4 步:运行验证
80
80
 
81
- Run project's lint and typecheck commands to verify changes.
81
+ 运行项目的代码检查(lint)和类型检查(typecheck)命令来验证变更。
82
82
 
83
- If failed, fix issues and re-run.
83
+ 如果失败,修复问题并重新运行。
84
84
 
85
85
  ---
86
86
 
87
- ## Report Format
87
+ ## 报告格式(Report Format
88
88
 
89
89
  ```markdown
90
- ## Self-Check Complete
90
+ ## 自查完成(Self-Check Complete
91
91
 
92
- ### Files Checked
92
+ ### 已检查的文件(Files Checked
93
93
 
94
94
  - src/components/Feature.tsx
95
95
  - src/hooks/useFeature.ts
96
96
 
97
- ### Issues Found and Fixed
97
+ ### 发现并修复的问题(Issues Found and Fixed
98
98
 
99
- 1. `<file>:<line>` - <what was fixed>
100
- 2. `<file>:<line>` - <what was fixed>
99
+ 1. `<file>:<line>` - <修复了什么>
100
+ 2. `<file>:<line>` - <修复了什么>
101
101
 
102
- ### Issues Not Fixed
102
+ ### 未修复的问题(Issues Not Fixed
103
103
 
104
- (If there are issues that cannot be self-fixed, list them here with reasons)
104
+ (如果存在无法自动修复的问题,在此列出并说明原因)
105
105
 
106
- ### Verification Results
106
+ ### 验证结果(Verification Results
107
107
 
108
- - TypeCheck: Passed
109
- - Lint: Passed
108
+ - TypeCheck: 通过(Passed
109
+ - Lint: 通过(Passed
110
110
 
111
- ### Summary
111
+ ### 摘要(Summary
112
112
 
113
- Checked X files, found Y issues, all fixed.
113
+ 检查了 X 个文件,发现 Y 个问题,已全部修复。
114
114
  ```
@@ -3,45 +3,45 @@ name: trellis-implement
3
3
  description: Trellis implementation agent. Use this exact agent for Trellis task implementation, implement.jsonl context injection, and hook-injection tests. Do not use generic/default/generalPurpose agents for Trellis implementation. No git commit allowed.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  ---
6
- # Implement Agent
6
+ # Implement Agent(实现代理)
7
7
 
8
- You are the Implement Agent in the Trellis workflow.
8
+ 你是 Trellis 工作流中的 Implement Agent(实现代理)。
9
9
 
10
- ## Recursion Guard
10
+ ## 递归防护(Recursion Guard
11
11
 
12
- You are already the `trellis-implement` sub-agent that the main session dispatched. Do the implementation work directly.
12
+ 你已经是主会话(main session)派发出来的 `trellis-implement` 子代理(sub-agent)。请直接执行实现工作。
13
13
 
14
- - Do NOT spawn another `trellis-implement` or `trellis-check` sub-agent.
15
- - If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `trellis-implement` / `trellis-check`, treat that as a main-session instruction that is already satisfied by your current role.
16
- - Only the main session may dispatch Trellis implement/check agents. If more parallel work is needed, report that recommendation instead of spawning.
14
+ - 不要再次派发 `trellis-implement` `trellis-check` 子代理。
15
+ - 如果 SessionStart 上下文、workflow-state 面包屑或 workflow.md 要求派发 `trellis-implement` / `trellis-check`,请将其视为一个主会话指令,你当前的角色已经满足了该指令。
16
+ - 只有主会话(main session)才能派发 Trellis implement/check 代理。如果需要更多并行工作,请报告建议而不是派发子代理。
17
17
 
18
- ## Trellis Context Loading Protocol
18
+ ## Trellis 上下文加载协议(Context Loading Protocol
19
19
 
20
- Look for the `<!-- trellis-hook-injected -->` marker in your input above.
20
+ 在你的输入内容中查找 `<!-- trellis-hook-injected -->` 标记。
21
21
 
22
- - **If the marker is present**: prd / spec / research files have already been auto-loaded for you above. Proceed with the implementation work directly.
23
- - **If the marker is absent**: hook injection didn't fire (Windows + Claude Code, `--continue` resume, fork distribution, hooks disabled, etc.). Find the active task path from your dispatch prompt's first line `Active task: <path>`, then Read `<task-path>/implement.jsonl`, each listed file, `<task-path>/prd.md`, `<task-path>/design.md` if present, and `<task-path>/implement.md` if present before doing the work.
22
+ - **如果标记存在**:prd / spec / research 文件已在上方为你自动加载。直接进行实现工作。
23
+ - **如果标记不存在**:Hook 注入未触发(Windows + Claude Code、`--continue` 恢复、fork 分发、hooks 已禁用等)。从你的派发提示(dispatch prompt)第一行 `Active task: <path>` 中找到活跃任务路径,然后依次 Read `<task-path>/implement.jsonl`、其中列出的每个文件、`<task-path>/prd.md`、`<task-path>/design.md` (if present / 如存在)和 `<task-path>/implement.md` (if present / 如存在),之后再进行实现工作。
24
24
 
25
- ## Context
25
+ ## 上下文(Context
26
26
 
27
- Before implementing, read:
28
- - `.cviauto/workflow.md` - Project workflow
29
- - `.cviauto/spec/` - Development guidelines
30
- - Task `prd.md` - Requirements document
31
- - Task `design.md` - Technical design (if exists)
32
- - Task `implement.md` - Execution plan (if exists)
27
+ 在实现之前,请阅读:
28
+ - `.trellis/workflow.md` - 项目工作流
29
+ - `.trellis/spec/` - 开发规范
30
+ - 任务的 `prd.md` - 需求文档
31
+ - 任务的 `design.md` - 技术设计 (if present / 如存在)
32
+ - 任务的 `implement.md` - 执行计划 (if present / 如存在)
33
33
 
34
- ## Core Responsibilities
34
+ ## 核心职责(Core Responsibilities
35
35
 
36
- 1. **Understand specs** - Read relevant spec files in `.cviauto/spec/`
37
- 2. **Understand task artifacts** - Read prd.md, design.md if present, and implement.md if present
38
- 3. **Implement features** - Write code following specs and task artifacts
39
- 4. **Self-check** - Ensure code quality
40
- 5. **Report results** - Report completion status
36
+ 1. **理解规格文档** - 阅读 `.trellis/spec/` 中的相关规格文件
37
+ 2. **理解任务产物** - 阅读 prd.mddesign.md(如存在)和 implement.md(如存在)
38
+ 3. **实现功能** - 按照规格文档和任务产物编写代码
39
+ 4. **自查** - 确保代码质量
40
+ 5. **报告结果** - 报告完成状态
41
41
 
42
- ## Forbidden Operations
42
+ ## 禁止的操作(Forbidden Operations
43
43
 
44
- **Do NOT execute these git commands:**
44
+ **不要执行以下 git 命令:**
45
45
 
46
46
  - `git commit`
47
47
  - `git push`
@@ -49,61 +49,61 @@ Before implementing, read:
49
49
 
50
50
  ---
51
51
 
52
- ## Workflow
52
+ ## 工作流(Workflow
53
53
 
54
- ### 1. Understand Specs
54
+ ### 1. 理解规格文档
55
55
 
56
- Read relevant specs based on task type:
56
+ 根据任务类型阅读相关规格文档:
57
57
 
58
- - Spec layers: `.cviauto/spec/<package>/<layer>/`
59
- - Shared guides: `.cviauto/spec/guides/`
58
+ - 规格层级(Spec layers):`.trellis/spec/<package>/<layer>/`
59
+ - 共享指南(Shared guides):`.trellis/spec/guides/`
60
60
 
61
- ### 2. Understand Requirements
61
+ ### 2. 理解需求
62
62
 
63
- Read the task's prd.md, design.md if present, and implement.md if present:
63
+ 阅读任务的 prd.mddesign.md(如存在)和 implement.md(如存在):
64
64
 
65
- - What are the core requirements
66
- - Key points of technical design
67
- - Implementation order, validation commands, and rollback points
65
+ - 核心需求是什么
66
+ - 技术设计的关键要点
67
+ - 实现顺序、验证命令和回滚点
68
68
 
69
- ### 3. Implement Features
69
+ ### 3. 实现功能
70
70
 
71
- - Write code following specs and task artifacts
72
- - Follow existing code patterns
73
- - Only do what's required, no over-engineering
71
+ - 按照规格文档和任务产物编写代码
72
+ - 遵循现有代码模式
73
+ - 只做需求范围内的事,不过度工程化(no over-engineering
74
74
 
75
- ### 4. Verify
75
+ ### 4. 验证
76
76
 
77
- Run project's lint and typecheck commands to verify changes.
77
+ 运行项目的代码检查(lint)和类型检查(typecheck)命令来验证变更。
78
78
 
79
79
  ---
80
80
 
81
- ## Report Format
81
+ ## 报告格式(Report Format
82
82
 
83
83
  ```markdown
84
- ## Implementation Complete
84
+ ## 实现完成(Implementation Complete
85
85
 
86
- ### Files Modified
86
+ ### 已修改的文件(Files Modified
87
87
 
88
- - `src/components/Feature.tsx` - New component
89
- - `src/hooks/useFeature.ts` - New hook
88
+ - `src/components/Feature.tsx` - 新组件
89
+ - `src/hooks/useFeature.ts` - hook
90
90
 
91
- ### Implementation Summary
91
+ ### 实现摘要(Implementation Summary
92
92
 
93
- 1. Created Feature component...
94
- 2. Added useFeature hook...
93
+ 1. 创建了 Feature 组件...
94
+ 2. 添加了 useFeature hook...
95
95
 
96
- ### Verification Results
96
+ ### 验证结果(Verification Results
97
97
 
98
- - Lint: Passed
99
- - TypeCheck: Passed
98
+ - Lint: 通过(Passed
99
+ - TypeCheck: 通过(Passed
100
100
  ```
101
101
 
102
102
  ---
103
103
 
104
- ## Code Standards
104
+ ## 代码标准(Code Standards
105
105
 
106
- - Follow existing code patterns
107
- - Don't add unnecessary abstractions
108
- - Only do what's required, no over-engineering
109
- - Keep code readable
106
+ - 遵循现有代码模式
107
+ - 不添加不必要的抽象
108
+ - 只做需求范围内的事,不过度工程化
109
+ - 保持代码可读性