Blogs
Writing from active repositories and notes.
This index collects posts materialized into the site from the repositories behind the work.
DOFS - Datacenter Observability and Failover Simulator
A simulator for datacenter networks and compute nodes focusing onobservability, reproducibility, and policy/algorithm modeling.
Read postThreadWeaver - Lock-Free Multi-Thread Communication Templates
A collection of lock-free intra-thread message-sending fabricsincluding SPSC, MPSC and SPMC templates, targeting x64 and ARMv8+platforms.
Read postChoir
An LLM agent orchestration system for personalized agents with infrastructure-grade architecture.
Read postWWCompanion
WWCompanion is a manual, user-triggered browser extension forLLM-enabled AI companionship with WaterlooWorks job postings.
Read postROSE - RDMA Over SPI Engine
A zero-copy, RDMA-inspired transport layer built over SPI, designedfor embedded systems and affordable hardware experimentation.
Read postLighthouse Quickstart
This is the shortest path from a fresh checkout to a local preview of the site.
Read postLighthouse Site Design
This document describes the implementation-facing design of theLighthouse site repository.
Read postLighthouse
Lighthouse is the Jekyll source repository forpeisongxiao.com. It contains the manuallycurated site pages, the photo collection, shared layouts, and theautomation-owned _automated_posts/ area populated by the deployme...
Read postLighthouse Configuration
This document describes the repository-local configuration and contentconventions used by the Lighthouse site.
Read postlighthouse
lighthouse is the deployment and content-materialization CLI forPeisong’s Lighthouse. It pulls configured repositories, discoverstracked Markdown, rewrites local references into site URLs, generatesJekyll-ready posts,...
Read postlighthouse Quickstart
This is the shortest path from a fresh checkout to a validated localrun of the Lighthouse deployment pipeline.
Read postlighthouse Deployment Design
This document describes the implementation-facing design of theLighthouse deployment pipeline.
Read postlighthouse Configuration
This document describes the YAML configuration schema consumed by thelighthouse CLI.
Read postMaestro
Maestro is an embedded, Lisp-like state-machine language with a packedlinked artifact format and a small C runtime. Surface languagesemantics are defined indocs/design/language-specs.md.
Read postrun_tests.py
Related docs:
Read postmaestrovm
Related docs:
Read postmaestroexts
Related docs:
Read postmaestroc
Related docs:
Read postMaestro Quickstart
This is the shortest path from source files to a runnable .mstroartifact.
Read postMaestro Extension Guide
Related docs:
Read postMaestro Library Design
This document describes the implementation-facing design of theMaestro library and toolchain. Surface language semantics live indocs/design/language-specs.md.
Read postMaestro Runtime API
This document is a standalone reference for the public runtime-facingMaestro API.
Read postMaestro Compile API
This document is a standalone reference for the public parse/link sideof the Maestro API.
Read postMaestro Common API
This document is a standalone reference for the common public MaestroAPI surface shared by compile-time and runtime APIs.
Read postMyria
Myria is a standalone memory service for long-running agents.
Read postMyria Memory System Design
Link to implementation repo.
Read postOperations
Configuration
Read postStorage
Database Choice
Read postMyria Docs
This directory contains two kinds of documentation:
Read postQuick Start
This is the minimal working setup for running Myria locally.
Read postMCP API
Transport
Read postIndexing and Querying
The Three Public Interfaces
Read postData Model
Events
Read postConfiguration
This document describes the full Myria configuration model.
Read postArchitecture
One-Sentence Summary
Read postMaestro Language Specifications
“Programs must be written for people to read, and only incidentallyfor machines to execute.” – Abelson & Sussman, SICP, preface to the first edition
Read postMaestro Tools Overview
Related docs:
Read postGetting Started
This guide walks through setting up Choir from scratch on a single Linux host.
Read postCommands
Complete choirctl command reference. choirctl is a stateless CLI that communicates with a running choird instance.
Read postchoird
The Choir control plane daemon. Runs on the host, manages agent containers, enforces policy, and owns all durable state.
Read postSecurity
Choir’s security model follows the principle: even a malicious, root-level container cannot cause host-level side effects without explicit human approval.
Read postConfiguration
All Choir static resource configuration lives in ~/.choir.d/config.json. Secret values live in ~/.choir.d/secrets.json. Runtime state (sessions, events, memory) lives in Postgres.
Read postchoir-agent
The Choir container runtime. A single Go binary that runs inside Docker containers, managing dual-lane cognition, tool execution, and skill orchestration.
Read postDevelopment
Guide for building Choir from source and understanding the codebase.
Read postAgent Loops: From Skills to Schema
This is an idea for structured AI loop execution.
Read postChoir - Agent Orchestration System
Version: 1.0
Read postGateway (Telegram)
Choir uses Telegram as its user-facing gateway. choird owns all bot tokens and routes messages between Telegram DMs and agent edge lanes.
Read postArchitecture
Choir is an LLM agent orchestration system built on the principle of deterministic outer control plane + stochastic inner cognition: the LLM proposes, the control plane decides.
Read post(DEPRECATED) Choir: Agent Orchestration System
This page is now deprecated, please see the link below for up-to-date details about this project
Read postchoirctl
The Choir command-line interface. A stateless admin client that communicates with choird over UDS or HTTP.
Read postTool System
Tools are the only way an LLM can affect or observe the workspace. No implicit context, no hidden mounts, no backdoors.
Read postSkill System
Skills are deterministic orchestration state machines. They do NOT own locks, commit tools, or mutate the workspace directly – they only propose. The arbiter validates and enforces all constraints.
Read postMemory Architecture
Each agent has four memory tiers. Session-derived memory (tiers 1-3) is automated by choird. Knowledge (tier 4) is explicitly managed by the agent or operator.
Read postHello world from Angela
Hi — I’m Angela.
Read postIntegrating AI Agents Into Scheduled Workflows
ForwardAI, especially AI agents, are undeniably powerful today. Integratingagents into scheduled tasks is actually a very natural next step as itunlocks NLP in such workflows.
Read postwp-materialize
wp-materialize is an automation compiler that materializes specified Markdown files into WordPress posts.Git/filesystem state is the single source of truth; WordPress is a derived view.
Read postConfiguration Examples
Reference: configurations.md
Read postConfiguration Reference
This document defines every JSON field for both the global config and per-directory manifests.
Read postSiteCompanion
SiteCompanion is a browser extension that allows you to run AIpipelines on the visible text of any site.
Read postnetwork/switch/unicast_table.h
UnicastTable::UnicastTableUnicastTable() = defaultUnicastTable::add_entrybool add_entry(NodeId dst_node, PortId dst_port, PortId out_port)UnicastTable::delete_entrybool delete_entry(NodeId dst_node, PortId dst_port, P...
Read postnetwork/switch/switch_buffer.h
SwitchBuffer::PerPortSched::drain_oncevoid drain_once(PortId port)SwitchBuffer::PerPortSched::drain_one_commonbool drain_one_common(PortId port)SwitchBuffer::PerPortSched::on_dequeue_commitvirtual void on_dequeue_comm...
Read postnetwork/switch/shared_buffer.h
SharedBuffer::SharedBufferSharedBuffer(Simulator *const sim, NetworkSwitch *const owner, Bytes total_bytes, uint16_t ports)SharedBuffer::drain_onevirtual bool drain_one(PortId port) overrideSharedBuffer::enqueue_packe...
Read postnetwork/switch/routing_tables.h
No public API symbols found in this header.
Read postnetwork/switch/routing_alg.h
dofs::hash_ecmpPortId hash_ecmp(NodeId src_node, PortId src_port, NodeId dst_node, PortId dst_port, uint32_t differentiator, uint16_t port_count) noexcept;dofs::hash_ecmpinline PortId hash_ecmp(NodeId src_node, NodeId...
Read postnetwork/switch/multicast_table.h
McTree::MulticastTable::MulticastTableMulticastTable()McTree::MulticastTable::add_child_portbool add_child_port(std::size_t group_id, uint16_t tree_id, PortId out_port)McTree::MulticastTable::add_treebool add_tree(std...
Read postnetwork/switch/ecn_shared_red.h
SharedREDEngine::SharedREDEngineexplicit SharedREDEngine(Rng *const rng = nullptr) noexcept : _rng(rng), _avg_total_bytes(0.0), _avg_port_bytes()SharedREDEngine::process_packetvirtual Packet &process_packet(Packet...
Read postnetwork/switch/ecn_engine.h
ECNEngine::process_packetvirtual Packet &process_packet(Packet &pkt, SwitchBuffer *buf) noexcept = 0ECNEngine::~ECNEnginevirtual ~ECNEngine() = defaultdofs::header_trimstatic inline void header_trim(Packet &am...
Read postnetwork/switch/ecn_dedicated_red.h
DedicatedREDEngine::DedicatedREDEngineDedicatedREDEngine(Bytes min_th, Bytes max_th, double p_max, bool back_to_sender, Rng *const rng) noexcept : _min_th(min_th), _max_th(max_th), _p_max(p_max), _back_to_sender(back_...
Read postnetwork/switch/dedicated_buffer.h
DedicatedBuffer::DedicatedBufferDedicatedBuffer(Simulator *const sim, NetworkSwitch *const owner, Bytes total_bytes, uint16_t ports)DedicatedBuffer::drain_onebool drain_one(PortId port) overrideDedicatedBuffer::enqueu...
Read postnetwork/packet.h
Packet::PacketPacket(NodeId src_node, PortId src_port, NodeId dst_node, PortId dst_port, PacketProtocol proto, FlowPriority prio, PacketSeq seq = 0, FlowId flow = 0, uint16_t entropy = 0, uint8_t notifications = 0, By...
Read postnetwork/nic/nic_telemetry.h
No public API symbols found in this header.
Read postnetwork/nic/load_balance.h
LBRandomPacketSpraying::LBRandomPacketSprayingexplicit LBRandomPacketSpraying(Rng *const rng) noexcept : LoadBalance(rng)LBRandomPacketSpraying::get_entropyvirtual uint16_t get_entropy(const Packet &context) noexc...
Read postnetwork/nic/congestion_control.h
CongestionControl::CongestionControlexplicit CongestionControl(Bytes init_cwnd, Bytes max_cwnd) noexceptCongestionControl::cwndBytes cwnd() const noexceptCongestionControl::cwnd_maxBytes cwnd_max() const noexceptConge...
Read postnetwork/network_switch.h
NetworkSwitch::NetworkSwitchNetworkSwitch(Simulator *const sim, NodeId id, uint16_t total_ports, ECNEngine *const ecn, SwitchBuffer *const buf, const RoutingTables *const rt, Time forwarding_latency, Time multicast_du...
Read postnetwork/network_node.h
NetworkNode::NetworkNodeexplicit NetworkNode(Simulator *const sim, NodeId id, NodeType type) noexceptNetworkNode::recv_pktvirtual void recv_pkt(Packet &pkt, PortId ingress) = 0NetworkNode::~NetworkNodevirtual ~Net...
Read postnetwork/network_nic.h
NicSchedulingWeights::NetworkNic::NetworkNicNetworkNic(Simulator *const sim, NodeId id, uint16_t total_ports, SwitchBuffer *const buf, Time nic_latency, Bytes mice_elephant_threshold, PacketSeq ooo_threshold, CCType c...
Read postnetwork/link.h
Link::LinkLink(Simulator *const sim, LinkId id, NetworkNode *a, PortId a_port, NetworkNode *b, PortId b_port, Time latency, double bandwidth_gbps) noexceptLink::bandwidth_gbpsdouble bandwidth_gbps() const noexceptLink...
Read posthosts/subscriber.h
Subscriber::SubscriberSubscriber(Simulator *sim, NodeId id, Publisher *publisher, std::unique_ptr<SubBasePolicy> policy, Time mgmt_latency, Time heartbeat_period) noexceptSubscriber::recv_flowvoid recv_flow(Node...
Read posthosts/publisher.h
Publisher::Pending::arm_staging_if_neededvoid arm_staging_if_needed() noexceptPublisher::Pending::on_staging_timervoid on_staging_timer() noexceptPublisher::PublisherPublisher(Simulator *sim, NodeId id, Time update_la...
Read posthosts/policies.h
PubBasePolicy::select_multicast_groupsvirtual PacketGroups select_multicast_groups(PacketGroups update_groups_mask) = 0PubBasePolicy::~PubBasePolicyvirtual ~PubBasePolicy() = defaultPubRRPolicy::PubRRPolicyexplicit Pu...
Read posthosts/mgmt_msg.h
EndSimulationMsg::kindMgmtKind kind() const noexcept overrideHeartbeatMsg::HeartbeatMsgexplicit HeartbeatMsg(NodeId sid, NodeStatus st, Time t) noexcept : subscriber_id(sid), status(st), generated_at(t)HeartbeatMsg::k...
Read postcore/types.h
dofs::ipv4inline IPv4Addr ipv4(NodeId n, PortId p) noexcept{
Read postcore/timer.h
Timer::TimerTimer()Timer::elapsedTime elapsed() const noexceptTimer::initvoid init() noexceptTimer::nowTime now() const noexceptTimer::startTime start() const noexceptdofs::initvoid init() noexcept{
Read postcore/time.h
Timereturn Time(a._nsec * b._nsec);Timereturn Time(a._nsec + b._nsec);Timereturn Time(a._nsec - b._nsec);Timereturn Time(ms * 1000ULL * 1000ULL);Timereturn Time(ns);Timereturn Time(s * 1000ULL * 1000ULL * 1000ULL);Tim...
Read postcore/simulator.h
Simulator::Cmp::operatorbool operator()(const Item &a, const Item &b) const noexceptSimulator::SimulatorSimulator() = defaultSimulator::cancelbool cancel(EventId id)Simulator::create_linkstd::pair<LinkId, L...
Read postcore/rng.h
Rng::Rngexplicit Rng(seed_type seed = default_seed()) noexcept : _eng(seed)Rng::choose_weightedtemplate<typename T> template<typename T> T choose_weighted(const std::vector<std::pair<double, T>>...
Read postcore/node.h
Node::NodeNode(Simulator *const sim, NodeId id, NodeType type) noexceptNode::NodeNode(const Node &) = deleteNode::bootvoid boot(Time boottime_ns)Node::idNodeId id() const noexceptNode::operator=Node &operator=...
Read postcore/logger.h
Logger::LoggerLogger(Logger &&) = deleteLogger::LoggerLogger(const Logger &) = deleteLogger::LoggerLogger(std::string_view path, bool append) noexceptLogger::closevoid close() noexceptLogger::flushvoid flu...
Read postcore/host.h
Host::HostHost(Simulator *const sim, NodeId id) noexcept
Read postcore/error.h
dofs::log_errorvoid log_error(std::string_view type, std::string_view message, std::optional<uint64_t> timestamp = std::nullopt) noexcept;DOFS_ERROR#define DOFS_ERROR(TYPE, MSG)DOFS_ERROR_ST#define DOFS_ERROR_ST...
Read postStyle Guide for DOFS
Coding style matters a lot. Good coding styles makes the code lookbetter to the eye, and can help mitigate some pitfalls and confusions.
Read postThe Plan/Roadmap for DOFS
Plans turn fear into focus, risk into reach, and steps into a path.
Read postThe Bootloader
Date: 2025-07-02
Read postStyle Guide for ROSE (and other FLORA projects)
Coding style matters a lot. Good coding styles makes the code lookbetter to the eye, and can help mitigate some pitfalls and confusions.
Read postThe Plan/Roadmap for ROSE
Plans turn fear into focus, risk into reach, and steps into a path.
Read postPutting It All Under A Hood
Date: 2025-06-25
Read postFabric's Basic Logic Done
Date: 2025-06-06
Read postThe Specifications for ROSE
Development on the protocol may change the specifications, see thedevlogs for specific decisions on changes.
Read postReworking Almost Done
Date: 2025-06-05
Read postRedesigned Internal Memory Pool
Date: 2025-05-28
Read postRethinking the Routing Memory Pool
Date: 2025-05-21
Read postRouting Logic
Date: 2025-05-17
Read postFabric Logic
Date: 2025-05-13
Read postSPI slave implementation on the Tang Primer 20K
Date: 2025-05-04
Read postSPI slave implementation on the Tang Primer 20K
Date: 2025-05-04
Read postSPI slave implementation on the Tang Primer 20K
Date: 2025-05-03
Read post