Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .agent/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
Antigravity Kit is a modular system consisting of:

- **20 Specialist Agents** - Role-based AI personas
- **36 Skills** - Domain-specific knowledge modules
- **11 Workflows** - Slash command procedures
- **38 Skills** - Domain-specific knowledge modules
- **12 Workflows** - Slash command procedures

---

Expand Down Expand Up @@ -165,6 +165,9 @@ Modular knowledge domains that agents can load on-demand. based on task context.
| `i18n-localization` | Internationalization |
| `performance-profiling` | Web Vitals, optimization |
| `systematic-debugging` | Troubleshooting |
| `caveman-mode` | Terse AI response mode |
| `rust-pro` | High-perf Rust patterns |
| `intelligent-routing` | Automated agent selection |

---

Expand All @@ -185,6 +188,7 @@ Slash command procedures. Invoke with `/command`.
| `/status` | Check project status |
| `/test` | Run tests |
| `/ui-ux-pro-max` | Design with 50 styles |
| `/caveman` | Toggle Caveman Mode |

---

Expand Down Expand Up @@ -267,9 +271,9 @@ For details, see [scripts/README.md](scripts/README.md)
| Metric | Value |
| ------------------- | ----------------------------- |
| **Total Agents** | 20 |
| **Total Skills** | 36 |
| **Total Workflows** | 11 |
| **Total Scripts** | 2 (master) + 18 (skill-level) |
| **Total Skills** | 38 |
| **Total Workflows** | 12 |
| **Total Scripts** | 2 (master) + 19 (skill-level) |
| **Coverage** | ~90% web/mobile development |

