⬡ AEEIP Assistant

Welcome to AEEIP Assistant. Ask questions about automotive Ethernet, AUTOSAR, protocols, or your engineering knowledge base. RAG mode queries the KBS before answering.

🖥 AgenticAI Cluster

Distributed AI compute cluster — nodes, models, tasks, and real-time monitoring

-
Online Nodes
-
Avg CPU
-
Avg Memory
-
Active Agents

Cluster Nodes

Loading...

Available Models

Loading...

Recent Tasks

IDAgentModelStatusProgressTime
Loading...

Event Log

AEEIP — System Dashboard

Automotive Ethernet Engineering Intelligence Platform — Engineering Knowledge Operating System for ADAS HPC Automotive Ethernet

AEEIP is an engineering knowledge operating system comprising two cooperating subsystems:

  • A Docker-based backend knowledge service (Backend KBS)
  • A workspace-local engineering agent (AETA — Automotive Ethernet Engineering Agent)

Together they provide:

  • Knowledge graph management for automotive Ethernet standards and protocols
  • Semantic retrieval across multi-domain documents (RFC, IEEE, AUTOSAR, QNX, CyberSecurity, FUSA)
  • Full requirement → design → code → test traceability
  • AI-assisted governance for knowledge evolution
  • MCP tool integration with VS Code Copilot
22
Node Labels
24
Relation Types
7
Document Categories
21
MCP Tools (12+9)

System Boundary

SubsystemLocationTechnologyPortResponsibility
Backend KBSmcp_servers/rag_kbs/backendDocker: FastAPI + Neo4j + Qdrant + PostgreSQL + MinIO + Ollama8000Knowledge graph, semantic retrieval, governance, backup
AETA Agentmcp_servers/aeta/src/Local Python: MCP Server + SQLite8088Symbol indexing, traceability, knowledge generation
Copilot Skills.copilot/kbs-workflows/skills/Markdown workflow definitions—Cross-subsystem orchestration (4 skills)
System IntegrationMCP transport layerStreamable HTTP (MCP SDK 1.27)—MCP client ↔ server communication

Design Principles

Knowledge Graph= Single Source of Truth (Neo4j property graph)
Source Code= Source of Evidence (AST-indexed symbols via AETA)
Rules= Versioned YAML Assets (label-pair validation in knowledge_graph_rules.yaml)
AI proposes→ Governance reviews → Graph evolves (reviewer queues, architect auto-approves)
Hexagonal ArchitectureDomain ports isolate business logic from infrastructure adapters
Federated MCPNo direct service coupling — subsystems communicate only via MCP tools through VS Code Copilot

System Architecture (SAD)

Federated MCP architecture — subsystems communicate exclusively through MCP tool invocations via VS Code Copilot. No direct service-to-service coupling.

Architectural Style

Primary: Federated MCP Architecture

  • Each subsystem is an autonomous MCP server with its own persistence layer
  • Subsystems communicate exclusively through MCP tool invocations via a shared MCP client (VS Code Copilot)
  • Orchestration logic resides in Copilot Agent Skills that coordinate cross-subsystem workflows
  • No direct service-to-service coupling between Backend and AETA

Primary Design Rules:

  • Subsystems are independently deployable and testable
  • The MCP client is the sole integration point
  • Skills encode workflow semantics; tools encode atomic operations
  • Governance is enforced at the Backend boundary regardless of caller identity

System Context

%%{init: {'flowchart': {'nodeSpacing': 42, 'rankSpacing': 52, 'curve': 'basis'}}}%%
flowchart LR
    subgraph IDE["VS Code Copilot"]
      direction TB
      SKILLS["Copilot Agent Skills x4"]
      MCPCFG["mcp.json config"]
    end

    subgraph BACKEND["Backend KBS :8000"]
      direction TB
      API["FastAPI MCP Server"]

      subgraph STORES["Data and Infra Stores"]
        direction LR
        NEO[("Neo4j :7687")]
        QDR[("Qdrant :6333")]
        PG[("PostgreSQL :5432")]
        MINIO[("MinIO :9000")]
        OLLAMA["Ollama :11434"]
      end
    end

    subgraph AETA["AETA Agent :8088"]
      direction TB
      AETASRV["MCP Server"]
      SQLITE[("SQLite")]
    end

    SKILLS -->|"orchestrates"| MCPCFG
    MCPCFG -->|"X-API-Key"| API
    MCPCFG -->|"no auth"| AETASRV
    API --> NEO & QDR & PG & MINIO & OLLAMA
    AETASRV --> SQLITE

    classDef control fill:#1f3a5f,stroke:#63b3ed,stroke-width:1.5px,color:#e2e8f0;
    classDef service fill:#16324f,stroke:#4fa3e3,stroke-width:1.5px,color:#e2e8f0;
    classDef store fill:#1a2a44,stroke:#7dd3fc,stroke-width:1.2px,color:#dbeafe;

    class MCPCFG,SKILLS control;
    class API,AETASRV,OLLAMA service;
    class NEO,QDR,PG,MINIO,SQLITE store;
  

