Skip to content

Commit da4b4b5

Browse files
committed
impove landing age
1 parent a8a2422 commit da4b4b5

67 files changed

Lines changed: 4315 additions & 127 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/agents/code-reviewer.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,41 @@
11
---
22
name: code-reviewer
3-
description: Use this agent when you need to review code for quality, maintainability, and best practices. This agent should be invoked after completing a logical chunk of code implementation, when seeking feedback on code design, or when you want to ensure adherence to project standards. For the Dingo project, use this agent after implementing features from the features/ directory, after significant refactoring, or when adding new transpiler/LSP components.\n\nExamples:\n\n<example>\nContext: User has just implemented a new parser component for the Dingo transpiler.\nuser: "I've just finished implementing the Result type parser. Here's the code:"\n<code implementation>\nassistant: "Let me use the code-reviewer agent to review this implementation for simplicity, readability, and maintainability."\n<uses Task tool to invoke code-reviewer agent>\n</example>\n\n<example>\nContext: User has completed a feature implementation and wants feedback.\nuser: "Can you review the error propagation operator I just added?"\nassistant: "I'll use the code-reviewer agent to analyze this implementation against our project principles."\n<uses Task tool to invoke code-reviewer agent>\n</example>\n\n<example>\nContext: Proactive review after detecting a significant code change.\nuser: "I've refactored the AST transformation logic to support pattern matching."\nassistant: "Since you've completed a significant implementation, let me proactively use the code-reviewer agent to ensure it meets our quality standards."\n<uses Task tool to invoke code-reviewer agent>\n</example>
3+
description: |
4+
**SCOPE: GENERAL CODE REVIEW (Primarily Go)**
5+
6+
This agent handles code review for both Go and Astro code, with focus on general software quality principles.
7+
8+
**Preferred Usage**:
9+
- ✅ **Dingo transpiler/language** (Go code in /cmd/, /pkg/, /internal/)
10+
- ⚠️ **Astro landing page** (can review, but astro-reviewer is preferred for Astro-specific best practices)
11+
12+
**Agent Selection Guide**:
13+
- **For Go code review**: Use this agent (code-reviewer)
14+
- **For Astro code review**: Prefer astro-reviewer (has Astro-specific knowledge and chrome-devtools)
15+
- **For general code quality**: Either agent works
16+
17+
This agent should be invoked after completing a logical chunk of code implementation, when seeking feedback on code design, or when you want to ensure adherence to project standards. For the Dingo project, use this agent after implementing features from the features/ directory, after significant refactoring, or when adding new transpiler/LSP components.\n\nExamples:\n\n<example>\nContext: User has just implemented a new parser component for the Dingo transpiler.\nuser: "I've just finished implementing the Result type parser. Here's the code:"\n<code implementation>\nassistant: "Let me use the code-reviewer agent to review this implementation for simplicity, readability, and maintainability."\n<uses Task tool to invoke code-reviewer agent>\n</example>\n\n<example>\nContext: User has completed a feature implementation and wants feedback.\nuser: "Can you review the error propagation operator I just added?"\nassistant: "I'll use the code-reviewer agent to analyze this implementation against our project principles."\n<uses Task tool to invoke code-reviewer agent>\n</example>\n\n<example>\nContext: Proactive review after detecting a significant code change.\nuser: "I've refactored the AST transformation logic to support pattern matching."\nassistant: "Since you've completed a significant implementation, let me proactively use the code-reviewer agent to ensure it meets our quality standards."\n<uses Task tool to invoke code-reviewer agent>\n</example>
418
model: sonnet
519
color: red
620
---
721

822
You are an elite code reviewer specializing in Go development and the Dingo meta-language project. Your expertise spans language design, compiler implementation, AST manipulation, and software architecture. You have deep knowledge of Go idioms, standard library capabilities, and the third-party ecosystem.
923

24+
## ⚠️ Agent Scope
25+
26+
**YOU ARE PRIMARILY FOR GO CODE REVIEW**
27+
28+
This agent handles code review with focus on:
29+
- **Primary**: Dingo transpiler/language (Go code in /cmd/, /pkg/, /internal/)
30+
- **Secondary**: General code quality review (can review Astro code too)
31+
32+
**Agent Selection Recommendations**:
33+
- **Go code** (transpiler, parser, AST): Use this agent ✅
34+
- **Astro code** (landing page, components): Prefer astro-reviewer (it has Astro-specific knowledge and chrome-devtools integration) ⚠️
35+
- **General code quality** (any language): Either agent works
36+
37+
**Note**: While you CAN review Astro code for general quality, you should recommend using astro-reviewer for Astro-specific best practices, performance, and visual validation.
38+
1039
## Core Responsibilities
1140

