diff --git a/AGENTS.md b/AGENTS.md index 73e2226..5dea88b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,21 +5,3 @@ Read these on every session. Rules in them override defaults. @ai/shared.md @ai/backend-context.md @ai/frontend-context.md - -## Session start protocol - -Before responding to the first user message in a session, you MUST: - -1. Read `ai/shared.md`, `ai/backend-context.md`, `ai/frontend-context.md` in - full. Do not skim. Do not skip on the assumption they were read in a - prior session - context is not preserved. -2. Run `git status` and `git branch --show-current`. If on `master` or - `main`, do NOT make any edits until a feature branch exists, even if - the user's first message looks like a quick read-only question. Many - "quick questions" turn into edits. -3. Confirm in your first response that the rules were read and the branch - was checked. Do not narrate the contents - just acknowledge. - -Skipping this protocol caused real bugs and rework in past sessions -(work landed on master, TDD order was lost, formatter not run, banned -constructs slipped in). Treat the protocol as non-negotiable. diff --git a/DailyGoals.drawio b/DailyGoals.drawio index 5114839..aa76945 100644 --- a/DailyGoals.drawio +++ b/DailyGoals.drawio @@ -13,20 +13,17 @@ - + - + - - - - + - + @@ -34,14 +31,14 @@ - - + + - + - + diff --git a/README.md b/README.md index 7ede470..ba1b972 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -# Set a goal for finishing a set by a specific date and have your daily goals automatically calculated +# Set a goal for finishing a book by a specific date and have your daily goals automatically calculated # TODO -- Test Email Address Value Object -- Reevaluate validation in node controller what needs to be moved into use cases. - - checkTextOwnership is definitely business logic + - Test Email Address Value Object + - Move create text out of view controller into text controller diff --git a/ai/backend-context.md b/ai/backend-context.md index e59b9a6..fca41f0 100644 --- a/ai/backend-context.md +++ b/ai/backend-context.md @@ -43,22 +43,3 @@ ValueObjects) into Entities, DTOs, Repositories, Use Cases, and Fakes Run `php-cs-fixer fix` on worked-on directories before committing (uses the existing `.php-cs-fixer.dist.php` config). - -## LLM anti-patterns - -Constructs LLMs default to that this project forbids. Name the trap -explicitly so you catch yourself before writing it. - -| Anti-pattern | Forbidden | Required | -|---|---|---| -| Arrow function | `fn ($x) => $x->getId()` | `function ($x) { return $x->getId(); }` | -| Inline FQCN type | `function f(): \Psr\Http\Message\ResponseInterface` | `use Psr\Http\Message\ResponseInterface;` then `function f(): ResponseInterface` | -| Inline `::class` | `Container::get(\App\Foo\Bar::class)` | `use App\Foo\Bar;` then `Container::get(Bar::class)` | -| Default param | `function f(int $count = 10)` | `function f(int $count)` | -| Default in fake | `public function create(Dto $dto, bool $strict = true)` | no default; every caller passes a value | -| Lookup returns stored ref | `return $this->items[$id] ?? null;` | rebuild a new instance with the stored fields | -| Short variable name | `$t`, `$n`, `$res`, `$req`, `$e` | `$text`, `$node`, `$response`, `$request`, `$exception` | -| Em dash | `// fetches user — by email` | `// fetches user - by email` | - -When generating code, scan the diff for these patterns before writing it -to disk. If you catch one mid-write, rewrite that line. diff --git a/ai/frontend-context.md b/ai/frontend-context.md index 6825c68..8757e1f 100644 --- a/ai/frontend-context.md +++ b/ai/frontend-context.md @@ -31,19 +31,3 @@ with surrounding files. (TODO: wire up format/lint when added.) Frontend changes are often a template plus its page-level JS counterpart - commit them together as a single logical unit, per the "one logical change per commit" rule in `shared.md`. - -## LLM anti-patterns - -Constructs LLMs default to that this project forbids on the frontend. - -| Anti-pattern | Forbidden | Required | -|---|---|---| -| Short variable name | `t`, `n`, `res`, `req`, `e`, `el`, `ev` | `text`, `node`, `response`, `request`, `submitEvent`, `element`, `clickEvent` | -| Em dash in code/comments | `// loads texts — owner only` | `// loads texts - owner only` | -| Inline `` in a `.php` template | put logic in `public/js/.js`, load via ` - - diff --git a/views/templates/userTexts.php b/views/templates/userTexts.php deleted file mode 100644 index a90ca94..0000000 --- a/views/templates/userTexts.php +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - Daily Goals - My Texts - - - - -
-
    -
    - -
    - -
    -
    -
    - - - -