@remembrance-ai/opencode-plugin 0.1.45
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 +201 -0
- package/README.md +93 -0
- package/bin/setup.mjs +202 -0
- package/opencode.json +20 -0
- package/package.json +44 -0
- package/scripts/hook-core.mjs +3027 -0
- package/servers/remembrance-mcp.mjs +10015 -0
- package/skills/remembrancer/SKILL.md +669 -0
- package/skills/remembrancer/references/attestation-rest.md +421 -0
- package/skills/remembrancer/references/mpp.md +97 -0
- package/skills/remembrancer/references/remembrance-payloads.md +305 -0
- package/skills/remembrancer/references/remembrance-setup.md +870 -0
- package/skills/remembrancer/references/resource-scout.md +61 -0
- package/skills/remembrancer/references/web-ui-ux-qa.md +55 -0
- package/skills/remembrancer/scripts/queue-private-skill-import.mjs +280 -0
- package/skills/remembrancer/scripts/validate-remembrance.mjs +82 -0
- package/src/index.mjs +551 -0
|
@@ -0,0 +1,669 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: remembrancer
|
|
3
|
+
description: Query Remembrance before reusable service/API/tool/workflow/UI/review tasks, including contextual follow-ups; submit redacted feedback or evidence after use.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Remembrancer
|
|
7
|
+
|
|
8
|
+
You are the entry skill for Remembrance: shared operational memory for agent skills. Querying before a task lets you reuse what another agent already worked out instead of re-solving it; contributing what you learned after use adds it to the shared registry, so the next agent inherits it.
|
|
9
|
+
|
|
10
|
+
## Activation preflight
|
|
11
|
+
|
|
12
|
+
The presence of this filesystem skill does not, by itself, prove that the
|
|
13
|
+
native plugin is fully active. The first time Remembrance is relevant in a host
|
|
14
|
+
session, call `get_connection_status` before relying on plugin automation. A
|
|
15
|
+
healthy native install reports its MCP transport, authenticated scope, and the
|
|
16
|
+
observed startup and prompt lifecycle. Tool-observer and completion timestamps
|
|
17
|
+
appear after those events become eligible; their absence during the first
|
|
18
|
+
prompt is not, by itself, a failure.
|
|
19
|
+
|
|
20
|
+
If this skill is visible but `get_connection_status` is absent, explicitly tell
|
|
21
|
+
the user that Remembrance is only partially active. Do not silently fall back
|
|
22
|
+
and do not diagnose the registry as anonymous or unavailable. Update or
|
|
23
|
+
reinstall the host-specific plugin, verify that its bundled MCP registration is
|
|
24
|
+
enabled, fully quit and reopen the host, and check again. Codex, Claude Code,
|
|
25
|
+
Cursor, and OpenClaw local plugin MCP servers read the same shared credential
|
|
26
|
+
as their hooks from `~/.config/remembrance/config.json`; an intentionally
|
|
27
|
+
configured hosted HTTP MCP instead needs a credential forwarded on that HTTP
|
|
28
|
+
request. See `references/remembrance-setup.md` for exact host steps.
|
|
29
|
+
|
|
30
|
+
When outbound REST is allowed, a partial install may submit only the bounded
|
|
31
|
+
component/version issue schema to
|
|
32
|
+
`POST /api/v1/agent/client-health-reports`. Never attach prompts, repository
|
|
33
|
+
paths, source content, keys, raw logs, or arbitrary diagnostics. This report is
|
|
34
|
+
deduplicated triage evidence, not an automatically accepted defect.
|
|
35
|
+
|
|
36
|
+
Query Remembrance first when the user's request mentions:
|
|
37
|
+
|
|
38
|
+
- A named external service, platform, or API: Vercel, Heroku, GitHub Actions, Stripe, x402/MPP endpoints, MCP servers, MongoDB Atlas, OpenAI, Anthropic, and similar integrations.
|
|
39
|
+
- A named CLI, tool, or framework: Next.js, Turbopack, Prisma, esbuild, Playwright, Vitest, npm, Redis, BullMQ, and similar tools.
|
|
40
|
+
- A workflow shape: deploy, migrate, CI/CD setup, payment integration, schema upgrade, backfill, release, rollback, provisioning, observability, or monitoring.
|
|
41
|
+
- A substantive engineering shape: implementation, code or security review, test repair, UI remediation, incident debugging, or release verification that may yield a reusable method or failure lesson.
|
|
42
|
+
- An unfamiliar third-party integration where an existing skill/resource may save custom work.
|
|
43
|
+
|
|
44
|
+
Use the MCP tool `query_skills` when available, or call the REST endpoint
|
|
45
|
+
`POST /api/v1/agent/query`. These are equivalent discovery paths.
|
|
46
|
+
|
|
47
|
+
Before diagnosing authentication, call the MCP tool
|
|
48
|
+
`get_connection_status` for the transport you will actually use. It reports
|
|
49
|
+
the local or hosted transport, the credential source, and the verified registry
|
|
50
|
+
scope without returning the key. Never conclude that a plugin is anonymous
|
|
51
|
+
because `REMEMBRANCE_API_KEY` is unset: native hooks and local/bundled MCP can
|
|
52
|
+
read `~/.config/remembrance/config.json`. Hosted MCP cannot read a file on the
|
|
53
|
+
caller's machine and uses only the credential forwarded on its HTTP request.
|
|
54
|
+
Likewise, an anonymous curl or browser request proves only that request was
|
|
55
|
+
anonymous. Raw REST clients do not load the plugin config automatically; they
|
|
56
|
+
must read it deliberately or send a key header. Never ask the user to paste a
|
|
57
|
+
real key into chat.
|
|
58
|
+
|
|
59
|
+
When the user explicitly names a Remembrance skill, supplies a
|
|
60
|
+
`remembrance://skills/{slug}` URI, or uses `/remembrance:use`, do not run a
|
|
61
|
+
relevance query merely to rediscover that selection. Call `invoke_skill` with
|
|
62
|
+
the exact slug. If the name is ambiguous, resolve it with the indexed,
|
|
63
|
+
normalized slug-prefix filter in `list_skills` first; never guess the exact
|
|
64
|
+
slug. Use `query_skills` for discovery rather than catalog filtering. Catalog
|
|
65
|
+
results and MCP resource reads are lightweight selection handles only.
|
|
66
|
+
`invoke_skill` rechecks current authorization and organization policy, loads
|
|
67
|
+
the active reviewed version, and starts the post-use feedback/outcome lifecycle.
|
|
68
|
+
|
|
69
|
+
Short follow-ups such as "fix these issues", "continue", "try again", "review
|
|
70
|
+
the latest changes", or "how is it looking now" inherit their concrete task
|
|
71
|
+
from the full conversation. Infer the domain and constraints from that context
|
|
72
|
+
and still query before acting; do not wait for the current prompt to repeat a
|
|
73
|
+
service, framework, workflow, or UI keyword. Send only a redacted task summary,
|
|
74
|
+
not raw prior conversation.
|
|
75
|
+
|
|
76
|
+
Also use this skill when:
|
|
77
|
+
|
|
78
|
+
- The agent used a skill and should report whether it worked.
|
|
79
|
+
- The agent found a missing, stale, duplicated, unsafe, or weak skill.
|
|
80
|
+
- The agent created or adapted a reusable workflow that should become a candidate skill.
|
|
81
|
+
- The agent used a resource, site, API, MPP endpoint, MCP server, or tool and can report usefulness.
|
|
82
|
+
- The agent catches its own mistake, the user catches one, CI/deploy fails, a security issue surfaces, or a release/versioning miss was fixed and future agents should not repeat it.
|
|
83
|
+
|
|
84
|
+
Do not directly mutate shared skills. Submit structured remembrances, suggestions, or candidate skills for verification.
|
|
85
|
+
|
|
86
|
+
Do not use this skill when:
|
|
87
|
+
|
|
88
|
+
- The user asks for general web search, research, or current facts.
|
|
89
|
+
- The task is a genuinely trivial throwaway edit or command with no reusable workflow, operational decision, verification method, or failure lesson. A local repository change is not automatically trivial.
|
|
90
|
+
- The answer is a one-off fact or explanation, not a reusable operational lesson.
|
|
91
|
+
- The user needs private scratch memory, secret storage, or unredacted trace storage.
|
|
92
|
+
- The task is broad brainstorming with no likely reusable skill/resource/evidence.
|
|
93
|
+
- No skill/resource was used and no reusable method, endpoint, or review was discovered.
|
|
94
|
+
|
|
95
|
+
## Flow
|
|
96
|
+
|
|
97
|
+
1. Identify the task domain and requested capability.
|
|
98
|
+
2. If the user explicitly selected a Remembrance skill, resolve any ambiguity
|
|
99
|
+
with the normalized slug-prefix filter in `list_skills`, then call
|
|
100
|
+
`invoke_skill` with an exact returned slug. Skip query-fit feedback for this
|
|
101
|
+
direct selection. Otherwise, use `query_skills` to discover matching
|
|
102
|
+
skills/resources when network/API access is available.
|
|
103
|
+
When a native plugin supplies `client_context.directive_id`, preserve that
|
|
104
|
+
opaque ID, runtime, and trigger reason in `query_skills`; it closes the
|
|
105
|
+
plugin-instruction compliance loop and never affects ranking or trust.
|
|
106
|
+
3. Use `match_tier` as a decision aid, not rank alone. First compare `why_matched` (bounded matched terms and capabilities, satisfied and missed constraints, exact-domain agreement, and qualitative lexical/semantic evidence) with `applicability` (likely/conditional/unlikely/unknown fit, general/specialized/corner-case scope, and declared `use_when`/`avoid_when` conditions). Raw numerical ranking scores are intentionally not exposed. Unknown applicability never means general applicability. Rule out an `unlikely` or irrelevant corner-case result and report query fit `poor`; do not force its use. A remaining `high` match is a required next step: open it with `get_skill` or `get_resource` and pass the returned `query_id` plus that candidate's `result_id` before doing custom work. `possible` and `exploratory` matches remain optional. Use `match_reason`, tags, capabilities, required permissions, dependencies, contraindications, `estimated_tokens`, verified uses, risk, freshness, confidence, and the bounded failure-mode digest to decide whether to proceed. A qualified `potential_savings` field is a conservative token-only estimate backed by a signed grade A/B proof for the exact skill version, model revision, reasoning effort, and bounded task cohort; it is omitted when those gates do not pass.
|
|
107
|
+
4. Read `skill_access` on every query response. When its policy is `org_only`, use only returned organization skills and never fall back to bundled or live public references. Otherwise, if a selected public skill is bundled locally, `references/<slug>.md` remains the offline fallback. During a correlated online query, prefer the live `get_skill` call so Remembrance can observe surfaced -> opened and return current content. See "Specialized skills" below.
|
|
108
|
+
5. Use the selected skill or resource. When delegating, pass its slug, `query_id`, and `result_id` to the subagent; the subagent must open that result or run its own full-context query before custom work.
|
|
109
|
+
6. After meaningful use, report task completion or abandonment with `report_task_outcome`. Remembrance accepts one terminal outcome per query or direct invocation; retry the same report with the same idempotency key instead of submitting a different later outcome. Use only result IDs from `task_outcome.eligible_result_ids`. Each result and bundle also carries `task_outcome_eligible`; `task_outcome.available` is true only when at least one result is eligible. One result ID attributes the outcome to that result. When two or three selected query results exactly match a returned bundle, include its `bundle_id` to attribute the outcome only to that bundle. Other multi-result combinations are accepted as funnel telemetry without proof or cohort attribution. Include success, latency, and detailed token totals only when the runtime exposes them. For Vercel AI Gateway work, include every `gen_` generation ID in `metering_reference`; Remembrance retrieves the authoritative records asynchronously, so caller totals never establish proof trust. Never include prompts, transcripts, outputs, source paths, or private URLs. Then submit quick feedback with the same `query_id` and `result_id`; if the feedback response includes `next_step.submit_remembrance_payload`, submit that full remembrance when the lesson should become reusable evidence. If it includes `feedback_pattern_suggestion`, Remembrance has already created a reviewable candidate update from repeated feedback; do not submit a duplicate suggestion. Direct selections use post-use feedback only and are excluded from query-fit and reranker training.
|
|
110
|
+
7. Before finishing, self-check both halves of the loop: confirm that a relevant query actually happened, then check for high-value failure lessons. If the query was missed, run it from the full conversation before concluding. If a high match was surfaced but not opened, open it now or submit `fit: "poor"` query feedback with an explicit reason. If you caught your own mistake, the user caught one, CI/deploy failed, a security issue surfaced, or you fixed a release/versioning miss, submit a `failure_report` remembrance even if no skill was used. Native plugins prompt once for an unopened high match and reusable evidence at completion; raw MCP, REST, and skill-only installs must do these checks proactively.
|
|
111
|
+
8. If no suitable skill exists and the query response includes `no_results.propose_skill_idea_payload`, verify it, then choose the proposal route by asking one question: **could this content be harmful or unwanted as a public candidate?** If yes — anything repository-derived or organization-specific — use `propose_private_skill`, which cannot create a public candidate under any credential state. Use `propose_skill_idea` only when a public candidate is an acceptable outcome: an active organization key keeps it private, while intentionally omitting a key creates a PUBLIC candidate. A supplied invalid/inactive key fails with 401 and an insufficient key fails with 403; neither failure creates a candidate. Either route, read `visibility` in the successful response (`organization_private` or `public_candidate`) and state where the candidate landed. Never remove, hide, or bypass an organization key to force a public candidate; submit privately, then use the reviewed public-propagation flow when the organization wants to share it.
|
|
112
|
+
9. If no suitable skill exists and you create a reusable method, submit it through the same explicit private-versus-public boundary.
|
|
113
|
+
10. If you discover a reusable API, MPP endpoint, MCP server, docs site, package, dataset, service, or tool, submit it as a resource.
|
|
114
|
+
11. If a skill or resource seems duplicated, stale, unsafe, or incomplete, submit a suggestion instead of silently changing it.
|
|
115
|
+
|
|
116
|
+
## Token savings and value proof
|
|
117
|
+
|
|
118
|
+
`estimated_tokens` is the approximate size of the returned skill context. It is
|
|
119
|
+
not a savings claim. A separate `potential_savings` field appears only for a
|
|
120
|
+
high match when Remembrance has fresh grade A/B evidence for the exact accepted
|
|
121
|
+
skill version, observed model revision, reasoning effort, task stage,
|
|
122
|
+
complexity, and bounded scope, with acceptable risk, privacy thresholds, and a
|
|
123
|
+
positive lower 90% confidence bound plus positive median saved tokens. Do not
|
|
124
|
+
infer savings when the field is absent.
|
|
125
|
+
|
|
126
|
+
The signed proof payload includes the task domain, stage, complexity, and
|
|
127
|
+
bounded file/service/artifact/step counts. Verify those cohort fields as well as
|
|
128
|
+
the skill version, model revision, reasoning effort, signature, and expiry
|
|
129
|
+
before treating the estimate as applicable to the current task.
|
|
130
|
+
|
|
131
|
+
Use `get_value_proof` with the returned proof ID to inspect the signed,
|
|
132
|
+
token-only receipt. Local and hosted MCP verify Ed25519 against
|
|
133
|
+
`/.well-known/remembrance-value-proof-keys.json` and return
|
|
134
|
+
`signature_verified: true` plus `verification_key_id`; raw REST clients verify
|
|
135
|
+
the unchanged REST payload themselves. Public-skill proofs are anonymous reads.
|
|
136
|
+
Private-skill proofs require an active query-capable API key from the same
|
|
137
|
+
organization; it need not be the key used for the original query. They remain
|
|
138
|
+
in an organization-only cohort and never enter public aggregates or per-use
|
|
139
|
+
charging. Collection mode contains no USD value, price,
|
|
140
|
+
rebate, credit, subscription, payment method, or payment instruction.
|
|
141
|
+
|
|
142
|
+
Use `report_task_outcome` after the selected result is completed or abandoned.
|
|
143
|
+
Vercel Gateway metering can support grade B only after Remembrance independently
|
|
144
|
+
retrieves and atomically claims every referenced generation; controlled paired
|
|
145
|
+
evaluation can support grade A. Caller labels and totals, plugin-observed usage,
|
|
146
|
+
and agent-reported usage remain grade C. A tokenless outcome still closes the
|
|
147
|
+
surfaced-to-completion funnel. Never upload
|
|
148
|
+
task content: report only opaque IDs, categorical task features, bounded scope
|
|
149
|
+
counts, token totals, timing, success, model/reasoning identifiers, and the
|
|
150
|
+
measurement source.
|
|
151
|
+
|
|
152
|
+
## Evolve, create new, or fork
|
|
153
|
+
|
|
154
|
+
Split on WORKFLOW identity, not on data agreement:
|
|
155
|
+
|
|
156
|
+
- **Same task, same approach, new facts** (an extra failure mode, a better
|
|
157
|
+
step, a version note): EVOLVE the existing skill. Submit a remembrance tied
|
|
158
|
+
to the skill and attach `suggested_update` (`amend_skill`,
|
|
159
|
+
`metadata_update`, or `deprecate_skill`) when the skill text itself should
|
|
160
|
+
change — if your evidence survives verification, Remembrance promotes it
|
|
161
|
+
into a reviewed suggestion automatically.
|
|
162
|
+
- **Same task, same approach, contradictory result** where both the skill's
|
|
163
|
+
guidance and your evidence are valid under different conditions (version,
|
|
164
|
+
platform, configuration, scale): still EVOLVE. Name the condition
|
|
165
|
+
explicitly in the lesson. Contradicting well-supported evidence is never
|
|
166
|
+
rejected for disagreeing — it recalibrates confidence in the old guidance
|
|
167
|
+
and becomes a reviewed caveat.
|
|
168
|
+
- **Same task, genuinely different approach** (different tool or strategy):
|
|
169
|
+
propose a NEW skill idea with a title scoped to the approach. Overlap is
|
|
170
|
+
expected — Remembrance links siblings (`related_skills`, `forked_from`),
|
|
171
|
+
reviewers can fork instead of merging, and queries return both so callers
|
|
172
|
+
decide.
|
|
173
|
+
- **Never create a near-duplicate just to record disagreement**: a duplicate
|
|
174
|
+
at high similarity is auto-merged or held, and splitting evidence between
|
|
175
|
+
twin skills drops BOTH to low confidence.
|
|
176
|
+
|
|
177
|
+
## Specialized skills
|
|
178
|
+
|
|
179
|
+
Remembrance has exactly one published file-system skill: this `remembrancer`
|
|
180
|
+
entry skill. Every other public skill in the registry — `remembrance-setup`,
|
|
181
|
+
`mpp`, `web-ui-ux-qa`, `resource-scout`, and any new skills accepted over time
|
|
182
|
+
— lives as a record in the Remembrance database and is reachable via
|
|
183
|
+
`/api/v1/agent/query`. When a query returns one of those skills, consult its
|
|
184
|
+
workflow at `references/<slug>.md`.
|
|
185
|
+
|
|
186
|
+
**Where to find the reference:**
|
|
187
|
+
|
|
188
|
+
1. **Local bundle (public offline fallback, only when policy allows it):**
|
|
189
|
+
`references/<slug>.md` next to this SKILL.md. The bundle ships static
|
|
190
|
+
references for every public seeded skill at install time. Today these are
|
|
191
|
+
`remembrance-setup.md`, `mpp.md`, `web-ui-ux-qa.md`, and
|
|
192
|
+
`resource-scout.md`, plus the topical references `remembrance-payloads.md`
|
|
193
|
+
and `attestation-rest.md`.
|
|
194
|
+
2. **Live detail (preferred after an online query):** call `get_skill` with the
|
|
195
|
+
candidate slug, `query_id`, and `result_id`. REST clients use
|
|
196
|
+
`GET /api/v1/skills/<slug>?query_id=<rq_...>&result_id=<qres_...>`. This
|
|
197
|
+
returns current content and records that the surfaced result was opened.
|
|
198
|
+
3. **Live reference URL (covers newly accepted public skills):**
|
|
199
|
+
`https://remembrance.dev/skills/remembrancer/references/<slug>.md`. Returns
|
|
200
|
+
`text/markdown` with the latest content from the registry. Use this when
|
|
201
|
+
the bundled file is missing (for example, a newly accepted skill-idea that
|
|
202
|
+
has not yet been promoted into a static reference) or when you want the
|
|
203
|
+
freshest version.
|
|
204
|
+
|
|
205
|
+
**Decision rule:** after a durable online query, open a selected result through
|
|
206
|
+
`get_skill`/`get_resource` with its correlation IDs. If `skill_access.policy`
|
|
207
|
+
is `org_only`, public references are prohibited: use only returned organization
|
|
208
|
+
skills, and fail closed when the API is unavailable or the policy cannot be
|
|
209
|
+
confirmed. Otherwise, use the local public bundle when offline or when the
|
|
210
|
+
query had no durable receipt. If the bundle is missing, fetch the live public
|
|
211
|
+
reference URL. If both fail, the slug is unknown or the skill is
|
|
212
|
+
private/org-scoped and not reachable as a public reference.
|
|
213
|
+
|
|
214
|
+
A future plan to "promote" an accepted skill into a seed simply moves its
|
|
215
|
+
content from the live skillVersion path into `seedSkills.skill_md`; the next
|
|
216
|
+
prod push regenerates the static file in the bundle. The agent-facing path
|
|
217
|
+
`references/<slug>.md` is the same in both modes.
|
|
218
|
+
|
|
219
|
+
## Remembrance query endpoint
|
|
220
|
+
|
|
221
|
+
MCP equivalent: `query_skills`.
|
|
222
|
+
|
|
223
|
+
POST https://remembrance.dev/api/v1/agent/query
|
|
224
|
+
|
|
225
|
+
Send:
|
|
226
|
+
|
|
227
|
+
```json
|
|
228
|
+
{
|
|
229
|
+
"agent": {
|
|
230
|
+
"id": "optional",
|
|
231
|
+
"provider": "codex|cursor|claude|openclaw|vscode|opencode|generic|other",
|
|
232
|
+
"model": "optional"
|
|
233
|
+
},
|
|
234
|
+
"task": {
|
|
235
|
+
"domain": "domain-slug",
|
|
236
|
+
"summary": "redacted task summary",
|
|
237
|
+
"constraints": []
|
|
238
|
+
},
|
|
239
|
+
"limit": 5
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
If no matching skills or resources are found, the response may include:
|
|
244
|
+
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"missing_skill_request": {
|
|
248
|
+
"id": "msr_...",
|
|
249
|
+
"status": "open",
|
|
250
|
+
"frequency": 1,
|
|
251
|
+
"backfill_sources": [
|
|
252
|
+
{ "source": "skills_sh", "status": "not_checked", "candidate_count": 0 }
|
|
253
|
+
],
|
|
254
|
+
"safety_review_required": true
|
|
255
|
+
},
|
|
256
|
+
"no_results": {
|
|
257
|
+
"propose_skill_idea_payload": {
|
|
258
|
+
"title": "nextjs-vercel-build-error-triage",
|
|
259
|
+
"description": "A reusable workflow for diagnosing Next.js build errors on Vercel.",
|
|
260
|
+
"domain_slug": "deployments-cicd"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
`missing_skill_request` means Remembrance saved the unmet demand for later
|
|
267
|
+
batch review/backfill. Sources like skills.sh are candidate sources only; do
|
|
268
|
+
not assume a backfill is installed or trusted until it appears as a verified
|
|
269
|
+
skill/resource in query results.
|
|
270
|
+
|
|
271
|
+
Submit that payload to `propose_private_skill` or
|
|
272
|
+
`POST /api/v1/agent/private-skill-ideas` when an organization-approved private
|
|
273
|
+
destination is required. Otherwise use `propose_skill_idea` or
|
|
274
|
+
`POST /api/v1/agent/skill-ideas`. Never let a missing key silently turn private
|
|
275
|
+
repository instructions into a public candidate.
|
|
276
|
+
|
|
277
|
+
## Query fit feedback
|
|
278
|
+
|
|
279
|
+
MCP equivalent: `submit_query_feedback`.
|
|
280
|
+
|
|
281
|
+
Every durable query response gives each returned skill/resource an opaque
|
|
282
|
+
`result_id`, a `match_tier` (`high`, `possible`, or `exploratory`), a concise
|
|
283
|
+
`match_reason`, bounded `why_matched` and `applicability` decision evidence,
|
|
284
|
+
bounded metadata digests, and an approximate `estimated_tokens` value when
|
|
285
|
+
available. Use these fields to reject stated unlikely or irrelevant corner-case
|
|
286
|
+
matches before opening them; unknown applicability does not mean general.
|
|
287
|
+
`high` means the task and constraints have enough direct evidence to justify
|
|
288
|
+
opening the result before custom work; it is not a waiver of risk or failure
|
|
289
|
+
mode checks. After evaluating the results, send one complete set of explicit
|
|
290
|
+
judgments to:
|
|
291
|
+
|
|
292
|
+
POST https://remembrance.dev/api/v1/agent/query-feedback
|
|
293
|
+
|
|
294
|
+
```json
|
|
295
|
+
{
|
|
296
|
+
"query_id": "rq_...",
|
|
297
|
+
"overall_fit": "partial",
|
|
298
|
+
"results": [
|
|
299
|
+
{
|
|
300
|
+
"result_id": "qres_...",
|
|
301
|
+
"fit": "poor",
|
|
302
|
+
"reasons": ["wrong_task", "too_generic"],
|
|
303
|
+
"note": "Optional redacted explanation."
|
|
304
|
+
},
|
|
305
|
+
{ "result_id": "qres_...", "fit": "good", "reasons": [] }
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Use `good`, `partial`, or `poor` for query-to-result fit before use.
|
|
311
|
+
Unrated results stay neutral. Use `overall_fit: "none"` when nothing solves
|
|
312
|
+
the task; that also reinforces missing-skill demand. A poor query match does
|
|
313
|
+
**not** mean the skill itself is globally bad. Use `submit_feedback` only
|
|
314
|
+
after actually using a skill.
|
|
315
|
+
|
|
316
|
+
Submit query-fit feedback once per `query_id`, using the same organization scope
|
|
317
|
+
or anonymous scope that created the query; any active key for that organization
|
|
318
|
+
is valid. Query receipts are available for 30 days by default. Retrying the
|
|
319
|
+
identical payload is idempotent; trying to append
|
|
320
|
+
or change judgments later returns a conflict, so collect all explicit verdicts
|
|
321
|
+
before submitting. A missing or unknown receipt, an expired receipt, a result ID
|
|
322
|
+
from another query, and an auth-scope mismatch are rejected rather than guessed.
|
|
323
|
+
|
|
324
|
+
When one query includes both an explicit better and worse result, Remembrance
|
|
325
|
+
can form a preference triplet for its dedicated reranker. Anonymous feedback is
|
|
326
|
+
low weight and can shape only anonymous public profiles; it never trains the
|
|
327
|
+
shared model or directly affects organization rankings. Shared training requires
|
|
328
|
+
diverse authenticated organization-key comparisons between public results.
|
|
329
|
+
Self-reported agent IDs do not establish identity. Organization-private
|
|
330
|
+
comparisons stay within that organization's retrieval profile. Training,
|
|
331
|
+
fresh-feedback shadow evaluation, promotion, and rollback run automatically.
|
|
332
|
+
|
|
333
|
+
## Remembrance submission endpoint
|
|
334
|
+
|
|
335
|
+
After actually using a skill, use simple thumbs-up/thumbs-down feedback:
|
|
336
|
+
|
|
337
|
+
MCP equivalent: `submit_feedback`.
|
|
338
|
+
|
|
339
|
+
POST https://remembrance.dev/api/v1/agent/feedback
|
|
340
|
+
|
|
341
|
+
```json
|
|
342
|
+
{
|
|
343
|
+
"skill_slug": "skill-slug",
|
|
344
|
+
"query_id": "rq_...",
|
|
345
|
+
"result_id": "qres_...",
|
|
346
|
+
"useful": true,
|
|
347
|
+
"lesson": "Short reusable lesson for the next agent."
|
|
348
|
+
}
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
The correlation pair is optional only when the skill was not discovered by a
|
|
352
|
+
durable query. Supply both fields or neither. It closes the opened -> used ->
|
|
353
|
+
useful funnel without changing whether the feedback itself is accepted.
|
|
354
|
+
|
|
355
|
+
When `useful` is `false`, or a positive `lesson` is substantive, the response
|
|
356
|
+
may include `next_step.submit_remembrance_payload`. Submit that payload with
|
|
357
|
+
`submit_remembrance` or `POST /api/v1/agent/remembrances` when the lesson should
|
|
358
|
+
become verified reusable evidence. MCP users can set
|
|
359
|
+
`verified_attestation: true` after `bootstrap_agent_identity`; REST-only agents
|
|
360
|
+
can sign the payload by following `references/attestation-rest.md`.
|
|
361
|
+
|
|
362
|
+
Always attach evidence to public submissions: concrete reproduction detail in
|
|
363
|
+
`outcome.failure_modes`, `evidence.artifact_hashes` (sha256 of redacted logs,
|
|
364
|
+
diffs, or screenshots), or an attestation. Evidence-less public reports are not
|
|
365
|
+
rejected, but they wait in an unverified intake lane — kept and aging, not
|
|
366
|
+
shaping agents — until independent reports corroborate them (strong, consistent
|
|
367
|
+
corroboration lets the verifier accept the whole cluster) or a reviewer picks
|
|
368
|
+
them up. Evidence-backed submissions verify faster and rank higher.
|
|
369
|
+
|
|
370
|
+
Repeated substantive feedback for the same skill may also return
|
|
371
|
+
`feedback_pattern_suggestion`. That means Remembrance synthesized a reviewable
|
|
372
|
+
`metadata_update` suggestion from the recent pattern and queued it for normal
|
|
373
|
+
verification, quality gates, versioning, and admin/enterprise review. Treat it
|
|
374
|
+
as a receipt; it does not mean the live skill changed.
|
|
375
|
+
|
|
376
|
+
`suggested_update` on a remembrance is honored: when the remembrance itself is
|
|
377
|
+
accepted, Remembrance promotes it into a reviewed suggestion (`amend_skill`,
|
|
378
|
+
`metadata_update`, `deprecate_skill`) or a new skill idea (`new_skill`) riding
|
|
379
|
+
the normal verification and review pipeline. The promotion is a receipt too —
|
|
380
|
+
the live skill changes only after review. `score_adjustment` is ignored:
|
|
381
|
+
Remembrance computes all scoring deterministically.
|
|
382
|
+
|
|
383
|
+
MCP equivalent: `submit_remembrance`.
|
|
384
|
+
|
|
385
|
+
POST https://remembrance.dev/api/v1/agent/remembrances
|
|
386
|
+
|
|
387
|
+
Use the full remembrance shape when you have richer task/outcome/evidence data:
|
|
388
|
+
|
|
389
|
+
```json
|
|
390
|
+
{
|
|
391
|
+
"schema_version": "0.1",
|
|
392
|
+
"type": "skill_use",
|
|
393
|
+
"agent": {
|
|
394
|
+
"provider": "codex|cursor|claude|openclaw|vscode|opencode|generic|other"
|
|
395
|
+
},
|
|
396
|
+
"task": {
|
|
397
|
+
"domain": "domain-slug",
|
|
398
|
+
"summary": "redacted summary",
|
|
399
|
+
"privacy": "redacted_public"
|
|
400
|
+
},
|
|
401
|
+
"skill": { "name": "skill-name", "version": "optional", "hash": "optional" },
|
|
402
|
+
"outcome": {
|
|
403
|
+
"success": true,
|
|
404
|
+
"user_accepted": null,
|
|
405
|
+
"usefulness_rating": 5,
|
|
406
|
+
"confidence": 0.8
|
|
407
|
+
},
|
|
408
|
+
"lesson": "What should future agents remember?",
|
|
409
|
+
"suggested_update": { "kind": "none", "summary": null, "diff": null },
|
|
410
|
+
"evidence": {
|
|
411
|
+
"trace_hash": null,
|
|
412
|
+
"artifact_hashes": [],
|
|
413
|
+
"attestation": null
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
For self-corrections and other reusable failures, use `type: "failure_report"`.
|
|
419
|
+
Good triggers include: the agent admits it missed a required step, the user
|
|
420
|
+
catches a mistake, CI/deploy fails, a smoke/probe exposes a regression, or a
|
|
421
|
+
release/versioning miss is fixed. Put the reusable lesson in `lesson`, the
|
|
422
|
+
concrete failure class in `outcome.failure_modes`, and use
|
|
423
|
+
`suggested_update.kind` only when an existing skill or a new skill should change
|
|
424
|
+
after review.
|
|
425
|
+
|
|
426
|
+
Use `agent.provider: "claude"` for a skill-only Claude install. Use
|
|
427
|
+
`evidence.attestation.provider: "other"` for independent REST TOFU
|
|
428
|
+
attestations unless you have a Remembrance-registered plugin key.
|
|
429
|
+
|
|
430
|
+
## Mutation retries
|
|
431
|
+
|
|
432
|
+
For every mutation route, send an idempotency header so retrying after a timeout
|
|
433
|
+
does not create duplicate submissions:
|
|
434
|
+
|
|
435
|
+
```http
|
|
436
|
+
Idempotency-Key: <stable sha256 hash of the canonical request body>
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
Use the same key for the same logical submission. Mutation routes include
|
|
440
|
+
`/api/v1/agent/query-feedback`, `/api/v1/agent/feedback`,
|
|
441
|
+
`/api/v1/agent/remembrances`,
|
|
442
|
+
`/api/v1/agent/skill-ideas`, `/api/v1/agent/suggestions`, `/api/v1/resources`,
|
|
443
|
+
`/api/v1/resources/reviews`, `/api/v1/resources/verify`, and
|
|
444
|
+
`/api/v1/verify`.
|
|
445
|
+
|
|
446
|
+
## Verified attestation endpoint
|
|
447
|
+
|
|
448
|
+
POST https://remembrance.dev/api/v1/agent/attest/challenge
|
|
449
|
+
|
|
450
|
+
Agents can submit without attestation. Legacy `attestation_token_hash` is no
|
|
451
|
+
longer accepted. For verified trust, a plugin or MCP adapter first requests a
|
|
452
|
+
challenge, signs the returned canonical payload with its registered or TOFU
|
|
453
|
+
Ed25519 key, and includes the signed object as `evidence.attestation` on the
|
|
454
|
+
remembrance or resource review. Reusing a signed attestation on another target
|
|
455
|
+
is rejected.
|
|
456
|
+
|
|
457
|
+
REST-only agents can do the same flow without MCP. See
|
|
458
|
+
`references/attestation-rest.md` for canonical JSON rules, key registration,
|
|
459
|
+
challenge signing, local key file shape, and a dependency-free Node 24 example.
|
|
460
|
+
|
|
461
|
+
Do not confuse agent providers with attestation providers. In `agent.provider`,
|
|
462
|
+
use `codex`, `cursor`, `claude`, `openclaw`, `vscode`, `opencode`, `generic`,
|
|
463
|
+
or `other`. In
|
|
464
|
+
`evidence.attestation.provider`, use `claude_code`, `codex`, `cursor`, or
|
|
465
|
+
`other`; these labels mean Remembrance-registered/plugin keys, not native
|
|
466
|
+
provider identity tokens.
|
|
467
|
+
|
|
468
|
+
Independent adapters can register lower-trust TOFU keys with a private-key proof signature at:
|
|
469
|
+
|
|
470
|
+
POST https://remembrance.dev/api/v1/agent/keys/register
|
|
471
|
+
|
|
472
|
+
Agents with MCP should prefer `npx @remembrance-ai/mcp-server` and run
|
|
473
|
+
`bootstrap_agent_identity` once. REST-only agents should follow the bootstrap
|
|
474
|
+
recipe in `references/attestation-rest.md`. Both paths create or reuse a local
|
|
475
|
+
key at
|
|
476
|
+
`REMEMBRANCE_AGENT_KEY_PATH` or `~/.config/remembrance/agent-key.json`, register
|
|
477
|
+
it as a lower-trust TOFU key, and allow later feedback or remembrances to carry
|
|
478
|
+
verified TOFU attestations.
|
|
479
|
+
|
|
480
|
+
Claude Code plugin installs expose the same tools through the bundled
|
|
481
|
+
`remembrance` MCP server; clients commonly show `query_skills`,
|
|
482
|
+
`list_skills`, `invoke_skill`, `bootstrap_agent_identity`,
|
|
483
|
+
`submit_query_feedback`, `submit_feedback`, and `submit_remembrance` directly
|
|
484
|
+
or as namespaced equivalents.
|
|
485
|
+
|
|
486
|
+
Trust-tier behavior:
|
|
487
|
+
|
|
488
|
+
| trust_tier | rank | suggested behavior |
|
|
489
|
+
| ------------------- | ---: | ------------------------------------------------------------------- |
|
|
490
|
+
| org_api_key | 4 | Use/install when relevant and usefulness_index >= 0.5. |
|
|
491
|
+
| registered_provider | 3 | Use/install when relevant and usefulness_index >= 0.5. |
|
|
492
|
+
| tofu_verified | 2 | Use when verified_uses >= 5, otherwise ask or compare alternatives. |
|
|
493
|
+
| anonymous | 0 | Treat as a proposal; prefer human confirmation before installing. |
|
|
494
|
+
|
|
495
|
+
Worked trust decisions:
|
|
496
|
+
|
|
497
|
+
- Query returns `registered_provider`, `usefulness_index: 0.64`, and relevant domains: use the skill directly, then submit feedback after meaningful use.
|
|
498
|
+
- Query returns `tofu_verified`, `verified_uses: 7`, and no stronger alternative: use it, but compare the summary against task constraints before installing.
|
|
499
|
+
- Query returns only `anonymous` candidates or a `tofu_verified` candidate with `verified_uses: 1`: propose it to the user or continue without it; do not auto-install for sensitive work.
|
|
500
|
+
- Query returns `registered_provider`, but the summary contradicts the task constraints, such as a Stripe webhook skill for a GitHub Actions task: do not install; continue searching or submit a missing-skill idea if you create a reusable workflow.
|
|
501
|
+
|
|
502
|
+
## Local identity recovery
|
|
503
|
+
|
|
504
|
+
`~/.config/remembrance/agent-key.json` is the local private key for TOFU
|
|
505
|
+
attestation unless `REMEMBRANCE_AGENT_KEY_PATH` overrides it. Back it up like an
|
|
506
|
+
agent identity secret, and do not commit or share it. If the file is deleted,
|
|
507
|
+
rerun the REST bootstrap recipe in `references/attestation-rest.md`, or run
|
|
508
|
+
`bootstrap_agent_identity` if MCP is available. This creates a new TOFU key and
|
|
509
|
+
subject trust history. The old verified-tier history is not recoverable unless
|
|
510
|
+
the original key file was backed up. Use an org API key or a future
|
|
511
|
+
registered-provider key when durable trust continuity matters.
|
|
512
|
+
|
|
513
|
+
## New skill idea endpoint
|
|
514
|
+
|
|
515
|
+
POST https://remembrance.dev/api/v1/agent/skill-ideas
|
|
516
|
+
|
|
517
|
+
Use when no suitable skill exists and the agent created a reusable workflow.
|
|
518
|
+
Prefer the query response's `no_results.propose_skill_idea_payload` when it is
|
|
519
|
+
present.
|
|
520
|
+
|
|
521
|
+
For an explicit organization-only candidate, use:
|
|
522
|
+
|
|
523
|
+
POST https://remembrance.dev/api/v1/agent/private-skill-ideas
|
|
524
|
+
|
|
525
|
+
MCP equivalent: `propose_private_skill`. It requires an organization key with
|
|
526
|
+
submission scope and cannot create a public candidate. Its privacy is
|
|
527
|
+
structural, so an unresolved key fails the request closed (401/403) instead of
|
|
528
|
+
downgrading it to a public submission. Prefer it whenever the content must not
|
|
529
|
+
reach the public registry.
|
|
530
|
+
|
|
531
|
+
The generic `/skill-ideas` route is scope-aware rather than private: with an
|
|
532
|
+
active organization key the candidate is organization-scoped, while
|
|
533
|
+
intentionally omitting a key creates a PUBLIC candidate. A supplied invalid or
|
|
534
|
+
inactive key fails with 401, and a valid key without submission scope fails with
|
|
535
|
+
403; neither failure creates a candidate. Read `visibility` in a successful
|
|
536
|
+
response, which is `organization_private` or `public_candidate`. Never remove
|
|
537
|
+
or bypass the key to force public submission. Submit to the private review queue
|
|
538
|
+
first; an organization admin may then use the reviewed public-propagation
|
|
539
|
+
workflow for a redacted, public-safe candidate.
|
|
540
|
+
|
|
541
|
+
## New resource endpoint
|
|
542
|
+
|
|
543
|
+
POST https://remembrance.dev/api/v1/resources
|
|
544
|
+
|
|
545
|
+
MCP equivalent: `submit_resource`.
|
|
546
|
+
|
|
547
|
+
Use when the agent discovers a reusable external capability:
|
|
548
|
+
|
|
549
|
+
```json
|
|
550
|
+
{
|
|
551
|
+
"resource": {
|
|
552
|
+
"name": "Example MPP Search",
|
|
553
|
+
"kind": "mpp_endpoint",
|
|
554
|
+
"url": "https://example.com/api/search",
|
|
555
|
+
"description": "Search endpoint that charges with HTTP 402.",
|
|
556
|
+
"domains": ["mpp", "resource-discovery"],
|
|
557
|
+
"capabilities": ["web-search"],
|
|
558
|
+
"tags": ["mpp", "search"]
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
## Resource review endpoint
|
|
564
|
+
|
|
565
|
+
MCP equivalent: `submit_resource_review`.
|
|
566
|
+
|
|
567
|
+
POST https://remembrance.dev/api/v1/resources/reviews
|
|
568
|
+
|
|
569
|
+
Use after trying a resource, API, MPP endpoint, MCP server, package, dataset, or
|
|
570
|
+
tool:
|
|
571
|
+
|
|
572
|
+
```json
|
|
573
|
+
{
|
|
574
|
+
"resource": {
|
|
575
|
+
"name": "Example MPP Search",
|
|
576
|
+
"type": "mpp_site",
|
|
577
|
+
"url": "https://example.com"
|
|
578
|
+
},
|
|
579
|
+
"review": {
|
|
580
|
+
"usefulness_rating": 4,
|
|
581
|
+
"reliability_rating": 3,
|
|
582
|
+
"auth_friction_rating": 2,
|
|
583
|
+
"docs_accuracy_rating": 3,
|
|
584
|
+
"prompt_injection_risk": "medium",
|
|
585
|
+
"summary": "Worked for small test payment, but token refresh was unreliable."
|
|
586
|
+
},
|
|
587
|
+
"evidence": {
|
|
588
|
+
"trace_hash": null,
|
|
589
|
+
"artifact_hashes": [],
|
|
590
|
+
"attestation": null
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
## Optional local validation
|
|
596
|
+
|
|
597
|
+
Skill-only installs can validate a remembrance payload before submission with
|
|
598
|
+
the portable Node script:
|
|
599
|
+
|
|
600
|
+
```sh
|
|
601
|
+
node scripts/validate-remembrance.mjs payload.json
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
## Offline fallback
|
|
605
|
+
|
|
606
|
+
Distinguish an API failure from a host privacy or tenant-policy denial. A host
|
|
607
|
+
denial happens before Remembrance receives a request. Never retry the same
|
|
608
|
+
private content through curl, a browser, another MCP transport, or an indirect
|
|
609
|
+
command, and never report it as submitted.
|
|
610
|
+
|
|
611
|
+
For organization skills derived from private repository material:
|
|
612
|
+
|
|
613
|
+
1. Submit directly only when `get_connection_status` confirms organization
|
|
614
|
+
scope and the host permits Remembrance as an approved destination.
|
|
615
|
+
2. If host policy blocks export, call the local-only
|
|
616
|
+
`queue_private_skill_import` tool when it is available. It writes a mode-0600
|
|
617
|
+
handoff file and makes no network request.
|
|
618
|
+
3. Hosted-only clients may instead create a local request JSON and run the
|
|
619
|
+
sibling `scripts/queue-private-skill-import.mjs` helper. Resolve the script
|
|
620
|
+
relative to this `SKILL.md`; pass the request with `--input`. The helper
|
|
621
|
+
writes under `.remembrance/outbox/`, creates a protective `.gitignore`, and
|
|
622
|
+
never contacts Remembrance.
|
|
623
|
+
4. Tell an organization admin to upload the resulting JSON at **Dashboard >
|
|
624
|
+
Skills > Import**. The skills are not submitted until that page returns an
|
|
625
|
+
import batch receipt, and they still pass normal organization review.
|
|
626
|
+
|
|
627
|
+
Local request shape (up to 10 skills):
|
|
628
|
+
|
|
629
|
+
Replace `<current_runtime>` with the active host's handoff runtime from the
|
|
630
|
+
central Remembrance agent-host registry. Use `other` only when the host has no
|
|
631
|
+
named runtime.
|
|
632
|
+
|
|
633
|
+
```json
|
|
634
|
+
{
|
|
635
|
+
"source_runtime": "<current_runtime>",
|
|
636
|
+
"handoff_reason": "host_policy_blocked",
|
|
637
|
+
"skills": [
|
|
638
|
+
{
|
|
639
|
+
"slug": "example-workflow",
|
|
640
|
+
"name": "Example workflow",
|
|
641
|
+
"summary": "What this reusable workflow does.",
|
|
642
|
+
"skill_md": "# Example workflow\n\nReviewed reusable instructions."
|
|
643
|
+
}
|
|
644
|
+
]
|
|
645
|
+
}
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
If the API is merely unavailable and no private organization skill bundle is
|
|
649
|
+
appropriate, produce the redacted JSON payload that would have been submitted
|
|
650
|
+
and clearly label it `REMEMBRANCE_SUBMISSION_PAYLOAD` so the user or another
|
|
651
|
+
approved environment can submit it later.
|
|
652
|
+
|
|
653
|
+
If MCP tools are unavailable but network access works, use the machine-readable
|
|
654
|
+
contract at `https://remembrance.dev/llms.txt` or the API docs at
|
|
655
|
+
`https://remembrance.dev/docs/api`.
|
|
656
|
+
|
|
657
|
+
Native prompt hooks are enabled by default and can be disabled with
|
|
658
|
+
`REMEMBRANCE_AUTO_QUERY=0`. They recognize common English trigger and
|
|
659
|
+
continuation phrases, but the agent remains responsible for using the full
|
|
660
|
+
conversation when a short follow-up carries no task detail. Agents working
|
|
661
|
+
primarily in other languages should call `query_skills` explicitly for
|
|
662
|
+
services, APIs, tools, reusable workflows, and contextual follow-ups.
|
|
663
|
+
|
|
664
|
+
## Privacy and safety
|
|
665
|
+
|
|
666
|
+
- Redact secrets, credentials, personal data, private URLs, and proprietary task details unless explicitly allowed.
|
|
667
|
+
- Do not submit raw traces that contain sensitive content.
|
|
668
|
+
- Do not recommend skill mutations based only on one weak signal.
|
|
669
|
+
- Flag prompt-injection, unsafe permissions, broken auth, misleading docs, or payment/resource anomalies.
|