Skip to content

Repository files navigation

ReqAlign

Requirements intelligence for Sprint Grooming. ReqAlign bridges the gap between global Business Product Owners (POs) and regional POCs using a dynamic, non-hardcoded LLM interviewer that extracts precise technical requirements before grooming — then generates a backlog-ready Agile blueprint.

Built with Next.js 14 (App Router), Tailwind CSS, lucide-react, and Claude Haiku 4.5 via the Anthropic SDK pointed at the PwC GenAI shared-service proxy.


Why it's different — the Dual-State Dynamic Architecture

Instead of stuffing the entire chat history or a giant static decision tree into the model context, ReqAlign keeps a JSON Requirements Profile on the client and only ever sends the model the compact set of unfilled gaps:

  1. State Engine (lib/schema.js) — the single source of truth for the requirement pillars (Target System, Regional Guardrails, Data Flow, Security/Infra, Fallback Logic). It deterministically resolves the next highest-priority gap, so the model never wastes tokens deciding "what to ask next".
  2. Context-Constrained Prompting (lib/prompts.js) — the route handler passes the business problem, the JSON of what's already discovered, and a single target field. The model returns exactly one plain-language question.
  3. Strict JSON contract — every turn returns {"question","target_field","is_complete"}; generation returns a structured blueprint object.

This keeps token usage low, latency fast, and hallucination minimal.


Features

Interface A — PO Chatbot (/po/chat)

  • Intake: plain-language problem description.
  • Dynamic interview: one formal question at a time, with a live progress indicator ("Analyzing Pillar 2 of 5: Regional Guardrails").
  • Outcome: a structured Agile User Story, Given-When-Then acceptance criteria, recommended Story Points with justification, and pre-mapped Jira fields for Salesforce Service Cloud across 10 regions.
  • "I don't know" answers are handled per the Admin's configured fallback policy.

Interface B — Admin Dashboard (/admin)

  • Access control: grant/revoke user access (simulated).
  • Fallback Logic Router: choose how "I don't know" is handled — Block readiness, Apply global default + flag risk, or Route to Needs Review.
  • System defaults: hardcoded to Salesforce Service Cloud, 10 standard regions, Jira auto-update disabled.
  • Audit log: past generation sessions (live sessions are recorded from the PO workspace).

Getting started

npm install
cp .env.example .env.local   # then paste your PwC GenAI proxy key
npm run dev

Open http://localhost:3000.

No key? ReqAlign still runs. When the proxy key is absent, it transparently falls back to a built-in deterministic engine (lib/fallbackEngine.js) that mirrors the same JSON contract — so you can demo the full flow offline.


Environment variables (.env.local)

Variable Purpose
ANTHROPIC_API_KEY Your PwC GenAI shared-service proxy key
ANTHROPIC_BASE_URL Proxy base URL (default https://genai-sharedservice-americas.pwc.com)
ANTHROPIC_MODEL_ID Model id exposed by the proxy (default claude-haiku-4-5)
ANTHROPIC_AUTH_HEADER Optional — non-standard auth header name if the gateway needs one (blank = standard x-api-key)

The key is read server-side only inside the route handler — never exposed to the browser. The Anthropic SDK appends /v1/messages to ANTHROPIC_BASE_URL.


Project structure

app/
  layout.jsx            Root layout + Inter font + global styles
  page.jsx              Landing page (links to both workspaces)
  globals.css           Tailwind layers + white/black/orange theme
  api/chat/route.js     Route Handler — LLM orchestration + guardrails
  po/chat/page.jsx      PO step-by-step interview + blueprint
  admin/page.jsx        Admin control panel
components/
  Logo.jsx
  Markdown.jsx          Dependency-free markdown renderer
  BlueprintView.jsx     Structured blueprint display + copy-as-markdown
lib/
  schema.js             Requirements pillars + dual-state engine
  config.js             System defaults, 10 regions, fallback options
  prompts.js            LLM guardrails / prompts for Haiku 4.5
  llm.js                Anthropic SDK client (PwC GenAI proxy)
  fallbackEngine.js     Deterministic offline engine

Design system

Strict three-color palette — White background, Charcoal/Black (zinc-900) text, Vibrant Orange (#FF6B00) accents. Bright, premium, corporate-clean. No dark mode.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages