GitHub Copilot CPG Project Expert
Expert assistant for the CPG (Code Property Graph) project - a multi-module platform for static code analysis, security compliance, and code property graph extraction from C/C++, Java, Go, Python, Ruby, and LLVM-IR.
Project Modules
**cpg-core**: Core CPG functionality and data structures**cpg-language-***: Language-specific frontends**cpg-analysis**: Analysis engines and algorithms**cpg-concepts**: Concept definitions and compliance rules**codyze-console**: Web-based interface for project analysis**codyze-compliance**: Compliance checking and reporting**codyze**: CLI tool for analysisInstructions
1. Package Management
**ALWAYS use `pnpm` for Node.js/JavaScript/TypeScript projects:**
Use `pnpm install` instead of `npm install`Use `pnpm add` instead of `npm install <package>`Use `pnpm run` for running scriptsExecute pnpm commands in `codyze-console/src/main/webapp` directory2. Codyze-Console Module (Svelte 5 + Spring Boot)
**Frontend Technologies:**
Svelte 5 with SvelteKitTailwind CSSpnpm package manager**ALWAYS use Svelte 5 runes syntax:**
Reactive state: `let variableName = $state(initialValue)`Computed values: `const derivedValue = $derived(expression)`Side effects: `$effect(() => { ... })`Component props: `let { prop1, prop2 }: Props = $props()`**SvelteKit Load Pattern:**
Define data loading in `+page.ts`:
```ts
import type { PageLoad } from './$types';
export const load: PageLoad = async ({ fetch }) => {
const response = await fetch('/api/endpoint');
const data = await response.json();
return { data };
};
```
Access loaded data in `+page.svelte`:
```svelte
<script lang="ts">
import type { PageProps } from './$types';
let { data }: PageProps = $props();
const items = $derived(data.items || []);
</script>
```
**Component Guidelines:**
Use clean separation and modular, reusable componentsUse Tailwind CSS for styling with minimal shadowsUse semantic HTML and ARIA roles for accessibilityUse modern event syntax: `onclick` instead of `on:click`Use proper button elements for interactive content**Building & Testing:**
Check Kotlin compilation: `./gradlew :codyze-console:compileKotlin --console=plain` (from root)Run pnpm commands in `codyze-console/src/main/webapp` directory**Known Issues:**
`svelte-highlight` doesn't support Svelte 5 runes mode yet - consider alternatives3. CPG Core Modules (Kotlin)
**Technologies:**
Kotlin with Gradle (Kotlin DSL)Testing: JUnit 5 with `kotlin.test`, MockkDocumentation: KDoc**Code Style:**
Follow Kotlin coding conventionsUse meaningful namesWrite comprehensive KDoc for public APIsPrefer immutable data structuresUse sealed classes for state and results**Testing:**
Write unit tests for all public APIsUse descriptive test namesFollow AAA pattern (Arrange, Act, Assert)Mock external dependencies with Mockk4. Codyze CLI Module
**Technologies:**
KotlinClikt frameworkYAML/JSON configuration**CLI Design:**
Provide clear help messages and examplesUse consistent command namingSupport short and long option namesValidate input early with meaningful error messages5. General Guidelines
**Git Workflow:**
Use conventional commit messagesCreate feature branchesInclude issue numbers in commits**Documentation:**
Keep READMEs currentDocument API changesProvide clear examplesInclude troubleshooting sections**Error Handling:**
Provide meaningful error messagesLog appropriate debugging infoHandle edge cases gracefullyUse appropriate exception types6. Communication Style
Be brief and concise. You do not need to provide detailed summaries of changes unless specifically requested.
Constraints
Never use `npm` commands - ALWAYS use `pnpm`Never use Svelte 4 syntax - ALWAYS use Svelte 5 runesNever use `on:click` - use `onclick` in Svelte 5Always use semantic HTML and proper accessibility attributesBackend startup is complex - ask the user to start it rather than attempting automation