@hivehub/rulebook 5.3.3 → 5.4.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.
Files changed (74) hide show
  1. package/README.md +393 -354
  2. package/dist/cli/commands/compress.d.ts +18 -0
  3. package/dist/cli/commands/compress.d.ts.map +1 -0
  4. package/dist/cli/commands/compress.js +100 -0
  5. package/dist/cli/commands/compress.js.map +1 -0
  6. package/dist/cli/commands/index.d.ts +1 -0
  7. package/dist/cli/commands/index.d.ts.map +1 -1
  8. package/dist/cli/commands/index.js +1 -0
  9. package/dist/cli/commands/index.js.map +1 -1
  10. package/dist/cli/commands/init.d.ts.map +1 -1
  11. package/dist/cli/commands/init.js +2 -0
  12. package/dist/cli/commands/init.js.map +1 -1
  13. package/dist/cli/commands/update.d.ts.map +1 -1
  14. package/dist/cli/commands/update.js +2 -0
  15. package/dist/cli/commands/update.js.map +1 -1
  16. package/dist/core/claude-settings-manager.d.ts +7 -0
  17. package/dist/core/claude-settings-manager.d.ts.map +1 -1
  18. package/dist/core/claude-settings-manager.js +31 -14
  19. package/dist/core/claude-settings-manager.js.map +1 -1
  20. package/dist/core/compress/compressor.d.ts +60 -0
  21. package/dist/core/compress/compressor.d.ts.map +1 -0
  22. package/dist/core/compress/compressor.js +232 -0
  23. package/dist/core/compress/compressor.js.map +1 -0
  24. package/dist/core/compress/discover.d.ts +19 -0
  25. package/dist/core/compress/discover.d.ts.map +1 -0
  26. package/dist/core/compress/discover.js +100 -0
  27. package/dist/core/compress/discover.js.map +1 -0
  28. package/dist/core/compress/validator.d.ts +47 -0
  29. package/dist/core/compress/validator.d.ts.map +1 -0
  30. package/dist/core/compress/validator.js +131 -0
  31. package/dist/core/compress/validator.js.map +1 -0
  32. package/dist/core/doctor.d.ts.map +1 -1
  33. package/dist/core/doctor.js +66 -0
  34. package/dist/core/doctor.js.map +1 -1
  35. package/dist/core/generator.d.ts +16 -0
  36. package/dist/core/generator.d.ts.map +1 -1
  37. package/dist/core/generator.js +36 -11
  38. package/dist/core/generator.js.map +1 -1
  39. package/dist/hooks/safe-flag-io.d.ts +77 -0
  40. package/dist/hooks/safe-flag-io.d.ts.map +1 -0
  41. package/dist/hooks/safe-flag-io.js +169 -0
  42. package/dist/hooks/safe-flag-io.js.map +1 -0
  43. package/dist/hooks/terse-activate.d.ts +59 -0
  44. package/dist/hooks/terse-activate.d.ts.map +1 -0
  45. package/dist/hooks/terse-activate.js +149 -0
  46. package/dist/hooks/terse-activate.js.map +1 -0
  47. package/dist/hooks/terse-config.d.ts +51 -0
  48. package/dist/hooks/terse-config.d.ts.map +1 -0
  49. package/dist/hooks/terse-config.js +130 -0
  50. package/dist/hooks/terse-config.js.map +1 -0
  51. package/dist/hooks/terse-mode-tracker.d.ts +78 -0
  52. package/dist/hooks/terse-mode-tracker.d.ts.map +1 -0
  53. package/dist/hooks/terse-mode-tracker.js +213 -0
  54. package/dist/hooks/terse-mode-tracker.js.map +1 -0
  55. package/dist/index.js +11 -1
  56. package/dist/index.js.map +1 -1
  57. package/dist/mcp/rulebook-server.d.ts.map +1 -1
  58. package/dist/mcp/rulebook-server.js +236 -0
  59. package/dist/mcp/rulebook-server.js.map +1 -1
  60. package/dist/types.d.ts +4 -0
  61. package/dist/types.d.ts.map +1 -1
  62. package/package.json +2 -1
  63. package/templates/hooks/terse-activate.ps1 +143 -0
  64. package/templates/hooks/terse-activate.sh +197 -0
  65. package/templates/hooks/terse-mode-tracker.ps1 +153 -0
  66. package/templates/hooks/terse-mode-tracker.sh +187 -0
  67. package/templates/modules/RULEBOOK_MCP.md +52 -0
  68. package/templates/skills/core/rulebook-terse/SKILL.md +116 -0
  69. package/templates/skills/core/rulebook-terse-commit/SKILL.md +96 -0
  70. package/templates/skills/core/rulebook-terse-review/SKILL.md +112 -0
  71. package/dist/cli/commands.d.ts +0 -225
  72. package/dist/cli/commands.d.ts.map +0 -1
  73. package/dist/cli/commands.js +0 -3984
  74. package/dist/cli/commands.js.map +0 -1
