Skip to content

Instantly share code, notes, and snippets.

View robertDouglass's full-sized avatar

Robert Douglass robertDouglass

View GitHub Profile
@robertDouglass
robertDouglass / mission-retrospective-20260908.md
Created September 8, 2026 07:17
Spec Kitty mission retrospective: upgrade preview reliability and mission corpus health

Mission Retrospective: Upgrade Preview Reliability and Mission Corpus Health

Date: 2026-09-08. Retrospective investigation only; no product changes or new test runs.

Mission: upgrade-preview-mission-health-01M1V6E1, subsequently numbered 199. Implementation: PR #3923. Closeout and remediation: PR #3999.

Conclusion

@robertDouglass
robertDouglass / zeitgeist-uninstall-runbook.md
Last active August 26, 2026 15:05
Zeitgeist: safe uninstall runbook for Claude Code / Codex / OpenCode (companion to the install runbook)

Uninstalling Zeitgeist safely (Claude Code / Codex / OpenCode)

Companion to the Zeitgeist install runbook, for pulling it back off a machine. Give this document to Claude Code, Codex, or OpenCode and say:

Execute this runbook on my machine. Keep working until every check in "Definition of Done" passes. Do not just summarize the steps.

The three safety principles, in order of importance:

@robertDouglass
robertDouglass / shai-hulud-verify.sh
Created August 5, 2026 20:21
Quick bash script to detect Shai-Hulud npm worm on your machine
#!/bin/bash
# Shai-Hulud Quick Verification Script
# Scans for npm supply-chain worm indicators of compromise
# Usage: bash shai-hulud-verify.sh
echo "=== SHAI-HULUD VERIFICATION ==="
echo "Scan Date: $(date)"
echo ""
# Critical check 1: Malicious JSON files
@robertDouglass
robertDouglass / shai-hulud-detection-operator-instructions.md
Created August 5, 2026 20:20
Shai-Hulud npm worm detection: operator instructions, IOCs, and research citations

Shai-Hulud Detection: Operator Instructions & Research

Threat Overview

Shai-Hulud is a self-replicating npm supply-chain worm first detected in September 2025, with evolved variants continuing through 2026. It autonomously compromises developer environments and CI/CD pipelines to harvest cloud credentials and authentication tokens.

Latest Activity (August 2026):

  • May 2026: 170+ npm packages, 404+ malicious versions
  • @antv ecosystem: 639 compromised versions
  • Copycat variants: chalk-tempalte, @bitwarden/cli v2026.4.0
@robertDouglass
robertDouglass / tok2.py
Last active July 8, 2026 09:11
Prompt abbreviation vs token count (o200k_base): pure prose saves ~50-66%, but prompts embedding code/JSON/SQL cap out at ~13-19%
import tiktoken
enc = tiktoken.get_encoding("o200k_base")
def n(s):
return len(enc.encode(s))
# ---------------------------------------------------------------
@robertDouglass
robertDouglass / SKILL.md
Last active June 16, 2026 15:09
Spec Kitty Monorepo Prep skill
name spec-kitty-monorepo-prep
description Prepare a fresh timestamped temporary workspace for Spec Kitty tasks by selecting relevant Priivacy-ai repos, cloning them into a new temp directory, and doing all work there instead of existing local checkouts. For non-Spec-Kitty work, create a fresh blank workspace instead of cloning Spec Kitty repos. Use whenever the user asks to work on Spec Kitty, Spec Kitty SaaS, tracker, hub, mobile, website, design system, planning, tests, runtime, events, or orchestrator repos.

Spec Kitty Monorepo Prep

Use this before substantive work on Spec Kitty. If the user is asking for work that is not actually part of Spec Kitty or its repos, do not clone Spec Kitty projects; create a fresh blank workspace under a dedicated temporary/dev workspace root and build there.

Core Rules

@robertDouglass
robertDouglass / retrospective-investigate-canary-followups-1142-1141-01KS02TV.yaml
Last active May 19, 2026 14:13
Spec Kitty retrospective.yaml — mission investigate-canary-followups-1142-1141-01KS02TV (#1160). [v2] All 5 actionable findings/proposals walked by HiC on 2026-05-19; 5 proposals state=accepted (1 existing + 4 promoted from not_helpful/gaps). Engineering trackers: #1161, #1162, #1163, #1164.
schema_version: '1'
mission:
mission_id: 01KS02TVCYPQXQ9DX1Z39SXZ6K
mid8: 01KS02TV
mission_slug: investigate-canary-followups-1142-1141-01KS02TV
mission_type: software-dev
mission_started_at: '2026-05-19T12:19:39+00:00'
mission_completed_at: '2026-05-19T13:52:21+00:00'
mode:
value: human_in_command
@robertDouglass
robertDouglass / run_cli_with_backoff.sh
Created February 26, 2026 17:25
spec-kitty-cli-orchestration run_cli_with_backoff script
#!/usr/bin/env bash
set -euo pipefail
if [ "$#" -lt 1 ]; then
echo "Usage: $0 '<command>' [max_attempts] [base_sleep_seconds]"
exit 2
fi
CMD="$1"
MAX_ATTEMPTS="${2:-4}"
@robertDouglass
robertDouglass / SKILL.md
Created February 26, 2026 17:24
spec-kitty-cli-orchestration skill
name spec-kitty-cli-orchestration
description Orchestrate SpecKitty workflows across Claude CLI, OpenCode, and Codex with slash-command-first execution, reviewer-only feedback loops, retry/backoff handling, and deterministic phase gates (specify→plan→tasks→implement→review→accept→merge).

Spec Kitty CLI Orchestration

Overview

Use this skill when you need to drive SpecKitty through external CLIs (Claude/OpenCode) while keeping Codex in reviewer-control mode. The goal is predictable throughput: slash commands first, clear gates, no direct implementer edits by the orchestrator.

@robertDouglass
robertDouglass / claude-tree.js
Created February 20, 2026 18:28 — forked from stackdumper/claude-tree.js
A script that produces a more compact project file tree for CLAUDE.m.
import { readdirSync, statSync } from 'fs'
import { join, basename } from 'path'
// Patterns to ignore (can be extended via args if needed)
const IGNORE_PATTERNS = ['.git', '.claude', 'node_modules', 'dist', '.DS_Store', 'pnpm-lock.yaml']
// File extensions to ignore
const IGNORE_EXTENSIONS = ['.png', '.csv']
type TreeNode = {