<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aiman Ismail (AI) on Medium]]></title>
        <description><![CDATA[Stories by Aiman Ismail (AI) on Medium]]></description>
        <link>https://medium.com/@aimanismaill?source=rss-30678056395f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YHNNoX71IepkNvTh4qxSxA.jpeg</url>
            <title>Stories by Aiman Ismail (AI) on Medium</title>
            <link>https://medium.com/@aimanismaill?source=rss-30678056395f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:34:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aimanismaill/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Front-End Design System and Design Tokens for AI Agents: Why I Find Them Useful]]></title>
            <link>https://aimanismaill.medium.com/front-end-design-system-and-design-tokens-for-ai-agents-why-i-find-them-useful-d60cb4dc671b?source=rss-30678056395f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d60cb4dc671b</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[design-thinking]]></category>
            <dc:creator><![CDATA[Aiman Ismail (AI)]]></dc:creator>
            <pubDate>Tue, 06 Oct 2026 13:12:07 GMT</pubDate>
            <atom:updated>2026-10-06T13:13:43.289Z</atom:updated>
            <content:encoded><![CDATA[<p>How do you make different pages feel like parts of the same website? A design system gives them a shared foundation instead of leaving every color, heading, and button to a new decision.</p><p>This article explains what design tokens and design systems mean, how they fit together, and how to build and check one. Three small diagrams show the complete workflow, the relationship between its parts, and where shared updates can fail. A fictional booking website makes the ideas concrete.</p><h3>General Description</h3><p>A <strong>design token</strong> is a named design decision: for example, “main action color = blue.” The name describes a purpose; the value records the chosen appearance.</p><p>A <strong>component</strong> is a reusable interface part, such as a button or a heading. It applies those choices so each page does not have to recreate them.</p><p>A <strong>design system</strong> brings the choices, components, and guidance together. It explains not only what a button looks like, but when to use it. Tokens are therefore part of a design system, not another name for the whole system.</p><p>Think of a shared building kit: tokens specify the materials, components are the prepared parts, and guidance explains how to use them. The diagrams below describe a simplified website workflow, not a claim that one tool automatically keeps every product consistent.</p><figure><img alt="Six-step workflow: choose direction, name shared choices, build reusable parts, review them together, save the system and build screens, then check real screens. Feedback improves the shared choices." src="https://cdn-images-1.medium.com/max/945/1*s1vt9B22rVY7enYh_yBl9A.png" /><figcaption>Diagram A. Follow 1 → 2 → 3, then 4 → 5 → 6. The return arrow makes this a continuing process.</figcaption></figure><h3>1. Choose a direction before choosing details</h3><p>Start at box 1 in Diagram A. The first question is not “Which blue?” It is “What should this website help people do, and how should it feel?”</p><p>For our booking example, the direction is clear and welcoming. Look for references with readable headings, straightforward forms, and an obvious booking action. Those qualities guide later choices without requiring us to copy someone else’s page.</p><p>This matters to me because I keep encountering repeated color and font work, especially while moving between mobile and web. Box 1 gives the individual decisions a common purpose before they spread across screens.</p><h3>2–3. Turn choices into reusable parts</h3><figure><img alt="Named button-color and heading-style decisions feed a reusable heading and Book now button. Tokens, parts and guidance sit inside the design-system boundary. Narrow and wide screens reuse those parts outside it." src="https://cdn-images-1.medium.com/max/945/1*paxsm6OYiS-MTw75U0XUpw.png" /><figcaption>Diagram B. Choices describe appearance, parts apply them, and guidance explains their use.</figcaption></figure><p>Diagram B opens up boxes 2 and 3. Read from the named choices on the left to the heading and button in the middle.</p><p>“Main action color” is a useful name because its purpose can stay the same when its value changes. Blue could become purple without renaming the job the color performs. The Design Tokens Community Group documents how named decisions can be represented for tools to exchange; Carbon provides a real example of color names based on interface roles.</p><p>The heading choice in box 2 can include the font, size, thickness and spacing between lines. Typography is simply the way text is styled and arranged, not a separate mystery the reader must understand first.</p><p>Inside the dashed boundary, the Book now component uses the shared action color. Guidance says to use it for the main action. That boundary explains why a palette alone is not a design system: it supplies choices, but not the reusable parts and instructions that make those choices useful.</p><h3>4–5. Review together, then build the screens</h3><p>Return to box 4 in Diagram A. Put the heading, normal text, booking form, and button on one sample page. Their relationship becomes easier to judge when they are visible together.</p><p>Does the heading overwhelm the form? Can someone identify the booking action? Refine the shared parts here before repeating them across the site. This review-and-handoff sequence draws on Ras Mic’s design workflow, linked in the references.</p><p>The arrow to box 5 means saving the actual definitions and components with the project, not merely handing over a screenshot. A picture shows the intended appearance; the reusable source lets pages use it.</p><p>On the right of Diagram B, the narrow and wide screens reuse the same parts but arrange them differently. A phone-sized page might stack its content, while a desktop page has room for columns. Carbon’s typography guidance also shows how some headings can change size with screen width.</p><p>The principle is shared purpose, not identical dimensions. Both versions should make Book now recognizable without forcing the wider layout onto a small screen.</p><h3>6. Check what changed, and what did not</h3><p>Diagram C expands the final check in box 6. Suppose we change the shared action color from blue to purple. The colors here illustrate a connection, not a tested accessibility palette.</p><figure><img alt="A shared color changes from blue to purple. A connected Book now button becomes purple, while a button using a copied blue value stays blue. Shared issues return to the source. Contrast, keyboard use and layout still need checking." src="https://cdn-images-1.medium.com/max/903/1*BH937fou5XPQGzUorOPgAA.png" /><figcaption>Diagram C. A shared change reaches connected parts. A copied value sits outside that connection.</figcaption></figure><p>The upper path follows the shared choice, so its button changes. The lower path has its own copy of the old blue, so it stays blue. Updating a token is not a promise that every screen changes instantly: the connection must exist, and build or release steps may still be required.</p><p>The warning beneath the paths is equally important. Consistent styling does not guarantee accessibility, meaning usability for people with different abilities. Check text contrast, keyboard use and layout on the real screens.</p><p>Follow the return arrow when the problem belongs to the shared source. An unreadable heading used everywhere should be fixed there. A layout problem on one page may need a local fix instead. The point is to repair the right place, not make every issue a system-wide change.</p><h3>The whole picture</h3><p>Diagram A gives the process; Diagram B explains what is being built; Diagram C shows why checking still matters.</p><p>What I find useful is the shift from repeatedly choosing colors and fonts to maintaining decisions that related screens can share. A token records a choice. A component applies it. A design system connects those parts with guidance. The workflow keeps that shared foundation usable as the product changes.</p><h3>References</h3><ol><li><a href="https://www.designtokens.org/TR/2025.10/format/">Design Tokens Community Group: Design Tokens Format Module 2025.10</a>. Definitions of tokens, references, and composite values. A Community Group specification, not a W3C Standard.</li><li><a href="https://www.carbondesignsystem.com/building-blocks/foundations/color/tokens">IBM Carbon: Color Tokens</a>. A concrete example of naming colors by their interface roles.</li><li><a href="https://www.carbondesignsystem.com/building-blocks/foundations/typography/overview">IBM Carbon: Typography Overview</a>. Shared type styles and the distinction between fixed and responsive headings.</li><li><a href="https://www.youtube.com/watch?v=vpU9lZY69O4">Ras Mic: Design Workflow Video</a>. Workflow inspiration for reviewing tokens and components together, refining them and carrying the system into a project. The booking example and diagrams in this article are illustrative adaptations.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d60cb4dc671b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Model Is Only Half the System]]></title>
            <link>https://aimanismaill.medium.com/the-model-is-only-half-the-system-78c5898b4fbb?source=rss-30678056395f------2</link>
            <guid isPermaLink="false">https://medium.com/p/78c5898b4fbb</guid>
            <dc:creator><![CDATA[Aiman Ismail (AI)]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 04:19:17 GMT</pubDate>
            <atom:updated>2026-10-04T04:31:59.824Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How I use routing, context discipline, and explicit controls to make an AI coding harness more dependable without pretending it can eliminate hallucinations.</em></p><p>When most people use an AI assistant, the model appears to be the whole product. You write a message. Text comes back. The intelligence seems to live entirely inside that exchange.</p><p>A tool-using AI system has more going on around the model.</p><p>The surrounding software is often called a harness. It prepares the information the model can see, sends the request, receives the response, and decides what is allowed to happen next. If the model asks to read a file, search the web, or run a command, the harness performs that tool call. It then puts the result back into the working conversation so the model can continue.</p><p>The loop looks roughly like this:</p><p>Your message → assembled context → model response → optional tool call → tool result → updated context → next model response</p><p>The model proposes language and actions. The harness manages tools, context, permissions, session state, and side effects.</p><p>That distinction changed how I thought about AI systems. I am not a professional developer, but I have a deep interest in AI. I started paying less attention to finding one perfect prompt and more attention to the machinery deciding what the model sees and what its output is allowed to do.</p><p>That machinery became my main design surface.</p><h3>What I mean by keeping a model “sharp”</h3><p>I use “sharp” in two different senses.</p><p>The first is capability matching. A short explanation and a difficult architectural decision do not necessarily need the same model or reasoning level. Sending every request to the strongest available route is simple, but it ignores the shape of the work.</p><p>The second is context discipline. Even a capable model can be less useful when its working context is crowded with irrelevant history, unsupported assertions, stale notes, or instructions whose origins are unclear. A harness should help assemble the smallest relevant evidence set, preserve important rules, and expose gaps rather than bury them.</p><p>One concern is which model should handle the task. The other is what that model should be asked to reason over.</p><p>My harness treats them as separate control problems.</p><h3>A narrow judge for model routing</h3><p>For routing, I use Jev, a TypeSafe System One model. TypeSafe describes System One models as returning typed decisions and probabilities rather than generated prose. That makes Jev useful for a narrow question: What kind of task is this?</p><p>It is not the model that completes the work.</p><p>My router offers Jev four named choices:</p><ul><li>Luna for explanations, lookups, summaries, tiny edits, and mechanical work.</li><li>Terra for normal features, testing, debugging, and moderate multi-file changes.</li><li>Sol for difficult diagnosis, broad refactors, subtle correctness work, and sustained tool use.</li><li>Astra for architecture, ambiguous high-consequence decisions, security-sensitive work, and exceptional complexity.</li></ul><p>Jev receives the prompt and whether attachments are present. It returns one route and a confidence value. Ordinary TypeScript code then checks the result.</p><p>This separation matters. Jev does not rewrite the prompt, execute the task, call tools, or switch the active model. It supplies one bounded, probabilistic judgment. The controller owns the authority.</p><h3>Where probability ends and code begins</h3><p>The routing policy accepts only known route names. It also requires a confidence of at least 0.65. If the answer is malformed, missing, or below that threshold, the router falls back to Terra, the deliberately boring middle route.</p><p>The number is my project policy. It is not a universal recommendation, and confidence is not correctness. TypeSafe’s own guidance says thresholds depend on the domain and should be tested against observed results. I have not established that 0.65 is optimal.</p><p>The useful part is not the number itself. It is that the decision boundary lives in inspectable code.</p><p>For an ordinary request, the full path is:</p><ol><li>OMP receives the prompt through an input or pre-agent hook.</li><li>Empty input, slash commands, and synthetic extension messages bypass routing.</li><li>3. The extension asks Jev for one typed route choice.</li><li>4. Code validates the route and applies the confidence gate.</li><li>5. The runtime resolves the configured model through OMP.</li><li>6. OMP switches the model first and the reasoning level second.</li><li>7. The original prompt continues unchanged.</li></ol><p>Failure behavior is part of the design. A Jev timeout or malformed response uses Terra. An unavailable selected model also tries Terra. If Terra is unavailable, the current model remains active. If a model switch fails, the new reasoning level is not applied.</p><p>Prompts can also arrive close together. A slow decision for an older prompt must not change the model underneath a newer one. The runtime therefore aborts superseded evaluations, checks a generation number around asynchronous work, serializes model mutations, and restores the previous model if stale work has already switched it.</p><p>These controls are deterministic after Jev returns its judgment. Jev itself remains probabilistic. Calling the entire router deterministic would erase the most important boundary in the system.</p><p>I have also not measured whether this routing improves cost, latency, or answer quality. Those are hypotheses, not results.</p><h3>Context discipline is the other half</h3><p>Routing selects a worker. Context management prepares the desk.</p><p>My evidence workflow uses an Obsidian vault because the source material remains ordinary, inspectable Markdown. Before an article is drafted, the workflow searches relevant notes, records what each source can support, labels confidence, surfaces contradictions, and keeps missing evidence visible. Source selection, writing style, and structure each require approval before prose begins.</p><p>Some of those controls are enforced by code. A citation verifier can reject unknown source identifiers, mismatched URLs, or quotations that do not appear in fetched evidence. Other controls are instructions to the model: search before drafting, do not merge contradictory notes into false certainty, and mark unsupported material as a gap.</p><p>Those are not equally strong. Code can reject a bad input. An instruction can still be misunderstood or ignored. I want the article and the harness to say which kind of control is doing the work.</p><p>A recorded failure shows why this matters. One real, relevant URL was attached to a claim about “200 billion rows,” but the source did not actually support that number. The link existed. The evidence did not.</p><p>That incident motivated claim-level excerpts, confidence labels, and evidence-producing steps before writing steps. I did not independently reconstruct the original event during this research pass, so I treat it as a firsthand failure record rather than external proof of a general rate of hallucination.</p><p>This is what grounding means to me in practice: not adding links after the prose is finished, but constraining what can be written from the beginning.</p><h3>This does not eliminate hallucinations</h3><p>A vault can contain stale, incomplete, irrelevant, or wrong notes. Retrieval can surface the wrong passage. A model can misread good evidence or fail to follow an instruction. Deterministic precedence can decide which context is loaded, but it cannot make that context true.</p><p>My harness therefore cannot guarantee factual output.</p><p>What it can do is reduce risk by changing the failure surface:</p><ul><li>evidence remains inspectable;</li><li>- unsupported claims stay visible;</li><li>- uncertainty is stated near the claim;</li><li>- probabilistic judgments are kept narrow;</li><li>- deterministic code controls thresholds, fallbacks, and side effects;</li><li>- approval gates prevent the workflow from silently advancing.</li></ul><p>The goal is not a truth machine. It is a system whose mistakes are easier to notice, question, and contain.</p><h3>Why I chose OMP instead of Pi</h3><p>OMP self-identifies as a fork of Pi. Both are programmable harnesses, and their current versions share important foundations: extensions, lifecycle events, tool and command registration, model selection, reasoning controls, skills, and context customization.</p><p>There is an important correction to the simplest version of my story: current Pi can also implement Jev routing. Its documentation includes classifier support, a virtual-model routing API, and a first-party jev-router.ts example. I cannot honestly say I needed OMP because Pi was incapable of doing this.</p><p>The difference I can support is about packaging and defaults.</p><p>Pi presents itself as a minimal, extensible core. It expects users to build or install some of the surrounding behavior they want. OMP ships a broader, more opinionated orchestration environment: named model roles and role chains, a dedicated judgment role, first-class subagents, plan mode, more built-in tools, provider-aware discovery, sticky rules, and richer system-prompt templates.</p><p>That broader surface is what appealed to me. As someone who is deeply interested in AI but is not a professional developer, OMP looked as though it required less assembly before I could shape the system I wanted. That is my experience, not a benchmark. It does not prove that OMP is easier for everyone, or that Pi cannot reach the same outcome through extensions.</p><p>The tradeoff is straightforward. Pi offers a smaller core and more deliberate composition. OMP gives me more of the orchestration layer in one distribution. I preferred the opinionated starting point.</p><h3>The harness became the product</h3><p>I began with a familiar question: which model should I use?</p><p>I ended up with a different set of questions.</p><p>What information should the model see? Which decisions can remain probabilistic? Which actions require deterministic checks? What happens when a judgment is uncertain, stale, or unavailable? Can I inspect the evidence behind a claim? Can the system fail without eating the original request?</p><p>Those questions are not limited to coding agents. They apply anywhere a language model is connected to tools, private knowledge, or consequential actions.</p><p>The model still matters. So does the prompt. But neither operates alone. The harness decides how context is assembled, how tools are exposed, how uncertainty is handled, and where authority lives.</p><p>That is the part I now find most interesting. It is also the part that made the system feel shapeable. I did not need to become a model researcher to make the interaction more explicit. I needed to separate judgment from control, keep evidence visible, and give failures somewhere safe to go.</p><p>The model is only half the system. The other half is the part we can design.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78c5898b4fbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Built My Own AI Coding Harness With OMP and Obsidian]]></title>
            <link>https://aimanismaill.medium.com/why-i-built-my-own-ai-coding-harness-with-omp-and-obsidian-fb2f6ea0d936?source=rss-30678056395f------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb2f6ea0d936</guid>
            <dc:creator><![CDATA[Aiman Ismail (AI)]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 03:54:21 GMT</pubDate>
            <atom:updated>2026-10-04T04:23:49.995Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I nearly trusted a number because it arrived with a real source. That mistake changed the system around my model.</em></p><p>I was reviewing a draft when I found a sentence that claimed “200 billion rows.” A Notion page sat beside it as the source.</p><p>The page was real. It was relevant to the subject. On a quick pass, the citation made the sentence look finished.</p><p>Then I opened the page and searched for the number. It was not there.</p><p>I had not caught a fake domain or a dead link. I had caught something easier to miss: a genuine source attached to a claim it did not support. I nearly let it through because I had treated the presence of a citation as evidence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BpOyTckpY_vE5FtzaOENdA.png" /></figure><p><em>The link was valid. The relationship between the link and the claim was not.</em></p><p>That incident is the reason I stopped asking only, “Did the agent cite something?” The questions I care about now are harder:</p><ul><li>What exact passage supports this sentence?</li><li>Does the passage say what the draft says, or am I making an inference?</li><li>What should happen when the evidence is missing or contradictory?</li></ul><p>A larger prompt was not enough. I wanted those questions to shape the path the agent followed, not appear as a reminder at the bottom of a prompt.</p><h3>I needed control around the model</h3><p>The default coding-agent interaction is wonderfully direct: ask, let the model inspect some context, receive an answer. It is also easy to trust because the answer arrives as smooth, complete prose.</p><p>My failure was not caused by a lack of fluency. Fluency hid it.</p><p>I wanted to control the machinery around the response: which instructions were persistent, which tools the agent could call, where project context came from, how evidence was recorded, and when a human had to approve the result.</p><p>That led me to <a href="https://github.com/can1357/oh-my-pi">OMP, or Oh My Pi</a>. Its documented extension surfaces include <a href="https://github.com/can1357/oh-my-pi/blob/main/docs/system-prompt-customization.md">system-prompt customization</a>, <a href="https://github.com/can1357/oh-my-pi/blob/main/docs/skills.md">skills</a>, <a href="https://github.com/can1357/oh-my-pi/blob/main/docs/custom-tools.md">custom tools</a>, and <a href="https://github.com/can1357/oh-my-pi/blob/main/docs/context-files.md">project context files</a>. Those features do not make an answer true. They let me turn a preference such as “show your evidence” into a repeatable workflow with named steps and tools.</p><p>My local setup uses separate model roles, a custom provider catalogue, plugins, and a small lifecycle bridge to my terminal environment. That is orchestration, not grounding. It helps me shape how the agent works, but it does not tell the agent which facts deserve belief.</p><p>For that, I use Obsidian.</p><h3>Obsidian is the evidence shelf, not the truth machine</h3><p>An <a href="https://help.obsidian.md/data-storage">Obsidian vault is a folder of plain-text Markdown files</a>. Both a person and an agent can inspect the underlying notes. Obsidian also provides <a href="https://help.obsidian.md/plugins/search">search</a>, links to files, headings, and blocks, and an <a href="https://help.obsidian.md/cli">official CLI</a> for external tools.</p><p>Those properties make the vault useful as an evidence layer. I can keep source URLs, excerpts, dates, confidence notes, and contradictions close to the claims they belong to. When the agent uses a note, I can open the same file and inspect the same passage.</p><p>I should be precise about the connection. I did not find a native OMP-to-Obsidian connector in the implementation I reviewed. My workflow is agent-mediated: OMP can search or read local files, or call a CLI; Obsidian holds the material in an inspectable form. I am not claiming an automatic vector pipeline, a hidden retrieval daemon, or a formal RAG implementation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bLb7QKi3wHuaakZcvaIdyw.png" /></figure><p><em>The useful part is not the number of components. It is the visible path from a request to a passage — or to a gap.</em></p><p>The source map is the hinge. For each important claim, it records the candidate source, the relevant excerpt, how strongly the excerpt supports the claim, and any contradiction or missing evidence. A source can be authoritative and still be silent on the sentence I want to write. The map keeps those two facts separate.</p><h3>What the failed claim looks like in the new workflow</h3><p>I do not have a historical, end-to-end trace of the original “200 billion rows” incident. The failure record captures the unsupported claim and the source mismatch, not every action that led to it. So the following is a reconstruction of how I would check that same sentence now, not a claim about a log I do not have.</p><p>I start with a narrow request: <strong>verify this number before it enters the draft</strong>.</p><p>The harness applies the research workflow before the writing workflow. The agent searches the vault and opens candidate notes instead of pasting the whole vault into the prompt. For each candidate, it keeps the source link and the passage that appears to matter.</p><p>Then it builds the source-map entry. In this case, the Notion page is real and relevant, but the exact number does not appear in the fetched text. The support level is therefore not “strong” or even “partial.” It is <strong>not supported by this source</strong>.</p><p>The correct output is not a better-sounding sentence. It is a visible gap: find another source, remove the number, or label the statement as unverified. A human makes that choice before publication.</p><p>This is a small distinction with a large effect on review. The old workflow made me disprove a polished answer after the fact. The new one asks the agent to produce the material I need to challenge the answer before I accept it.</p><h3>Three checks, three different owners</h3><p>I used to blur all “verification” together. In practice, three different jobs are involved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EP6pxSSPIrss_OVbRPQyxw.png" /></figure><p><em>Code, model judgment, and human approval are complementary. None can quietly stand in for the others.</em></p><p><strong>Code can check mechanical facts.</strong> I have deterministic citation tooling that can reject an unknown source ID, detect a URL mismatch, and verify that a quoted string appears in fetched evidence. Those are useful guarantees. They do not prove that the source is correct or that the quote logically entails the claim.</p><p>There is another boundary worth stating: I found no evidence that this verifier is automatically invoked by my Medium-writing workflow. It is an available control, not a universal gate. Calling the whole pipeline “deterministically verified” would be false.</p><p><strong>The model can judge meaning.</strong> It can compare a claim with an excerpt, notice a contradiction, classify the strength of support, and explain when a sentence depends on inference. That work is valuable, but it is still model judgment. It can be inconsistent or wrong.</p><p><strong>A human decides whether the evidence is enough.</strong> Freshness, source quality, publication risk, and the cost of being wrong do not collapse into a single confidence score. Approval is where those trade-offs become a decision.</p><p>The layers work because their limits are visible. Trouble starts when quote presence is presented as truth, model confidence is presented as proof, or a decorative approval step is presented as review.</p><h3>Retrieval helps. It also fails in predictable ways</h3><p>There is good research behind retrieval grounding, but none of it supports the claim that retrieval eliminates hallucinations.</p><p>The original <a href="https://arxiv.org/abs/2005.11401">retrieval-augmented generation paper</a> reported more factual language than a parametric-only baseline on its evaluated tasks. <a href="https://arxiv.org/abs/2310.11511">Self-RAG</a> argues that retrieving relevant knowledge can reduce factual inaccuracies, while warning that indiscriminate retrieval can make results less useful.</p><p>The failure literature matters just as much. <a href="https://aclanthology.org/2024.acl-long.585/">RAGTruth</a> documents unsupported or contradictory claims in RAG outputs. <a href="https://arxiv.org/abs/2401.15884">Corrective RAG</a> identifies document relevance and limited corpora as persistent failure points.</p><p>My vault is not exempt. A note can be stale. Search can miss the right file. The agent can retrieve the right paragraph and read it badly. A source can be excellent on one point and useless on the next.</p><p>Local Markdown gives me inspectability, not correctness. Retrieval gives the model material, not truth.</p><h3>What actually changed</h3><p>I have not measured a before-and-after hallucination rate for this setup. I do not have defensible numbers for accuracy, latency, or cost. If I offered a percentage improvement, I would be repeating the mistake that started this project: giving a precise claim more confidence than its evidence deserves.</p><p>The change I can show is structural.</p><p>A request now has an evidence-producing path before it has a prose-producing path. Claims can be attached to excerpts. Missing support has a place to remain missing. Contradictions can survive long enough for a person to see them. Deterministic checks handle the narrow facts they can actually prove.</p><p>I still use models for speed. I still let them search, compare, draft, and code. I just no longer let fluent prose carry the burden of proof.</p><p>That is why I built the harness: not to make the model infallible, but to make my reasons for trusting it inspectable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb2f6ea0d936" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Built a Jev Model Router Inside OMP]]></title>
            <link>https://aimanismaill.medium.com/how-i-built-a-jev-model-router-inside-omp-15bf9756feb5?source=rss-30678056395f------2</link>
            <guid isPermaLink="false">https://medium.com/p/15bf9756feb5</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[harness-engineering]]></category>
            <category><![CDATA[model-routing]]></category>
            <dc:creator><![CDATA[Aiman Ismail (AI)]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 03:41:02 GMT</pubDate>
            <atom:updated>2026-10-04T03:41:02.331Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Why use the strongest model every time? This router matches each prompt to one of four Codex routes while deterministic TypeScript keeps control.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mi962gbBGpnOjofdBOlCTg.png" /><figcaption>One prompt passes from OMP to a bounded Jev judgment; deterministic code validates confidence, handles fallbacks, and applies the final route.</figcaption></figure><p>For a general reader, the setup is simple. Oh My Pi (OMP) is the AI coding tool that receives the prompt. Jev is a small judgment model used only to classify the task. TypeScript is the referee: it checks whether Jev&#39;s answer is valid and confident enough, chooses a safe fallback when it is not, and tells OMP which model and reasoning level to use. The original prompt then continues unchanged.</p><p>That separation matters. Jev never runs the task, rewrites the prompt, calls a provider, or chooses its own next action. It makes one bounded judgment. Code decides what to do with that judgment. OMP performs the authenticated model switch and executes the prompt.</p><h3>Why route at all?</h3><p>AI tasks do not all demand the same capability. A short explanation should not use the same route as an architectural decision. A normal feature should not inherit the reasoning settings for a difficult diagnosis.</p><p>The tempting solution is to send every prompt to the strongest available model. That is simple, but it ignores the shape of the work. A router instead asks a narrower question: what is the least expensive route that can reliably complete this task?</p><p>That sentence is a routing instruction, not a measured result. The current implementation has no workload benchmark proving lower cost, token use, latency, or higher accuracy. Those remain hypotheses to test rather than claims to publish.</p><h3>The mental model: judge, decide, execute</h3><p>The router has three responsibilities:</p><p>1. Jev judges. It classifies the prompt into one of four named routes and returns a confidence value.</p><p>2. TypeScript decides. It validates the route, enforces a project-specific confidence threshold, handles cancellation, and applies fallbacks.</p><p>3. OMP executes. It resolves an authenticated model, switches the model and reasoning level, then runs the original prompt.</p><p>This is not a multi-provider gateway. It does not call OpenAI with a separate API key. It routes among models already available through OMP&#39;s authenticated openai-codex provider.</p><h3>What the router actually does</h3><p>The route names are intentionally readable. They describe the kind of work; the policy table owns the exact OMP model selector and reasoning level.</p><pre>export const ROUTES: Record&lt;RouteName, RouteConfig&gt; = {<br>  luna: {<br>    model: &quot;openai-codex/gpt-5.6-luna&quot;,<br>    reasoning: ThinkingLevel.Low,<br>  },<br>  terra: {<br>    model: &quot;openai-codex/gpt-5.6-terra&quot;,<br>    reasoning: ThinkingLevel.Medium,<br>  },<br>  sol: {<br>    model: &quot;openai-codex/gpt-5.6-sol&quot;,<br>    reasoning: ThinkingLevel.High,<br>  },<br>  astra: {<br>    model: &quot;openai-codex/gpt-6-astra&quot;,<br>    reasoning: ThinkingLevel.Low,<br>  },<br>};<br><br>export const DEFAULT_ROUTE: RouteName = &quot;terra&quot;;<br>export const CONFIDENCE_THRESHOLD = 0.65;<br>export const JEV_TIMEOUT_MS = 3_000;</pre><p>The labels make the policy easy to discuss:</p><p>• Luna handles explanations, lookups, summaries, tiny edits, and deterministic mechanical work.</p><p>• Terra is the normal route for features, tests, debugging, and moderate multi-file changes.</p><p>• Sol handles difficult diagnosis, broad refactors, subtle correctness work, and sustained tool use.</p><p>• Astra is reserved for architecture, ambiguity with high consequences, security-sensitive work, and exceptional complexity.</p><p>Terra is also the deliberately boring fallback. When the judgment is missing, malformed, or insufficiently confident, the router moves toward the middle instead of gambling on either extreme.</p><h3>One narrow Jev question</h3><p>The Jev state contains only the information needed for routing: the prompt and whether attachments are present. It does not receive credentials, session state, tool output, or authority to invoke another model.</p><p>The question is a closed choice. Each option describes observable task characteristics instead of vague labels such as small, medium, and large.</p><pre>const routeQuestion = choice(<br>  &quot;Choose the least expensive route that can reliably complete this prompt.&quot;,<br>  {<br>    luna:<br>      &quot;Explanation, lookup, summary, tiny localized edit, or deterministic mechanical work.&quot;,<br>    terra:<br>      &quot;Normal feature work, testing, debugging, or a moderate multi-file change.&quot;,<br>    sol:<br>      &quot;Difficult diagnosis, broad refactor, subtle correctness work, or sustained tool use.&quot;,<br>    astra:<br>      &quot;Architecture, ambiguous high-consequence decision, security-sensitive work, or exceptional complexity.&quot;,<br>  },<br>);</pre><p>The adapter sends that one question to the moving jev-latest alias, with a three-second timeout and zero retries:</p><pre>const result = await client.systemOne(<br>  {<br>    state: { prompt, hasAttachments },<br>    model: &quot;jev-latest&quot;,<br>    questions: { route: routeQuestion },<br>  },<br>  { signal, timeout: 3_000, retry: { maxRetries: 0 } },<br>);</pre><p>Using jev-latest is a deliberate versioning choice. Because the alias can advance, the routing policy and threshold should be revalidated when its behavior changes.</p><h3>Why confidence is enforced outside the model</h3><p>Jev returns a typed choice and confidence. It does not decide whether its own confidence is good enough.</p><p>The policy accepts only known route names and requires confidence of at least 0.65. Anything malformed or uncertain falls back to Terra. This makes failure behavior inspectable and unit-testable.</p><pre>export function selectRoute(answer: JevChoiceAnswer): RouteDecision {<br>  if (!Object.hasOwn(ROUTES, answer.choice)) {<br>    return {<br>      route: DEFAULT_ROUTE,<br>      config: ROUTES[DEFAULT_ROUTE],<br>      fallback: &quot;invalid-choice&quot;,<br>    };<br>  }<br><br>  if (<br>    !Number.isFinite(answer.confidence) ||<br>    answer.confidence &lt; CONFIDENCE_THRESHOLD<br>  ) {<br>    return {<br>      route: DEFAULT_ROUTE,<br>      config: ROUTES[DEFAULT_ROUTE],<br>      fallback: &quot;low-confidence&quot;,<br>    };<br>  }<br><br>  const route = answer.choice as RouteName;<br>  return { route, config: ROUTES[route] };<br>}</pre><p>The number 0.65 is a project-specific policy value, not a universal confidence threshold. TypeSafe&#39;s own guidance is to test thresholds against the application&#39;s domain and observed results.</p><h3>The end-to-end prompt flow</h3><p>For an ordinary prompt, the path in the opening diagram becomes a small pipeline:</p><p>1. OMP emits an input event. Empty input, slash commands, and extension-generated synthetic messages bypass routing.</p><p>2. The extension sends the prompt and attachment flag to Jev.</p><p>3. Jev returns a route and confidence.</p><p>4. The pure policy validates both values and applies the confidence threshold.</p><p>5. The runtime resolves the exact selector through OMP&#39;s authenticated model registry.</p><p>6. OMP switches the model first and the reasoning level second. The original prompt then continues unchanged.</p><p>The router configures the OMP session immediately before execution. It never executes the task itself.</p><h3>Handling prompts that arrive close together</h3><p>Routing is asynchronous, so stale decisions are dangerous. A slow answer for prompt A must not switch the model after prompt B has already become current.</p><p>The runtime handles this with an AbortController, a monotonically increasing generation, and a serialized mutation tail. A new route aborts the previous evaluation. Every asynchronous boundary checks whether its generation is still current before it can mutate OMP state.</p><pre>async route(state, control) {<br>  activeController?.abort();<br>  const controller = new AbortController();<br>  activeController = controller;<br>  const currentGeneration = ++generation;<br><br>  const answer = await evaluator.evaluate(state, controller.signal);<br>  if (<br>    controller.signal.aborted ||<br>    currentGeneration !== generation<br>  ) {<br>    return cancelledOutcome(answer.confidence);<br>  }<br><br>  const decision = selectRoute(answer);<br>  // Resolve and serialize the model mutation before applying it.<br>}</pre><p>If a stale request has already switched the model before a newer prompt takes ownership, the runtime restores the previous model. That prevents late work from silently changing the environment under the current prompt.</p><h3>Applying the route through OMP</h3><p>The extension stays thin. It translates OMP events into the router&#39;s small interfaces, then shows a concise notification. Authentication, provider invocation, chat history, tools, and the original prompt remain OMP responsibilities.</p><p>Interactive TUI input is handled by the input hook. Headless and RPC sessions use before_agent_start. The guard avoids routing the same TUI prompt twice.</p><pre>pi.on(&quot;input&quot;, async (event, ctx) =&gt; {<br>  if (shouldBypassInput(event.text, event.source)) return;<br>  await routePrompt(<br>    event.text,<br>    (event.images?.length ?? 0) &gt; 0,<br>    ctx,<br>  );<br>});<br><br>pi.on(&quot;before_agent_start&quot;, async (event, ctx) =&gt; {<br>  if (ctx.mode === &quot;tui&quot;) return;<br>  if (shouldBypassInput(event.prompt, &quot;interactive&quot;)) return;<br>  await routePrompt(<br>    event.prompt,<br>    (event.images?.length ?? 0) &gt; 0,<br>    ctx,<br>  );<br>});<br><br>pi.on(&quot;session_shutdown&quot;, () =&gt; {<br>  router.cancel();<br>});</pre><h3>Failure behavior is part of the product</h3><p>A routing failure must never eat the user&#39;s prompt. That invariant determines every fallback:</p><p>• Jev timeout, transport error, or malformed response: use Terra.</p><p>• Confidence below 0.65: use Terra.</p><p>• Chosen model unavailable: try Terra.</p><p>• Terra unavailable: keep the current model.</p><p>• Model switch failure: keep the current model and do not apply the new reasoning level.</p><p>• Prompt superseded or session shutting down: cancel the in-flight judgment and prevent a late switch.</p><p>The router can become less ambitious when uncertain, but it cannot block the conversation.</p><h3>What the tests protect</h3><p>The useful tests sit at boundaries where a plausible bug would change visible behavior. Pure policy tests pin the route map, confidence threshold, malformed-choice fallback, and command bypasses. Runtime tests cover unavailable models, failed switches, overlapping requests, and cancellation. Extension tests cover TUI versus RPC hooks, attachments, notifications, and shutdown.</p><p>The Jev and OMP adapters are injected. That keeps tests deterministic without pretending a network mock proves routing quality.</p><h3>What stays out</h3><p>The current implementation does not support non-OpenAI providers, route tool calls, persist classifications, learn thresholds from telemetry, or run ensembles. It also does not rewrite prompts.</p><p>Those constraints keep the router explainable: one prompt, one typed judgment, one deterministic policy decision, one OMP model switch.</p><h3>The lesson</h3><p>The hard part of AI routing is not listing models. It is deciding where probabilistic judgment ends and deterministic authority begins.</p><p>Jev handles the fuzzy comparison: what kind of work is this, and which route is likely sufficient? TypeScript handles thresholds, known identifiers, cancellation, serialized mutations, fallbacks, and side effects. OMP handles authenticated execution.</p><p>Once those responsibilities are separated, the system becomes small enough to reason about and strict enough to trust.</p><h3>Relevant sources</h3><p>TypeSafe, System One — https://docs.typesafe.ai/concepts/system-one</p><blockquote>“A System One model evaluates a state and returns typed answers and probabilities.”</blockquote><p>TypeSafe, Choice — https://docs.typesafe.ai/primitives/choice</p><blockquote>“A Choice is a System One question type for selecting one option from a defined set. The answer includes the selected option, a probability for each option, and confidence.”</blockquote><p>TypeSafe, Confidence — https://docs.typesafe.ai/confidence</p><blockquote>“The correct threshold values depend on your domain and the performance of the model for your use case. Start with conservative thresholds, test with your own data, and adjust as you observe results.”</blockquote><p>TypeSafe, How to build with TypeSafe — https://docs.typesafe.ai/concepts/how-to-build-with-system-one</p><blockquote>“System One is TypeSafe&#39;s model for building AI-powered software, not agents. It does not generate code or choose its own next action. It provides AI primitives that embed into software, so code remains in control while the model handles common-sense judgments over unstructured data.”</blockquote><p>OMP, Extensions (commit 6d8552d7f9df1852826923f07f0eed4fe29511f3) — https://github.com/can1357/oh-my-pi/blob/6d8552d7f9df1852826923f07f0eed4fe29511f3/docs/extensions.md#L17-L34</p><blockquote>“An extension is a TS/JS module exporting a default factory.”</blockquote><p>OMP, ExtensionAPI model controls (same commit) — https://github.com/can1357/oh-my-pi/blob/6d8552d7f9df1852826923f07f0eed4fe29511f3/packages/coding-agent/src/extensibility/extensions/types.ts#L1620-L1627</p><blockquote>setModel(model: Model): Promise&lt;boolean&gt;;<br>setThinkingLevel(level: ThinkingLevel): void;</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15bf9756feb5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trend Analysis with Python: Understanding Stock Trends with Python and Pandas]]></title>
            <link>https://aimanismaill.medium.com/trend-analysis-with-python-understanding-stock-trends-with-python-and-pandas-0bf1432dca9b?source=rss-30678056395f------2</link>
            <guid isPermaLink="false">https://medium.com/p/0bf1432dca9b</guid>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[algorithmic-trading]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[automated-trading]]></category>
            <category><![CDATA[algotrading]]></category>
            <dc:creator><![CDATA[Aiman Ismail (AI)]]></dc:creator>
            <pubDate>Sat, 13 Apr 2024 23:58:12 GMT</pubDate>
            <atom:updated>2024-04-13T23:58:12.965Z</atom:updated>
            <content:encoded><![CDATA[<p>Understanding Stock Trends with Python and Pandas</p><p>Stock market investing is an art and a science. One of the fundamental tools for analyzing stock trends is the Simple Moving Average (SMA). In this article, we will explore how to fetch historical stock data, calculate the SMA, and determine the number of days a stock’s price is above or below its SMA using Python and Pandas.</p><p>To follow along, you’ll need:</p><blockquote>•	Python installed on your machine</blockquote><blockquote>•	Pandas library for data manipulation</blockquote><blockquote>•	yfinance and pandas_datareader libraries for fetching stock data</blockquote><h3>Getting Started</h3><p>Let’s start by importing the required libraries:</p><pre>import pandas as pd<br>import numpy as np<br>import yfinance as yf<br>import datetime as dt<br>from pandas_datareader import data as pdr<br>yf.pdr_override()</pre><p>Here’s what each library does:</p><blockquote>•	pandas: Data manipulation and analysis</blockquote><blockquote>•	numpy: Numerical operations</blockquote><blockquote>•	yfinance: Fetches stock data from Yahoo Finance</blockquote><blockquote>•	datetime: Manages date and time</blockquote><blockquote>•	pandas_datareader: Fetches data from various sources, including Yahoo Finance</blockquote><h3>Fetching Stock Data</h3><p>Next, we prompt the user to enter a stock ticker and fetch the historical data from January 1, 2023, to the current date:</p><pre>stock = input(&quot;Enter stock ticker: &quot;)<br>startyear=2023<br>startmonth=1<br>startday=1<br>start=dt.datetime(startyear,startmonth,startday)<br>now=dt.datetime.now()<br>df=pdr.get_data_yahoo(stock, start, now)</pre><h3>Calculating Simple Moving Average (SMA)</h3><p>We will calculate the 50-day SMA and add it to our DataFrame:</p><pre>ma = 50<br>smaString = &quot;SMA_&quot;+str(ma)<br>df[smaString] = df.iloc[:,4].rolling(window=ma).mean()</pre><h3>Analyzing the Data</h3><p>Finally, we loop through the DataFrame to count the number of days the stock’s adjusted closing price is above or below the SMA:</p><pre>numH=0<br>numL=0<br>for i in df.index:<br>    if(df[&quot;Adj Close&quot;][i]&gt;df[smaString][i]):<br>        numH+=1<br>    else:<br>        numL+=1</pre><h3>Conclusion</h3><p>Analyzing stock trends using Python and Pandas can provide valuable insights for investors. In this article, we learned how to fetch historical stock data, calculate the Simple Moving Average, and determine the number of days a stock’s price is above or below its SMA. This information can be a starting point for more advanced analysis and investment strategies.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0bf1432dca9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>