Skip to content

Scaffold deterministic graph-based corporate conversation trainer#1

Merged
Manick94 merged 1 commit into
mainfrom
codex/build-graph-based-corporate-training-app
Mar 14, 2026
Merged

Scaffold deterministic graph-based corporate conversation trainer#1
Manick94 merged 1 commit into
mainfrom
codex/build-graph-based-corporate-training-app

Conversation

@Manick94

Copy link
Copy Markdown
Owner

Motivation

  • Provide a deterministic, auditable, editable conversation training platform modeled as a finite-state graph so trainers can run repeatable role-plays without external LLMs.
  • Deliver a runnable monorepo with a minimal full-stack MVP (API, DB, frontend) to accelerate scenario creation, inspection, and analytics.

Description

  • Added a monorepo skeleton with workspaces and top-level scripts and config files (package.json, tsconfig.base.json, .github/workflows/ci.yml, docker-compose.yml, README.md).
  • Implemented the core graph engine in apps/api/src/graph/engine.ts with deterministic traversal priority (exact/buttonregexintent (cosine similarity) → fuzzy (Levenshtein)), context/history updates, and action execution (setVariable/increment).
  • Added graph loader (apps/api/src/graph/loader.ts), SQLite persistence and schema (apps/api/src/db/index.ts), and conversation lifecycle services (startConversation and sendMessage in apps/api/src/services/conversationService.ts) with interaction logging.
  • Exposed Express routes for conversation and scenario management (apps/api/src/routes/conversations.ts, apps/api/src/routes/scenarios.ts) and added three sample scenario JSONs under apps/api/src/scenarios/ plus a unit test for the engine (apps/api/src/graph/engine.test.ts).
  • Created a lightweight React + TypeScript frontend using Zustand with chat UI, quick-reply buttons, and a simple graph viewer (apps/web/src/*) and shared TypeScript types and a basic JSON schema package under packages/*.
  • Included documentation and delivery artifacts: ADR (docs/adr/0001-deterministic-graph-engine.md), README.md, and a CI workflow that runs npm install, lint, test, and build.

Testing

  • Added unit tests for the engine (apps/api/src/graph/engine.test.ts) that exercise exact-match transitions and action-based variable updates but these tests were not executed in this environment.
  • Attempted to install dependencies with npm install to run lint/tests/build, but the install failed with an HTTP 403 Forbidden error against the registry which prevented running vitest or CI steps locally.
  • CI configuration was added (.github/workflows/ci.yml) to run npm install, npm run lint, npm run test, and npm run build on push/pull requests once registry access is available.

Codex Task

@Manick94
Manick94 merged commit 350c443 into main Mar 14, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant