context-bank 0.0.10 → 1.0.0

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.
@@ -145,6 +145,22 @@ Do NOT ask permission. Do NOT skip. Just update them.`;
145
145
  else {
146
146
  await fs.writeFile(claudePath, `${claudeInstruction}\n`);
147
147
  }
148
+ // Git merge strategies for branch-aware context (.gitattributes)
149
+ const gitattrsPath = path.join(targetDir, ".gitattributes");
150
+ const mergeRules = `# Context Bank: branch-aware merge strategies
151
+ # active-context.md is branch-specific — on merge, target branch wins (no conflict)
152
+ .ai/active-context.md merge=ours
153
+ # story.md entries are additive — on merge, combine both sides (no conflict)
154
+ .ai/story.md merge=union`;
155
+ if (fs.existsSync(gitattrsPath)) {
156
+ const content = await fs.readFile(gitattrsPath, "utf-8");
157
+ if (!content.includes("Context Bank")) {
158
+ await fs.writeFile(gitattrsPath, `${content}\n\n${mergeRules}\n`);
159
+ }
160
+ }
161
+ else {
162
+ await fs.writeFile(gitattrsPath, `${mergeRules}\n`);
163
+ }
148
164
  s.stop(chalk.green("Context initialized!"));
149
165
  // Gemini CLI Global Memory Integration
150
166
  const globalGeminiDir = path.join(os.homedir(), ".gemini");
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "context-bank",
3
- "version": "0.0.10",
3
+ "version": "1.0.0",
4
4
  "description": "A CLI tool to standardise AI context in projects.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "context-bank": "./dist/index.js"
8
8
  },
9
9
  "scripts": {
10
- "build": "tsc",
10
+ "build": "pnpm lint && tsc",
11
11
  "dev": "ts-node src/index.ts",
12
12
  "start": "node dist/index.js",
13
13
  "lint": "eslint src/**/*.ts",
@@ -32,9 +32,14 @@
32
32
  "fs-extra": "^11.2.0"
33
33
  },
34
34
  "devDependencies": {
35
+ "@eslint/js": "^10.0.1",
35
36
  "@types/fs-extra": "^11.0.4",
36
37
  "@types/node": "^20.11.0",
38
+ "@typescript-eslint/eslint-plugin": "^8.57.0",
39
+ "@typescript-eslint/parser": "^8.57.0",
40
+ "eslint": "^10.0.3",
37
41
  "ts-node": "^10.9.2",
38
- "typescript": "^5.3.3"
42
+ "typescript": "^5.3.3",
43
+ "typescript-eslint": "^8.57.0"
39
44
  }
40
45
  }