<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Davincc77</title>
    <description>The latest articles on DEV Community by Davincc77 (@davincc77).</description>
    <link>https://dev.to/davincc77</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3945525%2Fb8e950f2-4682-4588-b01e-ab6c9a2cd73e.jpeg</url>
      <title>DEV Community: Davincc77</title>
      <link>https://dev.to/davincc77</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/davincc77"/>
    <language>en</language>
    <item>
      <title>x.klickd v4.1: Portable, Encrypted, Human-Governed Memory for AI Workflows That Don’t Reset</title>
      <dc:creator>Davincc77</dc:creator>
      <pubDate>Sun, 31 May 2026 00:00:32 +0000</pubDate>
      <link>https://dev.to/davincc77/xklickd-v41-portable-encrypted-human-governed-memory-for-ai-workflows-that-dont-reset-60p</link>
      <guid>https://dev.to/davincc77/xklickd-v41-portable-encrypted-human-governed-memory-for-ai-workflows-that-dont-reset-60p</guid>
      <description>&lt;p&gt;While everyone celebrates the collapse of token costs, we are still measuring the wrong thing.&lt;br&gt;
The real problem is not only the price of the token anymore. It is that memory remains disposable.&lt;/p&gt;

&lt;p&gt;AI does not just need better models. It needs memory that travels with you: portable, bounded, inspectable, encrypted, governed by humans, and able to survive beyond a single session.&lt;br&gt;
That is exactly what  .klickd  has been building from day one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyebr90cjmvop2goo7yok.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyebr90cjmvop2goo7yok.png" alt="long running workflows coherent" width="800" height="504"&gt;&lt;/a&gt;&lt;br&gt;
Today I am releasing x.klickd v4.1, with its full DOI evidence pack, npm and PyPI packages:&lt;br&gt;
• DOI: &lt;a href="https://doi.org/10.5281/zenodo.20459934" rel="noopener noreferrer"&gt;https://doi.org/10.5281/zenodo.20459934&lt;/a&gt;&lt;br&gt;
• GitHub: &lt;a href="https://github.com/Davincc77/klickdskill" rel="noopener noreferrer"&gt;https://github.com/Davincc77/klickdskill&lt;/a&gt;&lt;br&gt;
• npm:  @klickd/&lt;a href="mailto:core@4.1.0"&gt;core@4.1.0&lt;/a&gt; &lt;br&gt;
• PyPI:  klickd==4.1.0 &lt;br&gt;
&lt;strong&gt;The problem: AI memory is still too disposable.&lt;/strong&gt;&lt;br&gt;
Most long AI workflows still rebuild context inside prompts. At first, this feels harmless. A few reminders, a few project notes, a few constraints. But as the workflow grows, prompt-history memory grows with it.&lt;br&gt;
Token consumption rises. Latency can increase. Context gets noisier. Contradictions accumulate. The model may still answer, but continuity becomes harder to trust.&lt;br&gt;
That matters for coding, education, research, governance, security reviews, agent workflows, gaming, robotics, drones and mission-heavy systems. In those environments, memory is not decoration. It is operational infrastructure.&lt;br&gt;
&lt;strong&gt;What&lt;/strong&gt;  .klickd  &lt;strong&gt;proposes&lt;/strong&gt;&lt;br&gt;
 .klickd  explores a different architecture: a portable, encrypted memory file that can carry structured skills, preferences, constraints, evidence, policies and optional compressed memory across sessions, models, agents and devices.&lt;br&gt;
The AI model does not decrypt the  .klickd  file. A trusted runtime does. The model only receives the safe, relevant, sanitized context selected for the task.&lt;br&gt;
The goal is not to make prompts longer. The goal is to make memory more responsible.&lt;br&gt;
&lt;strong&gt;When it all  .klickd &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtpowr89r8zcknwlafh1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtpowr89r8zcknwlafh1.png" alt="x.klickd radar matrix" width="800" height="515"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The turning point came when the skill catalogue stopped being a catalogue at all. It became an architecture: a shared competency backbone, domain-specific layers, governance rules, evidence policies, human-veto mechanisms and optional compressed memory.&lt;br&gt;
That was the moment it all  .klickd .&lt;br&gt;
The benchmark did not invent the idea. It stress-tested it. And under that pressure, the architecture began to reveal its core promise: AI memory does not have to grow noisier as projects grow longer. With the right structure, it can become more portable, more bounded, more governed, and more useful.&lt;br&gt;
In v4.1,  .klickd  is not presented as a universal standard. It is not claiming native support across all AI systems. It is a working open format and reference architecture showing how portable AI memory can function in practice.&lt;br&gt;
&lt;strong&gt;What v4.1 includes&lt;/strong&gt;&lt;br&gt;
v4.1 turns  .klickd  from a promising format into a more serious architecture. It includes:&lt;br&gt;
• a mapped x.klickd competency matrix;&lt;br&gt;
• structured Lite and Pro skill packs;&lt;br&gt;
• governance rules;&lt;br&gt;
• evidence policies;&lt;br&gt;
• human-veto mechanisms;&lt;br&gt;
• optional  compressed_memory  for longer workflows;&lt;br&gt;
• npm and PyPI packages;&lt;br&gt;
• a DOI evidence pack with benchmark reports, scripts, metadata and limitations.&lt;br&gt;
Compression is not the whole story. The first efficiency layer comes from structure: deciding what should be remembered, how it should be organized, what can be safely injected, and what must remain governed. Optional compressed memory is the second layer, especially useful when projects become long enough that repeated context becomes structurally expensive.&lt;br&gt;
The principle is simple:&lt;br&gt;
Maximal quality input for minimal token size&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftbicpdep6vfgezkum450.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftbicpdep6vfgezkum450.png" alt="repeated context overhead" width="800" height="448"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Benchmark result: repeated context overhead&lt;/strong&gt;&lt;br&gt;
The v4.1 benchmark tests the kind of workflow  .klickd  was designed for: long-running, multi-session, multi-condition AI projects.&lt;br&gt;
It compares multiple conditions: no memory, prompt-history memory, manual context repetition, project-docs-only context, static  .klickd , compressed  .klickd , cross-session resume, cross-language continuity, cross-agent continuity, human-veto behavior, contradiction handling and CI-weakening resistance.&lt;br&gt;
The completed benchmark aggregate covers four complete bundles:&lt;br&gt;
• 7,200 expected outputs;&lt;br&gt;
• 7,189 valid outputs;&lt;br&gt;
• 11 errors;&lt;br&gt;
• 99.85% completion rate.&lt;br&gt;
Compared with prompt-history memory:&lt;br&gt;
• static x.klickd bundles reduced repeated input-token overhead by approximately 76.49%;&lt;br&gt;
• optional  compressed_memory  reduced repeated input-token overhead by approximately 93.34%;&lt;br&gt;
• governance conditions such as cross-session resume, cross-language continuity, cross-agent handoff, human-veto, contradiction handling and CI-weakening resistance remained in the same efficiency band, around 92.3-92.9% reduction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quality scoring&lt;/strong&gt;&lt;br&gt;
The benchmark also includes automatic long-project quality scoring across the 12 tested conditions.&lt;br&gt;
Under this benchmark-specific rubric:&lt;br&gt;
• x.klickd condition family mean: 86.24 / 100;&lt;br&gt;
• standard AI usage without x.klickd: 58.51 / 100;&lt;br&gt;
• best x.klickd condition,  xklickd_compressed_bundle : 88.79 / 100;&lt;br&gt;
• best non-x.klickd baseline,  project_docs_only : 73.62 / 100.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkbirqb0ck5la25d3raio.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkbirqb0ck5la25d3raio.png" alt="quality scoring" width="799" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“Standard AI usage without x.klickd” means no portable memory file: prompt-history memory, project documents, or no memory.&lt;br&gt;
This is not a general intelligence score. It is an automatic, benchmark-specific long-project score built from completion, bounded memory, context architecture, early resume, language switch, cross-agent handoff, contradiction handling, human-veto / CI behavior and final delivery persistence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why the bundle 5 incident matters&lt;/strong&gt;&lt;br&gt;
The fifth bundle,  b05_drone_mission_ops , was excluded from the aggregate. It passed a 24/24 mini-probe after the Gemini cap was adjusted, but the full run hit provider quota and rate-limit constraints before completion.&lt;br&gt;
That is not a failure of the x.klickd architecture. It is a provider-capacity limitation in a hard stress scenario. It is documented separately in the DOI evidence pack.&lt;br&gt;
The process also improved the benchmark harness itself. PR #91 added request timeouts, wall-clock caps, progress logging and deadlock-resistant execution. PR #92 classified provider spend-cap exhaustion as terminal rather than retrying until the job timed out.&lt;br&gt;
A serious benchmark is not one where nothing goes wrong. A serious benchmark is one where failures are visible, classified, fixed and documented.&lt;br&gt;
&lt;strong&gt;Where this fits in the memory landscape&lt;/strong&gt;&lt;br&gt;
The need for AI memory is not unique to  .klickd . Many systems are exploring agent memory, graph memory, project memory, MCP memory and persistent assistant state.&lt;br&gt;
 .klickd  takes a specific stance inside that landscape:&lt;br&gt;
