Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
449c592
Upgrade curator dashboard with card layout, dark mode, and UX improve…
misabegovic Jan 27, 2026
54d13eb
Cleanup: Remove Platform tables from main schema, compact docs, remov…
misabegovic Feb 2, 2026
08238cc
Consolidate codebase: Remove unused Chat API, Brain, and deprecated s…
misabegovic Feb 3, 2026
8dca5a4
Remove platform database - consolidate to primary + queue only
misabegovic Feb 3, 2026
3f69cc6
Fix CI: Remove platform database references from workflow
misabegovic Feb 3, 2026
74f3585
[Platform] Remove references to deleted Prompts and Knowledge executors
misabegovic Feb 3, 2026
22a88ea
Fix failing CI tests
misabegovic Feb 3, 2026
8e99f88
Fix failing CI tests
misabegovic Feb 3, 2026
dd185fd
Fix remaining CI test failures
misabegovic Feb 3, 2026
a626be1
Fix missing assertion in experience analyzer test
misabegovic Feb 3, 2026
30e7518
Lower coverage threshold after code consolidation
misabegovic Feb 3, 2026
e71f08f
Cleanup: Remove unused jobs, analyzer services, and rake tasks
misabegovic Feb 3, 2026
f39299d
Lower coverage threshold after removing unused jobs/services
misabegovic Feb 3, 2026
ec2cbdc
Remove unused ruby-openai gem
misabegovic Feb 3, 2026
3c6f599
Migrate location_type enum to location_category system
misabegovic Feb 3, 2026
db07bb2
Remove Platform tables and vector extension from database
misabegovic Feb 3, 2026
2966c1a
Refactor experience types to use relational data as source of truth
misabegovic Feb 3, 2026
d29b83b
Add data migration to sync experience types from JSON to relations
misabegovic Feb 3, 2026
078afcb
Update AI services to use consistent experience types API
misabegovic Feb 3, 2026
2a504f6
Remove grammar rules for deleted executors (knowledge, prompts)
misabegovic Feb 3, 2026
023e44b
Add Rubocop configuration and CI integration
misabegovic Feb 4, 2026
83f934e
Extract AI prompts to centralized app/prompts/ directory
misabegovic Feb 4, 2026
4c28e00
Apply Rubocop formatting across codebase
misabegovic Feb 4, 2026
88fc68d
Unify LLM wrapper - ExperienceTypeClassifier uses OpenaiQueue
misabegovic Feb 4, 2026
afbbd2f
Add ADR for AI Services DSL Migration
misabegovic Feb 4, 2026
dba2435
Refactor LocationEnricher into focused modules
misabegovic Feb 4, 2026
1927bcb
Add LocationCreator and LocationUpdater service objects
misabegovic Feb 4, 2026
bca8ee9
Refactor ContentChange to use Location service objects
misabegovic Feb 4, 2026
8f92b17
Update DSL Content executor to use Location service objects
misabegovic Feb 4, 2026
d4fdb52
Remove stress_test.log and ignore log files
misabegovic Feb 4, 2026
599c691
Fix dark mode toggle - use class-based instead of media query
misabegovic Feb 4, 2026
f9f1cf6
Treat admin users as curators in profile page
misabegovic Feb 4, 2026
3bcf42b
Rebuild CSS with class-based dark mode
misabegovic Feb 4, 2026
f62336c
Add photo variants to Location model
misabegovic Feb 4, 2026
c53827e
Add Admin navigation dropdown to curator dashboard
misabegovic Feb 4, 2026
4fd719e
Shorten admin dropdown labels to prevent wrapping
misabegovic Feb 4, 2026
9c67aff
Add dark mode support to curator dashboard views
misabegovic Feb 4, 2026
9214dd3
Add dark mode support to remaining curator dashboard views
misabegovic Feb 4, 2026
5702292
Replace sign out with back to site button in curator nav
misabegovic Feb 4, 2026
e614be6
Move curator section to top of profile page
misabegovic Feb 4, 2026
9789f05
Rewrite README with current project structure
misabegovic Feb 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
69 changes: 65 additions & 4 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

## Quick Start

### Opcija 1: Single persona
```bash
claude "Pročitaj .claude/personas/developer.md i preuzmi tu personu. [task]"
claude "Pročitaj .claude/CLAUDE.md za kontekst projekta."
```

