@event4u/agent-config 2.25.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 (122) hide show
  1. package/.agent-src/commands/bug-fix.md +1 -0
  2. package/.agent-src/commands/feature/roadmap.md +2 -2
  3. package/.agent-src/commands/fix/seeder.md +3 -2
  4. package/.agent-src/commands/memory/add.md +3 -3
  5. package/.agent-src/commands/module/create.md +1 -0
  6. package/.agent-src/commands/module/explore.md +10 -6
  7. package/.agent-src/commands/onboard.md +9 -1
  8. package/.agent-src/commands/optimize/augmentignore.md +52 -20
  9. package/.agent-src/commands/optimize/rtk.md +56 -30
  10. package/.agent-src/commands/package-test.md +86 -10
  11. package/.agent-src/commands/quality-fix.md +49 -27
  12. package/.agent-src/commands/update-form-request-messages.md +2 -1
  13. package/.agent-src/contexts/augment-infrastructure.md +4 -7
  14. package/.agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +1 -1
  15. package/.agent-src/contexts/contracts/research-schema.md +1 -1
  16. package/.agent-src/contexts/execution/interrupt-examples.md +34 -0
  17. package/.agent-src/contexts/skills-and-commands.md +2 -2
  18. package/.agent-src/rules/architecture.md +24 -10
  19. package/.agent-src/rules/artifact-drafting-protocol.md +6 -0
  20. package/.agent-src/rules/augment-edit-discipline.md +28 -0
  21. package/.agent-src/rules/augment-source-of-truth.md +2 -2
  22. package/.agent-src/rules/autonomous-execution.md +31 -0
  23. package/.agent-src/rules/context-hygiene.md +1 -1
  24. package/.agent-src/rules/domain-adoption-policy.md +4 -5
  25. package/.agent-src/rules/domain-safety-disclaimer.md +114 -0
  26. package/.agent-src/rules/domain-safety-pii.md +142 -0
  27. package/.agent-src/rules/domain-safety-retention.md +86 -0
  28. package/.agent-src/rules/downstream-changes.md +4 -4
  29. package/.agent-src/rules/framework-neutrality-in-generic-skills.md +130 -0
  30. package/.agent-src/rules/git-history-discipline.md +99 -0
  31. package/.agent-src/rules/minimal-safe-diff.md +6 -0
  32. package/.agent-src/rules/no-roadmap-references.md +4 -2
  33. package/.agent-src/rules/user-interrupt-priority.md +46 -0
  34. package/.agent-src/rules/verify-before-complete.md +11 -2
  35. package/.agent-src/skills/adversarial-review/SKILL.md +1 -1
  36. package/.agent-src/skills/ai-council/SKILL.md +1 -0
  37. package/.agent-src/skills/api-endpoint/SKILL.md +58 -154
  38. package/.agent-src/skills/api-testing/SKILL.md +11 -0
  39. package/.agent-src/skills/code-refactoring/SKILL.md +36 -30
  40. package/.agent-src/skills/code-review/SKILL.md +41 -36
  41. package/.agent-src/skills/context-authoring/SKILL.md +1 -1
  42. package/.agent-src/skills/dashboard-design/SKILL.md +1 -2
  43. package/.agent-src/skills/database/SKILL.md +8 -3
  44. package/.agent-src/skills/dependency-upgrade/SKILL.md +65 -19
  45. package/.agent-src/skills/developer-like-execution/SKILL.md +25 -14
  46. package/.agent-src/skills/eloquent/SKILL.md +1 -1
  47. package/.agent-src/skills/feature-planning/SKILL.md +1 -1
  48. package/.agent-src/skills/file-editor/SKILL.md +45 -19
  49. package/.agent-src/skills/finishing-a-development-branch/SKILL.md +2 -2
  50. package/.agent-src/skills/git-workflow/SKILL.md +4 -4
  51. package/.agent-src/skills/laravel-api-endpoint/SKILL.md +187 -0
  52. package/.agent-src/skills/{dto-creator → laravel-dto}/SKILL.md +5 -4
  53. package/.agent-src/skills/{migration-creator → laravel-migration}/SKILL.md +11 -10
  54. package/.agent-src/skills/laravel-reverb/SKILL.md +3 -3
  55. package/.agent-src/skills/{websocket → laravel-websocket}/SKILL.md +4 -3
  56. package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +1 -1
  57. package/.agent-src/skills/merge-conflicts/SKILL.md +49 -17
  58. package/.agent-src/skills/migration-architect/SKILL.md +6 -6
  59. package/.agent-src/skills/module-management/SKILL.md +1 -0
  60. package/.agent-src/skills/multi-tenancy/SKILL.md +15 -8
  61. package/.agent-src/skills/pest-testing/SKILL.md +18 -0
  62. package/.agent-src/skills/php-debugging/SKILL.md +28 -0
  63. package/.agent-src/skills/php-service/SKILL.md +3 -3
  64. package/.agent-src/skills/playwright-testing/SKILL.md +16 -1
  65. package/.agent-src/skills/project-analyzer/SKILL.md +68 -42
  66. package/.agent-src/skills/readme-writing-package/SKILL.md +94 -23
  67. package/.agent-src/skills/roadmap-management/SKILL.md +1 -1
  68. package/.agent-src/skills/rtk-output-filtering/SKILL.md +23 -8
  69. package/.agent-src/skills/rule-refactor/SKILL.md +145 -0
  70. package/.agent-src/skills/rule-writing/SKILL.md +34 -8
  71. package/.agent-src/skills/security/SKILL.md +38 -29
  72. package/.agent-src/skills/skill-reviewer/SKILL.md +1 -1
  73. package/.agent-src/skills/test-driven-development/SKILL.md +4 -4
  74. package/.agent-src/skills/test-performance/SKILL.md +6 -5
  75. package/.agent-src/skills/verify-completion-evidence/SKILL.md +24 -27
  76. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  77. package/.agent-src/templates/copilot-instructions.md +2 -2
  78. package/.agent-src/templates/rule.md +2 -2
  79. package/.claude-plugin/marketplace.json +6 -4
  80. package/AGENTS.md +1 -1
  81. package/CHANGELOG.md +74 -170
  82. package/README.md +2 -2
  83. package/docs/architecture.md +2 -2
  84. package/docs/archive/CHANGELOG-pre-2.25.0.md +191 -0
  85. package/docs/catalog.md +17 -12
  86. package/docs/contracts/file-ownership-matrix.json +473 -43
  87. package/docs/contracts/kernel-membership.md +17 -0
  88. package/docs/contracts/smoke-contracts.md +8 -8
  89. package/docs/getting-started.md +1 -1
  90. package/docs/guidelines/php/api-design.md +1 -1
  91. package/docs/guidelines/php/controllers.md +1 -1
  92. package/docs/guidelines/php/resources.md +1 -1
  93. package/docs/guidelines/php/validations.md +1 -1
  94. package/package.json +1 -1
  95. package/scripts/build_linear_digest.py +0 -1
  96. package/scripts/lint_framework_leakage.py +348 -0
  97. package/scripts/lint_framework_leakage_allowlist.json +476 -0
  98. package/scripts/measure_augment_budget.py +6 -0
  99. package/scripts/schemas/command.schema.json +5 -0
  100. package/scripts/schemas/skill.schema.json +5 -0
  101. package/scripts/skill_linter.py +60 -7
  102. package/scripts/smoke/kernel.sh +4 -4
  103. package/scripts/smoke/router.sh +2 -2
  104. package/.agent-src/rules/agent-docs.md +0 -20
  105. package/.agent-src/rules/augment-portability.md +0 -23
  106. package/.agent-src/rules/capture-learnings.md +0 -19
  107. package/.agent-src/rules/docs-sync.md +0 -20
  108. package/.agent-src/rules/domain-safety-disclaimer-consulting.md +0 -52
  109. package/.agent-src/rules/domain-safety-disclaimer-financial.md +0 -54
  110. package/.agent-src/rules/domain-safety-disclaimer-legal.md +0 -49
  111. package/.agent-src/rules/domain-safety-disclaimer-medical.md +0 -56
  112. package/.agent-src/rules/domain-safety-export-redact.md +0 -65
  113. package/.agent-src/rules/domain-safety-logging-pii-floor.md +0 -55
  114. package/.agent-src/rules/domain-safety-pii-finance.md +0 -57
  115. package/.agent-src/rules/domain-safety-pii-marketing.md +0 -60
  116. package/.agent-src/rules/domain-safety-pii-recruiting.md +0 -56
  117. package/.agent-src/rules/domain-safety-pii-support.md +0 -57
  118. package/.agent-src/rules/domain-safety-retention-finance.md +0 -48
  119. package/.agent-src/rules/domain-safety-retention-support.md +0 -55
  120. package/.agent-src/rules/e2e-testing.md +0 -19
  121. package/.agent-src/rules/no-unsolicited-rebase.md +0 -107
  122. package/.agent-src/rules/post-push-rewrite-discipline.md +0 -70