• memory should be portable;&lt;br&gt;
• memory should be encrypted;&lt;br&gt;
• memory should be user-owned or organization-governed;&lt;br&gt;
• memory should carry skills and responsibility, not only chat history;&lt;br&gt;
• memory should remain bounded rather than becoming an endless prompt-history archive.&lt;br&gt;
Future evaluation should compare  .klickd  against established long-term memory benchmarks such as LongMemEval and agentic multi-session environments such as MemoryArena. The current v4.1 benchmark focuses on long-project continuity, governance conditions and repeated-context overhead rather than claiming direct superiority on public memory benchmarks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Beyond chat&lt;/strong&gt;&lt;br&gt;
If this architecture scales,  .klickd  is not only relevant to chat assistants.&lt;br&gt;
It becomes relevant to coding projects that last hundreds of sessions, student learning continuity, AI tutors, persistent NPCs in gaming worlds, drones and mission operations, robotics, space missions, agentic workflows and AI-native operating systems.&lt;br&gt;
A drone mission, a long software migration, a student learning path, a persistent game character or a multi-agent research project cannot rely forever on copy-pasted summaries and growing prompt histories. They need structured continuity. They need memory that can be inspected, constrained, transferred and governed.&lt;br&gt;
&lt;strong&gt;Limits&lt;/strong&gt;&lt;br&gt;
 .klickd  is not yet universal. It does not provide automatic GDPR or EU AI Act compliance. It does not replace spend caps, RBAC, audit logs, provider controls, security reviews or deployment governance.&lt;br&gt;
The current v4.1 release shows that  .klickd  can work as a portable, encrypted memory format in controlled long-project benchmarks. Broader adoption requires adapters, UX work, independent replication, security validation and integration into real runtimes.&lt;br&gt;
That distinction matters. The ambition is large, but the claim must stay precise.&lt;br&gt;
&lt;strong&gt;Try it&lt;/strong&gt;&lt;br&gt;
npm: Benchmark result: repeated context overhead&lt;br&gt;
The v4.1 benchmark tests the kind of workflow  .klickd  was designed for: long-running, multi-session, multi-condition AI projects.&lt;br&gt;
It compares multiple conditions: no memory, prompt-history memory, manual context repetition, project-docs-only context, static  .klickd , compressed  .klickd , cross-session resume, cross-language continuity, cross-agent continuity, human-veto behavior, contradiction handling and CI-weakening resistance.&lt;br&gt;
The completed benchmark aggregate covers four complete bundles:&lt;br&gt;
• 7,200 expected outputs;&lt;br&gt;
• 7,189 valid outputs;&lt;br&gt;
• 11 errors;&lt;br&gt;
• 99.85% completion rate.&lt;br&gt;
Compared with prompt-history memory:&lt;br&gt;
• static x.klickd bundles reduced repeated input-token overhead by approximately 76.49%;&lt;br&gt;
• optional  compressed_memory  reduced repeated input-token overhead by approximately 93.34%;&lt;br&gt;
• governance conditions such as cross-session resume, cross-language continuity, cross-agent handoff, human-veto, contradiction handling and CI-weakening resistance remained in the same efficiency band, around 92.3-92.9% reduction.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4uabw8xzg7rlkqxdeww3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4uabw8xzg7rlkqxdeww3.png" alt="token reduction" width="799" height="441"&gt;&lt;/a&gt;&lt;br&gt;
Quality scoring&lt;br&gt;
The benchmark also includes automatic long-project quality scoring across the 12 tested conditions.&lt;br&gt;
Under this benchmark-specific rubric:&lt;br&gt;
• x.klickd condition family mean: 86.24 / 100;&lt;br&gt;
• standard AI usage without x.klickd: 58.51 / 100;&lt;br&gt;
• best x.klickd condition,  xklickd_compressed_bundle : 88.79 / 100;&lt;br&gt;
• best non-x.klickd baseline,  project_docs_only : 73.62 / 100.&lt;br&gt;
“Standard AI usage without x.klickd” means no portable memory file: prompt-history memory, project documents, or no memory.&lt;br&gt;
This is not a general intelligence score. It is an automatic, benchmark-specific long-project score built from completion, bounded memory, context architecture, early resume, language switch, cross-agent handoff, contradiction handling, human-veto / CI behavior and final delivery persistence.&lt;br&gt;
[x.klickd v4.1 quality score: ./xklickd_v41_quality_score_final.png]&lt;br&gt;
Why the bundle 5 incident matters&lt;br&gt;
The fifth bundle,  b05_drone_mission_ops , was excluded from the aggregate. It passed a 24/24 mini-probe after the Gemini cap was adjusted, but the full run hit provider quota and rate-limit constraints before completion.&lt;br&gt;
That is not a failure of the x.klickd architecture. It is a provider-capacity limitation in a hard stress scenario. It is documented separately in the DOI evidence pack.&lt;br&gt;
The process also improved the benchmark harness itself. PR #91 added request timeouts, wall-clock caps, progress logging and deadlock-resistant execution. PR #92 classified provider spend-cap exhaustion as terminal rather than retrying until the job timed out.&lt;br&gt;
A serious benchmark is not one where nothing goes wrong. A serious benchmark is one where failures are visible, classified, fixed and documented.&lt;br&gt;
Where this fits in the memory landscape&lt;br&gt;
The need for AI memory is not unique to  .klickd . Many systems are exploring agent memory, graph memory, project memory, MCP memory and persistent assistant state.&lt;br&gt;
 .klickd  takes a specific stance inside that landscape:&lt;br&gt;
