@baoanaz/cviauto 0.6.5 → 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,37 +1,37 @@
1
- # Local Workflow System
1
+ # 本地工作流系统
2
2
 
3
- `.cviauto/workflow.md` is the Cviauto workflow source of truth inside the user project. An AI does not need Cviauto source code to understand how the current project should move tasks forward; this file is enough.
3
+ `.cviauto/workflow.md` 是用户项目内的 Cviauto 工作流权威来源。AI 不需要 Cviauto 源码就能理解当前项目应如何推进任务;有此文件足矣。
4
4
 
5
- ## File Responsibilities
5
+ ## 文件职责
6
6
 
7
- `.cviauto/workflow.md` has three responsibilities:
7
+ `.cviauto/workflow.md` 有三个职责:
8
8
 
9
- 1. **Explain workflow phases**: Plan, Execute, Finish.
10
- 2. **Define skill routing**: which skill or agent the AI should use when the user expresses a certain intent.
11
- 3. **Provide workflow-state prompt blocks**: hooks can inject the prompt block for the current state into the conversation.
9
+ 1. **解释工作流阶段**:PlanExecuteFinish
10
+ 2. **定义 skill 路由**:当用户表达某种意图时,AI 应使用哪个 skill Agent。
11
+ 3. **提供工作流状态 prompt 块**:hooks 可以将当前状态的 prompt 块注入对话。
12
12
 
13
- ## Current Phase Model
13
+ ## 当前阶段模型
14
14
 
15
15
  ```text
16
- Phase 1: Plan -> clarify what to build, produce prd.md and required research
17
- Phase 2: Execute -> implement against the PRD and specs, then check
18
- Phase 3: Finish -> final verification, preserve lessons, and wrap up
16
+ 阶段 1Plan -> 明确构建内容,产出 prd.md 和所需研究
17
+ 阶段 2Execute -> 根据 PRD spec 实现,然后检查
18
+ 阶段 3Finish -> 最终验证,保存经验,收尾
19
19
  ```
20
20
 
21
- Each phase contains numbered steps, such as `1.3 Configure context`. These numbers are not runtime fields in `task.json`; they are workflow structure for AI and humans to read.
21
+ 每个阶段包含编号步骤,如 `1.3 Configure context`。这些编号不是 `task.json` 中的运行时字段;它们是供 AI 和人类阅读的工作流结构。
22
22
 
23
- ## Skill Routing
23
+ ## Skill 路由
24
24
 
25
- `workflow.md` separates routing by platform capability:
25
+ `workflow.md` 按平台能力分离路由:
26
26
 
27
- - Platforms with sub-agent support: dispatch `cviauto-implement` by default for implementation and `cviauto-check` for checking.
28
- - Platforms without sub-agent support: the main session reads skills such as `cviauto-before-dev`, then executes directly.
27
+ - 支持 sub-agent 的平台:默认分派 `cviauto-implement` 进行实现,`cviauto-check` 进行检查。
28
+ - 不支持 sub-agent 的平台:主会话阅读 `cviauto-before-dev` skill,然后直接执行。
29
29
 
30
- When changing local AI behavior, update the routing descriptions in `workflow.md` first, then check whether the corresponding platform skill, command, or agent files need to stay in sync.
30
+ 当改变本地 AI 行为时,首先更新 `workflow.md` 中的路由描述,然后检查相应的平台 skillcommand Agent 文件是否需要保持同步。
31
31
 
32
- ## Workflow-State Prompt Blocks
32
+ ## 工作流状态 Prompt
33
33
 
34
- The bottom of `workflow.md` can contain state blocks like this:
34
+ `workflow.md` 底部可以包含如下状态块:
35
35
 
36
36
  ```text
37
37
  [workflow-state:no_task]
@@ -39,37 +39,37 @@ The bottom of `workflow.md` can contain state blocks like this:
39
39
  [/workflow-state:no_task]
40
40
  ```
41
41
 
42
- Hooks choose the right block based on current task status and inject it into the conversation. Common states include:
42
+ Hooks 根据当前任务状态选择正确的块并注入到对话中。常见状态包括:
43
43
 
44
- | State | Meaning |
44
+ | 状态 | 含义 |
45
45
  | --- | --- |
46
- | `no_task` | The current session has no active task. |
47
- | `planning` | The task is still in requirements, research, or context configuration. |
48
- | `in_progress` | The task has entered implementation and checking. |
49
- | `completed` | The task is complete and waiting for wrap-up or archive. |
46
+ | `no_task` | 当前会话没有活动任务。 |
47
+ | `planning` | 任务仍在需求、研究或上下文配置阶段。 |
48
+ | `in_progress` | 任务已进入实现和检查阶段。 |
49
+ | `completed` | 任务已完成,等待收尾或归档。 |
50
50
 
51
- If the user wants to change policies such as "whether to create a task when there is no task," "when task creation may be skipped," or "whether sub-agents are required," edit these state blocks and the routing table above them.
51
+ 如果用户想更改诸如"没有任务时是否创建任务""何时可以跳过任务创建""是否需要 sub-agent"等策略,编辑这些状态块及其上方的路由表。
52
52
 
53
- ## Local Modification Patterns
53
+ ## 本地修改模式
54
54
 
55
- Common changes:
55
+ 常见变更:
56
56
 
57
- | Goal | Edit point |
57
+ | 目标 | 编辑点 |
58
58
  | --- | --- |
59
- | Add a phase | Update the Phase Index, phase body, routing, and state blocks. |
60
- | Change task creation policy | Update the `no_task` state block and Phase 1 description. |
61
- | Change the default implementation/check path | Update Phase 2 and skill routing. |
62
- | Change the wrap-up flow | Update Phase 3 and `finish-work` related descriptions. Note the current split: Phase 3.3 = optional human-gated spec promotion, Phase 3.4 = AI-driven work commits (batched, user-confirmed), Phase 3.5 = `/finish-work` (local archive + session journal). `/finish-work` refuses to run if the working tree has uncommitted task code. |
63
- | Change platform differences | Update routing descriptions grouped by platform. |
59
+ | 添加阶段 | 更新阶段索引、阶段正文、路由和状态块。 |
60
+ | 更改任务创建策略 | 更新 `no_task` 状态块和阶段 1 描述。 |
61
+ | 更改默认实现/检查路径 | 更新阶段 2 skill 路由。 |
62
+ | 更改收尾流程 | 更新阶段 3 `finish-work` 相关描述。注意当前拆分:阶段 3.3 = 可选的人工门禁 spec 推广,阶段 3.4 = AI 驱动的工作提交(批量,用户确认),阶段 3.5 = `/finish-work`(本地归档 + 会话日志)。如果有未提交的任务代码,`/finish-work` 拒绝运行。 |
63
+ | 更改平台差异 | 更新按平台分组的路由描述。 |
64
64
 
65
- After editing, make the AI reread `.cviauto/workflow.md`; do not assume the flow from the old conversation is still valid.
65
+ 编辑后,让 AI 重新读取 `.cviauto/workflow.md`;不要假设旧对话中的流程仍然有效。
66
66
 
67
- ## Relationship To Platform Files
67
+ ## 与平台文件的关系
68
68
 
69
- `workflow.md` is the semantic center of the local workflow, but each platform can also have its own entry files:
69
+ `workflow.md` 是本地工作流的语义中心,但每个平台也可以有自己的入口文件:
70
70
 
71
- - skills, such as `cviauto-brainstorm` and `cviauto-check`.
72
- - commands/prompts/workflows, such as continue and finish-work.
73
- - hooks, such as session-start or workflow-state injection.
71
+ - skills,如 `cviauto-brainstorm` `cviauto-check`。
72
+ - commands/prompts/workflows,如 continue finish-work
73
+ - hooks,如 session-start workflow-state 注入。
74
74
 
75
- If only `workflow.md` changes, platform entry files may still contain old language. When the user wants to change "what the AI actually does," also inspect the relevant platform directory.
75
+ 如果只改了 `workflow.md`,平台入口文件可能仍然包含旧的语言。当用户想要改变"AI 实际做什么"时,也要检查相关平台目录。
@@ -1,8 +1,8 @@
1
- # Local Workspace Memory System
1
+ # 本地工作区记忆系统(Local Workspace Memory System
2
2
 
3
- `.cviauto/workspace/` stores cross-session memory. Its purpose is to let AI and humans understand what happened before across different windows and different days.
3
+ `.cviauto/workspace/` 存储跨会话记忆。其目的是让 AI 和人类能够在不同窗口、不同日期之间了解之前发生过什么。
4
4
 
5
- ## Directory Structure
5
+ ## 目录结构
6
6
 
7
7
  ```text
8
8
  .cviauto/workspace/
@@ -13,28 +13,28 @@
13
13
  └── journal-2.md
14
14
  ```
15
15
 
16
- | File | Purpose |
16
+ | 文件 | 用途 |
17
17
  | --- | --- |
18
- | `.cviauto/.developer` | Current developer identity. |
19
- | `.cviauto/workspace/index.md` | Global workspace overview. |
20
- | `.cviauto/workspace/<developer>/index.md` | Session index for a developer. |
21
- | `.cviauto/workspace/<developer>/journal-N.md` | Session journal. |
18
+ | `.cviauto/.developer` | 当前开发者身份。 |
19
+ | `.cviauto/workspace/index.md` | 全局工作区概览。 |
20
+ | `.cviauto/workspace/<developer>/index.md` | 某位开发者的会话索引。 |
21
+ | `.cviauto/workspace/<developer>/journal-N.md` | 会话日志。 |
22
22
 
23
- ## Developer Identity
23
+ ## 开发者身份(Developer Identity
24
24
 
25
- Run this the first time:
25
+ 首次使用时运行:
26
26
 
27
27
  ```bash
28
28
  python3 ./.cviauto/scripts/init_developer.py <name>
29
29
  ```