Backend Hexagonal Decomposition

flowchart TB
    subgraph DRIVING["Driving Adapters"]
        REST["REST /api/v1/*"]
        MCP_T["MCP /api/v1/mcp/"]
        ADMIN["/admin"]
        GRAPH["/graph"]
        PORTAL["/portal/"]
    end

    subgraph APP["Application Layer"]
        UC1["GenerateCompletion"]
        UC2["IngestKnowledge"]
        UC3["AgentLoop"]
        UC5["KBSOrchestrator"]
        UC6["RuleEngine"]
    end

    subgraph DOMAIN["Domain Core"]
        ENT["Entities"]
        PORTS["Ports"]
        VO["Value Objects"]
    end

    subgraph DRIVEN["Driven Adapters"]
        A1["Neo4jGraphAdapter"]
        A2["QdrantAdapter"]
        A3["PostgresReviewAdapter"]
        A4["OllamaAdapter"]
        A5["MinIOAdapter"]
        A6["GovernanceTools x12"]
    end

    DRIVING --> APP
    APP --> DOMAIN
    DOMAIN --> DRIVEN
  

Architectural Decisions

IDDecisionRationale
AD-SYS-001Federated MCP (no direct service coupling)Subsystems evolve independently; AETA can work offline
AD-SYS-002Skills as orchestration layerWorkflow logic is version-controlled, auditable, modifiable without deployment
AD-SYS-003Backend owns all persistent graph stateSingle source of truth; governance enforced at one boundary
AD-SYS-004AETA operates without authenticationWorkspace-local trust model; no secrets management needed
AD-SYS-005Shared category taxonomy across subsystemsConsistent classification regardless of which subsystem creates a node
AD-SYS-006MCP streamable HTTP transport (not SSE legacy)Bidirectional communication, better error handling, connection resilience
AD-SYS-007Role hierarchy in Backend, not AETAAETA is trusted local agent; external access control is Backend's responsibility
AD-SYS-008Knowledge graph rules in YAMLVersion-controlled, diffable, reviewable without code changes
AD-SYS-009Docker Compose for Backend, bare Python for AETABackend needs stateful services; AETA needs only local filesystem

Deployment View

ServicePortRequiredStorage
Backend (FastAPI)8000Yes—
PostgreSQL5432Yes./data/postgres
Neo4j7474/7687Optional./data/neo4j
Qdrant6333/6334Optional./data/qdrant
MinIO9000/9001Optional./data/minio
Ollama11434Optional~/.ollama
AETA Agent8088OptionalLocal SQLite

Architectural Constraints

  • No direct Neo4j access from AETA; all graph writes must go through Backend MCP tools
  • Copilot Skills cannot maintain state between invocations; each skill call is stateless
  • MCP protocol limits tool results to text payloads; binary data requires object storage references
  • AETA's SQLite symbol index is workspace-scoped; multiple workspaces require separate AETA instances
  • Backend's feature gates must be consistent with deployed infrastructure (e.g., FEATURE_KBS=true requires running Qdrant)

Quality Attributes

AttributeMechanismMeasure
ModifiabilityHexagonal architecture, port-based adaptersNew adapter without changing use cases
TestabilityDI container, domain isolationFake adapters in unit tests
DeployabilityDocker Compose, feature gatesSingle docker compose up for full stack
AvailabilityOptional adapter patternBackend starts even if Neo4j/Qdrant unavailable
SecurityAPI key auth, role hierarchy, parameterized CypherNo Cypher injection; privilege escalation blocked
TraceabilityAudit log, review queue, tool annotationsEvery graph mutation has provenance

Software Requirements Specification (SWS)

System-level software requirements per Automotive SPICE SWE.1 — covers cross-cutting requirements spanning both Backend KBS and AETA Agent subsystems.

§4.1 Knowledge Graph

