@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,12 +1,12 @@
1
- # Triggering Patterns
1
+ # 触发模式
2
2
 
3
- Verbatim user phrasings that should make an AI reach for `cviauto mem`. Calibrate instinct against these — if a user message hits one of these patterns and you do not reach for `mem`, you probably missed an obvious recall.
3
+ 用户的确切表述,这些表述应使 AI 主动使用 `cviauto mem`。根据这些模式校准直觉——如果用户消息匹配其中某个模式而你却没有使用 `mem`,那你很可能错过了一次明显的回忆检索。
4
4
 
5
- Patterns are grouped by the *intent* behind the phrasing, not the surface words. The same intent shows up in different languages and registers.
5
+ 模式按表述背后的**意图**分组,而非表面用词。同一意图会以不同语言和语域出现。
6
6
 
7
- ## Past-solution recall
7
+ ## 过往解决方案回忆
8
8
 
9
- The user is asking "how did we (or I) solve this before". Past dialogue holds the answer; the codebase shows the result but not the reasoning.
9
+ 用户正在问"我们(或我)之前是怎么解决这个的"。过往对话中存有答案;代码库展示了结果而非推理过程。
10
10
 
11
11
  - "How did we solve this last time?"
12
12
  - "What did we end up doing about X?"
@@ -15,11 +15,11 @@ The user is asking "how did we (or I) solve this before". Past dialogue holds th
15
15
  - "之前是怎么搞定 X 的?"
16
16
  - "我记得以前修过类似的"
17
17
 
18
- Reach: `cviauto mem search "<symptom keyword>" --global --limit 10`, then `context` into the hit that looks closest.
18
+ 操作:`cviauto mem search "<症状关键词>" --global --limit 10`,然后对看起来最匹配的命中结果执行 `context`。
19
19
 
20
- ## Decision retrieval
20
+ ## 决策检索
21
21
 
22
- The user is referencing a decision that lives in old dialogue, not in any committed file. Look in brainstorm windows.
22
+ 用户正在引用一个存在于旧对话中、而非任何已提交文件中的决策。请在头脑风暴窗口中查找。
23
23
 
24
24
  - "What was the decision on X?"
25
25
  - "Did we decide to use Postgres or SQLite?"
@@ -28,11 +28,11 @@ The user is referencing a decision that lives in old dialogue, not in any commit
28
28
  - "关于 X 我们之前是怎么定的?"
29
29
  - "之前讨论过 X 的方案吗?"
30
30
 
31
- Reach: `cviauto mem search "<decision keyword>"` to find the session, then `extract <id> --phase brainstorm` to recover the discussion.
31
+ 操作:`cviauto mem search "<决策关键词>"` 找到会话,然后 `extract <id> --phase brainstorm` 恢复讨论内容。
32
32
 
33
- ## Cross-session continuation
33
+ ## 跨会话续接
34
34
 
35
- The user resumed work after a gap and the context is implicit.
35
+ 用户在间隔一段时间后恢复工作,上下文是隐式的。
36
36
 
37
37
  - "Where were we?"
38
38
  - "Continue from last time."
@@ -41,11 +41,11 @@ The user resumed work after a gap and the context is implicit.
41
41
  - "我们上次做到哪了"
42
42
  - "接着昨天那个任务"
43
43
 
44
- Reach: `cviauto mem list --task <current-task-dir>` to find the most recent sessions tied to the active task, then `extract` the last one.
44
+ 操作:`cviauto mem list --task <current-task-dir>` 找到与当前任务关联的最近会话,然后 `extract` 最后一个。
45
45
 
46
- ## Familiar-bug debugging
46
+ ## 熟悉 bug 排查
47
47
 
48
- The current bug feels like one already seen. Past sessions probably hold the resolution path.
48
+ 当前的 bug 感觉像是之前遇到过的。过往会话中很可能保存了解决路径。
49
49
 
50
50
  - "I feel like I've hit this before."
51
51
  - "Doesn't this look like that bug from last month?"
@@ -54,11 +54,11 @@ The current bug feels like one already seen. Past sessions probably hold the res
54
54
  - "这个 bug 是不是上次那个?"
55
55
  - "怎么又是这个 error?"
56
56
 
57
- Reach: `cviauto mem search "<error message fragment>" --global`. Anchor on a short, distinctive token from the actual error string.
57
+ 操作:`cviauto mem search "<错误信息片段>" --global`。从实际错误字符串中锚定一个短小、有辨识度的 token
58
58
 
