AI-Assisted Development
LightningAddon includes structured context for AI coding assistants in the ai/ directory. Attach these files to your AI sessions to improve accuracy and keep generated code consistent with the architecture.
Directory Structure
ai/
├── contexts/ # Codebase summaries and architectural context
├── prompts/ # Reusable prompt templates for common tasks
├── rules/ # Project-specific coding rules and conventions
└── tasks/ # Step-by-step task guides for workflows
Contexts
- monorepo-context.md — High-level overview: entrypoints, core packages, shared domains
- package-template.md — Pattern for creating new packages
Attach context files when asking the AI to modify or extend the codebase. They reduce hallucinations about project structure.
Prompts
- add-feature.md — Template for adding a new feature
- fix-bug.md — Template for debugging and fixes
Use these as starting points when prompting an AI assistant. Customize them for your specific task.
Rules
- global.md — Project-wide conventions
- frontend.md — Frontend-specific rules (React, styling, etc.)
Rules help the AI follow existing patterns—naming, file layout, import style.
Tasks
- add-module-checklist.md — Checklist for adding a new domain/module
- release-checklist.md — Pre-release verification steps
Use task files when the AI is helping with multi-step workflows.
Best Practices
- Attach contexts first — Before asking about architecture or adding features, attach the relevant context file.
- Reference specific files — Point the AI to actual source files (e.g.
packages/core/src/runtime.ts) for precise edits. - Use the Architecture docs — The Architecture Overview and related docs mirror what the AI contexts describe; both stay in sync.
Complementing docs/product
The docs/product/ directory holds human-readable planning artifacts: phased roadmap, go-to-market strategy, release policy. These are for planning; the ai/ directory is for execution—giving the AI enough context to generate correct code.