@@ -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
@@ -3,17 +3,22 @@ name: multi-tenancy
3
3
  description: "Use when working with the multi-tenant architecture — customer DB switching, FQDN routing, tenant isolation, or cross-tenant operations."
4
4
  source: package
5
5
  domain: engineering
6
+ framework: laravel
6
7
  ---
7
8
 
9
+ <!-- Framework scope: Laravel only. Uses Eloquent model conventions,
10
+ Laravel Context, and Artisan traits — concepts not portable across
11
+ frameworks. Other stacks need a stack-native multi-tenancy skill. -->
12
+
8
13
  # multi-tenancy
9
14
 
10
15
  ## When to use
11
16
 
12
- Use this skill when working with tenant-specific data, customer database connections, or any code that touches the dual-DB architecture.
17
+ Use this skill when working with tenant-specific data, customer database connections, or any code that touches the dual-database architecture.
13
18
 
14
19
 
15
20
  Do NOT use when:
16
- - Single-DB applications
21
+ - Single-database applications
17
22
  - Frontend-only changes
18
23
 
19
24
  ## Procedure: Work with multi-tenancy
@@ -33,7 +38,7 @@ Request → Identify Tenant (JWT / subdomain / API key)
33
38
  → All tenant queries use tenant connection
34
39
  ```
35
40
 
36
- ### Dual-DB pattern
41
+ ### Dual-database pattern
37
42
 
38
43
  | Connection type | Purpose | Scope |
39
44
  |---|---|---|
@@ -49,12 +54,14 @@ Projects may have additional connections for admin operations, provisioning, or
49
54
 
50
55
  ## Core tenant switching service
51
56
 
57
+ **Scope**: Laravel-specific (see frontmatter). For non-Laravel multi-tenant systems, the concepts below still apply but the implementation differs — consult the framework's connection / session / DI conventions.
58
+
52
59
  Search the codebase for the service responsible for tenant switching. Typical responsibilities:
53
60
 
54
61
  1. Store tenant context (e.g., in Laravel Context or a singleton)
55
62
  2. Load tenant configuration
56
63
  3. Set monitoring context (tenant ID, name, domain)
57
- 4. Reconfigure the DB connection with tenant credentials
64
+ 4. Reconfigure the database connection with tenant credentials
58
65
  5. Bind tenant-specific services via the container
59
66
 
60
67
  ## Model conventions
@@ -90,7 +97,7 @@ Check the project for the actual connection names and namespace conventions.
90
97
  ## Testing with tenants
91
98
 
92
99
  - Tests use dedicated tenant seeders (check `agents/docs/` for seeder conventions).
93
- - The testing DB may consolidate multiple connections into a single DB for simplicity.
100
+ - The testing database may consolidate multiple connections into a single DB for simplicity.
94
101
  - Use `RefreshDatabase` or manual seeding — never assume a specific tenant state from previous tests.
95
102
 
96
103
  ## Common pitfalls
@@ -112,19 +119,19 @@ Check the project for the actual connection names and namespace conventions.
112
119
 
113
120
  - multi-tenant
114
121
  - tenant isolation
115
- - customer DB
122
+ - customer database
116
123
  - FQDN routing
117
124
 
118
125
  ## Gotcha
119
126
 
120
- - Always verify which DB connection is active before running queries — cross-tenant data leaks are critical bugs.
127
+ - Always verify which database connection is active before running queries — cross-tenant data leaks are critical bugs.
121
128
  - The model forgets to switch back to the main connection after tenant operations.
122
129
  - Queue jobs serialize the connection state — ensure the tenant context is restored when the job runs.
123
130
  - Don't use `DB::connection()` directly — use the tenant switching helpers.
124
131
 
125
132
  ## Do NOT
126
133
 
127
- - Do NOT hardcode DB names — always use connection names.
134
+ - Do NOT hardcode database names — always use connection names.
128
135
  - Do NOT assume `customer_database` is available in service providers or early boot.
129
136
  - Do NOT access tenant data in global middleware that runs before customer identification.
130
137
  - Do NOT store tenant DB credentials in code — they come from the `customer_databases` table.
@@ -283,6 +283,24 @@ When generating Pest tests:
283
283
  - keep tests readable, isolated, and maintainable
284
284
 
285
285
 
286
+ ### Filter Pest output
287
+
288
+ When triaging a verbose run, narrow the output with `--filter` (Pest)
289
+ plus targeted `grep`/`rg` instead of re-running the whole suite or
290
+ echoing all logs:
291
+
292
+ ```bash
293
+ # Only run failing tests in one file
294
+ vendor/bin/pest tests/Feature/InvoiceTest.php --filter='creates invoice'
295
+
296
+ # Scan the test log for failures only
297
+ rg --color=never '^FAIL|Tests:' storage/logs/pest.log
298
+
299
+ # Inspect JSON output from data-driven tests
300
+ vendor/bin/pest --log-junit=pest.xml && rg '<failure' pest.xml
301
+ ```
302
+
303
+
286
304
  ## Output format
287
305
 
288
306
  1. Pest test file with descriptive test names and clear assertions
@@ -130,6 +130,20 @@ make console-xdebug # Enter Xdebug container
130
130
  php artisan your:command # Xdebug connects to IDE automatically
131
131
  ```
