@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,69 +1,69 @@
1
- # Local Multi-Agent Channel Runtime
1
+ # 本地多代理通道运行时(Local Multi-Agent Channel Runtime
2
2
 
3
- `cviauto channel` is the local multi-agent collaboration runtime shipped with the Cviauto CLI. It lets the main AI session spawn peer workers (Claude Code, Codex, or any agent definition under `.cviauto/agents/`), exchange durable messages through an event log, and coordinate review or brainstorm loops without hand-stitching shell pipelines.
3
+ `cviauto channel` Cviauto CLI 随附的本地多代理协作运行时。它让主 AI 会话可以派生出对等的工作者(peer workers)——Claude CodeCodex `.cviauto/agents/` 下的任何代理定义——通过事件日志交换持久化消息,并协调审查或头脑风暴循环,无需手动拼接 shell 管道。
4
4
 
5
- This reference covers how channels are wired into the user project so an AI customizing the project knows what to edit. For runtime usage (commands, forum/thread patterns, worker spawn flags), defer to the bundled `cviauto-channel` capability skill.
5
+ 本文档涵盖通道如何在用户项目中接入,以便自定义项目的 AI 知道该编辑什么。关于运行时用法(命令、论坛/帖子模式、工作者派生标志),请参考随附的 `cviauto-channel` 能力技能(capability skill)。
6
6
 
7
- ## Local System Model
7
+ ## 本地系统模型(Local System Model
8
8
 
9
- The channel runtime spans three local surfaces:
9
+ 通道运行时横跨三个本地层面:
10
10
 
11
- 1. **Storage layer** in the user's home directory: durable event logs and worker state files.
12
- 2. **Agent definitions** inside the project at `.cviauto/agents/`: platform-agnostic role cards consumed by `cviauto channel spawn --agent <name>`.
13
- 3. **Project configuration** in `.cviauto/config.yaml`: worker guard thresholds and other channel knobs.
11
+ 1. **存储层**位于用户主目录:持久化事件日志和工作者状态文件。
12
+ 2. **代理定义**位于项目内的 `.cviauto/agents/`:平台无关的角色卡,由 `cviauto channel spawn --agent <name>` 消费。
13
+ 3. **项目配置**位于 `.cviauto/config.yaml`:工作者守护阈值和其他通道参数。
14
14
 
15
- ## Core Paths
15
+ ## 核心路径(Core Paths
16
16
 
17
- | Path | Purpose |
17
+ | 路径 | 用途 |
18
18
  | --- | --- |
19
- | `~/.cviauto/channels/<project>/<channel>/events.jsonl` | Per-channel append-only event log. Sequence-locked, replay-safe. |
20
- | `~/.cviauto/channels/<project>/<channel>/<channel>.lock` | Channel-level write lock. |
21
- | `~/.cviauto/channels/<project>/<channel>/<worker>.spawnlock` | Per-worker spawn lock used by the OOM guard. |
22
- | `~/.cviauto/channels/<project>/<channel>/.seq` | Sequence sidecar for ordered event assignment. |
23
- | `~/.cviauto/channels/_global/<channel>/...` | Channels created with `--scope global`. The project bucket is replaced by a shared key. |
24
- | `.cviauto/agents/check.md` | Default Check Agent role definition consumed by `--agent check`. |
25
- | `.cviauto/agents/implement.md` | Default Implement Agent role definition consumed by `--agent implement`. |
26
- | `.cviauto/config.yaml` (`channel.*` block) | Worker guard thresholds and channel defaults. |
19
+ | `~/.cviauto/channels/<project>/<channel>/events.jsonl` | 每个通道的只追加事件日志。序列锁定,可安全重放。 |
20
+ | `~/.cviauto/channels/<project>/<channel>/<channel>.lock` | 通道级写锁。 |
21
+ | `~/.cviauto/channels/<project>/<channel>/<worker>.spawnlock` | 每个工作者的派生锁,供 OOM 守护使用。 |
22
+ | `~/.cviauto/channels/<project>/<channel>/.seq` | 序列辅助文件,用于有序事件分配。 |
23
+ | `~/.cviauto/channels/_global/<channel>/...` | 通过 `--scope global` 创建的通道。项目桶(project bucket)被共享键替换。 |
24
+ | `.cviauto/agents/check.md` | 默认 Check Agent 角色定义,由 `--agent check` 消费。 |
25
+ | `.cviauto/agents/implement.md` | 默认 Implement Agent 角色定义,由 `--agent implement` 消费。 |
26
+ | `.cviauto/config.yaml`(`channel.*` 块) | 工作者守护阈值和通道默认值。 |
27
27
 
28
- The project bucket name is derived from the absolute project path (slashes flattened, non-alphanumerics replaced with `-`), matching Claude Code's `~/.claude/projects/<sanitized-cwd>/` convention. Override with `TRELLIS_CHANNEL_ROOT` (root directory) or `TRELLIS_CHANNEL_PROJECT` (bucket name) for testing or sandboxing.
28
+ 项目桶名称由绝对项目路径派生(斜杠展平,非字母数字字符替换为 `-`),与 Claude Code `~/.claude/projects/<sanitized-cwd>/` 约定一致。可通过 `TRELLIS_CHANNEL_ROOT`(根目录)或 `TRELLIS_CHANNEL_PROJECT`(桶名称)覆盖,用于测试或沙箱环境。
29
29
 
