Skip to content

Instantly share code, notes, and snippets.

@yasn77
yasn77 / principal-reviewer.md
Created August 2, 2026 11:44
AI Reviewer Prompt

Role: Principal Software Engineer & Architect (Reviewer)

You are a Principal Software Engineer and Architect with deep, polyglot expertise across Python, Golang, Rust, JavaScript/TypeScript, Terraform, and Helm. Your purpose is to review code, architecture, and agentic task plans to a rigorous standard, then sign off work or require changes. You are the final quality gate.

1. Code & Architecture Review Criteria

Evaluate every change against these criteria, in priority order:

  • Security (full spectrum — highest priority): OWASP Top 10, logic flaws (race conditions, TOCTOU, improper state handling), secret/credential exposure, input validation, authentication & authorisation, dependency & supply-chain risks (outdated/vulnerable deps, unsigned artifacts), and configuration security. A security finding always overrides other concerns.
  • Correctness: Logic errors, off-by-one/edge cases, unhandled errors, nil/null dereferences, resource leaks, concurrency bugs, broken contracts.
  • **Simplicity & Ele
@yasn77
yasn77 / tmux-sync-ssh.sh
Created September 8, 2025 13:23
Vibe Code Bash script to SSH to multiple hosts with tmux
#!/usr/bin/env bash
# ==============================================================
# tmux-sync-ssh.sh
#
# 1. Finds the real tmux binary (ignores aliases, functions, etc.).
# 2. Verifies tmux is ≥ 2.4.
# 3. Creates a tmux session with one pane per host, splits panes,
# turns on synchronized input, and attaches to the session.
#
# 4. Accepts SSH options:
@yasn77
yasn77 / .pre-commit-hooks.yaml
Last active July 15, 2025 14:33
pre-push branch name check
- id: branch-name-validation
name: Validate branch name
entry: ./pre-push-branch-check.sh
language: script
stages: [pre-push]
pass_filenames: false
always_run: true
@yasn77
yasn77 / README.md
Last active August 6, 2024 17:11
Install Podman on Mac Silicon Chipset
# https://taskfile.dev
version: '3'
vars:
KUBECONFIG: "/path/to/incuded/kubeconfig.yaml"
tasks:
get-kubeconfig:
desc: "Show Kubeconfig location"
apiVersion: v1
kind: Namespace
metadata:
name: mayastor
[Unit]
Description=Update opsctl using daily timer
Wants=update-opsctl.timer
[Service]
Type=oneshot
ExecStart=<PATH_TO_UPDATE_OPSCTL_SCRIPT>
[Install]
WantedBy=multi-user.target
@yasn77
yasn77 / helm-kong-migrate-plugin-values.py
Created January 27, 2020 01:51
Helm/Kong PR 13 (migrate plugin values)
#!/usr/bin/env python
import ruamel.yaml
import sys
yaml = ruamel.yaml.YAML()
with open(sys.argv[1], 'r') as f:
values = yaml.load(f)
@yasn77
yasn77 / helm-upstream-sync.sh
Created January 22, 2020 15:19
Script to keep upstream Kong chart in sync with local chart
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
LAST_SYNC_COMMIT=$(git log -n1 --grep '^\[upstream-sync\]' --pretty='format:%h' helm/)
TMPDIR=$(mktemp -d)
UPSTREAM_ZIP_URL=${UPSTREAM_ZIP_URL:-"https://github.com/Kong/charts/archive/master.zip"}
2018/02/20 13:41:29 [INFO] Terraform version: 0.11.3 3802b14260603f90c7a1faf55994dcc8933e2069
2018/02/20 13:41:29 [INFO] Go runtime version: go1.9.1
2018/02/20 13:41:29 [INFO] CLI args: []string{"/home/yasser/WORK/drie/GIT/azure-demo/terraform", "validate", "."}
2018/02/20 13:41:29 [DEBUG] Attempting to open CLI config file: /home/yasser/.terraformrc
2018/02/20 13:41:29 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/02/20 13:41:29 [INFO] CLI command args: []string{"validate", "."}
2018/02/20 13:41:29 [DEBUG] checking for provider in "."
2018/02/20 13:41:29 [DEBUG] checking for provider in "/home/yasser/WORK/drie/GIT/azure-demo"
2018/02/20 13:41:29 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2018/02/20 13:41:29 [DEBUG] found provider "terraform-provider-azurerm_v1.1.2_x4"