@event4u/agent-config 2.24.0 → 2.26.0

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.
Files changed (161) hide show
  1. package/.agent-src/commands/bug-fix.md +1 -0
  2. package/.agent-src/commands/create-pr/description-only.md +39 -11
  3. package/.agent-src/commands/create-pr.md +59 -5
  4. package/.agent-src/commands/feature/roadmap.md +2 -2
  5. package/.agent-src/commands/fix/seeder.md +3 -2
  6. package/.agent-src/commands/memory/add.md +3 -3
  7. package/.agent-src/commands/module/create.md +1 -0
  8. package/.agent-src/commands/module/explore.md +10 -6
  9. package/.agent-src/commands/onboard.md +9 -1
  10. package/.agent-src/commands/optimize/augmentignore.md +52 -20
  11. package/.agent-src/commands/optimize/rtk.md +56 -30
  12. package/.agent-src/commands/package-test.md +86 -10
  13. package/.agent-src/commands/quality-fix.md +49 -27
  14. package/.agent-src/commands/update-form-request-messages.md +2 -1
  15. package/.agent-src/commands/video/from-script.md +5 -5
  16. package/.agent-src/commands/video/storyboard.md +1 -1
  17. package/.agent-src/contexts/augment-infrastructure.md +4 -7
  18. package/.agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +1 -1
  19. package/.agent-src/contexts/contracts/research-schema.md +1 -1
  20. package/.agent-src/contexts/execution/interrupt-examples.md +34 -0
  21. package/.agent-src/contexts/execution/roadmap-process-loop.md +69 -14
  22. package/.agent-src/contexts/skills-and-commands.md +2 -2
  23. package/.agent-src/personas/README.md +3 -2
  24. package/.agent-src/personas/ai-video-technical-director.md +2 -2
  25. package/.agent-src/personas/hollywood-director.md +3 -3
  26. package/.agent-src/profiles/content_creator.yml +5 -0
  27. package/.agent-src/rules/architecture.md +24 -10
  28. package/.agent-src/rules/artifact-drafting-protocol.md +6 -0
  29. package/.agent-src/rules/augment-edit-discipline.md +28 -0
  30. package/.agent-src/rules/augment-source-of-truth.md +2 -2
  31. package/.agent-src/rules/autonomous-execution.md +31 -0
  32. package/.agent-src/rules/context-hygiene.md +1 -1
  33. package/.agent-src/rules/domain-adoption-policy.md +4 -5
  34. package/.agent-src/rules/domain-safety-disclaimer.md +114 -0
  35. package/.agent-src/rules/domain-safety-pii.md +142 -0
  36. package/.agent-src/rules/domain-safety-retention.md +86 -0
  37. package/.agent-src/rules/downstream-changes.md +4 -4
  38. package/.agent-src/rules/framework-neutrality-in-generic-skills.md +130 -0
  39. package/.agent-src/rules/git-history-discipline.md +99 -0
  40. package/.agent-src/rules/media-governance-routing.md +82 -0
  41. package/.agent-src/rules/minimal-safe-diff.md +6 -0
  42. package/.agent-src/rules/no-roadmap-references.md +4 -2
  43. package/.agent-src/rules/persona-governance.md +90 -0
  44. package/.agent-src/rules/provider-lifecycle-discipline.md +75 -0
  45. package/.agent-src/rules/roadmap-ci-steps-policy.md +145 -0
  46. package/.agent-src/rules/roadmap-progress-sync.md +11 -5
  47. package/.agent-src/rules/user-interrupt-priority.md +46 -0
  48. package/.agent-src/rules/verify-before-complete.md +11 -2
  49. package/.agent-src/skills/adversarial-review/SKILL.md +1 -1
  50. package/.agent-src/skills/ai-council/SKILL.md +1 -0
  51. package/.agent-src/skills/api-endpoint/SKILL.md +58 -154
  52. package/.agent-src/skills/api-testing/SKILL.md +11 -0
  53. package/.agent-src/skills/character-consistency/SKILL.md +12 -1
  54. package/.agent-src/skills/code-refactoring/SKILL.md +36 -30
  55. package/.agent-src/skills/code-review/SKILL.md +41 -36
  56. package/.agent-src/skills/context-authoring/SKILL.md +1 -1
  57. package/.agent-src/skills/dashboard-design/SKILL.md +1 -2
  58. package/.agent-src/skills/database/SKILL.md +8 -3
  59. package/.agent-src/skills/dependency-upgrade/SKILL.md +65 -19
  60. package/.agent-src/skills/developer-like-execution/SKILL.md +25 -14
  61. package/.agent-src/skills/eloquent/SKILL.md +1 -1
  62. package/.agent-src/skills/feature-planning/SKILL.md +1 -1
  63. package/.agent-src/skills/file-editor/SKILL.md +45 -19
  64. package/.agent-src/skills/finishing-a-development-branch/SKILL.md +2 -2
  65. package/.agent-src/skills/git-workflow/SKILL.md +135 -2
  66. package/.agent-src/skills/laravel-api-endpoint/SKILL.md +187 -0
  67. package/.agent-src/skills/{dto-creator → laravel-dto}/SKILL.md +5 -4
  68. package/.agent-src/skills/{migration-creator → laravel-migration}/SKILL.md +11 -10
  69. package/.agent-src/skills/laravel-reverb/SKILL.md +3 -3
  70. package/.agent-src/skills/{websocket → laravel-websocket}/SKILL.md +4 -3
  71. package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +1 -1
  72. package/.agent-src/skills/merge-conflicts/SKILL.md +49 -17
  73. package/.agent-src/skills/migration-architect/SKILL.md +6 -6
  74. package/.agent-src/skills/module-management/SKILL.md +1 -0
  75. package/.agent-src/skills/motion-choreographer/SKILL.md +12 -0
  76. package/.agent-src/skills/multi-tenancy/SKILL.md +15 -8
  77. package/.agent-src/skills/pest-testing/SKILL.md +18 -0
  78. package/.agent-src/skills/php-debugging/SKILL.md +28 -0
  79. package/.agent-src/skills/php-service/SKILL.md +3 -3
  80. package/.agent-src/skills/pixar-storyteller/SKILL.md +19 -6
  81. package/.agent-src/skills/playwright-testing/SKILL.md +16 -1
  82. package/.agent-src/skills/project-analyzer/SKILL.md +68 -42
  83. package/.agent-src/skills/readme-writing-package/SKILL.md +94 -23
  84. package/.agent-src/skills/roadmap-management/SKILL.md +1 -1
  85. package/.agent-src/skills/roadmap-writing/SKILL.md +10 -0
  86. package/.agent-src/skills/rtk-output-filtering/SKILL.md +23 -8
  87. package/.agent-src/skills/rule-refactor/SKILL.md +145 -0
  88. package/.agent-src/skills/rule-writing/SKILL.md +34 -8
  89. package/.agent-src/skills/scene-expander/SKILL.md +22 -7
  90. package/.agent-src/skills/security/SKILL.md +38 -29
  91. package/.agent-src/skills/skill-reviewer/SKILL.md +1 -1
  92. package/.agent-src/skills/test-driven-development/SKILL.md +4 -4
  93. package/.agent-src/skills/test-performance/SKILL.md +6 -5
  94. package/.agent-src/skills/verify-completion-evidence/SKILL.md +24 -27
  95. package/.agent-src/skills/video-director/SKILL.md +13 -0
  96. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  97. package/.agent-src/templates/copilot-instructions.md +2 -2
  98. package/.agent-src/templates/roadmaps.md +16 -0
  99. package/.agent-src/templates/rule.md +2 -2
  100. package/.claude-plugin/marketplace.json +6 -4
  101. package/AGENTS.md +1 -1
  102. package/CHANGELOG.md +80 -133
  103. package/README.md +6 -4
  104. package/config/agent-settings.template.yml +26 -0
  105. package/docs/architecture.md +2 -2
  106. package/docs/archive/CHANGELOG-pre-2.25.0.md +191 -0
  107. package/docs/catalog.md +20 -12
  108. package/docs/contracts/file-ownership-matrix.json +588 -90
  109. package/docs/contracts/kernel-membership.md +17 -0
  110. package/docs/contracts/provider-lifecycle.md +122 -0
  111. package/docs/contracts/smoke-contracts.md +8 -8
  112. package/docs/decisions/ADR-011-domain-pack-readiness.md +213 -0
  113. package/docs/decisions/INDEX.md +1 -0
  114. package/docs/getting-started-by-role.md +10 -0
  115. package/docs/getting-started.md +1 -1
  116. package/docs/guidelines/php/api-design.md +1 -1
  117. package/docs/guidelines/php/controllers.md +1 -1
  118. package/docs/guidelines/php/resources.md +1 -1
  119. package/docs/guidelines/php/validations.md +1 -1
  120. package/docs/personas.md +73 -26
  121. package/docs/profiles.md +9 -4
  122. package/package.json +1 -1
  123. package/scripts/_tmp_scan_framework_leakage.py +119 -0
  124. package/scripts/ai-video/adapters/gemini-veo.sh +5 -0
  125. package/scripts/ai-video/adapters/higgsfield.sh +6 -0
  126. package/scripts/ai-video/adapters/kling.sh +5 -0
  127. package/scripts/ai-video/adapters/openai-images.sh +5 -0
  128. package/scripts/ai-video/adapters/sora.sh +6 -0
  129. package/scripts/build_linear_digest.py +0 -1
  130. package/scripts/check_portability.py +6 -0
  131. package/scripts/lint_framework_leakage.py +348 -0
  132. package/scripts/lint_framework_leakage_allowlist.json +476 -0
  133. package/scripts/lint_media_policy_linkage.py +140 -0
  134. package/scripts/lint_persona_governance.py +164 -0
  135. package/scripts/lint_roadmap_ci_steps.py +182 -0
  136. package/scripts/measure_augment_budget.py +6 -0
  137. package/scripts/schemas/command.schema.json +5 -0
  138. package/scripts/schemas/skill.schema.json +5 -0
  139. package/scripts/skill_linter.py +60 -7
  140. package/scripts/smoke/kernel.sh +4 -4
  141. package/scripts/smoke/router.sh +2 -2
  142. package/scripts/smoke/schema.sh +1 -1
  143. package/.agent-src/personas/pixar-storyboard-artist.md +0 -98
  144. package/.agent-src/rules/agent-docs.md +0 -20
  145. package/.agent-src/rules/augment-portability.md +0 -23
  146. package/.agent-src/rules/capture-learnings.md +0 -19
  147. package/.agent-src/rules/docs-sync.md +0 -20
  148. package/.agent-src/rules/domain-safety-disclaimer-consulting.md +0 -52
  149. package/.agent-src/rules/domain-safety-disclaimer-financial.md +0 -54
  150. package/.agent-src/rules/domain-safety-disclaimer-legal.md +0 -49
  151. package/.agent-src/rules/domain-safety-disclaimer-medical.md +0 -56
  152. package/.agent-src/rules/domain-safety-export-redact.md +0 -65
  153. package/.agent-src/rules/domain-safety-logging-pii-floor.md +0 -55
  154. package/.agent-src/rules/domain-safety-pii-finance.md +0 -57
  155. package/.agent-src/rules/domain-safety-pii-marketing.md +0 -60
  156. package/.agent-src/rules/domain-safety-pii-recruiting.md +0 -56
  157. package/.agent-src/rules/domain-safety-pii-support.md +0 -57
  158. package/.agent-src/rules/domain-safety-retention-finance.md +0 -48
  159. package/.agent-src/rules/domain-safety-retention-support.md +0 -55
  160. package/.agent-src/rules/e2e-testing.md +0 -19
  161. package/.agent-src/rules/no-unsolicited-rebase.md +0 -107
