Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e737d65
Add just git workflow
Apr 16, 2026
73eb228
Adjust Readme
Apr 16, 2026
53841a8
Adjust build-browser task template notes
tielei Apr 16, 2026
ad1fb7f
chore: enforce report-faithful codegen & merge verify run+monitor. Ti…
Apr 17, 2026
f996d3e
Merge branch 'main' of github.com:bitsky-tech/AmphiLoop
Apr 17, 2026
9023575
Adjust command to pass browser arguments from phase 4 to pgase 6
Apr 17, 2026
ebabc30
Adjust command to pass browser arguments from phase 4 to pgase 6
Apr 17, 2026
c185932
Adjust explore
Apr 20, 2026
eb7ac62
Complete amphibious-explore.md
Apr 21, 2026
35b1979
Rename amphibious-generator to amphibious-code
Apr 21, 2026
66fa56d
Complete abstract amphibious-code and build-browser
Apr 21, 2026
45dc9b3
Complete abstract amphibious-code and build-browser
Apr 21, 2026
e4d2030
Complete abstract build command
Apr 21, 2026
43b4d4a
Update amphibious-code to use log/ and results/
Apr 21, 2026
cdb1b0a
Update amphibious code without verifing tools.py
Apr 21, 2026
bb5e1ba
optimized description of the abstract methodology of exploration-codi…
Apr 22, 2026
5521d92
Fix amphibious-code agent
Apr 22, 2026
2075b95
refactor: fold /build-browser into /build --browser with domain-context
Apr 22, 2026
5237820
adjust browser domain context
Apr 22, 2026
64337b9
Adjust task config protocol
Apr 22, 2026
d8dce7a
Adjust amphibious-code create amphibious project dir
Apr 22, 2026
3014757
Adjust amphibious-code create amphibious project dir
Apr 22, 2026
1e2824c
refactor: adjust amphibious-verify dependent skills and cleanup steps
Apr 22, 2026
81cc7a9
refactor: simplify monitor.sh interface, let script own verify artifa…
Apr 23, 2026
2228189
docs: recommend non-headless browser launch for login-gated tasks
Apr 23, 2026
5c6ddd1
make verify finish automa
Apr 23, 2026
2b0c20e
Approve all tookls to be used in sub-agents
Apr 27, 2026
cb99cde
refactor: consolidate /build context and slim agent invocations
Apr 27, 2026
c28057b
chore: sync bridgic-amphibious skill from fix branch
Apr 27, 2026
e6efdd7
refactor: align plugin with new amphi.py scaffold
Apr 27, 2026
35e51b3
refactor: hide internal dev-index details and slim agent docs
Apr 27, 2026
808017a
refactor: centralize /build invocation contract and add subagent boot…
Apr 27, 2026
b3a2538
refactor: share one uv project at PROJECT_ROOT across build phases
Apr 28, 2026
0338296
refactor: run explore/verify inline, align config.md with agent docs
Apr 29, 2026
4d99485
Adjust skill deps version and install totural
Apr 29, 2026
33f3e25
sync bridgic-amphibious skill
Apr 29, 2026
7a436f2
fix: strip trailing whitespace flagged by markdownlint MD009
Apr 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
"./commands/"
],
"agents": [
"./agents/browser-explorer.md",
"./agents/amphibious-generator.md",
"./agents/amphibious-verify.md"

"./agents/amphibious-code.md"
],
"skills": []
}
1 change: 1 addition & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
uses: ludeeus/action-shellcheck@master
with:
scandir: scripts
severity: warning

