WikifitaGitHub live67e8de5
diretiva · diretivas/preferencias-tecnicas

Technical Preferences — Directives

Mandatory technical preferences. uv as package manager, PEP 723 for scripts, artifacts in outputs, available hardware.

Baixar raw

Technical Preferences — Directives

Mandatory rules for all code, scripts, and artifacts produced.

Package Manager: uv (ALWAYS)

  • NEVER use pip directly
  • NEVER use python or python3 directly
  • ALWAYS use uv as intermediary
  • Run scripts: uv run script.py
  • Install packages: uv pip install (or better, use pyproject.toml)
  • Virtual envs: uv venv if needed

Dependencies: pyproject.toml (NEVER requirements.txt)

  • Every Python project uses pyproject.toml
  • NEVER requirements.txt
  • uv manages lockfiles automatically

Self-Contained Scripts: PEP 723

When the situation demands something self-contained (no setup, no project, zero deps):

# /// script
# dependencies = [
#     "numpy>=2.0",
# ]
# ///

"""
Script description.
Usage: uv run script.py [args]
"""

import sys
# ... code ...

if __name__ == "__main__":
    main()
  • Inline metadata in the file header
  • uv resolve automatically resolves dependencies
  • uv run script.py runs without setup
  • Zero external dependencies = empty array []
  • Reference example: wikifita/scripts/wikifita_audit.py

Artifacts: Location

  • NEVER create artifacts in the project folder unless the user explicitly requests it
  • Use the session outputs directory as default
  • If the user asks to save in a specific location, respect that
  • Present artifacts via present_files after creation

Available Hardware

DeviceSpecsPrimary Usage
MacBook Pro M3 Pro24GB Unified VRAM, macOSDevelopment, MLX/Metal, local models
PC Windows (chicotv)Ryzen 5 4500, RTX 2060 6GB, 16GB RAMFrida tools, Android RE, quantized local models
PS3 EvilnatCell BEBare-metal inference (experimental)

macOS Environment

  • Homebrew available
  • uv installed via Homebrew or standalone
  • Native Git
  • Docker Desktop available

Git: Mandatory Rules

  • Mandatory commits after each significant change
  • NEVER use git commit --no-verify (skips validation hooks)
  • Semantic messages: feat:, fix:, refactor:, docs:, chore:
  • OKF frontmatter validated automatically by pre-commit hook
  • Audit runs automatically via post-commit hook

Golden Rule

If you are writing pip install, python script.py, or requirements.txtstop. Use uv.