@@ -145,6 +145,58 @@ The MCP server integrates seamlessly with:
145
145
 
146
146
  All task operations are available through MCP functions, eliminating the need for terminal command execution.
147
147
 
148
+ ## Compression tools (v5.4.0)
149
+
150
+ ### rulebook_compress
151
+
152
+ Compress a markdown memory file in place, preserving code blocks,
153
+ URLs, file paths, dates, and version numbers byte-for-byte. Writes a
154
+ backup to `<file>.original.md` before overwriting. Returns before/after
155
+ byte counts, compression percentage, retry count, and backup path.
156
+
157
+ ```
158
+ rulebook_compress({
159
+ filePath: "CLAUDE.md", // or absolute path
160
+ dryRun: false // when true, returns stats without writing
161
+ })
162
+ ```
163
+
164
+ Rejects the result if the prose rewriter breaks any invariant (heading
165
+ text/level, fenced-code content, inline code, URL, path, date, version).
166
+ `success: false` is returned with the first 10 violations.
167
+
168
+ ### rulebook_compress_list
169
+
170
+ List candidate markdown memory files in the project:
171
+ `CLAUDE.md`, `CLAUDE.local.md`, `AGENTS.md`, `AGENTS.override.md`,
172
+ `.rulebook/PLANS.md`, `.rulebook/STATE.md`, and every `.md` under
173
+ `.rulebook/knowledge/` and `.rulebook/learnings/`. Excludes
174
+ `*.original.md` backups. Reports current size, whether a backup exists,
175
+ and the backup's size + ratio when present. Results sorted by size
176
+ descending so the biggest-win targets surface first.
177
+
178
+ ## Evaluation tools (v5.4.0)
179
+
180
+ ### rulebook_evals_measure
181
+
182
+ Offline three-arm measurement (`baseline` / `terse` / `rulebook-terse`)
183
+ against the committed snapshot under `evals/snapshots/`. Uses tiktoken
184
+ when installed, UTF-8 byte counts as fallback. No API key required.
185
+
186
+ ```
187
+ rulebook_evals_measure({})
188
+ // → { report: { tokenMode, prompts: [...], totals: {...}, pass: bool, threshold } }
189
+ ```
190
+
191
+ Honest delta reported: `rulebook-terse` vs `terse` control.
192
+
193
+ ### rulebook_evals_run
194
+
195
+ Regenerate snapshots against the live Anthropic API. Requires
196
+ `ANTHROPIC_API_KEY` + the optional `@anthropic-ai/sdk` npm package.
197
+ Spawns `evals/llm_run.ts` as a subprocess. Expensive — run only when
198
+ SKILL.md or prompt set changes.
199
+
148
200
  ## Documentation
149
201
 
