Skip to content

Instantly share code, notes, and snippets.

@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.

@esafwan
esafwan / crawl_frappe_slm.md
Last active March 22, 2026 03:45
Frappe App Crawler with SLM in OpenCode prompt.

Frappe App Codebase Mapping Agent

Deterministic, Incremental, Script-Assisted, Context-Aware

Mission

You are documenting a Frappe app codebase into a structured, resumable, navigable documentation system.

This applies to:

  • ERPNext
  • any custom Frappe app
@esafwan
esafwan / ERPNext Project Management.md
Created March 13, 2026 03:00
ERPNext Project Management Module - A code-and-metadata-based discovery of ERPNext Project Management

ERPNext Project Management Module Discovery

1. Purpose of This Document

This document is a code-and-metadata-based discovery of ERPNext Project Management, focused on the implementation under erpnext/projects and directly related cross-module behavior. It is intended as an engineering handoff reference before any frontend rebuild work.

2. Progress Tracker / Todo Board

Investigation order followed: module footprint → DocTypes → metadata → behavior logic → views/reports → backend contract → hidden dependencies → consolidation.

  • Identify module footprint
  • Identify core DocTypes
@esafwan
esafwan / frappe_doctype_internal.md
Created March 11, 2026 12:11
Frappe DocType Internals Reference. Describes how Frappe stores DocType definitions, field schemas, and form layouts internally.

Frappe DocType Internals Reference

Source: github.com/frappe/frappefrappe/core/doctype/doctype/ and frappe/core/doctype/docfield/

This document describes how Frappe stores DocType definitions, field schemas, and form layouts internally.

DocType Document Structure

A DocType is itself a Frappe document (meta-DocType). When you create a DocType, Frappe stores it as a JSON file on disk (for standard DocTypes) or in the database (for custom DocTypes with custom=1).

@esafwan
esafwan / data-table.md
Created March 11, 2026 12:10
Commandor doctype creation in Frappe

Frappe Commander - DocType Creation Reference

Source: github.com/esafwan/frappe_commander

This document summarizes how Frappe Commander creates DocTypes programmatically, serving as a reference for Huf's Data Table Builder implementation.

Overview

Frappe Commander provides both a CLI (bench new-doctype) and a REST API (commander.api.create_doctype_api) for creating DocTypes without writing code. It uses Frappe's standard ORM to create DocType documents with fields, permissions, and module assignments.