v0.20.2 harden antigravity research workflow
This commit is contained in:
@@ -0,0 +1,140 @@
|
||||
---
|
||||
name: antigravity-surface-adapter
|
||||
description: Guides Google Antigravity to run Deep Research natively with Antigravity model quotas, while using this repository's skills, source standards, artifacts, and optional Python utilities for validation/rendering.
|
||||
---
|
||||
|
||||
# Antigravity Deep Research Adapter
|
||||
|
||||
Use this skill when the user asks to run, plan, review, or finalize a Deep Research project from Google Antigravity.
|
||||
|
||||
## Core Rule
|
||||
|
||||
Antigravity is the research operator. Use Antigravity's own model selector and task execution to perform the research phases. Python core is an auxiliary toolbox for project scaffolding, deterministic checks, citation/report rendering, and status inspection; do not let it silently route the main research through ZenMux unless the user explicitly asks.
|
||||
|
||||
The Deep Research method still comes from this repo:
|
||||
|
||||
- Follow `AGENTS.md` for evidence, source tiers, word budgets, pause points, and output hygiene.
|
||||
- Load project skills from `.agents/skills/*` as needed.
|
||||
- Write all artifacts under `projects/<slug>/`.
|
||||
- Keep claims traceable to source IDs in `sources.jsonl`.
|
||||
|
||||
## Anti-Hallucination Contract
|
||||
|
||||
This project treats Gemini-family research as high risk for false confidence. Follow these rules mechanically:
|
||||
|
||||
1. No tool receipt, no search claim. Do not write "I searched", "confirmed", "official data shows", or similar unless the tool call happened and is recorded.
|
||||
2. No source ID, no factual claim. Every concrete fact needs a `source_id`.
|
||||
3. Search snippets are leads, not evidence. Open the original paper, filing, registry, patent, guideline, or company disclosure before citing.
|
||||
4. Failed access is a finding. Write that the source could not be opened; do not infer exact numbers from inaccessible pages.
|
||||
5. Log all searches in `phaseX/search_log.md` or `phaseX/search_log.jsonl`.
|
||||
6. Keep an `unsupported_claims` list. It is better to expose uncertainty than to make the report look complete.
|
||||
7. Before finishing each phase, sample at least 10 factual claims and verify that each has a source ID and opened source.
|
||||
|
||||
## Antigravity Model Plan
|
||||
|
||||
Switch the Antigravity conversation model by phase:
|
||||
|
||||
| Phase | Model | Purpose |
|
||||
|---|---|
|
||||
| Surface management | Gemini 3 Flash | Read skills, maintain task list, move phase by phase, run light shell commands, collect artifacts. |
|
||||
| Phase 0-1 | Claude Opus 4.6 (Thinking) | Material interpretation, strategic framing, research method choice, bold hypotheses, chapter architecture. |
|
||||
| Phase 2 | Gemini 3.1 Pro (Low) | Evidence collection, chapter research packets, first-pass chapter drafts. |
|
||||
| Phase 3 | Gemini 3.1 Pro (High) | Independent critique, counter-evidence review, logic and evidence gap analysis. |
|
||||
| Phase 4 | Claude Opus 4.6 (Thinking) | Final Chinese editorial integration, executive summary, wording quality, final consistency pass. |
|
||||
|
||||
Gemini 3 Flash should remain the phase manager. It can ask the user to switch to the phase model before heavy thinking, then resume management after the phase artifact is written.
|
||||
|
||||
## Python Core Boundary
|
||||
|
||||
Use Python core only when it helps without taking over the research model budget:
|
||||
|
||||
- Good: scaffold folders, parse local materials, validate sources/citations, render PDF/DOCX, show status.
|
||||
- Risky: `research --execute-packets`, `run`, or any command that calls model workers through `configs/models.yaml`.
|
||||
- If a command would call model workers, ask the user first and state that it may use ZenMux/API credits instead of Antigravity quota.
|
||||
|
||||
Safe utility examples:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py init "研究主题" --slug <slug> --method <method>
|
||||
uv run python scripts/dr.py status <slug>
|
||||
uv run python scripts/dr.py skills validate
|
||||
uv run python scripts/dr.py finalize <slug> --no-pdf --no-docx
|
||||
```
|
||||
|
||||
## Native Runbook
|
||||
|
||||
1. Open the repository root in Antigravity.
|
||||
2. Start with Gemini 3 Flash as phase manager. Load this skill, `AGENTS.md`, `mckinsey-method`, `search-strategy`, `source-quality`, `evidence-table`, `citation-manager`, `length-budget`, and `output-hygiene`.
|
||||
3. Create or confirm `projects/<slug>/` and the phase folders. Use Python `init` only for scaffolding if helpful.
|
||||
4. Phase 0-1: ask the user to switch to Claude Opus 4.6 (Thinking). Produce:
|
||||
|
||||
- `phase1/material_brief.md`
|
||||
- `phase1/framework.md`
|
||||
- `phase1/research_brief.md`
|
||||
- `phase1/research_brief.json`
|
||||
- `phase1/search_log.md`
|
||||
- `phase1/unsupported_claims.md`
|
||||
|
||||
5. Pause for user confirmation.
|
||||
6. Phase 2: ask the user to switch to Gemini 3.1 Pro (Low). Build evidence packets and chapter drafts without Python model workers:
|
||||
|
||||
- `phase2/task_cards.json`
|
||||
- `phase2/packets/*.json`
|
||||
- `phase2/sources.jsonl`
|
||||
- `phase2/chapter_briefs/*.json`
|
||||
- `phase2/compressed_findings/*.json`
|
||||
- `phase2/drafts/chXX.md`
|
||||
- `phase2/search_log.jsonl`
|
||||
- `phase2/unsupported_claims.md`
|
||||
|
||||
7. Phase 3: ask the user to switch to Gemini 3.1 Pro (High). Produce `phase3/critique.md`, with explicit go/rework/fail decision and a source-audit table for at least 10 core facts.
|
||||
8. Pause for user decision.
|
||||
9. Phase 4: ask the user to switch to Claude Opus 4.6 (Thinking). Produce `phase4/final_zh.md`, `phase4/editorial_notes.md`, and `phase4/final_fact_check.md`. Use deterministic renderers afterward for PDF/DOCX.
|
||||
|
||||
## Search Strategy
|
||||
|
||||
If the `search` CLI from `paperfoot/search-cli` is installed, prefer it as the Antigravity-native search front door:
|
||||
|
||||
```bash
|
||||
search agent-info
|
||||
search search -q "CRISPR clinical trial 2025" -m academic --json
|
||||
search search -q "BRCA1 gene patent" -m patents --json
|
||||
search search -q "FDA warning letter CAPA pharmaceutical" -m general --json
|
||||
search search -q "biotech market update 2026" -m news --json
|
||||
```
|
||||
|
||||
Useful modes for this repo: `academic`, `scholar`, `patents`, `news`, `deep`, `extract`, `similar`, and `general`.
|
||||
|
||||
Do not treat synthesized search answers as evidence. Every important claim still needs source IDs, tier rating, source score, and preferably original PDFs/pages or official records.
|
||||
|
||||
If `search` is not installed, use the existing project search tools or Antigravity browser, but keep the same source-tier discipline.
|
||||
|
||||
## Suggested Antigravity Permissions
|
||||
|
||||
Within this workspace, the user may allow:
|
||||
|
||||
- `read_file(<workspace>)`
|
||||
- `write_file(<workspace>)`
|
||||
- `command(uv run python scripts/)`
|
||||
- `command(search)`
|
||||
- `command(pandoc)`
|
||||
|
||||
Keep these as Ask/Deny unless the user explicitly allows them:
|
||||
|
||||
- writes outside the workspace
|
||||
- global Antigravity/Gemini settings
|
||||
- destructive git commands
|
||||
- reading `secrets.env`
|
||||
- broad downloads or package installs
|
||||
|
||||
## What To Report Back
|
||||
|
||||
Always report concrete artifact paths:
|
||||
|
||||
- `projects/<slug>/phase1/research_brief.md`
|
||||
- `projects/<slug>/phase2/task_cards.json`
|
||||
- `projects/<slug>/phase2/packet_errors/` if present
|
||||
- `projects/<slug>/phase3/critique.md`
|
||||
- `projects/<slug>/phase4/*.pdf` and `*.docx`
|
||||
|
||||
If a phase fails, report the failing artifact and the rework plan. Do not hide model switches, quota-sensitive steps, or missing evidence.
|
||||
Reference in New Issue
Block a user