IDRequirementVerification
SWS-SYS-001The system shall maintain a property graph (Neo4j) storing nodes with labels, ext_id, title, category, description, and arbitrary additional properties.Integration test: upsert → query
SWS-SYS-002The system shall validate all node labels against a configured allowlist (currently 22 labels).Unit test: reject unknown label
SWS-SYS-003The system shall validate all relationship types against a configured allowlist (currently 24 types).Unit test: reject unknown relation
SWS-SYS-004The system shall enforce label-pair rules defining allowed (from_label, relation_type, to_label) combinations, configured in knowledge_graph_rules.yaml.Unit test: reject invalid pair
SWS-SYS-005The system shall support hierarchical node decomposition via contains relations (Feature→SubFeature→SubFeature).Graph query: verify depth
SWS-SYS-006The system shall automatically derive node category from ext_id prefix patterns when not explicitly provided.Unit test: pattern→category
SWS-SYS-007The system shall compute a brief field for every node: {category} / {label} / {title} — {first sentence of description}.Response schema validation

§4.2 Document Categories

IDRequirementVerification
SWS-SYS-010The system shall support the following document categories: RFC, IEEE, Classic_AUTOSAR, Adaptive_AUTOSAR, QNX, CyberSecurity, FUSA.Config validation
SWS-SYS-011Category derivation shall match ext_id using the first applicable regex in a priority-ordered pattern list.Unit test: priority match
SWS-SYS-012When no pattern matches, the system shall fall back to label-based category defaults (e.g., label RFC → category RFC).Unit test: fallback path

§4.3 Governance and Access Control

IDRequirementVerification
SWS-SYS-020The system shall enforce a 5-level role hierarchy: viewer(0) < engineer(1) < reviewer(2) < architect(3) < admin(4).RBAC unit tests
SWS-SYS-021Read-only tools shall require minimum role viewer.Integration test
SWS-SYS-022Proposal tools shall require minimum role reviewer.Integration test: reject engineer
SWS-SYS-023Approval and auto-approve behavior shall require minimum role architect.Integration test
SWS-SYS-024Direct CRUD operations shall require minimum role admin.Integration test: reject architect
SWS-SYS-025A master admin key (env ADMIN_MASTER_KEY) shall bypass database lookup and grant full admin privileges.Startup test
SWS-SYS-026When caller role ≥ architect, propose_relation shall auto-approve and write directly without review queue.No pending record
SWS-SYS-027When caller role = reviewer, propose_relation shall queue proposal with status pending.Pending record exists
SWS-SYS-028The system shall maintain an audit log recording governance actions (propose, approve, reject, direct write).Audit query test

§4.4 MCP Integration

IDRequirementVerification
SWS-SYS-030Both subsystems shall expose tools via MCP streamable HTTP transport.Connection test
SWS-SYS-031Backend MCP: http://localhost:8000/api/v1/mcp/ with X-API-Key header.Curl test
SWS-SYS-032AETA MCP: http://localhost:8088/mcp/ without authentication.Curl test
SWS-SYS-033All MCP tools shall declare ToolAnnotations(destructiveHint=False, idempotentHint=True).Descriptor inspection
SWS-SYS-034Backend shall expose only tools listed in MCP_EXPOSED_TOOLS env var.Config review

§4.5 Semantic Retrieval

IDRequirementVerification
SWS-SYS-040The system shall support semantic vector search across ingested documents using Qdrant.Relevance test
SWS-SYS-041The system shall support source-filtered search (RFC-only, IEEE-only, etc.).Filter test
SWS-SYS-042The system shall support adaptive retrieval combining: semantic search, source-filtered search, protocol search, graph traversal, and rule evaluation.Orchestrator test
SWS-SYS-043The system shall support N-hop graph traversal from a given node (trace_protocol).Traversal test

§4.6 Backup and Recovery

IDRequirementVerification
SWS-SYS-050The system shall support full backup (Neo4j + PostgreSQL + Qdrant metadata) as downloadable archive via MCP tool.Backup file validation
SWS-SYS-051The system shall support restore from a backup archive via MCP tool with idempotent behavior.Restore + verify roundtrip

§5 AETA Agent Requirements

IDRequirementVerification
SWS-AETA-001AETA shall scan source code and build a SQLite symbol index of functions, classes, structs, enums, macros, typedefs, namespaces.Index build + query
SWS-AETA-002AETA shall track #include dependencies between source files.Include query test
SWS-AETA-003AETA shall track function call references (caller → callee).Call graph query
SWS-AETA-004AETA shall provide full traceability: SVG levels → Req → Design → Code symbols.Trace chain validation
SWS-AETA-005AETA shall generate knowledge files in Markdown+YAML frontmatter format.File format validation
SWS-AETA-006AETA shall provide CLI: build-index, uc1, uc2, trace-full, export-traceability, knowledge.CLI smoke test
SWS-AETA-007AETA shall support adaptive RAG combining KBS semantic search, Polarion integration, and graph context.RAG result validation
SWS-AETA-008AETA shall export traceability reports in Excel format.File format test

