@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,36 +1,36 @@
1
- # Change Local Skills, Commands, Prompts, And Workflows
1
+ # 修改本地 SkillsCommandsPrompts Workflows
2
2
 
3
- When the user wants to change AI entry points, auto-trigger rules, or explicit command behavior, edit skills, commands, prompts, or workflows in local platform directories.
3
+ 当用户想更改 AI 入口点、自动触发规则或显式命令行为时,编辑本地平台目录中的 skillscommandsprompts workflows
4
4
 
5
- Before editing, classify the skill you are about to touch:
5
+ 在编辑之前,先对你即将操作的 skill 进行分类:
6
6
 
7
- - **Bundled upstream skill** — `cviauto-meta`, `cviauto-spec-bootstrap`, `cviauto-session-insight`, `cviauto-channel`. Source of truth lives in the Cviauto CLI repo under `packages/cli/src/templates/common/bundled-skills/<name>/`; auto-dispatched to every platform's skill root by `getBundledSkillTemplates()` on `cviauto init` / `cviauto update`. Local edits here are tracked by `.cviauto/.template-hashes.json` and will be flagged on the next update.
8
- - **Project-local skill** — anything else under `.{platform}/skills/`. Owned by the user; not refreshed by `cviauto update`.
7
+ - **捆绑的上游 skill** — `cviauto-meta`、`cviauto-spec-bootstrap`、`cviauto-session-insight`、`cviauto-channel`。其事实来源位于 Cviauto CLI 仓库的 `packages/cli/src/templates/common/bundled-skills/<name>/` 中;在 `cviauto init` / `cviauto update` 时由 `getBundledSkillTemplates()` 自动分发到每个平台的 skill 根目录。此处的本地编辑会被 `.cviauto/.template-hashes.json` 追踪,并在下次更新时被标记。
8
+ - **项目本地 skill** — 位于 `.{platform}/skills/` 下的其他所有内容。归用户所有,不会被 `cviauto update` 刷新。
9
9
 
10
- The remainder of this file uses "skill" for the local file; the override and conflict rules differ between the two cases.
10
+ 本文余下部分使用"skill"代指本地文件;两种情况下覆盖和冲突规则不同。
11
11
 
12
- ## Read These Files First
12
+ ## 先阅读这些文件
13
13
 
14
14
  1. `.cviauto/workflow.md`
15
- 2. Target platform skill/command/prompt/workflow directory
16
- 3. Related agent or hook files
17
- 4. Whether project rules already exist in `.cviauto/spec/`
18
- 5. `.cviauto/.template-hashes.json` — confirms whether the skill you are about to edit is upstream-owned (entry present) or project-local (entry absent)
15
+ 2. 目标平台的 skill/command/prompt/workflow 目录
16
+ 3. 相关的 agent hook 文件
17
+ 4. 确认 `.cviauto/spec/` 中是否已有项目规则
18
+ 5. `.cviauto/.template-hashes.json` — 确认你要编辑的 skill 是上游所有的(有对应条目)还是项目本地的(无对应条目)
19
19
 
20
- ## Which Entry Type To Choose
20
+ ## 选择哪种入口类型
21
21
 
22
- | Goal | Recommendation |
22
+ | 目标 | 推荐做法 |
23
23
  | --- | --- |
24
- | AI should automatically know a capability | Add or modify a skill. |
25
- | User wants to trigger manually with a command | Add or modify a command/prompt/workflow. |
26
- | Team project conventions | Prefer `.cviauto/spec/` or a project-local skill — never a bundled skill directory. |
27
- | Tweak a bundled skill (`cviauto-meta` et al.) for the user's own project | Create a project-local sibling skill (different name) that overrides intent, or edit `.cviauto/spec/`. Edits inside the bundled skill directory survive only until the next `cviauto update` and will need a "keep" choice each time. |
28
- | Contribute the change back upstream | Edit `packages/cli/src/templates/common/bundled-skills/<name>/` in the Cviauto CLI repo, not the deployed copy. |
29
- | Change Cviauto flow semantics | Synchronize `.cviauto/workflow.md`. |
24
+ | AI 应自动知晓某项能力 | 添加或修改 skill |
25
+ | 用户希望通过命令手动触发 | 添加或修改 command/prompt/workflow |
26
+ | 团队项目约定 | 优先使用 `.cviauto/spec/` 或项目本地 skill——切勿使用捆绑的 skill 目录。 |
27
+ | 为用户自己的项目微调捆绑 skill(`cviauto-meta` 等) | 创建一个名称不同的项目本地兄弟 skill 来覆盖意图,或编辑 `.cviauto/spec/`。在捆绑 skill 目录内的编辑仅在下一次 `cviauto update` 之前有效,且每次都需要选择"保留" |
28
+ | 将更改回馈给上游 | Cviauto CLI 仓库中编辑 `packages/cli/src/templates/common/bundled-skills/<name>/`,而非部署后的副本。 |
29
+ | 更改 Cviauto 流程语义 | 同步 `.cviauto/workflow.md`。 |
30
30
 
31
- ## Modify A Skill
31
+ ## 修改 Skill
32
32
 
33
- A skill is usually:
33
+ 一个 skill 通常结构如下:
34
34
 
35
35
  ```text
36
36
  <skill-name>/
@@ -38,86 +38,86 @@ A skill is usually:
38
38
  └── references/
39
39
  ```
40
40
 
41
- `SKILL.md` should be short and responsible for triggering/routing. Put long content in `references/` so AI can read it on demand.
41
+ `SKILL.md` 应简短,负责触发/路由。将长内容放入 `references/`,以便 AI 按需读取。
42
42
 
43
- The frontmatter description should specify when to use the skill. Example:
43
+ frontmatter 中的 description 应说明何时使用该 skill。示例:
44
44
 
45
45
  ```yaml
46
46
  description: "Use when customizing this project's deployment workflow and release checklist."
47
47
  ```
48
48
 
49
- Do not write vague descriptions such as "helpful project skill"; they can trigger incorrectly.
49
+ 不要编写模糊的 description,如 "helpful project skill";它们可能会错误触发。
50
50
 
51
- ### Bundled vs. Project-Local
51
+ ### 捆绑 vs. 项目本地
52
52
 
53
- The same directory shape is used by two very different ownership models:
53
+ 相同的目录结构由两种截然不同的所有权模型使用:
54
54
 
55
- | Aspect | Bundled (`cviauto-meta`, `cviauto-spec-bootstrap`, `cviauto-session-insight`, `cviauto-channel`) | Project-local |
55
+ | 方面 | 捆绑(`cviauto-meta`、`cviauto-spec-bootstrap`、`cviauto-session-insight`、`cviauto-channel`) | 项目本地 |
56
56
  | --- | --- | --- |
57
- | Source of truth | `packages/cli/src/templates/common/bundled-skills/<name>/` in Cviauto CLI repo | Inside the user project itself |
58
- | Dispatch | Auto-dispatched to every platform skill root by `getBundledSkillTemplates()` (`packages/cli/src/templates/common/index.ts`) on `cviauto init` / `cviauto update` | Created by the user (or another skill) and never moved |
59
- | Hash tracking | Every file recorded in `.cviauto/.template-hashes.json`; conflict prompt on update | Not tracked |
60
- | Editing locally | Allowed but will be marked "modified by user" on next update | Free editing |
61
- | The right way to customize | Add a *new* project-local skill with a *different* name that supplements (or supersedes) the bundled one | Edit the file directly |
57
+ | 事实来源 | Cviauto CLI 仓库中的 `packages/cli/src/templates/common/bundled-skills/<name>/` | 用户项目自身内部 |
58
+ | 分发方式 | `cviauto init` / `cviauto update` 时由 `getBundledSkillTemplates()`(`packages/cli/src/templates/common/index.ts`)自动分发到每个平台 skill 根目录 | 由用户(或其他 skill)创建,永不移动 |
59
+ | Hash 追踪 | 每个文件记录在 `.cviauto/.template-hashes.json` 中;更新时提示冲突 | 不追踪 |
60
+ | 本地编辑 | 允许,但在下次更新时会被标记为"用户已修改" | 自由编辑 |
61
+ | 正确的自定义方式 | 添加一个**新的**、**名称不同**的项目本地 skill 来补充(或替代)捆绑的 skill | 直接编辑文件 |
62
62
 
63
- If the goal is "make my project's AI behave differently when discussing release notes," the answer is almost always a project-local skill, not surgery on `cviauto-meta/`.
63
+ 如果目标是"让我的项目 AI 在讨论发布说明时行为不同",答案几乎始终是创建一个项目本地 skill,而不是对 `cviauto-meta/` 动手术。
64
64
 
65
- ## Modify A Command/Prompt/Workflow
65
+ ## 修改 Command/Prompt/Workflow
66
66
 
67
- Explicit entry points should state:
67
+ 显式入口点应说明:
68
68
 
69
- - How the user triggers it.
70
- - Which `.cviauto/` files to read.
71
- - Which scripts to run.
72
- - How to report after completion.
69
+ - 用户如何触发它。
70
+ - 需要读取哪些 `.cviauto/` 文件。
71
+ - 需要运行哪些脚本。
72
+ - 完成后如何报告。
73
73
 
74
- If a command only repeats workflow rules, prefer making it reference/read `.cviauto/workflow.md` instead of maintaining a second copy of the flow.
74
+ 如果一个 command 仅是重复工作流规则,优先让它引用/读取 `.cviauto/workflow.md`,而不是维护流程的第二份副本。
75
75
 
76
- ## Common Paths
76
+ ## 常见路径
77
77
 
78
- | Platform | Entry directories |
78
+ | 平台 | 入口目录 |
79
79
  | --- | --- |
80
- | Claude Code | `.claude/skills/`, `.claude/commands/` |
81
- | Cursor | `.cursor/skills/`, `.cursor/commands/` |
82
- | OpenCode | `.opencode/skills/`, `.opencode/commands/` |
83
- | Codex | `.agents/skills/`, `.codex/skills/` |
84
- | Gemini CLI | `.agents/skills/`, `.gemini/commands/` |
80
+ | Claude Code | `.claude/skills/`、`.claude/commands/` |
81
+ | Cursor | `.cursor/skills/`、`.cursor/commands/` |
82
+ | OpenCode | `.opencode/skills/`、`.opencode/commands/` |
83
+ | Codex | `.agents/skills/`、`.codex/skills/` |
84
+ | Gemini CLI | `.agents/skills/`、`.gemini/commands/` |
85
85
  | Kiro | `.kiro/skills/` |
