docs: update copilot rules - #50
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughRestructures and expands Changes
Sequence Diagram(s)Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.cursor/rules/02-tests.mdc (1)
1-159: Helper functionmockCommandContainer()prescribed but not implemented; TestHelpers.php missing.The document extensively prescribes
mockCommandContainer()at lines 31, 37-72 with detailed usage examples and maintenance patterns. However, verification confirms:
mockCommandContainer()does not exist in the codebaseTestHelpers.phpdoes not existtests/directory contains only: Pest.php, TestCase.php, Integration/, .gitignoreThe IOService methods (promptText, promptPassword, etc.) verified successfully in
app/Services/IOService.php. However, the core testing helper infrastructure referenced throughout the rules is unimplemented, making the prescribed patterns (lines 31-72) non-functional as written.Either implement
tests/TestHelpers.phpwithmockCommandContainer()matching the prescribed signature, or rewrite the rules section to reflect actual testing patterns currently in use.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
.cursor/rules/00-main.mdc(1 hunks).cursor/rules/01-architecture.mdc(2 hunks).cursor/rules/02-tests.mdc(2 hunks).cursor/rules/03-commands.mdc(7 hunks).cursor/rules/04-bash-style.mdc(1 hunks).cursor/rules/05-playbooks.mdc(1 hunks).cursor/rules/rules.mdc(1 hunks)
🧰 Additional context used
🧠 Learnings (22)
📚 Learning: 2025-10-12T15:50:03.841Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/02-tests.mdc:0-0
Timestamp: 2025-10-12T15:50:03.841Z
Learning: Applies to tests/**/*.php : Avoid meaningless assertions (type-only checks, generic truthiness/nullness, sleeping; use time mocking)
Applied to files:
.cursor/rules/02-tests.mdc
📚 Learning: 2025-10-12T15:50:03.841Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/02-tests.mdc:0-0
Timestamp: 2025-10-12T15:50:03.841Z
Learning: Applies to tests/**/*.php : Use Pest exclusively with it() syntax for all tests
Applied to files:
.cursor/rules/02-tests.mdc
📚 Learning: 2025-10-12T15:50:03.841Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/02-tests.mdc:0-0
Timestamp: 2025-10-12T15:50:03.841Z
Learning: Applies to tests/**/*.php : Follow the AAA pattern (Arrange, Act, Assert) in all tests; add Cleanup when needed
Applied to files:
.cursor/rules/02-tests.mdc
📚 Learning: 2025-10-12T15:50:03.841Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/02-tests.mdc:0-0
Timestamp: 2025-10-12T15:50:03.841Z
Learning: Applies to tests/**/*.php : Prefer meaningful assertions invoking real behavior (config values, validators, mocks with expectations)
Applied to files:
.cursor/rules/02-tests.mdc
📚 Learning: 2025-10-12T15:50:03.841Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/02-tests.mdc:0-0
Timestamp: 2025-10-12T15:50:03.841Z
Learning: Applies to tests/**/*.php : Keep test files minimal: target under 1.8x the size of the source they cover without sacrificing readability
Applied to files:
.cursor/rules/02-tests.mdc
📚 Learning: 2025-10-10T11:09:41.980Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/01-architecture.mdc:0-0
Timestamp: 2025-10-10T11:09:41.980Z
Learning: Applies to tests/**/*.php : In tests, direct Container instantiation and bind() for mocks is allowed and encouraged for isolation
Applied to files:
.cursor/rules/02-tests.mdc
📚 Learning: 2025-10-12T15:50:03.841Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/02-tests.mdc:0-0
Timestamp: 2025-10-12T15:50:03.841Z
Learning: Applies to tests/**/*.php : Unit tests: mock all external dependencies, test single units, run in milliseconds
Applied to files:
.cursor/rules/02-tests.mdc
📚 Learning: 2025-10-12T15:50:03.841Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/02-tests.mdc:0-0
Timestamp: 2025-10-12T15:50:03.841Z
Learning: Applies to tests/**/*.php : Ignore PHPStan issues in tests; focus on test functionality over strict types
Applied to files:
.cursor/rules/02-tests.mdc
📚 Learning: 2025-10-10T11:09:41.980Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/01-architecture.mdc:0-0
Timestamp: 2025-10-10T11:09:41.980Z
Learning: Applies to tests/**/*.php : Do not run PHPStan on test files; tests are excluded from static analysis
Applied to files:
.cursor/rules/02-tests.mdc
📚 Learning: 2025-10-12T15:50:03.841Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/02-tests.mdc:0-0
Timestamp: 2025-10-12T15:50:03.841Z
Learning: Applies to src/**/*.php : Run and apply PHPStan to production code
Applied to files:
.cursor/rules/02-tests.mdc
📚 Learning: 2025-10-12T15:50:03.841Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/02-tests.mdc:0-0
Timestamp: 2025-10-12T15:50:03.841Z
Learning: Applies to tests/**/*.php : Avoid excessive phpdoc in tests solely to appease types
Applied to files:
.cursor/rules/02-tests.mdc
📚 Learning: 2025-10-12T15:50:03.841Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/02-tests.mdc:0-0
Timestamp: 2025-10-12T15:50:03.841Z
Learning: Applies to tests/**/*.php : Avoid performance tests unless performance is the primary concern
Applied to files:
.cursor/rules/02-tests.mdc
📚 Learning: 2025-10-12T15:51:30.263Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-12T15:51:30.263Z
Learning: Applies to app/Console/**/*Command.php : Define command inputs using OPTIONS only, never ARGUMENTS, to enable getOptionOrPrompt pattern
Applied to files:
.cursor/rules/03-commands.mdc
📚 Learning: 2025-10-12T15:51:30.263Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-12T15:51:30.263Z
Learning: Applies to app/Console/**/*Command.php : Use laravel/prompts for all user interactions (text, password, confirm, select, multiselect, suggest, search, spin)
Applied to files:
.cursor/rules/03-commands.mdc
📚 Learning: 2025-10-12T15:51:30.263Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-12T15:51:30.263Z
Learning: Applies to app/Console/**/*Command.php : Pair every defined option with getOptionOrPrompt to provide both CLI and interactive flows
Applied to files:
.cursor/rules/03-commands.mdc
📚 Learning: 2025-10-12T15:51:30.263Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-12T15:51:30.263Z
Learning: Applies to app/Console/**/*Command.php : Support both interactive prompts and CLI options using getOptionOrPrompt(optionName, promptCallback) for dual-mode commands
Applied to files:
.cursor/rules/03-commands.mdc
📚 Learning: 2025-10-12T15:51:30.263Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-12T15:51:30.263Z
Learning: Applies to app/Console/**/*Command.php : Follow option naming conventions: --server/--site for selecting existing resources; --name for defining new resource; --host, --port for server config; --yes/-y for confirmations; --skip to bypass validation
Applied to files:
.cursor/rules/03-commands.mdc
📚 Learning: 2025-10-12T15:51:30.263Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-12T15:51:30.263Z
Learning: Applies to app/Console/**/*Command.php : Use getValidatedOptionOrPrompt for inputs that require validation; inject validator once and reuse for prompts and options
Applied to files:
.cursor/rules/03-commands.mdc
📚 Learning: 2025-10-12T15:51:30.263Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-12T15:51:30.263Z
Learning: Applies to app/Traits/ConsoleInputTrait.php : Add input-gathering methods (promptText, promptSelect, etc.) to ConsoleInputTrait; methods should operate via $this->input
Applied to files:
.cursor/rules/03-commands.mdc
📚 Learning: 2025-10-12T15:51:30.263Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/03-commands.mdc:0-0
Timestamp: 2025-10-12T15:51:30.263Z
Learning: Applies to app/Console/**/*Command.php : Always call showCommandHint() before returning Command::SUCCESS to display non-interactive usage
Applied to files:
.cursor/rules/03-commands.mdc
📚 Learning: 2025-10-10T11:09:41.980Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/01-architecture.mdc:0-0
Timestamp: 2025-10-10T11:09:41.980Z
Learning: Applies to **/*.php : Use comments as visual separators for sections/subsections with a single newline between header, subheader, and paragraph; avoid obvious or stale comments
Applied to files:
.cursor/rules/01-architecture.mdc
📚 Learning: 2025-10-01T19:31:44.869Z
Learnt from: CR
PR: bigpixelrocket/deployer-php#0
File: .cursor/rules/00-main.mdc:0-0
Timestamp: 2025-10-01T19:31:44.869Z
Learning: Applies to **/*.php : Organize code into comment-separated sections; prefer alphabetical ordering when it does not conflict with logical grouping
Applied to files:
.cursor/rules/01-architecture.mdc
🔇 Additional comments (5)
.cursor/rules/04-bash-style.mdc (1)
1-116: Style guide content is comprehensive; verify external reference currency.The Bash style guidelines are well-structured and provide clear examples. Confirm the external style guide reference at line 7 (https://style.ysap.sh/md) is still current and accessible, and verify that the formatting standards (tabs, 80-column width) align with project tooling.
.cursor/rules/rules.mdc (1)
127-143: Rule density guidelines established; verify file compliance.The token efficiency and rule density guidelines are clearly defined. However, review whether the rule files in this PR comply with stated targets:
02-tests.mdc: ~159 lines (target 80-120) — exceeds by ~39 lines00-main.mdc: ~54 lines (target 30-50) — within range01-architecture.mdc: ~134 lines (target 80-120) — exceeds by ~14 lines03-commands.mdc: ~237 lines (target 180-220) — exceeds by ~17 lines04-bash-style.mdc: ~116 lines (target 60-100) — exceeds by ~16 lines05-playbooks.mdc: ~152 lines (target 100-140) — exceeds by ~12 linesConsider whether these overages are acceptable given content density, or if further condensing per the anti-patterns guidance (lines 92-125) is warranted.
.cursor/rules/03-commands.mdc (2)
166-210: All referenced files exist and cross-references are valid. Verification confirms thatServerValidationTrait.php,SiteValidationTrait.php,ServerDeleteCommand.php, andServerAddCommand.phpare present in the codebase at their documented locations (app/Traits/andapp/Console/Server/). The documentation examples maintain accurate references.
31-37: The referenced trait files (ConsoleOutputTrait.php and ConsoleInputTrait.php) do not exist in the codebase.All listed methods are implemented in IOService.php (app/Services/IOService.php), not in separate traits. BaseCommand receives IOService as a dependency injection. The rules document incorrectly specifies the integration points—it should reference IOService, not separate output/input traits.
Ignore the original review comment. The actual implementation is sound; the rules documentation requires correction.
Likely an incorrect or invalid review comment.
.cursor/rules/01-architecture.mdc (1)
1-134: Architecture rules verified: Container implementation matches documentation.The Container class at
./app/Container.phpcorrectly implements bothbind()(line 46) andbuild()(line 59) methods as documented. Method signatures match:bind(string $className, object $instance): selfreturns self for chaining, andbuild(string $className): objectreturns auto-wired instances or bound mocks. All PHP code examples (lines 20–68) are syntactically valid and accurately represent the documented patterns. The implementation uses reflection for dependency auto-wiring and includes circular dependency detection, matching the architectural specification.
| ### Tests | ||
|
|
||
| **✔️ Tests are off-limits:** Don't run or edit tests; run or edit tests ONLY if explicitly instructed to do so! | ||
| Don't run or create or update tests UNLESS explicitly instructed to do so. | ||
|
|
||
| **🧠 AI Agent Protocol:** ULTRATHINK → STEP BY STEP → ACT | ||
| Test are something we need focus on separately from building features. |
There was a problem hiding this comment.
Minor: Fix grammatical error in Tests section.
Line 54 should read "Tests are something we need to focus on separately" (missing "to").
🤖 Prompt for AI Agents
In .cursor/rules/00-main.mdc around lines 50 to 54, the sentence "Test are
something we need focus on separately from building features." is missing the
word "to"; update it to "Tests are something we need to focus on separately from
building features." and also correct "Test" to plural "Tests" if not already,
ensuring proper grammar and spacing.
| echo "✓ Setup complete" | ||
| ``` | ||
|
|
||
| See: server-info.sh |
There was a problem hiding this comment.
🧩 Analysis chain
Verify external reference to server-info.sh exists.
The reference "See: server-info.sh" at line 154 should point to an existing file. Confirm the file exists and is the correct location for cross-referencing from this playbook guidelines document.
🏁 Script executed:
#!/bin/bash
# Search for server-info.sh in the repository
fd -name 'server-info.sh' --type fLength of output: 230
---
🏁 Script executed:
```shell
#!/bin/bash
# Corrected search for server-info.sh using proper fd syntax
fd 'server-info\.sh' --type f
# Also search for any .sh files to understand context
echo "=== Shell scripts in repository ==="
fd '\.sh$' --type f
Length of output: 35
---
🏁 Script executed:
```shell
#!/bin/bash
# Explore repository structure
echo "=== Repository root files/directories ==="
ls -la
echo ""
echo "=== Search for 'server-info' references ==="
rg -i 'server-info' --type md
echo ""
echo "=== All files in .cursor/rules/ ==="
find .cursor/rules -type f 2>/dev/null | head -20
Length of output: 1729
---
🏁 Script executed:
```shell
#!/bin/bash
# Examine the context around line 154 in 05-playbooks.mdc
echo "=== Content around line 154 of 05-playbooks.mdc ==="
sed -n '145,165p' .cursor/rules/05-playbooks.mdc
echo ""
echo "=== Full line 154 ==="
sed -n '154p' .cursor/rules/05-playbooks.mdc
Length of output: 257
Remove broken reference to non-existent server-info.sh file.
The reference "See: server-info.sh" at line 154 points to a file that does not exist in the repository. No shell scripts are present in this codebase (PHP/Node.js project). Either remove this reference or replace it with a valid, existing file path if cross-referencing is intended.
🤖 Prompt for AI Agents
In .cursor/rules/05-playbooks.mdc around line 154, remove or replace the broken
reference "See: server-info.sh" which points to a non-existent shell script;
update the line to either delete the reference entirely or point it to a valid
existing file or documentation in this repo (e.g., a PHP/Node.js README or
internal doc) and verify the new path is correct and linked consistently
elsewhere in the file.
Summary by CodeRabbit