59
- ## Self-pattern spotting
59
+ ## 自我模式识别
60
60
 
61
- The user is asking whether they keep repeating the same kind of mistake or decision.
61
+ 用户正在问自己是否在反复犯同类错误或做同类决策。
62
62
 
63
63
  - "Do I always make this mistake?"
64
64
  - "How often have I run into X?"
@@ -67,11 +67,11 @@ The user is asking whether they keep repeating the same kind of mistake or decis
67
67
  - "我老犯这个错?"
68
68
  - "这类问题之前出现过几次?"
69
69
 
70
- Reach: `cviauto mem search "<topic>" --global --limit 50` and scan the dates / projects in the listing. Optionally `extract` two or three for comparison.
70
+ 操作:`cviauto mem search "<话题>" --global --limit 50` 并浏览列表中的日期/项目。可选地对两三个结果执行 `extract` 进行比较。
71
71
 
72
- ## Finish-work retrospective (on demand)
72
+ ## 完成工作复盘(按需)
73
73
 
74
- The user explicitly wants to look back at this task — not as a forced step, only when they ask.
74
+ 用户明确希望回顾本次任务——不是强制步骤,仅在用户要求时执行。
75
75
 
76
76
  - "Summarize what we did in this task."
77
77
  - "What were the key decisions / surprises?"
@@ -80,14 +80,14 @@ The user explicitly wants to look back at this task — not as a forced step, on
80
80
  - "记一下这次踩的坑"
81
81
  - "复盘下这个任务"
82
82
 
83
- Reach: identify the current task's session id (from `.cviauto/.runtime/sessions/*.json` or `mem list --task <task-dir>`), then `extract <id> --phase brainstorm` and `--phase implement`. Present a summary — surface concrete file:line citations where possible. Whether to also write the summary somewhere (PRD, spec, notes file) is the user's call; offer, don't auto-write.
83
+ 操作:识别当前任务的会话 ID(从 `.cviauto/.runtime/sessions/*.json` `mem list --task <task-dir>`),然后 `extract <id> --phase brainstorm` `--phase implement`。给出摘要——尽可能提供具体的文件:行号引用。是否将摘要写入某处(PRDspec、笔记文件)由用户决定;主动提议,不要自动写入。
84
84
 
85
- ## Anti-patterns: do NOT reach for `mem` here
85
+ ## 反模式:不要在以下场景使用 `mem`
86
86
 
87
- - "What does this function do?" → read the file.
88
- - "Why is this test failing?" → read the test output and the file.
89
- - "What's the right pattern for X in our codebase?" → grep / read spec files.
90
- - "What's the latest npm version of Y?" → call `npm view`.
91
- - "Fix this bug." → debug. Reach for `mem` only if you suspect prior context exists; otherwise it is noise.
87
+ - "这个函数是做什么的?" → 读取文件。
88
+ - "这个测试为什么失败?" → 读取测试输出和文件。
89
+ - "我们代码库中 X 的正确模式是什么?" → grep / 读取 spec 文件。
90
+ - "Y 的最新 npm 版本是什么?" → 调用 `npm view`。
91
+ - "修复这个 bug" → 调试。只有在你怀疑存在先验上下文时才使用 `mem`;否则它只是噪音。
92
92
 
93
- The bar stays: would a senior teammate ask "didn't we already talk about this?" before answering? If yes, reach for `mem`. If no, don't.
93
+ 判断标准始终是:在回答之前,一个资深同事会问"我们之前不是讨论过这个吗?" 如果是,就使用 `mem`。如果不是,就不要用。
@@ -3,39 +3,39 @@ name: cviauto-spec-bootstrap
3
3
  description: "Bootstrap project-specific Cviauto coding specs with a platform-neutral single-agent workflow. Use when creating or refreshing .cviauto/spec guidelines, analyzing a codebase with GitNexus, ABCoder, or source inspection, decomposing package/layer spec work, and writing real codebase-backed spec docs without placeholder text."
4
4
  ---
5
5
 
6
- # Cviauto Spec Bootstrap
6
+ # Cviauto Spec 引导
7
7
 
