agent-mcp-sql / app_requirements /1_feature_KG_backend.txt
Timothy Eastridge
MVP requirements
f79f9b7
1. Feature: Neo4j Knowledge Graph Core1.1 Story: As a developer, I need a Neo4j instance to store workflows and metadata.
1.1.1 Task: Create Dockerfile for Neo4j Community Edition v5.x with APOC plugins enabled, exposing port 7474 (browser) and 7687 (bolt)
1.1.2 Task: Configure persistent volume mount at /data for database files, ensuring data survives container restarts
1.1.3 Task: Set default credentials via environment variables (NEO4J_AUTH=neo4j/password) and document in .env.example
1.1.4 Task: Write health check script that attempts bolt connection and runs "MATCH (n) RETURN count(n) LIMIT 1" to verify database is responsive
1.2 Story: As a system, I need the essential graph schema for agentic workflows.
1.2.1 Task: Create bootstrap script that uses Neo4j MCP server to create nodes: Workflow (properties: id, name, status, max_iterations, current_iteration), Instruction (id, sequence, type, parameters, status, pause_duration), Execution (id, started_at, completed_at, result, error)
1.2.2 Task: Via MCP server, create PostgreSQL metadata nodes: SourceSystem (id, name, connection_string_ref), Table (name, schema, row_count), Column (name, data_type, nullable, is_primary_key)
1.2.3 Task: Via MCP server, create relationships: (Workflow)-[:HAS_INSTRUCTION]->(Instruction), (Instruction)-[:NEXT_INSTRUCTION]->(Instruction), (Instruction)-[:EXECUTED_AS]->(Execution), (Table)-[:HAS_COLUMN]->(Column)
1.2.4 Task: Via MCP server, add status properties with constraints: status IN ['pending', 'executing', 'paused', 'complete', 'failed'], pause_duration integer (seconds), sequence integer (execution order)
1.2.5 Task: Via MCP server, create composite index on (status, sequence) for efficient "next instruction" queries, and single indexes on Workflow.id and Instruction.id