Imported from JSRRosenbaum/RC-AT (
AGENTS.md). Install upstream withnpx skills add JSRRosenbaum/RC-AT. Copyright stays with the author.
RC-AT Agent Instructions
What This Directory Is
RC-AT (RingCentral → Autotask Ticket Capture) is a Windows TUI application (.NET 10, Spectre.Console) for MSP support operations. It monitors RingCentral calls, captures call notes via window automation and OCR, and creates Autotask tickets pre-populated with caller info and AI-generated notes.
Organization & Quick Start
- Entry point:
Program.cs(main TUI application) - Build/run:
dotnet build rc-at.csproj→dotnet run - Tests:
dotnet test rc-at.tests/rc-at.tests.csproj(target the test project explicitly —dotnet testfrom root may not resolve if.slnis not in cwd) - Docs:
requirements.md(7 phases, 80+ acceptance gates) - Structure note: Generated and cached data files live in
data/(e.g.,data/tech-styles.json,data/autotask_codes.json). Path references in services must include this segment — it is a known source of drift after the 2026-03-05 restructure.
Safe Commands (Read-Only Analysis)
# Syntax check (does not execute)
dotnet build rc-at.csproj --no-restore
# Type-check only (no execution)
npx tsc --noEmit # Not applicable (C# project)
# View project structure
dotnet sln list --format direct
DO NOT Boundaries
- Never execute production deployments — this is a local TUI tool, no cloud deployment
- Never modify
appsettings.json— contains secrets (RC credentials, AT API keys) - Never run parallel project-wide tests — RC-AT is a single project; run
dotnet testalone - Never guess environment variables — verify from
appsettings.example.json(no secrets) - Never modify compiled binaries (
bin/,obj/) — these are build outputs - Never delete or rename diagnostic files (
diag_*.cs,.ps1scripts) — they are test utilities
How to Add New Tools (if extending RC-AT)
Expected Structure
RC-AT/
├── Models/ # Domain models (AppConfig, CallEvent, etc.)
├── Services/ # API clients, business logic
├── Views/ # Spectre.Console TUI screens
├── Helpers/ # Utilities (OCR, window automation)
├── Tests/ # Unit/integration tests
├── Program.cs # Entry point
├── rc-at.csproj # Project file
└── [docs]/ # Markdown documentation
Minimal Metadata Requirements
Your README.md (if adding one) must include:
- Purpose — One sentence describing what the tool does
- Entrypoint — How to run it (
dotnet run, etc.) - Dependencies — External APIs (RingCentral, Autotask, Ollama) or packages
- Risk Level — Read-only, low, medium, or high (with justification)
- Environment Variables — List of required
.envfields (if any)
Output Expectations
When Proposing Changes
Always include:
- File paths — Absolute or relative from
RC-AT/root - Diffs — What changes, not just the final state (use
git diffor describe in markdown) - Tests to run — Specific commands to verify the change
Example:
## Proposed Change: Add RingSense AI Summary Field
**Files Modified:**
- `Models/AutotaskTicket.cs`
- `Services/NotesCaptureService.cs`
- `Views/TicketFormView.cs`
**Diff (Models/AutotaskTicket.cs):**
```csharp
@@ -5,6 +5,7 @@ public class AutotaskTicket
public string Description { get; set; } = string.Empty;
public int Status { get; set; }
public int Priority { get; set; }
+ public string RingSenseSummary { get; set; } = string.Empty;
public int QueueId { get; set; }
public int ResourceId { get; set; }
public int TicketTypeId { get; set; }
Tests to Run:
cd RC-AT
dotnet build rc-at.csproj
dotnet test --filter "FullyQualifiedName~NotesCaptureService"
### When Uncertain
1. **Mark as TODO** with how to discover:
```markdown
## TODO: Verify WindowScanner Behavior
- Check `GetRcPhoneWindowHandles` for minimized window handling
- Confirm hash polling timeout values (30ms intervals, 500ms timeout)
- Ask for clarification on:
- Local vs production environment (no production deployment needed)
- Whether changes should modify
appsettings.json(only for development) - API credentials for RingCentral/Autotask (do not fabricate)
Language & Tool Conventions
| Language | Linter | Formatter | Test Runner |
|---|---|---|---|
| C#/.NET | Built-in (MSBuild) | dotnet format |
xUnit/NUnit |
Run before committing:
# C#
dotnet build rc-at.csproj --no-restore
dotnet format
Debugging & Troubleshooting
Common Issues
| Symptom | Likely Cause | Fix |
|---|---|---|
dotnet build fails with 401 |
Missing appsettings.json or invalid credentials |
Check appsettings.example.json, verify API keys |
| OCR fails to parse notes | Window not visible or minimized | Ensure RC windows are visible; check WindowScanner output |
| Token refresh fails | Expired JWT token | Verify RingCentralConfig.JwtToken is valid; check auth flow |
| Window automation clicks fail | Window not activated | Check ForceActivate implementation; verify window class names |
Getting Help
- Check
requirements.mdPhase 3 (Pending Notes) for OCR/click validation details - Review
NotesCaptureService.mdfor capture pipeline explanation - Consult
AUTOTASK_CODES_REFERENCE.mdfor API endpoint mappings
Security Reminders
- Never commit secrets —
appsettings.jsonis excluded by.gitignore - Credentials are local — RC JWT token and AT API keys stored in
appsettings.jsononly - Window automation is safe — Windows are repositioned, never closed or destroyed
- OCR is read-only — Screen capture uses
PrintWindow, no clipboard interaction
Quick Reference: RC-AT Commands
# Build and run
cd RC-AT
dotnet build rc-at.csproj
dotnet run
# Run tests
dotnet test
# Format code
dotnet format
# Syntax check (no execution)
dotnet build rc-at.csproj --no-restore
Last Updated: 2026-03-06