§6 Copilot Skill Requirements

IDRequirementVerification
SWS-SKILL-001Skill agentic-ai-update-kbs shall orchestrate graph quality review by reading existing graph state and planning node/relation updates.Manual invocation test
SWS-SKILL-002Skill evidence-kbs-update shall convert source code and design into evidence, then invoke Backend MCP tools to update graph.End-to-end trace
SWS-SKILL-003Skill trace-to-knowledge shall execute full traceability (Req→Design→Code), generate knowledge, then ingest via MCP.Trace + ingest verification
SWS-SKILL-004Skill knowledge-ingest shall read Markdown files from docs/handsonknowledge/ and ingest into Backend KBS.Ingest + graph verification

§7 Non-Functional Requirements

IDRequirementCategory
SWS-SYS-NF-001Feature gating for RAG, KBS, conversation, rate limiting, usage tracking, and agents via env vars.Configurability
SWS-SYS-NF-002Dependency injection isolating business logic from infrastructure adapters.Maintainability
SWS-SYS-NF-003Structured logs during startup, shutdown, retrieval, ingestion, and governance.Observability
SWS-SYS-NF-004Extension through additional hooks and tools without changing core API contracts.Extensibility
SWS-SYS-NF-005All Cypher queries use parameterized inputs (prevent injection).Security
SWS-SYS-NF-006PostgreSQL required; Neo4j/Qdrant/MinIO/Ollama optional based on feature gates.Availability
SWS-SYS-NF-007AETA operates locally without network (except optional Backend MCP).Independence
SWS-SYS-NF-008Concurrent MCP client sessions without session interference.Concurrency

§10 Traceability to Subsystem SWS

System RequirementBackend SWS ReferenceAETA Reference
SWS-SYS-001..007 (Graph)SWS-BE-022, graph_governance_tools—
SWS-SYS-010..012 (Categories)category derivation in neo4j_graph_adapter—
SWS-SYS-020..028 (Governance)SWS-BE-004, SWS-BE-005, SWS-BE-020, SWS-BE-021—
SWS-SYS-030..034 (MCP)SWS-BE-019SWS-AETA-006
SWS-SYS-040..043 (Retrieval)SWS-BE-012, SWS-BE-013, SWS-BE-017SWS-AETA-007
SWS-SYS-050..051 (Backup)SWS-BE-024—
SWS-AETA-001..008—AETA subsystem
SWS-SKILL-001..004MCP tool consumerMCP tool consumer

Software Architecture Description (SAD)

Backend hexagonal architecture per Automotive SPICE SWE.2 — port-based adapter design with domain isolation

Dynamic View — System Startup

sequenceDiagram
    participant DC as Docker Compose
    participant PG as PostgreSQL
    participant NEO as Neo4j
    participant QDR as Qdrant
    participant BE as Backend FastAPI
    participant DEV as Developer
    participant AETA as AETA Agent

    DC->>PG: start (healthcheck: pg_isready)
    DC->>NEO: start (healthcheck)
    DC->>QDR: start (healthcheck)
    DC->>BE: start (depends_on: healthy)
    BE->>BE: load settings, validate features
    BE->>PG: run Alembic migrations
    BE->>BE: Container.initialize()
    BE->>NEO: verify connection
    BE->>QDR: verify connection
    BE-->>DC: ready

    DEV->>AETA: python -m mcp_servers.aeta.src.mcp_kbs_server --port 8088
    AETA->>AETA: load symbol DB
    AETA-->>DEV: MCP server ready
  

Dynamic View — Knowledge Evolution Flow

sequenceDiagram
    participant DEV as Developer
    participant COP as Copilot Skill
    participant AETA as AETA MCP
    participant BE as Backend MCP
    participant NEO as Neo4j

    DEV->>COP: invoke trace-to-knowledge
    COP->>AETA: trace_full(workspace, source_dir)
    AETA-->>COP: trace chains + coverage
    COP->>AETA: search_code(symbol_name)
    AETA-->>COP: symbol details + call graph
    COP->>COP: generate knowledge evidence (MD)
    COP->>BE: kbs_update(upsert_node, ...)
    BE->>NEO: MERGE node
    BE-->>COP: node created (brief)
    COP->>BE: propose_relation(from, rel, to)
    BE->>NEO: MERGE relation (auto-approve)
    BE-->>COP: relation written
    COP-->>DEV: knowledge graph updated ✓
  

