@stackmemoryai/stackmemory 1.6.0 → 1.6.1

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.
Files changed (34) hide show
  1. package/dist/src/cli/commands/orchestrate.js +249 -2
  2. package/dist/src/cli/commands/orchestrator.js +206 -23
  3. package/package.json +1 -2
  4. package/scripts/gepa/.before-optimize.md +0 -112
  5. package/scripts/gepa/README.md +0 -275
  6. package/scripts/gepa/config.json +0 -59
  7. package/scripts/gepa/evals/coding-tasks.jsonl +0 -5
  8. package/scripts/gepa/evals/fixtures/api-endpoint.ts +0 -31
  9. package/scripts/gepa/evals/fixtures/brittle-integration.ts +0 -38
  10. package/scripts/gepa/evals/fixtures/buggy-loop.js +0 -18
  11. package/scripts/gepa/evals/fixtures/callback-hell.js +0 -53
  12. package/scripts/gepa/evals/fixtures/fts5-triggers.sql +0 -23
  13. package/scripts/gepa/evals/fixtures/leaky-service.ts +0 -70
  14. package/scripts/gepa/evals/fixtures/mcp-dispatch-stub.ts +0 -39
  15. package/scripts/gepa/evals/fixtures/pr-diff.txt +0 -24
  16. package/scripts/gepa/evals/fixtures/unsafe-webhook.ts +0 -34
  17. package/scripts/gepa/evals/fixtures/unwrapped-db-op.ts +0 -42
  18. package/scripts/gepa/evals/stackmemory-tasks.jsonl +0 -8
  19. package/scripts/gepa/generations/gen-000/baseline.md +0 -112
  20. package/scripts/gepa/generations/gen-001/baseline.md +0 -112
  21. package/scripts/gepa/generations/gen-001/variant-a.md +0 -107
  22. package/scripts/gepa/generations/gen-001/variant-b.md +0 -216
  23. package/scripts/gepa/generations/gen-001/variant-c.md +0 -83
  24. package/scripts/gepa/generations/gen-001/variant-d.md +0 -90
  25. package/scripts/gepa/hooks/auto-optimize.js +0 -494
  26. package/scripts/gepa/hooks/eval-tracker.js +0 -203
  27. package/scripts/gepa/hooks/reflect.js +0 -350
  28. package/scripts/gepa/optimize.js +0 -853
  29. package/scripts/gepa/results/eval-1-baseline.json +0 -218
  30. package/scripts/gepa/results/eval-1-variant-a.json +0 -218
  31. package/scripts/gepa/results/eval-1-variant-b.json +0 -218
  32. package/scripts/gepa/results/eval-1-variant-c.json +0 -218
  33. package/scripts/gepa/results/eval-1-variant-d.json +0 -218
  34. package/scripts/gepa/state.json +0 -49
