Skip to content

Instantly share code, notes, and snippets.

View pedramamini's full-sized avatar
👋

Pedram Amini pedramamini

👋
View GitHub Profile
@pedramamini
pedramamini / maestro-finding.md
Last active June 12, 2026 03:41
maestro-p first-byte timeout: root-cause + patch spec (Pedsidian morning-cue failures)

UPDATE 2026-06-11: patched build ran; new diagnostic changes the diagnosis

The patched maestro-p (resubmit loop + getScreenTail dump) IS now running. Confirmed: today's first_byte_timeout errors in cue.db carry the new last screen at timeout (ANSI-stripped tail) block. So the fix is live AND we finally have ground truth. It changes the root cause.

What the screen tails prove

All three of today's Pedsidian agent cues still failed at 121s (chain-1 07:00, chain-9 11:00, chain-8 17:00), BUT the screen tails show claude is alive and working the whole time:

@pedramamini
pedramamini / Maestro-Message-Channel.md
Last active May 28, 2026 21:34
Maestro Message Channel: behavior + voice spec the handler agent reads for the @maestro iMessage message bus. https://www.runmaestro.ai

Objective:: Behavior + voice spec for the "@maestro" iMessage message bus. The handler agent reads this each time the scanner dispatches a command. Defines how to fulfill the request and how to reply in the owner's texting voice.

Trigger:: any iMessage the owner authors containing the literal marker @maestro

Scanner:: maestro_message_scanner.py (3-min Maestro Cue command node)

Reply-Prefix:: 🎶 Maestro:

Log:: Maestro-Message-Log.md

@pedramamini
pedramamini / maestro_message_scanner.py
Last active June 3, 2026 22:26
maestro_message_scanner.py: token-cheap iMessage @maestro message bus scanner (Maestro Cue command node). https://www.runmaestro.ai
#!/usr/bin/env python3
"""
maestro_message_scanner.py, the cheap gatekeeper for the "@maestro" message bus.
Runs every 3 min as a Maestro Cue command node (https://www.runmaestro.ai). Scans
iMessage for new messages containing the marker "@maestro" that the owner authored
himself, and dispatches each one to a handler agent via `maestro-cli send`. If nothing
new is found it exits silently, so no agent (and no tokens) are spent unless there is
real work.
@pedramamini
pedramamini / README.md
Last active April 24, 2026 21:21
Apple Voice Memos → daily Markdown journal. Pulls Apple's native on-device transcripts from the tsrp MP4 atom (no Whisper). Hourly cron-safe, idempotent. macOS 15+.

Voice Memos → Daily Markdown Journal (macOS)

Append today's Apple Voice Memos — transcribed by Apple on-device, no Whisper — to a daily Markdown journal file. Works great with Obsidian vaults, plain-text journals, any daily-note workflow.

From the iOS lock-screen long-press Voice Memos shortcut, a thought goes from "open mouth" to "stored, transcribed, titled, appended to today's note" with zero further input.

Read the writeup: Voice Memos to Journal, via a Buried Apple Atom — explains the tsrp atom discovery and why scanning for the JSON sentinel works across both .m4a and .qta container formats.


@pedramamini
pedramamini / youtube_to_obsidian.sh
Created April 21, 2026 17:55
YouTube ingestion to Obsidian with custom Fabric prompts
#!/bin/bash
# Do we want to ingest the videos into our vault?
DOWNLOAD_VIDEOS=false
# NOTE: THERE ARE CUSTOM FABRIC PATTERNS IN USE BELOW.
# /Users/pedram/go/bin/fabric --model gpt-4o --pattern ped_sitrep
# THIS SCRIPT WILL NOT WORK FOR YOU. IT'S BUT AN EXAMPLE.
# Ensure we're running in the directory where this script is located
@pedramamini
pedramamini / rocky_say
Last active June 4, 2026 19:52
rocky_say — Rocky voice TTS from Project Hail Mary (voice cloning + text style transform)
#!/usr/bin/env python3
"""
rocky_say — Text-to-speech using Rocky's cloned voice (Project Hail Mary)
Transforms input text into Rocky's speech patterns ("text GAN"), then
synthesizes audio using XTTS v2 voice cloning. Rocky is the Eridian alien
from Andy Weir's Project Hail Mary, voiced by James Ortiz in the 2026 film.
His speech patterns are distinctive: dropped articles, simplified grammar,
word tripling for emphasis ("good good good", "bad bad bad"), and the
@pedramamini
pedramamini / rssidian-cost-tracking.md
Created February 25, 2026 22:02
Obsidian cost tracking code for RSSidian ingestions.
searchType: dvField,dvField,dvField              # all three come from inline fields
searchTarget: Ingestion_Date,Total_Tokens,Total_Cost
datasetName: Date,Tokens,Cost ($)
aspectRatio: 50:15
folder: "Content Farm/Web/Archive/2025"
dateFormat: YYYY-MM-DD
xDataset: 0                                       # 1st target drives the X-axis

line:
@pedramamini
pedramamini / Oura_Stats_Obsidian.js
Created February 13, 2026 02:26
I pull stats into Oura regularly (manual unfortunately) then generate a table with different lookback windows via this DataViewJS snippet.
/********************************************************************
* Oura Stats + Regression‑based Trend & Δ % *
* – zebra‑striped rows for easier scanning *
********************************************************************/
/* ---------- helpers ---------- */
function fmtNum(n, d = 0) { return n.toFixed(d).replace(/\B(?=(\d{3})+(?!\d))/g, ","); }
function fmtDate(s) { const [y, m, d] = s.split("-"); return `${parseInt(m)}/${parseInt(d)}`; }
function linReg(x, y) {
const n = x.length,

Maestro - Statement of Work

Project Overview

Maestro is an open-source Electron desktop application for managing multiple AI coding assistants simultaneously. We're seeking an experienced Electron developer to help mature the codebase and establish infrastructure for sustainable, rapid development.


Scope of Work

Feature: Show Thinking Toggle

A simple toggle button in the AI terminal (bottom right of chat, alongside History and Read-Only) that lets users see Claude's thinking process as it streams, instead of waiting for the final result.

Overview

Current Behavior: Maestro waits for the complete type: 'result' message from Claude Code's stream-json output. The type: 'assistant' streaming chunks are explicitly skipped (see process-manager.ts:319-327). Users see only the final polished response.

New Behavior: When "Show Thinking" is enabled, users see the agent's response as it streams in real-time, giving visibility into reasoning before the final result arrives.