Skip to content

Instantly share code, notes, and snippets.

@kingargyle
kingargyle / context_discovery.md
Created March 4, 2026 02:39
Project Context Discovery

[SPEC] Standardized Context Discovery

Goal

Formalize "Tribal Knowledge" into "Golden Standards" through a heuristic-based discovery process. This plan identifies architectural "Gravity Wells," documents anti-patterns, and maps cross-module protocols to ensure consistency and formalize project intelligence in a language/framework-agnostic manner.

Context

  • Current State: The project has implementation-defined standards that may be implicitly understood but lack formal documentation in AI system prompts.
  • Constraints: This plan is language and framework agnostic. The executing agent must determine the specific tech stack through probing and adapt its discovery methodology accordingly.
  • SDD Memory: All findings, surprising dependencies, and architectural debt must be logged in prompts/plans/context_discovery/memory/.
@kingargyle
kingargyle / TOOLING_CONSTRAINTS.md
Created February 24, 2026 02:49
AI Tooling Constraings

AGENT CAPABILITY PROTOCOL

1. Filesystem Fallbacks

  • No Directory Creation Tool: Use your Write tool to create a placeholder .gitkeep file in the target path.
  • No Delete/Move Tools:
    1. Write the new file to the destination.
    2. Add the old file path to the "Cleanup & Manual Actions" section of the task spec for human action.

2. Environment Restrictions

  • No Direct Shell: Do not assume shell access (bash/zsh).
@kingargyle
kingargyle / sdd_implementation_v1.md
Last active March 7, 2026 04:47
Enforce Spec Driven / Goal Driven development

Implementation Plan: Phased Spec-Driven Development (SDD)

Status: PROPOSED
Version: 2.1.0
Target: Standardized AI Workflow (Universal LLM/Agent Compatibility)

1. Scope and Summary

  • Scope: This protocol applies to all AI-assisted development (features, refactors, migrations).
  • Summary: To eliminate "Vibe Coding" and ensure consistency, this plan implements a Spec-First Protocol. Agents must generate a Phased GSD (Goal, Steps, Deliverables) document before writing any production code for complex tasks.
  • Context & Memory: v2.0 introduces persistent context management. Each plan resides in its own directory, with a dedicated memory/ sub-folder to record findings, unexpected dependencies, and state changes across execution phases.
@kingargyle
kingargyle / promptslocation.md
Created February 16, 2026 14:59
Location of Android Studio Prompts

On a a linux system, the app.prompts.xml file that contains the saved prompts, is stored in `~/.config/Goggle/AndroidStudioVersion/options/app.prompt.xml'

For MacOSX: Configuration/Settings: ~/Library/Application Support/Google/AndroidStudio

  • Plugins: ~/Library/Application Support/Google/AndroidStudio/plugins
  • System/Cache Files: ~/Library/Caches/Google/AndroidStudio
  • Logs: ~/Library/Logs/Google/AndroidStudio

For Windows: On Windows, the settings are stored within the user's AppData folder:

@kingargyle
kingargyle / pipewire.md
Created May 2, 2025 23:54 — forked from the-spyke/pipewire.md
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@kingargyle
kingargyle / End GCode
Last active February 9, 2024 10:35
Prusa Slicer Anycubic Kobra Neo
M117 Cooling down...
M104 S0 ; turn off extruder
M107 ; Fan off
M140 S0; Turn bed off
M84 ; disable motors
G91 ;relative positioning
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+0.5 E-5 ;X-20 Y-20 F240 ;move Z up a bit and retract filament even more
G28 X0 ;move X to min endstops, so the head is out of the way
G90 ;Absolute positionning
@kingargyle
kingargyle / SchoolViewHolder.java
Last active June 1, 2022 12:52
Example of Unit Testing classes with Hilt @entrypoints
public class SchoolViewHolder extends RecyclerView.ViewHolder {
private ItemSchoolBinding binding;
// @VisibleForTesting
// protected EventBus eventBus = EventBus.getDefault();
private EventBus eventBus;
public SchoolViewHolder(@NonNull View itemView) {
@kingargyle
kingargyle / CoroutinesRule.kt
Created July 31, 2020 19:27
A JUnit 4 test rule for working with testing coroutines.
package com.abercrombie.testing.ui.rules
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.TestCoroutineDispatcher
import kotlinx.coroutines.test.TestCoroutineScope
import kotlinx.coroutines.test.resetMain
import kotlinx.coroutines.test.runBlockingTest
import kotlinx.coroutines.test.setMain
import org.junit.rules.TestRule
@kingargyle
kingargyle / spotless.gradle
Created May 16, 2020 23:53
Configure XML formatting for Android Layout files
subprojects {
apply plugin: "com.diffplug.gradle.spotless"
spotless {
format 'xml', {
target '**/layout*/*.xml'
indentWithSpaces(2)
eclipseWtp('xml').configFile rootProject.file('spotless.xml.prefs')
}
}
@kingargyle
kingargyle / gist:460bd53b5c6096fc43866020a9bde4d9
Created October 12, 2019 01:29
Capture Image from HLS stream using FFMPeg
ffmpeg -loglevel 99 -i "https://webcamstream.multivista.com/live/amlst:dal_59169_1.stream/chunklist_w95623917_b300000.m3u8" -ss 00:00:14.435 -vframes 1 -strftime 1 "%Y-%m-%d_%H-%M-%S_crew_stadium.png"