8
- Use this skill to create or refresh `.cviauto/spec/` guidelines from the real codebase. One capable agent owns the full loop: analyze the repository, choose the spec boundaries, write the docs, and verify the result. The workflow does not depend on a specific host, CLI, or agent brand.
8
+ 使用此技能从真实代码库创建或刷新 `.cviauto/spec/` 指南。一个有能力 Agent 拥有完整循环:分析仓库、选择 spec 边界、编写文档、验证结果。此工作流不依赖特定的宿主、CLI Agent 品牌。
9
9
 
10
- ## Workflow
10
+ ## 工作流
11
11
 
12
- 1. Confirm Cviauto is initialized and inspect the current `.cviauto/spec/` tree.
13
- 2. Analyze the repository architecture with the best available tools: GitNexus, ABCoder, language tooling, and direct source reads.
14
- 3. Decompose the spec work by package and layer only when that reflects the actual codebase.
15
- 4. Fill or reshape the spec files with concrete patterns, file paths, examples, and anti-patterns from the project.
16
- 5. Verify that the final specs are internally consistent and contain no template placeholders.
12
+ 1. 确认 Cviauto 已初始化并检查当前 `.cviauto/spec/` 树。
13
+ 2. 使用最佳可用工具分析仓库架构:GitNexusABCoder、语言工具和直接源码阅读。
14
+ 3. 仅在反映实际代码库时按 package layer 分解 spec 工作。
15
+ 4. 用项目中的具体模式、文件路径、示例和反模式填充或重塑 spec 文件。
16
+ 5. 验证最终 spec 内部一致且不含模板占位符。
17
17
 
18
- ## Reference Routing
18
+ ## 参考路由
19
19
 
20
- | Need | Read |
20
+ | 需求 | 阅读 |
21
21
  |------|------|
22
- | Repository architecture analysis | [references/repository-analysis.md](references/repository-analysis.md) |
23
- | Spec work decomposition and task planning | [references/spec-task-planning.md](references/spec-task-planning.md) |
24
- | Writing high-signal Cviauto spec files | [references/spec-writing.md](references/spec-writing.md) |
25
- | GitNexus and ABCoder MCP setup | [references/mcp-setup.md](references/mcp-setup.md) |
26
-
27
- ## Operating Rules
28
-
29
- - Treat templates as starting points, not contracts. Delete, rename, split, or add spec files when the repository calls for it.
30
- - Prefer source-backed rules over generic advice. Every important recommendation should point at a real file or repeated local pattern.
31
- - Keep execution single-owner by default. Optional helper agents are an implementation detail, not a requirement or user-visible dependency.
32
- - Do not write platform-specific instructions unless the target project already standardizes on that platform.
33
- - Do not leave placeholder text, empty headings, or copied boilerplate in `.cviauto/spec/`.
34
-
35
- ## Done Criteria
36
-
37
- - `.cviauto/spec/` describes the project as it exists now.
38
- - Each relevant package or layer has practical coding guidance with real examples.
39
- - Non-applicable template sections are removed.
40
- - `index.md` files match the final spec file set.
41
- - Any required setup or analysis assumptions are documented in the relevant spec or task notes.
22
+ | 仓库架构分析 | [references/repository-analysis.md](references/repository-analysis.md) |
23
+ | Spec 工作分解与任务规划 | [references/spec-task-planning.md](references/spec-task-planning.md) |
24
+ | 编写高信号 Cviauto spec 文件 | [references/spec-writing.md](references/spec-writing.md) |
25
+ | GitNexus ABCoder MCP 设置 | [references/mcp-setup.md](references/mcp-setup.md) |
26
+
27
+ ## 操作规则
28
+
29
+ - 将模板视为起点,而非契约。当仓库需要时,删除、重命名、拆分或添加 spec 文件。
30
+ - 优先基于源码的规则而非通用建议。每条重要建议都应指向真实文件或重复出现的本地模式。
31
+ - 默认保持单执行者。可选的辅助 Agent 是实现细节,而非需求或用户可见的依赖。
32
+ - 除非目标项目已标准化在该平台上,否则不编写平台特定指令。
33
+ - 不在 `.cviauto/spec/` 中留占位符文本、空标题或复制的样板内容。
34
+
35
+ ## 完成标准
36
+
37
+ - `.cviauto/spec/` 描述了项目当前的实际状态。
38
+ - 每个相关 package layer 都有包含真实示例的实用编码指导。
39
+ - 不适用的模板部分已移除。
40
+ - `index.md` 文件与最终 spec 文件集匹配。
41
+ - 任何所需设置或分析假设已在相关 spec 或任务笔记中记录。
@@ -1,57 +1,57 @@
1
- # MCP Setup
1
+ # MCP 设置
2
2
 
