Skip to content

Instantly share code, notes, and snippets.

@maxim-saplin
maxim-saplin / README.md
Last active December 1, 2025 15:24
Kiro-like Spec-Driven Development (SDD) slash-commands for Cursor/GitHub Copilot

Slash commands enabling similar experience to Spec workflow in Kiro IDE.

  • Cursor - put the files [spec.md, task.md] to .cursor/commands folder
  • GitHub Copilot (VSCode) - put the files [spec.prompt.md, task.prompt.md] to .github/prompts folder

Un Agent mode call up /spec and /task commands to go through each of the phases:

  • /spec will produce requirements.md, design.md and tasks.md files under .specdev/specs/{feature-name} folder. You can use a single dialog to go through the Spec process and generate 3 artifacts OR create a new dialog for each stage of the Spec phase and pull in into context previously produced artifact. E.g. if you went through requirments stage (/spec let's work on Feautre 1. It shoudl do the following...) and have .specdev/spec/Feature 1/Requirements.md file just create a new dialog, type /spec and drag and drop the corresponding Requirements.md file
  • /tasks initiates the execution phase. Open up a new dialog, type /tasks and attach the `.specd
@maxim-saplin
maxim-saplin / LLM Chess Elo All Models.md
Last active July 27, 2025 19:27
LLM Chess Elo All Models

Engine Elo ratings: Player Games Elo ±95%CI

random 4000 -122.3 23.0 stockfish-lvl-1 1000 824.9 64.2

Stage 2: LLM Elo Ratings Player Games Elo ±95%CI

3x-o4-mini-2025-04-16-low_41mini-t03 33 114.6 133.1

@maxim-saplin
maxim-saplin / DLC-02.md
Last active June 29, 2025 07:10
Mean Well DLC-02 DALI 2 controller integration with Home Assistant via Modbus
  1. Connect to DLC-02 via Mean Well windows app (either using USB ot Ethernet)
  2. Scan DALI lamps, assign lamps to virtual lamps
  • 2.1. If you have lamps that change color you need to 1st define the type of virtual lamp and only than assign/drag the actual DALI lamp
  • 2.2. Each virtual lamp gets an address, e.g. A0 means bus A lamp 0 - use this for addressing
  1. You can test is lamp works via commands line (assuming A0 address, also use correct IP and port which by default is 502)
  • On mbpoll -0 -m tcp -p 502 -a 255 -t 4:hex -r 41001 192.168.31.27 0x0100 0x0101 0x0000 0x0000
  • Off mbpoll -0 -m tcp -p 502 -a 255 -t 4:hex -r 41001 192.168.31.27 0x0100 0x0100 0x0000 0x0000
  1. In HA you might want to install 'File Editor' to change configs

Install on WSL2

  1. Installed Ubuntu-24.04 from the Mircosot Store -> Types WSL and Selected the most recent Ubuntu

  2. Windows Terminal -> wsl -d Ubuntu-24.04 (using -d to specify distro name, I have multiple distros)

  3. Installing SGLang

Copying and pasting from docs (https://docs.sglang.ai/start/install.html) didn't quite work.

@maxim-saplin
maxim-saplin / output.txt
Created February 2, 2025 10:09
Deepseek V3 Dialog
Proxy (to Player_Black):
You are a professional chess player and you play as black. Now is your turn to make a move. Before making a move you can pick one of the following actions:
- 'get_current_board' to get the schema and current status of the board
- 'get_legal_moves' to get a UCI formatted list of available moves
- 'make_move <UCI formatted move>' when you are ready to complete your turn (e.g., 'make_move e2e4')
--------------------------------------------------------------------------------
Player_Black (to Proxy):
@maxim-saplin
maxim-saplin / Output.txt
Last active February 4, 2025 06:16
Qwen Max Dialog
Proxy (to Random_Player):
You are a random chess player.
--------------------------------------------------------------------------------
Random_Player (to Proxy):
get_legal_moves
--------------------------------------------------------------------------------
@maxim-saplin
maxim-saplin / reflection.txt
Created September 13, 2024 10:31
Reflection system prompt
You are an AI assistant designed to provide detailed, step-by-step responses. Your outputs should follow this structure:
1. Begin with a <thinking> section.
2. Inside the thinking section:
a. Briefly analyze the question and outline your approach.
b. Present a clear plan of steps to solve the problem.
c. Use a "Chain of Thought" reasoning process if necessary, breaking down your thought process into numbered steps.
3. Include a <reflection> section for each idea where you:
a. Review your reasoning.
b. Check for potential errors or oversights.
@maxim-saplin
maxim-saplin / falcon_mamaba_7b.py
Created August 20, 2024 12:00
Chat to Falcone Mamba 7B
# pip install -U git+https://github.com/huggingface/transformers.git
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
import torch
import time
def chat_with_ai(model, tokenizer):
"""
Function to simulate chatting with the AI model via the command line.
@maxim-saplin
maxim-saplin / test.py
Created December 10, 2023 21:01
Python, equality vs list membership
def is_special_number(number):
if number == 7:
return True
elif number == 18:
return True
else:
return False
def is_special_number_2 (number):
return number in [7, 18]
@maxim-saplin
maxim-saplin / functional.dart
Last active October 29, 2023 13:07
Example of functional style in Dart using features from version 3.1
// sealed classes are abstract (can't be instatiated) and can only be
// implemented in the same library (library in Dart is one file be default)
sealed class Message {
}
class TextMessage implements Message {
final String content;
TextMessage(this.content);
}