Skip to content

Instantly share code, notes, and snippets.

View ksylvan's full-sized avatar

Kayvan Sylvan ksylvan

View GitHub Profile
@ksylvan
ksylvan / spec-wizserver-owned-bundle.md
Last active August 11, 2026 19:49
spec-wizserver-owned-bundle.md

SPEC Audit: WizServer-Owned Project Bundle

TL;DR

The spec asserts ownership; the code implements routing. There is no per-bundle ownership claim anywhere in the system — no lock held for the life of an open project, no ownership record on disk, no "bundle is open elsewhere" refusal. What actually makes "the NLE owns the bundle when it's running" true is a client-side discovery preference: wiz-cli probes the GUI's port file first, so ops land on the running editor's embedded server. If two processes open the same bundle anyway, nothing stops them — coexistence rests on per-op advisory flocks, optimistic revision checks, git autosave commits, and a file watcher that offers the UI a reload. The spec's own §6 claim that "with one owner, the stale-tree clobber failure mode cannot occur" (WIZSERVER-SPEC.md:630-634) describes a mechanism the code does not enforce.


How ownership actually works (code, develop @ 8ab2b0ef)

Sound Design Subagent — Whiteboard Capture

Source: office whiteboard photo. Blue marker unless noted. Green marker on parts of the User Flow. Pink note at bottom right. Three sticky notes read DO / NOT / ERASE.

This document is a transcription. Board text is kept as written. Bracketed [...] text marks a note from the transcriber, not board content.


@ksylvan
ksylvan / select-as-context.md
Created July 24, 2026 16:59
Wizard NLE and OZ changes

Select Clip as Context

Clip selection being useful for context in Oz Enables user to select a clip (like an MGFX) and prompt "change to say Sam Mills" without having to tell Oz which clip you're referring to"

TLDR: This is easier than it sounds — roughly 60–70% of it already exists as dormant, spec'd plumbing. The selection-context half is a small frontend change (~in a couple of hours). The real gap is that Oz has no way to edit an MGFX clip's text even when told exactly which clip — that's the larger piece

What already exists (the good news)

The Oz backend already models NLE selection end-to-end — it's just never fed:

@ksylvan
ksylvan / wiz-ai-pr-245.sh
Created July 19, 2026 16:09
PR #245 functional test script - builds wiz-cli/wizserverd from source and runs all verification steps
#!/usr/bin/env bash
# =============================================================================
# wiz-ai-pr-245.sh — Functional verification script for story-wizard/wizard-ai
# PR #245: "P5b: migrate reviewer to wiz-cli and delete wiz-primitives"
#
# What it does:
# 1. Creates $HOME/wiz-ai-pr-245 and clones:
# - story-wizard/wizard-core (develop branch) -> ./wizard-core
# - story-wizard/wizard-ai (PR #245 head) -> ./wizard-ai
# - story-wizard/wizard (develop branch) -> ./wizard (for wiz-cli/wizserverd)
@ksylvan
ksylvan / oc.md
Created February 19, 2026 20:23 — forked from mberman84/oc.md
OpenClaw Prompts

OpenClaw Prompts - Build Your Own AI Assistant

Prompts to recreate each piece of the OpenClaw system. Use these with any AI coding assistant.


1. Personal CRM "Build a personal CRM that automatically scans my Gmail and Google Calendar to discover contacts from the past year. Store them in a SQLite database with vector embeddings so I can query in natural language ('who do I know at NVIDIA?' or 'who haven't I talked to in a while?'). Auto-filter noise senders like marketing emails and newsletters. Build profiles for each contact with their company, role, how I know them, and our interaction history. Add relationship health scores that flag stale relationships, follow-up reminders I can create, snooze, or mark done, and duplicate contact detection with merge suggestions. Link relevant documents from Box to contacts so when I look up a person, I also see related docs."

2. Meeting Action Items (Fathom)

@ksylvan
ksylvan / current-date-and-time.applescript
Created October 10, 2023 21:58 — forked from Glutexo/current-date-and-time.applescript
AppleScript to get current date and time (YYYY-MM-DD HH:MM:SS). Usable as a Text Service in Mac OS X.
(*
The zero_pad function taken from:
http://www.nineboxes.net/2009/10/an-applescript-function-to-zero-pad-integers/
*)
on zero_pad(value, string_length)
set string_zeroes to ""
set digits_to_pad to string_length - (length of (value as string))
if digits_to_pad > 0 then
repeat digits_to_pad times
set string_zeroes to string_zeroes & "0" as string
@ksylvan
ksylvan / Join Zoom.scpt
Created October 6, 2023 01:30 — forked from JacksonChen666/Join Zoom.scpt
Join zoom at the speed of computers (AppleScript)
# It is recommended that you save this script as an application, so you don't have to open Script editor.
(*
It all started when I wanted to join zoom faster than a human could do with no prompt like how I expected like this.
I first discovered zoom.us's URL scheme to join meeting, but when I found out it doesn't work, I started to make this program.
After this all of stuff, I finally have something that is constantly updated.
After this pandemic is over, development might slow down or become discontinued.
*)
global meetingNames, meetingIDs, meetingPwds, wname
# Compiling the app will reset all your saved meetings!
property meetingNames : {}
@ksylvan
ksylvan / req1.md
Last active May 5, 2023 18:45
Job Requirements

Backend Developer:

Backend development expertise:

  • Design, implement, optimize scalable systems
  • Microservices architecture, serverless computing

Java proficiency:

  • Java knowledge, ecosystem
  • Java frameworks: Spring, Hibernate, Java EE
  • Modern Java libraries, tools, best practices
@ksylvan
ksylvan / cuda_check.py
Created April 23, 2023 23:52 — forked from f0k/cuda_check.py
Simple python script to obtain CUDA device information
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Outputs some information on CUDA-enabled devices on your computer,
including current memory usage.
It's a port of https://gist.github.com/f0k/0d6431e3faa60bffc788f8b4daa029b1
from C to Python with ctypes, so it can run without compiling anything. Note
that this is a direct translation with no attempt to make the code Pythonic.
@ksylvan
ksylvan / How-to-Symbolize-MacOSX-Crash-Dump
Created December 9, 2020 16:21 — forked from jerrykrinock/How-to-Symbolize-MacOSX-Crash-Dump
How to symbolize a crash dump in Mac OS X, given a crash dump or exception log. Includes some steps and tips I've collected that are missing in Apple's TN2123. One time I tried this using lldb instead of gdb but it didn't work.
********************************************************
*** STEPS TO SYMBOLIZE A CRASH DUMP OR EXCEPTION LOG ***
********************************************************
1) Move/copy both the crashing .app and the relevant.dSYM files into the same directory.
2) If the crash was in a framework, dynamic library, or bundle, you have position-independent code and must work out the *slide*. Otherwise, skip up to step 9 and use slide=0.
3a) If you have a crash dump, look in the *Binary Images* part of the crash log and find the framework, dynamic libray or bundle in which the crash occurred. Read the first column of the output. This is the address at which the __TEXT segment was loaded. We call it the *Actual Load Address* and denote it as *A*.