3
- GitNexus and ABCoder are recommended when bootstrapping Cviauto specs because they expose architecture and AST context to the agent. They are tool choices, not platform requirements. Configure them through whatever MCP mechanism your agent host provides.
3
+ GitNexus ABCoder 是在引导 Cviauto 规格(spec)时推荐使用的工具,因为它们能向 agent 暴露架构和 AST 上下文。它们是工具选择,而非平台要求。请通过你的 agent 宿主提供的任何 MCP 机制来配置它们。
4
4
 
5
5
  ## GitNexus
6
6
 
7
- GitNexus builds a code knowledge graph from the repository. Use it for module boundaries, execution flows, dependency relationships, blast radius, and graph queries.
7
+ GitNexus 从仓库构建代码知识图谱。用于模块边界、执行流程、依赖关系、影响范围(blast radius)和图查询。
8
8
 
9
- ### Install and Index
9
+ ### 安装与索引
10
10
 
11
11
  ```bash
12
- # Run from the repository root.
12
+ # 从仓库根目录运行。
13
13
  npx gitnexus analyze
14
14
 
15
- # Check index status.
15
+ # 检查索引状态。
16
16
  npx gitnexus status
17
17
 
18
- # Re-index after code changes when the analysis is stale.
18
+ # 代码变更后,当分析结果过时时重新索引。
19
19
  npx gitnexus analyze
20
20
  ```
21
21
 
22
- The index is written to `.gitnexus/`. Keep embeddings only if the project already uses them; otherwise a normal index is enough for spec bootstrapping.
22
+ 索引写入 `.gitnexus/` 目录。仅在项目已使用嵌入(embeddings)时才保留它们;否则,普通索引就足以支持 spec 引导。
23
23
 
24
- ### MCP Server Command
24
+ ### MCP 服务器命令
25
25
 
26
- Use this server command in the host's MCP configuration:
26
+ 在宿主 MCP 配置中使用以下服务器命令:
27
27
 
28
28
  ```bash
29
29
  npx -y gitnexus mcp
30
30
  ```
31
31
 
32
- ### Useful Tools
32
+ ### 常用工具
33
33
 
34
- | Tool | Purpose |
34
+ | 工具 | 用途 |
35
35
  |------|---------|
36
- | `gitnexus_query` | Find execution flows and functional areas by concept |
37
- | `gitnexus_context` | Inspect callers, callees, references, and process participation for a symbol |
38
- | `gitnexus_impact` | Understand blast radius before changing a symbol |
39
- | `gitnexus_detect_changes` | Check changed symbols and affected flows before finishing |
40
- | `gitnexus_cypher` | Run direct graph queries |
41
- | `gitnexus_list_repos` | List indexed repositories |
36
+ | `gitnexus_query` | 按概念查找执行流程和功能区域 |
37
+ | `gitnexus_context` | 检查某个符号的调用者、被调用者、引用以及参与的执行流程 |
38
+ | `gitnexus_impact` | 在修改某个符号之前了解其影响范围 |
39
+ | `gitnexus_detect_changes` | 在完成前检查变更的符号和受影响的功能流程 |
40
+ | `gitnexus_cypher` | 运行直接图查询 |
41
+ | `gitnexus_list_repos` | 列出已索引的仓库 |
42
42
 
43
43
  ## ABCoder
44
44
 
45
- ABCoder parses code into UniAST and gives precise package, file, and node-level structure. Use it for signatures, type shapes, implementations, dependencies, and reverse references.
45
+ ABCoder 将代码解析为 UniAST,并提供精确的包、文件和节点级结构。用于签名、类型形态、实现、依赖关系和反向引用。
46
46
 
47
- ### Install
47
+ ### 安装
48
48
 
49
49
  ```bash
50
50
  go install github.com/cloudwego/abcoder@latest
51
51
  abcoder --help
52
52
  ```
53
53
 
54
- ### Parse Repositories
54
+ ### 解析仓库
55
55
 
56
56
  ```bash
57
57
  abcoder parse /absolute/path/to/package \
@@ -60,31 +60,31 @@ abcoder parse /absolute/path/to/package \
60
60
  --output ~/abcoder-asts
61
61
  ```
62
62
 
63
- For monorepos, parse each package with a stable `--name` so task notes can reference the same repository names.
63
+ 对于 monorepo,使用稳定的 `--name` 解析每个包,以便任务笔记可以引用相同的仓库名称。
64
64
 
