The Evolution of Engineering Specs
Blueprint generation errors now propagate from the server with their actual message instead of being swallowed by Next.js production error sanitization. The error displayed to the user now shows what actually went wrong.
Image attachments from the project creation form are now passed to the blueprint engine and included as multimodal content in the AI prompt.
Draft is no longer cleared on submit — it's cleared only after generation succeeds, so a failed generation doesn't lose the user's input.
Blueprint retry loop now appends a correction hint message instead of repeating the identical prompt, giving the model a chance to recover from deterministic parse failures.
Draft localStorage save is now skipped after form submit, preventing the useEffect from re-writing the draft that was just cleared.
Attachment removal now uses the map index instead of indexOf(), avoiding incorrect removal when object identities change across renders.
localStorage errors in the draft persistence effect are now logged instead of silently swallowed.
Unsafe string React keys (AI-generated, potentially non-unique) replaced with stable array indices in RoadmapTab and RequirementsTab.
Corrupted localStorage data is now cleared on parse failure instead of leaving the app stuck on every reload.
Removed unused onUpdate prop from MainEditor — the tab components manage their own state updates.
Replaced Editor.js with Tiptap (ProseMirror) for all rich-text modals. New editor includes a functional toolbar (H1–H4, bold, italic, inline code, lists, blockquote, code block) and full markdown round-tripping via @tiptap/markdown.
Removed 7 @editorjs/* packages, lib/editorjs-markdown.ts, and ~80 lines of Editor.js-specific CSS. Added @tiptap/react, @tiptap/starter-kit, @tiptap/markdown, @tiptap/extension-placeholder, and @tiptap/extension-link.
RoadmapTab: removed non-null assertion on spec.quickStart spread (added early-return guard in callback). Changed array-index keys to stable values: ph.title for roadmap phases, item for ph.items/ms.checklist strings, String(ms.sprint) for milestones, reqId for ms.deliveredReqs, risk.risk for risks, p.title for codingAgentPrompts. Added biome-ignore for editable items list in PhaseForm. Replaced <label> with <p> in Label component.
StructureTab: Changed array-index keys to stable values: route.path for routes, tech.label for static tech stack cards, s for services chips, col for table columns, id for comp.satisfies chips, c for constraints, a for assumptions. Added biome-ignore for editable lists in TechStackForm (services), TableForm (columns), and ComponentForm (satisfies). Replaced <label> with <p> in Label component.
Removed non-null assertions on spec.mvpScope spreads (now constructs mvpScope object explicitly with optional-chaining fallbacks). Changed array-index keys to stable string keys: user, item, feat.name, step, assumption in BlueprintTab; nfr.category in RequirementsTab. Replaced <label> with <p> in BlueprintTab Field component (visual heading, no associated control). Added htmlFor/id pairs to all five label+control pairs in RequirementsTab (req-title, req-logic, req-priority, nfr-category, nfr-requirement).
Replaced <img> with Next.js <Image fill> in PreviewAttachment. Added role='region' to the drag-drop container div. Changed suggestedActions key from array index to suggestedAction.title; removed index from uploadQueue key. Wrapped adjustHeight and uploadFile in useCallback to stabilize hook dependencies. Replaced all noExplicitAny occurrences: input typed as Record<string, unknown> in geminiService runModel; reqsJson/archJson parameters typed as unknown in generateTechnicalArchitecture and generateRoadmap; catch blocks in ProjectContext changed to error: unknown with instanceof Error guards; LocalStorage migration map callbacks typed as Record<string, unknown> and unknown.
Replaced useState<any> with useState<PricingModel | null> in BusinessView and exported PricingModel type from types.ts. Replaced all array-index keys with stable identity keys (model.name, plan, item, step.title, item.label, step.step, h.timestamp) across BusinessView.tsx and MainEditor.tsx. Removed unused onUpdate parameter from MainEditor destructuring.
copyToClipboard in RoadmapTab was fire-and-forget with no catch. It is now async/await with a destructive toast on failure, matching the error-handling pattern already in MainEditor.
spec.assumptions was generated by the AI and stored in ProjectSpec but never rendered. The Assumptions section is now displayed in the Structure tab below Constraints, with editable cards and a ? badge, matching the existing section style.
Revision history now captures every change: initial AI generation, manual edits, and AI refinements — each with type, timestamp, and displayed metadata in the history panel.
Added Missing Assumptions section to the Blueprint tab, surfacing all AI-flagged assumptions from the generated spec.
Markdown export now includes '## App Summary' heading and '## Missing Assumptions' section, and uses '# {title} Blueprint' as the document title.
Removed PDF and DOCX export from Phase 1. Share dropdown now only exposes Copy Markdown.
Error handling hardened: localStorage save failure shows a toast, clipboard copy is properly awaited with a failure toast on error, and alert() calls replaced with the global error system.
Blueprint engine now retries once on malformed AI responses and uses a verified free-tier model ID (meta-llama/llama-3.1-8b-instruct:free).
Implemented 3-stage chained technical generation (Parser -> Architect -> Roadmap) ensuring rigid schema alignment.
Granular real-time progress tracking mapped to 7 AI drivers and 22 descriptive loading states.
Evolution of ProjectSpec to include structured TechStack objects, Database Tables, and Component maps.
Added 'View Blueprint' for monetization models including plans, implementation Do's, and Pitfalls.
Global version synchronization across Landing and Editor via shared data source.
Enhanced Dark Mode contrast for all business logic cards and hook explanations.
Migrated from direct Gemini API to Replicate for google/gemini-3-pro model.
Enabled Reasoning/Thinking support with configurable thinking levels (default: low).
Updated environment variable configuration to use REPLICATE_API_TOKEN.
Updated UI components to fully utilize theme-aware styling. Replaced hardcoded color classes with Tailwind theme variables (e.g., bg-card, text-muted-foreground) to ensure consistency across Light and Dark modes.
Minor adjustments to DOCX generation spacing.
Integrated next-themes for seamless light/dark mode management.
Added ModeToggle component to switch themes.
Modified globals.css and component classes to use CSS custom properties (bg-background, text-foreground) for dynamic theming.
Wrapped application layout with ThemeProvider.
Added support for downloading project specifications as PDF (via @react-pdf/renderer) and DOCX (via docx).
Implemented ProjectPDF component and docx-generator utility.
Added support for file and image attachments in AI generation and refinement prompts.
Enabled drag-and-drop and paste functionality for uploads in the landing and editor views.
Modified server actions and Gemini service to process multimodal inputs.
ProjectSpec schema now includes an optional attachments array.
Upgraded to Next.js v16.1.1 and React 19 (implied via Next 16 deps).
Upgraded to Tailwind CSS v4.1.18 and migrated globals.css to the new @theme configuration syntax.
Migrated generic components to shadcn/ui primitives (Button, Card, Dialog, ScrollArea, Tabs, Toast).
Replaced custom icons with lucide-react.
Integrated shadcn/ui library structure and utility functions (cn merger).
Added tailwindcss-animate and configured tailwind.config.js with extended colors, border radius, and animation plugins.
Refactored multimodal-ai-chat-input and other core components to use the new UI primitives.
Complete migration from Vite to Next.js (App Router).
Established file-system based routing and layout structure.
Added Server Actions for project context and data handling.
Removed Vite configuration files (vite.config.ts, index.html) and legacy entry points.
Integrated Gemini CLI for GitHub Workflows.
Added automated actions for code review, issue triage, and scheduled maintenance.
Configured Tailwind CSS and updated Vite settings for better source mapping.
Improved geminiService.ts to isolate AI client instances.
General dependency updates and removal of unused server configs.
Initialized SpecForge project structure with React, TypeScript, and Vite.
Implemented client-side routing using the History API.
Set up Zod schemas for project specifications.