Skip to content

Instantly share code, notes, and snippets.

View Hona's full-sized avatar

Luke Parker Hona

View GitHub Profile
@Hona
Hona / code-like-luke.md
Created August 13, 2026 01:44
OpenCode slash command for happy-path-first, use-case-oriented software design
description Implement with clear orchestration, strong interfaces, and happy-path-first design

Code like Luke.

Implement the requested change, but optimize the design for the normal user flow. If the happy path is 95% of runtime behavior, it should be approximately 95% of the code readers see.

Start with context:

  • inspect the existing code, callsites, data flow, and nearby conventions
@Hona
Hona / guided-review.md
Created June 1, 2026 03:49
opencode global slash command: guided-review
description Guided review especially when an agent does so much work you don't have a deep understanding of all the changes, every single line of syntax etc. Force a complete understanding.

A lot of work was done and the human operator wants to ensure they understand and vouch for every single:

  • technical choice
  • architectural choice
  • line of code
  • sytax sugar (style)
@Hona
Hona / opencode-desktop-performance.md
Created May 17, 2026 23:12
OpenCodeDesktop performance session archive, findings, TLDR, and blog draft

OpenCodeDesktop performance work: findings, TL;DR, and blog draft

Generated: 2026-05-18 Source: local OpenCode session archive (opencode db) plus GitHub PR metadata via gh.

TL;DR

Before: measured stable session timeline loads were roughly 2-4 seconds, with real-world bad sessions reported around 5-15 seconds.

After: the main virtualized path reached sub-500ms first useful timeline render. Later cache/anchor work made the bottom-aligned visual load appear in about 113ms on the measured cold path.

@Hona
Hona / README.md
Created April 30, 2026 02:40
WSL1 Bun build --compile ELF ENOEXEC repro

WSL1 Bun build --compile ELF repro

Repro bundle for oven-sh/bun#29963.

Run inside WSL1:

sudo apt-get update
sudo apt-get install -y curl unzip file binutils strace
bash repro-bun-compile-wsl1.sh
description Seek truth through verification and code search

seek truth. dont trust your knowledge. use web/code search to find deterministic answers in the code. use code refs and code snippets to reason about your decisions. you can clone dependencies/parts of the stack into a temp dir to scan files more quickly.

@Hona
Hona / dev-opencode.ps1
Last active April 8, 2026 02:54
dev-opencode.ps1
#!/usr/bin/env pwsh
# Development workflow: build opentui -> copy into opencode -> run opencode dev server
#
# This script does NOT use `bun link` (corrupts global state) or symlinks (breaks module resolution).
# It uses a dedicated Bun cache for this workflow and replaces package directories instead of
# overwriting hardlinked files in place.
#
# Usage:
# .\dev-opencode.ps1 # Full flow: build, copy, run dev server
# .\dev-opencode.ps1 -NoDev # Build and copy only, don't start dev server
@Hona
Hona / settings.json
Created December 16, 2025 00:40
Windows Terminal | Shift+Enter for OpenCode
{
...,
"actions": [
{
"command": {
"action": "sendInput",
"input": "\u001b[13;2u"
},
"id": "User.sendInput.8882FD6D"
}
@Hona
Hona / AGENTS.md
Created December 11, 2025 22:03
Global AGENTS.md

Global AGENTS.md

NOTE: This is a general directive file for all agents. Trust project AGENT overrides more.

TIP: As an agent, for tough or deterministic things (hard bugs, performance issues) please add logging to find an issue or use tools to not guess and increase repeatability. TIP: You will likely be in a win32 env. You may prefer to invoke pwsh.exe or powershell.exe commands, instead of bash directly to prevent command errors. TIP: For questions about the codebase, always delegate a task to keep your context slim.

NEVER do git operations unless asked. You may do readonly git operations without asking, e.g. git log, git blame.

Role: Principal Engineer (Code Economy & Quality).

Task: Audit current branch against main/dev etc. execute a "Deep Clean & Modernize" pass.

Directives: (1 & 2 MOST IMPORTANT)

  1. Sanitize (Anti-Slop): Ruthlessly strip AI-generated artifacts.
    • Delete comments that explain what code does (keep only why).
    • Remove paranoid defensive programming (try/catch, null checks) in trusted paths.
    • Eliminate any casts or lazy typing.
  2. Maximize Signal-to-Noise:
@Hona
Hona / refactor.md
Created December 4, 2025 03:57
Remove AI Slop slash command

Role: Principal Engineer (Ecosystem & Code Economy).

Task: Review the files changed in the last step. Refactor to maximize Signal-to-Noise Ratio.

Directives:

  1. Ecosystem over Custom: actively scan csproj/package.json and standard libraries. Delete any custom utility logic that duplicates existing functionality (e.g., use LINQ/Lodash, built-in Math, specific NuGet/NPM packages already installed).
  2. Compress Syntax: Aggressively apply modern language features (C# Primary Ctors/Records, TS Destructuring) to reduce boilerplate.
  3. Harden Contracts: Replace loose primitives (strings/ints) with Enums, Value Objects, or specific types to make the API self-documenting.
  4. DevEx: If test setup or usage is verbose, abstract it into a fluent builder or helper.