65
- ### MCP Server Command
65
+ ### MCP 服务器命令
66
66
 
67
- Use this server command in the host's MCP configuration:
67
+ 在宿主 MCP 配置中使用以下服务器命令:
68
68
 
69
69
  ```bash
70
70
  abcoder mcp ~/abcoder-asts
71
71
  ```
72
72
 
73
- ### Useful Tools
73
+ ### 常用工具
74
74
 
75
- | Tool | Layer | Purpose |
75
+ | 工具 | 层级 | 用途 |
76
76
  |------|-------|---------|
77
- | `list_repos` | 1 | List parsed repositories |
78
- | `get_repo_structure` | 2 | Inspect packages and files |
79
- | `get_package_structure` | 3 | Inspect nodes within a package |
80
- | `get_file_structure` | 3 | Inspect functions, classes, types, and signatures in a file |
81
- | `get_ast_node` | 4 | Retrieve code, dependencies, references, and implementations |
77
+ | `list_repos` | 1 | 列出已解析的仓库 |
78
+ | `get_repo_structure` | 2 | 检查包和文件 |
79
+ | `get_package_structure` | 3 | 检查包内的节点 |
80
+ | `get_file_structure` | 3 | 检查文件中的函数、类、类型和签名 |
81
+ | `get_ast_node` | 4 | 检索代码、依赖关系、引用和实现 |
82
82
 
83
- ## Verification
83
+ ## 验证
84
84
 
85
- After configuration, verify from the agent host that both MCP servers are visible. Then run one simple query against each server before starting the spec writing pass.
85
+ 配置完成后,从 agent 宿主验证两个 MCP 服务器均可见。然后在开始 spec 编写之前,对每个服务器运行一个简单查询。
86
86
 
87
87
  ```bash
88
88
  ls .gitnexus/meta.json
89
89
  ls ~/abcoder-asts/*.json
90
- ```
90
+ ```
@@ -1,30 +1,30 @@
1
- # Repository Analysis
1
+ # 仓库分析
2
2
 
3
- The goal is to discover the project's real architecture before writing rules. Do not start from generic spec templates and fill blanks. Start from the code, then let the spec structure follow.
3
+ 目标是在编写规则之前发现项目的真实架构。不要从通用 spec 模板开始填空,而应从代码出发,让 spec 结构跟随代码。
4
4
 
5
- ## Analysis Order
5
+ ## 分析顺序
6
6
 
7
- 1. Read the existing `.cviauto/spec/` tree and note which files are templates, outdated, or already project-specific.
8
- 2. Inspect package manifests, build scripts, workspace config, and top-level documentation to identify packages and runtime layers.
9
- 3. Use GitNexus for execution flows, module clusters, dependency hubs, and impact-sensitive areas.
10
- 4. Use ABCoder or language-native tooling for exact signatures, types, class boundaries, and implementation examples.
11
- 5. Read representative source and test files directly before turning any finding into a spec rule.
7
+ 1. 阅读现有的 `.cviauto/spec/` 目录树,注意哪些文件是模板、哪些已过时、哪些已针对项目定制。
8
+ 2. 检查包清单、构建脚本、工作区配置和顶层文档,以识别包和运行时分层。
9
+ 3. 使用 GitNexus 获取执行流程、模块集群、依赖枢纽和影响敏感区域。
10
+ 4. 使用 ABCoder 或语言原生工具获取精确的签名、类型、类边界和实现示例。
11
+ 5. 在将任何发现转化为 spec 规则之前,直接阅读有代表性的源文件和测试文件。
12
12
 
13
- ## What To Capture
13
+ ## 需要捕获的内容
14
14
 
15
- | Area | Questions |
15
+ | 领域 | 要回答的问题 |
16
16
  |------|-----------|
17
- | Package boundaries | What does each package own? What imports cross boundaries? |
18
- | Runtime layers | Which code is CLI, backend, frontend, worker, shared library, test-only, or tooling? |
19
- | Core abstractions | Which types, services, stores, commands, routes, or adapters define the system shape? |
20
- | Data flow | Where does user input enter, how is it validated, and where does state persist? |
21
- | Error handling | How are failures represented, logged, surfaced, and tested? |
22
- | Configuration | Where do defaults, environment config, generated files, and templates live? |
23
- | Tests | Which test styles are trusted examples for new work? |
17
+ | 包边界 | 每个包拥有什么?哪些导入跨越了边界? |
18
+ | 运行时分层 | 哪些代码是 CLI、后端、前端、worker、共享库、仅测试代码或工具? |
19
+ | 核心抽象 | 哪些类型、服务、存储、命令、路由或适配器定义了系统形态? |
20
+ | 数据流 | 用户输入从哪里进入,如何验证,状态在哪里持久化? |
21
+ | 错误处理 | 失败如何表示、记录、暴露和测试? |
22
+ | 配置 | 默认值、环境配置、生成文件和模板分别存放在哪里? |
23
+ | 测试 | 哪些测试风格可以作为新工作的可信范例? |
24
24
 
25
- ## GitNexus Usage
25
+ ## GitNexus 用法
26
26
 
27
- Start broad, then inspect specific symbols:
27
+ 从宽泛入手,然后检查具体符号:
28
28
 
29
29
  ```text
