@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.
- package/.env.example +16 -0
- package/LICENSE +21 -0
- package/README.md +104 -0
- package/dist/cli/optimus.d.ts +2 -0
- package/dist/cli/optimus.js +2951 -0
- package/dist/cli/optimus.js.map +1 -0
- package/dist/cli/self-update.d.ts +49 -0
- package/dist/cli/self-update.js +264 -0
- package/dist/cli/self-update.js.map +1 -0
- package/dist/config/load-config.d.ts +3 -0
- package/dist/config/load-config.js +321 -0
- package/dist/config/load-config.js.map +1 -0
- package/dist/config/optimus-paths.d.ts +13 -0
- package/dist/config/optimus-paths.js +44 -0
- package/dist/config/optimus-paths.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/jira/jira-cli.d.ts +1 -0
- package/dist/integrations/jira/jira-cli.js +278 -0
- package/dist/integrations/jira/jira-cli.js.map +1 -0
- package/dist/integrations/jira/jira-client.d.ts +99 -0
- package/dist/integrations/jira/jira-client.js +521 -0
- package/dist/integrations/jira/jira-client.js.map +1 -0
- package/dist/integrations/jira/jira-submit.d.ts +71 -0
- package/dist/integrations/jira/jira-submit.js +351 -0
- package/dist/integrations/jira/jira-submit.js.map +1 -0
- package/dist/problem-solving-core/codex/codex-auth-resolver.d.ts +23 -0
- package/dist/problem-solving-core/codex/codex-auth-resolver.js +136 -0
- package/dist/problem-solving-core/codex/codex-auth-resolver.js.map +1 -0
- package/dist/problem-solving-core/codex/codex-connectivity-checks.d.ts +6 -0
- package/dist/problem-solving-core/codex/codex-connectivity-checks.js +81 -0
- package/dist/problem-solving-core/codex/codex-connectivity-checks.js.map +1 -0
- package/dist/problem-solving-core/codex/codex-failure-classifier.d.ts +2 -0
- package/dist/problem-solving-core/codex/codex-failure-classifier.js +49 -0
- package/dist/problem-solving-core/codex/codex-failure-classifier.js.map +1 -0
- package/dist/problem-solving-core/codex/codex-global-config.d.ts +17 -0
- package/dist/problem-solving-core/codex/codex-global-config.js +100 -0
- package/dist/problem-solving-core/codex/codex-global-config.js.map +1 -0
- package/dist/problem-solving-core/codex/codex-preflight.d.ts +13 -0
- package/dist/problem-solving-core/codex/codex-preflight.js +142 -0
- package/dist/problem-solving-core/codex/codex-preflight.js.map +1 -0
- package/dist/problem-solving-core/codex/codex-provider-profile.d.ts +14 -0
- package/dist/problem-solving-core/codex/codex-provider-profile.js +68 -0
- package/dist/problem-solving-core/codex/codex-provider-profile.js.map +1 -0
- package/dist/problem-solving-core/codex/codex-required-env.d.ts +3 -0
- package/dist/problem-solving-core/codex/codex-required-env.js +21 -0
- package/dist/problem-solving-core/codex/codex-required-env.js.map +1 -0
- package/dist/problem-solving-core/codex/codex-runner.d.ts +37 -0
- package/dist/problem-solving-core/codex/codex-runner.js +926 -0
- package/dist/problem-solving-core/codex/codex-runner.js.map +1 -0
- package/dist/problem-solving-core/codex/evolution-skill-guard.d.ts +36 -0
- package/dist/problem-solving-core/codex/evolution-skill-guard.js +143 -0
- package/dist/problem-solving-core/codex/evolution-skill-guard.js.map +1 -0
- package/dist/problem-solving-core/codex/repo-memory-service.d.ts +24 -0
- package/dist/problem-solving-core/codex/repo-memory-service.js +114 -0
- package/dist/problem-solving-core/codex/repo-memory-service.js.map +1 -0
- package/dist/problem-solving-core/codex/skill-sync-service.d.ts +35 -0
- package/dist/problem-solving-core/codex/skill-sync-service.js +280 -0
- package/dist/problem-solving-core/codex/skill-sync-service.js.map +1 -0
- package/dist/task-environment/cancellation/task-abort-registry.d.ts +17 -0
- package/dist/task-environment/cancellation/task-abort-registry.js +51 -0
- package/dist/task-environment/cancellation/task-abort-registry.js.map +1 -0
- package/dist/task-environment/cancellation/task-cancellation-service.d.ts +25 -0
- package/dist/task-environment/cancellation/task-cancellation-service.js +54 -0
- package/dist/task-environment/cancellation/task-cancellation-service.js.map +1 -0
- package/dist/task-environment/cancellation/task-cleanup-service.d.ts +22 -0
- package/dist/task-environment/cancellation/task-cleanup-service.js +67 -0
- package/dist/task-environment/cancellation/task-cleanup-service.js.map +1 -0
- package/dist/task-environment/delivery/commit-message/bugfix-commit-message-template.d.ts +13 -0
- package/dist/task-environment/delivery/commit-message/bugfix-commit-message-template.js +83 -0
- package/dist/task-environment/delivery/commit-message/bugfix-commit-message-template.js.map +1 -0
- package/dist/task-environment/delivery/commit-message/commit-message-builder.d.ts +6 -0
- package/dist/task-environment/delivery/commit-message/commit-message-builder.js +15 -0
- package/dist/task-environment/delivery/commit-message/commit-message-builder.js.map +1 -0
- package/dist/task-environment/delivery/commit-message/commit-message-template-types.d.ts +16 -0
- package/dist/task-environment/delivery/commit-message/commit-message-template-types.js +2 -0
- package/dist/task-environment/delivery/commit-message/commit-message-template-types.js.map +1 -0
- package/dist/task-environment/delivery/feishu-analysis-doc-service.d.ts +50 -0
- package/dist/task-environment/delivery/feishu-analysis-doc-service.js +454 -0
- package/dist/task-environment/delivery/feishu-analysis-doc-service.js.map +1 -0
- package/dist/task-environment/delivery/feishu-card-renderer.d.ts +38 -0
- package/dist/task-environment/delivery/feishu-card-renderer.js +449 -0
- package/dist/task-environment/delivery/feishu-card-renderer.js.map +1 -0
- package/dist/task-environment/delivery/feishu-content/feishu-content-renderer.d.ts +34 -0
- package/dist/task-environment/delivery/feishu-content/feishu-content-renderer.js +201 -0
- package/dist/task-environment/delivery/feishu-content/feishu-content-renderer.js.map +1 -0
- package/dist/task-environment/delivery/feishu-content/feishu-copy-config.d.ts +27 -0
- package/dist/task-environment/delivery/feishu-content/feishu-copy-config.js +74 -0
- package/dist/task-environment/delivery/feishu-content/feishu-copy-config.js.map +1 -0
- package/dist/task-environment/delivery/feishu-notifier.d.ts +45 -0
- package/dist/task-environment/delivery/feishu-notifier.js +250 -0
- package/dist/task-environment/delivery/feishu-notifier.js.map +1 -0
- package/dist/task-environment/delivery/feishu-templates/analysis-message-template.d.ts +6 -0
- package/dist/task-environment/delivery/feishu-templates/analysis-message-template.js +39 -0
- package/dist/task-environment/delivery/feishu-templates/analysis-message-template.js.map +1 -0
- package/dist/task-environment/delivery/feishu-templates/bugfix-message-template.d.ts +6 -0
- package/dist/task-environment/delivery/feishu-templates/bugfix-message-template.js +40 -0
- package/dist/task-environment/delivery/feishu-templates/bugfix-message-template.js.map +1 -0
- package/dist/task-environment/delivery/feishu-templates/default-message-template.d.ts +6 -0
- package/dist/task-environment/delivery/feishu-templates/default-message-template.js +33 -0
- package/dist/task-environment/delivery/feishu-templates/default-message-template.js.map +1 -0
- package/dist/task-environment/delivery/feishu-templates/patch-message-template.d.ts +6 -0
- package/dist/task-environment/delivery/feishu-templates/patch-message-template.js +40 -0
- package/dist/task-environment/delivery/feishu-templates/patch-message-template.js.map +1 -0
- package/dist/task-environment/delivery/feishu-templates/template-registry.d.ts +2 -0
- package/dist/task-environment/delivery/feishu-templates/template-registry.js +11 -0
- package/dist/task-environment/delivery/feishu-templates/template-registry.js.map +1 -0
- package/dist/task-environment/delivery/feishu-templates/template-types.d.ts +20 -0
- package/dist/task-environment/delivery/feishu-templates/template-types.js +2 -0
- package/dist/task-environment/delivery/feishu-templates/template-types.js.map +1 -0
- package/dist/task-environment/delivery/task-delivery-dispatcher.d.ts +14 -0
- package/dist/task-environment/delivery/task-delivery-dispatcher.js +109 -0
- package/dist/task-environment/delivery/task-delivery-dispatcher.js.map +1 -0
- package/dist/task-environment/delivery/task-delivery-service.d.ts +33 -0
- package/dist/task-environment/delivery/task-delivery-service.js +432 -0
- package/dist/task-environment/delivery/task-delivery-service.js.map +1 -0
- package/dist/task-environment/delivery/task-publication-service.d.ts +97 -0
- package/dist/task-environment/delivery/task-publication-service.js +1369 -0
- package/dist/task-environment/delivery/task-publication-service.js.map +1 -0
- package/dist/task-environment/execution-addresses.d.ts +40 -0
- package/dist/task-environment/execution-addresses.js +63 -0
- package/dist/task-environment/execution-addresses.js.map +1 -0
- package/dist/task-environment/intake/cli-file-intake.d.ts +12 -0
- package/dist/task-environment/intake/cli-file-intake.js +56 -0
- package/dist/task-environment/intake/cli-file-intake.js.map +1 -0
- package/dist/task-environment/intake/manual-problem-intake.d.ts +3 -0
- package/dist/task-environment/intake/manual-problem-intake.js +57 -0
- package/dist/task-environment/intake/manual-problem-intake.js.map +1 -0
- package/dist/task-environment/intake/polling-problem-intake.d.ts +14 -0
- package/dist/task-environment/intake/polling-problem-intake.js +232 -0
- package/dist/task-environment/intake/polling-problem-intake.js.map +1 -0
- package/dist/task-environment/observability/logger.d.ts +76 -0
- package/dist/task-environment/observability/logger.js +604 -0
- package/dist/task-environment/observability/logger.js.map +1 -0
- package/dist/task-environment/observability/runtime-panel.d.ts +82 -0
- package/dist/task-environment/observability/runtime-panel.js +1008 -0
- package/dist/task-environment/observability/runtime-panel.js.map +1 -0
- package/dist/task-environment/observability/sound-notifier.d.ts +18 -0
- package/dist/task-environment/observability/sound-notifier.js +71 -0
- package/dist/task-environment/observability/sound-notifier.js.map +1 -0
- package/dist/task-environment/orchestration/execution-context-assembler.d.ts +41 -0
- package/dist/task-environment/orchestration/execution-context-assembler.js +464 -0
- package/dist/task-environment/orchestration/execution-context-assembler.js.map +1 -0
- package/dist/task-environment/orchestration/git-change-classifier.d.ts +19 -0
- package/dist/task-environment/orchestration/git-change-classifier.js +106 -0
- package/dist/task-environment/orchestration/git-change-classifier.js.map +1 -0
- package/dist/task-environment/orchestration/harness-registry.d.ts +27 -0
- package/dist/task-environment/orchestration/harness-registry.js +116 -0
- package/dist/task-environment/orchestration/harness-registry.js.map +1 -0
- package/dist/task-environment/orchestration/harness-resolver.d.ts +8 -0
- package/dist/task-environment/orchestration/harness-resolver.js +39 -0
- package/dist/task-environment/orchestration/harness-resolver.js.map +1 -0
- package/dist/task-environment/orchestration/task-orchestrator.d.ts +45 -0
- package/dist/task-environment/orchestration/task-orchestrator.js +1122 -0
- package/dist/task-environment/orchestration/task-orchestrator.js.map +1 -0
- package/dist/task-environment/orchestration/task-package-assembler.d.ts +4 -0
- package/dist/task-environment/orchestration/task-package-assembler.js +10 -0
- package/dist/task-environment/orchestration/task-package-assembler.js.map +1 -0
- package/dist/task-environment/orchestration/triage-agent.d.ts +54 -0
- package/dist/task-environment/orchestration/triage-agent.js +636 -0
- package/dist/task-environment/orchestration/triage-agent.js.map +1 -0
- package/dist/task-environment/orchestration/triage-runner.d.ts +65 -0
- package/dist/task-environment/orchestration/triage-runner.js +655 -0
- package/dist/task-environment/orchestration/triage-runner.js.map +1 -0
- package/dist/task-environment/publication-target.d.ts +12 -0
- package/dist/task-environment/publication-target.js +174 -0
- package/dist/task-environment/publication-target.js.map +1 -0
- package/dist/task-environment/runtime/blocking-event-queue.d.ts +7 -0
- package/dist/task-environment/runtime/blocking-event-queue.js +27 -0
- package/dist/task-environment/runtime/blocking-event-queue.js.map +1 -0
- package/dist/task-environment/runtime/optimus-runtime.d.ts +69 -0
- package/dist/task-environment/runtime/optimus-runtime.js +751 -0
- package/dist/task-environment/runtime/optimus-runtime.js.map +1 -0
- package/dist/task-environment/storage/sqlite-event-store.d.ts +52 -0
- package/dist/task-environment/storage/sqlite-event-store.js +288 -0
- package/dist/task-environment/storage/sqlite-event-store.js.map +1 -0
- package/dist/task-environment/storage/sqlite-task-store.d.ts +122 -0
- package/dist/task-environment/storage/sqlite-task-store.js +1182 -0
- package/dist/task-environment/storage/sqlite-task-store.js.map +1 -0
- package/dist/types.d.ts +629 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/embedded-skills/shared/repo-inspection/SKILL.md +9 -0
- package/embedded-skills/shared/repo-inspection/skill.json +5 -0
- package/embedded-skills/task/bugfix/android-debug-protocol/SKILL.md +10 -0
- package/embedded-skills/task/bugfix/android-debug-protocol/skill.json +6 -0
- package/harness/AGENTS.md +30 -0
- package/harness/CHECKLIST.md +44 -0
- package/harness/CONSTRAINTS.md +60 -0
- package/harness/FRAMEWORK.md +28 -0
- package/harness/GOAL.md +28 -0
- package/harness/HANDOFF.md +45 -0
- package/harness/TASK_PLAN.md +79 -0
- package/optimus.config.template.json +34 -0
- package/package.json +109 -0
- package/task-harnesses/bugfix/ACCEPT.md +47 -0
- package/task-harnesses/bugfix/CONSTRAINTS.md +46 -0
- package/task-harnesses/bugfix/CONTEXT.md +29 -0
- package/task-harnesses/bugfix/EVOLUTION.md +82 -0
- package/task-harnesses/bugfix/ROLE.md +29 -0
- package/task-harnesses/bugfix/STANDARD.md +250 -0
- package/task-harnesses/bugfix/manifest.json +13 -0
- 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
|