Skip to main content
Glama
storyai

storyai

by jedikim

storyai

Öffnen Sie zuerst dies → docs/index.html

Wenn Sie es im Browser öffnen, sind sieben Dokumente über Links miteinander verbunden. Wenn Sie alles auf einer Seite sehen möchten: docs/storyai-설계-통합.html. Wenn Sie die Oberfläche sehen möchten: docs/07-UI목업.html — es funktioniert tatsächlich.

Related MCP server: Novel Workspace MCP

Was in diesem Ordner ist

docs/     읽을 것.  설계 문서 7종 + 통합본
spec/     구현이 읽을 것.  온톨로지·툴·규칙·DDL (JSON + SQL)
build/    문서를 고칠 때.  parts/ 수정 후 build.py 실행
skills/   에이전트가 읽을 것.  집필·검수·설정집 3종
hooks/    자동 검사 트리거.  Claude Code / Codex 각각
AGENTS.md 에이전트 지침 단일 소스 ★ 양쪽 호스트가 읽음

manuscript/ api/ web/        ← 후속 단계에서 채웁니다
server/ bible/ store/        ← P0 조회 + P1 제안/커밋 구현

Dokumente

Öffnen Sie docs/index.html im Browser. Die sieben Dokumente verweisen aufeinander.

Dokument

Inhalt

Zielgruppe

index

Gesamtübersicht, 8 Kernentscheidungen, Status

Alle

01 기획서

Problem·Belegzahlen·Marktlücke·Nutzungsszenarien

Produktmanager

02 설계서

Datenmodell·15 MCP-Tools·Versionsverwaltung·Ausbreitung

Entwickler

03 개발계획서

P0~P6-Roadmap·Aufgabenzerlegung·Risiken

Entwickler

04 기술 스택

Begründung für Auswahl und Ablehnung·Abhängigkeiten·Referenzen

Entwickler

05 구조도

11 Diagramme

Alle

06 UI 설계

Bildschirmspezifikation·Komponenten·Design-Tokens

Designer·Entwickler

07 UI 목업

Tatsächlich funktionierende Oberfläche

Alle

Maschinenlesbare Spezifikation

Die Dateien, die das Dokument beschreibt und die die Implementierung direkt liest.

spec/ontology.json   노드 18종 · 간선 28종 · 태그 · 삼중 시간축 · 가시성 · 불변식
spec/tools.json      MCP 툴 15개 시그니처 · 예산 · 위험 등급 정책
spec/rules.json      진단 규칙 26개 (Tier 1 결정론 / Tier 2 LLM) · 전파 정책
spec/policy.json     P1 변경 위험 등급 · 잠금 · 캐스케이드 임계값
spec/schema.sql      DDL — 테이블 22 · 뷰 5 · 인덱스 18

Wird direkt mit sqlite3 store/story.db < spec/schema.sql angewendet.

Host-Paket

Funktioniert als ein Satz sowohl mit Claude Code als auch mit Codex.

plugin.json                 agent-plugins 스키마 — Codex가 우선 인식
.claude-plugin/plugin.json  Claude Code 매니페스트 — Codex도 폴백으로 읽음
.mcp.json                   Claude Code용 프로젝트 MCP 설정
.codex/config.toml          Codex용 프로젝트 MCP 설정
AGENTS.md                   ★ 에이전트 지침 단일 소스. 양쪽이 읽음
CLAUDE.md                   AGENTS.md를 가리키는 한 줄
skills/                     Agent Skills 규격 6필드만 — 양쪽 + 46개 호스트
hooks/                      run-check.sh 를 양쪽 훅이 공통 호출

MCP-Verbindung prüfen

Das Repository enthält sowohl .mcp.json für Claude Code als auch .codex/config.toml für Codex. Vertrauen Sie beim ersten Öffnen dem Projekt, genehmigen Sie die MCP-Ausführung und prüfen Sie dann den Verbindungsstatus.

claude mcp list
codex mcp list

Dokumente bearbeiten