@@ -1,216 +0,0 @@
1
- ```markdown
2
- # CLAUDE.md
3
-
4
- This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
5
-
6
- ## Project Overview
7
-
8
- Sol is the monorepo for **Rize**, an automatic time tracking application. The stack consists of:
9
- - **api/** - Rails 7.1 GraphQL backend (Ruby 3.3.5)
10
- - **web/** - Next.js 14 React web app (Node 22)
11
- - **electron/** - Electron desktop app (Node 22)
12
- - **services/** - Bun-based TypeScript event consumers/workers
13
- - **vanity/** - Webflow marketing site scripts (deprecated)
14
- - **voyager/** - Marketing website for home and landing pages (Next.js)
15
- - **puppet/** - Puppeteer server for images/PDFs
16
- - **chrome/** - Chrome browser extension
17
- - **docs/** - Docusaurus documentation site
18
- - **zapier/** - Zapier integration
19
-
20
- ## Development Commands
21
-
22
- ### Starting Development Environment
23
- ```bash
24
- # Start all services (requires iTerm2 on macOS)
25
- ./scripts/run-dev.sh
26
-
27
- # Or start individually:
28
- cd api && hivemind Procfile.dev # Rails + AnyCable + Sidekiq + Clockwork
29
- cd web && npm run dev # Next.js dev server
30
- cd electron && npm run dev # Electron with hot reload
31
- cd services && hivemind Procfile.dev # Bun services
32
- ```
33
-
34
- ### Docker Dependencies (api/docker-compose.yml)
35
- ```bash
36
- cd api && docker-compose up -d
37
- # TimescaleDB: localhost:15432
38
- # Redis: localhost:16379
39
- # Kafka: localhost:9092
40
- # MySQL: localhost:13306
41
- ```
42
-
43
- ### Testing
44
- ```bash
45
- # API (RSpec)
46
- cd api && bundle exec rspec
47
- cd api && bundle exec rspec spec/path/to/file_spec.rb # Single file
48
- cd api && bundle exec rspec spec/path/to/file_spec.rb:42 # Single test at line
49
-
50
- # Electron (Jest)
51
- cd electron && npm test
52
- cd electron && npm run test:watch
53
- cd electron && npm run test:coverage
54
-
55
- # Web - no active tests (exits 0)
56
- ```
57
-
58
- ### Building
59
- ```bash
60
- cd api && bundle install && rake db:migrate
61
- cd web && npm run build # Runs gql-gen, tailwind, next build
62
- cd electron && npm run build # Electron Forge make
63
- cd services && bun install
64
- ```
65
-
66
- ### GraphQL Code Generation
67
- ```bash
68
- cd web && npm run build # Includes gql codegen
69
- cd electron && npm run dev # Runs gql codegen as part of dev
70
- ```
71
-
72
- ## Architecture
73
-
74
- ### GraphQL API Structure
75
- The API exposes two GraphQL endpoints:
76
- - **api/v1** - Public API (OAuth consumers, Zapier)
77
- - **private/v1** - Private API (web, electron apps)
78
-
79
- Located at `api/app/graphql/{api,private}/v1/`
80
-
81
- <example>
82
- # Adding a new mutation to the private API:
83
- # File: api/app/graphql/private/v1/mutations/update_something.rb
84
- module Private
85
- module V1
86
- module Mutations
87
- class UpdateSomething < BaseMutation
88
- argument :id, ID, required: true
89
- field :something, Types::SomethingType, null: true
90
-
91
- def resolve(id:)
92
- something = Something.find(id)
93
- something.update!(...)
94
- { something: something }
95
- end
96
- end
97
- end
98
- end
99
- end
100
- </example>
101
-
102
- ### Real-time Communication
103
- - **AnyCable** WebSocket server for subscriptions
104
- - ActionCable channels in `api/app/channels/`
105
- - WebSocket config: `api/config/cable.yml` and `api/config/anycable.yml`
106
-
107
- ### Background Jobs
108
- - **Sidekiq** for async job processing (`api/config/sidekiq.yml`)
109
- - **Clockwork** for scheduled jobs (`api/config/clock.rb`)
110
-
111
- <example>
112
- # Adding a new Sidekiq job:
113
- class MyWorker
114
- include Sidekiq::Worker
115
- sidekiq_options queue: :default
116
-
117
- def perform(user_id)
118
- user = User.find(user_id)
119
- # do work
120
- end
121
- end
122
-
123
- # Enqueue it:
124
- MyWorker.perform_async(user.id)
125
- </example>
126
-
127
- ### Event Streaming
128
- - **Kafka** for event publishing/consumption
129
- - Services consume events via `services/consumers/`
130
- - Kafka config: `api/config/initializers/kafka.rb`
131
-
132
- ### Databases
133
- - **Primary PostgreSQL** - Main application data
134
- - **TimescaleDB** - Time-series data (separate connection in `database.yml`)
135
- - **MySQL** - Legacy/external integrations
136
- - **Redis** - Caching, ActionCable, Sidekiq
137
-
138
- ## Style Guidelines
139
-
140
- ### JavaScript/TypeScript
141
-
142
- Use `test()` instead of `it()` in tests:
143
-
144
- <example>
145
- // CORRECT
146
- test('returns the user name', () => {
147
- expect(getUser().name).toBe('Alice')
148
- })
149
-
150
- // WRONG
151
- it('returns the user name', () => {
152
- expect(getUser().name).toBe('Alice')
153
- })
154
- </example>
155
-
156
- Use `toBeCalled()` instead of `toHaveBeenCalledWith()` in jest assertions:
157
-
158
- <example>
159
- // CORRECT
160
- expect(mockFn).toBeCalled()
161
-
162
- // WRONG
163
- expect(mockFn).toHaveBeenCalledWith(someArg)
164
- </example>
165
-
166
- ### Ruby/RSpec
167
-
168
- Use `be_between` for time assertions (no `freeze_time` or `travel_to` in this repo):
169
-
170
- <example>
171
- # CORRECT
172
- before = Time.current
173
- subject.call
174
- after = Time.current
175
- expect(record.updated_at).to be_between(before, after)
176
-
177
- # WRONG - freeze_time not available
178
- freeze_time do
179
- subject.call
180
- expect(record.updated_at).to eq(Time.current)
181
- end
182
- </example>
183
-
184
- Use `create(:user_with_default_workspace)` for a user with identity + workspace:
185
-
186
- <example>
187
- let(:user) { create(:user_with_default_workspace) }
188
- let(:identity) { user.identities.first }
189
- let(:workspace) { identity.workspaces.first }
190
- </example>
191
-
192
- Use `private_v1_execute_query` / `private_v1_execute_mutation` in GraphQL specs:
193
-
194
- <example>
195
- RSpec.describe 'someQuery', type: :request do
196
- let(:user) { create(:user_with_default_workspace) }
197
-
198
- it 'returns expected data' do
199
- private_v1_execute_query(
200
- query: SOME_QUERY,
201
- variables: { id: user.id },
202
- user: user
203
- )
204
- expect(response_data['someQuery']['field']).to eq('value')
205
- end
206
- end
207
- </example>
208
-
209
- ## Key Configuration Files
210
-
211
- - `api/config/database.yml` - Database connections (primary + timescale)
212
- - `api/config/cable.yml` - AnyCable WebSocket config
213
- - `api/Procfile.dev` - Development processes (rails, anycable, sidekiq, clockwork)
214
- - `sol.code-workspace` - VS Code multi-folder workspace
215
- - Each project requires its own `.env` file (not in repo)
216
- ```
@@ -1,83 +0,0 @@
1
- ```markdown
2
- # CLAUDE.md
3
-
4
- Sol is the monorepo for **Rize**, an automatic time tracking application.
5
-
6
- ## Stack
7
- - **api/** - Rails 7.1 GraphQL backend (Ruby 3.3.5)
8
- - **web/** - Next.js 14 React web app (Node 22)
9
- - **electron/** - Electron desktop app (Node 22)
10
- - **services/** - Bun-based TypeScript event consumers/workers
11
- - **voyager/** - Marketing website (Next.js)
12
- - **puppet/** - Puppeteer server for images/PDFs
13
- - **chrome/** - Chrome browser extension
14
- - **docs/** - Docusaurus documentation site
15
- - **zapier/** - Zapier integration
16
- - **vanity/** - Webflow scripts (deprecated)
17
-
18
- ## Development Commands
19
-
20
- ```bash
21
- # Start all (requires iTerm2)
22
- ./scripts/run-dev.sh
23
-
24
- # Individual services
25
- cd api && hivemind Procfile.dev # Rails + AnyCable + Sidekiq + Clockwork
26
- cd web && npm run dev # Next.js (port 3001)
27
- cd electron && npm run dev # Electron + gql codegen
28
- cd services && hivemind Procfile.dev # Bun consumers
29
-
30
- # Docker deps (TimescaleDB:15432, Redis:16379, Kafka:9092, MySQL:13306)
31
- cd api && docker-compose up -d
32
- ```
33
-
34
- ## Testing & Building
35
-
36
- ```bash
37
- # API (RSpec)
38
- cd api && bundle exec rspec
39
- cd api && bundle exec rspec spec/path/to/file_spec.rb:42
40
-
41
- # Electron (Jest)
42
- cd electron && npm test
43
-
44
- # Web - no active tests (exits 0)
45
-
46
- # Build
47
- cd api && bundle install && rake db:migrate
48
- cd web && npm run build # gql-gen + tailwind + next build
49
- cd electron && npm run build
50
- cd services && bun install
51
- ```
52
-
53
- ## Architecture
54
-
55
- ### GraphQL API
56
- Two endpoints at `api/app/graphql/{api,private}/v1/`:
57
- - **api/v1** - Public API (OAuth, Zapier)
58
- - **private/v1** - Private API (web, electron)
59
-
60
- ### Infrastructure
61
- - **AnyCable** WebSocket subscriptions (`api/config/cable.yml`, `anycable.yml`)
62
- - **Sidekiq** async jobs (`api/config/sidekiq.yml`)
63
- - **Clockwork** scheduled jobs (`api/config/clock.rb`)
64
- - **Kafka** event streaming (`api/config/initializers/kafka.rb`, `services/consumers/`)
65
-
66
- ### Databases
67
- - **PostgreSQL** - Primary app data
68
- - **TimescaleDB** - Time-series (separate connection in `database.yml`)
69
- - **MySQL** - Legacy integrations
70
- - **Redis** - Caching, ActionCable, Sidekiq
71
-
72
- ## Style Guidelines
73
-
74
- ### JavaScript/TypeScript
75
- - Use `test()` not `it()` in tests
76
- - Use `toBeCalled()` not `toHaveBeenCalledWith()` in Jest assertions
77
-
78
- ## Key Config Files
79
- - `api/config/database.yml` - DB connections
80
- - `api/Procfile.dev` - Dev processes
81
- - `sol.code-workspace` - VS Code workspace
82
- - Each project requires its own `.env` (not in repo)
83
- ```
@@ -1,90 +0,0 @@
1
- ```markdown
2
- # CLAUDE.md
3
-
4
- Sol is the monorepo for **Rize**, an automatic time tracking application.
5
-
6
- ## Stack
7
-
8
- | Dir | Description |
9
- |-----|-------------|
10
- | `api/` | Rails 7.1 GraphQL backend (Ruby 3.3.5) |
11
- | `web/` | Next.js 14 React web app (Node 22) |
12
- | `electron/` | Electron desktop app (Node 22) |
13
- | `services/` | Bun-based TypeScript event consumers/workers |
14
- | `voyager/` | Marketing website (Next.js) |
15
- | `puppet/` | Puppeteer server for images/PDFs |
16
- | `chrome/` | Chrome browser extension |
17
- | `docs/` | Docusaurus documentation site |
18
- | `zapier/` | Zapier integration |
19
- | `vanity/` | Webflow scripts (deprecated) |
20
-
21
- ## Dev Commands
22
-
23
- ```bash
24
- # All services (requires iTerm2)
25
- ./scripts/run-dev.sh
26
-
27
- # Individual
28
- cd api && hivemind Procfile.dev # Rails + AnyCable + Sidekiq + Clockwork
29
- cd web && npm run dev # Next.js (port 3001)
30
- cd electron && npm run dev # Electron with hot reload
31
- cd services && hivemind Procfile.dev # Bun services
32
-
33
- # Docker deps (start first)
34
- cd api && docker-compose up -d
35
- # TimescaleDB :15432 | Redis :16379 | Kafka :9092 | MySQL :13306
36
- ```
37
-
38
- ## Testing
39
-
40
- ```bash
41
- # API (RSpec)
42
- cd api && bundle exec rspec
43
- cd api && bundle exec rspec spec/path/to/file_spec.rb
44
- cd api && bundle exec rspec spec/path/to/file_spec.rb:42
45
-
46
- # Electron (Jest)
47
- cd electron && npm test
48
- cd electron && npm run test:watch
49
- cd electron && npm run test:coverage
50
-
51
- # Web - no active tests (exits 0)
52
- ```
53
-
54
- ## Building
55
-
56
- ```bash
57
- cd api && bundle install && rake db:migrate
58
- cd web && npm run build # gql-gen + tailwind + next build
59
- cd electron && npm run build # Electron Forge make
60
- cd services && bun install
61
- ```
62
-
63
- GraphQL codegen: runs in `web && npm run build` and `electron && npm run dev`.
64
-
65
- ## Architecture
66
-
67
- ### GraphQL Endpoints
68
- - `api/v1` — Public API (OAuth, Zapier) → `api/app/graphql/api/v1/`
69
- - `private/v1` — Private API (web, electron) → `api/app/graphql/private/v1/`
70
-
71
- ### Infrastructure
72
- - **WebSockets**: AnyCable (`api/config/cable.yml`, `anycable.yml`), channels in `api/app/channels/`
73
- - **Jobs**: Sidekiq async (`api/config/sidekiq.yml`), Clockwork scheduled (`api/config/clock.rb`)
74
- - **Events**: Kafka (`api/config/initializers/kafka.rb`), consumers in `services/consumers/`
75
- - **Databases**: PostgreSQL (primary), TimescaleDB (time-series), MySQL (legacy), Redis (cache/cable/sidekiq)
76
-
77
- ## Style Guidelines
78
-
79
- ### JavaScript/TypeScript Tests
80
- - Use `test()` not `it()`
81
- - Use `toBeCalled()` not `toHaveBeenCalledWith()`
82
-
83
- ## Key Config Files
84
-
85
- - `api/config/database.yml` — DB connections (primary + timescale)
86
- - `api/config/cable.yml` — AnyCable WebSocket
87
- - `api/Procfile.dev` — Dev processes
88
- - `sol.code-workspace` — VS Code workspace
89
- - Each project requires its own `.env` (not in repo)
90
- ```