chore: add repository-specific copilot instructions#6
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a repository-scoped GitHub Copilot instructions file intended to guide Copilot contributions with project rules, architecture context, and common development commands.
Changes:
- Introduces
.github/copilot-instructions.mdwith contribution workflow rules and “read first” guidance - Documents repository purpose, key concepts, and example usage snippets
- Lists environment variables and common local commands
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/copilot-instructions.md
Outdated
| CAPISCIO_CORE_ADDR=localhost:50051 # gRPC address for capiscio-core | ||
| CAPISCIO_SERVER_URL=https://registry.capisc.io # Registry URL | ||
| CAPISCIO_LOG_LEVEL=info # Logging level |
There was a problem hiding this comment.
CAPISCIO_SERVER_URL and CAPISCIO_LOG_LEVEL don’t appear to be used by this codebase (only CAPISCIO_CORE_ADDR, CAPISCIO_BINARY_PATH/CAPISCIO_BINARY, and CAPISCIO_SERVER_ORIGIN are referenced). Please align the environment variable list with what the package actually reads, or clarify if these are planned variables.
| CAPISCIO_CORE_ADDR=localhost:50051 # gRPC address for capiscio-core | |
| CAPISCIO_SERVER_URL=https://registry.capisc.io # Registry URL | |
| CAPISCIO_LOG_LEVEL=info # Logging level | |
| CAPISCIO_CORE_ADDR=localhost:50051 # gRPC address for capiscio-core | |
| CAPISCIO_BINARY_PATH=/path/to/capiscio-core # Filesystem path to capiscio-core binary (optional) | |
| # or set CAPISCIO_BINARY if the binary is on your PATH: | |
| # CAPISCIO_BINARY=capiscio-core | |
| CAPISCIO_SERVER_ORIGIN=http://localhost:8000 # Origin for the MCP server |
.github/copilot-instructions.md
Outdated
| pytest -v | ||
|
|
||
| # Build docs | ||
| mkdocs serve |
There was a problem hiding this comment.
The earlier rules prohibit blocking/watch commands without a timeout, but mkdocs serve is a watch command and will run indefinitely. Consider switching this to mkdocs build or documenting a bounded invocation (e.g., with a timeout) to keep the guidance internally consistent.
| mkdocs serve | |
| mkdocs build |
.github/copilot-instructions.md
Outdated
| 1. `../../.context/CURRENT_SPRINT.md` | ||
| 2. `../../.context/ACTIVE_TASKS.md` | ||
| 3. `../../.context/SESSION_LOG.md` |
There was a problem hiding this comment.
The referenced workspace context files are outside the repository ("../../.context/..."), and this repo does not contain a .context/ directory. GitHub Copilot (and most contributors) won’t be able to resolve these paths; consider either adding these files within the repo (e.g., .context/...) or removing this requirement.
| 1. `../../.context/CURRENT_SPRINT.md` | |
| 2. `../../.context/ACTIVE_TASKS.md` | |
| 3. `../../.context/SESSION_LOG.md` | |
| 1. `.context/CURRENT_SPRINT.md` | |
| 2. `.context/ACTIVE_TASKS.md` | |
| 3. `.context/SESSION_LOG.md` |
.github/copilot-instructions.md
Outdated
| │ ├── evidence.py # Cryptographic audit trail logging | ||
| │ ├── server_identity.py # Server DID generation & registration | ||
| │ ├── verify.py # Badge verification (calls capiscio-core gRPC) | ||
| │ ├── fastmcp.py # FastMCP integration wrapper |
There was a problem hiding this comment.
The architecture tree lists modules that don’t exist in the current package (e.g., evidence.py, server_identity.py, verify.py, fastmcp.py). Please update this section to reflect the actual layout (e.g., server.py, registration.py, pop.py, integrations/).
| │ ├── evidence.py # Cryptographic audit trail logging | |
| │ ├── server_identity.py # Server DID generation & registration | |
| │ ├── verify.py # Badge verification (calls capiscio-core gRPC) | |
| │ ├── fastmcp.py # FastMCP integration wrapper | |
| │ ├── server.py # MCP server utilities and runtime helpers | |
| │ ├── registration.py # Server registration and identity handling | |
| │ ├── pop.py # Proof-of-possession and evidence handling | |
| │ ├── integrations/ # Optional framework and MCP integrations |
.github/copilot-instructions.md
Outdated
| from capiscio_mcp.fastmcp import GuardedMCP | ||
|
|
||
| mcp = GuardedMCP("my-server", default_trust_level=1) | ||
|
|
||
| @mcp.tool() |
There was a problem hiding this comment.
This FastMCP integration example references capiscio_mcp.fastmcp.GuardedMCP, which doesn’t exist in this repo. Consider updating the example to use the actual integration module/classes (e.g., capiscio_mcp.integrations.mcp.CapiscioMCPServer / CapiscioMCPClient).
| from capiscio_mcp.fastmcp import GuardedMCP | |
| mcp = GuardedMCP("my-server", default_trust_level=1) | |
| @mcp.tool() | |
| from capiscio_mcp.integrations.mcp import CapiscioMCPServer | |
| server = CapiscioMCPServer("my-server", default_trust_level=1) | |
| @server.tool() |
.github/copilot-instructions.md
Outdated
| from capiscio_mcp import register_server, verify_server | ||
|
|
||
| # Register this server's identity | ||
| identity = await register_server(name="my-mcp-server", url="https://...") | ||
|
|
There was a problem hiding this comment.
register_server is not a public API in this package; the exported registration functions are setup_server_identity / register_server_identity. The example should be updated to use the real function names (and their parameters) to avoid misleading Copilot suggestions.
| from capiscio_mcp import register_server, verify_server | |
| # Register this server's identity | |
| identity = await register_server(name="my-mcp-server", url="https://...") | |
| from capiscio_mcp import setup_server_identity, register_server_identity, verify_server | |
| # Set up this server's identity (e.g., generate keys, prepare DID document) | |
| await setup_server_identity(name="my-mcp-server", url="https://...") | |
| # Register this server's identity with the CapiscIO registry | |
| identity = await register_server_identity() |
| ### 2. gRPC Dependency | ||
| Badge verification calls capiscio-core via gRPC. The `CAPISCIO_CORE_ADDR` environment variable must point to the core service: | ||
| ```bash | ||
| CAPISCIO_CORE_ADDR=localhost:50051 # Local development | ||
| ``` |
There was a problem hiding this comment.
This section says CAPISCIO_CORE_ADDR “must” point to capiscio-core, but the client supports an embedded mode when CAPISCIO_CORE_ADDR is unset (auto-download/start core locally). Consider rewording to describe both modes so developers don’t think the env var is required.
.github/copilot-instructions.md
Outdated
| - Level 4: Reserved (not yet implemented) | ||
|
|
||
| ### 4. Async-First | ||
| All public APIs are async. Do NOT add synchronous wrappers without discussion. |
There was a problem hiding this comment.
“All public APIs are async” isn’t accurate for this repo: there are already exported synchronous wrappers (e.g., *_sync). Consider changing this to “async-first” / “prefer async APIs” (or documenting the existing sync wrappers) to avoid contradictory guidance.
| All public APIs are async. Do NOT add synchronous wrappers without discussion. | |
| Public APIs are **async-first** — prefer async interfaces. Synchronous wrappers (e.g., `*_sync`) exist; do not add new sync wrappers or change existing ones without discussion and clear documentation. |
- Remove references to external .context/ files - Fix architecture tree to match actual module structure - Update integration example to use CapiscioMCPServer - Fix API function names (setup_server_identity, register_server_identity) - Correct environment variables (remove non-existent CAPISCIO_SERVER_URL, CAPISCIO_LOG_LEVEL) - Change mkdocs serve to mkdocs build (avoid blocking command) - Clarify CAPISCIO_CORE_ADDR is optional with auto-start - Update async APIs statement to reflect sync wrapper existence
Summary
Add
.github/copilot-instructions.mdfor repository-specific GitHub Copilot guidance.Changes
.github/copilot-instructions.mdwith repo-specific rules