← All writing

Architecture

Writing

// Simplified: response parsing and error handling omitted.
async function callTool(endpoint, token, name, args) {
  let session = null;
  let id = 0;
  const post = async (body) => {
    const headers = {

One memory for several AI tools

Claude Code, Codex and Hermes each kept their own notes. Two small hooks and one shared memory service changed that. What we built, why the hooks talk HTTP instead of using MCP tools, and what broke on the first day.

AI applicationsArchitectureReliability
const cosine = (a, b) => a.reduce((sum, x, i) => sum + x * b[i], 0);

const hits = index
  .map((chunk) => ({...chunk, score: cosine(queryVector, chunk.vector)}))
  .sort((a, b) => b.score - a.score)
  .slice(0, 3);

Semantic search over our own articles, with a local model

A small, runnable build: index this site’s English and Turkish articles with a multilingual embedding model on your own machine, search by meaning, and look honestly at where it works and where it does not.

AI applicationsArchitectureEvaluation
const alternateLink = document.querySelector('[data-language-switch]');
const target = new URL(alternateLink.href);
target.search = location.search;
target.hash = location.hash;
location.href = target.href;

Publishing one article in two languages

How this site keeps its English and Turkish editions together: one content record, stable addresses, a language switch that keeps your place, and a build that refuses missing translations.

ArchitectureMaintainability