132
132
 
133
+ ### Verifying CLI fixes
134
+
135
+ After a fix, verify the command without re-attaching the debugger:
136
+
137
+ ```bash
138
+ # Run the command, capture exit code + command output
139
+ php artisan your:command; echo "exit code: $?"
140
+
141
+ # Pest CLI assertion — expectsOutput / artisan test
142
+ vendor/bin/pest --filter='ProcessInvoicesCommand'
143
+ ```
144
+
145
+ Assert on the **exit code** and **command output**; never trust "looks fine" from breakpoint inspection alone.
146
+
133
147
  ## Troubleshooting
134
148
 
135
149
  | Problem | Solution |
@@ -151,6 +165,20 @@ make rebuild-php-xdebug # Rebuild Xdebug container only
151
165
  make rebuild-php-all # Rebuild both PHP containers
152
166
  ```
153
167
 
168
+ ### Filter noisy debug output
169
+
170
+ `tail -f /tmp/xdebug.log` and `docker logs` produce far too much
171
+ data to read line-by-line. Filter with `rg`/`grep` for the relevant
172
+ event:
173
+
174
+ ```bash
175
+ # Only connection / breakpoint events
176
+ rg --color=never 'Connect|Step|breakpoint' /tmp/xdebug.log
177
+
178
+ # Only this request's frames in the laravel log
179
+ docker compose logs php-xdebug | rg --color=never "$REQUEST_ID"
180
+ ```
181
+
154
182
  ## What NOT to do
155
183
 
156
184
  - Do not leave Xdebug enabled in production containers.
@@ -13,7 +13,7 @@ Use when creating a new service, extracting business logic from a controller, or
13
13
 
14
14
  Do NOT use when:
15
15
  - Controllers (use `laravel` skill)
16
- - DTOs (use `dto-creator` skill)
16
+ - DTOs (use `laravel-dto` skill for Laravel/PHP; framework-native skill for other stacks)
17
17
  - Models (use `eloquent` skill)
18
18
 
19
19
  ## When to create a service
@@ -39,7 +39,7 @@ Do NOT use when:
39
39
  1. Location: `app/Services/{Domain}/` or `app/Modules/{Module}/App/Services/`.
40
40
  2. `declare(strict_types=1)`, proper namespace.
41
41
  3. Constructor inject dependencies (repositories, other services).
42
- 4. Max 4 constructor deps — if more, split the service.
42
+ 4. Max 4 constructor dependencies — if more, split the service.
43
43
 
44
44
  ### Step 2: Implement methods
45
45
 
@@ -70,7 +70,7 @@ public function __invoke(
70
70
 
71
71
  - Run PHPStan on the service — must pass at level 9.
72
72
  - Verify single responsibility: service does one thing, no mixed concerns.
73
- - Confirm all deps are constructor-injected (no `app()` or facades in service).
73
+ - Confirm all dependencies are constructor-injected (no `app()` or facades in service).
74
74
  - Run affected tests — must pass.
75
75
 
76
76
  ## Output format
@@ -18,7 +18,6 @@ Use this skill when:
18
18
  - Configuring Playwright for CI/CD
19
19
 
20
20
  **Guideline:** `../../../docs/guidelines/e2e/playwright.md` — full conventions, config templates, CI setup.
21
- **Rule:** `.augment/rules/e2e-testing.md` — constraints enforced during E2E test work.
22
21
  **Mobile:** for native iOS/Android or React Native E2E, do NOT reuse Playwright — see the `mobile-e2e-strategy` skill for framework selection.
23
22
 
24
23
  ## Procedure: Write Playwright tests
@@ -164,6 +163,22 @@ npx playwright show-report
164
163
  npx playwright test -g "should login"
165
164
  ```
