Repository navigation
Description
Primary area
Cross-cutting / multiple
Related issue or feature request
#476 (who may ask for work on a repository), #1021 (REST API for repositories), #1022 (REST API for users and groups), #237 (analytics and compliance export), #377 (deploy separated from application updates), #426 (shared task sessions), #72 (clean-up of ephemeral stacks) and #249 (credential delegation). What each has to do with this RFC is under "Dependencies and integrations".
Summary
The proposal in short. One copy of ABCA would serve several teams. Each team would get a factory: only its members could ask for work on its repositories, and they would see the team's tasks, scoreboard and costs as a whole. Two things stay: a copy that lists no factories works for its users as it does today, and a team that needs a hard boundary gets a copy of its own.
The need. When one company runs ABCA for several product teams, each team wants its own repositories, members, agent settings and numbers (its scoreboard and its costs). The platform team wants to see all of it. A product that needs a hard boundary wants one.
Where ABCA is today. ABCA runs as one copy of the platform, a deployment. Everyone who can sign in may ask agents to work on every onboarded repository, and each person sees only their own tasks. Inside a deployment a team is only a group of users that can be given a monthly budget: it has no repositories, no view and no scoreboard of its own. A second deployment is possible. The setup wizard lists the deployments of an AWS account, but nothing shows their work together.
What this RFC proposes. Three things, in this order:
- Keep the deployment as the only boundary around a team, and make it true. In an AWS account of its own, a deployment is isolated today. In a shared account, two deployments are not yet apart on at least three points: the charts of ABCA's own metrics merge, two account-level settings belong to whichever deployment wrote them last, and integration secrets carry no deployment name. Phase 1 of the roadmap (section 9) deals with the three: each deployment gets its own charts and its own names for integration secrets, the two settings get one owner, and what remains shared is written down.
- Add the factory, the unit a team owns. A factory is a team's repositories, its members (named as groups of users), how agents work on those repositories, and its numbers. It lives inside one deployment. It is written in a file, the factory list, and applied in seconds, with no deploy: a command writes the file into the running deployment as data. It separates people, settings and numbers. It is not a boundary.
- Run no service above the deployments. What manages them is files in Git, a few commands and AWS telemetry. A deployment keeps working when everything above it is down.
What the maintainers are asked for. Answers to the nine open decisions, which are listed under "Potential challenges". This RFC proposes an answer for seven of them. With those answers, a decision record, ADR-027 (the next free number today), that fixes the three words (deployment, factory, fleet) and the ten rules of section 8. What an approval of this issue covers is for the maintainers to say. Suggested: it covers that record and the guide of phase 0, and each later phase gets an issue of its own.
Nothing proposed here is built, and no decision has been taken. Every name of a new file, command, option or page is a sketch. What exists today: the profile abca.deployment.json, the commands bgagent setup, bgagent stats, bgagent list and bgagent platform doctor, and the console pages Overview, Tasks, Scoreboard and Costs. Proposed, and so far only sketches: the bgagent factory commands, bgagent platform list, the --factory option, the two factory files and the Settings page.
The idea in pictures
Think of ABCA as a workshop where agents do coding jobs for people.
| Word | Think of it as | In ABCA |
|---|---|---|
| Deployment | One workshop, with its own walls, doors and tools | One copy of ABCA, named after its application stack (backgroundagent-dev unless another name is chosen), with optional network and console stacks. The only boundary ABCA draws around a team |
| Factory | A team's corner inside a workshop: its own job board, its own house rules, its own scoreboard. A corner is not a wall | The unit a product team owns: its repositories, its members, how agents work on the repositories, and its numbers. Hosted by one deployment |
| Fleet | All the workshops one company runs | The deployments one adopter runs |
The building a workshop stands in is its AWS account. Alone in its building, a workshop is apart today. Two workshops in one building still share a few things. Phase 1 separates some of them and writes down the rest.
Today. One workshop, and no corners in it.
%%{init: {"flowchart": {"wrappingWidth": 400}}}%%
flowchart TB
subgraph dep["One deployment today"]
direction LR
all["<b>Everyone who can sign in</b><br/>checkout team, growth team, ..."]
repos["<b>Every onboarded repository</b>"]
all -->|"may ask for work on"| repos
end
dep --> mine["Each person sees<br/>only their own tasks"]
dep --> gap["<b>A team is only a group with a budget</b><br/>No team view, no team scoreboard.<br/>Keeping a team apart means<br/>building it a second deployment."]:::gap
classDef gap fill:#ffebe9,stroke:#cf222e,color:#5c1a14
With this RFC. The same workshop, with a corner for each team. Green marks what is new.
%%{init: {"flowchart": {"wrappingWidth": 500}}}%%
flowchart TB
subgraph dep["One deployment, once its factory list is enforced"]
direction TB
subgraph fa["Factory checkout (new)"]
direction LR
ma["<b>Members of checkout</b>"] -->|"may ask for work on"| ra["<b>checkout's repositories</b>"]
end
subgraph fb["Factory growth (new)"]
direction LR
mb["<b>Members of growth</b>"] -->|"may ask for work on"| rb["<b>growth's repositories</b>"]
end
fa ~~~ fb
end
dep --> mine["<b>My work</b><br/>Each person sees their own tasks,<br/>as today"]
dep --> team["<b>Whole factory</b><br/>A member also sees the tasks, scoreboard<br/>and costs of their team as a whole"]:::new
classDef new fill:#dafbe1,stroke:#1a7f37,color:#0a3d1a
style fa stroke:#2da44e,stroke-width:2px
style fb stroke:#2da44e,stroke-width:2px
Use case and motivation
| Who | Today | With this RFC: what becomes possible |
|---|---|---|
| A product team | It shares a deployment with everyone, or waits for one of its own. Each member sees only their own tasks. Changing how agents work on its repositories needs an operator or a deploy | Its own factory, added by a reviewed change to one file, in seconds. Only its members can ask for work on its repositories. They see the team's tasks, scoreboard and costs as a whole. A setting changes by a pull request |
| The platform team | A team that is kept apart costs a deployment: a deploy, about ten minutes, an idle cost every month, and its own integrations. In one AWS account, the charts of two deployments merge, and their integration secrets carry no deployment name | A team is a reviewed change to one file. Two deployments in one account have their own charts and their own names for integration secrets. One command lists the deployments, and one row of charts shows every deployment of an account |
| A product that needs a hard boundary | A deployment in an AWS account of its own. It works today | The same, with a guide for running several deployments: the own-account path, the upgrade order, how to retire one |
| An engineering manager | No scoreboard for a team. Its only number is a monthly spend against a budget | The existing scoreboard over one team's tasks: whether the work handed to agents becomes merged pull requests, how fast, and what it takes in money and human attention |
Who has asked. Three maintainers, the author of this RFC among them, have asked for parts of a team unit inside a deployment (#476, #1021, #1022, and a comment on #237). No request from an adopter is on record in this repository. That is why the file formats start as experimental, and why nearly everything above a deployment waits for a trigger: an event, named in "Out of scope", that would add it.
Proposal
1. A corner is not a wall
Where a team is placed decides what is its own and what it shares.
| Where the team is | Its own | Still shared | Cost |
|---|---|---|---|
| A factory in a shared deployment (a corner) | Who may ask for work on its repositories, who reads its tasks and numbers, how agents work on them | The deployment's GitHub token and runtime (unless a repository names its own), the memory and the network rules. Task records sit in the same tables | No infrastructure |
| A deployment of its own, in a shared AWS account (a workshop in a shared building) | Also its users, API, tables, token, memory, runtime and network | The account: its quotas, two account-level settings (Bedrock model-invocation logging and the API Gateway CloudWatch role), its operators, and what phase 1 writes down as shared. Until phase 1, the metric charts also merge, and integration secrets carry no deployment name | About $145 a month when idle, and about ten minutes to deploy |
| A deployment of its own, in its own AWS account (a workshop in its own building) | Everything | Nothing that ABCA creates | The same, plus an AWS account |
A factory separates people, settings and numbers. It does not fence in a running task: the tasks of one deployment share its GitHub token, its runtime and its memory. A product that needs a hard boundary gets a deployment. No page and no document will call a factory isolated. The output of bgagent factory plan says what a factory shares and with whom, and so does the new Settings page (section 5) once phase 2b has shipped.
A deployment without a factory list has one factory, default, and behaves as today: everyone who can sign in may ask for work on every repository and reads their own tasks. A single team meets no new word. What phases 1 and 2a change for every deployment that exists is in a table under the roadmap.
2. Factories as code
%%{init: {"flowchart": {"wrappingWidth": 400}}}%%
flowchart LR
subgraph git["Files in Git, changed by pull request"]
prof["<b>abca.deployment.json</b><br/>features and compute<br/>(exists today)"]
list["<b>abca.factories.json</b><br/>the teams, their groups,<br/>their repositories"]:::new
sett["<b>factories/checkout.json</b><br/>optional: how agents work on<br/>checkout's repositories"]:::new
end
subgraph dep["Deployment backgroundagent-dev"]
infra["<b>The platform</b><br/>API, tables, runtime, network"]
f2["<b>Factory growth</b><br/>its people, its repositories,<br/>its numbers"]:::new
f1["<b>Factory checkout</b><br/>its people, its repositories,<br/>its settings, its numbers"]:::new
end
prof -->|"deploy: minutes"| infra
list -->|"apply: seconds"| f2
list -->|"apply: seconds"| f1
sett -->|"apply: seconds"| f1
classDef new fill:#dafbe1,stroke:#1a7f37,color:#0a3d1a
Three files. The first exists today and does not change.
| File | Who owns it | What it holds | Takes effect by |
|---|---|---|---|
abca.deployment[.<stackName>].json |
Platform team | Features and compute of one deployment | A deploy: it changes infrastructure and takes minutes |
abca.factories[.<stackName>].json (new) |
Platform team | The factory list: the teams this deployment hosts, their groups and their repositories | An apply: it changes data only and takes seconds |
factories/<id>.json (new, optional) |
The team proposes it, by pull request | How agents work on the team's repositories | An apply: it changes data only and takes seconds |
The factory list:
{
"schemaVersion": 1,
"deployment": "backgroundagent-dev",
"admission": "shadow",
"withoutRepository": "growth",
"factories": {
"checkout": { "groups": ["checkout-eng"], "repositories": ["acme/checkout-web", "acme/checkout-api"] },
"growth": { "groups": ["growth-eng", "design"], "repositories": ["acme/web"] }
}
}deployment is the deployment the list is written for, and an apply refuses any other. admission is the step of the access rule: off, shadow or enforce (section 6). withoutRepository names the factory that tasks without a repository belong to, and only its members may start one. Each factory names its groups of users and its repositories. A repository belongs to one factory.
A team's settings file:
{
"schemaVersion": 1,
"repositories": {
"acme/checkout-api": {
"agent": { "modelId": "global.anthropic.claude-sonnet-4-6", "maxTurns": 120, "maxBudgetUsd": 12 },
"pipeline": { "buildCommand": "make build", "lintCommand": "make lint" }
}
}
}- What a team may set. Eight settings: the model, the default turn and budget limits of a task, the memory budget, prompt additions, the poll interval, and the build and lint commands. Each value stays inside what the deployment allows. One model can cost several times as much as another, so ADR-027 says whether a team may set it.
- What a team may not set. Compute, credentials, Cedar policies and the approval cap, the egress allowlist and the registry asset lists. They are set as today, by a deploy; compute and the token secret can also be set by an operator command.
- Check.
bgagent factory plan --offlinevalidates the files with no AWS credentials. It is the pull-request check. Who reviews the pull request is the adopter's own rule, for example code owners on the files. - Plan.
bgagent factory plancompares the files with the deployment and prints what an apply would grant, change and revoke, and what the factory shares with the other factories of the deployment. - Apply.
bgagent factory applywrites rows in the deployment's repository table. It changes no CloudFormation stack. The deployment records who applied what, from which commit. - Rollback is a revert and an apply.
- Status: experimental. The format may change between two commits. The label ends when an adopter other than the maintainers has reported using the format and it has gone unchanged for a period that ADR-027 states.
3. Adding a team: before and after
Before. To keep a second team apart, the platform engineer builds it a deployment: bgagent setup for a new deployment, about ten minutes, then its GitHub token, its integrations and its users, and an idle cost every month. The other choice is to let the team into the existing deployment, where nothing separates it.
After, for a team that does not need a hard boundary:
sequenceDiagram
participant G as Pull request
actor P as Platform engineer
participant D as ABCA deployment
actor T as Team member
P->>D: Create the team's group<br/>and add its people
P->>G: Add the team to<br/>abca.factories.json
G-->>P: Check passes<br/>(bgagent factory plan --offline)
P->>G: Merge, once reviewed
P->>D: bgagent factory plan
D-->>P: What would be granted,<br/>changed and revoked
P->>D: bgagent factory apply
Note over P,D: Seconds. No deploy,<br/>no new infrastructure.
T->>D: Ask for work on<br/>the team's repositories
Note over D,T: The team view needs the access<br/>rule to be enforced (section 6)
T->>D: bgagent stats --factory payments
D-->>T: The team's numbers,<br/>and no other team's
- The platform engineer creates a group for the team in the deployment's user directory (a Cognito group) and adds its people, with the AWS CLI until feat(api): REST API for user and team (Cognito group) management #1022 lands. They check that the deployment's GitHub token reaches the team's repositories.
- They add one entry to the factory list and open a pull request:
"payments": { "groups": ["payments-eng"], "repositories": ["acme/payments-api", "acme/payments-web"] } - A check validates the file on the pull request, with no AWS credentials, and the change is reviewed.
- After the merge,
bgagent factory planprints what would be granted, changed and revoked, andbgagent factory applywrites it. Seconds, no deploy. - The team signs in as before. Only its members can start tasks on its repositories. They get a "My work / Whole factory" switch in the console, and
bgagent stats --factory paymentsin the CLI.
Later the team changes how agents work on its repositories by editing factories/payments.json in a pull request. A CI job applies the change on merge, and the next task uses it. Today three of those eight settings need an operator with AWS credentials, and the other five need an edit of the repository list in ABCA's code and a deploy. One limit: a setting that this code declares for a repository keeps the code's value until a deploy removes it there.
What to expect, stated plainly:
- The first team of a deployment waits. The first list runs in shadow mode for a period: nothing is refused, and what would be refused is counted (section 6). Team views start when the deployment moves to
enforceand cover the tasks admitted from then on. Later teams get theirs at once. - The first list names every repository. Once a list is enforced, nobody can ask for work on a repository it does not name.
- It is not fewer steps than today. What goes away is the deploy and the idle cost of a second team. What is new is the review and the team's view.
4. Two paths, and both stay
%%{init: {"flowchart": {"wrappingWidth": 400}}}%%
flowchart TB
q{"Does the team need<br/>a hard boundary?"}
q -->|"No"| f["<b>A factory in a shared deployment</b><br/>A reviewed change to one file,<br/>applied in seconds. No infrastructure.<br/>(new with this RFC)"]:::new
q -->|"Yes"| d["<b>A deployment of its own</b><br/>Isolated in an AWS account of its own.<br/>About ten minutes to deploy,<br/>about $145 a month idle.<br/>(works today)"]
classDef new fill:#dafbe1,stroke:#1a7f37,color:#0a3d1a
- A team needs a hard boundary, a deployment of its own, when it has other administrators, regulated code, another Region or more load than one deployment has been run at. When it holds credentials that other teams must not hold, that deployment goes into an AWS account of its own (rule 1 in section 8).
- A deployment of its own needs no factory list. It adds one only when it wants the team view or settings by pull request, and the format is the same.
- Moving a team from a shared deployment to its own is not automated: its repositories are onboarded again in the new deployment.
5. What each person sees
| Who | Sees | Where |
|---|---|---|
| A team member | "My work", as today. New: "Whole factory", the team's tasks, scoreboard and costs | A switch on the console pages Overview, Tasks, Scoreboard and Costs. In the CLI, a new --factory option on bgagent stats and bgagent list |
| A member of several factories | The same, for one factory at a time | A selector in the console header |
| One admin group of the deployment (new: none exists today, and ADR-027 names it) | Every factory of the deployment | The same pages and commands |
| The platform team, with access to the AWS account | Every deployment of the account | One row of charts on the dashboard, and bgagent platform list |
- Proposed reading rule (open decision 4). Members see their factory's tasks: the task list, each task's detail and prompt, and the numbers. Trace, replay, attachments, cancel, nudge and approve stay with the person who submitted the task.
- A new read-only Settings page shows each setting and where its value comes from (the model and the prompt additions of each repository included), the factory's groups, the file that manages it (its path, its commit, who applied it and when), and which factories share the deployment.
6. Turning the access rule on safely
The rule "only a factory's members may ask for work on its repositories" is this RFC's answer to #476. It is switched on in three steps, and the factory list names the step in its admission field.
%%{init: {"flowchart": {"wrappingWidth": 400}}}%%
flowchart LR
off["<b>off</b><br/>Today's behaviour"] --> shadow["<b>shadow</b><br/>Every request is admitted.<br/>What the rule would refuse<br/>is counted and logged."]:::new --> enforce["<b>enforce</b><br/>Only a factory's members<br/>may ask for work<br/>on its repositories."]:::new
classDef new fill:#dafbe1,stroke:#1a7f37,color:#0a3d1a
A deployment moves to enforce only after a period in shadow in which every counted refusal has been explained. ADR-027 states how long that period is. Leaving enforce takes an explicit step, is logged and raises an alarm. The rule decides who may ask for work through ABCA. It does not narrow what a running task can reach.
7. The control plane is files, commands and telemetry
What manages several deployments is usually called a control plane. In this RFC it is not a service that runs. Three reasons:
- VISION.md, tenet 10: "Avoid scope that turns the repo into a generic SaaS control plane".
- A deployment must keep working when everything above it is down. This is what AWS's guidance on cell-based architecture asks of a cell, and a deployment is ABCA's cell.
- No request for a view above the deployments is on record. Each piece that could come later has a trigger in "Out of scope".
Across deployments. A product that needs walls gets a workshop in a building of its own, as it can today. New: every deployment puts its name on its metrics, so one row of charts shows every deployment of an AWS account.
%%{init: {"flowchart": {"wrappingWidth": 400}}}%%
flowchart TB
subgraph shared["A shared AWS account"]
direction TB
dA["<b>Deployment backgroundagent-dev</b><br/>two teams: factories checkout and growth"]
dB["<b>Deployment backgroundagent-dev-data</b><br/>one team, no factory list"]
row1["<b>One row of charts</b><br/>shows both deployments"]:::new
dB -.->|"its name on every metric"| row1
dA -.->|"its name on every metric"| row1
end
subgraph own["An AWS account of its own"]
direction TB
dC["<b>Deployment backgroundagent-dev-ledger</b><br/>a product that needs a hard boundary"]
row2["<b>Its own row of charts</b>"]:::new
dC -.->|"its name on every metric"| row2
end
shared ~~~ own
classDef new fill:#dafbe1,stroke:#1a7f37,color:#0a3d1a
The names start with backgroundagent-dev because ABCA's bootstrap accepts only that prefix today (#1018).
| Where the deployments are | Listing and upgrading | Metrics together | Logs together |
|---|---|---|---|
| One AWS account, one Region | bgagent platform list lists them. An upgrade is one setup run per deployment, the platform team's own first |
One row on each deployment's dashboard | One Logs Insights query |
| Two AWS accounts | The same, per account, with its credentials | One row per account. A link between accounts waits for its trigger | They wait for the export of #237 |
A row and a list cover one Region: an account with deployments in two Regions has one of each per Region. A row shows the deployments that reported in the last two weeks.
8. The rules ADR-027 would record
- The deployment is the only boundary around a team. In an AWS account of its own it is isolated, as far as its GitHub token and its integrations are its own. In a shared account it is separate once phase 1 has shipped in every deployment of that account. No page or document calls a factory isolated.
- A task depends on nothing outside its deployment.
- Seeing is not writing. A view above the deployments holds no credential of a deployment and has no way to write into one. Two things write, and neither is a view: a deploy and an apply. A job that chooses among the deployments of an account, such as the clean-up of feat: automated ephemeral stack cleanup (scheduled) #72, is a case to decide under this rule.
- Every metric and every exported record names its deployment. Across accounts, the sender is identified by its AWS account, never by a label it writes.
- Deployments are deployed, factories are applied. Changing a team's setting never upgrades a deployment.
- One writer per setting. A value that a file manages is not changed by a command or by the console. The console shows it read-only.
- No list means one factory, and nothing new to learn. Once a list is applied and enforced, nobody can ask for work on a repository it does not name.
- A new access rule starts in shadow. It refuses nothing, and counts and logs what it would refuse. Once enforced, it refuses a request whenever it cannot read something it needs. Leaving
enforcetakes an explicit step, is logged and raises an alarm. - No AWS account id in a tracked file. The shell's credentials decide the target of a deploy. A list names its deployment, and an apply refuses any other.
- Every new command has machine-readable output and stated exit codes.
In the record, these rules are written as requirements in the form ADR-020 asks for.
9. Roadmap
%%{init: {"flowchart": {"wrappingWidth": 640}}}%%
flowchart TB
subgraph repair["Repairs of what exists: no decision on factories needed"]
direction TB
p0["<b>Phase 0: document</b><br/>A written path to a deployment in an AWS account of its own"]
p1["<b>Phase 1: deployments that are separate and say who they are</b><br/>Two deployments in one AWS account have their own charts and secret names"]
p0 --> p1
end
subgraph fact["Factories: they wait for the open decisions"]
direction TB
p2a["<b>Phase 2a: factories</b><br/>One deployment serves several teams, each with its repositories, members and numbers"]
p2b["<b>Phase 2b: a team's settings as files</b><br/>A team changes how agents work on its repositories by a pull request"]
p2a --> p2b
end
repair --> fact
| Phase | What ships | Pull requests | Waits for |
|---|---|---|---|
| 0. Document | This RFC. A guide "Run several deployments" with today's commands: the own-account path, the upgrade order, how to retire a deployment. The sentence of the deployment guide and of the setup wizard on what the deployments of one account share is corrected | 1 or 2 | Open decision 6, for the guide's part on upgrades |
| 1. Deployments that are separate and say who they are | The deployment's name on every metric, and one row of charts for the deployments of an account. Operator commands that act on the deployment the CLI is configured for, and bgagent platform list. Names per deployment for integration secrets, and one owner for the two account-level settings |
12 to 18, in three sets: metrics (3 to 5), CLI (3 to 5), names and account settings (6 to 8) | Changes to ADR-024, ADR-015 and ADR-016 |
| 2a. Factories | Every repository and every new task carries the name of its factory. The factory list with its check, plan and apply. The access rule, in shadow first, and the team view | 15 to 21, in three sets: the factory on repositories and tasks (6 to 8), the list and apply (6 to 8), access and views (3 to 5) | Open decisions 1, 2, 4, 8 and 9. ADR-027, and the change to ADR-017. #1021 or its fallback. #476 approved, or the issue that covers phase 2a approved in its place |
| 2b. A team's settings as files | The settings file with its plan and apply, and a command that writes the file from what is applied. The Settings page. An example directory with its CI job | 3 to 8 | Phase 2a. Open decision 3 |
In all that is 31 to 49 pull requests, 13 to 20 of them in phases 0 and 1. A set is a chain of pull requests that build on each other (ADR-001), eight at most. Each phase is worth shipping on its own, and the work can stop after any set. No date is proposed for any phase. A stop after phase 1 still owes one step: removing the old form of the metrics, on the date that the changed ADR-024 states (see the table below).
What changes for a deployment that exists
| Change | Who notices | How they are told |
|---|---|---|
| Phase 1: metrics are written with the deployment's name | An adopter's own chart or alarm on the old form of the metrics, the one without the name. While both forms are written, each deployment has up to 52 more metric series, about $16 a month at list price | Both forms are written until a date that the changed ADR-024 states. bgagent platform doctor and the deployment guide say so |
| Phase 1: the log lines that carry metrics move to one log group | An adopter's query or subscription on the old log groups | The deployment guide |
| Phase 1: operator commands act on the deployment the CLI is configured for | A script that relied on the default name | The CLI warns when the result differs from the old default |
| Phase 1: integration secrets are renamed, by a command that moves one workspace at a time | A deployment with a chat or tracker integration, or with a webhook | bgagent platform doctor fails while an old name exists |
| Phase 1: the two account-level settings get one owner | An AWS account with two deployments | Setup prints which deployment holds them |
| Phase 2a: two indexes are added to the task table | Every deployment, with or without a factory list | Each index needs a deploy of its own. The guide names both, and an upgrade must not skip either |
| Phase 2a: limits on a repository's turn limit, prompt additions and build and lint commands | A repository defined in code with a value outside them: its next synthesis fails | The guide names the limits before the commit that adds them |
Out of scope
Each item has what there is instead, and its trigger: the event that would add it.
| Left out | What there is instead | Add it when |
|---|---|---|
| A report from each deployment; a Fleet page | One row of charts per account, and #237 | A number is needed that neither holds |
| One command that upgrades every deployment | A loop in the guide, the platform team's own deployment first | A sixth deployment in one account, or the loop went wrong once |
| A link between AWS accounts for charts | One row of charts per account | The first deployment in another account that the platform team must watch |
| Stronger separation inside a shared deployment: a runtime, credentials and memory per factory | A deployment of its own | #249 lands for credentials, or a team needs confidentiality without a deployment |
| Security settings in a team's file: Cedar policies, egress lists, credentials, registry assets | The deploy path, and for the token secret an operator command, as today | A decision record re-evaluates the trust model |
More that is left out
| Left out | What there is instead | Add it when |
|---|---|---|
| Upgrade waves and holds | Own deployment first, a check, a stop at the first failure | More deployments than one person watches |
| Limits, defaults and a budget per factory | The platform's ranges; the budgets of groups | A factory whose groups need one budget, or a team that needs a tighter ceiling |
| A network shared by deployments, which would remove most of the idle cost | Each deployment owns its network | A third deployment in one account, and one egress policy for all of them is accepted |
| Moving a factory between deployments | Onboarding it again, with a written list of what to revoke | The first request |
| A switch that stops one factory | Once the rule is enforced, an apply that empties the factory's groups: new tasks are refused, running ones go on | The first incident where that was too slow |
| Self-improvement of a factory: an automatic audit of its tasks that proposes changes | The scoreboard | #416 is taken up |
| A console that edits settings; YAML files | Pull requests; JSON | A second writer is wanted; prompt text in JSON becomes a complaint |
Not recommended at all: a control plane that runs as a service, presenting a factory inside a shared deployment as isolated, and making AWS Organizations or an AWS account per team a prerequisite.
Potential challenges
- A factory is taken for a boundary. The cheap placement is also the weak one. Rule 1 and the wording of the plan output and of the Settings page are the answer.
- It depends on work in flight. feat(api): REST API for repository onboarding and management #1021 is approved and assigned, with no pull request yet. feat(api): REST API for user and team (Cognito group) management #1022, feat(security): principal-to-repo authorization #476 and RFC: Governance planes — analytics and compliance export #237 are not approved.
- The application stack has a resource limit (CRITICAL: escape the CloudFormation 500-resource ceiling — best-practice strategies (8 resources of headroom on main) #852). In its widest configurations the stack is near it. A factory adds no resource. Phase 1 adds one log group, and the routes of feat(api): REST API for repository onboarding and management #1021 need room in the same stack.
- No tested size. Nobody has recorded how much load one deployment was tested with, and phase 2 adds teams to a deployment.
- Integrations. Whether two deployments can each have an app in one chat or tracker workspace is not established.
- Evidence. No CI run deploys to a second AWS account. Proof of the own-account path needs a sandbox account that CI may deploy to (ci: exercise the fresh-account path (least-privilege bootstrap + default deploy) on a schedule #970).
- Current version or V2. The README puts the current version in maintenance mode and announces a V2. Open decision 2 asks where phase 2 belongs.
- Tenets of VISION.md. Two are strengthened and three strained.
- Strengthened, 7 (observable and attributable): the deployment on every metric, the factory on every task, a record of every apply.
- Strengthened, 8 (extensible without forking): a team is adopted with a file.
- Strained, 10 (a sample, not a product): section 7 answers it.
- Strained, 4 (fail closed): shadow mode admits what the rule would refuse, for a period that ADR-027 states.
- Strained, 5 (isolation): it is stronger between deployments, but inside one deployment reading widens from one user to a factory's members, so the user-scoped rule of SECURITY.md changes with it.
- Not verified. Nothing was deployed for this RFC. The statements about ABCA were read from the code at commit
4fb3f992. The points on which two deployments of one account are not yet apart were read from the source, not tested. Cost figures are the repository's own.
Open decisions
| # | Decision | Proposed | Needed before |
|---|---|---|---|
| 1 | What a factory is: always a deployment; a unit hosted by a deployment; or a unit hardened inside a shared deployment | A unit hosted by a deployment, and a deployment of its own for a hard boundary | Phase 2 |
| 2 | The current version or V2 | Phases 0 and 1 in the current version: they are repairs. Phase 2 in the current version only if the README's maintenance notice is changed to allow it; otherwise ADR-027 becomes the chapter on teams of V2 | Phase 2 |
| 3 | Which adopter needs this, and which path is theirs | Unknown in the repository | Phase 2b: the answer decides whether it is built |
| 4 | Who reads what inside a deployment | Members read their factory's tasks and numbers, the prompt included, for tasks admitted after the move to enforce. One admin group reads every factory |
The team view of phase 2a |
| 5 | Whether files, commands and telemetry are accepted as the control plane for now | Yes, with the triggers of "Out of scope". Tenet 10 of VISION.md gains one sentence saying so | The items of "Out of scope" that concern several deployments |
| 6 | One version for every deployment | Yes: every deployment is brought to the same commit, one that is behind shows in bgagent platform list, and none is kept on an older commit |
The guide of phase 0, its part on upgrades |
| 7 | A sandbox AWS account that the maintainers' CI may deploy to (#970) | No answer is proposed. Without one, the own-account path stays a guide that no test proves | Proof of the own-account path |
| 8 | The words | "Factory" for a team's unit. Today the word names the scoreboard of a whole deployment, the ABCA/Factory metrics and the console's header; in a deployment without a list these stay true. "Fleet" for the deployments of one adopter; the guides use it today for the tasks of one deployment. #237 says "workspace" and means a whole deployment |
Phase 2: the names in commands, files and pages |
| 9 | Who owns the area | Nobody is named yet. Proposed: two maintainers, named in ADR-027 and in the code owners file | Phase 2: without an owner, the work stops after phase 1 |
Dependencies and integrations
- feat(api): REST API for repository onboarding and management #1021. Apply goes through its API. A CI job then needs no AWS credentials, and the deployment knows who applied. This RFC asks nine things of that API (below). They are a proposal to its assignee, to be settled in phase 0: feat(api): REST API for repository onboarding and management #1021 is approved with its present scope, and this RFC does not change it. Without them apply uses a fallback: two functions that are invoked with AWS credentials, so a CI job then holds an AWS role.
- feat(api): REST API for user and team (Cognito group) management #1022. Membership is a Cognito group named in the factory list. Until feat(api): REST API for user and team (Cognito group) management #1022 lands, groups are created with the AWS CLI.
- feat(security): principal-to-repo authorization #476. The access rule answers it, for requests that come through ABCA. Phase 2a needs feat(security): principal-to-repo authorization #476 approved, or the issue that covers phase 2a approved in its place.
- RFC: Governance planes — analytics and compliance export #237. The whole-factory numbers are the analytics query that RFC: Governance planes — analytics and compliance export #237 proposes, with the factory as one more dimension, so one query is built and not two. Until RFC: Governance planes — analytics and compliance export #237 is built, phase 2a serves them through the existing task-list route. That step is temporary: RFC: Governance planes — analytics and compliance export #237 rules out aggregates on that route, and its own route is where the query belongs. Logs across accounts are its export. This RFC asks three things of it: the deployment and the factory on each record, a destination the adopter names, and a prefix per account and deployment.
- RFC: Separate infrastructure deploy from application/runtime updates #377, RFC: Collaborative multi-participant task sessions #426, feat: automated ephemeral stack cleanup (scheduled) #72 and RFC: Identity propagation — composable credential delegation via AgentCore Identity Token Vault #249. This RFC applies RFC: Separate infrastructure deploy from application/runtime updates #377's split of deploy and application updates to a team's settings (rule 5). RFC: Collaborative multi-participant task sessions #426 also touches who may read a task (section 5). feat: automated ephemeral stack cleanup (scheduled) #72 would choose among all ABCA stacks of an account, so it is a case to decide under rule 3. Stronger separation inside a shared deployment waits for RFC: Identity propagation — composable credential delegation via AgentCore Identity Token Vault #249.
- Components. No new AWS service and no new library. Phase 1 changes the metric lines of the four
ABCA/*namespaces with their dashboard and alarms, adds one log group to the application stack, and changes the operator commands of the CLI. Phase 2a adds two indexes to the task table, an access check when a task is requested, and a parameter on the existing task-list route. Phase 2b adds one read route, in the console stack's API, for the Settings page. - Decision records. New: ADR-027. Changed in phase 1: ADR-024, rule 8 (what the deployments of one account share and how each names itself), and ADR-015 and ADR-016 (the names of secrets and providers). Changed in phase 2: ADR-017 (who writes a repository row). ADR-015 and ADR-017 are accepted, so each change is a refinement in place or a superseding record, and the pull request that makes it says which. Respected: ADR-023 (stack boundaries) and ADR-022 (no registry shared by deployments).
What this RFC asks of #1021
| Asked | Why |
|---|---|
| A factory on a repository row | The access rule and the views read it |
| Precedence per attribute, not per row | A repository declared in code must be able to join a factory |
| A third provenance value, with the commit | A row says that a file manages it |
| A precondition on a write | Two applies do not overwrite each other |
| One operation for the applied list | The step of the access rule and the groups change as one unit |
| The verified caller on each write | The record of an apply |
| Two permissions, and a key that carries one only when the admin group issued it | A CI job applies a team's settings and cannot apply the list |
| The second permission accepts the eight settings only | The other settings stay out of a team's file |
| The deployment's name in an answer | Apply refuses a list written for another deployment |
Alternative solutions
Four designs were written independently by AI agents and compared on developer experience, isolation and code.
| Design | A team gets | Above the deployments | Rank (1 is best): experience, isolation, code |
|---|---|---|---|
| Minimal | A deployment | Profile files, two commands, CloudWatch | 1, 2, 1 |
| Bridge | A factory: data applied to a deployment | A file, a command group, an optional stack | 2, 3, 2 |
| Pool | A factory: files and rows in one deployment, with an optional runtime of its own | Nothing | 3, 4, 3 |
| Cells | A deployment | A file, a command group, a stack that collects reports | 4, 1, 4 |
All three comparisons put the same two changes first: the deployment's name on every metric, and operator commands that act on the deployment the CLI is configured for. Both are part of phase 1. They split on what a team gets: one recommended the factory as data, kept as small as the minimal design; one recommended a deployment per team, with the factory as data only if the maintainers also want it; one recommended the minimal design, with the factory as a later, optional part. This RFC builds first what all three put first. It then takes the factory as data from Bridge, and from the isolation comparison the order of work and the rule that a factory is never called isolated. It prefers the factory as data because a team then costs a reviewed change, not a deployment and a set of integrations of its own. The objection of the isolation comparison stands: the cheap placement is the weak one.
A control plane that runs as a service was considered and declined, for the reasons of section 7.
This RFC and the study behind it were drafted by AI agents directed by the author. The agents wrote the four designs and compared them. What this RFC says about ABCA was read from its code, its documents and its issues. A longer write-up exists, with the size of each set of pull requests and pointers into the code. It is not in the repository.
Note: Non-triaged RFCs may not get timely review. PRs on non-triaged issues might not be accepted.
- RFC PR:
- Approved by:
- Reviewed by:
Activity
isadeks commentedon Nov 26, 2026
Thanks for this. Making the deployment the only boundary, keeping a factory as data, and rolling the access rule out shadow → enforce all look right to me. The claims about today's code that I checked at 4fb3f99 hold: the 3/5 settings split, the two account-level settings, and metrics with no deployment dimension.
Points for ADR-027 and phase 2a, most important first:
Define "the requester" per entry point before
enforce. Several paths create a task under someone other than the person who asked:Both the access rule and approvals key on the task's user, so this needs settling first. The good news: every write goes through
create-task-core.ts, so there's one place for the check.Say where membership comes from. REST reads the
cognito:groupsclaim, which can be up to an hour stale. Channel tasks only resolve groups through Cognito when team budgets are configured, and otherwise carry none. As things stand, shadow mode would count every channel task as a refusal.Decide who writes the repo row. Every deploy rewrites code-declared rows unconditionally.
repo onboardwrites the whole row back, which already dropsbuild_command,lint_command,mcp_servers,skillsandcedar_policy_modulestoday ((cli):bgagent repo onboarddrops five Blueprint fields when it rewrites a repo row #1091). Rule 6 needs both writers changed. feat(api): REST API for repository onboarding and management #1021's approved scope has per-rowcdk | apiprovenance and one optional key scope, so it doesn't yet cover the nine asks.Group budgets aren't factory budgets. Every group the submitter is in applies, so a member of two factories is charged to both budgets and blocked by either.
Repo-less tasks are the default path (
default/agent-v1). WithwithoutRepository, the members of every other factory lose them underenforce.Some decisions aren't in the table. These are left to "ADR-027 states" but aren't among the nine:
Naming and numbering. VISION.md calls the whole platform a "software dark factory". PR docs(decisions): ADR-027 propose git provider abstraction (#456) #1032 already claims ADR-027 and proposes
github:<host>/<owner>/<repo>repo keys, which the factory list should probably adopt.Decision 2 should cover phase 1 too. The README says "No migration is required at this time", but phase 1 renames secrets and changes metrics and log groups.
A question rather than an ask. Today the submitter is accountable for their task's approval gates, and that seems right as the default. Could ADR-027 leave room for choosing the approver per Cedar rule, with the submitter by default and the factory's owners for rules marked that way?
Decision 3. An adopter I work with has this shape: one product per factory, a deployment-wide admin, and owners for each factory.
cc Clint, Alain (area owners, decision 9)
isadeks commentedon Nov 26, 2026
One more point, on integrations. This is the "Integrations" item under challenges, and it bears on phase 1's secret renaming. At
4fb3f992, two deployments in one AWS account are less separate than "integration secrets carry no deployment name" suggests:bgagent/slack/*(cdk/src/constructs/slack-integration.ts:176,248) andbgagent-jira-oauth-*(cdk/src/constructs/jira-integration.ts:311). Each deployment's integration roles can therefore read the other deployment's Slack and Jira tokens.bgagent/slack/<teamId>(cdk/src/handlers/slack-oauth-callback.ts:100) and updates it in place if it already exists (:157-178). Installing a second deployment into the same Slack workspace replaces the first deployment's bot token. That answers the RFC's open question: today two deployments can't share a Slack workspace.I read both from the code and haven't reproduced either on a deployment.
Renaming the secrets alone won't fix this. I'd suggest ADR-027 picks one of these:
Option 1 fits the RFC as written. Whichever is chosen, I'd make "refuse, don't replace" an explicit rule. Phase 1's
bgagent platform doctorcheck could also flag secrets readable by more than one deployment.