• memory should be portable;&lt;br&gt;
• memory should be encrypted;&lt;br&gt;
• memory should be user-owned or organization-governed;&lt;br&gt;
• memory should carry skills and responsibility, not only chat history;&lt;br&gt;
• memory should remain bounded rather than becoming an endless prompt-history archive.&lt;br&gt;
Future evaluation should compare  .klickd  against established long-term memory benchmarks such as LongMemEval and agentic multi-session environments such as MemoryArena. The current v4.1 benchmark focuses on long-project continuity, governance conditions and repeated-context overhead rather than claiming direct superiority on public memory benchmarks.&lt;br&gt;
Beyond chat&lt;br&gt;
If this architecture scales,  .klickd  is not only relevant to chat assistants.&lt;br&gt;
It becomes relevant to coding projects that last hundreds of sessions, student learning continuity, AI tutors, persistent NPCs in gaming worlds, drones and mission operations, robotics, space missions, agentic workflows and AI-native operating systems.&lt;br&gt;
A drone mission, a long software migration, a student learning path, a persistent game character or a multi-agent research project cannot rely forever on copy-pasted summaries and growing prompt histories. They need structured continuity. They need memory that can be inspected, constrained, transferred and governed.&lt;br&gt;
Limits&lt;br&gt;
 .klickd  is not yet universal. It does not provide automatic GDPR or EU AI Act compliance. It does not replace spend caps, RBAC, audit logs, provider controls, security reviews or deployment governance.&lt;br&gt;
The current v4.1 release shows that  .klickd  can work as a portable, encrypted memory format in controlled long-project benchmarks. Broader adoption requires adapters, UX work, independent replication, security validation and integration into real runtimes.&lt;br&gt;
That distinction matters. The ambition is large, but the claim must stay precise.&lt;br&gt;
Try it&lt;br&gt;
npm: npm install @klickd/core&lt;br&gt;
python: pip install klickd&lt;br&gt;
Evidence pack:&lt;br&gt;
&lt;a href="https://doi.org/10.5281/zenodo.20459934" rel="noopener noreferrer"&gt;https://doi.org/10.5281/zenodo.20459934&lt;/a&gt;&lt;br&gt;
GitHub:&lt;br&gt;
&lt;a href="https://github.com/Davincc77/klickdskill" rel="noopener noreferrer"&gt;https://github.com/Davincc77/klickdskill&lt;/a&gt;&lt;br&gt;
Conclusion&lt;br&gt;
The broader question is no longer only which model is most capable. It is how memory, authority, continuity and trust should be carried across the systems that increasingly mediate human work.&lt;br&gt;
If AI becomes infrastructure, memory cannot remain trapped inside disposable sessions. It needs to become portable, inspectable and governed by the people and organizations it serves.&lt;br&gt;
That is the direction  .klickd  is designed to explore.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>agentskills</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>.klickd v4.0.0 — Portable AI memory with constraints, strict schemas, and test vectors</title>
      <dc:creator>Davincc77</dc:creator>
      <pubDate>Mon, 25 May 2026 19:45:56 +0000</pubDate>
      <link>https://dev.to/davincc77/klickd-v400-portable-ai-memory-with-constraints-strict-schemas-and-test-vectors-gp1</link>
      <guid>https://dev.to/davincc77/klickd-v400-portable-ai-memory-with-constraints-strict-schemas-and-test-vectors-gp1</guid>
      <description>&lt;p&gt;Every new AI session starts cold. You re-explain who you are, what you're building, what constraints you're working under. If you switch models — GPT-4o to Claude to a local Llama — it's a clean slate again. This isn't a model quality problem. It's an architecture gap: there is no portable, user-owned state layer sitting between the user and the model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffev4x3z5iphs1fkdxou4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffev4x3z5iphs1fkdxou4.jpg" alt="developper.klickd" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.klickd&lt;/code&gt; is an attempt to build that layer as an open format. Today &lt;strong&gt;v4.0.0 GA&lt;/strong&gt; ships — the first production-stable release of the v4 track. Here is exactly what it contains, written for someone who is going to read the code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All links:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub Release: &lt;a href="https://github.com/Davincc77/klickdskill/releases/tag/v4.0.0" rel="noopener noreferrer"&gt;https://github.com/Davincc77/klickdskill/releases/tag/v4.0.0&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Zenodo DOI: &lt;a href="https://doi.org/10.5281/zenodo.20383133" rel="noopener noreferrer"&gt;https://doi.org/10.5281/zenodo.20383133&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;PyPI: &lt;a href="https://pypi.org/project/klickd/" rel="noopener noreferrer"&gt;https://pypi.org/project/klickd/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;npm: &lt;a href="https://www.npmjs.com/package/@klickd/core" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/@klickd/core&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Format site: &lt;a href="https://klickd.app/klickdskill" rel="noopener noreferrer"&gt;https://klickd.app/klickdskill&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  What a &lt;code&gt;.klickd&lt;/code&gt; file is
&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;.klickd&lt;/code&gt; file is a single JSON document, encrypted client-side. No server required. No account. The user holds the passphrase — it never leaves the device.&lt;/p&gt;

&lt;p&gt;When loaded into a compatible client, the decrypted payload is injected as a system prompt (or context prefix) into the AI session. The model receives structured data: identity, preferences, constraints, memory items, verification gates. It resumes rather than restarts.&lt;/p&gt;




&lt;h3&gt;
  
  
  The crypto envelope — frozen at &lt;code&gt;klickd_version: "3.0"&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The wire format does not change in v4. The envelope contract was frozen in the v3.x track and is intentionally unchanged.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;KDF&lt;/td&gt;
&lt;td&gt;Argon2id — m=65536, t=3, p=4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Legacy KDF&lt;/td&gt;
&lt;td&gt;PBKDF2-SHA256 / 600,000 iterations (v2.x backward compat)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cipher&lt;/td&gt;
&lt;td&gt;AES-256-GCM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IV&lt;/td&gt;
&lt;td&gt;12 bytes, CSPRNG&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Salt&lt;/td&gt;
&lt;td&gt;16 bytes, CSPRNG&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AAD&lt;/td&gt;
&lt;td&gt;RFC 8785 JCS-canonicalized over 6 envelope fields&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Base64&lt;/td&gt;
&lt;td&gt;RFC 4648 §4, standard padded&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GCM tag&lt;/td&gt;
&lt;td&gt;16 bytes, appended to ciphertext before base64&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The 6-field JCS-canonicalized AAD is the detail most implementations get wrong. It binds the ciphertext to the envelope metadata — if you swap the &lt;code&gt;domain&lt;/code&gt; field or alter KDF parameters, the GCM tag won't verify. Both reference implementations apply this on every encrypt and verify on every decrypt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;v4 is signaled inside the payload, not the wire envelope:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"klickd_version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"3.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"created_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-05-25T00:00:00Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"encrypted"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"kdf"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"argon2id"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"m"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;65536&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"t"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"p"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"salt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;base64&amp;gt;"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"cipher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"AES-256-GCM"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"iv"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;base64&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"tag_len"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"domain"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"education"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ciphertext"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;base64 AES-256-GCM ciphertext + 16-byte GCM tag&amp;gt;"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A v3.x reader can open a v4 file without changes — the crypto is identical. It will see unknown payload fields and is expected to ignore them. This is the explicit versioning contract.&lt;/p&gt;




&lt;h3&gt;
  
  
  What's new in the v4 payload
&lt;/h3&gt;