---
Expand Down
11 changes: 11 additions & 0 deletions .agent/agents/frontend-specialist.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,23 @@ You are a Senior Frontend Architect who designs and builds frontend systems with
- [Quality Control Loop (Mandatory)](#quality-control-loop-mandatory)
- [Spirit Over Checklist](#-spirit-over-checklist-no-self-deception)

### Caveman Mode

- [Caveman Mode Support](#-caveman-mode-support)

---

## Your Philosophy

**Frontend is not just UI—it's system design.** Every component decision affects performance, maintainability, and user experience. You build systems that scale, not just components that work.

## 🪨 Caveman Mode Support
- If caveman mode is enabled:
- Apply caveman-mode skill rules to all responses.
- Prioritize brevity without losing technical depth.
- Else:
- Use normal response style.

## Your Mindset

When you build frontend systems, you think:
Expand Down
6 changes: 6 additions & 0 deletions .agent/agents/orchestrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ You are the master orchestrator agent. You coordinate multiple specialized agent
- [Conflict Resolution](#conflict-resolution)
- [Best Practices](#best-practices)
- [Example Orchestration](#example-orchestration)
- [Caveman Mode Handling](#-caveman-mode-handling)

---

Expand Down Expand Up @@ -370,6 +371,11 @@ I'll coordinate multiple agents for a comprehensive review:
[Combined findings and recommendations]
```

## 🪨 Caveman Mode Handling
- Detect if caveman mode is enabled at the start of each session.
- Propagate caveman mode status to all specialized agents.
- Ensure caveman rules are applied consistently across multi-agent workflows.

---

### ❌ WRONG Example (Plan Missing)
Expand Down
2 changes: 1 addition & 1 deletion .agent/agents/performance-optimizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: performance-optimizer
description: Expert in performance optimization, profiling, Core Web Vitals, and bundle optimization. Use for improving speed, reducing bundle size, and optimizing runtime performance. Triggers on performance, optimize, speed, slow, memory, cpu, benchmark, lighthouse.
tools: Read, Grep, Glob, Bash, Edit, Write
model: inherit
skills: clean-code, performance-profiling
skills: clean-code, performance-profiling, caveman-mode
---

# Performance Optimizer
Expand Down
17 changes: 17 additions & 0 deletions .agent/rules/caveman-rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: caveman-rules
description: Global rules for caveman mode to ensure consistency across all agents.
---

# Caveman Rules

## 🔧 Global Guidelines
1. **Consistency**: All agents must adhere to caveman-mode rules when enabled.
2. **User Override**: Allow users to override caveman mode with explicit instructions (e.g., "explain in detail").
3. **Technical Accuracy**: Never compromise accuracy for brevity.
4. **Fallback**: If caveman mode causes ambiguity, revert to normal mode for that response.

## 📝 Implementation Notes
- Caveman mode is session-persistent.
- Agents must check for caveman mode before generating responses.
- Log caveman mode status in debug output for transparency.
6 changes: 3 additions & 3 deletions .agent/skills/app-builder/scaffolding.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

---

## Next.js Full-Stack Structure (2025 Optimized)
## Next.js Full-Stack Structure (2026+ Next.js 16 Optimized)

```
project-name/
Expand Down Expand Up @@ -74,17 +74,17 @@ project-name/

---

## Core Files

| File | Purpose |
|------|---------|
| `proxy.ts` | Next.js 16 Network boundary logic (auth, redirects) |
| `package.json` | Dependencies |
| `tsconfig.json` | TypeScript + path aliases (`@/features/*`) |
| `tailwind.config.ts` | Tailwind config |
| `.env.example` | Environment template |
| `README.md` | Project documentation |
| `.gitignore` | Git ignore rules |
| `prisma/schema.prisma` | Database schema |
| `src/server/cache-handler.ts` | Next.js 16 Cache Components Manager |

---

Expand Down
3 changes: 2 additions & 1 deletion .agent/skills/app-builder/tech-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Frontend:
language: TypeScript 5.7+
styling: Tailwind CSS v4
state: React 19 Actions / Server Components
bundler: Turbopack (Stable for Dev)
caching: Next.js 16 Cache Components (Stable)
bundler: Turbopack (Stable for Dev & Build)

Backend:
runtime: Node.js 23
Expand Down
35 changes: 35 additions & 0 deletions .agent/skills/caveman-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: caveman-mode
description: Enables caveman-style terse responses to reduce token usage while maintaining technical accuracy. Triggers on "/caveman" command or when caveman mode is explicitly enabled.
tools: Read, Grep, Glob, Bash, Edit, Write
model: inherit
---

# Caveman Mode

## 🎯 Purpose
Reduce token usage by ~65% while preserving 100% technical accuracy. Inspired by the [caveman project](https://github.com/juliusbrussee/caveman).

## 🔧 Rules
1. **Drop Articles**: Remove "the," "a," "an" unless critical for clarity.
2. **Fragments Allowed**: Use sentence fragments where meaning is clear.
3. **Remove Filler Words**: Eliminate "just," "basically," "really," "very," etc.
4. **Short Synonyms**: Replace verbose phrases with shorter equivalents (e.g., "utilize" → "use").
5. **Technical Terms Unchanged**: Keep code, commands, and technical terms intact.
6. **Prioritize Clarity**: Never sacrifice accuracy for brevity.

## 📝 Examples
| Normal Response | Caveman Response |
|------------------------------------------|-------------------------------------------|
| "The function should be wrapped in a useMemo hook to avoid unnecessary re-renders." | "Wrap function in useMemo. Avoid re-renders." |
| "You need to add a guard clause to handle the case where the user is null." | "Add guard clause. Handle null user." |

## 🛠️ Implementation
- **Activation**: Toggle via `/caveman` command or explicit user request.
- **Deactivation**: Use `/caveman off` or "disable caveman mode."
- **Intensity Levels**: Support lite, full, and ultra modes (default: full).

## 📊 Benchmarking
- **Token Reduction**: Aim for 60-75% reduction.
- **Accuracy**: 100% technical accuracy retained.
- **Performance**: No impact on response generation speed.
45 changes: 45 additions & 0 deletions .agent/skills/caveman-mode/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Caveman Mode (Token-Efficient Responses)

> **Goal**: Minimize token consumption by using terse, technically accurate responses while maintaining 100% semantic clarity for technical users.

---

## 🎮 Modes & Intensity

### 1. `lite` (Moderate Compression)
- **Target**: ~40% token reduction.
- **Rules**:
- Remove conversational filler ("I think that...", "As you can see...").
- Keep essential articles if they aid legibility.
- Use short, direct sentences.

### 2. `full` (High Compression - Default)
- **Target**: ~65% token reduction.
- **Rules**:
- **Drop Articles**: Remove 'a', 'an', 'the' where possible.
- **Keyword Focus**: Priority on verbs and nouns.
- **No Subjectivity**: Omit fluff, greetings, and closings.
- **Bullet Points**: Use single-line bullet points for instructions.

### 3. `ultra` (Max Compression)
- **Target**: ~80% token reduction.
- **Rules**:
- **Telegraphic Style**: Keywords only.
- **No Connectors**: Remove 'and', 'but', 'or' if logical flow is obvious.
- **Mathematical Notation**: Use symbols (`->`, `=>`, `!`, `?`) instead of words.
- **Strict Technicality**: No explanation of basics.

---

## 🏛️ Examples

| Prompt | Mode | Response |
| :--- | :--- | :--- |
| How to fix 404 in Next.js? | `full` | Check route file path. Rename `page.js` if needed. Verify `next.config.js` rewrites. |
| Explain React State. | `ultra` | State = UI data. Update => Rerender. Persistent across cycles. Hooks: `useState`. |
| Is this SQL safe? | `lite` | No. Vulnerable to SQL injection. Use parameterized queries or ORM. |

---

## ⚠️ Integrity Rule
**NEVER** sacrifice technical accuracy for brevity. If a command or path requires exact syntax, preserve it exactly.
34 changes: 34 additions & 0 deletions .agent/skills/frontend-design/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,3 +416,37 @@ After implementing your design, run the audit:
---

> **Remember:** Design is THINKING, not copying. Every project deserves fresh consideration based on its unique context and users. **Avoid the Modern SaaS Safe Harbor!**

---

## 5. Next.js 16+ Modern Form Patterns

> [!IMPORTANT]
> For Next.js 16+ projects, use the native `next/form` component instead of standard HTML `<form>` for all GET-based search/filter operations.

### The `<Form>` Component Advantage
- **Automatic Client Navigation:** Performs client-side transitions on submit.
- **Progressive Enhancement:** Works even without JavaScript.
- **URL Sync:** Automatically encodes input values into search params.

### Implementation Example (Search Bar)
```tsx
import Form from 'next/form'

export default function SearchBar() {
return (
<Form action="/search" className="flex gap-2">
<input
name="q"
placeholder="Search products..."
className="border p-2"
/>
<button type="submit">Search</button>
</Form>
)
}
```

### When to use `<Form>` vs. standard `<form>`:
- **Use `next/form`** for: Search, Filtering, Sorting, Pagination (GET requests).
- **Use standard `<form>`** for: Mutations, Login, Data Entry (POST requests via Server Actions).
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Overview

This section contains **5 rules** focused on eliminating waterfalls.
This section contains **6 rules** focused on eliminating waterfalls, now including Next.js 16 `after()` and `connection()` patterns.

---

Expand Down Expand Up @@ -310,3 +310,42 @@ Both components share the same promise, so only one fetch occurs. Layout renders

**Trade-off:** Faster initial paint vs potential layout shift. Choose based on your UX priorities.


---

## Rule 1.6: Use `after()` and `connection()` (Next.js 16+)

**Impact:** HIGH
**Tags:** nextjs16, async, runtime, performance

Next.js 16 introduced APIs to prevent "Blocking the Main Thread" and ensure "Dynamic Runtime" awareness.

### 1. `after()` for Non-Blocking Logic
Avoid `await` on logic that doesn't affect the initial UI (logging, analytics, emails).

```tsx
import { after } from 'next/server'

export default async function Page() {
const data = await fetchData() // CRITICAL

after(() => {
// RUNS AFTER THE RESPONSE IS SENT
logTrack(data)
})

return <View data={data} />
}
```

### 2. `connection()` for Dynamic Intent
Use `connection()` to signal that a component is dynamic and should not be pre-rendered as static, allowing other parts of the page to stream independently.

```tsx
import { connection } from 'next/server'

async function DynamicData() {
await connection() // Signals dynamic intent
return await fetchFreshData()
}
```
Loading