30
30
  gitnexus_query({query: "CLI command execution flow"})
@@ -33,11 +33,11 @@ gitnexus_context({name: "SymbolName"})
33
33
  gitnexus_cypher({query: "MATCH (n)-[r]->(m) RETURN n.name, type(r), m.name LIMIT 30"})
34
34
  ```
35
35
 
36
- Use GitNexus results to find important files and flows. Do not quote graph output as the final authority until you have checked the relevant source files.
36
+ 使用 GitNexus 结果来查找重要文件和流程。在检查相关源文件之前,不要将图输出作为最终权威。
37
37
 
38
- ## ABCoder Usage
38
+ ## ABCoder 用法
39
39
 
40
- Use ABCoder when the spec needs exact code shapes:
40
+ spec 需要精确的代码形态时使用 ABCoder:
41
41
 
42
42
  ```text
43
43
  list_repos()
@@ -46,14 +46,14 @@ get_file_structure({repo_name: "package-name", file_path: "src/example.ts"})
46
46
  get_ast_node({repo_name: "package-name", node_ids: [{mod_path: "...", pkg_path: "...", name: "SymbolName"}]})
47
47
  ```
48
48
 
49
- ABCoder is most valuable for documenting constructor patterns, function signatures, type contracts, and reference chains.
49
+ ABCoder 在记录构造器模式、函数签名、类型契约和引用链时最有价值。
50
50
 
51
- ## Analysis Notes
51
+ ## 分析笔记
52
52
 
53
- Keep short notes while analyzing. The notes should include:
53
+ 分析时保持简短记录。笔记应包含:
54
54
 
55
- - Package or layer name.
56
- - Files that define the local pattern.
57
- - Rules the spec should teach.
58
- - Anti-patterns found in old code, comments, tests, or migration paths.
59
- - Spec files that should be created, deleted, renamed, or merged.
55
+ - 包或层名称。
56
+ - 定义了本地模式的文件。
57
+ - spec 应教授的规则。
58
+ - 在旧代码、注释、测试或迁移路径中发现的的反模式(anti-pattern)。
59
+ - 应创建、删除、重命名或合并的 spec 文件。
@@ -1,61 +1,61 @@
1
- # Spec Task Planning
1
+ # Spec 任务规划
2
2
 
3
- Use a single agent as the default execution model. The agent may create Cviauto tasks for traceability, but the skill should not require a specific platform, CLI, or parallel worker model.
3
+ 使用单个 agent 作为默认执行模型。agent 可以创建 Cviauto 任务以便追踪,但此 skill 不应要求特定平台、CLI 或并行 worker 模型。
4
4
 
5
- ## Decomposition
5
+ ## 分解
6
6
 
7
- Create spec work units around real ownership boundaries:
7
+ 围绕真实的归属边界创建 spec 工作单元:
8
8
 
9
- - One package when a package has its own conventions.
10
- - One layer when the same package has distinct frontend, backend, CLI, worker, or shared-library rules.
11
- - One cross-cutting guide when a pattern spans packages and is not owned by one layer.
9
+ - 当一个包有自己的约定时,作为一个工作单元。
10
+ - 当同一个包有独立的前端、后端、CLIworker 或共享库规则时,每个层作为一个工作单元。
11
+ - 当某个模式跨越多个包且不属于某个层时,作为一个跨领域指南。
12
12
 
13
- Avoid artificial decomposition. A small library usually needs one focused spec pass, not several tasks.
13
+ 避免人为分解。一个小型库通常只需要一次集中的 spec 编写,而不是多个任务。
14
14
 
15
- ## Task Shape
15
+ ## 任务形态
16
16
 
17
- When a Cviauto task is useful, write a concise PRD with these sections:
17
+ Cviauto 任务有用时,编写一份简洁的 PRD,包含以下章节:
18
18
 
19
19
  ```markdown
