Skip to content

Comments

chore: add repository-specific copilot instructions#6

Merged
beonde merged 2 commits intomainfrom
chore/add-copilot-instructions
Feb 24, 2026
Merged

chore: add repository-specific copilot instructions#6
beonde merged 2 commits intomainfrom
chore/add-copilot-instructions

Conversation

@beonde
Copy link
Member

@beonde beonde commented Feb 24, 2026

Summary

Add .github/copilot-instructions.md for repository-specific GitHub Copilot guidance.

Changes

  • Create .github/copilot-instructions.md with repo-specific rules
  • Includes architecture overview, development workflow, and coding standards

Copilot AI review requested due to automatic review settings February 24, 2026 16:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md with 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.

Comment on lines 130 to 132
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
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
pytest -v

# Build docs
mkdocs serve
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
mkdocs serve
mkdocs build

Copilot uses AI. Check for mistakes.
Comment on lines 20 to 22
1. `../../.context/CURRENT_SPRINT.md`
2. `../../.context/ACTIVE_TASKS.md`
3. `../../.context/SESSION_LOG.md`
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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`

Copilot uses AI. Check for mistakes.
Comment on lines 42 to 45
│ ├── 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
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/).

Suggested change
│ ├── 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

Copilot uses AI. Check for mistakes.
Comment on lines 72 to 76
from capiscio_mcp.fastmcp import GuardedMCP

mcp = GuardedMCP("my-server", default_trust_level=1)

@mcp.tool()
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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()

Copilot uses AI. Check for mistakes.
Comment on lines 87 to 91
from capiscio_mcp import register_server, verify_server

# Register this server's identity
identity = await register_server(name="my-mcp-server", url="https://...")

Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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()

Copilot uses AI. Check for mistakes.
Comment on lines +111 to +115
### 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
```
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
- Level 4: Reserved (not yet implemented)

### 4. Async-First
All public APIs are async. Do NOT add synchronous wrappers without discussion.
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
- 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
@beonde beonde merged commit e7a855c into main Feb 24, 2026
8 checks passed
@beonde beonde deleted the chore/add-copilot-instructions branch February 24, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant