feat: add graphify plugin and documentation
Build and Push Docker Image / build (push) Failing after 1m35s

- Introduced a new graphify OpenCode plugin to remind users about the knowledge graph before executing bash commands.
- Added AGENTS.md for agent guidance, including development commands, environment setup, Docker deployment, code structure, conventions, and testing instructions.
- Created opencode.json to configure the graphify plugin and superpowers.
- Updated tests to improve type safety and added missing imports in test files.
- Added .graphify_uncached.txt to track relevant files for graphify.
This commit is contained in:
hwinkel
2026-05-09 11:52:16 +02:00
parent db953b1e28
commit 29619658fc
11 changed files with 26065 additions and 3 deletions
+53
View File
@@ -0,0 +1,53 @@
# Annas Rechnungsmanager Agent Guidance
## Development Commands
- Install: `npm install`
- Dev server: `npm run dev` (Vite on http://localhost:5173)
- Dev with DB: `npm run devfull` (starts docker-compose DB first)
- Typecheck: `npm run typecheck` (react-router typegen + tsc)
- Lint: `npm run lint` (eslint)
- Test: `npm run test` (vitest run)
- DB migrate: `npm run db:migrate` (prisma migrate dev)
- DB seed: `npm run db:seed` (loads demo data)
- DB studio: `npm run db:studio` (Prisma GUI)
- Admin setup: `npm run setup-admin` (sets ADMIN_PASSWORD env var or prompts)
- Reset password: `npm run reset-password -- --username <user> --password <pass>`
- Build: `npm run build`
- Start prod: `npm run start`
## Environment
- `.env` required: DATABASE_URL and AUTH_SECRET
- Dev: http://localhost:5173
- Docker: http://localhost:3000 (first start requires ADMIN_PASSWORD)
## Docker Deployment
- First start: `docker build -t annasrechnungsmanager:latest .` then `docker compose up -d` with ADMIN_PASSWORD set
- Subsequent: `docker build -t annasrechnungsmanager:latest .` then `docker compose up -d --no-deps app`
- Admin user created/updated on first start with ADMIN_PASSWORD
## Code Structure
- `app/routes/` - file-based routing (React Router v7)
- `app/routes/api.*` - REST API endpoints (loader/action)
- `app/lib/` - data access, Prisma, tax, utils
- `prisma/schema.prisma` - database schema
- `scripts/` - setup-admin, reset-password
## Conventions
- TypeScript strict; use unknown/guard checks for external data
- UI: Tailwind v4 + shadcn/ui
- Error handling: Remix redirect, json, badRequest
- API contracts in `app/routes/api.*` must remain backward compatible
- Document business logic for complex changes (taxes, invoice codes, UStG §14)
## Testing
- Vitest: `npm run test` (run), `npm run test:watch` (watch)
- No additional services required for unit tests
## graphify
This project has a graphify knowledge graph at graphify-out/.
Rules:
- Before answering architecture or codebase questions, read graphify-out/GRAPH_REPORT.md for god nodes and community structure
- If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
- After modifying code files in this session, run `python3 -c "from graphify.watch import _rebuild_code; from pathlib import Path; _rebuild_code(Path('.'))"` to keep the graph current