Skip to content

Discover configured Copilot instruction locations#171

Merged
grnbtqdbyx-create merged 1 commit into
mainfrom
codex/vscode-instructions-locations
Jun 1, 2026
Merged

Discover configured Copilot instruction locations#171
grnbtqdbyx-create merged 1 commit into
mainfrom
codex/vscode-instructions-locations

Conversation

@grnbtqdbyx-create
Copy link
Copy Markdown
Owner

Summary

  • discover repo-relative Copilot instruction folders from VS Code chat.instructionsFilesLocations
  • include configured *.instructions.md files in context health/security scans
  • extend copilot-missing-applyto to configured instruction files and document v0.73.0

Source

  • VS Code custom instructions docs describe *.instructions.md, applyTo, default .github/instructions, and configurable chat.instructionsFilesLocations folders.

Verification

  • pnpm vitest run tests/contextFiles.test.ts tests/contextHealth.test.ts
  • pnpm vitest run tests/contextFiles.test.ts tests/contextHealth.test.ts tests/cli.test.ts tests/init.test.ts tests/agentSurfaceMap.test.ts
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • node dist/cli.js surface-map --output contextforge-agent-surface-map.md
  • node dist/cli.js agents-md-audit
  • node dist/cli.js doctor --summary contextforge-doctor.md
  • node dist/cli.js audit --min-context-score 70 --min-cache-score 70 --min-security-score 70 --output contextforge-audit.json --report contextforge-report.html
  • node dist/cli.js publish-readiness --summary contextforge-publish-readiness.md
  • node dist/cli.js scorecard --output contextforge-scorecard.md
  • node dist/cli.js security-benchmark
  • npm pack --dry-run --json
  • git diff --check

Closes #170

@grnbtqdbyx-create grnbtqdbyx-create merged commit 552026c into main Jun 1, 2026
7 checks passed
@grnbtqdbyx-create grnbtqdbyx-create deleted the codex/vscode-instructions-locations branch June 1, 2026 05:27
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7eef072c62

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils/contextFiles.ts
const files: ContextFileRef[] = [];
for (const location of configuredLocations) {
const absoluteLocation = path.join(rootDir, location);
const instructionFiles = await listFiles(absoluteLocation, (filePath) => /\.instructions\.md$/i.test(filePath));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Support glob patterns in configured Copilot locations

When chat.instructionsFilesLocations uses a repo-relative glob such as "docs/**/*.instructions.md": true, VS Code treats that as a valid configured instruction location (the VS Code settings reference says this setting “Supports glob patterns for file paths”), but this code joins the glob text as a literal directory and calls listFiles under it, so the health/security scans silently miss Copilot instructions that are actually loaded by VS Code.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discover configured VS Code Copilot instruction locations

1 participant