@@ -27,8 +27,8 @@ Do NOT use when:
27
27
 
28
28
  ## Procedure: Before opening a PR
29
29
 
30
- 1. Run quality pipeline: PHPStanRectorECSPHPStan (see `quality-tools` skill).
31
- 2. Run tests: `php artisan test`.
30
+ 1. Run the project's quality pipeline (see `quality-tools` skill) — typically: type-checkerauto-fixerlintertype-checker.
31
+ 2. Run the project's test command — detect from manifest: `php artisan test` / `vendor/bin/phpunit` (PHP), `npm test` / `pnpm test` / `vitest` / `jest` (JS-TS), `pytest` (Python), `cargo test` (Rust), `go test ./...` (Go).
32
32
  3. Rebase onto `main`.
33
33
  4. Fill in PR template completely.
34
34
 
@@ -77,6 +77,139 @@ The project uses `.github/pull_request_template.md`:
77
77
  - `main` is default/production branch.
78
78
  - Merge strategy: merge commits (not squash).
79
79
 
80
+ ## Procedure: Safe squash-after-push
81
+
82
+ Use ONLY when the user explicitly authorized a squash on a branch that
83
+ is already on origin. The whole sequence runs in **one turn** — never
84
+ end the session between rewrite and push.
85
+
86
+ Trigger context: `git-history-discipline` rule routed here.
87
+
88
+ ### 1. Snapshot before touching anything
89
+
90
+ ```bash
91
+ BRANCH=$(git branch --show-current)
92
+ DATE=$(date +%F)
93
+ git fetch origin
94
+ git tag "safe-squash-pre/${BRANCH}/${DATE}" HEAD
95
+ git tag "safe-squash-origin/${BRANCH}/${DATE}" "@{u}"
96
+ ```
97
+
98
+ Two tags = two recoveries (local tip + origin tip). Do not skip the
99
+ tags — `git reflog` is TTL-bounded and unreliable across sessions.
100
+
101
+ ### 2. Verify aligned starting state
102
+
103
+ ```bash
104
+ git rev-list --left-right --count HEAD...@{u}
105
+ ```
106
+
107
+ - `0 0` → aligned, proceed.
108
+ - `N 0` (local ahead) → unpushed work, proceed.
109
+ - `0 N` (origin ahead) → `git pull --ff-only` first, then re-check.
110
+ - `M N` (both non-zero) → **divergent**. Abandon the squash and run
111
+ § Divergent-State Recovery below.
112
+
113
+ ### 3. Perform the squash
114
+
115
+ Default — soft-reset path (single token-cheap rewrite):
116
+
117
+ ```bash
118
+ git reset --soft "$(git merge-base HEAD <base>)"
119
+ git commit -m "<conventional commit message>"
120
+ ```
121
+
122
+ Interactive rebase only when the user wants per-commit control — it
123
+ replays derived files (`.compression-hashes.json`, router projections)
124
+ per commit and conflicts on every replay.
125
+
126
+ ### 4. Re-push in the SAME turn
127
+
128
+ ```bash
129
+ FETCHED_SHA=$(git rev-parse "@{u}")
130
+ git push --force-with-lease="${BRANCH}:${FETCHED_SHA}" origin "${BRANCH}"
131
+ git fetch origin
132
+ [ "$(git rev-parse HEAD)" = "$(git rev-parse @{u})" ] \
133
+ && echo "OK: origin matches HEAD" \
134
+ || echo "MISMATCH — do not end session"
135
+ ```
136
+
137
+ If the push fails (pre-push hook, network, token budget):
138
+ - Fix the underlying cause **now**.
139
+ - Re-push immediately.
140
+ - Do not commit new work on top of the squashed-but-unpushed tip.
141
+ - Do not end the session until `HEAD == @{u}`.
142
+
143
+ ### 5. Hand off only with verified parity
144
+
145
+ Report exactly:
146
+ - pre-squash tip SHA (from step 1)
147
+ - pre-squash tag name (for recovery)
148
+ - post-squash tip SHA == origin SHA (verified in step 4)
149
+ - PR number, if any, and confirm it picked up the new tip
150
+
151
+ ## Procedure: Divergent-State Recovery
152
+
153
+ Fires when `git rev-list --left-right --count HEAD...@{u}` shows
154
+ **both** sides non-zero on the current branch.
155
+
156
+ ### 1. Stop. Do not pull.
157
+
158
+ A blind `git pull --rebase` here replays remote commits on top of a
159
+ local history that may already represent the same work in a different
160
+ shape — guaranteed conflict storm in derived files, possible
161
+ double-application of the same change. This is the documented failure
162
+ mode behind `git-history-discipline`.
163
+
164
+ ### 2. Tag both sides immediately
165
+
166
+ ```bash
167
+ TS=$(date +%FT%H%M)
168
+ git tag "diverged-local/${TS}" HEAD
169
+ git tag "diverged-origin/${TS}" "@{u}"
170
+ ```
171
+
172
+ ### 3. Diagnose: which side is the correct future?
173
+
174
+ ```bash
175
+ git log --oneline @{u}..HEAD # local-only commits
176
+ git log --oneline HEAD..@{u} # origin-only commits
177
+ git diff @{u}..HEAD --stat # shape of local-ahead work
178
+ ```
179
+
180
+ Decision matrix:
181
+
182
+ | Pattern | Future | Action |
183
+ |---|---|---|
184
+ | Local has the same logical work as origin, just reshaped (squash/rebase) | **Local** | After PR-review check (step 4), `git push --force-with-lease=<branch>:<origin-sha>` |
185
+ | Origin has commits local does not reflect (another contributor pushed) | **Origin** | Tag any local-ahead work for cherry-pick, then `git reset --hard @{u}` |
186
+ | Both sides have genuine independent work | **ask user** | Never decide silently — surface the two commit lists and let the user pick |
187
+
188
+ ### 4. PR review-comment check (mandatory before any force-push)
189
+
190
+ If a PR is open on this branch:
191
+ ```bash
192
+ gh pr view --json reviews,comments
193
+ # or via GitHub API: /repos/<owner>/<repo>/pulls/<num>/{reviews,comments}
194
+ ```
195
+
196
+ If review comments are anchored to commits that the force-push will
197
+ erase → STOP, ask the user how to preserve them. A force-push that
198
+ destroys live review feedback is unrecoverable from the agent side.
199
+
200
+ ### 5. Recover or proceed
201
+
202
+ Use the tags from step 2 to restore either side if step 4 surfaces a
203
+ problem. After resolution, verify `HEAD == @{u}` and report both
204
+ SHAs plus the tags created.
205
+
206
+ ## Hard prohibitions on a pushed branch
207
+
208
+ - No `git pull --rebase` after detecting divergent state.
209
+ - No `git push --force` without `--force-with-lease=<branch>:<sha>`.
210
+ - No squash-then-end-session — the push must complete in the same turn.
211
+ - No reflog-only recovery — always tag the state explicitly first.
212
+
80
213
  ## Output format
