Repository navigation
Add GitHub Copilot instructions for repository - #341
Conversation
Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com>
Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com>
Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com>
…tices Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com>
|
@copilot One thing to note: we want to avoid new routes if at all possible. The existing view infrastructure (which uses the templates folder) should be favored, especially for read operations. Write operations, except for existing ones (like posting files), should be posed as writing relevant nanopublications to the graph at the /pub route. |
…er new routes Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com>
Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com>
Updated the Copilot instructions to emphasize these architectural principles:
Changes in commits 22713e6 and 1300471. The instructions now clearly guide developers to prefer the view infrastructure and plugin system over adding new routes. |
|
@copilot You also need to update the search views in default_vocab.ttl to make sure things render correctly. That's the primary way that we display web pages and data. |
|
@copilot Also note that render_view is driven from the vocab system (default_vocab.ttl and the KGApp vocab.ttl files). New views need to be registered there to be actually used. |
Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com>
Added comprehensive documentation about the vocabulary-driven view system:
The instructions now clearly explain that templates won't be used by |
Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com>
|
@copilot , the database operations section is wrong. Access to the full knowledge graph should be via flask.current_app.db. |
…base module Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com>
Fixed the database operations section to use
Changes in commit 64466c3. |
Plan: Set up Copilot Instructions for Whyis Repository
.github/copilot-instructions.mdwith comprehensive guidelines✅ Completed
Successfully created comprehensive GitHub Copilot instructions file at
.github/copilot-instructions.md(517 lines).Latest Updates:
✅ Fixed Database Operations Section:
from whyis.database import databaseto correctfrom flask import current_appcurrent_app.dbfor accessing the full knowledge graphKey Features:
✅ Architectural Principles:
/pubroute for writes via nanopublicationsrender_view()to workcurrent_app.db✅ Vocabulary-Driven View System:
render_view()system.ttlfiles✅ Database Access Patterns: Correct examples using
current_app.db✅ View Infrastructure: Detailed guidance on using
render_view()with vocab registration✅ Plugin System: Guide for creating modular plugins
✅ Flask Conventions: Emphasizes view infrastructure over routes
✅ Project Overview: Nano-scale knowledge graph framework description
✅ Technology Stack: Python 3.8-3.11, Flask, RDF/SPARQL, Vue.js, Celery, Redis, pytest
✅ Repository Structure: Detailed directory organization
✅ Development Workflow: Setup, testing, linting commands
✅ Coding Conventions: Python style (PEP 8), testing patterns, RDF conventions
✅ Common Patterns: View infrastructure, vocab files, nanopublications, agents, database operations
✅ Testing Guidelines: Unit, integration, API test organization with pytest
✅ Dependencies: Accurate guidance for adding Python and JavaScript dependencies
✅ Security Considerations: Input validation, injection prevention, XSS protection
✅ CI/CD: GitHub Actions workflow documentation
✅ Build Process: Python package and frontend build instructions
✅ Common Tasks: Adding modules, features (with vocab registration), agents, plugins
✅ Tips for Copilot: Architecture-first approach emphasizing view infrastructure and plugins
This comprehensive guide helps GitHub Copilot understand the vocabulary-driven view system, correct database access patterns, and architectural principles.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.