> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comet.rpamis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Native 快速开始

> 为 Fable 5、GPT-5.6 等强模型初始化 Native，并完成一次可恢复的需求变更。

Native 是 Comet 为 Fable 5、GPT-5.6 这一档强编码模型设计的 Skill。它保留需求澄清、完整规格、状态、验证证据和归档，但把实现计划、测试粒度、调试与审查方法交给模型按仓库事实和风险选择。

## 1. 初始化项目

Comet 需要 Node.js 22 或更高版本。安装 CLI 后，在项目根运行：

```bash theme={null}
npm install -g @rpamis/comet
comet init
```

交互式初始化会说明 Native、Classic 与同时启用两者的区别。新项目在非交互模式下默认使用 Native；也可以显式选择：

```bash theme={null}
comet init --workflow native
comet init --workflow native --root .
comet init --workflow both
```

`--workflow both` 会安装两套独立工作流，但 `/comet` 默认仍进入 Native。Native 默认把产物放在 `docs/comet/`；只有明确需要项目根目录下的 `comet/` 时才传入 `--root .`。该选项不会改变 Classic 目录。

初始化后，项目级共享配置位于 `.comet/config.yaml`：

```yaml theme={null}
schema: comet.project.v1
default_workflow: native
workflows:
  - native
ambient_resume: true
native:
  artifact_root: docs
  language: zh-CN
  clarification_mode: sequential
```

Native 不依赖 OpenSpec、Superpowers、CodeGraph 或其他外部 Skill。项目初始化仍会安装 Comet 自有的统一工作流 Rule；支持 Hook 的平台还会安装一个 Hook Router，用于把一次写入只交给当前 change 所属工作流的 Guard。

## 2. 从统一入口开始

在 Agent 中输入：

```text theme={null}
/comet 为用户资料页增加头像上传能力
```

`/comet` 按 `.comet/config.yaml` 的 `default_workflow` 确定性转发到 `/comet-native`。它不会根据任务大小临时猜测模式，也不会把 Native change 转成 Classic change。

若需要绕过默认入口，可以直接调用 `/comet-native`。它是 Skill 入口，不是 shell 命令。

## 3. 回答真正影响产品行为的问题

Native 会先调查仓库事实。只有仍会改变范围、输出、默认行为、兼容性、风险或不可逆结果的决定才交给用户。默认的 `sequential` 模式每轮只问一个最上游问题；`batch` 模式会一次提出当前前置条件都已确定的问题。两种模式都会给出推荐和选项影响。

模型不会把“合理默认值”、相邻实现或行业惯例当作用户决定。澄清完成后，结论进入 brief 与完整目标规格，再继续 Build。

## 4. 让工作流持续推进

```mermaid theme={null}
flowchart LR
  S["Shape：需求与决策"] --> B["Build：自主实现"]
  B --> V["Verify：证据与验收"]
  V -->|通过| A["Archive：更新规格并归档"]
  V -->|失败| B
```

阶段通过后，Native 在同一个 Skill 中继续下一阶段。`next: auto` 表示 Runtime 已允许继续，不表示后台服务会自行调用模型。遇到用户决定、损坏状态、冲突或重复无进展失败时，工作流会停下并返回具体原因。

## 5. 查看与恢复

```bash theme={null}
comet status
comet native status <change-name> --details
comet native doctor <change-name>
```

会话中断后再次输入 `/comet 继续`。环境感知恢复会先读取磁盘状态，只在目标明确时自动进入对应 change；多个候选或语义不明确时会询问，不会跨工作流猜测。

如不希望普通请求触发只读恢复探针，可在 `.comet/config.yaml` 设置：

```yaml theme={null}
ambient_resume: false
```

下一步可阅读 [Native 工作流](/zh/concepts/native-workflow)、[Native 配置](/zh/native/configuration)、[澄清模式与共享理解](/zh/native/clarification-modes) 和 [产物与状态](/zh/native/artifacts-and-state)。所有确定性命令集中在 [Native CLI](/zh/cli/native)。