81
214
 
82
215
  1. Commits following conventional commit format
@@ -0,0 +1,187 @@
1
+ ---
2
+ name: laravel-api-endpoint
3
+ description: "Use when creating a new Laravel API endpoint — Controller, FormRequest, Resource, route, Policy, OpenAPI annotations — versioned route layout, single-action `__invoke` controllers."
4
+ source: package
5
+ domain: engineering
6
+ ---
7
+
8
+ # laravel-api-endpoint
9
+
10
+ ## When to use
11
+
12
+ Use this skill when the project is **Laravel** (detected via `artisan` + `composer.json` with `laravel/framework`) and the user asks to create a new API endpoint, REST route, or controller action.
13
+
14
+ Routed in from [`api-endpoint`](../api-endpoint/SKILL.md) once the stack is detected as Laravel.
15
+
16
+ Do NOT use when:
17
+ - Modifying existing endpoints — use the code-refactoring skill.
18
+ - API design decisions — use [`api-design`](../api-design/SKILL.md).
19
+ - The project is Symfony / Next.js / FastAPI / etc. — go back to [`api-endpoint`](../api-endpoint/SKILL.md) and pick the right carve-out.
20
+
21
+ ## Procedure: Create a Laravel API endpoint
22
+
23
+ 1. **Read project docs** — Check `./agents/` and `AGENTS.md` for controller conventions, resource patterns, routing.
24
+ 2. **Create route** — Add to the correct `routes/api.php` or module route file (`routes/api/v{N}/{domain}.php`).
25
+ 3. **Create controller** — Single-action invokable controller, thin, delegate logic to a service.
26
+ 4. **Create FormRequest** — Validate all input at the boundary; authorize via Policy in `authorize()`.
27
+ 5. **Create Resource** — Transform model output via API Resource (never raw arrays / models / `response()->json()`).
28
+ 6. **Create Policy** — If authorization is needed and no Policy exists yet.
29
+ 7. **Verify** — Run PHPStan, run tests, confirm response shape matches conventions.
30
+
31
+ ## What to generate
32
+
33
+ 1. **Controller** — Single Action (invokable). Read `agents/docs/controller.md` and `../../../docs/guidelines/php/controllers.md`.
34
+ 2. **FormRequest** — Validation rules, `authorize()` via policies. Read `../../../docs/guidelines/php/validations.md`.
35
+ 3. **Resource** — JSON response transformation. Read `agents/docs/api-resources.md`.
36
+ 4. **Route** — Add to the correct versioned route file.
37
+ 5. **Policy** — If authorization is needed.
38
+ 6. **Filter classes** — If it's a list endpoint with filtering. Read `agents/docs/query-filter.md` (if it exists).
39
+
40
+ ## Conventions
41
+
42
+ - Controllers are thin — delegate to Services.
43
+ - **Every controller MUST return an API Resource** — never raw arrays, models, or `response()->json()`.
44
+ - Controllers type-hint the return value as the Resource class (e.g. `): ProjectResource`).
45
+ - Use `Resource::make()` for single items, `Resource::collection()` for lists.
46
+ - Use method injection on `__invoke()` for new controllers.
47
+ - Use DTOs for data transfer between layers.
48
+
49
+ ## Show endpoint example
50
+
51
+ ```php
52
+ declare(strict_types=1);
53
+
54
+ namespace App\Http\Controllers\v1\Project;
55
+
56
+ use App\Http\Controllers\Controller;
57
+ use App\Http\Requests\v1\Projects\ShowProjectRequest;
58
+ use App\Http\Resources\v1\Project\ProjectResource;
59
+ use App\Models\ExternalCustomerDatabase\Project\Project;
60
+ use App\OpenApi\Schema\Request\ShowResourceRequestSchema;
61
+ use App\OpenApi\Schema\Response\ResourceNotFoundResponse;
62
+ use App\OpenApi\Schema\Response\ShowResourceResponseSchema;
63
+
64
+ class ShowProjectController extends Controller
65
+ {
66
+ #[ShowResourceRequestSchema(path: '/projects/{id}', version: '1', resource: ProjectResource::class)]
67
+ #[ShowResourceResponseSchema(ProjectResource::class, wrapInDataObject: false)]
68
+ #[ResourceNotFoundResponse(ProjectResource::class)]
69
+ public function __invoke(ShowProjectRequest $request, Project $project): ProjectResource
70
+ {
71
+ return ProjectResource::make($project);
72
+ }
73
+ }
74
+ ```
75
+
76
+ ## Create endpoint with service injection
77
+
78
+ ```php
79
+ class CreateCustomerController extends Controller
80
+ {
81
+ #[CreateCustomerRequestSchema(path: '/customers', version: '1', resource: CustomerResource::class)]
82
+ #[CreateResourceResponseSchema(resource: CreatedCustomerResource::class, wrapInDataObject: false)]
83
+ #[ValidationErrorResponse]
84
+ public function __invoke(
85
+ CreateCustomerRequest $request,
86
+ CustomerModelService $customerService,
87
+ ): CustomerResource {
88
+ $result = $customerService->create(CreateCustomerDTO::fromRequest($request));
89
+
90
+ return CreatedCustomerResource::make($result);
91
+ }
92
+ }
93
+ ```
94
+
95
+ ## FormRequest example
96
+
97
+ ```php
98
+ declare(strict_types=1);
99
+
100
+ namespace App\Http\Requests\v1\Projects;
101
+
102
+ use Illuminate\Foundation\Http\FormRequest;
103
+
104
+ class ShowProjectRequest extends FormRequest
105
+ {
106
+ public function authorize(): bool
107
+ {
108
+ return $this->user()->can('view', $this->route('project'));
109
+ }
110
+
111
+ /** @return array<string, mixed> */
112
+ public function rules(): array
113
+ {
114
+ return [];
115
+ }
116
+ }
117
+ ```
118
+
119
+ ## List endpoint with CollectionFormRequest
120
+
121
+ For list endpoints, extend `CollectionFormRequest` which provides `perPage`, `page`, and `orderBy` rules:
122
+
123
+ ```php
124
+ use App\Contracts\Http\Requests\CollectionFormRequest;
125
+
126
+ class ListProjectsRequest extends CollectionFormRequest
127
+ {
128
+ public string $model = Project::class;
129
+
130
+ /** @return array<string, mixed> */
131
+ public function rules(): array
132
+ {
133
+ return [
134
+ ...parent::rules(),
135
+ 'status' => ['sometimes', 'string'],
136
+ ];
137
+ }
138
+ }
139
+ ```
140
+
141
+ ## File locations
142
+
143
+ | Component | Path |
144
+ |---|---|
145
+ | Controller | `app/Http/Controllers/v{N}/{Domain}/{Action}{Entity}Controller.php` |
146
+ | FormRequest | `app/Http/Requests/v{N}/{Domain}/{Action}{Entity}Request.php` |
147
+ | Resource | `app/Http/Resources/v{N}/{Domain}/{Entity}Resource.php` |
148
+ | Route | `routes/api/v{N}/{domain}.php` |
149
+ | Policy | `app/Policies/{Entity}Policy.php` |
150
+
151
+ ## OpenAPI documentation
152
+
153
+ Controllers use PHP 8 attributes for OpenAPI spec generation from `App\OpenApi\Schema\`:
154
+
155
+ - `ShowResourceRequestSchema`, `ListResourceRequestSchema`, `CreateResourceRequestSchema`
156
+ - `ShowResourceResponseSchema`, `ListResourceResponseSchema`, `CreateResourceResponseSchema`
157
+ - `ResourceNotFoundResponse`, `ValidationErrorResponse`
158
+
159
+ ## Output format
160
+
161
+ 1. Generated files — controller, route registration, FormRequest, Resource, Policy.
162
+ 2. Test file with happy path and validation error cases.
163
+ 3. Summary of created files and their locations.
164
+
165
+ ## Gotcha
166
+
167
+ - Don't forget to register the route — creating the controller without the route is a common miss.
168
+ - Always check if a similar endpoint already exists — duplicates cause confusion.
169
+ - FormRequest validation rules must match the OpenAPI schema — keep them in sync.
170
+ - The model tends to forget the `return` type on Resource `toArray()` methods.
171
+
172
+ ## Do NOT
173
+
174
+ - Do NOT put business logic in controllers — delegate to services.
175
+ - Do NOT skip FormRequest validation — every controller needs a FormRequest.
176
+ - Do NOT return raw Eloquent models — always use API Resources.
177
+ - Do NOT create routes without proper authorization (Policy in FormRequest or middleware).
178
+ - Do NOT create multi-action controllers — only single-action with `__invoke()`.
179
+ - Do NOT use `response()->json()` — use `Resource::make()`.
180
+
181
+ ## Auto-trigger keywords
182
+
183
+ - laravel endpoint
184
+ - laravel controller
185
+ - form request
186
+ - API resource
187
+ - laravel api route
@@ -1,11 +1,12 @@
1
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."
2
+ name: laravel-dto
3
+ description: "Use when creating a Laravel/PHP DTO with the SimpleDto base class and attribute mapping. For DTOs in other stacks, use the stack-native skill (TypeScript, Python, Rust, Go)."
4
4
  source: package
5
5
  domain: engineering
6
+ framework: laravel
6
7
  ---
7
8
 
8
- # dto-creator
9
+ # laravel-dto
9
10
 
10
11
  ## When to use
11
12
 
@@ -102,7 +103,7 @@ Always check `composer.json` for DTO-related packages before choosing the approa
102
103
 
103
104
  - DTOs must extend `SimpleDto` — don't create plain PHP classes as DTOs.
104
105
  - The model forgets to add the model linkage (`$modelClass`) when the DTO maps to an Eloquent model.
105
- - Attribute names in the DTO must match the DB column names (snake_case), not the PHP property names.
106
+ - Attribute names in the DTO must match the database column names (snake_case), not the PHP property names.
106
107
 
107
108
  ## Do NOT
108
109
 
@@ -1,11 +1,12 @@
1
1
  ---
2
- name: migration-creator
3
- description: "Use when the user says "create migration", "add column", or "new table". Creates migrations with correct table prefixes, column naming, and multi-tenant awareness."
2
+ name: laravel-migration
3
+ description: "Use when creating a Laravel migration table prefixes, column naming, multi-tenant awareness, php artisan make:migration. Other stacks: use stack-native migration tooling."
4
4
  source: package
5
5
  domain: engineering
6
+ framework: laravel
6
7
  ---
7
8
 
8
- # migration-creator
9
+ # laravel-migration
9
10
 
10
11
  ## When to use
11
12
 
@@ -27,9 +28,9 @@ Use this skill when the user asks to create a database migration, add a column,
27
28
 
28
29
  ## Laravel projects
29
30
 
30
- ### Multi-DB architecture
31
+ ### Multi-database architecture
31
32
 
32
- Some projects use multiple DB connections. Check `config/database.php` for connections.
33
+ Some projects use multiple database connections. Check `config/database.php` for connections.
33
34
 
34
35
  | Check | How |
35
36
  |---|---|
@@ -37,9 +38,9 @@ Some projects use multiple DB connections. Check `config/database.php` for conne
37
38
  | Migration directories | `database/migrations/` (default), check for additional directories |
38
39
  | Custom migrate commands | `php artisan list migrate` — look for project-specific commands |
39
40
 
40
- **Always determine which DB the table belongs to before creating a migration.**
41
+ **Always determine which database the table belongs to before creating a migration.**
41
42
 
42
- ### API DB migration
43
+ ### API database migration
43
44
 
44
45
  ```bash