Die Dokumente sind Build-Artefakte. Um Inhalte zu ändern, bearbeiten Sie build/parts/*.part.html und:

python3 build/build.py

Der gemeinsame Stil liegt an einer Stelle in build/style.css und wird beim Build in jedes Dokument inline eingebettet — Dadurch ist jedes Dokument eigenständig und wird überall unverändert gerendert. Die einzigen Abhängigkeiten sind die Python-Standardbibliothek.

Implementierungsstatus

P0 schreibgeschützter Index, P1 Schreibpfad, P2 Nebenstränge·Diagnose, P3 Extraktion·Suche sind implementiert. Es werden 14 MCP-Tools bereitgestellt, und alle Schreibvorgänge werden über die Vorschlagsprotokollierung und die read_set-Konfliktprüfung in einer einzigen SQLite-Commit-Spur atomar angewendet. P3 erzwingt ein explizites ID-Binding-Manifest und UTF-8-Byte-Spannen und kombiniert BM25- und lokale sqlite-vec-Ergebnisse per RRF.

Als Nächstes kommt P4 — UI. Die detaillierte Aufschlüsselung folgt Entwicklungsplan §P4.

Entwicklung ausführen

Erstellen Sie eine isolierte Umgebung mit Python 3.12 oder höher und installieren Sie die Entwicklungsabhängigkeiten.

python3 -m venv .venv
.venv/bin/python -m pip install -e '.[dev]'

Das Format der Konfigurationsdateien folgt bible/README.md. Der Loader liest nur die angegebenen YAML-Metadaten und rät nicht über Inhalte oder extrahiert sie nicht automatisch.

.venv/bin/python -m server.load_bible
.venv/bin/python -m server.consolidate
.venv/bin/python -m pytest
server/run-mcp.sh

Die Manuskriptextraktion verwendet *.story.json neben manuscript/**/*.md als Eingabe. Format und LLM-Extraktionsvertrag liegen in prompts/v1/; ingest erstellt nur Proposals und committet nicht automatisch.

Der letzte Befehl ist ein stdio-MCP-Server, daher ist es normal, dass er im Terminal wartet. Claude Code und Codex führen über ihre jeweiligen Projekteinstellungen denselben server/run-mcp.sh-Einstiegspunkt aus.

P1-Schreibvertrag

propose ändert den Live-Graphen nicht. Jede Operation benötigt einen eindeutigen idem_key mit mindestens 8 Zeichen, und read_set darf nicht leer sein. Bei einem ADD ohne bestehende Knotenbasis, wie bei der ersten Session, wird die aktuelle graph_state.revision als { "node": "book", "rev": n } übergeben.

Unterstützte Verben sind ADD · UPDATE · INVALIDATE · LINK · UNLINK. INVALIDATE und UNLINK löschen keine Zeilen, sondern schließen tx_to. commit(mode="dry_run") führt die gleiche Validierung, CID- und Merkle-Berechnung wie real aus und rollt dann die gesamte Transaktion zurück.

story://session/latest zeigt auf den neuesten Session-Knoten. In den props der Session müssen open_threads und next hinterlassen werden, damit der nächste Host übernehmen kann.

P2-Nebenstränge·Kontinuitätsvertrag

Der props.status eines Promise durchläuft nur die Reihenfolge hypothetical → eligible → actualized; eine absichtliche Verwerfung endet mit prevented. eligible erfordert T, actualized erfordert P. promises(status=["eligible"]) gibt F–T–P, Schulden, S-Eff und delta-Coh-Näherungen zurück.

Die Sichtbarkeit eines Facts wird in visible_to mit viewer, learned_at und pathway strukturiert erfasst. Die props.pre · post · forbid-Bedingungen haben die Form subject, field, op, value; Äußerungs-Fakten werden als props.claims=[{"speaker": "character/…", "fact": "fact/…"}] erfasst. Nur mit dieser Struktur kann check Wahrnehmungszeitpunkt, Weltregeln und Faktenkonflikte reproduzierbar per SQL beurteilen.

Zyklen in causes, contains, extends und eine zweite focalizes-Kante pro Scene werden in der Vorschlagsphase abgelehnt. Die übrigen Diagnosen, einschließlich unerreichbarer Ereignisse, werden in den Commit-Ergebnissen und mit check geprüft.

Available Tools

14 tools
checkB
Read-onlyIdempotent

spec/rules.json의 P2 SQL 규칙으로 책 또는 노드 범위의 연속성을 진단합니다. LLM을 호출하지 않으며 노드와 근거를 함께 반환합니다.

Inputs: rules, scope, severity, max_chars, +1 more. Returns: result

commitB
DestructiveIdempotent

저장된 제안을 단일 SQLite 커밋 레인에서 원자적으로 적용하거나 dry_run 합니다. 충돌하면 어떤 변경도 적용하지 않습니다.

Inputs: proposal_id (required), mode. Returns: object

findA
Read-onlyIdempotent

제목·별칭·요약·근거 본문을 BM25, 로컬 sqlite-vec dense, 또는 두 순위의 RRF 결합으로 검색합니다. 외부 임베딩 API를 호출하지 않습니다.

Inputs: q (required), tag, kind, mode, +4 more.

getB
Read-onlyIdempotent

주소로 노드를 읽습니다. brief는 한 줄 요약, full은 구조화 필드, body는 선택한 노드 하나의 근거 원문만 반환합니다.

Inputs: ref (required), as_of, include, max_chars, +1 more.

graph_schemaA
Read-onlyIdempotent

