@stackmemoryai/stackmemory 1.5.4 → 1.5.5
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.
- package/dist/src/cli/commands/orchestrate.js +97 -0
- package/dist/src/cli/commands/orchestrator.js +291 -5
- package/package.json +2 -1
- package/scripts/gepa/.before-optimize.md +110 -142
- package/scripts/gepa/generations/gen-000/baseline.md +111 -147
- package/scripts/gepa/generations/gen-001/baseline.md +111 -147
- package/scripts/gepa/generations/gen-001/variant-a.md +1 -176
- package/scripts/gepa/generations/gen-001/variant-b.md +1 -280
- package/scripts/gepa/generations/gen-001/variant-c.md +1 -122
- package/scripts/gepa/generations/gen-001/variant-d.md +1 -138
- package/scripts/gepa/results/eval-1-baseline.json +80 -80
- package/scripts/gepa/results/eval-1-variant-a.json +65 -65
- package/scripts/gepa/results/eval-1-variant-b.json +78 -78
- package/scripts/gepa/results/eval-1-variant-c.json +69 -69
- package/scripts/gepa/results/eval-1-variant-d.json +71 -71
- package/scripts/gepa/state.json +6 -22
|
@@ -1,176 +1,144 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CLAUDE.md
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
src/
|
|
7
|
-
cli/ # CLI commands and entry point
|
|
8
|
-
core/ # Core business logic
|
|
9
|
-
context/ # Frame and context management
|
|
10
|
-
database/ # Database adapters (SQLite, ParadeDB)
|
|
11
|
-
digest/ # Digest generation
|
|
12
|
-
query/ # Query parsing and routing
|
|
13
|
-
integrations/ # External integrations (Linear, MCP)
|
|
14
|
-
services/ # Business services
|
|
15
|
-
skills/ # Claude Code skills
|
|
16
|
-
utils/ # Shared utilities
|
|
17
|
-
scripts/ # Build and utility scripts
|
|
18
|
-
config/ # Configuration files
|
|
19
|
-
docs/ # Documentation
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Key Files
|
|
5
|
+
## Project Overview
|
|
23
6
|
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
7
|
+
Sol is the monorepo for **Rize**, an automatic time tracking application. The stack consists of:
|
|
8
|
+
- **api/** - Rails 7.1 GraphQL backend (Ruby 3.3.5)
|
|
9
|
+
- **web/** - Next.js 14 React web app (Node 22)
|
|
10
|
+
- **electron/** - Electron desktop app (Node 22)
|
|
11
|
+
- **services/** - Bun-based TypeScript event consumers/workers
|
|
12
|
+
- **vanity/** - Webflow marketing site scripts (deprecated)
|
|
13
|
+
- **voyager/** - Marketing website for home and landing pageas (Next.js)
|
|
14
|
+
- **puppet/** - Puppeteer server for images/PDFs
|
|
15
|
+
- **chrome/** - Chrome browser extension
|
|
16
|
+
- **docs/** - Docusaurus documentation site
|
|
17
|
+
- **zapier/** - Zapier integration
|
|
28
18
|
|
|
29
|
-
##
|
|
19
|
+
## Development Commands
|
|
30
20
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- `DEVELOPMENT.md` — Dev guide
|
|
43
|
-
- `SETUP.md` — Installation
|
|
44
|
-
|
|
45
|
-
## Commands
|
|
21
|
+
### Starting Development Environment
|
|
22
|
+
```bash
|
|
23
|
+
# Start all services (requires iTerm2 on macOS)
|
|
24
|
+
./scripts/run-dev.sh
|
|
25
|
+
|
|
26
|
+
# Or start individually:
|
|
27
|
+
cd api && hivemind Procfile.dev # Rails + AnyCable + Sidekiq + Clockwork
|
|
28
|
+
cd web && npm run dev # Next.js dev server
|
|
29
|
+
cd electron && npm run dev # Electron with hot reload
|
|
30
|
+
cd services && hivemind Procfile.dev # Bun services
|
|
31
|
+
```
|
|
46
32
|
|
|
33
|
+
### Docker Dependencies (api/docker-compose.yml)
|
|
47
34
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
npm run linear:sync # Sync with Linear
|
|
54
|
-
|
|
55
|
-
# StackMemory CLI
|
|
56
|
-
stackmemory capture # Save session state for handoff
|
|
57
|
-
stackmemory restore # Restore from captured state
|
|
58
|
-
stackmemory snapshot save # Post-run context snapshot (alias: snap)
|
|
59
|
-
stackmemory snapshot list # List recent snapshots
|
|
60
|
-
stackmemory preflight # File overlap check for parallel tasks (alias: pf)
|
|
61
|
-
stackmemory conductor start # Autonomous Linear→worktree→agent orchestrator
|
|
35
|
+
cd api && docker-compose up -d
|
|
36
|
+
# TimescaleDB: localhost:15432
|
|
37
|
+
# Redis: localhost:16379
|
|
38
|
+
# Kafka: localhost:9092
|
|
39
|
+
# MySQL: localhost:13306
|
|
62
40
|
```
|
|
63
41
|
|
|
64
|
-
|
|
42
|
+
### Testing
|
|
43
|
+
```bash
|
|
44
|
+
# API (RSpec)
|
|
45
|
+
cd api && bundle exec rspec
|
|
46
|
+
cd api && bundle exec rspec spec/path/to/file_spec.rb # Single file
|
|
47
|
+
cd api && bundle exec rspec spec/path/to/file_spec.rb:42 # Single test at line
|
|
65
48
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
49
|
+
# Electron (Jest)
|
|
50
|
+
cd electron && npm test
|
|
51
|
+
cd electron && npm run test:watch
|
|
52
|
+
cd electron && npm run test:coverage
|
|
69
53
|
|
|
70
|
-
|
|
54
|
+
# Web - no active tests (exits 0)
|
|
55
|
+
```
|
|
71
56
|
|
|
72
|
-
|
|
57
|
+
### Building
|
|
58
|
+
```bash
|
|
59
|
+
cd api && bundle install && rake db:migrate
|
|
60
|
+
cd web && npm run build # Runs gql-gen, tailwind, next build
|
|
61
|
+
cd electron && npm run build # Electron Forge make
|
|
62
|
+
cd services && bun install
|
|
63
|
+
```
|
|
73
64
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
65
|
+
### GraphQL Code Generation
|
|
66
|
+
```bash
|
|
67
|
+
cd web && npm run build # Includes gql codegen
|
|
68
|
+
cd electron && npm run dev # Runs gql codegen as part of dev
|
|
69
|
+
```
|
|
78
70
|
|
|
79
|
-
|
|
80
|
-
- New features require tests in `src/**/__tests__/`
|
|
81
|
-
- Maintain or improve coverage — no untested code paths
|
|
82
|
-
- Critical paths: context management, handoff, Linear sync
|
|
71
|
+
## Architecture
|
|
83
72
|
|
|
84
|
-
|
|
73
|
+
### GraphQL API Structure
|
|
74
|
+
The API exposes two GraphQL endpoints:
|
|
75
|
+
- **api/v1** - Public API (OAuth consumers, Zapier)
|
|
76
|
+
- **private/v1** - Private API (web, electron apps)
|
|
85
77
|
|
|
86
|
-
|
|
78
|
+
Located at `api/app/graphql/{api,private}/v1/`
|
|
87
79
|
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
- Branch format: `feature/STA-XXX-description` | `fix/STA-XXX-description` | `chore/description`
|
|
80
|
+
### Real-time Communication
|
|
81
|
+
- **AnyCable** WebSocket server for subscriptions
|
|
82
|
+
- ActionCable channels in `api/app/channels/`
|
|
83
|
+
- WebSocket config: `api/config/cable.yml` and `api/config/anycable.yml`
|
|
93
84
|
|
|
94
|
-
|
|
85
|
+
### Background Jobs
|
|
86
|
+
- **Sidekiq** for async job processing (`api/config/sidekiq.yml`)
|
|
87
|
+
- **Clockwork** for scheduled jobs (`api/config/clock.rb`)
|
|
95
88
|
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
89
|
+
### Event Streaming
|
|
90
|
+
- **Kafka** for event publishing/consumption
|
|
91
|
+
- Services consume events via `services/consumers/`
|
|
92
|
+
- Kafka config: `api/config/initializers/kafka.rb`
|
|
99
93
|
|
|
100
|
-
|
|
94
|
+
### Databases
|
|
95
|
+
- **Primary PostgreSQL** - Main application data
|
|
96
|
+
- **TimescaleDB** - Time-series data (separate connection in `database.yml`)
|
|
97
|
+
- **MySQL** - Legacy/external integrations
|
|
98
|
+
- **Redis** - Caching, ActionCable, Sidekiq
|
|
101
99
|
|
|
102
|
-
|
|
100
|
+
## Style Guidelines
|
|
103
101
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if (!API_KEY) {
|
|
108
|
-
console.error('LINEAR_API_KEY not set');
|
|
109
|
-
process.exit(1);
|
|
110
|
-
}
|
|
111
|
-
```
|
|
102
|
+
### JavaScript/TypeScript
|
|
103
|
+
- Use `test()` instead of `it()` in tests
|
|
104
|
+
- Use `toBeCalled()` instead of `toHaveBeenCalledWith()` in jest assertions
|
|
112
105
|
|
|
113
|
-
|
|
114
|
-
1. `.env`
|
|
115
|
-
2. `.env.local`
|
|
116
|
-
3. `~/.zshrc`
|
|
117
|
-
4. Process environment
|
|
106
|
+
## LSP Setup (Code Intelligence)
|
|
118
107
|
|
|
119
|
-
|
|
108
|
+
Claude Code uses LSP plugins for go-to-definition, find-references, and real-time diagnostics.
|
|
120
109
|
|
|
121
|
-
|
|
110
|
+
### Installed Plugins
|
|
111
|
+
- **vtsls** (JS/TS) - `vtsls@claude-code-lsps` from boostvolt marketplace
|
|
112
|
+
- **ruby-lsp** (Ruby) - `ruby-lsp@ruby-skills` + `ruby-skills@ruby-skills` from st0012 marketplace
|
|
122
113
|
|
|
114
|
+
### Prerequisites
|
|
123
115
|
```bash
|
|
124
|
-
#
|
|
125
|
-
|
|
126
|
-
NPM_TOKEN=$(grep '^NPM_TOKEN=' .env | cut -d= -f2) \
|
|
127
|
-
npm publish --registry https://registry.npmjs.org/ \
|
|
128
|
-
--//registry.npmjs.org/:_authToken="$NPM_TOKEN"
|
|
129
|
-
git stash pop # restore GEPA state
|
|
116
|
+
# TypeScript/JS language server
|
|
117
|
+
npm install -g @vtsls/language-server
|
|
130
118
|
|
|
131
|
-
#
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
# Pre-publish requires clean git status — always stash GEPA files first
|
|
119
|
+
# Ruby language server (use rbenv gem, not system)
|
|
120
|
+
/Users/jwu/.rbenv/versions/3.3.5/bin/gem install ruby-lsp
|
|
135
121
|
```
|
|
136
122
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
**AUTOMATE** — Execute immediately; lint+test is sufficient:
|
|
142
|
-
- CRUD, boilerplate, formatting, simple transforms
|
|
143
|
-
- Adding a handler following an existing switch/case pattern
|
|
144
|
-
- Config additions (env var, feature flag)
|
|
123
|
+
### Known Issues
|
|
124
|
+
- Official `typescript-lsp@claude-plugins-official` is broken (missing plugin.json) — use `vtsls@claude-code-lsps` instead
|
|
125
|
+
- Ruby LSP launch script patched at `~/.claude/plugins/cache/ruby-skills/ruby-lsp/1.0.0/scripts/launch-ruby-lsp.sh` — macOS lacks GNU `timeout` which breaks the version manager detection. Patch hardcodes rbenv PATH.
|
|
126
|
+
- Plugin auto-updates may overwrite the patch — re-apply if Ruby LSP stops working
|
|
145
127
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
**CAREFUL** — Review approach before writing code:
|
|
152
|
-
- API/schema changes, database migrations, auth flows
|
|
153
|
-
- New integration patterns (MCP tools, webhook handlers)
|
|
154
|
-
- Changes to `frame-manager`, `sqlite-adapter`, or daemon lifecycle
|
|
155
|
-
- Anything touching error handling chains
|
|
156
|
-
|
|
157
|
-
**ARCHITECT** — Require plan mode; explore existing patterns first:
|
|
158
|
-
- New service boundaries or system integrations
|
|
159
|
-
- Performance-critical paths (FTS5 queries, search scoring)
|
|
160
|
-
- Breaking changes to MCP protocol or CLI interface
|
|
161
|
-
|
|
162
|
-
**HUMAN** — Get explicit user approval before any changes:
|
|
163
|
-
- Security-critical decisions, secret handling
|
|
164
|
-
- Irreversible operations (data migrations, schema drops)
|
|
165
|
-
- Publishing (`npm publish`, Railway deploy)
|
|
128
|
+
### Reinstall Commands
|
|
129
|
+
```bash
|
|
130
|
+
claude plugin marketplace add boostvolt/claude-code-lsps
|
|
131
|
+
claude plugin install vtsls@claude-code-lsps
|
|
166
132
|
|
|
167
|
-
|
|
133
|
+
claude plugin marketplace add st0012/ruby-skills
|
|
134
|
+
claude plugin install ruby-lsp@ruby-skills
|
|
135
|
+
claude plugin install ruby-skills@ruby-skills
|
|
136
|
+
```
|
|
168
137
|
|
|
169
|
-
##
|
|
138
|
+
## Key Configuration Files
|
|
170
139
|
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
- Ask 1–3 clarifying questions for ambiguous requests (one at a time)
|
|
140
|
+
- `api/config/database.yml` - Database connections (primary + timescale)
|
|
141
|
+
- `api/config/cable.yml` - AnyCable WebSocket config
|
|
142
|
+
- `api/Procfile.dev` - Development processes (rails, anycable, sidekiq, clockwork)
|
|
143
|
+
- `sol.code-workspace` - VS Code multi-folder workspace
|
|
144
|
+
- Each project requires its own `.env` file (not in repo)
|
|
@@ -1,180 +1,144 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CLAUDE.md
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
src/
|
|
7
|
-
cli/ # CLI commands and entry point
|
|
8
|
-
core/ # Core business logic
|
|
9
|
-
context/ # Frame and context management
|
|
10
|
-
database/ # Database adapters (SQLite, ParadeDB)
|
|
11
|
-
digest/ # Digest generation
|
|
12
|
-
query/ # Query parsing and routing
|
|
13
|
-
integrations/ # External integrations (Linear, MCP)
|
|
14
|
-
services/ # Business services
|
|
15
|
-
skills/ # Claude Code skills
|
|
16
|
-
utils/ # Shared utilities
|
|
17
|
-
scripts/ # Build and utility scripts
|
|
18
|
-
config/ # Configuration files
|
|
19
|
-
docs/ # Documentation
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Key Files
|
|
5
|
+
## Project Overview
|
|
23
6
|
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
7
|
+
Sol is the monorepo for **Rize**, an automatic time tracking application. The stack consists of:
|
|
8
|
+
- **api/** - Rails 7.1 GraphQL backend (Ruby 3.3.5)
|
|
9
|
+
- **web/** - Next.js 14 React web app (Node 22)
|
|
10
|
+
- **electron/** - Electron desktop app (Node 22)
|
|
11
|
+
- **services/** - Bun-based TypeScript event consumers/workers
|
|
12
|
+
- **vanity/** - Webflow marketing site scripts (deprecated)
|
|
13
|
+
- **voyager/** - Marketing website for home and landing pageas (Next.js)
|
|
14
|
+
- **puppet/** - Puppeteer server for images/PDFs
|
|
15
|
+
- **chrome/** - Chrome browser extension
|
|
16
|
+
- **docs/** - Docusaurus documentation site
|
|
17
|
+
- **zapier/** - Zapier integration
|
|
32
18
|
|
|
33
|
-
##
|
|
19
|
+
## Development Commands
|
|
34
20
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- DEVELOPMENT.md - Dev guide
|
|
47
|
-
- SETUP.md - Installation
|
|
48
|
-
|
|
49
|
-
## Commands
|
|
21
|
+
### Starting Development Environment
|
|
22
|
+
```bash
|
|
23
|
+
# Start all services (requires iTerm2 on macOS)
|
|
24
|
+
./scripts/run-dev.sh
|
|
25
|
+
|
|
26
|
+
# Or start individually:
|
|
27
|
+
cd api && hivemind Procfile.dev # Rails + AnyCable + Sidekiq + Clockwork
|
|
28
|
+
cd web && npm run dev # Next.js dev server
|
|
29
|
+
cd electron && npm run dev # Electron with hot reload
|
|
30
|
+
cd services && hivemind Procfile.dev # Bun services
|
|
31
|
+
```
|
|
50
32
|
|
|
33
|
+
### Docker Dependencies (api/docker-compose.yml)
|
|
51
34
|
```bash
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
npm run linear:sync # Sync with Linear
|
|
58
|
-
|
|
59
|
-
# StackMemory CLI
|
|
60
|
-
stackmemory capture # Save session state for handoff
|
|
61
|
-
stackmemory restore # Restore from captured state
|
|
62
|
-
stackmemory snapshot save # Post-run context snapshot (alias: snap)
|
|
63
|
-
stackmemory snapshot list # List recent snapshots
|
|
64
|
-
stackmemory preflight # File overlap check for parallel tasks (alias: pf)
|
|
65
|
-
stackmemory conductor start # Autonomous Linear→worktree→agent orchestrator
|
|
35
|
+
cd api && docker-compose up -d
|
|
36
|
+
# TimescaleDB: localhost:15432
|
|
37
|
+
# Redis: localhost:16379
|
|
38
|
+
# Kafka: localhost:9092
|
|
39
|
+
# MySQL: localhost:13306
|
|
66
40
|
```
|
|
67
41
|
|
|
68
|
-
|
|
42
|
+
### Testing
|
|
43
|
+
```bash
|
|
44
|
+
# API (RSpec)
|
|
45
|
+
cd api && bundle exec rspec
|
|
46
|
+
cd api && bundle exec rspec spec/path/to/file_spec.rb # Single file
|
|
47
|
+
cd api && bundle exec rspec spec/path/to/file_spec.rb:42 # Single test at line
|
|
69
48
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
49
|
+
# Electron (Jest)
|
|
50
|
+
cd electron && npm test
|
|
51
|
+
cd electron && npm run test:watch
|
|
52
|
+
cd electron && npm run test:coverage
|
|
73
53
|
|
|
74
|
-
|
|
54
|
+
# Web - no active tests (exits 0)
|
|
55
|
+
```
|
|
75
56
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
57
|
+
### Building
|
|
58
|
+
```bash
|
|
59
|
+
cd api && bundle install && rake db:migrate
|
|
60
|
+
cd web && npm run build # Runs gql-gen, tailwind, next build
|
|
61
|
+
cd electron && npm run build # Electron Forge make
|
|
62
|
+
cd services && bun install
|
|
63
|
+
```
|
|
81
64
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
65
|
+
### GraphQL Code Generation
|
|
66
|
+
```bash
|
|
67
|
+
cd web && npm run build # Includes gql codegen
|
|
68
|
+
cd electron && npm run dev # Runs gql codegen as part of dev
|
|
69
|
+
```
|
|
86
70
|
|
|
87
|
-
|
|
71
|
+
## Architecture
|
|
88
72
|
|
|
89
|
-
|
|
73
|
+
### GraphQL API Structure
|
|
74
|
+
The API exposes two GraphQL endpoints:
|
|
75
|
+
- **api/v1** - Public API (OAuth consumers, Zapier)
|
|
76
|
+
- **private/v1** - Private API (web, electron apps)
|
|
90
77
|
|
|
91
|
-
|
|
92
|
-
- ALWAYS fix lint/test errors before pushing
|
|
93
|
-
- If pre-push hooks fail, fix the underlying issue
|
|
94
|
-
- Run `npm run lint && npm run test:run` before pushing
|
|
95
|
-
- Commit message format: `type(scope): message`
|
|
96
|
-
- Branch naming: `feature/STA-XXX-description` | `fix/STA-XXX-description` | `chore/description`
|
|
78
|
+
Located at `api/app/graphql/{api,private}/v1/`
|
|
97
79
|
|
|
98
|
-
|
|
80
|
+
### Real-time Communication
|
|
81
|
+
- **AnyCable** WebSocket server for subscriptions
|
|
82
|
+
- ActionCable channels in `api/app/channels/`
|
|
83
|
+
- WebSocket config: `api/config/cable.yml` and `api/config/anycable.yml`
|
|
99
84
|
|
|
100
|
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
85
|
+
### Background Jobs
|
|
86
|
+
- **Sidekiq** for async job processing (`api/config/sidekiq.yml`)
|
|
87
|
+
- **Clockwork** for scheduled jobs (`api/config/clock.rb`)
|
|
103
88
|
|
|
104
|
-
|
|
89
|
+
### Event Streaming
|
|
90
|
+
- **Kafka** for event publishing/consumption
|
|
91
|
+
- Services consume events via `services/consumers/`
|
|
92
|
+
- Kafka config: `api/config/initializers/kafka.rb`
|
|
105
93
|
|
|
106
|
-
|
|
94
|
+
### Databases
|
|
95
|
+
- **Primary PostgreSQL** - Main application data
|
|
96
|
+
- **TimescaleDB** - Time-series data (separate connection in `database.yml`)
|
|
97
|
+
- **MySQL** - Legacy/external integrations
|
|
98
|
+
- **Redis** - Caching, ActionCable, Sidekiq
|
|
107
99
|
|
|
108
|
-
|
|
109
|
-
import 'dotenv/config';
|
|
110
|
-
const API_KEY = process.env.LINEAR_API_KEY;
|
|
111
|
-
if (!API_KEY) {
|
|
112
|
-
console.error('LINEAR_API_KEY not set');
|
|
113
|
-
process.exit(1);
|
|
114
|
-
}
|
|
115
|
-
```
|
|
100
|
+
## Style Guidelines
|
|
116
101
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
3. ~/.zshrc
|
|
121
|
-
4. Process environment
|
|
102
|
+
### JavaScript/TypeScript
|
|
103
|
+
- Use `test()` instead of `it()` in tests
|
|
104
|
+
- Use `toBeCalled()` instead of `toHaveBeenCalledWith()` in jest assertions
|
|
122
105
|
|
|
123
|
-
|
|
106
|
+
## LSP Setup (Code Intelligence)
|
|
124
107
|
|
|
125
|
-
|
|
108
|
+
Claude Code uses LSP plugins for go-to-definition, find-references, and real-time diagnostics.
|
|
126
109
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
NPM_TOKEN=$(grep '^NPM_TOKEN=' .env | cut -d= -f2) \
|
|
131
|
-
npm publish --registry https://registry.npmjs.org/ \
|
|
132
|
-
--//registry.npmjs.org/:_authToken="$NPM_TOKEN"
|
|
133
|
-
git stash pop # restore GEPA state
|
|
110
|
+
### Installed Plugins
|
|
111
|
+
- **vtsls** (JS/TS) - `vtsls@claude-code-lsps` from boostvolt marketplace
|
|
112
|
+
- **ruby-lsp** (Ruby) - `ruby-lsp@ruby-skills` + `ruby-skills@ruby-skills` from st0012 marketplace
|
|
134
113
|
|
|
135
|
-
|
|
136
|
-
|
|
114
|
+
### Prerequisites
|
|
115
|
+
```bash
|
|
116
|
+
# TypeScript/JS language server
|
|
117
|
+
npm install -g @vtsls/language-server
|
|
137
118
|
|
|
138
|
-
#
|
|
119
|
+
# Ruby language server (use rbenv gem, not system)
|
|
120
|
+
/Users/jwu/.rbenv/versions/3.3.5/bin/gem install ruby-lsp
|
|
139
121
|
```
|
|
140
122
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
**AUTOMATE** — Execute immediately, lint+test is sufficient:
|
|
146
|
-
- CRUD operations, boilerplate, formatting, simple transforms
|
|
147
|
-
- Adding a tool handler following existing switch/case pattern
|
|
148
|
-
- Config additions (new env var, feature flag)
|
|
123
|
+
### Known Issues
|
|
124
|
+
- Official `typescript-lsp@claude-plugins-official` is broken (missing plugin.json) — use `vtsls@claude-code-lsps` instead
|
|
125
|
+
- Ruby LSP launch script patched at `~/.claude/plugins/cache/ruby-skills/ruby-lsp/1.0.0/scripts/launch-ruby-lsp.sh` — macOS lacks GNU `timeout` which breaks the version manager detection. Patch hardcodes rbenv PATH.
|
|
126
|
+
- Plugin auto-updates may overwrite the patch — re-apply if Ruby LSP stops working
|
|
149
127
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
**CAREFUL** — Review approach before implementation:
|
|
156
|
-
- API/schema changes, database migrations, auth flows
|
|
157
|
-
- New integration patterns (MCP tools, webhook handlers)
|
|
158
|
-
- Changes to frame-manager, sqlite-adapter, or daemon lifecycle
|
|
159
|
-
- Anything touching error handling chains
|
|
160
|
-
|
|
161
|
-
**ARCHITECT** — Plan mode required, explore existing patterns first:
|
|
162
|
-
- New service boundaries, system integrations
|
|
163
|
-
- Performance-critical paths (FTS5 queries, search scoring)
|
|
164
|
-
- Breaking changes to MCP protocol or CLI interface
|
|
165
|
-
|
|
166
|
-
**HUMAN** — Explicit user approval before any changes:
|
|
167
|
-
- Security-critical decisions, secret handling
|
|
168
|
-
- Irreversible operations (data migrations, schema drops)
|
|
169
|
-
- Publishing (npm publish, Railway deploy)
|
|
128
|
+
### Reinstall Commands
|
|
129
|
+
```bash
|
|
130
|
+
claude plugin marketplace add boostvolt/claude-code-lsps
|
|
131
|
+
claude plugin install vtsls@claude-code-lsps
|
|
170
132
|
|
|
171
|
-
|
|
133
|
+
claude plugin marketplace add st0012/ruby-skills
|
|
134
|
+
claude plugin install ruby-lsp@ruby-skills
|
|
135
|
+
claude plugin install ruby-skills@ruby-skills
|
|
136
|
+
```
|
|
172
137
|
|
|
173
|
-
##
|
|
138
|
+
## Key Configuration Files
|
|
174
139
|
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
- Ask 1-3 clarifying questions for complex commands (one at a time)
|
|
140
|
+
- `api/config/database.yml` - Database connections (primary + timescale)
|
|
141
|
+
- `api/config/cable.yml` - AnyCable WebSocket config
|
|
142
|
+
- `api/Procfile.dev` - Development processes (rails, anycable, sidekiq, clockwork)
|
|
143
|
+
- `sol.code-workspace` - VS Code multi-folder workspace
|
|
144
|
+
- Each project requires its own `.env` file (not in repo)
|