45
46
  php artisan make:migration create_example_table
@@ -73,13 +74,13 @@ return new class extends Migration {
73
74
  };
74
75
  ```
75
76
 
76
- ### Customer DB migration
77
+ ### Customer database migration
77
78
 
78
79
  ```bash
79
80
  php artisan make:migration:customer AddWeatherColumn --table=cl_lv_weather
80
81
  ```
81
82
 
82
- Customer DB tables use the `cl_` prefix (e.g. `cl_user`, `cl_lv_weather`).
83
+ Customer database tables use the `cl_` prefix (e.g. `cl_user`, `cl_lv_weather`).
83
84
 
84
85
  ### Adding a column (with explicit connection)
85
86
 
@@ -153,7 +154,7 @@ Focus on the "Database migrations" attack questions: Can this destroy data? Is r
153
154
 
154
155
  ## Auto-trigger keywords
155
156
 
156
- - DB migration
157
+ - database migration
157
158
  - create migration
158
159
  - table prefix
159
160
  - column naming
@@ -16,12 +16,12 @@ Use this skill for anything specific to **Laravel Reverb** as the WebSocket serv
16
16
  - Pusher protocol compatibility questions
17
17
 
18
18
  For **general WebSocket patterns**, broadcasting events, channel authorization,
19
- and Laravel Echo client setup, see the [websocket](../websocket/SKILL.md) skill.
19
+ and Laravel Echo client setup, see the [laravel-websocket](../laravel-websocket/SKILL.md) skill.
20
20
 
21
21
  ## Procedure: Set up Reverb
22
22
 
23
23
  1. **Install** — `php artisan install:broadcasting` or manual setup (see below).
24
- 2. **Configure** — Set env variables for Reverb host, port, app credentials.
24
+ 2. **Configure** — Set environment variables for Reverb host, port, app credentials.
25
25
  3. **Start server** — `php artisan reverb:start`.
26
26
  4. **Connect client** — Configure Laravel Echo with Reverb credentials.
27
27
  5. **Verify** — Confirm WebSocket connection in browser console, test event delivery.
@@ -195,7 +195,7 @@ location /app {
195
195
  ## Gotcha
196
196
 
197
197
  - Reverb requires a persistent process — it's not compatible with serverless deployments.
198
- - The model forgets to configure the `REVERB_HOST` and `REVERB_PORT` env variables.
198
+ - The model forgets to configure the `REVERB_HOST` and `REVERB_PORT` environment variables.
199
199
  - WebSocket connections bypass middleware — don't rely on session auth for channel authorization.
200
200
 
201
201
  ## Do NOT
@@ -1,11 +1,12 @@
1
1
  ---
2
- name: websocket
3
- description: "Use when building real-time features — WebSocket broadcasting, live updates, presence channels, connection state even when the user just says 'push this to the client live'."
2
+ name: laravel-websocket
3
+ description: "Use when building Laravel real-time features — Broadcasting events, ShouldBroadcast, private/presence channels, Echo client. For non-Laravel WebSockets, use the stack-native skill."
4
4
  source: package
5
5
  domain: engineering
6
+ framework: laravel
6
7
  ---
7
8
 
8
- # websocket
9
+ # laravel-websocket
9
10
 
10
11
  ## When to use
11
12
 
@@ -79,7 +79,7 @@ Before proceeding, the learning MUST pass all gates:
79
79
  | Minimal | Update existing preferred over creation? |
80
80
 
81
81
  If ANY gate fails → **stop**. Do not create or update anything.
82
- See `capture-learnings` rule for rejection criteria.
82
+ Memory-entry rejection criteria live in `/memory:add` (see § "When to skip").
83
83
 
84
84
  ### 1. State the learning clearly
85
85
 
@@ -51,19 +51,29 @@ For each conflicted file:
51
51
  | Auto-generated files (OpenAPI spec, baselines) | **Regenerate** — resolve source, then regenerate the output |
52
52
  | Formatting-only conflicts | **Accept either** — then run quality tools to normalize |
53
53
 
54
- ### 4. File-type specific rules
54
+ ### 4. File-type specific rules (stack-aware)
55
55
 
56
- #### PHP files
56
+ #### Source files (any language)
57
57
 
58
- - After resolving, check that `use` statements are correct (no duplicates, no missing imports).
59
- - Verify the resolved code compiles: `php -l filename.php`
60
- - Run PHPStan on the file: `vendor/bin/phpstan analyse` (see `quality-tools` skill)
58
+ - After resolving, check that import statements are correct (no duplicates, no missing imports). Applies to PHP `use`, JS/TS `import`, Python `import`, Go `import`, Rust `use`.
59
+ - Verify the resolved file parses with the project's type-checker / linter on just the touched file:
60
+ - PHP: `php -l filename.php` then `vendor/bin/phpstan analyse path/to/file.php`
61
+ - TypeScript: `tsc --noEmit` (full project) or `eslint path/to/file.ts`
62
+ - Python: `python -m py_compile path/to/file.py` then `mypy path/to/file.py`
63
+ - Go: `go vet ./path/to/pkg/...`
64
+ - Rust: `cargo check`
61
65
 
62
- #### Migrations
66
+ #### Database migrations
63
67
 
64
68
  - Never merge two migrations that modify the same table into one.
65
- - If both branches added migrations, keep both — adjust timestamps if they collide.
66
- - After resolving, run migrations to verify: `php artisan migrate --env=testing`
69
+ - If both branches added migrations, keep both — adjust timestamps / ordering to avoid collision.
70
+ - After resolving, run migrations against a disposable database to verify:
71
+ - Laravel: `php artisan migrate --env=testing`
72
+ - Symfony / Doctrine: `php bin/console doctrine:migrations:migrate --env=test --no-interaction`
73
+ - Node / Prisma: `pnpm prisma migrate dev --schema=...`
74
+ - Node / Knex: `pnpm knex migrate:latest --env test`
75
+ - Python / Alembic: `alembic upgrade head` (against a test DB URL)
76
+ - Go / golang-migrate: `migrate -path ./migrations -database "$TEST_DATABASE_URL" up`
67
77
 
68
78
  #### Config files
69
79
 
@@ -95,18 +105,40 @@ For each conflicted file:
95
105
  After resolving ALL conflicts:
96
106
 
97
107
  ```bash
