chore: 更新项目文档和工具状态

- 更新 AGENTS.md 项目知识库文档(多目录)
- 添加 docs/analyst.md 产品分析文档
- 添加 .omc/ 工具状态和会话记录
- 添加 .sisyphus/ 计划文档
- 添加 project-structure.txt 项目结构
- 删除 timeline 测试截图
This commit is contained in:
2026-02-20 21:48:05 +08:00
parent eb797450b5
commit 6cb4545a17
28 changed files with 1379 additions and 5 deletions
+47
View File
@@ -0,0 +1,47 @@
# src/ - Source Code
<!-- Parent: ../AGENTS.md -->
## OVERVIEW
Application source code organized by Next.js 15 App Router conventions with internationalization support.
## STRUCTURE
```
src/
├── app/ # Next.js App Router (pages + API)
├── components/ # React components (neo-brutalism design)
├── hooks/ # Server-side data fetching (NOT React hooks)
├── lib/ # Utilities, validation, Prisma client
├── i18n/ # next-intl configuration
├── messages/ # Translation files (zh.json, en.json)
└── middleware.ts # Locale detection & routing
```
## KEY DIRECTORIES
| Directory | Purpose | See |
|-----------|---------|-----|
| `app/` | App Router pages & API routes | `app/AGENTS.md` |
| `components/` | UI components by domain | `components/AGENTS.md` |
| `hooks/` | Server data fetching functions | `hooks/AGENTS.md` |
| `lib/` | Core utilities & validation | `lib/AGENTS.md` |
## FOR AI AGENTS
### When Adding New Features
1. **Pages**: Add to `app/[locale]/` following locale pattern
2. **API**: Add to `app/api/` with Zod validation
3. **Components**: Add to appropriate domain folder
4. **Translations**: Update BOTH `zh.json` AND `en.json`
### Common Patterns
- **Locale routing**: `middleware.ts` handles locale detection
- **Data fetching**: Use functions from `hooks/` in Server Components
- **Validation**: All schemas in `lib/validations.ts`
- **Styling**: Neo-brutalism with Tailwind (see `components/AGENTS.md`)
<!-- MANUAL: Additional notes can be added below -->
+20 -2
View File
@@ -1,16 +1,34 @@
# src/app/ - App Router Implementation
<!-- Parent: ../AGENTS.md -->
## OVERVIEW
Next.js 15 App Router with next-intl locale routing and multilingual project discovery platform
## STRUCTURE
- `[locale]/` - Locale-scoped routes (zh/en), home, projects, keyword-cloud
- `api/` - API endpoints (webhook, discovery, keyword-cloud, search)
- `[locale]/` - Locale-scoped routes (zh/en), home, projects, keyword-cloud, timeline
- `api/` - API endpoints (webhook, discovery, keyword-cloud, search, events, tags)
- `globals.css` - Tailwind + neo-brutalism styles
- `layout.tsx` - Root layout
## KEY FILES
| File | Purpose |
|------|---------|
| `[locale]/page.tsx` | Home page |
| `[locale]/projects/page.tsx` | Project listing |
| `[locale]/projects/[id]/page.tsx` | Project detail (ISR 5min) |
| `[locale]/keyword-cloud/page.tsx` | Quarterly keyword cloud |
| `[locale]/timeline/page.tsx` | AI historical events timeline |
| `api/webhook/projects/route.ts` | Project ingestion webhook |
| `api/discovery/tasks/route.ts` | Discovery task CRUD |
| `api/search/ai/route.ts` | AI-powered RAG search |
| `api/events/route.ts` | AI Timeline events API |
| `api/tags/route.ts` | Tags CRUD |
| `api/tags/maintenance/route.ts` | Tag cleanup (n8n integration) |
## WHERE TO LOOK
- **Locale routing**: `src/middleware.ts`, `src/app/[locale]/layout.tsx`
+3 -1
View File
@@ -1,4 +1,6 @@
# Component System Architecture
# src/components/ - Component System
<!-- Parent: ../AGENTS.md -->
## Neo-Brutalism Design Principles
+2
View File
@@ -1,5 +1,7 @@
# src/hooks/ - Server-Side Data Fetching
<!-- Parent: ../AGENTS.md -->
**Purpose**: Server-side data fetching functions (NOT React hooks). Exported functions for use in Server Components and API routes.
## Architecture
+2
View File
@@ -1,5 +1,7 @@
# src/lib/ - Core Utilities
<!-- Parent: ../AGENTS.md -->
## Overview
Shared utilities and infrastructure layers used across the application.