### Opcija 2: Multi-persona session
Za specifičnog agenta:
```bash
claude "Pročitaj .claude/CLAUDE.md za kontekst projekta."
claude "Koristi content-director agenta. [task]"
```

---
Expand Down Expand Up @@ -216,6 +215,67 @@ Referenca: `.claude/planning/IMPLEMENTATION.md` → Faza 1

## Coding standardi

### AI Promptovi - OBAVEZNO u `app/prompts/`

**PRAVILO:** Svi AI promptovi MORAJU živjeti u `app/prompts/` folderu kao tekstualni fajlovi. NIKAD ne pisati promptove direktno u servisima!

```ruby
# ❌ LOŠE - prompt direktno u servisu
class Ai::MyService
def generate
prompt = <<~PROMPT
You are a helpful assistant...
PROMPT
llm.ask(prompt)
end
end

# ✅ DOBRO - prompt u app/prompts/ kao .md ili .md.erb fajl
# app/prompts/my_service/system.md
# You are a helpful assistant for tourism in Bosnia and Herzegovina...

# app/services/ai/my_service.rb
class Ai::MyService
include PromptHelper

def generate
prompt = load_prompt("my_service/system.md")
llm.ask(prompt)
end
end

# Za promptove sa varijablama koristi .erb:
# app/prompts/my_service/classify.md.erb
# Classify <%= location_name %> in <%= city %>...

prompt = load_prompt("my_service/classify.md.erb",
location_name: "Stari Most",
city: "Mostar"
)
```

**Zašto:**
- Čisti tekstualni fajlovi - lakše editovanje i čitanje
- Kompatibilno sa Claude Code (možeš čitati .md)
- Lakše verzioniranje i diff
- Nema Ruby boilerplate-a

**Struktura:**
```
app/prompts/
├── experience_type_classifier/
│ ├── system.md # Statički prompt
│ └── classify.md.erb # Sa varijablama
├── location_enricher/
│ ├── metadata.md.erb
│ ├── descriptions.md.erb
│ └── historical_context.md.erb
└── audio_tour_generator/
└── script.md.erb
```

**Helper:** `PromptHelper#load_prompt(path, **vars)`

### Tool struktura
```ruby
module Platform::Tools::Content
Expand Down Expand Up @@ -285,3 +345,4 @@ bin/rails g model PlatformStatistic key:string value:jsonb
3. **Testovi obavezni** - Nema koda bez testova
4. **Pitaj kad nisi siguran** - Bolje pitati nego pogriješiti
5. **Atomic commits** - Mali, fokusirani commitovi
6. **Promptovi u app/prompts/** - NIKAD pisati AI promptove direktno u servisima
71 changes: 71 additions & 0 deletions .claude/commands/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Claude Commands

Skill-ovi za brže izvršavanje zadataka.

## Content komande (koriste DSL)

| Komanda | Agent | Opis |
|---------|-------|------|
| `/quality-audit` | Content Director, Curator | Provjeri kvalitetu sadržaja |
| `/add-location` | Content Director, Curator | Pripremi novu lokaciju |
| `/add-experience` | Content Director, Guide | Pripremi novo iskustvo |
| `/translate` | Content Director | Prevedi sadržaj |
| `/stats` | Curator | Statistike baze (DSL) |

> Content komande koriste Platform DSL za upite, ne direktan Ruby kod.

## Development komande

| Komanda | Agent | Opis |
|---------|-------|------|
| `/cleanup` | Developer | Pronađi i obriši nekorištene fajlove |
| `/compact-docs` | Tech Lead + PM | Kompaktuj planning dokumentaciju |
| `/design` | Tech Lead + PM | Dizajniraj feature ili sistem |
| `/adr` | Tech Lead | Kreiraj Architecture Decision Record |
| `/rfc` | PM + Tech Lead | Request for Comments za veće promjene |
| `/implement` | Developer | Implementiraj feature |
| `/test` | Developer | Napiši ili pokreni testove |
| `/verify` | Developer | Verifikuj da kod radi |
| `/simplify` | Tech Lead + Dev | Pojednostavi kod |
| `/commit` | Developer | Git commit sa dobrom porukom |
| `/pr` | Developer | Kreiraj Pull Request |

## Kako koristiti

```
/stats
/implement "Dodaj search za lokacije"
/commit
```

## Workflow primjer

```
# 1. Dizajniraj feature
/design "User favorites"

# 2. Implementiraj
/implement