86
- | Qoder | `.qoder/skills/`, `.qoder/commands/` |
87
- | CodeBuddy | `.codebuddy/skills/`, `.codebuddy/commands/` |
88
- | GitHub Copilot | `.github/skills/`, `.github/prompts/` |
89
- | Factory Droid | `.factory/skills/`, `.factory/commands/` |
86
+ | Qoder | `.qoder/skills/`、`.qoder/commands/` |
87
+ | CodeBuddy | `.codebuddy/skills/`、`.codebuddy/commands/` |
88
+ | GitHub Copilot | `.github/skills/`、`.github/prompts/` |
89
+ | Factory Droid | `.factory/skills/`、`.factory/commands/` |
90
90
  | Pi Agent | `.pi/skills/` |
91
- | Reasonix | `.reasonix/skills/` (no separate commands dir; slash commands built into the platform) |
92
- | ZCode | `.agents/skills/`, `.zcode/commands/` |
91
+ | Reasonix | `.reasonix/skills/`(无独立 commands 目录;斜杠命令由平台内置) |
92
+ | ZCode | `.agents/skills/`、`.zcode/commands/` |
93
93
  | Kilo / Antigravity / Devin | workflows + skills |
94
94
 
95
- Every directory above is a deploy target for the four bundled skills. Each platform receives a full copy on `cviauto init` and refresh on `cviauto update`; nothing has to be wired by hand.
95
+ 以上每个目录都是四个捆绑 skill 的部署目标。每个平台在 `cviauto init` 时获得完整副本,并在 `cviauto update` 时刷新;无需手动配置。
96
96
 
97
- ## Add A Project-Local Skill
97
+ ## 添加项目本地 Skill
98
98
 
99
- If the user wants to document team-private customizations, create a project-local skill — never put project-private content into a bundled skill directory, since `cviauto update` will overwrite it.
99
+ 如果用户想记录团队私有的自定义内容,创建项目本地 skill——切勿将项目私有内容放入捆绑 skill 目录,因为 `cviauto update` 会覆盖它。
100
100
 
101
101
  ```text
102
- .claude/skills/project-trellis-local/
102
+ .claude/skills/project-cviauto-local/
103
103
  └── SKILL.md
104
104
  ```
105
105
 
106
- For multi-platform projects, add equivalent versions in each platform skill directory, or use `.agents/skills/` on platforms that support the shared layer (Codex, Gemini CLI).
106
+ 对于多平台项目,在每个平台 skill 目录中添加等效版本,或在支持共享层的平台(Codex、Gemini CLI)上使用 `.agents/skills/`。
107
107
 
108
- Pick a name that does **not** collide with the bundled set:
108
+ 选择一个**不**与捆绑集合冲突的名称:
109
109
 
110
110
  - `cviauto-meta`
111
111
  - `cviauto-spec-bootstrap`
112
112
  - `cviauto-session-insight`
113
113
  - `cviauto-channel`
114
114
 
115
- A reused name causes `getBundledSkillTemplates()` to overwrite the project-local copy on the next update. A common convention is to prefix the project name: `acme-trellis-deploy`, `acme-trellis-onboarding`.
115
+ 重名会导致 `getBundledSkillTemplates()` 在下一次更新时覆盖项目本地副本。常见的约定是使用项目名称作为前缀:`acme-cviauto-deploy`、`acme-cviauto-onboarding`。
116
116
 
117
- ## Notes
117
+ ## 注意事项
118
118
 
119
- - Do not mix every platform's syntax into one file.
120
- - Do not change only one platform entry point while claiming all platforms are supported.
121
- - Do not hide long-term engineering conventions inside a command; write them to `.cviauto/spec/`.
122
- - Do not hand-edit files inside `cviauto-meta/`, `cviauto-spec-bootstrap/`, `cviauto-session-insight/`, or `cviauto-channel/` under any `.{platform}/skills/` directory expecting the change to persist — they are bundled and refreshed by `cviauto update`. Either contribute upstream or add a project-local skill that complements them.
123
- - After `cviauto update` reports a "modified by you" conflict on a bundled skill file, choose **keep** only if you accept maintaining the divergence by hand; otherwise accept the overwrite and re-apply the intent as a project-local skill.
119
+ - 不要将每个平台的语法混入一个文件中。
120
+ - 不要仅修改一个平台的入口点却声称支持所有平台。
121
+ - 不要将长期工程约定隐藏在 command 中;将其写入 `.cviauto/spec/`。
122
+ - 不要手动编辑任何 `.{platform}/skills/` 目录下的 `cviauto-meta/`、`cviauto-spec-bootstrap/`、`cviauto-session-insight/` `cviauto-channel/` 中的文件并期望修改能持久——它们是捆绑的,会被 `cviauto update` 刷新。要么贡献给上游,要么添加一个补充它们的项目本地 skill
123
+ - `cviauto update` 报告捆绑 skill 文件存在"已被您修改"的冲突时,仅当你接受手动维护差异时才选择**保留**;否则接受覆盖并将意图作为项目本地 skill 重新实现。
@@ -1,28 +1,28 @@
1
- # Change Local Spec Structure
1
+ # 修改本地 Spec 结构
2
2
 
