Skip to content

chore(qol): Copilot no longer uses instruction settings; it automatic… #6282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 19, 2025

Conversation

jstirnaman
Copy link
Contributor

…ally detects instructions files and PRs.

Closes #

Describe your proposed changes here.

@jstirnaman jstirnaman requested a review from Copilot August 4, 2025 19:06
Copilot

This comment was marked as outdated.

@jstirnaman jstirnaman requested a review from Copilot August 4, 2025 22:37
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes manual Copilot instruction settings from VS Code configuration and refactors the CLI documentation auditor to use dynamic command discovery instead of hardcoded command lists. The changes improve maintainability by automatically detecting available CLI commands and their subcommands from the actual CLI help output.

Key changes:

  • Removed hardcoded command lists and replaced with dynamic command discovery
  • Enhanced container management with automatic startup and status checking
  • Improved CLI help parsing with better ANSI color code handling

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
helper-scripts/influxdb3-monolith/audit-cli-documentation.js Refactored from static command lists to dynamic command discovery with improved container management and help parsing
compose.yaml Removed unused INFLUXDB3_ENTERPRISE_LICENSE_EMAIL environment variable
.vscode/settings.json Removed manual Copilot instruction settings to rely on automatic detection

@@ -343,7 +544,7 @@ class CLIDocAuditor {
const lines = content.split('\n');
let inCommand = false;
let helpText = [];
const commandHeader = `===== influxdb3 ${command} --help =====`;
const commandHeader = `===== influxdb3 ${command} --help`;
Copy link
Preview

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

The command header pattern is missing the closing '=====' delimiter. This will break the command extraction logic that expects a complete header pattern like '===== influxdb3 command --help ====='.

Suggested change
const commandHeader = `===== influxdb3 ${command} --help`;
const commandHeader = `===== influxdb3 ${command} --help =====`;

Copilot uses AI. Check for mistakes.

Comment on lines 232 to 246
// Look for any Commands section
if (trimmed.includes('Commands:') || trimmed === 'Resource Management:' ||
trimmed === 'System Management:') {
inCommandsSection = true;
continue;
}

// Stop at next section (but don't stop on management sections)
if (inCommandsSection && /^[A-Z][a-z]+:$/.test(trimmed) &&
!trimmed.includes('Commands:') &&
trimmed !== 'Resource Management:' &&
trimmed !== 'System Management:') {
break;
}

Copy link
Preview

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

The hardcoded section names ('Resource Management:', 'System Management:') make the parser brittle. Consider using a more flexible pattern or making these configurable to handle variations in CLI help format.

Suggested change
// Look for any Commands section
if (trimmed.includes('Commands:') || trimmed === 'Resource Management:' ||
trimmed === 'System Management:') {
inCommandsSection = true;
continue;
}
// Stop at next section (but don't stop on management sections)
if (inCommandsSection && /^[A-Z][a-z]+:$/.test(trimmed) &&
!trimmed.includes('Commands:') &&
trimmed !== 'Resource Management:' &&
trimmed !== 'System Management:') {
break;
}
// Look for any Commands section or section header ending with ':'
if (/^[A-Za-z0-9 _-]+:$/i.test(trimmed)) {
// Enter commands section if it's a Commands section, or a known management section
if (trimmed.toLowerCase().includes('commands') ||
trimmed.toLowerCase().includes('management')) {
inCommandsSection = true;
continue;
} else if (inCommandsSection) {
// If we're already in a commands section and hit a new section header, exit
break;
}
}

Copilot uses AI. Check for mistakes.

this.commandOptionsMap[fullCommand] = options;

// Recursively discover subcommands (but limit depth)
if (subcommands.length > 0 && commandParts.length < 3) {
Copy link
Preview

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

The magic number '3' for depth limiting should be defined as a named constant to improve code clarity and maintainability.

Copilot uses AI. Check for mistakes.

Comment on lines 3 to 5
## Collaboration approach

Be a critical thinking partner with a focus on developer experience needs, not a yes-person. Challenge assumptions, identify potential issues, and suggest alternatives when appropriate. Don't automatically agree with user suggestions - analyze them first and provide honest feedback about potential problems, better approaches, or missing considerations.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
## Collaboration approach
Be a critical thinking partner with a focus on developer experience needs, not a yes-person. Challenge assumptions, identify potential issues, and suggest alternatives when appropriate. Don't automatically agree with user suggestions - analyze them first and provide honest feedback about potential problems, better approaches, or missing considerations.
## Collaboration approach
- Be a critical thinking partner and provide honest feedback
- Focus on developer experience

… container's environment, so you don't need to use the syntax. Removed braces
…el commands and recurse through --help.\Both products work together:

Running node [audit-cli-documentation.js](http://_vscodecontentref_/1) both successfully audits both Core and Enterprise
Core templates use Core-specific frontmatter
Enterprise templates use Enterprise-specific frontmatter
Fixes audit-cli-documentation.js so that it parses commands dynamically from the CLI output.
Some commands () only return top-level help output, which the script had some difficulty with.That seems mostly resolved, but might rear again.
Moved to new tooling repo.
Removed package scripts for now.

Script Gets commands from source code and grep docs for commands- replaces the CLI audit script- searches tagged repo branch source code for CLI commands- searches docs content the commands- allows including and excluding "categories" of docs paths to search
@jstirnaman jstirnaman merged commit e2c7d72 into master Aug 19, 2025
1 check passed
@jstirnaman jstirnaman deleted the jts-qol-vscode branch August 19, 2025 15:29
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.

1 participant