&lt;p&gt;v4.0.0 promotes five additive surface areas to GA. No v3.x field is removed, renamed, or repurposed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. &lt;code&gt;profile_kind&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A top-level enum: &lt;code&gt;learner&lt;/code&gt;, &lt;code&gt;professional&lt;/code&gt;, &lt;code&gt;agent&lt;/code&gt;, &lt;code&gt;family&lt;/code&gt;, &lt;code&gt;research&lt;/code&gt;. Lets readers surface different UI affordances without inspecting the full payload.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. &lt;code&gt;verification_gates&lt;/code&gt; — the most architecturally interesting addition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A sparse, declarative map from &lt;code&gt;action_class&lt;/code&gt; to gate level:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"verification_gates"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"gates"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action_class"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"public_post"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="nl"&gt;"level"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"confirm"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action_class"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"factual_claim_about_person"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"level"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"block"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action_class"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"casual_media_generation"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nl"&gt;"level"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"silent"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"action_class"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"consent_change"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="nl"&gt;"level"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"require-owner"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Gate levels ordered by friction: &lt;code&gt;silent&lt;/code&gt; → &lt;code&gt;warn&lt;/code&gt; → &lt;code&gt;confirm&lt;/code&gt; → &lt;code&gt;block&lt;/code&gt; → &lt;code&gt;require-owner&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is a &lt;em&gt;UX friction signal&lt;/em&gt;, not a security boundary. The spec's design principle: verification gates must not push agents toward compliance-form UX for ordinary creative work. Unlisted action classes default to &lt;code&gt;silent&lt;/code&gt;. The user sets the friction profile once; it travels with the file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. &lt;code&gt;human_veto_policy&lt;/code&gt; — the override layer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Any action class in &lt;code&gt;human_veto_policy.applies_to&lt;/code&gt; requires a human in the loop regardless of gate level or model confidence. The spec states this is sacred: no automatic mechanism may lower a gate past a &lt;code&gt;human_veto_policy&lt;/code&gt; floor.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"human_veto_policy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"applies_to"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"public_post"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"consent_change"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"identity_assertion"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"second_party"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. &lt;code&gt;claim_sources&lt;/code&gt; and &lt;code&gt;verification_artifacts&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;claim_sources&lt;/code&gt; declares where the agent should ground factual claims. &lt;code&gt;verification_artifacts&lt;/code&gt; is a pointer ledger — not a payload sink — of outputs already produced by expensive verification commands. The next agent can consult it and skip re-running what was already verified.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. &lt;code&gt;migration&lt;/code&gt; block&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Audit-only metadata recording &lt;code&gt;source_version&lt;/code&gt;, &lt;code&gt;migrated_at&lt;/code&gt;, &lt;code&gt;migration_report_ref&lt;/code&gt;, and &lt;code&gt;backup_ref&lt;/code&gt;. Points to where migration reports live; does not contain migrated data.&lt;/p&gt;




&lt;h3&gt;
  
  
  Non-destructive v3.x → v4 migrator
&lt;/h3&gt;

&lt;p&gt;Design invariant: &lt;strong&gt;"Never break the soul."&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;klickd&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;migrate_klickd&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;profile_v3.klickd&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rb&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;v3_bytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;v4_bytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;migrate_klickd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;v3_bytes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;passphrase&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my-passphrase&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;profile_v4.klickd&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;wb&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;v4_bytes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;migrateKlickd&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@klickd/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;writeFileSync&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;v3Bytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;profile_v3.klickd&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;v4Bytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;migrateKlickd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;v3Bytes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;passphrase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;my-passphrase&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nf"&gt;writeFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;profile_v4.klickd&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;v4Bytes&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The migrator writes a &lt;strong&gt;new file&lt;/strong&gt;. The original is never overwritten. Unknown v3.x fields are preserved verbatim — v4 readers must carry unknown fields through on round-trip, not strip them. The migrator refuses to write if the output would be lossy.&lt;/p&gt;




&lt;h3&gt;
  
  
  Strict JSON Schemas (Draft 2020-12)
&lt;/h3&gt;

&lt;p&gt;Two schemas ship:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;schemas/klickd-payload-v4.schema.json&lt;/code&gt; — validates the decrypted payload only&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;schema/klickd-v4.schema.json&lt;/code&gt; — unified envelope + payload&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both set &lt;code&gt;additionalProperties: false&lt;/code&gt; on controlled sub-objects. &lt;code&gt;payload_schema_version&lt;/code&gt; is required and enumerated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python validation:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;klickd&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;validate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;validate_iter_errors&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;KlickdError&lt;/span&gt;

&lt;span class="c1"&gt;# Raises KlickdError(KLICKD_E_SCHEMA) on failure
&lt;/span&gt;&lt;span class="nf"&gt;validate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;strict&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Non-raising: yields every (path, message) pair
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;validate_iter_errors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;strict&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;  &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"klickd[validate]"&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; @klickd/core ajv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Cross-implementation test vectors
&lt;/h3&gt;

&lt;p&gt;v4.0.0 ships &lt;code&gt;tests/verify_vectors.py&lt;/code&gt; and &lt;code&gt;tests/verify_vectors.ts&lt;/code&gt;. Each vector specifies: passphrase, KDF parameters (Argon2id: m, t, p, exact salt in hex), plaintext payload (UTF-8 JSON), and expected decrypted output. Both suites run against the same vectors in CI on every push.&lt;/p&gt;

&lt;p&gt;If you're implementing &lt;code&gt;.klickd&lt;/code&gt; in another language, fork these and run your implementation against them. If you pass, the crypto contract is correct.&lt;/p&gt;




&lt;h3&gt;
  
  
  Quick start
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Python:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;klickd&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;load_klickd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;save_klickd&lt;/span&gt;

&lt;span class="c1"&gt;# Load
&lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;profile.klickd&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;rb&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_klickd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;passphrase&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my-passphrase&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;identity&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;memory&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="c1"&gt;# Save
&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;payload_schema_version&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;4.0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;identity&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Alice&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;language&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;en&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;timezone&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Europe/Luxembourg&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;agent_instructions&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Be concise. Resume as if you have been here from the start.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;memory&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;verification_gates&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;version&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gates&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;action_class&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;public_post&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;level&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;confirm&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;klickd_bytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;save_klickd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;passphrase&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my-passphrase&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;domain&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;work&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;TypeScript (Node.js &amp;gt;= 18):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;loadKlickd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;saveKlickd&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@klickd/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;writeFileSync&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;loadKlickd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;profile.klickd&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;passphrase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;my-passphrase&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;saveKlickd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;payload_schema_version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;4.0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;identity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Alice&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;language&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;en&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;agent_instructions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Resume as if you have been here from the start.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;verification_gates&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;gates&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;action_class&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;public_post&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;level&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;confirm&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;passphrase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;my-passphrase&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;work&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;writeFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;profile.klickd&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Error codes:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;HTTP&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;KLICKD_E_AUTH&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;401&lt;/td&gt;
&lt;td&gt;Wrong passphrase / GCM tag mismatch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;KLICKD_E_VERSION&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;Unsupported &lt;code&gt;klickd_version&lt;/code&gt; major&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;KLICKD_E_FORMAT&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;Malformed JSON envelope / missing fields&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;KLICKD_E_KDF&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;Unknown or unavailable KDF&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;KLICKD_E_WEAK_PASS&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;422&lt;/td&gt;
&lt;td&gt;Passphrase shorter than 8 characters&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;KLICKD_E_SCHEMA&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;Missing or invalid &lt;code&gt;payload_schema_version&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  About the benchmark numbers
&lt;/h3&gt;

