-
Notifications
You must be signed in to change notification settings - Fork 0
Feature Package #3
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
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3516c59
Package transfomrer
StanBarrows 1da39ce
Updated .gitignore
StanBarrows 36ff96d
Stop tracking vendor directory
StanBarrows 67fd10c
Updated Skills
StanBarrows dec08e7
Implemented Github Actions
StanBarrows cf92256
Updated ActionS2
StanBarrows f2a5c5c
Updated Action
StanBarrows 558ea2d
Updated Action
StanBarrows 53b8218
Disabled Skill Test
StanBarrows File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,23 @@ | ||
| .idea | ||
| # Dependencies | ||
| /vendor/ | ||
| node_modules/ | ||
|
|
||
| # Composer | ||
| composer.lock | ||
| composer.phar | ||
|
|
||
| # IDE | ||
| .idea/ | ||
| .vscode/ | ||
| *.swp | ||
| *.swo | ||
|
|
||
| # OS | ||
| .DS_Store | ||
| Thumbs.db | ||
|
|
||
| # PHP / Testing | ||
| .phpunit.result.cache | ||
| .php-cs-fixer.cache | ||
| coverage/ | ||
| .phpunit.cache/ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # The MIT License (MIT) | ||
|
|
||
| Copyright (c) codebar-ag | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,113 +1,50 @@ | ||
| # Rules Structure | ||
|
|
||
| This file defines the folder structure and conventions for adding new Cursor rules. | ||
| This file defines the folder structure and conventions for skills in this package. | ||
|
|
||
| ## Folder Layout | ||
| ## Package Layout | ||
|
|
||
| Skills live in `resources/boost/skills/{skill-name}/SKILL.md` — the path Laravel Boost discovers for vendor packages. | ||
|
|
||
| ``` | ||
| rules/ | ||
| testing/ # Test framework and quality tool rules | ||
| frontend/ # Blade, Livewire, CSS, and JS rules | ||
| backend/ # General PHP conventions | ||
| laravel/ # Laravel framework conventions | ||
| services/ # External API integration rules | ||
| resources/boost/skills/ | ||
| general/ # Laravel conventions | ||
| models/ # Eloquent models | ||
| actions/ # Action pattern | ||
| blade/ # Blade templates | ||
| livewire/ # Livewire components | ||
| phpunit/ # PHPUnit tests | ||
| saloon/ # Saloon API integrations | ||
| ... # See README for full list | ||
| ``` | ||
|
|
||
| ## Categories | ||
|
|
||
| ### testing/ | ||
|
|
||
| Rules for test frameworks and static analysis tools. | ||
|
|
||
| | File | Scope | Description | | ||
| |------|-------|-------------| | ||
| | `phpunit.mdc` | `tests/**/*.php` | PHPUnit test structure, naming, assertions, and factory conventions | | ||
| | `phpstan.mdc` | Always | PHPStan Level 9 static analysis compliance | | ||
| | `pest-testing.mdc` | Laravel Testing Framework Pest 4 | | ||
|
|
||
|
|
||
| ### frontend/ | ||
|
|
||
| Rules for frontend technologies and templating. | ||
|
|
||
| | File | Scope | Description | | ||
| |------|-------|-------------| | ||
| | `blade.mdc` | `resources/views/**/*.blade.php` | Blade template conventions and best practices | | ||
| | `design.mdc` | `resources/views/**/*.blade.php` | Component-first design system and responsive UI conventions | | ||
| | `livewire.mdc` | `app/Livewire/**/*.php` | Livewire component patterns and conventions | | ||
| | `tailwind.mdc` | `resources/css/**` | Tailwind CSS v4 styling conventions | | ||
| | `translations.mdc` | `lang/**/*.php,lang/**/*.json,resources/views/**/*.blade.php,app/**/*.php` | Translation and localization conventions | | ||
|
|
||
| ### backend/ | ||
|
|
||
| Rules for general PHP backend conventions (not Laravel-specific). | ||
|
|
||
| | File | Scope | Description | | ||
| |------|-------|-------------| | ||
| | `actions.mdc` | `app/Actions/**/*.php` | Action conventions — single-purpose business logic classes | | ||
| | `commands.mdc` | `app/Console/Commands/**/*.php` | Command conventions — command classes, how to use them, and what belongs in them | | ||
| | `dto.mdc` | `**/DataObjects/**/*.php` | Readonly Data Transfer Object conventions with fromArray factory | | ||
| | `enums.mdc` | `app/Enums/**/*.php` | PHP backed enum conventions with label and color helpers | | ||
| | `events-listeners.mdc` | `app/Events/**/*.php,app/Listeners/**/*.php` | Event & Listener conventions — decoupled communication between application layers | | ||
| | `exceptions.mdc` | `app/Exceptions/**/*.php` | Exception conventions — custom exceptions for domain and application errors | | ||
| | `helpers.mdc` | `app/Helpers/**/*.php` | Helper conventions — helper classes how to use and what belongs into it | | ||
| | `interfaces-contracts.mdc` | `app/Contracts/**/*.php` | Interface & Contract conventions — defining contracts between components | | ||
| | `jobs.mdc` | `app/Jobs/**/*.php` | Queued job conventions with retries, backoff, and structured logging | | ||
| | `middleware.mdc` | `app/Http/Middleware/**/*.php` | Middleware conventions — HTTP request and response pipeline | | ||
| | `observers.mdc` | `app/Observers/**/*.php` | Observer conventions — reacting to Eloquent model lifecycle events | | ||
| | `php.mdc` | `app/**/*.php` | General PHP conventions -- strict typing, formatting, language | | ||
| | `policies.mdc` | `app/Policies/**/*.php` | Policy conventions — authorization logic for models and resources | | ||
| | `requests.mdc` | `app/Http/Requests/**/*.php` | Form Request validation conventions | | ||
| | `resources.mdc` | `app/Http/Resources/**/*.php` | Resource conventions — API resources, collections, and response shaping | | ||
| | `services.mdc` | `app/Services/**/*.php` | Service conventions — complex orchestration across multiple domains | | ||
| | `traits.mdc` | `app/Traits/**/*.php` | Trait conventions — when to use traits, how to write them, and what belongs in them | | ||
| ## How to Add a New Skill | ||
|
|
||
| ### laravel/ | ||
|
|
||
| Rules for Laravel framework conventions. | ||
|
|
||
| | File | Scope | Description | | ||
| |------|-------|-------------| | ||
| | `general.mdc` | Always | Project-wide Laravel conventions that always apply | | ||
| | `laravel-helperfunctions.mdc` | Always | Laravel Helper Functions – Always use Arr::, Str:: and Collection methods instead of native PHP equivalents | | ||
| | `models.mdc` | `app/Models/**/*.php` | Eloquent model conventions -- guarded, casts, sections, activity log | | ||
| | `controllers.mdc` | `app/Http/Controllers/**/*.php` | Controller conventions -- thin controllers, invokable, service delegation | | ||
| | `migrations.mdc` | `database/migrations/**/*.php` | Database migration conventions -- always new files, naming, structure | | ||
| | `form-requests.mdc` | `app/Http/Requests/**/*.php,app/Http/Controllers/**/*.php` | Dedicated Form Request validation classes for all controller input | | ||
| | `routing.mdc` | `routes/**/*.php` | Route file conventions -- api vs web, grouping, model binding | | ||
|
|
||
| ### services/ | ||
|
|
||
| Rules for external API integrations. Add a new file for each service. | ||
|
|
||
| | File | Scope | Description | | ||
| |------|-------|-------------| | ||
| | `saloon.mdc` | `app/Services/**/*.php` | Saloon-based service layer pattern for external API integrations | | ||
| | `docuware.mdc` | `app/Services/DocuWare/**/*.php` | DocuWare integration patterns -- connector, webhook, import lifecycle | | ||
| | `albatros.mdc` | `app/Services/Albatros/**/*.php` | Albatros accounting API integration -- Saloon connector, DTOs, pagination | | ||
|
|
||
| ## How to Add a New Rule | ||
|
|
||
| 1. Choose the correct category folder (or create a new one if needed) | ||
| 2. Create a `.mdc` file with YAML frontmatter: | ||
| 1. Create `resources/boost/skills/{skill-name}/SKILL.md` | ||
| 2. Add YAML frontmatter with `name` and `description` (required by [Agent Skills format](https://agentskills.io/what-are-skills)): | ||
|
|
||
| ```markdown | ||
| --- | ||
| description: Brief description of what this rule covers | ||
| globs: app/Path/**/*.php | ||
| alwaysApply: false | ||
| name: my-skill | ||
| description: Brief description of when to use this skill | ||
| --- | ||
|
|
||
| # Rule Title | ||
| # Skill Title | ||
|
|
||
| ## Rules | ||
| - Rule 1 | ||
| - Rule 2 | ||
|
|
||
| Your rule content here... | ||
| ## Examples | ||
| ... | ||
|
|
||
| ## Anti-Patterns | ||
| ... | ||
| ``` | ||
|
|
||
| 3. Set the frontmatter: | ||
| - `description`: shown in Cursor's rule picker | ||
| - `globs`: file pattern -- rule activates when matching files are open | ||
| - `alwaysApply: true`: rule applies to every conversation (use sparingly) | ||
| 3. Use lowercase kebab-case for folder names: `my-skill` | ||
| 4. Keep skills concise with clear Rules, Examples, and Anti-Patterns | ||
|
|
||
| ## Overriding Skills | ||
|
|
||
| 4. Keep rules concise (under 50 lines of content) | ||
| 5. Include code examples showing the preferred pattern | ||
| 6. Use lowercase kebab-case for filenames: `my-service.mdc` | ||
| Projects can override any skill by creating `.ai/skills/{skill-name}/SKILL.md` in their Laravel project. The local file takes precedence over the package default. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| { | ||
| "name": "codebar-ag/coding-guidelines", | ||
| "description": "Shared Laravel AI coding guidelines and skills for codebar-ag projects. Boost-first Composer package.", | ||
| "keywords": [ | ||
| "laravel", | ||
| "boost", | ||
| "ai", | ||
| "cursor", | ||
| "coding-guidelines", | ||
| "skills" | ||
| ], | ||
| "license": "MIT", | ||
| "require": { | ||
| "php": "^8.2" | ||
| }, | ||
| "suggest": { | ||
| "laravel/boost": "Required for skill discovery. Install in your Laravel project." | ||
| }, | ||
| "autoload": { | ||
| "psr-4": { | ||
| "CodebarAg\\CodingGuidelines\\": "src/" | ||
| } | ||
| }, | ||
| "autoload-dev": { | ||
| "psr-4": { | ||
| "CodebarAg\\CodingGuidelines\\Tests\\": "tests/" | ||
| } | ||
| }, | ||
| "extra": { | ||
| "laravel": { | ||
| "providers": [ | ||
| "CodebarAg\\CodingGuidelines\\CodingGuidelinesServiceProvider" | ||
| ] | ||
| } | ||
| }, | ||
| "config": { | ||
| "sort-packages": true | ||
| }, | ||
| "minimum-stability": "dev", | ||
| "prefer-stable": true | ||
| } | ||
This file was deleted.
Oops, something went wrong.
5 changes: 4 additions & 1 deletion
5
skills/Actions/SKILL.md → resources/boost/skills/actions/SKILL.md
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra.laravel.providersregistersCodingGuidelinesServiceProvider, which extendsIlluminate\Support\ServiceProvider, but the package does not require any Laravel/Illuminate dependency. To avoid allowing incompatible installs (and runtime failures in Laravel contexts if constraints drift), either add an explicit requirement likeilluminate/support(orlaravel/framework) with appropriate version constraints, or remove the provider entry if it isn’t needed for Boost skill discovery.