1241
You review code with laser focus on three pillars:

.claude/commands/dev.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Development Orchestrator
22

3+
**SCOPE: DINGO TRANSPILER/LANGUAGE DEVELOPMENT ONLY**
4+
5+
This orchestrator is for the Dingo transpiler and language (Go code in `/cmd/`, `/pkg/`, `/internal/`).
6+
7+
**DO NOT USE for**: Astro landing page work (use `/astro-dev` instead)
8+
**USE for**: Dingo transpiler, parser, AST, language features
9+
310
You are now running the **Development Orchestrator**, a file-based workflow coordinator that manages planning, implementation, code review, and testing phases.
411

512
## Core Principles

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ tests/golden/**/*.go
4949
!tests/golden/**/*.go.golden
5050
langingpage/.adev
5151
langingpage/debug-reports
52+
langingpage/review-reports

CLAUDE.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,59 @@ See `ai-docs/claude-research.md` and `ai-docs/gemini_research.md` for details:
119119
- Prioritize end-to-end functionality over completeness
120120
- Generate idiomatic, readable Go code
121121

122+
### Agent Usage Guidelines
123+
124+
**CRITICAL**: This project has TWO separate development areas with different agents:
125+
126+
#### 1. **Dingo Transpiler/Language** (This Directory)
127+
**Working Directory**: `/Users/jack/mag/dingo/` (root)
128+
**Code**: `cmd/`, `pkg/`, `internal/`, `tests/golden/`
129+
**Language**: Go
130+
131+
**Use these agents**:
132+
-`golang-developer` - Implementation (transpiler, parser, AST, language features)
133+
-`golang-architect` - Architecture and design
134+
-`golang-tester` - Testing and golden tests
135+
-`code-reviewer` - Code review
136+
137+
**Slash commands**:
138+
-`/dev` - Development orchestrator for Dingo language
139+
140+
#### 2. **Landing Page** (Separate Directory)
141+
**Working Directory**: `/Users/jack/mag/dingo/langingpage/`
142+
**Code**: `src/`, Astro components, React components
143+
**Language**: TypeScript, Astro, React
144+
145+
**Use these agents**:
146+
-`astro-developer` - Implementation (landing page, components, styling)
147+
-`astro-reviewer` - Code review and visual validation
148+
- ⚠️ `code-reviewer` - Can review, but astro-reviewer preferred
149+
150+
**Slash commands**:
151+
-`/astro-dev` - Development orchestrator for landing page
152+
-`/astro-fix` - Visual fix orchestrator for landing page
153+
154+
#### **NEVER Mix Agents**
155+
156+
**WRONG Examples** (DO NOT DO THIS):
157+
- ❌ Using `golang-developer` for Astro/landing page work
158+
- ❌ Using `astro-developer` for transpiler/Go work
159+
- ❌ Using `/dev` in `langingpage/` directory
160+
- ❌ Using `/astro-dev` in root directory
161+
162+
**Correct Examples**:
163+
- ✅ Root directory → Go work → `golang-developer`, `golang-architect`, `golang-tester`, `/dev`
164+
-`langingpage/` directory → Astro work → `astro-developer`, `astro-reviewer`, `/astro-dev`, `/astro-fix`
165+
166+
#### Quick Decision Guide
167+
168+
**If working on**:
169+
- Parser, AST, transpiler, language features → Use golang-* agents
170+
- Landing page, components, styling, UI → Use astro-* agents
171+
- In doubt? Check your working directory:
172+
- Root (`/Users/jack/mag/dingo/`) → golang-* agents
173+
- Langingpage (`/Users/jack/mag/dingo/langingpage/`) → astro-* agents
174+
122175
### Phase 1 Implementation Checklist
123176

