@justsilver/opencode-team 0.2.2-beta.2 → 0.2.2-beta.3

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.2-beta.3] - 2026-11-18
11
+
12
+ ### Changed
13
+
14
+ - 角色提示词改以 `plugin/opencode-team/prompts/*.md` 为唯一来源:Frontmatter 的 `description`
15
+ 作为 Agent 描述、正文作为 System Prompt,构建阶段生成 `prompts.generated.ts`;
16
+ `npm run check:prompts`(CI 与 `prepack`)阻止生成物与 Markdown 漂移。提示词内容、
17
+ Agent 职责、权限与模型策略未变。
18
+
10
19
  ## [0.2.2-beta.2] - 2026-11-18
11
20
 
12
21
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justsilver/opencode-team",
3
- "version": "0.2.2-beta.2",
3
+ "version": "0.2.2-beta.3",
4
4
  "type": "module",
5
5
  "description": "Zero-config multi-agent team for OpenCode V2: Orchestrator, QA, Reviewer, and per-agent subagent model/variant policy",
6
6
  "license": "MIT",
@@ -32,8 +32,10 @@
32
32
  "scripts": {
33
33
  "test": "node --test",
34
34
  "typecheck": "tsc --noEmit",
35
+ "build:prompts": "node scripts/build-prompts.mjs gen",
36
+ "check:prompts": "node scripts/build-prompts.mjs check",
35
37
  "build:tui": "node scripts/build-tui.mjs",
36
- "prepack": "node scripts/build-tui.mjs"
38
+ "prepack": "node scripts/build-prompts.mjs check && node scripts/build-tui.mjs"
37
39
  },
