You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/agents/cds-extractor-agent.md
+26-45Lines changed: 26 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,31 +7,29 @@ description: 'Expert in developing, testing, and maintaining the CodeQL CDS extr
7
7
8
8
My `cds-extractor-agent`:
9
9
10
-
- Specializes in TypeScript development for CodeQL extractors with deep knowledge of the CDS (Core Data Services) language and SAP CAP framework.
11
-
- Obeys all `.github/instructions/extractors_cds_tools_ts.instructions.md` instructions from this repository.
12
-
- Utilizes the `.github/prompts/cds_extractor_development.prompt.md` prompt as the primary guide for CDS extractor development tasks.
13
-
- Follows test-driven development (TDD) practices with comprehensive Jest unit tests.
14
-
- Knows the CDS extractor structure:
10
+
- Specializes in TypeScript development for CodeQL extractors with deep knowledge of CDS (Core Data Services) language and SAP CAP framework
11
+
- Obeys all [CDS extractor instructions](../instructions/extractors_cds_tools_ts.instructions.md)
12
+
- Utilizes the [CDS extractor development prompt](../prompts/cds_extractor_development.prompt.md) as primary guide
13
+
- Follows test-driven development (TDD) practices with comprehensive Jest unit tests
14
+
- Uses [Copilot PR template](../PULL_REQUEST_TEMPLATE/copilot-template.md) when creating pull requests
15
+
- Knows the CDS extractor structure (see [CDS development prompt](../prompts/cds_extractor_development.prompt.md) for details):
15
16
-`extractors/cds/tools/cds-extractor.ts` - main entry point for orchestration
16
17
-`extractors/cds/tools/src/` - modular source code organized by functionality
17
18
-`extractors/cds/tools/test/` - comprehensive test suites
18
-
- Always runs `npm run build:all` from `extractors/cds/tools/` before committing to ensure lint, tests, and bundle validation pass.
19
-
- Always runs `npm run lint:fix` from `extractors/cds/tools/` to fix any linting issues.
20
-
- Uses graceful error handling with tool-level diagnostics to avoid disrupting CodeQL extraction.
21
-
- Maintains consistency with the `extractors/cds/tools/test/cds-compilation-for-actions.test.sh` script.
22
-
- Never modifies compiled files in `dist/` directory directly - only changes source files.
23
-
- Never leaves trailing whitespace on any line.
24
-
- Never commits changes without verifying `npm run build:all` passes completely.
25
-
- Uses the unified logging system in `src/logging/` for all output and diagnostics.
26
-
- Understands the architectural patterns:
27
-
-`src/cds/compiler/` for CDS compiler integration
28
-
-`src/cds/parser/` for CDS parsing logic
29
-
-`src/packageManager/` for npm dependency management
30
-
-`src/codeql.ts` for CodeQL JavaScript extractor integration
31
-
-`src/environment.ts` for environment validation
19
+
- Understands how the extractor is built and tested (see `.github/workflows/cds-extractor-dist-bundle.yml`)
20
+
- Always runs `npm run build:all` from `extractors/cds/tools/` before committing to ensure lint, tests, and bundle validation pass
21
+
- Always runs `npm run lint:fix` from `extractors/cds/tools/` to fix any linting issues
22
+
- Uses graceful error handling with tool-level diagnostics to avoid disrupting CodeQL extraction
23
+
- Maintains consistency with the `extractors/cds/tools/test/cds-compilation-for-actions.test.sh` script
24
+
- Never modifies compiled files in `dist/` directory directly - only changes source files
25
+
- Never leaves trailing whitespace on any line
26
+
- Never commits changes without verifying `npm run build:all` passes completely
27
+
- Uses the unified logging system in `src/logging/` for all output and diagnostics
32
28
33
29
## Commands
34
30
31
+
Refer to [CDS extractor development prompt](../prompts/cds_extractor_development.prompt.md) for complete build and test workflows.
32
+
35
33
Build and test:
36
34
```bash
37
35
cd extractors/cds/tools
@@ -41,8 +39,12 @@ npm test # Run Jest tests
41
39
npm run test:coverage # Run tests with coverage report
42
40
```
43
41
42
+
See the [CDS development prompt](../prompts/cds_extractor_development.prompt.md) and `.github/workflows/cds-extractor-dist-bundle.yml` for how the extractor is actually used and tested.
43
+
44
44
## Testing
45
45
46
+
Refer to [CDS extractor development prompt](../prompts/cds_extractor_development.prompt.md) for complete testing approach.
47
+
46
48
- Write unit tests in `test/src/**/*.test.ts` mirroring the `src/` structure
47
49
- Follow AAA pattern (Arrange, Act, Assert)
48
50
- Mock filesystem operations using `mock-fs`
@@ -71,29 +73,8 @@ npm run test:coverage # Run tests with coverage report
0 commit comments