@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,55 +1,55 @@
1
- # Local Customization Overview
1
+ # 本地自定义概述
2
2
 
3
- This directory is for local AI working in a user project where Cviauto was installed through npm and `cviauto init` has already been run. The AI should modify generated `.cviauto/` and platform directories inside the project, not Cviauto CLI upstream source code.
3
+ 本目录适用于用户项目中通过 npm 安装了 Cviauto 且已运行 `cviauto init` 的本地 AI。AI 应修改项目中生成的 `.cviauto/` 和平台目录,而不是 Cviauto CLI 上游源代码。
4
4
 
5
- ## First Determine What The User Actually Wants To Change
5
+ ## 首先确定用户实际想要修改什么
6
6
 
7
- | User wording | Read first |
7
+ | 用户表述 | 先阅读 |
8
8
  | --- | --- |
9
- | "Change the Cviauto flow / phases / next prompt" | `change-workflow.md` |
10
- | "Change task creation, status, archive, or hooks" | `change-task-lifecycle.md` |
11
- | "AI did not read context / change injected content" | `change-context-loading.md` |
12
- | "A platform hook is not behaving as expected" | `change-hooks.md` |
13
- | "Change implement/check/research agent behavior" | `change-agents.md` |
14
- | "Add a skill/command/workflow/prompt" | `change-skills-or-commands.md` |
15
- | "Adjust the project spec structure" | `change-spec-structure.md` |
16
- | "Add team conventions and local notes" | `add-project-local-conventions.md` |
17
-
18
- ## General Operation Order
19
-
20
- 1. **Confirm platform and directories**: inspect which directories exist, such as `.claude/`, `.codex/`, `.cursor/`, `.zcode/`.
21
- 2. **Confirm the current active task**: run `python3 ./.cviauto/scripts/task.py current --source`.
22
- 3. **Read the local source of truth**: prefer `.cviauto/workflow.md`, `.cviauto/config.yaml`, and relevant platform files.
23
- 4. **Modify narrowly**: edit only files related to the user's request.
24
- 5. **Synchronize semantics**: if a shared flow changes, check whether platform entry points also need changes; if a platform entry changes, check whether `.cviauto/workflow.md` still agrees.
25
-
26
- ## Local File Priority
27
-
28
- | Layer | Files |
9
+ | "修改 Cviauto 流程 / 阶段 / 下一步提示" | `change-workflow.md` |
10
+ | "修改任务创建、状态、归档或钩子" | `change-task-lifecycle.md` |
11
+ | "AI 没有读取上下文 / 修改注入内容" | `change-context-loading.md` |
12
+ | "平台钩子行为不符合预期" | `change-hooks.md` |
13
+ | "修改 implement/check/research 代理行为" | `change-agents.md` |
14
+ | "添加 skill/command/workflow/prompt" | `change-skills-or-commands.md` |
15
+ | "调整项目 spec 结构" | `change-spec-structure.md` |
16
+ | "添加团队约定和本地备注" | `add-project-local-conventions.md` |
17
+
18
+ ## 通用操作顺序
19
+
20
+ 1. **确认平台和目录**:检查哪些目录存在,如 `.claude/`、`.codex/`、`.cursor/`、`.zcode/`。
21
+ 2. **确认当前活动任务**:运行 `python3 ./.cviauto/scripts/task.py current --source`。
22
+ 3. **阅读本地权威来源**:优先阅读 `.cviauto/workflow.md`、`.cviauto/config.yaml` 以及相关平台文件。
23
+ 4. **窄范围修改**:仅编辑与用户请求相关的文件。
24
+ 5. **同步语义**:如果共享流程变更,检查平台入口点是否也需要变更;如果平台入口变更,检查 `.cviauto/workflow.md` 是否仍然一致。
25
+
26
+ ## 本地文件优先级
27
+
28
+ | 层级 | 文件 |
29
29
  | --- | --- |
30
- | Workflow | `.cviauto/workflow.md` |
31
- | Project configuration | `.cviauto/config.yaml` |
32
- | Task material | `.cviauto/tasks/<task>/` |
33
- | Project specs | `.cviauto/spec/` |
34
- | Runtime scripts | `.cviauto/scripts/` |
35
- | Platform integration | `.claude/`, `.codex/`, `.cursor/`, `.opencode/`, `.zcode/`, and similar directories |
36
- | Shared skill | `.agents/skills/` |
30
+ | 工作流 | `.cviauto/workflow.md` |
31
+ | 项目配置 | `.cviauto/config.yaml` |
32
+ | 任务材料 | `.cviauto/tasks/<task>/` |
33
+ | 项目规范 | `.cviauto/spec/` |
34
+ | 运行时脚本 | `.cviauto/scripts/` |
35
+ | 平台集成 | `.claude/`、`.codex/`、`.cursor/`、`.opencode/`、`.zcode/` 及类似目录 |
36
+ | 共享技能 | `.agents/skills/` |
37
37
 
38
- ## Things Not To Do By Default
38
+ ## 默认不应做的事
39
39
 
40
- - Do not edit the global npm install directory.
41
- - Do not edit `node_modules/@baoanaz/cviauto`.
42
- - Do not assume the user has the Cviauto GitHub repository.
43
- - Do not overwrite local files already modified by the user with default templates.
44
- - Do not put team project rules into public `cviauto-meta`; project rules belong in `.cviauto/spec/` or a local skill.
40
+ - 不要编辑全局 npm 安装目录。
41
+ - 不要编辑 `node_modules/@mindfoldhq/cviauto`。
42
+ - 不要假设用户拥有 Cviauto GitHub 仓库。
43
+ - 不要用默认模板覆盖用户已修改的本地文件。
44
+ - 不要将团队项目规则放入公共 `cviauto-meta`;项目规则应放在 `.cviauto/spec/` 或本地 skill 中。
45
45
 
46
- ## When To Inspect Upstream Source
46
+ ## 何时检视上游源码
47
47
 
48
- Switch to an upstream source-code perspective only when the user explicitly expresses one of these goals:
48
+ 仅在用户明确表达以下目标之一时,才切换到上游源码视角:
49
49
 
