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 +69 -49
- package/dist/commands/init.js +7 -1
- package/package.json +1 -1
- package/templates/CONVENTIONS.md +8 -0
package/README.md
CHANGED
|
@@ -1,80 +1,100 @@
|
|
|
1
1
|
# 🏦 Context Bank
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
> Standardize, persist, and evolve your project's AI context with a single command.
|
|
3
|
+
<div align="center">
|
|
5
4
|
|
|
6
|
-

|
|
6
|
+

|
|
7
|
+

|
|
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
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
43
|
+
That's it! 🚀
|
|
24
44
|
|
|
25
45
|
## ✨ Key Features
|
|
26
46
|
|
|
27
|
-
### 1.
|
|
28
|
-
Instead of static
|
|
29
|
-
|
|
30
|
-
|
|
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.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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.
|
|
40
|
-
|
|
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
|
-
|
|
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
|
-
|
|
48
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
68
|
-
│ ├── active-context.md # Current focus
|
|
69
|
-
│ └── story.md # Project history
|
|
70
|
-
├── .cursorrules # Pointer for Cursor
|
|
71
|
-
├── .windsurfrules # Pointer for Windsurf
|
|
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
|
|
87
|
+
└── copilot-instructions.md # 🔗 Pointer for Copilot
|
|
74
88
|
```
|
|
75
89
|
|
|
76
90
|
## 🤝 Contributing
|
|
77
|
-
Contributions are welcome!
|
|
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
|
-
|
|
100
|
+
MIT © [Kadir Esen](https://github.com/kadiresen)
|
package/dist/commands/init.js
CHANGED
|
@@ -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 = [
|
|
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
|
@@ -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`**.
|