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
File renamed without changes.
File renamed without changes.
File renamed without changes.
99 changes: 99 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,102 @@ For schema/repository changes, also run relevant integration tests.
- Check `package.json`, `eslint.config.mjs` before assuming behavior
- Preserve Portuguese user-facing messages
- Don't reintroduce removed multi-provider linking

<!-- ai-memory:start -->

## Long-term memory (ai-memory)

This project uses [ai-memory](https://github.com/akitaonrails/ai-memory)
for cross-session continuity. **Lifecycle hooks already capture every
prompt + tool call automatically.** You never need to manually write
notes; the SessionStart hook auto-fetches pending handoffs and the
SessionEnd hook auto-consolidates. Just _use_ the read tools.

### When to reach for each tool

The user can express any of the intents below in plain English —
match the intent to the tool. They do not need to name the tool.

| User says / situation | Tool |
| ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| "have we discussed X?" / "search memory for Y" / before proposing architecture | `memory_query` |
| "what's been going on" / "show recent activity" (light) | `memory_recent` |
| "is ai-memory healthy?" / "how big is the wiki?" | `memory_status` |
| "give me the stats" / structured snapshot for the agent to consume | `memory_briefing` |
| "catch me up" / "I've been away" / "what's important right now?" / open-ended exploration | `memory_explore` |
| "where did we leave off?" — and you see a `📥 ai-memory: pending handoff` block in your context | already done — answer from that block; do NOT re-call `memory_handoff_accept` |
| "where did we leave off?" — and no such block is visible | `memory_handoff_accept` (rare; the SessionStart hook usually got there first) |
| "save context for the next session" / wrapping up | `memory_handoff_begin` (terse summary; put detail in `open_questions` + `next_steps` bullets) |
| "consolidate this session" / "compile what we learned" (usually automatic) | `memory_consolidate` |
| "audit the wiki" / "find contradictions" / "what rules should we add?" | `memory_lint` |
| "prune old pages" / "memory cleanup" | `memory_forget_sweep` |

`memory_explore` is the right default for the "I want to know what's
going on" use case — it returns a prose digest whose verbosity
scales automatically to how long it's been since the last activity
(< 1 h → one line; > 30 days → full catchup).

### When you write a project rule, write it here

If you're about to write a durable project rule ("always X", "never
Y", "all PRs must …"), this rules file (CLAUDE.md for Claude Code;
AGENTS.md for Codex / OpenCode / Cursor / Gemini CLI; whichever
convention your agent uses) is where it belongs. ai-memory's lint
pass surfaces the same hint automatically when a `kind: rule` page
lands in `_rules/`.

### Refreshing this snippet

This block is maintained by ai-memory. Two ways to refresh it with
the latest binary's recommended copy:

- **From the agent** (no terminal needed): ask "refresh the ai-memory
routing in this project" — the agent calls
`memory_install_self_routing`, picks the right filename for itself
(Claude Code → `CLAUDE.md`; Codex / OpenCode / Cursor / Gemini →
`AGENTS.md`), and uses its Write / Edit tool to land the block.
- **From the CLI**: `ai-memory install-instructions` (defaults to
`CLAUDE.md`; pass `--target AGENTS.md` for non-Claude agents).

Both are idempotent: re-runs replace the block bracketed by
`<!-- ai-memory:start -->` / `<!-- ai-memory:end -->` markers
without disturbing the rest of the file.

<!-- ai-memory:end -->

<!-- rtk:start -->

# RTK - Rust Token Killer (Codex CLI)

**Usage**: Token-optimized CLI proxy for shell commands.

## Rule

Always prefix shell commands with `rtk`.

Examples:

```bash
rtk git status
rtk cargo test
rtk npm run build
rtk pytest -q
```

## Meta Commands

```bash
rtk gain # Token savings analytics
rtk gain --history # Recent command savings history
rtk proxy <cmd> # Run raw command without filtering
```

## Verification

```bash
rtk --version
rtk gain
which rtk
```

<!-- rtk:end -->
37 changes: 23 additions & 14 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ services:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
- '5432:5432'
healthcheck:
test: ["CMD-SHELL", "pg_isready -h localhost -U $$POSTGRES_USER"]
test: ['CMD-SHELL', 'pg_isready -h localhost -U $$POSTGRES_USER']
interval: 10s
timeout: 5s
retries: 5
Expand All @@ -22,7 +22,7 @@ services:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
- '3000:3000'
image: ghcr.io/taldoflemis/anubis:latest
env_file:
- .env
Expand Down Expand Up @@ -80,9 +80,9 @@ services:
healthcheck:
test:
[
"CMD",
"node",
"-e",
'CMD',
'node',
'-e',
"fetch('http://localhost:3000/api/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))",
]
interval: 15s
Expand All @@ -93,13 +93,13 @@ services:
mailpit:
image: axllent/mailpit:latest
ports:
- "1025:1025"
- "8025:8025"
- '1025:1025'
- '8025:8025'
environment:
- MP_SMTP_AUTH_ACCEPT_ANY=true
- MP_SMTP_AUTH_ALLOW_INSECURE=true
healthcheck:
test: ["CMD-SHELL", "wget http://localhost:8025 -O /dev/null"]
test: ['CMD-SHELL', 'wget http://localhost:8025 -O /dev/null']
interval: 10s
timeout: 5s
retries: 5
Expand All @@ -110,7 +110,7 @@ services:
context: ./frontend/
image: ghcr.io/taldoflemis/anubis/frontend:latest
ports:
- "5173:8080"
- '5173:8080'

env_file:
- ./frontend/.env
Expand All @@ -134,22 +134,31 @@ services:

minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
command: server /data
ports:
- "9000:9000"
- "9001:9001"
- '9000:9000'
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
test: ['CMD', 'mc', 'ready', 'local']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s

minio_console:
image: ghcr.io/georgmangold/console
ports:
- '9001:9090'
environment:
CONSOLE_MINIO_SERVER: 'http://minio:9000'
depends_on:
createbuckets:
condition: service_completed_successfully

createbuckets:
image: minio/mc:latest
depends_on:
Expand Down
8 changes: 8 additions & 0 deletions drizzle/0010_concerned_the_liberteens.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ALTER TABLE "enrollments" ADD COLUMN "primary_theme_id" uuid;--> statement-breakpoint
ALTER TABLE "enrollments" ADD COLUMN "secondary_theme_id" uuid;--> statement-breakpoint
ALTER TABLE "courses" ADD COLUMN "search_vector" "tsvector" GENERATED ALWAYS AS (to_tsvector('simple', coalesce(name, ''))) STORED;--> statement-breakpoint
ALTER TABLE "universities" ADD COLUMN "search_vector" "tsvector" GENERATED ALWAYS AS (to_tsvector('simple', coalesce(name, '') || ' ' || coalesce(abbreviation, ''))) STORED;--> statement-breakpoint
ALTER TABLE "enrollments" ADD CONSTRAINT "enrollments_primary_theme_id_research_themes_id_fk" FOREIGN KEY ("primary_theme_id") REFERENCES "public"."research_themes"("id") ON DELETE restrict ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "enrollments" ADD CONSTRAINT "enrollments_secondary_theme_id_research_themes_id_fk" FOREIGN KEY ("secondary_theme_id") REFERENCES "public"."research_themes"("id") ON DELETE restrict ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "courses_search_vector_gin_idx" ON "courses" USING gin ("search_vector");--> statement-breakpoint
CREATE INDEX "universities_search_vector_gin_idx" ON "universities" USING gin ("search_vector");
Loading
Loading