Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion AGENTS.md

This file was deleted.

37 changes: 37 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Go! AOP Framework
goaop/framework | NS: Go\ | PHP: ^8.4.0
AOP via source transformation at load time (stream filter, no PECL, no eval).

## Agent gate
- PHP 8.4+ required. If PHP 8.3 or less → STOP, report can't run tests/phpstan.
- Gate: `./vendor/bin/phpstan analyze --memory-limit=512M` before commit (level 10).

## Commands
| Action | Command |
|-----------|-----------------------------------------------------------------------|
| install | `composer install` |
| test:all | `./vendor/bin/phpunit` |
| test:file | `./vendor/bin/phpunit tests/Core/ContainerTest.php` |
| test:one | `./vendor/bin/phpunit --filter testName tests/Core/ContainerTest.php` |
| analyze | `./vendor/bin/phpstan analyze --memory-limit=512M` |

## Architecture overview
Intercepts PHP class loading pipeline: source stream filter transforms source → injects interception hooks → caches result.
- Init: AspectKernel::init() → stream filter → transformers → configureAop()
- Main transformer: WeavingTransformer (class→trait, proxy class re-inherits parent+interfaces)
- Proxy dispatch: per-method static $__joinPoint → InterceptorInjector → advisor chain

## Directory → AGENTS.md map
| Directory | Sub-AGENTS.md | Covers |
|-------------------|----------------------------|---------------------------------------------------------------|
| `src/Instrument/` | `src/Instrument/AGENTS.md` | Init flow, transformers, trait engine, line numbers, Override |
| `src/Proxy/` | `src/Proxy/AGENTS.md` | Proxy generators, code-gen, readonly, hooks, enums |
| `src/Aop/` | `src/Aop/AGENTS.md` | Interfaces, generics, implementations, pointcuts, attributes |
| `src/Core/` | `src/Core/AGENTS.md` | Container, aspect loading, advice matching, bridge |
| `tests/` | `tests/AGENTS.md` | Test conventions, fixtures, PHPUnit, PHPStan |

## Rules
- Skip explanations unless asked. Show changes, not commentary.
- Use targeted edits (Edit tool) over full-file rewrites.
- No filler words ("let me", "carefully", "I'll now").
- Before commit: phpunit and phpstan must pass. Fix errors before offering to commit.
194 changes: 0 additions & 194 deletions CLAUDE.md

This file was deleted.

Loading
Loading