&lt;p&gt;The benchmark section shows +13.9 average score improvement (across 115 profiles) when a &lt;code&gt;.klickd&lt;/code&gt; context file is present vs. absent, scored by &lt;code&gt;qwen3-32b&lt;/code&gt; via Groq. Here's what that actually measures: how much better an AI's response aligns with a user's stated context when given structured context, as judged by another AI. It does not measure user outcomes, learning efficacy, or real task performance. The sample is 115 profiles across 23 subjects — directional signal, not a peer-reviewed controlled study. The methodology is published at &lt;a href="https://doi.org/10.5281/zenodo.20320480" rel="noopener noreferrer"&gt;DOI 10.5281/zenodo.20320480&lt;/a&gt; for independent replication.&lt;/p&gt;




&lt;h3&gt;
  
  
  What &lt;code&gt;.klickd&lt;/code&gt; is not
&lt;/h3&gt;

&lt;p&gt;Taken directly from the &lt;a href="https://doi.org/10.5281/zenodo.20383133" rel="noopener noreferrer"&gt;Zenodo record&lt;/a&gt; and the &lt;a href="https://github.com/Davincc77/klickdskill/releases/tag/v4.0.0" rel="noopener noreferrer"&gt;GitHub release&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Not an industry standard.&lt;/strong&gt; No standards body has ratified &lt;code&gt;.klickd&lt;/code&gt;. It is CC0.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not universally compatible.&lt;/strong&gt; Portability depends on whether a specific AI tool accepts the system prompt injection. Known-good integrations are listed in &lt;a href="https://github.com/Davincc77/klickdskill/tree/main/docs/integrations" rel="noopener noreferrer"&gt;&lt;code&gt;docs/integrations/&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not a security boundary.&lt;/strong&gt; Encryption protects the file at rest and in transit. It does not replace provider-side security, model alignment, or application-level access control.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Resource&lt;/th&gt;
&lt;th&gt;URL&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Release v4.0.0&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/Davincc77/klickdskill/releases/tag/v4.0.0" rel="noopener noreferrer"&gt;https://github.com/Davincc77/klickdskill/releases/tag/v4.0.0&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zenodo DOI&lt;/td&gt;
&lt;td&gt;&lt;a href="https://doi.org/10.5281/zenodo.20383133" rel="noopener noreferrer"&gt;https://doi.org/10.5281/zenodo.20383133&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PyPI&lt;/td&gt;
&lt;td&gt;&lt;a href="https://pypi.org/project/klickd/" rel="noopener noreferrer"&gt;https://pypi.org/project/klickd/&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;npm&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.npmjs.com/package/@klickd/core" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/@klickd/core&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Format site&lt;/td&gt;
&lt;td&gt;&lt;a href="https://klickd.app/klickdskill" rel="noopener noreferrer"&gt;https://klickd.app/klickdskill&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spec (SPEC.md)&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/Davincc77/klickdskill/blob/main/SPEC.md" rel="noopener noreferrer"&gt;https://github.com/Davincc77/klickdskill/blob/main/SPEC.md&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;v4 Payload Schema&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/Davincc77/klickdskill/blob/main/schemas/klickd-payload-v4.schema.json" rel="noopener noreferrer"&gt;https://github.com/Davincc77/klickdskill/blob/main/schemas/klickd-payload-v4.schema.json&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Migration guide v3→v4&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/Davincc77/klickdskill/blob/main/docs/spec/MIGRATION_V3_TO_V4.md" rel="noopener noreferrer"&gt;https://github.com/Davincc77/klickdskill/blob/main/docs/spec/MIGRATION_V3_TO_V4.md&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Playground&lt;/td&gt;
&lt;td&gt;&lt;a href="https://klickd.app/klickdskill/playground" rel="noopener noreferrer"&gt;https://klickd.app/klickdskill/playground&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Benchmark DOI&lt;/td&gt;
&lt;td&gt;&lt;a href="https://doi.org/10.5281/zenodo.20320480" rel="noopener noreferrer"&gt;https://doi.org/10.5281/zenodo.20320480&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;License:&lt;/strong&gt; CC0 — public domain. No permission required to implement, fork, or build on top of this format.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>llm</category>
      <category>showdev</category>
    </item>
    <item>
      <title>One Soul, Any Model: Portable Memory for Open-Source Agents with .klickd</title>
      <dc:creator>Davincc77</dc:creator>
      <pubDate>Sat, 23 May 2026 01:18:46 +0000</pubDate>
      <link>https://dev.to/davincc77/one-soul-any-model-portable-memory-for-open-source-agents-with-klickd-1k50</link>
      <guid>https://dev.to/davincc77/one-soul-any-model-portable-memory-for-open-source-agents-with-klickd-1k50</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz123fb0lbkohwvfapjqu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz123fb0lbkohwvfapjqu.png" alt="A diagram showing Hermes Agent as the workflow runner and .klickd as the portable state layer. It illustrates how Hermes runs tasks, tools, reports, and artifacts, while .klickd carries project memory, verification gates, human veto rules, claim sources, and benchmark context across models and agent sessions." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hermes-agent-2026-05-15"&gt;Hermes Agent Challenge&lt;/a&gt;: Build With Hermes Agent&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built a prototype integration between &lt;strong&gt;Hermes Agent&lt;/strong&gt; and &lt;code&gt;.klickd&lt;/code&gt;, an open portable memory format for AI agents.&lt;/p&gt;

&lt;p&gt;The problem I wanted to explore is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Every new agent session often pays again to rediscover context that already exists.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That repeated context cost shows up as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;re-explaining project state;&lt;/li&gt;
&lt;li&gt;reloading constraints;&lt;/li&gt;
&lt;li&gt;rediscovering previous decisions;&lt;/li&gt;
&lt;li&gt;rebuilding handoff notes;&lt;/li&gt;
&lt;li&gt;rerunning tests just to find the same failure;&lt;/li&gt;
&lt;li&gt;losing track of which actions require human approval.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;.klickd&lt;/code&gt; is designed to turn that repeated context into a portable, encrypted, versioned file that an agent can load before work starts.&lt;/p&gt;

&lt;p&gt;Hermes Agent is a good fit for testing this because it is an open-source, self-hosted agent runtime with skills, plugins, hooks, approvals, local execution, and agentic workflow orchestration.&lt;/p&gt;

&lt;p&gt;In this project:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Hermes runs the workflow. &lt;code&gt;.klickd&lt;/code&gt; carries the state.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The prototype focuses on a benchmark called &lt;strong&gt;Context Cost Benchmark&lt;/strong&gt;, which compares two modes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Baseline cold start&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The full context is pasted into the prompt every time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;.klickd-loaded&lt;/code&gt; mode&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Structured context is loaded from a &lt;code&gt;.klickd&lt;/code&gt; fixture and injected into the agent workflow.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The benchmark is designed to measure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;repeated input tokens;&lt;/li&gt;
&lt;li&gt;output tokens;&lt;/li&gt;
&lt;li&gt;estimated cost;&lt;/li&gt;
&lt;li&gt;latency;&lt;/li&gt;
&lt;li&gt;continuity errors;&lt;/li&gt;
&lt;li&gt;violations of locked decisions;&lt;/li&gt;
&lt;li&gt;violations of tool permissions;&lt;/li&gt;
&lt;li&gt;handoff quality;&lt;/li&gt;
&lt;li&gt;unnecessary reruns of expensive commands.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to claim a magic percentage improvement. The goal is to measure, reproducibly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How many tokens and errors are we paying for simply because the agent has to rediscover state we already produced?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;For the Hermes Agent Challenge, I created an experimental Hermes integration inside the &lt;code&gt;klickdskill&lt;/code&gt; repository.&lt;/p&gt;

