Skip to content

Agent Orchestration

Phase: 1 Agent Plan Status: pre-implementation contract

Purpose

Coordinate parallel work on the Go rewrite without editing legacy source or creating conflicting service boundaries.

Global Rules For All Agents

  • Do not modify legacy source outside go-platform/ unless a later explicit task says otherwise.
  • Read relevant Phase 0 and Phase 1 docs before coding.
  • Read the assigned file under docs/agents/service-tasks/ before coding.
  • Cite legacy evidence paths in implementation notes.
  • Keep service changes scoped to the assigned service.
  • Follow canonical aliases from service-boundaries.md; for example file-service work writes document-service, question-service writes question-bank-service, and entitlement work writes usage-service.
  • Do not invent business rules when legacy evidence is missing.
  • Add or update tests for every behavior-bearing implementation.
  • Keep gateway route state and rollback instructions current.

Work Streams

StreamScopeFirst Outputs
PlatformGo workspace, shared packages, compose, observabilitymodule skeleton, config/logging/errors/health
Gateway/api proxy, route state, adapters, SSE forwardingproxy-only gateway
BFFno-primary-DB frontend aggregationscreen shells, owner-service source status, route rehearsal
Identity/Profile/TenantIAM, profile, organization/school-serviceauth/session, profile, tenant validation
Contractslegacy OpenAPI snapshots, examples, parity fixturescontract snapshots
Migrationdata mapping, validation, backfill toolingread-only extract reports
Document/Importmedia, storage, DOCX jobs, review workflowstorage read parity, import job model
Question/Exam/Attemptquestion types, bank, exam snapshots, attemptsread parity then write parity
Admin/Operationsfeature maintenance, audit, dashboardsroute prefix compatibility
Monetizationbilling, wallet, usage, paymentevent integration, ledger/payment/quota task slices
Communication/Discovery/Governancenotification, search, audit, analyticsfanout/read-model/index/audit task slices

One-Agent-Per-Service Flow

  1. Assign exactly one service task pack from docs/agents/service-tasks/.
  2. Treat the task pack as the agent's write-boundary owner document.
  3. Shared files are orchestrator-owned unless explicitly delegated.
  4. The agent returns findings, changed files, tests run, open risks, and next task.
  5. The orchestrator integrates shared docs/deploy/config after reviewing diffs.

Dependency Order

  1. Platform skeleton.
  2. Gateway proxy-only mode.
  3. Contract snapshot tooling.
  4. Service skeletons.
  5. Read-only routes.
  6. Backfill and validation tooling.
  7. Native write routes.

Review Gates

Before merge:

  • files are under go-platform/ unless explicitly approved
  • go test ./... or scoped equivalent passes
  • sh scripts/test/service-task-pack-coverage.sh passes when task packs change
  • route contract evidence is attached for route changes
  • rollback note exists for route state changes
  • docs updated if a decision/risk changed

Before route cutover:

  • parity tests pass
  • staging smoke passes
  • monitoring exists
  • rollback command tested
  • owner approval recorded

Conflict Resolution

If two agents need the same boundary:

  1. Stop implementation.
  2. Update service-boundaries.md proposal.
  3. Add decision to decision-log.md.
  4. Resume only after the boundary is explicit.

Go-platform documentation is generated from repository Markdown.