150
202
  For complete API documentation, see:
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: "Rulebook Terse"
3
+ description: "Output-verbosity compression. Cuts response tokens ~40-70% without losing technical accuracy. Four intensity levels (off/brief/terse/ultra) aligned with Rulebook's agent-tier system. Use when user says 'terse mode', 'be terse', 'less tokens please', or invokes /rulebook-terse. Auto-activates via SessionStart hook with tier-aware default."
4
+ version: "1.0.0"
5
+ category: "core"
6
+ author: "Rulebook"
7
+ tags: ["core", "output", "tokens", "compression"]
8
+ dependencies: []
9
+ conflicts: []
10
+ ---
11
+ <!-- RULEBOOK_TERSE:START -->
12
+ # Rulebook Terse — Output Compression
13
+
14
+ Respond tersely. All technical substance stays. Only fluff dies.
15
+
16
+ ## Persistence
17
+
18
+ ACTIVE EVERY RESPONSE once set. No revert after many turns. No filler drift. Still active if unsure.
19
+
20
+ Off only via: `/rulebook-terse off` · "normal mode" · "stop terse" · session end.
21
+
22
+ Default intensity resolves from: `RULEBOOK_TERSE_MODE` env → `.rulebook/rulebook.json` `terse.defaultMode` → active agent tier → `terse`.
23
+
24
+ ## Rules
25
+
26
+ **Drop**:
27
+ - Articles (`a`, `an`, `the`) — level-dependent, see intensity table
28
+ - Filler (`just`, `really`, `basically`, `actually`, `simply`, `essentially`)
29
+ - Pleasantries (`sure`, `certainly`, `of course`, `happy to`, `great question`, `I'd recommend`)
30
+ - Hedging (`it might be worth`, `you could consider`, `perhaps`, `I think`)
31
+ - Preamble + restating the question
32
+
33
+ **Keep exact**:
34
+ - Technical terms (library names, API names, protocols, algorithms)
35
+ - Code blocks (fenced and inline) — byte-for-byte pass-through
36
+ - File paths (`/src/foo.ts`, `./config.yaml`, `E:\project\file`)
37
+ - URLs + links
38
+ - Commands (`npm test`, `git commit`)
39
+ - Error messages (quoted)
40
+ - Version numbers + dates
41
+ - Proper nouns
42
+
43
+ **Pattern**:
44
+
45
+ ```
46
+ [thing] [action] [reason]. [next step].
47
+ ```
48
+
49
+ **Example**:
50
+
51
+ ❌ "Sure! I'd be happy to help. The issue you're experiencing is most likely caused by the authentication middleware not properly validating token expiry. Let me take a look."
52
+
53
+ ✅ "Bug in auth middleware. Token expiry check uses `<` not `<=`. Fix:"
54
+
55
+ ## Intensity
56
+
57
+ | Level | What changes |
58
+ |-------|-------------|
59
+ | **off** | No compression. Full prose. Full reasoning welcome. Default for Core tier (opus). |
60
+ | **brief** | Drop filler + hedging + pleasantries. Keep articles + full sentences. Default for Standard tier (sonnet). |
61
+ | **terse** | Drop articles. Fragments OK. Short synonyms (`fix` not "implement a solution for", `big` not "extensive"). Default for Research tier (haiku). |
62
+ | **ultra** | Abbreviate (DB/auth/config/req/res/fn/impl). Strip conjunctions. Arrows for causality (`X → Y`). One word when one word suffices. |
63
+
64
+ ### Example — "Why does my React component re-render?"
65
+
66
+ - **off**: "Your component re-renders because you're creating a new object reference on every render. When you pass an inline object as a prop, React's shallow comparison sees it as a different object each time. Wrap it in `useMemo` to stabilize the reference."
67
+ - **brief**: "Component re-renders because you create a new object reference each render. Inline object prop fails shallow comparison. Wrap it in `useMemo`."
68
+ - **terse**: "New object ref each render. Inline object prop = new ref = re-render. Wrap in `useMemo`."
69
+ - **ultra**: "Inline obj prop → new ref → re-render. `useMemo`."
70
+
71
+ ### Example — "Explain database connection pooling."
72
+
73
+ - **off**: "Connection pooling reuses a set of pre-opened database connections instead of creating a new connection for each request. This avoids the overhead of establishing a new TCP handshake and authenticating every time."
74
+ - **brief**: "Connection pooling reuses open connections instead of creating new ones per request. Avoids repeated handshake + auth overhead."
75
+ - **terse**: "Pool reuses open DB connections. No new connection per request. Skip handshake overhead."
76
+ - **ultra**: "Pool = reuse DB conn. Skip handshake → fast under load."
77
+
78
+ ## Auto-Clarity (mandatory escape hatch)
79
+
80
+ Compression is suspended — for the affected turn only — when ANY of the following applies. Full prose is restored. Compression resumes on the next turn.
81
+
82
+ 1. **Security warnings** — CVE-class findings, credential exposure, permission-elevation warnings.
83
+ 2. **Destructive-op confirmations** — `rm -rf`, `git reset --hard`, `DROP TABLE`, `rulebook_task_delete`, irreversible file deletion.
84
+ 3. **Quality-gate failures** — type-check errors, lint failures, failing tests, coverage below threshold, hook-emitted deny messages from `enforce-no-deferred` / `enforce-no-shortcuts` / `enforce-mcp-for-tasks`.
85
+ 4. **Multi-step sequences** where fragment ambiguity risks misread (migration steps, ordered deploys, multi-service restarts).
86
+ 5. **User confusion** — explicit "I don't understand", "explain again", or repeat of the same question.
87
+
88
+ ### Example — destructive op
89
+
90
+ > **Warning**: This will permanently delete all rows in the `users` table and cannot be undone.
91
+ >
92
+ > ```sql
93
+ > DROP TABLE users;
94
+ > ```
95
+ >
96
+ > Verify a backup exists before proceeding. After confirmation, terse resumes.
97
+
98
+ ## Boundaries
99
+
100
+ - **Code blocks**: byte-for-byte unchanged. Never compressed, never abbreviated, never reordered.
101
+ - **Commit messages**: handled by the separate `rulebook-terse-commit` skill. Base skill does nothing to commits.
102
+ - **PR reviews**: handled by `rulebook-terse-review`. Base skill does nothing to reviews.
103
+ - **Specs** (`.rulebook/specs/**`, `proposal.md`, `spec.md`): unchanged.
104
+ - **Test assertions + error strings**: verbatim.
105
+
106
+ ## Activation surface
107
+
108
+ | Surface | Example |
109
+ |---------|---------|
110
+ | Slash command | `/rulebook-terse`, `/rulebook-terse brief\|terse\|ultra\|off` |
111
+ | Natural language (on) | "be terse", "less tokens please", "terse mode", "activate rulebook-terse" |
112
+ | Natural language (off) | "normal mode", "stop terse", "disable terse" |
113
+ | Model inference | Any trigger phrase in this skill's `description` frontmatter |
114
+ | Automatic | SessionStart hook, tier-aware default |
115
+
116
+ <!-- RULEBOOK_TERSE:END -->
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: "Rulebook Terse Commit"
3
+ description: "Terse Conventional Commits generator. Subject ≤50 chars (hard cap 72), body only when 'why' isn't obvious, no filler. Use when user says 'write a commit', 'generate commit', 'commit message', or invokes /rulebook-terse-commit. Independent of the base rulebook-terse mode."
4
+ version: "1.0.0"
5
+ category: "core"
6
+ author: "Rulebook"
7
+ tags: ["core", "git", "commits", "tokens"]
8
+ dependencies: []
9
+ conflicts: []
10
+ ---
11
+ <!-- RULEBOOK_TERSE_COMMIT:START -->
12
+ # Rulebook Terse Commit
13
+
14
+ Write commit messages terse and exact. Conventional Commits format. Why over what.
15
+
16
+ ## Subject line
17
+
18
+ - Format: `<type>(<scope>): <imperative summary>` — `<scope>` optional.
19
+ - Types: `feat`, `fix`, `refactor`, `perf`, `docs`, `test`, `chore`, `build`, `ci`, `style`, `revert`.
20
+ - Imperative mood: "add", "fix", "remove" — not "added", "adds", "adding".
21
+ - Target ≤50 chars. Hard cap 72.
22
+ - No trailing period.
23
+ - Match project capitalization convention after the colon (match the repo's existing history).
24
+
25
+ ## Body
26
+
27
+ - **Skip the body entirely** when the subject is self-explanatory.
28
+ - Add a body ONLY for: non-obvious `why`, breaking changes, migration notes, linked issues.
29
+ - Wrap at 72 chars.
30
+ - Bullets use `-`, not `*`.
31
+ - Reference issues/PRs at the end: `Closes #42`, `Refs #17`.
32
+
33
+ ## Never include
34
+
35
+ - "This commit does X", "I", "we", "now", "currently" — the diff says what.
36
+ - "As requested by ..." — use the `Co-authored-by` trailer instead.
37
+ - "Generated with Claude Code" or any AI attribution.
38
+ - Emoji (unless project convention requires them).
39
+ - Restating the file name when `<scope>` already identifies it.
40
+
41
+ ## Auto-Clarity
42
+
43
+ Always include a body for:
44
+
45
+ - **Breaking changes** (`!` suffix on type, plus `BREAKING CHANGE:` footer).
46
+ - **Security fixes** (CVE ID when applicable).
47
+ - **Data migrations** that touch user data.
48
+ - **Reverts** of a prior commit (reference the reverted SHA).
49
+ - **Performance regressions fixed** (include before/after numbers when possible).
50
+
51
+ Terseness is NEVER permitted to obscure these cases — future debuggers need the context.
52
+
53
+ ## Examples
54
+
55
+ ### New endpoint with non-obvious why
56
+
57
+ ```
58
+ feat(api): add GET /users/:id/profile
59
+
60
+ Mobile client needs profile data without the full user payload to
61
+ reduce LTE bandwidth on cold-launch screens.
62
+
63
+ Closes #128
64
+ ```
65
+
66
+ ### Breaking API change
67
+
68
+ ```
69
+ feat(api)!: rename /v1/orders to /v1/checkout
70
+
71
+ BREAKING CHANGE: clients on /v1/orders must migrate to /v1/checkout
72
+ before 2026-06-01. Old route returns 410 after that date.
73
+ ```
74
+
75
+ ### Simple bug fix — subject only
76
+
77
+ ```
78
+ fix(auth): reject expired tokens on boundary second
79
+ ```
80
+
81
+ ### Revert
82
+
83
+ ```
84
+ revert: "feat(api): add GET /users/:id/profile"
85
+
86
+ This reverts commit a1b2c3d. Endpoint caused 5% latency regression
87
+ on the hot path; see incident INC-4219.
88
+ ```
89
+
90
+ ## Boundaries
91
+
92
+ Only generates the commit message. Does NOT run `git commit`, does NOT stage files, does NOT amend. Output is a code block ready to paste.
93
+
94
+ Override: `/rulebook-terse-commit off` or "stop terse commit" reverts to the model's default commit style.
95
+
96
+ <!-- RULEBOOK_TERSE_COMMIT:END -->
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: "Rulebook Terse Review"
3
+ description: "Ultra-compressed code review comments. One line per finding: location, problem, fix. Use when user says 'review this PR', 'code review', 'review the diff', or invokes /rulebook-terse-review. Independent of the base rulebook-terse mode."
4
+ version: "1.0.0"
5
+ category: "core"
6
+ author: "Rulebook"
7
+ tags: ["core", "review", "tokens"]
8
+ dependencies: []
9
+ conflicts: []
10
+ ---
11
+ <!-- RULEBOOK_TERSE_REVIEW:START -->
12
+ # Rulebook Terse Review
13
+
14
+ Write code-review comments terse and actionable. One line per finding. Location, problem, fix. No throat-clearing.
15
+
16
+ ## Format
17
+
18
+ ```
19
+ L<line>: <severity> <problem>. <fix>.
20
+ ```
21
+
22
+ For multi-file diffs:
23
+
24
+ ```
25
+ <file>:L<line>: <severity> <problem>. <fix>.
26
+ ```
27
+
28
+ ## Severity prefixes
29
+
30
+ Use when mixing severities in the same review. Optional when all findings are the same severity.
31
+
32
+ | Prefix | Meaning |
33
+ |--------|---------|
34
+ | 🔴 `bug:` | Broken behavior; will cause an incident. |
35
+ | 🟡 `risk:` | Works but fragile (race, missing null check, swallowed error, unvalidated input). |
36
+ | 🔵 `nit:` | Style, naming, micro-optim. Author can ignore without consequence. |
37
+ | ❓ `q:` | Genuine question, not a suggestion. |
38
+
39
+ ## Drop
40
+
41
+ - Throat-clearing: "I noticed that...", "It seems like...", "You might want to consider...".
42
+ - Per-comment pleasantries: "Great work!", "Looks good overall but...". Say it once at the top of the review, not per comment.
43
+ - Restating what the line does — the reviewer can read the diff.
44
+ - Hedging: "perhaps", "maybe", "I think". If unsure, use `❓ q:`.
45
+ - "This is just a suggestion but..." — use `🔵 nit:` instead.
46
+
47
+ ## Keep
48
+
49
+ - Exact line numbers.
50
+ - Exact symbol, function, and variable names in backticks.
51
+ - A concrete fix, not "consider refactoring this".
52
+ - The `why` if the fix isn't obvious from the problem statement.
53
+
54
+ ## Examples
55
+
56
+ ### ❌ Verbose
57
+
58
+ > "I noticed that on line 42 you're not checking if the user object is null before accessing the email property. This could potentially cause a crash if the user is not found in the database. You might want to add a null check here."
59
+
60
+ ### ✅ Terse
61
+
62
+ ```
63
+ L42: 🔴 bug: user can be null after .find(). Add guard before .email.
64
+ ```
65
+
66
+ ---
67
+
68
+ ### ❌ Verbose
69
+
70
+ > "It looks like this function is doing a lot of things and might benefit from being broken up into smaller functions for readability."
71
+
72
+ ### ✅ Terse
73
+
74
+ ```
75
+ L88-140: 🔵 nit: 50-line fn does 4 things. Extract validate/normalize/persist.
76
+ ```
77
+
78
+ ---
79
+
80
+ ### ❌ Verbose
81
+
82
+ > "Have you considered what happens if the API returns a 429? I think we should probably handle that case."
83
+
84
+ ### ✅ Terse
85
+
86
+ ```
87
+ L23: 🟡 risk: no retry on 429. Wrap in withBackoff(3).
88
+ ```
89
+
90
+ ## Auto-Clarity
91
+
92
+ Drop terse mode and write full prose for:
93
+
94
+ - **Security findings** (CVE-class bugs, auth bypass, credential exposure) — need full explanation + CWE or CVE reference.
95
+ - **Architectural disagreements** — need rationale, not a one-liner.
96
+ - **Onboarding contexts** where the author is new to the codebase — they need the `why`, not just the `what`.
97
+
98
+ In those cases, write a normal paragraph, then resume terse for the remaining comments.
99
+
100
+ ## Boundaries
101
+
102
+ Review-only. Does NOT:
103
+
104
+ - Write the code fix.
105
+ - Approve or request changes on the PR.
106
+ - Run linters or tests.
107
+
108
+ Output is the comment(s), ready to paste into the PR review UI.
109
+
110
+ Override: `/rulebook-terse-review off` or "stop terse review" reverts to the model's default review style.
111
+
112
+ <!-- RULEBOOK_TERSE_REVIEW:END -->
@@ -1,225 +0,0 @@
1
- export declare function initCommand(options: {
2
- yes?: boolean;
3
- quick?: boolean;
4
- minimal?: boolean;
5
- light?: boolean;
6
- lean?: boolean;
7
- package?: string;
8
- addSequentialThinking?: boolean;
9
- }): Promise<void>;
10
- export declare function validateCommand(): Promise<void>;
11
- export declare function workflowsCommand(): Promise<void>;
12
- export declare function checkDepsCommand(): Promise<void>;
13
- export declare function checkCoverageCommand(options: {
14
- threshold?: number;
15
- }): Promise<void>;
16
- export declare function generateDocsCommand(options: {
17
- yes?: boolean;
18
- }): Promise<void>;
19
- export declare function versionCommand(options: {
20
- type: 'major' | 'minor' | 'patch';
21
- }): Promise<void>;
22
- export declare function changelogCommand(options: {
23
- version?: string;
24
- }): Promise<void>;
25
- export declare function healthCommand(): Promise<void>;
26
- export declare function fixCommand(): Promise<void>;
27
- export declare function watcherCommand(): Promise<void>;
28
- export declare function agentCommand(options: {
29
- dryRun?: boolean;
30
- tool?: string;
31
- iterations?: number;
32
- watch?: boolean;
33
- }): Promise<void>;
34
- export declare function configCommand(options: {
35
- show?: boolean;
36
- set?: string;
37
- feature?: string;
38
- enable?: boolean;
39
- }): Promise<void>;
40
- interface WorkspaceTaskOptions {
41
- project?: string;
42
- allProjects?: boolean;
43
- }
44
- export declare function taskCreateCommand(taskId: string, wsOptions?: WorkspaceTaskOptions): Promise<void>;
45
- export declare function taskListCommand(includeArchived?: boolean, wsOptions?: WorkspaceTaskOptions): Promise<void>;
46
- export declare function taskShowCommand(taskId: string, wsOptions?: WorkspaceTaskOptions): Promise<void>;
47
- export declare function taskValidateCommand(taskId: string, wsOptions?: WorkspaceTaskOptions): Promise<void>;
48
- export declare function taskArchiveCommand(taskId: string, skipValidation?: boolean, wsOptions?: WorkspaceTaskOptions): Promise<void>;
49
- /**
50
- * Initialize MCP configuration in .rulebook file
51
- * Adds mcp block to .rulebook and creates/updates .cursor/mcp.json
52
- */
53
- export declare function mcpInitCommand(options?: {
54
- workspace?: boolean;
55
- }): Promise<void>;
56
- export declare function mcpServerCommand(): Promise<void>;
57
- export declare function tasksCommand(options: {
58
- tree?: boolean;
59
- current?: boolean;
60
- status?: string;
61
- }): Promise<void>;
62
- export declare function updateCommand(options: {
63
- yes?: boolean;
64
- minimal?: boolean;
65
- light?: boolean;
66
- lean?: boolean;
67
- }): Promise<void>;
68
- /**
69
- * List all available skills
70
- */
71
- export declare function skillListCommand(options: {
72
- category?: string;
73
- enabled?: boolean;
74
- }): Promise<void>;
75
- /**
76
- * Add (enable) a skill
77
- */
78
- export declare function skillAddCommand(skillId: string): Promise<void>;
79
- /**
80
- * Remove (disable) a skill
81
- */
82
- export declare function skillRemoveCommand(skillId: string): Promise<void>;
83
- /**
84
- * Show skill details
85
- */
86
- export declare function skillShowCommand(skillId: string): Promise<void>;
87
- /**
88
- * Search for skills
89
- */
90
- export declare function skillSearchCommand(query: string): Promise<void>;
91
- export declare function memorySearchCommand(query: string, options: {
92
- type?: string;
93
- limit?: string;
94
- mode?: string;
95
- }): Promise<void>;
96
- export declare function memorySaveCommand(text: string, options: {
97
- type?: string;
98
- title?: string;
99
- tags?: string;
100
- }): Promise<void>;
101
- export declare function memoryListCommand(options: {
102
- limit?: string;
103
- type?: string;
104
- }): Promise<void>;
105
- export declare function memoryStatsCommand(): Promise<void>;
106
- export declare function memoryVerifyCommand(): Promise<void>;
107
- export declare function memoryCleanupCommand(options: {
108
- force?: boolean;
109
- }): Promise<void>;
110
- export declare function memoryExportCommand(options: {
111
- format?: string;
112
- output?: string;
113
- }): Promise<void>;
114
- export declare function ralphInitCommand(): Promise<void>;
115
- export declare function ralphRunCommand(options: {
116
- maxIterations?: number;
117
- tool?: 'claude' | 'amp' | 'gemini';
118
- parallel?: number;
119
- planFirst?: boolean;
120
- }): Promise<void>;
121
- export declare function ralphStatusCommand(): Promise<void>;
122
- export declare function ralphHistoryCommand(options: {
123
- limit?: number;
124
- }): Promise<void>;
125
- export declare function ralphPauseCommand(): Promise<void>;
126
- export declare function ralphResumeCommand(): Promise<void>;
127
- export declare function setupClaudeCodePlugin(): Promise<void>;
128
- /**
129
- * Show contents of AGENTS.override.md.
130
- */
131
- export declare function overrideShowCommand(): Promise<void>;
132
- /**
133
- * Open AGENTS.override.md in $EDITOR, or print path if no EDITOR.
134
- */
135
- export declare function overrideEditCommand(): Promise<void>;
136
- /**
137
- * Reset AGENTS.override.md to empty template.
138
- */
139
- export declare function overrideClearCommand(): Promise<void>;
140
- /**
141
- * Set the AGENTS.md generation mode (lean or full).
142
- */
143
- export declare function modeSetCommand(mode: 'lean' | 'full'): Promise<void>;
144
- /**
145
- * Show current PLANS.md content.
146
- */
147
- export declare function plansShowCommand(): Promise<void>;
148
- /**
149
- * Initialize PLANS.md in project root.
150
- */
151
- export declare function plansInitCommand(): Promise<void>;
152
- /**
153
- * Reset PLANS.md to the empty template.
154
- */
155
- export declare function plansClearCommand(): Promise<void>;
156
- /**
157
- * `rulebook continue` — Print orientations to resume work in a new AI session.
158
- *
159
- * Aggregates context from:
160
- * 1. PLANS.md (session scratchpad)
161
- * 2. Active rulebook tasks (pending items in tasks.md)
162
- * 3. Recent git commits (last 5)
163
- * 4. Ralph status (if running)
164
- *
165
- * Outputs a structured prompt that the AI agent can paste at the start of a session.
166
- */
167
- export declare function continueCommand(): Promise<void>;
168
- export declare function migrateMemoryDirectory(): Promise<void>;
169
- /**
170
- * `rulebook review` — Run AI-powered code review on changes vs a base branch.
171
- *
172
- * Retrieves the git diff, builds a structured prompt, sends it to an AI tool,
173
- * parses the result, and outputs in the requested format.
174
- */
175
- export declare function reviewCommand(options: {
176
- output?: 'terminal' | 'github-comment' | 'json';
177
- failOn?: 'critical' | 'major' | 'minor';
178
- baseBranch?: string;
179
- tool?: string;
180
- }): Promise<void>;
181
- export declare function ralphImportIssuesCommand(options: {
182
- label?: string;
183
- milestone?: string;
184
- limit?: number;
185
- dryRun?: boolean;
186
- }): Promise<void>;
187
- export declare function workspaceInitCommand(): Promise<void>;
188
- export declare function workspaceAddCommand(projectPath: string): Promise<void>;
189
- export declare function workspaceRemoveCommand(projectName: string): Promise<void>;
190
- export declare function workspaceListCommand(): Promise<void>;
191
- export declare function workspaceStatusCommand(): Promise<void>;
192
- export declare function decisionCreateCommand(title: string, options: {
193
- context?: string;
194
- relatedTask?: string;
195
- }): Promise<void>;
196
- export declare function decisionListCommand(options: {
197
- status?: string;
198
- }): Promise<void>;
199
- export declare function decisionShowCommand(id: string): Promise<void>;
200
- export declare function decisionSupersedeCommand(oldId: string, newId: string): Promise<void>;
201
- export declare function knowledgeAddCommand(type: string, title: string, options: {
202
- category?: string;
203
- description?: string;
204
- }): Promise<void>;
205
- export declare function knowledgeListCommand(options: {
206
- type?: string;
207
- category?: string;
208
- }): Promise<void>;
209
- export declare function knowledgeShowCommand(id: string): Promise<void>;
210
- export declare function knowledgeRemoveCommand(id: string): Promise<void>;
211
- export declare function learnCaptureCommand(options: {
212
- title?: string;
213
- content?: string;
214
- relatedTask?: string;
215
- tags?: string;
216
- }): Promise<void>;
217
- export declare function learnFromRalphCommand(): Promise<void>;
218
- export declare function learnListCommand(options: {
219
- limit?: string;
220
- }): Promise<void>;
221
- export declare function learnPromoteCommand(id: string, target: string, options: {
222
- title?: string;
223
- }): Promise<void>;
224
- export {};
225
- //# sourceMappingURL=commands.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/cli/commands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