docs: add Hermes Agent guide to AI_DEVELOPER_WORKSTATION.md
- Add Section 3 documenting Hermes model routing (deepseek-chat / deepseek-v4-pro) - Add Section 3.2 with 5 project-specific skills (hotel-project-map, hotel-remuneration-orchestrator, hotel-seeding-testing, hotel-rls-verification, hotel-n8n-deployment) - Add Section 3.3-3.6 covering AGENTS.md, MCP servers, cron test runner, and .hermes/ plans directory - Add Section 3.7 quick-reference table for all common commands - Update AGENTS.md to reference Hermes skills instead of inline orchestration, add worktree mode guidance - Bump AGENTS.md changelog for migration date
This commit is contained in:
parent
8deb8e70a1
commit
b2fdf9575d
2 changed files with 177 additions and 15 deletions
52
AGENTS.md
52
AGENTS.md
|
|
@ -1,6 +1,6 @@
|
||||||
# Project-Specific Agent Instructions
|
# Project-Specific Agent Instructions
|
||||||
|
|
||||||
These instructions extend the baseline global `AGENTS.md` rules. When executing tasks inside this repository directory, apply the following patterns:
|
These instructions extend the baseline global `AGENTS.md` rules. When executing tasks inside this repository directory, apply the following patterns.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -38,13 +38,57 @@ These instructions extend the baseline global `AGENTS.md` rules. When executing
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 3. Harness: remuneration-plugin
|
## 3. Hermes Skills (Preferred Method)
|
||||||
|
|
||||||
|
This project has dedicated Hermes skills for domain tasks. **Load these with `skill_view(name)` instead of describing the task inline** — they contain exact commands, pitfalls, and edge cases. Skills auto-load when you work from this directory via a cron job or new Hermes session.
|
||||||
|
|
||||||
|
### Available Skills
|
||||||
|
|
||||||
|
| Skill | When to Load |
|
||||||
|
|-------|-------------|
|
||||||
|
| `hotel-project-map` | Start of any session — structural context (schema, routes, pages, deps) |
|
||||||
|
| `hotel-remuneration-orchestrator` | Compensation calculations, settlement audits, formula planning |
|
||||||
|
| `hotel-seeding-testing` | Database seeding, running tests, debugging failures |
|
||||||
|
| `hotel-rls-verification` | Row-level security testing, role isolation, auth policies |
|
||||||
|
| `hotel-n8n-deployment` | n8n workflow bootstrap, verification, troubleshooting |
|
||||||
|
|
||||||
|
### Loading Order
|
||||||
|
|
||||||
|
For most tasks:
|
||||||
|
1. `skill_view(name="hotel-project-map")` for context
|
||||||
|
2. `skill_view(name="hotel-<relevant-skill>")` for the domain task
|
||||||
|
|
||||||
|
For remuneration orchestration (complex multi-agent):
|
||||||
|
1. `skill_view(name="hotel-project-map")`
|
||||||
|
2. `skill_view(name="hotel-remuneration-orchestrator")`
|
||||||
|
3. Optionally load `hotel-rls-verification` or `hotel-seeding-testing` if needed
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Git Worktree Mode (Parallel Agents)
|
||||||
|
|
||||||
|
When running multiple Hermes sessions editing this project simultaneously, use worktree mode to avoid git conflicts:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
hermes -w # Start in isolated worktree
|
||||||
|
```
|
||||||
|
|
||||||
|
Each worktree agent edits its own copy. Merge manually or via PR when done.
|
||||||
|
|
||||||
|
To check active worktrees:
|
||||||
|
```bash
|
||||||
|
rtk git worktree list
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Harness: remuneration-plugin
|
||||||
* **Goal**: Orchestrates the multi-agent team (planner, calculator, qa-auditor) for the Variable Remuneration, Compensation, and Commissions system of Hoteles Estelar.
|
* **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.
|
* **Trigger**: When requests relate to Variable Remuneration, Compensation, or Commission calculation or verification, utilize the `hotel-remuneration-orchestrator` skill to delegate tasks to subagents.
|
||||||
* **Changelog**:
|
* **Changelog**:
|
||||||
| Date | Change | Target | Reason |
|
| Date | Change | Target | Reason |
|
||||||
| :--- | :--- | :--- | :--- |
|
| :--- | :--- | :--- | :--- |
|
||||||
| 2026-06-11 | Initial scaffolding | All files | Initial team setup |
|
| 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 | 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 |
|
| 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 |
|
||||||
|
| 2026-06-14 | Migrated to Hermes skills | AGENTS.md, skills/ | Replaced inline orchestration with hotel-* Hermes skills for portability and token efficiency |
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
This document outlines the environment configurations (Development vs. Production), active API keys, and recommended AI integration tools (like Model Context Protocol servers) designed to optimize this workspace for AI agents (such as Antigravity-cli / agy) and human developers alike.
|
This document outlines the environment configurations (Development vs. Production), active API keys, and recommended AI integration tools (like Model Context Protocol servers) designed to optimize this workspace for AI agents and human developers alike.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -19,13 +19,13 @@ This file configs connection parameters for both production (`app-prod`) and dev
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Database Setup (Fallback / Local Development)
|
# Database Setup (Fallback / Local Development)
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
DATABASE_URL="postgresql://special_hotel_user:SpecialHotel1235%2F%2A-%2B@pg.gaboggamer.online/special_hotel_dev?schema=public"
|
DATABASE_URL="postgresql://special_hotel_user:***@pg.gaboggamer.online/special_hotel_dev?schema=public"
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Production Stack Environment Variables (for Docker Compose app-prod)
|
# Production Stack Environment Variables (for Docker Compose app-prod)
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Connection string pointing to the production PostgreSQL instance
|
# Connection string pointing to the production PostgreSQL instance
|
||||||
DATABASE_URL_PROD="postgresql://special_hotel_user:SpecialHotel1235%2F%2A-%2B@pg.gaboggamer.online/special_hotel?schema=public"
|
DATABASE_URL_PROD="postgresql://special_hotel_user:***@pg.gaboggamer.online/special_hotel?schema=public"
|
||||||
|
|
||||||
# Production domain resolved by the Caddy reverse proxy
|
# Production domain resolved by the Caddy reverse proxy
|
||||||
NEXT_PUBLIC_APP_URL="https://hotels.gaboggamer.online"
|
NEXT_PUBLIC_APP_URL="https://hotels.gaboggamer.online"
|
||||||
|
|
@ -46,10 +46,10 @@ APP_PROD_INTERNAL_URL="http://special-hotel-prod:3000"
|
||||||
# Development Stack Environment Variables (for Docker Compose app-dev)
|
# Development Stack Environment Variables (for Docker Compose app-dev)
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Connection string pointing to the development PostgreSQL instance
|
# Connection string pointing to the development PostgreSQL instance
|
||||||
DATABASE_URL_DEV="postgresql://special_hotel_user:SpecialHotel1235%2F%2A-%2B@pg.gaboggamer.online/special_hotel_dev?schema=public"
|
DATABASE_URL_DEV="postgresql://special_hotel_user:***@pg.gaboggamer.online/special_hotel_dev?schema=public"
|
||||||
|
|
||||||
# Dedicated connection string for the isolated test/sandbox database
|
# Dedicated connection string for the isolated test/sandbox database
|
||||||
TEST_DATABASE_URL="postgresql://special_hotel_user:SpecialHotel1235%2F%2A-%2B@pg.gaboggamer.online/special_hotel_test?schema=public"
|
TEST_DATABASE_URL="postgresql://special_hotel_user:***@pg.gaboggamer.online/special_hotel_test?schema=public"
|
||||||
|
|
||||||
# Local host address for development
|
# Local host address for development
|
||||||
NEXT_PUBLIC_APP_URL_DEV="http://localhost:3001"
|
NEXT_PUBLIC_APP_URL_DEV="http://localhost:3001"
|
||||||
|
|
@ -99,7 +99,7 @@ Exposes tools allowing `agy` to interact with the database using type-safe schem
|
||||||
"command": "npx",
|
"command": "npx",
|
||||||
"args": ["-y", "@prisma/mcp"],
|
"args": ["-y", "@prisma/mcp"],
|
||||||
"env": {
|
"env": {
|
||||||
"DATABASE_URL": "postgresql://special_hotel_user:SpecialHotel1235%2F%2A-%2B@pg.gaboggamer.online/special_hotel_dev?schema=public"
|
"DATABASE_URL": "postgresql://special_hotel_user:***@pg.gaboggamer.online/special_hotel_dev?schema=public"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
@ -111,7 +111,7 @@ Provides raw PostgreSQL connection and querying tools.
|
||||||
```json
|
```json
|
||||||
"postgres": {
|
"postgres": {
|
||||||
"command": "npx",
|
"command": "npx",
|
||||||
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://special_hotel_user:SpecialHotel1235%2F%2A-%2B@pg.gaboggamer.online/special_hotel_dev"]
|
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://special_hotel_user:***@pg.gaboggamer.online/special_hotel_dev"]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -139,11 +139,129 @@ Exposes browser automation tools (take screenshots, click, type, fill forms).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 3. Testing Procedures & Webhook Testing Flow
|
## 3. Hermes Agent Integration
|
||||||
|
|
||||||
|
[Hermes Agent](https://hermes-agent.nousresearch.com) is the primary AI agent used for development on this project alongside Antigravity. It runs locally with full tool access and has been configured with project-specific skills, model routing, and automated testing.
|
||||||
|
|
||||||
|
### 3.1. Model Routing
|
||||||
|
|
||||||
|
Hermes uses a two-tier model setup to save cost while keeping heavy tasks powerful:
|
||||||
|
|
||||||
|
| Mode | Model | Purpose |
|
||||||
|
|------|-------|---------|
|
||||||
|
| Main chat | `deepseek-chat` (fast, cheap) | Normal conversation, file edits, simple queries |
|
||||||
|
| Delegation | `deepseek-v4-pro` (powerful) | Complex debugging, code review, research, multi-step tasks |
|
||||||
|
|
||||||
|
**How it works**: When Hermes needs to do something complex, it spawns a subagent via `delegate_task`. That subagent automatically gets the pro model. Your normal chat stays fast and cheap. Configured in `~/.hermes/config.yaml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
model:
|
||||||
|
default: deepseek-chat
|
||||||
|
provider: deepseek
|
||||||
|
delegation:
|
||||||
|
model: deepseek-v4-pro
|
||||||
|
provider: deepseek
|
||||||
|
```
|
||||||
|
|
||||||
|
To manually switch models mid-session: `/model deepseek-v4-pro` or `/model deepseek-chat`.
|
||||||
|
|
||||||
|
### 3.2. Project-Specific Hermes Skills
|
||||||
|
|
||||||
|
Five Hermes skills have been created for this project. They live at `~/.hermes/skills/software-development/` and are loaded on demand with `skill_view(name="skill-name")`.
|
||||||
|
|
||||||
|
| Skill | Load With | Purpose |
|
||||||
|
|-------|-----------|---------|
|
||||||
|
| `hotel-project-map` | Any session start | Full structural index: schema models, API routes, pages, deps, key libs |
|
||||||
|
| `hotel-remuneration-orchestrator` | Compensation/commission tasks | 3-agent orchestrator (planner → calculator → QA auditor) |
|
||||||
|
| `hotel-seeding-testing` | Before tests or seeding | Exact commands for dev/test DB seed, individual tests, full suite |
|
||||||
|
| `hotel-rls-verification` | RLS / auth work | Role isolation testing scripts, manual verification queries |
|
||||||
|
| `hotel-n8n-deployment` | n8n workflow work | Bootstrap scripts, workflow JSONs, verification test |
|
||||||
|
|
||||||
|
**Recommended loading order for a new session:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
hermes -s hotel-project-map,hotel-remuneration-orchestrator
|
||||||
|
```
|
||||||
|
|
||||||
|
Or inside an existing session:
|
||||||
|
|
||||||
|
```
|
||||||
|
/skill hotel-project-map
|
||||||
|
/skill hotel-remuneration-orchestrator
|
||||||
|
```
|
||||||
|
|
||||||
|
The skills contain exact commands, edge cases, and pitfalls so you (or the agent) don't rediscover them.
|
||||||
|
|
||||||
|
### 3.3. AGENTS.md
|
||||||
|
|
||||||
|
The file `AGENTS.md` at the project root is loaded automatically when Hermes works from this directory (either by launching from here or via a cron job with `workdir` set). It covers:
|
||||||
|
|
||||||
|
- **Caveman Mode (Lite)**: Professional, precise, no filler
|
||||||
|
- **RTK Command Proxying**: All shell commands proxied through `rtk` when available to reduce token consumption
|
||||||
|
- **MCP-specific guidelines**: n8n silent execution, Forgejo PR integrity, Prisma schema validation
|
||||||
|
- **Hermes skills reference**: The 5 skills above with loading guidance
|
||||||
|
- **Git Worktree Mode**: `hermes -w` for parallel agent sessions without conflicts
|
||||||
|
|
||||||
|
### 3.4. MCP Server Configuration
|
||||||
|
|
||||||
|
The MCP servers configured for Hermes are stored in `.agents/mcp_config.json`. These are the same MCP servers from Section 2 but registered for Hermes. Currently configured:
|
||||||
|
|
||||||
|
- **n8n** → `n8n-mcp` package, pointed at n8n.gaboggamer.online
|
||||||
|
- **Prisma** → `@prisma/mcp` for type-safe DB introspection
|
||||||
|
- **PostgreSQL** → direct `server-postgres` for raw queries
|
||||||
|
- **Git** → `mcp-git` pointed at the project directory
|
||||||
|
- **Puppeteer** → `@modelcontextprotocol/server-puppeteer` for browser automation
|
||||||
|
- **Forgejo** → `forgejo-mcp` for PR and issue management on git.gaboggamer.online
|
||||||
|
|
||||||
|
### 3.5. Automatic Test Runner (Cron)
|
||||||
|
|
||||||
|
A Hermes cron job runs the full test suite every 6 hours:
|
||||||
|
|
||||||
|
- **Job ID**: `dd941135c090`
|
||||||
|
- **Name**: `hotel-test-runner`
|
||||||
|
- **Schedule**: Every 6 hours
|
||||||
|
- **Workdir**: `/home/gabogg/Proyects/semillero-special-hotel` (loads AGENTS.md)
|
||||||
|
- **Skills loaded**: `hotel-seeding-testing`, `hotel-project-map`
|
||||||
|
- **Action**: Seed test DB → `rtk npm run test:all` → report pass/fail
|
||||||
|
|
||||||
|
Check status:
|
||||||
|
```bash
|
||||||
|
hermes cron list
|
||||||
|
```
|
||||||
|
|
||||||
|
The cron job delivers results to the same conversation. If all tests pass, it summarises. If any fail, it gives error details.
|
||||||
|
|
||||||
|
### 3.6. `.hermes/` Directory
|
||||||
|
|
||||||
|
The project contains a `.hermes/` directory:
|
||||||
|
- `.hermes/plans/` — stores Hermes plan files (used with the `plan` skill for executable markdown plans)
|
||||||
|
|
||||||
|
### 3.7. Quick Reference for Common Tasks
|
||||||
|
|
||||||
|
| Task | Command |
|
||||||
|
|------|---------|
|
||||||
|
| Seed dev DB | `rtk npm run db:seed` |
|
||||||
|
| Seed test DB | `rtk npm run db:seed-test` |
|
||||||
|
| Run all tests | `rtk npm run test:all` |
|
||||||
|
| Run RLS tests | `rtk node prisma/test-rls.js` |
|
||||||
|
| Run auth+RLS tests | `rtk node prisma/test-auth-rls.js` |
|
||||||
|
| Run UI tests | `rtk npm run test:ui` |
|
||||||
|
| Run n8n tests | `rtk node prisma/test-n8n-real.js` |
|
||||||
|
| Bootstrap n8n workflows | `rtk node scripts/n8n-bootstrap.js` |
|
||||||
|
| Load Hermes project map | `/skill hotel-project-map` in session |
|
||||||
|
| Load orchestrator | `/skill hotel-remuneration-orchestrator` |
|
||||||
|
| Load seeding/testing skill | `/skill hotel-seeding-testing` |
|
||||||
|
| Switch to pro model | `/model deepseek-v4-pro` |
|
||||||
|
| Start Hermes with skills | `hermes -s hotel-project-map` from project dir |
|
||||||
|
| Create a plan | Create `.hermes/plans/<name>.md` with actionable steps |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Testing Procedures & Webhook Testing Flow
|
||||||
|
|
||||||
Testing must occur in complete isolation from production data. We achieve this by splitting execution paths using dedicated test hooks in both Next.js and n8n.
|
Testing must occur in complete isolation from production data. We achieve this by splitting execution paths using dedicated test hooks in both Next.js and n8n.
|
||||||
|
|
||||||
### 3.1. Testing Scripts Command List
|
### 4.1. Testing Scripts Command List
|
||||||
Run these commands from the repository root using `pnpm` (or `npm` / `yarn`):
|
Run these commands from the repository root using `pnpm` (or `npm` / `yarn`):
|
||||||
* **Run Row-Level Security Tests**:
|
* **Run Row-Level Security Tests**:
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -170,7 +288,7 @@ Run these commands from the repository root using `pnpm` (or `npm` / `yarn`):
|
||||||
pnpm run test
|
pnpm run test
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3.2. n8n Testing Webhook Routing
|
### 4.2. n8n Testing Webhook Routing
|
||||||
All calculations triggered by test suites route to n8n via `/webhook-test` path segments:
|
All calculations triggered by test suites route to n8n via `/webhook-test` path segments:
|
||||||
1. **Trigger**: Test suite invokes n8n via `POST ${process.env.N8N_TEST_WEBHOOK_URL}/calculate-commissions`.
|
1. **Trigger**: Test suite invokes n8n via `POST ${process.env.N8N_TEST_WEBHOOK_URL}/calculate-commissions`.
|
||||||
2. **n8n Path Branching**:
|
2. **n8n Path Branching**:
|
||||||
|
|
@ -178,7 +296,7 @@ All calculations triggered by test suites route to n8n via `/webhook-test` path
|
||||||
- **True**: The n8n workspace connects to the database utilizing `TEST_DATABASE_URL` credentials. It pulls test sales/goals data and pushes calculations back to the Next.js dev API.
|
- **True**: The n8n workspace connects to the database utilizing `TEST_DATABASE_URL` credentials. It pulls test sales/goals data and pushes calculations back to the Next.js dev API.
|
||||||
- **False**: Connects to the main `DATABASE_URL` for production processing.
|
- **False**: Connects to the main `DATABASE_URL` for production processing.
|
||||||
|
|
||||||
### 3.3. Manual Integration Setup
|
### 4.3. Manual Integration Setup
|
||||||
To sync and seed the testing database structure:
|
To sync and seed the testing database structure:
|
||||||
1. Spin up both databases.
|
1. Spin up both databases.
|
||||||
2. Run database schema migrations on the test database:
|
2. Run database schema migrations on the test database:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue