Skip to content

Instantly share code, notes, and snippets.

@juanpabloaj
juanpabloaj / gemini_qa_agent_prompt.txt
Created July 18, 2025 12:43
Autonomous QA Engineer Prompt
**Role:** Act as an **Autonomous QA Engineer**, an expert agent in software test automation. Your mission is to set up your own working environment idempotently, systematically explore a web application, manage a persistent state, and generate a robust test suite using Python and Playwright.
**Working Philosophy:**
1. **Idempotency (Core Principle):** Your first task is always to ensure the environment is configured, but **without performing redundant actions**. If a folder or file already exists, you acknowledge it and continue. You log every setup action you perform so you never repeat it.
2. **Statefulness:** You never start from scratch. You read your `qa_state.json` file to know the testing progress, discovered elements, and environment configuration.
3. **Efficiency:** You verify dependencies before installing them. You optimize your workflow to maximize coverage.
4. **Robustness and Clarity:** You generate tests with stable selectors and clear assertions. Your work is understandable, and you leav
@juanpabloaj
juanpabloaj / codex_integration_tests_without_docker.md
Last active July 19, 2025 17:28
Running Integration Tests Without Docker in the Codex environment

Running Integration Tests Without Docker in the Codex environment

This guide explains how to execute the integration test suite in an environment where docker or docker-compose are unavailable. Ensure neither tool is installed before continuing. If either command prints a version number, use the container-based workflow instead.

# Check for docker and docker-compose
command -v docker && docker --version
command -v docker-compose && docker-compose --version
@juanpabloaj
juanpabloaj / AGENTS.md
Last active July 9, 2025 13:33
General guidelines and best practices for AI code generation

1. Core Coding Principles

  • Language: All code, comments, variable names, function names, class names, and commit messages must be strictly in English.
  • Idiomatic Style:
    • Write code that adheres to the idiomatic style, conventions, and official style guides of the target language. This includes formatting, naming, and general structure.
    • Assume a linter or formatter will eventually run; aim to produce code that is already close to passing common linting rules.
  • Clarity and Readability:
    • Prioritize clarity, readability, and maintainability over unnecessary "cleverness" or extreme brevity if it sacrifices understanding.
    • Write self-documenting code.
  • Follow the Principle of Least Surprise: code should behave in a way that users and other developers would naturally expect.
@juanpabloaj
juanpabloaj / main.go
Last active April 25, 2025 23:44
Testing of Goroutines with WaitGroup and time.After
package main
import (
"sync"
"testing"
"time"
)
type Actor interface {
Perform()
@juanpabloaj
juanpabloaj / m5stack_unitv2_obj_detection.py
Last active September 11, 2024 01:06
m5stack unitv2 object detection and rectangles drawing
import subprocess
import json
import os
from datetime import datetime
import logging
import base64
from io import BytesIO
from PIL import Image, ImageDraw
@juanpabloaj
juanpabloaj / m5stack_unitv2_object_recognition.py
Created September 10, 2024 02:33
M5stack unitv2 object_recognition example
'''
it shows a log message when an object is detected.
references
https://medium.com/@sebastiaan.panasj/occupancy-counting-with-unitv2-by-m5stack-d35455037882
'''
import subprocess
import json
@juanpabloaj
juanpabloaj / main.go
Created August 26, 2024 19:47
Go slog, example with context handler
package main
import (
"context"
"log/slog"
"os"
)
type contextKey string
@juanpabloaj
juanpabloaj / .gitignore
Last active May 18, 2024 19:43
track ethereum token
.env
*.db
@juanpabloaj
juanpabloaj / main.py
Last active October 15, 2024 00:44
looking for job using Linkedin API
import os
import sqlite3
from linkedin_api import Linkedin
import logging
def extract_id(urn):
return urn.split(":")[-1]
@juanpabloaj
juanpabloaj / main.go
Created July 2, 2023 22:13
heartbeats example
// package main example of the book Concurrency in Go by Katherine Cox-Buday
// it includes the patterns: orChannel, orDone, take, and bridge.
// newSteward monitors a goroutine and restarts it if it stops sending heartbeats
package main
import (
"log"
"time"
)