Wikantik Development

This cluster documents the development history of the Wikantik platform itself — the architecture decisions, feature implementations, and engineering patterns that have shaped the system over time.

Core Engineering Pillars

Module Structure

Wikantik is a Maven multi-module reactor. Key modules:

ModuleRole
wikantik-apiCore interfaces — manager contracts, frontmatter types, KG service, Page Graph interfaces
wikantik-mainMain implementation — Markdown rendering (Flexmark), providers, auth (JAAS), search, entity extraction, math parser
wikantik-eventEvent system for decoupled component communication
wikantik-utilUtility classes and helpers
wikantik-cacheEhCache-based caching layer (1-hour TTL, 10K entry capacity)
wikantik-httpServlet filters — CSRF, CORS, CSP, security headers, SPA routing
wikantik-restREST/JSON API (/api/*) and admin endpoints (/admin/*)
wikantik-mcp-coreShared MCP substrate — McpTool, endpoint bootstrap, access filter, and the two tools both MCP servers register. Extracted to break the wikantik-knowledgewikantik-admin-mcp module cycle
wikantik-admin-mcpAdmin MCP server at /wikantik-admin-mcp — 27 tools
wikantik-knowledgeKnowledge MCP server at /knowledge-mcp — 21 read-only tools when fully wired; also hosts the KG service, hybrid retriever, RAG bundle
wikantik-ontologyRDF/OWL ontology (Apache Jena + TDB2) — T-Box, projectors, SHACL gate, public SPARQL surface
wikantik-ingestDerived-page document extraction (Apache Tika 3.3.0 + flexmark-html2md)
wikantik-connectorsExternal-source connector runtime — seven connector types syncing into derived pages, with DB-backed configs and an encrypted credential store
wikantik-scimSCIM 2.0 provisioning at /scim/v2/*
wikantik-toolsOpenAPI 3.1 tool server at /tools/* — 2 tools for non-MCP clients
wikantik-observabilityHealth checks, Prometheus metrics, request correlation
wikantik-frontendReact SPA (Vite) — reader, editor, admin panel, Page Graph viewer, Knowledge Graph viewer. Not a Maven module: wikantik-war drives the npm build and bundles the output
wikantik-warWAR packaging; bundles the React build
wikantik-it-testsIntegration tests (Selenide, REST, Cargo-launched Tomcat + PostgreSQL + pgvector)

Architecture Evolution

Wikantik began as a fork of Apache JSPWiki. Through a sustained modernization effort starting March 2026, the platform was transformed:

Key Design Decisions

  1. ADR-001: Extract Manager Interfaces to API — Decouples MCP modules from the core engine; wikantik-api is the only dependency MCP modules need for type-safe engine access.
  2. Frontmatter as Source of Truth — Wiki page YAML frontmatter is the canonical source for cluster membership, tags, type, audience, verification, and SEO metadata. The server-authoritative FrontmatterSchema drives live validation and Save-gating in the editor.
  3. Page Graph vs Knowledge Graph — Two strictly separate subsystems. The Page Graph tracks real wikilink edges; the Knowledge Graph tracks LLM-extracted entities and relations. See PageGraphVsKnowledgeGraph.
  4. Fail-closed retrieval — The hybrid retriever degrades to BM25 when the embedding service (Ollama) is unavailable; the context bundle dense source uses Lucene HNSW in-process (the docker1 production default) so there is no mandatory external network dependency for search.
  5. Cluster taxonomy is a frontmatter projection, not a filesystem hierarchy (ADR-0009) — a path in frontmatter is data: validatable, re-projectable, multi-valued and revertable per page, where a path in the filesystem would bind page identity, slug history, URLs and wikilinks to one axis.

Feature Timeline

DateFeature
2026-03-23Test stub conversion for decoupled testing
2026-03-28JSP → React SPA migration
2026-04-03User profile management, attachment handling
2026-04-04Knowledge Graph core — entity extraction, kg_* tables, pgvector embeddings
2026-04-25Agent-grade content layer — type: runbook, page verification, get_page_for_agent, retrieval-quality CI
2026-05-02Structural spine — canonical_id, cluster:, list_clusters/list_tags/list_pages_by_filter; typed relations: frontmatter removed
2026-05-30Session stability — SameSite=Lax auth cookies, remember-me re-auth filter
2026-06-05SCIM deactivation auth guard; auth lock enforcement per-login-module
2026-06-08RDF/OWL ontology layer — T-Box, SHACL gate, public SPARQL/JSON-LD/dumps, SEO @type re-sourced from ontology
2026-06-09Structured frontmatter editor — live validation, Save-gating, page-scoped KG curation panel
2026-06-14RAG-as-a-Service Phase 1 — context bundle (GET /api/bundle, assemble_bundle MCP), derived pages (Tika ingest), chunker heading-fidelity fix, contextual embeddings
2026-06-19Bundle hybrid source (BM25+dense RRF default-on); admin-MCP reconciled to 26 tools; list_retrieval_queries added
2026-07-05Context briefing — get_briefing MCP tool + GET /api/briefing for session-start agent context
2026-07-15Connector framework + admin UI — seven connector types, DB-backed configs with hot-apply, encrypted credential store, guided add wizard
2026-08-15Cluster declaration (ADR-0009) — the hub page declares its cluster, scalar-or-list multi-membership, segment-aware ClusterPath matching, rename_cluster bulk curation; admin-MCP 26 → 27 tools

See Also

Wikantik Core Internals & Tools

Wikantik Engine Infrastructure & Tools

Compliance & Search Discovery