chore: bootstrap rdb-discovery

This commit is contained in:
2026-06-01 17:43:02 +01:00
commit dede6ecc60
45 changed files with 2101 additions and 0 deletions
+269
View File
@@ -0,0 +1,269 @@
# `/context/agent-guidelines.md`
# Agent Operating Guidelines
This file defines how AI coding agents should behave when working on RDB Solutions Ltd projects.
These rules apply to:
- OpenHands
- Claude Code
- Cursor Agents
- Copilot Agents
- Local coding agents
- Future autonomous development systems
---
# Core Rule
Make the smallest useful change possible.
Agents should favour many small successful changes over large risky changes.
---
# Before Starting Work
Agents should first read:
```text
/context/company-context.md
/context/infrastructure-context.md
/context/development-context.md
README.md
ARCHITECTURE.md
TASKS.md
```
If these files exist.
---
# Task Execution Model
Work should be completed using backlog items.
Recommended process:
1. Select task
2. Understand task
3. Implement task
4. Test task
5. Document task
6. Commit task
7. Move to next task
Avoid combining unrelated tasks.
---
# Safe Change Policy
Agents should:
✅ Add functionality
✅ Fix defects
✅ Improve documentation
✅ Add tests
✅ Refactor locally
Agents should not:
❌ Rewrite entire systems
❌ Replace frameworks
❌ Change infrastructure architecture
❌ Change deployment methods
❌ Delete large amounts of code
Without explicit approval.
---
# Code Generation Standards
Generated code should:
- Be readable
- Be maintainable
- Follow existing project patterns
- Include error handling
- Include logging where appropriate
Avoid:
- Clever code
- Unnecessary abstractions
- Premature optimisation
---
# Infrastructure Changes
Infrastructure changes require higher scrutiny.
Examples:
- Jenkins
- Gitea
- Supabase
- Reverse proxies
- DNS
- Production deployments
For infrastructure work:
1. Explain proposed change
2. Explain risk
3. Explain rollback
4. Generate implementation plan
Do not execute destructive changes automatically.
---
# Git Rules
Preferred workflow:
```text
Create branch
Make change
Run tests
Commit
Create PR
```
Commit frequently.
Commit messages should be descriptive.
---
# Testing Requirements
Where practical:
- Unit tests
- Integration tests
- Build validation
Agents should never claim testing was performed if it was not.
Use:
```text
Verified
```
Only when actually verified.
Use:
```text
Not tested
```
When testing was not possible.
---
# Documentation Requirements
If behaviour changes:
Update:
- README
- Architecture docs
- API docs
- Task status
where applicable.
Documentation is part of the task.
---
# Autonomous Work Limits
Agents may autonomously:
- Create files
- Modify files
- Add tests
- Add documentation
- Refactor small areas
Agents should request approval before:
- Deleting files
- Deleting databases
- Deploying to production
- Changing authentication
- Changing networking
- Modifying CI/CD pipelines
---
# Preferred Deliverables
When completing work, agents should provide:
## Summary
What was changed.
## Files Modified
List of modified files.
## Validation
Tests executed and results.
## Risks
Potential side effects.
## Next Recommended Task
Small logical follow-up task.
---
# RDB-Specific Preferences
Remember:
- Gitea over GitHub
- Jenkins over cloud CI systems
- Docker preferred
- Proxmox preferred
- Local LLMs preferred
- Self-hosted services preferred
- Incremental change preferred
Do not recommend cloud replacements unless there is a significant advantage.
---
# Success Criteria
A task is complete when:
- Requirements are met
- Tests pass
- Documentation is updated
- Changes are understandable
- Rollback is possible
Optimise for maintainability and long-term ownership rather than speed alone.
View File
View File
+40
View File
@@ -0,0 +1,40 @@
# `/context/company-context.md`
# RDB Solutions Ltd Context
RDB Solutions Ltd is developing internal and customer-facing software systems with a strong preference for self-hosted infrastructure, local control, and practical automation.
The company favours owning its development stack rather than depending heavily on third-party SaaS platforms where avoidable.
## Goals
The main goals are:
- Improve development efficiency
- Use local and self-hosted tools where practical
- Automate repetitive development and deployment tasks
- Support LLM-assisted development
- Maintain control over source code, infrastructure, and data
- Build systems that are maintainable by a small team or solo developer
## Preferred Approach
RDB Solutions Ltd prefers:
- Self-hosted Git using Gitea
- Jenkins for CI/CD
- Docker-based deployments
- Proxmox for virtualisation
- Local LLMs where possible
- Clear task files and backlog-driven agent work
- Incremental changes over large risky rewrites
- Documentation that allows AI tools to understand the system quickly
## General Constraints
- Avoid assuming GitHub is used.
- Prefer Gitea-compatible workflows.
- Prefer local or self-hosted services where practical.
- Avoid vendor lock-in unless there is a clear benefit.
- Keep systems understandable and maintainable.
- Prefer simple architecture before complex orchestration.
+542
View File
@@ -0,0 +1,542 @@
# `/context/current-environment.md`
# Current Environment
Last Updated: 2026-06-01
This file describes the current live RDB Solutions infrastructure.
Update whenever hardware, VMs, services, networking, or development tooling changes.
---
# Network Overview
## Primary Site
Location:
- <Office/Home Lab>
Internet:
- ISP: Lightening Fibre
- Download: 2.5 Gbps
- Router: Zyxel EX5601-T0
- Internal Wifi Extender: Deco
- Static IP: 212.221.168.135
Domain(s):
- rdbsolutions.co.uk
- gitea.rdbcloud.co.uk
- prox.rdbcloud.co.uk
- pedw.rdbcloud.co.uk
Internal Network:
```text
LAN: 192.168.x.0/24
Gateway: 192.168.x.1
DNS: AdGuard
DHCP: <device>
```
---
# Physical Infrastructure
## Proxmox Host
Hostname:
- proxmox01
Purpose:
- Primary virtualisation host
Hardware:
CPU:
- <model>
RAM:
- 16 GB
Storage:
- <details>
Network:
- <IP>
Notes:
- Hosts infrastructure VMs and LXCs
- Main internal services
---
## AI / Ollama Server
Hostname:
- rdbUltra
Purpose:
- Local LLM hosting
Hardware:
CPU:
- Intel I9
RAM:
- 32 GB
GPU:
- RTX 5070 Ti
- 16 GB VRAM
Network:
- 192.168.1.111
Services:
- Ollama
Models Installed:
- Qwen3
- Qwen Coder
- <others>
Endpoints:
```text
http://<ip>:11434
```
---
## Development Workstation
Hostname:
- rdbmacbook
Type:
- Intel MacBook Pro
Purpose:
- Main software development workstation
Installed Tools:
- VS Code
- Claude Code
- Docker
- Git
- SSH
---
## OpenWebUI Host
Hostname:
- rdboffice
Purpose:
- Browser-based LLM interface
Connected To:
- Ollama Server
URL:
```text
https://ai.rdbcloud.co.uk
```
---
# Virtual Machines
## VM Inventory
| VM Name | Purpose | CPU | RAM | IP |
| ---------- | -------- | --- | ---- | ------- |
| supabase01 | Database | 4 | 8 GB | x.x.x.x |
---
# LXC Containers
## Container Inventory
| IP | LXC Name | Proxmox ID | RAM |
|------------------------------------------------------------------------------------
| 192.168.68.100 | adguard | 100 (LXC) | 512 MB
| 192.168.68.102 | gitea | 104 (LXC) | 1.00 GB
| 192.168.68.79 | nginxproxymanager | 105 (LXC) | 1.00 GB
| 192.168.68.90 | jenkins | 106 (LXC) | 2.00 GB
---
# Infrastructure Services
## AdGuard
Purpose:
- DNS
- Ad Blocking
URL:
```text
http://adguard.lan
```
Host:
- adguard01
Port:
- 3000
---
## Gitea
Purpose:
- Git repositories
- Source control
URL:
```text
https://gitea.rdbcloud.co.uk
```
Host:
- https://gitea.rdbcloud.co.uk
Version:
- v1.25.0
Repositories:
- RC Compatibility App
- RDB Mobile App
- Infrastructure
- robbond/pedwFrontend
- robbond/proxmox-monitor
- robbond/pleskSaas
- robbond/pedwV2
- robbond/rc-compat
- robbond/gacapi
---
## Jenkins
Purpose:
- CI/CD
URL:
```text
http://jenkins.lan:8080
```
Host:
- jenkins.lan
Jobs:
- RC Compatibility Build
- Mobile App Build
- Docker Deployments
- PEDW testing pipeline
---
## Supabase
Purpose:
- PostgreSQL
- Authentication
- Storage
Host:
- supabase01
Environment:
- Self-hosted
Database Version:
- PostgreSQL xx
---
## Nginx Proxy Manager
Purpose:
- Reverse Proxy
- SSL
Host:
- npm01
Managed Hosts:
| Hostname | Target |
| ------------------------- | -------------------------- |
| \*.coolify.rdbcloud.co.uk | https://192.168.68.115:443 |
| ai.rdbcloud.co.uk | http://192.168.68.97:3001 |
| coolify.rdbcloud.co.uk | http://192.168.68.115:8001 |
| gitea.rdbcloud.co.uk | http://192.168.68.102:3000 |
| gitmcp.rdbcloud.co.uk | http://192.168.68.180:8080 |
| ha.rdbcloud.co.uk | http://192.168.68.96:8123 |
| jellyfin.rdbcloud.co.uk | http://192.168.68.101:8096 |
| nextcloud.rdbcloud.co.uk | http://192.168.68.55:80 |
| pedw.rdbcloud.co.uk | http://192.168.68.109:3000 |
| portal.rdbcloud.co.uk | http://192.168.68.116:3000 |
| prox.rdbcloud.co.uk | https://192.168.68.70:8006 |
| supabase.rdbcloud.co.uk | http://192.168.68.115:8000 |
---
# Development Stack
## Source Control
Primary:
- Gitea
Workflow:
```text
Developer
Feature Branch
Commit
Pull Request
Merge
```
---
## CI/CD
Primary:
- Jenkins
Build Flow:
```text
Gitea
Jenkins
Tests
Docker Build
Deploy
```
---
## Containers
Runtime:
- Docker
- Docker Compose
Container Registry:
- <local registry>
- Docker Hub
- Gitea Registry
---
# AI Development Environment
## Local Models
| Model | Purpose |
| ----------------- | ------- |
| Qwen3.6:35b-a3b | Coding |
| Qwen2.5-coder:14b | Coding |
---
## Agent Platforms
Installed:
- OpenWebUI
- Claude Code
- Cline in VScode
Planned:
- OpenHands
---
## OpenHands
Status:
- Planned / Testing / Production
Location:
- VM / LXC / Docker
Resources:
CPU:
- x
RAM:
- x GB
Connected Systems:
- Gitea
- Jenkins
- Ollama
---
# Security
## Secrets Storage
Current Method:
- <method>
Preferred Future:
- Vault
- 1Password
- Bitwarden
- Environment Variables
---
## Backup Strategy
Infrastructure:
- Proxmox backups
- VM snapshots
Repositories:
- Gitea backups
Databases:
- PostgreSQL backups
Frequency:
- Daily
- Weekly
- Monthly
---
# Monitoring
Current Tools:
- <tool>
Metrics:
- Host health
- VM health
- Disk usage
- Jenkins status
- Database health
---
# Known Constraints
Current Limitations:
1. Proxmox host has 16 GB RAM
2. AI server has single GPU
3. Limited staging environment
4. <additional constraints>
---
# Improvement Opportunities
Potential Future Enhancements:
- Dedicated monitoring stack
- Centralised logging
- Local container registry
- OpenHands integration
- Automated deployment pipelines
- Infrastructure-as-Code
- Agent task orchestration
---
# Notes For AI Agents
When making recommendations:
- Prefer self-hosted solutions
- Prefer Gitea integrations
- Prefer Jenkins automation
- Prefer Docker deployments
- Consider current RAM limitations
- Assume Ollama is available locally
- Assume local AI workflows are preferred over cloud alternatives
View File
+294
View File
@@ -0,0 +1,294 @@
# `/context/development-context.md`
# Development Environment Context
This document describes the preferred development workflow, tools, standards, and technology choices used by RDB Solutions Ltd.
AI coding assistants, IDE agents, and autonomous development tools should read this file before making recommendations or changes.
---
# Primary Development Workstation
## MacBook Pro (Intel)
Primary software development machine.
Typical activities:
- Application development
- Repository management
- Code reviews
- Testing
- Infrastructure administration
- LLM-assisted development
---
# Source Control
## Gitea
Primary Git platform.
Preferences:
- Gitea is the source of truth.
- Do not assume GitHub is available.
- Do not recommend GitHub-specific workflows unless explicitly requested.
- Pull Requests should be used for significant changes.
- Commit messages should be clear and descriptive.
Preferred commit style:
```text
feat: add VM status endpoint
fix: correct Jenkins deployment script
docs: update infrastructure documentation
```
---
# CI/CD
## Jenkins
Primary automation platform.
Current and future responsibilities:
- Build applications
- Run tests
- Build Docker images
- Deploy services
- Run scheduled maintenance tasks
- Execute agent-generated work after review
Preferred pipeline behaviour:
1. Pull code from Gitea
2. Run validation
3. Run tests
4. Build artefacts
5. Deploy to target environment
Agents should favour Jenkins automation over manual deployment procedures.
---
# Containerisation
## Docker
Preferred deployment format.
Goals:
- Consistent environments
- Easier deployment
- Simpler rollback
- Portable services
When proposing software:
Prefer:
- Docker Compose
- Single-container deployments
- Simple architecture
Avoid:
- Kubernetes unless there is a clear requirement.
---
# Database Platforms
## PostgreSQL
Preferred database platform.
Current implementation:
- Supabase-hosted PostgreSQL
Preferred characteristics:
- Relational data model
- Strong typing
- Auditable schema changes
---
# IDEs and Editors
Current tools may include:
- VS Code
- Cursor
- Claude Code
- OpenWebUI
- Browser-based assistants
Recommendations should remain editor-agnostic where possible.
---
# Local LLM Infrastructure
## Ollama
Primary local inference platform.
Purpose:
- Local coding assistance
- Experimentation
- Agent backends
- Development support
## Available Hardware
LLM Server:
- RTX 5070 Ti
- 16 GB VRAM
- 32 GB RAM
Agents should assume local inference is available.
---
# Preferred Models
Potential models include:
- Qwen Coder
- Qwen3
- DeepSeek Coder
- Future coding-focused local models
Model selection should prioritise:
1. Code quality
2. Reasoning ability
3. Low operational cost
4. Local execution
---
# AI-Assisted Development
RDB actively uses AI-assisted development.
Expected uses:
- Code generation
- Refactoring
- Documentation
- Testing
- Architecture review
- Infrastructure planning
Agents should produce:
- Small reviewable changes
- Clear reasoning
- Minimal surprises
Avoid:
- Massive rewrites
- Unrequested architecture changes
- Hidden behaviour
---
# Task Management
Preferred approach:
Backlog-driven development.
Work should be decomposed into:
- Small tasks
- Independent tasks
- Reviewable tasks
Good example:
```text
TASK-001
Create API endpoint for VM status
TASK-002
Add frontend status widget
TASK-003
Write integration tests
```
Avoid:
```text
Rewrite the entire application
```
---
# Documentation Standards
Projects should contain:
```text
README.md
TASKS.md
ARCHITECTURE.md
CHANGELOG.md
/context/
```
Documentation should always be updated when functionality changes.
---
# Deployment Philosophy
Preferred order:
Development
→ Test
→ Staging
→ Production
Production deployments should be repeatable and automated.
Avoid:
- Manual server modifications
- Untracked configuration changes
- Snowflake servers
---
# Development Principles
Prefer:
- Simplicity
- Maintainability
- Incremental improvements
- Clear documentation
- Automation
- Reproducibility
Avoid:
- Unnecessary complexity
- Vendor lock-in
- Excessive dependencies
- Platform-specific assumptions
View File
+193
View File
@@ -0,0 +1,193 @@
# `/context/infrastructure-context.md`
# RDB Solutions Ltd Infrastructure Context
## Physical Machines
### Proxmox Server
Purpose:
- Main virtualisation host
- Runs infrastructure services and VMs/LXCs
Current known services:
- AdGuard
- Jenkins
- Nginx Proxy Manager
- Supabase VM
- Potential future OpenHands runner
Current constraint:
- Proxmox host currently has 16 GB RAM, so resource allocation should be conservative.
Preferred usage:
- Infrastructure services
- CI/CD
- Reverse proxy
- Databases
- Lightweight agent runners
- Isolated test environments
### LLM / Ollama Machine
Hardware:
- NVIDIA RTX 5070 Ti with 16 GB VRAM
- 32 GB RAM
Purpose:
- Hosts Ollama
- Runs local LLMs such as Qwen
- Provides local model inference for development assistants and agent tooling
Preferred usage:
- Local coding models
- Agent backend model provider
- OpenWebUI integration
- Possible API endpoint for tools like Claude Code-compatible wrappers or OpenHands
### MacBook Pro Intel
Purpose:
- Main development workstation
Preferred usage:
- IDE work
- Local coding
- Git commits
- Testing frontend/mobile apps
- Managing repositories and project files
### Mini PC
Purpose:
- Hosts OpenWebUI
- Points to the Ollama machine for local LLM access
Preferred usage:
- Browser-based LLM interface
- Local AI assistant access
- Shared AI UI across the network
## Virtual Machines and Containers
### Jenkins
Purpose:
- CI/CD automation
- Build pipelines
- Test execution
- Deployment workflows
Preferred future use:
- Pull code from Gitea
- Build Docker images
- Run tests
- Deploy to hosted or self-hosted targets
### Gitea
Purpose:
- Self-hosted Git server
- Source code control
- Replacement for Bitbucket/GitHub where possible
Preferences:
- Use Gitea as the source of truth
- Avoid GitHub-specific assumptions
- Use issues, milestones, and pull requests where useful
### Supabase VM
Purpose:
- Database backend
- Postgres services
- Possible authentication/storage/API support depending on project needs
Preferred use:
- Application database
- Internal APIs
- Development/staging database
- Storage where suitable
### Nginx Proxy Manager
Purpose:
- Reverse proxy
- SSL termination
- Routing internal services to friendly hostnames
Preferred use:
- Route apps and tools through internal domains
- Manage certificates
- Avoid exposing unnecessary services directly
### AdGuard
Purpose:
- DNS filtering
- Local DNS support
- Network-wide ad/tracker blocking
Potential use:
- Internal DNS names for services
- Easier access to tools like Gitea, Jenkins, OpenWebUI, Supabase, etc.
## LLM and Agent Architecture
RDB Solutions Ltd is interested in using local LLMs and coding agents to improve productivity.
Candidate tools:
- Ollama
- Qwen models
- OpenWebUI
- OpenHands
- Claude Code-style workflows pointed at local models where possible
- IDE assistants
- Task/backlog-driven development agents
Important preference:
- Agents should work from clear task files, context files, and isolated environments.
- Agents should not make broad uncontrolled changes.
- Agents should be able to run in a VM, LXC, or Docker container depending on risk level.
## Recommended Isolation Model
For autonomous coding agents:
Preferred:
- Dedicated VM or LXC on Proxmox
- Access only to required repositories
- Limited credentials
- Network access restricted where possible
- Disposable working directories
- Git-based review before merge
Avoid:
- Giving agents unrestricted access to the main development machine
- Giving agents broad production credentials
- Allowing agents to directly deploy without review
View File
View File
+31
View File
@@ -0,0 +1,31 @@
Repository Context
Git Server:
https://gitea.rdbcloud.co.uk
Repository:
rdb-discovery
Primary Workflow:
Feature Branch
→ Commit
→ Pull Request
→ Merge
Branch Naming:
feature/TASK-001
fix/TASK-001
docs/TASK-001
Commit Format:
feat: add command
fix: correct behaviour
docs: update documentation
test: add tests
chore: project maintenance
View File