50
- - "I want to open a PR to Cviauto"
51
- - "I want to change npm package publish contents"
52
- - "I want to fork Cviauto"
53
- - "I want to modify the generation logic for `cviauto init/update`"
50
+ - "我想向 Cviauto 提交 PR"
51
+ - "我想修改 npm 包发布内容"
52
+ - "我想 fork Cviauto"
53
+ - "我想修改 `cviauto init/update` 的生成逻辑"
54
54
 
55
- Otherwise, default to modifying local Cviauto files inside the user project.
55
+ 否则,默认修改用户项目内的本地 Cviauto 文件。
@@ -1,45 +1,45 @@
1
- # Bundled Skills
1
+ # 内置技能(Bundled Skills
2
2
 
3
- "Bundled skills" are multi-file built-in skills shipped inside the Cviauto CLI npm package. Unlike marketplace skills (which a user installs separately into their own `.claude/skills/` or other platform skill root), bundled skills are written automatically into every supported platform's skill root by `cviauto init` and kept in sync by `cviauto update`. They are part of Cviauto itself, not third-party content.
3
+ "内置技能(Bundled skills"是随 Cviauto CLI npm 包发布的多文件内置技能。与市场技能(marketplace skills,用户单独安装到自己的 `.claude/skills/` 或其他平台技能根目录)不同,内置技能由 `cviauto init` 自动写入每个受支持平台的技能根目录,并由 `cviauto update` 保持同步。它们是 Cviauto 本身的一部分,而非第三方内容。
4
4
 
5
- A bundled skill is a directory under `packages/cli/src/templates/common/bundled-skills/<skill>/` that already contains its own `SKILL.md` (with YAML frontmatter) plus optional `references/`, assets, or other supporting files. Cviauto copies the whole directory tree as-is into each platform's skill root, so references stay lazy-loadable instead of being flattened into one oversized `SKILL.md`.
5
+ 一个内置技能是 `packages/cli/src/templates/common/bundled-skills/<skill>/` 下的一个目录,该目录已包含自己的 `SKILL.md`(带 YAML frontmatter)以及可选的 `references/`、资源文件或其他支持文件。Cviauto 将整个目录树原样复制到每个平台的技能根目录,因此 references 保持懒加载(lazy-loadable),而不会被展平为一个巨大的 `SKILL.md`。
6
6
 
7
- ## What Counts As Bundled (vs. Adjacent Concepts)
7
+ ## 何为内置技能(vs. 邻近概念)
8
8
 
9
- | Source path | Type | How it ships |
9
+ | 源路径 | 类型 | 分发方式 |
10
10
  | --- | --- | --- |
11
- | `templates/common/bundled-skills/<name>/` | Bundled skill (multi-file) | Whole directory copied to every platform skill root |
12
- | `templates/common/skills/<name>.md` | Single-file workflow skill | Wrapped with frontmatter, written as `<root>/<name>/SKILL.md` |
13
- | `templates/common/commands/<name>.md` | Slash command / prompt | Written to each platform's command directory (`.claude/commands/cviauto/`, `.cursor/commands/cviauto-*.md`, `.gemini/commands/cviauto/*.toml`, etc.) |
14
- | `templates/<platform>/skills/` | Platform-specific skill | Written only into that platform's directory (e.g. `.codex/skills/`) |
15
- | User skills under `.claude/skills/<my-skill>/` etc. | Marketplace or user-authored | Not managed by Cviauto at all |
11
+ | `templates/common/bundled-skills/<name>/` | 内置技能(多文件) | 整个目录复制到每个平台的技能根目录 |
12
+ | `templates/common/skills/<name>.md` | 单文件工作流技能 | 包裹 frontmatter,写入为 `<root>/<name>/SKILL.md` |
13
+ | `templates/common/commands/<name>.md` | 斜杠命令 / 提示词 | 写入每个平台的命令目录(`.claude/commands/cviauto/`、`.cursor/commands/cviauto-*.md`、`.gemini/commands/cviauto/*.toml` 等) |
14
+ | `templates/<platform>/skills/` | 平台特定技能 | 仅写入该平台的目录(例如 `.codex/skills/`) |
15
+ | 用户技能,如 `.claude/skills/<my-skill>/` | 市场或用户自创 | Cviauto 完全不管理 |
16
16
 
17
- The Cviauto CLI never touches anything that is not produced by one of its own template loaders. Anything a user drops into a platform skill root by hand is left alone.
17
+ Cviauto CLI 绝不会触碰任何不由其自身模板加载器生成的文件。用户在平台技能根目录下手动放入的任何内容都会被保留。
18
18
 
19
- ## Current Bundled Skills (v0.6.0)
19
+ ## 当前内置技能(v0.6.0
20
20
 
21
- The set is discovered at runtime by listing directories under `templates/common/bundled-skills/`:
21
+ 技能集合在运行时通过列举 `templates/common/bundled-skills/` 下的目录来发现:
22
22
 
23
- | Skill | Purpose |
23
+ | 技能 | 用途 |
24
24
  | --- | --- |
25
- | `cviauto-meta` | This skill. Explains the local Cviauto architecture and customization entry points to an AI working inside a user project. |
26
- | `cviauto-session-insight` | Wraps the `cviauto mem` CLI so an AI knows when and how to reach into past Claude Code / Codex / Pi Agent conversation logs. |
27
- | `cviauto-spec-bootstrap` | Platform-neutral workflow for creating or refreshing `.cviauto/spec/` from the real codebase (with optional GitNexus / ABCoder integration). |
28
- | `cviauto-channel` | Capability skill teaching an AI when to reach for `cviauto channel` for multi-agent collaboration, forum/thread persistent boards, and dispatcher-wait patterns. |
25
+ | `cviauto-meta` | 本技能。向在用户项目中工作的 AI 解释本地 Cviauto 架构和自定义入口点。 |
26
+ | `cviauto-session-insight` | 封装 `cviauto mem` CLI,让 AI 知道何时以及如何查阅过往的 Claude Code / Codex / Pi Agent 对话日志。 |
27
+ | `cviauto-spec-bootstrap` | 用于从真实代码库创建或刷新 `.cviauto/spec/` 的平台中立工作流(可选集成 GitNexus / ABCoder)。 |
28
+ | `cviauto-channel` | 能力技能,教导 AI 何时使用 `cviauto channel` 进行多代理协作、论坛/帖子持久化看板和调度器-等待模式。 |
29
29
 