file-references:
name: File Reference Check
Expand Down
36 changes: 20 additions & 16 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,35 @@ Agent skill & knowledge corpus for the Bridgic ecosystem — providing skills, a
AmphiLoop/
├── CLAUDE.md ← this file
├── .claude-plugin/
│ └── plugin.json ← Claude Code plugin registration
│ ├── plugin.json ← Claude Code plugin registration
│ └── marketplace.json ← marketplace metadata
├── skills/ ← domain knowledge: "what it is, how to use it"
│ ├── manifest.ini ← skill source registry (repo, ref, paths)
│ ├── README.md ← manifest docs + auto-generated skill table
│ ├── bridgic-browser/ ← browser automation CLI + SDK
│ ├── bridgic-amphibious/ ← dual-mode agent framework
│ └── bridgic-llms/ ← LLM providers and initialization
├── agents/ ← execution methodology: "how to do it well"
│ ├── browser-explorer.md ← CLI exploration expertise
│ ├── amphibious-generator.md ← code generation expertise
│ ├── amphibious-config.md ← inline-loaded by /build Phase 2 (interactive; NOT a subagent)
│ ├── amphibious-explore.md ← abstract exploration methodology
│ ├── amphibious-code.md ← code generation expertise
│ └── amphibious-verify.md ← project verification expertise
├── commands/ ← user-invocable workflows (thin orchestrators)
│ └── build-browser.md ← /build-browser pipeline
├── examples/ ← static example docs (not auto-scanned by Claude Code)
│ ├── build-browser-code-patterns.md ← browser-specific code patterns
│ └── build-browser-task-template.md ← TASK.md template for /build-browser Phase 1
│ └── build.md ← /build pipeline (domain-agnostic; accepts --<domain>)
├── domain-context/ ← pre-distilled per-domain context injected by /build
│ └── browser/ ← intent.md, config.md, explore.md, code.md, verify.md
│ └── script/ ← domain-only helpers (e.g. browser-observe.sh)
├── templates/ ← static templates read by commands (not auto-scanned by Claude Code)
│ └── build-task-template.md ← unified TASK.md template (used by /build Phase 1)
├── hooks/ ← auto-loaded by Claude Code
│ ├── hooks.json ← hook definitions
│ └── README.md ← hook system documentation
│ └── hooks.json ← hook definitions
└── scripts/
├── hook/ ← hook script implementations
│ └── inject-command-paths.sh ← injects PLUGIN_ROOT + PROJECT_ROOT when a bridgic command loads
├── run/ ← runtime scripts used by agents
│ ├── setup-env.sh ← auto-install uv + uv init --bare
│ ├── setup-env.sh ← verify uv toolchain (auto-installs if missing) and run `uv init --bare` in PROJECT_ROOT
│ ├── check-dotenv.sh ← .env LLM configuration validation
│ └── monitor.sh ← process monitor for amphibious-verify agent
│ └── monitor.sh ← run-and-monitor for amphibious-verify agent
└── maintenance/ ← plugin maintenance scripts (manual)
└── sync-skills.sh ← sync skills from source repos via manifest.ini
```
Expand All @@ -43,8 +46,9 @@ AmphiLoop/
| Type | Purpose | Example |
|------|---------|---------|
| **Skill** | Domain knowledge reference — loaded on-demand by agents; synced from source repos via `manifest.ini` | bridgic-browser, bridgic-amphibious, bridgic-llms |
| **Agent** | Deep execution methodology — delegated by commands | browser-explorer, amphibious-generator, amphibious-verify |
| **Command** | Multi-step orchestrator invoked by user | /build-browser |
| **Agent** | Deep execution methodology — delegated by commands | amphibious-explore, amphibious-code, amphibious-verify |
| **Command** | Multi-step orchestrator invoked by user | /build |
| **Domain Context** | Pre-distilled per-domain rules (`intent.md`, `config.md`, `explore.md`, `code.md`, `verify.md`) injected by `/build` when a domain is selected explicitly via `--<domain>` or auto-detected from `TASK.md` | domain-context/browser |

## Installation

Expand All @@ -66,12 +70,12 @@ claude plugin install AmphiLoop

| Agent | When to Use |
|-------|-------------|
| **browser-explorer** | Systematically explore a website via CLI, produce structured exploration report |
| **amphibious-generator** | Generate a complete bridgic-amphibious project from a task description with optional domain context |
| **amphibious-explore** | Systematically explore a target environment via a domain toolset, produce an executable plan with stability-annotated operations |
| **amphibious-code** | Generate a complete bridgic-amphibious project from a task description with optional domain context |
| **amphibious-verify** | Verify a generated amphibious project: inject debug instrumentation, run with monitoring, validate results, clean up |

## Commands

| Command | When to Use |
|---------|-------------|
| **/build-browser** | Turn a browser task into a working bridgic-amphibious project (parse → explore → generate → verify) |
| **/build** | Unified entry point. Turn any task into a working bridgic-amphibious project. Accepts an optional domain flag (`/build --browser`) to inject pre-distilled context from `domain-context/<domain>/`. Without a flag, auto-detects the domain from `TASK.md` (or falls back to a generic flow). Users may additionally supply their own domain references in `TASK.md`. |
78 changes: 49 additions & 29 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,45 +26,62 @@ claude plugin marketplace add bitsky-tech/AmphiLoop
claude plugin install AmphiLoop
```