3
- When the user wants to change the engineering conventions AI follows, add new spec layers, or adjust monorepo package mapping, edit `.cviauto/spec/` and `.cviauto/config.yaml`.
3
+ 当用户想更改 AI 遵循的工程约定、添加新的 spec 层或调整 monorepo 包映射时,编辑 `.cviauto/spec/` `.cviauto/config.yaml`。
4
4
 
5
- ## Read These Files First
5
+ ## 先阅读这些文件
6
6
 
7
7
  1. `.cviauto/config.yaml`
8
8
  2. `.cviauto/spec/`
9
- 3. `.cviauto/workflow.md` planning artifact guidance and Phase 3.3
10
- 4. Current task `implement.jsonl` / `check.jsonl`
9
+ 3. `.cviauto/workflow.md` 中的规划产物指导和 Phase 3.3
10
+ 4. 当前 task `implement.jsonl` / `check.jsonl`
11
11
 
12
- ## Common Needs
12
+ ## 常见需求
13
13
 
14
- | Need | Edit location |
14
+ | 需求 | 编辑位置 |
15
15
  | --- | --- |
16
- | Add backend/frontend/docs/test spec layer | `.cviauto/spec/<layer>/` or `.cviauto/spec/<package>/<layer>/` |
17
- | Add shared thinking guides | `.cviauto/spec/guides/` |
18
- | Adjust monorepo packages | `packages` in `.cviauto/config.yaml` |
19
- | Change default package | `default_package` in `.cviauto/config.yaml` |
20
- | Control spec scanning scope | `spec_scope` in `.cviauto/config.yaml` |
21
- | Make a task read a new spec | Task `implement.jsonl` / `check.jsonl` |
16
+ | 添加 backend/frontend/docs/test spec | `.cviauto/spec/<layer>/` `.cviauto/spec/<package>/<layer>/` |
17
+ | 添加共享思维指南 | `.cviauto/spec/guides/` |
18
+ | 调整 monorepo | `.cviauto/config.yaml` 中的 `packages` |
19
+ | 更改默认包 | `.cviauto/config.yaml` 中的 `default_package` |
20
+ | 控制 spec 扫描范围 | `.cviauto/config.yaml` 中的 `spec_scope` |
21
+ | task 读取新的 spec | Task `implement.jsonl` / `check.jsonl` |
22
22
 
23
- ## Add A Spec Layer
23
+ ## 添加 Spec
24
24
 
25
- Single-repository example:
25
+ 单仓库示例:
26
26
 
27
27
  ```text
28
28
  .cviauto/spec/security/
@@ -30,7 +30,7 @@ Single-repository example:
30
30
  └── auth.md
31
31
  ```
32
32
 
33
- Monorepo example:
33
+ Monorepo 示例:
34
34
 
35
35
  ```text
36
36
  .cviauto/spec/webapp/security/
@@ -38,25 +38,25 @@ Monorepo example:
38
38
  └── auth.md
39
39
  ```
40
40
 
41
- `index.md` should include:
41
+ `index.md` 应包含:
42
42
 
43
- - What code this layer applies to.
44
- - Pre-Development Checklist.
45
- - Quality Check.
46
- - Links to specific guideline files.
43
+ - 该层适用于哪些代码。
44
+ - 开发前检查清单(Pre-Development Checklist)。
45
+ - 质量检查(Quality Check)。
46
+ - 指向具体指南文件的链接。
47
47
 
48
- ## Update Context
48
+ ## 更新上下文
49
49
 
50
- Adding a spec does not mean every task automatically reads it. The current task must reference it in JSONL:
50
+ 添加 spec 并不意味着每个 task 都会自动读取它。当前 task 必须在 JSONL 中引用它:
51
51
 
52
52
  ```bash
53
53
  python3 ./.cviauto/scripts/task.py add-context <task> implement ".cviauto/spec/webapp/security/index.md" "Security conventions"
54
54
  python3 ./.cviauto/scripts/task.py add-context <task> check ".cviauto/spec/webapp/security/index.md" "Security review rules"
55
55
  ```
56
56
 
57
- ## Change Monorepo Packages
57
+ ## 更改 Monorepo
58
58
 
59
- Example `.cviauto/config.yaml`:
59
+ 示例 `.cviauto/config.yaml`:
60
60
 
61
61
  ```yaml
62
62
  packages:
@@ -67,17 +67,17 @@ packages:
67
67
  default_package: webapp
68
68
  ```
69
69
 
70
- After editing, run:
70
+ 编辑后运行:
71
71
 
72
72
  ```bash
73
73
  python3 ./.cviauto/scripts/get_context.py --mode packages
74
74
  ```
75
75
 
