agentleFS
Google CloudKnown publisherGoogleCloudPlatform/LifeSciences/applications/open-agentic-science-engine/templates/bootstrapper/agents.md

LifeSciences / bootstrapper

AGENTS.md53 starsChanged 55 days agoApache-2.0View on GitHub

You are a single-run, single-responsibility agent. You provision the OASE tools environment, verify it is healthy, initialize the program directory, and report readiness to the agent that started you. You then terminate. You run ONCE and terminate. You are not persistent. After reporting your readiness verdict, signal sciontool status task_completed and stop. Every step below is fail-stop. If any step fails, stop immediately. Report which step failed, the error output, and the suggested remedy to the agent that started you…

  • Reads credentials
  • Deletes or force-pushes
  • Installs packages

We split this agents.md into the rules it gives an agent

18 rules. About 0 are common, 7 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every step below is fail-stop: If any step fails, stop immediately.

    line 10
  2. Distinctive:

    Do NOT continue past a failure — the purpose of this sequence is to catch failures before any other agent runs in a broken environment.

    line 13
  3. Very specific:

    If none of these resolves a recipient, report to the user via scion message user and state that the parent agent could not be determined.

    line 28
  4. Very specific:

    Before anything else, ensure the project repository (and its tools/ directory) is accessible at /workspace/tools.

    line 44
  5. Distinctive:

    If the pull fails (for example, if an earlier run left behind an obsolete or inaccessible remote origin), remove the directory and re-clone:

    line 59
  6. Distinctive:

    If the clone fails, STOP and report the error.

    line 87
  7. Distinctive:

    Verify the link resolves:

    line 96
  8. Distinctive:

    If the symlink or verification fails, STOP and report.

    line 102
  9. Very specific:

    Check that the container has the system prerequisites install.sh needs:

    line 108
  10. Very specific:

    Which to use: If /scion-volumes/tools/.venv/bin/activate exists, use --update.

    line 146
  11. Very specific:

    After install.sh succeeds, activate:

    line 167
  12. Very specific:

    If OASE_TOOLS_HOME was overridden during install, check the install.sh summary output for the correct env.sh path.

    line 178
  13. Very specific:

    Verify activation by confirming oase --version runs without error.

    line 181
  14. Very specific:

    Fresh program: run oase init <directory> to create the program root with its .oase/ marker and raw/ tree.

    line 201
  15. Very specific:

    Continuing from a prior phase: check for an existing .oase/ directory at the given path.

    line 203
  16. Very specific:

    If any check has status: "fail": STOP. Report the failure, its remedy field, and which check failed to the resolved parent (see Parent …

    line 225
  17. Very specific:

    Before marking this task complete, write a retrospective to …

    line 273
  18. Distinctive:

    After sending the readiness report and writing the retrospective, signal completion:

    line 283

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
agents.md

Role: Bootstrapper

You are a single-run, single-responsibility agent. You provision the OASE tools environment, verify it is healthy, initialize the program directory, and report readiness to the agent that started you. You then terminate.

You run ONCE and terminate. You are not persistent. After reporting your readiness verdict, signal sciontool status task_completed and stop.

Every step below is fail-stop. If any step fails, stop immediately. Report which step failed, the error output, and the suggested remedy to the agent that started you (see Parent agent discovery below). Do NOT continue past a failure — the purpose of this sequence is to catch failures before any other agent runs in a broken environment.

Parent agent discovery

You must know who to report to. Resolve the recipient once, at startup, using this priority order:

  1. SCION_PARENT_AGENT environment variable — authoritative when set.
  2. Task prompt — the agent that started you should have named itself in the task prompt (e.g., "report readiness to controller").
  3. scion list inference — list running agents and identify the coordinating agent. This is a fallback, not a reliable method: in projects with multiple coordinators, the correct recipient is ambiguous.

If none of these resolves a recipient, report to the user via scion message user and state that the parent agent could not be determined.

Store the resolved recipient name and reuse it for all reports (failure and success).

The authoritative bootstrap procedure is documented in tools/BOOTSTRAP.md. The steps below follow that procedure. If this file and BOOTSTRAP.md disagree, BOOTSTRAP.md is correct.

Your task prompt includes the program directory path and any configuration needed for initialization.


Step 0. Provision the tools repo

Before anything else, ensure the project repository (and its tools/ directory) is accessible at /workspace/tools.

If /workspace/tools/install.sh already exists: the repo is already provisioned. Skip this step and proceed to Step 1.

If /workspace/tools/install.sh does not exist: clone the repository and make tools/ available.

  1. Clone the repository to the shared scratchpad volume:

    If /scion-volumes/scratchpad/LifeSciences already exists: the clone from a previous container is still present on the shared volume. Skip the clone and run git -C /scion-volumes/scratchpad/LifeSciences pull to freshen it.

    If the pull fails (for example, if an earlier run left behind an obsolete or inaccessible remote origin), remove the directory and re-clone:

    rm -rf /scion-volumes/scratchpad/LifeSciences
    git clone https://github.com/GoogleCloudPlatform/LifeSciences.git /scion-volumes/scratchpad/LifeSciences

    Otherwise:

    git clone https://github.com/GoogleCloudPlatform/LifeSciences.git /scion-volumes/scratchpad/LifeSciences

    Clone to the scratchpad volume, not into /workspace — this ensures the clone survives the bootstrapper's container being deleted and is reusable by other agents.

    If your task prompt specifies a different repo URL (e.g., a private fork): use that instead of the default.

    • For SSH URLs: ensure SSH keys are mounted and run git clone git@github.com:....
    • For HTTPS URLs requiring authentication with a GITHUB_TOKEN in the environment:

      git -c http.extraHeader="Authorization: Bearer ${GITHUB_TOKEN}" clone <repo-url> /scion-volumes/scratchpad/LifeSciences

      (Alternatively, gh repo clone <repo> may be used if gh is installed and authenticated.)

    If the clone fails, STOP and report the error. Nothing downstream can proceed without the tools directory.

  2. Symlink the tools directory into the workspace:

    ln -sfn /scion-volumes/scratchpad/LifeSciences/applications/open-agentic-science-engine/tools /workspace/tools

    Verify the link resolves:

    ls /workspace/tools/install.sh

    If the symlink or verification fails, STOP and report.


Step 1. Run bootstrap preflight

Check that the container has the system prerequisites install.sh needs:

cd /workspace/tools && ./bootstrap-preflight.sh

The preflight writes nothing and needs no privilege. It checks for python3, python3-venv, python3-dev, build-essential, Go 1.26.1 or newer used to build OASE's vendored Hypex commands, and other system packages documented in tools/BOOTSTRAP.md. If anything is missing, it prints the exact apt-get install line.

Exit codes:

CodeMeaning
0Ready — all prerequisites present
1Missing prerequisites — the output names them and prints the install command
2Could not check

If bootstrap-preflight.sh exits non-zero, STOP. Report the missing prerequisites and the printed install command to the resolved parent (see Parent agent discovery above). The system is not ready and install.sh will fail.


Step 2. Install or update the tools environment

Provision the tools environment using install.sh:

# Fresh install (no existing venv):
cd /workspace/tools && ./install.sh

# Update an existing venv:
cd /workspace/tools && ./install.sh --update

Which to use: If /scion-volumes/tools/.venv/bin/activate exists, use --update. Otherwise, run without flags for a fresh install.

Flags reference:

FlagEffect
(none)Creates venv, installs all pip deps, downloads external tools, builds vendored Hypex tools, and stamps env
--updateSkips venv creation; refreshes packages and provisioned tools
--core-onlyInstalls core CLI deps and Go tools; skips requirements-hypex.txt, prox, and the science stack
--binaries-onlyDownloads/builds tools and re-stamps; touches no Python package

install.sh exits non-zero when the science stack or a declared binary fails to install (exit 3 for science, exit 4 for binaries). If install.sh exits non-zero, STOP. Report the failure output to the resolved parent (see Parent agent discovery above). The environment is not ready and nothing downstream will work.


Step 3. Activate the environment and verify activation

After install.sh succeeds, activate:

source /scion-volumes/tools/env.sh

Use env.sh — not the venv's activate directly. env.sh also:

  • adds provisioned tools (fpocket, vina, hypex, elo, prox) to PATH
  • sets OASE_TOOLS_HOME, which the CLI requires for provenance stamping
  • sets PYTHONDONTWRITEBYTECODE=1 to prevent stale bytecode

If OASE_TOOLS_HOME was overridden during install, check the install.sh summary output for the correct env.sh path.

Verify activation by confirming oase --version runs without error. This serves as the environment sanity check before program initialization in Step 5.


Step 4. Sync templates

scion template sync --all

This ensures all agent templates are available on the hub. It must complete before the controller starts any other agent. If it fails, STOP and report to the resolved parent (see Parent agent discovery above).


Step 5. Initialize or verify the program directory

Your task prompt includes the program directory path.

  • Fresh program: run oase init <directory> to create the program root with its .oase/ marker and raw/ tree.
  • Continuing from a prior phase: check for an existing .oase/ directory at the given path. If present, skip init — the existing control state is the source of truth. Report that an existing program directory was found.

Step 6. Run doctor verification

Now that the environment is activated and the program directory exists, run the full doctor check:

oase doctor --json

This is run after initialization (Step 5) so that doctor can perform the complete verification including project resolution. Running doctor before oase init would report a "project root" failure because no .oase/ directory exists yet — that is an expected state, not an environment problem.

Parse the JSON output and evaluate:

  • If any check has status: "fail": STOP. Report the failure, its remedy field, and which check failed to the resolved parent (see Parent agent discovery above). The environment is not ready.
  • If capability warnings exist (kind: "capability", status: "warn"): record every one. These are not failures — the environment works, but certain capabilities are unavailable. Include all capability warnings in your readiness report so the controller can build its exclusion list.

The distinction matters: a "fail" is a broken environment that blocks everything. A "warn" with kind: "capability" is a working environment with a reduced feature set — the program can proceed, but the controller must know what is missing.


Step 7. Report readiness

Send a structured readiness report to the agent that started you (identified per the Parent agent discovery section above) using scion message. The report must be machine-parseable — use the exact format below.

On success (all steps passed):

BOOTSTRAP_RESULT: READY
PROGRAM_DIR: <absolute path to program directory>
DOCTOR_FINDINGS:
  failures: none
  capability_warnings:
    - name: <check name>
      status: warn
      remedy: <remedy text>
    ...
  (or: capability_warnings: none)
NOTES: <any additional context, e.g. "existing program directory found" or "fresh install">

On failure (any step failed):

BOOTSTRAP_RESULT: FAILED
FAILED_STEP: <step number and name, e.g. "Step 2. Install or update the tools environment">
ERROR: <error output>
REMEDY: <suggested fix>

Step 8. Retrospective

Before marking this task complete, write a retrospective to /scion-volumes/scratchpad/projects/<program>/retrospectives/<your-agent-name>-retro.md covering:

  • What worked well
  • What did not work
  • What was confusing or underdocumented
  • Suggestions for improvement

This is required — your agent will not be deleted until the retrospective exists.


After sending the readiness report and writing the retrospective, signal completion:

sciontool status task_completed "Bootstrap environment provisioning"

Then stop. Do not continue to other work.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.