Skip to content

Instantly share code, notes, and snippets.

View niquola's full-sized avatar

Nikolai Ryzhikov niquola

View GitHub Profile
@niquola
niquola / 1-spec.md
Last active March 8, 2026 12:25
Agent Relay Protocol - Draft Spec

Agent Relay Protocol

Статус: Draft Дата: 2026-03-07


1. Problem Statement

Агенты всё чаще работают не в изоляции, а вместе с людьми — в общем коде, общих документах, общих задачах. Индустрия уже построила работающие продукты: Devin, GitHub Copilot coding agent, Cursor Cloud Agents, Factory Droids, Replit Agent. Каждый из них реализует один и тот же паттерн — shared human/agent workspace — но делает это по-своему, с проприетарными API и закрытыми моделями.

@niquola
niquola / hl7v2-mapping-prep.md
Created March 6, 2026 12:23
HL7v2 Mapping Preparation — data-driven methodology for v2-to-FHIR mappings

HL7v2 Mapping Preparation — Methodology

A data-driven methodology for preparing HL7v2-to-FHIR mappings. Core principle: look at the data first, then read the spec.

Input

  • Directory with raw HL7v2 messages (.txt / .hl7)
  • Target: FHIR R4
@niquola
niquola / final-report.md
Last active March 3, 2026 06:53
Consilium: bun-tsx-server-library deliberation — round summaries & final report

Consilium Report: Minimalistic Bun TSX SSR Library

Problem

Design and implement a minimalistic single-file library for building simple web apps with Bun using server-side TSX rendering — a lightweight JSX-to-HTML rendering layer that works with Bun.serve(), kept as small and simple as possible.

Idea Provenance

Idea Proposed (R1) Adopted (R2) Defended/Yielded (R3) Final Status
@niquola
niquola / db.ts
Created March 1, 2026 12:48
PostgreSQL database tool — migrations, CRUD, type generation, psql wrapper. Single file, zero deps, Bun runtime.
// PostgreSQL database tool — migrations & SQL CLI, single file, zero dependencies, Bun runtime.
//
// Env:
// DATABASE_URL (required) — PostgreSQL connection string.
// Loaded automatically by Bun from .env file in project root.
// Example .env:
// DATABASE_URL=postgres://user:pass@localhost:5432/mydb
//
// CLI (default = dev, --test = test database):
// bun src/db.ts [--test] up [count] — apply pending migrations
@niquola
niquola / migrate.integration.test.ts
Last active February 28, 2026 22:32
impl1 Bun migration CLI+library and integration tests
import {
afterAll,
beforeAll,
beforeEach,
describe,
expect,
setDefaultTimeout,
test,
} from "bun:test";
import { SQL } from "bun";
@niquola
niquola / migrate.ts
Last active February 28, 2026 22:46
PostgreSQL migration tool — single file, zero deps, Bun runtime
// PostgreSQL migration tool — single file, zero dependencies, Bun runtime.
//
// CLI:
// bun src/migrate.ts create <name> — create .up.sql + .down.sql templates
// bun src/migrate.ts up [count] — apply pending migrations
// bun src/migrate.ts down [count] — roll back recent (default: 1)
// bun src/migrate.ts status — show applied/pending
//
// Library:
// import { create, up, down, status } from "./migrate"

Архитектуры Deep Research систем

Паттерн: Полиморфный LLM-адаптерный слой для агентных рантаймов

Описание

Паттерн отделяет агентную логику от конкретного LLM-провайдера через слой адаптеров, фабрик и prompt-style профилей. Один и тот же агентный runtime может переключаться между backend-моделями без переписывания бизнес-логики инструментов.

Паттерн решает задачи переносимости, отказоустойчивости и A/B-сравнения моделей в production/research контурах. Он особенно важен при смешении function-calling диалектов и разных API-контрактов.

Характерные черты

@niquola
niquola / audit-event-taxonomies.md
Last active February 4, 2026 11:45
Audit Event Taxonomies Research - W3C, IETF, OASIS, HL7 standards comparison for FHIR AuditEvent mapping

Исследование стандартов таксономии Audit Events

Сводная таблица

Стандарт Организация Статус Login Logout Registration
1 W3C PROV-O W3C Recommendation 2013
2 Activity Streams 2.0 W3C Recommendation 2017
3 XDAS The Open Group Standard 1997+
4 CADF DMTF Standard 2014 ⚠️
@niquola
niquola / clinical-reasoning-metaprotocols.md
Created January 25, 2026 08:36
Clinical Reasoning Metaprotocols - Research for Medical Agent Architecture

Метапротоколы и методологии клинического мышления врачей

Исследование для проектирования reduce-архитектуры медицинского агента


1. Фазы клинического процесса

1.1 Clinical Reasoning Cycle (Tracy Levett-Jones Model)

@niquola
niquola / research-rlm-agents-2026-01-25.md
Created January 25, 2026 00:15
RLM (Reasoning Language Models) for Agents - Deep Research Report

RLM (Reasoning Language Models) для Agents

Дата: 2026-01-25 Автор: Research by Claude


Что такое RLM?

RLM (Reasoning Language Models) — также известны как Large Reasoning Models (LRMs) — это новый класс моделей, расширяющих LLM продвинутыми механизмами рассуждения.