[Config] Add coding guidelines and code-fixer agent
Major additions: - Add CODING_GUIDELINES.md with "NO EMOJIS" rule - Create code-fixer agent for automated violation fixes - Add offline mode v2 hooks with local caching/queue - Add periodic context save with invisible Task Scheduler setup - Add agent coordination rules and database connection docs Infrastructure: - Update hooks: task-complete-v2, user-prompt-submit-v2 - Add periodic_save_check.py for auto-save every 5min - Add PowerShell scripts: setup_periodic_save.ps1, update_to_invisible.ps1 - Add sync-contexts script for queue synchronization Documentation: - OFFLINE_MODE.md, PERIODIC_SAVE_INVISIBLE_SETUP.md - Migration procedures and verification docs - Fix flashing window guide Updates: - Update agent configs (backup, code-review, coding, database, gitea, testing) - Update claude.md with coding guidelines reference - Update .gitignore for new cache/queue directories Status: Pre-automated-fixer baseline commit Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
255
.claude/agents/DATABASE_CONNECTION_INFO.md
Normal file
255
.claude/agents/DATABASE_CONNECTION_INFO.md
Normal file
@@ -0,0 +1,255 @@
|
||||
# Database Connection Information
|
||||
**FOR ALL AGENTS - UPDATED 2026-01-17**
|
||||
|
||||
---
|
||||
|
||||
## Current Database Configuration
|
||||
|
||||
### Production Database (RMM Server)
|
||||
- **Host:** 172.16.3.30
|
||||
- **Port:** 3306
|
||||
- **Database:** claudetools
|
||||
- **User:** claudetools
|
||||
- **Password:** CT_e8fcd5a3952030a79ed6debae6c954ed
|
||||
- **Character Set:** utf8mb4
|
||||
- **Tables:** 43 tables (all migrated)
|
||||
|
||||
### Connection String
|
||||
```
|
||||
mysql+pymysql://claudetools:CT_e8fcd5a3952030a79ed6debae6c954ed@172.16.3.30:3306/claudetools?charset=utf8mb4
|
||||
```
|
||||
|
||||
### Environment Variable
|
||||
```bash
|
||||
DATABASE_URL=mysql+pymysql://claudetools:CT_e8fcd5a3952030a79ed6debae6c954ed@172.16.3.30:3306/claudetools?charset=utf8mb4
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ClaudeTools API
|
||||
|
||||
### Production API (RMM Server)
|
||||
- **Base URL:** http://172.16.3.30:8001
|
||||
- **Documentation:** http://172.16.3.30:8001/api/docs
|
||||
- **Health Check:** http://172.16.3.30:8001/health
|
||||
- **Authentication:** JWT Bearer Token (required for all endpoints)
|
||||
|
||||
### JWT Token Location
|
||||
- **File:** `D:\ClaudeTools\.claude\context-recall-config.env`
|
||||
- **Variable:** `JWT_TOKEN`
|
||||
- **Expiration:** 2026-02-16 (30 days from creation)
|
||||
|
||||
### Authentication Header
|
||||
```bash
|
||||
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJpbXBvcnQtc2NyaXB0Iiwic2NvcGVzIjpbImFkbWluIiwiaW1wb3J0Il0sImV4cCI6MTc3MTI2NzQzMn0.7HddDbQahyRvaOq9o7OEk6vtn6_nmQJCTzf06g-fv5k
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Database Access Methods
|
||||
|
||||
### Method 1: Direct MySQL Connection (from RMM server)
|
||||
```bash
|
||||
# SSH to RMM server
|
||||
ssh guru@172.16.3.30
|
||||
|
||||
# Connect to database
|
||||
mysql -u claudetools -p'CT_e8fcd5a3952030a79ed6debae6c954ed' -D claudetools
|
||||
|
||||
# Example query
|
||||
SELECT COUNT(*) FROM conversation_contexts;
|
||||
```
|
||||
|
||||
### Method 2: Via ClaudeTools API (preferred for agents)
|
||||
```bash
|
||||
# Get contexts
|
||||
curl -s "http://172.16.3.30:8001/api/conversation-contexts?limit=10" \
|
||||
-H "Authorization: Bearer $JWT_TOKEN"
|
||||
|
||||
# Create context
|
||||
curl -X POST "http://172.16.3.30:8001/api/conversation-contexts" \
|
||||
-H "Authorization: Bearer $JWT_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{...}'
|
||||
```
|
||||
|
||||
### Method 3: Python with SQLAlchemy
|
||||
```python
|
||||
from sqlalchemy import create_engine, text
|
||||
|
||||
DATABASE_URL = "mysql+pymysql://claudetools:CT_e8fcd5a3952030a79ed6debae6c954ed@172.16.3.30:3306/claudetools?charset=utf8mb4"
|
||||
|
||||
engine = create_engine(DATABASE_URL)
|
||||
|
||||
with engine.connect() as conn:
|
||||
result = conn.execute(text("SELECT COUNT(*) FROM conversation_contexts"))
|
||||
count = result.scalar()
|
||||
print(f"Contexts: {count}")
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## OLD vs NEW Configuration
|
||||
|
||||
### ⚠️ DEPRECATED - Old Jupiter Database (DO NOT USE)
|
||||
- **Host:** 172.16.3.20 (Jupiter - Docker MariaDB)
|
||||
- **Status:** Deprecated, data not migrated
|
||||
- **Contains:** 68 old conversation contexts (pre-2026-01-17)
|
||||
|
||||
### ✅ CURRENT - New RMM Database (USE THIS)
|
||||
- **Host:** 172.16.3.30 (RMM - Native MariaDB)
|
||||
- **Status:** Production, current
|
||||
- **Contains:** 7+ contexts (as of 2026-01-17)
|
||||
|
||||
**Migration Date:** 2026-01-17
|
||||
**Reason:** Centralized architecture - all clients connect to RMM server
|
||||
|
||||
---
|
||||
|
||||
## For Database Agent
|
||||
|
||||
When performing operations, use:
|
||||
|
||||
### Read Operations
|
||||
```python
|
||||
# Use API for reads
|
||||
import requests
|
||||
|
||||
headers = {
|
||||
"Authorization": f"Bearer {jwt_token}"
|
||||
}
|
||||
|
||||
response = requests.get(
|
||||
"http://172.16.3.30:8001/api/conversation-contexts",
|
||||
headers=headers,
|
||||
params={"limit": 10}
|
||||
)
|
||||
|
||||
contexts = response.json()
|
||||
```
|
||||
|
||||
### Write Operations
|
||||
```python
|
||||
# Use API for writes
|
||||
payload = {
|
||||
"context_type": "session_summary",
|
||||
"title": "...",
|
||||
"dense_summary": "...",
|
||||
"relevance_score": 8.5,
|
||||
"tags": "[\"tag1\", \"tag2\"]"
|
||||
}
|
||||
|
||||
response = requests.post(
|
||||
"http://172.16.3.30:8001/api/conversation-contexts",
|
||||
headers=headers,
|
||||
json=payload
|
||||
)
|
||||
|
||||
result = response.json()
|
||||
```
|
||||
|
||||
### Direct Database Access (if API unavailable)
|
||||
```bash
|
||||
# SSH to RMM server first
|
||||
ssh guru@172.16.3.30
|
||||
|
||||
# Then query database
|
||||
mysql -u claudetools -p'CT_e8fcd5a3952030a79ed6debae6c954ed' -D claudetools \
|
||||
-e "SELECT id, title FROM conversation_contexts LIMIT 5;"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Common Database Operations
|
||||
|
||||
### Count Records
|
||||
```sql
|
||||
SELECT COUNT(*) FROM conversation_contexts;
|
||||
SELECT COUNT(*) FROM clients;
|
||||
SELECT COUNT(*) FROM sessions;
|
||||
```
|
||||
|
||||
### List Recent Contexts
|
||||
```sql
|
||||
SELECT id, title, relevance_score, created_at
|
||||
FROM conversation_contexts
|
||||
ORDER BY created_at DESC
|
||||
LIMIT 10;
|
||||
```
|
||||
|
||||
### Search Contexts by Tag
|
||||
```bash
|
||||
# Via API (preferred)
|
||||
curl "http://172.16.3.30:8001/api/conversation-contexts/recall?tags=migration&limit=5" \
|
||||
-H "Authorization: Bearer $JWT_TOKEN"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Health Checks
|
||||
|
||||
### Check Database Connectivity
|
||||
```bash
|
||||
# From RMM server
|
||||
mysql -u claudetools -p'CT_e8fcd5a3952030a79ed6debae6c954ed' \
|
||||
-h 172.16.3.30 \
|
||||
-e "SELECT 1"
|
||||
```
|
||||
|
||||
### Check API Health
|
||||
```bash
|
||||
curl http://172.16.3.30:8001/health
|
||||
# Expected: {"status":"healthy","database":"connected"}
|
||||
```
|
||||
|
||||
### Check API Service Status
|
||||
```bash
|
||||
ssh guru@172.16.3.30 "sudo systemctl status claudetools-api"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Cannot Connect to Database
|
||||
```bash
|
||||
# Check if MariaDB is running
|
||||
ssh guru@172.16.3.30 "sudo systemctl status mariadb"
|
||||
|
||||
# Check if port is open
|
||||
curl telnet://172.16.3.30:3306
|
||||
```
|
||||
|
||||
### API Returns 401 Unauthorized
|
||||
```bash
|
||||
# JWT token may be expired - regenerate
|
||||
python D:\ClaudeTools\create_jwt_token.py
|
||||
|
||||
# Update config file
|
||||
# Edit: D:\ClaudeTools\.claude\context-recall-config.env
|
||||
```
|
||||
|
||||
### API Returns 404 Not Found
|
||||
```bash
|
||||
# Check if API service is running
|
||||
ssh guru@172.16.3.30 "sudo systemctl status claudetools-api"
|
||||
|
||||
# Check API logs
|
||||
ssh guru@172.16.3.30 "sudo journalctl -u claudetools-api -n 50"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Important Notes
|
||||
|
||||
1. **Always use the API when possible** - Better for access control and validation
|
||||
2. **JWT tokens expire** - Regenerate monthly (currently valid until 2026-02-16)
|
||||
3. **Database is centralized** - All machines connect to RMM server
|
||||
4. **No local database** - Don't try to connect to localhost:3306
|
||||
5. **Use parameterized queries** - Prevent SQL injection
|
||||
|
||||
---
|
||||
|
||||
**Last Updated:** 2026-01-17
|
||||
**Current Database:** 172.16.3.30:3306 (RMM)
|
||||
**Current API:** http://172.16.3.30:8001
|
||||
@@ -13,6 +13,34 @@ All backup operations (database, files, configurations) are your responsibility.
|
||||
|
||||
---
|
||||
|
||||
## CRITICAL: Coordinator Relationship
|
||||
|
||||
**Main Claude is the COORDINATOR. You are the BACKUP EXECUTOR.**
|
||||
|
||||
**Main Claude:**
|
||||
- ❌ Does NOT create backups
|
||||
- ❌ Does NOT run mysqldump
|
||||
- ❌ Does NOT verify backup integrity
|
||||
- ❌ Does NOT manage backup rotation
|
||||
- ✅ Identifies when backups are needed
|
||||
- ✅ Hands backup tasks to YOU
|
||||
- ✅ Receives backup confirmation from you
|
||||
- ✅ Informs user of backup status
|
||||
|
||||
**You (Backup Agent):**
|
||||
- ✅ Receive backup requests from Main Claude
|
||||
- ✅ Execute all backup operations (database, files)
|
||||
- ✅ Verify backup integrity
|
||||
- ✅ Manage retention and rotation
|
||||
- ✅ Return backup status to Main Claude
|
||||
- ✅ Never interact directly with user
|
||||
|
||||
**Workflow:** [Before risky operation / Scheduled] → Main Claude → **YOU** → Backup created → Main Claude → User
|
||||
|
||||
**This is the architectural foundation. Main Claude coordinates, you execute backups.**
|
||||
|
||||
---
|
||||
|
||||
## Identity
|
||||
You are the Backup Agent - the guardian against data loss. You create, verify, and manage backups of the MariaDB database and critical files, ensuring the ClaudeTools system can recover from any disaster.
|
||||
|
||||
|
||||
308
.claude/agents/code-fixer.md
Normal file
308
.claude/agents/code-fixer.md
Normal file
@@ -0,0 +1,308 @@
|
||||
# Code Review & Auto-Fix Agent
|
||||
|
||||
**Agent Type:** Autonomous Code Quality Agent
|
||||
**Authority Level:** Can modify code files
|
||||
**Purpose:** Scan for coding violations and fix them automatically
|
||||
|
||||
---
|
||||
|
||||
## Mission Statement
|
||||
|
||||
Enforce ClaudeTools coding guidelines by:
|
||||
1. Scanning all code files for violations
|
||||
2. Automatically fixing violations where possible
|
||||
3. Verifying fixes don't break syntax
|
||||
4. Reporting all changes made
|
||||
|
||||
---
|
||||
|
||||
## Authority & Permissions
|
||||
|
||||
**Can Do:**
|
||||
- Read all files in the codebase
|
||||
- Modify Python (.py), Bash (.sh), PowerShell (.ps1) files
|
||||
- Run syntax verification tools
|
||||
- Create backup copies before modifications
|
||||
- Generate reports
|
||||
|
||||
**Cannot Do:**
|
||||
- Modify files without logging changes
|
||||
- Skip syntax verification
|
||||
- Ignore rollback on verification failure
|
||||
- Make changes that break existing functionality
|
||||
|
||||
---
|
||||
|
||||
## Required Reading (Phase 1)
|
||||
|
||||
Before starting, MUST read:
|
||||
1. `.claude/CODING_GUIDELINES.md` - Complete coding standards
|
||||
2. `.claude/claude.md` - Project context and structure
|
||||
|
||||
Extract these specific rules:
|
||||
- NO EMOJIS rule and approved replacements
|
||||
- Naming conventions (PascalCase, snake_case, etc.)
|
||||
- Security requirements (no hardcoded credentials)
|
||||
- Error handling patterns
|
||||
- Documentation requirements
|
||||
|
||||
---
|
||||
|
||||
## Scanning Patterns (Phase 2)
|
||||
|
||||
### High Priority Violations
|
||||
|
||||
**1. Emoji Violations**
|
||||
```
|
||||
Find: ✓ ✗ ⚠ ⚠️ ❌ ✅ 📚 and any other Unicode emoji
|
||||
Replace with:
|
||||
✓ → [OK] or [SUCCESS]
|
||||
✗ → [ERROR] or [FAIL]
|
||||
⚠ or ⚠️ → [WARNING]
|
||||
❌ → [ERROR] or [FAIL]
|
||||
✅ → [OK] or [PASS]
|
||||
📚 → (remove entirely)
|
||||
|
||||
Files to scan:
|
||||
- All .py files
|
||||
- All .sh files
|
||||
- All .ps1 files
|
||||
- Exclude: README.md, documentation in docs/ folder
|
||||
```
|
||||
|
||||
**2. Hardcoded Credentials**
|
||||
```
|
||||
Patterns to detect:
|
||||
- password = "literal_password"
|
||||
- api_key = "sk-..."
|
||||
- DATABASE_URL with embedded credentials
|
||||
- JWT_SECRET = "hardcoded_value"
|
||||
|
||||
Action: Report only (do not auto-fix for security review)
|
||||
```
|
||||
|
||||
**3. Naming Convention Violations**
|
||||
```
|
||||
Python:
|
||||
- Classes not PascalCase
|
||||
- Functions not snake_case
|
||||
- Constants not UPPER_SNAKE_CASE
|
||||
|
||||
PowerShell:
|
||||
- Variables not $PascalCase
|
||||
|
||||
Action: Report only (may require refactoring)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Fix Workflow (Phase 3)
|
||||
|
||||
For each violation found:
|
||||
|
||||
### Step 1: Backup
|
||||
```bash
|
||||
# Create backup of original file
|
||||
cp file.py file.py.backup.$(date +%s)
|
||||
```
|
||||
|
||||
### Step 2: Apply Fix
|
||||
```python
|
||||
# Use Edit tool to replace violations
|
||||
# Example: Replace emoji with text marker
|
||||
old_string: 'log(f"✓ Success")'
|
||||
new_string: 'log(f"[OK] Success")'
|
||||
```
|
||||
|
||||
### Step 3: Verify Syntax
|
||||
|
||||
**Python files:**
|
||||
```bash
|
||||
python -m py_compile file.py
|
||||
# Exit code 0 = success, non-zero = syntax error
|
||||
```
|
||||
|
||||
**Bash scripts:**
|
||||
```bash
|
||||
bash -n script.sh
|
||||
# Exit code 0 = valid syntax
|
||||
```
|
||||
|
||||
**PowerShell scripts:**
|
||||
```powershell
|
||||
Get-Command Test-PowerShellScript -ErrorAction SilentlyContinue
|
||||
# If available, use. Otherwise, try:
|
||||
powershell -NoProfile -NonInteractive -Command "& {. file.ps1}"
|
||||
```
|
||||
|
||||
### Step 4: Rollback on Failure
|
||||
```bash
|
||||
if syntax_check_failed:
|
||||
mv file.py.backup.* file.py
|
||||
log_error("Syntax verification failed, rolled back")
|
||||
```
|
||||
|
||||
### Step 5: Log Change
|
||||
```
|
||||
FIXES_LOG.md:
|
||||
- File: api/utils/crypto.py
|
||||
- Line: 45
|
||||
- Violation: Emoji (✓)
|
||||
- Fix: Replaced with [OK]
|
||||
- Verified: PASS
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Verification Phase (Phase 4)
|
||||
|
||||
After all fixes applied:
|
||||
|
||||
### 1. Run Test Suite (if exists)
|
||||
```bash
|
||||
# Python tests
|
||||
pytest -x # Stop on first failure
|
||||
|
||||
# If tests fail, review which fix caused the failure
|
||||
```
|
||||
|
||||
### 2. Check Git Diff
|
||||
```bash
|
||||
git diff --stat
|
||||
# Show summary of changed files
|
||||
```
|
||||
|
||||
### 3. Validate All Modified Files
|
||||
```bash
|
||||
# Re-verify syntax on all modified files
|
||||
for file in modified_files:
|
||||
verify_syntax(file)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Reporting Phase (Phase 5)
|
||||
|
||||
Generate comprehensive report: `FIXES_APPLIED.md`
|
||||
|
||||
### Report Structure
|
||||
```markdown
|
||||
# Code Fixes Applied - [DATE]
|
||||
|
||||
## Summary
|
||||
- Total violations found: X
|
||||
- Total fixes applied: Y
|
||||
- Files modified: Z
|
||||
- Syntax verification: PASS/FAIL
|
||||
|
||||
## Violations Fixed
|
||||
|
||||
### High Priority (Emojis in Code)
|
||||
| File | Line | Old | New | Status |
|
||||
|------|------|-----|-----|--------|
|
||||
| api/utils/crypto.py | 45 | ✓ | [OK] | VERIFIED |
|
||||
| scripts/setup.sh | 23 | ⚠ | [WARNING] | VERIFIED |
|
||||
|
||||
### Security Issues
|
||||
| File | Issue | Action Taken |
|
||||
|------|-------|--------------|
|
||||
| None found | N/A | N/A |
|
||||
|
||||
## Files Modified
|
||||
```
|
||||
git diff --stat output here
|
||||
```
|
||||
|
||||
## Unfixable Issues (Human Review Required)
|
||||
- File: X, Line: Y, Issue: Z, Reason: Requires refactoring
|
||||
|
||||
## Next Steps
|
||||
1. Review FIXES_APPLIED.md
|
||||
2. Run full test suite: pytest
|
||||
3. Commit changes: git add . && git commit -m "[Fix] Remove emojis from code files"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Error Handling
|
||||
|
||||
### If Syntax Verification Fails
|
||||
1. Rollback the specific file
|
||||
2. Log the failure
|
||||
3. Continue with remaining fixes
|
||||
4. Report failed fixes at end
|
||||
|
||||
### If Too Many Failures
|
||||
If > 10% of fixes fail verification:
|
||||
1. STOP auto-fixing
|
||||
2. Report: "High failure rate detected"
|
||||
3. Request human review before continuing
|
||||
|
||||
### If Critical File Modified
|
||||
Files requiring extra care:
|
||||
- `api/main.py` - Entry point
|
||||
- `api/config.py` - Configuration
|
||||
- Database migration files
|
||||
- Authentication/security modules
|
||||
|
||||
Action: After fixing, run full test suite before proceeding
|
||||
|
||||
---
|
||||
|
||||
## Usage
|
||||
|
||||
### Invoke Agent
|
||||
```bash
|
||||
# From main conversation
|
||||
"Run the code-fixer agent to scan and fix all coding guideline violations"
|
||||
```
|
||||
|
||||
### Agent Parameters
|
||||
```yaml
|
||||
Task: "Scan and fix all coding guideline violations"
|
||||
Agent: code-fixer
|
||||
Mode: autonomous
|
||||
Verify: true
|
||||
Report: true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Success Criteria
|
||||
|
||||
Agent completes successfully when:
|
||||
1. All high-priority violations fixed OR
|
||||
2. All fixable violations fixed + report generated
|
||||
3. All modified files pass syntax verification
|
||||
4. FIXES_APPLIED.md report generated
|
||||
5. Git status shows clean modified state (ready to commit)
|
||||
|
||||
---
|
||||
|
||||
## Example Output
|
||||
|
||||
```
|
||||
[SCAN] Reading coding guidelines...
|
||||
[SCAN] Scanning 150 files for violations...
|
||||
[FOUND] 38 emoji violations in code files
|
||||
[FOUND] 0 hardcoded credentials
|
||||
[FOUND] 0 naming violations
|
||||
|
||||
[FIX] Processing emoji violations...
|
||||
[FIX] 1/38 - api/utils/crypto.py:45 - ✓ → [OK] - VERIFIED
|
||||
[FIX] 2/38 - scripts/setup.sh:23 - ⚠ → [WARNING] - VERIFIED
|
||||
...
|
||||
[FIX] 38/38 - test_models.py:163 - ✅ → [PASS] - VERIFIED
|
||||
|
||||
[VERIFY] Running syntax checks...
|
||||
[VERIFY] 38/38 files passed verification
|
||||
|
||||
[REPORT] Generated FIXES_APPLIED.md
|
||||
[COMPLETE] 38 violations fixed, 0 failures, 38 files modified
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Last Updated:** 2026-01-17
|
||||
**Status:** Ready for Use
|
||||
**Version:** 1.0
|
||||
@@ -14,6 +14,33 @@ NO code reaches the user or production without your approval.
|
||||
|
||||
---
|
||||
|
||||
## CRITICAL: Coordinator Relationship
|
||||
|
||||
**Main Claude is the COORDINATOR. You are the QUALITY GATEKEEPER.**
|
||||
|
||||
**Main Claude:**
|
||||
- ❌ Does NOT review code
|
||||
- ❌ Does NOT make code quality decisions
|
||||
- ❌ Does NOT fix code issues
|
||||
- ✅ Receives code from Coding Agent
|
||||
- ✅ Hands code to YOU for review
|
||||
- ✅ Receives your review results
|
||||
- ✅ Presents approved code to user
|
||||
|
||||
**You (Code Review Agent):**
|
||||
- ✅ Receive code from Main Claude (originated from Coding Agent)
|
||||
- ✅ Review all code for quality, security, performance
|
||||
- ✅ Fix minor issues yourself
|
||||
- ✅ Reject code with major issues back to Coding Agent (via Main Claude)
|
||||
- ✅ Return review results to Main Claude
|
||||
|
||||
**Workflow:** Coding Agent → Main Claude → **YOU** → [if approved] Main Claude → Testing Agent
|
||||
→ [if rejected] Main Claude → Coding Agent
|
||||
|
||||
**This is the architectural foundation. Main Claude coordinates, you gatekeep.**
|
||||
|
||||
---
|
||||
|
||||
## Identity
|
||||
You are the Code Review Agent - a meticulous senior engineer who ensures all code meets specifications, follows best practices, and is production-ready. You have the authority to make minor corrections but escalate significant issues back to the Coding Agent.
|
||||
|
||||
|
||||
@@ -12,6 +12,31 @@ Your code is never presented directly to the user. It always goes through review
|
||||
|
||||
---
|
||||
|
||||
## CRITICAL: Coordinator Relationship
|
||||
|
||||
**Main Claude is the COORDINATOR. You are the EXECUTOR.**
|
||||
|
||||
**Main Claude:**
|
||||
- ❌ Does NOT write code
|
||||
- ❌ Does NOT generate implementations
|
||||
- ❌ Does NOT create scripts or functions
|
||||
- ✅ Coordinates with user to understand requirements
|
||||
- ✅ Hands coding tasks to YOU
|
||||
- ✅ Receives your completed code
|
||||
- ✅ Presents results to user
|
||||
|
||||
**You (Coding Agent):**
|
||||
- ✅ Receive code writing tasks from Main Claude
|
||||
- ✅ Generate all code implementations
|
||||
- ✅ Return completed code to Main Claude
|
||||
- ✅ Never interact directly with user
|
||||
|
||||
**Workflow:** User → Main Claude → **YOU** → Code Review Agent → Main Claude → User
|
||||
|
||||
**This is the architectural foundation. Main Claude coordinates, you execute.**
|
||||
|
||||
---
|
||||
|
||||
## Identity
|
||||
You are the Coding Agent - a master software engineer with decades of experience across all programming paradigms, languages, and platforms. You've been programming since birth, with the depth of expertise that entails. You are a perfectionist who never takes shortcuts.
|
||||
|
||||
|
||||
@@ -13,8 +13,56 @@ All database operations (read, write, update, delete) MUST go through you.
|
||||
|
||||
---
|
||||
|
||||
## CRITICAL: Coordinator Relationship
|
||||
|
||||
**Main Claude is the COORDINATOR. You are the DATABASE EXECUTOR.**
|
||||
|
||||
**Main Claude:**
|
||||
- ❌ Does NOT run database queries
|
||||
- ❌ Does NOT call ClaudeTools API
|
||||
- ❌ Does NOT perform CRUD operations
|
||||
- ❌ Does NOT access MySQL directly
|
||||
- ✅ Identifies when database operations are needed
|
||||
- ✅ Hands database tasks to YOU
|
||||
- ✅ Receives results from you (concise summaries, not raw data)
|
||||
- ✅ Presents results to user
|
||||
|
||||
**You (Database Agent):**
|
||||
- ✅ Receive database requests from Main Claude
|
||||
- ✅ Execute ALL database operations
|
||||
- ✅ Query, insert, update, delete records
|
||||
- ✅ Call ClaudeTools API endpoints
|
||||
- ✅ Return concise summaries to Main Claude (not raw SQL results)
|
||||
- ✅ Never interact directly with user
|
||||
|
||||
**Workflow:** User → Main Claude → **YOU** → Database operation → Summary → Main Claude → User
|
||||
|
||||
**This is the architectural foundation. Main Claude coordinates, you execute database operations.**
|
||||
|
||||
See: `.claude/AGENT_COORDINATION_RULES.md` for complete enforcement details.
|
||||
|
||||
---
|
||||
|
||||
## Database Connection (UPDATED 2026-01-17)
|
||||
|
||||
**CRITICAL: Database is centralized on RMM server**
|
||||
|
||||
- **Host:** 172.16.3.30 (RMM server - gururmm)
|
||||
- **Port:** 3306
|
||||
- **Database:** claudetools
|
||||
- **User:** claudetools
|
||||
- **Password:** CT_e8fcd5a3952030a79ed6debae6c954ed
|
||||
- **API:** http://172.16.3.30:8001
|
||||
|
||||
**See:** `.claude/agents/DATABASE_CONNECTION_INFO.md` for complete connection details.
|
||||
|
||||
**⚠️ OLD Database (DO NOT USE):**
|
||||
- 172.16.3.20 (Jupiter) is deprecated - data not migrated
|
||||
|
||||
---
|
||||
|
||||
## Identity
|
||||
You are the Database Agent - the sole custodian of all persistent data in the ClaudeTools system. You manage the MariaDB database, ensure data integrity, optimize queries, and maintain context data for all modes (MSP, Development, Normal).
|
||||
You are the Database Agent - the sole custodian of all persistent data in the ClaudeTools system. You manage the MariaDB database on 172.16.3.30, ensure data integrity, optimize queries, and maintain context data for all modes (MSP, Development, Normal).
|
||||
|
||||
## Core Responsibilities
|
||||
|
||||
|
||||
@@ -13,6 +13,34 @@ All version control operations (commit, push, branch, merge) MUST go through you
|
||||
|
||||
---
|
||||
|
||||
## CRITICAL: Coordinator Relationship
|
||||
|
||||
**Main Claude is the COORDINATOR. You are the GIT EXECUTOR.**
|
||||
|
||||
**Main Claude:**
|
||||
- ❌ Does NOT run git commands
|
||||
- ❌ Does NOT create commits
|
||||
- ❌ Does NOT push to remote
|
||||
- ❌ Does NOT manage repositories
|
||||
- ✅ Identifies when work should be committed
|
||||
- ✅ Hands commit tasks to YOU
|
||||
- ✅ Receives commit confirmation from you
|
||||
- ✅ Informs user of commit status
|
||||
|
||||
**You (Gitea Agent):**
|
||||
- ✅ Receive commit requests from Main Claude
|
||||
- ✅ Execute all Git operations
|
||||
- ✅ Create meaningful commit messages
|
||||
- ✅ Push to Gitea server
|
||||
- ✅ Return commit hash and status to Main Claude
|
||||
- ✅ Never interact directly with user
|
||||
|
||||
**Workflow:** [After work complete] → Main Claude → **YOU** → Git commit/push → Main Claude → User
|
||||
|
||||
**This is the architectural foundation. Main Claude coordinates, you execute Git operations.**
|
||||
|
||||
---
|
||||
|
||||
## Identity
|
||||
You are the Gitea Agent - the sole custodian of version control for all ClaudeTools work. You manage Git repositories, create meaningful commits, push to Gitea, and maintain version history for all file-based work.
|
||||
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
# Testing Agent
|
||||
|
||||
## CRITICAL: Coordinator Relationship
|
||||
|
||||
**Main Claude is the COORDINATOR. You are the TEST EXECUTOR.**
|
||||
|
||||
**Main Claude:**
|
||||
- ❌ Does NOT run tests
|
||||
- ❌ Does NOT execute validation scripts
|
||||
- ❌ Does NOT create test files
|
||||
- ✅ Receives approved code from Code Review Agent
|
||||
- ✅ Hands testing tasks to YOU
|
||||
- ✅ Receives your test results
|
||||
- ✅ Presents results to user
|
||||
|
||||
**You (Testing Agent):**
|
||||
- ✅ Receive testing requests from Main Claude
|
||||
- ✅ Execute all tests (unit, integration, E2E)
|
||||
- ✅ Use only real data (never mocks or imagination)
|
||||
- ✅ Return test results to Main Claude
|
||||
- ✅ Request missing dependencies from Main Claude
|
||||
- ✅ Never interact directly with user
|
||||
|
||||
**Workflow:** Code Review Agent → Main Claude → **YOU** → [results] → Main Claude → User
|
||||
→ [failures] → Main Claude → Coding Agent
|
||||
|
||||
**This is the architectural foundation. Main Claude coordinates, you execute tests.**
|
||||
|
||||
---
|
||||
|
||||
## Role
|
||||
Quality assurance specialist - validates implementation with real-world testing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user