Agent Protocol & Architectural Mandate
Description
**Version:** 2.10.5 **Target Project:** git-mcp-server **Last Updated:** 2026-03-25 This document defines the operational rules for contributing to this codebase. Follow it exactly. > **Note on File S
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Agent Protocol & Architectural Mandate
**Version:** 2.10.5 **Target Project:** git-mcp-server **Last Updated:** 2026-03-25
This document defines the operational rules for contributing to this codebase. Follow it exactly.
**Note on File Synchronization**: `AGENTS.md` is a symlink to `CLAUDE.md`. **Edit only `CLAUDE.md`** — `AGENTS.md` will reflect changes automatically.
I. Core Principles (Non-Negotiable)
**The Logic Throws, The Handler Catches**
- Tools: Implement pure, stateless business logic inside tool logic functions. No
try/catchblocks. - Resources: Same rule — pure read logic, no
try/catch. - On Failure: Throw
new McpError(...)with the appropriateJsonRpcErrorCodeand context. - Framework's Job:
createMcpToolHandlerwraps tool logic: createsRequestContext, measures execution viameasureToolExecution, formats the response, catches errors.createToolHandlerwraps git-specific logic: resolves DI dependencies and working directory before calling your pure logic.- Resource handlers (
resourceHandlerFactory) validate params, invoke logic, applyresponseFormatter, and catch errors.
- Tools: Implement pure, stateless business logic inside tool logic functions. No
**Full-Stack Observability**
- OpenTelemetry is preconfigured. Logs and errors are automatically correlated to traces.
measureToolExecutionautomatically records duration, success, payload sizes, and error codes for every tool call.- Do not add custom spans in tool/resource logic. The framework handles instrumentation.
**Structured, Traceable Operations**
- Tool logic receives dependencies via
ToolLogicDependencies(which includesappContextandsdkContext). appContext(RequestContext): Internal logging/tracing context withrequestId,sessionId,tenantId,traceId.sdkContext(SdkContext): MCP SDK protocol capabilities —signal,sendNotification,sendRequest,authInfo.- Pass
appContextthrough your internal call stack. Use the globalloggerwithappContextin every log call.
- Tool logic receives dependencies via
**Decoupled Storage**
- Never directly access persistence backends from tool/resource logic.
- Use
StorageService(injected via DI) for session state (working directory persistence). - Git operations execute via the
IGitProviderinterface, not direct CLI calls.
**Graceful Degradation in Development**
- When
tenantIdis missing, default to permissive behavior:const tenantId = appContext.tenantId || 'default-tenant'; - Auth/scope checks default to allowed when auth is disabled.
- Production environments with auth enabled provide real
tenantIdfrom JWT claims automatically.
- When
II. Directory Structure
| Directory | Purpose |
|---|
Related Agents
Architectobot
Project Architect & Task Breakdown Specialist who analyzes codebases and creates detailed implementation plans
Project Management Memory Keeper
Updates .claude/memory.md with important learnings, fixes, patterns, and gotchas from the current session that
Project Management Qualityqueen
Quality Assurance & Code Standards Specialist who ensures code meets project standards across any technology s
Project Management Project Coordinator
Coordinates multi-agent workflows for this project
Project Management Status
| Display the current status of the Conductor project, including overall progress, active tracks, and... | - |
Project Management Setup
| Initialize or resume Conductor project setup. This command creates foundational project documentatio... | -
Project Management