98
- # 1. Check no conflict markers remain
99
- grep -rn "<<<<<<< \|======= \|>>>>>>> " --include="*.php" --include="*.js" --include="*.ts" .
108
+ # 1. Check no conflict markers remain (stack-agnostic — no --include filter)
109
+ grep -rn "<<<<<<< \|======= \|>>>>>>> " . \
110
+ --exclude-dir=node_modules --exclude-dir=vendor --exclude-dir=.git
111
+ ```
100
112
 
101
- # 2. Syntax check PHP files
102
- find . -name "*.php" -newer .git/MERGE_HEAD -exec php -l {} \;
113
+ ```bash
114
+ # 2. Syntax-check changed files (stack-dependent pick the row that matches the project)
115
+ # PHP: find . -name "*.php" -newer .git/MERGE_HEAD -exec php -l {} \;
116
+ # TS: tsc --noEmit
117
+ # Python: python -m compileall -q .
118
+ # Go: go build ./...
119
+ # Rust: cargo check
120
+ ```
103
121
 
104
- # 3. Run quality tools
105
- vendor/bin/phpstan analyse
122
+ ```bash
123
+ # 3. Run the project's quality tools — resolve via the quality-tools skill, Taskfile,
124
+ # package.json scripts, composer.json scripts, or Makefile. Examples per stack:
125
+ # PHP: vendor/bin/phpstan analyse
126
+ # TS: pnpm lint
127
+ # Python: ruff check && mypy
128
+ # Go: golangci-lint run
129
+ # Rust: cargo clippy
130
+ ```
106
131
 
107
- # 4. Run tests
108
- php artisan test
132
+ ```bash
133
+ # 4. Run tests — full suite, not just the touched files
134
+ # PHP: php artisan test (or vendor/bin/pest)
135
+ # TS: pnpm test
136
+ # Python: pytest
137
+ # Go: go test ./...
138
+ # Rust: cargo test
139
+ ```
109
140
 
141
+ ```bash
110
142
  # 5. Complete the merge/rebase
