Skip to content

Commit 365c197

Browse files
committed
Update CLAUDE.md
1 parent 74c3bfa commit 365c197

File tree

1 file changed

+41
-40
lines changed

1 file changed

+41
-40
lines changed

CLAUDE.md

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@ All database drivers are `.tableplugin` bundles loaded at runtime by `PluginMana
5555

5656
Plugin bundles under `Plugins/`:
5757

58-
| Plugin | Database Types | C Bridge |
59-
|--------|---------------|----------|
60-
| MySQLDriverPlugin | MySQL, MariaDB | CMariaDB |
61-
| PostgreSQLDriverPlugin | PostgreSQL, Redshift | CLibPQ |
62-
| SQLiteDriverPlugin | SQLite | (Foundation sqlite3) |
63-
| ClickHouseDriverPlugin | ClickHouse | (URLSession HTTP) |
64-
| MSSQLDriverPlugin | SQL Server | CFreeTDS |
65-
| MongoDBDriverPlugin | MongoDB | CLibMongoc |
66-
| RedisDriverPlugin | Redis | CRedis |
67-
| OracleDriverPlugin | Oracle | OracleNIO (SPM) |
58+
| Plugin | Database Types | C Bridge |
59+
| ---------------------- | -------------------- | -------------------- |
60+
| MySQLDriverPlugin | MySQL, MariaDB | CMariaDB |
61+
| PostgreSQLDriverPlugin | PostgreSQL, Redshift | CLibPQ |
62+
| SQLiteDriverPlugin | SQLite | (Foundation sqlite3) |
63+
| ClickHouseDriverPlugin | ClickHouse | (URLSession HTTP) |
64+
| MSSQLDriverPlugin | SQL Server | CFreeTDS |
65+
| MongoDBDriverPlugin | MongoDB | CLibMongoc |
66+
| RedisDriverPlugin | Redis | CRedis |
67+
| OracleDriverPlugin | Oracle | OracleNIO (SPM) |
6868

6969
When adding a new driver: create a new plugin bundle under `Plugins/`, implement `DriverPlugin` + `PluginDatabaseDriver`, add target to pbxproj. See `docs/development/plugin-system/` for details.
7070

@@ -93,13 +93,13 @@ When adding a new method to the driver protocol: add to `PluginDatabaseDriver` (
9393

9494
`Core/Services/` is split into domain subdirectories:
9595

96-
| Subdirectory | Contents |
97-
|-------------|----------|
98-
| `Export/` | ExportService, ImportService, XLSXWriter |
99-
| `Formatting/` | SQLFormatterService, DateFormattingService |
100-
| `Infrastructure/` | AppNotifications, DeeplinkHandler, WindowOpener, UpdaterBridge, etc. |
101-
| `Licensing/` | LicenseManager, LicenseAPIClient, LicenseSignatureVerifier |
102-
| `Query/` | SQLDialectProvider, TableQueryBuilder, RowParser, RowOperationsManager |
96+
| Subdirectory | Contents |
97+
| ----------------- | ---------------------------------------------------------------------- |
98+
| `Export/` | ExportService, ImportService, XLSXWriter |
99+
| `Formatting/` | SQLFormatterService, DateFormattingService |
100+
| `Infrastructure/` | AppNotifications, DeeplinkHandler, WindowOpener, UpdaterBridge, etc. |
101+
| `Licensing/` | LicenseManager, LicenseAPIClient, LicenseSignatureVerifier |
102+
| `Query/` | SQLDialectProvider, TableQueryBuilder, RowParser, RowOperationsManager |
103103

104104
`Models/` is split into: `AI/`, `Connection/`, `Database/`, `Export/`, `Query/`, `Settings/`, `UI/`, `Schema/`, `ClickHouse/`
105105

@@ -109,13 +109,13 @@ When adding a new method to the driver protocol: add to `PluginDatabaseDriver` (
109109

110110
### Storage Patterns
111111

112-
| What | How | Where |
113-
|------|-----|-------|
114-
| Connection passwords | Keychain | `ConnectionStorage` |
115-
| User preferences | UserDefaults | `AppSettingsStorage` / `AppSettingsManager` |
116-
| Query history | SQLite FTS5 | `QueryHistoryStorage` |
117-
| Tab state | JSON persistence | `TabPersistenceService` / `TabStateStorage` |
118-
| Filter presets || `FilterSettingsStorage` |
112+
| What | How | Where |
113+
| -------------------- | ---------------- | ------------------------------------------- |
114+
| Connection passwords | Keychain | `ConnectionStorage` |
115+
| User preferences | UserDefaults | `AppSettingsStorage` / `AppSettingsManager` |
116+
| Query history | SQLite FTS5 | `QueryHistoryStorage` |
117+
| Tab state | JSON persistence | `TabPersistenceService` / `TabStateStorage` |
118+
| Filter presets | | `FilterSettingsStorage` |
119119

120120
### Logging
121121

@@ -148,12 +148,12 @@ private static let logger = Logger(subsystem: "com.TablePro", category: "Compone
148148

149149
### SwiftLint Limits
150150

151-
| Metric | Warning | Error |
152-
|--------|---------|-------|
153-
| File length | 1200 | 1800 |
154-
| Type body | 1100 | 1500 |
155-
| Function body | 160 | 250 |
156-
| Cyclomatic complexity | 40 | 60 |
151+
| Metric | Warning | Error |
152+
| --------------------- | ------- | ----- |
153+
| File length | 1200 | 1800 |
154+
| Type body | 1100 | 1500 |
155+
| Function body | 160 | 250 |
156+
| Cyclomatic complexity | 40 | 60 |
157157

158158
When approaching limits: extract into `TypeName+Category.swift` extension files in an `Extensions/` subfolder. Group by domain logic, not arbitrary line counts.
159159

@@ -166,11 +166,11 @@ These are **non-negotiable** — never skip them:
166166
2. **Localization**: Use `String(localized:)` for new user-facing strings in computed properties, AppKit code, alerts, and error descriptions. SwiftUI view literals (`Text("literal")`, `Button("literal")`) auto-localize. Do NOT localize technical terms (font names, database types, SQL keywords, encoding names).
167167

168168
3. **Documentation**: Update docs in `docs/` (Mintlify-based) when adding/changing features. Key mappings:
169-
- New keyboard shortcuts → `docs/features/keyboard-shortcuts.mdx`
170-
- UI/feature changes → relevant `docs/features/*.mdx` page
171-
- Settings changes → `docs/customization/settings.mdx`
172-
- Database driver changes → `docs/databases/*.mdx`
173-
- Update both English (`docs/`) and Vietnamese (`docs/vi/`) pages
169+
- New keyboard shortcuts → `docs/features/keyboard-shortcuts.mdx`
170+
- UI/feature changes → relevant `docs/features/*.mdx` page
171+
- Settings changes → `docs/customization/settings.mdx`
172+
- Database driver changes → `docs/databases/*.mdx`
173+
- Update both English (`docs/`) and Vietnamese (`docs/vi/`) pages
174174
175175
4. **Test-first correctness**: When tests fail, fix the **source code** — never adjust tests to match incorrect output. Tests define expected behavior.
176176
@@ -180,11 +180,12 @@ These are **non-negotiable** — never skip them:
180180
181181
## Agent Execution Strategy
182182
183-
- **Always use subagents** for implementation work. Delegate coding tasks to Task subagents to preserve main context tokens.
184-
- **Always parallelize** independent tasks. Launch all subagents in a single message with multiple Task tool calls.
185-
- **Main context = orchestrator only.** Read files, launch subagents, summarize results, update tracking. Never do heavy implementation directly.
186-
- **Subagent prompts must be self-contained.** Include file paths, the specific problem, and clear instructions.
187-
- **Every implementation must run in a separate worktree.** Use `isolation: "worktree"` when spawning Task subagents for any code changes. This keeps the main branch clean and allows parallel work without conflicts.
183+
- **Always use team agents** for implementation work. Use the Agent tool (not subagents/tasks) to delegate coding to specialized agents (e.g., `feature-dev:feature-dev`, `feature-dev:code-architect`, `code-simplifier:code-simplifier`).
184+
- **Always parallelize** independent tasks. Launch multiple agents in a single message.
185+
- **Main context = orchestrator only.** Read files, launch agents, summarize results, update tracking. Never do heavy implementation directly.
186+
- **Agent prompts must be self-contained.** Include file paths, the specific problem, and clear instructions.
187+
- **Use worktree isolation** (`isolation: "worktree"`) for agents making code changes. This keeps the main branch clean and allows parallel work without conflicts.
188+
- **Implementation standards** (apply to ALL new features and refactors): Clean architecture, correct macOS/Apple platform approach, proper design patterns, no backward compatibility hacks, easy to maintain and extensible. Always include these requirements in agent prompts.
188189
189190
## Performance Pitfalls
190191

0 commit comments

Comments
 (0)