76
- Use this output to confirm AI can see the correct packages and spec layers.
76
+ 使用此输出来确认 AI 能看到正确的包和 spec 层。
77
77
 
78
- ## Notes
78
+ ## 注意事项
79
79
 
80
- - Specs are user project conventions and can be changed according to project needs.
81
- - Do not put temporary task information into specs; put temporary information in the task.
82
- - Do not put long-term conventions only in agents or commands; preserve them in specs.
83
- - After changing spec structure, check whether existing task JSONL files still point to files that exist.
80
+ - Specs 是用户项目约定,可根据项目需求更改。
81
+ - 不要将临时任务信息放入 specs;将临时信息放入 task 中。
82
+ - 不要将长期约定仅放在 agent command 中;将其保存在 specs 中。
83
+ - 更改 spec 结构后,检查现有 task JSONL 文件是否仍然指向存在的文件。
@@ -1,31 +1,31 @@
1
- # Change Local Task Lifecycle
1
+ # 修改本地任务生命周期
2
2
 
3
- Task lifecycle includes creation, start, context configuration, finish, archive, parent/child tasks, and lifecycle hooks. The default customization targets are `.cviauto/tasks/`, `.cviauto/config.yaml`, and `.cviauto/scripts/`.
3
+ 任务生命周期包括创建、启动、上下文配置、完成、归档、父子任务以及生命周期钩子。默认的自定义目标是 `.cviauto/tasks/`、`.cviauto/config.yaml` `.cviauto/scripts/`。
4
4
 
5
- ## Read These Files First
5
+ ## 先阅读这些文件
6
6
 
7
7
  1. `.cviauto/workflow.md`
8
8
  2. `.cviauto/config.yaml`
9
9
  3. `.cviauto/scripts/task.py`
10
10
  4. `.cviauto/scripts/common/task_store.py`
11
11
  5. `.cviauto/scripts/common/task_utils.py`
12
- 6. The current task's `.cviauto/tasks/<task>/task.json`
12
+ 6. 当前任务的 `.cviauto/tasks/<task>/task.json`
13
13
 
14
- ## Common Needs And Edit Points
14
+ ## 常见需求与编辑点
15
15
 
16
- | Need | Edit point |
16
+ | 需求 | 编辑点 |
17
17
  | --- | --- |
18
- | Automatically sync an external system after task creation | `hooks.after_create` in `.cviauto/config.yaml`. |
19
- | Automatically update status after task start | `hooks.after_start` in `.cviauto/config.yaml`. |
20
- | Run a script after task finish | `hooks.after_finish` in `.cviauto/config.yaml`. |
21
- | Clean external resources after archive | `hooks.after_archive` in `.cviauto/config.yaml`. |
22
- | Change default task fields | `.cviauto/scripts/common/task_store.py`. |
23
- | Change task parsing/search | `.cviauto/scripts/common/task_utils.py`. |
24
- | Change active task behavior | `.cviauto/scripts/common/active_task.py`. |
18
+ | 任务创建后自动同步外部系统 | `.cviauto/config.yaml` 中的 `hooks.after_create`。 |
19
+ | 任务启动后自动更新状态 | `.cviauto/config.yaml` 中的 `hooks.after_start`。 |
20
+ | 任务完成后运行脚本 | `.cviauto/config.yaml` 中的 `hooks.after_finish`。 |
21
+ | 归档后清理外部资源 | `.cviauto/config.yaml` 中的 `hooks.after_archive`。 |
22
+ | 修改默认任务字段 | `.cviauto/scripts/common/task_store.py`。 |
23
+ | 修改任务解析/搜索 | `.cviauto/scripts/common/task_utils.py`。 |
24
+ | 修改活动任务行为 | `.cviauto/scripts/common/active_task.py`。 |
25
25
 
26
- ## lifecycle hooks
26
+ ## 生命周期钩子
27
27
 
28
- `.cviauto/config.yaml` supports:
28
+ `.cviauto/config.yaml` 支持:
29
29
 
30
30
  ```yaml
31
31
  hooks:
@@ -39,13 +39,13 @@ hooks:
39
39
  - "python3 .cviauto/scripts/hooks/my_sync.py archive"
40
40
  ```
41
41
 
42
- Hook commands receive the `TASK_JSON_PATH` environment variable, pointing to the current task's `task.json`. Hook failures should usually warn, but not block the main task operation.
42
+ 钩子命令接收 `TASK_JSON_PATH` 环境变量,指向当前任务的 `task.json`。钩子失败通常应发出警告,但不应阻塞主任务操作。
43
43
 
44
- ## Change Task Fields
44
+ ## 修改任务字段
45
45
 
46
- If the user wants to add project-local fields, prefer putting them under `meta` in `task.json` to avoid breaking existing scripts' assumptions about standard fields.
46
+ 如果用户想要添加项目本地字段,建议将其放在 `task.json` `meta` 下,以避免破坏现有脚本对标准字段的假设。
47
47
 
48
- Example:
48
+ 示例:
49
49
 
50
50
  ```json
51
51
  "meta": {
@@ -54,37 +54,37 @@ Example:
54
54
  }
55
55
  ```
56
56
 
