@hivehub/rulebook 3.1.0 → 3.2.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.
- package/.claude/commands/ralph-config.md +112 -0
- package/.claude/commands/ralph-history.md +110 -0
- package/.claude/commands/ralph-init.md +72 -0
- package/.claude/commands/ralph-pause-resume.md +105 -0
- package/.claude/commands/ralph-run.md +101 -0
- package/.claude/commands/ralph-status.md +76 -0
- package/.claude/commands/rulebook-memory-save.md +48 -0
- package/.claude/commands/rulebook-memory-search.md +47 -0
- package/.claude/commands/rulebook-task-apply.md +67 -0
- package/.claude/commands/rulebook-task-archive.md +70 -0
- package/.claude/commands/rulebook-task-create.md +93 -0
- package/.claude/commands/rulebook-task-list.md +42 -0
- package/.claude/commands/rulebook-task-show.md +52 -0
- package/.claude/commands/rulebook-task-validate.md +53 -0
- package/.claude-plugin/marketplace.json +29 -0
- package/.claude-plugin/plugin.json +8 -0
- package/README.md +1 -0
- package/dist/agents/ralph-parser.d.ts.map +1 -1
- package/dist/agents/ralph-parser.js +5 -28
- package/dist/agents/ralph-parser.js.map +1 -1
- package/dist/cli/commands.d.ts.map +1 -1
- package/dist/cli/commands.js +12 -6
- package/dist/cli/commands.js.map +1 -1
- package/dist/core/generator.d.ts.map +1 -1
- package/dist/core/generator.js +29 -29
- package/dist/core/generator.js.map +1 -1
- package/dist/core/iteration-tracker.d.ts.map +1 -1
- package/dist/core/iteration-tracker.js.map +1 -1
- package/dist/core/prd-generator.d.ts.map +1 -1
- package/dist/core/prd-generator.js.map +1 -1
- package/dist/core/ralph-manager.d.ts.map +1 -1
- package/dist/core/ralph-manager.js +1 -3
- package/dist/core/ralph-manager.js.map +1 -1
- package/dist/core/workflow-generator.js +297 -297
- package/dist/mcp/rulebook-server.d.ts.map +1 -1
- package/dist/mcp/rulebook-server.js +34 -18
- package/dist/mcp/rulebook-server.js.map +1 -1
- package/dist/memory/hnsw-index.d.ts.map +1 -1
- package/dist/memory/hnsw-index.js.map +1 -1
- package/dist/memory/memory-cache.d.ts.map +1 -1
- package/dist/memory/memory-cache.js.map +1 -1
- package/dist/memory/memory-hooks.d.ts.map +1 -1
- package/dist/memory/memory-hooks.js +1 -3
- package/dist/memory/memory-hooks.js.map +1 -1
- package/dist/memory/memory-manager.d.ts.map +1 -1
- package/dist/memory/memory-manager.js +2 -7
- package/dist/memory/memory-manager.js.map +1 -1
- package/dist/memory/memory-search.d.ts.map +1 -1
- package/dist/memory/memory-search.js +3 -8
- package/dist/memory/memory-search.js.map +1 -1
- package/dist/memory/memory-store.d.ts.map +1 -1
- package/dist/memory/memory-store.js +68 -71
- package/dist/memory/memory-store.js.map +1 -1
- package/dist/memory/memory-vectorizer.d.ts.map +1 -1
- package/dist/memory/memory-vectorizer.js +108 -13
- package/dist/memory/memory-vectorizer.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /rulebook-task-apply
|
|
3
|
+
id: rulebook-task-apply
|
|
4
|
+
category: Rulebook
|
|
5
|
+
description: Implement an approved Rulebook task and keep tasks checklist in sync.
|
|
6
|
+
---
|
|
7
|
+
<!-- RULEBOOK:START -->
|
|
8
|
+
**Guardrails**
|
|
9
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
10
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
11
|
+
- Refer to `/rulebook/specs/RULEBOOK.md` for complete task management guidelines.
|
|
12
|
+
- **CRITICAL**: Update `tasks.md` IMMEDIATELY after completing and testing each implementation step.
|
|
13
|
+
|
|
14
|
+
**Steps**
|
|
15
|
+
Track these steps as TODOs and complete them one by one.
|
|
16
|
+
|
|
17
|
+
1. **Read Task Details**:
|
|
18
|
+
```bash
|
|
19
|
+
rulebook task show <task-id>
|
|
20
|
+
```
|
|
21
|
+
Read `proposal.md`, `design.md` (if present), and `tasks.md` to confirm scope and acceptance criteria.
|
|
22
|
+
|
|
23
|
+
2. **Follow Priority Order (MANDATORY)**:
|
|
24
|
+
- **Tests** (HIGHEST PRIORITY) - Write tests first
|
|
25
|
+
- **Coverage Verification** (CRITICAL) - Verify coverage ≥95%
|
|
26
|
+
- **Update Task Status** (MANDATORY) - Mark completed items as `[x]` in `tasks.md`
|
|
27
|
+
- **Next Task** (Only after above steps)
|
|
28
|
+
|
|
29
|
+
3. **Work Through Tasks Sequentially**:
|
|
30
|
+
- Work through `tasks.md` checklist item by item
|
|
31
|
+
- Keep edits minimal and focused on the requested change
|
|
32
|
+
- Follow priority order (most critical first)
|
|
33
|
+
|
|
34
|
+
4. **After Each Implementation Step**:
|
|
35
|
+
- ✅ Implement the feature
|
|
36
|
+
- ✅ Test the implementation
|
|
37
|
+
- ✅ Verify test coverage (run `npm test -- --coverage`)
|
|
38
|
+
- ✅ Update `tasks.md` IMMEDIATELY (mark as `[x]`)
|
|
39
|
+
- ✅ Commit locally (backup)
|
|
40
|
+
- ✅ Only then proceed to next task
|
|
41
|
+
|
|
42
|
+
5. **Update Tasks Checklist**:
|
|
43
|
+
After completing and testing each item:
|
|
44
|
+
```markdown
|
|
45
|
+
## 1. Implementation Phase
|
|
46
|
+
- [x] 1.1 Create task manager module <!-- tested, coverage: 95% -->
|
|
47
|
+
- [x] 1.2 Add validation logic <!-- tested, coverage: 92%, status: complete -->
|
|
48
|
+
- [ ] 1.3 Add archive functionality <!-- next: will start after status update -->
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
6. **Confirm Completion**:
|
|
52
|
+
- Make sure every item in `tasks.md` is finished
|
|
53
|
+
- All tests pass
|
|
54
|
+
- Coverage meets thresholds
|
|
55
|
+
- Documentation updated
|
|
56
|
+
|
|
57
|
+
7. **Update Checklist After All Work**:
|
|
58
|
+
- Mark each completed task as `[x]`
|
|
59
|
+
- Add comments with test status and coverage
|
|
60
|
+
- Reflect reality in the checklist
|
|
61
|
+
|
|
62
|
+
**Reference**
|
|
63
|
+
- Use `rulebook task show <task-id>` when additional context is required
|
|
64
|
+
- Use `rulebook task validate <task-id>` to check format before archiving
|
|
65
|
+
- See `/rulebook/specs/RULEBOOK.md` for complete task management guidelines and priority order
|
|
66
|
+
<!-- RULEBOOK:END -->
|
|
67
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /rulebook-task-archive
|
|
3
|
+
id: rulebook-task-archive
|
|
4
|
+
category: Rulebook
|
|
5
|
+
description: Archive a completed Rulebook task and apply spec deltas to main specifications.
|
|
6
|
+
---
|
|
7
|
+
<!-- RULEBOOK:START -->
|
|
8
|
+
**Guardrails**
|
|
9
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
10
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
11
|
+
- Refer to `/rulebook/specs/RULEBOOK.md` for complete task management guidelines.
|
|
12
|
+
|
|
13
|
+
**Steps**
|
|
14
|
+
1. **Verify Task Completion**:
|
|
15
|
+
- All items in `tasks.md` must be marked as `[x]`
|
|
16
|
+
- All tests must pass
|
|
17
|
+
- Code review complete (if applicable)
|
|
18
|
+
- Documentation updated (README, CHANGELOG, specs)
|
|
19
|
+
|
|
20
|
+
2. **Run Quality Checks**:
|
|
21
|
+
```bash
|
|
22
|
+
npm test
|
|
23
|
+
npm run lint
|
|
24
|
+
npm run type-check
|
|
25
|
+
npm run build
|
|
26
|
+
```
|
|
27
|
+
Ensure all checks pass before archiving.
|
|
28
|
+
|
|
29
|
+
3. **Validate Task Format**:
|
|
30
|
+
```bash
|
|
31
|
+
rulebook task validate <task-id>
|
|
32
|
+
```
|
|
33
|
+
Must pass all format checks.
|
|
34
|
+
|
|
35
|
+
4. **Archive Task**:
|
|
36
|
+
```bash
|
|
37
|
+
rulebook task archive <task-id>
|
|
38
|
+
```
|
|
39
|
+
Or without prompts:
|
|
40
|
+
```bash
|
|
41
|
+
rulebook task archive <task-id> --skip-validation
|
|
42
|
+
```
|
|
43
|
+
(Only use `--skip-validation` if you're certain the task is valid)
|
|
44
|
+
|
|
45
|
+
5. **Archive Process**:
|
|
46
|
+
- Validates task format (unless skipped)
|
|
47
|
+
- Checks task completion status
|
|
48
|
+
- Applies spec deltas to main specifications
|
|
49
|
+
- Moves task to `/rulebook/tasks/archive/YYYY-MM-DD-<task-id>/`
|
|
50
|
+
- Updates related specifications
|
|
51
|
+
|
|
52
|
+
6. **Verify Archive**:
|
|
53
|
+
```bash
|
|
54
|
+
rulebook task list --archived
|
|
55
|
+
```
|
|
56
|
+
Task should appear in archived list.
|
|
57
|
+
|
|
58
|
+
7. **Post-Archive Actions**:
|
|
59
|
+
- Ensure spec deltas are applied to main specifications
|
|
60
|
+
- Update CHANGELOG.md with the change
|
|
61
|
+
- Document any breaking changes
|
|
62
|
+
- Create migration guides (if needed)
|
|
63
|
+
- Unblock related tasks (if any)
|
|
64
|
+
|
|
65
|
+
**Reference**
|
|
66
|
+
- Use `rulebook task list --archived` to see archived tasks
|
|
67
|
+
- Use `rulebook task show <task-id>` to view task details
|
|
68
|
+
- See `/rulebook/specs/RULEBOOK.md` for complete task management guidelines
|
|
69
|
+
<!-- RULEBOOK:END -->
|
|
70
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /rulebook-task-create
|
|
3
|
+
id: rulebook-task-create
|
|
4
|
+
category: Rulebook
|
|
5
|
+
description: Create a new Rulebook task following OpenSpec-compatible format with Context7 MCP validation.
|
|
6
|
+
---
|
|
7
|
+
<!-- RULEBOOK:START -->
|
|
8
|
+
**Guardrails**
|
|
9
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
10
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
11
|
+
- Refer to `/rulebook/specs/RULEBOOK.md` for complete task management guidelines and format requirements.
|
|
12
|
+
- **CRITICAL**: Context7 MCP is REQUIRED for task creation to ensure correct OpenSpec-compatible format.
|
|
13
|
+
- Identify any vague or ambiguous details and ask the necessary follow-up questions before editing files.
|
|
14
|
+
|
|
15
|
+
**Steps**
|
|
16
|
+
1. **Check Context7 MCP (MANDATORY)**: Query Context7 for OpenSpec documentation to get the official format:
|
|
17
|
+
```
|
|
18
|
+
@Context7 /fission-ai/openspec task creation format spec structure
|
|
19
|
+
```
|
|
20
|
+
Review official format requirements: spec delta format, requirement structure, scenario formatting, delta headers (ADDED/MODIFIED/REMOVED/RENAMED).
|
|
21
|
+
|
|
22
|
+
2. **Explore Current State**:
|
|
23
|
+
- Run `rulebook task list` to see existing tasks
|
|
24
|
+
- Review related code or docs (e.g., via `rg`/`ls`) to understand current behavior
|
|
25
|
+
- Note any gaps that require clarification
|
|
26
|
+
|
|
27
|
+
3. **Choose Task ID**: Use verb-led kebab-case (e.g., `add-feature`, `update-api`, `refactor-module`). Must be unique.
|
|
28
|
+
|
|
29
|
+
4. **Create Task Structure**:
|
|
30
|
+
```bash
|
|
31
|
+
rulebook task create <task-id>
|
|
32
|
+
```
|
|
33
|
+
This creates `/rulebook/tasks/<task-id>/` with:
|
|
34
|
+
- `proposal.md` - Why and what changes
|
|
35
|
+
- `tasks.md` - Implementation checklist
|
|
36
|
+
- `specs/` - Directory for spec deltas
|
|
37
|
+
|
|
38
|
+
5. **Write Proposal** (`proposal.md`):
|
|
39
|
+
- **Why**: Minimum 20 characters explaining why this change is needed
|
|
40
|
+
- **What Changes**: Detailed description of what will change
|
|
41
|
+
- **Impact**: Affected specs, code, breaking changes, user benefits
|
|
42
|
+
|
|
43
|
+
6. **Write Tasks Checklist** (`tasks.md`):
|
|
44
|
+
- Organize by phases (Implementation, Testing, Documentation)
|
|
45
|
+
- Use checkbox format: `- [ ] Task description`
|
|
46
|
+
- Include validation steps (tests, coverage checks)
|
|
47
|
+
|
|
48
|
+
7. **Write Spec Delta** (`specs/<module>/spec.md`):
|
|
49
|
+
- Use `## ADDED|MODIFIED|REMOVED|RENAMED Requirements` headers
|
|
50
|
+
- Requirements MUST use `### Requirement: [Name]` with SHALL/MUST keywords
|
|
51
|
+
- Scenarios MUST use `#### Scenario:` (4 hashtags, NOT 3)
|
|
52
|
+
- Scenarios MUST use Given/When/Then structure
|
|
53
|
+
- Example:
|
|
54
|
+
```markdown
|
|
55
|
+
## ADDED Requirements
|
|
56
|
+
|
|
57
|
+
### Requirement: Feature Name
|
|
58
|
+
The system SHALL do something specific and testable.
|
|
59
|
+
|
|
60
|
+
#### Scenario: Scenario Name
|
|
61
|
+
Given some precondition
|
|
62
|
+
When an action occurs
|
|
63
|
+
Then an expected outcome happens
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
8. **Validate Task**:
|
|
67
|
+
```bash
|
|
68
|
+
rulebook task validate <task-id>
|
|
69
|
+
```
|
|
70
|
+
Fix any validation errors before proceeding.
|
|
71
|
+
|
|
72
|
+
9. **Verify Format**:
|
|
73
|
+
- Purpose section: ≥20 characters ✅
|
|
74
|
+
- Requirements: Contain SHALL or MUST ✅
|
|
75
|
+
- Scenarios: Use `#### Scenario:` (4 hashtags) ✅
|
|
76
|
+
- Scenarios: Use Given/When/Then structure ✅
|
|
77
|
+
- Delta headers: Use ADDED/MODIFIED/REMOVED/RENAMED ✅
|
|
78
|
+
|
|
79
|
+
**Reference**
|
|
80
|
+
- See `/rulebook/specs/RULEBOOK.md` for complete task management guidelines
|
|
81
|
+
- Use `rulebook task show <task-id>` to view task details
|
|
82
|
+
- Use `rulebook task list` to see all tasks
|
|
83
|
+
- Search existing requirements with `rg -n "Requirement:|Scenario:" rulebook/tasks` before writing new ones
|
|
84
|
+
- Explore the codebase with `rg <keyword>`, `ls`, or direct file reads so proposals align with current implementation realities
|
|
85
|
+
|
|
86
|
+
**Common Pitfalls to Avoid**
|
|
87
|
+
- ❌ Using 3 hashtags for scenarios (`### Scenario:`) - MUST use 4 (`#### Scenario:`)
|
|
88
|
+
- ❌ Missing SHALL/MUST keywords in requirements
|
|
89
|
+
- ❌ Using bullet points for scenarios instead of Given/When/Then
|
|
90
|
+
- ❌ Purpose section too short (<20 characters)
|
|
91
|
+
- ❌ Wrong delta headers (use ADDED/MODIFIED/REMOVED/RENAMED, not "New Requirements" or "Changes")
|
|
92
|
+
<!-- RULEBOOK:END -->
|
|
93
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /rulebook-task-list
|
|
3
|
+
id: rulebook-task-list
|
|
4
|
+
category: Rulebook
|
|
5
|
+
description: List all Rulebook tasks (active and optionally archived).
|
|
6
|
+
---
|
|
7
|
+
<!-- RULEBOOK:START -->
|
|
8
|
+
**Guardrails**
|
|
9
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
10
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
11
|
+
- Refer to `/rulebook/specs/RULEBOOK.md` for complete task management guidelines.
|
|
12
|
+
|
|
13
|
+
**Steps**
|
|
14
|
+
1. **List Active Tasks**:
|
|
15
|
+
```bash
|
|
16
|
+
rulebook task list
|
|
17
|
+
```
|
|
18
|
+
Shows all active tasks with their status (pending, in-progress, completed, blocked).
|
|
19
|
+
|
|
20
|
+
2. **List Including Archived**:
|
|
21
|
+
```bash
|
|
22
|
+
rulebook task list --archived
|
|
23
|
+
```
|
|
24
|
+
Shows both active and archived tasks.
|
|
25
|
+
|
|
26
|
+
3. **Review Task Status**:
|
|
27
|
+
- **pending**: Task not started
|
|
28
|
+
- **in-progress**: Task being worked on
|
|
29
|
+
- **completed**: Task finished (ready for archive)
|
|
30
|
+
- **blocked**: Task blocked by dependency
|
|
31
|
+
|
|
32
|
+
4. **Select Task to Work On**:
|
|
33
|
+
- Choose task with highest priority
|
|
34
|
+
- Check task status before starting
|
|
35
|
+
- Verify task is not blocked
|
|
36
|
+
|
|
37
|
+
**Reference**
|
|
38
|
+
- Use `rulebook task show <task-id>` to view task details
|
|
39
|
+
- Use `rulebook task validate <task-id>` to check task format
|
|
40
|
+
- See `/rulebook/specs/RULEBOOK.md` for complete task management guidelines
|
|
41
|
+
<!-- RULEBOOK:END -->
|
|
42
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /rulebook-task-show
|
|
3
|
+
id: rulebook-task-show
|
|
4
|
+
category: Rulebook
|
|
5
|
+
description: Show detailed information about a specific Rulebook task.
|
|
6
|
+
---
|
|
7
|
+
<!-- RULEBOOK:START -->
|
|
8
|
+
**Guardrails**
|
|
9
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
10
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
11
|
+
- Refer to `/rulebook/specs/RULEBOOK.md` for complete task management guidelines.
|
|
12
|
+
|
|
13
|
+
**Steps**
|
|
14
|
+
1. **Show Task Details**:
|
|
15
|
+
```bash
|
|
16
|
+
rulebook task show <task-id>
|
|
17
|
+
```
|
|
18
|
+
Displays:
|
|
19
|
+
- Task ID and title
|
|
20
|
+
- Status (pending, in-progress, completed, blocked)
|
|
21
|
+
- Created and updated dates
|
|
22
|
+
- Archive date (if archived)
|
|
23
|
+
- Proposal summary
|
|
24
|
+
- Spec files list
|
|
25
|
+
|
|
26
|
+
2. **Review Proposal**:
|
|
27
|
+
- Read `proposal.md` to understand why and what changes
|
|
28
|
+
- Check impact assessment
|
|
29
|
+
- Verify breaking changes are documented
|
|
30
|
+
|
|
31
|
+
3. **Review Tasks Checklist**:
|
|
32
|
+
- Check `tasks.md` for implementation checklist
|
|
33
|
+
- Identify completed items (`[x]`)
|
|
34
|
+
- Identify pending items (`[ ]`)
|
|
35
|
+
- Follow priority order (most critical first)
|
|
36
|
+
|
|
37
|
+
4. **Review Spec Deltas**:
|
|
38
|
+
- Check `specs/*/spec.md` files
|
|
39
|
+
- Verify format compliance (SHALL/MUST, 4 hashtags for scenarios)
|
|
40
|
+
- Understand requirements and scenarios
|
|
41
|
+
|
|
42
|
+
5. **Check Task Status**:
|
|
43
|
+
- Verify task is not blocked
|
|
44
|
+
- Check if task is ready for implementation
|
|
45
|
+
- Confirm all prerequisites are met
|
|
46
|
+
|
|
47
|
+
**Reference**
|
|
48
|
+
- Use `rulebook task list` to see all tasks
|
|
49
|
+
- Use `rulebook task validate <task-id>` to check task format
|
|
50
|
+
- See `/rulebook/specs/RULEBOOK.md` for complete task management guidelines
|
|
51
|
+
<!-- RULEBOOK:END -->
|
|
52
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /rulebook-task-validate
|
|
3
|
+
id: rulebook-task-validate
|
|
4
|
+
category: Rulebook
|
|
5
|
+
description: Validate Rulebook task format against OpenSpec-compatible requirements.
|
|
6
|
+
---
|
|
7
|
+
<!-- RULEBOOK:START -->
|
|
8
|
+
**Guardrails**
|
|
9
|
+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
|
|
10
|
+
- Keep changes tightly scoped to the requested outcome.
|
|
11
|
+
- Refer to `/rulebook/specs/RULEBOOK.md` for complete task management guidelines and format requirements.
|
|
12
|
+
|
|
13
|
+
**Steps**
|
|
14
|
+
1. **Validate Task Format**:
|
|
15
|
+
```bash
|
|
16
|
+
rulebook task validate <task-id>
|
|
17
|
+
```
|
|
18
|
+
Checks:
|
|
19
|
+
- Purpose section length (≥20 characters)
|
|
20
|
+
- Requirement keywords (SHALL/MUST)
|
|
21
|
+
- Scenario format (4 hashtags, not 3)
|
|
22
|
+
- Given/When/Then structure
|
|
23
|
+
- Delta headers format (ADDED/MODIFIED/REMOVED/RENAMED)
|
|
24
|
+
|
|
25
|
+
2. **Review Validation Results**:
|
|
26
|
+
- **Errors**: Must be fixed before proceeding
|
|
27
|
+
- **Warnings**: Should be addressed but not blocking
|
|
28
|
+
|
|
29
|
+
3. **Fix Format Issues**:
|
|
30
|
+
- **Purpose too short**: Expand "Why" section to ≥20 characters
|
|
31
|
+
- **Missing SHALL/MUST**: Add SHALL or MUST keyword to requirements
|
|
32
|
+
- **Wrong scenario format**: Change `### Scenario:` to `#### Scenario:` (4 hashtags)
|
|
33
|
+
- **Missing Given/When/Then**: Replace bullet points with Given/When/Then structure
|
|
34
|
+
- **Wrong delta headers**: Use ADDED/MODIFIED/REMOVED/RENAMED, not "New Requirements"
|
|
35
|
+
|
|
36
|
+
4. **Re-validate After Fixes**:
|
|
37
|
+
```bash
|
|
38
|
+
rulebook task validate <task-id>
|
|
39
|
+
```
|
|
40
|
+
Ensure all errors are resolved.
|
|
41
|
+
|
|
42
|
+
5. **Common Format Errors**:
|
|
43
|
+
- ❌ `### Scenario:` (3 hashtags) → ✅ `#### Scenario:` (4 hashtags)
|
|
44
|
+
- ❌ "The system provides X" → ✅ "The system SHALL provide X"
|
|
45
|
+
- ❌ `- WHEN user does X THEN Y` → ✅ `Given X\nWhen Y\nThen Z`
|
|
46
|
+
- ❌ `## New Requirements` → ✅ `## ADDED Requirements`
|
|
47
|
+
|
|
48
|
+
**Reference**
|
|
49
|
+
- See `/rulebook/specs/RULEBOOK.md` for complete format requirements
|
|
50
|
+
- Use Context7 MCP to get official OpenSpec format documentation
|
|
51
|
+
- Use `rulebook task show <task-id>` to view task details
|
|
52
|
+
<!-- RULEBOOK:END -->
|
|
53
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hivehub-marketplace",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "HiveLLM Team",
|
|
5
|
+
"email": "support@hivellm.com",
|
|
6
|
+
"url": "https://github.com/hivellm"
|
|
7
|
+
},
|
|
8
|
+
"plugins": [
|
|
9
|
+
{
|
|
10
|
+
"name": "rulebook",
|
|
11
|
+
"source": ".",
|
|
12
|
+
"description": "Standardize AI-generated projects with skills, templates, persistent memory, and quality gates. Supports 28 languages, 17 frameworks, 13 MCP modules, and 20 services.",
|
|
13
|
+
"version": "3.2.0",
|
|
14
|
+
"repository": "https://github.com/hivellm/rulebook",
|
|
15
|
+
"homepage": "https://github.com/hivellm/rulebook#readme",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"ai",
|
|
18
|
+
"automation",
|
|
19
|
+
"templates",
|
|
20
|
+
"standards",
|
|
21
|
+
"skills",
|
|
22
|
+
"mcp",
|
|
23
|
+
"task-management",
|
|
24
|
+
"quality-gates"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rulebook",
|
|
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": "3.2.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "HiveLLM"
|
|
7
|
+
}
|
|
8
|
+
}
|
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@ Large Language Models (LLMs) for software development need **clear directives**
|
|
|
22
22
|
**Rulebook solves this by providing:**
|
|
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
|
+
- 🤖 **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
|
|
25
26
|
- 🧠 **Persistent Memory**: Context that survives across AI sessions with hybrid BM25+HNSW search, zero native dependencies
|
|
26
27
|
- 🎯 **Normalized Deliverables**: Ensures consistent code quality across all AI-generated outputs
|
|
27
28
|
- 🛡️ **Error Reduction**: Catches issues early through automated quality gates and pre-commit/pre-push hooks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ralph-parser.d.ts","sourceRoot":"","sources":["../../src/agents/ralph-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C;;;GAGG;AACH,qBAAa,WAAW;IACtB;;OAEG;IACH,MAAM,CAAC,gBAAgB,CACrB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAChC,eAAe;IA4ClB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;
|
|
1
|
+
{"version":3,"file":"ralph-parser.d.ts","sourceRoot":"","sources":["../../src/agents/ralph-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C;;;GAGG;AACH,qBAAa,WAAW;IACtB;;OAEG;IACH,MAAM,CAAC,gBAAgB,CACrB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAChC,eAAe;IA4ClB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAmCnC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAwB9B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IA4B/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IA4B5B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAa/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAiB9B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAiB/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAenC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IAIzB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAYlC"}
|
|
@@ -50,32 +50,12 @@ export class RalphParser {
|
|
|
50
50
|
const typeCheckPass = this.hasKeyword(lowerOutput, ['type-check', 'typescript', 'tsc']) &&
|
|
51
51
|
!this.hasKeyword(lowerOutput, ['error', 'failed', 'fail']);
|
|
52
52
|
const lintPass = this.hasKeyword(lowerOutput, ['eslint', 'lint']) &&
|
|
53
|
-
!this.hasKeyword(lowerOutput, [
|
|
54
|
-
'error',
|
|
55
|
-
'failed',
|
|
56
|
-
'fail',
|
|
57
|
-
'warning',
|
|
58
|
-
'problems',
|
|
59
|
-
]);
|
|
53
|
+
!this.hasKeyword(lowerOutput, ['error', 'failed', 'fail', 'warning', 'problems']);
|
|
60
54
|
const testsPass = this.hasKeyword(lowerOutput, ['test', 'jest', 'vitest', 'mocha']) &&
|
|
61
|
-
this.hasKeyword(lowerOutput, [
|
|
62
|
-
'pass',
|
|
63
|
-
'passed',
|
|
64
|
-
'✓',
|
|
65
|
-
'all',
|
|
66
|
-
'success',
|
|
67
|
-
'100%',
|
|
68
|
-
]) &&
|
|
55
|
+
this.hasKeyword(lowerOutput, ['pass', 'passed', '✓', 'all', 'success', '100%']) &&
|
|
69
56
|
!this.hasKeyword(lowerOutput, ['failed', 'fail', 'error']);
|
|
70
57
|
const coveragePass = this.hasKeyword(lowerOutput, ['coverage']) &&
|
|
71
|
-
(this.hasKeyword(lowerOutput, [
|
|
72
|
-
'95%',
|
|
73
|
-
'96%',
|
|
74
|
-
'97%',
|
|
75
|
-
'98%',
|
|
76
|
-
'99%',
|
|
77
|
-
'100%',
|
|
78
|
-
]) ||
|
|
58
|
+
(this.hasKeyword(lowerOutput, ['95%', '96%', '97%', '98%', '99%', '100%']) ||
|
|
79
59
|
this.hasPercentageAbove(output, 95));
|
|
80
60
|
return {
|
|
81
61
|
type_check: typeCheckPass,
|
|
@@ -120,9 +100,7 @@ export class RalphParser {
|
|
|
120
100
|
const discoveryMatch = output.match(/(?:discovered|found|realized)[\s:]*([^\n]+)/gi);
|
|
121
101
|
if (discoveryMatch) {
|
|
122
102
|
discoveryMatch.forEach((match) => {
|
|
123
|
-
const cleaned = match
|
|
124
|
-
.replace(/^(?:discovered|found|realized)[\s:]*/i, '')
|
|
125
|
-
.trim();
|
|
103
|
+
const cleaned = match.replace(/^(?:discovered|found|realized)[\s:]*/i, '').trim();
|
|
126
104
|
if (cleaned.length > 10 && cleaned.length < 500) {
|
|
127
105
|
learnings.push(cleaned);
|
|
128
106
|
}
|
|
@@ -166,8 +144,7 @@ export class RalphParser {
|
|
|
166
144
|
if (commitMatch) {
|
|
167
145
|
const hash = commitMatch[0];
|
|
168
146
|
// Verify it looks like a commit hash (after 'commit' keyword)
|
|
169
|
-
if (output.toLowerCase().includes('commit') &&
|
|
170
|
-
output.includes(hash)) {
|
|
147
|
+
if (output.toLowerCase().includes('commit') && output.includes(hash)) {
|
|
171
148
|
return hash;
|
|
172
149
|
}
|
|
173
150
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ralph-parser.js","sourceRoot":"","sources":["../../src/agents/ralph-parser.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,OAAO,WAAW;IACtB;;OAEG;IACH,MAAM,CAAC,gBAAgB,CACrB,WAAmB,EACnB,YAAoB,EACpB,MAAc,EACd,SAAiB,EACjB,IAAiC;QAEjC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE7B,gCAAgC;QAChC,MAAM,aAAa,GAAG,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC;QAE7D,0CAA0C;QAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;QAEnD,+BAA+B;QAC/B,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QACrD,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QAE/C,qCAAqC;QACrC,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAErD,+BAA+B;QAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAE1D,0EAA0E;QAC1E,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,S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,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;YACnC,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;YAClC,OAAO,OAAO,IAAI,SAAS,CAAC;QAC9B,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/cli/commands.ts"],"names":[],"mappings":"AA8DA,wBAAsB,WAAW,CAAC,OAAO,EAAE;IACzC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/cli/commands.ts"],"names":[],"mappings":"AA8DA,wBAAsB,WAAW,CAAC,OAAO,EAAE;IACzC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoWhB;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CA8DrD;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAyCtD;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CA6DtD;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuDzF;AAED,wBAAsB,mBAAmB,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA8CnF;AAED,wBAAsB,c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AC,IAAI,CAAC,CAsDpF;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAqBvD;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAqBxD;AAED,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAgF3D;AAED,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CA2D5D"}
|
package/dist/cli/commands.js
CHANGED
|
@@ -1962,7 +1962,8 @@ export async function memoryStatsCommand() {
|
|
|
1962
1962
|
const sizeMB = (stats.dbSizeBytes / 1024 / 1024).toFixed(2);
|
|
1963
1963
|
const maxMB = (stats.maxSizeBytes / 1024 / 1024).toFixed(0);
|
|
1964
1964
|
const usage = stats.usagePercent.toFixed(1);
|
|
1965
|
-
const bar = '█'.repeat(Math.floor(stats.usagePercent / 5)) +
|
|
1965
|
+
const bar = '█'.repeat(Math.floor(stats.usagePercent / 5)) +
|
|
1966
|
+
'░'.repeat(20 - Math.floor(stats.usagePercent / 5));
|
|
1966
1967
|
console.log(`\n Memories: ${chalk.cyan(stats.memoryCount)}`);
|
|
1967
1968
|
console.log(` Sessions: ${chalk.cyan(stats.sessionCount)}`);
|
|
1968
1969
|
console.log(` DB Size: ${chalk.cyan(sizeMB + ' MB')} / ${maxMB} MB`);
|
|
@@ -2188,7 +2189,11 @@ export async function ralphHistoryCommand(options) {
|
|
|
2188
2189
|
spinner.stop();
|
|
2189
2190
|
console.log(`\n ${chalk.bold('Recent Iterations')} (${history.length})\n`);
|
|
2190
2191
|
for (const iter of history) {
|
|
2191
|
-
const statusIcon = iter.status === 'success'
|
|
2192
|
+
const statusIcon = iter.status === 'success'
|
|
2193
|
+
? chalk.green('✓')
|
|
2194
|
+
: iter.status === 'partial'
|
|
2195
|
+
? chalk.yellow('◐')
|
|
2196
|
+
: chalk.red('✗');
|
|
2192
2197
|
console.log(` ${statusIcon} Iteration ${iter.iteration}: ${iter.task_title}`);
|
|
2193
2198
|
console.log(` Status: ${iter.status} | Duration: ${(iter.duration_ms || 0) / 1000}s`);
|
|
2194
2199
|
console.log(` Checks: type=${iter.quality_checks.type_check ? '✓' : '✗'} lint=${iter.quality_checks.lint ? '✓' : '✗'} tests=${iter.quality_checks.tests ? '✓' : '✗'}`);
|
|
@@ -2258,9 +2263,10 @@ export async function setupClaudeCodePlugin() {
|
|
|
2258
2263
|
const { readFile } = await import('../utils/file-system.js');
|
|
2259
2264
|
const os = await import('os');
|
|
2260
2265
|
const fs = await import('fs/promises');
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
const
|
|
2266
|
+
const url = await import('url');
|
|
2267
|
+
// Get plugin info from .claude-plugin/plugin.json relative to this module
|
|
2268
|
+
const packageDir = path.dirname(url.fileURLToPath(import.meta.url));
|
|
2269
|
+
const pluginJsonPath = path.join(packageDir, '..', '..', '.claude-plugin', 'plugin.json');
|
|
2264
2270
|
const pluginJson = JSON.parse(await readFile(pluginJsonPath));
|
|
2265
2271
|
// Get Claude Code plugins directory
|
|
2266
2272
|
const homeDir = os.homedir();
|
|
@@ -2280,7 +2286,7 @@ export async function setupClaudeCodePlugin() {
|
|
|
2280
2286
|
}
|
|
2281
2287
|
// Add rulebook plugin
|
|
2282
2288
|
const pluginKey = `rulebook@hivehub`;
|
|
2283
|
-
const version = pluginJson.version || '3.
|
|
2289
|
+
const version = pluginJson.version || '3.2.0';
|
|
2284
2290
|
const installPath = path.join(pluginsDir, 'cache', 'hivehub', 'rulebook', version);
|
|
2285
2291
|
if (!installedPlugins.plugins[pluginKey]) {
|
|
2286
2292
|
installedPlugins.plugins[pluginKey] = [];
|