v0.20.6 rebuild platform environments from templates
This commit is contained in:
@@ -2,22 +2,34 @@
|
||||
|
||||
Use a clean workspace for Antigravity. Do not open the full multi-platform repository unless you are debugging adapters.
|
||||
|
||||
The full repository contains Codex, OpenCode, Claude Code, Gemini CLI, archived projects, and legacy adapter files. Gemini models may read those files and follow stale or incompatible instructions. The clean workspace exposes only the Antigravity instruction stack plus optional Python utilities.
|
||||
The full repository contains Codex, OpenCode, Claude Code, Gemini CLI, archived projects, and platform adapter source templates. Gemini models may read irrelevant files and follow stale or incompatible instructions. The clean workspace exposes only the Antigravity instruction stack plus optional Python utilities.
|
||||
|
||||
## Recommended Update Flow
|
||||
|
||||
From the full repository:
|
||||
|
||||
```bash
|
||||
python scripts/update_platform_envs.py --platform antigravity
|
||||
```
|
||||
|
||||
This command first runs `git pull --ff-only`, then rebuilds `platform_envs/antigravity`. Open `platform_envs/antigravity` in Antigravity.
|
||||
|
||||
If you already pulled the repo yourself:
|
||||
|
||||
```bash
|
||||
python scripts/update_platform_envs.py --platform antigravity --skip-pull
|
||||
```
|
||||
|
||||
## Required Directory Logic
|
||||
|
||||
Antigravity workspace files live under `.agent/`:
|
||||
Antigravity source templates live in `platform_adapters/antigravity/agent/`. The generated Antigravity workspace receives them under `.agent/`:
|
||||
|
||||
- `.agent/agents.md` defines roles only.
|
||||
- `.agent/rules/*.md` defines persistent workspace constraints.
|
||||
- `.agent/skills/*/SKILL.md` defines reusable procedures.
|
||||
- `.agent/workflows/*.md` defines slash-style workflows.
|
||||
|
||||
Legacy or other-platform directories are not part of Antigravity native execution:
|
||||
|
||||
- `.agents/` is legacy compatibility for this repository's older adapter layout.
|
||||
- `.codex/`, `.opencode/`, `.claude/`, and `.gemini/` are for other tools.
|
||||
- Antigravity native runs must ignore those directories unless the user explicitly asks to inspect them.
|
||||
Other platforms are built into their own generated environments under `platform_envs/`. They are not part of Antigravity native execution.
|
||||
|
||||
## Sparse Checkout From Gitea
|
||||
|
||||
@@ -31,19 +43,22 @@ git sparse-checkout set \
|
||||
AGENTS.md \
|
||||
GEMINI.md \
|
||||
README.md \
|
||||
.agent \
|
||||
docs/antigravity-clean-workspace.md \
|
||||
docs/platform-adapters.md \
|
||||
configs \
|
||||
platform_adapters/antigravity \
|
||||
scripts/dr.py \
|
||||
scripts/runtime \
|
||||
scripts/reporting \
|
||||
scripts/deploy_adapters.py \
|
||||
scripts/update_platform_envs.py \
|
||||
scripts/export_antigravity_workspace.py \
|
||||
projects/.gitkeep
|
||||
git checkout codex/v0.20-skill-driven-python-core
|
||||
python scripts/update_platform_envs.py --platform antigravity --skip-pull
|
||||
```
|
||||
|
||||
This checkout intentionally excludes `.codex`, `.opencode`, `.claude`, `.gemini`, `.agents`, `archive`, historical `projects/**`, and bundled platform templates.
|
||||
This checkout intentionally excludes Codex/OpenCode/Claude/Gemini adapter templates, `archive`, historical `projects/**`, and generated `platform_envs/**`.
|
||||
|
||||
## Export From A Full Checkout
|
||||
|
||||
@@ -72,7 +87,7 @@ First, read only these files:
|
||||
7. .agent/skills/research-quality-gates/SKILL.md
|
||||
8. .agent/workflows/deep-research-native.md
|
||||
|
||||
Ignore .codex, .opencode, .claude, .gemini, and .agents if present.
|
||||
This is a generated clean workspace. Do not inspect parent repository adapter templates unless I explicitly ask.
|
||||
|
||||
Use Gemini 3 Flash only as Surface Manager. Do not write report content or invent completed searches. Ask me to switch models at the workflow gates.
|
||||
|
||||
|
||||
+14
-15
@@ -1,6 +1,6 @@
|
||||
# v0.20 Platform Adapters
|
||||
|
||||
> v0.20 的默认核心入口是 Python core:`scripts/dr.py`、`scripts/runtime/**`、`configs/models.yaml`、`.agent/skills`。Antigravity 例外:它使用 `.agent/skills` 与 `.agent/rules` 走 native Deep Research,让 Antigravity 模型配额承担主要研究工作。
|
||||
> v0.20 的默认核心入口是 Python core:`scripts/dr.py`、`scripts/runtime/**`、`configs/models.yaml`、`platform_adapters/**`。各平台运行环境由 `scripts/update_platform_envs.py` 重建到 `platform_envs/`。Antigravity 例外:它在生成的 `platform_envs/antigravity` 中使用 `.agent/skills` 与 `.agent/rules` 走 native Deep Research,让 Antigravity 模型配额承担主要研究工作。
|
||||
|
||||
## Shared Rule
|
||||
|
||||
@@ -132,23 +132,22 @@ gemini
|
||||
|
||||
官方资料显示,Antigravity 是 agent-first IDE:主 Agent 可跨 editor、terminal、browser 工作;浏览器操作由 browser subagent 执行;Agent Manager 可管理多个任务流和 artifacts。基于 Codex 的 skill-driven 经验,本项目在 Antigravity 中不再默认把研究主流程交给 Python model workers,而是让 Antigravity 用自己的模型配额按 phase 执行研究。
|
||||
|
||||
本项目已提供 Antigravity 入口。注意:Antigravity 入口使用 `.agent/` 单数目录;`.agents/` 是旧版兼容目录,不作为 Antigravity native 的加载目标。
|
||||
本项目已提供 Antigravity adapter 源模板。注意:Git 跟踪的是非隐藏源目录 `platform_adapters/antigravity/agent/`;Antigravity 实际打开的是脚本生成的 `platform_envs/antigravity`,其中才包含 `.agent/` 单数目录。
|
||||
|
||||
- `.agent/agents.md`:Antigravity 角色定义,只定义 Research Manager / Strategist / Analyst / Reviewer / Final Editor 等角色。
|
||||
- `.agent/skills/antigravity-surface-adapter/SKILL.md`:Antigravity 专用执行说明。
|
||||
- `.agent/skills/method-selection/SKILL.md`:按场景选择研究方法,避免默认套用麦肯锡/MECE。
|
||||
- `.agent/skills/research-quality-gates/SKILL.md`:把 search receipt、source access、claims ledger、delta retrieve、continuation state 和 final fact check 做成阶段质量门。
|
||||
- `.agent/rules/deep-research-antigravity.md`:workspace rule,约束其优先使用 Antigravity 模型配额,避免主流程落回 ZenMux。
|
||||
- `.agent/workflows/deep-research-native.md`:可按 slash workflow 执行的四阶段研究流程与反幻觉 gate。
|
||||
- `.agent/skills/*`:Antigravity 官方默认 skill 目录,直接复用本项目 canonical skill registry。
|
||||
- `platform_adapters/antigravity/agent/agents.md`:Antigravity 角色定义,只定义 Research Manager / Strategist / Analyst / Reviewer / Final Editor 等角色。
|
||||
- `platform_adapters/antigravity/agent/skills/antigravity-surface-adapter/SKILL.md`:Antigravity 专用执行说明。
|
||||
- `platform_adapters/antigravity/agent/skills/method-selection/SKILL.md`:按场景选择研究方法,避免默认套用麦肯锡/MECE。
|
||||
- `platform_adapters/antigravity/agent/skills/research-quality-gates/SKILL.md`:把 search receipt、source access、claims ledger、delta retrieve、continuation state 和 final fact check 做成阶段质量门。
|
||||
- `platform_adapters/antigravity/agent/rules/deep-research-antigravity.md`:workspace rule,约束其优先使用 Antigravity 模型配额,避免主流程落回 ZenMux。
|
||||
- `platform_adapters/antigravity/agent/workflows/deep-research-native.md`:可按 slash workflow 执行的四阶段研究流程与反幻觉 gate。
|
||||
|
||||
推荐方式是先创建 clean workspace,只让 Antigravity 看到必要文件:
|
||||
推荐方式是重建 clean workspace,只让 Antigravity 看到必要文件:
|
||||
|
||||
```bash
|
||||
python scripts/export_antigravity_workspace.py --target /path/to/deep_research_antigravity --force
|
||||
python scripts/update_platform_envs.py --platform antigravity
|
||||
```
|
||||
|
||||
或使用 sparse checkout,见 `docs/antigravity-clean-workspace.md`。
|
||||
然后打开 `platform_envs/antigravity`。也可以使用 sparse checkout,见 `docs/antigravity-clean-workspace.md`。
|
||||
|
||||
部署到另一个 Antigravity workspace:
|
||||
|
||||
@@ -161,7 +160,7 @@ uv run python scripts/deploy_adapters.py antigravity --target /path/to/workspace
|
||||
|
||||
本项目调用方式:
|
||||
|
||||
1. 在 Antigravity 打开 clean workspace 根目录,不要打开完整多平台仓库。
|
||||
1. 在 Antigravity 打开 `platform_envs/antigravity`,不要打开完整多平台仓库。
|
||||
2. 在 Customizations / Rules 中确认 workspace rule 已启用;若未自动启用,手动 at mention `deep-research-antigravity` 或直接引用该文件。
|
||||
3. 选择模型:
|
||||
|
||||
@@ -177,7 +176,7 @@ uv run python scripts/deploy_adapters.py antigravity --target /path/to/workspace
|
||||
|
||||
```text
|
||||
请加载 .agent/agents.md、.agent/rules/deep-research-antigravity.md、.agent/skills/antigravity-surface-adapter/SKILL.md、.agent/skills/research-quality-gates/SKILL.md 和 AGENTS.md。
|
||||
忽略 .codex、.opencode、.claude、.gemini 和 legacy .agents。
|
||||
这是生成的 Antigravity clean workspace,不要读取父级仓库里的其他平台 adapter。
|
||||
用 Gemini 3 Flash 做流程管理,按 skill 要求在需要时提示我切换模型。
|
||||
研究主题:"ADC 全球竞争格局",slug: adc-global-landscape,method: mckinsey_market。
|
||||
请先创建/确认项目目录,然后进入 Phase 0-1,并在生成 phase1/framework.md 和 research_brief 后暂停。
|
||||
@@ -201,7 +200,7 @@ uv run python scripts/deploy_adapters.py antigravity --target /path/to/workspace
|
||||
| Codex | GPT 系列用于代码、测试、schema、review | `configs/models.yaml` |
|
||||
| Claude Code | Opus/Sonnet 用于访谈、中文风格、结构讨论 | `configs/models.yaml` |
|
||||
| Gemini CLI | Gemini 用于长上下文、多模态、框架审阅 | `configs/models.yaml` |
|
||||
| Antigravity | Gemini Flash/Opus/Gemini Pro 分 phase 执行研究 | `.agent/skills` + Antigravity model selector |
|
||||
| Antigravity | Gemini Flash/Opus/Gemini Pro 分 phase 执行研究 | `platform_envs/antigravity/.agent/skills` + Antigravity model selector |
|
||||
|
||||
核心原则:除 Antigravity 外,平台模型负责“怎么帮用户操作项目”,ZenMux/Python role 模型负责“研究任务用哪个模型执行”。Antigravity 专门走 native 模式,以消耗 Antigravity 自身模型配额并降低 Python-core 碎片化风险。
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
# Platform Branch Strategy
|
||||
|
||||
Use one of two clean separation patterns.
|
||||
|
||||
## Preferred Default: Source Templates + Rebuilt Envs
|
||||
|
||||
The main branch tracks only source templates:
|
||||
|
||||
- `platform_adapters/antigravity`
|
||||
- `platform_adapters/codex`
|
||||
- `platform_adapters/opencode`
|
||||
- `platform_adapters/claude-code`
|
||||
- `platform_adapters/gemini-cli`
|
||||
|
||||
Local runnable environments are generated and ignored:
|
||||
|
||||
- `platform_envs/antigravity`
|
||||
- `platform_envs/codex`
|
||||
- `platform_envs/opencode`
|
||||
- `platform_envs/claude-code`
|
||||
- `platform_envs/gemini-cli`
|
||||
|
||||
Update flow:
|
||||
|
||||
```bash
|
||||
git pull --ff-only
|
||||
python scripts/update_platform_envs.py --platform antigravity --skip-pull
|
||||
```
|
||||
|
||||
or:
|
||||
|
||||
```bash
|
||||
python scripts/update_platform_envs.py --platform all
|
||||
```
|
||||
|
||||
Open the generated platform env, not the full repository.
|
||||
|
||||
## Alternative: Per-Platform Branches
|
||||
|
||||
If a platform keeps ignoring generated-env boundaries, split Gitea branches:
|
||||
|
||||
- `main`: Python core, docs, canonical skills, shared configs.
|
||||
- `platform/codex`: Codex-only working tree.
|
||||
- `platform/antigravity`: Antigravity-only working tree.
|
||||
- `platform/opencode`: OpenCode-only working tree.
|
||||
- `platform/claude-code`: Claude Code-only working tree.
|
||||
- `platform/gemini-cli`: Gemini CLI-only working tree.
|
||||
|
||||
In that mode, platform branches should remove unrelated platform directories entirely. Merge shared runtime changes from `main`; do not merge one platform branch into another.
|
||||
Reference in New Issue
Block a user