@liangjie559567/ultrapower 7.6.0 → 7.7.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +2 -2
- package/bridge/mcp-server.cjs +1 -0
- package/dist/hooks/bridge-normalize.d.ts.map +1 -1
- package/dist/hooks/bridge-normalize.js +47 -25
- package/dist/hooks/bridge-normalize.js.map +1 -1
- package/dist/lib/atomic-write.d.ts.map +1 -1
- package/dist/lib/atomic-write.js +2 -0
- package/dist/lib/atomic-write.js.map +1 -1
- package/dist/lib/auditLog.d.ts +6 -7
- package/dist/lib/auditLog.d.ts.map +1 -1
- package/dist/lib/auditLog.js +10 -7
- package/dist/lib/auditLog.js.map +1 -1
- package/dist/lib/logger.d.ts.map +1 -1
- package/dist/lib/logger.js +9 -4
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/path-validator.d.ts.map +1 -1
- package/dist/lib/path-validator.js +12 -12
- package/dist/lib/path-validator.js.map +1 -1
- package/dist/security/concurrency-control.d.ts +7 -0
- package/dist/security/concurrency-control.d.ts.map +1 -1
- package/dist/security/concurrency-control.js +22 -0
- package/dist/security/concurrency-control.js.map +1 -1
- package/docs/CLAUDE.md +2 -2
- package/docs/CODE_BASED_FLOW.md +12 -12
- package/docs/COMPATIBILITY.md +1 -1
- package/docs/FEATURES.md +16 -16
- package/docs/INSTALL.md +4 -4
- package/docs/MIGRATION.md +2 -2
- package/docs/OMC-CLAUDE.md +1 -1
- package/docs/REFERENCE.md +16 -16
- package/docs/UPGRADE_VERIFICATION.md +1 -1
- package/docs/agent-templates/README.md +2 -2
- package/docs/api/media/INSTALL.md +2 -2
- package/docs/api/media/MIGRATION.md +2 -2
- package/docs/api/media/REFERENCE.md +14 -14
- package/docs/api/media/mcp-server-usage.md +4 -4
- package/docs/architecture/ultrapower-flow-analysis.md +1 -1
- package/docs/getting-started/quickstart.md +1 -1
- package/docs/glossary.md +1 -1
- package/docs/guides/mcp-server-usage.md +4 -4
- package/docs/guides/tool-name-migration.md +12 -12
- package/docs/mcp/configuration.md +5 -5
- package/docs/mcp/performance.md +5 -5
- package/docs/mcp-compatibility-matrix.md +1 -1
- package/docs/partials/agent-tiers.md +24 -24
- package/docs/partials/features.md +1 -1
- package/docs/partials/verification-tiers.md +2 -2
- package/docs/plans/2026-02-24-superpowers-ultrapower-integration-design.md +2 -2
- package/docs/plans/2026-03-02-docs-comprehensive-update.md +16 -16
- package/docs/plans/2026-03-05-mcp-adoption-atomic-tasks.md +9 -9
- package/docs/plans/2026-03-16-tech-debt-fixes.md +222 -0
- package/docs/prd/bugs-pain-points-audit-dag.md +297 -297
- package/docs/prd/bugs-pain-points-audit-draft.md +154 -154
- package/docs/prd/bugs-pain-points-audit-manifest.md +650 -650
- package/docs/prd/bugs-pain-points-audit-rough.md +654 -654
- package/docs/reports/tech-debt-verification-2026-03-16.md +87 -0
- package/docs/reviews/bugs-pain-points-audit/review_critic.md +213 -213
- package/docs/reviews/bugs-pain-points-audit/review_domain.md +247 -247
- package/docs/reviews/bugs-pain-points-audit/review_product.md +189 -189
- package/docs/reviews/bugs-pain-points-audit/review_tech.md +382 -382
- package/docs/reviews/bugs-pain-points-audit/review_ux.md +161 -161
- package/docs/reviews/bugs-pain-points-audit/summary.md +129 -129
- package/docs/reviews/bugs-pain-points-audit/tech-debt-v7.6.0-code-review.md +328 -0
- package/docs/shared/agent-tiers.md +24 -24
- package/docs/shared/features.md +1 -1
- package/docs/shared/verification-tiers.md +2 -2
- package/docs/standards/README.md +1 -1
- package/docs/standards/runtime-protection.md +7 -0
- package/docs/troubleshooting.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# Technical Debt Fixes v7.6.0 - Code Review Report
|
|
2
|
+
|
|
3
|
+
**Review Date**: 2026-03-16
|
|
4
|
+
**Commit Range**: 4f413d6d..066ff55c
|
|
5
|
+
**Reviewer**: Senior Code Reviewer (Opus 4.6)
|
|
6
|
+
**Scope**: 56 files, 1035 insertions, 215 deletions
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Executive Summary
|
|
11
|
+
|
|
12
|
+
**Recommendation**: ⚠️ **REQUEST CHANGES**
|
|
13
|
+
|
|
14
|
+
The commit range under review (4f413d6d..066ff55c) contains **only documentation changes** for TD-2. The actual code implementations for TD-1, TD-3, and TD-4 were completed in **earlier commits** (55be0ceb, 0b759af7, and pre-existing). The verification report claims all fixes are complete, but this review identifies critical issues.
|
|
15
|
+
|
|
16
|
+
**Files Reviewed**: 56 (34 documentation files, 21 test event files, 1 verification report)
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Critical Findings
|
|
21
|
+
|
|
22
|
+
### CRITICAL-1: Misleading Verification Report
|
|
23
|
+
|
|
24
|
+
**File**: `docs/reports/tech-debt-verification-2026-03-16.md`
|
|
25
|
+
**Severity**: CRITICAL
|
|
26
|
+
**Issue**: The verification report claims TD-4 was fixed in the reviewed commit range, but the actual fix was implemented much earlier (likely in v7.1.1 or earlier security hardening commits).
|
|
27
|
+
|
|
28
|
+
**Evidence**:
|
|
29
|
+
- Report claims: "TD-4: 已完成,代码库中已正确使用原子写入"
|
|
30
|
+
- Actual: `src/hooks/subagent-tracker/index.ts:427` already uses `atomicWriteJsonSyncWithRetry`
|
|
31
|
+
- No TD-4 implementation commit found in range 4f413d6d..066ff55c
|
|
32
|
+
|
|
33
|
+
**Impact**: Creates false audit trail, misleading for future maintenance
|
|
34
|
+
|
|
35
|
+
**Recommendation**: Update verification report to clarify that TD-4 was already implemented in earlier commits, not as part of this technical debt sprint.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Issues by Technical Debt Item
|
|
40
|
+
|
|
41
|
+
### TD-1: Test Timeout Configurations ✅ VERIFIED (Earlier Commit)
|
|
42
|
+
|
|
43
|
+
**Status**: Implemented correctly in commit 55be0ceb (outside review range)
|
|
44
|
+
|
|
45
|
+
**Files Modified**:
|
|
46
|
+
- `src/features/__tests__/mcp-integration.test.ts:10`
|
|
47
|
+
- `src/features/mcp-autodiscovery/__tests__/performance.test.ts:8`
|
|
48
|
+
|
|
49
|
+
**Implementation Quality**: ✅ GOOD
|
|
50
|
+
```typescript
|
|
51
|
+
beforeAll(async () => {
|
|
52
|
+
contextManager = new UnifiedContextManager();
|
|
53
|
+
await contextManager.initialize();
|
|
54
|
+
}, 30000); // Explicit 30s timeout
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Verification**:
|
|
58
|
+
- ✅ Timeout parameter correctly added to beforeAll hooks
|
|
59
|
+
- ✅ Value appropriate (30000ms for initialization)
|
|
60
|
+
- ✅ Consistent across both test files
|
|
61
|
+
- ✅ Follows Vitest API correctly
|
|
62
|
+
|
|
63
|
+
**Issues**: None
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
### TD-2: LSP Documentation Migration ⚠️ INCOMPLETE
|
|
68
|
+
|
|
69
|
+
**Status**: Partially implemented in commits b06f8c59 and 7ebfcfea
|
|
70
|
+
|
|
71
|
+
**Files Modified**: 34 documentation files (437 line changes)
|
|
72
|
+
|
|
73
|
+
**Implementation Quality**: ⚠️ NEEDS IMPROVEMENT
|
|
74
|
+
|
|
75
|
+
#### HIGH-1: Inconsistent Tool Name Format
|
|
76
|
+
|
|
77
|
+
**Files**: Multiple documentation files
|
|
78
|
+
**Line**: Various
|
|
79
|
+
**Issue**: Documentation shows tool names as `mcp__plugin_ultrapower_t__lsp_*` which creates confusion.
|
|
80
|
+
|
|
81
|
+
**Example from docs/REFERENCE.md:820**:
|
|
82
|
+
```markdown
|
|
83
|
+
| `ultrapower:lsp_hover` | `mcp__plugin_ultrapower_t__lsp_hover` |
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Problem**: The MCP tool name contains a colon in the middle: `...t__ultrapower:lsp_hover`
|
|
87
|
+
|
|
88
|
+
**Expected**: Either:
|
|
89
|
+
1. `mcp__plugin_ultrapower_t__lsp_hover` (if keeping old naming)
|
|
90
|
+
2. Document that the actual MCP name uses underscores: `mcp__plugin_ultrapower_t__ultrapower_lsp_hover`
|
|
91
|
+
|
|
92
|
+
**Impact**: Users will get tool not found errors if they copy-paste these names
|
|
93
|
+
|
|
94
|
+
**Recommendation**: Verify actual MCP tool registration names in `src/tools/lsp-tools.ts` and ensure documentation matches exactly.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
#### MEDIUM-1: Incomplete Migration in Code Examples
|
|
99
|
+
|
|
100
|
+
**File**: `docs/mcp/performance.md:61-64`
|
|
101
|
+
**Issue**: Code examples use invalid syntax with colons in object property access
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
// Current (INVALID JavaScript):
|
|
105
|
+
const [hover, refs, symbols] = await Promise.all([
|
|
106
|
+
mcp__plugin_ultrapower_t__lsp_hover({ file, line, character }),
|
|
107
|
+
// ^ SyntaxError: Unexpected token ':'
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Expected**:
|
|
111
|
+
```typescript
|
|
112
|
+
const [hover, refs, symbols] = await Promise.all([
|
|
113
|
+
mcp__plugin_ultrapower_t__['ultrapower:lsp_hover']({ file, line, character }),
|
|
114
|
+
// OR if the actual tool name uses underscores:
|
|
115
|
+
mcp__plugin_ultrapower_t__ultrapower_lsp_hover({ file, line, character }),
|
|
116
|
+
]);
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Impact**: Code examples will not run, causing user confusion
|
|
120
|
+
|
|
121
|
+
**Recommendation**: Fix all code examples to use valid JavaScript syntax.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
#### MEDIUM-2: Missing Verification Step
|
|
126
|
+
|
|
127
|
+
**File**: Plan specified grep verification, but no evidence it was run
|
|
128
|
+
**Issue**: Plan step 3 says: `grep -r "ultrapower:lsp_diagnostics" docs/`
|
|
129
|
+
|
|
130
|
+
**Problem**: This grep would find the NEW naming (which is correct), but the plan description says "Expected: No matches" which is backwards logic.
|
|
131
|
+
|
|
132
|
+
**Recommendation**: Clarify verification steps and provide evidence that old naming (`lsp_*` without prefix) no longer exists in documentation.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### TD-3: Windows Compatibility Tests ✅ VERIFIED (Earlier Commit)
|
|
137
|
+
|
|
138
|
+
**Status**: Implemented correctly in commit 0b759af7 (outside review range)
|
|
139
|
+
|
|
140
|
+
**Files Created**:
|
|
141
|
+
- `tests/platform/windows-atomic-write.test.ts` (30 lines)
|
|
142
|
+
- `docs/standards/runtime-protection.md` (7 lines added)
|
|
143
|
+
|
|
144
|
+
**Implementation Quality**: ✅ GOOD
|
|
145
|
+
|
|
146
|
+
**Code Review**:
|
|
147
|
+
```typescript
|
|
148
|
+
describe.skipIf(process.platform !== 'win32')('Windows atomic write', () => {
|
|
149
|
+
// ✅ Correct platform detection
|
|
150
|
+
// ✅ Proper cleanup in afterEach
|
|
151
|
+
// ✅ Tests actual atomic write behavior
|
|
152
|
+
|
|
153
|
+
it('should handle locked files gracefully', () => {
|
|
154
|
+
atomicWriteJsonSyncWithRetry(testPath, data);
|
|
155
|
+
expect(existsSync(testPath)).toBe(true);
|
|
156
|
+
// ✅ Verifies file was written
|
|
157
|
+
// ✅ Verifies content integrity
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Strengths**:
|
|
163
|
+
- ✅ Uses `skipIf` for platform detection (correct Vitest API)
|
|
164
|
+
- ✅ Proper cleanup with `afterEach` and `testFiles` tracking
|
|
165
|
+
- ✅ Tests the actual atomic write function
|
|
166
|
+
- ✅ Documentation updated with platform notes
|
|
167
|
+
|
|
168
|
+
**Issues**: None
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
### TD-4: Atomic Write Protection ⚠️ MISLEADING CLAIM
|
|
173
|
+
|
|
174
|
+
**Status**: Already implemented (pre-existing, not in this sprint)
|
|
175
|
+
|
|
176
|
+
**Files**: `src/hooks/subagent-tracker/index.ts:427`
|
|
177
|
+
|
|
178
|
+
**Implementation Quality**: ✅ GOOD (but not part of this review)
|
|
179
|
+
|
|
180
|
+
**Current State**:
|
|
181
|
+
```typescript
|
|
182
|
+
// Line 12: Import present
|
|
183
|
+
import { atomicWriteJsonSyncWithRetry } from "../../lib/atomic-write.js";
|
|
184
|
+
|
|
185
|
+
// Line 427: Correct usage
|
|
186
|
+
atomicWriteJsonSyncWithRetry(statePath, state);
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Issue**: The verification report claims this was fixed as part of TD-4, but:
|
|
190
|
+
- No commit in range 4f413d6d..066ff55c modifies `subagent-tracker/index.ts`
|
|
191
|
+
- The atomic write was likely implemented during v7.1.1 security hardening
|
|
192
|
+
- Commit fc63ee7d (feat(security): implement hook system security hardening) predates this sprint
|
|
193
|
+
|
|
194
|
+
**Recommendation**: Update verification report to acknowledge TD-4 was already complete, not newly implemented.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Security Review
|
|
199
|
+
|
|
200
|
+
### No Security Issues Found
|
|
201
|
+
|
|
202
|
+
All changes in this commit range are documentation-only (TD-2). The code changes (TD-1, TD-3, TD-4) were in earlier commits and have been reviewed separately.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Performance Review
|
|
207
|
+
|
|
208
|
+
### No Performance Impact
|
|
209
|
+
|
|
210
|
+
Documentation changes have no runtime performance impact.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Best Practices Review
|
|
215
|
+
|
|
216
|
+
### LOW-1: Commit Range Mismatch
|
|
217
|
+
|
|
218
|
+
**Issue**: The verification report references commit range 4f413d6d..066ff55c, but the actual implementation commits (55be0ceb, 0b759af7, b06f8c59, 7ebfcfea) are outside or partially outside this range.
|
|
219
|
+
|
|
220
|
+
**Impact**: Confusing audit trail for future reviews
|
|
221
|
+
|
|
222
|
+
**Recommendation**: Either:
|
|
223
|
+
1. Expand commit range to include all implementation commits
|
|
224
|
+
2. Clarify that verification covers earlier commits, not just the specified range
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
### LOW-2: Test Event Files in Review
|
|
229
|
+
|
|
230
|
+
**Files**: 21 files in `.omc/nexus/events/`
|
|
231
|
+
**Issue**: Test event JSON files are included in the commit range, adding noise to the review
|
|
232
|
+
|
|
233
|
+
**Recommendation**: Consider `.gitignore` for test event files or use separate commits for test artifacts.
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Documentation Quality
|
|
238
|
+
|
|
239
|
+
### MEDIUM-3: Inconsistent Terminology
|
|
240
|
+
|
|
241
|
+
**Files**: Multiple documentation files
|
|
242
|
+
**Issue**: Mixed use of "LSP tools", "LSP tool naming", "ultrapower:lsp_*" without clear definition
|
|
243
|
+
|
|
244
|
+
**Recommendation**: Add a glossary section explaining:
|
|
245
|
+
- What "ultrapower:" prefix means
|
|
246
|
+
- Why the migration is happening
|
|
247
|
+
- How to identify old vs new naming
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Summary Statistics
|
|
252
|
+
|
|
253
|
+
| Category | Count |
|
|
254
|
+
|----------|-------|
|
|
255
|
+
| **Files Reviewed** | 56 |
|
|
256
|
+
| **Code Files** | 0 (all in earlier commits) |
|
|
257
|
+
| **Documentation Files** | 34 |
|
|
258
|
+
| **Test Files** | 0 (created in earlier commit) |
|
|
259
|
+
| **Test Event Files** | 21 |
|
|
260
|
+
| **Critical Issues** | 1 |
|
|
261
|
+
| **High Issues** | 1 |
|
|
262
|
+
| **Medium Issues** | 3 |
|
|
263
|
+
| **Low Issues** | 2 |
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Issues by Severity
|
|
268
|
+
|
|
269
|
+
### CRITICAL (1)
|
|
270
|
+
- **CRITICAL-1**: Misleading verification report claims TD-4 was fixed in this sprint
|
|
271
|
+
|
|
272
|
+
### HIGH (1)
|
|
273
|
+
- **HIGH-1**: Invalid MCP tool names in documentation (contains colons)
|
|
274
|
+
|
|
275
|
+
### MEDIUM (3)
|
|
276
|
+
- **MEDIUM-1**: Code examples use invalid JavaScript syntax
|
|
277
|
+
- **MEDIUM-2**: Missing verification evidence for old naming removal
|
|
278
|
+
- **MEDIUM-3**: Inconsistent terminology across documentation
|
|
279
|
+
|
|
280
|
+
### LOW (2)
|
|
281
|
+
- **LOW-1**: Commit range mismatch in verification report
|
|
282
|
+
- **LOW-2**: Test event files add noise to review
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Approval Recommendation
|
|
287
|
+
|
|
288
|
+
⚠️ **REQUEST CHANGES**
|
|
289
|
+
|
|
290
|
+
### Must Fix Before Approval:
|
|
291
|
+
1. **CRITICAL-1**: Update verification report to clarify TD-4 was pre-existing
|
|
292
|
+
2. **HIGH-1**: Fix MCP tool names in documentation (remove colons or use bracket notation)
|
|
293
|
+
3. **MEDIUM-1**: Fix all code examples to use valid JavaScript syntax
|
|
294
|
+
|
|
295
|
+
### Should Fix (Recommended):
|
|
296
|
+
4. **MEDIUM-2**: Provide evidence that old LSP naming is removed from docs
|
|
297
|
+
5. **MEDIUM-3**: Add terminology glossary for LSP tool naming
|
|
298
|
+
|
|
299
|
+
### Nice to Have:
|
|
300
|
+
6. **LOW-1**: Clarify commit range scope in verification report
|
|
301
|
+
7. **LOW-2**: Consider gitignoring test event files
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## Positive Observations
|
|
306
|
+
|
|
307
|
+
1. ✅ TD-1 implementation is clean and correct (commit 55be0ceb)
|
|
308
|
+
2. ✅ TD-3 Windows test has proper platform detection and cleanup (commit 0b759af7)
|
|
309
|
+
3. ✅ TD-4 atomic write protection is correctly implemented (pre-existing)
|
|
310
|
+
4. ✅ CHANGELOG deprecation notice is clear (commit b06f8c59)
|
|
311
|
+
5. ✅ Documentation migration is comprehensive (437 line changes)
|
|
312
|
+
6. ✅ Commit messages follow conventional commits format
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Next Steps
|
|
317
|
+
|
|
318
|
+
1. Fix HIGH-1 and MEDIUM-1 by verifying actual MCP tool registration names
|
|
319
|
+
2. Update verification report to correct TD-4 timeline
|
|
320
|
+
3. Run verification: `grep -rn "mcp__plugin_ultrapower_t__lsp_" docs/` to find old naming
|
|
321
|
+
4. Fix code examples to use valid syntax
|
|
322
|
+
5. Re-run full test suite to ensure no regressions
|
|
323
|
+
6. Update this review with fixes and re-submit for approval
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
**Review Completed**: 2026-03-16T20:10:05Z
|
|
328
|
+
**Reviewer**: Senior Code Reviewer (Claude Opus 4.6)
|
|
@@ -116,18 +116,18 @@ Task(subagent_type="ultrapower:explore",
|
|
|
116
116
|
|
|
117
117
|
| 工具 | 类别 | 用途 | 是否分配给 Agent? |
|
|
118
118
|
| ------ | ---------- | --------- | --------------------- |
|
|
119
|
-
| `lsp_hover` | LSP | 获取代码位置的类型信息和文档 | 否(orchestrator 直接使用) |
|
|
120
|
-
| `lsp_goto_definition` | LSP | 跳转到符号定义处 | 否(orchestrator 直接使用) |
|
|
121
|
-
| `lsp_find_references` | LSP | 查找符号在代码库中的所有用法 | 是(仅 `explore`) |
|
|
122
|
-
| `lsp_document_symbols` | LSP | 获取文件中所有符号的概览 | 是 |
|
|
123
|
-
| `lsp_workspace_symbols` | LSP | 按名称在工作区中搜索符号 | 是 |
|
|
124
|
-
| `lsp_diagnostics` | LSP | 获取文件的错误、警告和提示 | 是 |
|
|
125
|
-
| `lsp_diagnostics_directory` | LSP | 项目级类型检查(tsc --noEmit 或 LSP) | 是 |
|
|
126
|
-
| `lsp_prepare_rename` | LSP | 检查符号是否可以重命名 | 否(orchestrator 直接使用) |
|
|
127
|
-
| `lsp_rename` | LSP | 在整个项目中重命名符号 | 否(orchestrator 直接使用) |
|
|
128
|
-
| `lsp_code_actions` | LSP | 获取可用的重构和快速修复 | 否(orchestrator 直接使用) |
|
|
129
|
-
| `lsp_code_action_resolve` | LSP | 获取代码操作的完整编辑详情 | 否(orchestrator 直接使用) |
|
|
130
|
-
| `lsp_servers` | LSP | 列出可用的语言服务器及安装状态 | 否(orchestrator 直接使用) |
|
|
119
|
+
| `ultrapower:lsp_hover` | LSP | 获取代码位置的类型信息和文档 | 否(orchestrator 直接使用) |
|
|
120
|
+
| `ultrapower:lsp_goto_definition` | LSP | 跳转到符号定义处 | 否(orchestrator 直接使用) |
|
|
121
|
+
| `ultrapower:lsp_find_references` | LSP | 查找符号在代码库中的所有用法 | 是(仅 `explore`) |
|
|
122
|
+
| `ultrapower:lsp_document_symbols` | LSP | 获取文件中所有符号的概览 | 是 |
|
|
123
|
+
| `ultrapower:lsp_workspace_symbols` | LSP | 按名称在工作区中搜索符号 | 是 |
|
|
124
|
+
| `ultrapower:lsp_diagnostics` | LSP | 获取文件的错误、警告和提示 | 是 |
|
|
125
|
+
| `ultrapower:lsp_diagnostics_directory` | LSP | 项目级类型检查(tsc --noEmit 或 LSP) | 是 |
|
|
126
|
+
| `ultrapower:lsp_prepare_rename` | LSP | 检查符号是否可以重命名 | 否(orchestrator 直接使用) |
|
|
127
|
+
| `ultrapower:lsp_rename` | LSP | 在整个项目中重命名符号 | 否(orchestrator 直接使用) |
|
|
128
|
+
| `ultrapower:lsp_code_actions` | LSP | 获取可用的重构和快速修复 | 否(orchestrator 直接使用) |
|
|
129
|
+
| `ultrapower:lsp_code_action_resolve` | LSP | 获取代码操作的完整编辑详情 | 否(orchestrator 直接使用) |
|
|
130
|
+
| `ultrapower:lsp_servers` | LSP | 列出可用的语言服务器及安装状态 | 否(orchestrator 直接使用) |
|
|
131
131
|
| `ast_grep_search` | AST | 基于 AST 的模式化结构代码搜索 | 是 |
|
|
132
132
|
| `ast_grep_replace` | AST | 基于模式的结构化代码转换 | 是 |
|
|
133
133
|
| `python_repl` | Data | 用于数据分析和计算的持久化 Python REPL | 是 |
|
|
@@ -154,30 +154,30 @@ Task(subagent_type="ultrapower:explore",
|
|
|
154
154
|
|
|
155
155
|
| 工具 | 直接使用时机 |
|
|
156
156
|
| ------ | --------------------- |
|
|
157
|
-
| `lsp_hover` | 对话中快速查询类型 |
|
|
158
|
-
| `lsp_goto_definition` | 分析过程中导航到符号定义 |
|
|
159
|
-
| `lsp_prepare_rename` | 在决定方案前检查重命名可行性 |
|
|
160
|
-
| `lsp_rename` | 安全重命名操作(返回编辑预览,不自动应用) |
|
|
161
|
-
| `lsp_code_actions` | 发现可用的重构操作 |
|
|
162
|
-
| `lsp_code_action_resolve` | 获取特定代码操作的详情 |
|
|
163
|
-
| `lsp_servers` | 检查语言服务器可用性 |
|
|
157
|
+
| `ultrapower:lsp_hover` | 对话中快速查询类型 |
|
|
158
|
+
| `ultrapower:lsp_goto_definition` | 分析过程中导航到符号定义 |
|
|
159
|
+
| `ultrapower:lsp_prepare_rename` | 在决定方案前检查重命名可行性 |
|
|
160
|
+
| `ultrapower:lsp_rename` | 安全重命名操作(返回编辑预览,不自动应用) |
|
|
161
|
+
| `ultrapower:lsp_code_actions` | 发现可用的重构操作 |
|
|
162
|
+
| `ultrapower:lsp_code_action_resolve` | 获取特定代码操作的详情 |
|
|
163
|
+
| `ultrapower:lsp_servers` | 检查语言服务器可用性 |
|
|
164
164
|
|
|
165
165
|
对于需要实现的复杂重命名或重构任务,委派给 `executor`(使用 `model="opus"`),它可以使用 `ast_grep_replace` 进行结构化转换。
|
|
166
166
|
|
|
167
167
|
### 工具选择指南
|
|
168
168
|
|
|
169
|
-
* **需要文件符号概览或工作区搜索?** 通过 `explore` 使用 `lsp_document_symbols`/`lsp_workspace_symbols`
|
|
169
|
+
* **需要文件符号概览或工作区搜索?** 通过 `explore` 使用 `ultrapower:lsp_document_symbols`/`ultrapower:lsp_workspace_symbols`
|
|
170
170
|
|
|
171
|
-
* **需要查找符号的所有用法?** 通过 `explore` 使用 `lsp_find_references`
|
|
171
|
+
* **需要查找符号的所有用法?** 通过 `explore` 使用 `ultrapower:lsp_find_references`
|
|
172
172
|
|
|
173
173
|
* **需要结构化代码模式?**(如"查找所有匹配 X 形状的函数")通过 `explore`、`architect` 或 `code-reviewer` 使用 `ast_grep_search`
|
|
174
174
|
|
|
175
175
|
* **需要结构化代码转换?** 通过 `executor`(使用 `model="opus"`)使用 `ast_grep_replace`
|
|
176
176
|
|
|
177
|
-
* **需要全项目类型检查?** 通过 `architect`、`executor` 或 `build-fixer` 使用 `lsp_diagnostics_directory`
|
|
177
|
+
* **需要全项目类型检查?** 通过 `architect`、`executor` 或 `build-fixer` 使用 `ultrapower:lsp_diagnostics_directory`
|
|
178
178
|
|
|
179
|
-
* **需要单文件错误检查?** 通过多个 agent 使用 `lsp_diagnostics`(参见矩阵)
|
|
179
|
+
* **需要单文件错误检查?** 通过多个 agent 使用 `ultrapower:lsp_diagnostics`(参见矩阵)
|
|
180
180
|
|
|
181
181
|
* **需要数据分析/计算?** 通过 `scientist` 使用 `python_repl`
|
|
182
182
|
|
|
183
|
-
* **需要快速类型信息或定义查询?** 直接使用 `lsp_hover`/`lsp_goto_definition`(orchestrator 直接工具)
|
|
183
|
+
* **需要快速类型信息或定义查询?** 直接使用 `ultrapower:lsp_hover`/`ultrapower:lsp_goto_definition`(orchestrator 直接工具)
|
package/docs/shared/features.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
| 层级 | 标准 | Agent | 模型 | 所需证据 |
|
|
8
8
|
| ------ | ---------- | ------- | ------- | ------------------- |
|
|
9
|
-
| **LIGHT** | <5 个文件,<100 行,完整测试覆盖 | architect-low | haiku | lsp_diagnostics 无错误 |
|
|
9
|
+
| **LIGHT** | <5 个文件,<100 行,完整测试覆盖 | architect-low | haiku | ultrapower:lsp_diagnostics 无错误 |
|
|
10
10
|
| **STANDARD** | 默认(非 LIGHT 或 THOROUGH) | architect-medium | sonnet | diagnostics + 构建通过 |
|
|
11
11
|
| **THOROUGH** | >20 个文件,或架构/安全变更 | architect | opus | 完整审查 + 所有测试 |
|
|
12
12
|
|
|
@@ -94,7 +94,7 @@ ELSE:
|
|
|
94
94
|
| 声明 | 所需证据 |
|
|
95
95
|
| ------- | ------------------- |
|
|
96
96
|
| "已修复" | 显示现在通过的测试 |
|
|
97
|
-
| "已实现" | lsp_diagnostics 无错误 + 构建通过 |
|
|
97
|
+
| "已实现" | ultrapower:lsp_diagnostics 无错误 + 构建通过 |
|
|
98
98
|
| "已重构" | 所有测试仍然通过 |
|
|
99
99
|
| "已调试" | 定位到 file:line 的根本原因 |
|
|
100
100
|
|
package/docs/standards/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
> **最后更新**: 2026-03-02
|
|
6
6
|
> **真理之源**: `docs/standards/audit-report.md`
|
|
7
7
|
|
|
8
|
-
ultrapower v7.
|
|
8
|
+
ultrapower v7.7.1 具备 49 个 agents、70 个 skills、35 个 hooks 的完整体系。本规范体系从现有代码反向提取,覆盖运行时防护、Hook 执行顺序、状态机、Agent 生命周期、用户使用指南和贡献规范,使 ultrapower 从"能用"升级为"可靠、易用、可扩展"。
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -308,6 +308,13 @@ try {
|
|
|
308
308
|
|
|
309
309
|
* 所有涉及文件操作的代码必须考虑 Windows 平台行为差异
|
|
310
310
|
|
|
311
|
+
* 使用 `maxRetries` 参数在 `atomicWriteJsonSyncWithRetry` 中提高鲁棒性
|
|
312
|
+
|
|
313
|
+
**测试覆盖**:
|
|
314
|
+
|
|
315
|
+
* Windows 平台兼容性测试:`tests/platform/windows-atomic-write.test.ts`
|
|
316
|
+
* 测试在非 Windows 平台自动跳过(`skipIf(process.platform !== 'win32')`)
|
|
317
|
+
|
|
311
318
|
#### 2.3.1 Windows 命令注入防护(SEC-H02)
|
|
312
319
|
|
|
313
320
|
**来源**: v5.5.18 P0 修复 (2026-03-05)
|
package/docs/troubleshooting.md
CHANGED