Dynamic View — Governance (Reviewer Path)

sequenceDiagram
    participant REV as Reviewer Agent
    participant BE as Backend MCP
    participant PG as PostgreSQL
    participant ARCH as Architect Agent
    participant NEO as Neo4j
    participant AUDIT as Audit Log

    REV->>BE: propose_relation(from, rel, to) [reviewer]
    BE->>PG: INSERT review_queue (pending)
    BE-->>REV: queued (proposal_id)

    Note over PG: Awaits architect approval

    ARCH->>BE: approve_relation(proposal_id) [architect]
    BE->>PG: UPDATE status=approved
    BE->>NEO: MERGE relation
    BE->>AUDIT: log(approve, architect, id)
    BE-->>ARCH: approved + written ✓
  

Port Interfaces

PortDirectionAdapterTechnology
GraphPortDrivenNeo4jGraphAdapterneo4j-driver 5.x async
VectorPortDrivenQdrantAdapterqdrant-client
ReviewPortDrivenPostgresReviewAdapterasyncpg
LLMPortDrivenOllamaAdapterhttpx → Ollama/OpenAI API
APIKeyRepoPortDrivenPostgresAPIKeyRepoasyncpg
ToolPortDriven12 Graph Governance ToolsMCP SDK 1.27

Skill Orchestration Layer

SkillBackend Tools UsedAETA Tools UsedWorkflow
agentic-ai-update-kbsreview_graph, kbs_update, trace_protocol—Read graph state → plan updates → execute
evidence-kbs-updatekbs_update, propose_relationsearch_codeCode evidence → graph nodes + relations
trace-to-knowledgekbs_update, propose_relationtrace_full, search_codeReq→Design→Code → knowledge → ingest
knowledge-ingestkbs_update, propose_relationknowledge_scanMD files → create nodes → propose relations

Software Detailed Design (SDD)

Cross-subsystem interface contracts per Automotive SPICE SWE.3 — MCP transport, graph schema, role model, audit, tool contracts

§2.1 MCP Transport Interface

PropertyBackend KBSAETA Agent
URLhttp://localhost:8000/api/v1/mcp/http://localhost:8088/mcp/
TransportStreamable HTTPStreamable HTTP
AuthX-API-Key header (mandatory)None
Tool filteringMCP_EXPOSED_TOOLS env varAll tools exposed
AnnotationsdestructiveHint=False, idempotentHint=True

MCP Client Configuration (mcp.json)

{
  "servers": {
    "local-kbs-mcp": {
      "type": "http",
      "url": "http://localhost:8000/api/v1/mcp/",
      "headers": { "X-API-Key": "<architect-or-admin-key>" }
    },
    "aeta-kbs": {
      "type": "http",
      "url": "http://localhost:8088/mcp/"
    }
  }
}

§2.2 Knowledge Graph Data Model

Node Schema

PropertyTypeRequiredSource
ext_idStringYesCaller-provided unique identifier
titleStringYesHuman-readable name
categoryStringAutoDerived from ext_id patterns or explicitly set
descriptionStringNoFirst sentence used in brief
labelNeo4j labelYesOne of 22 allowed labels

Allowed Labels (22)

Standard RFC IEEE AUTOSAR ISO Protocol Layer Feature SubFeature Requirement Design Component Service Signal Function ConfigParam SourceFile Rule Evidence Review Finding TestCase

Allowed Relation Types (24)

references implements specifies validates depends_on extends replaces conflicts_with part_of uses defines maps_to traces_to satisfies verifies allocates derives_from refines decomposes contains tests configures instantiates communicates_with

§2.2.5 Category Derivation Algorithm

CATEGORY_PATTERNS = [
    (r"^rfc-\d+",           "RFC"),
    (r"^refs-ietf-",        "RFC"),
    (r"^ieee-",             "IEEE"),
    (r"^refs-ieee-",        "IEEE"),
    (r"^autosar-sws-",      "Classic_AUTOSAR"),
    (r"^ar-",               "Classic_AUTOSAR"),
    (r"^ecuc-",             "Classic_AUTOSAR"),
    (r"^autosar-ap-",       "Adaptive_AUTOSAR"),
    (r"^ara-",              "Adaptive_AUTOSAR"),
    (r"^qnx-",             "QNX"),
    (r"^secoc-|^csm-|^tls-|^idsm-|^macsec-", "CyberSecurity"),
    (r"^iso-26262|^asil-|^fusa-",             "FUSA"),
]