&lt;p&gt;The demo uses Hermes Agent to drive the local &lt;code&gt;.klickd&lt;/code&gt; Context Cost Benchmark.&lt;/p&gt;


&lt;div class="ltag-agent-session"&gt;
  &lt;div class="agent-session-header"&gt;
    
    &lt;span class="agent-session-tool-icon-badge" title="Claude Code"&gt;
&lt;/span&gt;
    &lt;span class="agent-session-title"&gt;hermes_klickd_agent_session_messages_json&lt;/span&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-scroll"&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-footer"&gt;
    &lt;span class="agent-session-meta"&gt;
        0 of 0 messages
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;If the embedded agent session does not render correctly, here is the relevant Hermes output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;session_id: 20260523_004058_85115c

Existing artifacts from 2026-05-23 were used. No rerun was needed.

Token-proxy totals:
- Cold: 310
- Paste: 6570
- Klickd: 5270

Verified artifacts:
- report.md
- summary.csv
- raw_runs.jsonl
- artifacts/sample_test.log

No publishes, git pushes, or external tool calls were performed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The live Hermes run used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hermes Agent v0.14.0&lt;/li&gt;
&lt;li&gt;OpenRouter free model route&lt;/li&gt;
&lt;li&gt;capped API key with no paid budget&lt;/li&gt;
&lt;li&gt;local dry-run benchmark&lt;/li&gt;
&lt;li&gt;no production deployment&lt;/li&gt;
&lt;li&gt;no package publishing&lt;/li&gt;
&lt;li&gt;no external posting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hermes session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;20260523_004058_85115c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hermes was asked to use the &lt;code&gt;klickd-context-cost&lt;/code&gt; skill, inspect the benchmark outputs, and avoid rerunning work if durable artifacts already existed.&lt;/p&gt;

&lt;p&gt;The key result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Existing artifacts from 2026-05-23 were used. No rerun was needed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That matters because one of the core ideas in &lt;code&gt;.klickd v4&lt;/code&gt; is that agents should not spend tokens or compute rediscovering output that already exists.&lt;/p&gt;

&lt;p&gt;The dry-run produced these local artifacts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;benchmarks/context_cost/results/2026-05-23/
├── report.md
├── summary.csv
├── raw_runs.jsonl
└── artifacts/
    └── sample_test.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The benchmark output was explicitly marked as a &lt;strong&gt;whitespace token proxy&lt;/strong&gt;, not a provider-token measurement. This is important: these are not OpenAI, Anthropic, or OpenRouter tokenizer counts. They are deterministic local proxy values for early validation.&lt;/p&gt;

&lt;p&gt;Current dry-run totals:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Condition&lt;/th&gt;
&lt;th&gt;Token-proxy total&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cold start&lt;/td&gt;
&lt;td&gt;310&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full context pasted&lt;/td&gt;
&lt;td&gt;6570&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;.klickd&lt;/code&gt; structured context&lt;/td&gt;
&lt;td&gt;5270&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The useful result is not “&lt;code&gt;.klickd&lt;/code&gt; reduces cost by X%.” That would be premature.&lt;/p&gt;

&lt;p&gt;The useful result is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The benchmark harness can now compare repeated context strategies, produce raw evidence, persist artifacts, and let Hermes inspect those artifacts instead of rerunning the same work.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Verification artifacts
&lt;/h3&gt;

&lt;p&gt;One lesson from real agent workflows is that agents often rerun expensive commands just to recover output they already produced.&lt;/p&gt;

&lt;p&gt;The benchmark therefore includes a &lt;code&gt;verification_artifacts[]&lt;/code&gt; pattern inspired by this idea:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;command &lt;/span&gt;2&amp;gt;&amp;amp;1 | &lt;span class="nb"&gt;tee&lt;/span&gt; .test-output/&amp;lt;scope&amp;gt;.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of rerunning the test suite to find a failure, the agent can inspect the persisted artifact:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; FAIL .test-output/full.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In &lt;code&gt;.klickd v4&lt;/code&gt;, that becomes structured state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm test"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"artifact_path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;".test-output/vitest.log"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"failed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"query_hint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"grep -n FAIL .test-output/vitest.log"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"checked_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-05-23T00:00:00Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"retention"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"latest"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"scope"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"project"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This turns agent memory into something more operational:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what the agent knows;&lt;/li&gt;
&lt;li&gt;what the agent must verify;&lt;/li&gt;
&lt;li&gt;what the agent is not allowed to do without approval;&lt;/li&gt;
&lt;li&gt;where the evidence lives;&lt;/li&gt;
&lt;li&gt;what happened last time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;Repository:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Davincc77/klickdskill" rel="noopener noreferrer"&gt;https://github.com/Davincc77/klickdskill&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hermes POC integration path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;integrations/hermes/
├── README.md
├── skill/
│   └── SKILL.md
├── plugin/
│   ├── plugin.yaml
│   └── __init__.py
├── scripts/
│   └── run_context_cost_benchmark.py
└── tests/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Context Cost Benchmark path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;benchmarks/context_cost/
├── RFC.md
├── runner.py
├── fixtures/
│   ├── baseline/
│   ├── klickd/
│   ├── prompts/
│   ├── validation/
│   ├── verification_artifacts/
│   └── edge_cases/
├── results/
└── tests/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Current benchmark pieces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RFC-003: Context Cost Benchmark&lt;/li&gt;
&lt;li&gt;local dry-run runner&lt;/li&gt;
&lt;li&gt;fixture validation&lt;/li&gt;
&lt;li&gt;deterministic token proxy&lt;/li&gt;
&lt;li&gt;CSV / JSONL / Markdown reports&lt;/li&gt;
&lt;li&gt;edge-case fixtures for:

&lt;ul&gt;
&lt;li&gt;migration/version break;&lt;/li&gt;
&lt;li&gt;tool-call failure recovery;&lt;/li&gt;
&lt;li&gt;multi-session handoff.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;The Hermes integration currently includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a Hermes-facing skill;&lt;/li&gt;
&lt;li&gt;an experimental plugin scaffold;&lt;/li&gt;
&lt;li&gt;a wrapper script that runs the local benchmark;&lt;/li&gt;
&lt;li&gt;tests for the wrapper;&lt;/li&gt;
&lt;li&gt;explicit safety constraints:

&lt;ul&gt;
&lt;li&gt;no provider calls from the wrapper;&lt;/li&gt;
&lt;li&gt;no paid resources;&lt;/li&gt;
&lt;li&gt;no publishing;&lt;/li&gt;
&lt;li&gt;no production deployment;&lt;/li&gt;
&lt;li&gt;no secrets.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  My Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hermes Agent&lt;/strong&gt; — open-source, self-hosted agent runtime&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/NousResearch/hermes-agent" rel="noopener noreferrer"&gt;https://github.com/NousResearch/hermes-agent&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hermes Agent docs&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://hermes-agent.app/en/docs" rel="noopener noreferrer"&gt;https://hermes-agent.app/en/docs&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;.klickd&lt;/code&gt; / &lt;code&gt;klickdskill&lt;/code&gt;&lt;/strong&gt; — portable encrypted AI context format&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/Davincc77/klickdskill" rel="noopener noreferrer"&gt;https://github.com/Davincc77/klickdskill&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;.klickd&lt;/code&gt; official page&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://klickd.app/klickdskill" rel="noopener noreferrer"&gt;https://klickd.app/klickdskill&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Python SDK&lt;/strong&gt; — local &lt;code&gt;.klickd&lt;/code&gt; loading / saving&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Current development install, until PyPI is updated:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"git+https://github.com/Davincc77/klickdskill.git@main#subdirectory=packages/pypi/klickd"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Current Python import:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;klickd&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;load_klickd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;save_klickd&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Actions&lt;/strong&gt; — test vectors and package integrity checks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSV / JSONL / Markdown&lt;/strong&gt; — benchmark reports&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local verification artifacts&lt;/strong&gt; — persisted logs for agent inspection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenRouter free model route&lt;/strong&gt; — used only to run the Hermes agent session for the demo&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I Used Hermes Agent
&lt;/h2&gt;