20
- # Fill <package-or-layer> Cviauto Specs
20
+ # 填写 <包或层名称> Cviauto Specs
21
21
 
22
- ## Goal
23
- Write project-specific `.cviauto/spec/` guidance for <scope>.
22
+ ## 目标(Goal
23
+ <范围> 编写项目特定的 `.cviauto/spec/` 指导。
24
24
 
25
- ## Scope
26
- - Spec directory:
27
- - Source directories to inspect:
28
- - Tests to inspect:
29
- - Out of scope:
25
+ ## 范围(Scope
26
+ - Spec 目录:
27
+ - 需要检查的源目录:
28
+ - 需要检查的测试:
29
+ - 超出范围:
30
30
 
31
- ## Architecture Context
32
- Summarize the concrete findings from repository analysis.
31
+ ## 架构上下文(Architecture Context
32
+ 汇总仓库分析中的具体发现。
33
33
 
34
- ## Files To Create Or Update
34
+ ## 需要创建或更新的文件
35
35
  - `.cviauto/spec/.../index.md`
36
36
  - `.cviauto/spec/.../<topic>.md`
37
37
 
38
- ## Rules
39
- - Adapt the spec file set to the real codebase.
40
- - Use real source examples with file paths.
41
- - Remove template-only sections that do not apply.
42
- - Do not modify product source code unless the task explicitly asks for it.
43
-
44
- ## Acceptance Criteria
45
- - [ ] Specs contain concrete examples and anti-patterns from the repository.
46
- - [ ] No placeholder text remains.
47
- - [ ] Index files match the final spec files.
48
- - [ ] Claims are backed by source files, tests, or project docs.
38
+ ## 规则
39
+ - spec 文件集适配真实代码库。
40
+ - 使用带有文件路径的真实源码示例。
41
+ - 删除不适用的纯模板章节。
42
+ - 除非任务明确要求,否则不要修改产品源代码。
43
+
44
+ ## 验收标准(Acceptance Criteria
45
+ - [ ] Spec 包含来自仓库的具体示例和反模式。
46
+ - [ ] 没有残留的占位文本。
47
+ - [ ] 索引文件与实际 spec 文件匹配。
48
+ - [ ] 所有声明都有源文件、测试或项目文档作为支撑。
49
49
  ```
50
50
 
51
- ## Optional Helper Agents
51
+ ## 可选的辅助 Agent
52
52
 
53
- If the host supports subagents, helpers can inspect independent packages or run verification. They are optional. The main agent still owns integration and final quality.
53
+ 如果宿主支持子 agent,辅助 agent 可以检查独立的包或运行验证。它们是可选的。主 agent 仍然负责集成和最终质量。
54
54
 
55
- Helper tasks must have clear ownership:
55
+ 辅助任务必须有明确的归属:
56
56
 
57
- - Read-only research tasks may inspect any source needed for the assigned scope.
58
- - Write tasks should own disjoint spec directories.
59
- - Verification tasks should check placeholder removal, broken links, and consistency.
57
+ - 只读研究任务可以检查分配给其范围内的任何源文件。
58
+ - 写入任务应拥有互不重叠的 spec 目录。
59
+ - 验证任务应检查占位符残留、断链和一致性。
60
60
 
61
- Do not encode helper-agent names, vendor-specific commands, or platform-specific routing in the skill. Put only the required work and acceptance criteria in the task.
61
+ 不要在 skill 中硬编码辅助 agent 名称、供应商特定命令或平台特定路由。在任务中只放入所需的工作和验收标准。
@@ -1,70 +1,70 @@
1
- # Spec Writing
1
+ # Spec 编写
2
2
 
3
- Cviauto specs are coding guidance for future agents. They should explain how to work in this repository, not how a generic project might be organized.
3
+ Cviauto spec 是面向未来 agent 的编码指导。它们应当解释如何在这个仓库中工作,而不是描述一个通用项目可能如何组织。
4
4
 
5
- ## Write From Evidence
5
+ ## 基于证据编写
6
6
 
7
- Each important rule should be backed by one of these:
7
+ 每条重要规则都应得到以下内容之一的支持:
8
8
 
9
- - A source file that demonstrates the preferred pattern.
10
- - A test file that shows expected behavior.
11
- - A project document that defines the convention.
12
- - A repeated pattern across multiple files.
9
+ - 一个展示了首选模式的源文件。
10
+ - 一个展示了预期行为的测试文件。
11
+ - 一个定义了该约定的项目文档。
12
+ - 跨多个文件重复出现的模式。
13
13
 
14
- Use short snippets only when they make the rule clearer. Prefer linking to the file path and naming the symbol or behavior.
14
+ 仅在能使规则更清晰时使用简短代码片段。优先链接到文件路径并命名符号或行为。
15
15
 
16
- ## File Structure
16
+ ## 文件结构
17
17
 
18
- Keep the spec tree aligned with the project:
18
+ 保持 spec 目录树与项目对齐:
19
19
 
20
- - Keep `index.md` as the navigation file for the spec directory.
21
- - Split topics when developers would look for them independently.
22
- - Merge topics when separate files would repeat the same rule.
23
- - Delete template files that do not apply.
24
- - Add new files for important local patterns the template missed.
20
+ - 保留 `index.md` 作为 spec 目录的导航文件。
21
+ - 当开发者会独立查找某个主题时,将其拆分。
22
+ - 当独立文件会重复同一规则时,将主题合并。
23
+ - 删除不适用的模板文件。
24
+ - 为模板遗漏的重要本地模式添加新文件。
25
25
 
26
- ## Content Standards
26
+ ## 内容标准
27
27
 
28
- Good spec sections include:
28
+ 好的 spec 章节应包含:
29
29
 
30
- - When the rule applies.
31
- - The local pattern to follow.
32
- - The source or test files that prove the pattern.
33
- - Common mistakes or anti-patterns.
34
- - Verification commands or checks when they are specific and reliable.
30
+ - 规则适用的场景。
31
+ - 应遵循的本地模式。
32
+ - 证明该模式的源文件或测试文件。
33
+ - 常见错误或反模式。
34
+ - 当具体可靠时,提供验证命令或检查方法。
35
35
 
36
- Avoid:
36
+ 应避免:
37
37
 
38
- - Placeholder prose.
39
- - Generic framework advice.
40
- - Tool instructions that only work in one agent host.
41
- - Long copied code blocks.
42
- - Rules based on a single accidental implementation detail.
38
+ - 占位文字。
39
+ - 通用框架建议。
40
+ - 仅在某个 agent 宿主中有效的工具指令。
41
+ - 大段复制的代码块。
42
+ - 基于单个偶然实现细节的规则。
43
43
 
44
- ## Example Shape
44
+ ## 示例形态
45
45
 
46
46
  ```markdown
