Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
create-architecture-test
create-architecture-test
alizharb/agent-skills
claude-code
pest
architecture-testing
layer-boundaries
dependency-direction
testing
namespace-rules

Use when creating or updating Pest architecture tests for Laravel layer boundaries.

Install
php artisan boost:add-skill alizharb/agent-skills

Save this content to: .claude/skills/create-architecture-test/SKILL.md

# Create Architecture Test

## When To Use

Use this skill when you need to enforce layer boundaries, dependency direction, or code placement rules.

## Inputs Needed

- Rule to enforce, affected namespaces, allowed exceptions, and regression target.

## Workflow

1. Inspect existing architecture tests and the relevant code layers.
2. Identify the smallest meaningful boundary to protect.
3. Write the test for app-owned code first.
4. Add ignore rules only for framework-generated or vendor-owned code when needed.
5. Keep assertions stable and easy to read.
6. Add a companion behavior test if the architecture rule protects something user-visible.

## Files That May Be Created

- Pest architecture tests.

## Files That May Be Modified

- Existing architecture tests and related tests.

## Architecture Rules

- Test the boundary, not incidental implementation details.
- Keep the test strict for the project’s own code.
- Avoid false positives from vendor traits or framework internals unless the project owns that behavior.

## Testing Requirements

- Run the smallest relevant test set after adding or updating the rule.

## Review Checklist

- Does the test catch the actual architectural drift?
- Is the failure message actionable?
- Are vendor or framework exceptions narrowly scoped?

## Common Mistakes to Avoid

- Asserting exact file layout when the rule is about behavior.
- Forgetting to exempt framework-owned internals.

Create Architecture Test

When To Use

Use this skill when you need to enforce layer boundaries, dependency direction, or code placement rules.

Inputs Needed

  • Rule to enforce, affected namespaces, allowed exceptions, and regression target.

Workflow

  1. Inspect existing architecture tests and the relevant code layers.
  2. Identify the smallest meaningful boundary to protect.
  3. Write the test for app-owned code first.
  4. Add ignore rules only for framework-generated or vendor-owned code when needed.
  5. Keep assertions stable and easy to read.
  6. Add a companion behavior test if the architecture rule protects something user-visible.

Files That May Be Created

  • Pest architecture tests.

Files That May Be Modified

  • Existing architecture tests and related tests.

Architecture Rules

  • Test the boundary, not incidental implementation details.
  • Keep the test strict for the project’s own code.
  • Avoid false positives from vendor traits or framework internals unless the project owns that behavior.

Testing Requirements

  • Run the smallest relevant test set after adding or updating the rule.

Review Checklist

  • Does the test catch the actual architectural drift?
  • Is the failure message actionable?
  • Are vendor or framework exceptions narrowly scoped?

Common Mistakes to Avoid

  • Asserting exact file layout when the rule is about behavior.
  • Forgetting to exempt framework-owned internals.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console