111
143
  git add .
112
144
  # Don't commit — let the user decide when to commit
@@ -156,4 +188,4 @@ git add .
156
188
 
157
189
  - Do NOT rebase or force-push without explicit permission.
158
190
  - Do NOT leave conflict markers (`<<<<<<<`) in any file.
159
- - Do NOT skip verification (PHPStan + tests) after resolving.
191
+ - Do NOT skip verification (project type-checker + tests) after resolving.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: migration-architect
3
- description: "Use when shaping a non-trivial migration — rollout phases, dual-write windows, cutover sequencing, deprecation cycles — hands off to `migration-creator` for DDL once locked."
3
+ description: "Use when shaping a non-trivial migration — rollout phases, dual-write windows, cutover sequencing, deprecation cycles — hands off to the framework-specific migration skill for DDL once locked."
4
4
  personas:
5
5
  - backend-architect
6
6
  - senior-engineer
@@ -13,8 +13,8 @@ domain: process
13
13
  > Shape the **rollout strategy** for a migration before any DDL or
14
14
  > code is written. Plans phases, dual-write windows, cutover
15
15
  > sequencing, deprecation cycles, and cross-service coordination.
16
- > Hands off to [`migration-creator`](../migration-creator/SKILL.md)
17
- > for tactical DDL once the plan is locked.
16
+ > Hands off to [`laravel-migration`](../laravel-migration/SKILL.md)
17
+ > (or the framework-native equivalent) for tactical DDL once the plan is locked.
18
18
 
