Research conducted on modern AI coding assistants (Cursor, GitHub Copilot, Cline,
Aider, Windsurf, Replit Agent) to understand architecture patterns, context management,
code editing workflows, and tool use protocols.
Key Decision: Pivoted from building full CLI (40-50h) to validation-driven MCP-first
approach (10-15h). Build 5 core CODEX MCP tools that work with ANY coding assistant,
validate adoption over 2-4 weeks, then decide on full CLI if demand proven.
Files:
- research/ai-systems/modern-coding-assistants-architecture.md (comprehensive research)
- research/ai-systems/codex-coding-assistant-implementation-plan.md (original CLI plan, preserved)
- research/ai-systems/codex-mcp-tools-implementation-plan.md (approved MCP-first plan)
- ideas/registry.json (updated with approved MCP tools proposal)
Architech Validation: APPROVED with pivot to MCP-first approach
Human Decision: Approved (pragmatic validation-driven development)
Next: Begin Phase 1 implementation (10-15 hours, 5 core MCP tools)
🤖 Generated with CODEX Research System
Co-Authored-By: The Archivist <archivist@codex.svrnty.io>
Co-Authored-By: The Architech <architech@codex.svrnty.io>
Co-Authored-By: Mathias Beaulieu-Duncan <mat@svrnty.io>
85 lines
2.1 KiB
C#
85 lines
2.1 KiB
C#
using Xunit;
|
|
using OpenHarbor.MCP.Core.Models;
|
|
|
|
namespace OpenHarbor.MCP.Core.Tests.Models;
|
|
|
|
/// <summary>
|
|
/// Unit tests for RoutingContext model following TDD approach.
|
|
/// Tests routing metadata representation.
|
|
/// </summary>
|
|
public class RoutingContextTests
|
|
{
|
|
[Fact]
|
|
public void RoutingContext_WithToolName_CreatesSuccessfully()
|
|
{
|
|
// Arrange & Act
|
|
var context = new RoutingContext
|
|
{
|
|
ToolName = "search_codex",
|
|
ClientId = "web-client-123"
|
|
};
|
|
|
|
// Assert
|
|
Assert.Equal("search_codex", context.ToolName);
|
|
Assert.Equal("web-client-123", context.ClientId);
|
|
}
|
|
|
|
[Fact]
|
|
public void RoutingContext_WithHeaders_StoresHeaderData()
|
|
{
|
|
// Arrange
|
|
var headers = new Dictionary<string, string>
|
|
{
|
|
{ "X-API-Key", "test-key" },
|
|
{ "User-Agent", "MCP-Client/1.0" }
|
|
};
|
|
|
|
// Act
|
|
var context = new RoutingContext
|
|
{
|
|
Headers = headers
|
|
};
|
|
|
|
// Assert
|
|
Assert.NotNull(context.Headers);
|
|
Assert.Equal("test-key", context.Headers["X-API-Key"]);
|
|
}
|
|
|
|
[Fact]
|
|
public void RoutingContext_WithMetadata_StoresAdditionalData()
|
|
{
|
|
// Arrange
|
|
var metadata = new Dictionary<string, object>
|
|
{
|
|
{ "priority", "high" },
|
|
{ "timeout", 5000 },
|
|
{ "authenticated", true }
|
|
};
|
|
|
|
// Act
|
|
var context = new RoutingContext
|
|
{
|
|
Metadata = metadata
|
|
};
|
|
|
|
// Assert
|
|
Assert.NotNull(context.Metadata);
|
|
Assert.Equal("high", context.Metadata["priority"]);
|
|
Assert.Equal(5000, context.Metadata["timeout"]);
|
|
Assert.Equal(true, context.Metadata["authenticated"]);
|
|
}
|
|
|
|
[Fact]
|
|
public void RoutingContext_Empty_AllowsNullProperties()
|
|
{
|
|
// Arrange & Act
|
|
var context = new RoutingContext();
|
|
|
|
// Assert
|
|
Assert.Null(context.ToolName);
|
|
Assert.Null(context.ClientId);
|
|
Assert.Null(context.Headers);
|
|
Assert.Null(context.Metadata);
|
|
}
|
|
}
|