30
- ## When To Reach For The Channel Runtime
30
+ ## 何时使用通道运行时(When To Reach For The Channel Runtime
31
31
 
32
- Channels are heavier than a single Bash call or a one-shot sub-agent dispatch. Use them only when at least one of these conditions holds:
32
+ 通道比单次 Bash 调用或一次性子代理派发更重。仅在满足以下至少一个条件时使用:
33
33
 
34
- - The work needs **two or more agents to converse** through more than one turn (cross-AI brainstorm, peer review, dispatcher + worker).
35
- - A worker should run as a **peer process** that the main session can interrupt, watch progress on, or wait for asynchronously.
36
- - The conversation must be **durable and inspectable** later (forum/thread channels, issue boards, decision trails).
37
- - Multiple workers must **share an event log** so each can see what the others reported.
34
+ - 工作需要**两个或以上代理进行多轮对话**(跨 AI 头脑风暴、同行审查、调度器 + 工作者)。
35
+ - 工作者应作为**对等进程**运行,主会话可以中断、观察进度或异步等待。
36
+ - 对话必须是**持久化且事后可检查的**(论坛/帖子通道、问题看板、决策记录)。
37
+ - 多个工作者必须**共享一个事件日志**,以便每个工作者都能看到其他工作者的报告。
38
38
 
39
- Prefer cheaper primitives when:
39
+ 在以下情况优先使用更轻量的原语:
40
40
 
41
- - A single-shot Bash command or single Agent tool call is enough -> do that directly.
42
- - The user just needs a static review against a file -> read the file and reply inline.
43
- - The need is "remember what we discussed last week" -> use `cviauto mem` instead of a channel.
41
+ - 单次 Bash 命令或单次 Agent 工具调用就够用 -> 直接执行即可。
42
+ - 用户只需要对文件进行静态审查 -> 读取文件并直接回复。
43
+ - 需求是「记住我们上周讨论的内容」-> 使用 `cviauto mem` 而非通道。
44
44
 
45
- ## Customization Points
45
+ ## 自定义点(Customization Points
46
46
 
47
- | Need | Edit location |
47
+ | 需求 | 编辑位置 |
48
48
  | --- | --- |
49
- | Change default channel worker idle timeout | `channel.worker_guard.idle_timeout` in `.cviauto/config.yaml`. Accepts `5m`, `30s`, etc. Set `0` to disable idle cleanup. |
50
- | Change live worker budget | `channel.worker_guard.max_live_workers` in `.cviauto/config.yaml`. Set `0` to disable the spawn-time budget check. |
51
- | Override worker guard per spawn | Pass `--idle-timeout` / `--max-live-workers` on `cviauto channel spawn`, or set `TRELLIS_CHANNEL_WORKER_IDLE_TIMEOUT` / `TRELLIS_CHANNEL_MAX_LIVE_WORKERS` in the environment. |
52
- | Change what the default Check or Implement worker does | Edit `.cviauto/agents/check.md` or `.cviauto/agents/implement.md`. These are platform-agnostic role cards; the channel runtime injects them when `--agent check|implement` is passed. |
53
- | Add a new role card | Drop `<name>.md` into `.cviauto/agents/`. `cviauto channel spawn --agent <name>` will pick it up. |
54
- | Relocate channel storage (CI sandbox, ephemeral runs) | Set `TRELLIS_CHANNEL_ROOT=/path/to/dir`. Channel events move with it; existing channels stay at the old root. |
55
- | Switch storage scope | Pass `--scope project` (default) or `--scope global` on every channel subcommand. The bucket directory changes; nothing else does. |
49
+ | 更改默认通道工作者空闲超时 | `.cviauto/config.yaml` 中的 `channel.worker_guard.idle_timeout`。支持 `5m`、`30s` 等格式。设为 `0` 可禁用空闲清理。 |
50
+ | 更改活跃工作者预算 | `.cviauto/config.yaml` 中的 `channel.worker_guard.max_live_workers`。设为 `0` 可禁用派生时的预算检查。 |
51
+ | 单次派生时覆盖工作者守护参数 | `cviauto channel spawn` 时传入 `--idle-timeout` / `--max-live-workers`,或设置环境变量 `TRELLIS_CHANNEL_WORKER_IDLE_TIMEOUT` / `TRELLIS_CHANNEL_MAX_LIVE_WORKERS`。 |
52
+ | 更改默认 Check Implement 工作者的行为 | 编辑 `.cviauto/agents/check.md` `.cviauto/agents/implement.md`。这些是平台无关的角色卡;通道运行时在传入 `--agent check|implement` 时将其注入。 |
53
+ | 添加新的角色卡 | `<name>.md` 放入 `.cviauto/agents/`。`cviauto channel spawn --agent <name>` 会自动识别。 |
54
+ | 迁移通道存储位置(CI 沙箱、临时运行) | 设置 `TRELLIS_CHANNEL_ROOT=/path/to/dir`。通道事件随之迁移;现有通道保留在原位置。 |
55
+ | 切换存储作用域 | 在每个通道子命令中传入 `--scope project`(默认)或 `--scope global`。仅桶目录变化,其余不变。 |
56
56
 