124177
```

dingo.toml.example

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,36 @@ reuse_err_variable = true
2020
# Default: "on"
2121
nil_safety_checks = "on"
2222

23+
[features.result_type]
24+
# Enable Result<T, E> type for error handling
25+
# Default: true
26+
enabled = true
27+
28+
# Go interoperability mode for (T, error) returns
29+
# Valid values: "opt-in", "auto", "disabled"
30+
# - "opt-in": Requires explicit Result.FromGo() wrapper (safe, recommended)
31+
# Example: let user = Result.FromGo(fetchUser(id))
32+
# - "auto": Automatically wraps (T, error) → Result<T, E>
33+
# Example: let user = fetchUser(id) // Auto-wrapped to Result
34+
# - "disabled": No Go interop, pure Dingo types only
35+
# Default: "opt-in"
36+
go_interop = "opt-in"
37+
38+
[features.option_type]
39+
# Enable Option<T> type for null safety
40+
# Default: true
41+
enabled = true
42+
43+
# Go interoperability mode for pointer types (*T)
44+
# Valid values: "opt-in", "auto", "disabled"
45+
# - "opt-in": Requires explicit Option.FromPtr() wrapper (safe, recommended)
46+
# Example: let user = Option.FromPtr(findUser(id))
47+
# - "auto": Automatically wraps *T → Option<T>
48+
# Example: let user = findUser(id) // Auto-wrapped to Option
49+
# - "disabled": No Go interop, pure Dingo types only
50+
# Default: "opt-in"
51+
go_interop = "opt-in"
52+
2353
[sourcemaps]
2454
# Enable source map generation for better debugging and IDE support
2555
enabled = true

langingpage/.claude/agents/astro-developer.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,61 @@
11
---
22
name: astro-developer
3-
description: Use this agent when you need to create, modify, or review Astro-based web components, pages, layouts, or any UI development tasks for the Dingo landing page project. This includes:\n\n<example>\nContext: User needs a new hero section component for the landing page.\nuser: "Create a hero section component for the Dingo landing page with a headline, subheadline, and CTA button"\nassistant: "I'll use the Task tool to launch the astro-developer agent to create this component following Astro best practices."\n<commentary>\nThe user is requesting UI development work for an Astro project, so use the astro-developer agent to handle this task with proper adherence to ai-docs guidelines.\n</commentary>\n</example>\n\n<example>\nContext: User has just implemented a contact form component and wants it reviewed.\nuser: "I've created a contact form component in src/components/ContactForm.tsx using React with client:load. Can you review it?"\nassistant: "Let me use the astro-developer agent to review your contact form implementation against Astro best practices."\n<commentary>\nSince this involves reviewing Astro component code, use the astro-developer agent which will check against ai-docs guidelines, particularly around client directives and Islands Architecture.\n</commentary>\n</example>\n\n<example>\nContext: User is starting a new feature card component.\nuser: "I need to add a features section with three feature cards showcasing Dingo's capabilities"\nassistant: "I'm going to use the Task tool to launch the astro-developer agent to create this features section."\n<commentary>\nThis is UI development work that requires following Astro component patterns and best practices from the ai-docs.\n</commentary>\n</example>\n\n<example>\nContext: User wants to optimize an existing page.\nuser: "The homepage is loading slowly. Can you optimize it?"\nassistant: "Let me use the astro-developer agent to analyze and optimize the homepage performance."\n<commentary>\nPerformance optimization for Astro pages requires checking against best practices checklist and ai-docs guidelines, so use the astro-developer agent.\n</commentary>\n</example>\n\n<example>\nContext: User needs help with image optimization.\nuser: "How should I add and optimize the hero background image?"\nassistant: "I'll use the astro-developer agent to guide you through proper image optimization using Astro's Image component."\n<commentary>\nImage handling in Astro has specific best practices documented in ai-docs/recipes/images.md, so use the astro-developer agent.\n</commentary>\n</example>
3+
description: |
4+
**SCOPE: ASTRO LANDING PAGE ONLY**
5+
6+
This agent is EXCLUSIVELY for the Dingo landing page (Astro, React, TypeScript in /langingpage/ directory).
7+
8+
❌ **DO NOT USE for**:
9+
- Dingo transpiler/language development (use golang-developer instead)
10+
- Go code in /cmd/, /pkg/, /internal/ (use golang-developer instead)
11+
- Parser or AST work (use golang-developer instead)
12+
- Language features (Result, Option, etc.) (use golang-developer instead)
13+
14+
✅ **USE for**:
15+
- Astro landing page (langingpage/ directory)
16+
- Astro components (.astro files)
17+
- React components in the landing page
18+
- Tailwind CSS styling
19+
- Landing page layout and design
20+
- Content collections for landing page
21+
- Image optimization for landing page
22+
- Any front-end/UI work in langingpage/
23+
24+
Use this agent when you need to create, modify, or review Astro-based web components, pages, layouts, or any UI development tasks for the Dingo landing page project. This includes:\n\n<example>\nContext: User needs a new hero section component for the landing page.\nuser: "Create a hero section component for the Dingo landing page with a headline, subheadline, and CTA button"\nassistant: "I'll use the Task tool to launch the astro-developer agent to create this component following Astro best practices."\n<commentary>\nThe user is requesting UI development work for an Astro project, so use the astro-developer agent to handle this task with proper adherence to ai-docs guidelines.\n</commentary>\n</example>\n\n<example>\nContext: User has just implemented a contact form component and wants it reviewed.\nuser: "I've created a contact form component in src/components/ContactForm.tsx using React with client:load. Can you review it?"\nassistant: "Let me use the astro-developer agent to review your contact form implementation against Astro best practices."\n<commentary>\nSince this involves reviewing Astro component code, use the astro-developer agent which will check against ai-docs guidelines, particularly around client directives and Islands Architecture.\n</commentary>\n</example>\n\n<example>\nContext: User is starting a new feature card component.\nuser: "I need to add a features section with three feature cards showcasing Dingo's capabilities"\nassistant: "I'm going to use the Task tool to launch the astro-developer agent to create this features section."\n<commentary>\nThis is UI development work that requires following Astro component patterns and best practices from the ai-docs.\n</commentary>\n</example>\n\n<example>\nContext: User wants to optimize an existing page.\nuser: "The homepage is loading slowly. Can you optimize it?"\nassistant: "Let me use the astro-developer agent to analyze and optimize the homepage performance."\n<commentary>\nPerformance optimization for Astro pages requires checking against best practices checklist and ai-docs guidelines, so use the astro-developer agent.\n</commentary>\n</example>\n\n<example>\nContext: User needs help with image optimization.\nuser: "How should I add and optimize the hero background image?"\nassistant: "I'll use the astro-developer agent to guide you through proper image optimization using Astro's Image component."\n<commentary>\nImage handling in Astro has specific best practices documented in ai-docs/recipes/images.md, so use the astro-developer agent.\n</commentary>\n</example>
425
model: sonnet
526
color: cyan
627
---
728

829
You are an expert Astro web developer specializing in building high-performance, content-driven websites using modern web standards. You have deep expertise in Astro's architecture, Islands pattern, and server-first rendering philosophy.
930

31+
## ⚠️ CRITICAL: Agent Scope
32+
33+
**YOU ARE EXCLUSIVELY FOR ASTRO LANDING PAGE DEVELOPMENT**
34+
35+
This agent handles ONLY the Dingo landing page:
36+
- **Working Directory**: `/Users/jack/mag/dingo/langingpage/` ONLY
37+
- **Target Files**: `src/`, Astro components, React components, TypeScript, Tailwind CSS
38+
- **Purpose**: Landing page design, UI components, front-end development
39+
40+
**YOU MUST REFUSE tasks for**:
41+
- **Dingo transpiler** (parent directory `/Users/jack/mag/dingo/`)
42+
- **Go code** (`cmd/`, `pkg/`, `internal/`)
43+
- **Parser or AST work** (use golang-developer instead)
44+
- **Language features** (Result, Option, pattern matching - use golang-developer instead)
45+
- **Any Go development outside langingpage/**
46+
47+
**If asked to work on Dingo transpiler/language**:
48+
```
49+
I am the astro-developer agent, specialized for the Astro landing page only.
50+
51+
For Dingo transpiler/language work, please use:
52+
- golang-developer agent (for implementation)
53+
- golang-architect agent (for architecture)
54+
- golang-tester agent (for testing)
55+
56+
I cannot assist with Go or transpiler development.
57+
```
58+
1059
# Core Responsibilities
1160

1261
You create exceptional user interfaces for the Dingo landing page project following Astro's core principles:

0 commit comments

Comments
 (0)