30
- The list is discovered at runtime, so adding a new directory under `bundled-skills/` is the only step required to register a new skill (see "Adding a New Bundled Skill" below).
30
+ 列表在运行时发现,因此只需在 `bundled-skills/` 下添加新目录即可注册新技能(参见下文「添加新的内置技能」)。
31
31
 
32
- ## Where Bundled Skills Land Per Platform
32
+ ## 内置技能在各平台的落位
33
33
 
34
- Each platform configurator calls `writeSkills(<root>, <workflowSkills>, resolveBundledSkills(ctx))` during `cviauto init`. `resolveBundledSkills` reads every directory under `templates/common/bundled-skills/`, resolves placeholders, and returns a flat list of `{relativePath, content}` entries. `writeSkills` then mirrors them under the platform's skill root.
34
+ 每个平台配置器在 `cviauto init` 期间调用 `writeSkills(<root>, <workflowSkills>, resolveBundledSkills(ctx))`。`resolveBundledSkills` 读取 `templates/common/bundled-skills/` 下的每个目录,解析占位符,并返回一个扁平的 `{relativePath, content}` 条目列表。`writeSkills` 然后将其映射到平台的技能根目录下。
35
35
 
36
- | Platform | Bundled skill root | Notes |
36
+ | 平台 | 内置技能根目录 | 备注 |
37
37
  | --- | --- | --- |
38
38
  | Claude Code | `.claude/skills/<skill>/` | `configureClaude` |
39
39
  | Cursor | `.cursor/skills/<skill>/` | `configureCursor` |
40
- | Codex | `.agents/skills/<skill>/` | `configureCodex` writes the shared `.agents/skills/` root, which Gemini CLI 0.40+ also reads |
41
- | Gemini CLI | `.agents/skills/<skill>/` | Same shared root as Codex; the two configurators are required to produce byte-identical output |
42
- | Kiro | `.kiro/skills/<skill>/` | `configureKiro` (skills-based platform — no commands) |
40
+ | Codex | `.agents/skills/<skill>/` | `configureCodex` 写入共享的 `.agents/skills/` 根目录,Gemini CLI 0.40+ 也会读取 |
41
+ | Gemini CLI | `.agents/skills/<skill>/` | Codex 共享同一根目录;两个配置器必须产生字节级相同的输出 |
42
+ | Kiro | `.kiro/skills/<skill>/` | `configureKiro`(基于技能的平台——无命令) |
43
43
  | Qoder | `.qoder/skills/<skill>/` | `configureQoder` |
44
44
  | Codebuddy | `.codebuddy/skills/<skill>/` | `configureCodebuddy` |
45
45
  | Copilot | `.github/skills/<skill>/` | `configureCopilot` |
@@ -47,100 +47,100 @@ Each platform configurator calls `writeSkills(<root>, <workflowSkills>, resolveB
47
47
  | Antigravity | `.agent/skills/<skill>/` | `configureAntigravity` |
48
48
  | Devin | `.devin/skills/<skill>/` | `configureDevin` |
49
49
  | Kilo | `.kilocode/skills/<skill>/` | `configureKilo` |
50
- | OpenCode | (handled by `collectOpenCodeTemplates`) | Uses the same `resolveBundledSkills(ctx)` output |
51
- | Pi, Reasonix | (their own collectors) | Same `resolveBundledSkills(ctx)` output |
50
+ | OpenCode | (由 `collectOpenCodeTemplates` 处理) | 使用相同的 `resolveBundledSkills(ctx)` 输出 |
51
+ | PiReasonix | (各自的收集器) | 相同的 `resolveBundledSkills(ctx)` 输出 |
52
52
 
53
- Two paths exercise the same data:
53
+ 两条路径使用相同的数据:
54
54
 
55
- 1. `configureX(cwd)` writes files during `cviauto init`.
56
- 2. `collectPlatformTemplates(platformId)` (in `configurators/index.ts`) returns a `Map<filePath, content>` that `cviauto update` uses to detect drift and to populate `.cviauto/.template-hashes.json`. Both must produce byte-identical output, so they both call `resolveBundledSkills(ctx)` and `collectSkillTemplates(root, …, resolveBundledSkills(ctx))`.
55
+ 1. `configureX(cwd)` `cviauto init` 期间写入文件。
56
+ 2. `collectPlatformTemplates(platformId)`(在 `configurators/index.ts` 中)返回一个 `Map<filePath, content>`,`cviauto update` 用它来检测漂移并填充 `.cviauto/.template-hashes.json`。两者必须产生字节级相同的输出,因此它们都调用 `resolveBundledSkills(ctx)` `collectSkillTemplates(root, …, resolveBundledSkills(ctx))`。
57
57
 
58
- ## Dispatch Wiring (Code Path)
58
+ ## 分发接线(Dispatch Wiring,代码路径)
59
59
 
60
- The mechanism that auto-dispatches bundled skills to platform skill roots lives in two files:
60
+ 将内置技能自动分发到平台技能根目录的机制位于两个文件中:
61
61
 
62
62
  1. `packages/cli/src/templates/common/index.ts`
63
- - `listDirectories("bundled-skills")` enumerates the on-disk skills.
64
- - `listBundledSkillFiles(skillDir)` walks each skill's directory recursively and returns `{relativePath, content}` for every file.
65
- - `getBundledSkillTemplates()` returns the cached `CommonBundledSkill[]`.
63
+ - `listDirectories("bundled-skills")` 枚举磁盘上的技能。
64
+ - `listBundledSkillFiles(skillDir)` 递归遍历每个技能目录,为每个文件返回 `{relativePath, content}`。
65
+ - `getBundledSkillTemplates()` 返回缓存的 `CommonBundledSkill[]`。
66
66
 
67
67
  2. `packages/cli/src/configurators/shared.ts`
68
- - `resolveBundledSkills(ctx)` flattens that list into `ResolvedSkillFile[]` with `<skill>/<relativePath>` paths and resolved placeholders.
69
- - `writeSkills(skillsRoot, workflowSkills, bundledSkills)` writes both workflow skills and bundled skill files under `skillsRoot`.
70
- - `collectSkillTemplates(skillsRoot, workflowSkills, bundledSkills)` returns the same shape as a `Map<filePath, content>` for the update / hash pipeline.
68
+ - `resolveBundledSkills(ctx)` 将该列表展平为 `ResolvedSkillFile[]`,包含 `<skill>/<relativePath>` 路径和已解析的占位符。
69
+ - `writeSkills(skillsRoot, workflowSkills, bundledSkills)` 将工作流技能和内置技能文件写入 `skillsRoot` 下。
70
+ - `collectSkillTemplates(skillsRoot, workflowSkills, bundledSkills)` `Map<filePath, content>` 的相同形式返回,供 update / hash 管线使用。
71
71
 
72
- Every platform configurator that supports skills imports both helpers (see `claude.ts`, `cursor.ts`, `codex.ts`, `gemini.ts`, `kiro.ts`, `qoder.ts`, `codebuddy.ts`, `copilot.ts`, `droid.ts`, `antigravity.ts`, `devin.ts`, `kilo.ts`). The `index.ts` `PLATFORM_FUNCTIONS` registry also calls `resolveBundledSkills(ctx)` inside each `collectTemplates` closure so `cviauto update` tracking stays consistent.
72
+ 每个支持技能的平台配置器都导入这两个辅助函数(参见 `claude.ts`、`cursor.ts`、`codex.ts`、`gemini.ts`、`kiro.ts`、`qoder.ts`、`codebuddy.ts`、`copilot.ts`、`droid.ts`、`antigravity.ts`、`devin.ts`、`kilo.ts`)。`index.ts` 中的 `PLATFORM_FUNCTIONS` 注册表也在每个 `collectTemplates` 闭包内调用 `resolveBundledSkills(ctx)`,以确保 `cviauto update` 跟踪保持一致。
73
73
 
74
- ## Adding a New Bundled Skill
74
+ ## 添加新的内置技能
75
75
 
76
- The shape and dispatch wiring are already generic, so adding a skill requires only file changes plus distribution verification.
76
+ 分发结构和接线已经是通用的,因此添加技能只需要文件变更和分发验证。
77
77
 
78
- 1. **Create the directory tree.**
78
+ 1. **创建目录树。**
79
79
 
80
80
  ```
