@event4u/agent-config 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent-src/README.md +64 -0
- package/.agent-src/commands/agent-handoff.md +64 -0
- package/.agent-src/commands/agent-status.md +83 -0
- package/.agent-src/commands/agents-audit.md +243 -0
- package/.agent-src/commands/agents-cleanup.md +169 -0
- package/.agent-src/commands/agents-prepare.md +137 -0
- package/.agent-src/commands/analyze-reference-repo.md +191 -0
- package/.agent-src/commands/bug-fix.md +181 -0
- package/.agent-src/commands/bug-investigate.md +175 -0
- package/.agent-src/commands/commit.md +121 -0
- package/.agent-src/commands/compress.md +177 -0
- package/.agent-src/commands/config-agent-settings.md +126 -0
- package/.agent-src/commands/context-create.md +167 -0
- package/.agent-src/commands/context-refactor.md +170 -0
- package/.agent-src/commands/copilot-agents-init.md +150 -0
- package/.agent-src/commands/copilot-agents-optimize.md +251 -0
- package/.agent-src/commands/create-pr-description.md +112 -0
- package/.agent-src/commands/create-pr.md +76 -0
- package/.agent-src/commands/do-and-judge.md +114 -0
- package/.agent-src/commands/do-in-steps.md +84 -0
- package/.agent-src/commands/e2e-heal.md +98 -0
- package/.agent-src/commands/e2e-plan.md +85 -0
- package/.agent-src/commands/estimate-ticket.md +80 -0
- package/.agent-src/commands/feature-dev.md +111 -0
- package/.agent-src/commands/feature-explore.md +180 -0
- package/.agent-src/commands/feature-plan.md +288 -0
- package/.agent-src/commands/feature-refactor.md +181 -0
- package/.agent-src/commands/feature-roadmap.md +184 -0
- package/.agent-src/commands/fix-ci.md +48 -0
- package/.agent-src/commands/fix-portability.md +97 -0
- package/.agent-src/commands/fix-pr-bot-comments.md +146 -0
- package/.agent-src/commands/fix-pr-comments.md +58 -0
- package/.agent-src/commands/fix-pr-developer-comments.md +152 -0
- package/.agent-src/commands/fix-references.md +94 -0
- package/.agent-src/commands/fix-seeder.md +146 -0
- package/.agent-src/commands/implement-ticket.md +133 -0
- package/.agent-src/commands/jira-ticket.md +71 -0
- package/.agent-src/commands/judge.md +86 -0
- package/.agent-src/commands/memory-add.md +130 -0
- package/.agent-src/commands/memory-full.md +97 -0
- package/.agent-src/commands/memory-promote.md +144 -0
- package/.agent-src/commands/mode.md +121 -0
- package/.agent-src/commands/module-create.md +132 -0
- package/.agent-src/commands/module-explore.md +157 -0
- package/.agent-src/commands/optimize-agents.md +139 -0
- package/.agent-src/commands/optimize-augmentignore.md +262 -0
- package/.agent-src/commands/optimize-rtk-filters.md +120 -0
- package/.agent-src/commands/optimize-skills.md +121 -0
- package/.agent-src/commands/override-create.md +97 -0
- package/.agent-src/commands/override-manage.md +96 -0
- package/.agent-src/commands/package-reset.md +154 -0
- package/.agent-src/commands/package-test.md +154 -0
- package/.agent-src/commands/prepare-for-review.md +91 -0
- package/.agent-src/commands/project-analyze.md +300 -0
- package/.agent-src/commands/project-health.md +95 -0
- package/.agent-src/commands/propose-memory.md +108 -0
- package/.agent-src/commands/quality-fix.md +106 -0
- package/.agent-src/commands/refine-ticket.md +81 -0
- package/.agent-src/commands/review-changes.md +130 -0
- package/.agent-src/commands/review-routing.md +111 -0
- package/.agent-src/commands/roadmap-create.md +110 -0
- package/.agent-src/commands/roadmap-execute.md +68 -0
- package/.agent-src/commands/rule-compliance-audit.md +139 -0
- package/.agent-src/commands/tests-create.md +73 -0
- package/.agent-src/commands/tests-execute.md +58 -0
- package/.agent-src/commands/threat-model.md +115 -0
- package/.agent-src/commands/update-form-request-messages.md +189 -0
- package/.agent-src/commands/upstream-contribute.md +171 -0
- package/.agent-src/contexts/augment-infrastructure.md +181 -0
- package/.agent-src/contexts/documentation-hierarchy.md +142 -0
- package/.agent-src/contexts/model-recommendations.md +142 -0
- package/.agent-src/contexts/override-system.md +187 -0
- package/.agent-src/contexts/skills-and-commands.md +154 -0
- package/.agent-src/contexts/subagent-configuration.md +62 -0
- package/.agent-src/guidelines/agent-infra/agent-interaction-and-decision-quality.md +110 -0
- package/.agent-src/guidelines/agent-infra/break-glass-usage.md +113 -0
- package/.agent-src/guidelines/agent-infra/developer-judgment.md +82 -0
- package/.agent-src/guidelines/agent-infra/engineering-memory-data-format.md +117 -0
- package/.agent-src/guidelines/agent-infra/layered-settings.md +158 -0
- package/.agent-src/guidelines/agent-infra/memory-access.md +121 -0
- package/.agent-src/guidelines/agent-infra/naming.md +69 -0
- package/.agent-src/guidelines/agent-infra/output-patterns.md +117 -0
- package/.agent-src/guidelines/agent-infra/review-routing-data-format.md +144 -0
- package/.agent-src/guidelines/agent-infra/role-contracts.md +211 -0
- package/.agent-src/guidelines/agent-infra/role-mode-router.md +89 -0
- package/.agent-src/guidelines/agent-infra/runtime-layer.md +89 -0
- package/.agent-src/guidelines/agent-infra/self-improvement-pipeline.md +135 -0
- package/.agent-src/guidelines/agent-infra/size-and-scope.md +189 -0
- package/.agent-src/guidelines/agent-infra/tool-integration.md +73 -0
- package/.agent-src/guidelines/docs/readme-size-and-splitting.md +153 -0
- package/.agent-src/guidelines/e2e/playwright.md +363 -0
- package/.agent-src/guidelines/php/api-design.md +115 -0
- package/.agent-src/guidelines/php/artisan-commands.md +81 -0
- package/.agent-src/guidelines/php/blade-ui.md +78 -0
- package/.agent-src/guidelines/php/controllers.md +90 -0
- package/.agent-src/guidelines/php/database.md +111 -0
- package/.agent-src/guidelines/php/eloquent.md +208 -0
- package/.agent-src/guidelines/php/flux.md +80 -0
- package/.agent-src/guidelines/php/general.md +191 -0
- package/.agent-src/guidelines/php/git.md +96 -0
- package/.agent-src/guidelines/php/jobs.md +111 -0
- package/.agent-src/guidelines/php/livewire.md +71 -0
- package/.agent-src/guidelines/php/logging.md +79 -0
- package/.agent-src/guidelines/php/naming.md +89 -0
- package/.agent-src/guidelines/php/patterns/dependency-injection.md +57 -0
- package/.agent-src/guidelines/php/patterns/dtos.md +199 -0
- package/.agent-src/guidelines/php/patterns/events.md +67 -0
- package/.agent-src/guidelines/php/patterns/factory.md +53 -0
- package/.agent-src/guidelines/php/patterns/pipelines.md +66 -0
- package/.agent-src/guidelines/php/patterns/policies.md +66 -0
- package/.agent-src/guidelines/php/patterns/repositories.md +122 -0
- package/.agent-src/guidelines/php/patterns/service-layer.md +64 -0
- package/.agent-src/guidelines/php/patterns/strategy.md +69 -0
- package/.agent-src/guidelines/php/patterns.md +28 -0
- package/.agent-src/guidelines/php/performance.md +92 -0
- package/.agent-src/guidelines/php/resources.md +100 -0
- package/.agent-src/guidelines/php/security.md +110 -0
- package/.agent-src/guidelines/php/sql.md +97 -0
- package/.agent-src/guidelines/php/validations.md +119 -0
- package/.agent-src/guidelines/php/websocket.md +100 -0
- package/.agent-src/personas/README.md +104 -0
- package/.agent-src/personas/ai-agent.md +77 -0
- package/.agent-src/personas/critical-challenger.md +73 -0
- package/.agent-src/personas/developer.md +73 -0
- package/.agent-src/personas/product-owner.md +78 -0
- package/.agent-src/personas/qa.md +67 -0
- package/.agent-src/personas/senior-engineer.md +77 -0
- package/.agent-src/personas/stakeholder.md +78 -0
- package/.agent-src/rules/agent-docs.md +61 -0
- package/.agent-src/rules/analysis-skill-routing.md +48 -0
- package/.agent-src/rules/architecture.md +62 -0
- package/.agent-src/rules/artifact-drafting-protocol.md +73 -0
- package/.agent-src/rules/ask-when-uncertain.md +52 -0
- package/.agent-src/rules/augment-portability.md +38 -0
- package/.agent-src/rules/augment-source-of-truth.md +128 -0
- package/.agent-src/rules/capture-learnings.md +89 -0
- package/.agent-src/rules/cli-output-handling.md +94 -0
- package/.agent-src/rules/commit-conventions.md +64 -0
- package/.agent-src/rules/context-hygiene.md +90 -0
- package/.agent-src/rules/docker-commands.md +55 -0
- package/.agent-src/rules/docs-sync.md +79 -0
- package/.agent-src/rules/downstream-changes.md +70 -0
- package/.agent-src/rules/e2e-testing.md +53 -0
- package/.agent-src/rules/guidelines.md +90 -0
- package/.agent-src/rules/improve-before-implement.md +94 -0
- package/.agent-src/rules/language-and-tone.md +104 -0
- package/.agent-src/rules/laravel-translations.md +48 -0
- package/.agent-src/rules/markdown-safe-codeblocks.md +18 -0
- package/.agent-src/rules/minimal-safe-diff.md +87 -0
- package/.agent-src/rules/missing-tool-handling.md +62 -0
- package/.agent-src/rules/model-recommendation.md +70 -0
- package/.agent-src/rules/package-ci-checks.md +80 -0
- package/.agent-src/rules/php-coding.md +63 -0
- package/.agent-src/rules/preservation-guard.md +29 -0
- package/.agent-src/rules/review-routing-awareness.md +125 -0
- package/.agent-src/rules/reviewer-awareness.md +92 -0
- package/.agent-src/rules/roadmap-progress-sync.md +56 -0
- package/.agent-src/rules/role-mode-adherence.md +54 -0
- package/.agent-src/rules/rule-type-governance.md +46 -0
- package/.agent-src/rules/runtime-safety.md +42 -0
- package/.agent-src/rules/scope-control.md +40 -0
- package/.agent-src/rules/security-sensitive-stop.md +77 -0
- package/.agent-src/rules/size-enforcement.md +29 -0
- package/.agent-src/rules/skill-improvement-trigger.md +58 -0
- package/.agent-src/rules/skill-quality.md +110 -0
- package/.agent-src/rules/slash-commands.md +30 -0
- package/.agent-src/rules/think-before-action.md +91 -0
- package/.agent-src/rules/token-efficiency.md +99 -0
- package/.agent-src/rules/tool-safety.md +36 -0
- package/.agent-src/rules/upstream-proposal.md +76 -0
- package/.agent-src/rules/user-interaction.md +79 -0
- package/.agent-src/rules/verify-before-complete.md +120 -0
- package/.agent-src/scripts/scan-seeder-violations.php +145 -0
- package/.agent-src/scripts/update_roadmap_progress.py +244 -0
- package/.agent-src/skills/adversarial-review/SKILL.md +149 -0
- package/.agent-src/skills/agent-docs-writing/SKILL.md +234 -0
- package/.agent-src/skills/analysis-autonomous-mode/SKILL.md +197 -0
- package/.agent-src/skills/analysis-skill-router/SKILL.md +134 -0
- package/.agent-src/skills/api-design/SKILL.md +104 -0
- package/.agent-src/skills/api-endpoint/SKILL.md +185 -0
- package/.agent-src/skills/api-testing/SKILL.md +206 -0
- package/.agent-src/skills/artisan-commands/SKILL.md +78 -0
- package/.agent-src/skills/authz-review/SKILL.md +171 -0
- package/.agent-src/skills/aws-infrastructure/SKILL.md +152 -0
- package/.agent-src/skills/blade-ui/SKILL.md +75 -0
- package/.agent-src/skills/blast-radius-analyzer/SKILL.md +185 -0
- package/.agent-src/skills/bug-analyzer/SKILL.md +256 -0
- package/.agent-src/skills/check-refs/SKILL.md +72 -0
- package/.agent-src/skills/code-refactoring/SKILL.md +200 -0
- package/.agent-src/skills/code-review/SKILL.md +214 -0
- package/.agent-src/skills/command-routing/SKILL.md +96 -0
- package/.agent-src/skills/command-writing/SKILL.md +143 -0
- package/.agent-src/skills/composer-packages/SKILL.md +172 -0
- package/.agent-src/skills/context-authoring/SKILL.md +157 -0
- package/.agent-src/skills/context-document/SKILL.md +153 -0
- package/.agent-src/skills/conventional-commits-writing/SKILL.md +70 -0
- package/.agent-src/skills/copilot-agents-optimization/SKILL.md +220 -0
- package/.agent-src/skills/copilot-config/SKILL.md +203 -0
- package/.agent-src/skills/dashboard-design/SKILL.md +116 -0
- package/.agent-src/skills/data-flow-mapper/SKILL.md +160 -0
- package/.agent-src/skills/database/SKILL.md +91 -0
- package/.agent-src/skills/dependency-upgrade/SKILL.md +204 -0
- package/.agent-src/skills/description-assist/SKILL.md +169 -0
- package/.agent-src/skills/design-review/SKILL.md +228 -0
- package/.agent-src/skills/devcontainer/SKILL.md +121 -0
- package/.agent-src/skills/developer-like-execution/SKILL.md +276 -0
- package/.agent-src/skills/docker/SKILL.md +245 -0
- package/.agent-src/skills/dto-creator/SKILL.md +117 -0
- package/.agent-src/skills/eloquent/SKILL.md +92 -0
- package/.agent-src/skills/eloquent/evals/last-run.json +99 -0
- package/.agent-src/skills/eloquent/evals/triggers.json +16 -0
- package/.agent-src/skills/estimate-ticket/SKILL.md +186 -0
- package/.agent-src/skills/estimate-ticket/evals/output-schema.yml +20 -0
- package/.agent-src/skills/estimate-ticket/evals/triggers.json +18 -0
- package/.agent-src/skills/fe-design/SKILL.md +223 -0
- package/.agent-src/skills/feature-planning/SKILL.md +226 -0
- package/.agent-src/skills/file-editor/SKILL.md +129 -0
- package/.agent-src/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/.agent-src/skills/flux/SKILL.md +64 -0
- package/.agent-src/skills/git-workflow/SKILL.md +102 -0
- package/.agent-src/skills/github-ci/SKILL.md +122 -0
- package/.agent-src/skills/grafana/SKILL.md +168 -0
- package/.agent-src/skills/guideline-writing/SKILL.md +147 -0
- package/.agent-src/skills/jira-integration/SKILL.md +182 -0
- package/.agent-src/skills/jobs-events/SKILL.md +87 -0
- package/.agent-src/skills/judge-bug-hunter/SKILL.md +157 -0
- package/.agent-src/skills/judge-code-quality/SKILL.md +158 -0
- package/.agent-src/skills/judge-security-auditor/SKILL.md +167 -0
- package/.agent-src/skills/judge-test-coverage/SKILL.md +154 -0
- package/.agent-src/skills/laravel/SKILL.md +195 -0
- package/.agent-src/skills/laravel-horizon/SKILL.md +169 -0
- package/.agent-src/skills/laravel-mail/SKILL.md +193 -0
- package/.agent-src/skills/laravel-middleware/SKILL.md +185 -0
- package/.agent-src/skills/laravel-notifications/SKILL.md +168 -0
- package/.agent-src/skills/laravel-pennant/SKILL.md +188 -0
- package/.agent-src/skills/laravel-pulse/SKILL.md +160 -0
- package/.agent-src/skills/laravel-reverb/SKILL.md +205 -0
- package/.agent-src/skills/laravel-scheduling/SKILL.md +167 -0
- package/.agent-src/skills/laravel-validation/SKILL.md +71 -0
- package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +249 -0
- package/.agent-src/skills/lint-skills/SKILL.md +72 -0
- package/.agent-src/skills/livewire/SKILL.md +79 -0
- package/.agent-src/skills/logging-monitoring/SKILL.md +100 -0
- package/.agent-src/skills/mcp/SKILL.md +193 -0
- package/.agent-src/skills/merge-conflicts/SKILL.md +158 -0
- package/.agent-src/skills/migration-creator/SKILL.md +160 -0
- package/.agent-src/skills/module-management/SKILL.md +154 -0
- package/.agent-src/skills/multi-tenancy/SKILL.md +129 -0
- package/.agent-src/skills/openapi/SKILL.md +154 -0
- package/.agent-src/skills/override-management/SKILL.md +186 -0
- package/.agent-src/skills/performance/SKILL.md +69 -0
- package/.agent-src/skills/performance-analysis/SKILL.md +118 -0
- package/.agent-src/skills/pest-testing/SKILL.md +321 -0
- package/.agent-src/skills/php-coder/SKILL.md +78 -0
- package/.agent-src/skills/php-coder/evals/triggers.json +16 -0
- package/.agent-src/skills/php-debugging/SKILL.md +184 -0
- package/.agent-src/skills/php-service/SKILL.md +96 -0
- package/.agent-src/skills/playwright-testing/SKILL.md +244 -0
- package/.agent-src/skills/project-analysis-core/SKILL.md +138 -0
- package/.agent-src/skills/project-analysis-hypothesis-driven/SKILL.md +130 -0
- package/.agent-src/skills/project-analysis-laravel/SKILL.md +119 -0
- package/.agent-src/skills/project-analysis-nextjs/SKILL.md +123 -0
- package/.agent-src/skills/project-analysis-node-express/SKILL.md +111 -0
- package/.agent-src/skills/project-analysis-react/SKILL.md +119 -0
- package/.agent-src/skills/project-analysis-symfony/SKILL.md +111 -0
- package/.agent-src/skills/project-analysis-zend-laminas/SKILL.md +108 -0
- package/.agent-src/skills/project-analyzer/SKILL.md +341 -0
- package/.agent-src/skills/project-docs/SKILL.md +137 -0
- package/.agent-src/skills/quality-tools/SKILL.md +411 -0
- package/.agent-src/skills/readme-reviewer/SKILL.md +187 -0
- package/.agent-src/skills/readme-writing/SKILL.md +142 -0
- package/.agent-src/skills/readme-writing-package/SKILL.md +185 -0
- package/.agent-src/skills/receiving-code-review/SKILL.md +190 -0
- package/.agent-src/skills/refine-ticket/SKILL.md +310 -0
- package/.agent-src/skills/refine-ticket/detection-map.yml +124 -0
- package/.agent-src/skills/refine-ticket/evals/output-schema.yml +16 -0
- package/.agent-src/skills/refine-ticket/evals/triggers.json +16 -0
- package/.agent-src/skills/requesting-code-review/SKILL.md +199 -0
- package/.agent-src/skills/review-routing/SKILL.md +195 -0
- package/.agent-src/skills/roadmap-management/SKILL.md +303 -0
- package/.agent-src/skills/rtk-output-filtering/SKILL.md +184 -0
- package/.agent-src/skills/rule-writing/SKILL.md +148 -0
- package/.agent-src/skills/security/SKILL.md +79 -0
- package/.agent-src/skills/security-audit/SKILL.md +123 -0
- package/.agent-src/skills/sentry-integration/SKILL.md +170 -0
- package/.agent-src/skills/sequential-thinking/SKILL.md +158 -0
- package/.agent-src/skills/skill-improvement-pipeline/SKILL.md +155 -0
- package/.agent-src/skills/skill-management/SKILL.md +121 -0
- package/.agent-src/skills/skill-reviewer/SKILL.md +218 -0
- package/.agent-src/skills/skill-writing/SKILL.md +291 -0
- package/.agent-src/skills/skill-writing/evals/triggers.json +16 -0
- package/.agent-src/skills/sql-writing/SKILL.md +74 -0
- package/.agent-src/skills/subagent-orchestration/SKILL.md +190 -0
- package/.agent-src/skills/systematic-debugging/SKILL.md +244 -0
- package/.agent-src/skills/technical-specification/SKILL.md +185 -0
- package/.agent-src/skills/terraform/SKILL.md +137 -0
- package/.agent-src/skills/terragrunt/SKILL.md +217 -0
- package/.agent-src/skills/test-driven-development/SKILL.md +252 -0
- package/.agent-src/skills/test-performance/SKILL.md +172 -0
- package/.agent-src/skills/threat-modeling/SKILL.md +189 -0
- package/.agent-src/skills/traefik/SKILL.md +319 -0
- package/.agent-src/skills/universal-project-analysis/SKILL.md +179 -0
- package/.agent-src/skills/upstream-contribute/SKILL.md +255 -0
- package/.agent-src/skills/using-git-worktrees/SKILL.md +148 -0
- package/.agent-src/skills/validate-feature-fit/SKILL.md +113 -0
- package/.agent-src/skills/verify-before-complete/SKILL.md +188 -0
- package/.agent-src/skills/websocket/SKILL.md +75 -0
- package/.agent-src/templates/AGENTS.md +146 -0
- package/.agent-src/templates/agent-settings.md +256 -0
- package/.agent-src/templates/agents/.gitattributes.fragment +16 -0
- package/.agent-src/templates/agents/agent-project-settings.example.yml +138 -0
- package/.agent-src/templates/agents/memory/architecture-decisions.example.yml +95 -0
- package/.agent-src/templates/agents/memory/domain-invariants.example.yml +80 -0
- package/.agent-src/templates/agents/memory/historical-patterns.example.yml +82 -0
- package/.agent-src/templates/agents/memory/incident-learnings.example.yml +113 -0
- package/.agent-src/templates/agents/memory/ownership.example.yml +75 -0
- package/.agent-src/templates/agents/memory/product-rules.example.yml +87 -0
- package/.agent-src/templates/agents/proposal.example.md +143 -0
- package/.agent-src/templates/command.md +84 -0
- package/.agent-src/templates/contexts/auth-model.md +59 -0
- package/.agent-src/templates/contexts/data-sensitivity.md +60 -0
- package/.agent-src/templates/contexts/deployment-order.md +72 -0
- package/.agent-src/templates/contexts/observability.md +64 -0
- package/.agent-src/templates/contexts/tenant-boundaries.md +68 -0
- package/.agent-src/templates/contexts.md +116 -0
- package/.agent-src/templates/copilot-instructions.md +115 -0
- package/.agent-src/templates/features.md +125 -0
- package/.agent-src/templates/github-workflows/memory-hygiene.yml +133 -0
- package/.agent-src/templates/github-workflows/pr-risk-review.yml +123 -0
- package/.agent-src/templates/github-workflows/proposal-drift.yml +118 -0
- package/.agent-src/templates/overrides/command.md +24 -0
- package/.agent-src/templates/overrides/guideline.md +21 -0
- package/.agent-src/templates/overrides/rule.md +19 -0
- package/.agent-src/templates/overrides/skill.md +24 -0
- package/.agent-src/templates/overrides/template.md +21 -0
- package/.agent-src/templates/persona.md +99 -0
- package/.agent-src/templates/roadmaps.md +109 -0
- package/.agent-src/templates/scripts/README.md +195 -0
- package/.agent-src/templates/scripts/check_memory.py +283 -0
- package/.agent-src/templates/scripts/check_memory_proposal.py +180 -0
- package/.agent-src/templates/scripts/historical-bug-patterns.example.yml +84 -0
- package/.agent-src/templates/scripts/implement_ticket/__init__.py +57 -0
- package/.agent-src/templates/scripts/implement_ticket/__main__.py +9 -0
- package/.agent-src/templates/scripts/implement_ticket/cli.py +171 -0
- package/.agent-src/templates/scripts/implement_ticket/delivery_state.py +130 -0
- package/.agent-src/templates/scripts/implement_ticket/dispatcher.py +134 -0
- package/.agent-src/templates/scripts/implement_ticket/persona_policy.py +85 -0
- package/.agent-src/templates/scripts/implement_ticket/steps/__init__.py +49 -0
- package/.agent-src/templates/scripts/implement_ticket/steps/analyze.py +98 -0
- package/.agent-src/templates/scripts/implement_ticket/steps/implement.py +145 -0
- package/.agent-src/templates/scripts/implement_ticket/steps/memory.py +136 -0
- package/.agent-src/templates/scripts/implement_ticket/steps/plan.py +175 -0
- package/.agent-src/templates/scripts/implement_ticket/steps/refine.py +140 -0
- package/.agent-src/templates/scripts/implement_ticket/steps/report.py +195 -0
- package/.agent-src/templates/scripts/implement_ticket/steps/test.py +180 -0
- package/.agent-src/templates/scripts/implement_ticket/steps/verify.py +170 -0
- package/.agent-src/templates/scripts/memory_hash.py +75 -0
- package/.agent-src/templates/scripts/memory_lookup.py +216 -0
- package/.agent-src/templates/scripts/memory_report.py +184 -0
- package/.agent-src/templates/scripts/memory_signal.py +167 -0
- package/.agent-src/templates/scripts/memory_status.py +156 -0
- package/.agent-src/templates/scripts/ownership-map.example.yml +87 -0
- package/.agent-src/templates/scripts/pr-risk-config.example.yml +76 -0
- package/.agent-src/templates/scripts/pr_review_routing.py +340 -0
- package/.agent-src/templates/scripts/pr_risk_review.py +211 -0
- package/.agent-src/templates/skill.md +136 -0
- package/.augment-plugin/marketplace.json +32 -0
- package/.augment-plugin/plugin.json +21 -0
- package/.claude-plugin/marketplace.json +119 -0
- package/AGENTS.md +121 -0
- package/CHANGELOG.md +279 -0
- package/CONTRIBUTING.md +176 -0
- package/LICENSE +21 -0
- package/README.md +357 -0
- package/bin/install.php +38 -0
- package/composer.json +29 -0
- package/config/agent-settings.template.yml +96 -0
- package/config/profiles/balanced.ini +10 -0
- package/config/profiles/full.ini +10 -0
- package/config/profiles/minimal.ini +10 -0
- package/docs/architecture.md +144 -0
- package/docs/customization.md +88 -0
- package/docs/development.md +171 -0
- package/docs/getting-started.md +130 -0
- package/docs/github-topics.md +84 -0
- package/docs/installation.md +376 -0
- package/docs/mcp.md +133 -0
- package/docs/quality.md +98 -0
- package/docs/skills-catalog.md +136 -0
- package/docs/troubleshooting.md +167 -0
- package/llms.txt +130 -0
- package/package.json +31 -0
- package/scripts/audit_skill_descriptions.py +168 -0
- package/scripts/check_compression.py +221 -0
- package/scripts/check_memory.py +341 -0
- package/scripts/check_memory_proposal.py +180 -0
- package/scripts/check_portability.py +320 -0
- package/scripts/check_proposal.py +269 -0
- package/scripts/check_references.py +400 -0
- package/scripts/ci_summary.py +131 -0
- package/scripts/compress.py +671 -0
- package/scripts/compress.sh +18 -0
- package/scripts/first-run.sh +109 -0
- package/scripts/generate_catalog.py +116 -0
- package/scripts/install +151 -0
- package/scripts/install-hooks.sh +29 -0
- package/scripts/install.py +487 -0
- package/scripts/install.sh +637 -0
- package/scripts/install_anthropic_key.sh +101 -0
- package/scripts/inventory_frontmatter.py +164 -0
- package/scripts/lint_marketplace.py +142 -0
- package/scripts/lint_regression.py +232 -0
- package/scripts/mcp_render.py +159 -0
- package/scripts/measure_patterns.py +376 -0
- package/scripts/memory_hash.py +75 -0
- package/scripts/memory_lookup.py +441 -0
- package/scripts/memory_report.py +336 -0
- package/scripts/memory_signal.py +210 -0
- package/scripts/memory_status.py +195 -0
- package/scripts/postinstall.sh +60 -0
- package/scripts/readme_linter.py +580 -0
- package/scripts/refine_ticket_detect.py +623 -0
- package/scripts/requirements-evals.txt +7 -0
- package/scripts/runtime_dispatcher.py +265 -0
- package/scripts/runtime_handler.py +148 -0
- package/scripts/runtime_registry.py +166 -0
- package/scripts/schemas/command.schema.json +32 -0
- package/scripts/schemas/persona.schema.json +42 -0
- package/scripts/schemas/rule.schema.json +28 -0
- package/scripts/schemas/skill.schema.json +73 -0
- package/scripts/setup.sh +230 -0
- package/scripts/setup_eval_venv.sh +58 -0
- package/scripts/skill_linter.py +2175 -0
- package/scripts/skill_trigger_eval.py +651 -0
- package/scripts/tool_registry.py +146 -0
- package/scripts/tools/__init__.py +1 -0
- package/scripts/tools/adapter_errors.py +63 -0
- package/scripts/tools/base_adapter.py +91 -0
- package/scripts/tools/github_adapter.py +128 -0
- package/scripts/tools/jira_adapter.py +115 -0
- package/scripts/update_counts.py +147 -0
- package/scripts/validate_frontmatter.py +424 -0
- package/templates/consumer-settings/README.md +46 -0
- package/templates/consumer-settings/augment-settings.json +12 -0
- package/templates/consumer-settings/claude-settings.json +9 -0
- package/templates/consumer-settings/copilot-settings.json +14 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: php-coder
|
|
3
|
+
description: "Writes or edits PHP code — controllers, classes, type hints, SOLID refactors, modern idioms — even without naming PHP. NOT for writing tests (use pest-testing) or explaining PHP concepts."
|
|
4
|
+
source: package
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# coder
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
This skill applies to ALL code generation and editing tasks. Every other skill builds on top of this one.
|
|
12
|
+
|
|
13
|
+
Do NOT use when:
|
|
14
|
+
- Only reading/reviewing code (use `code-review` skill)
|
|
15
|
+
- Only running quality tools (use `quality-tools` skill)
|
|
16
|
+
|
|
17
|
+
## Procedure: Before writing code
|
|
18
|
+
|
|
19
|
+
### Step 0: Inspect project
|
|
20
|
+
|
|
21
|
+
1. Read `AGENTS.md` and `.github/copilot-instructions.md` for project-specific rules.
|
|
22
|
+
2. If working in a module (`app/Modules/*/`), check `app/Modules/{Module}/agents/` for module docs.
|
|
23
|
+
3. Look at neighboring files in the same directory — match the style.
|
|
24
|
+
4. Read `./agents/` for project-specific architecture.
|
|
25
|
+
5. Check `ecs.php` / `rector.php` (if they exist) — code accordingly.
|
|
26
|
+
6. Read `Makefile` or `Taskfile.yml` for available build/test/quality targets.
|
|
27
|
+
|
|
28
|
+
### Step 1: Detect project type
|
|
29
|
+
|
|
30
|
+
- `artisan` exists → Laravel project (Pest, Modules if present)
|
|
31
|
+
- No `artisan` + `composer.json` → Standalone PHP / Composer project
|
|
32
|
+
- Check `AGENTS.md` and `./agents/` for conventions
|
|
33
|
+
|
|
34
|
+
### Step 2: Apply conventions
|
|
35
|
+
|
|
36
|
+
→ See `php-coding` rule (always loaded) for PHP coding standards.
|
|
37
|
+
→ See guideline `php/general.md` for detailed PHP conventions.
|
|
38
|
+
→ See guideline `php/controllers.md`, `php/eloquent.md`, etc. for domain-specific conventions.
|
|
39
|
+
|
|
40
|
+
### Core principles
|
|
41
|
+
|
|
42
|
+
- **KISS** — simplest solution that works. No over-engineering.
|
|
43
|
+
- **YAGNI** — only build what's needed now.
|
|
44
|
+
- **DRY** — extract shared logic. Don't abstract prematurely.
|
|
45
|
+
- **SOLID** — single responsibility, depend on abstractions, small interfaces.
|
|
46
|
+
|
|
47
|
+
### Validate
|
|
48
|
+
|
|
49
|
+
- Run PHPStan on changed files — must pass at level 9.
|
|
50
|
+
- Run affected tests — must pass.
|
|
51
|
+
- Verify strict types, typed properties, return types on all new code.
|
|
52
|
+
- Check that no `dd()`, `var_dump()`, `print_r()` remain.
|
|
53
|
+
|
|
54
|
+
## Output format
|
|
55
|
+
|
|
56
|
+
1. Code following project guidelines and existing patterns
|
|
57
|
+
2. All downstream changes (callers, tests, imports) included
|
|
58
|
+
|
|
59
|
+
## Gotcha
|
|
60
|
+
|
|
61
|
+
- Don't introduce new patterns without being asked.
|
|
62
|
+
- Don't refactor code you're not working on.
|
|
63
|
+
- Use `Math` helper for ALL calculations — never raw PHP arithmetic.
|
|
64
|
+
- `MonitoringHelper::captureException()` for Sentry reporting.
|
|
65
|
+
|
|
66
|
+
## Do NOT
|
|
67
|
+
|
|
68
|
+
- Do NOT use native arithmetic (`+`, `-`, `*`, `/`) for business calculations — use `Math` helper.
|
|
69
|
+
- Do NOT refactor code you're not actively working on.
|
|
70
|
+
- Do NOT use `var_dump()`, `print_r()`, `dd()` — disallowed by PHPStan.
|
|
71
|
+
|
|
72
|
+
## Auto-trigger keywords
|
|
73
|
+
|
|
74
|
+
- PHP coding
|
|
75
|
+
- coding standards
|
|
76
|
+
- SOLID
|
|
77
|
+
- clean code
|
|
78
|
+
- best practices
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "php-coder",
|
|
3
|
+
"description": "5 should-trigger + 5 should-not-trigger queries. Multi-skill co-activation (e.g. php-coder alongside pest-testing on a test query) is accepted as TP where writing PHP code is a legitimate sub-task. Near-misses share PHP/Laravel vocabulary without being code-generation tasks.",
|
|
4
|
+
"queries": [
|
|
5
|
+
{"q": "my UserController is getting huge, split it into a service", "trigger": true},
|
|
6
|
+
{"q": "write a class for parsing CSV files with proper type hints", "trigger": true},
|
|
7
|
+
{"q": "refactor this foreach to use array_map but keep it readable", "trigger": true},
|
|
8
|
+
{"q": "add a __toString method to this DTO and make fields readonly", "trigger": true},
|
|
9
|
+
{"q": "this legacy controller mixes config and business logic, clean it up", "trigger": true},
|
|
10
|
+
{"q": "run phpstan on this file and show me all errors", "trigger": false},
|
|
11
|
+
{"q": "create a migration for adding a phone column to users", "trigger": false},
|
|
12
|
+
{"q": "set up docker-compose for this PHP project", "trigger": false},
|
|
13
|
+
{"q": "write a Pest test for the UserRepository", "trigger": true, "note": "T-class: co-activation with pest-testing is accepted — Pest tests are PHP code, loading php-coder alongside pest-testing is legitimate multi-skill support"},
|
|
14
|
+
{"q": "explain what strict_types does in PHP", "trigger": false}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: php-debugging
|
|
3
|
+
description: "Use when debugging PHP with Xdebug — breakpoints, step-through, dual-container setup, IDE configuration, header-based routing — even when the user just says 'why does this blow up on request X'."
|
|
4
|
+
source: package
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# php-debugging
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Use this skill when:
|
|
12
|
+
- Setting up or troubleshooting Xdebug
|
|
13
|
+
- Debugging PHP code with breakpoints
|
|
14
|
+
- Investigating performance issues
|
|
15
|
+
- Running code coverage
|
|
16
|
+
- Helping users configure their IDE for debugging
|
|
17
|
+
|
|
18
|
+
This skill extends `php-coder` and `php`.
|
|
19
|
+
|
|
20
|
+
## Procedure: Debug with Xdebug
|
|
21
|
+
|
|
22
|
+
1. **Detect the project's debug setup** — check `docker-compose.yml` / `compose.yaml` for Xdebug containers.
|
|
23
|
+
2. **Check Dockerfile** — look for a `dev-xdebug` build stage or Xdebug installation.
|
|
24
|
+
3. **Check NGINX config** — look for header-based routing to a debug container.
|
|
25
|
+
4. **Read project docs** — check `Docs/XDEBUG_SETUP.md` or `docs/` for setup instructions.
|
|
26
|
+
5. **Check `.env`** — look for `DOCKER_XDEBUG_MODE` and `DOCKER_XDEBUG_PORT`.
|
|
27
|
+
|
|
28
|
+
## Dual-container architecture
|
|
29
|
+
|
|
30
|
+
Many projects use two PHP containers for optimal performance:
|
|
31
|
+
|
|
32
|
+
| Container | Purpose | When used |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `*-php` | Fast PHP-FPM, no Xdebug overhead | All normal requests |
|
|
35
|
+
| `*-php-xdebug` | PHP-FPM with Xdebug enabled | Only debug requests |
|
|
36
|
+
|
|
37
|
+
NGINX routes requests based on HTTP headers:
|
|
38
|
+
- **No debug header** → fast container (no Xdebug)
|
|
39
|
+
- **Debug header present** → Xdebug container
|
|
40
|
+
|
|
41
|
+
### Debug headers
|
|
42
|
+
|
|
43
|
+
| Header | Value | Recommended for |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| `X-Xdebug-Enable` | `1` or `true` | Manual tests, Postman |
|
|
46
|
+
| `X-Debug-Session` | `PHPSTORM` | IDE integration |
|
|
47
|
+
| `XDEBUG-SESSION` | any value | Standard Xdebug header |
|
|
48
|
+
|
|
49
|
+
**Important:** Use hyphens, not underscores. `XDEBUG_SESSION` does NOT work — use `XDEBUG-SESSION`.
|
|
50
|
+
|
|
51
|
+
### Verify routing
|
|
52
|
+
|
|
53
|
+
Check the `X-PHP-Backend` response header to confirm which container handled the request:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Normal request
|
|
57
|
+
curl -I http://localhost:8002/ # → X-PHP-Backend: *-php:9000
|
|
58
|
+
|
|
59
|
+
# Debug request
|
|
60
|
+
curl -I -H "X-Xdebug-Enable: 1" http://localhost:8002/ # → X-PHP-Backend: *-php-xdebug:9000
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Xdebug configuration
|
|
64
|
+
|
|
65
|
+
### Environment variables
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
DOCKER_XDEBUG_MODE=develop,debug,coverage # Xdebug modes
|
|
69
|
+
DOCKER_XDEBUG_PORT=9003 # IDE listens on this port
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Xdebug modes
|
|
73
|
+
|
|
74
|
+
| Mode | Purpose |
|
|
75
|
+
|---|---|
|
|
76
|
+
| `debug` | Step debugging with breakpoints |
|
|
77
|
+
| `develop` | Enhanced error messages, var_dump improvements |
|
|
78
|
+
| `coverage` | Code coverage for tests |
|
|
79
|
+
| `profile` | Performance profiling (generates cachegrind files) |
|
|
80
|
+
| `trace` | Function call tracing |
|
|
81
|
+
|
|
82
|
+
### PHP-FPM on-demand (Xdebug container)
|
|
83
|
+
|
|
84
|
+
The Xdebug container typically uses `pm = ondemand` to save resources:
|
|
85
|
+
- Workers start only when a debug request arrives
|
|
86
|
+
- Idle workers terminate after 60s
|
|
87
|
+
- Reduces memory usage by ~60-70% when not debugging
|
|
88
|
+
- Unlimited request timeout for breakpoint sessions
|
|
89
|
+
|
|
90
|
+
## IDE setup
|
|
91
|
+
|
|
92
|
+
### PhpStorm
|
|
93
|
+
|
|
94
|
+
1. **Debug port**: Settings → PHP → Debug → Port: `9003`
|
|
95
|
+
2. **Enable listening**: Click "Start Listening for PHP Debug Connections" (phone icon)
|
|
96
|
+
3. **Server config**: Settings → PHP → Servers:
|
|
97
|
+
- Host: `localhost`, Port: `80` (internal container port, not host port)
|
|
98
|
+
- Enable path mappings: local project root → `/var/www/html`
|
|
99
|
+
4. **Browser extension**: Install "Xdebug helper", set IDE key to `PHPSTORM`
|
|
100
|
+
|
|
101
|
+
### VS Code
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"name": "Listen for Xdebug",
|
|
106
|
+
"type": "php",
|
|
107
|
+
"request": "launch",
|
|
108
|
+
"port": 9003,
|
|
109
|
+
"pathMappings": {
|
|
110
|
+
"/var/www/html": "${workspaceFolder}"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Debugging workflow
|
|
116
|
+
|
|
117
|
+
1. **Start listening** in IDE (PhpStorm: green phone icon)
|
|
118
|
+
2. **Set breakpoints** in code
|
|
119
|
+
3. **Send request with debug header** (browser extension, Postman, or curl)
|
|
120
|
+
4. **IDE breaks** at breakpoint → inspect variables, step through code
|
|
121
|
+
5. **Check `X-PHP-Backend` header** if debugging doesn't trigger
|
|
122
|
+
|
|
123
|
+
## CLI debugging (Artisan commands, tests)
|
|
124
|
+
|
|
125
|
+
For debugging Artisan commands or tests, enter the Xdebug container:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
make console-xdebug # Enter Xdebug container
|
|
129
|
+
php artisan your:command # Xdebug connects to IDE automatically
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Troubleshooting
|
|
133
|
+
|
|
134
|
+
| Problem | Solution |
|
|
135
|
+
|---|---|
|
|
136
|
+
| Breakpoints not hit | Check IDE is listening, verify path mappings, check `X-PHP-Backend` header |
|
|
137
|
+
| IDE not connecting | `make console-xdebug` then `nc -zv host.docker.internal 9003` — should show "open" |
|
|
138
|
+
| Wrong container used | Check response header `X-PHP-Backend`, verify debug header format (hyphens!) |
|
|
139
|
+
| Slow normal requests | Verify normal requests go to fast container (no `X-PHP-Backend: *-xdebug*`) |
|
|
140
|
+
| Xdebug logs | `make console-xdebug` then `tail -f /tmp/xdebug.log` |
|
|
141
|
+
| Container not running | `docker compose ps` — both PHP containers should be "Up" |
|
|
142
|
+
| Path mapping wrong | PhpStorm: Settings → PHP → Servers → verify local ↔ `/var/www/html` |
|
|
143
|
+
|
|
144
|
+
## Container management
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
make console # Fast PHP container (no Xdebug)
|
|
148
|
+
make console-xdebug # Xdebug container
|
|
149
|
+
make rebuild-php-xdebug # Rebuild Xdebug container only
|
|
150
|
+
make rebuild-php-all # Rebuild both PHP containers
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## What NOT to do
|
|
154
|
+
|
|
155
|
+
- Do not leave Xdebug enabled in production containers.
|
|
156
|
+
- Do not use underscores in debug headers (`XDEBUG_SESSION` fails — use `XDEBUG-SESSION`).
|
|
157
|
+
- Do not set PhpStorm server port to the host port (e.g. 8002) — use the internal port (80).
|
|
158
|
+
- Do not run performance benchmarks against the Xdebug container.
|
|
159
|
+
- Do not forget to check path mappings when breakpoints are silently skipped.
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
## Output format
|
|
163
|
+
|
|
164
|
+
1. Xdebug configuration or debugging session setup
|
|
165
|
+
2. Root cause identified with evidence from debugger output
|
|
166
|
+
|
|
167
|
+
## Gotcha
|
|
168
|
+
|
|
169
|
+
- Xdebug runs in a separate container — don't confuse the fast container (port 80) with the debug container (port 8080).
|
|
170
|
+
- The model tends to suggest `dd()` or `var_dump()` — they're forbidden by PHPStan config. Use Xdebug breakpoints.
|
|
171
|
+
- Step-debugging over HTTP requires the `XDEBUG_SESSION` cookie/header — without it, breakpoints don't trigger.
|
|
172
|
+
|
|
173
|
+
## Do NOT
|
|
174
|
+
|
|
175
|
+
- Do NOT leave breakpoints or debug code in committed files.
|
|
176
|
+
- Do NOT use var_dump() or dd() — use Xdebug breakpoints.
|
|
177
|
+
- Do NOT debug in the fast container — switch to the Xdebug container.
|
|
178
|
+
|
|
179
|
+
## Auto-trigger keywords
|
|
180
|
+
|
|
181
|
+
- Xdebug
|
|
182
|
+
- PHP debugging
|
|
183
|
+
- breakpoint
|
|
184
|
+
- step debugging
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: php-service
|
|
3
|
+
description: "Use when the user says 'create service', 'new service class', or needs a PHP service following SOLID principles with proper DI and repository usage."
|
|
4
|
+
source: package
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# php-service
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Use when creating a new service, extracting business logic from a controller, or refactoring into a service layer.
|
|
12
|
+
|
|
13
|
+
Do NOT use when:
|
|
14
|
+
- Controllers (use `laravel` skill)
|
|
15
|
+
- DTOs (use `dto-creator` skill)
|
|
16
|
+
- Models (use `eloquent` skill)
|
|
17
|
+
|
|
18
|
+
## When to create a service
|
|
19
|
+
|
|
20
|
+
✅ Multiple steps needing orchestration (save + calculate + notify)
|
|
21
|
+
✅ Business rules beyond FormRequest
|
|
22
|
+
✅ Logic reused across controllers, jobs, commands
|
|
23
|
+
✅ Complex calculations or transformations
|
|
24
|
+
|
|
25
|
+
❌ Simple CRUD — `$model->update($request->validated())` stays in controller
|
|
26
|
+
❌ One-liner logic — no class for a single Eloquent call
|
|
27
|
+
|
|
28
|
+
## Procedure: Create a service
|
|
29
|
+
|
|
30
|
+
### Step 0: Inspect
|
|
31
|
+
|
|
32
|
+
1. Read `./agents/` and `AGENTS.md` for service conventions.
|
|
33
|
+
2. Check existing services — match naming, structure, DI patterns.
|
|
34
|
+
3. Check for repositories — see `php/patterns/repositories.md` guideline.
|
|
35
|
+
|
|
36
|
+
### Step 1: Create the class
|
|
37
|
+
|
|
38
|
+
1. Location: `app/Services/{Domain}/` or `app/Modules/{Module}/App/Services/`.
|
|
39
|
+
2. `declare(strict_types=1)`, proper namespace.
|
|
40
|
+
3. Constructor inject dependencies (repositories, other services).
|
|
41
|
+
4. Max 4 constructor dependencies — if more, split the service.
|
|
42
|
+
|
|
43
|
+
### Step 2: Implement methods
|
|
44
|
+
|
|
45
|
+
1. One responsibility per method.
|
|
46
|
+
2. Delegate data access to repositories.
|
|
47
|
+
3. Use DTOs for structured data.
|
|
48
|
+
4. Use `Math` helper for calculations — never raw arithmetic.
|
|
49
|
+
|
|
50
|
+
### Step 3: Wire up
|
|
51
|
+
|
|
52
|
+
```php
|
|
53
|
+
// Controller
|
|
54
|
+
public function __invoke(
|
|
55
|
+
UpdateProjectRequest $request,
|
|
56
|
+
Project $project,
|
|
57
|
+
ProjectService $projectService,
|
|
58
|
+
): ProjectResource {
|
|
59
|
+
$dto = UpdateProjectDTO::fromRequest($request);
|
|
60
|
+
return ProjectResource::make($projectService->update($project, $dto));
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Conventions
|
|
65
|
+
|
|
66
|
+
→ See guideline `php/patterns/service-layer.md` for full service layer conventions.
|
|
67
|
+
|
|
68
|
+
### Validate
|
|
69
|
+
|
|
70
|
+
- Run PHPStan on the service — must pass at level 9.
|
|
71
|
+
- Verify single responsibility: service does one thing, no mixed concerns.
|
|
72
|
+
- Confirm all dependencies are constructor-injected (no `app()` or facades in service).
|
|
73
|
+
- Run affected tests — must pass.
|
|
74
|
+
|
|
75
|
+
## Output format
|
|
76
|
+
|
|
77
|
+
1. Service class with constructor injection and single responsibility
|
|
78
|
+
2. Repository dependency if data access is needed
|
|
79
|
+
|
|
80
|
+
## Gotcha
|
|
81
|
+
|
|
82
|
+
- Don't create "god services" with 10+ methods — split by responsibility.
|
|
83
|
+
- Don't inject `Request` into services — pass specific data.
|
|
84
|
+
- Services are framework-agnostic — no HTTP/request logic.
|
|
85
|
+
|
|
86
|
+
## Do NOT
|
|
87
|
+
|
|
88
|
+
- Do NOT inject `Request` or `Controller` into services — services are framework-agnostic.
|
|
89
|
+
- Do NOT create services with more than one responsibility — split them.
|
|
90
|
+
|
|
91
|
+
## Auto-trigger keywords
|
|
92
|
+
|
|
93
|
+
- service class
|
|
94
|
+
- business logic
|
|
95
|
+
- service layer
|
|
96
|
+
- dependency injection
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: playwright-testing
|
|
3
|
+
description: "Use when writing Playwright E2E tests — browser automation, visual regression testing, Page Objects, fixtures, and reliable test patterns."
|
|
4
|
+
source: package
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# playwright-testing
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Use this skill when:
|
|
12
|
+
- Writing end-to-end tests with Playwright
|
|
13
|
+
- Automating browser interactions for testing
|
|
14
|
+
- Setting up visual regression testing
|
|
15
|
+
- Using Playwright MCP for design reviews
|
|
16
|
+
- Debugging flaky E2E tests
|
|
17
|
+
- Configuring Playwright for CI/CD
|
|
18
|
+
|
|
19
|
+
**Guideline:** `.augment/guidelines/e2e/playwright.md` — full conventions, config templates, CI setup.
|
|
20
|
+
**Rule:** `.augment/rules/e2e-testing.md` — constraints enforced during E2E test work.
|
|
21
|
+
|
|
22
|
+
## Procedure: Write Playwright tests
|
|
23
|
+
|
|
24
|
+
1. **Read the guideline** — `.augment/guidelines/e2e/playwright.md` for detailed conventions.
|
|
25
|
+
2. **Check Playwright config** — `playwright.config.ts` for browsers, base URL, timeouts.
|
|
26
|
+
3. **Check existing tests** — match patterns in `tests/e2e/` or `e2e/`.
|
|
27
|
+
4. **Check test utilities** — look for page objects, fixtures, helpers.
|
|
28
|
+
5. **Check CI setup** — how are E2E tests run in the pipeline?
|
|
29
|
+
|
|
30
|
+
## Test structure
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { test, expect } from '@playwright/test'
|
|
34
|
+
|
|
35
|
+
test.describe('User Authentication', () => {
|
|
36
|
+
test('should login with valid credentials', async ({ page }) => {
|
|
37
|
+
await page.goto('/login')
|
|
38
|
+
await page.getByLabel('Email').fill('user@example.com')
|
|
39
|
+
await page.getByLabel('Password').fill('password123')
|
|
40
|
+
await page.getByRole('button', { name: 'Sign in' }).click()
|
|
41
|
+
|
|
42
|
+
await expect(page).toHaveURL('/dashboard')
|
|
43
|
+
await expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible()
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
test('should show error for invalid credentials', async ({ page }) => {
|
|
47
|
+
await page.goto('/login')
|
|
48
|
+
await page.getByLabel('Email').fill('wrong@example.com')
|
|
49
|
+
await page.getByLabel('Password').fill('wrong')
|
|
50
|
+
await page.getByRole('button', { name: 'Sign in' }).click()
|
|
51
|
+
|
|
52
|
+
await expect(page.getByText('Invalid credentials')).toBeVisible()
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Locator strategies (priority order)
|
|
58
|
+
|
|
59
|
+
| Strategy | Example | When to use |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| **Role** | `getByRole('button', { name: 'Submit' })` | Default — most accessible |
|
|
62
|
+
| **Label** | `getByLabel('Email')` | Form inputs |
|
|
63
|
+
| **Text** | `getByText('Welcome')` | Visible text content |
|
|
64
|
+
| **Placeholder** | `getByPlaceholder('Search...')` | Input placeholders |
|
|
65
|
+
| **Test ID** | `getByTestId('submit-btn')` | Last resort — when no semantic locator works |
|
|
66
|
+
| **CSS** | `page.locator('.my-class')` | Avoid — brittle |
|
|
67
|
+
|
|
68
|
+
**Prefer semantic locators** (`getByRole`, `getByLabel`) over CSS selectors.
|
|
69
|
+
|
|
70
|
+
## Reliable test patterns
|
|
71
|
+
|
|
72
|
+
### Wait for network idle
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
// Wait for page to fully load
|
|
76
|
+
await page.goto('/dashboard', { waitUntil: 'networkidle' })
|
|
77
|
+
|
|
78
|
+
// Wait for specific API response
|
|
79
|
+
await page.waitForResponse(resp =>
|
|
80
|
+
resp.url().includes('/api/users') && resp.status() === 200
|
|
81
|
+
)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Assertions with auto-retry
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
// ✅ Auto-retrying assertions (Playwright retries until timeout)
|
|
88
|
+
await expect(page.getByText('Success')).toBeVisible()
|
|
89
|
+
await expect(page.getByRole('list')).toHaveCount(5)
|
|
90
|
+
|
|
91
|
+
// ❌ Non-retrying — can be flaky
|
|
92
|
+
const text = await page.textContent('.message')
|
|
93
|
+
expect(text).toBe('Success')
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Page Object Model
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
// pages/LoginPage.ts
|
|
100
|
+
export class LoginPage {
|
|
101
|
+
constructor(private page: Page) {}
|
|
102
|
+
|
|
103
|
+
async goto() {
|
|
104
|
+
await this.page.goto('/login')
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
async login(email: string, password: string) {
|
|
108
|
+
await this.page.getByLabel('Email').fill(email)
|
|
109
|
+
await this.page.getByLabel('Password').fill(password)
|
|
110
|
+
await this.page.getByRole('button', { name: 'Sign in' }).click()
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Visual regression testing
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
test('homepage visual regression', async ({ page }) => {
|
|
119
|
+
await page.goto('/')
|
|
120
|
+
await expect(page).toHaveScreenshot('homepage.png', {
|
|
121
|
+
maxDiffPixelRatio: 0.01,
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- Screenshots are stored in `tests/*.png` (or configured path).
|
|
127
|
+
- First run creates baseline screenshots.
|
|
128
|
+
- Subsequent runs compare against baselines.
|
|
129
|
+
- Update baselines: `npx playwright test --update-snapshots`.
|
|
130
|
+
|
|
131
|
+
## Viewport testing
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
test.describe('Responsive design', () => {
|
|
135
|
+
for (const viewport of [
|
|
136
|
+
{ width: 1440, height: 900, name: 'desktop' },
|
|
137
|
+
{ width: 768, height: 1024, name: 'tablet' },
|
|
138
|
+
{ width: 375, height: 812, name: 'mobile' },
|
|
139
|
+
]) {
|
|
140
|
+
test(`renders correctly on ${viewport.name}`, async ({ page }) => {
|
|
141
|
+
await page.setViewportSize(viewport)
|
|
142
|
+
await page.goto('/')
|
|
143
|
+
await expect(page).toHaveScreenshot(`home-${viewport.name}.png`)
|
|
144
|
+
})
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Debugging
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# Run with headed browser (see what's happening)
|
|
153
|
+
npx playwright test --headed
|
|
154
|
+
|
|
155
|
+
# Run with Playwright Inspector (step through)
|
|
156
|
+
npx playwright test --debug
|
|
157
|
+
|
|
158
|
+
# View test report
|
|
159
|
+
npx playwright show-report
|
|
160
|
+
|
|
161
|
+
# Run specific test
|
|
162
|
+
npx playwright test -g "should login"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Avoiding flaky tests
|
|
166
|
+
|
|
167
|
+
| Problem | Solution |
|
|
168
|
+
|---|---|
|
|
169
|
+
| Element not ready | Use auto-retrying assertions (`toBeVisible`, `toHaveText`) |
|
|
170
|
+
| Animation interference | Use `page.evaluate(() => document.body.style.setProperty('--transition-duration', '0s'))` |
|
|
171
|
+
| Network timing | Wait for specific responses, not arbitrary timeouts |
|
|
172
|
+
| Test isolation | Use fresh browser context per test (Playwright default) |
|
|
173
|
+
| Shared state | Reset database/state before each test |
|
|
174
|
+
|
|
175
|
+
## Authentication pattern
|
|
176
|
+
|
|
177
|
+
```ts
|
|
178
|
+
// Use storageState to avoid logging in via UI in every test
|
|
179
|
+
// auth.setup.ts
|
|
180
|
+
import { test as setup } from '@playwright/test'
|
|
181
|
+
|
|
182
|
+
setup('authenticate', async ({ page }) => {
|
|
183
|
+
await page.goto('/login')
|
|
184
|
+
await page.getByLabel('Email').fill(process.env.TEST_USER_EMAIL!)
|
|
185
|
+
await page.getByLabel('Password').fill(process.env.TEST_USER_PASSWORD!)
|
|
186
|
+
await page.getByRole('button', { name: 'Sign in' }).click()
|
|
187
|
+
await page.waitForURL('/dashboard')
|
|
188
|
+
await page.context().storageState({ path: '.auth/user.json' })
|
|
189
|
+
})
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
```ts
|
|
193
|
+
// playwright.config.ts — use storage state in projects
|
|
194
|
+
projects: [
|
|
195
|
+
{ name: 'setup', testMatch: /.*\.setup\.ts/ },
|
|
196
|
+
{
|
|
197
|
+
name: 'chromium',
|
|
198
|
+
use: { ...devices['Desktop Chrome'], storageState: '.auth/user.json' },
|
|
199
|
+
dependencies: ['setup'],
|
|
200
|
+
},
|
|
201
|
+
]
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Network mocking
|
|
205
|
+
|
|
206
|
+
```ts
|
|
207
|
+
// Mock API responses for isolated testing
|
|
208
|
+
await page.route('**/api/users', route =>
|
|
209
|
+
route.fulfill({
|
|
210
|
+
status: 200,
|
|
211
|
+
contentType: 'application/json',
|
|
212
|
+
body: JSON.stringify([{ id: 1, name: 'Test User' }]),
|
|
213
|
+
})
|
|
214
|
+
)
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Output format
|
|
218
|
+
|
|
219
|
+
1. Playwright test file with Page Object pattern
|
|
220
|
+
2. Reliable locators using role/label selectors over CSS
|
|
221
|
+
|
|
222
|
+
## Auto-trigger keywords
|
|
223
|
+
|
|
224
|
+
- Playwright
|
|
225
|
+
- E2E test
|
|
226
|
+
- browser automation
|
|
227
|
+
- visual regression
|
|
228
|
+
- end-to-end
|
|
229
|
+
|
|
230
|
+
## Gotcha
|
|
231
|
+
|
|
232
|
+
- Don't use `page.waitForTimeout()` as a fix — it masks the real problem and makes tests flaky.
|
|
233
|
+
- The model tends to use CSS selectors instead of semantic locators — always prefer `getByRole`, `getByLabel`.
|
|
234
|
+
- `test.fixme()` is for app bugs, `test.skip()` is for environment constraints — don't confuse them.
|
|
235
|
+
- After 3 failed fix attempts on one test, mark it `test.fixme()` and move on.
|
|
236
|
+
|
|
237
|
+
## Do NOT
|
|
238
|
+
|
|
239
|
+
- Do NOT skip assertions — every test must verify something meaningful.
|
|
240
|
+
- Do NOT share state between tests — each test should be independent.
|
|
241
|
+
- Do NOT hardcode URLs — use `baseURL` from config.
|
|
242
|
+
- Do NOT test implementation details — test user-visible behavior.
|
|
243
|
+
- Do NOT put assertions in Page Objects — assertions belong in test files.
|
|
244
|
+
- Do NOT commit `.only` — enforce via `forbidOnly: !!process.env.CI`.
|