Prompt file imported from happelfeldt/asd (
.github/prompts/add-ai-generation.prompt.md). Copyright stays with the author.
Add AI generation mode to the HLD/SDD generator
You are helping me extend this local PoC.
Goal
Add support for AI-assisted generation of HLD and SDD Markdown while preserving the evidence-first design.
Desired behavior
Add a CLI option:
--generation-mode template
--generation-mode ai
--generation-mode hybrid
Where:
templatekeeps deterministic behavior.aigenerates HLD/SDD Markdown using an AI call.hybridkeeps evidence-first flow and asks AI to write the document content from accepted evidence.
AI integration
Use an OpenAI-compatible HTTP endpoint configured with environment variables:
DESIGNDOC_LLM_BASE_URL
DESIGNDOC_LLM_API_KEY
DESIGNDOC_LLM_MODEL
Example request path:
{DESIGNDOC_LLM_BASE_URL}/chat/completions
Critical rules
The AI must only receive:
evidence/accepted-evidence.jsonevidence/source-traceability.mdevidence/review-required.mdevidence/conflicts.mdconfig/document-types.json- existing HLD/SDD Markdown if provided
The AI must not receive the raw repository as unrestricted context.