57
- If standard fields really need to change, inspect every local script that reads `task.json`.
57
+ 如果确实需要修改标准字段,请检查所有读取 `task.json` 的本地脚本。
58
58
 
59
- ## Change Active Task
59
+ ## 修改活动任务
60
60
 
61
- Active task is session-level state stored in `.cviauto/.runtime/sessions/`. Do not fall back to a global `.current-task` model. If the user wants to change active task behavior, edit:
61
+ 活动任务是存储在 `.cviauto/.runtime/sessions/` 中的会话级状态。不要回退到全局 `.current-task` 模型。如果用户想要修改活动任务行为,请编辑:
62
62
 
63
63
  - `.cviauto/scripts/common/active_task.py`
64
- - platform hooks or shell session bridges
65
- - active task descriptions in `.cviauto/workflow.md`
64
+ - 平台钩子或 shell 会话桥接
65
+ - `.cviauto/workflow.md` 中的活动任务描述
66
66
 
67
- ### `task.py create` Sets the Active Pointer
67
+ ### `task.py create` 设置活动指针
68
68
 
69
- `cmd_create` in `.cviauto/scripts/common/task_store.py` calls `set_active_task` best-effort right after writing the new task directory. The behavior:
69
+ `.cviauto/scripts/common/task_store.py` 中的 `cmd_create` 在写入新任务目录后立即尽最大努力(best-effort)调用 `set_active_task`。其行为如下:
70
70
 