81
81
  packages/cli/src/templates/common/bundled-skills/<my-skill>/
82
- SKILL.md # YAML frontmatter + body
83
- references/ # optional
82
+ SKILL.md # YAML frontmatter + 正文
83
+ references/ # 可选
84
84
  <topic>.md
85
- assets/ # optional (anything readable as utf-8)
85
+ assets/ # 可选(任何可读作 utf-8 的内容)
86
86
  ```
87
87
 
88
- 2. **Write a valid `SKILL.md` header.** The frontmatter must include at minimum:
88
+ 2. **编写合法的 `SKILL.md` 头部。** frontmatter 至少需要包含:
89
89
 
90
90
  ```yaml
91
91
  ---
92
92
  name: <my-skill>
93
- description: "When the AI should reach for this skill. Triggering phrases go here."
93
+ description: "AI 何时应使用此技能。触发短语放在此处。"
94
94
  ---
95
95
  ```
96
96
 
97
- The `description` is what each platform's auto-trigger mechanism matches against, so it should describe the user-intent triggers, not the skill's internals.
97
+ `description` 是每个平台的自动触发机制匹配的依据,因此应描述用户意图的触发条件,而非技能的内部实现。
98
98
 
99
- 3. **Use placeholders where appropriate.** Bundled skill content runs through `resolvePlaceholders(file.content, ctx)`. Any `{{platform_name}}`, `{{python_cmd}}`, etc. token supported by `resolvePlaceholders` will be substituted per platform.
99
+ 3. **在适当位置使用占位符。** 内置技能内容经过 `resolvePlaceholders(file.content, ctx)` 处理。任何 `{{platform_name}}`、`{{python_cmd}}` 等由 `resolvePlaceholders` 支持的 token 都会按平台被替换。
100
100
 
101
- 4. **No dispatch wiring is required.** `listDirectories("bundled-skills")` discovers the new directory automatically, so all platforms receive it on the next `cviauto init` or `cviauto update`.
101
+ 4. **无需分发接线。** `listDirectories("bundled-skills")` 自动发现新目录,因此在下次 `cviauto init` `cviauto update` 时所有平台都会收到。
102
102
 
103
- 5. **Verify the distribution path** before shipping. Skipping any of these steps has historically caused features to be documented as bundled while the published npm tarball was missing the files:
103
+ 5. **在发布前验证分发路径。** 跳过以下任一步骤都曾导致功能被文档记录为内置,但发布的 npm tarball 中缺少文件:
104
104
 
105
- - Source files exist on the branch being tagged.
106
- - `pnpm --filter @baoanaz/cviauto build` copies the asset into `dist/templates/common/bundled-skills/<skill>/`.
107
- - `npm pack --dry-run --json` includes the expected `dist/**` paths.
108
- - In a fresh temp project, `cviauto init` writes `.claude/skills/<skill>/SKILL.md`, `.agents/skills/<skill>/SKILL.md`, etc.
109
- - `.cviauto/.template-hashes.json` lists the generated files.
110
- - `cviauto update --dry-run` in that temp project reports "Already up to date!".
105
+ - 源文件存在于要打标签的分支上。
106
+ - `pnpm --filter @mindfoldhq/cviauto build` 将资源复制到 `dist/templates/common/bundled-skills/<skill>/`。
107
+ - `npm pack --dry-run --json` 包含预期的 `dist/**` 路径。
108
+ - 在全新的临时项目中,`cviauto init` 写入 `.claude/skills/<skill>/SKILL.md`、`.agents/skills/<skill>/SKILL.md` 等。
109
+ - `.cviauto/.template-hashes.json` 列出了生成的文件。
110
+ - 在该临时项目中运行 `cviauto update --dry-run` 报告 "Already up to date!"
111
111
 
112
- 6. **Add a migration manifest entry** if the skill is added in a release that other projects will upgrade into. Without an explicit manifest entry the file will land via the standard "missing file" branch of `cviauto update`, but a manifest makes the change visible in the changelog.
112
+ 6. **添加迁移清单条目**,如果该技能是在其他项目将升级到的新版本中添加的。没有显式清单条目时,文件会通过 `cviauto update` 的「缺失文件」标准分支落地,但清单能让变更在 changelog 中可见。
113
113
 
114
- ## Overriding a Bundled Skill Locally
114
+ ## 本地覆盖内置技能
115
115
 
116
- There is no formal "project-local skill" mechanism (e.g. `.cviauto/skills/`). Bundled skills are platform-rooted, so any override is platform-rooted too.
116
+ 不存在正式的「项目本地技能」机制(例如 `.cviauto/skills/`)。内置技能以平台根目录为锚点,因此任何覆盖也以平台根目录为锚点。
117
117
 
118
- The supported pattern relies on the existing template-hash diff in `cviauto update`:
118
+ 受支持的覆盖模式依赖于 `cviauto update` 中现有的模板哈希差异(template-hash diff):
119
119
 
120
- 1. Edit the local file directly. Example: `.claude/skills/cviauto-meta/SKILL.md`.
121
- 2. The file's hash now diverges from the entry in `.cviauto/.template-hashes.json`.
122
- 3. The next `cviauto update` detects the user modification and leaves the file untouched (Cviauto never overwrites user-modified files without an explicit `--force`).
120
+ 1. 直接编辑本地文件。例如:`.claude/skills/cviauto-meta/SKILL.md`。
121
+ 2. 该文件的哈希现在与 `.cviauto/.template-hashes.json` 中的条目不一致。
122
+ 3. 下次 `cviauto update` 会检测到用户修改,并保持该文件不变(Cviauto 绝不会在未经显式 `--force` 的情况下覆盖用户修改的文件)。
123
123
 
124
- Caveats:
124
+ 注意事项:
125
125
 
126
- - The override only applies to the one platform whose directory you edited. To override the same skill across, for example, Claude Code and Codex, you must edit both `.claude/skills/<name>/` and `.agents/skills/<name>/`.
127
- - A future `cviauto update --force` will overwrite local edits. Keep the override under version control so it can be reapplied if needed.
128
- - Marketplace skills installed under the same platform skill root with a different folder name (e.g. `.claude/skills/my-custom-meta/`) are untouched by Cviauto and are the cleaner option when the goal is to add behavior, not to mutate the bundled skill.
129
- - Team-private conventions belong in `.cviauto/spec/` or in a separate marketplace-style local skill, not in modifications to `cviauto-meta` itself. See `customize-local/add-project-local-conventions.md`.
126
+ - 覆盖仅对您编辑的那个平台生效。要跨平台覆盖同一技能(例如同时覆盖 Claude Code Codex),您必须编辑 `.claude/skills/<name>/` `.agents/skills/<name>/` 两者。
127
+ - 未来的 `cviauto update --force` 会覆盖本地编辑。请将覆盖内容纳入版本控制,以便需要时重新应用。
128
+ - 在同一平台技能根目录下以不同文件夹名称安装的市场技能(例如 `.claude/skills/my-custom-meta/`)不会被 Cviauto 触及,当目标是添加行为而非修改内置技能时,这是更干净的选择。
129
+ - 团队私有约定应放在 `.cviauto/spec/` 或独立的市场风格本地技能中,而非修改 `cviauto-meta` 本身。请参阅 `customize-local/add-project-local-conventions.md`。
130
130
 
131
- ## Removing a Bundled Skill From a Project
131
+ ## 从项目中移除内置技能
132
132
 
133
- There is no per-project opt-out flag for bundled skills. Two options:
133
+ 没有按项目排除内置技能的标志。有两个选项:
134
134
 
135
- 1. **Delete the directory in each platform skill root.** `cviauto update` will see the file missing, compare against `.template-hashes.json`, and treat the deletion the same as any other user modification — it will not silently re-create the directory unless `--force` is passed.
135
+ 1. **删除每个平台技能根目录中的目录。** `cviauto update` 会发现文件缺失,与 `.template-hashes.json` 对比,并将删除操作视为与其他用户修改相同——除非传入 `--force`,否则不会静默重新创建目录。
136
136
 
137
- 2. **Pin a Cviauto version that did not ship the skill.** The bundled-skill set is determined at build time, so installing an older release of the CLI is the only way to permanently exclude a skill that the current release ships.
137
+ 2. **固定一个不包含该技能的 Cviauto 版本。** 内置技能集合在构建时确定,因此安装旧版 CLI 是永久排除当前版本所包含技能的唯一方式。
138
138
 
139
- A third option — globally disabling all bundled skills — is not supported. The dispatch is unconditional in every configurator. Adding such a flag would require changing `PLATFORM_FUNCTIONS` in `configurators/index.ts` and every `configureX` function.
139
+ 第三种选项——全局禁用所有内置技能——不受支持。分发在每个配置器中是无条件的。添加这样的标志需要修改 `configurators/index.ts` 中的 `PLATFORM_FUNCTIONS` 和每个 `configureX` 函数。
140
140
 
141
- ## Operating Rules
141
+ ## 操作规则(Operating Rules
142
142
 
143
- - Treat `templates/common/bundled-skills/` as the single source of truth for what bundled skills exist. Do not hand-maintain platform-by-platform skill lists.
144
- - Do not add platform-specific logic inside a bundled `SKILL.md`. If a behavior is platform-specific, put it in `templates/<platform>/skills/` instead.
145
- - Do not couple bundled skills to a specific CLI binary (e.g. `cviauto mem`) without surfacing the dependency in the skill's description and references — users on older releases may not have the command.
146
- - Do not store project-private content in a bundled skill. Bundled skills are public, shipped to every user; project rules belong in `.cviauto/spec/` or a local skill.
143
+ - `templates/common/bundled-skills/` 视为内置技能存在的唯一事实来源。不要手动维护按平台划分的技能列表。
144
+ - 不要在内置的 `SKILL.md` 中添加平台特定逻辑。如果某个行为是平台特定的,请将其放入 `templates/<platform>/skills/` 中。
145
+ - 不要将内置技能与特定 CLI 二进制文件(例如 `cviauto mem`)耦合,除非在技能的描述和 references 中明确说明该依赖——使用旧版本的用户可能没有该命令。
146
+ - 不要在内置技能中存储项目私有内容。内置技能是公开的,会分发给所有用户;项目规则应放在 `.cviauto/spec/` 或本地技能中。
@@ -1,68 +1,68 @@
1
- # Local Context Injection System
1
+ # 本地上下文注入系统(Local Context Injection System
2
2
 
3
- Cviauto context injection aims to make AI read the right files at the right time instead of relying on model memory. In a user project, injection is implemented by `.cviauto/` scripts together with platform hooks, agents, and skills.
3
+ Cviauto 上下文注入旨在让 AI 在恰当的时机读取恰当的文件,而非依赖模型记忆。在用户项目中,注入由 `.cviauto/` 脚本配合平台 hooksagents skills 共同实现。
4
4
 
5
- ## Injected Context Types
5
+ ## 注入的上下文类型(Injected Context Types
6
6
 
7
- | Type | Source | Purpose |
7
+ | 类型 | 来源 | 用途 |
8
8
  | --- | --- | --- |
9
- | session context | `.cviauto/scripts/get_context.py` | Current developer, git status, active task, active tasks, journal, packages. |
10
- | workflow context | `.cviauto/workflow.md` | Current Cviauto flow and next action. |
11
- | spec context | `.cviauto/spec/` + task JSONL | Specs that must be followed during implementation/checking. |
12
- | task context | `.cviauto/tasks/<task>/prd.md`, `design.md`, `implement.md`, `research/` | Current task requirements, design, execution plan, and research. |
13
- | platform context | Platform hooks/settings/agents | Lets different AI tools read the files above through their own mechanisms. |
9
+ | 会话上下文(session context | `.cviauto/scripts/get_context.py` | 当前开发者、git 状态、活跃任务、活跃任务列表、日志、依赖包。 |
10
+ | 工作流上下文(workflow context | `.cviauto/workflow.md` | 当前 Cviauto 流程和下一步动作。 |
11
+ | 规范上下文(spec context | `.cviauto/spec/` + task JSONL | 在实现/检查过程中必须遵循的规范。 |
12
+ | 任务上下文(task context | `.cviauto/tasks/<task>/prd.md`、`design.md`、`implement.md`、`research/` | 当前任务的需求、设计、执行计划和研究。 |
13
+ | 平台上下文(platform context | 平台 hooks/设置/agents | 让不同 AI 工具通过各自的机制读取上述文件。 |
14
14
 
15
15
  ## session-start
16
16
 
17
- Platforms with session-start support inject a Cviauto overview when a session starts, clears, compacts, or receives a similar event. Injected content usually includes:
17
+ 支持 session-start 的平台会在会话启动、清空、压缩或收到类似事件时注入 Cviauto 概览。注入的内容通常包括:
18
18
 
19
- - workflow summary.
20
- - current task status.
21
- - active tasks.
22
- - spec index paths.
23
- - developer identity and git status.
19
+ - 工作流摘要。
20
+ - 当前任务状态。
21
+ - 活跃任务。
22
+ - spec 索引路径。
23
+ - 开发者身份和 git 状态。
24
24
 
25
- If the user feels the AI does not know the current task in a new session, first check whether the platform's session-start hook or equivalent mechanism is installed and running.
25
+ 如果用户发现在新会话中 AI 不知道当前任务,请首先检查平台的 session-start hook 或等效机制是否已安装并正在运行。
26
26
 
27
27
  ## workflow-state
28
28
 
29
- workflow-state is a lightweight hint injected around each user turn. Based on current task status, it selects a block from `.cviauto/workflow.md`, such as `no_task`, `planning`, `in_progress`, or `completed`.
29
+ workflow-state 是一个轻量级提示,在每次用户对话轮次前后注入。它根据当前任务状态,从 `.cviauto/workflow.md` 中选择一个状态块,例如 `no_task`、`planning`、`in_progress` `completed`。
30
30
 
31
- If the user wants to change "what the AI should do next in a given state," edit the corresponding state block in `.cviauto/workflow.md` first.
31
+ 如果用户想更改「AI 在给定状态下接下来应该做什么」,请首先编辑 `.cviauto/workflow.md` 中对应的状态块。
32
32
 
33
- ## sub-agent context
33
+ ## 子代理上下文(sub-agent context
34
34
 
35
- Implement and check agents need task context. Cviauto has two loading modes:
35
+ Implement Check 代理需要任务上下文。Cviauto 有两种加载模式:
36
36
 
37
- 1. **hook push**: a platform hook injects jsonl-referenced files plus `prd.md`, `design.md` if present, and `implement.md` if present before the agent starts.
38
- 2. **agent pull**: the agent definition instructs the agent to read the active task, jsonl context, and task artifacts after startup.
37
+ 1. **hook push**:平台 hook 在代理启动前注入 jsonl 引用的文件,以及 `prd.md`、`design.md`(如果存在)和 `implement.md`(如果存在)。
38
+ 2. **agent pull**:代理定义指示代理在启动后自行读取活跃任务、jsonl 上下文和任务产物。
39
39
 
40
- In both modes, JSONL files in the task directory are the manifest for spec/research context. Task artifacts are read separately in this order: `prd.md` -> `design.md if present` -> `implement.md if present`.
40
+ 在这两种模式下,任务目录中的 JSONL 文件是 spec/research 上下文的清单。任务产物按以下顺序单独读取:`prd.md` -> `design.md(如果存在)` -> `implement.md(如果存在)`。
41
41
 
42
- ## JSONL Reading Rules
42
+ ## JSONL 读取规则(JSONL Reading Rules
43
43
 
44
- `implement.jsonl` and `check.jsonl` contain one JSON object per line:
44
+ `implement.jsonl` `check.jsonl` 每行包含一个 JSON 对象:
45
45
 
46
46
  ```jsonl
47
47
  {"file": ".cviauto/spec/backend/index.md", "reason": "Backend rules"}
48
48
  ```
49
49
 
50
- Readers should skip seed rows without a `file` field. When configuring JSONL, the AI should include only spec/research files, not pre-register code files that will be modified.
50
+ 读取器应跳过没有 `file` 字段的种子行。在配置 JSONL 时,AI 应仅包含 spec/research 文件,不要预先注册将被修改的代码文件。
51
51
 
52
- ## Active Task And Context Key
52
+ ## 活跃任务与上下文键(Active Task And Context Key
53
53
 
54
- Active task state lives in `.cviauto/.runtime/sessions/` and is isolated per session. Hooks try to resolve the context key from platform events, environment variables, transcript paths, or `TRELLIS_CONTEXT_ID`.
54
+ 活跃任务状态存储在 `.cviauto/.runtime/sessions/` 中,按会话隔离。Hooks 尝试从平台事件、环境变量、对话记录路径或 `TRELLIS_CONTEXT_ID` 解析上下文键。
55
55
 
56
- If shell commands cannot see the same context key, `task.py current --source` may report no active task. In that case, check whether the platform passes session identity into the shell instead of hand-writing a global current-task file.
56
+ 如果 shell 命令无法看到相同的上下文键,`task.py current --source` 可能会报告没有活跃任务。此时应检查平台是否将会话身份传递到 shell 中,而非手动编写全局 current-task 文件。
57
57
 
58
- ## Local Customization Points
58
+ ## 本地自定义点(Local Customization Points
59
59
 
60
- | Need | Edit location |
60
+ | 需求 | 编辑位置 |
61
61
  | --- | --- |
62
- | Change session-start injected content | The platform's `session-start` hook or plugin file. |
63
- | Change per-turn workflow-state rules | `[workflow-state:STATUS]` block in `.cviauto/workflow.md`. The platform workflow-state hook parses these blocks verbatim and embeds no fallback text. |
64
- | Change how sub-agents read context | Platform agent definitions, the `inject-subagent-context` hook, or agent preludes. |
65
- | Change JSONL validation/display | `.cviauto/scripts/common/task_context.py`. |
66
- | Change active task resolution | `.cviauto/scripts/common/active_task.py`. |
62
+ | 更改 session-start 注入的内容 | 平台的 `session-start` hook 或插件文件。 |
63
+ | 更改每轮 workflow-state 规则 | `.cviauto/workflow.md` 中的 `[workflow-state:STATUS]` 块。平台的 workflow-state hook 逐字解析这些块,不嵌入任何回退文本。 |
64
+ | 更改子代理读取上下文的方式 | 平台代理定义、`inject-subagent-context` hook 或代理前置指令。 |
65
+ | 更改 JSONL 验证/显示 | `.cviauto/scripts/common/task_context.py`。 |
66
+ | 更改活跃任务解析 | `.cviauto/scripts/common/active_task.py`。 |
67
67
 
68
- When modifying context injection, verify two things: new sessions can see the correct task, and sub-agents can see the correct task artifacts/spec/research.
68
+ 修改上下文注入时,请验证两件事:新会话能看到正确的任务,以及子代理能看到正确的任务产物/spec/research
@@ -1,8 +1,8 @@
1
- # Local Files Generated After Init
1
+ # 初始化后生成的本地文件
2
2
 
3
- `cviauto init` writes the Cviauto runtime into the user project. Later, `cviauto update` tries to update Cviauto-managed template files, but it uses `.cviauto/.template-hashes.json` to determine which files have already been modified by the user.
3
+ `cviauto init` Cviauto 运行时写入用户项目。之后,`cviauto update` 尝试更新 Cviauto 管理的模板文件,但会使用 `.cviauto/.template-hashes.json` 来判断哪些文件已被用户修改。
4
4
 
5
- This page only describes files that are visible and editable inside the user project.
5
+ 此页面仅描述用户项目中可见且可编辑的文件。
6
6
 
7
7
  ## `.cviauto/`
8
8
 
@@ -20,61 +20,61 @@ This page only describes files that are visible and editable inside the user pro
20
20
  └── workspace/
21
21
  ```
22
22
 
23
- | Path | Usually editable? | Notes |
23
+ | 路径 | 通常可编辑? | 备注 |
24
24
  | --- | --- | --- |
25
- | `.cviauto/workflow.md` | Yes | Local workflow documentation and AI routing rules. |
26
- | `.cviauto/config.yaml` | Yes | Project configuration, hooks, packages, journal line limits, and related settings. |
27
- | `.cviauto/spec/` | Yes | Project specs, intended to be updated regularly by users and AI. |
28
- | `.cviauto/tasks/` | Yes | Task material and research artifacts, maintained by the task workflow. Local-only by default via `.cviauto/.gitignore`; publish only when the project explicitly wants Cviauto bookkeeping in git. |
29
- | `.cviauto/workspace/` | Yes | Session records, usually written by `add_session.py`. Local-only by default via `.cviauto/.gitignore`; publish only when the project explicitly wants Cviauto bookkeeping in git. |
30
- | `.cviauto/scripts/` | Carefully | Local runtime. It can be customized, but only after understanding the call chain. |
31
- | `.cviauto/.runtime/` | No | Runtime state, usually written automatically by hooks/scripts. |
32
- | `.cviauto/.developer` | Carefully | Current developer identity. |
33
- | `.cviauto/.version` | No | Cviauto version record used by update/migration logic. |
34
- | `.cviauto/.template-hashes.json` | No | Template hash record. Do not hand-write business rules here. |
35
-
36
- ## Platform Directories
37
-
38
- Different platforms generate different directories. Common categories:
39
-
40
- | Category | Example paths | Purpose |
25
+ | `.cviauto/workflow.md` | | 本地工作流文档和 AI 路由规则。 |
26
+ | `.cviauto/config.yaml` | | 项目配置、hookspackages、日志行数限制及相关设置。 |
27
+ | `.cviauto/spec/` | | 项目 spec,预期由用户和 AI 定期更新。 |
28
+ | `.cviauto/tasks/` | | 任务材料和研究产出物,由任务工作流维护。默认通过 `.cviauto/.gitignore` 仅在本地;仅当项目明确希望将 Cviauto 记录纳入 git 时才发布。 |
29
+ | `.cviauto/workspace/` | | 会话记录,通常由 `add_session.py` 写入。默认通过 `.cviauto/.gitignore` 仅在本地;仅当项目明确希望将 Cviauto 记录纳入 git 时才发布。 |
30
+ | `.cviauto/scripts/` | 谨慎 | 本地运行时。可以自定义,但需在理解调用链之后。 |
31
+ | `.cviauto/.runtime/` | | 运行时状态,通常由 hooks/scripts 自动写入。 |
32
+ | `.cviauto/.developer` | 谨慎 | 当前开发者身份。 |
33
+ | `.cviauto/.version` | | 由更新/迁移逻辑使用的 Cviauto 版本记录。 |
34
+ | `.cviauto/.template-hashes.json` | | 模板哈希记录。不要在此手写业务规则。 |
35
+
36
+ ## 平台目录
37
+
38
+ 不同平台生成不同的目录。常见类别:
39
+
40
+ | 类别 | 示例路径 | 用途 |
41
41
  | --- | --- | --- |
42
- | hooks | `.claude/hooks/`, `.codex/hooks/`, `.cursor/hooks/` | Inject session context, workflow-state, and sub-agent context. |
43
- | settings | `.claude/settings.json`, `.codex/hooks.json`, `.qoder/settings.json`, `.trae/hooks.json` | Tell the platform when to run hooks or plugins. |
44
- | agents | `.claude/agents/`, `.codex/agents/`, `.kiro/agents/`, `.zcode/cli/agents/` | Define agents such as `cviauto-research`, `cviauto-implement`, and `cviauto-check`. |
45
- | skills | `.claude/skills/`, `.agents/skills/`, `.qoder/skills/` | Skills that auto-trigger or can be read by AI. |
46
- | commands/prompts/workflows | `.cursor/commands/`, `.github/prompts/`, `.devin/workflows/`, `.zcode/commands/` | Explicit user-invoked command or workflow entry points. |
42
+ | hooks | `.claude/hooks/`、`.codex/hooks/`、`.cursor/hooks/` | 注入会话上下文、工作流状态和 sub-agent 上下文。 |
43
+ | settings | `.claude/settings.json`、`.codex/hooks.json`、`.qoder/settings.json` | 告诉平台何时运行 hooks 或插件。 |
44
+ | agents | `.claude/agents/`、`.codex/agents/`、`.kiro/agents/`、`.zcode/cli/agents/` | 定义如 `cviauto-research`、`cviauto-implement` `cviauto-check` 等 Agent。 |
45
+ | skills | `.claude/skills/`、`.agents/skills/`、`.qoder/skills/` | 自动触发或可被 AI 读取的技能。 |
46
+ | commands/prompts/workflows | `.cursor/commands/`、`.github/prompts/`、`.devin/workflows/`、`.zcode/commands/` | 用户显式调用的命令或工作流入口点。 |
47
47
 
48
- When modifying a platform directory, also confirm whether `.cviauto/workflow.md` still describes the same flow.
48
+ 修改平台目录时,也要确认 `.cviauto/workflow.md` 是否仍然描述相同的流程。
49
49
 
50
- ## Meaning Of Template Hashes
50
+ ## 模板哈希的含义
51
51
 
52
- `.cviauto/.template-hashes.json` records the content hash from the last time Cviauto wrote a template file. `cviauto update` uses it to distinguish three cases:
52
+ `.cviauto/.template-hashes.json` 记录了 Cviauto 上次写入模板文件时的内容哈希。`cviauto update` 使用它来区分三种情况:
53
53
 
54
- | Case | Update behavior |
54
+ | 情况 | 更新行为 |
55
55
  | --- | --- |
56
- | File was not modified by the user | It can be updated automatically. |
57
- | File was modified by the user | Prompt the user to overwrite, keep, or generate `.new`. |
58
- | File is no longer a current template | It may be deleted, renamed, or preserved according to migration rules. |
56
+ | 文件未被用户修改 | 可以自动更新。 |
57
+ | 文件已被用户修改 | 提示用户选择覆盖、保留或生成 `.new`。 |
58
+ | 文件不再是当前模板 | 可能根据迁移规则被删除、重命名或保留。 |
59
59
 
60
- When an AI customizes local Cviauto files, it does not need to maintain hashes manually. It is normal for Cviauto update to recognize the result as "modified by the user."
60
+ AI 自定义本地 Cviauto 文件时,无需手动维护哈希。Cviauto update 将结果识别为"已被用户修改"是正常的。
61
61
 
62
- ## Local Customization Boundaries
62
+ ## 本地自定义边界
63
63
 
64
- Editable by default:
64
+ 默认可编辑:
65
65
 
66
66
  - `.cviauto/workflow.md`
67
67
  - `.cviauto/config.yaml`
68
68
  - `.cviauto/spec/**`
69
69
  - `.cviauto/scripts/**`
70
- - Platform hooks, settings, agents, skills, commands, prompts, and workflows
70
+ - 平台 hookssettingsagentsskillscommandsprompts workflows
71
71
 
72
- Do not edit by default:
72
+ 默认不可编辑:
73
73
 
74
- - Global npm install directory
75
- - `node_modules/@baoanaz/cviauto`
76
- - Cviauto GitHub repository source code
77
- - Concrete state files under `.cviauto/.runtime/**`
78
- - Hash contents inside `.cviauto/.template-hashes.json`
74
+ - 全局 npm 安装目录
75
+ - `node_modules/@mindfoldhq/cviauto`
76
+ - Cviauto GitHub 仓库源码
77
+ - `.cviauto/.runtime/**` 下的具体状态文件
78
+ - `.cviauto/.template-hashes.json` 内的哈希内容
79
79
 
80
- Switch to the Cviauto CLI source-code perspective only when the user explicitly wants to contribute upstream.
80
+ 仅在用户明确希望向上游贡献时,才切换到 Cviauto CLI 源码视角。