@hivehub/rulebook 5.0.0 → 5.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/.claude-plugin/plugin.json +1 -1
- package/README.md +29 -6
- package/dist/cli/commands.js +2 -2
- package/dist/cli/commands.js.map +1 -1
- package/dist/core/agent-template-engine.d.ts.map +1 -1
- package/dist/core/agent-template-engine.js +12 -0
- package/dist/core/agent-template-engine.js.map +1 -1
- package/dist/core/config-manager.d.ts.map +1 -1
- package/dist/core/config-manager.js +7 -8
- package/dist/core/config-manager.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/rulebook-server.d.ts +16 -0
- package/dist/mcp/rulebook-server.d.ts.map +1 -1
- package/dist/mcp/rulebook-server.js +175 -24
- package/dist/mcp/rulebook-server.js.map +1 -1
- package/dist/memory/hnsw-index.d.ts +3 -0
- package/dist/memory/hnsw-index.d.ts.map +1 -1
- package/dist/memory/hnsw-index.js +12 -0
- package/dist/memory/hnsw-index.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/generic/code-reviewer.md +2 -0
- package/templates/agents/generic/project-manager.md +2 -0
- package/templates/agents/generic/test-engineer.md +1 -0
- package/templates/agents/implementer.md +8 -4
- package/templates/agents/tester.md +7 -4
- package/templates/rules/incremental-implementation.md +56 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rulebook",
|
|
3
3
|
"description": "Standardize AI-generated projects with Ralph autonomous loop, persistent memory, and quality gates. Supports 28 languages, 17 frameworks, 13 MCP modules, and 20 services.",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.1.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "HiveLLM"
|
|
7
7
|
}
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Large Language Models (LLMs) for software development need **clear directives**
|
|
|
23
23
|
|
|
24
24
|
- 📋 **Comprehensive Rule Sets**: Language-specific guidelines (TypeScript, Rust, Python, etc.), framework conventions (NestJS, Django, React), testing standards, linting rules, spell-checking, CI/CD pipelines, Git hooks, and version control best practices
|
|
25
25
|
- 🤖 **Ralph Autonomous Loop**: Multi-iteration AI agent task solving with quality gates (type-check, lint, tests, coverage), iteration tracking, learnings extraction, and graceful pause/resume
|
|
26
|
-
- 🧠 **Persistent Memory**: Context that survives across AI sessions with hybrid BM25+HNSW search,
|
|
26
|
+
- 🧠 **Persistent Memory**: Context that survives across AI sessions with hybrid BM25+HNSW search, native SQLite with WASM fallback
|
|
27
27
|
- 🎯 **Normalized Deliverables**: Ensures consistent code quality across all AI-generated outputs
|
|
28
28
|
- 🛡️ **Error Reduction**: Catches issues early through automated quality gates and pre-commit/pre-push hooks
|
|
29
29
|
- ⚙️ **Process Automation**: Automates repetitive tasks like formatting, testing, and deployment
|
|
@@ -63,6 +63,29 @@ npx @hivehub/rulebook@latest rules project # Project to all tools
|
|
|
63
63
|
|
|
64
64
|
See the full [CHANGELOG](CHANGELOG.md) for details.
|
|
65
65
|
|
|
66
|
+
### v5.1.2 — MCP Per-Session PID Lock
|
|
67
|
+
|
|
68
|
+
Fixed a critical issue where only one VSCode/Claude Code window could use the MCP server at a time. The PID lock now uses **session-scoped files** (`mcp-server.<pid>.pid`) instead of a single global lock, allowing multiple concurrent MCP instances. Stale PID files from dead processes are automatically cleaned on startup, with backward-compatible cleanup of the legacy format.
|
|
69
|
+
|
|
70
|
+
### v5.1.0 — Incremental Implementation & Knowledge Base Integration
|
|
71
|
+
|
|
72
|
+
Born from real-world experience: AI agents that implement everything at once produce cascading errors. This release makes **step-by-step implementation** and **knowledge base usage** mandatory for all agents.
|
|
73
|
+
|
|
74
|
+
**New Tier 1 Rule: `incremental-implementation`**
|
|
75
|
+
- Decompose, implement ONE step, test/verify, repeat
|
|
76
|
+
- **3-attempt restart rule**: if stuck 3 times on the same error, STOP, record anti-pattern, restart from scratch
|
|
77
|
+
- "The line between persistence and stubbornness is thin"
|
|
78
|
+
|
|
79
|
+
**Knowledge Base as Mandatory Workflow**
|
|
80
|
+
- All agents now check `.rulebook/knowledge/` BEFORE implementing
|
|
81
|
+
- All agents record patterns/anti-patterns AFTER completing
|
|
82
|
+
- Code reviewers validate against known patterns and anti-patterns
|
|
83
|
+
- Project managers track KB health and remind agents to record learnings
|
|
84
|
+
|
|
85
|
+
**41 New Memory Store Tests**
|
|
86
|
+
- Comprehensive CRUD, FTS5 search, sessions, persistence, code nodes
|
|
87
|
+
- sql.js fallback validation (for environments without native build tools)
|
|
88
|
+
|
|
66
89
|
### v5.0.0 — Multi-Tool AI Framework
|
|
67
90
|
|
|
68
91
|
The biggest release yet. Rulebook becomes a **tool-agnostic AI development framework** — same quality directives for every AI tool, with graceful degradation.
|
|
@@ -78,8 +101,8 @@ The biggest release yet. Rulebook becomes a **tool-agnostic AI development frame
|
|
|
78
101
|
- Cursor: contextual `.mdc` rules activated by file glob patterns
|
|
79
102
|
- Gemini/Codex: inline conditional sections
|
|
80
103
|
|
|
81
|
-
**
|
|
82
|
-
- No shortcuts/stubs/TODOs, git safety allow-list, no delete without authorization, research-first, sequential editing, no deferred tasks,
|
|
104
|
+
**8 Tier 1 Prohibitions** (auto-installed, universal)
|
|
105
|
+
- No shortcuts/stubs/TODOs, git safety allow-list, no delete without authorization, research-first, sequential editing, no deferred tasks, follow task sequence, **incremental implementation** (step by step, restart if stuck)
|
|
83
106
|
|
|
84
107
|
**Project Complexity Detection**
|
|
85
108
|
- `rulebook assess` — auto-detects LOC, languages, structure
|
|
@@ -183,8 +206,8 @@ Session 2 (new tab, days later):
|
|
|
183
206
|
|
|
184
207
|
| Component | Technology | Purpose |
|
|
185
208
|
|-----------|-----------|---------|
|
|
186
|
-
| **Storage** |
|
|
187
|
-
| **Keyword Search** | BM25 | Fast exact-match scoring |
|
|
209
|
+
| **Storage** | better-sqlite3 (native) with sql.js fallback | Fast native SQLite with WAL journal; falls back to WASM if no build tools |
|
|
210
|
+
| **Keyword Search** | BM25 via FTS5 | Fast exact-match scoring |
|
|
188
211
|
| **Vector Search** | HNSW index | Semantic similarity matching |
|
|
189
212
|
| **Embeddings** | TF-IDF + FNV1a hashing | 256-dim vectors, pure TypeScript, no API calls |
|
|
190
213
|
| **Ranking** | Reciprocal Rank Fusion | Combines BM25 + vector scores |
|
|
@@ -377,7 +400,7 @@ Cross-project operations (search, task listing) are explicit and deliberate.
|
|
|
377
400
|
- Graceful pause/resume capabilities
|
|
378
401
|
- Complete iteration history and metrics
|
|
379
402
|
- 6 CLI commands + 4 MCP tools
|
|
380
|
-
- 🧠 **Persistent Memory**: Context that survives across AI sessions — hybrid BM25+HNSW search, auto-capture,
|
|
403
|
+
- 🧠 **Persistent Memory**: Context that survives across AI sessions — hybrid BM25+HNSW search, auto-capture, native SQLite with WASM fallback
|
|
381
404
|
- 🔍 **Auto-Detection**: Detects languages, frameworks, MCP modules, and services from your project files
|
|
382
405
|
- 📁 **Modular Architecture**: Templates in `/.rulebook/` directory — smaller AGENTS.md, on-demand loading
|
|
383
406
|
- 🔗 **Git Hook Automation**: Pre-commit/pre-push hooks with language-aware quality checks
|
package/dist/cli/commands.js
CHANGED
|
@@ -275,7 +275,7 @@ export async function initCommand(options) {
|
|
|
275
275
|
const { getTemplatesDir } = await import('../core/generator.js');
|
|
276
276
|
const templatesDir = getTemplatesDir();
|
|
277
277
|
// Tier 1 rules — always installed
|
|
278
|
-
const tier1Rules = ['no-shortcuts', 'git-safety', 'sequential-editing', 'research-first', 'follow-task-sequence'];
|
|
278
|
+
const tier1Rules = ['no-shortcuts', 'git-safety', 'sequential-editing', 'research-first', 'follow-task-sequence', 'incremental-implementation'];
|
|
279
279
|
// Tier 2 rules — installed for medium+ complexity
|
|
280
280
|
const tier2Rules = ['task-decomposition', 'incremental-tests', 'no-deferred', 'session-workflow'];
|
|
281
281
|
const rulesToInstall = [...tier1Rules];
|
|
@@ -1640,7 +1640,7 @@ async function updateSingleProject(cwd, options) {
|
|
|
1640
1640
|
const { getTemplatesDir } = await import('../core/generator.js');
|
|
1641
1641
|
const complexity = assessComplexity(cwd);
|
|
1642
1642
|
const templatesDir = getTemplatesDir();
|
|
1643
|
-
const tier1 = ['no-shortcuts', 'git-safety', 'sequential-editing', 'research-first', 'follow-task-sequence'];
|
|
1643
|
+
const tier1 = ['no-shortcuts', 'git-safety', 'sequential-editing', 'research-first', 'follow-task-sequence', 'incremental-implementation'];
|
|
1644
1644
|
const tier2 = ['task-decomposition', 'incremental-tests', 'no-deferred', 'session-workflow'];
|
|
1645
1645
|
const toInstall = [...tier1];
|
|
1646
1646
|
if (complexity.recommendations.tier2Rules) {
|