166
165
 
166
+ ### Filter noisy Playwright output
167
+
168
+ Use `--grep`, `--reporter=json`, plus `jq`/`rg` to keep diagnosis scoped:
169
+
170
+ ```bash
171
+ # Targeted run — only matching specs
172
+ npx playwright test --grep '@smoke'
173
+
174
+ # JSON report, narrowed to failures via jq
175
+ npx playwright test --reporter=json > pw.json
176
+ jq '.suites[].specs[] | select(.tests[].results[].status=="failed")' pw.json
177
+
178
+ # Scan trace logs for one selector
179
+ rg --color=never 'getByRole.*Submit' test-results/
180
+ ```
181
+
167
182
  ## Avoiding flaky tests
168
183
 
169
184
  | Problem | Solution |
@@ -171,47 +171,73 @@ Each module gets its own file in `agents/analysis/modules/`. Format:
171
171
 
172
172
  ## Detection checklist
173
173
 
174
- ### Framework & language
175
-
176
- | Check | How to detect |
177
- |-----------------------|-----------------------------------------------|
178
- | PHP version | `composer.json` → `require.php` |
179
- | Laravel version | `composer.json` `require.laravel/framework` |
180
- | Laravel or standalone | `artisan` file exists Laravel |
181
- | Node.js | `package.json` exists |
182
- | Frontend framework | `package.json` → Vue, React, etc. |
183
- | TypeScript | `tsconfig.json` exists |
174
+ ### Framework & language (multi-stack)
175
+
176
+ | Check | How to detect |
177
+ |------------------------|------------------------------------------------------------------------------|
178
+ | PHP runtime + version | `composer.json` → `require.php` |
179
+ | Laravel application | `artisan` file at repo root + `laravel/framework` in `composer.json` |
180
+ | Symfony application | `bin/console` + `symfony/framework-bundle` in `composer.json` |
181
+ | Composer package | `composer.json` without `artisan` / `bin/console` |
182
+ | Node.js runtime | `package.json` exists |
183
+ | TypeScript | `tsconfig.json` exists |
184
+ | Frontend framework | `package.json` → `react`, `vue`, `svelte`, `solid`, `astro`, `@angular/core` |
185
+ | Meta-framework | `package.json` → `next`, `nuxt`, `remix`, `sveltekit`, `astro` |
186
+ | Python runtime | `pyproject.toml`, `requirements.txt`, `setup.py`, or `Pipfile` |
187
+ | Python framework | `pyproject.toml` / `requirements.txt` → `django`, `fastapi`, `flask` |
188
+ | Go module | `go.mod` exists |
189
+ | Rust crate / workspace | `Cargo.toml` exists |
190
+ | Ruby app | `Gemfile` → `rails`, `sinatra` |
191
+ | .NET project | `*.csproj`, `*.fsproj`, or `global.json` |
192
+ | Java / Kotlin | `pom.xml`, `build.gradle`, or `build.gradle.kts` |
193
+
194
+ After detecting **any** match, record the stack in the analysis output and select the matching `project-analysis-*` sub-skill (Laravel, Symfony, Next.js, React, Node/Express, Zend/Laminas) — fall back to `project-analysis-core` if no framework-specific sub-skill applies.
184
195
 
