Skip to content

Commit c595407

Browse files
committed
Repositioned content under separate section
1 parent 92d14ca commit c595407

File tree

1 file changed

+31
-27
lines changed

1 file changed

+31
-27
lines changed

.github/copilot-instructions.md

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,37 @@ This is a **VS Code extension** that serves as an **abstraction layer** over the
1111
- **Service Layer**: Abstraction over CLI for Microsoft 365 commands
1212
- **Authentication**: Microsoft 365 authentication via `AuthProvider`
1313

14+
## Key Considerations
15+
16+
### Contribution & Branching Rules
17+
- Always read and follow contributing.md before starting work; use it as the primary source for workflow, coding standards, testing, and PR requirements.
18+
- Start new work from the dev branch:
19+
- Create feature/fix branches off dev.
20+
- Open Pull Requests that target dev. Do not open PRs targeting main.
21+
- PRs must include: summary, linked issue (if any), testing steps, and listed reviewers.
22+
- Use descriptive commit messages and reference issue numbers when applicable.
23+
- If uncertain about any change (dependency, behavior, or architecture), open an issue or ask a human reviewer instead of guessing.
24+
25+
### Extension Dependency Rules
26+
- Do not introduce new npm packages to the repository without explicit human approval. Agents must not add dependencies to package.json.
27+
- Do not update npm-shrinkwrap.json (or lockfiles) except when:
28+
- A new dependency is intentionally added to package.json, AND
29+
- A human reviewer has approved the addition in the PR. Mention dependency changes in the PR and request approver review.
30+
- Do not modify npm-shrinkwrap.json or lockfiles locally to "fix" builds; report and request guidance.
31+
32+
### File Changes & Documentation
33+
- Do not change existing file contents unless the change is required and documented in contributing.md, an open issue, or the PR description.
34+
- When editing docs or config, preserve existing formatting and context; keep changes minimal and explain why in the PR.
35+
36+
### Testing & Validation
37+
- Add or update unit tests when changing logic.
38+
- Run `npm run test` or `npm run watch-tests` locally before opening a PR.
39+
- Manual testing: verify refactored input prompts, error handling, and edge cases for user prompts.
40+
41+
### Security and privacy
42+
- Never embed secrets, tokens, or credentials in code or docs.
43+
- If work requires sensitive information, request a secure workflow from maintainers.
44+
1445
## Development Workflow
1546

1647
### Build System
@@ -30,15 +61,6 @@ npm run test # Run VS Code extension tests
3061
- `npm: watch` - Background build task (default)
3162
- `npm: watch-tests` - Background test watch task
3263

33-
### Contribution & Branching Rules
34-
- Always read and follow contributing.md before starting work; use it as the primary source for workflow, coding standards, testing, and PR requirements.
35-
- Start new work from the dev branch:
36-
- Create feature/fix branches off dev.
37-
- Open Pull Requests that target dev. Do not open PRs targeting main.
38-
- PRs must include: summary, linked issue (if any), testing steps, and listed reviewers.
39-
- Use descriptive commit messages and reference issue numbers when applicable.
40-
- If uncertain about any change (dependency, behavior, or architecture), open an issue or ask a human reviewer instead of guessing.
41-
4264
## Project Structure Patterns
4365

4466
### Core Services (`src/services/`)
@@ -67,11 +89,6 @@ npm run test # Run VS Code extension tests
6789
### Extension Dependencies
6890
- **Code Tour**: For upgrade/validation guidance
6991
- **SPFx Snippets**: Bundled coding snippets extension
70-
- Do not introduce new npm packages to the repository without explicit human approval. Agents must not add dependencies to package.json.
71-
- Do not update npm-shrinkwrap.json (or lockfiles) except when:
72-
- A new dependency is intentionally added to package.json, AND
73-
- A human reviewer has approved the addition in the PR. Mention dependency changes in the PR and request approver review.
74-
- Do not modify npm-shrinkwrap.json or lockfiles locally to "fix" builds; report and request guidance.
7592

7693
## Authentication & Microsoft 365 Integration
7794

@@ -112,10 +129,6 @@ export class ServiceName {
112129
- Centralized logging via `Logger` class in `src/services/dataType/Logger.ts`
113130
- Terminal command execution wrapped in `TerminalCommandExecuter`
114131

115-
### File Changes & Documentation
116-
- Do not change existing file contents unless the change is required and documented in contributing.md, an open issue, or the PR description.
117-
- When editing docs or config, preserve existing formatting and context; keep changes minimal and explain why in the PR.
118-
119132
## SPFx-Specific Knowledge
120133

121134
### Project Detection
@@ -134,13 +147,4 @@ export class ServiceName {
134147
- Provides filtering by author, SPFx version, component type
135148
- Supports both web parts and extensions
136149

137-
## Testing & Validation
138-
- Add or update unit tests when changing logic.
139-
- Run `npm run test` or `npm run watch-tests` locally before opening a PR.
140-
- Manual testing: verify refactored input prompts, error handling, and edge cases for user prompts.
141-
142-
## Security and privacy
143-
- Never embed secrets, tokens, or credentials in code or docs.
144-
- If work requires sensitive information, request a secure workflow from maintainers.
145-
146150
When working on this extension, prioritize understanding the service layer architecture and the dual nature of the extension (native VS Code UI + React webview). The chat participant and language model tools represent the AI-first approach to SPFx development assistance.

0 commit comments

Comments
 (0)