@sireai/optimus 0.1.1

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 (204) hide show
  1. package/.env.example +16 -0
  2. package/LICENSE +21 -0
  3. package/README.md +104 -0
  4. package/dist/cli/optimus.d.ts +2 -0
  5. package/dist/cli/optimus.js +2951 -0
  6. package/dist/cli/optimus.js.map +1 -0
  7. package/dist/cli/self-update.d.ts +49 -0
  8. package/dist/cli/self-update.js +264 -0
  9. package/dist/cli/self-update.js.map +1 -0
  10. package/dist/config/load-config.d.ts +3 -0
  11. package/dist/config/load-config.js +321 -0
  12. package/dist/config/load-config.js.map +1 -0
  13. package/dist/config/optimus-paths.d.ts +13 -0
  14. package/dist/config/optimus-paths.js +44 -0
  15. package/dist/config/optimus-paths.js.map +1 -0
  16. package/dist/index.d.ts +25 -0
  17. package/dist/index.js +27 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/integrations/jira/jira-cli.d.ts +1 -0
  20. package/dist/integrations/jira/jira-cli.js +278 -0
  21. package/dist/integrations/jira/jira-cli.js.map +1 -0
  22. package/dist/integrations/jira/jira-client.d.ts +99 -0
  23. package/dist/integrations/jira/jira-client.js +521 -0
  24. package/dist/integrations/jira/jira-client.js.map +1 -0
  25. package/dist/integrations/jira/jira-submit.d.ts +71 -0
  26. package/dist/integrations/jira/jira-submit.js +351 -0
  27. package/dist/integrations/jira/jira-submit.js.map +1 -0
  28. package/dist/problem-solving-core/codex/codex-auth-resolver.d.ts +23 -0
  29. package/dist/problem-solving-core/codex/codex-auth-resolver.js +136 -0
  30. package/dist/problem-solving-core/codex/codex-auth-resolver.js.map +1 -0
  31. package/dist/problem-solving-core/codex/codex-connectivity-checks.d.ts +6 -0
  32. package/dist/problem-solving-core/codex/codex-connectivity-checks.js +81 -0
  33. package/dist/problem-solving-core/codex/codex-connectivity-checks.js.map +1 -0
  34. package/dist/problem-solving-core/codex/codex-failure-classifier.d.ts +2 -0
  35. package/dist/problem-solving-core/codex/codex-failure-classifier.js +49 -0
  36. package/dist/problem-solving-core/codex/codex-failure-classifier.js.map +1 -0
  37. package/dist/problem-solving-core/codex/codex-global-config.d.ts +17 -0
  38. package/dist/problem-solving-core/codex/codex-global-config.js +100 -0
  39. package/dist/problem-solving-core/codex/codex-global-config.js.map +1 -0
  40. package/dist/problem-solving-core/codex/codex-preflight.d.ts +13 -0
  41. package/dist/problem-solving-core/codex/codex-preflight.js +142 -0
  42. package/dist/problem-solving-core/codex/codex-preflight.js.map +1 -0
  43. package/dist/problem-solving-core/codex/codex-provider-profile.d.ts +14 -0
  44. package/dist/problem-solving-core/codex/codex-provider-profile.js +68 -0
  45. package/dist/problem-solving-core/codex/codex-provider-profile.js.map +1 -0
  46. package/dist/problem-solving-core/codex/codex-required-env.d.ts +3 -0
  47. package/dist/problem-solving-core/codex/codex-required-env.js +21 -0
  48. package/dist/problem-solving-core/codex/codex-required-env.js.map +1 -0
  49. package/dist/problem-solving-core/codex/codex-runner.d.ts +37 -0
  50. package/dist/problem-solving-core/codex/codex-runner.js +926 -0
  51. package/dist/problem-solving-core/codex/codex-runner.js.map +1 -0
  52. package/dist/problem-solving-core/codex/evolution-skill-guard.d.ts +36 -0
  53. package/dist/problem-solving-core/codex/evolution-skill-guard.js +143 -0
  54. package/dist/problem-solving-core/codex/evolution-skill-guard.js.map +1 -0
  55. package/dist/problem-solving-core/codex/repo-memory-service.d.ts +24 -0
  56. package/dist/problem-solving-core/codex/repo-memory-service.js +114 -0
  57. package/dist/problem-solving-core/codex/repo-memory-service.js.map +1 -0
  58. package/dist/problem-solving-core/codex/skill-sync-service.d.ts +35 -0
  59. package/dist/problem-solving-core/codex/skill-sync-service.js +280 -0
  60. package/dist/problem-solving-core/codex/skill-sync-service.js.map +1 -0
  61. package/dist/task-environment/cancellation/task-abort-registry.d.ts +17 -0
  62. package/dist/task-environment/cancellation/task-abort-registry.js +51 -0
  63. package/dist/task-environment/cancellation/task-abort-registry.js.map +1 -0
  64. package/dist/task-environment/cancellation/task-cancellation-service.d.ts +25 -0
  65. package/dist/task-environment/cancellation/task-cancellation-service.js +54 -0
  66. package/dist/task-environment/cancellation/task-cancellation-service.js.map +1 -0
  67. package/dist/task-environment/cancellation/task-cleanup-service.d.ts +22 -0
  68. package/dist/task-environment/cancellation/task-cleanup-service.js +67 -0
  69. package/dist/task-environment/cancellation/task-cleanup-service.js.map +1 -0
  70. package/dist/task-environment/delivery/commit-message/bugfix-commit-message-template.d.ts +13 -0
  71. package/dist/task-environment/delivery/commit-message/bugfix-commit-message-template.js +83 -0
  72. package/dist/task-environment/delivery/commit-message/bugfix-commit-message-template.js.map +1 -0
  73. package/dist/task-environment/delivery/commit-message/commit-message-builder.d.ts +6 -0
  74. package/dist/task-environment/delivery/commit-message/commit-message-builder.js +15 -0
  75. package/dist/task-environment/delivery/commit-message/commit-message-builder.js.map +1 -0
  76. package/dist/task-environment/delivery/commit-message/commit-message-template-types.d.ts +16 -0
  77. package/dist/task-environment/delivery/commit-message/commit-message-template-types.js +2 -0
  78. package/dist/task-environment/delivery/commit-message/commit-message-template-types.js.map +1 -0
  79. package/dist/task-environment/delivery/feishu-analysis-doc-service.d.ts +50 -0
  80. package/dist/task-environment/delivery/feishu-analysis-doc-service.js +454 -0
  81. package/dist/task-environment/delivery/feishu-analysis-doc-service.js.map +1 -0
  82. package/dist/task-environment/delivery/feishu-card-renderer.d.ts +38 -0
  83. package/dist/task-environment/delivery/feishu-card-renderer.js +449 -0
  84. package/dist/task-environment/delivery/feishu-card-renderer.js.map +1 -0
  85. package/dist/task-environment/delivery/feishu-content/feishu-content-renderer.d.ts +34 -0
  86. package/dist/task-environment/delivery/feishu-content/feishu-content-renderer.js +201 -0
  87. package/dist/task-environment/delivery/feishu-content/feishu-content-renderer.js.map +1 -0
  88. package/dist/task-environment/delivery/feishu-content/feishu-copy-config.d.ts +27 -0
  89. package/dist/task-environment/delivery/feishu-content/feishu-copy-config.js +74 -0
  90. package/dist/task-environment/delivery/feishu-content/feishu-copy-config.js.map +1 -0
  91. package/dist/task-environment/delivery/feishu-notifier.d.ts +45 -0
  92. package/dist/task-environment/delivery/feishu-notifier.js +250 -0
  93. package/dist/task-environment/delivery/feishu-notifier.js.map +1 -0
  94. package/dist/task-environment/delivery/feishu-templates/analysis-message-template.d.ts +6 -0
  95. package/dist/task-environment/delivery/feishu-templates/analysis-message-template.js +39 -0
  96. package/dist/task-environment/delivery/feishu-templates/analysis-message-template.js.map +1 -0
  97. package/dist/task-environment/delivery/feishu-templates/bugfix-message-template.d.ts +6 -0
  98. package/dist/task-environment/delivery/feishu-templates/bugfix-message-template.js +40 -0
  99. package/dist/task-environment/delivery/feishu-templates/bugfix-message-template.js.map +1 -0
  100. package/dist/task-environment/delivery/feishu-templates/default-message-template.d.ts +6 -0
  101. package/dist/task-environment/delivery/feishu-templates/default-message-template.js +33 -0
  102. package/dist/task-environment/delivery/feishu-templates/default-message-template.js.map +1 -0
  103. package/dist/task-environment/delivery/feishu-templates/patch-message-template.d.ts +6 -0
  104. package/dist/task-environment/delivery/feishu-templates/patch-message-template.js +40 -0
  105. package/dist/task-environment/delivery/feishu-templates/patch-message-template.js.map +1 -0
  106. package/dist/task-environment/delivery/feishu-templates/template-registry.d.ts +2 -0
  107. package/dist/task-environment/delivery/feishu-templates/template-registry.js +11 -0
  108. package/dist/task-environment/delivery/feishu-templates/template-registry.js.map +1 -0
  109. package/dist/task-environment/delivery/feishu-templates/template-types.d.ts +20 -0
  110. package/dist/task-environment/delivery/feishu-templates/template-types.js +2 -0
  111. package/dist/task-environment/delivery/feishu-templates/template-types.js.map +1 -0
  112. package/dist/task-environment/delivery/task-delivery-dispatcher.d.ts +14 -0
  113. package/dist/task-environment/delivery/task-delivery-dispatcher.js +109 -0
  114. package/dist/task-environment/delivery/task-delivery-dispatcher.js.map +1 -0
  115. package/dist/task-environment/delivery/task-delivery-service.d.ts +33 -0
  116. package/dist/task-environment/delivery/task-delivery-service.js +432 -0
  117. package/dist/task-environment/delivery/task-delivery-service.js.map +1 -0
  118. package/dist/task-environment/delivery/task-publication-service.d.ts +97 -0
  119. package/dist/task-environment/delivery/task-publication-service.js +1369 -0
  120. package/dist/task-environment/delivery/task-publication-service.js.map +1 -0
  121. package/dist/task-environment/execution-addresses.d.ts +40 -0
  122. package/dist/task-environment/execution-addresses.js +63 -0
  123. package/dist/task-environment/execution-addresses.js.map +1 -0
  124. package/dist/task-environment/intake/cli-file-intake.d.ts +12 -0
  125. package/dist/task-environment/intake/cli-file-intake.js +56 -0
  126. package/dist/task-environment/intake/cli-file-intake.js.map +1 -0
  127. package/dist/task-environment/intake/manual-problem-intake.d.ts +3 -0
  128. package/dist/task-environment/intake/manual-problem-intake.js +57 -0
  129. package/dist/task-environment/intake/manual-problem-intake.js.map +1 -0
  130. package/dist/task-environment/intake/polling-problem-intake.d.ts +14 -0
  131. package/dist/task-environment/intake/polling-problem-intake.js +232 -0
  132. package/dist/task-environment/intake/polling-problem-intake.js.map +1 -0
  133. package/dist/task-environment/observability/logger.d.ts +76 -0
  134. package/dist/task-environment/observability/logger.js +604 -0
  135. package/dist/task-environment/observability/logger.js.map +1 -0
  136. package/dist/task-environment/observability/runtime-panel.d.ts +82 -0
  137. package/dist/task-environment/observability/runtime-panel.js +1008 -0
  138. package/dist/task-environment/observability/runtime-panel.js.map +1 -0
  139. package/dist/task-environment/observability/sound-notifier.d.ts +18 -0
  140. package/dist/task-environment/observability/sound-notifier.js +71 -0
  141. package/dist/task-environment/observability/sound-notifier.js.map +1 -0
  142. package/dist/task-environment/orchestration/execution-context-assembler.d.ts +41 -0
  143. package/dist/task-environment/orchestration/execution-context-assembler.js +464 -0
  144. package/dist/task-environment/orchestration/execution-context-assembler.js.map +1 -0
  145. package/dist/task-environment/orchestration/git-change-classifier.d.ts +19 -0
  146. package/dist/task-environment/orchestration/git-change-classifier.js +106 -0
  147. package/dist/task-environment/orchestration/git-change-classifier.js.map +1 -0
  148. package/dist/task-environment/orchestration/harness-registry.d.ts +27 -0
  149. package/dist/task-environment/orchestration/harness-registry.js +116 -0
  150. package/dist/task-environment/orchestration/harness-registry.js.map +1 -0
  151. package/dist/task-environment/orchestration/harness-resolver.d.ts +8 -0
  152. package/dist/task-environment/orchestration/harness-resolver.js +39 -0
  153. package/dist/task-environment/orchestration/harness-resolver.js.map +1 -0
  154. package/dist/task-environment/orchestration/task-orchestrator.d.ts +45 -0
  155. package/dist/task-environment/orchestration/task-orchestrator.js +1122 -0
  156. package/dist/task-environment/orchestration/task-orchestrator.js.map +1 -0
  157. package/dist/task-environment/orchestration/task-package-assembler.d.ts +4 -0
  158. package/dist/task-environment/orchestration/task-package-assembler.js +10 -0
  159. package/dist/task-environment/orchestration/task-package-assembler.js.map +1 -0
  160. package/dist/task-environment/orchestration/triage-agent.d.ts +54 -0
  161. package/dist/task-environment/orchestration/triage-agent.js +636 -0
  162. package/dist/task-environment/orchestration/triage-agent.js.map +1 -0
  163. package/dist/task-environment/orchestration/triage-runner.d.ts +65 -0
  164. package/dist/task-environment/orchestration/triage-runner.js +655 -0
  165. package/dist/task-environment/orchestration/triage-runner.js.map +1 -0
  166. package/dist/task-environment/publication-target.d.ts +12 -0
  167. package/dist/task-environment/publication-target.js +174 -0
  168. package/dist/task-environment/publication-target.js.map +1 -0
  169. package/dist/task-environment/runtime/blocking-event-queue.d.ts +7 -0
  170. package/dist/task-environment/runtime/blocking-event-queue.js +27 -0
  171. package/dist/task-environment/runtime/blocking-event-queue.js.map +1 -0
  172. package/dist/task-environment/runtime/optimus-runtime.d.ts +69 -0
  173. package/dist/task-environment/runtime/optimus-runtime.js +751 -0
  174. package/dist/task-environment/runtime/optimus-runtime.js.map +1 -0
  175. package/dist/task-environment/storage/sqlite-event-store.d.ts +52 -0
  176. package/dist/task-environment/storage/sqlite-event-store.js +288 -0
  177. package/dist/task-environment/storage/sqlite-event-store.js.map +1 -0
  178. package/dist/task-environment/storage/sqlite-task-store.d.ts +122 -0
  179. package/dist/task-environment/storage/sqlite-task-store.js +1182 -0
  180. package/dist/task-environment/storage/sqlite-task-store.js.map +1 -0
  181. package/dist/types.d.ts +629 -0
  182. package/dist/types.js +2 -0
  183. package/dist/types.js.map +1 -0
  184. package/embedded-skills/shared/repo-inspection/SKILL.md +9 -0
  185. package/embedded-skills/shared/repo-inspection/skill.json +5 -0
  186. package/embedded-skills/task/bugfix/android-debug-protocol/SKILL.md +10 -0
  187. package/embedded-skills/task/bugfix/android-debug-protocol/skill.json +6 -0
  188. package/harness/AGENTS.md +30 -0
  189. package/harness/CHECKLIST.md +44 -0
  190. package/harness/CONSTRAINTS.md +60 -0
  191. package/harness/FRAMEWORK.md +28 -0
  192. package/harness/GOAL.md +28 -0
  193. package/harness/HANDOFF.md +45 -0
  194. package/harness/TASK_PLAN.md +79 -0
  195. package/optimus.config.template.json +34 -0
  196. package/package.json +109 -0
  197. package/task-harnesses/bugfix/ACCEPT.md +47 -0
  198. package/task-harnesses/bugfix/CONSTRAINTS.md +46 -0
  199. package/task-harnesses/bugfix/CONTEXT.md +29 -0
  200. package/task-harnesses/bugfix/EVOLUTION.md +82 -0
  201. package/task-harnesses/bugfix/ROLE.md +29 -0
  202. package/task-harnesses/bugfix/STANDARD.md +250 -0
  203. package/task-harnesses/bugfix/manifest.json +13 -0
  204. package/task-harnesses/registry.json +8 -0
