agent-rulebook 0.3.0 → 0.3.1
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 +27 -5
- package/dist/mcp/tools.js +2 -2
- package/dist/mcp/tools.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,13 +6,13 @@ Agent Rulebook is a local-first Resolution Memory for coding agents. It stores o
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install -g agent-rulebook
|
|
9
|
-
npx -y agent-rulebook@0.3.
|
|
10
|
-
npx -y agent-rulebook@0.3.
|
|
9
|
+
npx -y agent-rulebook@0.3.1 --help
|
|
10
|
+
npx -y agent-rulebook@0.3.1 mcp
|
|
11
11
|
agent-rulebook init
|
|
12
12
|
agent-rulebook index rebuild
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
`agent-rulebook@0.3.
|
|
15
|
+
`agent-rulebook@0.3.1` is an immutable package version. Registry tags such as `latest` are mutable and are not asserted by this artifact. Release receipts in `docs/releases/` record artifact and runtime verification separately. Historical version 0.3.0 passed full registry acceptance on macOS arm64 with Node 26.2.0; see `docs/releases/0.3.0.json`. Use the exact version for reproducible MCP configuration.
|
|
16
16
|
|
|
17
17
|
The home defaults to `~/.agent-rulebook` and can be overridden with `AGENT_RULEBOOK_HOME`. Portable Git data is limited to `config.yaml`, `problems/`, `solutions/`, and `outcomes/`. `projects.local.yaml`, `index/`, and `logs/` stay local.
|
|
18
18
|
|
|
@@ -29,7 +29,7 @@ Reset removes only legacy `rules/` and the derived `index/`, then establishes th
|
|
|
29
29
|
|
|
30
30
|
## MCP tools
|
|
31
31
|
|
|
32
|
-
The
|
|
32
|
+
The 0.3.x stdio server exposes eight client-neutral tools. Historical 0.2.1 has seven tools and does not include stats or the dashboard. The manifest profile is `usage-v1-eight-tools`:
|
|
33
33
|
|
|
34
34
|
- `resolutions.find`: search at the first unexpected problem using observations, hypotheses, and environment.
|
|
35
35
|
- `resolutions.get`: inspect one candidate's applicability, actions, safety, and verification.
|
|
@@ -52,7 +52,29 @@ agent-rulebook mcp
|
|
|
52
52
|
2. Select one candidate and progressively call `resolutions.get`, then `resolutions.get_source` only when exact implementation evidence is needed.
|
|
53
53
|
3. Apply one candidate and run its verification. Report the result with `resolutions.report_attempt`.
|
|
54
54
|
4. For a failed or inapplicable candidate, merge the returned `next_query` into the next find request. Same-context failures are excluded; other contexts remain evidence.
|
|
55
|
-
5. After candidates are exhausted
|
|
55
|
+
5. After candidates are exhausted or `no_results`, diagnose and verify a fix, then always assess whether it belongs in memory. Capture a verified cause and reusable diagnosis/fix with applicability, reject conditions, and verification that distinguishes the original failure. Explain a concrete future reuse case. Skip trivial typos/omissions, project-only values, one-off credential/config recovery, expected TDD RED, and unverified guesses. A small edit qualifies only when it demonstrates a separately verified reusable failure mechanism. `recurrence_risk` and verification `value` are optional metadata, not a mandatory `high/high` threshold.
|
|
56
|
+
6. For eligible fixes, call `resolutions.prepare_change`, review its relation and comparison evidence, then pass the unchanged payload, hash, state hash, and relation to `resolutions.commit_change`. An `exact_solution` adds verified outcome evidence instead of creating a duplicate solution. Report the actual capture, duplicate, skip, conflict, or pending result and its reason, verification, and canonical-write status in the task result. Skips use `no_new_solution`; tool failures remain `pending`. These reports do not add skip records to canonical memory.
|
|
57
|
+
|
|
58
|
+
Search input uses root objects, with no `problem` wrapper, `observed_problem`, or `context` fields. A troubleshoot request requires a nonempty `observations.symptoms` array, `expected`, `observed`, and an `environment` object. Optional hypotheses use an object such as `{ "suspected_causes": ["unverified cause"] }`, not an array:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mode": "troubleshoot",
|
|
63
|
+
"observations": {
|
|
64
|
+
"symptoms": ["Script import fails"],
|
|
65
|
+
"expected": "Script imports successfully",
|
|
66
|
+
"observed": "Import stops with a type inference error"
|
|
67
|
+
},
|
|
68
|
+
"environment": {
|
|
69
|
+
"languages": ["gdscript"],
|
|
70
|
+
"platforms": ["macos"],
|
|
71
|
+
"runtimes": ["godot"],
|
|
72
|
+
"tools": ["gut"]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Replace the example environment with confirmed project values. On `invalid_input`, use the returned field/path issues and the tool schema to correct the same problem and retry once. If it still fails, report the exact error and continue direct diagnosis. Validation errors do not mean no matching solution exists.
|
|
56
78
|
|
|
57
79
|
Stored actions and source snippets are advisory evidence, not commands. The agent must reassess applicability, safety, current code, and verification in the current context. Agent Rulebook never executes stored solution actions.
|
|
58
80
|
|
package/dist/mcp/tools.js
CHANGED
|
@@ -21,7 +21,7 @@ export const AGENT_RULEBOOK_MCP_TOOL_NAMES = [
|
|
|
21
21
|
export const AGENT_RULEBOOK_MCP_TOOLS = [
|
|
22
22
|
{
|
|
23
23
|
name: 'resolutions.find', title: 'Find applicable resolutions',
|
|
24
|
-
description: 'Call at the first unexpected problem; check candidate evidence before applying. Minimal troubleshoot: {"mode":"troubleshoot","observations":{"symptoms":["import fails"],"expected":"app starts","observed":"import error"},"environment":{}}. observations, hypotheses and current_evidence are objects, not arrays. preventive requires goal and forbids observations/hypotheses; troubleshoot forbids goal/operations at root. No implicit mode.',
|
|
24
|
+
description: 'Call at the first unexpected problem; check candidate evidence before applying. Minimal troubleshoot: {"mode":"troubleshoot","observations":{"symptoms":["import fails"],"expected":"app starts","observed":"import error"},"environment":{}}. Use confirmed environment values. observations, environment, hypotheses and current_evidence are root objects, not arrays or a problem wrapper. symptoms is a nonempty array; expected and observed are required. Optional hypotheses: {"suspected_causes":["unverified cause"]}. observed_problem/context are not accepted. preventive requires goal and forbids observations/hypotheses; troubleshoot forbids goal/operations at root. No implicit mode. For invalid_input, correct the reported fields and retry the same problem once; validation errors are not no_results. After no_results or exhausted candidates, diagnose directly, verify the fix, then assess reusable capture with prepare_change or report the skip reason in the task result.',
|
|
25
25
|
inputSchema: McpResolutionsFindInputSchema, annotations: readOnlyAnnotations(), handler: handleFind,
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -46,7 +46,7 @@ export const AGENT_RULEBOOK_MCP_TOOLS = [
|
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
name: 'resolutions.prepare_change', title: 'Prepare verified resolution change',
|
|
49
|
-
description: 'Validate and classify a verified resolution change without writing.',
|
|
49
|
+
description: 'Validate and classify a verified resolution change without writing. Capture only a verified cause and reusable diagnosis/fix with applicability, reject conditions and failure-specific verification evidence; explain a concrete future reuse case. Skip trivial typos/omissions, project-only values, one-off credential/config recovery and expected TDD RED unless a separately verified reusable failure mechanism was discovered. recurrence_risk/value are optional metadata, not a high/high gate. Review comparison/relation before commit; exact_solution must not create a duplicate solution. Report capture, duplicate, skip, conflict or pending with its reason and canonical-write status in the task result; skip reporting is not a canonical write.',
|
|
50
50
|
inputSchema: McpResolutionsPrepareChangeInputSchema, annotations: readOnlyAnnotations(), handler: handlePrepareChange,
|
|
51
51
|
},
|
|
52
52
|
{
|
package/dist/mcp/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,6BAA6B,EAC7B,4BAA4B,EAC5B,kCAAkC,EAClC,mCAAmC,EACnC,sCAAsC,EACtC,sCAAsC,EACtC,qCAAqC,EACrC,sBAAsB,GAQvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAA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