Added AI commands and instructions for the repo.#652
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces two new AI-focused CLI commands and sets up initial project instructions.
- Adds
ai:initcommand to initialize LLM API credentials and manage.gitignore. - Adds
ai:generate-instructionscommand to produce project-specific AI coding guidance. - Creates a baseline
.github/copilot-instructions.mdwith FlightPHP project guidelines.
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/commands/AiInitCommandTest.php | New PHPUnit tests covering credential initialization workflow |
| tests/commands/AiGenerateInstructionsCommandTest.php | New tests for instruction generation command |
| flight/commands/AiInitCommand.php | Implements ai:init command |
| flight/commands/AiGenerateInstructionsCommand.php | Implements ai:generate-instructions command |
| .github/copilot-instructions.md | Adds initial project instructions document |
Comments suppressed due to low confidence (3)
tests/commands/AiInitCommandTest.php:15
- [nitpick] The variable name
$ouis ambiguous; consider renaming it to$outor$outputfor clarity in your tests.
protected static $ou;
flight/commands/AiGenerateInstructionsCommand.php:127
- There isn’t a test case covering the scenario where
.github/copilot-instructions.mdalready exists. Adding one would ensure existing instructions are properly read and overwritten as expected.
if (!is_dir($baseDir . '.github')) {
flight/commands/AiGenerateInstructionsCommand.php:82
- [nitpick] The indented heredoc may introduce unintended leading whitespace in the AI prompt. Consider using an unindented heredoc or a nowdoc, or applying
trim()to remove extra indentation.
$prompt = <<<EOT
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.