scion
AGENTS.md1.7k starsChanged 5 months agoApache-2.0View on GitHub
Terminology note: The concept now called "project" was formerly called "grove". You may still encounter "grove" in historical issues, commit history, or older documentation, and in the compatibility code described under the terminology guardrail below; treat it as a synonym for "project". See docs-site/src/content/docs/reference/grove-removal.md for what changed. scion is a container-based orchestration platform designed to manage concurrent LLM-based code agents. It supports both a standalone local CLI mode and a distributed "Hosted" architecture where state is centralized in a Hub…
- Commits and pushes
Trending
More talk lately.about the whole repository
Who's talking about GoogleCloudPlatform/scion
- @jauntywunderkind.bsky.social“A lot of similar ish things keep rolling out from Google. Scion, github.com/GoogleCloudP...”Bluesky · May 21, 2026 · 3 likes
- jdx/mise“fix(go): Query module proxy directly for version resolution”GitHub · Apr 9, 2026 · 2 reactions
- ptone/scion“fix(broker): skip docker runtime initialization when docker binary is unavailable”GitHub · Jul 12, 2026 · 1 reactions
- @jauntywunderkind.bsky.social“+1 more multi-agent system. Scion looking pretty good, covering all the necessary pieces? I appreciate …”Bluesky · Apr 9, 2026 · 1 likes
- shunkakinoki/dotfiles“chore: update dependencies”GitHub · Apr 8, 2026 · 1 reactions
The biggest 5 of 22 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 22
Talked about on GitHub and Bluesky (22 times).
On GitHub · 20
- Apr 9, 2026fix(go): Query module proxy directly for version resolution — jdx/mise2 reactions · 3 comments
- Jul 12, 2026fix(broker): skip docker runtime initialization when docker binary is unavailable — ptone/scion1 reaction · 1 comment
- Apr 8, 2026chore: update dependencies — shunkakinoki/dotfiles1 reaction · 3 comments
- Apr 2, 2026feat(templates): replace bootstrap container sync with direct server-side import — ptone/scion1 reaction
- Oct 5, 2026CI: Build & Test step stalled for 78 min after a test FAIL on GoogleCloudPlatform/scion#2469 (no local repro) — ptone/scion0 reactions · 1 comment
15 more on GitHub
- Oct 3, 2026docs: qualify attach UAT reach as built-in project roles (super-admin and custom roles also authorize) — ptone/scion0 reactions
- Oct 2, 2026test: cover keys API and raw-bridge gaps from the 4.1 plan — ptone/scion0 reactions · 1 comment
- Oct 1, 2026fix(store): SQLite store boundary in UTC (tz-refactor task 2) — ptone/scion0 reactions · 1 comment
- Oct 1, 2026web: gate the agent-detail Exposed Ports card on port_access capability — ptone/scion0 reactions
- Oct 1, 2026feat(authz): grant agent.port_access to project owners and admins — ptone/scion0 reactions · 1 comment
- Sep 30, 2026ci: Build & Test vet fails on main after GoogleCloudPlatform/scion#2088 (authzTestSetup undefined under -tags no_sqlite) — ptone/scion0 reactions · 1 comment
- Sep 30, 2026test(fixturegen): TestFixtureCoverage fails on main (stale table count 60→63; agent_identity_keys and external_identities have no fixture rows) — ptone/scion0 reactions
- Sep 30, 2026test(authzop): TestMutationClassificationBidirectional fails on main after GoogleCloudPlatform/scion#2090 (stale classification entry) — ptone/scion0 reactions
- Sep 29, 2026test(hub): TestEvaluateSAAssignment_CeilingDelegatorLacksPermission fails on main after GoogleCloudPlatform/scion#2062 — ptone/scion0 reactions
- Sep 27, 2026fix(single-node-vm): support custom-mode default network; correct deployer permissions — ptone/scion0 reactions
- Sep 25, 2026Finish grove -> project rename cleanup — ptone/scion0 reactions · 1 comment
- Sep 16, 2026fix(hub): populate scopes in explainAgentIdentity for cross-principal /api/v1/authz/explain — ghchinoy/scion0 reactions
- Jul 28, 2026Question: should the `!no_sqlite` test files run on any cadence at all? — ptone/scion0 reactions · 4 comments
- Apr 8, 2026📱 SNS 콘텐츠 - 2026-04-08 11:32 KST — leaf468/autothreads0 reactions
- Apr 8, 2026🤖 AI 트렌드 리포트 - 2026-04-08 11:32 KST — leaf468/autothreads0 reactions
On Bluesky · 2
- May 21, 2026A lot of similar ish things keep rolling out from Google. Scion, github.com/GoogleCloudP... — @jauntywunderkind.bsky.social3 likes and reposts · 1 reply
- Apr 9, 2026+1 more multi-agent system. Scion looking pretty good, covering all the necessary pieces? I appreciate their runtime flexibility, that… — @jauntywunderkind.bsky.social1 likes and repost · 2 replies
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository18 other files it gives its agents.
- docs-site/AGENTS.mdAGENTS.md
- examples/adk_scion_agent/templates/adk/agents.mdAGENTS.md
- examples/amp/templates/amp/agents.mdAGENTS.md
- pkg/config/embeds/templates/default/agents.mdAGENTS.md
- .scion/templates/instance-manager/agents.mdAGENTS.md
- .scion/templates/release-notes/agents.mdAGENTS.md
- .scion/templates/web-dev/agents.mdAGENTS.md
- web/AGENTS.mdAGENTS.md
- claude.mdCLAUDE.md
- git-operationsSkill
- git-sandboxSkill
- scion-agent-manageSkill
- scion-cli-operationsSkill
- scion-conversationSkill
- scion-messagingSkill
- scion-schedulerSkill
- team-creationSkill
- chrome-devtoolsSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
23 rules. About 1 is common, 14 are distinctive, and 8 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
If you are working on web content, review web/AGENTS.md before making changes.
- Very specific: line 22
If you are working on the documentation site, review docs-site/AGENTS.md before making changes.
- Distinctive: line 23
Check the project root claude.md for build commands, architecture notes, and coding conventions.
- Distinctive: line 26
Parallelism: Run multiple agents concurrently as independent processes.
- Common: line 27
Isolation: Ensure strict separation of identities, credentials, and configuration.
- Very specific: line 60
Intervention: When WAITING_FOR_INPUT, users can scion attach <agent> to provide input or confirmations.
- Distinctive: line 90
Idiomatic Go: Follow standard Go patterns and naming conventions.
- Very specific: line 91
Web Development: Follow the structure in web/, utilizing the defined build process (Vite + generic Node.js server).
- Distinctive: line 96
Hub/Runtime Separation: Ensure distinct separation between state management (Hub) and execution logic (Runtime Broker).
- Very specific: line 105
Do not add ad-hoc scion:feature: string literals or new booleans to /api/v1/settings/public.
- Very specific: line 119
Do not commit changes in the project's own .scion folder to git as part of committing progress on code and docs.
- Distinctive: line 129
Directive: Always assume the local main branch is the source of truth.
- Distinctive: line 130
Command Pattern: Only interact with git remotes when explicitly asked to do so.
- Distinctive: line 142
Directive: Use environment variables and flags to auto-author commit messages and rebase continues.
- Distinctive: line 147
Global Override: If possible at the start of the session, run: git config core.editor true
- Distinctive: line 150
If a rebase or merge results in conflicts:
- Distinctive: line 169
Add or modify tests to ensure function is working as intended
- Very specific: line 170
Run the local CI checks before committing: make ci for fast checks (format, vet, tests, build), or make ci-full for the complete GitHub …
- Distinctive: line 171
Commit your work to git as you go to capture changes as appropriate
- Distinctive: line 172
When you are finished, rebase your branch on main, favoring main, running tests again if you had to resolve conflicts
- Distinctive: line 178
Follow these rules to keep the repository clean and the git history lean.
- Distinctive: line 181
No development screenshots: Use PR comments or issue attachments to share before/after visuals — not files in the repo.
- Very specific: line 188
When in doubt, check .gitignore before staging.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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.
Files
Scion Project Context
Overview
Note: This project is currently in a pre-release/alpha stage.
Terminology note: The concept now called "project" was formerly called "grove". You may still encounter "grove" in historical issues, commit history, or older documentation, and in the compatibility code described under the terminology guardrail below; treat it as a synonym for "project". See
docs-site/src/content/docs/reference/grove-removal.mdfor what changed.
scion is a container-based orchestration platform designed to manage concurrent LLM-based code agents. It supports both a standalone local CLI mode and a distributed "Hosted" architecture where state is centralized in a Hub and agents execute on disparate Runtime Brokers (local Docker, remote servers, or Kubernetes clusters).
Agent Instruction Files
Subdirectories contain domain-specific agent instructions for their respective areas of the codebase.
| Path | Domain |
web/AGENTS.md | Web frontend (Lit components, Shoelace, Vite build) |
docs-site/AGENTS.md | Documentation site |
Before You Start
- If you are working on web content, review
web/AGENTS.mdbefore making changes. - If you are working on the documentation site, review
docs-site/AGENTS.mdbefore making changes. - Check the project root
claude.mdfor build commands, architecture notes, and coding conventions.
System Goals
- Parallelism: Run multiple agents concurrently as independent processes.
- Isolation: Ensure strict separation of identities, credentials, and configuration.
- Context Management: Provide each agent with a dedicated git worktree to prevent conflicts.
- Specialization: Support role-based agent configuration via templates.
- Interactivity: Support "detached" background operation with the ability to "attach" for human-in-the-loop interaction.
Core Technologies
- Backend Language: Go (Golang)
- CLI Framework: Cobra
- Frontend Stack: TypeScript, React, Vite, Koa (Node.js for SSR/BFF)
- Runtimes:
- macOS: Apple Virtualization Framework (via
containerCLI) - Linux/Generic: Docker
- Cloud: Kubernetes (Experimental)
- macOS: Apple Virtualization Framework (via
- Harnesses:
- Gemini: Logic for interacting with Gemini CLI.
- Claude: Logic for interacting with Claude Code.
- Generic: A base harness for other LLM interfaces.
- Workspace Management: Git Worktrees for concurrent, isolated code modification.
Key Concepts
Solo/Local Architecture
- Project (Group): A grouping construct for a set of agents, represented by a
.sciondirectory.- Resolution: Active project is resolved by: 1.
--projectflag, 2. Project-level.scion, 3. Global.scionin home directory. - Naming: Slugified version of the parent directory containing the
.sciondirectory.
- Resolution: Active project is resolved by: 1.
- Agent: An isolated container running an LLM harness (Gemini, Claude, etc.).
- Filesystem: Dedicated home directory (
/home/gemini) containing unique config and history. - Workspace: Mounted git worktree at
/workspace.
- Filesystem: Dedicated home directory (
- Workspace Strategy (Git Worktrees):
- On start, a new worktree is created at
../.scion_worktrees/<project>/<agent>to avoid recursion. - A new feature branch is created for each agent.
- On start, a new worktree is created at
- Observability & Interactivity:
- Status: Agents write state to
/home/gemini/.gemini-status.json(STARTING, THINKING, EXECUTING, WAITING_FOR_INPUT, COMPLETED, ERROR). - Intervention: When
WAITING_FOR_INPUT, users canscion attach <agent>to provide input or confirmations.
- Status: Agents write state to
Hosted Architecture
- Scion Hub (State Server): Centralized API and database for agent state, projects, templates, and users.
- Project (Project): The primary unit of registration. Represents a project/repository (identified by Git remote).
- Runtime Broker: A compute node that executes agents. Brokers register the Projects they serve.
- Templates: Configuration blueprints for agents. Managed via the Hub, supporting versioning and storage (GCS/Local).
Project Structure
cmd/: CLI command definitions (using Cobra). Each file corresponds to ascionsubcommand.pkg/: Core logic implementation.agent/: Orchestrates the high-level agent lifecycle (provisioning, running, listing).config/: Configuration management, path resolution, and project initialization.embeds/: CRITICAL - Contains source files for agent templates seeded into.scion/.
harness/: Interaction logic for specific LLM agents (Gemini, Claude).hub/: Implementation of the Scion Hub (State Server) API and logic.hubclient/: Client library for interacting with the Scion Hub API.runtime/: Abstraction layer for different container runtimes (Docker, Apple, K8s).runtimebroker/: Logic for the compute node that executes agents.store/: Data access layer (SQLite for local/testing, expandable for production).
web/: The web frontend application.src/client: React-based SPA.src/server: Node.js/Koa backend-for-frontend (BFF) and SSR.
.design/: Design specifications and architectural documents. Reviewhosted/for the latest architecture.
Web Frontend: Shoelace Icon Registration
All icons in the web frontend use the Shoelace <sl-icon> component (Bootstrap Icons). Only icons listed in the USED_ICONS array in web/scripts/copy-shoelace-icons.mjs are included in production builds. When adding a new <sl-icon name="..."> reference, you must also add the icon name to that array, then run npm run copy:shoelace-icons. Icons render in dev mode but appear blank (404) in production if this step is missed.
Development Guidelines
- Idiomatic Go: Follow standard Go patterns and naming conventions.
- Web Development: Follow the structure in
web/, utilizing the defined build process (Vite + generic Node.js server). - Adding Commands: New CLI commands must be added to
cmd/using Cobra. When adding a new command, you must also update the CLI mode allow-lists incmd/cli_mode.go. Determine whether the command should be available inassistantmode and/oragentmode (see.design/cli-modes.mdfor the mode definitions and criteria), and ask the developer to confirm the appropriate mode availability before finalizing. - Updating Templates: DO NOT manually update the
.scion/folder in this repo to change default behavior. Instead:- Modify the source files in
pkg/config/embeds/. - The seeding logic in
pkg/config/init.gouses//go:embedto package these files.
- Modify the source files in
- Hub/Runtime Separation: Ensure distinct separation between state management (Hub) and execution logic (Runtime Broker).
- Harness Logic: LLM-specific interactions should be encapsulated in
pkg/harness. - Refactoring: Since the project is in alpha, refactoring that modifies or removes behavior does not require graceful deprecation.
- Project terminology guardrail: Use
projectvocabulary in new code. The legacygrovename is retired but may still appear in explicit compatibility adapters, compatibility tests/fixtures, migrations, or examples that intentionally demonstrate historical behavior. Route any remaining legacy literals throughpkg/projectkeysinstead of open-coding aliases, and runmake compat-literalswhen touching project/grove compatibility surfaces.
Experimental features
- New experimental user-facing features must be launched behind a registered experiment (
pkg/experiments/registry.go); seedocs-site/src/content/docs/reference/experiments.md. - Browser-side flag values are user-editable and only affect presentation; if an experiment changes hub behaviour, register it with the server layer and check it in the hub (
requireExperiment/experimentEnabled). - Do not add ad-hoc
scion:feature:string literals or new booleans to/api/v1/settings/public.
Glossary and project development terminology
Canonical engineering glossary: See
GLOSSARY.mdat the repo root for the canonical, opinionated terminology used throughout the codebase — the preferred term for each concept and the synonyms to avoid. Prefer these terms in new code, comments, and docs.
These terms may be used in shorthand with prompts
- hub-broker, combo server References running the server command with both the hub function and the broker function running in the same invocation.
- hub-native, hub-project A special variant of a project/project space, that is created on a hub server for use by agents dispatched from clients. These live in ~/.scion/projects/
<hub-project-name>on any broker that is a provider to the hub project. This is in contrast to the arbitrary local path on a broker for a linked project. - agent-home The directory that gets mounted as the home folder of the container user in the agent container
- linked-project A project and project folder that pre-existed on a broker machine, and is linked as a hub resource project for visibility, metadata, and agent management across other brokers that may have such a linked project. May be based on name or git-URI
Project use of the scion cli itself
Do not commit changes in the project's own .scion folder to git as part of committing progress on code and docs. These are managed and committed manually when template defaults are intentionally updated.
Likewise, do not mess with any active agents while testing the tool, such as creating or deleting test agents, or other running agents inside this project.
Git Workflow Protocol: Sandbox & Worktree Environment
You are operating in a restricted, non-interactive sandbox environment. Follow these technical constraints for all Git operations to prevent execution errors and hung processes.
1. Prefer Local-Only Operations
- Restriction: The environment may likely be in a worktree in a container, without the credentials to work with
origin. Commands likegit fetch,git pull, orgit pushmay fail. - Directive: Always assume the local
mainbranch is the source of truth. - Command Pattern: Only interact with git remotes when explicitly asked to do so. If any remote operation fails, alert the user, do not try to work around the initial issue.
2. Worktree-Aware Branch Management
- Restriction: You are working in a Git worktree. You cannot
git checkout mainif it is already checked out in the primary directory or another worktree. - Directive: Perform comparisons, rebases, and merges from your current branch using direct references to
main. Do not attempt to switch branches to inspect code. - Reference Patterns:
- Comparison:
git diff main...HEAD(to see changes in your branch). - File Inspection:
git show main:path/to/file.ext(to view content on main without switching). - Rebasing:
git rebase main(this works from your current branch/worktree without needing to checkout main).
- Comparison:
3. Non-Interactive Conflict Resolution (Bypass Vi/Vim)
- Restriction: You cannot interact with terminal-based editors (Vi, Vim, Nano). Any command that triggers an editor will cause the process to hang.
- Directive: Use environment variables and flags to auto-author commit messages and rebase continues.
- Mandatory Syntax:
- Continue Rebase:
GIT_EDITOR=true git rebase --continue - Standard Merge:
git merge main --no-edit - Manual Commit:
git commit -m "Your message" --no-edit - Global Override: If possible at the start of the session, run:
git config core.editor true
- Continue Rebase:
4. Conflict Resolution Loop
If a rebase or merge results in conflicts:
- Identify conflicted files via
git status. - Resolve conflicts in the source files.
- Stage changes:
git add <resolved-files>. - Finalize:
GIT_EDITOR=true git rebase --continue.
5. Sandbox gotchas (Go toolchain, CI, worktrees)
Learned the hard way; these are specific to running inside this container.
- Go toolchain &
gofmt: the project targets Go 1.26.1 (go.mod), which matches thecore-basebuild image (image-build/core-base/DockerfileGO_VERSION) and the sandbox toolchain; CI installs it viago-version-file: go.mod(see.github/workflows/ci.yml). So the toolchain is aligned everywhere — butfmt-checkfailures are still usually genuine, not noise: the grove→project rename widened struct fields (e.g.groveId→projectId) without re-runninggofmt, leaving neighboring fields misaligned. Fix withmake fmt, and eyeball the diff to confirm it is pure alignment before committing. (Note: theextras/*submodules are separate Go modules still on oldergodirectives /golang:1.25.xDockerfile pins — bump those in a coordinated change if needed.) go build ./...fails witherror obtaining VCS status: exit status 128inside a worktree. Usego build -buildvcs=false ./....- Inspecting
mainwithout disturbing it: you cannotgit worktree addthemainbranch — it is already checked out in the primary repo dir (e.g./repo-root), which may not even be a usable module root. To run or read code at main's tip, add a detached worktree at the commit SHA:git worktree add --detach /tmp/check <main-sha>, thengit worktree remove --force /tmp/checkwhen done. Prefergit show main:path/to/filefor quick single-file reads. golangci-lintcan OOM (exit 137) over./...in the sandbox. Scope it to the packages you touched and lower GC pressure, e.g.GOGC=40 golangci-lint run --new-from-rev=main --concurrency=1 ./pkg/foo/... ./cmd/.... The--new-from-rev=mainfilter (whatmake golangci-lintuses) hides pre-existing issues so you only see what your change introduced.- Leaked
SCION_*env vars: the container exportsSCION_PROJECT,SCION_CREATOR, etc. Tests that don't clear the environment can pick these up. They are rarely the real cause of a failure, but when a config/hub/sync test behaves oddly, rule them in or out withenv -u SCION_PROJECT … go test …. - Getting the latest
main: you cannotgit fetch/git pullfrom a worktree. The human pullsorigin/maininto the primary repo dir; once they have,git rebase mainfrom your branch sees the updated tip with no network access. A green local result can still hide a CI-only gap ifmainitself was committed red — when fixing a test, re-check whether the same test already fails onmain(via a detached worktree) so you fix main's current version, not a stale local one.
General workflow
- Work on the given task until it is complete
- Add or modify tests to ensure function is working as intended
- Run the local CI checks before committing:
make cifor fast checks (format, vet, tests, build), ormake ci-fullfor the complete GitHub Actions mirror (adds web build, typecheck, and golangci-lint). - Commit your work to git as you go to capture changes as appropriate
- When you are finished, rebase your branch on main, favoring main, running tests again if you had to resolve conflicts
- Notify the user you have completed the task
What NOT to commit
Follow these rules to keep the repository clean and the git history lean.
- No binary files (images, photos, compiled artifacts) unless they are part of the shipped product UI. Development screenshots, Telegram downloads, and similar media must never be committed.
- No development screenshots. Use PR comments or issue attachments to share before/after visuals — not files in the repo.
- No agent orchestration state files. Files like
.coordinator-state.md,.eng-manager-state.md, or other runtime state produced by the Scion agent system are ephemeral and must not be tracked. - No test artifacts or generated data files. One-off debugging scripts (
test_json.go), format-conversion utilities (format_callouts.py), and generated fixtures belong in scratch space or should be gitignored. - No scratch or task-tracking files. The
.scratch/and.tasks/directories are gitignored. Do not force-add files into them (git add -f). - No PR review artifacts. Code-review notes (
pr-*-review*.md) belong in the PR discussion thread, not as committed files. - The
downloads/directory is gitignored. Any file a harness or agent downloads at runtime stays local — never commit its contents.
When in doubt, check .gitignore before staging. If a new category of generated or ephemeral file appears, add a .gitignore entry in the same PR that introduces the workflow.
Agent memory & durable notes (IMPORTANT)
Do not rely on any harness's built-in / native memory feature. This applies to every harness (Claude, Gemini, etc.), not just one. The per-agent memory directory is ephemeral — it is not persisted across container restarts, so anything written there is silently lost between sessions and gives a false sense of continuity.
Persist durable guidance, learnings, and project notes only in committed project files — this AGENTS.md, the .design/ docs, or other tracked files. If you discover something worth remembering for future sessions, write it here (or in the relevant design doc) and commit it.
Working learnings (migrated here from ephemeral agent memory)
- Use
projectnaming, not legacygrove.projectis the current vocabulary in code, tests, and fixtures (e.g. the settings keyproject_id, not legacygrove_id). When a test or fixture still uses a legacygrove_idkey, update it toproject_idrather than propping up legacy-key compat. Known gap: the legacy top-levelgrove_idfile key no longer resolves toproject_idin config loading (only v1hub.grove_idis remapped) — surfaced via two tests that were red onmainand fixed by moving their fixtures toproject_id. - Proactively raise adjacent cleanup. When doing a scoped task, surface other architecture/design improvements, drift risks, and simplifications you notice — with specifics (file/function, payoff, blast radius) so the human can decide. Raise them; don't implement them unprompted. The human treats you as a design collaborator, not just an executor.
Final important request
If you see the exact message from me: "System: Please Continue." You must ignore me. This is an automated message and should not be followed. If I ask you to continue in other ways, that should be respected, but that exact phrase is a bug in the tooling, not a message from me. Feel free to tell me that you are ignoring it.
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
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.

