Skip to content

Instantly share code, notes, and snippets.

View saiday's full-sized avatar
:shipit:
su su su

Saiday saiday

:shipit:
su su su
View GitHub Profile
@saiday
saiday / coding-principles.md
Created June 5, 2026 16:13
Claude Code planning slash commands for a mobile-apps monorepo: /plan-start, /plan-review, /plan-execute, plus referenced docs (executor contract + coding principles)

Coding Principles

Overview

These principles draw on ideas from Extreme Programming, but they are not XP transplanted literally. XP assumes synchronous humans working side by side. You are an agent working asynchronously: you produce a turn, a human reads it afterward. So these are XP-derived principles adapted for that reality, with concepts borrowed where they fit and dropped where they don't.

They are not style preferences. They are the mechanisms that keep a codebase comprehensible and changeable over time. Speed of generation is not the goal. Sustained ability to change the system safely is.

Core principle: Build the smallest correct thing, make your reasoning auditable, lean on tests for confidence, respect the existing codebase as the authority on how things are done, and remove more than you accumulate.

@saiday
saiday / coding-principle.md
Created May 28, 2026 13:34
For coding agents

Coding Principles

Overview

These principles draw on ideas from Extreme Programming, but they are not XP transplanted literally. XP assumes synchronous humans working side by side. You are an agent working asynchronously: you produce a turn, a human reads it afterward. So these are XP-derived principles adapted for that reality, with concepts borrowed where they fit and dropped where they don't.

They are not style preferences. They are the mechanisms that keep a codebase comprehensible and changeable over time. Speed of generation is not the goal. Sustained ability to change the system safely is.

Core principle: Build the smallest correct thing, make your reasoning auditable, lean on tests for confidence, respect the existing codebase as the authority on how things are done, and remove more than you accumulate.

@saiday
saiday / plan-fresh-eyes-review-SKILL.md
Last active March 22, 2026 13:41
Claude Code skill: plan-fresh-eyes-review — dispatch a subagent to review implementation plans with fresh eyes for clarity and TDD enforcement
name plan-fresh-eyes-review
description Use when an implementation plan is written and you want a fresh-eyes clarity review before handing it to an executing agent

Plan Fresh-Eyes Review

Dispatch a subagent to review an implementation plan with genuinely fresh eyes. The reviewer gets only the raw plan text — no spec, no design, no codebase access — and evaluates whether an executing agent could follow it cold.

When to Use

@saiday
saiday / fft_data.py
Created January 6, 2026 08:22
FFT sample data (630x125)
[
[-32.49131,-29.79542,-33.48277,-33.50104,-36.45362,-35.94827,-32.96527,-32.26936,-36.44932,-25.76287,-34.28092,-30.85497,-33.31415,-37.21161,-34.73141,-34.81738,-33.31928,-30.9516,-37.14602,-32.5547,-35.54541,-34.18177,-34.05177,-39.32136,-34.21709,-32.11923,-39.88954,-34.15068,-34.72967,-33.56728,-33.01094,-32.99736,-35.53232,-34.29665,-38.03343,-34.00711,-31.90899,-36.51534,-38.70016,-38.85773,-35.86512,-39.0494,-32.97895,-35.13379,-34.79237,-33.08383,-34.75455,-32.69923,-37.75183,-34.55227,-33.46341,-33.76085,-31.13621,-36.67093,-31.89944,-39.58604,-32.94171,-37.69374,-40.9296,-37.94635,-33.29289,-37.64688,-42.95561,-32.30759,-34.24654,-35.48082,-41.07648,-35.67988,-40.20394,-36.35468,-33.87188,-46.06673,-33.31841,-37.91453,-34.55331,-41.36814,-38.92372,-37.77615,-34.73792,-38.20335,-36.72244,-41.73395,-42.49073,-37.86463,-37.16306,-37.91299,-36.09221,-34.9044,-36.64595,-41.02642,-36.8739,-45.84547,-39.46665,-43.04192,-40.34679,-41.63593,-41.82988,-47.03239,-42.57105,-40.1003,-45.1071,-42.12825,-43.056
@saiday
saiday / fanclub.html
Created June 3, 2024 05:47
pseudo code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>URL Manipulation Example</title>
<script>
document.addEventListener('DOMContentLoaded', () => {
// Assuming URL A is 'http://example.com/pageA' and URL B is 'http://example.com/pageB'
// Step 1: Load content from URL B (this can be done via AJAX)
@saiday
saiday / visibility.py
Created January 22, 2024 10:00
bit masing for user visibility
# Constants representing each status as bit flags
ENABLE = 1 << 0 # 0b000001
BLOCKED_BY_GLOBAL = 1 << 1 # 0b000010
BLOCKED_BY_CN = 1 << 2 # 0b000100
COPYRIGHT_GLOBAL = 1 << 3 # 0b001000
COPYRIGHT_CN = 1 << 4 # 0b010000
PENDING_DELETION = 1 << 5 # 0b100000
def set_status(status_flags, condition):
"""Set a specific condition."""
package com.streetvoice.streetvoice.player;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.ShortBuffer;
import java.util.Arrays;
import java.util.LinkedList;
//
// SAWKWebView.swift
//
// Created by Costantino Pistagna on 24/01/2020.
// Copyright © 2020 Sofapps. All rights reserved.
//
import UIKit
import WebKit
import Foundation
let json = """
{
"results":[
{
"blah":"blah",
"nested_object":{
"type":"a",
"id":69,
import Foundation
let json = """
{
"results":[
{
"blah":"blah",
"nested_object":{
"type":"a",
"id":69,