docs: update AGENTS documentation metadata and agent model references

- Update generated timestamp and commit hash metadata
- Normalize agent model names with provider prefixes (anthropic/, opencode/, google/)
- Remove deprecated Google OAuth/Antigravity references
- Update line counts and complexity hotspot entries
- Adjust test count from 82 to 80+ files and assertions from 2559+ to 2500+

🤖 Generated with assistance of oh-my-opencode
This commit is contained in:
justsisyphus
2026-01-15 15:53:51 +09:00
parent 89fa9ff167
commit a38dc28e40
7 changed files with 71 additions and 60 deletions
+19 -3
View File
@@ -7,6 +7,7 @@ Cross-cutting utilities for path resolution, config management, text processing,
```
shared/
├── index.ts # Barrel export
├── agent-variant.ts # Agent model/prompt variation logic
├── claude-config-dir.ts # ~/.claude resolution
├── command-executor.ts # Shell exec with variable expansion
├── config-errors.ts # Global error tracking
@@ -14,23 +15,31 @@ shared/
├── data-path.ts # XDG data directory
├── deep-merge.ts # Type-safe recursive merge
├── dynamic-truncator.ts # Token-aware truncation
├── external-plugin-detector.ts # Detect marketplace plugins
├── file-reference-resolver.ts # @filename syntax
├── file-utils.ts # Symlink, markdown detection
├── first-message-variant.ts # Initial prompt variations
├── frontmatter.ts # YAML frontmatter parsing
├── hook-disabled.ts # Check if hook disabled
├── jsonc-parser.ts # JSON with Comments
├── logger.ts # File-based logging
├── migration.ts # Legacy name compat (omo → Sisyphus)
├── model-sanitizer.ts # Normalize model names
├── opencode-config-dir.ts # ~/.config/opencode resolution
├── opencode-version.ts # Version comparison logic
├── pattern-matcher.ts # Tool name matching
├── permission-compat.ts # Legacy permission mapping
├── session-cursor.ts # Track message history pointer
├── snake-case.ts # Case conversion
── tool-name.ts # PascalCase normalization
── tool-name.ts # PascalCase normalization
└── zip-extractor.ts # Plugin installation utility
```
## WHEN TO USE
| Task | Utility |
|------|---------|
| Find ~/.claude | `getClaudeConfigDir()` |
| Find ~/.config/opencode | `getOpenCodeConfigDir()` |
| Merge configs | `deepMerge(base, override)` |
| Parse user files | `parseJsonc()` |
| Check hook enabled | `isHookDisabled(name, list)` |
@@ -38,6 +47,9 @@ shared/
| Resolve @file | `resolveFileReferencesInText()` |
| Execute shell | `resolveCommandsInText()` |
| Legacy names | `migrateLegacyAgentNames()` |
| Version check | `isOpenCodeVersionAtLeast(version)` |
| Map permissions | `normalizePermission()` |
| Track session | `SessionCursor` |
## CRITICAL PATTERNS
```typescript
@@ -49,10 +61,14 @@ const final = deepMerge(deepMerge(defaults, userConfig), projectConfig)
// Safe JSONC parsing for user-edited files
const { config, error } = parseJsoncSafe(content)
// Version-gated features
if (isOpenCodeVersionAtLeast('1.0.150')) { /* ... */ }
```
## ANTI-PATTERNS
- Hardcoding paths (use `getClaudeConfigDir`, `getUserConfigPath`)
- Hardcoding paths (use `getClaudeConfigDir`, `getOpenCodeConfigDir`)
- Using `JSON.parse` for user configs (always use `parseJsonc`)
- Ignoring output size (large tool outputs MUST use `dynamicTruncate`)
- Manual case conversion (use `toSnakeCase`, `normalizeToolName`)
- Manual version parsing (use `opencode-version.ts` utilities)
- Raw permission checks (use `permission-compat.ts`)