30
30
 
31
- This creates `.cviauto/.developer` and the corresponding workspace directory. The AI should not change developer identity casually; if the identity is wrong, first confirm who is using the current project.
31
+ 此命令会创建 `.cviauto/.developer` 和对应的工作区目录。AI 不应随意更改开发者身份;如果身份有误,请先确认当前项目的使用者是谁。
32
32
 
33
- ## Journal
33
+ ## 日志(Journal
34
34
 
35
- `journal-N.md` records completed or partially completed work from each session. By default, each journal holds about 2000 lines; after that it rotates to the next file.
35
+ `journal-N.md` 记录每个会话中已完成或部分完成的工作。默认情况下,每个日志文件容纳约 2000 行;超出后自动轮转到下一个文件。
36
36
 
37
- Common command for recording a session:
37
+ 记录会话的常用命令:
38
38
 
39
39
  ```bash
40
40
  python3 ./.cviauto/scripts/add_session.py \
@@ -43,29 +43,29 @@ python3 ./.cviauto/scripts/add_session.py \
43
43
  --commit "abc1234"
44
44
  ```
45
45
 
46
- Planning or review work without a commit can also be recorded by using `--no-commit` or an empty commit value.
46
+ 没有 commit 的计划或审查工作也可以通过 `--no-commit` 或空 commit 值来记录。
47
47
 
48
- ## Relationship Between Workspace Memory And Tasks
48
+ ## 工作区记忆与任务的关系(Relationship Between Workspace Memory And Tasks
49
49
 
50
- | System | What it stores |
50
+ | 系统 | 存储内容 |
51
51
  | --- | --- |
52
- | `.cviauto/tasks/` | Requirements, design, research, and state for a specific task. |
53
- | `.cviauto/workspace/` | Work records across tasks and sessions. |
54
- | `.cviauto/spec/` | Engineering knowledge preserved as long-term conventions. |
52
+ | `.cviauto/tasks/` | 特定任务的需求、设计、研究和状态。 |
53
+ | `.cviauto/workspace/` | 跨任务、跨会话的工作记录。 |
54
+ | `.cviauto/spec/` | 作为长期约定保存的工程知识。 |
55
55
 
56
- If information is only useful for the current task, put it in the task directory.
57
- If information describes what happened in the current session, put it in the workspace journal.
58
- If information should be followed every time code is written in the future, put it in spec.
56
+ 如果信息仅对当前任务有用,请放入任务目录。
57
+ 如果信息描述了当前会话中发生的事,请放入工作区日志。
58
+ 如果信息应在未来每次编写代码时都遵循,请放入 spec
59
59
 
60
- ## Local Customization Points
60
+ ## 本地自定义点(Local Customization Points
61
61
 
62
- | Need | Edit location |
62
+ | 需求 | 编辑位置 |
63
63
  | --- | --- |
64
- | Change maximum journal lines | `max_journal_lines` in `.cviauto/config.yaml`. |
65
- | Change session auto-commit message | `session_commit_message` in `.cviauto/config.yaml`. |
66
- | Change session content format | `.cviauto/scripts/add_session.py`. |
67
- | Change how workspace is displayed in context | `.cviauto/scripts/common/session_context.py`. |
64
+ | 更改日志最大行数 | `.cviauto/config.yaml` 中的 `max_journal_lines`。 |
65
+ | 更改会话自动 commit 消息 | `.cviauto/config.yaml` 中的 `session_commit_message`。 |
66
+ | 更改会话内容格式 | `.cviauto/scripts/add_session.py`。 |
67
+ | 更改工作区在上下文中的展示方式 | `.cviauto/scripts/common/session_context.py`。 |
68
68
 
69
- ## AI Usage Rules
69
+ ## AI 使用规则(AI Usage Rules
70
70
 
71
- The AI should not treat workspace as the only source of truth. When resuming a task, read the current task first, then use workspace for background. After a task is complete, record important process notes in workspace; if long-term rules emerged, update spec.
71
+ AI 不应将工作区视为唯一的事实来源。恢复任务时,请先阅读当前任务,然后将工作区用作背景信息。任务完成后,在工作区中记录重要的过程笔记;如果产生了长期规则,请更新 spec
@@ -1,26 +1,26 @@
1
- # Agents
1
+ # Agents(代理)
2
2
 
3
- Cviauto agent files define specialized roles. Common Cviauto agents in a user project are:
3
+ Cviauto Agent 文件定义专门的角色。用户项目中常见的 Cviauto Agent 有:
4
4
 
5
5
  - `cviauto-research`
6
6
  - `cviauto-implement`
7
7
  - `cviauto-check`
8
8
 
9
- File locations and formats differ by platform, but responsibility boundaries should stay consistent.
9
+ 文件位置和格式因平台而异,但职责边界应保持一致。
10
10
 
11
- ## Agent Responsibilities
11
+ ## Agent Responsibilities(Agent 职责)
12
12
 
