From e57e4b2b59c45ca4e362edcad32778d310ea588e Mon Sep 17 00:00:00 2001 From: gracefullight <11773683+gracefullight@users.noreply.github.com> Date: Mon, 15 Jun 2026 14:58:49 +0000 Subject: [PATCH] chore(deps): update oh-my-agent skills --- .agents/agents/variants/opencode.json | 22 + .agents/config/defaults.yaml | 15 - .agents/hooks/core/agentmemory-client.ts | 58 +- .agents/hooks/core/triggers.json | 48 + .agents/hooks/variants/claude.json | 8 +- .agents/hooks/variants/opencode/oma.ts | 211 +++ .agents/rules/i18n-arb.md | 18 + .agents/rules/i18n-guide.md | 14 +- .../runtime/execution-protocols/opencode.md | 63 + .agents/skills/_version.json | 4 +- .agents/skills/oma-mobile/SKILL.md | 19 +- .../skills/oma-mobile/resources/checklist.md | 1 + .../skills/oma-mobile/resources/examples.md | 14 +- .../skills/oma-mobile/resources/tech-stack.md | 121 +- .agents/skills/oma-mobile/variants/README.md | 42 +- .../variants/flutter/api-template.dart | 428 ++++++ .../oma-mobile/variants/flutter/snippets.md | 1175 +++++++++++++++++ .../oma-mobile/variants/flutter/stack.yaml | 21 + .../oma-mobile/variants/flutter/tech-stack.md | 193 +++ .../variants/react-native/api-template.ts | 332 +++++ .../variants/react-native/snippets.md | 682 ++++++++++ .../variants/react-native/stack.yaml | 22 + .../variants/react-native/tech-stack.md | 179 +++ .../oma-mobile/variants/stack.schema.json | 28 +- .../variants/swift-ios/api-template.swift | 70 +- .../oma-mobile/variants/swift-ios/snippets.md | 309 ++++- .../oma-mobile/variants/swift-ios/stack.yaml | 1 + .../variants/swift-ios/tech-stack.md | 56 +- .agents/skills/oma-refactor/SKILL.md | 2 +- .../oma-refactor/resources/measurement.md | 9 +- .claude/hooks/oma-hook.sh | 4 +- .claude/rules/i18n-arb.md | 19 + .claude/rules/i18n-guide.md | 14 +- .claude/settings.json | 10 +- .claude/skills/backend-agent | 1 - .claude/skills/competitor-alternatives | 1 - .claude/skills/component-refactoring | 1 - .claude/skills/content-strategy | 1 - .claude/skills/copy-editing | 1 - .claude/skills/copywriting | 1 - .claude/skills/db-agent | 1 - .claude/skills/debug-agent | 1 - .claude/skills/dev-workflow | 1 - .claude/skills/fastapi-router-creator | 1 - .claude/skills/fastapi-templates | 1 - .claude/skills/free-tool-strategy | 1 - .claude/skills/frontend-agent | 1 - .claude/skills/gcp-migration | 1 - .claude/skills/launch-strategy | 1 - .claude/skills/marketing-ideas | 1 - .claude/skills/marketing-psychology | 1 - .claude/skills/mobile-agent | 1 - .claude/skills/oma-commit | 1 - .claude/skills/orchestrator | 1 - .claude/skills/pm-agent | 1 - .claude/skills/postgres-best-practices | 1 - .claude/skills/pricing-strategy | 1 - .claude/skills/product-marketing-context | 1 - .claude/skills/qa-agent | 1 - .claude/skills/skill-creator | 1 - .claude/skills/skill-lookup | 1 - .claude/skills/social-content | 1 - .claude/skills/tf-infra-agent | 1 - .claude/skills/translator | 1 - .claude/skills/ui-ux-pro-max | 1 - .claude/skills/webf-native-ui-dev | 1 - .claude/skills/workflow-guide | 1 - .codex/hooks/oma-hook.sh | 4 +- .cursor/hooks/oma-hook.sh | 4 +- .cursor/rules/i18n-arb.mdc | 20 + .cursor/rules/i18n-guide.mdc | 14 +- .gemini/hooks/oma-hook.sh | 4 +- .github/skills/backend-agent | 1 - .github/skills/commit | 1 - .github/skills/competitor-alternatives | 1 - .github/skills/component-refactoring | 1 - .github/skills/content-strategy | 1 - .github/skills/copy-editing | 1 - .github/skills/copywriting | 1 - .github/skills/db-agent | 1 - .github/skills/debug-agent | 1 - .github/skills/dev-workflow | 1 - .github/skills/fastapi-router-creator | 1 - .github/skills/fastapi-templates | 1 - .github/skills/free-tool-strategy | 1 - .github/skills/frontend-agent | 1 - .github/skills/gcp-migration | 1 - .github/skills/launch-strategy | 1 - .github/skills/marketing-ideas | 1 - .github/skills/marketing-psychology | 1 - .github/skills/mobile-agent | 1 - .github/skills/oma-commit | 1 - .github/skills/orchestrator | 1 - .github/skills/pm-agent | 1 - .github/skills/postgres-best-practices | 1 - .github/skills/pricing-strategy | 1 - .github/skills/product-marketing-context | 1 - .github/skills/qa-agent | 1 - .github/skills/skill-creator | 1 - .github/skills/skill-lookup | 1 - .github/skills/social-content | 1 - .github/skills/tf-infra-agent | 1 - .github/skills/translator | 1 - .github/skills/ui-ux-pro-max | 1 - .github/skills/webf-native-ui-dev | 1 - .github/skills/workflow-guide | 1 - .qwen/hooks/oma-hook.sh | 4 +- AGENTS.md | 1 + CLAUDE.md | 1 + GEMINI.md | 1 + 110 files changed, 4086 insertions(+), 246 deletions(-) create mode 100644 .agents/agents/variants/opencode.json create mode 100644 .agents/hooks/variants/opencode/oma.ts create mode 100644 .agents/rules/i18n-arb.md create mode 100644 .agents/skills/_shared/runtime/execution-protocols/opencode.md create mode 100644 .agents/skills/oma-mobile/variants/flutter/api-template.dart create mode 100644 .agents/skills/oma-mobile/variants/flutter/snippets.md create mode 100644 .agents/skills/oma-mobile/variants/flutter/stack.yaml create mode 100644 .agents/skills/oma-mobile/variants/flutter/tech-stack.md create mode 100644 .agents/skills/oma-mobile/variants/react-native/api-template.ts create mode 100644 .agents/skills/oma-mobile/variants/react-native/snippets.md create mode 100644 .agents/skills/oma-mobile/variants/react-native/stack.yaml create mode 100644 .agents/skills/oma-mobile/variants/react-native/tech-stack.md create mode 100644 .claude/rules/i18n-arb.md delete mode 120000 .claude/skills/backend-agent delete mode 120000 .claude/skills/competitor-alternatives delete mode 120000 .claude/skills/component-refactoring delete mode 120000 .claude/skills/content-strategy delete mode 120000 .claude/skills/copy-editing delete mode 120000 .claude/skills/copywriting delete mode 120000 .claude/skills/db-agent delete mode 120000 .claude/skills/debug-agent delete mode 120000 .claude/skills/dev-workflow delete mode 120000 .claude/skills/fastapi-router-creator delete mode 120000 .claude/skills/fastapi-templates delete mode 120000 .claude/skills/free-tool-strategy delete mode 120000 .claude/skills/frontend-agent delete mode 120000 .claude/skills/gcp-migration delete mode 120000 .claude/skills/launch-strategy delete mode 120000 .claude/skills/marketing-ideas delete mode 120000 .claude/skills/marketing-psychology delete mode 120000 .claude/skills/mobile-agent delete mode 120000 .claude/skills/oma-commit delete mode 120000 .claude/skills/orchestrator delete mode 120000 .claude/skills/pm-agent delete mode 120000 .claude/skills/postgres-best-practices delete mode 120000 .claude/skills/pricing-strategy delete mode 120000 .claude/skills/product-marketing-context delete mode 120000 .claude/skills/qa-agent delete mode 120000 .claude/skills/skill-creator delete mode 120000 .claude/skills/skill-lookup delete mode 120000 .claude/skills/social-content delete mode 120000 .claude/skills/tf-infra-agent delete mode 120000 .claude/skills/translator delete mode 120000 .claude/skills/ui-ux-pro-max delete mode 120000 .claude/skills/webf-native-ui-dev delete mode 120000 .claude/skills/workflow-guide create mode 100644 .cursor/rules/i18n-arb.mdc delete mode 120000 .github/skills/backend-agent delete mode 120000 .github/skills/commit delete mode 120000 .github/skills/competitor-alternatives delete mode 120000 .github/skills/component-refactoring delete mode 120000 .github/skills/content-strategy delete mode 120000 .github/skills/copy-editing delete mode 120000 .github/skills/copywriting delete mode 120000 .github/skills/db-agent delete mode 120000 .github/skills/debug-agent delete mode 120000 .github/skills/dev-workflow delete mode 120000 .github/skills/fastapi-router-creator delete mode 120000 .github/skills/fastapi-templates delete mode 120000 .github/skills/free-tool-strategy delete mode 120000 .github/skills/frontend-agent delete mode 120000 .github/skills/gcp-migration delete mode 120000 .github/skills/launch-strategy delete mode 120000 .github/skills/marketing-ideas delete mode 120000 .github/skills/marketing-psychology delete mode 120000 .github/skills/mobile-agent delete mode 120000 .github/skills/oma-commit delete mode 120000 .github/skills/orchestrator delete mode 120000 .github/skills/pm-agent delete mode 120000 .github/skills/postgres-best-practices delete mode 120000 .github/skills/pricing-strategy delete mode 120000 .github/skills/product-marketing-context delete mode 120000 .github/skills/qa-agent delete mode 120000 .github/skills/skill-creator delete mode 120000 .github/skills/skill-lookup delete mode 120000 .github/skills/social-content delete mode 120000 .github/skills/tf-infra-agent delete mode 120000 .github/skills/translator delete mode 120000 .github/skills/ui-ux-pro-max delete mode 120000 .github/skills/webf-native-ui-dev delete mode 120000 .github/skills/workflow-guide diff --git a/.agents/agents/variants/opencode.json b/.agents/agents/variants/opencode.json new file mode 100644 index 0000000..b304624 --- /dev/null +++ b/.agents/agents/variants/opencode.json @@ -0,0 +1,22 @@ +{ + "$schema": "./agent-variant.schema.json", + "vendor": "opencode", + "destDir": ".opencode/agents", + "modelDefault": "opencode-go/deepseek-v4-flash", + "toolsDefault": [], + "protocolPath": ".agents/skills/_shared/runtime/execution-protocols/opencode.md", + "agents": { + "backend-engineer": {}, + "frontend-engineer": {}, + "db-engineer": {}, + "debug-investigator": {}, + "architecture-reviewer": {}, + "tf-infra-engineer": {}, + "mobile-engineer": {}, + "pm-planner": {}, + "qa-reviewer": {}, + "docs-curator": {}, + "refactor-engineer": {}, + "research-explorer": {} + } +} diff --git a/.agents/config/defaults.yaml b/.agents/config/defaults.yaml index 1701aab..ca87bb6 100644 --- a/.agents/config/defaults.yaml +++ b/.agents/config/defaults.yaml @@ -55,21 +55,6 @@ runtime_profiles: tf-infra: { model: "openai/gpt-5.5", effort: "high" } explore: { model: "openai/gpt-5.4-mini", effort: "low" } - gemini: - description: "Gemini — Google AI Pro" - agent_defaults: - orchestrator: { model: "google/gemini-3-flash" } - architecture: { model: "google/gemini-3.1-pro-preview", thinking: true } - qa: { model: "google/gemini-3-flash", thinking: true } - pm: { model: "google/gemini-3-flash" } - backend: { model: "google/gemini-3-flash", thinking: true } - frontend: { model: "google/gemini-3-flash", thinking: true } - mobile: { model: "google/gemini-3-flash", thinking: true } - db: { model: "google/gemini-3-flash", thinking: true } - debug: { model: "google/gemini-3-flash", thinking: true } - tf-infra: { model: "google/gemini-3-flash", thinking: true } - explore: { model: "google/gemini-3.1-flash-lite" } - mixed: description: "Mixed — role-optimal vendors per agent (Claude for orchestration/QA/PM, Codex for impl, Gemini for explore)" agent_defaults: diff --git a/.agents/hooks/core/agentmemory-client.ts b/.agents/hooks/core/agentmemory-client.ts index 5816663..2611828 100644 --- a/.agents/hooks/core/agentmemory-client.ts +++ b/.agents/hooks/core/agentmemory-client.ts @@ -142,15 +142,63 @@ export interface RecalledFact { interface SearchResult { score?: number; + timestamp?: unknown; + created_at?: unknown; observation?: { narrative?: unknown; facts?: unknown; title?: unknown; type?: unknown; + timestamp?: unknown; + created_at?: unknown; }; } -function parseSearchResults(body: string, k: number): RecalledFact[] { +/** + * Recall TTL: facts older than this many days are dropped from the snapshot so + * stale, long-resolved decisions stop rehydrating every boundary. Default 30 + * days; set `OMA_RECALL_MAX_AGE_DAYS=0` (or a non-positive value) to disable. + * Returns the max age in ms, or null when disabled. + */ +function recallMaxAgeMs(): number | null { + const raw = process.env.OMA_RECALL_MAX_AGE_DAYS; + const days = raw === undefined ? 30 : Number(raw); + if (!Number.isFinite(days) || days <= 0) return null; + return days * 24 * 60 * 60 * 1000; +} + +/** + * Best-effort timestamp extraction from a search result. AgentMemory's response + * envelope is not contractually fixed across versions, so several candidate + * field names / locations are probed. Numeric epoch seconds are normalised to + * ms. Returns null when no parseable timestamp is present — callers then keep + * the fact (TTL filtering is fail-open, never dropping facts of unknown age). + */ +function extractTimestampMs(entry: SearchResult): number | null { + const obs = entry.observation ?? {}; + const candidates: unknown[] = [ + obs.timestamp, + obs.created_at, + entry.timestamp, + entry.created_at, + ]; + for (const candidate of candidates) { + if (typeof candidate === "number" && Number.isFinite(candidate)) { + return candidate < 1e12 ? candidate * 1000 : candidate; + } + if (typeof candidate === "string" && candidate.trim()) { + const parsed = Date.parse(candidate); + if (Number.isFinite(parsed)) return parsed; + } + } + return null; +} + +export function parseSearchResults( + body: string, + k: number, + nowMs: number = Date.now(), +): RecalledFact[] { let parsed: { results?: unknown }; try { parsed = JSON.parse(body) as { results?: unknown }; @@ -164,12 +212,20 @@ function parseSearchResults(body: string, k: number): RecalledFact[] { return Number.isFinite(raw) ? raw : 1; })(); + const maxAgeMs = recallMaxAgeMs(); + const cutoffMs = maxAgeMs === null ? null : nowMs - maxAgeMs; + const facts: RecalledFact[] = []; for (const entry of parsed.results as SearchResult[]) { const score = typeof entry.score === "number" ? entry.score : 0; // Raw `/observe` envelopes score near-zero (~0.006); enriched facts score // in the single digits. Drop the noise floor so the snapshot stays useful. if (score < minScore) continue; + // TTL: drop facts older than the cutoff (fail-open on unknown age). + if (cutoffMs !== null) { + const tsMs = extractTimestampMs(entry); + if (tsMs !== null && tsMs < cutoffMs) continue; + } const obs = entry.observation ?? {}; const narrative = typeof obs.narrative === "string" && obs.narrative.trim() diff --git a/.agents/hooks/core/triggers.json b/.agents/hooks/core/triggers.json index 29747e0..a0c6335 100644 --- a/.agents/hooks/core/triggers.json +++ b/.agents/hooks/core/triggers.json @@ -3033,6 +3033,54 @@ "会议转录" ] } + }, + "oma-refactor": { + "keywords": { + "*": ["oma-refactor"], + "en": [ + "refactor this", + "refactoring plan", + "extract class", + "extract method", + "reduce complexity", + "measure complexity", + "code smell", + "technical debt", + "characterization test", + "hotspot analysis", + "split this class", + "clean up this code" + ], + "ko": [ + "리팩토링", + "리팩터링", + "복잡도 줄여", + "복잡도 측정", + "코드 스멜", + "기술 부채", + "클래스 분리", + "메서드 추출", + "코드 정리해줘" + ], + "ja": [ + "リファクタリング", + "複雑度を下げ", + "複雑度を測定", + "コードスメル", + "技術的負債", + "クラスを分割", + "メソッド抽出" + ], + "zh": [ + "重构", + "降低复杂度", + "测量复杂度", + "代码异味", + "技术债", + "拆分类", + "提取方法" + ] + } } }, "informationalPatterns": { diff --git a/.agents/hooks/variants/claude.json b/.agents/hooks/variants/claude.json index 901d5a9..b9a8a41 100644 --- a/.agents/hooks/variants/claude.json +++ b/.agents/hooks/variants/claude.json @@ -9,19 +9,19 @@ "UserPromptSubmit": [ { "hook": "keyword-detector.ts", - "timeout": 5 + "timeout": 2 }, { "hook": "state-boundary.ts", - "timeout": 5 + "timeout": 4 }, { "hook": "skill-injector.ts", - "timeout": 3 + "timeout": 2 }, { "hook": "serena-primer.ts", - "timeout": 3 + "timeout": 2 } ], "PreToolUse": { diff --git a/.agents/hooks/variants/opencode/oma.ts b/.agents/hooks/variants/opencode/oma.ts new file mode 100644 index 0000000..2e0e5c6 --- /dev/null +++ b/.agents/hooks/variants/opencode/oma.ts @@ -0,0 +1,211 @@ +/** + * oh-my-agent — opencode (Sst opencode) plugin bridge. + * + * SSOT source. At install time `installOpencodePlugin` copies this file to + * `.opencode/plugins/oma/oma.ts` alongside the core hook scripts. opencode + * auto-discovers plugins under each `.opencode/plugins` subdirectory. + * + * Why a bridge instead of a per-vendor variants JSON entry: opencode does NOT + * register settings-file hooks like the other vendors. It loads in-process + * TypeScript plugins and dispatches plugin event handlers. So rather than the + * generic `installHooksFromVariant` path (events → settings file → `bun + *