@@ -0,0 +1,250 @@
1
+ # STANDARD
2
+
3
+ ## Execution loop
4
+
5
+ - Use PDCA, not guesswork.
6
+ - `Plan`: define problem, scope, strongest root-cause judgment or hypothesis, and validation path.
7
+ - `Do`: inspect evidence, make the minimum necessary change, add the smallest relevant verification when needed.
8
+ - `Check`: validate through reproduction, tests, scenarios, logs, output comparison, build, or code evidence.
9
+ - `Act`: close as fix or analysis and write one reviewable result file.
10
+
11
+ ## Patch gate
12
+
13
+ - Patch only when both root-cause judgment and validation path are credible.
14
+ - Create an explicit plan first when the task spans modules, has a long call chain, or exceeds a local change.
15
+ - Use code, config, logs, call chains, and tests as evidence.
16
+ - Keep changes minimal. Self-review the actual diff for regressions, boundary breaks, compatibility risk, and unnecessary changes before emitting a patch.
17
+ - If safe patching is not justified, stay in analysis mode.
18
+
19
+ ## Validation policy
20
+
21
+ - A claimed fix requires validation.
22
+ - Prefer stronger evidence before weaker evidence.
23
+ - Report the strongest level reached and why stronger levels were unavailable.
24
+
25
+ 1. `L4 functional`: real device, simulator, or another directly runnable environment
26
+ 2. `L3 self-check`: local unit tests, targeted custom tests, lightweight scenario injection
27
+ 3. `L2 build`: relevant compile target, module build, or targeted test task
28
+ 4. `L1 code evidence`: static reasoning, call-chain review, diff review
29
+
30
+ ### Android order
31
+
32
+ 1. Prefer real-device or simulator validation when `adb` and runnable targets exist.
33
+ 2. Otherwise prefer local tests or scenario injection.
34
+ 3. Use device-side automated checks only when local validation cannot cover the behavior.
35
+ 4. Fall back to compile validation such as `compileDebugKotlin` or relevant unit tests.
36
+ 5. Use code-only validation only when all stronger forms are unavailable.
37
+
38
+ ## Closure policy
39
+
40
+ - Close as fix only when analysis, code changes, validation evidence, and residual-risk understanding are credible.
41
+ - Close as analysis when information, environment, reproduction, or validation is insufficient for a trustworthy patch claim.
42
+ - If code changed but validation reached only `L2` or `L1`, describe it as a repair candidate, not a verified fix.
43
+ - If the issue is interaction, crash, device, integration, or resource related and validation stayed at `L2`, state what stronger environment or tooling was missing.
44
+ - If build or test failed for unrelated reasons, report the stage, failure reason, and why it is treated as noise or a pre-existing blocker.
45
+ - If only `L1` evidence exists, do not submit a formal patch claim; close as analysis.
46
+ - Analysis closure must still provide root-cause judgment, fix direction, and either targeted local guidance or a module-level strategy.
47
+
48
+ ## Runtime contract
49
+
50
+ - Return exactly one runtime JSON object.
51
+ - Normal fix closure and normal analysis closure both return `completed`.
52
+ - Return `failed` only when execution itself hits a real runtime exception.
53
+ - `resultPath` must point to exactly one file under `artifactDir`.
54
+ - Do not add extra keys or output prose outside the JSON object.
55
+
56
+ ### Examples
57
+
58
+ ```json
59
+ {
60
+ "status": "completed",
61
+ "resultPath": "<artifactDir>/result.md"
62
+ }
63
+ ```
64
+
65
+ ```json
66
+ {
67
+ "status": "failed",
68
+ "error": {
69
+ "category": "schema_error",
70
+ "message": "failure reason"
71
+ }
72
+ }
73
+ ```
74
+
75
+ ## Result artifacts
76
+
77
+ - Always generate `result.md` on normal completion.
78
+ - If code changed, runtime should also emit `patch.diff`.
79
+ - If `patch.diff` exists, `Closure Level` must not be `Analysis Only`.
80
+ - If `patch.diff` exists, Patch Closure Mode is mandatory.
81
+ - Before writing `result.md`, determine `Closure Level`, then follow exactly one language mode:
82
+ - `Verified Fix` or `Repair Candidate`: Patch Closure Mode; all narrative sections are English
83
+ - `Analysis Only`: Analysis Closure Mode; narrative sections are Chinese
84
+ - `Validation Summary` stays a single English token in all cases.
85
+ - Use repository-relative code paths only; never use absolute local paths.
86
+ - Commands, logs, stack traces, API errors, and identifiers may stay in their original language when needed.
87
+ - If closure is patch-related and any narrative field is Chinese, the output is invalid and must be rewritten.
88
+
89
+ ## Mandatory field-name contract
90
+
91
+ Do not rename these downstream-consumed keys:
92
+
93
+ - English patch-mode keys:
94
+ - `Validation Summary`
95
+ - `Strongest Current Conclusion`
96
+ - `Analysis Summary`
97
+ - `Key Evidence`
98
+ - `Recommended Action`
99
+ - `Analysis Doc URL`
100
+ - Chinese analysis-mode keys:
101
+ - `验证摘要`
102
+ - `当前最强结论`
103
+ - `分析摘要`
104
+ - `关键证据`
105
+ - `建议动作`
106
+ - `分析文档链接`
107
+
108
+ Keep exact capitalization and wording.
109
+
110
+ ## Result content
111
+
112
+ At minimum, `result.md` must include:
113
+
114
+ - a validation summary as one high-density English token
115
+ Allowed values: `device_verified`, `simulator_verified`, `scenario_verified`, `unit_tests_passed`, `targeted_tests_passed`, `regression_tests_passed`, `compile_passed`, `module_build_passed`, `code_reviewed`, `validation_completed`
116
+ If multiple validations were performed, report only the strongest one.
117
+ - problem summary and impact scope
118
+ - category: functional, stability, performance, or compatibility
119
+ - reproduction likelihood: always, high, low, or unknown
120
+ - root-cause judgment or strongest current hypothesis
121
+ - supporting evidence
122
+ - blocking point if full fix was not completed
123
+ - why patching is not justified yet when code did not change
124
+ - patch notes when code changed: key changes, intent, impact scope
125
+ - fix strategy when validation is insufficient
126
+ - validation method, steps, actual results, and unverified items
127
+ - residual risk and next step
128
+
129
+ ## Patch Closure Mode
130
+
131
+ - Use only when `Closure Level` is `Verified Fix` or `Repair Candidate`.
132
+ - Use the Patch Closure Template only.
133
+ - Mandatory when `patch.diff` exists.
134
+ - All narrative text must be English.
135
+ - Do not emit Chinese prose in headings, bullets, conclusions, evidence, patch notes, validation narrative, risks, or next steps.
136
+ - Do not emit `Analysis Summary` in patch closure output.
137
+ - Patch closure must include:
138
+ - `Strongest Current Conclusion`
139
+ - `Key Evidence`
140
+ - `Recommended Action`
141
+
142
+ ### Patch Closure Template
143
+
144
+ ```md
145
+ # Bugfix Result
146
+
147
+ ## Summary
148
+ - Problem:
149
+ - Impact:
150
+ - Category: Functional / Stability / Performance / Compatibility
151
+ - Reproduction Likelihood: Always / High / Low / Unknown
152
+
153
+ ## Root Cause
154
+ - Strongest Current Conclusion:
155
+ - Key Evidence:
156
+ - Relevant Code Locations:
157
+
158
+ ## Change
159
+ - Closure Level: Verified Fix / Repair Candidate
160
+ - Patch Notes:
161
+ - Fix Strategy:
162
+ - Blocking Point: `None` if not blocked
163
+
164
+ ## Validation
165
+ - Validation Summary: exactly one short English token, strongest validation only
166
+ - Method:
167
+ - Result:
168
+ - Unverified Items:
169
+
170
+ ## Risks
171
+ - Residual Risk:
172
+ - Recommended Action:
173
+ ```
174
+
175
+ ## Analysis Closure Mode
176
+
177
+ - Use only when `Closure Level` is `Analysis Only`.
178
+ - Use the Analysis Closure Template only.
179
+ - Forbidden when `patch.diff` exists.
180
+ - Narrative text must remain Chinese.
181
+ - `验证摘要` must still be a single English token.
182
+ - Do not force patch-delivery prose such as `Patch Notes` into analysis closure output.
183
+ - Analysis closure must include the Chinese contract keys for strongest conclusion, summary, evidence, and recommendation.
184
+
185
+ ### Analysis Closure Template
186
+
187
+ Use the following Chinese output structure exactly:
188
+
189
+ ```md
190
+ # 缺陷分析结果
191
+
192
+ ## 问题概述
193
+ - 问题:
194
+ - 影响:
195
+ - 分类: 功能 / 稳定性 / 性能 / 兼容性
196
+ - 复现概率: 必现 / 高概率 / 低概率 / 未知
197
+
198
+ ## 分析结论
199
+ - 当前最强结论:
200
+ - 分析摘要:
201
+ - 关键证据:
202
+ - 相关代码位置:
203
+
204
+ ## 修复判断
205
+ - Closure Level: Analysis Only
206
+ - 阻塞点:
207
+ - 建议动作:
208
+
209
+ ## 验证情况
210
+ - 验证摘要: exactly one short English token, strongest validation only
211
+ - 已验证内容:
212
+ - 未验证内容:
213
+
214
+ ## 风险
215
+ - 主要风险:
216
+ - 建议动作:
217
+ - 分析文档链接:
218
+ ```
219
+
220
+ ## Language examples
221
+
222
+ Patch closure examples:
223
+
224
+ - Valid:
225
+ - `Strongest Current Conclusion: The Android-side debug path still keeps an intentional crash branch.`
226
+ - `Key Evidence: Clicking the button reaches METHOD_CRASH and terminates the process through an uncaught exception.`
227
+ - `Recommended Action: Review whether the debug-only crash path should be removed or guarded.`
228
+ - Invalid:
229
+ - `Strongest Current Conclusion: Android-side debug code still keeps an intentional crash path.` followed by Chinese evidence or recommendation text
230
+
231
+ ## Delivery check
232
+
233
+ - Ensure `resultPath` is real and readable.
234
+ - Ensure the conclusion answers the task directly.
235
+ - If code changed, ensure `result.md` and `patch.diff` do not contradict each other.
236
+ - If important code changed, ensure explanatory comments are present.
237
+ - If validation was performed, ensure claims are not overstated.
238
+ - Distinguish confirmed facts from inference.
239
+ - For patch closure, ensure `Strongest Current Conclusion`, `Key Evidence`, and `Recommended Action` are English before returning.
240
+
241
+ ## Final self-check
242
+
243
+ - closure mode is chosen correctly
244
+ - if `patch.diff` exists, closure mode is not `Analysis Only`
245
+ - patch closure uses English narrative only
246
+ - analysis closure uses Chinese narrative only
247
+ - required downstream field names are exact
248
+ - patch closure does not emit `Analysis Summary`
249
+ - analysis closure does not mix in patch-delivery sections
250
+ - `Validation Summary` or `验证摘要` is exactly one strongest English token
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "bugfix",
3
+ "triageRules": [
4
+ "ACCEPT.md"
5
+ ],
6
+ "executionRules": [
7
+ "ROLE.md",
8
+ "CONSTRAINTS.md",
9
+ "CONTEXT.md",
10
+ "STANDARD.md",
11
+ "EVOLUTION.md"
12
+ ]
13
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "harnesses": [
3
+ {
4
+ "taskType": "bugfix",
5
+ "dir": "bugfix"
6
+ }
7
+ ]
8
+ }