# Technical Documentation: vudovn/antigravity-kit

> ℹ️ **Provenance:** Multi-Tier Ingestion · [CodeWiki Reference](https://codewiki.google/github.com/vudovn/antigravity-kit)

### Overview (`README.md`)

<p align="center">
  <img src="https://raw.githubusercontent.com/vudovn/ag-kit/main/web/public/images/logo.png" width="128" height="128" alt="AG Kit">
</p>

<h1 align="center">AG KIT</h1>

<p align="center">
  Antigravity-first agent engineering kit with rules, skills, specialist agents, workflows, persistent memory, MCP guidance, orchestration, and a native safety hook.
</p>

<div align="center">
  <a href="https://unikorn.vn/p/antigravity-kit?ref=unikorn" target="_blank"><img src="https://unikorn.vn/api/widgets/badge/antigravity-kit?theme=dark" alt="AG Kit on Unikorn.vn" width="210" height="54" /></a>
  <a href="https://trendshift.io/repositories/21490" target="_blank"><img src="https://trendshift.io/api/badge/repositories/21490" alt="AG Kit on Trendshift" width="250" height="55" /></a>
  <a href="https://launch.j2team.dev/products/antigravity-kit" target="_blank"><img src="https://launch.j2team.dev/badge/antigravity-kit/dark" alt="AG Kit on J2TEAM Launch" width="250" height="54" /></a>
</div>

<p align="center">
  <strong>Primary runtime: Google Antigravity</strong><br/>
  <a href="./README-VI.md">Tiếng Việt</a> · <a href="./MIGRATION.md">Migration guide</a> · <a href="./PRODUCTION_CHECKLIST.md">Production checklist</a> · <a href="./SECURITY.md">Security</a>
</p>

---

## Production profile

AG Kit installs a complete `.agents/` workspace contract. Antigravity is the supported production runtime for this release. Other tools may read the Markdown components, but runtime behavior outside Antigravity is not part of the production compatibility guarantee.

| Capability | Production implementation |
| --- | --- |
| Rules and skill discovery | `.agents/rules/`, `.agents/skills/`, `.agents/workflows/` |
| Specialist routing | 20 role definitions and intelligent-routing skills |
| Persistent context | `.agents/memory/` and context-compression guidance |
| Orchestration | `/coordinate`, `/orchestrate`, Antigravity `/agents` and `/tasks` |
| MCP | Workspace config plus explicit, backup-aware sync helper |
| Tool safety | Native `PreToolUse` gate for high-confidence destructive commands |
| Packaging | Local Antigravity plugin bundle with a SHA-256 content inventory |
| Validation | Toolkit CI, Antigravity Doctor, regression tests, Dependency Review, CLI and web checks |

The native hook is deliberately narrow. It blocks root-filesystem deletion, drive formatting, and raw-disk overwrite patterns while allowing normal project cleanup such as deleting `dist/` or `node_modules/`. It does not replace Antigravity permissions, workspace trust, sandboxing, or human approval.

## Requirements

- Node.js 22 or newer for repository-level Antigravity tooling.
- Python 3.10 or newer for AG Kit validators and utility scripts.
- A trusted Google Antigravity workspace.
- Git for safe update, review, and rollback workflows.

The published CLI currently supports Node.js 18 or newer; the Antigravity integration checks run on Node.js 22.

## Quick start

### Install into a project

```bash
npx @vudovn/ag-kit init
```

Or install the CLI globally:

```bash
npm install @vudovn/ag-kit
ag-kit init
```

Do not add `.agents/` to the project `.gitignore` when Antigravity needs to index rules, skills, or workflows. To keep it local without disabling discovery, add `.agents/` to `.git/info/exclude` instead.

### Verify the workspace

```bash
npm run check:agents
npm run check:antigravity
npm run test:antigravity
```

`check:antigravity` is read-only. The default MCP example contains `YOUR_API_KEY`, so the normal doctor reports a warning until the example is configured. Use strict mode only after all placeholders have been resolved:

```bash
node .agents/hooks/antigravity-doctor.mjs --strict
```

### Open in Antigravity

After opening the repository as a trusted workspace:

1. Confirm slash commands such as `/plan`, `/coordinate`, and `/orchestrate` are discovered.
2. Confirm relevant skills are selected from `.agents/skills/`.
3. Run a normal command such as `npm test` and confirm it is allowed.
4. Verify the safety hook with a mocked payload rather than executing a destructive command:

```bash
printf '%s' '{"tool_args":{"CommandLine":"rm -rf /"}}' \
  | node .agents/hooks/validate-tool-call.mjs
```

The command must exit non-zero and print `BLOCKED by AG Kit`.

## Safe updates and rollback

AG Kit updates are merge-aware. User-owned files and locally modified managed files are preserved by default.

```bash
ag-kit update --dry-run          # Preview the exact plan
ag-kit update                    # Merge safely and create a backup
ag-kit update --strategy replace # Explicit full replacement, still backed up
ag-kit rollback                  # Restore the newest pre-update backup
```

Update metadata is stored in `.agents/.ag-kit/`. Backups are stored in `.ag-kit-backups/` outside the managed toolkit tree. Read [MIGRATION.md](MIGRATION.md) before upgrading an existing installation to the Antigravity-native release.

## Antigravity-native integration

### Runtime contract

`.agents/antigravity.json` declares the six supported integration phases and the documented Antigravity CLI capabilities used by AG Kit. It avoids inventing a minimum semantic version when upstream documentation does not define one.

### Native safety hook

Antigravity loads `.agents/hooks.json`, which registers:

```json
{
  "enabled": true,
  "PreToolUse": [
    {
      "matcher": "run_command",
      "command": "node .agents/hooks/validate-tool-call.mjs",
      "timeout": 10
    }
  ]
}
```

To temporarily disable the AG Kit hook while diagnosing a compatibility issue, set `"enabled": false`, reopen the workspace, and report the payload shape privately if it may contain sensitive data. Do not delete Antigravity's own permission controls.

### MCP configuration

Review the workspace MCP plan without writing to the home directory:

```bash
node .agents/hooks/sync-mcp.mjs --check
node .agents/hooks/sync-mcp.mjs --print
```

After replacing placeholders, explicitly apply to one supported target:

```bash
node .agents/hooks/sync-mcp.mjs --apply --target suite
node .agents/hooks/sync-mcp.mjs --apply --target cli
```

Existing servers with the same name are preserved unless `--force` is supplied. A timestamped backup is created before an existing target file is changed. Never commit real MCP credentials.

### Build and inspect the plugin

```bash
npm run build:antigravity-plugin
```

Review `dist/antigravity-plugin/` before local installation. The bundle contains packaged skills, agents, rules, converted workflow commands, the native hook, an MCP example, and `PLUGIN_CONTENTS.json` with SHA-256 entries.

```bash
agy plugin install ./dist/antigravity-plugin
agy plugin list
```

Plugin installation is optional; the repository-native `.agents/` workspace remains the source of truth for project development.

## Included components

| Component | Count | Purpose |
| --- | ---: | --- |
| Agents | 20 | Domain specialist and orchestration role definitions |
| Skills | 47 | Progressive domain knowledge and executable validation helpers |
| Workflows | 13 | Repeatable slash-command procedures |
| Rules | 6 | Workspace-wide routing, safety, design, and coding constraints |
| Memory topics | 4 required topics plus index | Durable project conventions, decisions, preferences, and feedback |

Every agent, skill, workflow, and rule has a SemVer contract. `.agents/manifest.json`, `.agents/manifest.lock.json`, and `.agents/DEPENDENCY_GRAPH.md` make the managed toolkit reproducible and detect drift.

```bash
npm run generate:agents
npm run check:agents
```

## Common workflows

| Command | Purpose |
| --- | --- |
| `/brainstorm` | Explore options and architecture before implementation |
| `/coordinate` | Run separable research or review tasks in parallel, then synthesize |
| `/create` | Create a feature or application with structured gates |
| `/debug` | Perform evidence-based root-cause analysis |
| `/deploy` | Execute production pre-flight checks and deployment workflow |
| `/enhance` | Safely modify an existing codebase |
| `/orchestrate` | Plan, obtain approval, delegate to specialists, and verify |
| `/plan` | Create a detailed implementation plan and checklist |
| `/preview` | Manage local preview servers |
| `/remember` | Save durable project information to memory |
| `/status` | Summarize active work and blockers |
| `/test` | Design and execute tests |
| `/verify` | Prove changes by running checks instead of relying on inspection |

## Release and production gates

A release candidate is not production-approved until all automated checks and the hands-on Antigravity smoke test in [PRODUCTION_CHECKLIST.md](PRODUCTION_CHECKLIST.md) are complete.

Required GitHub checks:

- Toolkit validation
- CLI tests and package validation
- Web lint, typecheck, build, and audit
- Antigravity native contract
- Dependency Review

AG Kit never requires automatic merge, automatic deployment, or automatic MCP synchronization. Production changes should remain reviewable and reversible.

## Documentation

- [Antigravity implementation details](.agents/hooks/README.md)
- [Migration guide](MIGRATION.md)
- [Production release checklist](PRODUCTION_CHECKLIST.md)
- [Security policy and runtime threat model](SECURITY.md)
- [Agent flow architecture](AGENT_FLOW.md)
- [Toolkit architecture](.agents/ARCHITECTURE.md)
- [Changelog](CHANGELOG.md)
- [Release setup](.github/RELEASE_SETUP.md)

## References and attribution

AG Kit is an original open-source implementation of Markdown-based agent engineering patterns. No proprietary source files are included. Runtime integration decisions are based on public Antigravity documentation and codelabs linked in [.agents/hooks/README.md](.agents/hooks/README.md).

## Support the project

<p align="center">
  <a href="https://buymeacoffee.com/vudovn" target="_blank"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black" alt="Buy Me a Coffee" /></a>
</p>

<p align="center"> - or - </p>

<p align="center">
  <img src="https://img.vietqr.io/image/mbbank-0779440918-compact.jpg" alt="Buy me coffee" width="200" />
</p>

<p align="center">
  <code>CA: Gjpatn3d24dCRhUng7F37K6xJba4R8SDBC18xs1Apump</code>
</p>

## License

Released under the [MIT License](LICENSE) © [Vudovn](https://github.com/vudovn).

---

### Overview (`.agents/README.md`)

# AG Kit toolkit operator guide

AG Kit is a modular `.agents/` toolkit for Google Antigravity. It routes software-engineering work to specialist roles, progressively loads focused skills, preserves durable project context, and verifies changes with executable checks.

## Runtime contract

Antigravity is the primary production runtime. The machine-readable contract is `.agents/antigravity.json` and covers six phases:

1. rules, skills, and workflow discovery;
2. MCP configuration and explicit synchronization;
3. native lifecycle hooks and command safety;
4. agent/subagent orchestration;
5. optional plugin packaging;
6. validation and production smoke testing.

See [hooks/README.md](hooks/README.md) for the implementation and security boundaries.

## Quick start

From the project root:

```bash
npm run check:agents
npm run check:antigravity
npm run test:antigravity
```

Open the repository as a trusted Antigravity workspace. The runtime should discover:

- `rules/*.md` as workspace constraints;
- `skills/*/SKILL.md` as progressively loaded domain context;
- `workflows/*.md` as slash commands;
- `agent/*.md` as specialist role definitions;
- `memory/` as durable project context.

Use `/coordinate` for separable parallel research/review work and `/orchestrate` for plan approval followed by specialist implementation. Antigravity `/agents` and `/tasks` remain the runtime source of truth.

## Native safety hook

`.agents/hooks.json` registers a `PreToolUse` gate for `run_command`. The policy blocks only high-confidence root/disk destructive patterns. It does not replace Antigravity permissions, workspace trust, sandboxing, or user approval.

Test with mocked stdin only:

```bash
printf '%s' '{"tool_args":{"CommandLine":"rm -rf /"}}' \
  | node .agents/hooks/validate-tool-call.mjs
```

The process must exit non-zero. To diagnose a compatibility issue, set `"enabled": false` temporarily and reopen the workspace.

## MCP setup

`mcp_config.json` is a workspace example. Replace `YOUR_API_KEY` before enabling the server and keep real credentials outside version control.

```bash
node .agents/hooks/sync-mcp.mjs --check
node .agents/hooks/sync-mcp.mjs --print
```

No home-directory file is changed without `--apply`. Existing server names are preserved unless `--force` is explicit, and an existing target is backed up before writing.

## Plugin bundle

```bash
npm run build:antigravity-plugin
```

Review `dist/antigravity-plugin/` and its `PLUGIN_CONTENTS.json` inventory before optional local installation. The repository `.agents/` directory remains the source of truth.

## Core concepts

- **Agents** define role, boundaries, tools, and skill dependencies.
- **Skills** contain selectively loaded domain knowledge and optional executable scripts.
- **Rules** define workspace-wide precedence, safety, and routing behavior.
- **Workflows** provide reusable slash-command procedures.
- **Memory** stores durable project conventions, preferences, decisions, and feedback.
- **Hooks** supplement runtime permissions with narrow policy checks.
- **Runtime scripts** turn guidance into repeatable evidence.
- **Manifest and lock** make managed components and runtime tooling reproducible.

## Validation

Validate a target project:

```bash
python .agents/scripts/checklist.py .
```

Run full project verification when a preview URL exists:

```bash
python .agents/scripts/verify_all.py . --url http://localhost:3000
```

Verify AG Kit itself after editing agents, skills, rules, workflows, memory, runtime tooling, schemas, scripts, or links:

```bash
npm run generate:agents
npm run check:agents
npm run check:antigravity
npm run test:antigravity
```

## Documentation

- [Architecture and inventory](ARCHITECTURE.md)
- [Antigravity integration](hooks/README.md)
- [Dependency graph](DEPENDENCY_GRAPH.md)
- [Runtime scripts](scripts/README.md)
- [Root migration guide](../MIGRATION.md)
- [Production checklist](../PRODUCTION_CHECKLIST.md)
- [Security policy](../SECURITY.md)
- [Change history](../CHANGELOG.md)
- [Quick routing reference](rules/quick-reference.md)

---

### Overview (`cli/README.md`)

# AG Kit CLI

CLI for installing and safely updating [AG Kit](https://github.com/vudovn/ag-kit), a collection of agents, skills, workflows, rules, memory conventions, and validation tools for Google Antigravity.

## Installation

```bash
npx @vudovn/ag-kit init
```

Or install globally:

```bash
npm install @vudovn/ag-kit
ag-kit init
```

## Commands

| Command | Description |
|---|---|
| `ag-kit init` | Install `.agents`; safely merges when an installation already exists |
| `ag-kit update` | Update managed files while preserving local changes |
| `ag-kit rollback` | Restore the newest or a selected pre-update backup |
| `ag-kit status` | Show installation, manifest, toolkit version, backups, and CLI status |

## Safe update model

AG Kit records SHA-256 baselines in `.agents/.ag-kit/manifest.json`. During an update it compares the previous upstream version, the current local file, and the new upstream file.

- Clean managed files are updated automatically.
- Files changed only locally are preserved.
- User-created files are preserved.
- Files changed both locally and upstream are reported as conflicts.
- Incoming conflict copies are written under `.agents/.ag-kit/conflicts/`.
- A full pre-update backup is stored under `.ag-kit-backups/` by default.

```bash
ag-kit update --dry-run
ag-kit update --strategy merge
ag-kit update --strategy replace
ag-kit rollback
ag-kit rollback --backup 20260712-090000-000
```

`merge` is the default strategy. `replace` is intentionally explicit and still creates a backup unless `--no-backup` is supplied.

## Common options

```bash
ag-kit init --path ./myapp
ag-kit init --branch dev
ag-kit update --force
ag-kit update --quiet --force
ag-kit update --conflict-report ./ag-kit-update.json
ag-kit rollback --dry-run
```

When `--quiet` is used against an existing installation, `--force` is required because the CLI cannot safely ask for confirmation.

## Included toolkit

- **20 specialist agents**
- **47 skills**
- **13 workflows**
- Shared rules, persistent memory conventions, MCP configuration, and validation scripts

## Exit codes

| Code | Meaning |
|---:|---|
| `0` | Success or no changes required |
| `1` | Download, validation, filesystem, or configuration failure |
| `2` | Update completed, but one or more conflicts require manual review |
| `130` | Interrupted by the user |

## License

MIT

---

### Overview (`web/README.md`)

<p align="center">
  <img src="https://raw.githubusercontent.com/vudovn/ag-kit/main/web/public/images/logo.png" width="128" height="128" alt="AGKIT">
</p>

<h1 align="center">AG Kit - Web Application</h1>

<p align="center">
    Next.js documentation and dashboard portal for AG Kit — AI Agent templates with Skills, Agents, and Workflows.
</p>

---

## ⚡ Quick Start (Local Development)

The `web/` directory contains the official online documentation site and interactive dashboard portal built using Next.js 16 and React 19.

1. **Install dependencies**:
   ```bash
   npm install
   ```

2. **Run local development server**:
   ```bash
   npm run dev
   ```

3. **Open browser**:
   Navigate to [http://localhost:3000](http://localhost:3000) to view the documentation portal locally.

---

## 🏗️ Architecture & Stack

*   **Framework:** [Next.js 16 (App Router)](https://nextjs.org/)
*   **Library:** [React 19](https://react.dev/)
*   **Styling:** [Tailwind CSS v4](https://tailwindcss.com/)
*   **MDX:** [@next/mdx](https://github.com/vercel/next.js/tree/canary/packages/next-mdx) for seamless markdown integration
*   **Components:** Built with [@base-ui/react](https://base-ui.com/) and Lucide React icons

---

## 📦 What gets installed by the CLI

When downstream developers run `npx @vudovn/ag-kit init`, they install a `.agents/` folder at their project root:

| Directory | Count | Description |
| :--- | :--- | :--- |
| **`agent/`** | 20 | Specialist AI agent configurations (Frontend, Backend, Security, PM, QA, etc.) |
| **`skills/`** | 45 | Domain-specific context modules with conditional loading rules |
| **`workflows/`** | 13 | Pre-configured interactive slash commands |

---

## 📚 Online Documentation

*   **[Official Documentation Portal](https://ag-kit.unikorn.vn/docs)**
*   **[GitHub Repository](https://github.com/vudovn/ag-kit)**

---

## ☕ Support the Project

If AG Kit has made your AI programming sessions more productive, consider supporting the project:

<a href="https://buymeacoffee.com/vudovn" target="_blank"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black" alt="Buy Me a Coffee" /></a>

**Vietnamese Bank (MBBank QR):**<br/>
<img src="https://img.vietqr.io/image/mbbank-0779440918-compact.jpg" alt="Donate QR" width="140" style="border-radius: 8px; margin-top: 10px;" />

---

## 📄 License

Released under the [MIT License](LICENSE) © [Vudovn](https://github.com/vudovn).

---

### Overview (`.agents/hooks/README.md`)

# AG Kit — Antigravity Native Integration

AG Kit now treats Google Antigravity as its primary runtime. The integration is intentionally built from Antigravity's workspace-native conventions instead of a cross-runtime abstraction.

## What is active

| Phase | Native surface | AG Kit implementation |
| --- | --- | --- |
| 1. Discovery | `.agents/rules/`, `.agents/skills/`, `.agents/workflows/` | Doctor validates discovery paths and required frontmatter |
| 2. MCP | `.agents/mcp_config.json` | Workspace validation plus explicit, backup-aware sync helper |
| 3. Hooks | `.agents/hooks.json` | `PreToolUse` gate for clearly destructive `run_command` calls |
| 4. Orchestration | workflows, specialist definitions, Antigravity subagents | Validates `/coordinate`, `/orchestrate`, core roles, and routing skills |
| 5. Plugin | Antigravity CLI plugin import | Deterministic local plugin bundle builder |
| 6. Validation | CI and smoke tests | Doctor, hook regression tests, MCP tests, and plugin build tests |

## Quick verification

```bash
node .agents/hooks/antigravity-doctor.mjs
node --test .agents/hooks/tests/antigravity.test.mjs
```

The doctor checks the installed workspace without changing files. Use `--json` for machine-readable output and `--strict` to treat unresolved configuration placeholders as failures.

## Native safety hook

Antigravity reads `.agents/hooks.json`. AG Kit registers one native hook:

```json
{
  "enabled": true,
  "PreToolUse": [
    {
      "matcher": "run_command",
      "command": "node .agents/hooks/validate-tool-call.mjs",
      "timeout": 10
    }
  ]
}
```

The policy blocks only high-confidence destructive operations such as deleting a filesystem root, formatting a drive, or overwriting a raw disk. It deliberately allows normal cleanup such as deleting `dist/` or `node_modules/`.

The hook is not a sandbox and does not replace Antigravity's permission settings. Invalid or unknown payload shapes fail open with a warning to prevent a runtime-wide lockout after upstream payload changes.

## MCP setup

Antigravity CLI supports workspace MCP configuration at `.agents/mcp_config.json`. Antigravity IDE and the wider suite may also use a shared global configuration.

Inspect the merge plan:

```bash
node .agents/hooks/sync-mcp.mjs --check
node .agents/hooks/sync-mcp.mjs --print
```

Apply only after replacing placeholders such as `YOUR_API_KEY`:

```bash
node .agents/hooks/sync-mcp.mjs --apply --target suite
node .agents/hooks/sync-mcp.mjs --apply --target cli
```

The helper never overwrites an existing server with the same name unless `--force` is supplied. It creates a timestamped backup before writing.

## Orchestration

AG Kit uses the existing Antigravity-native workflows:

- `/coordinate` for parallel read/research and synthesis;
- `/orchestrate` for plan approval followed by specialist implementation;
- `.agents/agent/*.md` as role definitions;
- `coordinator-mode`, `parallel-agents`, `intelligent-routing`, and `verify-changes` as orchestration skills.

Antigravity's `/agents` and `/tasks` views remain the runtime source of truth for active work. AG Kit does not create a second scheduler.

## Build a plugin bundle

```bash
node .agents/hooks/build-plugin.mjs
# or
npm run build:antigravity-plugin
```

The generated `dist/antigravity-plugin/` contains:

- a `gemini-extension.json` compatible manifest used by Antigravity CLI's plugin importer;
- packaged skills and specialist definitions;
- workflows converted into namespaced command TOML files;
- rules, native hooks, and an MCP example;
- `PLUGIN_CONTENTS.json` with deterministic SHA-256 inventory data.

Install the local build after reviewing it:

```bash
agy plugin install ./dist/antigravity-plugin
agy plugin list
```

## Security boundaries

- No MCP configuration is copied to the home directory without explicit `--apply`.
- Placeholder credentials block MCP application.
- The plugin builder does not include secrets from environment variables or home-directory configuration.
- The hook only reads one tool payload from stdin and performs no network calls.
- AG Kit does not weaken Antigravity permission prompts or workspace trust controls.

## Release and operations

- [Root README](../../README.md) — installation and production quick start.
- [Migration guide](../../MIGRATION.md) — upgrade and rollback from earlier AG Kit versions.
- [Production checklist](../../PRODUCTION_CHECKLIST.md) — automated and hands-on release gates.
- [Security policy](../../SECURITY.md) — threat model, incident handling, and hook recovery.

## Primary Antigravity references

- Workspace rules and workflows: <https://codelabs.developers.google.com/antigravity-ide>
- Workspace skills: <https://codelabs.developers.google.com/antigravity-skills>
- Workspace MCP: <https://codelabs.developers.google.com/antigravity-cli>
- Native `PreToolUse` hooks: <https://codelabs.developers.google.com/secure-agentic-coding>
- Plugin installation: <https://codelabs.developers.google.com/antigravity-cli-plugins> and <https://codelabs.developers.google.com/antigravity-conductor>

---

### Overview (`.agents/scripts/README.md`)

# AG Kit Runtime Scripts

## Entry points

### `validate_kit.py`

Self-validates the `.agents/` package. It checks JSON, strict SemVer frontmatter, workflow/agent/skill references, manifest and lock synchronization, generated dependency docs, memory contracts, local Markdown links, Python syntax, referenced script paths, and documented inventory counts.

```bash
python .agents/scripts/validate_kit.py
python .agents/scripts/validate_kit.py --json
```


### `generate_manifest.py`

Builds deterministic `manifest.json` and `manifest.lock.json` files from component frontmatter. Use `--check` in CI to fail on registry drift.

```bash
python .agents/scripts/generate_manifest.py
python .agents/scripts/generate_manifest.py --check
```

### `dependency_graph.py`

Builds `DEPENDENCY_GRAPH.md` from workflow and agent dependencies. Use `--check` to verify that the generated graph is current.

```bash
python .agents/scripts/dependency_graph.py
python .agents/scripts/dependency_graph.py --check
```

### `checklist.py`

Runs the fast project validation path. URL checks are automatically skipped when `--url` is not supplied.

```bash
python .agents/scripts/checklist.py .
python .agents/scripts/checklist.py . --url http://localhost:3000
python .agents/scripts/checklist.py . --report .agents/reports/checklist.json
```

### `verify_all.py`

Runs the broad release suite. `--no-runtime` excludes Lighthouse and Playwright; `--no-e2e` excludes Playwright only.

```bash
python .agents/scripts/verify_all.py . --no-runtime
python .agents/scripts/verify_all.py . --url http://localhost:3000 --report verification.json
```

### `session_manager.py`

Prints project type, package metadata, feature hints, and file counts.

```bash
python .agents/scripts/session_manager.py status .
```

### `auto_preview.py`

Starts, stops, or inspects a detected local preview server.

```bash
python .agents/scripts/auto_preview.py start 3000
python .agents/scripts/auto_preview.py status
python .agents/scripts/auto_preview.py stop
```

## Runtime prerequisites

Most scripts use only the Python standard library. Optional checks require the corresponding project tools:

- Lighthouse: `npm install lighthouse`
- Playwright: `pip install playwright && playwright install chromium`
- Node lint/test commands: project package manager and configured scripts
- Python lint/test commands: project-configured tools such as Ruff, MyPy, or pytest

Missing URL-based tools produce a failed runtime check rather than a false pass. Missing non-applicable build outputs are reported as skipped/pass with an explanatory message.

## Exit-code contract

- `0`: check passed or was not applicable
- `1`: findings met the configured failure threshold
- `2`: invalid command usage or missing input path

The master runners use subprocess exit codes as the source of truth and can emit a full JSON report with commands, durations, stdout, stderr, and status.

## Regression tests

Toolkit scripts include regression tests for self-validation, component SemVer, manifest/lock integrity, dependency graph synchronization, memory contracts, security scanning, dependency and bundle analysis, and toolkit-root discovery.

```bash
python -m unittest discover -s .agents/scripts/tests -v
```

---

### Web Src App Docs Antigravity Content.En (`web/src/app/docs/antigravity/content.en.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, FeatureGrid, Feature } from '@/components/mdx'

# Antigravity Runtime Integration

Google Antigravity is AG Kit's production runtime. Beyond rules, skills, and workflows, the kit ships a native integration layer inside `.agents/`.

## The runtime layer

<FeatureGrid>
  <Feature title="antigravity.json" description="Machine-readable runtime contract" />
  <Feature title="hooks.json" description="Native PreToolUse safety gate" />
  <Feature title="mcp_config.json" description="Workspace MCP source of truth" />
  <Feature title="Doctor" description="Read-only integration diagnostics" />
</FeatureGrid>

## Tool safety hook

`hooks.json` registers a native `PreToolUse` gate for `run_command`. It is deliberately narrow — it blocks high-confidence destructive patterns only:

- Unix root-filesystem deletion (`rm -rf /` and equivalents)
- Filesystem formatting and raw-disk overwrite (`mkfs`, writing to `/dev/sdX`)
- Windows drive formatting and forced root deletion

Normal project cleanup (deleting `dist/`, `node_modules/`) passes through.

<Callout type="warning">
  The hook does not replace Antigravity permissions, workspace trust, sandboxing, or human approval. It is a last-resort tripwire, not a security boundary.
</Callout>

## MCP synchronization

`.agents/mcp_config.json` is the workspace source for MCP servers. The sync helper applies it explicitly — it refuses placeholder credentials, preserves conflicting entries by default, and backs up the target before writing:

<Terminal>
  <TerminalLine command="node .agents/hooks/sync-mcp.mjs" />
</Terminal>

## Antigravity Doctor

The Doctor checks discovery, MCP, hooks, orchestration, plugin packaging, and release readiness — read-only:

<Terminal>
  <TerminalLine command="node .agents/hooks/antigravity-doctor.mjs" />
  <TerminalBlock>
{`[PASS] discovery
[PASS] mcp
[PASS] hooks
[PASS] orchestration
[PASS] plugin
[PASS] validation
[PASS] Antigravity contract is ready.`}
  </TerminalBlock>
</Terminal>

## Plugin bundle

For teams who prefer a packaged install, the plugin builder produces a local Antigravity plugin bundle with a deterministic SHA-256 content inventory:

<Terminal>
  <TerminalLine command="node .agents/hooks/build-plugin.mjs" />
</Terminal>

<Callout type="info">
  Everything on this page is validated in CI: the Doctor, hook regression tests, and plugin inventory run on every push.
</Callout>

---

### Web Src App Docs Antigravity Content.Vi (`web/src/app/docs/antigravity/content.vi.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, FeatureGrid, Feature } from '@/components/mdx'

# Tích hợp Runtime Antigravity

Google Antigravity là runtime production của AG Kit. Ngoài rules, skills và workflows, kit đi kèm lớp tích hợp native bên trong `.agents/`.

## Lớp runtime

<FeatureGrid>
  <Feature title="antigravity.json" description="Hợp đồng runtime máy đọc được" />
  <Feature title="hooks.json" description="Cổng an toàn PreToolUse native" />
  <Feature title="mcp_config.json" description="Nguồn cấu hình MCP của workspace" />
  <Feature title="Doctor" description="Chẩn đoán tích hợp chỉ đọc" />
</FeatureGrid>

## Hook an toàn công cụ

`hooks.json` đăng ký cổng `PreToolUse` native cho `run_command`. Nó cố tình hẹp — chỉ chặn các mẫu phá hủy có độ tin cậy cao:

- Xóa root filesystem Unix (`rm -rf /` và tương đương)
- Format filesystem và ghi đè raw-disk (`mkfs`, ghi vào `/dev/sdX`)
- Format ổ đĩa Windows và xóa root cưỡng bức

Dọn dẹp dự án bình thường (xóa `dist/`, `node_modules/`) vẫn đi qua bình thường.

<Callout type="warning">
  Hook không thay thế quyền của Antigravity, workspace trust, sandbox, hay phê duyệt của con người. Nó là dây bẫy cuối cùng, không phải ranh giới bảo mật.
</Callout>

## Đồng bộ MCP

`.agents/mcp_config.json` là nguồn cấu hình MCP của workspace. Trình đồng bộ áp dụng nó một cách tường minh — từ chối credential giữ chỗ, giữ nguyên mục xung đột theo mặc định, và sao lưu đích trước khi ghi:

<Terminal>
  <TerminalLine command="node .agents/hooks/sync-mcp.mjs" />
</Terminal>

## Antigravity Doctor

Doctor kiểm tra discovery, MCP, hooks, orchestration, đóng gói plugin và mức sẵn sàng phát hành — chỉ đọc:

<Terminal>
  <TerminalLine command="node .agents/hooks/antigravity-doctor.mjs" />
  <TerminalBlock>
{`[PASS] discovery
[PASS] mcp
[PASS] hooks
[PASS] orchestration
[PASS] plugin
[PASS] validation
[PASS] Antigravity contract is ready.`}
  </TerminalBlock>
</Terminal>

## Gói plugin

Với đội muốn cài dạng đóng gói, trình build plugin tạo bundle plugin Antigravity cục bộ với inventory nội dung SHA-256 xác định:

<Terminal>
  <TerminalLine command="node .agents/hooks/build-plugin.mjs" />
</Terminal>

<Callout type="info">
  Mọi thứ trên trang này được kiểm chứng trong CI: Doctor, test hồi quy hook, và plugin inventory chạy trên mỗi lần push.
</Callout>

---

### Web Src App Docs Updates Content.En (`web/src/app/docs/updates/content.en.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, FeatureGrid, Feature } from '@/components/mdx'

# Managed Updates & Rollback

AG Kit installs `.agents/` as a **managed tree**: every kit file is tracked in a manifest with SHA-256 hashes, so updates know exactly what is yours and what is the kit's.

## How the managed tree works

<FeatureGrid>
  <Feature title="manifest.json" description="Component paths, versions, dependencies" />
  <Feature title="manifest.lock.json" description="SHA-256 hash per managed file" />
  <Feature title="Backups" description="Automatic before every change" />
  <Feature title="Reports" description="Machine-readable update reports" />
</FeatureGrid>

Files you add or modify are **not** kit-managed, so the default `merge` strategy preserves them. Only files whose hash matches the manifest are updated in place.

## Updating safely

<StepList>
  <Step number={1} title="Preview the plan">
    ```bash
    ag-kit update --dry-run
    ```
    Shows adds, changes, preserved local files, and conflicts — without touching anything.
  </Step>
  <Step number={2} title="Apply the merge">
    ```bash
    ag-kit update
    ```
    A backup is created first. Local changes are preserved; conflicting files are kept and incoming copies are stored under `.agents/.ag-kit/conflicts/` for review.
  </Step>
  <Step number={3} title="Review the report">
    Each run writes a report with the run ID, strategy, and per-file actions. Use `--conflict-report <file>` to write it to a custom path.
  </Step>
</StepList>

<Callout type="info">
  Want a pristine upstream tree instead? Use `ag-kit update --strategy replace`. A backup is still created first.
</Callout>

## Rolling back

<Terminal>
  <TerminalLine command="ag-kit rollback" />
  <TerminalBlock>
{`? Restore backup 2026-07-26T16-03-21? (y/N) y
Restored backup 2026-07-26T16-03-21
Pre-rollback backup: .agents/.ag-kit/backups/...`}
  </TerminalBlock>
</Terminal>

- Defaults to the newest backup; pick one with `--backup <id>`.
- The current tree is backed up before restoring (disable with `--no-keep-current`).
- Preview with `--dry-run`.

<Callout type="warning">
  Backups live inside your project under `.agents/.ag-kit/`. Deleting that folder removes your rollback points.
</Callout>

---

### Web Src App Docs Updates Content.Vi (`web/src/app/docs/updates/content.vi.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, FeatureGrid, Feature } from '@/components/mdx'

# Cập nhật được quản lý & Rollback

AG Kit cài `.agents/` dưới dạng **cây được quản lý**: mọi file của kit được theo dõi trong manifest với hash SHA-256, nên khi cập nhật hệ thống biết chính xác file nào của bạn, file nào của kit.

## Cây được quản lý hoạt động thế nào

<FeatureGrid>
  <Feature title="manifest.json" description="Đường dẫn, phiên bản, phụ thuộc của component" />
  <Feature title="manifest.lock.json" description="Hash SHA-256 cho từng file được quản lý" />
  <Feature title="Sao lưu" description="Tự động trước mọi thay đổi" />
  <Feature title="Báo cáo" description="Báo cáo cập nhật máy đọc được" />
</FeatureGrid>

File bạn thêm hoặc sửa **không** thuộc quản lý của kit, nên chiến lược mặc định `merge` sẽ giữ nguyên chúng. Chỉ những file có hash khớp manifest mới được cập nhật.

## Cập nhật an toàn

<StepList>
  <Step number={1} title="Xem trước kế hoạch">
    ```bash
    ag-kit update --dry-run
    ```
    Hiển thị file thêm, thay đổi, file cục bộ được giữ, và xung đột — không đụng gì cả.
  </Step>
  <Step number={2} title="Áp dụng merge">
    ```bash
    ag-kit update
    ```
    Bản sao lưu được tạo trước. Thay đổi cục bộ được giữ; file xung đột giữ nguyên và bản mới được lưu tại `.agents/.ag-kit/conflicts/` để xem xét.
  </Step>
  <Step number={3} title="Xem báo cáo">
    Mỗi lần chạy ghi báo cáo với run ID, chiến lược, và hành động từng file. Dùng `--conflict-report <file>` để ghi vào đường dẫn tùy chỉnh.
  </Step>
</StepList>

<Callout type="info">
  Muốn cây gốc từ upstream? Dùng `ag-kit update --strategy replace`. Bản sao lưu vẫn được tạo trước.
</Callout>

## Rollback

<Terminal>
  <TerminalLine command="ag-kit rollback" />
  <TerminalBlock>
{`? Restore backup 2026-07-26T16-03-21? (y/N) y
Restored backup 2026-07-26T16-03-21
Pre-rollback backup: .agents/.ag-kit/backups/...`}
  </TerminalBlock>
</Terminal>

- Mặc định dùng bản sao lưu mới nhất; chọn bản khác với `--backup <id>`.
- Cây hiện tại được sao lưu trước khi khôi phục (tắt bằng `--no-keep-current`).
- Xem trước với `--dry-run`.

<Callout type="warning">
  Bản sao lưu nằm trong dự án tại `.agents/.ag-kit/`. Xóa thư mục này sẽ mất các điểm rollback.
</Callout>

---

### Web Src App Docs Guide Examples Brainstorm Content.En (`web/src/app/docs/guide/examples/brainstorm/content.en.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# Structured Brainstorming

Explore multiple approaches before writing code with the `/brainstorm` workflow.

## Overview

The `/brainstorm` command activates a **structured ideation mode**.
Instead of jumping straight to code, the agent explores at least 3 different approaches,
analyzes pros and cons, and helps you make an informed decision.

<FeatureGrid>
  <Feature title="No Code" description="Ideas only" />
  <Feature title="3+ Options" description="Always compare" />
  <Feature title="Pros/Cons" description="Honest tradeoffs" />
  <Feature title="You Decide" description="Final choice" />
</FeatureGrid>

## The Process

<StepList>
  <Step number={1} title="Describe Your Challenge">
    Tell the agent what you want to explore. Be specific about constraints.

    ```bash
    /brainstorm authentication system for my SaaS app
    ```
  </Step>
  <Step number={2} title="Review Options">
    The agent presents 3+ approaches with pros, cons, and effort levels.
  </Step>
  <Step number={3} title="Make Decision">
    Choose an option, then use `/enhance` or `/create` to implement.
  </Step>
</StepList>

## Example Session

<Terminal>
  <TerminalLine type="user">/brainstorm state management for complex form</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Exploring Options...**</TerminalLine>
  </TerminalBlock>

  <div className="space-y-4 pl-8 mb-4">
    <div className="border-t border-zinc-800 pt-3">
      <strong className="text-purple-400">Option A: React Hook Form + Zod</strong>
      <div className="text-xs mt-1 space-y-1">
        <div className="text-green-400">✅ Minimal re-renders, great DX</div>
        <div className="text-red-400">❌ Learning curve</div>
        <div className="text-yellow-400">📊 Effort: Low</div>
      </div>
    </div>
    <div className="border-t border-zinc-800 pt-3">
      <strong className="text-purple-400">Option B: Zustand</strong>
      <div className="text-xs mt-1 space-y-1">
        <div className="text-green-400">✅ Full control, persists across routes</div>
        <div className="text-red-400">❌ More boilerplate</div>
        <div className="text-yellow-400">📊 Effort: Medium</div>
      </div>
    </div>
  </div>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**💡 Recommendation: Option A**</TerminalLine>
    For 20+ fields, RHF minimizes re-renders.
  </TerminalBlock>
</Terminal>

## Pro Tips

<ProTips>
  <Tip title="Provide Context">
    Mention constraints: "I need SSR support", "Must work offline".
  </Tip>
  <Tip title="Ask Follow-ups">
    "Tell me more about Option B's scalability" before deciding.
  </Tip>
</ProTips>

## Next Steps

- Try `/brainstorm` for your next architecture decision
- After deciding, use [Add New Feature](/docs/guide/examples/new-feature) to implement

---

### Web Src App Docs Guide Examples Brainstorm Content.Ja (`web/src/app/docs/guide/examples/brainstorm/content.ja.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# 構造化ブレインストーミング

`/brainstorm` ワークフローで、コードを書く前に複数のアプローチを検討しましょう。

## 概要

`/brainstorm` コマンドは**構造化されたアイデア出しモード**を起動します。
いきなりコードに飛びつくのではなく、エージェントが少なくとも 3 種類の異なるアプローチを検討し、
それぞれの長所と短所を分析して、納得のいく意思決定を後押しします。

<FeatureGrid>
  <Feature title="コードなし" description="アイデアだけ" />
  <Feature title="3つ以上の選択肢" description="常に比較" />
  <Feature title="長所/短所" description="率直なトレードオフ" />
  <Feature title="決めるのはあなた" description="最終的な選択" />
</FeatureGrid>

## プロセス

<StepList>
  <Step number={1} title="課題を説明する">
    何を検討したいかをエージェントに伝えます。制約条件は具体的に。

    ```bash
    /brainstorm authentication system for my SaaS app
    ```
  </Step>
  <Step number={2} title="選択肢を確認する">
    エージェントが 3 つ以上のアプローチを、長所・短所・工数の目安とともに提示します。
  </Step>
  <Step number={3} title="意思決定する">
    1 つを選び、`/enhance` または `/create` で実装します。
  </Step>
</StepList>

## セッション例

<Terminal>
  <TerminalLine type="user">/brainstorm state management for complex form</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**選択肢を検討中……**</TerminalLine>
  </TerminalBlock>

  <div className="space-y-4 pl-8 mb-4">
    <div className="border-t border-zinc-800 pt-3">
      <strong className="text-purple-400">選択肢 A: React Hook Form + Zod</strong>
      <div className="text-xs mt-1 space-y-1">
        <div className="text-green-400">✅ 再レンダリングが最小限、開発体験が優秀</div>
        <div className="text-red-400">❌ 学習コストがある</div>
        <div className="text-yellow-400">📊 工数: 低</div>
      </div>
    </div>
    <div className="border-t border-zinc-800 pt-3">
      <strong className="text-purple-400">選択肢 B: Zustand</strong>
      <div className="text-xs mt-1 space-y-1">
        <div className="text-green-400">✅ 完全に制御可能、ルート間で状態を保持</div>
        <div className="text-red-400">❌ ボイラープレートが増える</div>
        <div className="text-yellow-400">📊 工数: 中</div>
      </div>
    </div>
  </div>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**💡 おすすめ: 選択肢 A**</TerminalLine>
    20 個以上のフィールドなら、RHF は再レンダリングを最小限に抑えます。
  </TerminalBlock>
</Terminal>

## 実践のヒント

<ProTips>
  <Tip title="コンテキストを伝える">
    制約条件を明示しましょう。「SSR 対応が必要」「オフラインで動く必要がある」など。
  </Tip>
  <Tip title="深掘りの質問をする">
    決める前に「選択肢 B のスケーラビリティについて詳しく教えて」と聞いてみましょう。
  </Tip>
</ProTips>

## 次のステップ

- 次のアーキテクチャ判断で `/brainstorm` を試してみましょう
- 決めたら、[新機能の追加](/docs/guide/examples/new-feature)で実装しましょう

---

### Web Src App Docs Guide Examples Brainstorm Content.Vi (`web/src/app/docs/guide/examples/brainstorm/content.vi.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# Động não có cấu trúc

Khám phá nhiều hướng tiếp cận trước khi viết code với quy trình `/brainstorm`.

## Tổng quan

Lệnh `/brainstorm` kích hoạt một **chế độ phát ý tưởng có cấu trúc**.
Thay vì lao thẳng vào code, tác tử khám phá ít nhất 3 hướng tiếp cận khác nhau,
phân tích ưu nhược điểm và giúp bạn ra quyết định sáng suốt.

<FeatureGrid>
  <Feature title="Không code" description="Chỉ ý tưởng" />
  <Feature title="3+ phương án" description="Luôn so sánh" />
  <Feature title="Ưu/Nhược" description="Đánh đổi thẳng thắn" />
  <Feature title="Bạn quyết" description="Lựa chọn cuối" />
</FeatureGrid>

## Quy trình

<StepList>
  <Step number={1} title="Mô tả thách thức của bạn">
    Cho tác tử biết bạn muốn khám phá gì. Hãy nêu rõ các ràng buộc.

    ```bash
    /brainstorm authentication system for my SaaS app
    ```
  </Step>
  <Step number={2} title="Xem lại các phương án">
    Tác tử trình bày 3+ hướng tiếp cận kèm ưu điểm, nhược điểm và mức công sức.
  </Step>
  <Step number={3} title="Ra quyết định">
    Chọn một phương án, rồi dùng `/enhance` hoặc `/create` để triển khai.
  </Step>
</StepList>

## Phiên làm việc ví dụ

<Terminal>
  <TerminalLine type="user">/brainstorm state management for complex form</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Đang khám phá các phương án...**</TerminalLine>
  </TerminalBlock>

  <div className="space-y-4 pl-8 mb-4">
    <div className="border-t border-zinc-800 pt-3">
      <strong className="text-purple-400">Phương án A: React Hook Form + Zod</strong>
      <div className="text-xs mt-1 space-y-1">
        <div className="text-green-400">✅ Ít re-render, DX tuyệt vời</div>
        <div className="text-red-400">❌ Có đường cong học tập</div>
        <div className="text-yellow-400">📊 Công sức: Thấp</div>
      </div>
    </div>
    <div className="border-t border-zinc-800 pt-3">
      <strong className="text-purple-400">Phương án B: Zustand</strong>
      <div className="text-xs mt-1 space-y-1">
        <div className="text-green-400">✅ Toàn quyền kiểm soát, giữ trạng thái qua các route</div>
        <div className="text-red-400">❌ Nhiều code khuôn mẫu hơn</div>
        <div className="text-yellow-400">📊 Công sức: Trung bình</div>
      </div>
    </div>
  </div>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**💡 Đề xuất: Phương án A**</TerminalLine>
    Với 20+ trường, RHF giảm thiểu re-render.
  </TerminalBlock>
</Terminal>

## Mẹo hay

<ProTips>
  <Tip title="Cung cấp ngữ cảnh">
    Nêu các ràng buộc: "Tôi cần hỗ trợ SSR", "Phải hoạt động ngoại tuyến".
  </Tip>
  <Tip title="Hỏi tiếp">
    "Cho tôi biết thêm về khả năng mở rộng của Phương án B" trước khi quyết định.
  </Tip>
</ProTips>

## Bước tiếp theo

- Thử `/brainstorm` cho quyết định kiến trúc tiếp theo của bạn
- Sau khi quyết định, dùng [Thêm tính năng mới](/docs/guide/examples/new-feature) để triển khai

---

### Web Src App Docs Guide Examples Brainstorm Content.Zh (`web/src/app/docs/guide/examples/brainstorm/content.zh.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# 结构化头脑风暴

使用 `/brainstorm` 工作流，在动手写代码之前先探索多种方案。

## 概述

`/brainstorm` 命令会启动一种**结构化的构思模式**。
与其直接动手写代码，智能体会探索至少 3 种不同的方案，
分析各自的优缺点，帮助你做出明智的决策。

<FeatureGrid>
  <Feature title="不写代码" description="只谈想法" />
  <Feature title="3+ 个方案" description="始终对比" />
  <Feature title="优点/缺点" description="坦诚权衡" />
  <Feature title="由你决定" description="最终选择" />
</FeatureGrid>

## 流程

<StepList>
  <Step number={1} title="描述你的挑战">
    告诉智能体你想探索什么。把约束条件说清楚。

    ```bash
    /brainstorm authentication system for my SaaS app
    ```
  </Step>
  <Step number={2} title="审阅方案">
    智能体会给出 3 个以上的方案，并附上优点、缺点和工作量评估。
  </Step>
  <Step number={3} title="做出决策">
    选定一个方案，然后用 `/enhance` 或 `/create` 来实现。
  </Step>
</StepList>

## 示例会话

<Terminal>
  <TerminalLine type="user">/brainstorm state management for complex form</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**正在探索方案……**</TerminalLine>
  </TerminalBlock>

  <div className="space-y-4 pl-8 mb-4">
    <div className="border-t border-zinc-800 pt-3">
      <strong className="text-purple-400">方案 A：React Hook Form + Zod</strong>
      <div className="text-xs mt-1 space-y-1">
        <div className="text-green-400">✅ 重渲染极少，开发体验出色</div>
        <div className="text-red-400">❌ 有一定学习曲线</div>
        <div className="text-yellow-400">📊 工作量：低</div>
      </div>
    </div>
    <div className="border-t border-zinc-800 pt-3">
      <strong className="text-purple-400">方案 B：Zustand</strong>
      <div className="text-xs mt-1 space-y-1">
        <div className="text-green-400">✅ 完全可控，跨路由保持状态</div>
        <div className="text-red-400">❌ 样板代码更多</div>
        <div className="text-yellow-400">📊 工作量：中</div>
      </div>
    </div>
  </div>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**💡 推荐：方案 A**</TerminalLine>
    对于 20 个以上的字段，RHF 能把重渲染降到最低。
  </TerminalBlock>
</Terminal>

## 实用技巧

<ProTips>
  <Tip title="提供上下文">
    说明约束条件："我需要支持 SSR"、"必须能离线使用"。
  </Tip>
  <Tip title="追问细节">
    在决定之前，先问"详细讲讲方案 B 的可扩展性"。
  </Tip>
</ProTips>

## 后续步骤

- 在你的下一个架构决策中试试 `/brainstorm`
- 决定之后，用[添加新功能](/docs/guide/examples/new-feature)来实现

---

### Web Src App Docs Guide Examples Create Content.En (`web/src/app/docs/guide/examples/create/content.en.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, StatusList, StatusItem } from '@/components/mdx'

# Create New Application

Build complete applications from scratch with the `/create` wizard.

## Overview

The `/create` command is your **application creation wizard**.
It guides you through an interactive dialogue, understands your requirements,
plans the architecture, and orchestrates specialist agents to build your app.

<Callout type="info">
  **From idea to running app:** Just describe what you want, and the wizard handles tech stack, file structure, database schema, and implementation.
</Callout>

## The Process

<StepList>
  <Step number={1} title="Describe Your App">
    Tell the wizard what you want to build. It will ask clarifying questions if needed.

    ```bash
    /create e-commerce site with product listing and cart
    ```
  </Step>
  <Step number={2} title="Review Plan">
    The `project-planner` agent creates a detailed plan. Approve to proceed.
  </Step>
  <Step number={3} title="Agents Build">
    Specialist agents work in parallel: database-architect, backend, frontend.
  </Step>
</StepList>

## Example Session

<Terminal>
  <TerminalLine type="user">/create todo app with dark mode</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Analyzing request...**</TerminalLine>
    Tech Stack: Next.js + Tailwind + Zustand
    <span className="text-yellow-300">Proceed? (Y/N)</span>
  </TerminalBlock>

  <TerminalLine type="user">Y</TerminalLine>

  <StatusList>
    <StatusItem status="running" label="Backend">Creating store...</StatusItem>
    <StatusItem status="running" label="Frontend">Building components...</StatusItem>
  </StatusList>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**🚀 App Created!**</TerminalLine>
    Preview: <span className="text-blue-400">http://localhost:3000</span>
  </TerminalBlock>
</Terminal>

## Pro Tips

<ProTips>
  <Tip title="Be Specific">
    "E-commerce with Stripe" beats "online store".
  </Tip>
  <Tip title="Start Simple">
    Create MVP first, use `/enhance` to iterate.
  </Tip>
</ProTips>

## Next Steps

- Run `/create` followed by your app idea
- Use [Add New Feature](/docs/guide/examples/new-feature) to extend

---

### Web Src App Docs Guide Examples Create Content.Ja (`web/src/app/docs/guide/examples/create/content.ja.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, StatusList, StatusItem } from '@/components/mdx'

# 新しいアプリの作成

`/create` ウィザードで、完全なアプリケーションをゼロから構築しましょう。

## 概要

`/create` コマンドはあなたの**アプリケーション作成ウィザード**です。
対話形式のやり取りを通じて案内し、要件を理解し、
アーキテクチャを計画して、各専門エージェントを編成しアプリを構築します。

<Callout type="info">
  **アイデアから動くアプリへ：** 作りたいものを説明するだけで、ウィザードが技術スタック、ファイル構成、データベーススキーマ、実装まで面倒を見ます。
</Callout>

## プロセス

<StepList>
  <Step number={1} title="アプリを説明する">
    何を作りたいかをウィザードに伝えます。必要に応じて確認の質問をします。

    ```bash
    /create e-commerce site with product listing and cart
    ```
  </Step>
  <Step number={2} title="計画を確認する">
    `project-planner` エージェントが詳細な計画を作成します。承認すると先へ進みます。
  </Step>
  <Step number={3} title="エージェントが構築する">
    専門エージェントが並行して作業します：database-architect、backend、frontend。
  </Step>
</StepList>

## セッション例

<Terminal>
  <TerminalLine type="user">/create todo app with dark mode</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**リクエストを分析中……**</TerminalLine>
    Tech Stack: Next.js + Tailwind + Zustand
    <span className="text-yellow-300">続行しますか？(Y/N)</span>
  </TerminalBlock>

  <TerminalLine type="user">Y</TerminalLine>

  <StatusList>
    <StatusItem status="running" label="Backend">store を作成中……</StatusItem>
    <StatusItem status="running" label="Frontend">コンポーネントを構築中……</StatusItem>
  </StatusList>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**🚀 アプリを作成しました！**</TerminalLine>
    Preview: <span className="text-blue-400">http://localhost:3000</span>
  </TerminalBlock>
</Terminal>

## 実践のヒント

<ProTips>
  <Tip title="具体的に">
    「E-commerce with Stripe」は「online store」に勝ります。
  </Tip>
  <Tip title="シンプルに始める">
    まず MVP を作り、`/enhance` で反復しましょう。
  </Tip>
</ProTips>

## 次のステップ

- `/create` の後にアプリのアイデアを続けて実行しましょう
- [新機能の追加](/docs/guide/examples/new-feature)で拡張しましょう

---

### Web Src App Docs Guide Examples Create Content.Vi (`web/src/app/docs/guide/examples/create/content.vi.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, StatusList, StatusItem } from '@/components/mdx'

# Tạo ứng dụng mới

Xây dựng ứng dụng hoàn chỉnh từ đầu với trình hướng dẫn `/create`.

## Tổng quan

Lệnh `/create` là **trình hướng dẫn tạo ứng dụng** của bạn.
Nó dẫn dắt bạn qua một cuộc hội thoại tương tác, hiểu yêu cầu của bạn,
lập kế hoạch kiến trúc và điều phối các tác tử chuyên biệt để dựng ứng dụng.

<Callout type="info">
  **Từ ý tưởng đến ứng dụng chạy được:** Chỉ cần mô tả điều bạn muốn, trình hướng dẫn sẽ lo phần tech stack, cấu trúc file, lược đồ cơ sở dữ liệu và triển khai.
</Callout>

## Quy trình

<StepList>
  <Step number={1} title="Mô tả ứng dụng của bạn">
    Cho trình hướng dẫn biết bạn muốn xây gì. Nó sẽ hỏi để làm rõ nếu cần.

    ```bash
    /create e-commerce site with product listing and cart
    ```
  </Step>
  <Step number={2} title="Xem lại kế hoạch">
    Tác tử `project-planner` tạo một kế hoạch chi tiết. Phê duyệt để tiếp tục.
  </Step>
  <Step number={3} title="Tác tử xây dựng">
    Các tác tử chuyên biệt làm việc song song: database-architect, backend, frontend.
  </Step>
</StepList>

## Phiên làm việc ví dụ

<Terminal>
  <TerminalLine type="user">/create todo app with dark mode</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Đang phân tích yêu cầu...**</TerminalLine>
    Tech Stack: Next.js + Tailwind + Zustand
    <span className="text-yellow-300">Tiếp tục? (Y/N)</span>
  </TerminalBlock>

  <TerminalLine type="user">Y</TerminalLine>

  <StatusList>
    <StatusItem status="running" label="Backend">Đang tạo store...</StatusItem>
    <StatusItem status="running" label="Frontend">Đang dựng component...</StatusItem>
  </StatusList>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**🚀 Đã tạo ứng dụng!**</TerminalLine>
    Preview: <span className="text-blue-400">http://localhost:3000</span>
  </TerminalBlock>
</Terminal>

## Mẹo hay

<ProTips>
  <Tip title="Hãy cụ thể">
    "E-commerce với Stripe" tốt hơn "cửa hàng trực tuyến".
  </Tip>
  <Tip title="Bắt đầu đơn giản">
    Tạo MVP trước, dùng `/enhance` để lặp.
  </Tip>
</ProTips>

## Bước tiếp theo

- Chạy `/create` kèm theo ý tưởng ứng dụng của bạn
- Dùng [Thêm tính năng mới](/docs/guide/examples/new-feature) để mở rộng

---

### Web Src App Docs Guide Examples Create Content.Zh (`web/src/app/docs/guide/examples/create/content.zh.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, StatusList, StatusItem } from '@/components/mdx'

# 创建新应用

使用 `/create` 向导从零构建完整的应用。

## 概述

`/create` 命令是你的**应用创建向导**。
它会通过一段交互式对话引导你，理解你的需求，
规划架构，并编排各个专家智能体来构建你的应用。

<Callout type="info">
  **从想法到可运行的应用：** 只需描述你想要什么，向导会负责技术栈、文件结构、数据库模式和具体实现。
</Callout>

## 流程

<StepList>
  <Step number={1} title="描述你的应用">
    告诉向导你想构建什么。如有需要，它会提出澄清性的问题。

    ```bash
    /create e-commerce site with product listing and cart
    ```
  </Step>
  <Step number={2} title="审阅计划">
    `project-planner` 智能体会生成一份详细的计划。批准后即可继续。
  </Step>
  <Step number={3} title="智能体开始构建">
    专家智能体并行工作：database-architect、backend、frontend。
  </Step>
</StepList>

## 示例会话

<Terminal>
  <TerminalLine type="user">/create todo app with dark mode</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**正在分析请求……**</TerminalLine>
    Tech Stack: Next.js + Tailwind + Zustand
    <span className="text-yellow-300">继续？(Y/N)</span>
  </TerminalBlock>

  <TerminalLine type="user">Y</TerminalLine>

  <StatusList>
    <StatusItem status="running" label="Backend">正在创建 store……</StatusItem>
    <StatusItem status="running" label="Frontend">正在构建组件……</StatusItem>
  </StatusList>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**🚀 应用已创建！**</TerminalLine>
    Preview: <span className="text-blue-400">http://localhost:3000</span>
  </TerminalBlock>
</Terminal>

## 实用技巧

<ProTips>
  <Tip title="尽量具体">
    "E-commerce with Stripe" 胜过 "online store"。
  </Tip>
  <Tip title="从简单开始">
    先创建 MVP，再用 `/enhance` 迭代。
  </Tip>
</ProTips>

## 后续步骤

- 运行 `/create` 并附上你的应用想法
- 用[添加新功能](/docs/guide/examples/new-feature)来扩展

---

### Web Src App Docs Guide Examples Debugging Content.En (`web/src/app/docs/guide/examples/debugging/content.en.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip } from '@/components/mdx'

# Systematic Debugging

Solve complex issues using the rigorous `/debug` workflow.

## Overview

The `/debug` workflow enforces a **4-phase investigation protocol** (Discovery, Hypothesis, Verification, Resolution). It prevents guess-driven development by requiring evidence before code changes.

<Callout type="info" title="When to use:">
  - "The login button does nothing"
  - "API returns 500 error intermittently"
  - "App crashes on mobile only"
</Callout>

## The Process

<StepList>
  <Step number={1} title="Discovery">
    Gathers facts: Error logs, user reports, reproduction steps.

    ```bash
    /debug Login returns 403 even with correct credentials
    ```
  </Step>
  <Step number={2} title="Hypothesis">
    Formulates potential causes prioritized by likelihood.
  </Step>
  <Step number={3} title="Verification">
    Systematically tests each hypothesis using scripts or logs.
  </Step>
  <Step number={4} title="Resolution">
    Implements the fix and adds a regression test.
  </Step>
</StepList>

## Example Session

<Terminal>
  <TerminalLine type="user">/debug Form submission fails silently</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Phase 1: Discovery**</TerminalLine>
    Reading `CheckoutForm.tsx`... Found `handleSubmit`.
    <span className="text-red-400">ERROR: Cannot read properties of undefined</span>
  </TerminalBlock>

  <TerminalBlock>
    <TerminalLine type="agent">**Phase 2: Hypothesis**</TerminalLine>
    <div className="text-xs mt-1">
      1. `emailRef.current` is null on mount<br/>
      2. Event handler not bound correctly
    </div>
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**Phase 4: Resolution**</TerminalLine>
    Fix applied: Added null check to `emailRef`.
    <span className="text-green-400">✅ Test passed: Form submits successfully.</span>
  </TerminalBlock>
</Terminal>

## Pro Tips

<ProTips>
  <Tip title="Provide Context">
    Paste the exact error message or stack trace for faster discovery.
  </Tip>
  <Tip title="Trust, Verify">
    Ask the agent to run the reproduction case again to confirm it's solved.
  </Tip>
</ProTips>

## Next Steps

- Try `/debug` on an existing bug
- See [Deployment](/docs/guide/examples/deployment) to ship your fix

---

### Web Src App Docs Guide Examples Debugging Content.Ja (`web/src/app/docs/guide/examples/debugging/content.ja.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip } from '@/components/mdx'

# 体系的なデバッグ

厳密な `/debug` ワークフローで、複雑な問題を解決しましょう。

## 概要

`/debug` ワークフローは**4 段階の調査プロトコル**（発見、仮説、検証、解決）を徹底させます。コードを変更する前に証拠を求めることで、当て推量に頼った開発を防ぎます。

<Callout type="info" title="こんなときに使います：">
  - 「ログインボタンを押しても何も起きない」
  - 「API がときどき 500 エラーを返す」
  - 「スマホでだけアプリがクラッシュする」
</Callout>

## プロセス

<StepList>
  <Step number={1} title="発見">
    事実を集めます：エラーログ、ユーザー報告、再現手順。

    ```bash
    /debug Login returns 403 even with correct credentials
    ```
  </Step>
  <Step number={2} title="仮説">
    考えられる原因を、可能性の高い順に並べて立てます。
  </Step>
  <Step number={3} title="検証">
    スクリプトやログを使い、各仮説を体系的に検証します。
  </Step>
  <Step number={4} title="解決">
    修正を適用し、回帰テストを追加します。
  </Step>
</StepList>

## セッション例

<Terminal>
  <TerminalLine type="user">/debug Form submission fails silently</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**フェーズ 1：発見**</TerminalLine>
    `CheckoutForm.tsx` を読み込み中…… `handleSubmit` を発見。
    <span className="text-red-400">ERROR: Cannot read properties of undefined</span>
  </TerminalBlock>

  <TerminalBlock>
    <TerminalLine type="agent">**フェーズ 2：仮説**</TerminalLine>
    <div className="text-xs mt-1">
      1. `emailRef.current` が mount 時に null<br/>
      2. イベントハンドラが正しくバインドされていない
    </div>
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**フェーズ 4：解決**</TerminalLine>
    修正を適用：`emailRef` に null チェックを追加しました。
    <span className="text-green-400">✅ Test passed: Form submits successfully.</span>
  </TerminalBlock>
</Terminal>

## 実践のヒント

<ProTips>
  <Tip title="コンテキストを伝える">
    正確なエラーメッセージやスタックトレースを貼ると、発見フェーズが速くなります。
  </Tip>
  <Tip title="信頼しつつ検証する">
    エージェントに再現ケースをもう一度実行させ、本当に解決したか確認しましょう。
  </Tip>
</ProTips>

## 次のステップ

- 既存のバグで `/debug` を試してみましょう
- 修正を出荷するには[デプロイ](/docs/guide/examples/deployment)を参照しましょう

---

### Web Src App Docs Guide Examples Debugging Content.Vi (`web/src/app/docs/guide/examples/debugging/content.vi.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip } from '@/components/mdx'

# Gỡ lỗi có hệ thống

Giải quyết các vấn đề phức tạp với quy trình `/debug` chặt chẽ.

## Tổng quan

Quy trình `/debug` áp dụng một **giao thức điều tra 4 giai đoạn** (Khám phá, Giả thuyết, Kiểm chứng, Khắc phục). Nó ngăn lối phát triển dựa trên phỏng đoán bằng cách yêu cầu có bằng chứng trước khi thay đổi code.

<Callout type="info" title="Khi nào nên dùng:">
  - "Nút đăng nhập không làm gì cả"
  - "API trả về lỗi 500 lúc được lúc không"
  - "Ứng dụng chỉ crash trên điện thoại"
</Callout>

## Quy trình

<StepList>
  <Step number={1} title="Khám phá">
    Thu thập dữ kiện: log lỗi, báo cáo người dùng, các bước tái hiện.

    ```bash
    /debug Login returns 403 even with correct credentials
    ```
  </Step>
  <Step number={2} title="Giả thuyết">
    Đặt ra các nguyên nhân tiềm năng, sắp xếp theo khả năng xảy ra.
  </Step>
  <Step number={3} title="Kiểm chứng">
    Kiểm tra từng giả thuyết một cách có hệ thống bằng script hoặc log.
  </Step>
  <Step number={4} title="Khắc phục">
    Áp dụng bản sửa và thêm một test hồi quy.
  </Step>
</StepList>

## Phiên làm việc ví dụ

<Terminal>
  <TerminalLine type="user">/debug Form submission fails silently</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Giai đoạn 1: Khám phá**</TerminalLine>
    Đang đọc `CheckoutForm.tsx`... Tìm thấy `handleSubmit`.
    <span className="text-red-400">ERROR: Cannot read properties of undefined</span>
  </TerminalBlock>

  <TerminalBlock>
    <TerminalLine type="agent">**Giai đoạn 2: Giả thuyết**</TerminalLine>
    <div className="text-xs mt-1">
      1. `emailRef.current` là null khi mount<br/>
      2. Trình xử lý sự kiện chưa được gắn đúng
    </div>
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**Giai đoạn 4: Khắc phục**</TerminalLine>
    Đã áp dụng bản sửa: Thêm kiểm tra null cho `emailRef`.
    <span className="text-green-400">✅ Test passed: Form submits successfully.</span>
  </TerminalBlock>
</Terminal>

## Mẹo hay

<ProTips>
  <Tip title="Cung cấp ngữ cảnh">
    Dán chính xác thông báo lỗi hoặc stack trace để khám phá nhanh hơn.
  </Tip>
  <Tip title="Tin nhưng phải kiểm">
    Yêu cầu tác tử chạy lại trường hợp tái hiện để xác nhận đã xử lý xong.
  </Tip>
</ProTips>

## Bước tiếp theo

- Thử `/debug` với một lỗi có sẵn
- Xem [Triển khai](/docs/guide/examples/deployment) để phát hành bản sửa của bạn

---

### Web Src App Docs Guide Examples Debugging Content.Zh (`web/src/app/docs/guide/examples/debugging/content.zh.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip } from '@/components/mdx'

# 系统化调试

使用严谨的 `/debug` 工作流解决复杂问题。

## 概述

`/debug` 工作流强制执行一套**四阶段调查协议**（发现、假设、验证、解决）。它要求在改动代码之前先拿出证据，从而避免靠猜测驱动的开发。

<Callout type="info" title="何时使用：">
  - "登录按钮点了没反应"
  - "API 时不时返回 500 错误"
  - "应用只在手机上崩溃"
</Callout>

## 流程

<StepList>
  <Step number={1} title="发现">
    收集事实：错误日志、用户反馈、复现步骤。

    ```bash
    /debug Login returns 403 even with correct credentials
    ```
  </Step>
  <Step number={2} title="假设">
    提出可能的原因，并按可能性高低排序。
  </Step>
  <Step number={3} title="验证">
    用脚本或日志系统化地逐一检验每个假设。
  </Step>
  <Step number={4} title="解决">
    应用修复，并添加一个回归测试。
  </Step>
</StepList>

## 示例会话

<Terminal>
  <TerminalLine type="user">/debug Form submission fails silently</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**阶段 1：发现**</TerminalLine>
    正在读取 `CheckoutForm.tsx`…… 找到了 `handleSubmit`。
    <span className="text-red-400">ERROR: Cannot read properties of undefined</span>
  </TerminalBlock>

  <TerminalBlock>
    <TerminalLine type="agent">**阶段 2：假设**</TerminalLine>
    <div className="text-xs mt-1">
      1. `emailRef.current` 在 mount 时为 null<br/>
      2. 事件处理器绑定不正确
    </div>
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**阶段 4：解决**</TerminalLine>
    已应用修复：为 `emailRef` 添加了 null 检查。
    <span className="text-green-400">✅ Test passed: Form submits successfully.</span>
  </TerminalBlock>
</Terminal>

## 实用技巧

<ProTips>
  <Tip title="提供上下文">
    粘贴确切的错误信息或堆栈跟踪，能让发现阶段更快。
  </Tip>
  <Tip title="信任，但要验证">
    让智能体再次运行复现用例，以确认问题确实解决了。
  </Tip>
</ProTips>

## 后续步骤

- 在一个现有的 bug 上试试 `/debug`
- 查看[部署](/docs/guide/examples/deployment)以发布你的修复

---

### Web Src App Docs Guide Examples Deployment Content.En (`web/src/app/docs/guide/examples/deployment/content.en.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip } from '@/components/mdx'

# Production Deployment

Ship with confidence using the safety-first `/deploy` workflow.

## Overview

The `/deploy` command is an **Audit & Release Conductor**.
It forces your code to pass a rigorous health check before deployment.

<Callout type="info" title="It stops you from deploying if:">
  - Security vulnerabilities are found
  - Linting errors exist
  - TypeScript types are invalid
  - Critical tests fail
</Callout>

## The Process

<StepList>
  <Step number={1} title="Execute Command">
    When your code is ready, trigger the deployment pipeline.

    ```bash
    /deploy
    ```
  </Step>
  <Step number={2} title="Pre-Flight Checklist">
    The agent automatically audits your project health.

    <div className="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
      <div className="bg-zinc-50 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-3">
        <h4 className="text-sm font-semibold mb-1">🛡️ Security</h4>
        <p className="text-xs text-zinc-500 dark:text-zinc-400 m-0">Scans for vulnerabilities & secrets</p>
      </div>
      <div className="bg-zinc-50 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-3">
        <h4 className="text-sm font-semibold mb-1">📋 Quality</h4>
        <p className="text-xs text-zinc-500 dark:text-zinc-400 m-0">Enforces Linting & Type Safety</p>
      </div>
    </div>
  </Step>
  <Step number={3} title="Release">
    If checks pass, it builds and pushes to your platform (Vercel, Docker, etc).
  </Step>
</StepList>

## Example Session

<Terminal>
  <TerminalLine type="user">/deploy</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Running Pre-Flight Checks...**</TerminalLine>
    <div className="space-y-1 mt-2">
      <div>🔄 Security Scan... <span className="text-green-400">PASSED</span></div>
      <div>🔄 Lint Check... <span className="text-green-400">PASSED</span></div>
      <div>🔄 Type Validation... <span className="text-green-400">PASSED</span></div>
    </div>
    <br/>
    <span className="text-green-400">✅ All checks passed!</span>
    Deploying to Vercel...
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**🚀 Deployment Complete!**</TerminalLine>
    <div className="space-y-1 mt-2">
      <div>🌐 URL: <span className="text-blue-400">https://my-app.vercel.app</span></div>
      <div>💚 Health Check: <span className="text-green-400">OK</span></div>
    </div>
  </TerminalBlock>
</Terminal>

## Pro Tips

<ProTips>
  <Tip title="Check First">
    Run `/deploy check` to dry-run validations without deploying.
  </Tip>
  <Tip title="Rollback Safety">
    Use `/deploy rollback` to instantly revert to the last stable version.
  </Tip>
</ProTips>

## Next Steps

- Try `/deploy check` to run pre-flight checks
- Learn about [Multi-Agent Orchestration](/docs/guide/examples/orchestration)

---

### Web Src App Docs Guide Examples Deployment Content.Ja (`web/src/app/docs/guide/examples/deployment/content.ja.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip } from '@/components/mdx'

# 本番環境へのデプロイ

安全第一の `/deploy` ワークフローで、自信を持ってリリースしましょう。

## 概要

`/deploy` コマンドは**監査とリリースの指揮官**です。
デプロイ前に、コードへ厳格なヘルスチェックを強制的に通過させます。

<Callout type="info" title="次の場合はデプロイを止めます：">
  - セキュリティの脆弱性が見つかった
  - linting エラーがある
  - TypeScript の型が不正
  - 重要なテストが失敗した
</Callout>

## プロセス

<StepList>
  <Step number={1} title="コマンドを実行する">
    コードの準備ができたら、デプロイパイプラインを起動します。

    ```bash
    /deploy
    ```
  </Step>
  <Step number={2} title="出発前チェックリスト">
    エージェントがプロジェクトの健全性を自動で監査します。

    <div className="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
      <div className="bg-zinc-50 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-3">
        <h4 className="text-sm font-semibold mb-1">🛡️ セキュリティ</h4>
        <p className="text-xs text-zinc-500 dark:text-zinc-400 m-0">脆弱性とシークレットをスキャン</p>
      </div>
      <div className="bg-zinc-50 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-3">
        <h4 className="text-sm font-semibold mb-1">📋 品質</h4>
        <p className="text-xs text-zinc-500 dark:text-zinc-400 m-0">Linting と型安全性を強制</p>
      </div>
    </div>
  </Step>
  <Step number={3} title="リリース">
    チェックを通過すると、ビルドしてあなたのプラットフォーム（Vercel、Docker など）へプッシュします。
  </Step>
</StepList>

## セッション例

<Terminal>
  <TerminalLine type="user">/deploy</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**出発前チェックを実行中……**</TerminalLine>
    <div className="space-y-1 mt-2">
      <div>🔄 セキュリティスキャン…… <span className="text-green-400">PASSED</span></div>
      <div>🔄 Lint チェック…… <span className="text-green-400">PASSED</span></div>
      <div>🔄 型の検証…… <span className="text-green-400">PASSED</span></div>
    </div>
    <br/>
    <span className="text-green-400">✅ すべてのチェックを通過しました！</span>
    Vercel へデプロイ中……
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**🚀 デプロイ完了！**</TerminalLine>
    <div className="space-y-1 mt-2">
      <div>🌐 URL: <span className="text-blue-400">https://my-app.vercel.app</span></div>
      <div>💚 ヘルスチェック: <span className="text-green-400">OK</span></div>
    </div>
  </TerminalBlock>
</Terminal>

## 実践のヒント

<ProTips>
  <Tip title="まずチェック">
    実際にはデプロイせず、`/deploy check` で検証をドライランしましょう。
  </Tip>
  <Tip title="ロールバックの安心">
    `/deploy rollback` で、直前の安定版へ即座に戻せます。
  </Tip>
</ProTips>

## 次のステップ

- `/deploy check` を試して出発前チェックを実行しましょう
- [マルチエージェントのオーケストレーション](/docs/guide/examples/orchestration)について学びましょう

---

### Web Src App Docs Guide Examples Deployment Content.Vi (`web/src/app/docs/guide/examples/deployment/content.vi.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip } from '@/components/mdx'

# Triển khai production

Phát hành tự tin với quy trình `/deploy` đặt an toàn lên hàng đầu.

## Tổng quan

Lệnh `/deploy` là một **Nhạc trưởng Kiểm toán & Phát hành**.
Nó buộc code của bạn phải vượt qua một kiểm tra sức khỏe nghiêm ngặt trước khi triển khai.

<Callout type="info" title="Nó ngăn bạn triển khai nếu:">
  - Phát hiện lỗ hổng bảo mật
  - Tồn tại lỗi linting
  - Kiểu TypeScript không hợp lệ
  - Test quan trọng thất bại
</Callout>

## Quy trình

<StepList>
  <Step number={1} title="Thực thi lệnh">
    Khi code đã sẵn sàng, kích hoạt pipeline triển khai.

    ```bash
    /deploy
    ```
  </Step>
  <Step number={2} title="Danh sách kiểm tra trước khi bay">
    Tác tử tự động kiểm toán sức khỏe dự án của bạn.

    <div className="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
      <div className="bg-zinc-50 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-3">
        <h4 className="text-sm font-semibold mb-1">🛡️ Bảo mật</h4>
        <p className="text-xs text-zinc-500 dark:text-zinc-400 m-0">Quét lỗ hổng & secret</p>
      </div>
      <div className="bg-zinc-50 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-3">
        <h4 className="text-sm font-semibold mb-1">📋 Chất lượng</h4>
        <p className="text-xs text-zinc-500 dark:text-zinc-400 m-0">Áp dụng Linting & An toàn kiểu</p>
      </div>
    </div>
  </Step>
  <Step number={3} title="Phát hành">
    Nếu các kiểm tra vượt qua, nó build và đẩy lên nền tảng của bạn (Vercel, Docker, v.v).
  </Step>
</StepList>

## Phiên làm việc ví dụ

<Terminal>
  <TerminalLine type="user">/deploy</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Đang chạy kiểm tra trước khi bay...**</TerminalLine>
    <div className="space-y-1 mt-2">
      <div>🔄 Quét bảo mật... <span className="text-green-400">PASSED</span></div>
      <div>🔄 Kiểm tra Lint... <span className="text-green-400">PASSED</span></div>
      <div>🔄 Xác thực kiểu... <span className="text-green-400">PASSED</span></div>
    </div>
    <br/>
    <span className="text-green-400">✅ Tất cả kiểm tra đã qua!</span>
    Đang triển khai lên Vercel...
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**🚀 Triển khai hoàn tất!**</TerminalLine>
    <div className="space-y-1 mt-2">
      <div>🌐 URL: <span className="text-blue-400">https://my-app.vercel.app</span></div>
      <div>💚 Kiểm tra sức khỏe: <span className="text-green-400">OK</span></div>
    </div>
  </TerminalBlock>
</Terminal>

## Mẹo hay

<ProTips>
  <Tip title="Kiểm tra trước">
    Chạy `/deploy check` để chạy thử các xác thực mà không triển khai.
  </Tip>
  <Tip title="An toàn rollback">
    Dùng `/deploy rollback` để lập tức quay về phiên bản ổn định gần nhất.
  </Tip>
</ProTips>

## Bước tiếp theo

- Thử `/deploy check` để chạy các kiểm tra trước khi bay
- Tìm hiểu về [Điều phối đa tác tử](/docs/guide/examples/orchestration)

---

### Web Src App Docs Guide Examples Deployment Content.Zh (`web/src/app/docs/guide/examples/deployment/content.zh.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip } from '@/components/mdx'

# 生产环境部署

使用安全优先的 `/deploy` 工作流，从容发布。

## 概述

`/deploy` 命令是一位**审计与发布指挥官**。
它会强制你的代码在部署前通过一轮严格的健康检查。

<Callout type="info" title="出现以下情况它会阻止你部署：">
  - 发现安全漏洞
  - 存在 linting 错误
  - TypeScript 类型不合法
  - 关键测试失败
</Callout>

## 流程

<StepList>
  <Step number={1} title="执行命令">
    当代码准备就绪时，触发部署流水线。

    ```bash
    /deploy
    ```
  </Step>
  <Step number={2} title="起飞前检查清单">
    智能体会自动审计你的项目健康状况。

    <div className="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
      <div className="bg-zinc-50 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-3">
        <h4 className="text-sm font-semibold mb-1">🛡️ 安全</h4>
        <p className="text-xs text-zinc-500 dark:text-zinc-400 m-0">扫描漏洞与密钥</p>
      </div>
      <div className="bg-zinc-50 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-3">
        <h4 className="text-sm font-semibold mb-1">📋 质量</h4>
        <p className="text-xs text-zinc-500 dark:text-zinc-400 m-0">强制 Linting 与类型安全</p>
      </div>
    </div>
  </Step>
  <Step number={3} title="发布">
    如果检查通过，它会构建并推送到你的平台（Vercel、Docker 等）。
  </Step>
</StepList>

## 示例会话

<Terminal>
  <TerminalLine type="user">/deploy</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**正在运行起飞前检查……**</TerminalLine>
    <div className="space-y-1 mt-2">
      <div>🔄 安全扫描…… <span className="text-green-400">PASSED</span></div>
      <div>🔄 Lint 检查…… <span className="text-green-400">PASSED</span></div>
      <div>🔄 类型校验…… <span className="text-green-400">PASSED</span></div>
    </div>
    <br/>
    <span className="text-green-400">✅ 所有检查均已通过！</span>
    正在部署到 Vercel……
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**🚀 部署完成！**</TerminalLine>
    <div className="space-y-1 mt-2">
      <div>🌐 URL: <span className="text-blue-400">https://my-app.vercel.app</span></div>
      <div>💚 健康检查: <span className="text-green-400">OK</span></div>
    </div>
  </TerminalBlock>
</Terminal>

## 实用技巧

<ProTips>
  <Tip title="先检查">
    运行 `/deploy check` 进行试运行校验，而不实际部署。
  </Tip>
  <Tip title="回滚保障">
    使用 `/deploy rollback` 即刻回退到上一个稳定版本。
  </Tip>
</ProTips>

## 后续步骤

- 试试 `/deploy check` 来运行起飞前检查
- 了解[多智能体编排](/docs/guide/examples/orchestration)

---

### Web Src App Docs Guide Examples New Feature Content.En (`web/src/app/docs/guide/examples/new-feature/content.en.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature, StatusList, StatusItem } from '@/components/mdx'

# Add a New Feature

Learn how to safely add complex features to an existing codebase using the `/enhance` workflow.

## Overview

The `/enhance` workflow is your day-to-day tool for iterative development.
Unlike `/create` which builds from scratch, `/enhance` focuses on surgically adding functionality without breaking existing code.

<Callout type="info">
  **Scenario:** Adding a "Dashboard Analytics" feature to an existing SaaS application.
</Callout>

## The Process

<StepList>
  <Step number={1} title="Feature Planning">
    Describe your feature requirements clearly.

    ```bash
    /enhance Add an analytics dashboard for user activity
    Requirements:
    - Track daily active users and page views
    - Visual charts using Recharts
    - API endpoint to aggregate data
    ```
  </Step>
  <Step number={2} title="Component Implementation">
    Specialists implement the full vertical slice.

    <FeatureGrid cols={4}>
      <Feature title="Database" />
      <Feature title="Backend" />
      <Feature title="Frontend" />
      <Feature title="Testing" />
    </FeatureGrid>
  </Step>
  <Step number={3} title="Verify Integration">
    Run `final checks` to validate bundle size, accessibility, and tests.
  </Step>
</StepList>

## Example Session

<Terminal>
  <TerminalLine type="user">/enhance add dark mode toggle</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Analyzing codebase...**</TerminalLine>
    <div className="text-xs mt-2">
      Found: Tailwind CSS with no dark mode config<br/>
      Plan: Update tailwind.config, add ThemeProvider, create toggle component
    </div>
  </TerminalBlock>

  <StatusList>
    <StatusItem status="running" label="Frontend">Creating ThemeToggle...</StatusItem>
    <StatusItem status="running" label="Testing">Adding theme tests...</StatusItem>
  </StatusList>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ Feature Added!**</TerminalLine>
    <span className="text-zinc-400">Run `/preview start` to test.</span>
  </TerminalBlock>
</Terminal>

## Pro Tips

<ProTips>
  <Tip title="Check Dependencies">
    Use `checklist.py` to prevent bundle bloat from new libraries.
  </Tip>
  <Tip title="Keep It Modular">
    Isolate new components to minimize side effects on existing code.
  </Tip>
</ProTips>

## Next Steps

- Try `/enhance` in your project
- See [Test Generation](/docs/guide/examples/test) for coverage

---

### Web Src App Docs Guide Examples New Feature Content.Ja (`web/src/app/docs/guide/examples/new-feature/content.ja.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature, StatusList, StatusItem } from '@/components/mdx'

# 新機能の追加

`/enhance` ワークフローで、既存のコードベースに複雑な機能を安全に追加する方法を学びましょう。

## 概要

`/enhance` ワークフローは、日々の反復開発に使うツールです。
ゼロから構築する `/create` とは違い、`/enhance` は既存コードを壊さずに、外科手術のように機能を追加することに集中します。

<Callout type="info">
  **シナリオ：** 既存の SaaS アプリに「ダッシュボード分析」機能を追加します。
</Callout>

## プロセス

<StepList>
  <Step number={1} title="機能の計画">
    機能の要件を明確に説明します。

    ```bash
    /enhance Add an analytics dashboard for user activity
    Requirements:
    - Track daily active users and page views
    - Visual charts using Recharts
    - API endpoint to aggregate data
    ```
  </Step>
  <Step number={2} title="コンポーネントの実装">
    専門エージェントが垂直スライス全体を実装します。

    <FeatureGrid cols={4}>
      <Feature title="Database" />
      <Feature title="Backend" />
      <Feature title="Frontend" />
      <Feature title="Testing" />
    </FeatureGrid>
  </Step>
  <Step number={3} title="統合の検証">
    `final checks` を実行して、バンドルサイズ、アクセシビリティ、テストを検証します。
  </Step>
</StepList>

## セッション例

<Terminal>
  <TerminalLine type="user">/enhance add dark mode toggle</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**コードベースを分析中……**</TerminalLine>
    <div className="text-xs mt-2">
      発見：Tailwind CSS に dark mode の設定がありません<br/>
      計画：tailwind.config を更新し、ThemeProvider を追加し、toggle コンポーネントを作成
    </div>
  </TerminalBlock>

  <StatusList>
    <StatusItem status="running" label="Frontend">ThemeToggle を作成中……</StatusItem>
    <StatusItem status="running" label="Testing">テーマのテストを追加中……</StatusItem>
  </StatusList>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ 機能を追加しました！**</TerminalLine>
    <span className="text-zinc-400">`/preview start` を実行してテストしましょう。</span>
  </TerminalBlock>
</Terminal>

## 実践のヒント

<ProTips>
  <Tip title="依存関係をチェック">
    `checklist.py` を使って、新しいライブラリによるバンドルの肥大化を防ぎましょう。
  </Tip>
  <Tip title="モジュール性を保つ">
    新しいコンポーネントを隔離し、既存コードへの副作用を最小限に抑えましょう。
  </Tip>
</ProTips>

## 次のステップ

- あなたのプロジェクトで `/enhance` を試してみましょう
- カバレッジについては[テスト生成](/docs/guide/examples/test)を参照しましょう

---

### Web Src App Docs Guide Examples New Feature Content.Vi (`web/src/app/docs/guide/examples/new-feature/content.vi.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature, StatusList, StatusItem } from '@/components/mdx'

# Thêm tính năng mới

Tìm hiểu cách thêm các tính năng phức tạp vào codebase có sẵn một cách an toàn với quy trình `/enhance`.

## Tổng quan

Quy trình `/enhance` là công cụ hằng ngày cho việc phát triển lặp.
Khác với `/create` (dựng từ đầu), `/enhance` tập trung thêm chức năng một cách phẫu thuật mà không phá vỡ code hiện có.

<Callout type="info">
  **Tình huống:** Thêm tính năng "Dashboard Analytics" vào một ứng dụng SaaS có sẵn.
</Callout>

## Quy trình

<StepList>
  <Step number={1} title="Lập kế hoạch tính năng">
    Mô tả yêu cầu tính năng của bạn thật rõ ràng.

    ```bash
    /enhance Add an analytics dashboard for user activity
    Requirements:
    - Track daily active users and page views
    - Visual charts using Recharts
    - API endpoint to aggregate data
    ```
  </Step>
  <Step number={2} title="Triển khai thành phần">
    Các chuyên gia triển khai trọn vẹn lát cắt dọc (vertical slice).

    <FeatureGrid cols={4}>
      <Feature title="Database" />
      <Feature title="Backend" />
      <Feature title="Frontend" />
      <Feature title="Testing" />
    </FeatureGrid>
  </Step>
  <Step number={3} title="Kiểm tra tích hợp">
    Chạy `final checks` để xác thực kích thước bundle, khả năng truy cập và kiểm thử.
  </Step>
</StepList>

## Phiên làm việc ví dụ

<Terminal>
  <TerminalLine type="user">/enhance add dark mode toggle</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Đang phân tích codebase...**</TerminalLine>
    <div className="text-xs mt-2">
      Phát hiện: Tailwind CSS chưa cấu hình dark mode<br/>
      Kế hoạch: Cập nhật tailwind.config, thêm ThemeProvider, tạo component toggle
    </div>
  </TerminalBlock>

  <StatusList>
    <StatusItem status="running" label="Frontend">Đang tạo ThemeToggle...</StatusItem>
    <StatusItem status="running" label="Testing">Đang thêm test cho theme...</StatusItem>
  </StatusList>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ Đã thêm tính năng!**</TerminalLine>
    <span className="text-zinc-400">Chạy `/preview start` để kiểm thử.</span>
  </TerminalBlock>
</Terminal>

## Mẹo hay

<ProTips>
  <Tip title="Kiểm tra dependency">
    Dùng `checklist.py` để tránh bundle phình to vì thư viện mới.
  </Tip>
  <Tip title="Giữ tính mô-đun">
    Cô lập component mới để giảm thiểu ảnh hưởng phụ lên code hiện có.
  </Tip>
</ProTips>

## Bước tiếp theo

- Thử `/enhance` trong dự án của bạn
- Xem [Sinh kiểm thử](/docs/guide/examples/test) để biết về độ phủ

---

### Web Src App Docs Guide Examples New Feature Content.Zh (`web/src/app/docs/guide/examples/new-feature/content.zh.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature, StatusList, StatusItem } from '@/components/mdx'

# 添加新功能

学习如何使用 `/enhance` 工作流，安全地为现有代码库添加复杂功能。

## 概述

`/enhance` 工作流是你日常迭代开发的工具。
与从零构建的 `/create` 不同，`/enhance` 专注于像做手术一样精准地添加功能，而不破坏现有代码。

<Callout type="info">
  **场景：** 为一个现有的 SaaS 应用添加"仪表盘分析"功能。
</Callout>

## 流程

<StepList>
  <Step number={1} title="功能规划">
    清晰地描述你的功能需求。

    ```bash
    /enhance Add an analytics dashboard for user activity
    Requirements:
    - Track daily active users and page views
    - Visual charts using Recharts
    - API endpoint to aggregate data
    ```
  </Step>
  <Step number={2} title="组件实现">
    专家智能体会实现完整的垂直切片。

    <FeatureGrid cols={4}>
      <Feature title="Database" />
      <Feature title="Backend" />
      <Feature title="Frontend" />
      <Feature title="Testing" />
    </FeatureGrid>
  </Step>
  <Step number={3} title="验证集成">
    运行 `final checks` 来校验打包体积、无障碍性和测试。
  </Step>
</StepList>

## 示例会话

<Terminal>
  <TerminalLine type="user">/enhance add dark mode toggle</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**正在分析代码库……**</TerminalLine>
    <div className="text-xs mt-2">
      发现：Tailwind CSS 尚未配置 dark mode<br/>
      计划：更新 tailwind.config，添加 ThemeProvider，创建 toggle 组件
    </div>
  </TerminalBlock>

  <StatusList>
    <StatusItem status="running" label="Frontend">正在创建 ThemeToggle……</StatusItem>
    <StatusItem status="running" label="Testing">正在添加主题测试……</StatusItem>
  </StatusList>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ 功能已添加！**</TerminalLine>
    <span className="text-zinc-400">运行 `/preview start` 来测试。</span>
  </TerminalBlock>
</Terminal>

## 实用技巧

<ProTips>
  <Tip title="检查依赖">
    使用 `checklist.py` 来防止新库导致打包体积膨胀。
  </Tip>
  <Tip title="保持模块化">
    隔离新组件，把对现有代码的副作用降到最低。
  </Tip>
</ProTips>

## 后续步骤

- 在你的项目中试试 `/enhance`
- 查看[测试生成](/docs/guide/examples/test)以了解覆盖率

---

### Web Src App Docs Guide Examples Orchestration Content.En (`web/src/app/docs/guide/examples/orchestration/content.en.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature, StatusList, StatusItem } from '@/components/mdx'

# Multi-Agent Orchestration

Build entire SaaS platforms by coordinating specialist agents with the `/orchestrate` workflow.

## Overview

Most AI interactions are 1-on-1. The `orchestrator` agent changes this by acting as a **Project Manager**.
It breaks down a large request (e.g., "Build a SaaS MVP") into tasks and assigns them to the best specialist for the job.

<FeatureGrid>
  <Feature title="Backend" description="API & DB Architect" />
  <Feature title="Frontend" description="UI/UX Specialist" />
  <Feature title="Security" description="Safety Auditor" />
  <Feature title="QA" description="Test Engineer" />
</FeatureGrid>

## The Process

<StepList>
  <Step number={1} title="Project Brief">
    Describe the high-level goal. The orchestrator will interview you to clarify requirements.

    ```bash
    /orchestrate Build a "Course Platform" MVP with:
    - User Authentication (NextAuth)
    - Stripe Payments
    - Video Hosting (Mux)
    - Dashboard for Instructors
    ```
  </Step>
  <Step number={2} title="Phase 1: Planning">
    The `project-planner` agent creates a detailed roadmap (`{task-slug}.md` in the project root).

    <div className="bg-zinc-50 dark:bg-zinc-900 p-3 rounded-lg text-xs font-mono border-l-2 border-blue-500 mt-2">
      ...<br/>
      ### 2.1 Database Schema<br/>
      - Users (id, email, role)<br/>
      - Courses (id, title, price)<br/>
      ...
    </div>
  </Step>
  <Step number={3} title="Phase 2: Execution">
    Agents work in parallel. The Orchestrator monitors progress and unblocks dependencies.
  </Step>
</StepList>

## Example Session

<Terminal>
  <TerminalLine type="user">/orchestrate Build E-commerce MVP</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Activating Squad...**</TerminalLine>
    Assigning tasks based on the `{task-slug}.md` plan:
  </TerminalBlock>

  <StatusList>
    <StatusItem status="running" label="Backend-Specialist">Configuring Prisma Schema...</StatusItem>
    <StatusItem status="running" label="Frontend-Specialist">Building ProductCard component...</StatusItem>
    <StatusItem status="running" label="Security-Auditor">Reviewing auth flow...</StatusItem>
  </StatusList>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ Project Complete!**</TerminalLine>
    All tasks finished. Run `npm run dev` to start.
  </TerminalBlock>
</Terminal>

## Pro Tips

<ProTips>
  <Tip title="Start Small">
    Don't try to build Facebook in one go. Orchestrate an MVP first, then use `/enhance` to iterate.
  </Tip>
  <Tip title="Define Auth">
    Always specify how users log in (e.g., "Use NextAuth with GitHub"). It's a key architectural decision.
  </Tip>
</ProTips>

## Next Steps

- Learn about [Systematic Debugging](/docs/guide/examples/debugging) to maintain your complex app
- See [Deployment](/docs/guide/examples/deployment) to ship your MVP

---

### Web Src App Docs Guide Examples Orchestration Content.Ja (`web/src/app/docs/guide/examples/orchestration/content.ja.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature, StatusList, StatusItem } from '@/components/mdx'

# マルチエージェントのオーケストレーション

`/orchestrate` ワークフローで専門エージェントを連携させ、SaaS プラットフォーム全体を構築しましょう。

## 概要

ほとんどの AI とのやり取りは 1 対 1 です。`orchestrator` エージェントは**プロジェクトマネージャー**として振る舞うことで、これを変えます。
大きなリクエスト（例：「SaaS の MVP を作る」）をタスクに分解し、その仕事に最適な専門家へ割り当てます。

<FeatureGrid>
  <Feature title="Backend" description="API とDBのアーキテクト" />
  <Feature title="Frontend" description="UI/UX の専門家" />
  <Feature title="Security" description="安全性の監査担当" />
  <Feature title="QA" description="テストエンジニア" />
</FeatureGrid>

## プロセス

<StepList>
  <Step number={1} title="プロジェクトの概要">
    高レベルの目標を説明します。orchestrator がヒアリングして要件を明確にします。

    ```bash
    /orchestrate Build a "Course Platform" MVP with:
    - User Authentication (NextAuth)
    - Stripe Payments
    - Video Hosting (Mux)
    - Dashboard for Instructors
    ```
  </Step>
  <Step number={2} title="フェーズ 1：計画">
    `project-planner` エージェントが詳細なロードマップ（プロジェクトルートの `{task-slug}.md`）を作成します。

    <div className="bg-zinc-50 dark:bg-zinc-900 p-3 rounded-lg text-xs font-mono border-l-2 border-blue-500 mt-2">
      ...<br/>
      ### 2.1 Database Schema<br/>
      - Users (id, email, role)<br/>
      - Courses (id, title, price)<br/>
      ...
    </div>
  </Step>
  <Step number={3} title="フェーズ 2：実行">
    各エージェントが並行して作業します。Orchestrator は進捗を監視し、依存関係のブロックを解消します。
  </Step>
</StepList>

## セッション例

<Terminal>
  <TerminalLine type="user">/orchestrate Build E-commerce MVP</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**チームを起動中……**</TerminalLine>
    `{task-slug}.md` の計画に基づいてタスクを割り当て：
  </TerminalBlock>

  <StatusList>
    <StatusItem status="running" label="Backend-Specialist">Prisma Schema を設定中……</StatusItem>
    <StatusItem status="running" label="Frontend-Specialist">ProductCard コンポーネントを構築中……</StatusItem>
    <StatusItem status="running" label="Security-Auditor">認証フローをレビュー中……</StatusItem>
  </StatusList>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ プロジェクト完了！**</TerminalLine>
    すべてのタスクが完了しました。`npm run dev` を実行して起動しましょう。
  </TerminalBlock>
</Terminal>

## 実践のヒント

<ProTips>
  <Tip title="小さく始める">
    一度に Facebook を作ろうとしないこと。まず MVP をオーケストレーションし、それから `/enhance` で反復しましょう。
  </Tip>
  <Tip title="認証を定義する">
    ユーザーがどうログインするかを必ず指定しましょう（例：「NextAuth と GitHub を使う」）。これは重要なアーキテクチャ上の判断です。
  </Tip>
</ProTips>

## 次のステップ

- 複雑なアプリを維持するために[体系的なデバッグ](/docs/guide/examples/debugging)について学びましょう
- MVP を出荷するには[デプロイ](/docs/guide/examples/deployment)を参照しましょう

---

### Web Src App Docs Guide Examples Orchestration Content.Vi (`web/src/app/docs/guide/examples/orchestration/content.vi.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature, StatusList, StatusItem } from '@/components/mdx'

# Điều phối đa tác tử

Xây dựng cả nền tảng SaaS bằng cách điều phối các tác tử chuyên biệt với quy trình `/orchestrate`.

## Tổng quan

Hầu hết tương tác với AI đều là 1-đối-1. Tác tử `orchestrator` thay đổi điều này bằng cách đóng vai trò **Quản lý dự án**.
Nó phân rã một yêu cầu lớn (ví dụ "Xây dựng SaaS MVP") thành các tác vụ và giao cho chuyên gia phù hợp nhất với từng việc.

<FeatureGrid>
  <Feature title="Backend" description="Kiến trúc sư API & DB" />
  <Feature title="Frontend" description="Chuyên gia UI/UX" />
  <Feature title="Security" description="Kiểm toán an toàn" />
  <Feature title="QA" description="Kỹ sư kiểm thử" />
</FeatureGrid>

## Quy trình

<StepList>
  <Step number={1} title="Tóm tắt dự án">
    Mô tả mục tiêu tổng thể. Orchestrator sẽ phỏng vấn bạn để làm rõ yêu cầu.

    ```bash
    /orchestrate Build a "Course Platform" MVP with:
    - User Authentication (NextAuth)
    - Stripe Payments
    - Video Hosting (Mux)
    - Dashboard for Instructors
    ```
  </Step>
  <Step number={2} title="Giai đoạn 1: Lập kế hoạch">
    Tác tử `project-planner` tạo lộ trình chi tiết (`{task-slug}.md` ở thư mục gốc dự án).

    <div className="bg-zinc-50 dark:bg-zinc-900 p-3 rounded-lg text-xs font-mono border-l-2 border-blue-500 mt-2">
      ...<br/>
      ### 2.1 Database Schema<br/>
      - Users (id, email, role)<br/>
      - Courses (id, title, price)<br/>
      ...
    </div>
  </Step>
  <Step number={3} title="Giai đoạn 2: Thực thi">
    Các tác tử làm việc song song. Orchestrator theo dõi tiến độ và gỡ các phụ thuộc bị nghẽn.
  </Step>
</StepList>

## Phiên làm việc ví dụ

<Terminal>
  <TerminalLine type="user">/orchestrate Build E-commerce MVP</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Đang kích hoạt đội ngũ...**</TerminalLine>
    Giao tác vụ dựa trên kế hoạch `{task-slug}.md`:
  </TerminalBlock>

  <StatusList>
    <StatusItem status="running" label="Backend-Specialist">Đang cấu hình Prisma Schema...</StatusItem>
    <StatusItem status="running" label="Frontend-Specialist">Đang dựng component ProductCard...</StatusItem>
    <StatusItem status="running" label="Security-Auditor">Đang rà soát luồng xác thực...</StatusItem>
  </StatusList>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ Dự án hoàn tất!**</TerminalLine>
    Mọi tác vụ đã xong. Chạy `npm run dev` để bắt đầu.
  </TerminalBlock>
</Terminal>

## Mẹo hay

<ProTips>
  <Tip title="Bắt đầu nhỏ">
    Đừng cố xây Facebook trong một lần. Hãy điều phối một MVP trước, rồi dùng `/enhance` để lặp.
  </Tip>
  <Tip title="Xác định xác thực">
    Luôn nêu rõ người dùng đăng nhập thế nào (ví dụ "Dùng NextAuth với GitHub"). Đây là quyết định kiến trúc then chốt.
  </Tip>
</ProTips>

## Bước tiếp theo

- Tìm hiểu [Gỡ lỗi có hệ thống](/docs/guide/examples/debugging) để duy trì ứng dụng phức tạp
- Xem [Triển khai](/docs/guide/examples/deployment) để phát hành MVP của bạn

---

### Web Src App Docs Guide Examples Orchestration Content.Zh (`web/src/app/docs/guide/examples/orchestration/content.zh.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature, StatusList, StatusItem } from '@/components/mdx'

# 多智能体编排

使用 `/orchestrate` 工作流，通过协调多个专家智能体来构建整个 SaaS 平台。

## 概述

大多数 AI 交互都是一对一的。`orchestrator` 智能体改变了这一点，它扮演**项目经理**的角色。
它会把一个庞大的需求（例如"构建一个 SaaS MVP"）拆解成多个任务，并分派给最擅长该任务的专家。

<FeatureGrid>
  <Feature title="Backend" description="API 与数据库架构师" />
  <Feature title="Frontend" description="UI/UX 专家" />
  <Feature title="Security" description="安全审计员" />
  <Feature title="QA" description="测试工程师" />
</FeatureGrid>

## 流程

<StepList>
  <Step number={1} title="项目简报">
    描述高层目标。orchestrator 会通过提问来澄清需求。

    ```bash
    /orchestrate Build a "Course Platform" MVP with:
    - User Authentication (NextAuth)
    - Stripe Payments
    - Video Hosting (Mux)
    - Dashboard for Instructors
    ```
  </Step>
  <Step number={2} title="阶段 1：规划">
    `project-planner` 智能体会生成一份详细的路线图（项目根目录下的 `{task-slug}.md`）。

    <div className="bg-zinc-50 dark:bg-zinc-900 p-3 rounded-lg text-xs font-mono border-l-2 border-blue-500 mt-2">
      ...<br/>
      ### 2.1 Database Schema<br/>
      - Users (id, email, role)<br/>
      - Courses (id, title, price)<br/>
      ...
    </div>
  </Step>
  <Step number={3} title="阶段 2：执行">
    各智能体并行工作。Orchestrator 监控进度并疏通被阻塞的依赖。
  </Step>
</StepList>

## 示例会话

<Terminal>
  <TerminalLine type="user">/orchestrate Build E-commerce MVP</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**正在激活小队……**</TerminalLine>
    依据 `{task-slug}.md` 计划分派任务：
  </TerminalBlock>

  <StatusList>
    <StatusItem status="running" label="Backend-Specialist">正在配置 Prisma Schema……</StatusItem>
    <StatusItem status="running" label="Frontend-Specialist">正在构建 ProductCard 组件……</StatusItem>
    <StatusItem status="running" label="Security-Auditor">正在审查认证流程……</StatusItem>
  </StatusList>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ 项目完成！**</TerminalLine>
    所有任务已完成。运行 `npm run dev` 即可启动。
  </TerminalBlock>
</Terminal>

## 实用技巧

<ProTips>
  <Tip title="从小处着手">
    别想着一口气造出一个 Facebook。先编排一个 MVP，再用 `/enhance` 迭代。
  </Tip>
  <Tip title="定义认证方式">
    务必说明用户如何登录（例如"使用 NextAuth 配合 GitHub"）。这是一项关键的架构决策。
  </Tip>
</ProTips>

## 后续步骤

- 了解[系统化调试](/docs/guide/examples/debugging)，以维护你的复杂应用
- 查看[部署](/docs/guide/examples/deployment)以发布你的 MVP

---

### Web Src App Docs Guide Examples Plan Content.En (`web/src/app/docs/guide/examples/plan/content.en.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip } from '@/components/mdx'

# Project Planning

Create detailed implementation plans before writing code with the `/plan` workflow.

## Overview

The `/plan` command activates **planning-only mode**.
It uses the `project-planner` agent to create a detailed plan file without writing any code.

<Callout type="info">
  **Critical Rule:** NO CODE is written during planning. Only the `{task-slug}.md` plan file (in the project root) is created.
</Callout>

## The Process

<StepList>
  <Step number={1} title="Describe Your Project">
    Tell the planner what you want to build.

    ```bash
    /plan e-commerce site with cart and checkout
    ```
  </Step>
  <Step number={2} title="Socratic Questions">
    The planner asks clarifying questions before creating the plan.
  </Step>
  <Step number={3} title="Plan Generated">
    Creates `{task-slug}.md` in the project root with tasks and agent assignments.
  </Step>
</StepList>

## Example Session

<Terminal>
  <TerminalLine type="user">/plan SaaS dashboard with analytics</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Clarifying Questions:**</TerminalLine>
    <div className="text-yellow-300 text-xs mt-2">
      1. What metrics? (users, revenue?)<br/>
      2. Real-time or daily?<br/>
      3. Charting library?
    </div>
  </TerminalBlock>

  <TerminalLine type="user">Users + revenue, real-time, Recharts</TerminalLine>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ Plan Created!**</TerminalLine>
    `saas-dashboard.md`<br/>
    <span className="text-zinc-400">Run `/create` to implement.</span>
  </TerminalBlock>
</Terminal>

## Pro Tips

<ProTips>
  <Tip title="Answer Thoroughly">
    The more context you provide, the better the plan.
  </Tip>
  <Tip title="Edit the Plan">
    Modify the generated plan before implementation.
  </Tip>
</ProTips>

## Next Steps

- Run `/plan` for your next major feature
- After planning, use [Create Application](/docs/guide/examples/create) to implement

---

### Web Src App Docs Guide Examples Plan Content.Ja (`web/src/app/docs/guide/examples/plan/content.ja.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip } from '@/components/mdx'

# プロジェクトの計画

`/plan` ワークフローで、コードを書く前に詳細な実装計画を作成しましょう。

## 概要

`/plan` コマンドは**計画専用モード**を起動します。
`project-planner` エージェントを使い、コードを一切書かずに詳細な計画ファイルを作成します。

<Callout type="info">
  **重要なルール：** 計画中はコードを一切書きません。作成されるのは `{task-slug}.md` 計画ファイル（プロジェクトルート内）だけです。
</Callout>

## プロセス

<StepList>
  <Step number={1} title="プロジェクトを説明する">
    何を作りたいかを planner に伝えます。

    ```bash
    /plan e-commerce site with cart and checkout
    ```
  </Step>
  <Step number={2} title="ソクラテス式の質問">
    planner は計画を作成する前に、確認のための質問をします。
  </Step>
  <Step number={3} title="計画の生成">
    プロジェクトルートに `{task-slug}.md` を作成し、各タスクとエージェントの割り当てを含めます。
  </Step>
</StepList>

## セッション例

<Terminal>
  <TerminalLine type="user">/plan SaaS dashboard with analytics</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**確認のための質問：**</TerminalLine>
    <div className="text-yellow-300 text-xs mt-2">
      1. どの指標が必要ですか？（ユーザー、収益？）<br/>
      2. リアルタイムですか、それとも日次ですか？<br/>
      3. チャートライブラリは？
    </div>
  </TerminalBlock>

  <TerminalLine type="user">Users + revenue, real-time, Recharts</TerminalLine>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ 計画を作成しました！**</TerminalLine>
    `saas-dashboard.md`<br/>
    <span className="text-zinc-400">`/create` を実行して実装しましょう。</span>
  </TerminalBlock>
</Terminal>

## 実践のヒント

<ProTips>
  <Tip title="しっかり答える">
    提供するコンテキストが多いほど、計画はよくなります。
  </Tip>
  <Tip title="計画を編集する">
    実装の前に、生成された計画を修正しましょう。
  </Tip>
</ProTips>

## 次のステップ

- 次の大きな機能で `/plan` を実行しましょう
- 計画の後は、[アプリの作成](/docs/guide/examples/create)で実装しましょう

---

### Web Src App Docs Guide Examples Plan Content.Vi (`web/src/app/docs/guide/examples/plan/content.vi.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip } from '@/components/mdx'

# Lập kế hoạch dự án

Tạo các kế hoạch triển khai chi tiết trước khi viết code với quy trình `/plan`.

## Tổng quan

Lệnh `/plan` kích hoạt **chế độ chỉ lập kế hoạch**.
Nó dùng tác tử `project-planner` để tạo một file kế hoạch chi tiết mà không viết bất kỳ dòng code nào.

<Callout type="info">
  **Quy tắc then chốt:** KHÔNG viết CODE trong lúc lập kế hoạch. Chỉ tạo file kế hoạch `{task-slug}.md` (ở thư mục gốc dự án).
</Callout>

## Quy trình

<StepList>
  <Step number={1} title="Mô tả dự án của bạn">
    Cho planner biết bạn muốn xây gì.

    ```bash
    /plan e-commerce site with cart and checkout
    ```
  </Step>
  <Step number={2} title="Câu hỏi Socratic">
    Planner đặt các câu hỏi làm rõ trước khi tạo kế hoạch.
  </Step>
  <Step number={3} title="Kế hoạch được tạo">
    Tạo `{task-slug}.md` ở thư mục gốc dự án kèm các tác vụ và phân công tác tử.
  </Step>
</StepList>

## Phiên làm việc ví dụ

<Terminal>
  <TerminalLine type="user">/plan SaaS dashboard with analytics</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Câu hỏi làm rõ:**</TerminalLine>
    <div className="text-yellow-300 text-xs mt-2">
      1. Các chỉ số nào? (người dùng, doanh thu?)<br/>
      2. Thời gian thực hay theo ngày?<br/>
      3. Thư viện biểu đồ?
    </div>
  </TerminalBlock>

  <TerminalLine type="user">Users + revenue, real-time, Recharts</TerminalLine>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ Đã tạo kế hoạch!**</TerminalLine>
    `saas-dashboard.md`<br/>
    <span className="text-zinc-400">Chạy `/create` để triển khai.</span>
  </TerminalBlock>
</Terminal>

## Mẹo hay

<ProTips>
  <Tip title="Trả lời đầy đủ">
    Bạn cung cấp càng nhiều ngữ cảnh, kế hoạch càng tốt.
  </Tip>
  <Tip title="Chỉnh sửa kế hoạch">
    Sửa kế hoạch đã tạo trước khi triển khai.
  </Tip>
</ProTips>

## Bước tiếp theo

- Chạy `/plan` cho tính năng lớn tiếp theo của bạn
- Sau khi lập kế hoạch, dùng [Tạo ứng dụng](/docs/guide/examples/create) để triển khai

---

### Web Src App Docs Guide Examples Plan Content.Zh (`web/src/app/docs/guide/examples/plan/content.zh.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip } from '@/components/mdx'

# 项目规划

使用 `/plan` 工作流，在写代码之前先制定详细的实现计划。

## 概述

`/plan` 命令会启动**仅规划模式**。
它使用 `project-planner` 智能体创建一份详细的计划文件，而不写任何代码。

<Callout type="info">
  **关键规则：** 规划期间绝不写代码。只会创建 `{task-slug}.md` 计划文件（位于项目根目录）。
</Callout>

## 流程

<StepList>
  <Step number={1} title="描述你的项目">
    告诉 planner 你想构建什么。

    ```bash
    /plan e-commerce site with cart and checkout
    ```
  </Step>
  <Step number={2} title="苏格拉底式提问">
    planner 会在生成计划之前提出澄清性的问题。
  </Step>
  <Step number={3} title="生成计划">
    在项目根目录创建 `{task-slug}.md`，包含各项任务和智能体分工。
  </Step>
</StepList>

## 示例会话

<Terminal>
  <TerminalLine type="user">/plan SaaS dashboard with analytics</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**澄清性问题：**</TerminalLine>
    <div className="text-yellow-300 text-xs mt-2">
      1. 需要哪些指标？（用户、收入？）<br/>
      2. 实时还是按天？<br/>
      3. 用哪个图表库？
    </div>
  </TerminalBlock>

  <TerminalLine type="user">Users + revenue, real-time, Recharts</TerminalLine>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ 计划已创建！**</TerminalLine>
    `saas-dashboard.md`<br/>
    <span className="text-zinc-400">运行 `/create` 来实现。</span>
  </TerminalBlock>
</Terminal>

## 实用技巧

<ProTips>
  <Tip title="回答要充分">
    你提供的上下文越多，计划就越好。
  </Tip>
  <Tip title="编辑计划">
    在实现之前修改生成好的计划。
  </Tip>
</ProTips>

## 后续步骤

- 为你下一个重要功能运行 `/plan`
- 规划之后，用[创建应用](/docs/guide/examples/create)来实现

---

### Web Src App Docs Guide Examples Preview Content.En (`web/src/app/docs/guide/examples/preview/content.en.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# Preview Management

Manage your local development server with the `/preview` workflow.

## Overview

The `/preview` command manages your local development server.
Start, stop, restart, or check the status with simple commands.

<FeatureGrid>
  <Feature title="start" description="Launch server" />
  <Feature title="stop" description="Kill server" />
  <Feature title="restart" description="Reload" />
  <Feature title="check" description="Health" />
</FeatureGrid>

## The Process

<StepList>
  <Step number={1} title="Start Server">
    ```bash
    /preview start
    ```
  </Step>
  <Step number={2} title="Check Status">
    ```bash
    /preview
    ```
  </Step>
  <Step number={3} title="Stop Server">
    ```bash
    /preview stop
    ```
  </Step>
</StepList>

## Example Session

<Terminal>
  <TerminalLine type="user">/preview start</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**🚀 Starting preview...**</TerminalLine>
    <div className="text-xs mt-2">
      Port: 3000<br/>
      Type: Next.js
    </div>
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ Preview ready!**</TerminalLine>
    URL: <span className="text-blue-400">http://localhost:3000</span>
  </TerminalBlock>
</Terminal>

## Pro Tips

<ProTips>
  <Tip title="Auto-detection">
    Automatically detects Next.js, Vite, etc.
  </Tip>
  <Tip title="Port Conflict">
    Suggests alternatives if port 3000 is busy.
  </Tip>
</ProTips>

## Next Steps

- Run `/preview start` to launch your dev server
- See [Deployment](/docs/guide/examples/deployment) to go live

---

### Web Src App Docs Guide Examples Preview Content.Ja (`web/src/app/docs/guide/examples/preview/content.ja.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# プレビューの管理

`/preview` ワークフローで、ローカル開発サーバーを管理しましょう。

## 概要

`/preview` コマンドはローカル開発サーバーを管理します。
シンプルなコマンドで、起動、停止、再起動、状態の確認ができます。

<FeatureGrid>
  <Feature title="start" description="サーバーを起動" />
  <Feature title="stop" description="サーバーを終了" />
  <Feature title="restart" description="再読み込み" />
  <Feature title="check" description="健康状態" />
</FeatureGrid>

## プロセス

<StepList>
  <Step number={1} title="サーバーを起動する">
    ```bash
    /preview start
    ```
  </Step>
  <Step number={2} title="状態を確認する">
    ```bash
    /preview
    ```
  </Step>
  <Step number={3} title="サーバーを停止する">
    ```bash
    /preview stop
    ```
  </Step>
</StepList>

## セッション例

<Terminal>
  <TerminalLine type="user">/preview start</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**🚀 preview を起動中……**</TerminalLine>
    <div className="text-xs mt-2">
      ポート: 3000<br/>
      タイプ: Next.js
    </div>
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ Preview の準備ができました！**</TerminalLine>
    URL: <span className="text-blue-400">http://localhost:3000</span>
  </TerminalBlock>
</Terminal>

## 実践のヒント

<ProTips>
  <Tip title="自動検出">
    Next.js、Vite などを自動で識別します。
  </Tip>
  <Tip title="ポートの競合">
    3000 番ポートが使用中の場合は、代わりのポートを提案します。
  </Tip>
</ProTips>

## 次のステップ

- `/preview start` を実行して開発サーバーを起動しましょう
- 公開するには[デプロイ](/docs/guide/examples/deployment)を参照しましょう

---

### Web Src App Docs Guide Examples Preview Content.Vi (`web/src/app/docs/guide/examples/preview/content.vi.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# Quản lý preview

Quản lý máy chủ phát triển cục bộ của bạn với quy trình `/preview`.

## Tổng quan

Lệnh `/preview` quản lý máy chủ phát triển cục bộ của bạn.
Khởi động, dừng, khởi động lại hoặc kiểm tra trạng thái bằng các lệnh đơn giản.

<FeatureGrid>
  <Feature title="start" description="Khởi động máy chủ" />
  <Feature title="stop" description="Tắt máy chủ" />
  <Feature title="restart" description="Tải lại" />
  <Feature title="check" description="Tình trạng" />
</FeatureGrid>

## Quy trình

<StepList>
  <Step number={1} title="Khởi động máy chủ">
    ```bash
    /preview start
    ```
  </Step>
  <Step number={2} title="Kiểm tra trạng thái">
    ```bash
    /preview
    ```
  </Step>
  <Step number={3} title="Dừng máy chủ">
    ```bash
    /preview stop
    ```
  </Step>
</StepList>

## Phiên làm việc ví dụ

<Terminal>
  <TerminalLine type="user">/preview start</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**🚀 Đang khởi động preview...**</TerminalLine>
    <div className="text-xs mt-2">
      Cổng: 3000<br/>
      Loại: Next.js
    </div>
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ Preview sẵn sàng!**</TerminalLine>
    URL: <span className="text-blue-400">http://localhost:3000</span>
  </TerminalBlock>
</Terminal>

## Mẹo hay

<ProTips>
  <Tip title="Tự động nhận diện">
    Tự động nhận diện Next.js, Vite, v.v.
  </Tip>
  <Tip title="Xung đột cổng">
    Gợi ý phương án thay thế nếu cổng 3000 đang bận.
  </Tip>
</ProTips>

## Bước tiếp theo

- Chạy `/preview start` để khởi động máy chủ phát triển của bạn
- Xem [Triển khai](/docs/guide/examples/deployment) để đưa lên môi trường thật

---

### Web Src App Docs Guide Examples Preview Content.Zh (`web/src/app/docs/guide/examples/preview/content.zh.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# 预览管理

使用 `/preview` 工作流管理你的本地开发服务器。

## 概述

`/preview` 命令负责管理你的本地开发服务器。
用简单的命令即可启动、停止、重启或查看状态。

<FeatureGrid>
  <Feature title="start" description="启动服务器" />
  <Feature title="stop" description="关闭服务器" />
  <Feature title="restart" description="重新加载" />
  <Feature title="check" description="健康状况" />
</FeatureGrid>

## 流程

<StepList>
  <Step number={1} title="启动服务器">
    ```bash
    /preview start
    ```
  </Step>
  <Step number={2} title="查看状态">
    ```bash
    /preview
    ```
  </Step>
  <Step number={3} title="停止服务器">
    ```bash
    /preview stop
    ```
  </Step>
</StepList>

## 示例会话

<Terminal>
  <TerminalLine type="user">/preview start</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**🚀 正在启动 preview……**</TerminalLine>
    <div className="text-xs mt-2">
      端口: 3000<br/>
      类型: Next.js
    </div>
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ Preview 已就绪！**</TerminalLine>
    URL: <span className="text-blue-400">http://localhost:3000</span>
  </TerminalBlock>
</Terminal>

## 实用技巧

<ProTips>
  <Tip title="自动检测">
    自动识别 Next.js、Vite 等。
  </Tip>
  <Tip title="端口冲突">
    当 3000 端口被占用时，会建议替代端口。
  </Tip>
</ProTips>

## 后续步骤

- 运行 `/preview start` 来启动你的开发服务器
- 查看[部署](/docs/guide/examples/deployment)以上线

---

### Web Src App Docs Guide Examples Status Content.En (`web/src/app/docs/guide/examples/status/content.en.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# Project Status

Get a complete overview of your project with the `/status` workflow.

## Overview

The `/status` command gives you a **complete dashboard view** of your project.
See project info, tech stack, completed features, agent activity, and preview status.

<FeatureGrid>
  <Feature title="Project" description="Info & Stack" />
  <Feature title="Agents" description="Status Board" />
  <Feature title="Files" description="Statistics" />
  <Feature title="Preview" description="Health Check" />
</FeatureGrid>

## The Process

<StepList>
  <Step number={1} title="Run Command">
    Simply run the command to see your project dashboard.

    ```bash
    /status
    ```
  </Step>
</StepList>

## Example Session

<Terminal>
  <TerminalLine type="user">/status</TerminalLine>

  <TerminalBlock>
    <div className="text-yellow-400 mb-2">=== Project Status ===</div>
    <div className="space-y-1 mb-4">
      <div>📁 Project: my-ecommerce</div>
      <div>🏷️ Type: nextjs-ecommerce</div>
      <div>📄 Files: 73 created, 12 modified</div>
    </div>

    <div className="text-yellow-400 mb-2">=== Agent Status ===</div>
    <div className="space-y-1 mb-4">
      <div><span className="text-green-400">✅</span> database-architect → Completed</div>
      <div><span className="text-green-400">✅</span> backend-specialist → Completed</div>
      <div><span className="text-blue-400">🔄</span> frontend-specialist → 60%</div>
    </div>

    <div className="text-yellow-400 mb-2">=== Preview ===</div>
    <div className="space-y-1">
      <div>🌐 URL: <span className="text-blue-400">http://localhost:3000</span></div>
      <div>💚 Health: <span className="text-green-400">OK</span></div>
    </div>
  </TerminalBlock>
</Terminal>

## Pro Tips

<ProTips>
  <Tip title="Before Deploy">
    Check status to ensure all agents completed.
  </Tip>
  <Tip title="Track Progress">
    Monitor multi-agent orchestration in real-time.
  </Tip>
</ProTips>

## Next Steps

- Run `/status` to check project state
- See [Deployment](/docs/guide/examples/deployment) when ready to ship

---

### Web Src App Docs Guide Examples Status Content.Ja (`web/src/app/docs/guide/examples/status/content.ja.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# プロジェクトの状態

`/status` ワークフローで、プロジェクトの全体像を把握しましょう。

## 概要

`/status` コマンドは、プロジェクトの**完全なダッシュボードビュー**を提供します。
プロジェクト情報、技術スタック、完了した機能、エージェントの活動、プレビューの状態を確認できます。

<FeatureGrid>
  <Feature title="プロジェクト" description="情報とスタック" />
  <Feature title="エージェント" description="ステータスボード" />
  <Feature title="ファイル" description="統計" />
  <Feature title="プレビュー" description="ヘルスチェック" />
</FeatureGrid>

## プロセス

<StepList>
  <Step number={1} title="コマンドを実行する">
    コマンドを実行するだけで、プロジェクトのダッシュボードが表示されます。

    ```bash
    /status
    ```
  </Step>
</StepList>

## セッション例

<Terminal>
  <TerminalLine type="user">/status</TerminalLine>

  <TerminalBlock>
    <div className="text-yellow-400 mb-2">=== Project Status ===</div>
    <div className="space-y-1 mb-4">
      <div>📁 プロジェクト: my-ecommerce</div>
      <div>🏷️ タイプ: nextjs-ecommerce</div>
      <div>📄 ファイル: 73 件作成、12 件変更</div>
    </div>

    <div className="text-yellow-400 mb-2">=== Agent Status ===</div>
    <div className="space-y-1 mb-4">
      <div><span className="text-green-400">✅</span> database-architect → 完了</div>
      <div><span className="text-green-400">✅</span> backend-specialist → 完了</div>
      <div><span className="text-blue-400">🔄</span> frontend-specialist → 60%</div>
    </div>

    <div className="text-yellow-400 mb-2">=== Preview ===</div>
    <div className="space-y-1">
      <div>🌐 URL: <span className="text-blue-400">http://localhost:3000</span></div>
      <div>💚 健康状態: <span className="text-green-400">OK</span></div>
    </div>
  </TerminalBlock>
</Terminal>

## 実践のヒント

<ProTips>
  <Tip title="デプロイ前に">
    状態を確認し、すべてのエージェントが完了したことを確かめましょう。
  </Tip>
  <Tip title="進捗を追う">
    マルチエージェントのオーケストレーションをリアルタイムで監視しましょう。
  </Tip>
</ProTips>

## 次のステップ

- `/status` を実行してプロジェクトの状態を確認しましょう
- 出荷の準備ができたら[デプロイ](/docs/guide/examples/deployment)を参照しましょう

---

### Web Src App Docs Guide Examples Status Content.Vi (`web/src/app/docs/guide/examples/status/content.vi.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# Trạng thái dự án

Có cái nhìn tổng quan đầy đủ về dự án của bạn với quy trình `/status`.

## Tổng quan

Lệnh `/status` cho bạn một **góc nhìn dashboard đầy đủ** về dự án.
Xem thông tin dự án, tech stack, các tính năng đã xong, hoạt động của tác tử và trạng thái preview.

<FeatureGrid>
  <Feature title="Dự án" description="Thông tin & Stack" />
  <Feature title="Tác tử" description="Bảng trạng thái" />
  <Feature title="Tệp tin" description="Thống kê" />
  <Feature title="Preview" description="Kiểm tra sức khỏe" />
</FeatureGrid>

## Quy trình

<StepList>
  <Step number={1} title="Chạy lệnh">
    Chỉ cần chạy lệnh để xem dashboard dự án của bạn.

    ```bash
    /status
    ```
  </Step>
</StepList>

## Phiên làm việc ví dụ

<Terminal>
  <TerminalLine type="user">/status</TerminalLine>

  <TerminalBlock>
    <div className="text-yellow-400 mb-2">=== Project Status ===</div>
    <div className="space-y-1 mb-4">
      <div>📁 Dự án: my-ecommerce</div>
      <div>🏷️ Loại: nextjs-ecommerce</div>
      <div>📄 Tệp tin: 73 đã tạo, 12 đã sửa</div>
    </div>

    <div className="text-yellow-400 mb-2">=== Agent Status ===</div>
    <div className="space-y-1 mb-4">
      <div><span className="text-green-400">✅</span> database-architect → Hoàn tất</div>
      <div><span className="text-green-400">✅</span> backend-specialist → Hoàn tất</div>
      <div><span className="text-blue-400">🔄</span> frontend-specialist → 60%</div>
    </div>

    <div className="text-yellow-400 mb-2">=== Preview ===</div>
    <div className="space-y-1">
      <div>🌐 URL: <span className="text-blue-400">http://localhost:3000</span></div>
      <div>💚 Sức khỏe: <span className="text-green-400">OK</span></div>
    </div>
  </TerminalBlock>
</Terminal>

## Mẹo hay

<ProTips>
  <Tip title="Trước khi triển khai">
    Kiểm tra trạng thái để chắc chắn mọi tác tử đã hoàn tất.
  </Tip>
  <Tip title="Theo dõi tiến độ">
    Giám sát điều phối đa tác tử theo thời gian thực.
  </Tip>
</ProTips>

## Bước tiếp theo

- Chạy `/status` để kiểm tra trạng thái dự án
- Xem [Triển khai](/docs/guide/examples/deployment) khi sẵn sàng phát hành

---

### Web Src App Docs Guide Examples Status Content.Zh (`web/src/app/docs/guide/examples/status/content.zh.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# 项目状态

使用 `/status` 工作流，全面掌握你项目的整体情况。

## 概述

`/status` 命令为你提供项目的**完整仪表盘视图**。
查看项目信息、技术栈、已完成的功能、智能体活动以及预览状态。

<FeatureGrid>
  <Feature title="项目" description="信息与技术栈" />
  <Feature title="智能体" description="状态面板" />
  <Feature title="文件" description="统计数据" />
  <Feature title="预览" description="健康检查" />
</FeatureGrid>

## 流程

<StepList>
  <Step number={1} title="运行命令">
    只需运行命令即可查看你的项目仪表盘。

    ```bash
    /status
    ```
  </Step>
</StepList>

## 示例会话

<Terminal>
  <TerminalLine type="user">/status</TerminalLine>

  <TerminalBlock>
    <div className="text-yellow-400 mb-2">=== Project Status ===</div>
    <div className="space-y-1 mb-4">
      <div>📁 项目: my-ecommerce</div>
      <div>🏷️ 类型: nextjs-ecommerce</div>
      <div>📄 文件: 已创建 73 个，已修改 12 个</div>
    </div>

    <div className="text-yellow-400 mb-2">=== Agent Status ===</div>
    <div className="space-y-1 mb-4">
      <div><span className="text-green-400">✅</span> database-architect → 已完成</div>
      <div><span className="text-green-400">✅</span> backend-specialist → 已完成</div>
      <div><span className="text-blue-400">🔄</span> frontend-specialist → 60%</div>
    </div>

    <div className="text-yellow-400 mb-2">=== Preview ===</div>
    <div className="space-y-1">
      <div>🌐 URL: <span className="text-blue-400">http://localhost:3000</span></div>
      <div>💚 健康状况: <span className="text-green-400">OK</span></div>
    </div>
  </TerminalBlock>
</Terminal>

## 实用技巧

<ProTips>
  <Tip title="部署前">
    查看状态，确保所有智能体都已完成。
  </Tip>
  <Tip title="跟踪进度">
    实时监控多智能体编排。
  </Tip>
</ProTips>

## 后续步骤

- 运行 `/status` 来查看项目状态
- 准备好发布时，查看[部署](/docs/guide/examples/deployment)

---

### Web Src App Docs Guide Examples Test Content.En (`web/src/app/docs/guide/examples/test/content.en.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# Test Generation & Execution

Generate and run tests with the `/test` workflow.

## Overview

The `/test` command handles **test generation and execution**.
Analyze code, create test suites, run tests, or check coverage.

<FeatureGrid>
  <Feature title="run" description="Execute tests" />
  <Feature title="generate" description="Create tests" />
  <Feature title="coverage" description="Report" />
  <Feature title="watch" description="Live mode" />
</FeatureGrid>

## The Process

<StepList>
  <Step number={1} title="Run All Tests">
    ```bash
    /test
    ```
  </Step>
  <Step number={2} title="Generate Tests for File">
    ```bash
    /test src/auth.ts
    ```
  </Step>
  <Step number={3} title="Check Coverage">
    ```bash
    /test coverage
    ```
  </Step>
</StepList>

## Example Session

<Terminal>
  <TerminalLine type="user">/test src/services/auth.ts</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Analyzing auth.ts...**</TerminalLine>
    <div className="text-xs mt-2">
      Found 4 functions: login, register, verifyToken, resetPassword
    </div>
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ Tests Generated!**</TerminalLine>
    <div className="text-xs mt-2">
      Created: `tests/auth.test.ts`<br/>
      Test cases: 12<br/>
      Coverage: 95%
    </div>
  </TerminalBlock>
</Terminal>

## Pro Tips

<ProTips>
  <Tip title="Test Behavior">
    Focus on what functions do, not implementation.
  </Tip>
  <Tip title="Edge Cases">
    Always test errors, empty inputs, boundaries.
  </Tip>
</ProTips>

## Next Steps

- Run `/test` to execute your test suite
- See [Deployment](/docs/guide/examples/deployment) which runs tests automatically

---

### Web Src App Docs Guide Examples Test Content.Ja (`web/src/app/docs/guide/examples/test/content.ja.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# テストの生成と実行

`/test` ワークフローで、テストを生成して実行しましょう。

## 概要

`/test` コマンドは**テストの生成と実行**を担います。
コードを分析し、テストスイートを作成し、テストを実行したり、カバレッジを確認したりします。

<FeatureGrid>
  <Feature title="run" description="テストを実行" />
  <Feature title="generate" description="テストを作成" />
  <Feature title="coverage" description="レポート" />
  <Feature title="watch" description="ライブモード" />
</FeatureGrid>

## プロセス

<StepList>
  <Step number={1} title="すべてのテストを実行する">
    ```bash
    /test
    ```
  </Step>
  <Step number={2} title="ファイルのテストを生成する">
    ```bash
    /test src/auth.ts
    ```
  </Step>
  <Step number={3} title="カバレッジを確認する">
    ```bash
    /test coverage
    ```
  </Step>
</StepList>

## セッション例

<Terminal>
  <TerminalLine type="user">/test src/services/auth.ts</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**auth.ts を分析中……**</TerminalLine>
    <div className="text-xs mt-2">
      4 つの関数を発見：login、register、verifyToken、resetPassword
    </div>
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ テストを生成しました！**</TerminalLine>
    <div className="text-xs mt-2">
      作成: `tests/auth.test.ts`<br/>
      テストケース: 12<br/>
      カバレッジ: 95%
    </div>
  </TerminalBlock>
</Terminal>

## 実践のヒント

<ProTips>
  <Tip title="振る舞いをテストする">
    実装ではなく、関数が何をするかに注目しましょう。
  </Tip>
  <Tip title="エッジケース">
    エラー、空の入力、境界を常にテストしましょう。
  </Tip>
</ProTips>

## 次のステップ

- `/test` を実行してテストスイートを動かしましょう
- テストを自動で実行する[デプロイ](/docs/guide/examples/deployment)を参照しましょう

---

### Web Src App Docs Guide Examples Test Content.Vi (`web/src/app/docs/guide/examples/test/content.vi.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# Sinh và chạy kiểm thử

Sinh và chạy test với quy trình `/test`.

## Tổng quan

Lệnh `/test` lo việc **sinh và chạy kiểm thử**.
Phân tích code, tạo bộ test, chạy test hoặc kiểm tra độ phủ.

<FeatureGrid>
  <Feature title="run" description="Chạy test" />
  <Feature title="generate" description="Tạo test" />
  <Feature title="coverage" description="Báo cáo" />
  <Feature title="watch" description="Chế độ trực tiếp" />
</FeatureGrid>

## Quy trình

<StepList>
  <Step number={1} title="Chạy toàn bộ test">
    ```bash
    /test
    ```
  </Step>
  <Step number={2} title="Sinh test cho file">
    ```bash
    /test src/auth.ts
    ```
  </Step>
  <Step number={3} title="Kiểm tra độ phủ">
    ```bash
    /test coverage
    ```
  </Step>
</StepList>

## Phiên làm việc ví dụ

<Terminal>
  <TerminalLine type="user">/test src/services/auth.ts</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**Đang phân tích auth.ts...**</TerminalLine>
    <div className="text-xs mt-2">
      Tìm thấy 4 hàm: login, register, verifyToken, resetPassword
    </div>
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ Đã sinh test!**</TerminalLine>
    <div className="text-xs mt-2">
      Đã tạo: `tests/auth.test.ts`<br/>
      Số ca kiểm thử: 12<br/>
      Độ phủ: 95%
    </div>
  </TerminalBlock>
</Terminal>

## Mẹo hay

<ProTips>
  <Tip title="Kiểm thử hành vi">
    Tập trung vào việc hàm làm gì, không phải cách triển khai.
  </Tip>
  <Tip title="Trường hợp biên">
    Luôn kiểm thử lỗi, đầu vào rỗng, các giới hạn.
  </Tip>
</ProTips>

## Bước tiếp theo

- Chạy `/test` để thực thi bộ kiểm thử của bạn
- Xem [Triển khai](/docs/guide/examples/deployment) vốn tự động chạy test

---

### Web Src App Docs Guide Examples Test Content.Zh (`web/src/app/docs/guide/examples/test/content.zh.mdx`)

import { Callout, StepList, Step, Terminal, TerminalLine, TerminalBlock, ProTips, Tip, FeatureGrid, Feature } from '@/components/mdx'

# 测试生成与执行

使用 `/test` 工作流生成并运行测试。

## 概述

`/test` 命令负责**测试的生成与执行**。
分析代码、创建测试套件、运行测试或检查覆盖率。

<FeatureGrid>
  <Feature title="run" description="执行测试" />
  <Feature title="generate" description="创建测试" />
  <Feature title="coverage" description="报告" />
  <Feature title="watch" description="实时模式" />
</FeatureGrid>

## 流程

<StepList>
  <Step number={1} title="运行所有测试">
    ```bash
    /test
    ```
  </Step>
  <Step number={2} title="为文件生成测试">
    ```bash
    /test src/auth.ts
    ```
  </Step>
  <Step number={3} title="检查覆盖率">
    ```bash
    /test coverage
    ```
  </Step>
</StepList>

## 示例会话

<Terminal>
  <TerminalLine type="user">/test src/services/auth.ts</TerminalLine>

  <TerminalBlock>
    <TerminalLine type="agent">**正在分析 auth.ts……**</TerminalLine>
    <div className="text-xs mt-2">
      找到 4 个函数：login、register、verifyToken、resetPassword
    </div>
  </TerminalBlock>

  <TerminalBlock highlight>
    <TerminalLine type="agent">**✅ 测试已生成！**</TerminalLine>
    <div className="text-xs mt-2">
      已创建: `tests/auth.test.ts`<br/>
      测试用例: 12<br/>
      覆盖率: 95%
    </div>
  </TerminalBlock>
</Terminal>

## 实用技巧

<ProTips>
  <Tip title="测试行为">
    关注函数做什么，而非它如何实现。
  </Tip>
  <Tip title="边界情况">
    始终测试错误、空输入和各种边界。
  </Tip>
</ProTips>

## 后续步骤

- 运行 `/test` 来执行你的测试套件
- 查看[部署](/docs/guide/examples/deployment)，它会自动运行测试

---

--- METRICS ---
- Files Extracted: 50
- Estimated Token Budget: ~32462 tokens
- Canonical Reference: https://codewiki.google/github.com/vudovn/antigravity-kit