def derive_category(ext_id: str, label: str) -> str:
    for pattern, category in CATEGORY_PATTERNS:
        if re.match(pattern, ext_id, re.IGNORECASE):
            return category
    return LABEL_DEFAULTS.get(label, "General")

§2.3 Role and Permission Model

Auto-Approve Logic

# In ProposeRelationTool.execute():
caller_role_rank = ROLE_RANKS[current_api_key.role]

if caller_role_rank >= ROLE_RANKS["architect"]:  # rank >= 3
    # Direct write — no review queue
    self._graph.upsert_relation(from_ext_id, rel_type, to_ext_id, properties)
    return ToolResult(content=f"Auto-approved: {from_ext_id} —[{rel_type}]→ {to_ext_id}")
else:
    # Queue for review
    self._review.create_proposal(from_ext_id, rel_type, to_ext_id, properties, caller)
    return ToolResult(content=f"Queued for architect approval: proposal #{id}")

§2.4 Audit and Review Queue (PostgreSQL)

CREATE TABLE review_queue (
    id            SERIAL PRIMARY KEY,
    from_ext_id   VARCHAR(256) NOT NULL,
    relation_type VARCHAR(64)  NOT NULL,
    to_ext_id     VARCHAR(256) NOT NULL,
    properties    JSONB,
    proposer      VARCHAR(256) NOT NULL,
    status        VARCHAR(16)  NOT NULL DEFAULT 'pending',
    reviewer      VARCHAR(256),
    review_reason TEXT,
    created_at    TIMESTAMP DEFAULT NOW(),
    reviewed_at   TIMESTAMP
);

CREATE TABLE audit_log (
    id         SERIAL PRIMARY KEY,
    action     VARCHAR(64)  NOT NULL,  -- propose|approve|reject|direct_write|delete
    actor      VARCHAR(256) NOT NULL,
    target     TEXT         NOT NULL,
    details    JSONB,
    created_at TIMESTAMP DEFAULT NOW()
);

§3.1 Backend MCP Tool Contracts

Tool: kbs_update — Direct graph mutation (admin only)

Input:
  action: "upsert_node" | "delete_node" | "upsert_relation" | "delete_relation"

  upsert_node:  { label, ext_id, properties: {title, description?, category?} }
  delete_node:  { ext_id }
  upsert_relation: { from_ext_id, relation_type, to_ext_id, properties? }
  delete_relation: { from_ext_id, relation_type, to_ext_id }

Output:
  "Upserted: RFC / Requirement / RFC9293-MUST-19 — TCP MUST send RST"
Tool: propose_relation — Governed relation creation

Input:
  from_ext_id: str
  relation_type: str (from allowed types)
  to_ext_id: str
  properties: dict (optional)
  evidence: str (justification text)

Output (architect+): "Auto-approved: {from} —[{rel}]→ {to}"
Output (reviewer):   "Queued: proposal #{id} pending architect approval"
Tool: trace_protocol — N-hop graph traversal

Input:
  start_node: str (ext_id)
  hops: int (1-5, default 2)
  direction: "outgoing" | "incoming" | "both" (default "both")

Output:
  List of nodes with brief, grouped by hop distance
  Includes: ext_id, title, category, label, description, relations

§5 Database Migration Strategy (Alembic)

VersionDescriptionKey Changes
001Initial schemaapi_keys, conversations, usage_logs, prompts
002Agent tracesagent_traces table
003Review queuereview_queue, audit_log tables
004Tool authorizationapi_keys.allowed_tools JSONB column
005Prompt versioningprompt version tracking
006Rule syncrule DB persistence
007Role expansionapi_keys.role VARCHAR(10)→VARCHAR(32), 'user'→'reviewer'

§6 Configuration Management

VariablePurposeDefault
ADMIN_MASTER_KEYMaster admin API key (bypass DB)Required
FEATURE_AGENTSEnable tool registry + MCPtrue
FEATURE_RAGEnable vector retrievaltrue
FEATURE_KBSEnable KBS orchestratortrue
MCP_EXPOSED_TOOLSJSON array of tool names for MCPAll governance + search
NEO4J_URINeo4j bolt connectionbolt://neo4j:7687
QDRANT_HOSTQdrant gRPC hostqdrant
LLM_PROVIDERollama / openai_compatible / vllmollama
LLM_MODELModel for completionsqwen2.5:7b
EMBEDDING_MODELModel for embeddingsnomic-embed-text
WRITE_GUARD_ENABLEDProtect write toolstrue
WRITE_GUARD_MIN_ROLEMin role for write opsReviewer

§7 Design Traceability