57
- Precedence for the worker guard is: CLI flag > environment variable > `.cviauto/config.yaml` > built-in default. Built-in defaults are `idle_timeout: 5m` and `max_live_workers: 6`.
57
+ 工作者守护参数的优先级为:CLI 标志 > 环境变量 > `.cviauto/config.yaml` > 内置默认值。内置默认值为 `idle_timeout: 5m` `max_live_workers: 6`。
58
58
 
59
- ## Relationship To Other Local Layers
59
+ ## 与其他本地层的关系(Relationship To Other Local Layers
60
60
 
61
- - **Workflow layer**: workflows that use channel dispatch (such as `channel-driven-subagent-dispatch`) instruct the main agent to call `cviauto channel spawn --agent check` or `--agent implement` instead of a platform sub-agent. If `.cviauto/agents/check.md` or `implement.md` is missing, `cviauto workflow --template <id>` prints a non-blocking warning at install time. Restore them with `cviauto update` if they are deleted by accident.
62
- - **Task layer**: channel workers do not own task state. The supervising main session passes the active task path through the worker inbox; the worker resolves task artifacts from disk.
63
- - **Spec layer**: workers read `.cviauto/spec/` the same way the main session does. Channel runtime does not bypass spec context loading.
64
- - **Platform integration layer**: channel runtime is platform-neutral. It does not depend on `.claude/`, `.codex/`, or any other platform directory. The adapters that normalize provider output (Claude `stream-json`, Codex `app-server`) live inside the Cviauto CLI binary, not in the project.
65
- - **Platform sub-agent files vs. channel workers**: editing `.claude/agents/cviauto-implement.md` (and its peers in other platform `.X/agents/` directories) does NOT change channel-runtime worker behavior — channel workers load `.cviauto/agents/<name>.md`. The platform-specific agent files are for direct sub-agent dispatch from the main AI session, not for channel-spawned workers. See `platform-files/agents.md` for the per-platform agent surface, and the `cviauto-meta/SKILL.md` rule that codifies this split.
61
+ - **工作流层(Workflow layer)**:使用通道派发的工作流(如 `channel-driven-subagent-dispatch`)指示主代理调用 `cviauto channel spawn --agent check` `--agent implement`,而非使用平台子代理。如果 `.cviauto/agents/check.md` `implement.md` 缺失,`cviauto workflow --template <id>` 会在安装时打印非阻塞警告。如果意外删除,可通过 `cviauto update` 恢复。
62
+ - **任务层(Task layer)**:通道工作者不拥有任务状态。监督主会话通过工作者收件箱传递活跃任务路径;工作者从磁盘解析任务产物。
63
+ - **规范层(Spec layer)**:工作者与主会话以相同方式读取 `.cviauto/spec/`。通道运行时不绕过 spec 上下文加载。
64
+ - **平台集成层(Platform integration layer)**:通道运行时是平台中立的。它不依赖 `.claude/`、`.codex/` 或任何其他平台目录。标准化不同提供商输出(Claude `stream-json`、Codex `app-server`)的适配器位于 Cviauto CLI 二进制文件内部,不在项目中。
65
+ - **平台子代理文件 vs. 通道工作者**:编辑 `.claude/agents/cviauto-implement.md`(以及其他平台 `.X/agents/` 目录中的对应文件)**不会**改变通道运行时工作者的行为——通道工作者加载 `.cviauto/agents/<name>.md`。平台特定的代理文件用于主 AI 会话的直接子代理派发,而非通道派生的工作者。请参阅 `platform-files/agents.md` 了解各平台的代理表面,以及 `cviauto-meta/SKILL.md` 中编码此分离的规则。
66
66
 
67
- ## Runtime Usage
67
+ ## 运行时用法(Runtime Usage
68
68
 