런타임 온톨로지의 노드 타입·간선·태그·진단 규칙을 반환합니다. 스키마를 추측하지 말고 이 도구로 확인하세요.

Inputs: section, max_chars, response_format.

impactB
Read-onlyIdempotent

가상의 필드 변경이 역방향 hard 간선을 따라 영향을 줄 노드와 관련 진단 규칙을 읽기 전용으로 미리 계산합니다.

Inputs: ref (required), change (required), max_depth. Returns: object

ingestB
Idempotent

원고 전체와 명시적 ID binding manifest의 해시·UTF-8 byte span·Scene 분할을 검증하고 증분 변경 Proposal만 만듭니다. live 그래프는 commit 전까지 바뀌지 않습니다.

Inputs: chapter (required), mode. Returns: object

neighborhoodA
Read-onlyIdempotent

의도 검색 seed와 명시적 anchor에서 hard 간선 1-hop을 확장해 token budget 안의 집필 컨텍스트 패킷을 만듭니다.

Inputs: intent (required), as_of, anchors, budget_tokens. Returns: object

outlineA
Read-onlyIdempotent

책 전체 또는 한 주소 아래의 구조를 본문 없이 반환합니다. 항상 넓은 탐색의 첫 단계로 사용하세요.

Inputs: kind, depth, scope, max_chars, +1 more.

promisesA
Read-onlyIdempotent

복선의 F-T-P, 상태, 부채, S-Eff, delta-Coh 근사치를 조회합니다. 집필 전에 eligible 상태만 필터링할 수 있습니다.

Inputs: sort, as_of, status, max_chars, +1 more. Returns: result

proposeA
Idempotent

비어 있지 않은 read_set과 멱등 키가 있는 연산을 변경 제안으로 기록합니다. 이 호출만으로 live 그래프는 바뀌지 않습니다.

Inputs: ops (required), read_set (required), rationale (required), session_id (required), +4 more. Returns: object

queryA
Read-onlyIdempotent

손으로 빚은 도구로 풀기 어려운 분석을 위해 단일 SELECT/WITH SQL을 읽기 전용, 행 제한, 실행 예산과 함께 수행합니다.

Inputs: sql (required), limit, params. Returns: object

refsC
Read-onlyIdempotent

한 노드를 가리키거나 그 노드가 가리키는 관계를 반환합니다. 산문 언급인 soft 간선은 요청할 때만 포함합니다.

Inputs: ref (required), dir, rel, as_of, +3 more.

traceA
Read-onlyIdempotent

한 노드에서 특정 대상 또는 서사 장치까지의 bounded hard-edge 경로를 반환합니다. 관계 종류와 깊이 및 경로 수를 제한할 수 있습니다.

Inputs: from (required), k, to, via, +1 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 14 tools

    Disambiguation4/5

    Each tool targets a clearly distinct operation: search (find), read (get, outline), graph navigation (refs, trace, neighborhood), diagnostics (check, impact), and staged writes (ingest, propose, commit). Minor overlap exists between ingest/propose (both create proposals) and check/impact (both diagnostic), but the descriptions draw clear boundaries.

    Naming Consistency3/5

    Naming is mixed: most tools use imperative verbs (get, find, check, commit, propose, ingest, trace, query), but several are nouns or abbreviations (outline, promises, refs, neighborhood, graph_schema). The pattern is readable but inconsistent across verb and noun conventions.

    Tool Count4/5

    14 tools is on the higher end but reasonable given the rich domain of narrative graph management, continuity diagnostics, foreshadowing, and staged write workflows. Each tool appears to earn its place, though the count leans toward the heavy side of the ideal range.

    Completeness4/5

    The surface covers the full lifecycle well: reading (get, outline), search (find, query), graph navigation (refs, trace, neighborhood), schema introspection (graph_schema), diagnostics (check, impact), and staged writes (ingest, propose, commit). Minor gaps exist (no explicit delete/rollback tool, no direct promise mutation), but the workflow demonstrates no dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A narrative graph engine that enables LLMs to generate, track, and mutate complex fictional worlds while maintaining consistency between factions, characters, and locations. It acts as a specialized RAG framework for storytelling, allowing models to manage thousands of entities without exceeding context limits.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI-driven long-form novel creation and management, including chapter generation, character and timeline tracking, semantic memory retrieval, version savepoints, and deep consistency checking across multiple projects through MCP tools, with support for local LM Studio or any OpenAI-compatible API.
      16
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables long-form web novel writing workflows by ingesting chapters into a state database, running deterministic consistency checks, querying entity histories, replaying extraction results, and retrieving conflict reports via MCP tools.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to create and manage long-form story projects with isolated databases, persistent drafts, canonical continuity checks, controlled updates, and local semantic retrieval through MCP tools, resources, and prompts.
      MIT