context-bank 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -1,80 +1,100 @@
1
1
  # 🏦 Context Bank
2
2
 
3
- > **The `git init` for AI Context.**
4
- > Standardize, persist, and evolve your project's AI context with a single command.
3
+ <div align="center">
5
4
 
6
- ![License](https://img.shields.io/npm/l/context-bank)
7
- ![Version](https://img.shields.io/npm/v/context-bank)
5
+ ![npm version](https://img.shields.io/npm/v/context-bank?style=flat-square&color=007acc)
6
+ ![license](https://img.shields.io/npm/l/context-bank?style=flat-square&color=green)
7
+ ![downloads](https://img.shields.io/npm/dt/context-bank?style=flat-square)
8
+
9
+ **The `git init` for AI Context.**
10
+ <br/>
11
+ Standardize, persist, and evolve your project's AI context with a single command.
12
+ <br/>
13
+ Works with **Cursor**, **Windsurf**, and **GitHub Copilot**.
14
+
15
+ </div>
16
+
17
+ ---
8
18
 
9
19
  ## ⚡ The Problem
10
- Every time you start a new chat with an AI (Cursor, Windsurf, Copilot), you face the same issues:
11
- 1. **Amnesia:** You have to re-explain the tech stack and coding rules.
12
- 2. **Token Waste:** Pasting huge context files burns through your token limit and money.
13
- 3. **Inconsistency:** `Cursor` follows one rule, `Copilot` follows another.
20
+ Every time you start a new chat with an AI Code Editor, you face the same friction:
21
+ * ❌ **Amnesia:** "Wait, are we using Tailwind or CSS Modules? I forgot."
22
+ * ❌ **Token Waste:** Manually pasting huge documentation files burns your quota.
23
+ * ❌ **Inconsistency:** Cursor follows one rule, while Copilot suggests something else.
14
24
 
15
25
  ## 🚀 The Solution
16
- **Context Bank** creates a standardized, self-evolving brain for your project.
26
+ **Context Bank** creates a standardized, **self-evolving brain** for your project.
27
+
28
+ It generates a structured `.ai` directory that acts as a **Single Source of Truth (SSOT)** for all your AI tools.
29
+
30
+ ## 📦 Installation & Usage
31
+
32
+ ### Prerequisites
33
+ You need **Node.js 18+** installed on your machine.
34
+ *(Most developers already have this. If not, [download it here](https://nodejs.org/).)*
35
+
36
+ ### Quick Start
37
+ Go to your project root (any language: Python, Go, C#, Node, etc.) and run:
17
38
 
18
- Run one command:
19
39
  ```bash
20
40
  npx context-bank init
21
41
  ```
22
42
 
23
- And get a fully configured `.ai` environment that works across **Cursor**, **Windsurf**, and **GitHub Copilot**.
43
+ That's it! 🚀
24
44
 
25
45
  ## ✨ Key Features
26
46
 
27
- ### 1. 🧠 Self-Evolving Rules (The "Living" Standard)
28
- Instead of static rules, Context Bank sets up a **Single Source of Truth** (`.ai/rules.md`).
29
- - The AI is instructed to **update this file itself** when you change a preference.
30
- - *Example:* You tell the AI "Don't use `any`". The AI updates `rules.md`. Next time, it remembers.
47
+ ### 🧠 1. Self-Evolving Rules
48
+ Instead of static `.txt` files, Context Bank sets up a living **`rules.md`**.
49
+ * **Dynamic Learning:** The AI is instructed to *update its own rules* when you state a preference.
50
+ * **Example:** You tell the AI *"I prefer arrow functions"*. The AI updates `.ai/rules.md`. Next time, it remembers.
31
51
 
32
- ### 2. 💾 Smart Memory & Token Saving
33
- **Stop reading the entire chat history.**
34
- Context Bank introduces a "State Management" system for your AI:
35
- - **`.ai/active-context.md` (Short-term Memory):** Keeps track of *current* tasks.
36
- - *Benefit:* You can delete your chat history to save tokens, start a fresh session, and the AI knows exactly where it left off by reading this 20-line file instead of a 10k token history.
37
- - **`.ai/story.md` (Long-term Memory):** logs major milestones and architectural decisions.
52
+ ### 💾 2. Smart Memory (Token Saver)
53
+ Stop feeding the AI your entire chat history. Context Bank uses "State Management":
54
+ * **`active-context.md` (Short-term):** Tracks the *current* task. (e.g., "Fixing the login bug").
55
+ * **`story.md` (Long-term):** Logs major milestones and architectural decisions.
56
+ * **The Benefit:** You can start a fresh chat, point the AI to `active-context.md`, and resume work instantly without reading 10k tokens of history.
38
57
 
39
- ### 3. 🔌 Tool Agnostic
40
- Whether you switch from Cursor to Windsurf, or use Copilot in VS Code, they all share the same brain.
41
- - Generates `.cursorrules` pointing to the master rules.
42
- - Generates `.windsurfrules` pointing to the master rules.
43
- - Generates `.github/copilot-instructions.md` pointing to the master rules.
58
+ ### 🔌 3. Universal Tool Support
59
+ One brain, multiple interfaces. The `init` command automatically configures pointers for:
44
60
 
45
- ## 🛠 Usage
61
+ | Tool | Support Type | File Created |
62
+ |------|--------------|--------------|
63
+ | **Cursor** | Native ✅ | `.cursorrules` |
64
+ | **Windsurf** | Native ✅ | `.windsurfrules` |
65
+ | **GitHub Copilot** | Native ✅ | `.github/copilot-instructions.md` |
66
+ | **Aider** (CLI) | Native ✅ | `CONVENTIONS.md` |
67
+ | **Other CLIs** | Manual 🛠️ | (See below) |
46
68
 
47
- 1. **Go to your project root:**
48
- ```bash
49
- cd my-awesome-project
50
- ```
69
+ #### 🖥️ Using with Gemini CLI, Claude Code, or ChatGPT
70
+ If your tool doesn't automatically read configuration files, just start your session with this **Magic Prompt**:
51
71
 
52
- 2. **Initialize the bank:**
53
- ```bash
54
- npx context-bank init
55
- ```
72
+ > "I am starting a session. Please read **`.ai/rules.md`** for project standards and **`.ai/active-context.md`** for the current state. Update these files if plans change."
56
73
 
57
- 3. **That's it!**
58
- You will see a new `.ai/` directory.
59
- - **Edit `.ai/rules.md`** initially to set your stack (e.g., "React, Tailwind").
60
- - **Start coding.** Your AI is now context-aware.
74
+ ## 📂 Generated Structure
61
75
 
62
- ## 📂 File Structure
76
+ When you run the command, your project gets this power-pack:
63
77
 
64
78
  ```text
65
- .
79
+ my-project/
66
80
  ├── .ai/
67
- │ ├── rules.md # The Master Brain. SSOT for all rules.
68
- │ ├── active-context.md # Current focus. "What are we doing now?"
69
- │ └── story.md # Project history. "What have we done?"
70
- ├── .cursorrules # Pointer for Cursor AI
71
- ├── .windsurfrules # Pointer for Windsurf IDE
81
+ │ ├── rules.md # 🧠 The Master Brain (SSOT)
82
+ │ ├── active-context.md # 📝 Current focus & next steps
83
+ │ └── story.md # 📜 Project history & decisions
84
+ ├── .cursorrules # 🔗 Pointer for Cursor
85
+ ├── .windsurfrules # 🔗 Pointer for Windsurf
72
86
  └── .github/
73
- └── copilot-instructions.md # Pointer for GitHub Copilot
87
+ └── copilot-instructions.md # 🔗 Pointer for Copilot
74
88
  ```
75
89
 
76
90
  ## 🤝 Contributing
77
- Contributions are welcome! Please feel free to submit a Pull Request.
91
+ Contributions are welcome! Whether it's a new template or a bug fix.
92
+
93
+ 1. Fork the repo
94
+ 2. Create your branch (`git checkout -b feature/amazing-feature`)
95
+ 3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
96
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
97
+ 5. Open a Pull Request
78
98
 
79
99
  ## 📄 License
80
- ISC
100
+ MIT © [Kadir Esen](https://github.com/kadiresen)
@@ -43,7 +43,13 @@ export async function initCommand(options) {
43
43
  s.message("Copying context files...");
44
44
  try {
45
45
  // List of files/folders to copy
46
- const itemsToCopy = [".ai", ".cursorrules", ".windsurfrules", ".github"];
46
+ const itemsToCopy = [
47
+ ".ai",
48
+ ".cursorrules",
49
+ ".windsurfrules",
50
+ ".github",
51
+ "CONVENTIONS.md",
52
+ ];
47
53
  for (const item of itemsToCopy) {
48
54
  const srcPath = path.join(templateDir, item);
49
55
  const destPath = path.join(targetDir, item);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context-bank",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "A CLI tool to standardise AI context in projects.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,8 @@
1
+ # Aider Conventions
2
+
3
+ You MUST read and follow the comprehensive rules defined in **`.ai/rules.md`**.
4
+ That file is the Single Source of Truth for this project.
5
+
6
+ 1. **Read `.ai/rules.md`** first.
7
+ 2. **Read `.ai/active-context.md`** to understand the current task.
8
+ 3. If you learn a new preference, update **`.ai/rules.md`**.