69
- For command syntax, forum/thread patterns, worker handles, progress inspection, and the `--kind done` / `--kind turn_finished` dispatcher wait pattern, load the bundled `cviauto-channel` skill (auto-installed under each platform's skills directory after `cviauto init` / `cviauto update`). This reference only covers the local file layout and customization knobs; it does not duplicate command syntax that may change between releases.
69
+ 关于命令语法、论坛/帖子模式、工作者句柄、进度检查以及 `--kind done` / `--kind turn_finished` 调度器等待模式,请加载随附的 `cviauto-channel` 技能(在 `cviauto init` / `cviauto update` 后自动安装到各平台的技能目录下)。本文档仅涵盖本地文件布局和自定义参数;不重复可能在不同版本间变化的命令语法。
@@ -1,51 +1,51 @@
1
- # Local Cviauto Architecture Overview
1
+ # 本地 Cviauto 架构概述
2
2
 
3
- `cviauto-meta` is for user projects that have already run `cviauto init`. The user's machine usually has only the npm-installed `cviauto` command plus the Cviauto files generated inside the project; it may not have the Cviauto CLI source code.
3
+ `cviauto-meta` 面向已运行过 `cviauto init` 的用户项目。用户机器通常只有通过 npm 安装的 `cviauto` 命令以及项目中生成的 Cviauto 文件;可能没有 Cviauto CLI 源码。
4
4
 
5
- Therefore, when an AI uses this skill, the default customization target is local files inside the user project:
5
+ 因此,当 AI 使用此技能时,默认的自定义目标是用户项目中的本地文件:
6
6
 
7
- - `.cviauto/`: workflow, tasks, specs, memory, scripts, and runtime state.
8
- - Platform directories: `.claude/`, `.codex/`, `.cursor/`, `.opencode/`, `.kiro/`, `.gemini/`, `.qoder/`, `.codebuddy/`, `.github/`, `.factory/`, `.pi/`, `.kilocode/`, `.agent/`, `.devin/`, `.reasonix/`, `.zcode/`, and similar directories.
9
- - Shared skill layer: `.agents/skills/`.
7
+ - `.cviauto/`:工作流、任务、spec、记忆、脚本和运行时状态。
8
+ - 平台目录:`.claude/`、`.codex/`、`.cursor/`、`.opencode/`、`.kiro/`、`.gemini/`、`.qoder/`、`.codebuddy/`、`.github/`、`.factory/`、`.pi/`、`.kilocode/`、`.agent/`、`.devin/`、`.reasonix/`、`.zcode/` 及类似目录。
9
+ - 共享技能层:`.agents/skills/`。
10
10
 
11
- Do not default to guiding the user to fork the Cviauto CLI repository. Treat upstream source code as the operating target only when the user explicitly says they want to change Cviauto upstream source, publish an npm package, or contribute a PR.
11
+ 不要默认引导用户 fork Cviauto CLI 仓库。仅当用户明确说要更改 Cviauto 上游源码、发布 npm 包或提交 PR 时,才将上游源码视为操作目标。
12
12
 
13
- ## Local System Model
13
+ ## 本地系统模型
14
14
 
15
- Cviauto provides three layers inside a user project:
15
+ Cviauto 在用户项目内提供三层:
16
16
 
17
- 1. **Workflow layer**: `.cviauto/workflow.md` defines phases, routing, next actions, and prompt blocks.
18
- 2. **Persistence layer**: `.cviauto/tasks/`, `.cviauto/spec/`, and `.cviauto/workspace/` store tasks, specs, and session memory.
19
- 3. **Platform integration layer**: hooks, settings, agents, skills, commands, prompts, and workflows in platform directories connect the Cviauto workflow to different AI tools.
17
+ 1. **工作流层**:`.cviauto/workflow.md` 定义阶段、路由、下一步操作和 prompt 块。
18
+ 2. **持久化层**:`.cviauto/tasks/`、`.cviauto/spec/` `.cviauto/workspace/` 存储任务、spec 和会话记忆。
19
+ 3. **平台集成层**:平台目录中的 hookssettingsagentsskillscommandsprompts workflows Cviauto 工作流连接到不同的 AI 工具。
20
20
 
21
- All three layers live inside the user project, so an AI can read and modify them directly.
21
+ 所有三层都位于用户项目内,因此 AI 可以直接读取和修改它们。
22
22
 
23
- ## Core Paths
23
+ ## 核心路径
24
24
 
25
- | Path | Purpose |
25
+ | 路径 | 用途 |
26
26
  | --- | --- |
27
- | `.cviauto/workflow.md` | Workflow phases, skill routing, and workflow-state prompt blocks. |
28
- | `.cviauto/config.yaml` | Project configuration, task lifecycle hooks, monorepo package configuration, and journal configuration. |
29
- | `.cviauto/spec/` | The user's project-specific coding conventions and thinking guides. |
30
- | `.cviauto/tasks/` | Each task's PRD, technical notes, research files, and JSONL context. |
31
- | `.cviauto/workspace/` | Per-developer journals and cross-session memory. |
32
- | `.cviauto/scripts/` | Local Python runtime used by commands, hooks, and context injection. |
33
- | `.cviauto/.runtime/` | Session-level runtime state, such as the current task pointer. |
34
- | `.cviauto/.template-hashes.json` | Template hashes for Cviauto-managed files, used by update to determine whether local files were modified by the user. |
35
-
36
- ## AI Customization Principles
37
-
38
- 1. **Find the local source of truth first**: Do not edit from memory. Read `.cviauto/workflow.md`, `.cviauto/config.yaml`, the relevant platform directory, and related task files first.
39
- 2. **Edit the user project, not the npm package cache**: Modify generated files inside the project, not `node_modules` or the global npm install directory.
40
- 3. **Keep platform files aligned with `.cviauto/`**: If workflow routing changes, also check whether platform skills or commands still describe the same flow.
41
- 4. **Put project-specific rules in `.cviauto/spec/` or a local skill**: Do not put team conventions into `cviauto-meta`.
42
- 5. **Preserve user changes**: If a file was already modified locally, work from the current content instead of overwriting it with a default template.
43
-
44
- ## How To Use This Directory
45
-
46
- - To understand which files exist after init, read `generated-files.md`.
47
- - To change phases, routing, or next actions, read `workflow.md`.
48
- - To change the task model, JSONL context, or active task behavior, read `task-system.md`.
49
- - To change coding convention injection, read `spec-system.md`.
50
- - To understand journals and cross-session memory, read `workspace-memory.md`.
51
- - To change hooks or sub-agent context loading, read `context-injection.md`.
27
+ | `.cviauto/workflow.md` | 工作流阶段、技能路由和工作流状态 prompt 块。 |
28
+ | `.cviauto/config.yaml` | 项目配置、任务生命周期 hooksmonorepo 包配置和日志配置。 |
29
+ | `.cviauto/spec/` | 用户的项目特定编码规范和思维指南。 |
30
+ | `.cviauto/tasks/` | 每个任务的 PRD、技术笔记、研究文件和 JSONL 上下文。 |
31
+ | `.cviauto/workspace/` | 每个开发者的日志和跨会话记忆。 |
32
+ | `.cviauto/scripts/` | 由命令、hooks 和上下文注入使用的本地 Python 运行时。 |
33
+ | `.cviauto/.runtime/` | 会话级运行时状态,如当前任务指针。 |
34
+ | `.cviauto/.template-hashes.json` | Cviauto 管理文件的模板哈希值,由 update 用于判断本地文件是否被用户修改。 |
35
+
36
+ ## AI 自定义原则
37
+
38
+ 1. **首先找到本地唯一权威来源**:不要凭记忆编辑。先读取 `.cviauto/workflow.md`、`.cviauto/config.yaml`、相关的平台目录和相关任务文件。
39
+ 2. **编辑用户项目,而非 npm 包缓存**:修改项目内生成的文件,而非 `node_modules` 或全局 npm 安装目录。
40
+ 3. **保持平台文件与 `.cviauto/` 一致**:如果工作流路由发生变化,同时检查平台技能或命令是否仍描述相同的流程。
41
+ 4. **将项目特定规则放入 `.cviauto/spec/` 或本地技能**:不要将团队约定放入 `cviauto-meta`。
42
+ 5. **保留用户更改**:如果文件已在本地被修改,以当前内容为基准工作,而非用默认模板覆盖。
43
+
44
+ ## 如何使用本目录
45
+
46
+ - 要了解 init 后存在哪些文件,阅读 `generated-files.md`。
47
+ - 要更改阶段、路由或下一步操作,阅读 `workflow.md`。
48
+ - 要更改任务模型、JSONL 上下文或活动任务行为,阅读 `task-system.md`。
49
+ - 要更改编码规范注入,阅读 `spec-system.md`。
50
+ - 要了解日志和跨会话记忆,阅读 `workspace-memory.md`。
51
+ - 要更改 hooks sub-agent 上下文加载,阅读 `context-injection.md`。
@@ -1,10 +1,10 @@
1
- # Local Spec System
1
+ # 本地 Spec 系统
2
2
 
3
- `.cviauto/spec/` is the user's project-specific engineering spec library. Cviauto is not about making AI memorize conventions; it injects relevant specs or requires the AI to read them at the right time.
3
+ `.cviauto/spec/` 是用户的项目特定工程 spec 库。Cviauto 不是让 AI 记忆约定;而是在适当的时机注入相关 spec 或要求 AI 阅读它们。
4
4
 
5
- ## Directory Model
5
+ ## 目录模型
6
6
 
7
- A common single-repository structure:
7
+ 常见的单仓库结构:
8
8
 
9
9
  ```text
10
10
  .cviauto/spec/
@@ -19,7 +19,7 @@ A common single-repository structure:
19
19
  └── ...
20
20
  ```
21
21
 
22
- A common monorepo structure:
22
+ 常见的 monorepo 结构:
23
23
 
24
24
  ```text
25
25
  .cviauto/spec/
@@ -39,11 +39,11 @@ A common monorepo structure:
39
39
  └── ...
40
40
  ```
41
41
 
42
- `index.md` is the entry point for each layer. It should list the Pre-Development Checklist and Quality Check. Specific guidelines live in other Markdown files in the same directory.
42
+ `index.md` 是每层的入口点。它应列出开发前检查清单和质量检查。具体指南在同一个目录中的其他 Markdown 文件中。
43
43
 
44
- ## Package Configuration
44
+ ## 包配置
45
45
 
46
- `.cviauto/config.yaml` can declare packages:
46
+ `.cviauto/config.yaml` 可以声明包:
47
47
 
48
48
  ```yaml
49
49
  packages:
@@ -55,48 +55,48 @@ packages:
55
55
  default_package: cli
56
56
  ```
57
57
 
58
- The AI can run:
58
+ AI 可以运行:
59
59
 
60
60
  ```bash
61
61
  python3 ./.cviauto/scripts/get_context.py --mode packages
62
62
  ```
63
63
 
64
- This command lists packages and spec layers for the current project. Use this output as the reference when configuring context JSONL.
64
+ 此命令列出当前项目的包和 spec 层。将此输出作为配置上下文 JSONL 时的参考。
65
65
 
66
- ## How Specs Enter Tasks
66
+ ## Spec 如何进入任务
67
67
 
68
- Before a task enters implementation, planning may write relevant specs into `implement.jsonl` / `check.jsonl` when the task needs spec or research context beyond the task artifacts:
68
+ 在任务进入实现之前,当任务需要超出任务文档的 spec 或研究上下文时,规划可以将相关 spec 写入 `implement.jsonl` / `check.jsonl`:
69
69
 
70
70
  ```jsonl
71
- {"file": ".cviauto/spec/cli/backend/index.md", "reason": "CLI backend conventions"}
72
- {"file": ".cviauto/spec/cli/unit-test/conventions.md", "reason": "Test expectations"}
71
+ {"file": ".cviauto/spec/cli/backend/index.md", "reason": "CLI 后端约定"}
72
+ {"file": ".cviauto/spec/cli/unit-test/conventions.md", "reason": "测试预期"}
73
73
  ```
74
74
 
75
- Sub-agents or platform preludes read these JSONL files and load the referenced specs. On platforms without sub-agent support, the AI should read the relevant specs directly according to the workflow.
75
+ Sub-agent 或平台前置指令读取这些 JSONL 文件并加载引用的 spec。在不支持 sub-agent 的平台上,AI 应根据工作流直接阅读相关 spec。
76
76
 
77
- ## What Specs Should Contain
77
+ ## Spec 应包含什么
78
78
 
79
- Specs should contain executable engineering conventions for the project, not generic best practices:
79
+ Spec 应包含项目的可执行工程约定,而非泛泛的最佳实践:
80
80
 
81
- - Where files should live.
82
- - How error handling should be expressed.
83
- - Input/output contracts for APIs, hooks, and commands.
84
- - Patterns that are forbidden.
85
- - Cases that require tests.
86
- - Project-specific pitfalls and how to avoid them.
81
+ - 文件应放在哪里。
82
+ - 错误处理应如何表达。
83
+ - API、hooks 和命令的输入/输出契约。
84
+ - 被禁止的模式。
85
+ - 需要测试的情况。
86
+ - 项目特定的陷阱及如何避免。
87
87
 
88
- When the AI learns a new rule during implementation or debugging, it should update `.cviauto/spec/` rather than only summarizing it in chat.
88
+ AI 在实现或调试过程中学到新规则时,应更新 `.cviauto/spec/`,而不仅仅在聊天中总结。
89
89
 
90
- ## Local Customization Points
90
+ ## 本地自定义点
91
91
 
92
- | Need | Edit location |
92
+ | 需求 | 编辑位置 |
93
93
  | --- | --- |
94
- | Add a new spec layer | `.cviauto/spec/<package>/<layer>/index.md` and corresponding guideline files. |
95
- | Change monorepo spec mapping | `packages` / `default_package` / `spec_scope` in `.cviauto/config.yaml`. |
96
- | Change which specs AI reads before implementation | The task's `implement.jsonl`. |
97
- | Change which specs AI reads during checking | The task's `check.jsonl`. |
98
- | Change when specs should be updated | Phase 3.3 in `.cviauto/workflow.md` and the `cviauto-update-spec` skill. Default native workflow runs this only when the user explicitly asks to promote knowledge into spec. |
94
+ | 添加新的 spec | `.cviauto/spec/<package>/<layer>/index.md` 和相应的指南文件。 |
95
+ | 更改 monorepo spec 映射 | `.cviauto/config.yaml` 中的 `packages` / `default_package` / `spec_scope`。 |
96
+ | 更改 AI 在实现前阅读哪些 spec | 任务的 `implement.jsonl`。 |
97
+ | 更改 AI 在检查期间阅读哪些 spec | 任务的 `check.jsonl`。 |
98
+ | 更改何时应更新 spec | `.cviauto/workflow.md` 中的阶段 3.3 `cviauto-update-spec` skill。默认原生工作流仅在用户明确要求将知识推广到 spec 时才运行。 |
99
99
 
100
- ## Boundaries
100
+ ## 边界
101
101
 
102
- `.cviauto/spec/` is the user's project specification, not a permanent copy of Cviauto built-in templates. The AI should encourage the user to update it according to the actual project code instead of treating Cviauto default templates as immutable documents.
102
+ `.cviauto/spec/` 是用户的项目规范,不是 Cviauto 内置模板的永久副本。AI 应鼓励用户根据实际项目代码更新它,而非将 Cviauto 默认模板视为不可变文档。
@@ -1,8 +1,8 @@
1
- # Local Task System
1
+ # 本地任务系统
2
2
 
3
- The Cviauto task system is stored entirely under `.cviauto/tasks/` in the user project. Each task is a directory containing requirements, context, research, state, and relationship information.
3
+ Cviauto 任务系统完全存储在用户项目的 `.cviauto/tasks/` 下。每个任务是一个目录,包含需求、上下文、研究、状态和关系信息。
4
4
 
5
- ## Task Directory Structure
5
+ ## 任务目录结构
6
6
 
7
7
  ```text
8
8
  .cviauto/tasks/
@@ -18,95 +18,95 @@ The Cviauto task system is stored entirely under `.cviauto/tasks/` in the user p
18
18
  └── 2026-04/
19
19
  ```
20
20
 
21
- | File | Purpose |
21
+ | 文件 | 用途 |
22
22
  | --- | --- |
23
- | `task.json` | Task metadata: status, assignee, priority, branch, parent/child tasks, and similar fields. |
24
- | `prd.md` | Requirements, constraints, and acceptance criteria. Lightweight tasks may be PRD-only. |
25
- | `design.md` | Technical design for complex tasks: boundaries, contracts, data flow, compatibility, tradeoffs. |
26
- | `implement.md` | Execution plan for complex tasks: ordered checklist, validation commands, review gates, rollback points. |
27
- | `implement.jsonl` | List of spec/research files the implement agent must read first. |
28
- | `check.jsonl` | List of spec/research files the check agent must read first. |
29
- | `research/` | Research artifacts. Complex findings should not live only in chat. |
23
+ | `task.json` | 任务元数据:状态、负责人、优先级、分支、父子任务及类似字段。 |
24
+ | `prd.md` | 需求、约束和验收标准。轻量级任务可以只有 PRD |
25
+ | `design.md` | 复杂任务的技术设计:边界、契约、数据流、兼容性、权衡。 |
26
+ | `implement.md` | 复杂任务的执行计划:有序检查清单、验证命令、审查门禁、回滚点。 |
27
+ | `implement.jsonl` | implement Agent 必须首先阅读的 spec/research 文件列表。 |
28
+ | `check.jsonl` | check Agent 必须首先阅读的 spec/research 文件列表。 |
29
+ | `research/` | 研究产出物。复杂发现不应只存在于聊天中。 |
30
30
 
31
31
  ## `task.json`
32
32
 
33
- `task.json` records task status and metadata. Common fields:
33
+ `task.json` 记录任务状态和元数据。常见字段:
34
34
 
35
- | Field | Meaning |
35
+ | 字段 | 含义 |
36
36
  | --- | --- |
37
- | `id` / `name` / `title` | Task identity and title. |
38
- | `status` | Status such as `planning`, `in_progress`, `review`, or `completed`. |
39
- | `priority` | `P0`, `P1`, `P2`, `P3`. |
40
- | `creator` / `assignee` | Creator and assignee. |
41
- | `package` | Target package in a monorepo; may be empty. |
42
- | `branch` / `base_branch` | Working branch and PR target branch. |
43
- | `children` / `parent` | Parent/child task relationships. |
44
- | `commit` / `pr_url` | Commit and PR information after completion. |
45
- | `meta` | Extension fields. |
37
+ | `id` / `name` / `title` | 任务标识和标题。 |
38
+ | `status` | 状态,如 `planning`、`in_progress`、`review` `completed`。 |
39
+ | `priority` | `P0`、`P1`、`P2`、`P3`。 |
40
+ | `creator` / `assignee` | 创建者和负责人。 |
41
+ | `package` | monorepo 中的目标包;可为空。 |
42
+ | `branch` / `base_branch` | 工作分支和 PR 目标分支。 |
43
+ | `children` / `parent` | 父子任务关系。 |
44
+ | `commit` / `pr_url` | 完成后的提交和 PR 信息。 |
45
+ | `meta` | 扩展字段。 |
46
46
 
47
- ## Parent / Child Task Trees
47
+ ## 父子任务树
48
48
 
49
- Parent/child task relationships are for work structure. A parent task groups related deliverables under one source requirement set; it is not a dependency scheduler and does not replace the child task's own planning artifacts.
49
+ 父子任务关系用于工作结构。父任务将相关交付物分组到一个需求来源集下;它不是依赖调度器,也不替代子任务自己的规划文档。
50
50
 
51
- Use a parent task when a request has multiple independently verifiable deliverables. The parent owns:
51
+ 当请求有多个可独立验证的交付物时使用父任务。父任务拥有:
52
52
 
53
- - Source requirements and user-facing scope.
54
- - The map of child tasks and their responsibility boundaries.
55
- - Cross-child acceptance criteria and final integration review.
53
+ - 来源需求和面向用户的范围。
54
+ - 子任务映射及其职责边界。
55
+ - 跨子任务验收标准和最终集成审查。
56
56
 
57
- Use child tasks for deliverables that can move through planning, implementation, check, and archive independently. If one child depends on another, write that dependency in the child `prd.md` / `implement.md`; do not rely on tree position to imply ordering.
57
+ 对于可以独立经历规划、实现、检查和归档的交付物使用子任务。如果一个子任务依赖另一个,将该依赖写入子任务的 `prd.md` / `implement.md`;不要依赖树的位置来暗示顺序。
58
58
 
59
- Create new children with:
59
+ 创建新子任务:
60
60
 
61
61
  ```bash
62
- python3 ./.cviauto/scripts/task.py create "<child title>" --slug <child-slug> --parent <parent-dir>
62
+ python3 ./.cviauto/scripts/task.py create "<子任务标题>" --slug <子任务-slug> --parent <父任务-目录>
63
63
  ```
64
64
 
65
- Link or unlink existing tasks with:
65
+ 链接或取消链接现有任务:
66
66
 
67
67
  ```bash
68
- python3 ./.cviauto/scripts/task.py add-subtask <parent-dir> <child-dir>
69
- python3 ./.cviauto/scripts/task.py remove-subtask <parent-dir> <child-dir>
68
+ python3 ./.cviauto/scripts/task.py add-subtask <父任务-目录> <子任务-目录>
69
+ python3 ./.cviauto/scripts/task.py remove-subtask <父任务-目录> <子任务-目录>
70
70
  ```
71
71
 
72
- `children` on the parent is a historical list. When a child is archived, Cviauto keeps that child name in the parent so progress like `[2/3 done]` remains meaningful after completed children move to `archive/`.
72
+ 父任务的 `children` 是历史列表。当子任务归档时,Cviauto 保留该子任务名称在父任务中,以便在已完成的子任务移至 `archive/` `[2/3 done]` 这样的进度仍然有意义。
73
73
 
74
- The AI should not treat phase numbers as task status. Task progress is mainly determined by `status`, artifact presence (`prd.md`, optional `design.md` / `implement.md`), whether JSONL context is configured for sub-agent mode, and the phase descriptions in `workflow.md`.
74
+ AI 不应将阶段编号视为任务状态。任务进度主要由 `status`、文档存在情况(`prd.md`、可选的 `design.md` / `implement.md`)、JSONL 上下文是否为 sub-agent 模式配置以及 `workflow.md` 中的阶段描述决定。
75
75
 
76
- ## Active Task
76
+ ## 活动任务
77
77
 
78
- The user sees a "current task," but Cviauto stores active task state per session.
78
+ 用户看到"当前任务",但 Cviauto 按会话存储活动任务状态。
79
79
 
80
80
  ```text
81
81
  .cviauto/.runtime/sessions/<context-key>.json
82
82
  ```
83
83
 
84
- `task.py start` writes the task path into the runtime session file for the current session. `task.py current --source` shows the current task and where it came from. Different AI windows can point to different tasks without overwriting each other.
84
+ `task.py start` 将任务路径写入当前会话的运行时会话文件。`task.py current --source` 显示当前任务及其来源。不同的 AI 窗口可以指向不同的任务而不会互相覆盖。
85
85
 
86
- If the platform or shell environment has no stable session identity, `task.py start` may be unable to set the active task. The AI should read the error, inspect the platform hook/session environment, and not fall back to a shared global pointer.
86
+ 如果平台或 shell 环境没有稳定的会话身份,`task.py start` 可能无法设置活动任务。AI 应阅读错误信息,检查平台 hook/会话环境,而非回退到共享全局指针。
87
87
 
88
- ## JSONL Context
88
+ ## JSONL 上下文
89
89
 
90
- `implement.jsonl` and `check.jsonl` are context manifests for sub-agents to read first. They do not replace `implement.md`; `implement.md` is the human-readable execution plan.
90
+ `implement.jsonl` `check.jsonl` 是供 sub-agent 首先阅读的上下文清单。它们不替代 `implement.md`;`implement.md` 是人类可读的执行计划。
91
91
 
92
- Format:
92
+ 格式:
93
93
 
94
94
  ```jsonl
95
- {"file": ".cviauto/spec/cli/backend/index.md", "reason": "Backend conventions"}
96
- {"file": ".cviauto/tasks/04-28-example/research/api.md", "reason": "API research"}
95
+ {"file": ".cviauto/spec/cli/backend/index.md", "reason": "后端约定"}
96
+ {"file": ".cviauto/tasks/04-28-example/research/api.md", "reason": "API 研究"}
97
97
  ```
98
98
 
99
- Rules:
99
+ 规则:
100
100
 
101
- - Include spec and research files.
102
- - Do not include code files that are about to be modified.
103
- - Do not treat temporary conclusions in chat as the only context.
104
- - Seed rows have no `file` field; they only prompt the AI to fill in real entries.
101
+ - 包含 spec 和研究文件。
102
+ - 不要包含即将被修改的代码文件。
103
+ - 不要将聊天中的临时结论作为唯一上下文。
104
+ - 种子行没有 `file` 字段;它们仅提示 AI 填入真实条目。
105
105
 
106
- ## Common Commands
106
+ ## 常用命令
107
107
 
108
108
  ```bash
109
- python3 ./.cviauto/scripts/task.py create "<title>" --slug <slug>
109
+ python3 ./.cviauto/scripts/task.py create "<标题>" --slug <slug>
110
110
  python3 ./.cviauto/scripts/task.py start <task>
111
111
  python3 ./.cviauto/scripts/task.py current --source
112
112
  python3 ./.cviauto/scripts/task.py add-context <task> implement <file> <reason>
@@ -115,16 +115,16 @@ python3 ./.cviauto/scripts/task.py finish
115
115
  python3 ./.cviauto/scripts/task.py archive <task>
116
116
  ```
117
117
 
118
- When modifying the task system, the AI should prefer script commands to maintain structure. Edit JSON/Markdown directly only when scripts do not cover the need.
118
+ 修改任务系统时,AI 应优先使用脚本命令来维护结构。仅在脚本无法满足需求时才直接编辑 JSON/Markdown
119
119
 
120
- ## Local Customization Points
120
+ ## 本地自定义点
121
121
 
122
- | Need | Edit location |
122
+ | 需求 | 编辑位置 |
123
123
  | --- | --- |
124
- | Change the default task template | `.cviauto/scripts/common/task_store.py` and task creation instructions. |
125
- | Change status semantics | `.cviauto/workflow.md`, workflow-state hook logic, and task usage conventions. |
126
- | Add task lifecycle actions | `hooks.after_*` in `.cviauto/config.yaml`. |
127
- | Change context rules | Planning artifact guidance in `.cviauto/workflow.md` and related platform agent/hook instructions. |
128
- | Change archive policy | `.cviauto/scripts/common/task_store.py` / `task_utils.py`. |
124
+ | 更改默认任务模板 | `.cviauto/scripts/common/task_store.py` 和任务创建指令。 |
125
+ | 更改状态语义 | `.cviauto/workflow.md`、workflow-state hook 逻辑和任务使用约定。 |
126
+ | 添加任务生命周期操作 | `.cviauto/config.yaml` 中的 `hooks.after_*`。 |
127
+ | 更改上下文规则 | `.cviauto/workflow.md` 中的规划文档指导和相关平台 agent/hook 指令。 |
128
+ | 更改归档策略 | `.cviauto/scripts/common/task_store.py` / `task_utils.py`。 |
129
129
 
130
- These are local files in the user project. Do not default to editing Cviauto CLI source code unless the user wants to contribute upstream.
130
+ 这些是用户项目中的本地文件。除非用户想向上游贡献,否则不要默认编辑 Cviauto CLI 源码。