或从本地仓库直接安装
或从本地仓库安装(把 `marketplace add` 指向本地目录即可——本仓库自带 `.claude-plugin/marketplace.json`,会被识别为 marketplace)

```bash
git clone https://github.com/bitsky-tech/AmphiLoop.git
claude plugin install /path/to/AmphiLoop

claude plugin marketplace add /path/to/AmphiLoop
claude plugin install AmphiLoop
```

安装后,skills、agents 和 commands(如 `/build-browser`)会自动在 Claude Code 中可用。
安装后,skills、agents 和 commands(如 `/build`)会自动在 Claude Code 中可用。

## 使用

### Commands

Commands 是用户可直接调用的工作流:
Commands 是用户可直接调用的工作流,使用 `/` 前缀触发:

#### `/AmphiLoop:build`

#### `/build-browser`
统一流水线。描述任意任务,列出 agent 应读取的领域参考(SKILL、CLI 帮助、SDK 文档、风格指南),然后要求生成一个可运行项目:

```
/build-browser
/AmphiLoop:build

Task: Go to https://example.com, search for "product", and extract the first 5 results
我想把 ~/data/inputs 下所有 `orders_*.csv` 汇总成一个 summary.csv —
按 customer 聚合出每个客户的总额。
```

**领域标志(可选)** — 在命令后追加 `--<domain>`,即可注入 `domain-context/<domain>/` 下预先蒸馏好的领域上下文。当前已支持:`--browser`。

```
/AmphiLoop:build --browser

打开 https://example.com,搜索 "product",提取前 5 条结果。
我需要一个能稳定运行的项目。
```

不带标志时,`/build` 会根据 `TASK.md` 自动识别领域(若没有匹配则回退到通用流程)。用户可随时在 `TASK.md` 中补充额外领域参考。

**执行流程:**

1. **Parse** — 从任务描述中提取 URL、目标和预期输出
2. **Setup** — 检查环境(uv、依赖、`.env`)
3. **Explore** — 委派 `browser-explorer` agent 通过 CLI 系统性探索目标网站
4. **Generate** — 委派 `amphibious-generator` agent 生成完整项目及所有源文件
5. **Verify** — 委派 `amphibious-verify` agent 注入调试插桩、运行项目、验证结果
1. **Initialize Task** — 生成 `TASK.md` 模板,用户填写目标、预期输出、**领域参考**;若未带标志则自动识别领域
2. **Configure Pipeline** — 项目模式(Workflow / Amphiflow)、按需的 LLM 配置,以及任何领域特定配置(例如 `--browser` 模式下询问浏览器环境模式)
3. **Setup Environment** — 检查 `uv`,执行 `uv init`
4. **Explore** — 委派 `amphibious-explore` agent 读取用户提供的领域参考并探索环境
5. **Generate** — 委派 `amphibious-code` agent 生成完整项目及所有源文件
6. **Verify** — 委派 `amphibious-verify` agent 注入调试插桩、运行项目、验证结果

### Agents

Agents 是由 commands 调度的执行专家,不由用户直接调用:

