Mirrored from https://github.com/davoodmehraban89/Aram.git
Synced Dec 4, 14:15 UTC
dependabot/github_actions/actions/checkout-7
add-index-html-10623938925177053894
arena/094f314c-aram
arena/2d4eda07-aram
chatgpt-phase1b2-autopilot
codex/adr-future-connectors-pi-v1
codex/aram-account-note-source-trace-20261031
codex/aram-actions-node24-maintenance-20261031
codex/aram-analyst-review-workbook-20261031
codex/aram-bs-candidate-statement-20261031
codex/aram-cash-flow-direct-candidate-20261031
codex/aram-clean-reference-year-integrity-20261030
codex/aram-cross-statement-controls-20261031
codex/aram-equity-changes-candidate-20261031
codex/aram-five-statement-cli-20261031
codex/aram-five-statement-integration-20261031
codex/aram-five-statement-orchestrator-20261031
codex/aram-gate3-coverage-target-guard-20261030
codex/aram-gate3-hidden-xlsx-guard-20261030
codex/aram-gate3-integration-validation-20261030
codex/aram-gate3-mapping-change-preview-20261030
codex/aram-gate3-stale-note-guard-20261030
codex/aram-income-statement-candidate-20261031
codex/aram-manifest-referential-integrity-20261031
codex/aram-mapping-source-parser-20261101
codex/aram-multidimensional-mapping-20261101
codex/aram-multistatement-mapping-20261031
codex/aram-pipeline-manifest-schema-20261031
codex/aram-readonly-mapping-coverage-20261031
codex/aram-reconciliation-review-gate-20261031
codex/aram-same-flush-fiscal-lock-20261030
codex/aram-synthetic-windows-demo-20261031
codex/aram-trial-balance-diagnostic-20261031
codex/aram-windows-background-detail-search-20261031
codex/aram-windows-detail-review-20261031
codex/aram-windows-five-statement-pilot-20261031
codex/aram-windows-statement-figures-20261031
codex/gate-2a-pilot-workbook
codex/gate-2a-pilot-workbook-6864754244772568979
codex/gate3-authenticated-principal-boundary-20261030
codex/gate3-authored-draft-staging-20261030
codex/gate3-carry-forward-preview-20261023
codex/gate3-draft-staging-audit-20261030
codex/gate3-mapping-batch-freshness-20261030
codex/gate3-mapping-batch-review-20261030
codex/gate3-mapping-core
codex/gate3-mapping-coverage-20261023
codex/gate3-mapping-excel-20261023
codex/gate3-note-mapping-review-20261023
codex/gate3-signed-year-scope-20261030
codex/gate3-unapproved-proposal-storage-20261030
codex/payvast-mapping-discovery-20261023
codex/phase-2a-backend-foundation
codex/phase-2b-post-merge-record
codex/phase-2b-source-registration
codex/phase-2b-source-registration-12955190277775369594
codex/post-gate2a-control-reconciliation
codex/post-pr18-acceptance-record
codex/project-control-foundation
codex/t1-repo-hygiene-20261023
codex/t2-ci-hardening-20261023
codex/t3-explicit-migrations-20261023
codex/t6a-readonly-diagnostics-20261023
codex/v1-01-safety-gate-hardening
codex/v1-year-isolation-followup-20261023
codex/windows-native-pilot-shell-20261030
dependabot/github_actions/actions/checkout-7
dependabot/github_actions/actions/setup-node-6
dependabot/github_actions/actions/setup-python-7
dependabot/github_actions/actions/upload-artifact-7
dependabot/npm_and_yarn/frontend/eslint-plugin-react-hooks-7.1.1
dependabot/npm_and_yarn/frontend/globals-17.15.0
dependabot/npm_and_yarn/frontend/vite-8.4.0
dependabot/npm_and_yarn/frontend/vitest-5.1.2
dependabot/npm_and_yarn/frontend/vitest/coverage-v8-5.1.2
dependabot/pip/backend/mypy-gte-1.13-and-lt-3
dependabot/pip/backend/pytest-cov-gte-6.0-and-lt-8
dependabot/pip/backend/setuptools-gte-75-and-lt-85
docs/aram-master-control-plan-20261111
docs/aram-roadmap-dashboard-20261030
docs/financial-statement-reconciliation-1402-1404-20261110
feat/gate3-governed-mapping-20261101
feat/gate3-package9-1-security-20261103
feat/gate3-package9-isolated-20261103
fix/password-unicode-validation-20261111
governance/aram-5-1-3-controls-20261030
governance/role-based-operating-model
jules-1168663913887856558-73b8a885
jules-gate-2b-mapping-workflow-foundation-4137724387867065330
phase-1b1-audit-report-7365389436990903239
phase-2a-backend-foundation-10237597358138521261
phase1b2-postmerge-metadata-fix
refactor/drg-parent-year-id-15088443704684163304
source-data-cleanup
| 1 | # ADR-033 — Five-role agent orchestration and its auto-discovery entry point |
| 2 | |
| 3 | - Status: Accepted (owner directive, Arena chat, 2026-12-04) |
| 4 | - Date: 2026-12-04 |
| 5 | - Related: `AGENTS.md` (agent instructions), ADR-026 (handoff cadence), ADR-028 (Arena single-branch constraint precedent), booklet 2 الف4/الف5, `docs/ACCEPTANCE_POLICY.md` |
| 6 | - Renumbering note: introduced as ADR-031; two concurrent merges took the lower numbers first — R2 (PR #100, merged 2026-12-04T10:40:42Z) holds `ADR-031-r2-full-control-set.md`, R3 (PR #101, merged 2026-12-04T11:50:09Z) holds `ADR-032-r3-built-vs-official.md` — so this ADR is **ADR-033** per the add-new-ADR discipline (never rewrite an accepted ADR). Verify the number against the live `docs/adr/` at merge time; if it has moved again, take the next free number. |
| 7 | |
| 8 | ## Context |
| 9 | |
| 10 | The owner directed (2026-12-04, Arena chat) that work on Aram proceeds through |
| 11 | five specialized agents — an analyst, an independent tester who gates every |
| 12 | deliverable, and three implementers — coordinated by a manager/architect/ |
| 13 | integrator (M0, the Arena session) — and that the whole design be placed where |
| 14 | **every future agent session discovers it automatically**, so the owner never |
| 15 | has to paste prompts or name files in a new chat ("you pick the best method"). |
| 16 | |
| 17 | The design was elaborated and approved in chat: roster (M0 + A1 Analyst, B1 |
| 18 | Backend, F1 Frontend, D1 DevOps/Release & Security, T1 Independent Tester), |
| 19 | the work-order → focused-PR → tester-verdict → integration loop, serialization |
| 20 | rules, and the governance invariants each role must obey. |
| 21 | |
| 22 | Two placement problems had to be solved: |
| 23 | |
| 24 | 1. **Discovery.** New agent sessions start with no chat memory and a clean |
| 25 | checkout of the canonical branch; untracked files do not propagate. The |
| 26 | entry point must be a file every agent in this ecosystem reads first. |
| 27 | `AGENTS.md` is that file (its own header: "these instructions apply to every |
| 28 | AI coding agent working in this repository, including Jules, Copilot, and |
| 29 | Codex"). |
| 30 | 2. **Branch constraint.** The Arena session is pinned to a single branch |
| 31 | (`arena/2d4eda07-aram`, currently carrying open tooling PR #99). System-level |
| 32 | rule: never create/push any other branch (precedents: ADR-028; R1 PROJECT_LOG |
| 33 | entry). |
| 34 | |
| 35 | ## Decision (§14 default + proof) |
| 36 | |
| 37 | 1. **Commit the orchestration documents** at `docs/agent-orchestration/` |
| 38 | (`MASTER_ORCHESTRATION_PROMPT.md` — the consolidated single-agent prompt; |
| 39 | `AGENT_PROMPTS.md` — the five per-role prompts for separate sessions). |
| 40 | These are operating procedure, not analytical documents; the ban on new |
| 41 | root-level analytical documents is unchanged. |
| 42 | 2. **Add a compact pointer section to `AGENTS.md`** so every future session |
| 43 | discovers the model automatically: read the master prompt before starting or |
| 44 | resuming any task. A sole agent without sub-agent capability executes the |
| 45 | roles sequentially with **strict separation of duties** — the verification |
| 46 | phase (T1) independently reproduces all evidence and never trusts the |
| 47 | implementation phase's claims. |
| 48 | 3. **Precedence is unchanged:** the orchestration documents add procedure only; |
| 49 | they never override `AGENTS.md`, `PROJECT_STATUS.md`, |
| 50 | `docs/ACCEPTANCE_POLICY.md`, or the governing booklets. A T1 verdict is |
| 51 | verification evidence, not acceptance; merge/tag remain owner/reviewer |
| 52 | actions (§19). |
| 53 | 4. **Governance records** updated per §0.5: this ADR; a `PROJECT_STATUS.md` |
| 54 | bullet; a `docs/PROJECT_LOG.md` entry; and a `docs/handoff/LATEST_HANDOFF.md` |
| 55 | refresh (governance change → the ADR-026 cadence applies: role-model entry, |
| 56 | superseded-head note, current single-next-action). |
| 57 | 5. **الف5 compromise (disclosed under الف4):** the governance commits land on |
| 58 | the open PR #99 branch — forced by the single-branch constraint, not by |
| 59 | convenience. No code, data, or workflow behavior changes; the combined diff |
| 60 | stays far under the cap excluding tests/generated data. **Split recipe if the |
| 61 | owner prefers separation:** (a) create a `tooling-only` branch from |
| 62 | `source-data-cleanup`, cherry-pick the four tooling commits |
| 63 | (`38b1e65`, `9f915fe`, `3b16aa1`, `73889c7`; verify live via `gh pr view 99` — the branch has since merged the advanced base `a8ba20c`), PR + independent review + |
| 64 | merge; (b) the remaining diff on the session branch is governance-only → |
| 65 | second focused PR. Or the owner approves the combined merge (one-time waiver, |
| 66 | PR #96/#97 precedent). |
| 67 | 6. **Activation:** the discovery mechanism goes live for new sessions **only |
| 68 | after this merges into `source-data-cleanup`** (new sessions check out the |
| 69 | canonical branch). Until then the mechanism exists on the open PR only. |
| 70 | |
| 71 | ## Consequences |
| 72 | |
| 73 | - Any new agent session reading `AGENTS.md` discovers the model without owner |
| 74 | effort; the master prompt's snapshot sections instruct live remote |
| 75 | verification rather than trusting recorded state. |
| 76 | - The orchestration documents can drift as the project evolves; the master |
| 77 | prompt's bootstrap rules (§2) and "orientation only — verify live" snapshot |
| 78 | (§8) are the mitigation. Role cards are guidance; per-session work orders in |
| 79 | the `docs/JULES_TASK_TEMPLATE.md` shape remain the binding task interface. |
| 80 | - The mixed PR is transparent in its body; the reviewer chooses combined |
| 81 | acceptance or the split recipe. |
| 82 | |
| 83 | ## Risks |
| 84 | |
| 85 | - If a harness changes how `AGENTS.md` is surfaced to agents, the pointer may |
| 86 | need relocation (low cost; same mechanism, e.g. `PROJECT_STATUS.md` header). |
| 87 | - Prompt content mentions operational facts (open PRs, debt) that age quickly; |
| 88 | all such mentions are explicitly marked "verify live". |