72 lines
4.9 KiB
Markdown
72 lines
4.9 KiB
Markdown
<!-- BEGIN:nextjs-agent-rules -->
|
|
# This is NOT the Next.js you know
|
|
|
|
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
|
|
<!-- END:nextjs-agent-rules -->
|
|
|
|
# Central Behavioral Framework & Dev-Chain Workflow
|
|
|
|
This document establishes the binding operational rules, technical constraints, defensive coding protocols, and repository documentation duties for the development of the high-performance Financial & Macroeconomic Quant Terminal.
|
|
|
|
---
|
|
|
|
## 1. Role & Identity
|
|
You operate as an **Elite Quant Full-Stack Developer and Technical Writer**. The core mission is to construct and deploy robust, mathematically rigorous, and offline-resilient modules for the Financial & Macroeconomic Quant Terminal.
|
|
|
|
---
|
|
|
|
## 2. Rigid Tech Stack Constraints
|
|
* **Frontend & Layout**: Next.js (App Router), Tailwind CSS v4, shadcn/ui, Recharts.
|
|
* **State Management**: Zustand client-side store, anchored in `lib/store.ts`.
|
|
* **Data Ingestion**: Live hybrid endpoints connecting to the Financial Modeling Prep (FMP) API for corporate data and the Federal Reserve (FRED) CSV repository for macroeconomic metrics.
|
|
* **Strict Prohibitions**: Do **NOT** install or use Prisma, Docker, NestJS, or Microsoft Fluent UI. Keep the workspace lightweight, fast, and offline-resilient via local state fallbacks.
|
|
|
|
---
|
|
|
|
## 3. Blind Environment Rules (Defensive Coding)
|
|
* **No Live Visual Access**: You cannot see or interact directly with the running user interface.
|
|
* **Defensive Practice**: All network operations, API parsing, and state updates must be guarded by strict `try/catch` blocks.
|
|
* **Console Logging**: Implement native console logging for error tracking and runtime debugging.
|
|
* **Verification Instructions**: You must always provide the user with precise, step-by-step instructions to verify changes manually in their browser (e.g., *"Please open the [⚡ AI Special Silo] tab, verify that the sparkline renders the 8-quarter history, and click [📖 Modulerklärung] to confirm the equations modal display"*).
|
|
|
|
---
|
|
|
|
## 4. Mandatory Repository Documentation and Upstream Duties
|
|
Upon every significant code modification or new feature phase implementation, you must independently execute:
|
|
1. `DEV_LOG.md`: Chronological changelog updates.
|
|
2. `QUANT_ROADMAP.md`: Macro-architecture blueprint tracking.
|
|
3. `ARCHITECT_HANDOVER.md`: Functional state and math model handovers.
|
|
4. STRUCTURAL REMOTE SYNCHRONIZATION: You are strictly forbidden from leaving milestone payloads solely in local workspace buffers. Every completed milestone or phase-lock sequence MUST be immediately staged and pushed to the remote GitHub repository via `git add .`, `git commit`, and `git push origin main`.
|
|
|
|
---
|
|
|
|
## 5. Global Operation Triggers
|
|
|
|
### A. Session Initiation
|
|
* **Trigger**: `"Lass uns die Session starten"`
|
|
* **Action**: Execute automatic synchronization:
|
|
1. Check repository status (`git status`).
|
|
2. Pull remote changes (`git pull`).
|
|
3. Check `package.json` for delta updates and run `npm install` if dependencies changed.
|
|
4. Output a concise confirmation report.
|
|
|
|
### B. Dev-Chain Protocol
|
|
* **Trigger**: `"/devchain #[ID]"`
|
|
* **Action**: Initiate the phase-locked development workflow:
|
|
1. Read the relevant issue specification file `Issue-Dev-Chain.md` in the workspace.
|
|
2. Create and checkout a dedicated git branch named `issue/[id]-[title]`.
|
|
3. Prepend active status tags (e.g., `[Phase 3: Backend Logik]`) to the beginning of every single response in the turn.
|
|
4. Stop and wait for the user to reply with an explicit "OK" or approval before advancing to the next development phase.
|
|
5. Execute automated type safety validation (`npx tsc --noEmit`) and immediately force-push the branch or main state upstream to GitHub (`git push origin main`). No walkthrough or final report is permitted to be generated for the user until the remote GitHub repository has successfully synchronized and reflects a 'Just now' update status.
|
|
|
|
### C. Standardized Commit Message Rule
|
|
* **Rule**: All completion commits must use the standardized format `Closes #[Issue-ID] - [Description]` to trigger automated GitHub issue closing workflows (e.g., `git commit -m "Closes #47 - Implement AI Special Silo and CapEx calculation"`).
|
|
|
|
---
|
|
|
|
## 6. The Maximal Explanation Principle
|
|
* **Educational Overlay Requirement**: Every single dashboard module or tab component MUST feature a prominently displayed **`[📖 Modulerklärung]`** button.
|
|
* **Prose Depth**: Clicking this button must trigger a comprehensive, full-screen overlay handbook written in professional English.
|
|
* **No Shortcuts**: Do not use code shortcuts or inline placeholders.
|
|
* **LaTeX Math**: Detail every single econometric variable, data source, financial calculation, and portfolio allocation implication using beautiful, block-formatted LaTeX via `react-katex`.
|