185
196
  ### Project type
186
197
 
187
- | Signal | Type |
188
- |------------------------------------|--------------------------------|
189
- | `artisan` + `laravel/framework` | Laravel application |
190
- | `composer.json` without `artisan` | Composer package or legacy PHP |
191
- | Module system (`app/Modules/`) | Modular Laravel |
192
- | Multi-tenant (`customer_database`) | Multi-tenant SaaS |
193
-
194
- ### Legacy indicators
195
-
196
- | Signal | Meaning |
197
- |--------------------------------------------|---------------------------|
198
- | No `declare(strict_types=1)` in most files | Legacy codebase |
199
- | No typed properties / return types | Legacy PHP (< 7.4) |
200
- | `var_dump()` / `print_r()` in code | Legacy debugging patterns |
201
- | No tests or very few tests | Low test coverage |
202
- | No PHPStan / Rector config | No static analysis |
203
- | Mixed naming conventions | Inconsistent standards |
204
-
205
- ### Build & tooling
206
-
207
- | Check | How to detect |
208
- |---------------|-----------------------------------------------------------|
209
- | Task runner | `Makefile` or `Taskfile.yml` |
210
- | Docker | `docker-compose.yml` or `compose.yaml` |
211
- | CI/CD | `.github/workflows/` |
212
- | Quality tools | `phpstan.neon`, `ecs.php`, `rector.php`, or `config-dev/` |
213
- | Editor config | `.editorconfig` |
214
- | Code review | `CODEOWNERS`, PR templates |
198
+ | Signal | Type |
199
+ |-----------------------------------------------------------------------|---------------------------------------|
200
+ | `artisan` + `laravel/framework` | Laravel application |
201
+ | `bin/console` + `symfony/framework-bundle` | Symfony application |
202
+ | `composer.json` without `artisan` / `bin/console` | Composer package or legacy PHP |
203
+ | `package.json` with `next` / `nuxt` / `remix` / `sveltekit` / `astro` | Meta-framework SSR/SSG app |
204
+ | `package.json` with `express` / `fastify` / `koa` / `hapi` | Node HTTP service |
205
+ | `package.json` with `@nestjs/core` | NestJS application |
206
+ | `pyproject.toml` with `django` / `fastapi` / `flask` | Python web app |
207
+ | `go.mod` with `gin-gonic/gin` / `labstack/echo` / `gofiber/fiber` | Go HTTP service |
208
+ | Module system (`app/Modules/`, `src/modules/`, `packages/*`) | Modular monolith / monorepo |
209
+ | Multi-tenant signal (`customer_database`, tenant middleware, `RLS`) | Multi-tenant SaaS |
210
+ | `apps/*` + `packages/*` + `turbo.json` / `nx.json` / `pnpm-workspace` | Monorepo |
211
+
212
+ ### Legacy indicators (stack-aware)
213
+
214
+ | Signal | Meaning |
215
+ |------------------------------------------------------------------------------|-------------------------------|
216
+ | PHP: no `declare(strict_types=1)` in most files | Pre-modern PHP style |
217
+ | PHP: no typed properties / return types | Legacy PHP (< 7.4) |
218
+ | PHP: no `phpstan.neon` / `rector.php` | No static analysis |
219
+ | TS: `// @ts-ignore` / `// @ts-nocheck` density; `any` widespread | Untyped TypeScript |
220
+ | TS: no `tsconfig.json` `strict: true` | Loose TypeScript |
221
+ | JS: no ESLint config or `eslint.config.*` | No linting |
222
+ | Python: no type hints in most signatures; no `py.typed` | Untyped Python |
223
+ | Python: no `mypy.ini` / `pyrightconfig.json` / `ruff.toml` | No static analysis |
224
+ | Go: no `golangci.yml` | No lint pipeline |
225
+ | Rust: no `clippy.toml` and warnings ignored | No lint hygiene |
226
+ | `var_dump()` / `console.log()` / `print()` / `fmt.Println()` left in code | Legacy debugging patterns |
227
+ | No tests or very few tests | Low test coverage |
228
+ | Mixed naming conventions across the same module | Inconsistent standards |
229
+
230
+ ### Build & tooling (stack-agnostic)
231
+
232
+ | Check | How to detect |
233
+ |---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
234
+ | Task runner | `Makefile`, `Taskfile.yml`, `justfile`, `package.json scripts`, `composer.json scripts` |
235
+ | Docker | `docker-compose.yml`, `compose.yaml`, `Dockerfile` |
236
+ | CI/CD | `.github/workflows/`, `.gitlab-ci.yml`, `.circleci/config.yml`, `azure-pipelines.yml` |
237
+ | Quality tools | PHP: `phpstan.neon`, `ecs.php`, `rector.php`. TS/JS: `eslint.config.*`, `.prettierrc*`, `tsconfig.json`. Python: `ruff.toml`, `mypy.ini`. Go: `.golangci.yml`. Rust: `clippy.toml` |
238
+ | Editor config | `.editorconfig` |
239
+ | Code review | `CODEOWNERS`, PR templates (`.github/pull_request_template.md`) |
240
+ | Dependencies | Lockfile presence: `composer.lock`, `package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `poetry.lock`, `uv.lock`, `go.sum`, `Cargo.lock` |
215
241
 
216
242
  ## Analysis phases
217
243
 
@@ -234,7 +260,7 @@ Each module gets its own file in `agents/analysis/modules/`. Format:
234
260
  ### Phase 3: Data layer
235
261
 
236
262
  - List all models with their connections, tables, and key relationships
237
- - Map DB schema: tables, foreign keys, indexes
263
+ - Map database schema: tables, foreign keys, indexes
238
264
  - Document multi-tenant split (which tables in which DB)
239
265
  - **Output:** `agents/analysis/models/api-database.md`, `customer-database.md`
240
266
 
@@ -243,7 +269,7 @@ Each module gets its own file in `agents/analysis/modules/`. Format:
243
269
  - Identify domains from models, services, routes, and directory structure
244
270
  - For each domain: map models → services → controllers → jobs → events
245
271
  - Document business rules and data flows
246
- - Document inter-domain deps
272
+ - Document inter-domain dependencies
247
273
  - **Output:** `agents/analysis/domains/{domain}.md` (one per domain)
248
274
 
249
275
  ### Phase 5: API surface
@@ -255,7 +281,7 @@ Each module gets its own file in `agents/analysis/modules/`. Format:
255
281
 
256
282
  ### Phase 6: Service map
257
283
 
258
- - List all services with purpose, key methods, and deps
284
+ - List all services with purpose, key methods, and dependencies
259
285
  - Map service → repository → model relationships
260
286
  - Identify God services (too many responsibilities)
261
287
  - **Output:** `agents/analysis/services/service-map.md`
@@ -316,7 +342,7 @@ Each module gets its own file in `agents/analysis/modules/`. Format:
316
342
  ## Output format
317
343
 
318
344
  1. Structured analysis document in agents/analysis/
319
- 2. Tech stack inventory with versions and deps
345
+ 2. Tech stack inventory with versions and dependencies
320
346
  3. Architecture diagram or module map
321
347
 
322
348
  ## Auto-trigger keywords