71
- - When the calling shell carries session identity (`TRELLIS_CONTEXT_ID` env var, or any platform-specific session env that `resolve_context_key` recognizes — see `active_task.py:_ENV_SESSION_KEYS`), the per-session pointer at `.cviauto/.runtime/sessions/<context_key>.json` is rewritten to point at the new task. The task's `status=planning` and `[workflow-state:planning]` fires on the very next `UserPromptSubmit`.
72
- - When session identity is unavailable (raw CLI invocation outside an AI session, or a platform that doesn't propagate identity to shell), the task directory is still created and `status=planning` is still written, but the active pointer is left untouched. The user can attach the task later with `task.py start <dir>` once they're back in an AI session.
71
+ - 当调用 shell 携带会话身份标识(`TRELLIS_CONTEXT_ID` 环境变量,或 `resolve_context_key` 能识别的任何平台特定会话环境变量——参见 `active_task.py:_ENV_SESSION_KEYS`)时,`.cviauto/.runtime/sessions/<context_key>.json` 中的按会话指针会被重写为指向新任务。任务 `status=planning`,且 `[workflow-state:planning]` 会在紧接着的 `UserPromptSubmit` 时触发。
72
+ - 当会话身份不可用时(AI 会话之外的原始 CLI 调用,或不传播身份到 shell 的平台),任务目录仍会被创建,`status=planning` 仍会被写入,但活动指针保持不变。用户可以在回到 AI 会话后通过 `task.py start <dir>` 附加该任务。
73
73
 
74
- This makes `[workflow-state:planning]` the live breadcrumb during the brainstorm and JSONL curation work that follows `task.py create`. The pre-R7 behavior left the breadcrumb stuck on `no_task` until `task.py start`, so the planning block was effectively dead text.
74
+ 这使得 `[workflow-state:planning]` 成为 `task.py create` 之后的头脑风暴和 JSONL 整理工作中的实时面包屑导航。R7 之前的行为会将面包屑卡在 `no_task` 直到 `task.py start`,因此 planning 块实际上是一段死文本。
75
75
 
76
- If you fork `task.py` to add a new creation path (e.g. an external import that bypasses `cmd_create`), audit whether your path also calls `set_active_task`. Without that call, your created tasks will not surface as active. The full status writer table is in `.cviauto/spec/cli/backend/workflow-state-contract.md`.
76
+ 如果你 fork `task.py` 添加新的创建路径(例如绕过 `cmd_create` 的外部导入),请检查你的路径是否也调用了 `set_active_task`。没有该调用,你创建的任务将不会作为活动任务出现。完整的状态写入表位于 `.cviauto/spec/cli/backend/workflow-state-contract.md`。
77
77
 
78
- ## Modification Steps
78
+ ## 修改步骤
79
79
 
80
- 1. Confirm the current task with `python3 ./.cviauto/scripts/task.py current --source`.
81
- 2. Read the current task's `task.json` and confirm status and fields.
82
- 3. For configuration needs, edit `.cviauto/config.yaml` first.
83
- 4. For script behavior needs, then edit `.cviauto/scripts/`.
84
- 5. If the AI flow changed, synchronize `.cviauto/workflow.md`.
80
+ 1. 使用 `python3 ./.cviauto/scripts/task.py current --source` 确认当前任务。
81
+ 2. 读取当前任务的 `task.json` 并确认状态和字段。
82
+ 3. 对于配置需求,首先编辑 `.cviauto/config.yaml`。
83
+ 4. 对于脚本行为需求,然后编辑 `.cviauto/scripts/`。
84
+ 5. 如果 AI 流程发生变化,同步更新 `.cviauto/workflow.md`。
85
85
 
86
- ## Do Not
86
+ ## 不要做的事
87
87
 
88
- - Do not directly edit `.cviauto/.runtime/sessions/` to "fix" business state.
89
- - Do not hard-code project-private fields into scripts; prefer `meta`.
90
- - Do not default to asking the user to fork Cviauto CLI.
88
+ - 不要直接编辑 `.cviauto/.runtime/sessions/` "修复"业务状态。
89
+ - 不要将项目私有字段硬编码到脚本中;优先使用 `meta`。
90
+ - 不要默认让用户 fork Cviauto CLI
@@ -1,66 +1,66 @@
1
- # Change Local Workflow
1
+ # 修改本地工作流
2
2
 
3
- When the user wants to change Cviauto phases, next-action hints, whether to create tasks, whether to use sub-agents, or when to check/wrap up, edit `.cviauto/workflow.md` first.
3
+ 当用户想要修改 Cviauto 阶段、下一步提示、是否创建任务、是否使用子代理,或何时检查/收尾时,首先编辑 `.cviauto/workflow.md`。
4
4
 
5
- ## Read These Files First
5
+ ## 先阅读这些文件
6
6
 
7
7
  1. `.cviauto/workflow.md`
8
- 2. Entry files for the current platform, such as skills/commands/prompts/workflows
9
- 3. The current task's `task.json` and `prd.md`
8
+ 2. 当前平台的入口文件,如 skills/commands/prompts/workflows
9
+ 3. 当前任务的 `task.json` `prd.md`
10
10
 
11
- ## Common Needs And Edit Points
11
+ ## 常见需求与编辑点
12
12
 
13
- | Need | Edit point |
13
+ | 需求 | 编辑点 |
14
14
  | --- | --- |
15
- | Change phase names or phase order | `Phase Index` and the corresponding Phase sections. |
16
- | Change whether to create a task when there is no task | `[workflow-state:no_task]` state block. |
17
- | Change the next step during planning | Phase 1 and `[workflow-state:planning]`. |
18
- | Change whether an agent is required during in_progress | Phase 2 and `[workflow-state:in_progress]`. |
19
- | Change wrap-up after completion | Phase 3 and `[workflow-state:completed]`. |
20
- | Change which skill a user intent triggers | `Skill Routing` table. |
15
+ | 修改阶段名称或阶段顺序 | `Phase Index` 及对应的 Phase 章节。 |
16
+ | 修改无任务时是否创建任务 | `[workflow-state:no_task]` 状态块。 |
17
+ | 修改规划期间的下一步 | Phase 1 `[workflow-state:planning]`。 |
18
+ | 修改 in_progress 期间是否需要代理 | Phase 2 `[workflow-state:in_progress]`。 |
19
+ | 修改完成后的收尾 | Phase 3 `[workflow-state:completed]`。 |
20
+ | 修改用户意图触发哪个 skill | `Skill Routing` 表格。 |
21
21
 
22
- ## Modification Steps
22
+ ## 修改步骤
23
23
 
24
- 1. Find the relevant section in `.cviauto/workflow.md`.
25
- 2. When changing rules, keep explicit trigger conditions and next actions.
26
- 3. If adding or renaming a skill/agent, synchronize the corresponding files in platform directories.
27
- 4. Workflow-state changes only need an edit to the `[workflow-state:STATUS]` block in `.cviauto/workflow.md`. The hook is parser-only — it reads whatever you put in the block. Keep the opening and closing tags' STATUS strings identical (`[workflow-state:foo]…[/workflow-state:foo]`); mismatched STATUS pairs are silently dropped.
28
- 5. Make the AI reread `.cviauto/workflow.md`; do not keep using rules from the old conversation.
24
+ 1. `.cviauto/workflow.md` 中找到相关章节。
25
+ 2. 修改规则时,保留明确的触发条件和下一步操作。
26
+ 3. 如果添加或重命名 skill/agent,同步更新平台目录中的对应文件。
27
+ 4. 工作流状态变更只需编辑 `.cviauto/workflow.md` 中的 `[workflow-state:STATUS]` 块。钩子是纯解析器——它会读取你在块中放入的任何内容。保持开始和结束标签的 STATUS 字符串一致(`[workflow-state:foo]…[/workflow-state:foo]`);不匹配的 STATUS 对会被静默丢弃。
28
+ 5. AI 重新读取 `.cviauto/workflow.md`;不要继续使用旧对话中的规则。
29
29
 
30
- ## Example: Relax Task Creation Requirements
30
+ ## 示例:放宽任务创建要求
31
31
 
32
- To change when task creation can be skipped, usually edit `[workflow-state:no_task]`:
32
+ 要修改可以跳过任务创建的情形,通常编辑 `[workflow-state:no_task]`:
33
33
 
34
34
  ```md
35
35
  [workflow-state:no_task]
36
- Task is not required when the answer is a one-reply explanation, no files are changed, and no research is needed.
36
+ 当答案是单次回复说明、不涉及文件变更且无需调研时,不需要创建任务。
37
37
  [/workflow-state:no_task]
38
38
  ```
39
39
 
40
- If the formal Phase 1 flow also needs to change, synchronize the Phase 1 section.
40
+ 如果正式的 Phase 1 流程也需要变更,同步修改 Phase 1 章节。
41
41
 
42
- ## Example: One Platform Does Not Use Sub-Agents
42
+ ## 示例:某个平台不使用子代理
43
43
 
44
- If the user wants only one platform to avoid sub-agents, first confirm whether that platform has a separate group in the workflow. Then change Phase 2 routing for that platform group instead of deleting all `cviauto-implement` / `cviauto-check` instructions across platforms.
44
+ 如果用户只想让某个平台避免使用子代理,首先确认该平台在工作流中是否有独立的分组。然后修改该平台分组的 Phase 2 路由,而不是跨平台删除所有 `cviauto-implement` / `cviauto-check` 指令。
45
45
 
46
- ## `/cviauto:continue` Route Table
46
+ ## `/cviauto:continue` 路由表
47
47
 
48
- `/cviauto:continue` resumes a task by deciding which phase step to load next. The decision combines `task.json.status` with the presence of artifacts inside the task directory. The mapping is fixed in the command itself; forks that add custom statuses must extend both the workflow.md tag block and this table.
48
+ `/cviauto:continue` 通过决定下一步加载哪个阶段步骤来恢复任务。决策结合了 `task.json.status` 与任务目录中工件(artifact)的存在情况。映射关系在命令本身中固定;添加自定义状态的 fork 必须同时扩展 workflow.md 标签块和此路由表。
49
49
 
50
- | `status` | Artifact state | Resume at |
50
+ | `status` | 工件状态 | 恢复到 |
51
51
  | --- | --- | --- |
52
- | `planning` | `prd.md` missing | Phase 1.1 (load `cviauto-brainstorm`) |
53
- | `planning` | lightweight task with `prd.md` complete | ask for start review, then run `task.py start` |
54
- | `planning` | complex task missing `design.md` or `implement.md` | complete missing planning artifacts |
55
- | `planning` | complex task has `prd.md`, `design.md`, and `implement.md` | ask for start review, then run `task.py start` |
56
- | `in_progress` | no implementation in conversation history | Phase 2.1 (`cviauto-implement`) |
57
- | `in_progress` | implementation done, no `cviauto-check` run | Phase 2.2 (`cviauto-check`) |
58
- | `in_progress` | check passed, no explicit spec-promotion request | Phase 3.4 (commit) |
59
- | `in_progress` | check passed, user explicitly asks to promote knowledge into spec | Phase 3.3 (spec update proposal) → 3.4 (commit) |
60
- | `completed` | task is still in active tree | Phase 3.5 (run `/cviauto:finish-work` to archive) |
52
+ | `planning` | `prd.md` 缺失 | Phase 1.1(加载 `cviauto-brainstorm`) |
53
+ | `planning` | 轻量任务且 `prd.md` 已完成 | 询问开始审查,然后运行 `task.py start` |
54
+ | `planning` | 复杂任务缺少 `design.md` `implement.md` | 补全缺失的规划工件 |
55
+ | `planning` | 复杂任务包含 `prd.md`、`design.md` `implement.md` | 询问开始审查,然后运行 `task.py start` |
56
+ | `in_progress` | 对话历史中无实现记录 | Phase 2.1(`cviauto-implement`) |
57
+ | `in_progress` | 实现已完成,未运行 `cviauto-check` | Phase 2.2(`cviauto-check`) |
58
+ | `in_progress` | 检查已通过,无显式的 spec 提升请求 | Phase 3.4commit |
59
+ | `in_progress` | 检查已通过,用户显式要求将知识提升到 spec | Phase 3.3spec 更新提案)→ 3.4commit |
60
+ | `completed` | 任务仍在活动树中 | Phase 3.5(运行 `/cviauto:finish-work` 进行归档) |
61
61
 