| Agent | 功能 |
|-------|------|
| **browser-explorer** | 通过 CLI 系统性探索网站,生成结构化的探索报告和快照 |
| **amphibious-generator** | 根据任务描述和探索报告生成完整的 bridgic-amphibious 项目 |
| **amphibious-explore** | 通过领域工具集系统性探索目标环境,生成带稳定性标注的可执行操作序列与关键快照 |
| **amphibious-code** | 根据任务描述和探索报告生成完整的 bridgic-amphibious 项目 |
| **amphibious-verify** | 注入调试插桩、监控运行、验证结果、清理环境 |

### Skills
Expand All @@ -73,9 +90,7 @@ Skills 是领域知识参考,agent 会根据对话上下文自动加载,无

| Skill | 触发场景 |
|-------|---------|
| **bridgic-basic** | 使用 Bridgic 核心框架(Worker、Automa、GraphAutoma、ASL) |
| **bridgic-browser** | 使用浏览器自动化 CLI(`bridgic-browser ...`)或 Python SDK(`from bridgic.browser`) |
| **bridgic-browser-agent** | 构建浏览器自动化 Agent(OOP 模式 + 动态 ref 解析) |
| **bridgic-amphibious** | 使用双模框架(`AmphibiousAutoma`、`CognitiveWorker`、`on_agent`/`on_workflow`) |
| **bridgic-llms** | 初始化 LLM 提供商(`OpenAILlm`、`OpenAILikeLlm`、`VllmServerLlm`) |

Expand All @@ -84,30 +99,35 @@ Skills 是领域知识参考,agent 会根据对话上下文自动加载,无
```
AmphiLoop/
├── .claude-plugin/
│ └── plugin.json # 插件注册
├── skills/ # 领域知识(5 个 skills)
│ ├── bridgic-basic/ # 核心框架概念
│ ├── plugin.json # 插件注册
│ └── marketplace.json # Marketplace 元数据
├── skills/ # 领域知识(3 个 skills)
│ ├── manifest.ini # Skill 来源注册表(repo、ref、paths)
│ ├── README.md # Manifest 文档 + 自动生成的 skill 表格
│ ├── bridgic-browser/ # 浏览器自动化 CLI + SDK
│ ├── bridgic-browser-agent/ # 浏览器 Agent 模式
│ ├── bridgic-amphibious/ # 双模 Agent 框架
│ └── bridgic-llms/ # LLM 提供商集成
├── agents/ # 执行方法论(3 个 agents)
│ ├── browser-explorer.md # CLI 探索专家
│ ├── amphibious-generator.md # 代码生成专家
│ ├── amphibious-explore.md # 抽象探索方法论
│ ├── amphibious-code.md # 代码生成专家
│ └── amphibious-verify.md # 项目验证专家
├── commands/ # 用户可调用的工作流
│ └── build-browser.md # 端到端流水线
├── examples/ # 静态示例文档(不会被自动扫描)
│ └── build-browser-code-patterns.md
│ └── build.md # 统一流水线(可选 --<domain> 标志)
├── domain-context/ # /build 注入的预蒸馏领域上下文
│ └── browser/ # intent.md / config.md / explore.md / code.md / verify.md(含 script/)
├── templates/ # 命令使用的静态模板(不会被自动扫描)
│ └── build-task-template.md # /build 使用的统一 TASK.md 模板
├── hooks/ # 自动加载的事件处理器
│ └── hooks.json
└── scripts/ # Hook 与工具脚本
├── hook/
│ └── inject-command-paths.sh
└── run/
├── setup-env.sh # 环境配置(uv、依赖、playwright)
├── check-dotenv.sh # LLM 模型配置校验
└── monitor.sh
├── run/
│ ├── setup-env.sh # 校验 uv 工具链;在 PROJECT_ROOT 执行 uv init --bare
│ ├── check-dotenv.sh # LLM 模型配置校验
│ └── monitor.sh # amphibious-verify 的 run-and-monitor 脚本
└── maintenance/
└── sync-skills.sh # 从源仓库同步 skills(基于 manifest.ini)
```

### 各层如何协作
Expand Down
Loading
Loading