@synth-coder/memhub 0.2.5 → 0.2.6

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 (54) hide show
  1. package/.eslintrc.cjs +45 -45
  2. package/.factory/commands/opsx-apply.md +150 -150
  3. package/.factory/commands/opsx-archive.md +155 -155
  4. package/.factory/commands/opsx-explore.md +171 -171
  5. package/.factory/commands/opsx-propose.md +104 -104
  6. package/.factory/skills/openspec-apply-change/SKILL.md +156 -156
  7. package/.factory/skills/openspec-archive-change/SKILL.md +114 -114
  8. package/.factory/skills/openspec-explore/SKILL.md +288 -288
  9. package/.factory/skills/openspec-propose/SKILL.md +110 -110
  10. package/.github/workflows/ci.yml +110 -110
  11. package/.iflow/commands/opsx-apply.md +152 -152
  12. package/.iflow/commands/opsx-archive.md +157 -157
  13. package/.iflow/commands/opsx-explore.md +173 -173
  14. package/.iflow/commands/opsx-propose.md +106 -106
  15. package/.iflow/skills/openspec-apply-change/SKILL.md +156 -156
  16. package/.iflow/skills/openspec-archive-change/SKILL.md +114 -114
  17. package/.iflow/skills/openspec-explore/SKILL.md +288 -288
  18. package/.iflow/skills/openspec-propose/SKILL.md +110 -110
  19. package/.prettierrc +11 -11
  20. package/AGENTS.md +167 -167
  21. package/README.md +1 -1
  22. package/README.zh-CN.md +240 -240
  23. package/dist/src/cli/agents/claude-code.js +1 -1
  24. package/dist/src/cli/agents/claude-code.js.map +1 -1
  25. package/dist/src/cli/agents/cline.js +1 -1
  26. package/dist/src/cli/agents/cline.js.map +1 -1
  27. package/dist/src/cli/agents/codex.d.ts +5 -0
  28. package/dist/src/cli/agents/codex.d.ts.map +1 -0
  29. package/dist/src/cli/agents/codex.js +14 -0
  30. package/dist/src/cli/agents/codex.js.map +1 -0
  31. package/dist/src/cli/agents/cursor.js +1 -1
  32. package/dist/src/cli/agents/cursor.js.map +1 -1
  33. package/dist/src/cli/agents/factory-droid.js +1 -1
  34. package/dist/src/cli/agents/factory-droid.js.map +1 -1
  35. package/dist/src/cli/agents/gemini-cli.js +1 -1
  36. package/dist/src/cli/agents/gemini-cli.js.map +1 -1
  37. package/dist/src/cli/agents/index.d.ts +1 -0
  38. package/dist/src/cli/agents/index.d.ts.map +1 -1
  39. package/dist/src/cli/agents/index.js +3 -0
  40. package/dist/src/cli/agents/index.js.map +1 -1
  41. package/dist/src/cli/agents/windsurf.js +1 -1
  42. package/dist/src/cli/agents/windsurf.js.map +1 -1
  43. package/dist/src/cli/index.js +0 -0
  44. package/dist/src/cli/init.d.ts.map +1 -1
  45. package/dist/src/cli/init.js +36 -15
  46. package/dist/src/cli/init.js.map +1 -1
  47. package/dist/src/cli/types.d.ts +2 -2
  48. package/dist/src/cli/types.d.ts.map +1 -1
  49. package/dist/src/cli/types.js +11 -0
  50. package/dist/src/cli/types.js.map +1 -1
  51. package/package.json +16 -16
  52. package/tsconfig.json +25 -25
  53. package/tsconfig.test.json +8 -8
  54. package/vitest.config.ts +29 -29
