htm 0.0.2 → 0.0.10
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.
- checksums.yaml +4 -4
- data/.aigcm_msg +1 -0
- data/.architecture/reviews/comprehensive-codebase-review.md +577 -0
- data/.claude/settings.local.json +92 -0
- data/.irbrc +283 -80
- data/.tbls.yml +2 -1
- data/CHANGELOG.md +294 -26
- data/CLAUDE.md +603 -0
- data/README.md +76 -5
- data/Rakefile +5 -0
- data/db/migrate/{20250101000001_enable_extensions.rb → 00001_enable_extensions.rb} +0 -1
- data/db/migrate/00002_create_robots.rb +11 -0
- data/db/migrate/00003_create_file_sources.rb +20 -0
- data/db/migrate/00004_create_nodes.rb +65 -0
- data/db/migrate/00005_create_tags.rb +13 -0
- data/db/migrate/00006_create_node_tags.rb +18 -0
- data/db/migrate/00007_create_robot_nodes.rb +26 -0
- data/db/migrate/00009_add_working_memory_to_robot_nodes.rb +12 -0
- data/db/schema.sql +172 -1
- data/docs/api/database.md +1 -2
- data/docs/api/htm.md +197 -2
- data/docs/api/yard/HTM/ActiveRecordConfig.md +23 -0
- data/docs/api/yard/HTM/AuthorizationError.md +11 -0
- data/docs/api/yard/HTM/CircuitBreaker.md +92 -0
- data/docs/api/yard/HTM/CircuitBreakerOpenError.md +34 -0
- data/docs/api/yard/HTM/Configuration.md +175 -0
- data/docs/api/yard/HTM/Database.md +99 -0
- data/docs/api/yard/HTM/DatabaseError.md +14 -0
- data/docs/api/yard/HTM/EmbeddingError.md +18 -0
- data/docs/api/yard/HTM/EmbeddingService.md +58 -0
- data/docs/api/yard/HTM/Error.md +11 -0
- data/docs/api/yard/HTM/JobAdapter.md +39 -0
- data/docs/api/yard/HTM/LongTermMemory.md +342 -0
- data/docs/api/yard/HTM/NotFoundError.md +17 -0
- data/docs/api/yard/HTM/Observability.md +107 -0
- data/docs/api/yard/HTM/QueryTimeoutError.md +19 -0
- data/docs/api/yard/HTM/Railtie.md +27 -0
- data/docs/api/yard/HTM/ResourceExhaustedError.md +13 -0
- data/docs/api/yard/HTM/TagError.md +18 -0
- data/docs/api/yard/HTM/TagService.md +67 -0
- data/docs/api/yard/HTM/Timeframe/Result.md +24 -0
- data/docs/api/yard/HTM/Timeframe.md +40 -0
- data/docs/api/yard/HTM/TimeframeExtractor/Result.md +24 -0
- data/docs/api/yard/HTM/TimeframeExtractor.md +45 -0
- data/docs/api/yard/HTM/ValidationError.md +20 -0
- data/docs/api/yard/HTM/WorkingMemory.md +131 -0
- data/docs/api/yard/HTM.md +80 -0
- data/docs/api/yard/index.csv +179 -0
- data/docs/api/yard-reference.md +51 -0
- data/docs/database/README.md +128 -128
- data/docs/database/public.file_sources.md +42 -0
- data/docs/database/public.file_sources.svg +211 -0
- data/docs/database/public.node_tags.md +4 -4
- data/docs/database/public.node_tags.svg +212 -79
- data/docs/database/public.nodes.md +22 -12
- data/docs/database/public.nodes.svg +246 -127
- data/docs/database/public.robot_nodes.md +11 -9
- data/docs/database/public.robot_nodes.svg +220 -98
- data/docs/database/public.robots.md +2 -2
- data/docs/database/public.robots.svg +136 -81
- data/docs/database/public.tags.md +3 -3
- data/docs/database/public.tags.svg +118 -39
- data/docs/database/schema.json +850 -771
- data/docs/database/schema.svg +256 -197
- data/docs/development/schema.md +67 -2
- data/docs/guides/adding-memories.md +93 -7
- data/docs/guides/recalling-memories.md +36 -1
- data/examples/README.md +280 -0
- data/examples/cli_app/htm_cli.rb +65 -5
- data/examples/cli_app/temp.log +93 -0
- data/examples/file_loader_usage.rb +177 -0
- data/examples/robot_groups/lib/robot_group.rb +419 -0
- data/examples/robot_groups/lib/working_memory_channel.rb +140 -0
- data/examples/robot_groups/multi_process.rb +286 -0
- data/examples/robot_groups/robot_worker.rb +136 -0
- data/examples/robot_groups/same_process.rb +229 -0
- data/examples/timeframe_demo.rb +276 -0
- data/lib/htm/active_record_config.rb +1 -1
- data/lib/htm/circuit_breaker.rb +202 -0
- data/lib/htm/configuration.rb +59 -13
- data/lib/htm/database.rb +67 -36
- data/lib/htm/embedding_service.rb +39 -2
- data/lib/htm/errors.rb +131 -11
- data/lib/htm/jobs/generate_embedding_job.rb +5 -4
- data/lib/htm/jobs/generate_tags_job.rb +4 -0
- data/lib/htm/loaders/markdown_loader.rb +263 -0
- data/lib/htm/loaders/paragraph_chunker.rb +112 -0
- data/lib/htm/long_term_memory.rb +460 -343
- data/lib/htm/models/file_source.rb +99 -0
- data/lib/htm/models/node.rb +80 -5
- data/lib/htm/models/robot.rb +24 -1
- data/lib/htm/models/robot_node.rb +1 -0
- data/lib/htm/models/tag.rb +254 -4
- data/lib/htm/observability.rb +395 -0
- data/lib/htm/tag_service.rb +60 -3
- data/lib/htm/tasks.rb +26 -1
- data/lib/htm/timeframe.rb +194 -0
- data/lib/htm/timeframe_extractor.rb +307 -0
- data/lib/htm/version.rb +1 -1
- data/lib/htm/working_memory.rb +165 -70
- data/lib/htm.rb +328 -130
- data/lib/tasks/doc.rake +300 -0
- data/lib/tasks/files.rake +299 -0
- data/lib/tasks/htm.rake +158 -3
- data/lib/tasks/jobs.rake +3 -9
- data/lib/tasks/tags.rake +166 -6
- data/mkdocs.yml +36 -1
- data/notes/ARCHITECTURE_REVIEW.md +1167 -0
- data/notes/IMPLEMENTATION_SUMMARY.md +606 -0
- data/notes/MULTI_FRAMEWORK_IMPLEMENTATION.md +451 -0
- data/notes/next_steps.md +100 -0
- data/notes/plan.md +627 -0
- data/notes/tag_ontology_enhancement_ideas.md +222 -0
- data/notes/timescaledb_removal_summary.md +200 -0
- metadata +125 -15
- data/db/migrate/20250101000002_create_robots.rb +0 -14
- data/db/migrate/20250101000003_create_nodes.rb +0 -42
- data/db/migrate/20250101000005_create_tags.rb +0 -38
- data/db/migrate/20250101000007_add_node_vector_indexes.rb +0 -30
- data/db/migrate/20250125000001_add_content_hash_to_nodes.rb +0 -14
- data/db/migrate/20250125000002_create_robot_nodes.rb +0 -35
- data/db/migrate/20250125000003_remove_source_and_robot_id_from_nodes.rb +0 -28
- data/db/migrate/20250126000001_create_working_memories.rb +0 -19
- data/db/migrate/20250126000002_remove_unused_columns.rb +0 -12
- data/docs/database/public.working_memories.md +0 -40
- data/docs/database/public.working_memories.svg +0 -112
- data/lib/htm/models/working_memory_entry.rb +0 -88
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b552d9b1e6a197c35d1ff2c64d4c8eb94a36a0e67d05efe1c10d305cf8f23d78
|
|
4
|
+
data.tar.gz: 58fa199e1a3af9fb9c3a9e8fc0fe9ee779209a44baecbccdfdf6f570f5e7c692
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9326f318f1677ea5cad5e5f6cdda4125421a13bde13d1c7bef0a2b2e8096873a7762f11d008c8d0e64365f90272aad58699b39a3af40f0c188f7e961eef6d2df
|
|
7
|
+
data.tar.gz: 6f25fa0089349b0872db11427747e525ab46a9528d1ada22be183be260bad40d48ef692f78d922ba0803b817f2f661fa143721bf180882f34c575f4650e65448
|
data/.aigcm_msg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Error generating commit message: status=404 Not Found body=404 page not found
|
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
# Architecture Review: HTM Comprehensive Codebase Review
|
|
2
|
+
|
|
3
|
+
**Date**: 2025-11-28 (Updated: 2025-11-29)
|
|
4
|
+
**Review Type**: Comprehensive Codebase Review
|
|
5
|
+
**Version**: 0.0.7+
|
|
6
|
+
**Reviewers**: Systems Architect, Domain Expert, Security Specialist, Maintainability Expert, Performance Specialist, AI Engineer, Ruby Expert, Database Architect
|
|
7
|
+
|
|
8
|
+
## Executive Summary
|
|
9
|
+
|
|
10
|
+
HTM (Hierarchical Temporary Memory) is a well-architected Ruby gem providing intelligent memory management for LLM-based applications. The codebase demonstrates strong architectural decisions, comprehensive documentation through ADRs, and thoughtful implementation of RAG-based retrieval with PostgreSQL/pgvector.
|
|
11
|
+
|
|
12
|
+
**Overall Assessment**: **Strong** - The codebase shows mature architectural thinking with good separation of concerns, proper use of patterns, and solid security foundations. Recent improvements addressed critical thread safety and resilience concerns.
|
|
13
|
+
|
|
14
|
+
**Key Findings**:
|
|
15
|
+
- Excellent architectural documentation (16 ADRs documenting key decisions)
|
|
16
|
+
- Solid two-tier memory architecture with proper separation of concerns
|
|
17
|
+
- Good security practices with input validation, parameterized queries, and soft delete
|
|
18
|
+
- Multi-provider LLM support via RubyLLM abstraction
|
|
19
|
+
- Well-designed async job system with pluggable backends
|
|
20
|
+
- **NEW**: Circuit breaker pattern for LLM service resilience
|
|
21
|
+
- **NEW**: Thread-safe WorkingMemory implementation
|
|
22
|
+
|
|
23
|
+
**Resolved Since Initial Review**:
|
|
24
|
+
- Circuit breaker pattern implemented for EmbeddingService and TagService
|
|
25
|
+
- WorkingMemory now fully thread-safe with Mutex protection
|
|
26
|
+
- Comprehensive test suites added for EmbeddingService and TagService
|
|
27
|
+
|
|
28
|
+
**Remaining Critical Actions**:
|
|
29
|
+
- Add rate limiting for LLM API calls to prevent cost overruns
|
|
30
|
+
- Add observability/metrics collection for production monitoring
|
|
31
|
+
- Consider connection pooling for high-concurrency scenarios
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Resolved Items Summary
|
|
36
|
+
|
|
37
|
+
The following high-priority items from the initial review have been addressed:
|
|
38
|
+
|
|
39
|
+
| Item | Status | Implementation |
|
|
40
|
+
|------|--------|----------------|
|
|
41
|
+
| Circuit Breaker Pattern | **DONE** | `HTM::CircuitBreaker` class with closed/open/half-open states |
|
|
42
|
+
| Thread-Safe WorkingMemory | **DONE** | All public methods protected by Mutex |
|
|
43
|
+
| EmbeddingService Tests | **DONE** | 19 tests covering validation, generation, circuit breaker |
|
|
44
|
+
| TagService Tests | **DONE** | 4 new circuit breaker tests (33 total) |
|
|
45
|
+
| CircuitBreaker Tests | **NEW** | 13 tests for state transitions and thread safety |
|
|
46
|
+
|
|
47
|
+
**Files Added/Modified**:
|
|
48
|
+
- `lib/htm/circuit_breaker.rb` - New circuit breaker implementation
|
|
49
|
+
- `lib/htm/working_memory.rb` - Added Mutex synchronization
|
|
50
|
+
- `lib/htm/embedding_service.rb` - Integrated circuit breaker
|
|
51
|
+
- `lib/htm/tag_service.rb` - Integrated circuit breaker
|
|
52
|
+
- `lib/htm/errors.rb` - Updated CircuitBreakerOpenError hierarchy
|
|
53
|
+
- `test/circuit_breaker_test.rb` - New test suite
|
|
54
|
+
- `test/embedding_service_test.rb` - New test suite
|
|
55
|
+
- `test/tag_service_test.rb` - Updated with circuit breaker tests
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## System Overview
|
|
60
|
+
|
|
61
|
+
HTM implements a two-tier memory system for LLM applications:
|
|
62
|
+
|
|
63
|
+
1. **Working Memory**: Token-limited in-memory cache for immediate LLM context
|
|
64
|
+
2. **Long-term Memory**: PostgreSQL with pgvector for persistent semantic storage
|
|
65
|
+
|
|
66
|
+
Core capabilities:
|
|
67
|
+
- RAG-based retrieval (vector, fulltext, hybrid search)
|
|
68
|
+
- Hierarchical tagging with LLM-driven extraction
|
|
69
|
+
- Multi-robot "hive mind" shared memory
|
|
70
|
+
- Async background processing for embeddings and tags
|
|
71
|
+
- File loading with chunking support
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Individual Member Reviews
|
|
76
|
+
|
|
77
|
+
### Systems Architect
|
|
78
|
+
|
|
79
|
+
**Perspective**: Distributed systems architecture, scalability patterns, and system decomposition
|
|
80
|
+
|
|
81
|
+
#### Key Observations
|
|
82
|
+
- Clean separation between Working Memory (in-memory) and Long-term Memory (PostgreSQL)
|
|
83
|
+
- Good use of dependency injection for LLM providers
|
|
84
|
+
- Pluggable job backend architecture supports diverse deployment scenarios
|
|
85
|
+
- Content deduplication via SHA-256 hashing prevents storage bloat
|
|
86
|
+
|
|
87
|
+
#### Strengths
|
|
88
|
+
1. **Two-tier Memory Architecture**: Well-reasoned separation aligns with cognitive memory models and provides clear performance boundaries
|
|
89
|
+
2. **Hive Mind Design**: Global memory sharing between robots enables knowledge reuse without complex synchronization
|
|
90
|
+
3. **Async Processing Pattern**: Background job architecture prevents blocking on LLM calls
|
|
91
|
+
|
|
92
|
+
#### Concerns
|
|
93
|
+
1. **Single Database Dependency** (Impact: Medium)
|
|
94
|
+
- Issue: All robots share one PostgreSQL instance with no sharding strategy
|
|
95
|
+
- Recommendation: Document scaling guidance; consider read replicas for high-read workloads
|
|
96
|
+
|
|
97
|
+
2. ~~**No Circuit Breaker for External LLM Services** (Impact: High)~~ **RESOLVED**
|
|
98
|
+
- ~~Issue: `CircuitBreakerOpenError` exists but no implementation found~~
|
|
99
|
+
- **Resolution**: Implemented `HTM::CircuitBreaker` class with closed/open/half-open states, integrated into EmbeddingService and TagService. Configurable failure threshold (5) and reset timeout (60s).
|
|
100
|
+
|
|
101
|
+
3. **Working Memory State Not Persisted** (Impact: Low)
|
|
102
|
+
- Issue: `working_memories` table exists but WorkingMemory class is purely in-memory
|
|
103
|
+
- Recommendation: Either implement persistence or remove unused table
|
|
104
|
+
|
|
105
|
+
#### Recommendations
|
|
106
|
+
1. **Add horizontal scaling documentation** (Priority: Medium, Effort: Small)
|
|
107
|
+
2. ~~**Implement circuit breaker for LLM calls**~~ **DONE**
|
|
108
|
+
3. **Add connection pool monitoring** (Priority: Medium, Effort: Small)
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### Domain Expert
|
|
113
|
+
|
|
114
|
+
**Perspective**: Domain-driven design, business logic accuracy, and semantic modeling
|
|
115
|
+
|
|
116
|
+
#### Key Observations
|
|
117
|
+
- Domain model accurately represents memory concepts (nodes, working memory, recall)
|
|
118
|
+
- Hierarchical tagging system maps well to knowledge organization principles
|
|
119
|
+
- "Hive mind" metaphor effectively communicates shared memory architecture
|
|
120
|
+
|
|
121
|
+
#### Strengths
|
|
122
|
+
1. **Semantic Memory Types**: Six memory types (fact, context, code, preference, decision, question) provide meaningful categorization
|
|
123
|
+
2. **Hierarchical Tags**: Colon-separated ontology (e.g., `database:postgresql:extensions`) enables flexible knowledge organization
|
|
124
|
+
3. **Temporal Reasoning**: Natural language timeframe parsing ("last week", "few days ago") improves usability
|
|
125
|
+
|
|
126
|
+
#### Concerns
|
|
127
|
+
1. **Memory Types Not Enforced** (Impact: Medium)
|
|
128
|
+
- Issue: Memory types documented but not used in schema or code
|
|
129
|
+
- Recommendation: Either implement type field or remove from documentation
|
|
130
|
+
|
|
131
|
+
2. **Tag Ontology Validation Limited** (Impact: Low)
|
|
132
|
+
- Issue: LLM extraction may produce inconsistent hierarchies
|
|
133
|
+
- Recommendation: Consider ontology schema enforcement or human-in-loop validation
|
|
134
|
+
|
|
135
|
+
#### Recommendations
|
|
136
|
+
1. **Implement memory_type column** (Priority: Low, Effort: Small)
|
|
137
|
+
2. **Add ontology consistency checks** (Priority: Low, Effort: Medium)
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
### Security Specialist
|
|
142
|
+
|
|
143
|
+
**Perspective**: Threat modeling, vulnerability assessment, and security controls
|
|
144
|
+
|
|
145
|
+
#### Key Observations
|
|
146
|
+
- SQL injection prevention via parameterized queries throughout
|
|
147
|
+
- Input validation with size limits (1MB content, 1000 array items)
|
|
148
|
+
- Soft delete prevents accidental permanent data loss
|
|
149
|
+
- Sensitive embedding vectors not exposed in standard queries
|
|
150
|
+
|
|
151
|
+
#### Strengths
|
|
152
|
+
1. **Parameterized Queries**: All SQL uses ActiveRecord sanitization or parameterized queries
|
|
153
|
+
2. **Input Validation**: Comprehensive validation in `htm.rb:116-132` for content and tags
|
|
154
|
+
3. **Embedding Sanitization**: `sanitize_embedding_for_sql` validates numeric values before SQL use
|
|
155
|
+
4. **Soft Delete with Confirmation**: Permanent deletion requires explicit `confirm: :confirmed`
|
|
156
|
+
|
|
157
|
+
#### Concerns
|
|
158
|
+
1. **No Rate Limiting on LLM Calls** (Impact: High)
|
|
159
|
+
- Issue: Malicious input could trigger unlimited LLM API calls, causing cost overruns
|
|
160
|
+
- Recommendation: Implement rate limiting per robot/time window
|
|
161
|
+
|
|
162
|
+
2. **API Keys in Environment Variables** (Impact: Medium)
|
|
163
|
+
- Issue: Standard practice but no guidance on secrets management
|
|
164
|
+
- Recommendation: Document secure secrets management (Vault, AWS Secrets Manager)
|
|
165
|
+
|
|
166
|
+
3. **Content Size Limit May Be Circumvented** (Impact: Low)
|
|
167
|
+
- Issue: MAX_VALUE_LENGTH checks `bytesize` but file loading has no aggregate limit
|
|
168
|
+
- Recommendation: Add per-session/per-robot storage quotas
|
|
169
|
+
|
|
170
|
+
4. **No Audit Trail for Deletions** (Impact: Medium)
|
|
171
|
+
- Issue: Soft delete tracks `deleted_at` but not who/why
|
|
172
|
+
- Recommendation: Consider adding `deleted_by` and `deletion_reason` columns
|
|
173
|
+
|
|
174
|
+
#### Recommendations
|
|
175
|
+
1. **Add rate limiting for LLM APIs** (Priority: High, Effort: Medium)
|
|
176
|
+
2. **Document secrets management best practices** (Priority: Medium, Effort: Small)
|
|
177
|
+
3. **Add deletion audit trail** (Priority: Low, Effort: Small)
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### Maintainability Expert
|
|
182
|
+
|
|
183
|
+
**Perspective**: Code quality, technical debt, and long-term evolution
|
|
184
|
+
|
|
185
|
+
#### Key Observations
|
|
186
|
+
- Frozen string literals enforced across all files
|
|
187
|
+
- Consistent code style with clear method documentation
|
|
188
|
+
- 16 ADRs provide excellent architectural decision trail
|
|
189
|
+
- Good separation of concerns across modules
|
|
190
|
+
|
|
191
|
+
#### Strengths
|
|
192
|
+
1. **Comprehensive ADR Documentation**: Every major decision documented with rationale
|
|
193
|
+
2. **Clear Module Structure**: `lib/htm/` organized by responsibility
|
|
194
|
+
3. **Ruby Idioms**: Follows Ruby conventions (method naming, block usage)
|
|
195
|
+
4. **Error Hierarchy**: Well-structured error classes in `errors.rb`
|
|
196
|
+
|
|
197
|
+
#### Concerns
|
|
198
|
+
1. ~~**Test Coverage Gaps** (Impact: Medium)~~ **PARTIALLY RESOLVED**
|
|
199
|
+
- ~~Issue: 14 test files exist but several core classes lack dedicated tests~~
|
|
200
|
+
- **Resolution**: Added comprehensive test suites:
|
|
201
|
+
- `test/embedding_service_test.rb` - 19 tests for validation, generation, circuit breaker
|
|
202
|
+
- `test/circuit_breaker_test.rb` - 13 tests for state transitions and thread safety
|
|
203
|
+
- Updated `test/tag_service_test.rb` - Added 4 circuit breaker tests (total 33)
|
|
204
|
+
- Remaining: Node model methods, integration tests for end-to-end workflows
|
|
205
|
+
|
|
206
|
+
2. **Large File Smell** (Impact: Low)
|
|
207
|
+
- Issue: `long_term_memory.rb` is 1157 lines; could benefit from extraction
|
|
208
|
+
- Recommendation: Extract search strategies into separate modules
|
|
209
|
+
|
|
210
|
+
3. **Duplicate Validation Logic** (Impact: Low)
|
|
211
|
+
- Issue: Tag validation regex appears in multiple places (TagService, Tag model, HTM)
|
|
212
|
+
- Recommendation: Extract to shared constant or validator module
|
|
213
|
+
|
|
214
|
+
4. **Commented Code / Dead Code** (Impact: Low)
|
|
215
|
+
- Issue: `mark_evicted` is a no-op but retained "for API compatibility"
|
|
216
|
+
- Recommendation: Either implement or remove with deprecation
|
|
217
|
+
|
|
218
|
+
#### Recommendations
|
|
219
|
+
1. ~~**Increase test coverage for services**~~ **DONE** (EmbeddingService, TagService, CircuitBreaker)
|
|
220
|
+
2. **Extract search strategies from LongTermMemory** (Priority: Low, Effort: Medium)
|
|
221
|
+
3. **Consolidate validation constants** (Priority: Low, Effort: Small)
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
### Performance Specialist
|
|
226
|
+
|
|
227
|
+
**Perspective**: System optimization, resource utilization, and bottleneck identification
|
|
228
|
+
|
|
229
|
+
#### Key Observations
|
|
230
|
+
- HNSW index on embeddings enables fast approximate nearest neighbor search
|
|
231
|
+
- LRU cache with TTL for query results reduces database load
|
|
232
|
+
- Batch tag loading avoids N+1 queries
|
|
233
|
+
- Query timeout protection (30s default)
|
|
234
|
+
|
|
235
|
+
#### Strengths
|
|
236
|
+
1. **Efficient Indexing Strategy**:
|
|
237
|
+
- GIN index for full-text search
|
|
238
|
+
- GIN index with pg_trgm for fuzzy matching
|
|
239
|
+
- HNSW index for vector similarity
|
|
240
|
+
- Partial index on non-deleted nodes
|
|
241
|
+
2. **Query Caching**: ThreadSafe LRU cache with configurable size/TTL
|
|
242
|
+
3. **Batch Operations**: `batch_load_node_tags` and `track_access` use bulk updates
|
|
243
|
+
|
|
244
|
+
#### Concerns
|
|
245
|
+
1. **Embedding Padding Overhead** (Impact: Medium)
|
|
246
|
+
- Issue: All embeddings padded to 2000 dimensions regardless of actual size
|
|
247
|
+
- Recommendation: Consider variable-dimension storage or dynamic padding
|
|
248
|
+
|
|
249
|
+
2. **Cache Invalidation on Every Write** (Impact: Low)
|
|
250
|
+
- Issue: `invalidate_cache!` clears entire cache on any data change
|
|
251
|
+
- Recommendation: Consider more granular cache invalidation
|
|
252
|
+
|
|
253
|
+
3. **No Connection Pool Metrics** (Impact: Medium)
|
|
254
|
+
- Issue: Pool exhaustion could cause silent failures
|
|
255
|
+
- Recommendation: Add pool utilization monitoring
|
|
256
|
+
|
|
257
|
+
4. **Large Content Tokenization** (Impact: Low)
|
|
258
|
+
- Issue: Token counting loads entire Tiktoken encoder per call
|
|
259
|
+
- Recommendation: Cache encoder instance
|
|
260
|
+
|
|
261
|
+
#### Recommendations
|
|
262
|
+
1. **Add database connection pool monitoring** (Priority: High, Effort: Small)
|
|
263
|
+
2. **Implement encoder caching in token counter** (Priority: Medium, Effort: Small)
|
|
264
|
+
3. **Profile embedding dimension impact** (Priority: Low, Effort: Medium)
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
### AI Engineer
|
|
269
|
+
|
|
270
|
+
**Perspective**: LLM integration, RAG systems, and AI-powered features
|
|
271
|
+
|
|
272
|
+
#### Key Observations
|
|
273
|
+
- Multi-provider LLM support via RubyLLM abstraction
|
|
274
|
+
- Hybrid search combines vector + fulltext + tag relevance
|
|
275
|
+
- Hierarchical tag extraction with ontology context
|
|
276
|
+
- Async job processing prevents blocking on LLM calls
|
|
277
|
+
|
|
278
|
+
#### Strengths
|
|
279
|
+
1. **Provider Abstraction**: Single interface for 9+ LLM providers
|
|
280
|
+
2. **Hybrid Search**: Three-signal ranking (semantic, keyword, categorical) improves recall
|
|
281
|
+
3. **Ontology-Aware Extraction**: Existing tags provided to LLM for consistency
|
|
282
|
+
4. **Relevance Scoring**: Multi-factor composite score (semantic, tag, recency, access)
|
|
283
|
+
|
|
284
|
+
#### Concerns
|
|
285
|
+
1. **No Embedding Versioning** (Impact: Medium)
|
|
286
|
+
- Issue: Changing embedding model invalidates all existing vectors
|
|
287
|
+
- Recommendation: Store embedding model identifier; support migration
|
|
288
|
+
|
|
289
|
+
2. **Tag Extraction Prompt Engineering** (Impact: Low)
|
|
290
|
+
- Issue: Complex prompt in Configuration could drift from TagService constraints
|
|
291
|
+
- Recommendation: Centralize prompt with validation rules
|
|
292
|
+
|
|
293
|
+
3. **No Similarity Threshold** (Impact: Low)
|
|
294
|
+
- Issue: Vector search returns K results regardless of quality
|
|
295
|
+
- Recommendation: Add minimum similarity threshold option
|
|
296
|
+
|
|
297
|
+
4. **Missing Reranking Stage** (Impact: Medium)
|
|
298
|
+
- Issue: Hybrid search uses fixed 70/30 vector/tag weighting
|
|
299
|
+
- Recommendation: Consider learned reranking or configurable weights
|
|
300
|
+
|
|
301
|
+
#### Recommendations
|
|
302
|
+
1. **Add embedding model versioning** (Priority: Medium, Effort: Medium)
|
|
303
|
+
2. **Implement configurable similarity threshold** (Priority: Low, Effort: Small)
|
|
304
|
+
3. **Add configurable hybrid search weights** (Priority: Low, Effort: Small)
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
### Ruby Expert
|
|
309
|
+
|
|
310
|
+
**Perspective**: Ruby best practices, gem development, and ecosystem integration
|
|
311
|
+
|
|
312
|
+
#### Key Observations
|
|
313
|
+
- Proper gem structure with version file, gemspec, and Rakefile
|
|
314
|
+
- Frozen string literals enforced
|
|
315
|
+
- Minitest for testing (appropriate for gem)
|
|
316
|
+
- Good use of Ruby idioms (blocks, modules, inheritance)
|
|
317
|
+
|
|
318
|
+
#### Strengths
|
|
319
|
+
1. **Clean Gem Structure**: Follows standard layout with clear entry point
|
|
320
|
+
2. **Dependency Management**: Reasonable runtime deps; dev deps properly separated
|
|
321
|
+
3. **Configuration DSL**: Block-based configuration pattern is idiomatic Ruby
|
|
322
|
+
4. **Pluggable Components**: Callable (lambda/proc) for custom implementations
|
|
323
|
+
|
|
324
|
+
#### Concerns
|
|
325
|
+
1. **Mixed Method Visibility** (Impact: Low)
|
|
326
|
+
- Issue: Some classes have `private` declared multiple times
|
|
327
|
+
- Recommendation: Single `private` declaration followed by private methods
|
|
328
|
+
|
|
329
|
+
2. ~~**Thread Safety Incomplete** (Impact: Medium)~~ **RESOLVED**
|
|
330
|
+
- ~~Issue: WorkingMemory uses Hash without synchronization~~
|
|
331
|
+
- **Resolution**: All public WorkingMemory methods now protected by Mutex:
|
|
332
|
+
- `add`, `remove`, `has_space?`, `evict_to_make_space` synchronized
|
|
333
|
+
- `assemble_context`, `token_count`, `utilization_percentage`, `node_count` synchronized
|
|
334
|
+
- Internal helpers renamed to `*_unlocked` variants for safe internal use
|
|
335
|
+
|
|
336
|
+
3. **No Keyword Argument Defaults Documentation** (Impact: Low)
|
|
337
|
+
- Issue: Some methods have many optional kwargs without YARD docs
|
|
338
|
+
- Recommendation: Add YARD documentation for all public methods
|
|
339
|
+
|
|
340
|
+
4. **Gem Not Signed** (Impact: Low)
|
|
341
|
+
- Issue: No gem signing configured
|
|
342
|
+
- Recommendation: Consider signing for production use
|
|
343
|
+
|
|
344
|
+
#### Recommendations
|
|
345
|
+
1. ~~**Add thread safety to WorkingMemory**~~ **DONE**
|
|
346
|
+
2. **Add comprehensive YARD documentation** (Priority: Medium, Effort: Medium)
|
|
347
|
+
3. **Consider gem signing** (Priority: Low, Effort: Small)
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
### Database Architect
|
|
352
|
+
|
|
353
|
+
**Perspective**: PostgreSQL, ActiveRecord, pgvector optimization, schema design
|
|
354
|
+
|
|
355
|
+
#### Key Observations
|
|
356
|
+
- Well-designed schema with proper normalization
|
|
357
|
+
- Foreign key constraints ensure referential integrity
|
|
358
|
+
- Comprehensive indexing strategy
|
|
359
|
+
- Good use of PostgreSQL-specific features (JSONB, text search, vector)
|
|
360
|
+
|
|
361
|
+
#### Strengths
|
|
362
|
+
1. **Schema Design**: Clean many-to-many relationships via join tables
|
|
363
|
+
2. **Index Coverage**:
|
|
364
|
+
- Unique indexes on content_hash, file_path, tag name
|
|
365
|
+
- Partial indexes for common query patterns
|
|
366
|
+
- HNSW for vector similarity
|
|
367
|
+
3. **Database Comments**: Excellent documentation in schema
|
|
368
|
+
4. **Soft Delete Implementation**: Partial index on non-deleted for performance
|
|
369
|
+
|
|
370
|
+
#### Concerns
|
|
371
|
+
1. **No Table Partitioning Strategy** (Impact: Medium)
|
|
372
|
+
- Issue: nodes table could grow very large
|
|
373
|
+
- Recommendation: Consider range partitioning by created_at for large deployments
|
|
374
|
+
|
|
375
|
+
2. **HNSW Index Parameters** (Impact: Low)
|
|
376
|
+
- Issue: Using default m=16, ef_construction=64; may not be optimal
|
|
377
|
+
- Recommendation: Document tuning guidance based on dataset size
|
|
378
|
+
|
|
379
|
+
3. **No Read Replica Support** (Impact: Medium)
|
|
380
|
+
- Issue: Single database connection for all operations
|
|
381
|
+
- Recommendation: Add configuration for replica for read-heavy workloads
|
|
382
|
+
|
|
383
|
+
4. **Missing Database Constraints** (Impact: Low)
|
|
384
|
+
- Issue: No CHECK constraint on tag name format at database level
|
|
385
|
+
- Recommendation: Add CHECK constraint matching application validation
|
|
386
|
+
|
|
387
|
+
#### Recommendations
|
|
388
|
+
1. **Document HNSW tuning guidance** (Priority: Medium, Effort: Small)
|
|
389
|
+
2. **Add table partitioning strategy for scale** (Priority: Medium, Effort: Large)
|
|
390
|
+
3. **Add read replica configuration option** (Priority: Low, Effort: Medium)
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## Collaborative Discussion
|
|
395
|
+
|
|
396
|
+
### Common Concerns Identified
|
|
397
|
+
|
|
398
|
+
1. **Rate Limiting Gap**: Security and AI Engineer both highlighted missing rate limiting for LLM calls
|
|
399
|
+
2. ~~**Thread Safety**: Ruby Expert and Systems Architect note WorkingMemory lacks synchronization~~ **RESOLVED**
|
|
400
|
+
3. **Observability**: Performance and Systems Architect recommend metrics collection
|
|
401
|
+
4. ~~**Test Coverage**: Maintainability Expert and Ruby Expert recommend expanded testing~~ **PARTIALLY RESOLVED**
|
|
402
|
+
|
|
403
|
+
### Priority Consensus (Updated)
|
|
404
|
+
|
|
405
|
+
The team agrees on the following priority ranking:
|
|
406
|
+
|
|
407
|
+
1. **Critical**: Rate limiting for LLM APIs (cost protection, security)
|
|
408
|
+
2. ~~**High**: Thread safety in WorkingMemory~~ **DONE**
|
|
409
|
+
3. ~~**High**: Circuit breaker for LLM services~~ **DONE**
|
|
410
|
+
4. ~~**High**: Test coverage for EmbeddingService, TagService~~ **DONE**
|
|
411
|
+
5. **Medium**: Connection pool monitoring
|
|
412
|
+
6. **Medium**: Embedding model versioning
|
|
413
|
+
7. **Medium**: Integration test expansion (remaining)
|
|
414
|
+
8. **Low**: Various code quality improvements
|
|
415
|
+
|
|
416
|
+
### Trade-off Discussions
|
|
417
|
+
|
|
418
|
+
1. **Embedding Padding**: Performance suggests variable dimensions, but AI Engineer notes fixed dimensions simplify pgvector indexing. Consensus: Document trade-off, keep current approach for simplicity.
|
|
419
|
+
|
|
420
|
+
2. **Cache Granularity**: Full cache invalidation is simple but wasteful. Consensus: Keep simple approach unless profiling shows it's a bottleneck.
|
|
421
|
+
|
|
422
|
+
3. **WorkingMemory Persistence**: Table exists but unused. Consensus: Either implement for session recovery or remove table to avoid confusion.
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## Consolidated Findings
|
|
427
|
+
|
|
428
|
+
### Strengths
|
|
429
|
+
1. **Excellent Architectural Documentation**: 16 ADRs provide decision rationale and context
|
|
430
|
+
2. **Clean Separation of Concerns**: Two-tier memory, pluggable LLM providers, flexible job backends
|
|
431
|
+
3. **Security Foundations**: Input validation, parameterized queries, soft delete
|
|
432
|
+
4. **Multi-provider LLM Support**: Single abstraction for 9+ providers
|
|
433
|
+
5. **Efficient Search**: Hybrid vector/fulltext/tag search with relevance scoring
|
|
434
|
+
6. **NEW: LLM Service Resilience**: Circuit breaker pattern prevents cascading failures
|
|
435
|
+
7. **NEW: Thread-Safe WorkingMemory**: Mutex protection for concurrent access
|
|
436
|
+
|
|
437
|
+
### Areas for Improvement
|
|
438
|
+
1. **Rate Limiting**: No → Implement per-robot/time-window limits (High Priority)
|
|
439
|
+
2. ~~**Thread Safety**: Incomplete → Add synchronization to WorkingMemory~~ **DONE**
|
|
440
|
+
3. ~~**Test Coverage**: Moderate → Expand service and integration tests~~ **PARTIALLY DONE**
|
|
441
|
+
4. **Observability**: None → Add metrics collection (Medium Priority)
|
|
442
|
+
5. **Documentation**: Good → Add YARD docs for public API (Medium Priority)
|
|
443
|
+
|
|
444
|
+
### Technical Debt
|
|
445
|
+
|
|
446
|
+
**High Priority**:
|
|
447
|
+
- ~~`CircuitBreakerOpenError` defined but not implemented~~ **RESOLVED**
|
|
448
|
+
- ~~Impact: LLM service failures not properly handled~~
|
|
449
|
+
- **Resolution**: Implemented `HTM::CircuitBreaker` with full state machine
|
|
450
|
+
|
|
451
|
+
**Medium Priority**:
|
|
452
|
+
- `working_memories` table unused
|
|
453
|
+
- Impact: Schema confusion, wasted storage
|
|
454
|
+
- Resolution: Implement or remove
|
|
455
|
+
- Effort: Small
|
|
456
|
+
|
|
457
|
+
- Duplicate validation logic for tags
|
|
458
|
+
- Impact: Maintenance burden, potential drift
|
|
459
|
+
- Resolution: Extract to shared module
|
|
460
|
+
- Effort: Small
|
|
461
|
+
|
|
462
|
+
**Low Priority**:
|
|
463
|
+
- `mark_evicted` no-op method
|
|
464
|
+
- Impact: Dead code
|
|
465
|
+
- Resolution: Remove with deprecation notice
|
|
466
|
+
- Effort: Small
|
|
467
|
+
|
|
468
|
+
### Risks
|
|
469
|
+
|
|
470
|
+
**Technical Risks**:
|
|
471
|
+
- **LLM Cost Overrun**: No rate limiting could lead to unexpected costs
|
|
472
|
+
- Likelihood: Medium
|
|
473
|
+
- Impact: High
|
|
474
|
+
- Mitigation: Implement rate limiting, add spending alerts
|
|
475
|
+
|
|
476
|
+
- ~~**Thread Safety Issues**: WorkingMemory corruption under concurrent access~~ **MITIGATED**
|
|
477
|
+
- ~~Likelihood: Low (mostly single-threaded use)~~
|
|
478
|
+
- ~~Impact: High (data corruption)~~
|
|
479
|
+
- **Resolution**: All WorkingMemory methods now protected by Mutex
|
|
480
|
+
|
|
481
|
+
- **Embedding Model Migration**: Changing models invalidates all vectors
|
|
482
|
+
- Likelihood: High (models improve frequently)
|
|
483
|
+
- Impact: Medium (requires rebuild)
|
|
484
|
+
- Mitigation: Add model versioning, document migration process
|
|
485
|
+
|
|
486
|
+
**Operational Risks**:
|
|
487
|
+
- **Database Single Point of Failure**: No documented HA strategy
|
|
488
|
+
- Likelihood: Low (standard postgres)
|
|
489
|
+
- Impact: High (complete outage)
|
|
490
|
+
- Mitigation: Document HA setup, consider read replicas
|
|
491
|
+
|
|
492
|
+
---
|
|
493
|
+
|
|
494
|
+
## Recommendations
|
|
495
|
+
|
|
496
|
+
### Immediate (0-2 weeks)
|
|
497
|
+
|
|
498
|
+
1. **Add Rate Limiting for LLM APIs**
|
|
499
|
+
- Why: Prevent cost overruns and potential abuse
|
|
500
|
+
- How: Add per-robot rate limiter with configurable limits
|
|
501
|
+
- Owner: Core maintainer
|
|
502
|
+
- Success Criteria: Rate limit errors returned when exceeded
|
|
503
|
+
|
|
504
|
+
2. ~~**Thread Safety for WorkingMemory**~~ **DONE**
|
|
505
|
+
- ~~Why: Prevent data corruption in concurrent scenarios~~
|
|
506
|
+
- ~~How: Add Mutex around @nodes and @access_order operations~~
|
|
507
|
+
- **Completed**: All public methods now synchronized
|
|
508
|
+
|
|
509
|
+
3. ~~**Implement Circuit Breaker**~~ **DONE**
|
|
510
|
+
- ~~Why: Graceful degradation when LLM services fail~~
|
|
511
|
+
- ~~How: Use existing error class with threshold/timeout logic~~
|
|
512
|
+
- **Completed**: `HTM::CircuitBreaker` with closed/open/half-open states
|
|
513
|
+
|
|
514
|
+
### Short-term (2-8 weeks)
|
|
515
|
+
|
|
516
|
+
1. ~~**Expand Test Coverage**~~ **PARTIALLY DONE**
|
|
517
|
+
- ~~Add unit tests for EmbeddingService, TagService~~
|
|
518
|
+
- **Completed**: 19 tests for EmbeddingService, 33 tests for TagService, 13 tests for CircuitBreaker
|
|
519
|
+
- **Remaining**: Add integration tests for end-to-end workflows
|
|
520
|
+
- Target 80% coverage for core modules
|
|
521
|
+
|
|
522
|
+
2. **Add Observability**
|
|
523
|
+
- Implement metrics collection (embedding generation time, cache hit rate)
|
|
524
|
+
- Add structured logging
|
|
525
|
+
- Document monitoring setup
|
|
526
|
+
|
|
527
|
+
3. **Document Production Deployment**
|
|
528
|
+
- HA configuration
|
|
529
|
+
- Secrets management
|
|
530
|
+
- Performance tuning
|
|
531
|
+
|
|
532
|
+
4. **Embedding Model Versioning**
|
|
533
|
+
- Add `embedding_model` column to nodes
|
|
534
|
+
- Support concurrent model versions
|
|
535
|
+
- Document migration procedure
|
|
536
|
+
|
|
537
|
+
### Long-term (2-6 months)
|
|
538
|
+
|
|
539
|
+
1. **Working Memory Persistence**
|
|
540
|
+
- Decide: implement or remove
|
|
541
|
+
- If implementing: session recovery, distributed caching
|
|
542
|
+
- If removing: migration to drop table
|
|
543
|
+
|
|
544
|
+
2. **Scaling Documentation**
|
|
545
|
+
- Table partitioning strategy
|
|
546
|
+
- Read replica configuration
|
|
547
|
+
- Sharding considerations
|
|
548
|
+
|
|
549
|
+
3. **YARD Documentation**
|
|
550
|
+
- Complete public API documentation
|
|
551
|
+
- Usage examples for all methods
|
|
552
|
+
- Generate documentation site
|
|
553
|
+
|
|
554
|
+
---
|
|
555
|
+
|
|
556
|
+
## Success Metrics
|
|
557
|
+
|
|
558
|
+
1. **Test Coverage**: ~~Current (estimated 60%) -> Target 80% (8 weeks)~~ Improved to ~70% with new test suites
|
|
559
|
+
2. **Rate Limit Compliance**: 0% -> 100% of LLM calls rate-limited (2 weeks)
|
|
560
|
+
3. ~~**Thread Safety Issues**: Unknown -> 0 race conditions in test suite (2 weeks)~~ **DONE**
|
|
561
|
+
4. **Documentation Completeness**: Good -> YARD coverage 100% public methods (8 weeks)
|
|
562
|
+
|
|
563
|
+
---
|
|
564
|
+
|
|
565
|
+
## Follow-up
|
|
566
|
+
|
|
567
|
+
**Next Review**: After v1.0.0 release or 3 months
|
|
568
|
+
**Tracking**: Create GitHub issues for High and Medium priority items
|
|
569
|
+
|
|
570
|
+
---
|
|
571
|
+
|
|
572
|
+
## Related Documentation
|
|
573
|
+
|
|
574
|
+
- [ADR-001: Use PostgreSQL/TimescaleDB Storage](../decisions/adrs/001-use-postgresql-timescaledb-storage.md)
|
|
575
|
+
- [ADR-002: Two-tier Memory Architecture](../decisions/adrs/002-two-tier-memory-architecture.md)
|
|
576
|
+
- [ADR-013: ActiveRecord ORM and Many-to-Many Tagging](../decisions/adrs/013-activerecord-orm-and-many-to-many-tagging.md)
|
|
577
|
+
- [ADR-016: Async Embedding and Tag Generation](../decisions/adrs/016-async-embedding-and-tag-generation.md)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"WebFetch(domain:raw.githubusercontent.com)",
|
|
5
|
+
"Bash(mkdir:*)",
|
|
6
|
+
"Bash(mkdocs build:*)",
|
|
7
|
+
"Bash(ffmpeg:*)",
|
|
8
|
+
"Bash(gh issue create:*)",
|
|
9
|
+
"Bash(gh issue list:*)",
|
|
10
|
+
"Bash(rake test:*)",
|
|
11
|
+
"Bash(ruby -Ilib -e:*)",
|
|
12
|
+
"Bash(gh issue view:*)",
|
|
13
|
+
"Bash(gh issue close:*)",
|
|
14
|
+
"Bash(bundle install:*)",
|
|
15
|
+
"Bash(echo:*)",
|
|
16
|
+
"Bash(ruby test_connection.rb:*)",
|
|
17
|
+
"Bash(psql:*)",
|
|
18
|
+
"Bash(ruby -r ./lib/htm -e:*)",
|
|
19
|
+
"Bash(curl:*)",
|
|
20
|
+
"Bash(ollama list:*)",
|
|
21
|
+
"Bash(ruby:*)",
|
|
22
|
+
"Bash(rake:*)",
|
|
23
|
+
"Bash(export HTM_DBURL=$TIGER_DBURL)",
|
|
24
|
+
"Bash(python3:*)",
|
|
25
|
+
"Bash(chmod:*)",
|
|
26
|
+
"Bash(git clone:*)",
|
|
27
|
+
"Bash(cat:*)",
|
|
28
|
+
"Bash(source:*)",
|
|
29
|
+
"Bash(bundle exec rake:*)",
|
|
30
|
+
"Bash(./examples/example_app/app.rb)",
|
|
31
|
+
"Bash(gem list:*)",
|
|
32
|
+
"Read(//Users/dewayne/.rbenv/versions/3.4.7/lib/ruby/gems/3.4.0/gems/pgvector-0.3.2/lib/pgvector/**)",
|
|
33
|
+
"Bash(bundle check:*)",
|
|
34
|
+
"Bash(find:*)",
|
|
35
|
+
"Bash(test/caching_test.rb)",
|
|
36
|
+
"Bash(xargs:*)",
|
|
37
|
+
"Bash(git log:*)",
|
|
38
|
+
"Bash(done)",
|
|
39
|
+
"Bash(brew services:*)",
|
|
40
|
+
"Bash(lsof:*)",
|
|
41
|
+
"Bash(env)",
|
|
42
|
+
"Bash(createdb:*)",
|
|
43
|
+
"Bash(export HTM_DBURL:*)",
|
|
44
|
+
"Bash(dropdb:*)",
|
|
45
|
+
"Bash(bundle exec ruby:*)",
|
|
46
|
+
"WebFetch(domain:rubyllm.com)",
|
|
47
|
+
"Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" bundle exec rake:*)",
|
|
48
|
+
"mcp__playwright-mcp__playwright_navigate",
|
|
49
|
+
"mcp__playwright-mcp__playwright_screenshot",
|
|
50
|
+
"mcp__playwright-mcp__playwright_fill",
|
|
51
|
+
"mcp__playwright-mcp__playwright_click",
|
|
52
|
+
"mcp__playwright-mcp__playwright_select",
|
|
53
|
+
"mcp__playwright-mcp__playwright_get",
|
|
54
|
+
"mcp__playwright-mcp__playwright_post",
|
|
55
|
+
"mcp__playwright-mcp__playwright_close",
|
|
56
|
+
"Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" bundle exec ruby:*)",
|
|
57
|
+
"Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" bundle exec rake test:*)",
|
|
58
|
+
"Bash(git mv:*)",
|
|
59
|
+
"Bash(kill:*)",
|
|
60
|
+
"WebFetch(domain:github.com)",
|
|
61
|
+
"WebFetch(domain:api.github.com)",
|
|
62
|
+
"Bash(git add:*)",
|
|
63
|
+
"Bash(git commit:*)",
|
|
64
|
+
"Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" ruby:*)",
|
|
65
|
+
"Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" ruby test/loaders/markdown_loader_test.rb:*)",
|
|
66
|
+
"Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" bundle exec rake htm:db:stats:*)",
|
|
67
|
+
"Skill(architecture-review)",
|
|
68
|
+
"Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" psql:*)",
|
|
69
|
+
"Bash(git reset:*)",
|
|
70
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250101000002_create_robots.rb )",
|
|
71
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250101000003_create_nodes.rb )",
|
|
72
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250101000005_create_tags.rb )",
|
|
73
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250101000007_add_node_vector_indexes.rb )",
|
|
74
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250125000001_add_content_hash_to_nodes.rb )",
|
|
75
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250125000002_create_robot_nodes.rb )",
|
|
76
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250125000003_remove_source_and_robot_id_from_nodes.rb )",
|
|
77
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250126000001_create_working_memories.rb )",
|
|
78
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20250126000002_remove_unused_columns.rb )",
|
|
79
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20251128000001_add_deleted_at_to_nodes.rb )",
|
|
80
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20251128000002_create_file_sources.rb )",
|
|
81
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20251128000003_add_source_to_nodes.rb )",
|
|
82
|
+
"Bash(/Users/dewayne/sandbox/git_repos/madbomber/htm/db/migrate/20251129000002_remove_unused_embedding_columns.rb)",
|
|
83
|
+
"WebSearch",
|
|
84
|
+
"WebFetch(domain:www.barndominiumlife.com)",
|
|
85
|
+
"Bash(git rm:*)",
|
|
86
|
+
"Bash(HTM_DBURL=\"postgresql://dewayne@localhost:5432/htm_development\" psql -c \"DROP TABLE IF EXISTS working_memories CASCADE;\" htm_development)",
|
|
87
|
+
"Bash(git checkout:*)"
|
|
88
|
+
],
|
|
89
|
+
"deny": [],
|
|
90
|
+
"ask": []
|
|
91
|
+
}
|
|
92
|
+
}
|