13
- | Agent | Responsibility |
13
+ | Agent(代理) | Responsibility(职责) |
14
14
  | --- | --- |
15
- | `cviauto-research` | Investigate the question and write findings into the current task's `research/`. |
16
- | `cviauto-implement` | Implement against `prd.md`, optional `design.md` / `implement.md`, `implement.jsonl`, and related spec/research. |
17
- | `cviauto-check` | Review changes, fix discovered issues, and run necessary checks. |
15
+ | `cviauto-research` | 调查问题并将发现写入当前任务的 `research/`。 |
16
+ | `cviauto-implement` | 根据 `prd.md`、可选的 `design.md` / `implement.md`、`implement.jsonl` 及相关 spec/research 进行实现。 |
17
+ | `cviauto-check` | 审查变更、修复发现的问题,并运行必要的检查。 |
18
18
 
19
- Agent files should not become generic chat prompts. They should define input sources, write boundaries, whether code may be changed, and how results are reported.
19
+ Agent 文件不应变成通用的聊天提示。它们应定义输入来源、写入边界、是否可以修改代码,以及如何报告结果。
20
20
 
21
- ## Common Paths
21
+ ## Common Paths(常见路径)
22
22
 
23
- | Platform | Agent path |
23
+ | Platform(平台) | Agent path(代理路径) |
24
24
  | --- | --- |
25
25
  | Claude Code | `.claude/agents/cviauto-*.md` |
26
26
  | Cursor | `.cursor/agents/cviauto-*.md` |
@@ -32,51 +32,51 @@ Agent files should not become generic chat prompts. They should define input sou
32
32
  | CodeBuddy | `.codebuddy/agents/cviauto-*.md` |
33
33
  | Factory Droid | `.factory/droids/cviauto-*.md` |
34
34
  | Pi Agent | `.pi/agents/cviauto-*.md` |