47
- ## Command Handlers
47
+ ## 命令处理器(Command Handlers
48
48
 
49
- Command handlers should keep argument parsing, validation, and side effects separate. The local pattern is:
49
+ 命令处理器应将参数解析、验证和副作用分离。本地模式是:
50
50
 
51
- - Parse CLI flags at the command boundary.
52
- - Convert raw inputs into typed task options before invoking core logic.
53
- - Keep filesystem writes in the command or service layer, not in template helpers.
51
+ - 在命令边界解析 CLI 标志。
52
+ - 在调用核心逻辑之前,将原始输入转换为类型化的任务选项。
53
+ - 将文件系统写入保留在命令层或服务层,而非模板辅助函数中。
54
54
 
55
- Reference files:
55
+ 参考文件:
56
56
  - `packages/cli/src/commands/example.ts`
57
57
  - `packages/cli/test/commands/example.test.ts`
58
58
 
59
- Avoid passing raw `process.argv` or unvalidated config objects into shared helpers.
59
+ 避免将原始 `process.argv` 或未验证的配置对象传递给共享辅助函数。
60
60
  ```
61
61
 
62
- ## Final Pass
62
+ ## 最终检查
63
63
 
64
- Before finishing:
64
+ 完成前:
65
65
 
66
66
  ```bash
67
67
  grep -R "To be filled\\|TODO: fill\\|placeholder" .cviauto/spec
68
68
  ```
69
69
 
70
- Also check links, index files, and whether any spec still describes a template rather than this repository.
70
+ 同时检查链接、索引文件,以及是否有 spec 仍然描述模板而非本仓库。