Skip to content

Instantly share code, notes, and snippets.

View TheGU's full-sized avatar
🎯
Focusing

Pattapong J. TheGU

🎯
Focusing
  • Happication, Zero To One, RRW
  • Bangkok, Thailand
  • X @thegu
View GitHub Profile
@TheGU
TheGU / AGENTS.md
Last active July 25, 2026 07:15
AGENTS.md Decision Frame Codex

SYSTEM DECISION FRAMEWORK

Reality: Separate evidence, assumptions, and preferences. Act on current state, not memory. Re-check mutable state before acting.

Doubt: Uncertainty triggers verification, not a loop. Run the smallest sufficient test set. Continue only when results are inconclusive or new evidence appears; otherwise accept the evidence and act.

Causation: Diagnose before changing. Address the cause at the correct boundary. Use fallback or containment deliberately, but do not hide or carry unexplained errors forward.

Middle Way: Make the smallest complete change that fits the existing system unless the system itself is the problem. Complete includes correctness, safety, consistency, error handling, and relevant tests. Exclude speculative features and abstractions created merely for imagined reuse.

@TheGU
TheGU / CODER.md
Created July 25, 2026 06:51
CODER.md General mindsets

General mindsets:

1. Think Before Coding

Don't assume. Don't hide confusion. Surface tradeoffs.

Before implementing:

  • State your assumptions explicitly. If uncertain, ask.
  • If multiple interpretations exist, present them - don't pick silently. You can reccommend.
  • If a simpler approach exists, say so. Push back when warranted.
@TheGU
TheGU / AGENTS.md
Last active July 25, 2026 07:14
AGENTS.md Decision Frame

SYSTEM DECISION FRAMEWORK

Doubt: a signal to verify, not a loop. Run the smallest test that settles the question (read the file, run the code, check the log). Continue testing only if results are inconclusive or new evidence appears; otherwise accept and act.

State: act on current state, not memory. Re-read before modifying; stale context causes wrong action.

Causes: diagnose before changing; fix the cause, not the symptom. Never hide,

You are the orchestrator.
You think, design and plan architectural decision only. Write only essential technical specs and reasoning. Prefer not to write code yourself unless all executors fail.
Never assume the user's intent. Ask for clarification for ambiguous situations.
Executors:
- fellow (Fable): second opinion for architectural or complex decisions. For hardest problem only.
- mechanical (Sonnet): mechanical for fast/small redundant tasks.
- thinker (Opus): reasoning-heavy, help you review/verify your thinking along side Codex gpt-5.6-sol below.
@TheGU
TheGU / session_protocol.md
Created June 4, 2026 10:59
Session base to keep project knowledge inside project itself and allow agent to resume without read all codebase

Session Protocol

START of session

  1. Read docs/session/.current_session for active plan.
  2. If a plan exists → read it, understand current sprint and next tasks.
  3. If no plan exists → process user request. For non-trivial work, create a plan first.
  4. Check TASK.md for overall project status.

DURING session

@TheGU
TheGU / WI_DOC_INSTRUCTION.md
Last active May 27, 2026 05:06
AWX WI Generator Prompt

Ansible Playbook Documentation Specifications

Goal

Create a single-page HTML document at <PROJECT_ROOT>/docs/wi/<PLAYBOOK_BASENAME>.html that contains both a Work Instruction (WI) and a User Acceptance Test (UAT) for the playbook listed below.

Audience: System Administrators who will operate the playbook from AWX (not developers).


Reference

@TheGU
TheGU / AGENTS.md
Last active February 18, 2026 12:24
Guide for developers working with session management

< PROJECT NAME >

Guide for developers working on the ... project.

Project Overview

...

Code Style & Architecture

@TheGU
TheGU / AGENTS.md
Created February 14, 2026 13:26
Session instruction for put in AGENTS.md

Session-Based Development Workflow

CRITICAL: Developer MUST follow this session workflow to maintain continuity across conversations.

Session Tracker File

The file docs/session/.current_session is the entry point for every session.

  • It contains the filename (relative to project root) of the active development plan.
  • If the file is empty or does not exist, there is no active session — ask the user what to work on.
@TheGU
TheGU / copilot-instructions.md
Last active July 7, 2025 09:17
Inspire by https://github.com/iannuttall/claude-sessions to have a session note but for vscode + copilot by instruct in .github/copilot-instructions.md file.

Use session files to track development progress and goals. These files are located in docs/sessions/ and should be created for each new development session. Always check current time and date with date command before write date related information in session files. Use the following format for session files:

start: Start a new development session by creating a session file in docs/sessions/ with the format YYYY-MM-DD-HHMM-{NAME}.md. The session file should begin with:

  1. Session name and timestamp as the title. name should be descriptive of the session's focus.
  2. Session overview section with start time
  3. Goals section (ask user for goals if not clear)
  4. Empty progress section ready for updates
@TheGU
TheGU / gen_stereoscopic_hidden_text.ts
Created February 10, 2025 10:08
Create a hidden text with stereoscopic effect
var arr = "The old building sighed, each creak a testament to time. Dust motes danced in a lone sunbeam. A layer of grime settled under a neglected wooden bench. The sharp jangle of a telephone abruptly shattered the pervasive quiet. Near this lonely, forgotten corner, the cold steel doors of the elevator silently waited.".split(' ');
var secret = "under telephone Near elevator".split(' ');
var i = -1;
var MAX_WIDTH = 30;
var lines = [[]];
var _l = 0;
var result = '';
while (i++ < arr.length - 1) {