Initial wiki structure

This commit is contained in:
2026-04-19 03:57:03 +00:00
commit 31c3083ff4
11 changed files with 1041 additions and 0 deletions

41
docs/schema/hierarchy.md Normal file
View File

@@ -0,0 +1,41 @@
# Wiki Page Hierarchy & URL Structure
To ensure a structured and navigable wiki, all pages must follow this hierarchical pathing and categorization schema.
## 1. Top-Level Categories
| Directory | Content Type | URL Pattern |
|-----------|--------------|-------------|
| `ships/` | All ship hulls | `/ships/{race}/{group}/{ship_name}` |
| `modules/`| All ship modules | `/modules/{category}/{group}/{module_name}` |
| `mechanics/`| Game mechanics/guides | `/mechanics/{category}/{topic}` |
| `items/` | General items (ammo, etc) | `/items/{category}/{item_name}` |
| `skills/` | Character skills | `/skills/{category}/{skill_name}` |
| `factions/`| NPC Factions | `/factions/{faction_name}` |
## 2. Detailed Pathing Examples
### Ships
- **Path:** `/ships/caldari/interceptors/raptor`
- **Breadcrumb:** Ships > Caldari > Interceptors > Raptor
### Modules
- **Path:** `/modules/shield/shield-extenders/large-shield-extender-ii`
- **Breadcrumb:** Modules > Shield > Shield Extenders > Large Shield Extender II
### Mechanics
- **Path:** `/mechanics/combat/tracking-guide`
- **Breadcrumb:** Mechanics > Combat > Tracking Guide
## 3. Redirect & Alias Strategy
- **TypeID Redirects:** Every page must be aliased by its ESI TypeID (e.g., `/id/603` -> `/ships/caldari/interceptors/raptor`) to allow easy linking from external tools.
- **Lowercase Enforcement:** All URLs must be strictly lowercase.
- **Slugification:** Spaces replaced by hyphens, special characters removed.
## 4. Metadata Requirement
Each page MUST include the following metadata in its frontmatter to support the hierarchy:
```yaml
path: "ships/caldari/interceptors/raptor"
parent: "ships/caldari/interceptors"
order: 10 # Optional: for sorting in lists
```

View File

@@ -0,0 +1,83 @@
# LangGraph State Schema Definition
This document defines the shared state object used by the LangGraph orchestration layer.
## 1. Shared State Object (`WikiState`)
```python
from typing import List, Optional, Dict, Annotated
from pydantic import BaseModel, Field
from datetime import datetime
class ContentSource(BaseModel):
name: str # e.g., "eve-university", "wckg", "esi"
url: str
content_hash: str
extracted_at: datetime
class ValidationResult(BaseModel):
category: str # "structural", "content", "numerical", "cross-reference"
passed: bool
score: float # 0.0 to 1.0
feedback: Optional[str] = None
details: Dict = {}
class PageMetadata(BaseModel):
page_type: str # "ship", "module", "mechanic", "guide"
source: str
source_url: str
imported_date: datetime
last_updated: datetime
last_validated: datetime
update_frequency: str
validation_score: float
categories: List[str]
class WikiPage(BaseModel):
path: str # e.g., "ships/frigates/condor"
title: str
content_markdown: str
metadata: PageMetadata
frontmatter: Dict
assets: List[str] # List of local asset paths
class WikiState(BaseModel):
# Core processing data
current_page: Optional[WikiPage] = None
proposed_changes: List[WikiPage] = []
# Pipeline tracking
sources: List[ContentSource] = []
validation_pipeline_results: List[ValidationResult] = []
# Control flow
retry_count: int = 0
max_retries: int = 3
is_approved: bool = False
error: Optional[str] = None
# Checkpointing metadata
thread_id: str
checkpoint_id: Optional[str] = None
```
## 2. Page Type Schemas
### Ship Schema Overlay
Extends the numerical validation requirements.
```python
class ShipData(BaseModel):
type_id: int
group: str
race: str
hull_stats: Dict[str, int]
fitting_stats: Dict[str, int]
velocity: int
skill_requirements: List[Dict[str, int]]
```
## 3. Storage Strategy
- **State Persistence:** Redis (via `RedisSaver` for LangGraph)
- **Content Persistence:** Git (Markdown + YAML Frontmatter)
- **Asset Persistence:** Local filesystem / S3-compatible storage