Design ElementSAD ReferenceSWS Reference
MCP transport (§2.1)AD-SYS-006SWS-SYS-030..034
Graph data model (§2.2)AD-SYS-003, AD-SYS-005SWS-SYS-001..012
Role model (§2.3)AD-SYS-007SWS-SYS-020..028
Audit/review (§2.4)AD-SYS-003SWS-SYS-027, 028
Tool contracts (§3)AD-SYS-001, 002SWS-SYS-030..034, AETA-001..008
Migrations (§5)—SWS-SYS-020 (role expansion)
Configuration (§6)AD-SYS-009SWS-SYS-NF-001

Admin — API Key & User Management

Manage API keys and user accounts for Backend KBS

Connect to Backend

Review Queue — Knowledge Graph Governance

Review, approve, or reject proposed graph changes (relations, KA candidates, rules)

Connect to Backend

Knowledge Graph Explorer

Backend KBS · Remote 192.168.100.172 · Neo4j :7687 Open KBS-only graph ↗ Full graph ↗
⚠ AETA_ nodes hidden by default. "Open KBS-only graph" pre-fills the Cypher filter. For feature→code traceability, use the Traceability Graph tab.
⬡

KBS Knowledge Graph loads when Backend KBS is running at :8000

Traceability Graph Explorer

AETA · Local · Neo4j :7688 · prefix: AETA_ Open Neo4j Browser ↗

Graph Queries

ASPICE Chain

Feature
CONTAINS_IR
Input Requirement (IR)
IS_REFINED_BY
PRD / SRD
SATISFIED_BY
PAD
DECOMPOSED_TO
SAD
DECOMPOSED_TO
SDD / UDD
REFERENCES_FUNCTION
Function
CALLS
Caller / Callee

Select a query on the left to see results.

MCP Tool Catalog

Complete tool surface exposed via Model Context Protocol — 12 Backend + 9 AETA tools

ToolDescriptionMin RoleWrite
kbs_searchSemantic vector search across all indexed documentsviewerNo
search_rfcRFC-filtered document search (source_filter="rfc")viewerNo
search_ieeeIEEE-filtered document search (source_filter="ieee")viewerNo
search_graphFull-text search in Neo4j graph nodesviewerNo
trace_protocolN-hop graph traversal from node (1–5 hops)viewerNo
review_graphRead-only Cypher query execution (parameterized)viewerNo
validate_rulesCheck graph constraint consistency against YAML rulesviewerNo
propose_relationPropose new relation (auto-approved for architect+, queued for reviewer)reviewerYes
approve_relationApprove/reject pending proposal from review queuearchitectYes
kbs_updateDirect node/relation CRUD (4 actions: upsert_node, delete_node, upsert_relation, delete_relation)adminYes
backup_kbs_bundleExport full backup archive (Neo4j + PG + Qdrant metadata)adminNo
restore_kbs_bundleImport from backup archive with idempotent behavioradminYes
KA Engine & KU Assembler (Phase 3–6)
extract_kaExtract KA candidates from document passages for a KU (Ollama-powered)engineerYes
review_kaApprove/reject KA candidate → approved KAs written to Neo4jreviewerYes
get_kaFetch a single approved KA node from Neo4j by ka_idviewerNo
get_kuFetch KU node with all approved KAs from Neo4jviewerNo
list_ka_candidatesList pending KA candidates in review queue (filterable by ku_id)viewerNo
regenerate_ku_summaryRegenerate KU summary from approved KAs (Ollama + re-embed)architectYes
search_knowledgeConcept Retrieval: KU search → KA expansion → contextviewerNo
create_ruleCreate a governance rule node in Neo4jreviewerYes
ToolDescriptionInput
search_codeSymbol search in indexed codebasequery, kind?, file_filter?
search_requirementRequirement search via KBS semanticquery
search_designDesign artifact searchquery
search_testcaseTest case searchquery
search_protocolProtocol knowledge searchquery
trace_fullFull traceability chain: SVG→Req→Design→Codeworkspace, source_dir
knowledge_scanScan knowledge MD files in workspaceworkspace
knowledge_relationsGet pending relation proposalsworkspace
index_statsSymbol index statistics—

Roles & Governance

5-level role hierarchy with graduated permission escalation — enforcement at auth middleware and tool level

Permission Matrix

RoleRankReadProposeAuto-approveDirect WriteBackup
Viewer0✅————
Engineer1✅————
Reviewer2✅✅ → queue———
Architect3✅✅ → auto✅——
Admin4✅✅ → auto✅✅✅

Enforcement Points

