Skip to main content

Technical Context Discovery

Folder: .github/skills/tsh-technical-context-discovering/
Used by: Architect, Code Reviewer, Software Engineer, E2E Engineer, Copilot Engineer, Context Engineer

Provides a systematic process for understanding project context before any code changes. Enforces a strict priority hierarchy to ensure consistency.

Priority Hierarchy

1. Project instructions (*.instructions.md)     ← HIGHEST
2. Existing codebase patterns
3. External documentation (context7, OWASP, etc.)
4. General best practices ← LOWEST
Critical Rule

Never introduce new patterns unless explicitly requested by the user. Always replicate existing conventions.

Process

Step 1: Discover Copilot Instructions

Search for instruction files:

  • .github/copilot-instructions.md — Global project instructions.
  • *.instructions.md — Feature or module-specific instructions.
  • .copilot/ — Additional configuration directory.

Step 2: Analyse Codebase Patterns

Identify established patterns for:

AreaWhat to Look For
ArchitectureFolder structure, module boundaries, layering
Code StyleNaming conventions, formatting, imports
Error HandlingError types, try/catch patterns, error responses
ValidationInput validation, schema validation, sanitization
TestingTest framework, patterns, naming, coverage
DatabaseORM usage, migration patterns, query styles
APIEndpoint structure, middleware, response format
ConfigurationEnvironment variables, config files

Step 3: Consult External Documentation

Use Context7 tool for framework-specific documentation. Reference OWASP, SOLID, and industry standards.

Step 4: Apply Decision Hierarchy

SituationSource of Truth
Instructions exist for this caseFollow instructions
No instructions, but pattern existsReplicate the pattern
No instructions or patternsFollow skill best practices
Conflict between sourcesInstructions > Patterns > Best practices

Connected Skills

  • tsh-architecture-designing — Design solutions following discovered conventions.
  • tsh-codebase-analysing — Deep analysis of existing patterns.
  • tsh-sql-and-database-understanding — Database-specific context discovery.