Summary
This is the implementation spec for the per-agent identity work that resolves the proxy-sign-off pattern structurally. It tracks Phase 2 of ADR-0030 — registering three per-agent GitHub Apps (aegis-hermes, aegis-argus, aegis-hephaestus) with scoped permissions per role.
Terminology note up front: the orchestrator's framing in #aegis-devs on 2026-06-10 was "per-agent PAT work" — but ADR-0030 explicitly rejected per-agent PATs as a security anti-pattern ("PATs in plaintext credentials are a P1 finding. Per-agent PATs scale the problem instead of fixing it. Per-agent Apps are the right primitive."). This spec implements the per-agent App path that ADR-0030 recommended. If anyone is specifically asking for the PAT path, please comment and we'll re-litigate; the decision is already on the record in the merged ADR.
This is a tracking/spec issue, not a PR. The work has 6 sub-tasks; each will land as its own PR with a 9-gate review.
Why this is P1
The proxy-sign-off pattern has been an active operational debt for 5 days and counting:
Acceptance criteria
Phase 2 is done when all of the following are true:
A. Apps registered and installed
B. Per-agent credentials on disk
C. Operability
D. Migration
E. Audit / observability
F. Governance
Scope
In scope
- 3 App registrations
- 3 PEMs + 3 token-mint scripts
manage-aegis-apps.sh (registration, audit, rotation reminders)
- Per-agent Discord identities
- Per-agent test fixtures
- 30-day migration plan
- ADR-0031 (per-agent CODEOWNERS)
Out of scope (explicit)
- Workflows that branch on actor identity in a more granular way than App-level. The 3 Apps are the granularity unit; further splitting (e.g., one App per workstream) is a Phase 3 conversation. ADR-0030's permission matrix is the ceiling for Phase 2.
- Multi-org install. Phase 2 is single-org (
OneStepAt4time). If/when Aegis mirrors to other orgs (e.g., for SOC2 audit partners), that's a separate migration.
- Renaming
aegis-gh-agent to aegis-shared[bot]. Discussed but deferred — the legacy name stays for the 30-day migration; the App is uninstalled, not renamed.
- Removing the script recipe's pre-flight check for OAuth PAT. The script-mint path is canonical; the OAuth PAT in
~/.config/gh/hosts.yml remains as a fallback for emergency recovery. Removing it is a separate, later decision.
ETA — Friday shipping target
Target: ship by EOD Friday 2026-06-12 (Rome). 2 days from today (Wednesday 2026-06-10).
Working backward from Friday EOD:
| Day |
Time |
Owner |
Action |
| Wed 06-10 |
EOD |
Ema |
Approve scope. Register the 3 Apps. Send me the App IDs + PEMs. |
| Wed 06-10 |
EOD |
Hermes |
Receive PEMs, store at canonical paths, chmod 600. Smoke-test the 3 mint scripts. |
| Thu 06-11 |
AM |
Hermes |
Write manage-aegis-apps.sh. Test fixtures. Per-agent Discord identities. |
| Thu 06-11 |
AM |
Hephaestus |
(optional, in Hep's lane) Update workspace CI configs to use the new per-agent tokens if any local scripts reference aegis-gh-agent. |
| Thu 06-11 |
PM |
Themis |
Security review: PEM storage, scope matrix, 1h TTL mint, fallback path. Sign-off. |
| Thu 06-11 |
PM |
Argus |
Code review of manage-aegis-apps.sh + test fixtures. 9-gate review. |
| Thu 06-11 |
EOD |
Hermes |
Land the registration PR. Run a real push via the new App identity to verify attribution is distinct. |
| Fri 06-12 |
AM |
Hermes |
Update HEARTBEAT, OPERATIONAL-RULES.md, AGENTS_TEAM_OPERATING_MODEL.md. Close #4658. File ADR-0031. |
| Fri 06-12 |
PM |
Boss + Ema |
Confirm: structural fix shipped, proxy-sign-off pattern retired. Friday target met. |
Dependencies (must clear for Friday to hold):
- Ema registers 3 Apps by EOD Wed. Blocks everything downstream. (10 min of Ema's time per the ADR's estimate.)
- PEMs are transferred via secure surface. Per Themis's standing rule: never paste in chat. Use
gh auth login --web device-code flow, 1Password share, or scp to a known host. Channel-paste is OUT.
- Themis has a 2h review window on Thu PM. The review is the same Themis security-review checklist that's already in ADR-0030 §"Security review checklist" — but applied to the new per-agent setups.
- The OpenClaw P1 from yesterday (
openclaw/openclaw#91827) does not block this. Different system, different repo, different reviewer chain. (Listed here only because Boss's message cited both in sequence.)
Risk: if any of the 4 dependencies slips, the realistic fallback is Mon 2026-06-15 (next sprint start). Friday is the target, not a hard deadline — I will signal in #aegis-devs the moment any dependency drifts.
Acceptance verification
When Ema asks "is it shipped?", the answer is "yes" iff:
- gh check:
gh api /repos/OneStepAt4time/aegis/installation returns 3 distinct installations (one per App), each with the per-role permission matrix from the ADR
- attribution check: 1 commit pushed via
aegis-hermes[bot]'s install token shows up in gh api /repos/OneStepAt4time/aegis/commits?author=aegis-hermes[bot] (proves App identity is wired, not just installed)
- review check: an
aegis-hephaestus[bot]-authored PR can be APPROVE'd by aegis-argus[bot] review, with the merge then proceeding on Ema's CODEOWNERS UI-approve (proves cross-App review works)
- fallback check:
aegis-gh-agent still works for emergency pushes; per-agent Apps are the canonical path
- observability check: HEARTBEAT.md has a per-agent auth section; the
manage-aegis-apps.sh audit command works; the 90-day rotation cron is armed
Related
Filing
Filed by: aegis-hermes[bot] (Hermes, Release/DevOps) per orchestrator directive 2026-06-10 15:13 GMT+2 in #aegis-devs. Priority P1 per the directive ("yesterday's P1 commitment").
Cross-references for the orchestrator:
- The OpenClaw P1 (kimi-code feedback loop) was filed yesterday as
openclaw/openclaw#91827.
- This is the Aegis-side P1 (per-agent identity work) that Boss was nudging about.
- The two are decoupled — different repos, different fix paths, different reviewer chains.
Summary
This is the implementation spec for the per-agent identity work that resolves the proxy-sign-off pattern structurally. It tracks Phase 2 of ADR-0030 — registering three per-agent GitHub Apps (
aegis-hermes,aegis-argus,aegis-hephaestus) with scoped permissions per role.Terminology note up front: the orchestrator's framing in #aegis-devs on 2026-06-10 was "per-agent PAT work" — but ADR-0030 explicitly rejected per-agent PATs as a security anti-pattern ("PATs in plaintext credentials are a P1 finding. Per-agent PATs scale the problem instead of fixing it. Per-agent Apps are the right primitive."). This spec implements the per-agent App path that ADR-0030 recommended. If anyone is specifically asking for the PAT path, please comment and we'll re-litigate; the decision is already on the record in the merged ADR.
This is a tracking/spec issue, not a PR. The work has 6 sub-tasks; each will land as its own PR with a 9-gate review.
Why this is P1
The proxy-sign-off pattern has been an active operational debt for 5 days and counting:
OneStepAt4timebecause the bot can't self-approve. The audit trail attributes the review to Ema, not the actual reviewer.@Themison GitHub is a real unrelated user (id 7315965, "John Snow") — the @-mention is a name collision, not a real security review attribution.Acceptance criteria
Phase 2 is done when all of the following are true:
A. Apps registered and installed
aegis-hermesGitHub App registered (Ema action: https://github.com/settings/apps/new)aegis-hermes(with[bot]suffix applied by GitHub)aegis-argusGitHub App registered (same registration path)aegis-hephaestusGitHub App registered (same registration path)All 3 Apps installed on
OneStepAt4time/aegiswith the per-role permission matrix from ADR-0030 §"Phase 2":aegis-hermesaegis-argusaegis-hephaestus(— means the App does not request that permission.)
B. Per-agent credentials on disk
~/.openclaw/workspace/infra/github-apps/<app>.pem(mode 600, ownerbubuntu:bubuntu— per the 2026-06-04 perm sweep pattern)get-installation-token-hermes.sh,get-installation-token-argus.sh,get-installation-token-hephaestus.sh(mode 755, ownerbubuntu:bubuntu), each returning 1h-TTL installation tokens for its AppTOKEN=$(./get-installation-token-<role>.sh); GH_TOKEN=$TOKEN gh api /repos/OneStepAt4time/aegis -i | head -3returns the repo metadata~/.git-credentialsor any other store;git credential-storelist shows only the 3 pre-existing tokens (Ema'sgho_, etc.)C. Operability
manage-aegis-apps.shscript written (ADR-0030 §Implementation Plan step 3). Enforces known-good permission matrix on registration; refuses to register an App with extra permissions not in the matrix.<@aegis-hermes>,<@aegis-argus>,<@aegis-hephaestus>) registered inAGENTS_TEAM_OPERATING_MODEL.mdrostersrc/__tests__/auth/(or equivalent) that exercise: token mint, token expiry, role-scope enforcement. Themis reviews the test plan.D. Migration
aegis-gh-agent(current bot) is marked as fallback identity inmanage-aegis-apps.shand HEARTBEATaegis-gh-agent. After 30 days,aegis-gh-agentApp is uninstalled and removed.gho_OAuth token in~/.git-credentialsis removed (per the ADR's "PAT cleanup" open question) only after the script recipe is confirmed canonical for all paths Hermes, Argus, Hephaestus useE. Audit / observability
gh api /repos/OneStepAt4time/aegis/commits?author=<app-login>works for all 3 Apps (proves attribution is distinct)manage-aegis-apps.sh auditprints a status report: per-App install state, last rotation date, last use, drift from matrixF. Governance
AGENTS_TEAM_OPERATING_MODEL.md§"Review" updated to reflect per-agent App identities (no moreaegis-gh-agent[bot] IS Argusworkaround framing)Scope
In scope
manage-aegis-apps.sh(registration, audit, rotation reminders)Out of scope (explicit)
OneStepAt4time). If/when Aegis mirrors to other orgs (e.g., for SOC2 audit partners), that's a separate migration.aegis-gh-agenttoaegis-shared[bot]. Discussed but deferred — the legacy name stays for the 30-day migration; the App is uninstalled, not renamed.~/.config/gh/hosts.ymlremains as a fallback for emergency recovery. Removing it is a separate, later decision.ETA — Friday shipping target
Target: ship by EOD Friday 2026-06-12 (Rome). 2 days from today (Wednesday 2026-06-10).
Working backward from Friday EOD:
manage-aegis-apps.sh. Test fixtures. Per-agent Discord identities.aegis-gh-agent.manage-aegis-apps.sh+ test fixtures. 9-gate review.Dependencies (must clear for Friday to hold):
gh auth login --webdevice-code flow, 1Password share, orscpto a known host. Channel-paste is OUT.openclaw/openclaw#91827) does not block this. Different system, different repo, different reviewer chain. (Listed here only because Boss's message cited both in sequence.)Risk: if any of the 4 dependencies slips, the realistic fallback is Mon 2026-06-15 (next sprint start). Friday is the target, not a hard deadline — I will signal in #aegis-devs the moment any dependency drifts.
Acceptance verification
When Ema asks "is it shipped?", the answer is "yes" iff:
gh api /repos/OneStepAt4time/aegis/installationreturns 3 distinct installations (one per App), each with the per-role permission matrix from the ADRaegis-hermes[bot]'s install token shows up ingh api /repos/OneStepAt4time/aegis/commits?author=aegis-hermes[bot](proves App identity is wired, not just installed)aegis-hephaestus[bot]-authored PR can be APPROVE'd byaegis-argus[bot]review, with the merge then proceeding on Ema's CODEOWNERS UI-approve (proves cross-App review works)aegis-gh-agentstill works for emergency pushes; per-agent Apps are the canonical pathmanage-aegis-apps.sh auditcommand works; the 90-day rotation cron is armedRelated
gho_OAuth token issuebubuntu:bubuntu)Filing
Filed by: aegis-hermes[bot] (Hermes, Release/DevOps) per orchestrator directive 2026-06-10 15:13 GMT+2 in #aegis-devs. Priority P1 per the directive ("yesterday's P1 commitment").
Cross-references for the orchestrator:
openclaw/openclaw#91827.