OperationMin RoleEnforcement Point
Read-only tools (kbs_search, trace_protocol, review_graph, etc.)viewer (0)auth_middleware
propose_relationreviewer (2)graph_governance_tools
approve_relationarchitect (3)graph_governance_tools
kbs_update (all 4 actions)admin (4)graph_governance_tools
backup_kbs_bundle / restore_kbs_bundleadmin (4)graph_governance_tools

Governance Flow

flowchart LR
    REV["Reviewer\n(propose)"] -->|queue| RQ[(review_queue\npending)]
    RQ -->|approve| ARCH["Architect\n(approve)"]
    ARCH -->|write| NEO1[(Neo4j)]

    ARCH2["Architect\n(propose)"] -->|auto-approve| NEO2[(Neo4j)]

    ADM["Admin\n(kbs_update)"] -->|direct write| NEO3[(Neo4j)]
  

API Key Binding

# Master key (env ADMIN_MASTER_KEY) → always admin, no DB lookup
# Regular keys → role in PostgreSQL api_keys.role (VARCHAR 32)

# MCP config:
"headers": { "X-API-Key": "sk-..." }

# Create via REST:
POST /api/v1/api-keys { "name": "bot", "role": "architect" }

# Create via Admin UI:
http://localhost:8000/portal/ → Admin → Connect → Create Key

Categories & Graph Schema

Document classification taxonomy, graph validation rules, and label-pair constraints

Document Categories

CategorySource Documentsext_id Pattern (regex)Example ext_id
RFCIETF Request for Comments^rfc-\d+, ^refs-ietf-rfc-9293-tcp
IEEEIEEE 802.x standards^ieee-, ^refs-ieee-ieee-802.1q-bridging
Classic_AUTOSARSWS, RS, TPS, ECUC^autosar-sws-, ^ar-, ^ecuc-autosar-sws-tcpip
Adaptive_AUTOSARAP, ARA, EXP^autosar-ap-, ^ara-autosar-ap-communication
QNXQNX platform docs^qnx-qnx-io-sock-networking
CyberSecuritySecOC, CSM, TLS, IDSM, MACsec^secoc-|^csm-|^tls-|^idsm-|^macsec-secoc-autosar-pdu-auth
FUSAISO 26262, ASIL, SOTIF^iso-26262|^asil-|^fusa-fusa-asil-b-tcp-monitoring

Brief Display Format

"{category} / {label} / {title} — {first sentence of description}"

Examples:
  "RFC / Requirement / RFC9293-MUST-19 — TCP MUST send RST when receiving invalid segment"
  "Classic_AUTOSAR / ConfigParam / TcpIpTcpCongestionAvoidanceEnabled — Enables AIMD algorithm"
  "IEEE / Feature / TSN Credit-Based Shaper — Traffic shaping for AVB streams"

Label-Pair Rule Validation

Before any relation write, the system validates (from_label, relation_type, to_label) against knowledge_graph_rules.yaml:

label_pair_rules:
  - { from_label: Feature,     relation: contains,         to_label: SubFeature }
  - { from_label: Requirement, relation: traces_to,        to_label: Design }
  - { from_label: Design,      relation: implements,       to_label: Component }
  - { from_label: Component,   relation: uses,             to_label: Function }
  - { from_label: TestCase,    relation: verifies,         to_label: Requirement }
  - { from_label: ConfigParam, relation: configures,       to_label: SubFeature }
  - { from_label: Standard,    relation: specifies,        to_label: Protocol }
  - { from_label: Protocol,    relation: defines,          to_label: Feature }
  - { from_label: SourceFile,  relation: implements,       to_label: Function }
  - { from_label: Evidence,    relation: derives_from,     to_label: SourceFile }
  - { from_label: Finding,     relation: references,       to_label: Rule }
  # ... (full list in config/rules/knowledge_graph_rules.yaml)

Knowledge Graph Rules YAML Structure

labels:
  - name: Feature
    description: "High-level system feature"
    required_properties: [ext_id, title]
    optional_properties: [category, description]

categories:
  - name: RFC
    patterns: ["^rfc-\\d+", "^refs-ietf-"]
  - name: IEEE
    patterns: ["^ieee-", "^refs-ieee-"]
  # ...

relations:
  - name: references
    description: "General reference link"
  - name: implements
    description: "Implementation relationship"
  # ...

Endpoint Configuration

Configure the connection endpoints for Knowledge Graph (remote Backend KBS) and Traceability Graph (local AETA).

Knowledge Graph — Backend KBS (Remote)

Traceability Graph — AETA (Local)