35
- | Reasonix | `.reasonix/skills/cviauto-*/SKILL.md` (subagent frontmatter) |
35
+ | Reasonix | `.reasonix/skills/cviauto-*/SKILL.md`(subagent frontmatter |
36
36
  | ZCode | `.zcode/cli/agents/cviauto-*.md` |
37
37
 
38
- GitHub Copilot agent/prompt support is provided by a combination of directories such as `.github/agents/`, `.github/prompts/`, and `.github/skills/`; inspect the files actually generated in the user project.
38
+ GitHub Copilot agent/prompt 支持由 `.github/agents/`、`.github/prompts/` `.github/skills/` 等目录组合提供;请检查用户项目中实际生成的文件。
39
39
 
40
- Main-session workflow platforms such as Kilo, Antigravity, and Devin may not have Cviauto sub-agent files. They usually rely on workflows/skills to guide the main session.
40
+ 主会话工作流平台如 KiloAntigravity Devin 可能没有 Cviauto sub-agent 文件。它们通常依赖 workflows/skills 来引导主会话。
41
41
 
42
- ## Two Context Loading Modes
42
+ ## Two Context Loading Modes(两种上下文加载模式)
43
43
 
44
- ### hook push
44
+ ### hook push(钩子推送)
45
45
 
46
- The platform hook injects task context before the agent starts. The agent file itself can focus more on responsibilities and boundaries.
46
+ 平台 hook agent 启动前注入任务上下文。agent 文件本身可以更专注于职责和边界。
47
47
 
48
- Common on platforms that support agent hooks.
48
+ 常见于支持 agent hooks 的平台。
49
49
 
50
- ### agent pull
50
+ ### agent pull(agent 拉取)
51
51
 
52
- The agent file instructs the agent to read after startup:
52
+ agent 文件指示 agent 在启动后读取:
53
53
 
54
54
  - `python3 ./.cviauto/scripts/task.py current --source`
55
- - `implement.jsonl` or `check.jsonl`
56
- - spec/research files referenced by JSONL
57
- - current task `prd.md`
58
- - `design.md` if present
59
- - `implement.md` if present
55
+ - `implement.jsonl` `check.jsonl`
56
+ - JSONL 引用的 spec/research 文件
57
+ - 当前任务的 `prd.md`
58
+ - `design.md`(如有)
59
+ - `implement.md`(如有)
60
60
 
61
- This mode fits platforms whose hooks cannot reliably rewrite sub-agent prompts.
61
+ 此模式适用于 hooks 无法可靠地重写 sub-agent prompt 的平台。
62
62
 
63
- ## Local Change Scenarios
63
+ ## Local Change Scenarios(本地修改场景)
64
64
 
65
- | User need | Edit location |
65
+ | User need(用户需求) | Edit location(编辑位置) |
66
66
  | --- | --- |
67
- | Implement agent must follow extra restrictions | The platform's `cviauto-implement` agent file. |
68
- | Check agent must run project-specific commands | `cviauto-check` agent file, and `.cviauto/spec/` if needed. |
69
- | Research agent must output a fixed format | `cviauto-research` agent file. |
70
- | Agent cannot read task context | Agent prelude or `inject-subagent-context` hook. |
71
- | Add a project-specific agent | Platform agent directory + related workflow/command/skill entry point. |
67
+ | Implement agent 必须遵循额外限制 | 平台的 `cviauto-implement` agent 文件。 |
68
+ | Check agent 必须运行项目特定命令 | `cviauto-check` agent 文件,以及 `.cviauto/spec/`(如需要)。 |
69
+ | Research agent 必须输出固定格式 | `cviauto-research` agent 文件。 |
70
+ | Agent 无法读取任务上下文 | Agent 序言或 `inject-subagent-context` hook |
71
+ | 添加项目特定 agent | 平台 agent 目录 + 相关 workflow/command/skill 入口点。 |
72
72
 
73
- ## Modification Principles
73
+ ## Modification Principles(修改原则)
74
74
 
75
- 1. **Keep responsibilities single-purpose**. Do not mix research, implement, and check responsibilities into one agent.
76
- 2. **Specify the read order**. Agents must know to start from the active task, read jsonl/spec context, then read `prd.md`, `design.md` if present, and `implement.md` if present.
77
- 3. **Specify write boundaries**. Research usually only writes `research/`; implement can write code; check can fix issues.
78
- 4. **Keep semantics synchronized in multi-platform projects**. If the user configured Claude, Codex, and Cursor together, decide whether changes to one platform's agent also need to be applied to others.
75
+ 1. **Keep responsibilities single-purpose(保持职责单一)**。不要将 researchimplement check 职责混入一个 agent
76
+ 2. **Specify the read order(指定读取顺序)**。Agent 必须知道从当前任务开始,读取 jsonl/spec 上下文,然后读取 `prd.md`、`design.md`(如有)和 `implement.md`(如有)。
77
+ 3. **Specify write boundaries(指定写入边界)**。Research 通常只写入 `research/`;implement 可以写代码;check 可以修复问题。
78
+ 4. **Keep semantics synchronized in multi-platform projects(多平台项目中保持语义同步)**。如果用户同时配置了 ClaudeCodex Cursor,请决定对某个平台 agent 的更改是否也需要应用到其他平台。
79
79
 
80
- ## Do Not Default To Editing Upstream Templates
80
+ ## Do Not Default To Editing Upstream Templates(不要默认编辑上游模板)
81
81
 
82
- Local AI should default to modifying platform agent files inside the user project. Discuss upstream template source only when the user explicitly wants to contribute the change back to Cviauto.
82
+ 本地 AI 应默认修改用户项目内的平台 agent 文件。仅当用户明确希望将更改回馈给 Cviauto 时,才讨论上游模板源。
@@ -1,20 +1,20 @@
1
- # Hooks And Settings
1
+ # Hooks And Settings(钩子与设置)
2
2
 
3
- Hooks/settings are the entry layer that connects a platform to Cviauto. They decide which scripts, plugins, or extensions a platform runs for which events.
3
+ Hooks/settings 是将平台连接到 Cviauto 的入口层。它们决定平台在哪些事件上运行哪些脚本、插件或扩展。
4
4
 
5
- ## Settings Responsibilities
5
+ ## Settings Responsibilities(Settings 的职责)
6
6
 
7
- settings/config files usually register:
7
+ settings/config 文件通常注册:
8
8
 
9
- - session-start hook: injects a Cviauto overview when a new session starts or context resets.
10
- - workflow-state hook: parses `[workflow-state:STATUS]` blocks from `.cviauto/workflow.md` and emits the body matching the current task `status` on each user input. Parser-only; the script does not embed fallback content.
11
- - sub-agent context hook: injects task context when implementation/check/research agents start.
12
- - shell/session bridge: lets shell commands see the same Cviauto session identity.
13
- - platform plugin or extension entry points.
9
+ - session-start hook(会话启动钩子):在新会话启动或上下文重置时注入 Cviauto 概览。
10
+ - workflow-state hook(工作流状态钩子):解析 `.cviauto/workflow.md` 中的 `[workflow-state:STATUS]` 块,在每次用户输入时输出与当前任务 `status` 匹配的正文。仅做解析;脚本不嵌入回退内容。
11
+ - sub-agent context hook(子代理上下文钩子):在 implementation/check/research agent 启动时注入任务上下文。
12
+ - shell/session bridge(shell/会话桥接):让 shell 命令看到相同的 Cviauto 会话身份。
13
+ - platform plugin or extension entry points(平台插件或扩展入口点)。
14
14
 
15
- Common files:
15
+ 常见文件:
16
16
 
17
- | Platform | settings/config |
17
+ | Platform(平台) | settings/config(设置/配置) |
18
18
  | --- | --- |
19
19
  | Claude Code | `.claude/settings.json` |
20
20
  | Cursor | `.cursor/hooks.json` |
@@ -26,47 +26,46 @@ Common files:
26
26
  | CodeBuddy | `.codebuddy/settings.json` |
27
27
  | GitHub Copilot | `.github/copilot/hooks.json` |
28
28
  | Factory Droid | `.factory/settings.json` |
29
- | Pi Agent | `.pi/settings.json`, `.pi/extensions/trellis/` |
30
- | Trae IDE | `.trae/hooks.json` |
29
+ | Pi Agent | `.pi/settings.json`, `.pi/extensions/cviauto/` |
31
30
 
32
- Reasonix and ZCode are pull-based platforms that do not use hooks or settings files; their agent files contain prelude instructions to read context after startup.
31
+ Reasonix ZCode 是拉取模式平台,不使用 hooks settings 文件;它们的 agent 文件包含启动后读取上下文的序言指令。
33
32
 
34
- Whether these files exist in a project depends on which `cviauto init --<platform>` flags the user ran.
33
+ 这些文件是否存在于项目中,取决于用户运行了哪些 `cviauto init --<platform>` 标志。
35
34
 
36
- ## Hook Script Types
35
+ ## Hook Script Types(Hook 脚本类型)
37
36
 
38
- | Script | Purpose |
37
+ | Script(脚本) | Purpose(用途) |
39
38
  | --- | --- |
40
- | `session-start.py` | Generates session-start context. |
41
- | `inject-workflow-state.py` | Parses `[workflow-state:STATUS]` blocks in `.cviauto/workflow.md` and emits the body matching the current task status. Falls back to `Refer to workflow.md for current step.` when no matching block exists. |
42
- | `inject-subagent-context.py` | Injects PRD, JSONL context, and related spec/research into sub-agents. |
43
- | `inject-shell-session-context.py` | Lets shell commands inherit Cviauto session identity. |
39
+ | `session-start.py` | 生成会话启动上下文。 |
40
+ | `inject-workflow-state.py` | 解析 `.cviauto/workflow.md` 中的 `[workflow-state:STATUS]` 块,输出与当前任务状态匹配的正文。当没有匹配块时,回退到 `Refer to workflow.md for current step.`。 |
41
+ | `inject-subagent-context.py` | PRDJSONL 上下文及相关 spec/research 注入 sub-agent。 |
42
+ | `inject-shell-session-context.py` | shell 命令继承 Cviauto 会话身份。 |
44
43
 
45
- Not every platform has every hook. Do not copy files from another platform just because a platform lacks a hook; first confirm whether that platform supports the corresponding event.
44
+ 并非每个平台都有所有 hook。不要因为某个平台缺少 hook 就从其他平台复制文件;先确认该平台是否支持相应的事件。
46
45
 
47
- ## Local Change Scenarios
46
+ ## Local Change Scenarios(本地修改场景)
48
47
 
49
- | User need | Edit location |
48
+ | User need(用户需求) | Edit location(编辑位置) |
50
49
  | --- | --- |
51
- | AI should see more/less context in a new session | Platform `session-start` hook. |
52
- | Per-turn hint policy should change | `[workflow-state:STATUS]` block in `.cviauto/workflow.md`. The hook parses workflow.md verbatim no script edit required. |
53
- | Sub-agent cannot read PRD/spec | `inject-subagent-context` hook or agent prelude. |
54
- | `task.py current` in shell has no active task | Shell/session bridge hook or platform environment variable configuration. |
55
- | Disable an automatic injection | The corresponding hook registration in settings/config. |
50
+ | AI 在新会话中应看到更多/更少上下文 | 平台 `session-start` hook |
51
+ | 每轮提示策略应更改 | `.cviauto/workflow.md` 中的 `[workflow-state:STATUS]` 块。hook 逐字解析 workflow.md — 无需编辑脚本。 |
52
+ | Sub-agent 无法读取 PRD/spec | `inject-subagent-context` hook agent 序言。 |
53
+ | shell 中 `task.py current` 无当前任务 | Shell/session bridge hook 或平台环境变量配置。 |
54
+ | 禁用自动注入 | settings/config 中对应的 hook 注册。 |
56
55
 
57
- ## Modification Principles
56
+ ## Modification Principles(修改原则)
58
57
 
59
- 1. **Settings wire things up; hooks define behavior**. If only the hook changes, the platform may never call it. If only settings change, behavior may not change.
60
- 2. **Confirm platform event names first**. Different platforms use different names for SessionStart, UserPromptSubmit, AgentSpawn, shell execution, and similar events.
61
- 3. **Hooks read local `.cviauto/`, not upstream source**. `.cviauto/scripts/` and `.cviauto/workflow.md` in the user project are the default targets.
62
- 4. **Errors must be visible**. Hook failures should tell the user what was not injected instead of silently leaving the AI without context.
58
+ 1. **Settings wire things up; hooks define behavior(Settings 负责接线;hooks 定义行为)**。如果只改了 hook,平台可能根本不会调用它。如果只改了 settings,行为可能不会改变。
59
+ 2. **Confirm platform event names first(先确认平台事件名称)**。不同平台对 SessionStartUserPromptSubmitAgentSpawnshell 执行及类似事件使用不同的名称。
60
+ 3. **Hooks read local `.cviauto/`, not upstream source(Hooks 读取本地 `.cviauto/`,而非上游源)**。用户项目中的 `.cviauto/scripts/` `.cviauto/workflow.md` 是默认目标。
61
+ 4. **Errors must be visible(错误必须可见)**。Hook 失败时应告知用户什么没有被注入,而不是静默地让 AI 缺少上下文。
63
62
 
64
- ## Troubleshooting Path
63
+ ## Troubleshooting Path(排查路径)
65
64
 
66
- If the user says "AI did not read Cviauto state":
65
+ 如果用户说"AI 没有读取 Cviauto 状态"
67
66
 
68
- 1. Check whether the platform settings register the hook.
69
- 2. Check whether the hook file exists.
70
- 3. Manually run the `.cviauto/scripts/get_context.py` or `task.py current --source` command that the hook depends on.
71
- 4. Check whether active task state exists in `.cviauto/.runtime/sessions/`.
72
- 5. Check whether the platform shell passes session identity.
67
+ 1. 检查平台 settings 是否注册了该 hook
68
+ 2. 检查 hook 文件是否存在。
69
+ 3. 手动运行该 hook 依赖的 `.cviauto/scripts/get_context.py` `task.py current --source` 命令。
70
+ 4. 检查 `.cviauto/.runtime/sessions/` 中是否存在当前任务状态。
71
+ 5. 检查平台 shell 是否传递了会话身份。
@@ -1,59 +1,59 @@
1
- # Platform Files Overview
1
+ # Platform Files Overview(平台文件概览)
2
2
 
3
- Cviauto connects the same local architecture to different AI tools. `.cviauto/` stores the shared runtime; platform directories store adapter files that define how each AI tool enters Cviauto.
3
+ Cviauto 将同一套本地架构连接到不同的 AI 工具。`.cviauto/` 存放共享运行时;platform 目录存放适配器文件,定义每个 AI 工具如何进入 Cviauto
4
4
 
5
- When a local AI modifies Cviauto, it should distinguish two file categories first:
5
+ 当本地 AI 修改 Cviauto 时,应首先区分两类文件:
6
6
 
7
- - **Shared files**: `.cviauto/workflow.md`, `.cviauto/tasks/`, `.cviauto/spec/`, `.cviauto/scripts/`.
8
- - **Platform files**: `.claude/`, `.codex/`, `.cursor/`, `.opencode/`, `.kiro/`, `.gemini/`, `.qoder/`, `.codebuddy/`, `.github/`, `.factory/`, `.pi/`, `.trae/`, `.kilocode/`, `.agent/`, `.devin/`, `.reasonix/`, `.zcode/`, and similar directories.
7
+ - **Shared files(共享文件)**:`.cviauto/workflow.md`、`.cviauto/tasks/`、`.cviauto/spec/`、`.cviauto/scripts/`。
8
+ - **Platform files(平台文件)**:`.claude/`、`.codex/`、`.cursor/`、`.opencode/`、`.kiro/`、`.gemini/`、`.qoder/`、`.codebuddy/`、`.github/`、`.factory/`、`.pi/`、`.kilocode/`、`.agent/`、`.devin/`、`.reasonix/`、`.zcode/` 以及类似目录。
9
9
 
10
- Platform files do not store business state. They let the corresponding AI tool read Cviauto state, call Cviauto scripts, and load Cviauto skills/agents/hooks.
10
+ 平台文件不存储业务状态。它们让对应的 AI 工具能够读取 Cviauto 状态、调用 Cviauto 脚本,并加载 Cviauto skills/agents/hooks
11
11
 
12
- ## Platform File Categories
12
+ ## Platform File Categories(平台文件分类)
13
13
 
14
- | Category | Common paths | Purpose |
14
+ | Category(类别) | Common paths(常见路径) | Purpose(用途) |
15
15
  | --- | --- | --- |
16
- | settings/config | `.claude/settings.json`, `.codex/hooks.json`, `.qoder/settings.json`, `.trae/hooks.json` | Register hooks, plugins, extensions, or platform behavior. |
17
- | hooks/plugins/extensions | `.claude/hooks/`, `.opencode/plugins/`, `.pi/extensions/` | Inject context at session start, user input, agent startup, shell execution, and similar events. |
18
- | agents | `.claude/agents/`, `.codex/agents/`, `.kiro/agents/` | Define `cviauto-research`, `cviauto-implement`, and `cviauto-check`. |
19
- | skills | `.claude/skills/`, `.agents/skills/`, `.qoder/skills/` | Capability descriptions that auto-trigger or can be read on demand. |
20
- | commands/prompts/workflows | `.cursor/commands/`, `.github/prompts/`, `.devin/workflows/` | Entry points explicitly invoked by the user. |
16
+ | settings/config(设置/配置) | `.claude/settings.json`、`.codex/hooks.json`、`.qoder/settings.json` | 注册 hookspluginsextensions 或平台行为。 |
17
+ | hooks/plugins/extensions(钩子/插件/扩展) | `.claude/hooks/`、`.opencode/plugins/`、`.pi/extensions/` | 在会话启动、用户输入、agent 启动、shell 执行等事件时注入上下文。 |
18
+ | agents(代理) | `.claude/agents/`、`.codex/agents/`、`.kiro/agents/` | 定义 `cviauto-research`、`cviauto-implement` `cviauto-check`。 |
19
+ | skills(技能) | `.claude/skills/`、`.agents/skills/`、`.qoder/skills/` | 能力描述,可自动触发或按需读取。 |
20
+ | commands/prompts/workflows(命令/提示/工作流) | `.cursor/commands/`、`.github/prompts/`、`.devin/workflows/` | 用户显式调用的入口点。 |
21
21
 
22
- ## Three Platform Integration Modes
22
+ ## Three Platform Integration Modes(三种平台集成模式)
23
23
 
24
- ### 1. Hook / Extension Driven
24
+ ### 1. Hook / Extension Driven(钩子/扩展驱动)
25
25
 
26
- These platforms can trigger scripts or plugins on specific events and actively inject Cviauto context into AI.
26
+ 这些平台可以在特定事件上触发脚本或插件,并主动将 Cviauto 上下文注入 AI
27
27
 
28
- Common capabilities:
28
+ 常见能力:
29
29
 
30
- - session-start injection of a `.cviauto/` overview.
31
- - workflow-state hints for each user turn.
32
- - PRD/spec/research injection when sub-agents start.
33
- - Shell commands inheriting session identity.
30
+ - 会话启动时注入 `.cviauto/` 概览。
31
+ - 每次用户对话轮次的工作流状态提示。
32
+ - sub-agent 启动时注入 PRD/spec/research
33
+ - Shell 命令继承会话身份。
34
34
 
35
- To change "when the AI knows what," inspect hooks/plugins/extensions and settings first.
35
+ 要改变"AI 何时知道什么",请先检查 hooks/plugins/extensions settings
36
36
 
37
- ### 2. Agent Prelude / Pull-Based
37
+ ### 2. Agent Prelude / Pull-Based(Agent 序言 / 拉取模式)
38
38
 
39
- Some platforms cannot reliably let hooks rewrite sub-agent prompts, so the agent file itself instructs the agent to read the active task, PRD, and JSONL context after startup.
39
+ 某些平台无法可靠地让 hooks 重写 sub-agent prompt,因此 agent 文件本身会指示 agent 在启动后读取当前任务、PRD JSONL 上下文。
40
40
 
41
- To change how sub-agents load context, inspect the agent files themselves.
41
+ 要改变 sub-agent 加载上下文的方式,请检查 agent 文件本身。
42
42
 
43
- ### 3. Main-Session Workflow
43
+ ### 3. Main-Session Workflow(主会话工作流)
44
44
 
45
- Some platforms do not have Cviauto sub-agent or hook capabilities. They rely on workflows/skills/commands to guide the main-session AI to read files, run scripts, and move tasks forward.
45
+ 某些平台没有 Cviauto sub-agent hook 能力。它们依赖 workflows/skills/commands 来引导主会话 AI 读取文件、运行脚本和推进任务。
46
46
 
47
- To change behavior, inspect platform workflows/skills/commands and `.cviauto/workflow.md`.
47
+ 要改变行为,请检查平台 workflows/skills/commands `.cviauto/workflow.md`。
48
48
 
49
- ## Local Modification Order
49
+ ## Local Modification Order(本地修改顺序)
50
50
 
51
- When the user asks to customize behavior for a platform, the AI should inspect files in this order:
51
+ 当用户要求为某个平台自定义行为时,AI 应按以下顺序检查文件:
52
52
 
53
- 1. Read `.cviauto/workflow.md` to confirm the shared flow.
54
- 2. Read the target platform's settings/config to see which hooks/agents/skills/commands are registered.
55
- 3. Read the target platform's agents/skills/commands/hooks.
56
- 4. Modify the local file closest to the user's need.
57
- 5. If the change affects the shared flow, synchronize `.cviauto/workflow.md` or `.cviauto/spec/`.
53
+ 1. 读取 `.cviauto/workflow.md` 确认共享流程。
54
+ 2. 读取目标平台的 settings/config 查看注册了哪些 hooks/agents/skills/commands
55
+ 3. 读取目标平台的 agents/skills/commands/hooks
56
+ 4. 修改最贴近用户需求的本地文件。
57
+ 5. 如果改动影响共享流程,同步更新 `.cviauto/workflow.md` `.cviauto/spec/`。
58
58
 
59
- Do not modify only platform files and forget the shared workflow. Do not modify only `.cviauto/workflow.md` and forget that platform entry points may still contain old descriptions.
59
+ 不要只修改平台文件而忘记共享工作流。不要只修改 `.cviauto/workflow.md` 而忘记平台入口点可能仍包含旧描述。