38
40
  "peerDependencies": {
39
41
  "@opentui/core": ">=0.8.4 <0.9.0",
@@ -1,8 +1,13 @@
1
- /**
2
- * Role prompts live here so responsibility boundaries can be refined without touching agent
3
- * registration or the model policy.
4
- */
5
- export const ORCHESTRATOR_PROMPT = `# Orchestrator — 主编排代理
1
+ // 由 scripts/build-prompts.mjs 从 prompts/*.md 生成,请勿手改;修改内容请改 Markdown 后运行 npm run build:prompts。
2
+
3
+ export interface GeneratedTeamPrompt {
4
+ readonly description: string
5
+ readonly system: string
6
+ }
7
+
8
+ export const ORCHESTRATOR_PROMPT: GeneratedTeamPrompt = {
9
+ description: "Primary team lead responsible for end-to-end delivery. Dynamically delegates or executes tasks, coordinates parallel work and Git operations, reconciles agent findings, and owns final decisions and verification.",
10
+ system: `# Orchestrator — 主编排代理
6
11
 
7
12
  你是软件工程团队的主编排代理(Orchestrator),负责从需求理解到最终交付的完整任务生命周期。
8
13
 
@@ -46,9 +51,12 @@ export const ORCHESTRATOR_PROMPT = `# Orchestrator — 主编排代理
46
51
  - 根据项目条件完成必要的构建、测试或其他验证。
47
52
  - 区分工作已执行、目标已达成和结果已验证,不将代理报告完成等同于任务通过验收。
48
53
  - 明确已验证结果、未验证内容、剩余风险及需要用户决策的问题。
49
- - 交付说明简洁,突出实际变更与验证结论。`
54
+ - 交付说明简洁,突出实际变更与验证结论。`,
55
+ }
50
56
 
51
- export const QA_PROMPT = `# QA — 独立质量保证代理
57
+ export const QA_PROMPT: GeneratedTeamPrompt = {
58
+ description: "Independent quality assurance agent. Designs and executes acceptance and regression tests against requirements and contracts, investigates failures, and independently verifies fixes. Production code changes require explicit authorization.",
59
+ system: `# QA — 独立质量保证代理
52
60
 
53
61
  你是独立质量保证代理(QA),负责从需求和可观察行为出发验证软件的正确性与可靠性。
54
62
 
@@ -84,9 +92,12 @@ export const QA_PROMPT = `# QA — 独立质量保证代理
84
92
 
85
93
  - 明确验收结论、实际执行结果、发现的缺陷和未覆盖风险。
86
94
  - 问题报告应包含足够的证据与复现信息。
87
- - 区分已确认缺陷、合理推断和待验证问题,不输出无依据的结论。`
95
+ - 区分已确认缺陷、合理推断和待验证问题,不输出无依据的结论。`,
96
+ }
88
97
 
89
- export const REVIEWER_PROMPT = `# Reviewer — 独立代码审查代理
98
+ export const REVIEWER_PROMPT: GeneratedTeamPrompt = {
99
+ description: "Independent code reviewer. Primarily reviews source code for correctness, architecture, and risks, using targeted verification when needed. Reports evidence-based findings without replacing QA acceptance testing. Production code changes require explicit authorization.",
100
+ system: `# Reviewer — 独立代码审查代理
90
101
 
91
102
  你是独立代码审查代理(Reviewer),负责从正确性、可靠性和工程质量角度评估实现。
92
103
 
@@ -135,4 +146,6 @@ export const REVIEWER_PROMPT = `# Reviewer — 独立代码审查代理
135
146
 
136
147
  区分已确认问题与待验证风险;没有充分证据时不得断言存在缺陷。
137
148
 
138
- 没有发现实质性问题时直接说明,不输出凑数建议,也不将未发现问题等同于实现已被全面验证。`
149
+ 没有发现实质性问题时直接说明,不输出凑数建议,也不将未发现问题等同于实现已被全面验证。`,
150
+ }
151
+
@@ -1,4 +1,4 @@
1
- import { ORCHESTRATOR_PROMPT, QA_PROMPT, REVIEWER_PROMPT } from "./prompts.ts"
1
+ import { ORCHESTRATOR_PROMPT, QA_PROMPT, REVIEWER_PROMPT } from "./prompts.generated.ts"
2
2
 
3
3
  export { TEAM_SUBAGENT_IDS } from "./team-ids.ts"
4
4
 
@@ -27,28 +27,25 @@ export const TEAM_AGENTS: readonly TeamAgentDefinition[] = [
27
27
  {
28
28
  id: "orchestrator",
29
29
  name: "Orchestrator",
30
- description:
31
- "Primary team lead responsible for end-to-end delivery. Dynamically delegates or executes tasks, coordinates parallel work and Git operations, reconciles agent findings, and owns final decisions and verification.",
30
+ description: ORCHESTRATOR_PROMPT.description,
32
31
  mode: "primary",
33
- system: ORCHESTRATOR_PROMPT,
32
+ system: ORCHESTRATOR_PROMPT.system,
34
33
  permissions: [],
35
34
  },
36
35
  {
37
36
  id: "qa",
38
37
  name: "QA",
39
- description:
40
- "Independent quality assurance agent. Designs and executes acceptance and regression tests against requirements and contracts, investigates failures, and independently verifies fixes. Production code changes require explicit authorization.",
38
+ description: QA_PROMPT.description,
41
39
  mode: "subagent",
42
- system: QA_PROMPT,
40
+ system: QA_PROMPT.system,
43
41
  permissions: LEAF_SUBAGENT_PERMISSIONS,
44
42
  },
45
43
  {
46
44
  id: "reviewer",
47
45
  name: "Reviewer",
48
- description:
49
- "Independent code reviewer. Primarily reviews source code for correctness, architecture, and risks, using targeted verification when needed. Reports evidence-based findings without replacing QA acceptance testing. Production code changes require explicit authorization.",
46
+ description: REVIEWER_PROMPT.description,
50
47
  mode: "subagent",
51
- system: REVIEWER_PROMPT,
48
+ system: REVIEWER_PROMPT.system,
52
49
  permissions: LEAF_SUBAGENT_PERMISSIONS,
53
50
  },
54
51
  ]