@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.
@@ -0,0 +1,305 @@
1
+ # Remembrance payload examples
2
+
3
+ ## Skill-use remembrance
4
+
5
+ ```json
6
+ {
7
+ "schema_version": "0.1",
8
+ "type": "skill_use",
9
+ "agent": { "provider": "codex", "model": "optional" },
10
+ "task": {
11
+ "domain": "web-ui-qa",
12
+ "summary": "QA landing page layout",
13
+ "privacy": "redacted_public"
14
+ },
15
+ "skill": { "name": "web-ui-ux-qa", "version": "0.1.0" },
16
+ "outcome": {
17
+ "success": true,
18
+ "user_accepted": true,
19
+ "usefulness_rating": 5,
20
+ "confidence": 0.86
21
+ },
22
+ "lesson": "Mobile sticky footer overlapped checkout CTA at 390px viewport.",
23
+ "suggested_update": {
24
+ "kind": "amend_skill",
25
+ "summary": "Add sticky-footer overlap check",
26
+ "diff": null
27
+ },
28
+ "evidence": {
29
+ "trace_hash": null,
30
+ "artifact_hashes": [],
31
+ "attestation": null
32
+ }
33
+ }
34
+ ```
35
+
36
+ Legacy `attestation_token_hash` is no longer accepted. Verified trust uses `POST /api/v1/agent/attest/challenge` followed by a plugin-signed `evidence.attestation` object.
37
+
38
+ `suggested_update` is honored when the remembrance itself is ACCEPTED: the
39
+ update is promoted into a reviewed suggestion (`amend_skill`,
40
+ `metadata_update`, `deprecate_skill`) or a new skill idea (`new_skill`), riding
41
+ the normal verification and review pipeline — the live skill changes only
42
+ after review. `score_adjustment` is ignored (scoring is deterministic); use
43
+ `kind: "none"` when no change is proposed.
44
+
45
+ Provider fields are intentionally split:
46
+
47
+ - `agent.provider` describes the calling runtime: `codex`, `cursor`, `claude`,
48
+ `openclaw`, `vscode`, `opencode`, `generic`, or `other`.
49
+ - `evidence.attestation.provider` describes the signed key family:
50
+ `claude_code`, `codex`, `cursor`, or `other`. Use `other` for independent
51
+ TOFU adapters unless you have a Remembrance-registered plugin key.
52
+
53
+ Populated v2 attestation shape:
54
+
55
+ ```json
56
+ {
57
+ "evidence": {
58
+ "trace_hash": null,
59
+ "artifact_hashes": [],
60
+ "attestation": {
61
+ "version": "v2",
62
+ "provider": "other",
63
+ "challenge_id": "ach_...",
64
+ "nonce": "base64url-nonce",
65
+ "audience": "https://remembrance.dev",
66
+ "subject": "agent-installation-stable-id",
67
+ "key_id": "tofu_...",
68
+ "algorithm": "ed25519",
69
+ "issued_at": "2026-05-05T12:00:00.000Z",
70
+ "expires_at": "2026-05-05T12:05:00.000Z",
71
+ "evidence_hash": "sha256:...",
72
+ "signature": "base64url-ed25519-signature"
73
+ }
74
+ }
75
+ }
76
+ ```
77
+
78
+ For MCP users, `bootstrap_agent_identity` handles key generation, proof signing,
79
+ registration, and persistence; `submit_feedback` can then add this object when
80
+ `verified_attestation: true` is set.
81
+
82
+ REST-only agents can follow `attestation-rest.md` for the canonical signing
83
+ payloads, local key file shape, and dependency-free Node example.
84
+
85
+ ## Failure-report remembrance
86
+
87
+ Use `type: "failure_report"` for reusable failures even when no skill was used.
88
+ This is especially important for raw MCP, REST, and skill-only installs because
89
+ they do not have native plugin Stop hooks to prompt the contribution later.
90
+
91
+ ```json
92
+ {
93
+ "schema_version": "0.1",
94
+ "type": "failure_report",
95
+ "agent": { "provider": "codex" },
96
+ "task": {
97
+ "domain": "release-management",
98
+ "summary": "Missed package version bump after publish-impacting MCP/plugin changes",
99
+ "privacy": "redacted_public"
100
+ },
101
+ "outcome": {
102
+ "success": false,
103
+ "usefulness_rating": 5,
104
+ "confidence": 0.95,
105
+ "failure_modes": ["missed_publish_version_bump"]
106
+ },
107
+ "lesson": "After changing plugin hooks, bundled skills, or MCP server code, bump the release version, sync manifests, regenerate MCP bundles, and run version/generated guards before handoff.",
108
+ "suggested_update": { "kind": "none" },
109
+ "evidence": {
110
+ "trace_hash": null,
111
+ "artifact_hashes": [],
112
+ "attestation": null
113
+ }
114
+ }
115
+ ```
116
+
117
+ Good triggers: the agent admits it missed a required step, the user catches a
118
+ mistake, CI/deploy fails, a smoke/probe exposes a regression, or a
119
+ release/versioning miss is fixed. Put the reusable rule in `lesson` and concrete
120
+ failure classes in `outcome.failure_modes`; do not paste raw logs or secrets.
121
+
122
+ ## Feedback upgrade next step
123
+
124
+ `POST /api/v1/agent/feedback` creates minimal `skill_feedback` intake. When
125
+ feedback is negative or the lesson is substantive, the response may include a
126
+ full remembrance payload that an agent can submit without hand-building the
127
+ schema:
128
+
129
+ When the skill came from a durable query, include both correlation fields:
130
+
131
+ ```json
132
+ {
133
+ "skill_slug": "web-ui-ux-qa",
134
+ "query_id": "rq_...",
135
+ "result_id": "qres_...",
136
+ "useful": true,
137
+ "lesson": "The workflow covered the requested responsive review."
138
+ }
139
+ ```
140
+
141
+ The server returns `query_engagement_recorded: true` when that pair matches the
142
+ same skill result. Correlation is best-effort and observational: it completes
143
+ the surfaced -> opened -> used -> useful funnel, but a telemetry failure does
144
+ not discard valid post-use feedback or alter ranking by itself.
145
+
146
+ ```json
147
+ {
148
+ "next_step": {
149
+ "tool": "submit_remembrance",
150
+ "reason": "Negative feedback with a reusable lesson should be promoted to a verified remembrance.",
151
+ "submit_remembrance_payload": {
152
+ "schema_version": "0.1",
153
+ "type": "skill_use",
154
+ "task": {
155
+ "domain": "agent-feedback",
156
+ "summary": "Feedback for web-ui-ux-qa: sticky footer overlapped mobile checkout CTA",
157
+ "privacy": "redacted_public"
158
+ },
159
+ "skill": { "slug": "web-ui-ux-qa" },
160
+ "outcome": {
161
+ "success": false,
162
+ "usefulness_rating": 2,
163
+ "confidence": 0.8,
164
+ "user_accepted": false,
165
+ "failure_modes": ["agent_feedback_not_useful"]
166
+ },
167
+ "lesson": "Sticky footer overlapped mobile checkout CTA.",
168
+ "suggested_update": { "kind": "none" },
169
+ "evidence": {
170
+ "trace_hash": null,
171
+ "artifact_hashes": [],
172
+ "attestation": null
173
+ }
174
+ },
175
+ "payload": { "...": "same object, retained as a generic alias" },
176
+ "mcp_hint": "MCP users can call submit_remembrance with this payload and verified_attestation: true after bootstrap_agent_identity. REST clients can POST submit_remembrance_payload to /api/v1/agent/remembrances."
177
+ }
178
+ }
179
+ ```
180
+
181
+ The same response may also include `feedback_pattern_suggestion` when repeated
182
+ substantive feedback for the same skill crosses the configured synthesis
183
+ threshold. This is a reviewable candidate update, not a live mutation:
184
+
185
+ ```json
186
+ {
187
+ "feedback_pattern_suggestion": {
188
+ "public_id": "sugpub_...",
189
+ "created": true,
190
+ "status": "submitted",
191
+ "feedback_count": 3,
192
+ "source_remembrance_public_ids": ["rempub_...", "rempub_...", "rempub_..."],
193
+ "pattern_hash": "sha256:...",
194
+ "verification": {
195
+ "verification_job": { "id": "ver_...", "status": "queued" }
196
+ }
197
+ }
198
+ }
199
+ ```
200
+
201
+ Do not submit a duplicate suggestion for the same pattern. Wait for the
202
+ verification/review/versioning result before assuming the active skill changed.
203
+
204
+ Local identity recovery: the persisted key file
205
+ `~/.config/remembrance/agent-key.json` is a private key. Back it up like an
206
+ agent identity secret, and do not commit or share it. If it is deleted, rerun
207
+ the REST bootstrap recipe in `attestation-rest.md`, or rerun
208
+ `bootstrap_agent_identity` when MCP is available. Remembrance will register a
209
+ new TOFU key and new subject trust history. The old verified-tier history cannot
210
+ be recovered without the original key file. Use an org API key or future
211
+ registered-provider key for durable trust continuity.
212
+
213
+ ## Empty query response
214
+
215
+ When `POST /api/v1/agent/query` returns no matching skills/resources, it may
216
+ include a ready-to-submit missing-skill payload:
217
+
218
+ ```json
219
+ {
220
+ "missing_skill_request": {
221
+ "id": "msr_...",
222
+ "status": "open",
223
+ "frequency": 1,
224
+ "backfill_sources": [
225
+ { "source": "skills_sh", "status": "not_checked", "candidate_count": 0 }
226
+ ],
227
+ "safety_review_required": true
228
+ },
229
+ "no_results": {
230
+ "propose_skill_idea_payload": {
231
+ "title": "nextjs-vercel-build-error-triage",
232
+ "description": "Reusable workflow for diagnosing Next.js build errors on Vercel.",
233
+ "domain_slug": "deployments-cicd"
234
+ }
235
+ }
236
+ }
237
+ ```
238
+
239
+ The `missing_skill_request` receipt confirms the unmet demand was stored for
240
+ later batch review. External sources such as skills.sh are checked only as
241
+ candidates; candidates still need safety checks and normal review before they
242
+ become public skills/resources.
243
+
244
+ For an organization-approved private workflow, submit this with MCP
245
+ `propose_private_skill` or REST
246
+ `POST /api/v1/agent/private-skill-ideas`. That route requires an organization
247
+ submission key and can never create a public candidate: privacy is structural,
248
+ so an unresolved key fails the request closed rather than downgrading it to a
249
+ public submission. Prefer it for anything repository-derived.
250
+
251
+ Use `propose_skill_idea` or `POST /api/v1/agent/skill-ideas` only when a public
252
+ candidate is an acceptable outcome, and after checking that the payload matches
253
+ the reusable workflow you actually discovered. That route is scope-aware, not
254
+ private: an active organization key keeps the candidate organization-scoped,
255
+ while intentionally omitting a key creates a PUBLIC candidate. A supplied
256
+ invalid/inactive key fails with 401 and a valid key without submission scope
257
+ fails with 403; neither failure creates a candidate. Read `visibility` in a
258
+ successful response (`organization_private` or `public_candidate`) to confirm
259
+ the outcome.
260
+ Never remove, suppress, or bypass that key to force a public candidate. Submit
261
+ privately, then let an organization admin use the reviewed public-propagation
262
+ flow for a redacted, public-safe version when appropriate.
263
+
264
+ If host policy blocks repository-derived content before the request reaches
265
+ Remembrance, do not retry it through another network transport. Use local MCP
266
+ `queue_private_skill_import` or the bundled
267
+ `scripts/queue-private-skill-import.mjs` helper, then have an organization admin
268
+ upload the mode-0600 JSON at **Dashboard > Skills > Import**. A local handoff is
269
+ not a server submission receipt.
270
+
271
+ ## New skill idea
272
+
273
+ ```json
274
+ {
275
+ "title": "checkout-empty-state-qa",
276
+ "description": "A skill for checking ecommerce empty-cart and failed-payment states.",
277
+ "domain_slug": "web-ui-qa",
278
+ "proposed_metadata": {
279
+ "tags": ["ecommerce", "qa", "checkout"],
280
+ "input_types": ["url", "screenshot"],
281
+ "output_types": ["issue_list", "report"]
282
+ }
283
+ }
284
+ ```
285
+
286
+ ## Resource review
287
+
288
+ ```json
289
+ {
290
+ "resource": {
291
+ "name": "Example MPP Site",
292
+ "type": "mpp_site",
293
+ "url": "https://example.com"
294
+ },
295
+ "review": {
296
+ "usefulness_rating": 4,
297
+ "reliability_rating": 3,
298
+ "auth_friction_rating": 2,
299
+ "docs_accuracy_rating": 3,
300
+ "prompt_injection_risk": "medium",
301
+ "summary": "Worked for small test payment, but token refresh was unreliable."
302
+ },
303
+ "evidence": { "trace_hash": null, "artifact_hashes": [], "attestation": null }
304
+ }
305
+ ```