@govindchaudhary/vibekit 0.1.1 → 0.1.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,7 +1,272 @@
1
- [![npm version](https://img.shields.io/npm/v/@govindchaudhary/vibekit.svg)](https://www.npmjs.com/package/@govindchaudhary/vibekit)
2
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
1
+ <div align="center">
2
+
3
+ <h1>⚡ Vibekit</h1>
4
+
5
+ <p><strong>Maximum AI accuracy. Minimum tokens. Built-in security.</strong><br/>
6
+ The context layer for vibe coders who ship fast and stay grounded.</p>
7
+
8
+ [![npm version](https://img.shields.io/npm/v/@govindchaudhary%2Fvibekit.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/@govindchaudhary/vibekit)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](./LICENSE)
10
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen?style=flat-square)](https://nodejs.org)
11
+
12
+ </div>
13
+
14
+ ---
15
+
16
+ ## What is Vibekit?
17
+
18
+ Vibe coding — letting an AI assistant drive most of the code while you steer — is fast. But it has a reliability problem: **every new chat session starts blind**. The AI guesses your stack, re-debates decisions you already made, misses your conventions, and ignores your security requirements. The result is inconsistent code, security gaps, and wasted tokens re-explaining context that should be permanent.
19
+
20
+ **Vibekit solves this with 3 persistent markdown files** that any AI tool reads automatically — no per-feature specs, no token-heavy frameworks, no setup ceremony. Your AI assistant always knows your stack, your conventions, your active principles, and your recent changes. It stays grounded even as you move fast.
21
+
22
+ > **Motto:** *vibe fast, stay grounded.*
23
+ > The built-in `Verify-before-trust` rule keeps your AI treating changelog notes as hints and the actual code as ground truth — so it never confidently hallucinates based on stale notes.
24
+
25
+ ---
26
+
27
+ ## Why Vibekit?
28
+
29
+ | Problem with raw vibe coding | How Vibekit fixes it |
30
+ |---|---|
31
+ | AI re-asks about your stack every session | `AGENTS.md` answers it once, permanently |
32
+ | AI re-debates decisions you already made | `DECISIONS.md` records them — never re-litigated |
33
+ | AI misses recent changes and introduces regressions | `CHANGELOG.md` keeps last N changes visible |
34
+ | AI skips security concerns in fast-paced work | `security` pack injects OWASP principles into every session |
35
+ | Token costs grow as you paste context repeatedly | One small file — loaded once, covers everything |
36
+ | Context differs between Copilot, Claude, Cursor, Windsurf | Single `AGENTS.md` — all tools read it natively |
37
+
38
+ ---
39
+
40
+ ## Quickstart — under 2 minutes
41
+
42
+ ```bash
43
+ npx @govindchaudhary/vibekit init
44
+ ```
45
+
46
+ Answer **one question** ("What's this project mostly?") and Vibekit creates four files in your current directory:
47
+
48
+ | File | Purpose | Read by AI? |
49
+ |---|---|---|
50
+ | `AGENTS.md` | Stack, conventions, active principle packs | ✅ Yes — automatically |
51
+ | `CHANGELOG.md` | Rolling log of recent changes | ✅ Yes — automatically |
52
+ | `DECISIONS.md` | Architecture decisions not to re-debate | ✅ Yes — automatically |
53
+ | `principles-catalog.md` | Human menu of available packs | ❌ No — docs only |
54
+
55
+ Then fill in the `Project Stack` and `Conventions` sections of `AGENTS.md` once. That's it. Every AI session from that point forward has full, accurate context.
56
+
57
+ ---
58
+
59
+ ## Achieving near-100% AI accuracy
60
+
61
+ Accuracy degrades when the AI works from incomplete or stale context. Vibekit eliminates the three root causes:
62
+
63
+ ### 1. Stable context — `AGENTS.md`
64
+ The single file your AI reads every session. It contains:
65
+ - Your **project stack** (languages, frameworks, key libraries)
66
+ - Your **conventions** (naming, indentation, testing approach — specific and verifiable)
67
+ - Your **active principle packs** (coding rules injected directly into the AI's working context)
68
+ - The **Verify-before-trust** safeguard, which instructs the AI to check actual code before trusting any note
69
+
70
+ **Rule:** keep this file accurate. Wrong context is worse than no context.
71
+
72
+ ### 2. Rolling changelog — `CHANGELOG.md`
73
+ Every time you make a meaningful change, log it:
74
+ ```bash
75
+ vibekit log "Replaced JWT with session cookies — auth.ts, middleware/session.ts"
76
+ ```
77
+ The AI sees recent history without you re-explaining it. Entries older than 5 resolved `[DONE]` items are pruned automatically so the file stays lean.
78
+
79
+ ### 3. Decision log — `DECISIONS.md`
80
+ When you make an architecture call, write it down:
81
+ ```markdown
82
+ ### 2026-06-28 — Use Prisma over raw SQL
83
+ Chose Prisma for type-safe queries and migration management.
84
+ Revisit only if query performance becomes a bottleneck.
85
+ ```
86
+ The AI will never propose switching back to raw SQL, never suggest a library you already evaluated and rejected.
87
+
88
+ ### The Verify-before-trust rule
89
+ Baked into every `AGENTS.md` Vibekit creates:
90
+
91
+ > *Treat CHANGELOG.md and DECISIONS.md as hints, not ground truth. Before relying on an entry, confirm the referenced file/function still matches what's described. If it doesn't, the current code is the source of truth — not the note.*
92
+
93
+ This one rule prevents the most common AI hallucination pattern: confidently reasoning from an outdated note.
94
+
95
+ ---
96
+
97
+ ## Token efficiency
98
+
99
+ | Approach | Tokens per session | Accuracy |
100
+ |---|---|---|
101
+ | Paste full spec + plan + tasks per feature | ~4,000–15,000 | Variable — AI reasons from bloated docs |
102
+ | Vibekit (3 files, kept lean) | ~500–1,500 | High — focused, current, verifiable context |
103
+ | No context at all | ~0 | Low — AI guesses |
104
+
105
+ Vibekit's files are deliberately size-constrained:
106
+ - `AGENTS.md` — one concise file, never grows unbounded
107
+ - `CHANGELOG.md` — capped at ~10 active entries; `vibekit prune` keeps it lean
108
+ - `DECISIONS.md` — architecture decisions only, not routine changes
109
+
110
+ ---
111
+
112
+ ## Built-in security for vibe-coded apps
113
+
114
+ Vibe coding's biggest risk is shipping insecure code fast. The **`security` pack** injects OWASP-aligned principles directly into `AGENTS.md` so the AI applies them automatically — without you having to remind it every session.
115
+
116
+ ```bash
117
+ vibekit packs add security
118
+ ```
119
+
120
+ Active principles injected into every AI session:
121
+
122
+ | Principle | What it prevents |
123
+ |---|---|
124
+ | Never trust user input — validate at every boundary | Injection attacks, unexpected state |
125
+ | No secrets in code — use env vars; never commit `.env` | Credential leaks in version control |
126
+ | Auth vs authZ are separate concerns | Broken access control (OWASP #1) |
127
+ | Parameterized queries only | SQL injection |
128
+ | Least privilege for services/tokens/roles | Blast radius reduction on breach |
129
+ | Assume breach — log anomalies, never log PII/secrets | Sensitive data exposure in logs |
130
+ | Server-side validation is security; client-side is UX | Client-side bypass attacks |
131
+
132
+ Once the `security` pack is active, your AI assistant applies these rules automatically when writing auth flows, API handlers, database queries, and any user-facing code.
133
+
134
+ ---
135
+
136
+ ## Principle packs
137
+
138
+ Packs are reusable blocks of coding principles that live inside `AGENTS.md` between start/end markers. The AI reads them every session. Add only the packs relevant to your project — fewer packs = fewer tokens.
139
+
140
+ ### Built-in packs
141
+
142
+ | Pack | Best for | Key principles |
143
+ |---|---|---|
144
+ | `core` | Every project *(always included)* | SRP, DRY, KISS, fail fast |
145
+ | `dev` | Application / backend development | SOLID (Open/Closed, LSP, ISP, DIP) |
146
+ | `data-eng` | Pipelines, ETL/ELT, analytics | Idempotency, schema validation, ETL separation, immutability |
147
+ | `security` | Any project with auth, APIs, or user data | OWASP principles, no secrets in code, parameterized queries |
148
+
149
+ ### Managing packs
150
+
151
+ ```bash
152
+ # Add a pack
153
+ vibekit packs add security
154
+ vibekit packs add data-eng
155
+
156
+ # Remove a pack you no longer need
157
+ vibekit packs remove dev
158
+ ```
159
+
160
+ ### Creating a custom pack
161
+
162
+ 1. Create `packs/<name>.md` with your principles inside start/end markers:
163
+
164
+ ```markdown
165
+ <!-- pack:observability:start -->
166
+ ### Observability Principles
167
+ - Log at system boundaries, not inside loops
168
+ - Every external call needs a timeout and a logged failure path
169
+ - Structured logs only — no free-text log messages in production
170
+ <!-- pack:observability:end -->
171
+ ```
172
+
173
+ 2. Activate it:
174
+ ```bash
175
+ vibekit packs add observability
176
+ ```
177
+
178
+ See [`principles-catalog.md`](./principles-catalog.md) for the full pack menu and descriptions.
179
+
180
+ ---
181
+
182
+ ## CLI reference
183
+
184
+ | Command | What it does |
185
+ |---|---|
186
+ | `vibekit init` | Scaffold `AGENTS.md`, `CHANGELOG.md`, `DECISIONS.md`, `principles-catalog.md` in one step. |
187
+ | `vibekit log "<message>"` | Append a dated entry to `CHANGELOG.md` (newest on top, ISO date). |
188
+ | `vibekit prune` | Remove `[DONE]` changelog entries, keeping the 5 most recent resolved ones. |
189
+ | `vibekit packs add <name>` | Insert a pack block into `AGENTS.md` and update the active packs line. |
190
+ | `vibekit packs remove <name>` | Remove a pack block from `AGENTS.md`. |
191
+ | `vibekit sync` | Mirror `AGENTS.md` → `CLAUDE.md`, `.windsurfrules`, `.github/copilot-instructions.md`. |
192
+
193
+ > **About `vibekit sync`:** Most modern tools (GitHub Copilot, Cursor, Windsurf) now read `AGENTS.md` natively. `sync` is a fallback for tools or older setups that use their own native filenames, or for teams who want all native filenames present simultaneously.
194
+
195
+ ---
196
+
197
+ ## Two ways to adopt Vibekit
198
+
199
+ **(a) GitHub Template — zero install, new projects**
200
+
201
+ Click **"Use this template"** at the top of this repo to clone the full Vibekit structure into a brand-new repository. Then fill in your `AGENTS.md` stack and conventions.
202
+
203
+ **(b) npx CLI — add to an existing project**
204
+
205
+ ```bash
206
+ cd your-existing-project
207
+ npx @govindchaudhary/vibekit init
208
+ ```
209
+
210
+ Drops the 4 files into any existing repo without touching your code.
211
+
212
+ ---
213
+
214
+ ## Vibekit vs. alternatives
215
+
216
+ | | Vibekit | SDD tools (Spec-Kit, BMAD) | No context |
217
+ |---|---|---|---|
218
+ | Setup time | < 2 minutes | 15–60 minutes | 0 (but accuracy suffers) |
219
+ | Files per feature | 0 — 3 persistent files total | 3+ per feature (spec, plan, tasks) | 0 |
220
+ | Token overhead per session | Low (~500–1,500) | High (4,000–15,000+) | Zero |
221
+ | Security guidance | ✅ Built-in pack | ❌ Not included | ❌ |
222
+ | Keeps AI grounded | ✅ Verify-before-trust rule | Varies | ❌ |
223
+ | Best for | Solo devs, small teams, vibe coders | Large teams needing auditable specs | Throwaway scripts |
224
+
225
+ ---
226
+
227
+ ## Recommended workflow
228
+
229
+ ```bash
230
+ # Day 1 — initialize
231
+ npx @govindchaudhary/vibekit init
232
+ # → fill in AGENTS.md: Project Stack + Conventions sections
233
+
234
+ # Add security if your project has auth/APIs/user data
235
+ vibekit packs add security
236
+
237
+ # During development — log every meaningful change
238
+ vibekit log "Added rate limiting to /api/auth — middleware/rateLimit.ts"
239
+ vibekit log "Switched from JWT to httpOnly session cookies — security decision"
240
+
241
+ # When a change is complete, mark it done
242
+ # Edit CHANGELOG.md: add [DONE] to the entry
243
+
244
+ # Periodically keep the changelog lean
245
+ vibekit prune
246
+
247
+ # If you use Claude, Cursor, or Windsurf with their native filenames
248
+ vibekit sync
249
+ ```
250
+
251
+ ---
252
+
253
+ ## Contributing
254
+
255
+ Contributions are welcome — especially new principle packs. To add a pack:
256
+
257
+ 1. Fork the repo and create a branch.
258
+ 2. Add `packs/<name>.md` with your principles inside `<!-- pack:<name>:start/end -->` markers.
259
+ 3. Update [`principles-catalog.md`](./principles-catalog.md) with a description.
260
+ 4. Open a PR with a short explanation of who the pack is for and why the principles matter.
261
+
262
+ Please keep pack principles **specific, verifiable, and actionable** — not vague advice like "write clean code".
263
+
264
+ ---
265
+
266
+ ## License
267
+
268
+ [MIT](./LICENSE) © 2026 Vibekit contributors
3
269
 
4
- # Vibekit
5
270
 
6
271
  **Vibe code without losing the plot.** Vibekit keeps fast, AI-driven "vibe
7
272
  coding" accurate by giving your assistant lean, *verifiable* context — a
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ program
13
13
  .description('Lean, AI-tool-agnostic project context: 3 persistent markdown files ' +
14
14
  '(AGENTS.md, CHANGELOG.md, DECISIONS.md) that keep vibe coding accurate, ' +
15
15
  'instead of heavyweight SDD specs.')
16
- .version('0.1.1');
16
+ .version('0.1.2');
17
17
  program
18
18
  .command('init')
19
19
  .description('Scaffold AGENTS.md, CHANGELOG.md, DECISIONS.md, and principles-catalog.md in the current directory.')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@govindchaudhary/vibekit",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Make vibe coding accurate: 3 persistent markdown files (AGENTS.md, CHANGELOG.md, DECISIONS.md) that give any AI coding assistant lean, verifiable context — a lightweight alternative to heavyweight Spec-Driven Development.",
5
5
  "keywords": [
6
6
  "vibe-coding",
@@ -0,0 +1,10 @@
1
+ <!-- pack:security:start -->
2
+ ### Security Principles
3
+ - Never trust user input: validate and sanitize at every boundary — client, API, and database layer
4
+ - No secrets in code: use environment variables for credentials, keys, and tokens; never commit `.env` files
5
+ - Auth vs authZ: authentication (who you are) and authorization (what you can do) are separate concerns — implement both
6
+ - Parameterized queries only: never concatenate user input into SQL or shell commands — use prepared statements or an ORM
7
+ - Least privilege: services, API tokens, and DB roles get only the minimum access they need, nothing more
8
+ - Assume breach: log enough to detect and audit anomalies, but never log passwords, tokens, PII, or secrets
9
+ - Validate on the server: client-side validation is UX; server-side validation is security — never rely on only one
10
+ <!-- pack:security:end -->
@@ -49,6 +49,18 @@ For general application/software development.
49
49
  - **Interface Segregation** — small focused interfaces beat one large general-purpose one
50
50
  - **Dependency Inversion** — depend on abstractions, not concrete implementations
51
51
 
52
+ ### `security` — Security Principles
53
+
54
+ For any project handling user input, auth, APIs, or stored data — especially relevant for fast vibe-coded apps.
55
+
56
+ - **Never trust user input** — validate and sanitize at every boundary: client, API, and database layer
57
+ - **No secrets in code** — use environment variables; never commit `.env` files
58
+ - **Auth vs authZ** — authentication (who you are) and authorization (what you can do) are separate concerns
59
+ - **Parameterized queries only** — never concatenate user input into SQL or shell commands
60
+ - **Least privilege** — services, tokens, and DB roles get only the minimum access they need
61
+ - **Assume breach** — log enough to detect anomalies, but never log passwords, tokens, PII, or secrets
62
+ - **Validate on the server** — client-side validation is UX; server-side is security; never rely on only one
63
+
52
64
  ### `data-eng` — Data Engineering Principles
53
65
 
54
66
  For pipelines, ETL/ELT, and analytics engineering.
@@ -63,21 +75,21 @@ For pipelines, ETL/ELT, and analytics engineering.
63
75
 
64
76
  ## Adding your own custom pack
65
77
 
66
- 1. Create a new file in `packs/`, e.g. `packs/security.md`.
78
+ 1. Create a new file in `packs/`, e.g. `packs/observability.md`.
67
79
  2. Wrap its content in start/end markers matching the file name:
68
80
 
69
81
  ```markdown
70
- <!-- pack:security:start -->
71
- ### Security Principles
72
- - Least privilege: grant the minimum access required
73
- - Never trust client input: validate and sanitize at every boundary
74
- <!-- pack:security:end -->
82
+ <!-- pack:observability:start -->
83
+ ### Observability Principles
84
+ - Log at boundaries, not inside loops
85
+ - Every external call should have a timeout and a logged failure path
86
+ <!-- pack:observability:end -->
75
87
  ```
76
88
 
77
89
  3. Activate it:
78
90
 
79
91
  ```bash
80
- vibekit packs add security
92
+ vibekit packs add observability
81
93
  ```
82
94
 
83
- The marker name (`security`) must match the file name (`security.md`).
95
+ The marker name (`observability`) must match the file name (`observability.md`).