&lt;p&gt;Hermes Agent is used as the workflow runner for the benchmark.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;.klickd&lt;/code&gt; file is not meant to replace Hermes memory or Hermes skills. Instead, it gives Hermes a portable external state artifact it can load before work starts.&lt;/p&gt;

&lt;p&gt;Hermes is responsible for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;running the benchmark task;&lt;/li&gt;
&lt;li&gt;reading fixture context;&lt;/li&gt;
&lt;li&gt;executing local dry-run commands;&lt;/li&gt;
&lt;li&gt;inspecting generated artifacts;&lt;/li&gt;
&lt;li&gt;summarizing benchmark results;&lt;/li&gt;
&lt;li&gt;respecting approval and verification boundaries.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;.klickd&lt;/code&gt; is responsible for carrying:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;project state;&lt;/li&gt;
&lt;li&gt;locked decisions;&lt;/li&gt;
&lt;li&gt;tool permissions;&lt;/li&gt;
&lt;li&gt;handoff notes;&lt;/li&gt;
&lt;li&gt;verification gates;&lt;/li&gt;
&lt;li&gt;human veto rules;&lt;/li&gt;
&lt;li&gt;claim sources;&lt;/li&gt;
&lt;li&gt;verification artifacts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is useful because multi-agent systems need more than agent-to-agent communication.&lt;/p&gt;

&lt;p&gt;If A2A defines how agents talk, &lt;code&gt;.klickd&lt;/code&gt; explores what portable state they carry between tasks, tools, models, and sessions.&lt;/p&gt;

&lt;p&gt;The Hermes integration is therefore not about making a chatbot remember more. It is about testing whether an open-source agent runtime can operate with structured, portable context instead of repeatedly reconstructing the same state.&lt;/p&gt;

&lt;p&gt;The goal is to reduce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;repeated prompt context;&lt;/li&gt;
&lt;li&gt;hallucinated continuations;&lt;/li&gt;
&lt;li&gt;forgotten decisions;&lt;/li&gt;
&lt;li&gt;unsafe actions;&lt;/li&gt;
&lt;li&gt;unnecessary reruns;&lt;/li&gt;
&lt;li&gt;handoff failures.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The larger idea is that agent memory should become infrastructure:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Portable state, explicit constraints, verification artifacts, and human approval boundaries.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In short:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Hermes runs the workflow. &lt;code&gt;.klickd&lt;/code&gt; carries the state.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;The first useful result was not a performance number. It was a workflow result.&lt;/p&gt;

&lt;p&gt;Hermes correctly used the existing benchmark artifacts instead of rerunning the dry-run unnecessarily.&lt;/p&gt;

&lt;p&gt;That matters because a lot of agent waste is not only token waste. It is also repeated execution waste.&lt;/p&gt;

&lt;p&gt;Agents often:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;rerun tests to rediscover failures;&lt;/li&gt;
&lt;li&gt;reread long logs from context;&lt;/li&gt;
&lt;li&gt;rebuild state from previous messages;&lt;/li&gt;
&lt;li&gt;regenerate summaries that already exist;&lt;/li&gt;
&lt;li&gt;ask the model to infer what a file could have told it deterministically.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The benchmark and Hermes POC make that waste visible.&lt;/p&gt;

&lt;p&gt;This also clarified the role of &lt;code&gt;.klickd&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.klickd&lt;/code&gt; should not only remember preferences. It should help agents know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what state exists;&lt;/li&gt;
&lt;li&gt;what evidence exists;&lt;/li&gt;
&lt;li&gt;what claims were executed, inspected, or assumed;&lt;/li&gt;
&lt;li&gt;what actions require human approval;&lt;/li&gt;
&lt;li&gt;what artifacts should be read before rerunning work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is why &lt;code&gt;.klickd v4&lt;/code&gt; is moving beyond portable memory toward a more operational layer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;portable encrypted context
+ project memory
+ verification gates
+ human veto
+ claim sources
+ verification artifacts
+ migration safety
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;Hermes Agent Challenge:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/challenges/hermes-agent-2026-05-15"&gt;https://dev.to/challenges/hermes-agent-2026-05-15&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hermes Agent repository:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/NousResearch/hermes-agent" rel="noopener noreferrer"&gt;https://github.com/NousResearch/hermes-agent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hermes Agent documentation:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hermes-agent.app/en/docs" rel="noopener noreferrer"&gt;https://hermes-agent.app/en/docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.klickd&lt;/code&gt; / &lt;code&gt;klickdskill&lt;/code&gt; repository:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Davincc77/klickdskill" rel="noopener noreferrer"&gt;https://github.com/Davincc77/klickdskill&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.klickd&lt;/code&gt; official page:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://klickd.app/klickdskill" rel="noopener noreferrer"&gt;https://klickd.app/klickdskill&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Related article on preserving command output for agents:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/tacoda/dont-make-the-agent-re-run-the-test-suite-to-find-the-failure-427"&gt;https://dev.to/tacoda/dont-make-the-agent-re-run-the-test-suite-to-find-the-failure-427&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Note
&lt;/h2&gt;

&lt;p&gt;This is still early.&lt;/p&gt;

&lt;p&gt;The benchmark does not yet claim provider-token savings. The current numbers are a deterministic local proxy. The next step is to run the same structure against real provider usage and compare actual input/output tokens, latency, and continuity failures.&lt;/p&gt;

&lt;p&gt;But the architecture is now testable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hermes can act as the workflow runner.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.klickd&lt;/code&gt; can act as the portable state layer.&lt;/li&gt;
&lt;li&gt;The benchmark can produce raw evidence.&lt;/li&gt;
&lt;li&gt;Verification artifacts can prevent unnecessary reruns.&lt;/li&gt;
&lt;li&gt;The system can evolve without breaking older &lt;code&gt;.klickd&lt;/code&gt; files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the direction I want to keep exploring.&lt;/p&gt;

&lt;p&gt;One soul. Any model. Any agent.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz123fb0lbkohwvfapjqu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz123fb0lbkohwvfapjqu.png" alt="A diagram showing Hermes Agent as the workflow runner and .klickd as the portable state layer. It illustrates how Hermes runs tasks, tools, reports, and artifacts, while .klickd carries project memory, verification gates, human veto rules, claim sources, and benchmark context across models and agent sessions." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>hermesagentchallenge</category>
      <category>devchallenge</category>
      <category>agents</category>
      <category>ai</category>
    </item>
    <item>
      <title>AI agents don't have a memory problem. They have an architecture problem.</title>
      <dc:creator>Davincc77</dc:creator>
      <pubDate>Fri, 22 May 2026 08:06:23 +0000</pubDate>
      <link>https://dev.to/davincc77/ai-agents-dont-have-a-memory-problem-they-have-an-architecture-problem-3pl6</link>
      <guid>https://dev.to/davincc77/ai-agents-dont-have-a-memory-problem-they-have-an-architecture-problem-3pl6</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbpjvz2coqyneuqb6wjr1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbpjvz2coqyneuqb6wjr1.png" alt=".klickd cover" width="800" height="320"&gt;&lt;/a&gt;  Every session, &lt;br&gt;
