@stackmemoryai/stackmemory 1.5.3 → 1.5.4
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 +7 -2
- package/dist/src/cli/commands/orchestrator.js +189 -4
- package/package.json +1 -1
- package/scripts/gepa/.before-optimize.md +89 -53
- package/scripts/gepa/generations/gen-000/baseline.md +8 -0
- package/scripts/gepa/generations/gen-001/baseline.md +8 -0
- package/scripts/gepa/generations/gen-001/variant-a.md +81 -81
- package/scripts/gepa/generations/gen-001/variant-b.md +78 -64
- package/scripts/gepa/generations/gen-001/variant-c.md +54 -74
- package/scripts/gepa/generations/gen-001/variant-d.md +79 -113
- package/scripts/gepa/results/eval-1-baseline.json +74 -74
- package/scripts/gepa/results/eval-1-variant-a.json +64 -64
- package/scripts/gepa/results/eval-1-variant-b.json +65 -65
- package/scripts/gepa/results/eval-1-variant-c.json +78 -58
- package/scripts/gepa/results/eval-1-variant-d.json +77 -57
- package/scripts/gepa/state.json +14 -14
|
@@ -21,26 +21,30 @@ docs/ # Documentation
|
|
|
21
21
|
|
|
22
22
|
## Key Files
|
|
23
23
|
|
|
24
|
-
- Entry: src/cli/index.ts
|
|
25
|
-
- MCP Server: src/integrations/mcp/server.ts
|
|
26
|
-
- Frame Manager: src/core/context/frame-manager.ts
|
|
27
|
-
- Database: src/core/database/sqlite-adapter.ts
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
24
|
+
- Entry: `src/cli/index.ts`
|
|
25
|
+
- MCP Server: `src/integrations/mcp/server.ts`
|
|
26
|
+
- Frame Manager: `src/core/context/frame-manager.ts`
|
|
27
|
+
- Database: `src/core/database/sqlite-adapter.ts`
|
|
28
|
+
- Snapshot: `src/core/worktree/capture.ts`
|
|
29
|
+
- Preflight: `src/core/worktree/preflight.ts`
|
|
30
|
+
- Conductor: `src/cli/commands/orchestrator.ts`
|
|
31
|
+
- Shared Utils: `src/core/utils/{git,text,fs}.ts`
|
|
32
|
+
|
|
33
|
+
## Reference Docs
|
|
34
|
+
|
|
35
|
+
Quick reference (`agent_docs/`):
|
|
36
|
+
- `linear_integration.md` — Linear sync
|
|
37
|
+
- `mcp_server.md` — MCP tools
|
|
38
|
+
- `database_storage.md` — Storage
|
|
39
|
+
- `claude_hooks.md` — Hooks
|
|
40
|
+
|
|
41
|
+
Full docs (`docs/`):
|
|
42
|
+
- `principles.md` — Agent programming paradigm
|
|
43
|
+
- `architecture.md` — Extension model and browser sandbox
|
|
44
|
+
- `SPEC.md` — Technical specification
|
|
45
|
+
- `API_REFERENCE.md` — API docs
|
|
46
|
+
- `DEVELOPMENT.md` — Dev guide
|
|
47
|
+
- `SETUP.md` — Installation
|
|
44
48
|
|
|
45
49
|
## Commands
|
|
46
50
|
|
|
@@ -53,53 +57,51 @@ npm run test:run # Run tests once
|
|
|
53
57
|
npm run linear:sync # Sync with Linear
|
|
54
58
|
|
|
55
59
|
# StackMemory CLI
|
|
56
|
-
stackmemory capture
|
|
57
|
-
stackmemory restore
|
|
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
|
|
58
66
|
```
|
|
59
67
|
|
|
60
68
|
## Working Directory
|
|
61
69
|
|
|
62
|
-
- PRIMARY:
|
|
70
|
+
- PRIMARY: `/Users/jwu/Dev/stackmemory`
|
|
63
71
|
- ALLOWED: All subdirectories
|
|
64
|
-
- TEMP:
|
|
72
|
+
- TEMP: `/tmp`
|
|
65
73
|
|
|
66
|
-
##
|
|
74
|
+
## Validation (REQUIRED after every code change)
|
|
67
75
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
4. Execute code to confirm functionality
|
|
76
|
+
1. `npm run lint` — fix all errors and warnings
|
|
77
|
+
2. `npm run test:run` — confirm no regressions
|
|
78
|
+
3. `npm run build` — confirm compilation succeeds
|
|
79
|
+
4. Run the code to verify behavior
|
|
73
80
|
|
|
74
|
-
Test coverage
|
|
75
|
-
-
|
|
76
|
-
- Maintain or improve coverage
|
|
77
|
-
- Critical paths
|
|
81
|
+
Test coverage rules:
|
|
82
|
+
- New features require tests in `src/**/__tests__/`
|
|
83
|
+
- Maintain or improve coverage — no untested code paths
|
|
84
|
+
- Critical paths: context management, handoff, Linear sync
|
|
78
85
|
|
|
79
|
-
Do
|
|
86
|
+
Do not: assume success | skip testing | use mock data as fallback
|
|
80
87
|
|
|
81
88
|
## Git Rules (CRITICAL)
|
|
82
89
|
|
|
83
|
-
NEVER
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
ALWAYS:
|
|
89
|
-
- Fix underlying issues when hooks fail
|
|
90
|
-
- Run `npm run lint && npm run test:run` before pushing
|
|
91
|
-
- Use commit format: `type(scope): message`
|
|
92
|
-
- Use branch naming: `feature/STA-XXX-description` | `fix/STA-XXX-description` | `chore/description`
|
|
90
|
+
- NEVER pass `--no-verify` to `git push` or `git commit`
|
|
91
|
+
- Fix lint/test errors before pushing — never bypass pre-push hooks
|
|
92
|
+
- Run `npm run lint && npm run test:run` before every push
|
|
93
|
+
- Commit format: `type(scope): message`
|
|
94
|
+
- Branch format: `feature/STA-XXX-description` | `fix/STA-XXX-description` | `chore/description`
|
|
93
95
|
|
|
94
96
|
## Task Management
|
|
95
97
|
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
98
|
+
- Use TodoWrite for tasks with 3+ steps or multiple requests
|
|
99
|
+
- Keep exactly one task `in_progress` at a time
|
|
100
|
+
- Mark tasks complete immediately when done
|
|
99
101
|
|
|
100
102
|
## Security
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
Never hardcode secrets. Always use `process.env` with dotenv:
|
|
103
105
|
|
|
104
106
|
```javascript
|
|
105
107
|
import 'dotenv/config';
|
|
@@ -110,18 +112,18 @@ if (!API_KEY) {
|
|
|
110
112
|
}
|
|
111
113
|
```
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
1.
|
|
115
|
-
2.
|
|
116
|
-
3.
|
|
115
|
+
Check env sources in order:
|
|
116
|
+
1. `.env`
|
|
117
|
+
2. `.env.local`
|
|
118
|
+
3. `~/.zshrc`
|
|
117
119
|
4. Process environment
|
|
118
120
|
|
|
119
|
-
Block
|
|
121
|
+
Block these patterns: `lin_api_*` | `lin_oauth_*` | `sk-*` | `npm_*`
|
|
120
122
|
|
|
121
123
|
## Deploy
|
|
122
124
|
|
|
123
125
|
```bash
|
|
124
|
-
# npm publish (
|
|
126
|
+
# npm publish (NPM_TOKEN from .env, no OTP required)
|
|
125
127
|
git stash -- scripts/gepa/ # stash GEPA state (dirties working tree)
|
|
126
128
|
NPM_TOKEN=$(grep '^NPM_TOKEN=' .env | cut -d= -f2) \
|
|
127
129
|
npm publish --registry https://registry.npmjs.org/ \
|
|
@@ -131,46 +133,44 @@ git stash pop # restore GEPA state
|
|
|
131
133
|
# Railway
|
|
132
134
|
railway up
|
|
133
135
|
|
|
134
|
-
#
|
|
136
|
+
# Note: pre-publish checks require clean git status — stash GEPA files first
|
|
135
137
|
```
|
|
136
138
|
|
|
137
139
|
## Task Delegation Model
|
|
138
140
|
|
|
139
|
-
Match
|
|
141
|
+
Match scrutiny to complexity:
|
|
140
142
|
|
|
141
|
-
**AUTOMATE** —
|
|
142
|
-
- CRUD
|
|
143
|
-
- Adding tool handler
|
|
144
|
-
- Config additions (env
|
|
143
|
+
**AUTOMATE** — Run immediately; lint+test is enough:
|
|
144
|
+
- CRUD, boilerplate, formatting, simple transforms
|
|
145
|
+
- Adding a tool handler to an existing switch/case
|
|
146
|
+
- Config additions (env vars, feature flags)
|
|
145
147
|
|
|
146
|
-
**STANDARD** — Normal workflow
|
|
147
|
-
- Feature
|
|
148
|
-
- New
|
|
149
|
-
- Integration wiring (adding handler to server.ts
|
|
148
|
+
**STANDARD** — Normal workflow; lint+test+build:
|
|
149
|
+
- Feature work, bug fixes, refactoring
|
|
150
|
+
- New tests, doc updates
|
|
151
|
+
- Integration wiring (e.g., adding handler to `server.ts`)
|
|
150
152
|
|
|
151
|
-
**CAREFUL** —
|
|
152
|
-
- API/schema changes,
|
|
153
|
-
- New
|
|
154
|
-
- Changes to frame-manager
|
|
155
|
-
-
|
|
153
|
+
**CAREFUL** — Confirm approach before implementing:
|
|
154
|
+
- API/schema changes, DB migrations, auth flows
|
|
155
|
+
- New MCP tools or webhook handlers
|
|
156
|
+
- Changes to `frame-manager`, `sqlite-adapter`, or daemon lifecycle
|
|
157
|
+
- Any error handling chain modifications
|
|
156
158
|
|
|
157
|
-
**ARCHITECT** —
|
|
158
|
-
- New service boundaries
|
|
159
|
+
**ARCHITECT** — Enter plan mode; read existing patterns first:
|
|
160
|
+
- New service boundaries or system integrations
|
|
159
161
|
- Performance-critical paths (FTS5 queries, search scoring)
|
|
160
162
|
- Breaking changes to MCP protocol or CLI interface
|
|
161
163
|
|
|
162
|
-
**HUMAN** —
|
|
163
|
-
- Security
|
|
164
|
+
**HUMAN** — Get explicit user approval before touching:
|
|
165
|
+
- Security decisions, secret handling
|
|
164
166
|
- Irreversible operations (data migrations, schema drops)
|
|
165
|
-
- Publishing (npm publish
|
|
166
|
-
|
|
167
|
-
Scale quality gates to tier. Don't over-engineer AUTOMATE tasks or under-review CAREFUL ones.
|
|
167
|
+
- Publishing (`npm publish`, Railway deploy)
|
|
168
168
|
|
|
169
169
|
## Workflow
|
|
170
170
|
|
|
171
|
-
- Check
|
|
172
|
-
- Run `npm run linear:sync` after
|
|
171
|
+
- Check `.env` for API keys before asking the user
|
|
172
|
+
- Run `npm run linear:sync` after completing tasks
|
|
173
173
|
- Use browser MCP for visual testing
|
|
174
|
-
-
|
|
174
|
+
- On session start: review recent commits and `stackmemory.json`
|
|
175
175
|
- Use subagents for multi-step tasks
|
|
176
|
-
- Ask 1
|
|
176
|
+
- Ask at most 1–3 clarifying questions for complex requests, one at a time
|
|
@@ -25,6 +25,10 @@ docs/ # Documentation
|
|
|
25
25
|
- MCP Server: src/integrations/mcp/server.ts
|
|
26
26
|
- Frame Manager: src/core/context/frame-manager.ts
|
|
27
27
|
- Database: src/core/database/sqlite-adapter.ts
|
|
28
|
+
- Snapshot: src/core/worktree/capture.ts
|
|
29
|
+
- Preflight: src/core/worktree/preflight.ts
|
|
30
|
+
- Conductor: src/cli/commands/orchestrator.ts
|
|
31
|
+
- Shared Utils: src/core/utils/{git,text,fs}.ts
|
|
28
32
|
|
|
29
33
|
## Detailed Guides
|
|
30
34
|
|
|
@@ -55,6 +59,10 @@ npm run linear:sync # Sync with Linear
|
|
|
55
59
|
# StackMemory CLI
|
|
56
60
|
stackmemory capture # Save session state for handoff
|
|
57
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
|
|
58
66
|
```
|
|
59
67
|
|
|
60
68
|
## Working Directory
|
|
@@ -72,10 +80,11 @@ After code changes:
|
|
|
72
80
|
4. Run code to verify it works
|
|
73
81
|
|
|
74
82
|
<example>
|
|
75
|
-
#
|
|
76
|
-
npm run lint
|
|
77
|
-
|
|
78
|
-
|
|
83
|
+
# Correct validation sequence after editing src/core/context/frame-manager.ts:
|
|
84
|
+
$ npm run lint # → 0 errors, 0 warnings
|
|
85
|
+
$ npm run test:run # → all tests pass (including search-benchmark smoke)
|
|
86
|
+
$ npm run build # → dist/ updated, no TS errors
|
|
87
|
+
$ stackmemory snapshot save # → verify feature works end-to-end
|
|
79
88
|
</example>
|
|
80
89
|
|
|
81
90
|
Test coverage:
|
|
@@ -84,9 +93,14 @@ Test coverage:
|
|
|
84
93
|
- Critical paths: context management, handoff, Linear sync
|
|
85
94
|
|
|
86
95
|
<example>
|
|
87
|
-
# New feature:
|
|
88
|
-
#
|
|
89
|
-
|
|
96
|
+
# New feature: adding a getFrameCount() method to FrameManager
|
|
97
|
+
# → requires test in src/core/context/__tests__/frame-manager.test.ts
|
|
98
|
+
it('getFrameCount returns correct count after adding frames', () => {
|
|
99
|
+
const mgr = new FrameManager(db);
|
|
100
|
+
mgr.addFrame({ content: 'a' });
|
|
101
|
+
mgr.addFrame({ content: 'b' });
|
|
102
|
+
expect(mgr.getFrameCount()).toBe(2);
|
|
103
|
+
});
|
|
90
104
|
</example>
|
|
91
105
|
|
|
92
106
|
Never: Assume success | Skip testing | Use mock data as fallback
|
|
@@ -101,15 +115,20 @@ Never: Assume success | Skip testing | Use mock data as fallback
|
|
|
101
115
|
- Branch naming: `feature/STA-XXX-description` | `fix/STA-XXX-description` | `chore/description`
|
|
102
116
|
|
|
103
117
|
<example>
|
|
104
|
-
# Good
|
|
105
|
-
feat(mcp): add
|
|
106
|
-
fix(
|
|
107
|
-
chore(deps):
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
118
|
+
# Good commit messages:
|
|
119
|
+
feat(mcp): add get_frame_count tool to server
|
|
120
|
+
fix(sqlite): correct BM25 score negation in hybrid search
|
|
121
|
+
chore(deps): bump better-sqlite3 to 9.4.3
|
|
122
|
+
refactor(context): extract frame deduplication to utils
|
|
123
|
+
|
|
124
|
+
# Good branch names:
|
|
125
|
+
feature/STA-123-fts5-hybrid-search
|
|
126
|
+
fix/STA-456-timer-leak-promise-race
|
|
127
|
+
chore/update-vitest-config
|
|
128
|
+
|
|
129
|
+
# Bad — never do these:
|
|
130
|
+
git commit --no-verify -m "wip"
|
|
131
|
+
git push --force origin main
|
|
113
132
|
</example>
|
|
114
133
|
|
|
115
134
|
## Task Management
|
|
@@ -119,32 +138,37 @@ chore/upgrade-typescript-5.3
|
|
|
119
138
|
- Update task status immediately on completion
|
|
120
139
|
|
|
121
140
|
<example>
|
|
122
|
-
#
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
3. Mark task 2 in_progress, etc.
|
|
141
|
+
# User asks: "Add FTS5 search, wire it to MCP, and write tests"
|
|
142
|
+
# → 3+ steps: use TodoWrite
|
|
143
|
+
TodoWrite([
|
|
144
|
+
{ id: '1', content: 'Add FTS5 search method to sqlite-adapter', status: 'pending' },
|
|
145
|
+
{ id: '2', content: 'Wire search to MCP tool handler in server.ts', status: 'pending' },
|
|
146
|
+
{ id: '3', content: 'Write tests in __tests__/sqlite-adapter.test.ts', status: 'pending' },
|
|
147
|
+
])
|
|
148
|
+
# Complete step 1 → update status to 'completed' before starting step 2
|
|
131
149
|
</example>
|
|
132
150
|
|
|
133
151
|
## Security
|
|
134
152
|
|
|
135
153
|
NEVER hardcode secrets - use process.env with dotenv/config
|
|
136
154
|
|
|
137
|
-
|
|
138
|
-
// ✓ CORRECT
|
|
155
|
+
```javascript
|
|
139
156
|
import 'dotenv/config';
|
|
140
157
|
const API_KEY = process.env.LINEAR_API_KEY;
|
|
141
158
|
if (!API_KEY) {
|
|
142
159
|
console.error('LINEAR_API_KEY not set');
|
|
143
160
|
process.exit(1);
|
|
144
161
|
}
|
|
162
|
+
```
|
|
145
163
|
|
|
146
|
-
|
|
147
|
-
|
|
164
|
+
<example>
|
|
165
|
+
// BAD — never do this:
|
|
166
|
+
const client = new LinearClient({ apiKey: 'lin_api_abc123xyz' });
|
|
167
|
+
|
|
168
|
+
// GOOD:
|
|
169
|
+
const apiKey = process.env.LINEAR_API_KEY;
|
|
170
|
+
if (!apiKey) throw new Error('LINEAR_API_KEY not set');
|
|
171
|
+
const client = new LinearClient({ apiKey });
|
|
148
172
|
</example>
|
|
149
173
|
|
|
150
174
|
Environment sources (check in order):
|
|
@@ -155,13 +179,6 @@ Environment sources (check in order):
|
|
|
155
179
|
|
|
156
180
|
Secret patterns to block: lin_api_* | lin_oauth_* | sk-* | npm_*
|
|
157
181
|
|
|
158
|
-
<example>
|
|
159
|
-
# If you see this pattern, STOP and use env vars:
|
|
160
|
-
const token = 'lin_api_...';
|
|
161
|
-
const apiKey = 'sk-...';
|
|
162
|
-
const npmToken = 'npm_...';
|
|
163
|
-
</example>
|
|
164
|
-
|
|
165
182
|
## Deploy
|
|
166
183
|
|
|
167
184
|
```bash
|
|
@@ -188,9 +205,10 @@ Route effort by task complexity — not all code changes deserve equal scrutiny:
|
|
|
188
205
|
- Config additions (new env var, feature flag)
|
|
189
206
|
|
|
190
207
|
<example>
|
|
191
|
-
# AUTOMATE
|
|
192
|
-
|
|
193
|
-
|
|
208
|
+
# AUTOMATE: adding a new MCP tool that follows the existing switch/case pattern
|
|
209
|
+
case 'get_frame_by_id':
|
|
210
|
+
return { frame: await frameManager.getById(args.id) };
|
|
211
|
+
# → just add the case, lint, test. No design review needed.
|
|
194
212
|
</example>
|
|
195
213
|
|
|
196
214
|
**STANDARD** — Normal workflow, lint+test+build:
|
|
@@ -199,9 +217,8 @@ Action: Add case to server.ts switch, follow existing pattern, lint+test
|
|
|
199
217
|
- Integration wiring (adding handler to server.ts dispatch)
|
|
200
218
|
|
|
201
219
|
<example>
|
|
202
|
-
# STANDARD
|
|
203
|
-
|
|
204
|
-
Action: Modify digest-generator.ts, add tests, lint+test+build, verify output
|
|
220
|
+
# STANDARD: fixing a bug where snapshot list shows stale entries
|
|
221
|
+
# → read the relevant files, understand root cause, fix, lint+test+build
|
|
205
222
|
</example>
|
|
206
223
|
|
|
207
224
|
**CAREFUL** — Review approach before implementation:
|
|
@@ -211,9 +228,10 @@ Action: Modify digest-generator.ts, add tests, lint+test+build, verify output
|
|
|
211
228
|
- Anything touching error handling chains
|
|
212
229
|
|
|
213
230
|
<example>
|
|
214
|
-
# CAREFUL
|
|
215
|
-
|
|
216
|
-
|
|
231
|
+
# CAREFUL: adding a new column to the frames table
|
|
232
|
+
# → read sqlite-adapter.ts and schema_version migration pattern first
|
|
233
|
+
# → plan the migration (increment schema_version, ALTER TABLE or recreate)
|
|
234
|
+
# → confirm approach with user if destructive
|
|
217
235
|
</example>
|
|
218
236
|
|
|
219
237
|
**ARCHITECT** — Plan mode required, explore existing patterns first:
|
|
@@ -222,9 +240,10 @@ Action: Read schema, check migrations, discuss ALTER TABLE vs rebuild, plan roll
|
|
|
222
240
|
- Breaking changes to MCP protocol or CLI interface
|
|
223
241
|
|
|
224
242
|
<example>
|
|
225
|
-
# ARCHITECT
|
|
226
|
-
|
|
227
|
-
|
|
243
|
+
# ARCHITECT: replacing LIKE-based search with hybrid FTS5+BM25
|
|
244
|
+
# → enter plan mode, read sqlite-adapter.ts + search-benchmark.test.ts
|
|
245
|
+
# → understand current scoring thresholds, BM25 sign conventions
|
|
246
|
+
# → design schema migration, write plan, get approval before coding
|
|
228
247
|
</example>
|
|
229
248
|
|
|
230
249
|
**HUMAN** — Explicit user approval before any changes:
|
|
@@ -233,9 +252,9 @@ Action: EnterPlanMode, explore frame-manager.ts, research Graphiti API, design b
|
|
|
233
252
|
- Publishing (npm publish, Railway deploy)
|
|
234
253
|
|
|
235
254
|
<example>
|
|
236
|
-
# HUMAN
|
|
237
|
-
|
|
238
|
-
|
|
255
|
+
# HUMAN: "drop the old digest_cache table and run npm publish"
|
|
256
|
+
# → STOP. Confirm with user: "This will permanently delete digest_cache
|
|
257
|
+
# and publish to npm. Proceed?" — wait for explicit yes.
|
|
239
258
|
</example>
|
|
240
259
|
|
|
241
260
|
Quality gates scale with tier — don't over-engineer AUTOMATE tasks, don't under-review CAREFUL ones.
|
|
@@ -250,17 +269,12 @@ Quality gates scale with tier — don't over-engineer AUTOMATE tasks, don't unde
|
|
|
250
269
|
- Ask 1-3 clarifying questions for complex commands (one at a time)
|
|
251
270
|
|
|
252
271
|
<example>
|
|
253
|
-
# Session start
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
<example>
|
|
262
|
-
# Complex command clarification:
|
|
263
|
-
User: "Optimize the search performance"
|
|
264
|
-
Response: "Which search path should I focus on? (1) FTS5 queries, (2) Hybrid search scoring, or (3) Database indexes?"
|
|
265
|
-
# Wait for answer before proceeding
|
|
272
|
+
# Session start checklist:
|
|
273
|
+
$ git log --oneline -10 # understand recent context
|
|
274
|
+
$ cat stackmemory.json # check current config/state
|
|
275
|
+
$ cat .env | grep -v '^#' # verify which API keys are present
|
|
276
|
+
|
|
277
|
+
# After completing a Linear task:
|
|
278
|
+
$ npm run linear:sync # update issue status in Linear
|
|
279
|
+
$ stackmemory snapshot save # capture context for next session
|
|
266
280
|
</example>
|