# 3. Testiraj
/test

# 4. Verifikuj
/verify

# 5. Commit
/commit

# 6. PR
/pr
```

## Kreiranje novih komandi

1. Kreiraj `.claude/commands/[ime].md`
2. Definiši:
- Koji agent koristi
- Šta komanda radi
- Potrebne inpute
- Proces izvršavanja
- Output format
106 changes: 106 additions & 0 deletions .claude/commands/add-experience.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# /add-experience

Dodaj novo iskustvo sa lokacijama i AI opisima.

**Agent:** Content Director, Curator, Guide

## Korištenje

```
/add-experience [naslov]
/add-experience "Mostarska čaršija tour"
```

## Potrebni podaci

1. **Naslov** (obavezno)
2. **Kategorija** - cultural, adventure, gastro, nature
3. **Lokacije** - lista lokacija koje uključuje
4. **Trajanje** - u satima
5. **Grad/Regija**

## DSL komande

### Pronađi lokacije za iskustvo
```
locations | where(city: "Mostar") | select(name, location_type) | limit(20)
locations | search("čaršija") | select(name, city)
```

### Provjeri kategorije
```
experience_categories | select(name, slug)
```

### Provjeri postojeća iskustva
```
experiences | where(city: "Mostar") | select(title, category)
experiences | search("čaršija") | limit(5)
```

### Nakon kreiranja
```
experiences | where(title: "Novo iskustvo") | first
```

## Proces

### 1. Pronađi lokacije (DSL)
Koristi search i where da pronađeš relevantne lokacije.

### 2. Provjeri balans
```
experiences | where(city: "Mostar") | count
experiences | group_by(category) | count
```

### 3. Generiši sadržaj

Koristi agente:
- **Guide** - praktične info, trajanje, savjeti
- **Robert** - zabavan opis
- **Historian** - historijski kontekst

### 4. Pripremi podatke

```
## Novo iskustvo

Naslov: [naslov]
Kategorija: [kategorija]
Trajanje: [X] sati
Grad: [grad]

Lokacije:
1. [Lokacija 1]
2. [Lokacija 2]
3. [Lokacija 3]

Opis:
[generisani opis 200-300 riječi]
```

## Validacija

Iskustvo MORA imati:
- Minimalno 2 lokacije
- Opis na BS
- Kategoriju
- Trajanje

## Output

```
## Novo iskustvo: [naslov]

### Podaci
- Kategorija: [kategorija]
- Lokacije: [count]
- Trajanje: [X] sati

### Opis
[generisani opis]

---
Spreman za kreiranje. Nastavi? [y/n]
```
78 changes: 78 additions & 0 deletions .claude/commands/add-location.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# /add-location

Dodaj novu lokaciju sa AI-generiranim opisima.

**Agent:** Content Director, Curator

## Korištenje

```
/add-location [ime], [grad]
/add-location Stari Most, Mostar
```

## Potrebni podaci

Pitaj korisnika za:
1. **Ime lokacije** (obavezno)
2. **Grad** (obavezno)
3. **Tip** - monument, nature, religious, museum, etc.
4. **Kratki opis** - za kontekst AI generaciji

## DSL komande

### Provjeri duplikate
```
locations | where(name: "Stari Most") | select(name, city, status)
locations | search("Stari Most") | limit(5)
```

### Provjeri grad
```
locations | where(city: "Mostar") | count
```

### Nakon kreiranja - provjeri
```
locations | where(name: "Nova Lokacija") | first
```

## Proces

### 1. Provjeri duplikate (DSL)

### 2. Prikupi informacije
- Koristi historian agenta za historijski kontekst
- Koristi guide agenta za praktične info

### 3. Generiši sadržaj
- Opis na bosanskom (150-200 riječi)
- Historijski kontekst (ako relevantno)
- Prijevodi (EN, DE, HR)

### 4. Kreiraj lokaciju
Predaj podatke Content Director agentu ili develoeru za kreiranje.

## Output

```
## Nova lokacija: [ime]

### Podaci
- Grad: [grad]
- Tip: [tip]
- Koordinate: [lat, lng]

### Opis (BS)
[generisani opis]

### Historijski kontekst
[kontekst]

---
Spreman za kreiranje. Nastavi? [y/n]
```

## Napomena

Ova komanda priprema sadržaj. Samo kreiranje u bazi radi developer ili kroz curator dashboard.
Loading
Loading