From 1231b32c3c29c8093a317f6466262ca76ea83f4f Mon Sep 17 00:00:00 2001 From: FreeTLab Date: Fri, 24 Apr 2026 19:28:47 +0200 Subject: [PATCH] feat: host como jugador --- .atl/skill-registry.md | 58 +++++++++++++++++++ .gga | 50 ++++++++++++++++ lib/pantallas/pantalla_crear_partida.dart | 2 +- lib/pantallas/pantalla_lobby_host.dart | 2 +- test.txt | 1 + .../estado_juego_crear_partida_host_test.dart | 1 - test/estado_juego_host_local_test.dart | 1 - test/servicio_nearby_user_pool_test.dart | 1 - 8 files changed, 111 insertions(+), 5 deletions(-) create mode 100644 .atl/skill-registry.md create mode 100644 .gga create mode 100644 test.txt diff --git a/.atl/skill-registry.md b/.atl/skill-registry.md new file mode 100644 index 0000000..0281765 --- /dev/null +++ b/.atl/skill-registry.md @@ -0,0 +1,58 @@ +# Skill Registry + +**Delegator use only.** Any agent that launches sub-agents reads this registry to resolve compact rules, then injects them directly into sub-agent prompts. Sub-agents do NOT read this registry or individual SKILL.md files. + +See `_shared/skill-resolver.md` for the full resolution protocol. + +## User Skills + +| Trigger | Skill | Path | +|---------|-------|------| +| When creating a pull request, opening a PR, or preparing changes for review | branch-pr | /Users/freetlab/.config/opencode/skills/branch-pr/SKILL.md | +| When creating a GitHub issue, reporting a bug, or requesting a feature | issue-creation | /Users/freetlab/.config/opencode/skills/issue-creation/SKILL.md | +| When user says "judgment day", "judgment-day", "review adversarial", "dual review", "doble review", "juzgar", "que lo juzguen" | judgment-day | /Users/freetlab/.config/opencode/skills/judgment-day/SKILL.md | +| When user asks to create a new skill, add agent instructions, or document patterns for AI | skill-creator | /Users/freetlab/.config/opencode/skills/skill-creator/SKILL.md | + +## Compact Rules + +Pre-digested rules per skill. Delegators copy matching blocks into sub-agent prompts as `## Project Standards (auto-resolved)`. + +### branch-pr +- Every PR MUST link an approved issue — no exceptions +- Every PR MUST have exactly one `type:*` label +- Automated checks must pass before merge is possible +- Branch names must match: `^(feat|fix|chore|docs|style|refactor|perf|test|build|ci|revert)/[a-z0-9._-]+$` +- Conventional commits: `^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([a-z0-9\._-]+\))?!?: .+` +- Commit type determines PR label: feat→type:feature, fix→type:bug, docs→type:docs, refactor→type:refactor, chore→type:chore, style→type:chore, perf→type:feature, test→type:chore, build→type:chore, ci→type:chore, revert→type:bug +- PR body must contain: Closes #N (linked issue), PR type checkbox, Summary, Changes Table, Test Plan + +### issue-creation +- Blank issues are disabled — MUST use a template (bug report or feature request) +- Every issue gets `status:needs-review` automatically on creation +- A maintainer MUST add `status:approved` before any PR can be opened +- Questions go to Discussions, not issues +- Bug report template required fields: Pre-flight Checks, Bug Description, Steps to Reproduce, Expected Behavior, Actual Behavior, Operating System, Agent/Client, Shell +- Feature request template required fields: Pre-flight Checks, Problem Description, Proposed Solution, Affected Area + +### judgment-day +- Launch TWO sub-agents via delegate (async, parallel — never sequential) +- Each agent receives the same target but works independently +- Neither agent knows about the other — no cross-contamination +- Classify warnings as WARNING (real) or WARNING (theoretical) +- If confirmed CRITICALs or real WARNINGs exist → delegate Fix Agent +- After Fix Agent completes → re-launch both judges in parallel +- After 2 fix iterations, if issues remain → escalate to user + +### skill-creator +- Create a skill when: pattern is used repeatedly, project-specific conventions differ, complex workflows need steps, decision trees help AI +- Don't create a skill when: documentation exists, pattern is trivial, one-off task +- Skill structure: frontmatter (name, description, triggers, allowed-tools), Critical Rules, When to Use, Patterns, Commands + +## Project Conventions + +| File | Path | Notes | +|------|------|-------| +| SPEC.md | /Users/freetlab/Proyectos/farolero/SPEC.md | Existing SDD artifacts with Explore/Propose/Spec/Tasks/Apply/Verify phases | +| .gga | /Users/freetlab/Proyectos/farolero/.gga | Gentleman Guardian Angel config (AI provider, file patterns, rules file) | + +Read the convention files listed above for project-specific patterns and rules. All referenced paths have been extracted — no need to read index files to discover more. diff --git a/.gga b/.gga new file mode 100644 index 0000000..4b63f44 --- /dev/null +++ b/.gga @@ -0,0 +1,50 @@ +# Gentleman Guardian Angel Configuration +# https://github.com/your-org/gga + +# AI Provider (required) +# Options: claude, gemini, codex, opencode, ollama:, lmstudio[:model], github: +# Examples: +# PROVIDER="claude" +# PROVIDER="gemini" +# PROVIDER="codex" +# PROVIDER="opencode" +# PROVIDER="opencode:anthropic/claude-opus-4-5" +# PROVIDER="ollama:llama3.2" +# PROVIDER="ollama:codellama" +# PROVIDER="lmstudio" +# PROVIDER="lmstudio:qwen2.5-coder-7b-instruct" +# PROVIDER="github:gpt-4o" +# PROVIDER="github:deepseek-r1" +PROVIDER="claude" + +# File patterns to include in review (comma-separated) +# Default: * (all files) +# Examples: +# FILE_PATTERNS="*.ts,*.tsx" +# FILE_PATTERNS="*.py" +# FILE_PATTERNS="*.go,*.mod" +FILE_PATTERNS="*.ts,*.tsx,*.js,*.jsx" + +# File patterns to exclude from review (comma-separated) +# Default: none +# Examples: +# EXCLUDE_PATTERNS="*.test.ts,*.spec.ts" +# EXCLUDE_PATTERNS="*_test.go,*.mock.ts" +EXCLUDE_PATTERNS="*.test.ts,*.spec.ts,*.test.tsx,*.spec.tsx,*.d.ts" + +# File containing code review rules +# Default: AGENTS.md +RULES_FILE="AGENTS.md" + +# Strict mode: fail if AI response is ambiguous +# Default: true +STRICT_MODE="true" + +# Timeout in seconds for AI provider response +# Default: 300 (5 minutes) +# Increase for large changesets or slow connections +TIMEOUT="300" + +# Base branch for --pr-mode (auto-detects main/master/develop if empty) +# Default: auto-detect +# PR_BASE_BRANCH="main" diff --git a/lib/pantallas/pantalla_crear_partida.dart b/lib/pantallas/pantalla_crear_partida.dart index 93c9a48..37e4d61 100644 --- a/lib/pantallas/pantalla_crear_partida.dart +++ b/lib/pantallas/pantalla_crear_partida.dart @@ -230,7 +230,7 @@ class _PantallaCrearPartidaState extends State { mainAxisSize: MainAxisSize.min, children: [ DropdownButtonFormField( - value: seleccionado, + initialValue: seleccionado, decoration: InputDecoration( prefixIcon: const Icon(Icons.person), hintText: l10n.selectProfile, diff --git a/lib/pantallas/pantalla_lobby_host.dart b/lib/pantallas/pantalla_lobby_host.dart index 2c2930a..3e716d8 100644 --- a/lib/pantallas/pantalla_lobby_host.dart +++ b/lib/pantallas/pantalla_lobby_host.dart @@ -81,7 +81,7 @@ class _PantallaLobbyHostState extends State { ), const SizedBox(height: 12), DropdownButtonFormField( - value: _perfilSeleccionado, + initialValue: _perfilSeleccionado, decoration: InputDecoration( prefixIcon: const Icon(Icons.person), hintText: l10n.selectProfile, diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..ce01362 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +hello diff --git a/test/estado_juego_crear_partida_host_test.dart b/test/estado_juego_crear_partida_host_test.dart index 828e33d..1028316 100644 --- a/test/estado_juego_crear_partida_host_test.dart +++ b/test/estado_juego_crear_partida_host_test.dart @@ -1,6 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:farolero/estado/estado_juego.dart'; -import 'package:farolero/modelos/palabra.dart'; import 'package:farolero/modelos/partida.dart'; void main() { diff --git a/test/estado_juego_host_local_test.dart b/test/estado_juego_host_local_test.dart index 9a85fb3..23d5b65 100644 --- a/test/estado_juego_host_local_test.dart +++ b/test/estado_juego_host_local_test.dart @@ -1,4 +1,3 @@ -import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:farolero/estado/estado_juego.dart'; diff --git a/test/servicio_nearby_user_pool_test.dart b/test/servicio_nearby_user_pool_test.dart index e640715..a87bd43 100644 --- a/test/servicio_nearby_user_pool_test.dart +++ b/test/servicio_nearby_user_pool_test.dart @@ -1,4 +1,3 @@ -import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:farolero/modelos/usuario.dart'; import 'package:farolero/servicios/servicio_nearby.dart'; -- 2.49.1