Release/amphiloop 1.0.0#2
Merged
Merged
Conversation
added 30 commits
April 20, 2026 18:00
- Delete commands/build-browser.md; /build now accepts an optional --<domain> flag (or auto-detects from TASK.md) to inject pre-distilled context from domain-context/<domain>/ - Add domain-context/browser/ with intent / config / explore / code / verify slices; add Phase 2b in /build for per-domain config with a single end-of-Phase-2 summary confirmation owned by the command - Rename amphibious-explore internal phase "Explore Domain Context" → "Analyse Task"; update all cross-references in commands/build.md - Restructure exploration operation-sequence format: action-only step lines with parameters / stability / notes on indented # comment lines - Sync README / README-zh / CLAUDE.md / hook script comments to the new topology; drop stale build-browser-code-patterns.md reference
…ct paths Drop LOG_FILE and VERIFY_DIR positional args from monitor.sh — the script now derives everything under <WORK_DIR>/.bridgic/verify/ and prints the resolved paths to stdout on every exit. Callers only supply WORK_DIR (and optional TIMEOUT), eliminating a class of mismatches where the monitored VERIFY_DIR didn't line up with where the program actually wrote human_request.json. Update amphibious-verify agent doc to match the new signature.
Add a parameter-setting note in the explore phase: if the task requires login, launch the browser in non-headless mode so the user can complete authentication interactively.
Restructure the /build pipeline to cut redundant token cost and improve hierarchy of the shared build context. Build context as a single index: - /build now writes .bridgic/build_context.md after Phase 2 with Task / Pipeline / References / Environment / Outputs sections. - Task is a TASK.md pointer (not an embedded summary), keeping the user- authored file as the single source of truth. - explore / code / verify agents take exactly two inputs (build_context_path, domain_context_path) and read heavier files (TASK.md, references, SKILL.md) on demand. Phase 2 + 3 merged into agents/amphibious-config.md: - Externalise project-mode, LLM-config, domain-config, env setup, and build_context.md write into a single inline-loaded methodology doc. - /build executes its steps in the main thread instead of delegating to a subagent, since this phase is interactive. - Pipeline workflow renumbered to 5 phases. Agent slimming: - amphibious-explore: stability annotations only on values that vary; probe only branches that affect recorded output; skip artifact section when no VOLATILE parameter exists. - amphibious-code: skills moved to on-demand reads; inline cheatsheet of the common bridgic-amphibious / bridgic-llms imports. - amphibious-verify: Phase 1.1 / 1.2 / 1.3 each gated on a grep precondition (skip RunMode.WORKFLOW override when already pinned, skip human_input override when no HumanCall, skip loop slicing when no dynamic loop). - monitor.sh: success-path log tail trimmed from 30 to 10 lines.
Pull updated bridgic-amphibious skill content from fix/skills-and-amphibious-fallback (manifest ref bump). Notable upstream changes: - Scaffold reduced to a single amphi.py (no more multi-file project tree). CLI no longer takes -n; --base-dir / --task only. Runtime concerns (LLM credentials, entry script) are intentionally left to the caller. - bridgic-amphibious now resolved through the btsk-repo private index with version pin ==0.1.1.dev17 (deps.ini). install-deps.sh requires BRIDGIC_DEV_INDEX env var. - AMPHIFLOW fallback documentation split: ActionCall tool failure (per-step retry) vs generator-internal exception (jumps directly to full on_agent fallback).
The bridgic-amphibious scaffold now produces a single amphi.py instead
of a multi-file project tree, and pins itself to a private package
index. Realign every doc and script that referenced the old layout.
Generated project layout (Phase 4 of /build) is now:
<PROJECT_ROOT>/<project-name>/
pyproject.toml # install-deps.sh
amphi.py # scaffold; agent edits
main.py # this agent writes (entry point)
.env (if LLM) # placeholders, user fills
log/ result/ # mkdir
The subdir isolates the uv project from PROJECT_ROOT, which is now just
a workspace holding TASK.md and .bridgic/.
Per-file changes:
- agents/amphibious-code.md: full rewrite. Phase 1 = mkdir +
install-deps.sh + scaffold + log/result. Phase 2 reorganised into
Context / Hooks / on_workflow / on_agent / Tools / Helpers. Phase 4
builds main.py with inline os.getenv (no separate config.py by
default). Added best practices: AMPHIFLOW generator-internal
exception caveat, override-only-needed hooks, think_unit
max_attempts sizing, snapshot() phase boundaries, request_human
auto-injection, mode-to-method override mapping.
- agents/amphibious-verify.md: agents.py -> amphi.py; monitor.sh
invocation uses absolute {generator_project} (no PROJECT_ROOT
double-prefix).
- agents/amphibious-config.md: Step 4 split — 4.1 verify uv, 4.2
fail-fast on missing BRIDGIC_DEV_INDEX, 4.3 domain tool install
deferred to explore agent.
- commands/build.md: Phase 4 mode/LLM mapping no longer mentions
config.py; generator_project documented as the populated subdir.
- domain-context/browser/code.md: agents.py / workers.py / helpers.py
/ tools.py / task.md sections folded into amphi.py-centric sections;
main.py example uses hardcoded GOAL constant.
- scripts/run/setup-env.sh: dropped uv init; only verifies uv
toolchain. PROJECT_ROOT no longer becomes a uv project.
- CLAUDE.md: list amphibious-config.md in agents/ tree (inline-only);
refresh setup-env.sh description.
- amphibious-config Step 4: drop the BRIDGIC_DEV_INDEX check section; Step 4 now only verifies the uv toolchain. 4.3 renumbered to 4.2. - amphibious-code Phase 1.2: drop the BRIDGIC_DEV_INDEX precondition note after install-deps.sh. Phase 5 (.env + generated README, which also surfaced BRIDGIC_DEV_INDEX as a prerequisite) and the final Output recap removed entirely. - amphibious-explore: trim the "three concerns" preamble; the same structure is already enforced by the report sections below. - build Phase 1: wording tweak — read TASK.md and "understand" instead of "extract" (no behavioural change).
…strap
- commands/build.md: lift per-phase delegation prose into one
"Agent invocation contract" section; Phases 3/4/5 reference it instead
of repeating the two-path rules. Correct setup-env description to
toolchain-only (per-project uv init lives inside <project-name>/).
- amphibious-{explore,code,verify}.md: add a Bootstrap section telling
each subagent to batch its certainly-required startup Reads in a
single parallel tool turn (Round 1 = invocation paths, Round 2 =
paths derived from build_context.md). Trims cache-read amplification
at agent startup.
- amphibious-config.md: enumerate skills in the build_context.md schema
as a name -> SKILL.md absolute-path map.
- domain-context/browser/{config,verify}.md: Phase 6 -> Phase 5 to match
the simplified 5-phase pipeline.
- Tighten Input/prose in agents/*.md and domain-context/browser/code.md
without behavioural change.
- setup-env.sh now runs `uv init --bare` in PROJECT_ROOT and appends
pyproject.toml to the ENV_READY block; every later phase uv-adds
into this single shared env.
- amphibious-code installs runtime deps into PROJECT_ROOT and reads
.env via Path(__file__).parent.parent — no more .env relocation.
- monitor.sh and the verify agent's human_input override now write
under <PROJECT_ROOT>/.bridgic/verify/, next to build_context.md
and explore/, instead of polluting the generator project.
- build_context.md schema drops the skills: index (skill paths now
live inline in agent docs); env_ready: carries the pyproject.toml
dump, refreshed after Phase 3 / 4.
- New domain-context/browser/script/browser-observe.sh wrapper bundles
act + tabs + snapshot into one explore tool call.
- browser code.md aligns runtime user_data_dir to
{PROJECT_ROOT}/.bridgic/browser/, matching config / explore / verify.
- sync-skills.sh README table drops the now-redundant Ref column.
- CLAUDE.md / README trees and script descriptions synced.
- build.md: Phases 3 and 5 now execute their methodology inline (Phase 2 style) instead of delegating to subagents, so HUMAN: handoffs and the verify-time human_input signal-file loop reach the user without crossing a subagent boundary. Phase 4 stays as the only subagent delegation. The shared `build_context_path` / `domain_context_path` resolution moved up into the Path variables block. - amphibious-config.md: added subagent-style frontmatter (name / description / tools), retitled "Amphibious Config Agent", introduced ## Input and ## Bootstrap sections so its form parallels explore / code / verify even though /build runs it inline. - plugin.json: only amphibious-code is registered as a subagent now; config / explore / verify are inline-only methodology docs.
refactor: generalize /build with domain-context and abstract agents
# Conflicts: # README.md
lynnlink
pushed a commit
that referenced
this pull request
May 7, 2026
…oute Reframe agents/amphibious-verify.md as methodology (mirroring the amphibious-code refactor), and update domain-context/browser/verify.md for the CLI-only browser route now used in code generation. agents/amphibious-verify.md: - Add a Guiding Principles section with five cross-cutting rules (force determinism, bound the budget, round-trip-clean injections, trust the script, verify against the spec). Sharpen "bound the budget" to make the goal explicit -- structural smoke test, not full task run -- and codify two stop-and-report conditions: (a) same error after three fixes, (b) structural pass that won't fit in monitor.sh's 300 s ceiling even with maximally tight bounding. Both are findings to surface, not retry signals. - Tighten Input and Bootstrap descriptions; drop the "in parallel within a single assistant turn" boilerplate. - 1.1 Force WORKFLOW mode: add a rule for the single-line arun() case (reformat to multi-line first, then attach markers). - 1.2 Human-input override: tighten the precondition grep from \\bHumanCall\\b to \\byield\\s+HumanCall\\b so a bare import line doesn't trigger dead-code injection. - 1.3 Rename "Dynamic-loop slicing" to "Bound dynamic iteration" and broaden coverage. Add Pattern B for while loops with a runtime condition (counter outside, check-and-break inside, so the while line itself stays untouched and marker removal restores original behaviour exactly). Add Pattern C note for list comprehensions / async for. Add nested-loop rule (bound each layer; timeout budget is the product). Add an explicit ban on shrinking wait durations -- realistic waits are part of the structure being verified. - Phase 2: drop the duplicated 300 s rule (monitor.sh enforces it) and the duplicated stop-and-report (now in Principle #2). Keep only the timeout-recovery tactic: tighten 1.3 bounds. - Phase 3: state PASS as an explicit AND of three checks; rank the expected-output sources so build_context.md is the spec, the domain context augments, and program log messages are at most corroborating evidence (Principle #5). - Phase 4: unify the placeholder to {generator_project}. - Frontmatter: "Scene-agnostic" -> "Domain-agnostic". domain-context/browser/verify.md: - Open with the new fact that browser configuration lives in the BRIDGIC_BROWSER_JSON env-var setup inside main.py, not in any Browser(...) constructor call. - Launch-parameter parity: switch the check from "main.py's Browser constructor parameters" to grepping the BRIDGIC_BROWSER_JSON dict for headless / viewport / channel keys. - Isolated-mode user_data_dir: switch from "override the SDK kwarg" to "verify the JSON dict pins user_data_dir to the expected path, resolving <PROJECT_ROOT> first" -- consistent with the CLI route in domain-context/browser/code.md. - Add a cleanup precondition: only delete the isolated profile directory after main.py's finally has released the persistent CLI browser process via uv run bridgic-browser close.
lynnlink
pushed a commit
that referenced
this pull request
May 13, 2026
…ith file auto-resolve Test_04 surfaced two methodology gaps: 1. §2.6 #2 had recommended `async for primitive in sub: yield primitive` as the sub-generator drain pattern — but Python's `async for` calls `sub.asend(None)`, so any `x = yield ActionCall(...)` inside a sub-generator silently gets None. Rule rewritten: no sub-generators; inline every step, loop, and branch directly in `on_workflow` (matches what test_03 already did). §2.10 worked example loop un-extracted. 2. `bridgic-browser snapshot` default `-l 10000` truncates substantial pages to a `[notice] saved to: <path>` notice. browser/code.md §2.7 now mandates an `observation` hook in the same 3-section format as `browser-observe.sh` (=== ACTION === / === POST-ACTION TABS === / === POST-ACTION SNAPSHOT ===); saved artifacts use the same format. Both observation and artifact auto-resolve the notice to file content; wrapper output itself stays unresolved (context-bounding for the explore agent's LLM ingest).
lynnlink
pushed a commit
that referenced
this pull request
May 13, 2026
…y redundancy audit amphi-code.md - §2.6 new #5: Shell-quote interpolated values in bash commands. Generic rule covering URL `&`-truncation (single-quote known-safe content) and arbitrary text (shlex.quote for unknown content). Lifted from browser-specific overlay so non-browser tasks benefit. Renumbers existing #5/#6/#7 → #6/#7/#8; §2.10 cross-ref updated. - §2.10 worked example: dropped trivial sibling-file code blocks (helpers.py / schemas.py / prompts.py — each a 2-4 line demo redundant with §2.4 sibling-file rules). Kept the amphi.py block + Reading guide; one prose line points at §2.4 for the omitted sibling shapes. verify.md: six redundancy cuts — on_agent-side HITL parenthetical (covered by Principle #1), channel-name bullets → compressed prose, channel-handler signature note (code shows it), Pattern C compressed, monitor.sh re-invoke implementation detail, Principle #2 / #5 restatements → cross-refs. Net: -38 lines off Phase 4 / verify input. Sealing this version before moving to production use.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 AmphiLoop v1.0.0 Release
Overview
The inaugural AmphiLoop release. AmphiLoop is the agent skill & knowledge corpus for the Bridgic ecosystem, packaged as a Claude Code plugin. It ships three layers — Skills (domain knowledge), Agents (execution methodology), and Commands (orchestration) — that together turn any task description into a runnable bridgic-amphibious project end-to-end.
This release lands the abstract methodology refactor: a single domain-agnostic
/buildpipeline, a clean explore → code → verify agent trio, a shareduvproject across all phases, and pre-distilled per-domain context (currently--browser).🛠️ Key Features
/buildcommand — domain-agnostic pipeline that accepts an optional--<domain>flag (currently--browser); without a flag, the domain is auto-detected fromTASK.mdand falls back to a generic flow. Replaces the prior/build-browsercommand.domain-context/<domain>/injects per-domainintent.md,config.md,explore.md,code.md,verify.md(+script/) into the pipeline only when the matching domain is selected.amphibious-explore,amphibious-code,amphibious-verifyexpress the explore → code → verify methodology independent of any specific domain.amphibious-configis inline-loaded by/buildPhase 2 for interactive configuration.setup-env.shrunsuv init --bareonce atPROJECT_ROOT; explore, code, and verify phases all share the sameuvenv.scripts/run/monitor.shmerges launch and monitor into one entry point with PID-file resume after human intervention, recursive process-tree kill on timeout, and stale-request cleanup on exit.inject-command-paths.shhook suppliesPLUGIN_ROOTandPROJECT_ROOTwhenever a bridgic command loads, so subagents bootstrap with the right paths.bridgic-browser,bridgic-amphibious,bridgic-llms, kept up-to-date throughskills/manifest.ini+scripts/maintenance/sync-skills.sh.🛠️ Refactor
/build-browserinto/build --browser, driven bydomain-context/browser/(refactor: generalize /build with domain-context and abstract agents #1).amphibious-generator→amphibious-code; retirebrowser-explorerin favour of the abstractamphibious-explore(refactor: generalize /build with domain-context and abstract agents #1)./buildinvocation contract and add subagent bootstrap so phases share context (refactor: generalize /build with domain-context and abstract agents #1).plugin.jsonwith the newamphi.pyscaffold (refactor: generalize /build with domain-context and abstract agents #1).📚 Docs
CLAUDE.mdto describe the corpus layers (Skills / Agents / Commands / Domain Context) and the/buildpipeline.claude plugin marketplace add <local-path>followed byclaude plugin install AmphiLoop.⚙️ CI
.github/workflows/validate.ymlcovering manifest & skill integrity, markdown lint, shellcheck, and internal file-reference checks.📦 Distribution
AmphiLoop@1.0.0Bridgic(this repo's.claude-plugin/marketplace.json)bridgic-browser,bridgic-amphibious,bridgic-llms