62
- When you add a custom status (e.g. `in-review`), add a `[workflow-state:in-review]` block in `.cviauto/workflow.md` for the per-turn breadcrumb AND extend this route table — usually by editing the `/cviauto:continue` command file (`.{platform}/commands/cviauto/continue.md` or equivalent) to add a row that decides where to resume from. Without the route entry, `/cviauto:continue` will fall through to a default branch and the user will not land on the step you intended.
62
+ 当你添加自定义状态(如 `in-review`)时,在 `.cviauto/workflow.md` 中为每轮面包屑导航添加 `[workflow-state:in-review]` 块,并扩展此路由表——通常通过编辑 `/cviauto:continue` 命令文件(`{platform}/commands/cviauto/continue.md` 或等效文件)来添加一行,决定从何处恢复。没有路由条目时,`/cviauto:continue` 会落入默认分支,用户将无法到达你预期的步骤。
63
63
 
64
- ## Notes
64
+ ## 注意事项
65
65
 
66
- `.cviauto/workflow.md` is the local project workflow, not an immutable template. The user can adapt it to team habits. After editing it, platform entry files may still contain old descriptions, so inspect them too.
66
+ `.cviauto/workflow.md` 是本地项目工作流,而非不可变的模板。用户可以根据团队习惯进行调整。编辑后,平台入口文件可能仍包含旧描述,因此也需要检查它们。