@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,245 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docker
|
|
3
|
+
description: "Use when working with Docker — Dockerfile edits, docker-compose services, containers, or the dual-container (fast + Xdebug) setup — even when the user just says 'my container won't start'."
|
|
4
|
+
source: package
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# docker
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Use this skill when working with Docker configuration, container setup, Dockerfile changes, or docker-compose modifications.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
Do NOT use when:
|
|
15
|
+
- Production deployment (use `aws-infrastructure` skill)
|
|
16
|
+
- Codespaces setup (use `devcontainer` skill)
|
|
17
|
+
|
|
18
|
+
## Procedure: Modify Docker setup
|
|
19
|
+
|
|
20
|
+
1. **Gather context** — read project Docker docs in `agents/` or `Docs/`, check `Makefile`/`Taskfile.yml` for targets, read `docker-compose.yml`/`compose.yaml` for service layout.
|
|
21
|
+
2. **Identify scope** — determine which service(s) are affected (PHP, NGINX, worker, scheduler, database).
|
|
22
|
+
3. **Inspect current state** — run `docker compose ps` to see running containers and their health status.
|
|
23
|
+
4. **Make the change** — edit the relevant file (Dockerfile, compose file, NGINX config, Makefile target). Follow the conventions in the reference sections below.
|
|
24
|
+
5. **Rebuild affected containers** — `docker compose build <service>` (add `--no-cache` if Dockerfile base layers changed).
|
|
25
|
+
6. **Verify** — `docker compose up -d`, check `docker compose ps` for healthy status, run a smoke test (e.g., `make test-quick` or `curl localhost`).
|
|
26
|
+
|
|
27
|
+
## Project architecture
|
|
28
|
+
|
|
29
|
+
### Dockerfile (`.docker/Dockerfile`)
|
|
30
|
+
|
|
31
|
+
Multi-stage build with these targets:
|
|
32
|
+
|
|
33
|
+
| Stage | Purpose |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `base` | Alpine + PHP-FPM + system packages + extensions |
|
|
36
|
+
| `dev` | Development: Xdebug, dev tools, Composer dev deps |
|
|
37
|
+
| `pro` | Production: optimized, no dev deps, New Relic agent |
|
|
38
|
+
|
|
39
|
+
Key build args:
|
|
40
|
+
- `PHP_VERSION` — extracted from Dockerfile, used by CI
|
|
41
|
+
- `COMPOSER_AUTH` — private registry access (passed as secret)
|
|
42
|
+
- `CACHEBUST` — weekly cache invalidation (`date +%Y-%U`)
|
|
43
|
+
- `COMPOSER_NO_DEV` — `1` for production, `0` for dev
|
|
44
|
+
|
|
45
|
+
### Dual-container architecture (PHP projects)
|
|
46
|
+
|
|
47
|
+
Some projects run two PHP-FPM containers simultaneously (fast + Xdebug):
|
|
48
|
+
|
|
49
|
+
| Container | Purpose | PHP-FPM mode |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `{project}-php` | Fast execution, no debugger | `pm = dynamic` |
|
|
52
|
+
| `{project}-php-xdebug` | Xdebug enabled, debugging | `pm = ondemand` |
|
|
53
|
+
|
|
54
|
+
NGINX routes requests based on HTTP headers:
|
|
55
|
+
- No header → fast container
|
|
56
|
+
- `X-Xdebug-Enable: 1` or `X-Debug-Session: PHPSTORM` → Xdebug container
|
|
57
|
+
|
|
58
|
+
### docker-compose services
|
|
59
|
+
|
|
60
|
+
Read `docker-compose.yml` / `compose.yaml` to discover the actual service names. Common patterns:
|
|
61
|
+
|
|
62
|
+
| Service type | Description |
|
|
63
|
+
|---|---|
|
|
64
|
+
| PHP-FPM | Main application server |
|
|
65
|
+
| PHP-FPM + Xdebug | Debugging container |
|
|
66
|
+
| NGINX | Reverse proxy |
|
|
67
|
+
| Queue worker | Background job processing (e.g., Horizon) |
|
|
68
|
+
| Scheduler | Cron/task scheduler |
|
|
69
|
+
| Database | MariaDB / MySQL / PostgreSQL |
|
|
70
|
+
| Cache | Redis / Memcached |
|
|
71
|
+
|
|
72
|
+
## Conventions
|
|
73
|
+
|
|
74
|
+
### Container commands
|
|
75
|
+
|
|
76
|
+
- **Always execute PHP commands inside the container**, never on the host.
|
|
77
|
+
- Use `docker compose exec -T <service> ...` for non-interactive (scripts, CI).
|
|
78
|
+
- Use `make console` for interactive shell access.
|
|
79
|
+
- Use `make console-xdebug` for Xdebug container access.
|
|
80
|
+
|
|
81
|
+
### Image building
|
|
82
|
+
|
|
83
|
+
- Production images use `target: pro` — no dev dependencies.
|
|
84
|
+
- Check the project's CI/CD config for target platform and registry.
|
|
85
|
+
- Docker Hub login may be needed for pulling base images (rate limits).
|
|
86
|
+
|
|
87
|
+
### PHP extensions
|
|
88
|
+
|
|
89
|
+
Extensions are installed via `mlocati/php-extension-installer`:
|
|
90
|
+
- Check the Dockerfile for the current list.
|
|
91
|
+
- Add new extensions in the `base` stage so they're available in all targets.
|
|
92
|
+
|
|
93
|
+
### Environment files
|
|
94
|
+
|
|
95
|
+
- `.env` is NOT baked into the Docker image.
|
|
96
|
+
- Production: `.env` is fetched from **AWS Secrets Manager** at deploy time.
|
|
97
|
+
- Development: `.env` is mounted via docker-compose volumes.
|
|
98
|
+
|
|
99
|
+
## Makefile targets
|
|
100
|
+
|
|
101
|
+
Always check the `Makefile` for available targets before using raw docker commands:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
make start # Start all containers
|
|
105
|
+
make stop # Stop all containers
|
|
106
|
+
make console # Enter PHP container (bash)
|
|
107
|
+
make console-xdebug # Enter Xdebug PHP container
|
|
108
|
+
make composer-install # Run composer install in container
|
|
109
|
+
make migrate # Run migrations
|
|
110
|
+
make migrate-and-seed # Run migrations + seed
|
|
111
|
+
make test # Run all tests (parallel)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
## Container orchestration
|
|
116
|
+
|
|
117
|
+
### Environment synchronization
|
|
118
|
+
|
|
119
|
+
When the development environment is out of sync (missing containers, wrong state):
|
|
120
|
+
|
|
121
|
+
1. **Check status** — `docker compose ps` to see which services are running.
|
|
122
|
+
2. **Start missing services** — `make start` or `docker compose up -d`.
|
|
123
|
+
3. **Rebuild if needed** — `docker compose build --no-cache <service>` after Dockerfile changes.
|
|
124
|
+
4. **Reset state** — `make migrate-and-seed` after fresh container start.
|
|
125
|
+
|
|
126
|
+
### Common sync issues
|
|
127
|
+
|
|
128
|
+
| Symptom | Cause | Fix |
|
|
129
|
+
|---|---|---|
|
|
130
|
+
| "Connection refused" | Container not running | `make start` |
|
|
131
|
+
| "Table not found" | Migrations not run | `make migrate-and-seed` |
|
|
132
|
+
| "Class not found" | Composer not installed | `make composer-install` |
|
|
133
|
+
| Old PHP version | Image not rebuilt | `docker compose build <php-service>` |
|
|
134
|
+
| Extension missing | Dockerfile changed | Rebuild with `--no-cache` |
|
|
135
|
+
|
|
136
|
+
### Multi-project orchestration
|
|
137
|
+
|
|
138
|
+
When running multiple projects simultaneously:
|
|
139
|
+
- Check for **port conflicts** — each project needs unique exposed ports.
|
|
140
|
+
- Use **Traefik** (see `traefik` skill) for routing by domain instead of port.
|
|
141
|
+
- Shared services (MariaDB, Redis) can be in a dedicated `docker-compose.shared.yml`.
|
|
142
|
+
|
|
143
|
+
## Security hardening checklist
|
|
144
|
+
|
|
145
|
+
When creating or reviewing Dockerfiles:
|
|
146
|
+
|
|
147
|
+
- [ ] **Non-root user** — create user with specific UID/GID, use `USER` directive before `CMD`.
|
|
148
|
+
- [ ] **No secrets in layers** — never `ENV` or `COPY` secrets. Use `--mount=type=secret` (BuildKit) or runtime secrets.
|
|
149
|
+
- [ ] **Minimal packages** — only install what's needed. Remove package manager cache in the same `RUN` layer.
|
|
150
|
+
- [ ] **Read-only root filesystem** — use `--read-only` flag where possible, mount writable dirs explicitly.
|
|
151
|
+
- [ ] **No `latest` tag** — pin base image versions (`node:18.19-alpine`, not `node:latest`).
|
|
152
|
+
- [ ] **Scan images** — use `docker scout quickview` or Trivy for vulnerability scanning.
|
|
153
|
+
|
|
154
|
+
```dockerfile
|
|
155
|
+
# Security pattern
|
|
156
|
+
RUN addgroup -g 1001 -S appgroup && \
|
|
157
|
+
adduser -S appuser -u 1001 -G appgroup
|
|
158
|
+
COPY --chown=appuser:appgroup . .
|
|
159
|
+
USER 1001
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Health check patterns
|
|
163
|
+
|
|
164
|
+
Always add health checks to long-running services:
|
|
165
|
+
|
|
166
|
+
```dockerfile
|
|
167
|
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
168
|
+
CMD curl -f http://localhost:8080/health || exit 1
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
In docker-compose, use `condition: service_healthy` for dependency ordering:
|
|
172
|
+
|
|
173
|
+
```yaml
|
|
174
|
+
services:
|
|
175
|
+
app:
|
|
176
|
+
depends_on:
|
|
177
|
+
db:
|
|
178
|
+
condition: service_healthy
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Image size optimization
|
|
182
|
+
|
|
183
|
+
| Technique | Impact | When |
|
|
184
|
+
|---|---|---|
|
|
185
|
+
| Multi-stage builds | **High** | Always — separate build from runtime |
|
|
186
|
+
| Alpine base images | **High** | When compatibility allows |
|
|
187
|
+
| Distroless images | **High** | Production, no shell needed |
|
|
188
|
+
| `.dockerignore` | **Medium** | Always — exclude `node_modules`, `.git`, `tests`, docs |
|
|
189
|
+
| Combine `RUN` layers | **Medium** | When installing packages + cleaning cache |
|
|
190
|
+
| Copy only artifacts | **Medium** | `COPY --from=build` only what's needed |
|
|
191
|
+
|
|
192
|
+
## Build cache optimization
|
|
193
|
+
|
|
194
|
+
Use BuildKit cache mounts for package managers:
|
|
195
|
+
|
|
196
|
+
```dockerfile
|
|
197
|
+
# Composer (PHP)
|
|
198
|
+
RUN --mount=type=cache,target=/root/.composer/cache \
|
|
199
|
+
composer install --no-dev --optimize-autoloader
|
|
200
|
+
|
|
201
|
+
# npm (Node.js)
|
|
202
|
+
RUN --mount=type=cache,target=/root/.npm \
|
|
203
|
+
npm ci --only=production
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Layer ordering for cache efficiency:**
|
|
207
|
+
1. System packages (changes rarely)
|
|
208
|
+
2. Dependency files (`composer.json`, `package.json`) — changes sometimes
|
|
209
|
+
3. `RUN install` — cached if dependency files unchanged
|
|
210
|
+
4. Source code (`COPY . .`) — changes often, last layer
|
|
211
|
+
|
|
212
|
+
## Output format
|
|
213
|
+
|
|
214
|
+
1. Modified Docker configuration files (Dockerfile, docker-compose.yml)
|
|
215
|
+
2. Updated Makefile targets if applicable
|
|
216
|
+
3. Rebuild/restart instructions for affected containers
|
|
217
|
+
|
|
218
|
+
## Auto-trigger keywords
|
|
219
|
+
|
|
220
|
+
- Docker
|
|
221
|
+
- docker-compose
|
|
222
|
+
- container
|
|
223
|
+
- Dockerfile
|
|
224
|
+
- PHP container
|
|
225
|
+
|
|
226
|
+
## Gotcha
|
|
227
|
+
|
|
228
|
+
- All PHP commands (artisan, composer, phpunit) must run INSIDE the PHP container — never on the host.
|
|
229
|
+
- The fast container and Xdebug container share the same codebase but have different PHP configs — don't confuse them.
|
|
230
|
+
- `docker compose down -v` destroys volumes including the database — use `down` without `-v` unless you mean it.
|
|
231
|
+
- The model forgets to use `docker compose exec -T` (no TTY) when running in scripts or CI.
|
|
232
|
+
|
|
233
|
+
## Do NOT
|
|
234
|
+
|
|
235
|
+
- Do NOT change the base Alpine or PHP version without checking CI compatibility.
|
|
236
|
+
- Do NOT add dev-only tools to the `pro` stage.
|
|
237
|
+
- Do NOT hardcode secrets in the Dockerfile — use build args or runtime secrets.
|
|
238
|
+
- Do NOT change `platform` without verifying AWS runner architecture.
|
|
239
|
+
|
|
240
|
+
## Related
|
|
241
|
+
|
|
242
|
+
- **Skill:** `traefik` — local reverse proxy with real domains and HTTPS
|
|
243
|
+
- **Skill:** `devcontainer` — DevContainer and Codespaces setup
|
|
244
|
+
- **Skill:** `php-debugging` — Xdebug dual-container architecture
|
|
245
|
+
- **Rule:** `docker-commands.md` — all PHP commands run inside Docker
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dto-creator
|
|
3
|
+
description: "Use when the user says "create a DTO", "new data transfer object", or needs to convert request/response data into a typed PHP class. Creates DTOs with SimpleDto base class and attribute mapping."
|
|
4
|
+
source: package
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# dto-creator
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Use this skill when creating a new DTO for data transfer between layers (DB ↔ PHP, API ↔ Service, etc.).
|
|
12
|
+
|
|
13
|
+
## Procedure: Create a DTO
|
|
14
|
+
|
|
15
|
+
1. **Read the project's DTO docs** — check `agents/docs/dto.md` (if it exists) for project-specific conventions.
|
|
16
|
+
2. **Check the base class** — search for the DTO base class in the project (e.g., `SimpleDto`, `LiteDto`, or a custom base).
|
|
17
|
+
Check `composer.json` for DTO-related packages.
|
|
18
|
+
3. **Check existing DTOs** — look at neighboring DTOs in the same directory to match the style.
|
|
19
|
+
4. **Understand the model** — if the DTO maps to a Model, read the model's properties and DB columns.
|
|
20
|
+
|
|
21
|
+
## DTO conventions
|
|
22
|
+
|
|
23
|
+
### Base class
|
|
24
|
+
|
|
25
|
+
- Use the project's standard DTO base class (typically `SimpleDto` or `LiteDto`).
|
|
26
|
+
- Never create plain PHP classes for DTOs that map to models — always extend the base class.
|
|
27
|
+
|
|
28
|
+
### Property mapping
|
|
29
|
+
|
|
30
|
+
- Use `#[Map('db_column')]` attributes to map between DB column names and PHP properties.
|
|
31
|
+
- PHP properties: `camelCase`, English names.
|
|
32
|
+
- DB columns: `snake_case`, may be German (legacy) — match what's in the database.
|
|
33
|
+
|
|
34
|
+
### Type casting
|
|
35
|
+
|
|
36
|
+
- Use typed properties (`int`, `string`, `float`, `bool`, `Carbon`, etc.).
|
|
37
|
+
- The base class handles casting from DB strings to PHP types automatically.
|
|
38
|
+
|
|
39
|
+
### Validation
|
|
40
|
+
|
|
41
|
+
- Use validation attributes where appropriate: `#[Length(50)]`, `#[Email]`, `#[Decimal(10,2)]`, `#[Unsigned]`.
|
|
42
|
+
- Add `#[ConvertEmptyToNull]` at class level if empty strings should become null.
|
|
43
|
+
|
|
44
|
+
### Model linkage
|
|
45
|
+
|
|
46
|
+
- Add `#[HasModel(ModelClass::class)]` on the DTO.
|
|
47
|
+
- Add `#[HasDto(DtoClass::class)]` and `DtoMappingTrait` on the Model (if not already present).
|
|
48
|
+
|
|
49
|
+
## Structure
|
|
50
|
+
|
|
51
|
+
```php
|
|
52
|
+
<?php
|
|
53
|
+
|
|
54
|
+
declare(strict_types=1);
|
|
55
|
+
|
|
56
|
+
namespace App\DTO;
|
|
57
|
+
|
|
58
|
+
use Vendor\DataHelpers\SimpleDto;
|
|
59
|
+
use Vendor\DataHelpers\SimpleDto\Attributes\HasModel;
|
|
60
|
+
use Vendor\DataHelpers\SimpleDto\Attributes\Map;
|
|
61
|
+
|
|
62
|
+
#[HasModel(MyModel::class)]
|
|
63
|
+
class MyModelDto extends SimpleDto
|
|
64
|
+
{
|
|
65
|
+
#[Map('id_column')]
|
|
66
|
+
public ?int $id = null;
|
|
67
|
+
|
|
68
|
+
#[Map('name_column')]
|
|
69
|
+
public string $name = '';
|
|
70
|
+
|
|
71
|
+
#[Map('amount_column')]
|
|
72
|
+
public float $amount = 0.0;
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Project detection
|
|
77
|
+
|
|
78
|
+
The DTO pattern varies by project:
|
|
79
|
+
|
|
80
|
+
- **Projects with a DTO package**: Use the package's base class with attribute mapping.
|
|
81
|
+
Read `agents/docs/dto.md` for full details (if it exists).
|
|
82
|
+
- **Projects without a DTO package**: Check existing DTOs for the local pattern.
|
|
83
|
+
Some projects use plain `readonly` classes, others have custom base classes.
|
|
84
|
+
|
|
85
|
+
Always check `composer.json` for DTO-related packages before choosing the approach.
|
|
86
|
+
|
|
87
|
+
## Rules
|
|
88
|
+
|
|
89
|
+
- **Match existing patterns** — if the project already has DTOs, follow their style.
|
|
90
|
+
- **Do NOT create DTOs for trivial data** — if a simple array or typed parameter suffices, don't over-engineer.
|
|
91
|
+
- **Use `Math` helper** for any calculated properties — never raw PHP arithmetic.
|
|
92
|
+
- **`declare(strict_types=1)`** in every new file.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## Output format
|
|
96
|
+
|
|
97
|
+
1. DTO class extending SimpleDto with typed properties
|
|
98
|
+
2. Static factory method(s) for construction from common sources
|
|
99
|
+
|
|
100
|
+
## Gotcha
|
|
101
|
+
|
|
102
|
+
- DTOs must extend `SimpleDto` — don't create plain PHP classes as DTOs.
|
|
103
|
+
- The model forgets to add the model linkage (`$modelClass`) when the DTO maps to an Eloquent model.
|
|
104
|
+
- Attribute names in the DTO must match the database column names (snake_case), not the PHP property names.
|
|
105
|
+
|
|
106
|
+
## Do NOT
|
|
107
|
+
|
|
108
|
+
- Do NOT add business logic to DTOs — they are data containers only.
|
|
109
|
+
- Do NOT use arrays when a DTO can provide type safety.
|
|
110
|
+
- Do NOT skip validation when creating DTOs from external input.
|
|
111
|
+
|
|
112
|
+
## Auto-trigger keywords
|
|
113
|
+
|
|
114
|
+
- DTO
|
|
115
|
+
- data transfer object
|
|
116
|
+
- SimpleDto
|
|
117
|
+
- attribute mapping
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: eloquent
|
|
3
|
+
description: "Use when writing Eloquent models, relationships, scopes, or queries via Model:: — 'fetch users with their orders'. NOT for PHPStan output, non-Eloquent services, or raw SQL questions."
|
|
4
|
+
source: package
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# eloquent
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Use when creating/modifying Eloquent models, relationships, scopes, or writing database queries.
|
|
12
|
+
|
|
13
|
+
Do NOT use when:
|
|
14
|
+
- Schema design or query optimization (use `database` skill)
|
|
15
|
+
- Creating migrations only (use `migration-creator` skill)
|
|
16
|
+
|
|
17
|
+
## Procedure: Create or modify a model
|
|
18
|
+
|
|
19
|
+
### Step 0: Inspect
|
|
20
|
+
|
|
21
|
+
1. Check existing models — match property declarations, cast patterns, relationship style, scope naming.
|
|
22
|
+
2. Check for repositories — some projects use repository interfaces.
|
|
23
|
+
3. Understand the schema — check migrations for column names, types, constraints.
|
|
24
|
+
4. Check for multi-tenancy — which `$connection` to use?
|
|
25
|
+
|
|
26
|
+
### Step 1: Read attribute access style
|
|
27
|
+
|
|
28
|
+
Read `eloquent.access_style` from `.agent-settings.yml`. Default: `getters_setters`.
|
|
29
|
+
|
|
30
|
+
| Value | Inside model | Outside model |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| `getters_setters` | `getAttribute()` / `setAttribute()` | Typed getters/setters |
|
|
33
|
+
| `get_attribute` | `getAttribute()` / `setAttribute()` | Same |
|
|
34
|
+
| `magic_properties` | `$this->column` | `$model->column` |
|
|
35
|
+
|
|
36
|
+
→ See guideline `php/eloquent.md` and `php-coding` rule for full conventions.
|
|
37
|
+
|
|
38
|
+
### Step 2: Build the model
|
|
39
|
+
|
|
40
|
+
1. Set `$connection`, `$table`, `$fillable`/`$guarded`, `$casts`, `$attributes` (defaults).
|
|
41
|
+
2. Add typed getters + fluent setters for each attribute (if `getters_setters` style).
|
|
42
|
+
3. Add relationship getter above each relationship method.
|
|
43
|
+
4. Add scopes for reusable query constraints.
|
|
44
|
+
5. Register Observer via `#[ObservedBy]` — never use `booted()`.
|
|
45
|
+
|
|
46
|
+
### Step 3: Write queries
|
|
47
|
+
|
|
48
|
+
- Always eager load relationships accessed in loops: `->with(['customer'])`.
|
|
49
|
+
- Always paginate list queries: `->paginate(15)`.
|
|
50
|
+
- Use `exists()` over `count() > 0`.
|
|
51
|
+
- Use `chunk()` / `lazy()` for large datasets.
|
|
52
|
+
- Constrain eager loads when only a subset is needed.
|
|
53
|
+
|
|
54
|
+
## Conventions
|
|
55
|
+
|
|
56
|
+
→ See guideline `php/eloquent.md` for getter/setter examples, relationship getters, observers, casts.
|
|
57
|
+
→ See guideline `php/database.md` for indexing, transactions, migrations.
|
|
58
|
+
|
|
59
|
+
### Validate
|
|
60
|
+
|
|
61
|
+
- Run PHPStan on model — must pass.
|
|
62
|
+
- Verify no N+1: check that all relationship access in loops uses eager loading.
|
|
63
|
+
- Confirm typed getters exist for every relationship.
|
|
64
|
+
- Run affected tests — must pass.
|
|
65
|
+
|
|
66
|
+
## Output format
|
|
67
|
+
|
|
68
|
+
1. Model class with typed getters/setters, relationships, and observer
|
|
69
|
+
2. Migration file if schema changes are needed
|
|
70
|
+
|
|
71
|
+
## Gotcha
|
|
72
|
+
|
|
73
|
+
- Never access relationships via magic properties — always use typed getter.
|
|
74
|
+
- N+1 queries are the #1 performance issue — always eager load.
|
|
75
|
+
- `getAttribute()` returns `mixed` — cast or type-check the result.
|
|
76
|
+
- `$model->save()` can silently fail without fillable/guarded config.
|
|
77
|
+
|
|
78
|
+
## Do NOT
|
|
79
|
+
|
|
80
|
+
- Do NOT put business logic in models — delegate to services.
|
|
81
|
+
- Do NOT access relationships in loops without eager loading.
|
|
82
|
+
- Do NOT use `Model::all()` without pagination on list endpoints.
|
|
83
|
+
- Do NOT use `booted()` for lifecycle hooks — use Observers with `#[ObservedBy]`.
|
|
84
|
+
|
|
85
|
+
## Auto-trigger keywords
|
|
86
|
+
|
|
87
|
+
- Eloquent
|
|
88
|
+
- model
|
|
89
|
+
- relationship
|
|
90
|
+
- scope
|
|
91
|
+
- accessor
|
|
92
|
+
- mutator
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "eloquent",
|
|
3
|
+
"model": "claude-sonnet-4-5",
|
|
4
|
+
"timestamp": "2026-04-21T08:32:36+00:00",
|
|
5
|
+
"router": "mock",
|
|
6
|
+
"queries": [
|
|
7
|
+
{
|
|
8
|
+
"q": "fetch all users with their latest order eagerly",
|
|
9
|
+
"expected": true,
|
|
10
|
+
"observed": true,
|
|
11
|
+
"loaded_skills": [
|
|
12
|
+
"eloquent"
|
|
13
|
+
],
|
|
14
|
+
"passed": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"q": "add a scope to Product that filters by active and in-stock",
|
|
18
|
+
"expected": true,
|
|
19
|
+
"observed": true,
|
|
20
|
+
"loaded_skills": [
|
|
21
|
+
"eloquent"
|
|
22
|
+
],
|
|
23
|
+
"passed": true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"q": "my blog model should cast the tags column to array",
|
|
27
|
+
"expected": true,
|
|
28
|
+
"observed": true,
|
|
29
|
+
"loaded_skills": [
|
|
30
|
+
"eloquent"
|
|
31
|
+
],
|
|
32
|
+
"passed": true
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"q": "write a relationship from Invoice to LineItems using hasMany",
|
|
36
|
+
"expected": true,
|
|
37
|
+
"observed": true,
|
|
38
|
+
"loaded_skills": [
|
|
39
|
+
"eloquent"
|
|
40
|
+
],
|
|
41
|
+
"passed": true
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"q": "this N+1 is killing me \u2014 how do I eager load nested relations?",
|
|
45
|
+
"expected": true,
|
|
46
|
+
"observed": true,
|
|
47
|
+
"loaded_skills": [
|
|
48
|
+
"eloquent"
|
|
49
|
+
],
|
|
50
|
+
"passed": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"q": "create a migration for adding an index on users.email",
|
|
54
|
+
"expected": false,
|
|
55
|
+
"observed": false,
|
|
56
|
+
"loaded_skills": [],
|
|
57
|
+
"passed": true
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"q": "write a Pest test for the UserService",
|
|
61
|
+
"expected": false,
|
|
62
|
+
"observed": false,
|
|
63
|
+
"loaded_skills": [],
|
|
64
|
+
"passed": true
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"q": "phpstan says mixed return type on my model method",
|
|
68
|
+
"expected": false,
|
|
69
|
+
"observed": false,
|
|
70
|
+
"loaded_skills": [],
|
|
71
|
+
"passed": true
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"q": "run the seeder with --class=ProductSeeder",
|
|
75
|
+
"expected": false,
|
|
76
|
+
"observed": false,
|
|
77
|
+
"loaded_skills": [],
|
|
78
|
+
"passed": true
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"q": "what SQL does chunk() generate under the hood?",
|
|
82
|
+
"expected": false,
|
|
83
|
+
"observed": false,
|
|
84
|
+
"loaded_skills": [],
|
|
85
|
+
"passed": true
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"metrics": {
|
|
89
|
+
"true_positive": 5,
|
|
90
|
+
"false_positive": 0,
|
|
91
|
+
"true_negative": 5,
|
|
92
|
+
"false_negative": 0,
|
|
93
|
+
"precision": 1.0,
|
|
94
|
+
"recall": 1.0
|
|
95
|
+
},
|
|
96
|
+
"input_tokens": 20122,
|
|
97
|
+
"output_tokens": 160,
|
|
98
|
+
"cost_usd_estimate": 0.062766
|
|
99
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "eloquent",
|
|
3
|
+
"description": "5 should-trigger + 5 should-not-trigger queries. A-class accepted ambiguity (e.g. 'User*' substring pulling eloquent alongside a non-Model intent) is marked with trigger=true and a note — the router loading eloquent is defensible, not a routing failure. Near-misses share Laravel/database vocabulary (migration, seeder, model, SQL) without being Model:: read/write tasks.",
|
|
4
|
+
"queries": [
|
|
5
|
+
{"q": "fetch all users with their latest order eagerly", "trigger": true},
|
|
6
|
+
{"q": "add a scope to Product that filters by active and in-stock", "trigger": true},
|
|
7
|
+
{"q": "my blog model should cast the tags column to array", "trigger": true},
|
|
8
|
+
{"q": "write a relationship from Invoice to LineItems using hasMany", "trigger": true},
|
|
9
|
+
{"q": "this N+1 is killing me — how do I eager load nested relations?", "trigger": true},
|
|
10
|
+
{"q": "create a migration for adding an index on users.email", "trigger": false},
|
|
11
|
+
{"q": "write a Pest test for the UserService", "trigger": true, "note": "A-class: 'User*' is inherently ambiguous (Model or Service). Router loading eloquent alongside pest-testing / php-service is defensible multi-skill activation, not a routing failure. Pushy 'NOT for non-Eloquent services' description tail was insufficient to override the lexical pull — see agents/docs/trigger-evals-poc-findings.md #3"},
|
|
12
|
+
{"q": "phpstan says mixed return type on my model method", "trigger": false},
|
|
13
|
+
{"q": "run the seeder with --class=ProductSeeder", "trigger": false},
|
|
14
|
+
{"q": "what SQL does chunk() generate under the hood?", "trigger": false}
|
|
15
|
+
]
|
|
16
|
+
}
|