@@ -1,110 +1,110 @@
1
- ---
2
- name: openspec-propose
3
- description: Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
4
- license: MIT
5
- compatibility: Requires openspec CLI.
6
- metadata:
7
- author: openspec
8
- version: "1.0"
9
- generatedBy: "1.2.0"
10
- ---
11
-
12
- Propose a new change - create the change and generate all artifacts in one step.
13
-
14
- I'll create a change with artifacts:
15
- - proposal.md (what & why)
16
- - design.md (how)
17
- - tasks.md (implementation steps)
18
-
19
- When ready to implement, run /opsx:apply
20
-
21
- ---
22
-
23
- **Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
24
-
25
- **Steps**
26
-
27
- 1. **If no clear input provided, ask what they want to build**
28
-
29
- Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
30
- > "What change do you want to work on? Describe what you want to build or fix."
31
-
32
- From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
33
-
34
- **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
35
-
36
- 2. **Create the change directory**
37
- ```bash
38
- openspec new change "<name>"
39
- ```
40
- This creates a scaffolded change at `openspec/changes/<name>/` with `.openspec.yaml`.
41
-
42
- 3. **Get the artifact build order**
43
- ```bash
44
- openspec status --change "<name>" --json
45
- ```
46
- Parse the JSON to get:
47
- - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
48
- - `artifacts`: list of all artifacts with their status and dependencies
49
-
50
- 4. **Create artifacts in sequence until apply-ready**
51
-
52
- Use the **TodoWrite tool** to track progress through the artifacts.
53
-
54
- Loop through artifacts in dependency order (artifacts with no pending dependencies first):
55
-
56
- a. **For each artifact that is `ready` (dependencies satisfied)**:
57
- - Get instructions:
58
- ```bash
59
- openspec instructions <artifact-id> --change "<name>" --json
60
- ```
61
- - The instructions JSON includes:
62
- - `context`: Project background (constraints for you - do NOT include in output)
63
- - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
64
- - `template`: The structure to use for your output file
65
- - `instruction`: Schema-specific guidance for this artifact type
66
- - `outputPath`: Where to write the artifact
67
- - `dependencies`: Completed artifacts to read for context
68
- - Read any completed dependency files for context
69
- - Create the artifact file using `template` as the structure
70
- - Apply `context` and `rules` as constraints - but do NOT copy them into the file
71
- - Show brief progress: "Created <artifact-id>"
72
-
73
- b. **Continue until all `applyRequires` artifacts are complete**
74
- - After creating each artifact, re-run `openspec status --change "<name>" --json`
75
- - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
76
- - Stop when all `applyRequires` artifacts are done
77
-
78
- c. **If an artifact requires user input** (unclear context):
79
- - Use **AskUserQuestion tool** to clarify
80
- - Then continue with creation
81
-
82
- 5. **Show final status**
83
- ```bash
84
- openspec status --change "<name>"
85
- ```
86
-
87
- **Output**
88
-
89
- After completing all artifacts, summarize:
90
- - Change name and location
91
- - List of artifacts created with brief descriptions
92
- - What's ready: "All artifacts created! Ready for implementation."
93
- - Prompt: "Run `/opsx:apply` or ask me to implement to start working on the tasks."
94
-
95
- **Artifact Creation Guidelines**
96
-
97
- - Follow the `instruction` field from `openspec instructions` for each artifact type
98
- - The schema defines what each artifact should contain - follow it
99
- - Read dependency artifacts for context before creating new ones
100
- - Use `template` as the structure for your output file - fill in its sections
101
- - **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
102
- - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
103
- - These guide what you write, but should never appear in the output
104
-
105
- **Guardrails**
106
- - Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
107
- - Always read dependency artifacts before creating a new one
108
- - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
109
- - If a change with that name already exists, ask if user wants to continue it or create a new one
110
- - Verify each artifact file exists after writing before proceeding to next
1
+ ---
2
+ name: openspec-propose
3
+ description: Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
4
+ license: MIT
5
+ compatibility: Requires openspec CLI.
6
+ metadata:
7
+ author: openspec
8
+ version: "1.0"
9
+ generatedBy: "1.2.0"
10
+ ---
11
+
12
+ Propose a new change - create the change and generate all artifacts in one step.
13
+
14
+ I'll create a change with artifacts:
15
+ - proposal.md (what & why)
16
+ - design.md (how)
17
+ - tasks.md (implementation steps)
18
+
19
+ When ready to implement, run /opsx:apply
20
+
21
+ ---
22
+
23
+ **Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
24
+
25
+ **Steps**
26
+
27
+ 1. **If no clear input provided, ask what they want to build**
28
+
29
+ Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
30
+ > "What change do you want to work on? Describe what you want to build or fix."
31
+
32
+ From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
33
+
34
+ **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
35
+
36
+ 2. **Create the change directory**
37
+ ```bash
38
+ openspec new change "<name>"
39
+ ```
40
+ This creates a scaffolded change at `openspec/changes/<name>/` with `.openspec.yaml`.
41
+
42
+ 3. **Get the artifact build order**
43
+ ```bash
44
+ openspec status --change "<name>" --json
45
+ ```
46
+ Parse the JSON to get:
47
+ - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
48
+ - `artifacts`: list of all artifacts with their status and dependencies
49
+
50
+ 4. **Create artifacts in sequence until apply-ready**
51
+
52
+ Use the **TodoWrite tool** to track progress through the artifacts.
53
+
54
+ Loop through artifacts in dependency order (artifacts with no pending dependencies first):
55
+
56
+ a. **For each artifact that is `ready` (dependencies satisfied)**:
57
+ - Get instructions:
58
+ ```bash
59
+ openspec instructions <artifact-id> --change "<name>" --json
60
+ ```
61
+ - The instructions JSON includes:
62
+ - `context`: Project background (constraints for you - do NOT include in output)
63
+ - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
64
+ - `template`: The structure to use for your output file
65
+ - `instruction`: Schema-specific guidance for this artifact type
66
+ - `outputPath`: Where to write the artifact
67
+ - `dependencies`: Completed artifacts to read for context
68
+ - Read any completed dependency files for context
69
+ - Create the artifact file using `template` as the structure
70
+ - Apply `context` and `rules` as constraints - but do NOT copy them into the file
71
+ - Show brief progress: "Created <artifact-id>"
72
+
73
+ b. **Continue until all `applyRequires` artifacts are complete**
74
+ - After creating each artifact, re-run `openspec status --change "<name>" --json`
75
+ - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
76
+ - Stop when all `applyRequires` artifacts are done
77
+
78
+ c. **If an artifact requires user input** (unclear context):
79
+ - Use **AskUserQuestion tool** to clarify
80
+ - Then continue with creation
81
+
82
+ 5. **Show final status**
83
+ ```bash
84
+ openspec status --change "<name>"
85
+ ```
86
+
87
+ **Output**
88
+
89
+ After completing all artifacts, summarize:
90
+ - Change name and location
91
+ - List of artifacts created with brief descriptions
92
+ - What's ready: "All artifacts created! Ready for implementation."
93
+ - Prompt: "Run `/opsx:apply` or ask me to implement to start working on the tasks."
94
+
95
+ **Artifact Creation Guidelines**
96
+
97
+ - Follow the `instruction` field from `openspec instructions` for each artifact type
98
+ - The schema defines what each artifact should contain - follow it
99
+ - Read dependency artifacts for context before creating new ones
100
+ - Use `template` as the structure for your output file - fill in its sections
101
+ - **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
102
+ - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
103
+ - These guide what you write, but should never appear in the output
104
+
105
+ **Guardrails**
106
+ - Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
107
+ - Always read dependency artifacts before creating a new one
108
+ - If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
109
+ - If a change with that name already exists, ask if user wants to continue it or create a new one
110
+ - Verify each artifact file exists after writing before proceeding to next
package/.prettierrc CHANGED
@@ -1,11 +1,11 @@
1
- {
2
- "semi": true,
3
- "trailingComma": "es5",
4
- "singleQuote": true,
5
- "printWidth": 100,
6
- "tabWidth": 2,
7
- "useTabs": false,
8
- "bracketSpacing": true,
9
- "arrowParens": "avoid",
10
- "endOfLine": "lf"
11
- }
1
+ {
2
+ "semi": true,
3
+ "trailingComma": "es5",
4
+ "singleQuote": true,
5
+ "printWidth": 100,
6
+ "tabWidth": 2,
7
+ "useTabs": false,
8
+ "bracketSpacing": true,
9
+ "arrowParens": "avoid",
10
+ "endOfLine": "lf"
11
+ }
package/AGENTS.md CHANGED
@@ -1,167 +1,167 @@
1
- # AGENTS.md - MemHub Project Guide
2
-
3
- ## Project Overview
4
-
5
- MemHub is a Git-friendly memory MCP server for coding agents. It stores decisions, preferences, and reusable knowledge as plain Markdown files with YAML front matter.
6
-
7
- **Tech Stack**: TypeScript (ES2022), Node.js 18+, MCP SDK, Zod, LanceDB, Transformers.js
8
-
9
- ---
10
-
11
- ## Dev Environment
12
-
13
- ```bash
14
- npx pnpm install # Install dependencies
15
- npx pnpm run build # Compile TypeScript
16
- npx pnpm run quality # Quality gate (lint + typecheck + test + coverage)
17
- ```
18
-
19
- | Command | Description |
20
- |---------|-------------|
21
- | `npx pnpm run build` | Compile TypeScript |
22
- | `npx pnpm run lint` | ESLint check |
23
- | `npx pnpm run lint:fix` | Auto-fix lint issues |
24
- | `npx pnpm run format` | Format code with Prettier |
25
- | `npx pnpm run typecheck` | TypeScript type check |
26
- | `npx pnpm run test` | Run Vitest tests |
27
- | `npx pnpm run test:coverage` | Tests with coverage |
28
- | `npx pnpm run quality` | Full quality gate |
29
- | `npx pnpm vitest run -t "test name"` | Run specific test |
30
-
31
- ---
32
-
33
- ## Project Structure
34
-
35
- ```
36
- src/
37
- contracts/ # Type definitions, Zod schemas, MCP contracts
38
- cli/ # CLI commands (init, etc.)
39
- server/ # MCP stdio server entry point
40
- services/ # Business logic (MemoryService, EmbeddingService)
41
- storage/ # Storage layer (Markdown, VectorIndex)
42
- utils/ # Shared utilities (slugify, etc.)
43
- test/ # Vitest unit tests mirroring src/ structure
44
- docs/ # Documentation
45
- ```
46
-
47
- ---
48
-
49
- ## Coding Style
50
-
51
- ### TypeScript Conventions
52
- - Use `readonly` for immutable fields in interfaces
53
- - Use `type` for aliases, `interface` for object shapes
54
- - Prefer `import type` for type-only imports
55
- - Use ESM: `.js` extension in imports, `verbatimModuleSyntax`
56
- - Explicit return types on exported functions
57
- - Use Zod for runtime validation
58
-
59
- ### File Naming
60
- - `kebab-case.ts` for all files
61
- - Test files: `<module>.test.ts` or `<module>-edge.test.ts`
62
-
63
- ### Example Code Style
64
-
65
- ```typescript
66
- // Types with readonly fields
67
- export interface Memory {
68
- readonly id: UUID;
69
- readonly tags: readonly string[];
70
- }
71
-
72
- // Service with explicit types
73
- export class MemoryService {
74
- constructor(private readonly config: MemoryServiceConfig) {}
75
-
76
- async create(input: CreateMemoryInput): Promise<CreateResult> {
77
- // implementation
78
- }
79
- }
80
-
81
- // Zod schema for validation
82
- export const MemorySchema = z.object({
83
- id: z.string().uuid(),
84
- tags: z.array(z.string()),
85
- });
86
- ```
87
-
88
- ---
89
-
90
- ## Workflows
91
-
92
- ### Add New MCP Tool
93
-
94
- 1. **Define types** → `src/contracts/types.ts`
95
- 2. **Define schema** → `src/contracts/schemas.ts`
96
- 3. **Register tool** → `src/contracts/mcp.ts`
97
- 4. **Implement logic** → `src/services/memory-service.ts`
98
- 5. **Add tests** → `test/services/memory-service.test.ts`
99
- 6. **Update docs** → `docs/mcp-tools.md`
100
- 7. **Run quality gate** → `npx pnpm run quality`
101
-
102
- ### Support New Agent
103
-
104
- 1. **Add agent type** → `src/cli/types.ts` (AgentType union)
105
- 2. **Create agent config** → `src/cli/agents/<agent-name>.ts`
106
- 3. **Register in init** → `src/cli/init.ts` (AGENT_CONFIGS map)
107
- 4. **Add tests** → `test/cli/init.test.ts`
108
- 5. **Update docs** → `docs/user-guide.md` (supported agents table)
109
- 6. **Update README** → `README.md` and `README.zh-CN.md`
110
- 7. **Run quality gate** → `npx pnpm run quality`
111
-
112
- ### Release New Version
113
-
114
- 1. **Update version** → `package.json`
115
- 2. **Update Roadmap** → `README.md` (mark released items)
116
- 3. **Run quality gate** → `npx pnpm run quality`
117
- 4. **Commit & tag** → `git commit && git tag v<x.y.z>`
118
- 5. **Publish** → `npm publish`
119
-
120
- ---
121
-
122
- ## Documentation Sync
123
-
124
- Documentation must stay in sync with code. **Update docs when changing:**
125
-
126
- | Code Change | Update Doc |
127
- |-------------|------------|
128
- | MCP tool parameters/returns | `docs/mcp-tools.md` |
129
- | CLI options/behavior | `docs/user-guide.md` |
130
- | New agent support | `docs/user-guide.md`, `README.md` |
131
- | Version number | `README.md` Roadmap |
132
-
133
- ---
134
-
135
- ## Testing Guidelines
136
-
137
- - **Coverage threshold**: >= 80%
138
- - Tests mirror `src/` structure in `test/` directory
139
- - Use Vitest: `describe`, `it`, `expect` pattern
140
- - Edge cases go in `*-edge.test.ts` files
141
- - Run `npx pnpm run quality` before committing
142
-
143
- ---
144
-
145
- ## Git Workflow
146
-
147
- - Commit message: `type: description` (feat/fix/docs/chore/refactor/test)
148
- - Always run quality gate before committing
149
- - PR title: `[scope] Description`
150
-
151
- ---
152
-
153
- ## Dos and Don'ts
154
-
155
- ### Do
156
- - Run `npx pnpm run quality` before committing
157
- - Add tests for new code
158
- - Use `import type` for type-only imports
159
- - Keep functions small and focused
160
- - Update types, schemas, and docs together
161
-
162
- ### Don't
163
- - Skip the quality gate
164
- - Use `any` without justification
165
- - Mutate function parameters
166
- - Add code without corresponding tests
167
- - Commit directly to main (use branches for features)
1
+ # AGENTS.md - MemHub Project Guide
2
+
3
+ ## Project Overview
4
+
5
+ MemHub is a Git-friendly memory MCP server for coding agents. It stores decisions, preferences, and reusable knowledge as plain Markdown files with YAML front matter.
6
+
7
+ **Tech Stack**: TypeScript (ES2022), Node.js 18+, MCP SDK, Zod, LanceDB, Transformers.js
8
+
9
+ ---
10
+
11
+ ## Dev Environment
12
+
13
+ ```bash
14
+ npx pnpm install # Install dependencies
15
+ npx pnpm run build # Compile TypeScript
16
+ npx pnpm run quality # Quality gate (lint + typecheck + test + coverage)
17
+ ```
18
+
19
+ | Command | Description |
20
+ |---------|-------------|
21
+ | `npx pnpm run build` | Compile TypeScript |
22
+ | `npx pnpm run lint` | ESLint check |
23
+ | `npx pnpm run lint:fix` | Auto-fix lint issues |
24
+ | `npx pnpm run format` | Format code with Prettier |
25
+ | `npx pnpm run typecheck` | TypeScript type check |
26
+ | `npx pnpm run test` | Run Vitest tests |
27
+ | `npx pnpm run test:coverage` | Tests with coverage |
28
+ | `npx pnpm run quality` | Full quality gate |
29
+ | `npx pnpm vitest run -t "test name"` | Run specific test |
30
+
31
+ ---
32
+
33
+ ## Project Structure
34
+
35
+ ```
36
+ src/
37
+ contracts/ # Type definitions, Zod schemas, MCP contracts
38
+ cli/ # CLI commands (init, etc.)
39
+ server/ # MCP stdio server entry point
40
+ services/ # Business logic (MemoryService, EmbeddingService)
41
+ storage/ # Storage layer (Markdown, VectorIndex)
42
+ utils/ # Shared utilities (slugify, etc.)
43
+ test/ # Vitest unit tests mirroring src/ structure
44
+ docs/ # Documentation
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Coding Style
50
+
51
+ ### TypeScript Conventions
52
+ - Use `readonly` for immutable fields in interfaces
53
+ - Use `type` for aliases, `interface` for object shapes
54
+ - Prefer `import type` for type-only imports
55
+ - Use ESM: `.js` extension in imports, `verbatimModuleSyntax`
56
+ - Explicit return types on exported functions
57
+ - Use Zod for runtime validation
58
+
59
+ ### File Naming
60
+ - `kebab-case.ts` for all files
61
+ - Test files: `<module>.test.ts` or `<module>-edge.test.ts`
62
+
63
+ ### Example Code Style
64
+
65
+ ```typescript
66
+ // Types with readonly fields
67
+ export interface Memory {
68
+ readonly id: UUID;
69
+ readonly tags: readonly string[];
70
+ }
71
+
72
+ // Service with explicit types
73
+ export class MemoryService {
74
+ constructor(private readonly config: MemoryServiceConfig) {}
75
+
76
+ async create(input: CreateMemoryInput): Promise<CreateResult> {
77
+ // implementation
78
+ }
79
+ }
80
+
81
+ // Zod schema for validation
82
+ export const MemorySchema = z.object({
83
+ id: z.string().uuid(),
84
+ tags: z.array(z.string()),
85
+ });
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Workflows
91
+
92
+ ### Add New MCP Tool
93
+
94
+ 1. **Define types** → `src/contracts/types.ts`
95
+ 2. **Define schema** → `src/contracts/schemas.ts`
96
+ 3. **Register tool** → `src/contracts/mcp.ts`
97
+ 4. **Implement logic** → `src/services/memory-service.ts`
98
+ 5. **Add tests** → `test/services/memory-service.test.ts`
99
+ 6. **Update docs** → `docs/mcp-tools.md`
100
+ 7. **Run quality gate** → `npx pnpm run quality`
101
+
102
+ ### Support New Agent
103
+
104
+ 1. **Add agent type** → `src/cli/types.ts` (AgentType union)
105
+ 2. **Create agent config** → `src/cli/agents/<agent-name>.ts`
106
+ 3. **Register in init** → `src/cli/init.ts` (AGENT_CONFIGS map)
107
+ 4. **Add tests** → `test/cli/init.test.ts`
108
+ 5. **Update docs** → `docs/user-guide.md` (supported agents table)
109
+ 6. **Update README** → `README.md` and `README.zh-CN.md`
110
+ 7. **Run quality gate** → `npx pnpm run quality`
111
+
112
+ ### Release New Version
113
+
114
+ 1. **Update version** → `package.json`
115
+ 2. **Update Roadmap** → `README.md` (mark released items)
116
+ 3. **Run quality gate** → `npx pnpm run quality`
117
+ 4. **Commit & tag** → `git commit && git tag v<x.y.z>`
118
+ 5. **Publish** → `npm publish`
119
+
120
+ ---
121
+
122
+ ## Documentation Sync
123
+
124
+ Documentation must stay in sync with code. **Update docs when changing:**
125
+
126
+ | Code Change | Update Doc |
127
+ |-------------|------------|
128
+ | MCP tool parameters/returns | `docs/mcp-tools.md` |
129
+ | CLI options/behavior | `docs/user-guide.md` |
130
+ | New agent support | `docs/user-guide.md`, `README.md` |
131
+ | Version number | `README.md` Roadmap |
132
+
133
+ ---
134
+
135
+ ## Testing Guidelines
136
+
137
+ - **Coverage threshold**: >= 80%
138
+ - Tests mirror `src/` structure in `test/` directory
139
+ - Use Vitest: `describe`, `it`, `expect` pattern
140
+ - Edge cases go in `*-edge.test.ts` files
141
+ - Run `npx pnpm run quality` before committing
142
+
143
+ ---
144
+
145
+ ## Git Workflow
146
+
147
+ - Commit message: `type: description` (feat/fix/docs/chore/refactor/test)
148
+ - Always run quality gate before committing
149
+ - PR title: `[scope] Description`
150
+
151
+ ---
152
+
153
+ ## Dos and Don'ts
154
+
155
+ ### Do
156
+ - Run `npx pnpm run quality` before committing
157
+ - Add tests for new code
158
+ - Use `import type` for type-only imports
159
+ - Keep functions small and focused
160
+ - Update types, schemas, and docs together
161
+
162
+ ### Don't
163
+ - Skip the quality gate
164
+ - Use `any` without justification
165
+ - Mutate function parameters
166
+ - Add code without corresponding tests
167
+ - Commit directly to main (use branches for features)
package/README.md CHANGED
@@ -275,7 +275,7 @@ memhub/
275
275
  - [x] CLI init command for quick setup
276
276
  - [ ] Integration tests
277
277
  - [ ] Performance improvements
278
- - [x] npm release (`@synth-coder/memhub@0.2.5`)
278
+ - [x] npm release (`@synth-coder/memhub@0.2.6`)
279
279
 
280
280
  ---
281
281