diff --git a/AGENTS.md b/AGENTS.md index 5e4c973..06fbb06 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -3,8 +3,8 @@ Auto-generated from feature plans. Last updated: 2026-01-30 ## Active Technologies -- Python 3.12 + MCP server library (Python, JSON-RPC/stdin transport), click for CLI entrypoint, pytest + coverage for tests, ruff/black for lint/format (001-mcp-server) -- None (in-memory tool definitions; filesystem access for repo interactions) (001-mcp-server) +- Python 3.12 + MCP server library (Python, JSON-RPC/stdin transport), click for CLI entrypoint, pytest + coverage for tests, ruff/black for lint/format (002-mcp-server) +- None (in-memory tool definitions; filesystem access for repo interactions) (002-mcp-server) - Documentation set (AI-facing constitution and playbooks) in Markdown (001-ai-docs) @@ -26,7 +26,7 @@ specs/001-ai-docs/ # Planning artifacts (plan, research, tasks, data model - Keep language business-level and technology-agnostic in AI-facing docs. ## Recent Changes -- 001-mcp-server: Added Python 3.12 + MCP server library (Python, JSON-RPC/stdin transport), click for CLI entrypoint, pytest + coverage for tests, ruff/black for lint/format +- 002-mcp-server: Added Python 3.12 + MCP server library (Python, JSON-RPC/stdin transport), click for CLI entrypoint, pytest + coverage for tests, ruff/black for lint/format - 001-ai-docs: Documentation-focused stack; added docs/ for constitution/playbooks and specs/001-ai-docs/ for planning outputs. diff --git a/docs/reference/mcp-server.md b/docs/reference/mcp-server.md index b5a40c7..98c3459 100644 --- a/docs/reference/mcp-server.md +++ b/docs/reference/mcp-server.md @@ -27,8 +27,8 @@ - Inputs: `query` (string). - Docs anchor: `docs/reference/mcp-server.md` → `#search-docs`. ### list-mcp-tasks -- Purpose: Show MCP feature task list from `specs/001-mcp-server/tasks.md`. -- Docs anchor: `specs/001-mcp-server/tasks.md` → `#tasks-mcp-server-for-repo-maintenance`. +- Purpose: Show MCP feature task list from `specs/002-mcp-server/tasks.md`. +- Docs anchor: `specs/002-mcp-server/tasks.md` → `#tasks-mcp-server-for-repo-maintenance`. ### sync-docs - Purpose: Compare tool catalog against documented anchors for drift reporting. - Docs anchor: `docs/reference/mcp-server.md` → `#sync-docs`. diff --git a/scripts/mcp-server/src/mcp_server/tools.py b/scripts/mcp-server/src/mcp_server/tools.py index 0c16782..fb82d62 100644 --- a/scripts/mcp-server/src/mcp_server/tools.py +++ b/scripts/mcp-server/src/mcp_server/tools.py @@ -131,7 +131,7 @@ def search_docs(params: Mapping[str, str]) -> tuple[str, str, list[str]]: def list_tasks(_: Mapping[str, str]) -> tuple[str, str, list[str]]: """Return MCP task list contents.""" - tasks_file = RepoPath / "specs" / "001-mcp-server" / "tasks.md" + tasks_file = RepoPath / "specs" / "002-mcp-server" / "tasks.md" return ("ok", _read_text(tasks_file) or "Tasks not found.", []) @@ -177,7 +177,7 @@ def tool_catalog() -> tuple[Tool, ...]: summary="Search across docs for maintenance topics", ) anchor_tasks = DocsAnchor( - path=RepoPath / "specs" / "001-mcp-server" / "tasks.md", + path=RepoPath / "specs" / "002-mcp-server" / "tasks.md", anchor="tasks-mcp-server-for-repo-maintenance", summary="Implementation tasks for MCP feature", ) diff --git a/specs/001-mcp-server/checklists/requirements.md b/specs/002-mcp-server/checklists/requirements.md similarity index 96% rename from specs/001-mcp-server/checklists/requirements.md rename to specs/002-mcp-server/checklists/requirements.md index 6dbcf13..e60bbbc 100644 --- a/specs/001-mcp-server/checklists/requirements.md +++ b/specs/002-mcp-server/checklists/requirements.md @@ -2,7 +2,7 @@ **Purpose**: Validate specification completeness and quality before proceeding to planning **Created**: 2026-01-30 -**Feature**: specs/001-mcp-server/spec.md +**Feature**: specs/002-mcp-server/spec.md ## Content Quality diff --git a/specs/001-mcp-server/contracts/mcp-tools.md b/specs/002-mcp-server/contracts/mcp-tools.md similarity index 100% rename from specs/001-mcp-server/contracts/mcp-tools.md rename to specs/002-mcp-server/contracts/mcp-tools.md diff --git a/specs/001-mcp-server/data-model.md b/specs/002-mcp-server/data-model.md similarity index 100% rename from specs/001-mcp-server/data-model.md rename to specs/002-mcp-server/data-model.md diff --git a/specs/001-mcp-server/plan.md b/specs/002-mcp-server/plan.md similarity index 92% rename from specs/001-mcp-server/plan.md rename to specs/002-mcp-server/plan.md index d4ec840..c62add0 100644 --- a/specs/001-mcp-server/plan.md +++ b/specs/002-mcp-server/plan.md @@ -1,7 +1,7 @@ # Implementation Plan: MCP Server for Repo Maintenance -**Branch**: `001-mcp-server` | **Date**: 2026-01-30 | **Spec**: specs/001-mcp-server/spec.md -**Input**: Feature specification from `/specs/001-mcp-server/spec.md` +**Branch**: `002-mcp-server` | **Date**: 2026-01-30 | **Spec**: specs/002-mcp-server/spec.md +**Input**: Feature specification from `/specs/002-mcp-server/spec.md` ## Summary @@ -34,7 +34,7 @@ Build a local-only MCP server under `scripts/` that Codex CLI can use to run doc ### Documentation (this feature) ```text -specs/001-mcp-server/ +specs/002-mcp-server/ ├── plan.md ├── research.md ├── data-model.md @@ -59,7 +59,7 @@ scripts/mcp-server/ └── test_docs_sync.py ``` -**Structure Decision**: Single Python project under `scripts/mcp-server` with src/tests layout; documentation lives in `docs/` and spec artifacts in `specs/001-mcp-server/`. +**Structure Decision**: Single Python project under `scripts/mcp-server` with src/tests layout; documentation lives in `docs/` and spec artifacts in `specs/002-mcp-server/`. ## Complexity Tracking diff --git a/specs/001-mcp-server/quickstart.md b/specs/002-mcp-server/quickstart.md similarity index 100% rename from specs/001-mcp-server/quickstart.md rename to specs/002-mcp-server/quickstart.md diff --git a/specs/001-mcp-server/research.md b/specs/002-mcp-server/research.md similarity index 100% rename from specs/001-mcp-server/research.md rename to specs/002-mcp-server/research.md diff --git a/specs/001-mcp-server/spec.md b/specs/002-mcp-server/spec.md similarity index 99% rename from specs/001-mcp-server/spec.md rename to specs/002-mcp-server/spec.md index fd398c5..68e3d39 100644 --- a/specs/001-mcp-server/spec.md +++ b/specs/002-mcp-server/spec.md @@ -1,6 +1,6 @@ # Feature Specification: MCP Server for Repo Maintenance -**Feature Branch**: `001-mcp-server` +**Feature Branch**: `002-mcp-server` **Created**: 2026-01-30 **Status**: Draft **Input**: User description: "build a mcp server under the directory /scripts the intention for this mcp server is to be consumed by codex-cli to help on modifying the repository by doing but not limited to, the tasks declared on the ai-oriented documentation found in /docs. as an extra, I want this mcp to have tests, which run on the gitea pipeline when any changes done to the mcp or docs directories are commited. expand the ai-documentation on /docs with info about the built mcp so that it is compliant with what of the available tools of the mcp can be called for what specific tasks, ensuring that the mcp provides the easiest up to date assistance to giving this repository maintenance. When it comes to the coding preferences for the server, I want: 1) indentation kept to the bare minimum 2) guard clauses & early returns 3) easy to read coding style, with no comments, but professional easy to maintain code structure 4) functions with docstrings, typehints, etc. 5) give preference to iteration tools such as lambdas, map, filters, as opposed to for loops and multiple ifs. 6) functional code, with reduced duplicated code 7) lint & format the code" diff --git a/specs/001-mcp-server/tasks.md b/specs/002-mcp-server/tasks.md similarity index 99% rename from specs/001-mcp-server/tasks.md rename to specs/002-mcp-server/tasks.md index 20bbd62..4ea5513 100644 --- a/specs/001-mcp-server/tasks.md +++ b/specs/002-mcp-server/tasks.md @@ -1,6 +1,6 @@ # Tasks: MCP Server for Repo Maintenance -**Input**: Design documents from `/specs/001-mcp-server/` +**Input**: Design documents from `/specs/002-mcp-server/` **Prerequisites**: plan.md, spec.md, research.md, data-model.md, contracts/ ## Phase 1: Setup (Shared Infrastructure)