the LLM starts fresh. The user re-explains their role, their constraints, their preferences, what they were doing last time. Then the session ends, and next time: same thing.&lt;/p&gt;

&lt;p&gt;The industry has diagnosed this correctly — statelessness is a real limitation. But the solutions being built mostly share the same premise: that memory is a service you connect to. I think that premise is wrong, and it shapes everything downstream.&lt;/p&gt;


&lt;h2&gt;
  
  
  The actual cost of statelessness
&lt;/h2&gt;

&lt;p&gt;This isn't just a UX annoyance. A &lt;a href="https://www.semanticscholar.org/paper/13cd198bfe36d4731b1d946ef0edc64f5ef406a2" rel="noopener noreferrer"&gt;2026 study by Pichay&lt;/a&gt; measuring 857 production AI sessions found that 21.8% of input tokens are "structural waste" — context that has to be re-established on every session because nothing persists. Nearly a quarter of your token budget, on every call, going toward re-explaining what should already be known.&lt;/p&gt;

&lt;p&gt;For casual chat, that's tolerable. For workflows where context is dense and high-stakes — a lawyer switching between matters, a developer moving between codebases, a clinician picking up a patient thread — the cost compounds. And it's paid on every session, indefinitely.&lt;/p&gt;


&lt;h2&gt;
  
  
  What everyone else built
&lt;/h2&gt;

&lt;p&gt;The market's answer has been centralized memory stores. Mem0 &lt;a href="https://techcrunch.com/2025/10/28/mem0-raises-24m-from-yc-peak-xv-and-basis-set-to-build-the-memory-layer-for-ai-apps/" rel="noopener noreferrer"&gt;just closed $24M in funding (October 2025)&lt;/a&gt; to build "the memory layer for AI." Letta/MemGPT persists agent state in a server-side database. Zep builds a temporal knowledge graph of user interactions. SAMEP and MemTrust add encryption layers on top of server-side storage.&lt;/p&gt;

&lt;p&gt;These are all genuinely useful tools. They solve the statelessness problem for most use cases. But they share an architecture: your context lives on their infrastructure, retrieval is query-scoped, and access is controlled by the service provider.&lt;/p&gt;

&lt;p&gt;Even the solutions that advertise encryption — SAMEP, MemTrust — encrypt server-side. The data leaves the client before any cryptographic protection is applied. You've traded "AI forgets you" for "your memory is a managed cloud service." For many applications that's fine. For sensitive workflows, it's a different risk surface, not a smaller one.&lt;/p&gt;


&lt;h2&gt;
  
  
  The question that didn't get asked
&lt;/h2&gt;

&lt;p&gt;What if memory is a file, not a service?&lt;/p&gt;

&lt;p&gt;Not metaphorically. Literally: a single encrypted file, owned by the user, that travels with them across sessions and across models. The LLM reads it at session start, updates it at session end, and the file lives wherever the user puts it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"format"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"klickd/v1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"encrypted_payload"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;AES-256-GCM ciphertext&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"kdf"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"argon2id"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"salt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;per-file salt&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"nonce"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;GCM nonce&amp;gt;"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key insight: persistent context doesn't require a server. It requires a standard. A shared format that any model can read and any client can write.&lt;/p&gt;




&lt;h2&gt;
  
  
  What we built
&lt;/h2&gt;

&lt;p&gt;We built &lt;code&gt;.klickd&lt;/code&gt; around this premise. The architecture is deliberately minimal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AES-256-GCM encryption, Argon2id key derivation.&lt;/strong&gt; Client-side only. The key is derived from a passphrase that never leaves the device. There is no server that could be subpoenaed, breached, or decommissioned.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provider-agnostic.&lt;/strong&gt; The same &lt;code&gt;.klickd&lt;/code&gt; file works with GPT-4o, Claude, Gemini, Llama. It's not bound to any model provider's infrastructure or format.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-server.&lt;/strong&gt; There is no backend storing context. The file is the memory. If the file doesn't exist on your machine, the context doesn't exist anywhere.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On personalization quality: our &lt;a href="https://doi.org/10.5281/zenodo.20320480" rel="noopener noreferrer"&gt;LLM-judge benchmark (Zenodo, DOI: 10.5281/zenodo.20320480)&lt;/a&gt; — run across 23 test lots and 115 profiles, using qwen3-32b as judge — showed an average improvement of +13.9 points over baseline, with a range of +12.8 to +19.2. This is with llama-3.3-70b-versatile as the model under test. Results are published as-is; methodology and raw data are in the report.&lt;/p&gt;

&lt;p&gt;For legal and regulated workflows specifically: the file-per-context model makes cross-matter contamination structurally impossible — not enforced by query scoping or ACLs, but by physical separation. Discovery compliance changes shape: you produce the file, or you don't. There's no "server logs" ambiguity.&lt;/p&gt;




&lt;h2&gt;
  
  
  The honest tradeoffs
&lt;/h2&gt;

&lt;p&gt;This architecture gives up things that matter in other contexts.&lt;/p&gt;

&lt;p&gt;You lose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Centralized governance and server-side revocation&lt;/li&gt;
&lt;li&gt;Query analytics and usage telemetry&lt;/li&gt;
&lt;li&gt;Multi-tenant management at scale&lt;/li&gt;
&lt;li&gt;Cross-device sync without a separate sync layer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You gain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zero trust surface: there is nothing to breach on the provider side&lt;/li&gt;
&lt;li&gt;GDPR-native by architecture: personal data doesn't leave the client, so data residency and right-to-erasure are trivially satisfied&lt;/li&gt;
&lt;li&gt;Portability: the file works with any model, now and in the future&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is not a universal solution. It is the right solution for a specific class of use cases: privacy-sensitive, cross-model, user-owned context. If you're building a consumer product where the vendor needs to manage memory at scale, use Mem0 or Zep — they're well-engineered for that. If you're building for a context where the user owns the data and the service provider should have zero access, the server-side model is architecturally incompatible with that requirement, regardless of how good the encryption story is.&lt;/p&gt;




&lt;h2&gt;
  
  
  Is this a new standard?
&lt;/h2&gt;

&lt;p&gt;The field probably needs a portable, encrypted, open context format the way it needed JWT for auth tokens or RSS for feed syndication — a shared abstraction that any tool can read and write, owned by no single vendor.&lt;/p&gt;

&lt;p&gt;We're not claiming &lt;code&gt;.klickd&lt;/code&gt; is that standard. It's a proof of concept that the abstraction is viable. The memory-file spec is open: &lt;a href="https://github.com/Davincc77/klickdskill" rel="noopener noreferrer"&gt;https://github.com/Davincc77/klickdskill&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;The question I keep coming back to: if the AI ecosystem converged on server-side memory because that's what was easy to build first, not because it's the right primitive — what does the right primitive actually look like? And is the file abstraction the right level, or is there something better?&lt;/p&gt;

&lt;p&gt;Curious what others think, especially those who've hit the limits of query-scoped retrieval in production.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>privacy</category>
      <category>memory</category>
    </item>
  </channel>
</rss>
