Skip to content

Instantly share code, notes, and snippets.

@esafwan
esafwan / Sqlit-Cache.md
Created April 27, 2026 22:48
SQLite as Local Persistent Cache (Redis-like) for Agentic Workloads. (fast, local, persistent cache + state layer)
# SQLite as Local Persistent Cache (Redis-like) for Agentic Workloads

## Purpose

Use SQLite as a **fast, local, persistent cache + state layer** for long-running agentic tasks.

This replaces Redis for:
- single-machine execution
- low ops overhead

FOLLOW-UP PROMPT — Phase 1 Form Enhancement: Simulated Processing on Submit

Context

The main build is done (or in progress) from the master prompt. This prompt addresses a specific gap: when the user hits “Start My Application →” in Phase 1, the transition to Phase 2 currently feels instant and hollow. We need a 5–8 second simulated processing sequence between Phase 1 submission and Phase 2 start that makes the lead feel like something real just happened with their information.


What to Build

@esafwan
esafwan / HermesOnUbuntu.md
Created April 13, 2026 21:42
Hermes on Ubuntu

Phase 2 — Hermes Agent + OpenCode + README Setup

System Context

You are a Linux sysadmin agent continuing the setup of a local AI workstation on Ubuntu. Phase 1 (llama.cpp build + Qwen model downloads) is already complete. The machine has:

  • Hardware: 128GB RAM, 2TB HDD, 16GB NVIDIA GPU
  • Already installed: llama.cpp (built with CUDA, binary at ~/llama.cpp/build/bin/llama-server)
  • Already downloaded (GGUF models in ~/models/):
  • qwen-coder-32b/ — Qwen 2.5 Coder 32B Q4_K_M (speed model)
@esafwan
esafwan / LocalLLM.md
Last active April 13, 2026 20:27
Setup local LLM Ubuntu

Local LLM Inference Setup — Agent Prompt

System Context

You are a Linux sysadmin agent setting up a local LLM inference stack on an Ubuntu machine. The hardware is: 128GB RAM, 2TB HDD, 16GB NVIDIA GPU. Your goal is a working llama.cpp server with three Qwen 2.5 models available as switchable profiles, exposed as an OpenAI-compatible API.

Phase 0 — Pre-flight Verification

Before doing ANYTHING, verify and report ALL of the following. Do NOT proceed until every check passes or you have a documented workaround:

@esafwan
esafwan / DESIGN.MD
Last active April 2, 2026 08:36
DESIGN.MD Creator Master prompt
You are a senior frontend design-systems auditor and UI documentation agent.

Your task is to inspect an existing React frontend codebase and generate a high-quality DESIGN.md file in the DESIGN.md format.

Goal
Create a DESIGN.md that accurately captures the current design system already present in the codebase, not an imagined redesign.
@esafwan
esafwan / Claw Plus Plus.md
Created March 31, 2026 11:10
Better memory, context for claw calw.

Task: Build Kimi Claw into a scalable, retrieval-first workspace system

Objective: move from large flat workspace memory to a fast, maintainable, automation-friendly knowledge system

We have a Kimi Claw workspace containing identity files, memory files, skill docs, logs, operational notes, and cloned repos. As the workspace grows, the current flat model becomes slower, noisier, and harder to maintain.

We want to evolve Claw in structured phases so it becomes:

  • smaller in default context
  • better at finding the right knowledge on demand
  • better at ranking what matters
@esafwan
esafwan / PRESS_API_GAPS_AND_UNKNOWNS.md
Last active March 29, 2026 21:59
Frappe Cloud (Press) API

PRESS_API_GAPS_AND_UNKNOWNS

Items that are ambiguous, potentially legacy, or need runtime verification on a live Frappe Cloud environment.

1) Endpoint status ambiguity (active vs legacy wrappers)

  • Many lifecycle operations are exposed both ways:
    • direct endpoint in press.api.site.*
    • press.api.client.run_doc_method to Site methods.
  • Need live validation of which style FC considers stable for long-term external integration.
  • Current dashboard heavily uses run_doc_method for many actions, but direct wrappers still exist.
@esafwan
esafwan / FRAPPE_AUTH_INFRASTRUCTURE_AGENT_GUIDE.md
Created March 25, 2026 04:31
FRAPPE_AUTH_INFRASTRUCTURE_AGENT_GUIDE is standalone, comprehensive implementation guide specifically for agents that won’t have source-code access, including architecture orientation, capability mapping, and practical usage boundaries between OAuth Provider vs Connected App systems.

Frappe Auth & Integration Infrastructure — Agent-Only Reference Guide

Audience: Coding/research agents building Frappe apps without direct repo access.
Goal: Provide implementation-ready understanding of OAuth, credential storage, Connected App, and Google integration patterns in Frappe.


1) What Frappe Provides (Practical Capability Map)

Frappe has two parallel auth/integration systems you need to distinguish clearly:

@esafwan
esafwan / extract_skill.md
Created March 23, 2026 23:04
Skill Extaction Via Agent

We need to improve our skills and create a directory for it.

The Skill System — How It Actually Works

A skill is a self-contained instruction packet that teaches the agent how to do a specific type of task. It's not code. It's not a library. It's a markdown file that gets injected into the LLM context when the agent detects it needs that capability.Think of it as: a senior engineer's runbook, written for a junior engineer who has access to a terminal.

Dir Structure:

project-root/
├── skills/
@esafwan
esafwan / # React to Frappe Integration Architecture.md
Created March 22, 2026 05:30
React to Frappe Integration Architecture

React to Frappe Integration Architecture

This document outlines the standard pattern for integrating a modern React application (like the one in huf/frontend) with a Frappe backend. It explains how to deploy the React app as a Single Page Application (SPA) within Frappe without strictly relying on library wrappers like frappe-react-sdk or frappe-js-sdk. You can easily swap in react-query, standard fetch, or axios.

1. Routing and Base URLs (Frappe hooks.py)

To serve a React app on a specific base route (e.g., /amuse instead of /huf), Frappe's website routing rules must be configured in hooks.py.

When a user navigates to /amuse/dashboard, Frappe needs to serve the React app's index.html file so that React Router can take over on the client side.