@itsshadowai/refinery 0.1.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/LICENSE +21 -0
- package/README.md +228 -0
- package/coral/agents/claim-scout/coral-agent.toml +23 -0
- package/coral/agents/decision-synthesizer/coral-agent.toml +23 -0
- package/coral/agents/evidence-auditor/coral-agent.toml +23 -0
- package/coral/agents/memory-cartographer/coral-agent.toml +23 -0
- package/coral/agents/proposal-editor/coral-agent.toml +23 -0
- package/coral/agents/run-worker.sh +19 -0
- package/coral/refinery-config.toml +16 -0
- package/dist/adapters/codex-memory.d.ts +6 -0
- package/dist/adapters/codex-memory.js +264 -0
- package/dist/adapters/codex-memory.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +671 -0
- package/dist/cli.js.map +1 -0
- package/dist/coral/client.d.ts +107 -0
- package/dist/coral/client.js +214 -0
- package/dist/coral/client.js.map +1 -0
- package/dist/coral/definitions.d.ts +25 -0
- package/dist/coral/definitions.js +53 -0
- package/dist/coral/definitions.js.map +1 -0
- package/dist/coral/mcp.d.ts +17 -0
- package/dist/coral/mcp.js +71 -0
- package/dist/coral/mcp.js.map +1 -0
- package/dist/coral/review-conductor.d.ts +120 -0
- package/dist/coral/review-conductor.js +1290 -0
- package/dist/coral/review-conductor.js.map +1 -0
- package/dist/coral/smoke.d.ts +1 -0
- package/dist/coral/smoke.js +265 -0
- package/dist/coral/smoke.js.map +1 -0
- package/dist/coral/topology.d.ts +5 -0
- package/dist/coral/topology.js +15 -0
- package/dist/coral/topology.js.map +1 -0
- package/dist/coral/worker.d.ts +34 -0
- package/dist/coral/worker.js +671 -0
- package/dist/coral/worker.js.map +1 -0
- package/dist/core/adapter.d.ts +93 -0
- package/dist/core/adapter.js +112 -0
- package/dist/core/adapter.js.map +1 -0
- package/dist/core/artifacts.d.ts +93 -0
- package/dist/core/artifacts.js +200 -0
- package/dist/core/artifacts.js.map +1 -0
- package/dist/core/deliberation.d.ts +89 -0
- package/dist/core/deliberation.js +385 -0
- package/dist/core/deliberation.js.map +1 -0
- package/dist/core/errors.d.ts +26 -0
- package/dist/core/errors.js +50 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/intents.d.ts +5 -0
- package/dist/core/intents.js +34 -0
- package/dist/core/intents.js.map +1 -0
- package/dist/core/live-review.d.ts +93 -0
- package/dist/core/live-review.js +269 -0
- package/dist/core/live-review.js.map +1 -0
- package/dist/core/model-client.d.ts +19 -0
- package/dist/core/model-client.js +45 -0
- package/dist/core/model-client.js.map +1 -0
- package/dist/core/paths.d.ts +16 -0
- package/dist/core/paths.js +43 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/review.d.ts +93 -0
- package/dist/core/review.js +102 -0
- package/dist/core/review.js.map +1 -0
- package/dist/core/specialists/claim-scout.d.ts +2 -0
- package/dist/core/specialists/claim-scout.js +26 -0
- package/dist/core/specialists/claim-scout.js.map +1 -0
- package/dist/core/specialists/decision-synthesizer.d.ts +2 -0
- package/dist/core/specialists/decision-synthesizer.js +35 -0
- package/dist/core/specialists/decision-synthesizer.js.map +1 -0
- package/dist/core/specialists/evidence-auditor.d.ts +2 -0
- package/dist/core/specialists/evidence-auditor.js +35 -0
- package/dist/core/specialists/evidence-auditor.js.map +1 -0
- package/dist/core/specialists/harness.d.ts +2 -0
- package/dist/core/specialists/harness.js +13 -0
- package/dist/core/specialists/harness.js.map +1 -0
- package/dist/core/specialists/index.d.ts +8 -0
- package/dist/core/specialists/index.js +8 -0
- package/dist/core/specialists/index.js.map +1 -0
- package/dist/core/specialists/memory-cartographer.d.ts +2 -0
- package/dist/core/specialists/memory-cartographer.js +33 -0
- package/dist/core/specialists/memory-cartographer.js.map +1 -0
- package/dist/core/specialists/prompt.d.ts +3 -0
- package/dist/core/specialists/prompt.js +25 -0
- package/dist/core/specialists/prompt.js.map +1 -0
- package/dist/core/specialists/proposal-editor.d.ts +2 -0
- package/dist/core/specialists/proposal-editor.js +37 -0
- package/dist/core/specialists/proposal-editor.js.map +1 -0
- package/dist/core/specialists/types.d.ts +20 -0
- package/dist/core/specialists/types.js +2 -0
- package/dist/core/specialists/types.js.map +1 -0
- package/dist/env.d.ts +11 -0
- package/dist/env.js +53 -0
- package/dist/env.js.map +1 -0
- package/dist/mcp.d.ts +9 -0
- package/dist/mcp.js +147 -0
- package/dist/mcp.js.map +1 -0
- package/package.json +50 -0
- package/skills/refinery/SKILL.md +117 -0
- package/skills/refinery/agents/openai.yaml +4 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refinery
|
|
3
|
+
description: Use whenever Codex is asked to inspect, audit, summarize, or propose edits for memory using Refinery, including Codex memory update proposals, stale/forget/conflict/scope audits, memory slices, or fresh-session tests. Supports varying memory-home, project, intent, request, source-limit, and source-char-limit while keeping debate-critique as the default live workflow.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Refinery
|
|
7
|
+
|
|
8
|
+
## Boundary
|
|
9
|
+
|
|
10
|
+
Invoke this skill as the single Refinery skill for memory-related requests. Use
|
|
11
|
+
Refinery to inspect memory and propose edits. Do not apply proposals, mutate
|
|
12
|
+
Codex memory, write ad-hoc memory notes, or edit files under
|
|
13
|
+
`${CODEX_HOME:-$HOME/.codex}/memories`.
|
|
14
|
+
|
|
15
|
+
Default to a live `refinery review` run. Use fixture mode only when the user
|
|
16
|
+
explicitly asks for mock, fixture, deterministic, no-Coral, or rehearsal output.
|
|
17
|
+
Do not add a topology flag for normal review; debate-critique is the default
|
|
18
|
+
Refinery memory-inspection workflow.
|
|
19
|
+
|
|
20
|
+
## Setup Check
|
|
21
|
+
|
|
22
|
+
Verify the command and local setup:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
command -v refinery
|
|
26
|
+
refinery init --json
|
|
27
|
+
refinery doctor --json
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If `refinery` is not installed, install the package first:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install -g @itsshadowai/refinery
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Slice Controls
|
|
37
|
+
|
|
38
|
+
Map the user's requested memory slice onto the current CLI controls:
|
|
39
|
+
|
|
40
|
+
- `--memory-home <dir>` selects the Codex memory corpus. It must point to a
|
|
41
|
+
directory named `memories`.
|
|
42
|
+
- `--project <dir>` selects the project context and the global run bucket under
|
|
43
|
+
`~/.refinery/runs/by-project/<project-key>/`.
|
|
44
|
+
- `--intent <intent>` selects audit behavior. Use one of:
|
|
45
|
+
`general-review`, `stale-audit`, `forget-candidates`, `update-candidates`,
|
|
46
|
+
`conflict-audit`, `scope-audit`.
|
|
47
|
+
- `--request "<text>"` carries the user's slice description or review question.
|
|
48
|
+
Use it to focus on a repo, topic, previous failure, memory family, or desired
|
|
49
|
+
proposal type.
|
|
50
|
+
- `--source-limit <n>` selects how many source documents enter the run. Use `1`
|
|
51
|
+
for a tight smoke, `3` as the normal default, and up to `10` for broader
|
|
52
|
+
review.
|
|
53
|
+
- `--source-char-limit <n>` bounds each source chunk. Use `2500` for quick
|
|
54
|
+
smokes, `6000` as the normal default, and higher values only when the slice
|
|
55
|
+
needs more context.
|
|
56
|
+
- `--run-id <id>` should be path-safe and descriptive when comparing separate
|
|
57
|
+
sessions or slices.
|
|
58
|
+
|
|
59
|
+
Do not invent unavailable selectors. If the user asks for a fine-grained slice
|
|
60
|
+
that the CLI cannot directly filter, encode the focus in `--request` and keep
|
|
61
|
+
`--source-limit`/`--source-char-limit` explicit.
|
|
62
|
+
|
|
63
|
+
## Live Review Command
|
|
64
|
+
|
|
65
|
+
Use this shape for normal memory proposal runs:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
refinery review \
|
|
69
|
+
--project "$PWD" \
|
|
70
|
+
--memory-home "${CODEX_HOME:-$HOME/.codex}/memories" \
|
|
71
|
+
--intent update-candidates \
|
|
72
|
+
--request "<user slice and review request>" \
|
|
73
|
+
--source-limit 3 \
|
|
74
|
+
--source-char-limit 6000 \
|
|
75
|
+
--run-id "<path-safe-run-id>" \
|
|
76
|
+
--json
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Use `--home ./.refinery` only when the user explicitly wants project-local
|
|
80
|
+
Refinery state. The default writes run artifacts under `~/.refinery`.
|
|
81
|
+
|
|
82
|
+
## Inspecting Runs
|
|
83
|
+
|
|
84
|
+
If the review succeeds, use stdout JSON first. If stdout is incomplete,
|
|
85
|
+
validation fails after a run directory was created, or you need a stable summary,
|
|
86
|
+
inspect the run:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
refinery trial inspect --run-dir "<runDir>" --json
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
For failed live runs, inspect `status.json`, `review.json`, `coral.json`,
|
|
93
|
+
`server.log`, and `steps/*/messages/*/` inside `runDir` before deciding whether
|
|
94
|
+
the failure was startup, model output, merge, or timeout related.
|
|
95
|
+
|
|
96
|
+
## Reporting
|
|
97
|
+
|
|
98
|
+
Summarize the Refinery result in plain language:
|
|
99
|
+
|
|
100
|
+
- live or fixture mode, run id, and run directory
|
|
101
|
+
- memory corpus and slice controls used
|
|
102
|
+
- counts for proposals, rejected candidates, claims, challenges, and unresolved
|
|
103
|
+
challenges when present
|
|
104
|
+
- each proposed edit: action, memory type, scope, target memory id(s), body or
|
|
105
|
+
replacement body, confidence, rationale, and evidence/source refs
|
|
106
|
+
- rejected candidates and unresolved questions
|
|
107
|
+
- any validation/runtime caveats
|
|
108
|
+
|
|
109
|
+
Phrase proposals as candidates surfaced by Refinery, not accepted memory edits.
|
|
110
|
+
|
|
111
|
+
## Fixture Mode
|
|
112
|
+
|
|
113
|
+
Only on explicit mock/fixture requests:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
refinery dev fixture memory-proposal --json
|
|
117
|
+
```
|