Skip to content

Instantly share code, notes, and snippets.

View buger's full-sized avatar
🏠
Working from home

Leonid Bugaev buger

🏠
Working from home
View GitHub Profile

A few major ideas to understand:

Code context issue

Modern AI agentic loops, even claude code, quite bad at dealing with large codebases. They use a caveman approach - treat it as text, do some greps, read some context around it, and rely on agent "feeling" that it got enough of big picture. And they are very confidently say they are.

Unless you solve this context issue well, all the AI outputs will be very shallow, with a lot of false positives.

For this I have developed completelly different context engine, which treats code as code, knows about AST and so on https://github.com/probelabs/probe. One query with probe can be equal to 10 loops of claude code, yet with taking less context and having way deeper into your code.

@buger
buger / sandboxing.md
Last active February 3, 2026 17:02
Agent sandboxing

This is super nuanced and depends on what your agent actually does and what β€œsandbox” needs to mean for your product.

The first questions I think you have to answer

Before picking a tech, I think you need clarity on stuff like:

  • Scale: Are we talking β€œsingle box POC” or β€œglobal, lots of concurrent agents”?
  • Deployment: On‑prem install vs cloud SaaS?
  • UX / product model: Is it a backend worker (service bus / event-driven), or an interactive chat/web UI where users expect continuity?
  • Routing: Single server? Multi-server? Do you need sticky routing per user/session?
@buger
buger / tyk_schema.json
Created November 6, 2025 07:59
Tyk API Gateway API schema
{
"status":"Success",
"message":"",
"schema":{
"id":"https://spec.openapis.org/oas/3.0/schema/2021-09-28",
"$schema":"http://json-schema.org/draft-04/schema#",
"description":"The description of OpenAPI v3.0.x documents, as defined by https://spec.openapis.org/oas/v3.0.3",
"type":"object",
"required":[
"openapi",

If we forget about the AI itself, and for each engineering task we need to:

  • Do some initial research

  • Create initial high-level technical plan, and separate to milestones (like implement BE part, implement FE part, add the Docs, Write Integration tests), etc.

  • Start working on each item in the plan

@buger
buger / read.md
Last active March 7, 2024 09:05
API Gateway guide to SOAP

API Gateway guide to SOAP

SOAP is a big and painful topic when it comes to API gateway support. And the reason is that the SOAP protocol itself has a very flexible declarative XML format, and its specifications are unfortunately really vague and leave a lot of things open for interpretation.

In this document, we will try to cover all possible ways how you can integrate SOAP with Tyk API Gateway, from simple pass through to calling WSDL services.

Introduction to SOAP format

A SOAP message is a XML document which is used to transmit your data, and can look as simple as:

Date Open High Low Close AdjClose Volume
2014-07-08 574.501099 576.358887 563.039124 567.967041 567.967041 1914700
2014-07-09 568.454346 573.566223 566.262390 572.929749 572.929749 1119800
2014-07-10 562.815369 573.436951 561.920288 567.976929 567.976929 1360400
2014-07-11 568.782532 577.673645 568.295227 576.012756 576.012756 1626200
2014-07-14 579.414063 582.009827 574.869080 581.671631 581.671631 1859100
2014-07-15 582.536926 582.601563 573.407104 581.582153 581.582153 1627500
2014-07-16 584.784546 585.182373 579.016235 579.473755 579.473755 1400900
2014-07-17 576.360840 577.812866 565.500549 570.592590 570.592590 3024800
2014-07-18 589.757202 593.536438 578.817322 591.825806 591.825806 4025100
@buger
buger / README.md
Last active September 27, 2017 08:36
Rcapd go lang implementation

Record to file:

rcapd --input-raw "<interface>" --input-raw-engine "pcap" --input-raw-bpf "tcp" --output-file network.pcap

Forward traffic from 1 machine to another:

rcapd --input-raw "<interface>" --input-raw-engine "pcap" --input-raw-bpf "tcp" --output-tcp <ip>:<port>
### Keybase proof
I hereby claim:
* I am buger on github.
* I am buger (https://keybase.io/buger) on keybase.
* I have a public key ASCzaCxRkFIlUa2aRgKqemADKX7wtZTSNs2XhdbMZ4PlLgo
To claim this, I am signing this object:
@buger
buger / readme.md
Created February 5, 2017 13:35
buger/jsonparser failing test case

Fails to get following data: jsonparser.Get(data, " Name","Pid","Photo")

@buger
buger / report
Created January 24, 2017 11:34
Sphinx 1.5.2 error report
Step 17/30 : RUN pip3 install grpcio
---> Running in b6d303f4091c
Downloading/unpacking grpcio
Running setup.py (path:/tmp/pip_build_root/grpcio/setup.py) egg_info for package grpcio
Installed /tmp/pip_build_root/grpcio/sphinx_rtd_theme-0.1.10_alpha-py3.4.egg
Searching for sphinx>=1.3
Reading https://pypi.python.org/simple/sphinx/
Best match: Sphinx 1.5.2
Downloading https://pypi.python.org/packages/e3/87/e271f7f0d498c7fdaec009c27955401d18ef357c0d468e1eb2be36bdc68c/Sphinx-1.5.2.tar.gz#md5=8a3068cd5dda49622b7eb5132d616e19