|
| 1 | +<!-- |
| 2 | +========================================================================================================== |
| 3 | +SPDX-License-Identifier: MIT |
| 4 | +Copyright (c) 2025 Vinny Parla |
| 5 | +File: SKILLS.MD |
| 6 | +Purpose: Repo-local skill map for agentic tools working in mcp-cpp |
| 7 | +========================================================================================================== |
| 8 | +--> |
| 9 | + |
| 10 | +# MCP C++ SDK Skills |
| 11 | + |
| 12 | +`agents.md` is the canonical policy file. This file turns those rules into repeatable execution skills for |
| 13 | +Codex, Windsurf, Cursor, VS Code, and Claude Code. |
| 14 | + |
| 15 | +## Load Order |
| 16 | + |
| 17 | +1. Read `agents.md`. |
| 18 | +2. Read `SKILLS.MD`. |
| 19 | +3. Select every matching skill before acting. |
| 20 | +4. If any command, test, build, access check, lint, doc check, or unrelated validation fails, stop and fix it |
| 21 | + immediately before continuing. |
| 22 | + |
| 23 | +## Skill: repo-governance |
| 24 | + |
| 25 | +Use for every task. |
| 26 | + |
| 27 | +- Reuse `include/mcp/` interfaces and shared transport/auth abstractions before adding parallel code paths. |
| 28 | +- Run architecture checks first. If architecture enforcement fails, all other work is blocked. |
| 29 | +- Keep SPDX headers, repository-relative `File:` paths, tests, and docs aligned with the change. |
| 30 | +- Never run builds, tests, or debug commands on the host. |
| 31 | + |
| 32 | +## Skill: docker-first-no-host-write |
| 33 | + |
| 34 | +Use for build, test, debug, inspection, or automation work that executes code. |
| 35 | + |
| 36 | +- Linux and macOS commands use `bash`. |
| 37 | +- Windows commands use `wsl -d Ubuntu -- bash -lc "..."` |
| 38 | +- Build from repo context, then run from image-embedded source. Do not mount the repo into containers. |
| 39 | +- Do not use bind mounts, named volumes, `docker cp`, `-o type=local`, or any Docker pattern that writes back to |
| 40 | + the host. |
| 41 | +- Prefer `--network none`. If network or IPC is required, stop and get explicit human approval first. |
| 42 | + |
| 43 | +```bash |
| 44 | +# Linux/macOS |
| 45 | +docker buildx build -f Dockerfile.demo --target test --progress=plain --pull --load -t mcp-cpp-test . |
| 46 | +docker run --rm --network none --read-only \ |
| 47 | + --tmpfs /tmp:rw,noexec,nosuid,size=1g \ |
| 48 | + --entrypoint bash mcp-cpp-test \ |
| 49 | + -lc "cp -a /src/build /tmp/build && ctest --test-dir /tmp/build -R '^Architecture' -VV --output-on-failure" |
| 50 | +docker run --rm --network none --read-only \ |
| 51 | + --tmpfs /tmp:rw,noexec,nosuid,size=1g \ |
| 52 | + --entrypoint bash mcp-cpp-test \ |
| 53 | + -lc "cp -a /src/build /tmp/build && ctest --test-dir /tmp/build -VV --output-on-failure" |
| 54 | + |
| 55 | +# Windows (PowerShell via WSL) |
| 56 | +wsl -d Ubuntu -- bash -lc "cd /mnt/<drive>/<path-to-repo>/mcp-cpp && \ |
| 57 | +docker buildx build -f Dockerfile.demo --target test --progress=plain --pull --load -t mcp-cpp-test ." |
| 58 | +wsl -d Ubuntu -- bash -lc "docker run --rm --network none --read-only \ |
| 59 | + --tmpfs /tmp:rw,noexec,nosuid,size=1g \ |
| 60 | + --entrypoint bash mcp-cpp-test \ |
| 61 | + -lc 'cp -a /src/build /tmp/build && ctest --test-dir /tmp/build -R \"^Architecture\" -VV --output-on-failure'" |
| 62 | +wsl -d Ubuntu -- bash -lc "docker run --rm --network none --read-only \ |
| 63 | + --tmpfs /tmp:rw,noexec,nosuid,size=1g \ |
| 64 | + --entrypoint bash mcp-cpp-test \ |
| 65 | + -lc 'cp -a /src/build /tmp/build && ctest --test-dir /tmp/build -VV --output-on-failure'" |
| 66 | +``` |
| 67 | + |
| 68 | +Emit results to stdout or stderr only. Do not export artifacts back to the host. |
| 69 | + |
| 70 | +## Skill: failure-first-remediation |
| 71 | + |
| 72 | +Use whenever anything fails, including failures that look unrelated to the active task. |
| 73 | + |
| 74 | +- Treat access-denied errors, safe-directory errors, failing unrelated tests, header drift, doc drift, lint issues, |
| 75 | + and Docker misconfiguration as blocking failures. |
| 76 | +- Fix the failure immediately, rerun the failed gate, then rerun the next broader gate that depends on it. |
| 77 | +- Do not scope a failure away as "out of band" or "not part of this task." |
| 78 | + |
| 79 | +## Skill: review-and-delivery |
| 80 | + |
| 81 | +Use when reviewing or finalizing work. |
| 82 | + |
| 83 | +- Findings come first in reviews, with file and line references. |
| 84 | +- For implementation work, verify the architecture gate before broader test suites. |
| 85 | +- If repository rules and tool rules conflict, obey the stricter rule and update the enforcement docs in the same |
| 86 | + change. |
0 commit comments