fix(ja-JP): address review feedback and add 5 missing skills

- Fix Chinese term '提炼' → '蒸留' in commands/rules-distill.md
- Fix '重大な所見' (Critical→重大) in agents/opensource-sanitizer.md
- Fix non-transactional persistence in swift-actor-persistence/SKILL.md:
  add rollback logic so cache stays consistent if disk write fails
- Clarify anti-pattern wording: 'configurable file URL' → 'externally
  mutable after init' to remove internal inconsistency (P2)
- Fix broken relative link in videodb/reference/api-reference.md:
  ../../../../../skills/... → ./editor.md
- Add 5 previously missing SKILL.md translations:
  skill-scout, tinystruct-patterns, ui-to-vue, vite-patterns,
  windows-desktop-e2e
This commit is contained in:
Claude
2026-05-17 09:08:06 +09:00
committed by Affaan Mustafa
parent d66b5fa480
commit fabb4d0c11
9 changed files with 1578 additions and 10 deletions

View File

@@ -35,13 +35,27 @@ public actor LocalRepository<T: Codable & Identifiable> where T.ID == String {
// MARK: - Public API
public func save(_ item: T) throws {
let previous = cache[item.id]
cache[item.id] = item
try persistToFile()
do {
try persistToFile()
} catch {
//
cache[item.id] = previous
throw error
}
}
public func delete(_ id: String) throws {
let previous = cache[id]
cache[id] = nil
try persistToFile()
do {
try persistToFile()
} catch {
//
cache[id] = previous
throw error
}
}
public func find(by id: String) -> T? {
@@ -131,7 +145,7 @@ final class QuestionListViewModel {
* Swiftの新しい並行処理コードでActorの代わりに `DispatchQueue` または `NSLock` を使用する
* 内部のキャッシュ辞書を外部の呼び出し元に公開する
* 検証なしでファイルURLを設定可能にする
* 初期化後にファイルURLを外部から変更可能にする(初期化時のみ設定を許可すること)
* すべてのActor メソッド呼び出しが `await` であることを忘れる——呼び出し元は非同期コンテキストを処理する必要がある
* Actor の分離をバイパスするために `nonisolated` を使用する(本末転倒)