19
19
  ## When to use
20
20
 
@@ -28,7 +28,7 @@ domain: process
28
28
  Do NOT use when:
29
29
 
30
30
  - The change is a single additive migration safe in one deploy →
31
- route to [`migration-creator`](../migration-creator/SKILL.md).
31
+ route to [`laravel-migration`](../laravel-migration/SKILL.md) (or framework-native equivalent).
32
32
  - The decision is *whether* to migrate at all → route to
33
33
  [`decision-record`](../decision-record/SKILL.md) first.
34
34
  - The concern is data correctness during the migration → route to
@@ -100,7 +100,7 @@ Phases:
100
100
  Deprecation cycle (if any):
101
101
  Announce <duration> → soft-fail <duration> → hard-fail <duration> → remove
102
102
 
103
- Next: /migration-creator for the DDL of phase 1
103
+ Next: /laravel-migration (or framework-native equivalent) for the DDL of phase 1
104
104
  ```
105
105
 
106
106
  ## Gotcha
@@ -112,7 +112,7 @@ Next: /migration-creator for the DDL of phase 1
112
112
 
113
113
  ## Do NOT
114
114
 
115
- - Do NOT write DDL — that is `migration-creator`'s job.
115
+ - Do NOT write DDL — that is the framework-specific migration skill's job (`laravel-migration` for Laravel).
116
116
  - Do NOT collapse phases to "ship it" because the user is impatient;
117
117
  surface the risk and let the user decide.
118
118
  - Do NOT skip the deprecation cycle because nobody is using the old
@@ -3,6 +3,7 @@ name: module-management
3
3
  description: "Use when the user says "create module", "explore module", or works within app/Modules/. Understands module structure, auto-loading, route registration, and namespace conventions."
4
4
  source: package
5
5
  domain: process
6
+ framework: laravel
6
7
  ---
7
8
 
8
9
  # module
@@ -147,3 +147,15 @@ stdin shape. The orchestrator pipes this into the video adapter's
147
147
  - Do NOT paraphrase identity tokens from `character.json`.
148
148
  - Do NOT call any network API — this skill is provider-tuning
149
149
  prose only.
150
+
151
+ ## Policies
152
+
153
+ Motion prompts inherit upstream blueprint constraints. Before emitting provider-tuned prose:
154
+
155
+ - [`agents/policies/media/disclosure.md`](../../../agents/policies/media/disclosure.md) — every distributed clip → non-removable AI-generation disclosure; refuse adapter flags that suppress it.
156
+ - [`agents/policies/media/transparency.md`](../../../agents/policies/media/transparency.md) — provider provenance (C2PA / SynthID) preserved; refuse re-encode flags that strip provenance.
157
+ - [`agents/policies/media/voice-cloning.md`](../../../agents/policies/media/voice-cloning.md) — motion prompt requests `audio: native` in named voice.
158
+ - [`agents/policies/media/brand-impersonation.md`](../../../agents/policies/media/brand-impersonation.md) — copies recognised brand's chyron / mascot / signature transition.
159
+
160
+ Refuse-and-surface; motion prompt cannot launder upstream policy gap.
161
+