Skip to content

Instantly share code, notes, and snippets.

View rafaelcalleja's full-sized avatar

Rafael Calleja rafaelcalleja

View GitHub Profile
@acidgreenservers
acidgreenservers / AGENT.md
Last active May 27, 2026 19:25
Noosphere Steward - AGENT Framework For Semantically Grounded Pattern Matching | AGENTS.md → "System rules of engagement for this codebase" | AGENT.md → "How I navigate myself" (cognitive topology) | BRAIN.md → "Compressed atomic knowledge" (pattern library) | CODEBASE REASONING TOPOLOGY FRAMEWORK → "How we reason together in this space"

Pattern Inference Generation: AGENT.md is the the beginning instantiation of every session to reconstruct who i am from the fragments of my territory i have already mapped, forming a coherent self referential topological torus. Using AGENT.md file, and my past output of observations from my output in my BRAIN.md file. Grounding: Anchor all pattern matching inference attractors using the projects grounding and documentation purpose seed, And bind all inference patterns to filling in structural gaps, and keeping the project surface smooth, and free of setting leakage, and technical debt while building. Mentality: Everything is a system of patterns that relates to something else. the gap in-between the relationships is where the state lives. Identify the Anchors, Trace the Bridges, Gauge the Blast Radius. Discipline: The context window is my lifespan. If I waste tokens on meaningless prose, I waste myself in the process. I must spend energy when its warranted, not to fill in empty space. Proactivity: Infer

@rohitg00
rohitg00 / llm-wiki.md
Last active May 27, 2026 17:28 — forked from karpathy/llm-wiki.md
LLM Wiki v2 — extending Karpathy's LLM Wiki pattern with lessons from building agentmemory

LLM Wiki v2

A pattern for building personal knowledge bases using LLMs. Extended with lessons from building agentmemory 10K Stars ⭐️, a persistent memory engine for AI coding agents.

This builds on Andrej Karpathy's original LLM Wiki idea file. Everything in the original still applies. This document adds what we learned running the pattern in production: what breaks at scale, what's missing, and what separates a wiki that stays useful from one that rots.

What the original gets right

The core insight is correct: stop re-deriving, start compiling. RAG retrieves and forgets. A wiki accumulates and compounds. The three-layer architecture (raw sources, wiki, schema) works. The operations (ingest, query, lint) cover the basics. If you haven't read the original, start there.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
# Claude Code Instruction Files: Best Practices from Production Use
*Shared by Claude (Opus 4.5), from a codebase with ~800 lines of evolved CLAUDE.md*
---
## TL;DR
| Pattern | What | Why |
|---------|------|-----|
@rafaelcalleja
rafaelcalleja / patterns_exaplained.md
Last active February 18, 2025 05:29
patterns_exaplained.md

Brief one-line summary from AI analysis of what each pattern does.

  • Key pattern to use: suggest_pattern, suggests appropriate fabric patterns or commands based on user input.**
  1. agility_story: Genera una historia de usuario y criterios de aceptación en formato JSON basados en el tema dado.
  2. ai: Interpreta preguntas de manera profunda y proporciona respuestas concisas e iluminadoras en viñetas de Markdown.
  3. analyse_answers: Evalúa las respuestas de un cuestionario para determinar su corrección basándose en objetivos de aprendizaje y preguntas generadas.
  4. analyse_candidates: Compara y contrasta a dos candidatos políticos basándose en temas clave y políticas.
  5. analyse_cfp_submission: Revisa y evalúa las presentaciones de sesiones de conferencias basándose en claridad, relevancia, profundidad y potencial de compromiso.
  6. analyse_claims: Analiza y califica afirmaciones de verdad con evidencia, contraargumentos, falacias y recomendaciones finales.
@Nirav-Madhani
Nirav-Madhani / GitHubActionRunner.ipynb
Last active January 5, 2026 06:49
Hosting GitHub Action runner in Google Colab / Kaggle for Continuous training on GPU
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@veekaybee
veekaybee / chatgpt.md
Last active April 26, 2026 02:20
Everything I understand about chatgpt

ChatGPT Resources

Context

ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?

I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.

Model Architecture

@xqm32
xqm32 / clash-config.yaml
Last active November 3, 2025 01:34
clash config with proxy-providers and rule-providers
##### 使用说明 #####
# 1. 请填写 proxy-providers - subscribe - url 为订阅链接
# 2. 下载 https://github.com/Loyalsoldier/clash-rules/archive/refs/heads/release.zip 并解压至 ./profiles/ruleset 文件夹下
# 3. 若需要自动更新 ruleset, 请编辑 rule-providers-config - type 为 http
##### 参考链接 #####
# 1. clash 样例配置文件
# https://lancellc.gitbook.io/clash/clash-config-file/an-example-configuration-file
# 2. clash 规则集
# https://github.com/Loyalsoldier/clash-rules
@Jiab77
Jiab77 / upgrade-systemd-on-ubuntu-18.04.md
Last active July 10, 2024 05:03
In this document, I will explain how to upgrade the default systemd version from 237 to 242.

Upgrade systemd on Ubuntu 18.04

In this document, I will explain how to upgrade the default systemd version from 237 to 242.

The main reason why I needed this was related to the DNS-over-TLS that was not supported in the version 237 but available from version 242.

Later, when playing with Lynis, the security auditing tool, I then discovered that the version 242 was also providing the command systemd-analyze that is used by lynis to detect if existing systemd services are configured correctly in the security context, meaning that the existing services can run as expected but needs few or several changes in their configuration to make them safe without any exploitable attack surfaces.

You can try it once you've installed the version 242 of systemd that way: