๐Ÿ“š Teach

Interactive lessons - hosted on teach.zahranm.cloud

Harness Engineering - Building Something Like Hermes
Lesson 01 - What Is an Agent Harness?

The architecture of a tool-calling autonomous agent: the conversation loop, tool registry, system prompt assembly, session persistence, gateway pattern, and the five sacred rules.

Published June 19, 2026
Lesson 02 - The Conversation Loop

How Hermes turns one user message into repeated model calls, tool dispatch, recovery, context compression, and a final answer.

Published June 22, 2026
Lesson 03 - Tools, MCP, and Skills

How Hermes manages its capability surface across three layers: the tool registry (built-in tools), MCP servers (external tools), and skills (procedural knowledge).

Published June 19, 2026
Lesson 04 - System Prompt Assembly

How the system prompt is built from identity, skills, memory, context files, and platform hints.

Coming soon
Lesson 05 - Session Persistence with SQLite + FTS5

How conversations are stored, searched, and compressed. The parent_session_id chain pattern.

Coming soon
Lesson 06 - The Gateway Pattern

How one agent core serves 20+ messaging platforms through adapter interfaces.

Coming soon
Lesson 07 - Memory and Skills

The self-improvement loop: declarative memory vs procedural skills, and how an agent learns across sessions.

Coming soon
Lesson 08 - Building a Minimal Agent from Scratch

Putting it all together: a working ~200-line Python agent with tools, sessions, and a CLI.

Coming soon
Deep Dive: DeepSeek Harness and Cordis ยท Self-contained
Lesson 00 - Values, Types, and Function Calls

Start from zero: distinguish values, types, functions, actual calls, pairs, and the paper's later symbols. No paper reading required.

Published August 14, 2026
Lesson 01 - The Mathematical Map

Build the first formal model: contexts, reversible effects, inverse composition, effect accumulators, dependency environments, and satisfaction predicates.

Published August 14, 2026
Using Herdr Effectively
Lesson 01 - Persistent Agent Workspaces

Understand sessions, workspaces, tabs, panes, and agent states. Start an agent, detach safely, and reattach without losing work.

Published August 12, 2026
Lesson 02 - The Attention Queue

Read working, blocked, done, idle, and unknown states; understand detection authority; and diagnose surprising classifications.

Published August 12, 2026
Lesson 03 - Parallel Work

Organize multiple agents with workspaces, tabs, panes, Git worktrees, bounded prompts, and safe handoffs.

Published August 12, 2026
Lesson 04 - Remote Work and Restore

Choose local, SSH-first, or thin-client remote work; detach safely; and understand restart, native session restore, and live handoff.

Published August 12, 2026
Lesson 05 - Agent-Native Automation

Control Herdr from scripts or from inside an agent; choose between layout, pane, agent, and socket primitives.

Published August 12, 2026
Faster, Cleaner Typing
Lesson 01 - Break the 98 WPM Plateau

Measure WPM, accuracy, raw speed, and consistency, then alternate control runs, short ceiling bursts, and real-text transfer.

Published August 14, 2026
Functional Programming in Scala
Lesson 01 - What Is a Pure Function?

Try the browser exercise: edit synthetic readings, run a pure calculation, and observe predictable output. No VPS or production data is required.

Published August 10, 2026
Lesson 02 - Make Behavior a Value

Use higher-order and polymorphic functions to keep one reusable loop while injecting ordering policy, partial application, and composition.

Published August 13, 2026
Lesson 03 - Let Data Shape Code

Model immutable lists with Nil and Cons, follow their shape with pattern matching, share safe suffixes, and generalize recursion with folds.

Published August 13, 2026
Investment & Portfolio Theory - Unit 0 Toolkit
Lesson 00 - Returns and Risk

Holding period returns, expected return, variance, why risk is measured as spread, and the SPY histogram artifact.

Published August 20, 2026
Lesson 01 - Covariance, Correlation, and Regression

Two-asset portfolio variance and the OLS slope derived from first principles; the SPY/IWM scatter artifact.

Published August 20, 2026
Lesson 02 - Utility, Risk Aversion, and Optimization

The utility score, indifference curves, the optimal risky share and minimum-variance weights, and the Sharpe ratio.

Published August 20, 2026
Lesson 03 - The Time Value of Money (Unit 1)

PV, FV, compounding, annuities - the financial-math bridge.

Coming soon
Designing Data-Intensive Applications
Lesson 00 - Reliability, Scalability, Maintainability

The three pillars: faults vs failures, load parameters and fan-out, percentiles, and the three maintainability principles.

Published August 24, 2026
Lesson 01 - Storage Engines: LSM-trees vs B-trees

From the append-only log to memtables, SSTables, and compaction; the B-tree's in-place pages and WAL; and the write/read trade-off that decides which family your database uses.

Published August 24, 2026
Lesson 02 - Encoding and Evolution

Schemas, formats, and how to change data shapes without downtime.

Coming soon
Lesson 03 - Data Models and Query Languages

Relational, document, and graph models - and why the object-relational mismatch keeps repeating history.

Coming soon
How to Win Friends and Influence People (Carnegie)
Lesson 01 - The 30 Principles Map

The whole book on one page: 4 parts, 30 principles, and the three fundamentals (no criticism, honest appreciation, arouse an eager want) that the rest are built on.

Published August 26, 2026
Lesson 02 - The Skill of Saying No

Refuse the request, never the person: yes-first, save face, reason in their terms, leave a path โ€” the Steinmetz, Granger, and bow-shop plays.

Published August 26, 2026
Case Studies
CV Search Prototype - Agentic Flows

ASCII diagram mapping all six agentic flows in cv-search.zahranm.cloud: async extraction pipeline (Gemini OCR โ†’ pdftotext โ†’ LLM โ†’ regex fallback), recruiter search, JD matching, job polling, PDF dataset seeding, and CRUD/browse.

Published July 1, 2026