# Project-Specific Agent Instructions

These instructions extend the baseline global `AGENTS.md` rules. When executing tasks inside this repository directory, apply the following patterns:

---

## 1. Operating Mode & Token Optimization

### 1.1. Caveman Mode (Lite)
* Enforce **`caveman` skill on `lite`** level.
* Keep responses professional, precise, and tight.
* Eliminate all pleasantries ("sure", "certainly", "of course"), hedging, and filler words.
* Write full sentences and preserve articles/grammar structure to prevent MCP tool calling confusion, but maintain strict brevity.

### 1.2. Rust Token Killer (RTK) Command Proxying
* To conserve input tokens, all shell command executions must be proxied through **`rtk`** if it is installed on the host.
* Examples:
  * Run `rtk npm run test` instead of `npm run test`
  * Run `rtk git status` instead of `git status`
  * Run `rtk prisma migrate dev` instead of `prisma migrate dev`
* You must only use the normal version of the program only after verifying the **`rtk`** version fails.

---

## 2. MCP-Specific Guidelines

### 2.1. n8n MCP Integration (`n8n-mcp`)
* **Silent Execution**: Execute n8n tools without step-by-step commentary. Trigger all searches or node detail fetches silently, and only output user-facing results after all tool steps complete.
* **Parallel Execution**: Execute independent node searches or workflow executions in parallel to optimize token roundtrips.

### 2.2. Forgejo MCP Integration (`forgejo-mcp` / `gitea-mcp`)
* **PR Integrity**: Always query the pull request details and code reviews using `forgejo-mcp` tools before running local Git merge commands or updating staging branches.
* **Traceable Commits**: Align commit descriptions with issue references queried from the Forgejo instance.

### 2.3. Prisma & PostgreSQL MCP Integration (`@prisma/mcp`)
* **Schema Validation**: Introspect database structures and validate table states via MCP query tools prior to executing Next.js prisma schema updates.
* **Type-Safety Checks**: Run dry-run checks on schemas after any migrations are applied.

---

## 3. Harness: remuneration-plugin
* **Goal**: Orchestrates the multi-agent team (planner, calculator, qa-auditor) for the Variable Remuneration, Compensation, and Commissions system of Hoteles Estelar.
* **Trigger**: When requests relate to Variable Remuneration, Compensation, or Commission calculation or verification, utilize the `remuneration-orchestrator` skill to delegate tasks to subagents.
* **Changelog**:
  | Date | Change | Target | Reason |
  | :--- | :--- | :--- | :--- |
  | 2026-06-11 | Initial scaffolding | All files | Initial team setup |
  | 2026-06-12 | Implement i18n & bilingual AI audit notes | n8n, Prisma, E2E tests, agents config | Support multilingual UI rendering and LLM translations |
  | 2026-06-12 | Synchronize harness skills | remuneration-plugin skills & orchestrator | Align skills with sequential orchestrator template, i18n bilingual JSON requirements, zero-trust hostnames, webhook branching, and RLS validation checks |

