Skip to content

docs(symphony): add package README and fork value-add banner#1510

Closed
Ddell12 wants to merge 12 commits intocoleam00:devfrom
Ddell12:phase-5-cleanup
Closed

docs(symphony): add package README and fork value-add banner#1510
Ddell12 wants to merge 12 commits intocoleam00:devfrom
Ddell12:phase-5-cleanup

Conversation

@Ddell12
Copy link
Copy Markdown

@Ddell12 Ddell12 commented Apr 30, 2026

Summary

  • Problem: New users discovering the fork have no documentation explaining what Symphony adds on top of upstream Archon, and no setup walkthrough for the packages/symphony/ runtime config.
  • Why it matters: Phase 5 of the consolidation closes the gap left by retiring symphoney-codex/web/. Without these READMEs, anyone arriving at the fork sees only the upstream Archon README and an undocumented packages/symphony/ directory.
  • What changed: Adds packages/symphony/README.md (setup, codebase mapping, startup, /api/symphony/* table, parity-with-spec note, migration notes) and inserts a short fork-distinction banner in the root README.
  • What did not change (scope boundary): No code, schema, route, or workflow changes. No version bump (release tag deferred to /release minor after Phase 5 lands). The legacy symphoney-codex retirement is in a separate PR against that repo.

UX Journey

Before

User                              archon-symphony fork
────                              ────────────────────
discovers fork ──────▶            sees unmodified upstream README
                                  (no mention of symphony)
opens packages/symphony/ ──▶      no README, only source files
                                  config shape: only an .example yaml

After

User                              archon-symphony fork
────                              ────────────────────
discovers fork ──────▶            sees [+] fork banner explaining symphony
                                  pointing at packages/symphony/README.md
opens packages/symphony/ ──▶      [+] README with setup, /api table,
                                  parity-with-spec, migration notes

Architecture Diagram

Before

No code-level architecture in this PR. Documentation only.

After

Same diagram. Marked: [+] README.md (root banner block), [+] packages/symphony/README.md.

Connection inventory: None — this is a docs-only change. Cross-references inside the new README point at existing files (packages/symphony/symphony.yaml.example, packages/symphony/src/index.ts, packages/server/src/routes/api.symphony.ts, packages/web/src/routes/SymphonyPage.tsx, docs/symphoney-legacy/PARITY_REPORT.md).

Label Snapshot

  • Risk: risk: low
  • Size: size: S
  • Scope: docs
  • Module: docs:symphony

Change Metadata

  • Change type: docs
  • Primary scope: multi (root README + packages/symphony)

Linked Issue

Validation Evidence (required)

bun --filter @archon/symphony test     # 61 pass / 0 fail / 230 expect calls
bun x prettier --check packages/symphony/README.md README.md   # All matched files use Prettier code style!
bun run validate                        # 3 pre-existing DAG loader failures unrelated to this PR (see memory file dag-loader-test-failures.md); no new failures
  • Evidence provided: command outputs above; symphony test suite green; new READMEs render cleanly.
  • If any command is intentionally skipped, explain why: full bun run validate is non-zero on dev itself due to 3 pre-existing @archon/workflows DAG loader failures (cycle-detection / inline prompt / unknown-top-level-fields). Documented in ~/.claude/projects/-Users-desha-archon-symphony/memory/dag-loader-test-failures.md. This PR does not touch the workflows package.

Security Impact (required)

  • New permissions/capabilities? No
  • New external network calls? No
  • Secrets/tokens handling changed? No
  • File system access scope changed? No

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Database migration needed? No

Human Verification (required)

  • Verified scenarios:
    • Rendered both READMEs locally; banner sits between upstream Archon badges and the "Archon is a workflow engine…" intro paragraph (no displacement of existing content).
    • packages/symphony/README.md setup section matches the field names actually present in packages/symphony/symphony.yaml.example.
    • /api/symphony/* endpoint table cross-checked against route registrations in packages/server/src/routes/api.symphony.ts.
    • Web kanban links cross-checked against packages/web/src/routes/SymphonyPage.tsx and packages/web/src/components/symphony/.
  • Edge cases checked: README-only PRs do not affect check:bundled; Prettier formats markdown identically before/after the lint-staged auto-format on commit.
  • What was not verified: end-to-end bun run dev walkthrough of the README setup steps (deferred to the manual smoke step in the consolidation plan's Phase 5 verification block, after Part B retirement also lands).

Side Effects / Blast Radius (required)

  • Affected subsystems/workflows: documentation only.
  • Potential unintended effects: future upstream merges from coleam00/Archon may conflict on README.md; the banner is a self-contained block above the original content to keep that conflict trivial.
  • Guardrails/monitoring for early detection: none required.

Rollback Plan (required)

  • Fast rollback command/path: git revert <merge sha> on dev.
  • Feature flags or config toggles: none.
  • Observable failure symptoms: none — docs only.

Risks and Mitigations

  • Risk: README drifts from actual /api/symphony/* schema if new routes are added without updating the table.
    • Mitigation: docs explicitly point at packages/server/src/routes/api.symphony.ts as the source of truth, so future changes have a single anchor point.
  • Risk: Migration paragraph might mislead users still running the standalone symphoney-codex daemon if Symphony's config schema evolves before they migrate.
    • Mitigation: README references symphony.yaml.example (always the live source); Part B of Phase 5 (separate PR in Ddell12/symphoney-codex) appends the deprecation pointer there too.

🤖 Generated with Claude Code

Summary by CodeRabbit

New Features

  • Symphony orchestrator package (@archon/symphony): Automatically polls Linear and GitHub trackers, dispatches eligible issues into Archon workflows, and manages retries with configurable concurrency limits.
  • Kanban dashboard (/symphony): Visual dispatch board with column grouping, status tracking, and quick-action buttons for manual dispatch/cancel per issue.
  • Symphony REST API (/api/symphony/*): Snapshot state, dispatch listing/details, immediate dispatch, cancel, and refresh endpoints.
  • Configuration system: YAML-based setup (~/.archon/symphony.yaml) supporting multi-tracker routing, state-to-workflow mapping, and per-tracker codebase association.

Ddell12 and others added 12 commits April 30, 2026 15:32
Phase 1 of the archon-symphony consolidation
(see Ddell12/symphoney-codex docs/superpowers/plans/2026-04-30-archon-symphony-consolidation.md).

Adds an empty-but-buildable @archon/symphony workspace package and the
DB schema needed for Phase 2's orchestrator port. No runtime behavior
yet — Phase 2 will land the tracker + orchestrator + dispatch loop.

What's in this commit:

* packages/symphony/{package.json,tsconfig.json,src/index.ts} — new
  workspace package mirroring packages/git's shape. Deps: @archon/core,
  @archon/paths.

* migrations/022_symphony_dispatches.sql — PostgreSQL migration adding
  symphony_dispatches table. UUID FKs to remote_agent_codebases and
  remote_agent_workflow_runs. Indexes on (tracker, issue_id), identifier,
  workflow_run_id, codebase_id. dispatch_key UNIQUE so the same raw issue
  id from two trackers (e.g. Linear + GitHub) cannot collide.

* migrations/000_combined.sql — append symphony_dispatches table to the
  fresh-postgres bootstrap snapshot.

* packages/core/src/db/adapters/sqlite.ts — add SQLite-equivalent
  symphony_dispatches table + indexes inside createSchema(). Uses TEXT
  IDs / datetime('now') per existing SQLite convention.

* packages/symphony/src/db/dispatches.ts — typed CRUD: insertDispatch,
  getDispatchByDispatchKey, getDispatchById, updateStatus,
  attachWorkflowRun. Functions accept IDatabase explicitly so tests pass
  a fresh SqliteAdapter against a temp file (Phase 2 will switch to the
  pool singleton at call sites).

* packages/symphony/src/db/dispatches.test.ts — 8 round-trip tests
  against real SQLite: insert/get, dispatch_key UNIQUE, multi-tracker
  non-collision, updateStatus mutation, attachWorkflowRun idempotency,
  conflict rejection, and missing-id error path.

Verification:
  bun install && bun run validate
    (= check:bundled && type-check && lint --max-warnings 0 && format:check && test)
  All 11 packages green. New @archon/symphony package contributes 8
  passing tests. No regressions in @archon/core's SQLite adapter tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Phase 1: scaffold packages/symphony
Captures `Ddell12/symphoney-codex` as of 2026-04-30 before that repo is
archived (Phase 5 of the consolidation plan). Phase 2-4 port code from
this snapshot into packages/symphony/; once Phase 5 lands and
symphoney-codex is deleted, this directory becomes the only remaining
record of the pre-fork standalone Symphony daemon.

Contents (69 files / 664K):

* Master plan: docs/symphoney-legacy/plans/2026-04-30-archon-symphony-consolidation.md
* Incident report: docs/symphoney-legacy/incidents/2026-04-30-app-273-data-loss.md
  (Phase 0 reconcile-terminal data-loss bug fixed in symphoney-codex
  commit fa70be2, dogfood-verified APP-291)
* Spec + config: SPEC.md (canonical OpenAI Symphony spec), WORKFLOW.md
  (production daemon config — source for ~/.archon/symphony.yaml in
  Phase 2), WORKFLOW.example.md, PARITY_REPORT.md, ROADMAP.md,
  WEB_GAPS.md, PRD.md
* Architecture reference: CLAUDE.md, symphoney-readme.md
* Source snapshot: src/ (34 .ts files — orchestrator, tracker, config,
  publisher, agent, server, workspace)
* Test snapshot: test/ (21 .ts files — unit + integration patterns to
  port to bun:test in Phase 2)
* Smoke scripts: scripts/{smoke-claude,smoke-linear-graphql}.ts

NOT copied: node_modules/, dist/, web/ (retired in Phase 5),
package.json/tsconfig.json/vitest.config.ts (pnpm/Vitest mechanics —
archon uses Bun), bin/ (symphoney CLI binary), .env (credentials).

eslint.config.mjs: added 'docs/**' to global ignores so the legacy code
is not linted (it uses different conventions: ESM `.js` import suffixes,
verbatimModuleSyntax off, vitest, etc.). Prettier already ignored docs/
via .prettierignore so format:check is unaffected.

Verification: bun run validate green across all 11 packages. The new
docs/symphoney-legacy/ directory adds no runtime code, no tests, and
no lint surface.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
docs: snapshot symphoney-codex under docs/symphoney-legacy/
Lands the Phase 2 deliverable from
docs/symphoney-legacy/plans/2026-04-30-archon-symphony-consolidation.md.

- Linear + GitHub trackers behind a shared Tracker interface
- Orchestrator with tick loop, slot accounting, per-state caps,
  retry backoff. Re-keyed all in-memory state on dispatch_key
  ('<tracker>:<identifier>') so cross-tracker raw-id collisions
  are impossible.
- Config snapshot rewrite: trackers as a list, no agent/codex/claude
  blocks (those move to per-workflow YAML in Archon proper).
  ~/.archon/symphony.yaml.example committed under packages/symphony/.
- dispatchIssue stub: writes a symphony_dispatches row with
  workflow_run_id = null and logs symphony.dispatch_skipped. Phase 3
  replaces the stub with executeWorkflow.
- Unit + integration tests, including a multi-tracker fixture
  (same raw id on Linear and GitHub -> distinct dispatch_keys, both
  dispatch, no UNIQUE violation). 41 symphony tests, 0 fail.
- New CLI dev entrypoint: bun packages/symphony/src/cli/dev.ts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…secrets

The Phase 2 manual smoke surfaced this: symphony.yaml.example uses
$LINEAR_PROJECT_SLUG, $GH_OWNER, $GH_REPO, but only $api_key and $token
were resolved through env-indirection. Non-secret fields were passed
literally to the underlying SDKs ('$LINEAR_PROJECT_SLUG' as a slug → 0
candidates with no error).

Threads `resolveEnvIndirection` (renamed locally to `resolveString`) through
every string field in `buildTracker` and `buildCodebases`: project_slug,
endpoint, repository (Linear), owner, repo (GitHub), and codebase_id /
repository (codebases). Behavior for hardcoded literals is unchanged —
`resolveEnvIndirection` returns the trimmed input when the value is not a
$VAR pattern.

Two new tests in snapshot.test.ts cover the $VAR-everywhere case and the
"env var unset → fall back to default/null" case.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat(symphony): port tracker + orchestrator (dispatch stubbed)
Phase 3 of the archon-symphony consolidation. Replaces the Phase 2 stub
dispatchIssue (which only logged and wrote workflow_run_id=NULL rows)
with a full launch path through Archon's existing workflow executor,
isolation resolver, and provider stack.

Sequence per Symphony dispatch:
- Hard-fail when no codebase is mapped (writes a status='failed' row,
  no retry — config error per CLAUDE.md fail-fast).
- Resolve workflow definition via discoverWorkflowsWithConfig against
  the codebase's default_cwd (home-scoped + project-scoped + bundled).
- Create a hidden web worker conversation, resolve a real worktree via
  validateAndResolveIsolation.
- Pre-create the workflow_run row through createWorkflowDeps().store,
  attach its id to symphony_dispatches before launch.
- Fire executeWorkflow(...) (fire-and-forget); terminal status comes
  back through getWorkflowEventEmitter() — orchestrator subscribes once
  in start() and translates workflow_completed / failed / cancelled
  into DB updateStatus + state mutations + retry on failure.

Server bootstrap auto-boots the Symphony service when ~/.archon/
symphony.yaml exists (silent no-op otherwise). Adds
/api/symphony/{state, dispatches, dispatches/:id, dispatch, cancel,
refresh} via OpenAPIHono with Zod-validated request/response schemas.
Service is awaited in graceful shutdown before pool close.

reconcileOnStart() reads upstream workflow_run_status for in-flight
symphony_dispatches rows so a process crash mid-dispatch doesn't
lose terminal-state writes — never marks non-terminal upstream runs
failed by timer (CLAUDE.md "No Autonomous Lifecycle Mutation"
compliance).

Verified end-to-end via the Symphony Smoke Linear project: APP-293
created in Todo, polled within ~2s, dispatched to e2e-deterministic
(bash + bun + uv/Python script DAG with conditions and trigger_rule
joins), workflow ran in a real worktree under
~/.archon/workspaces/Ddell12/Cowork/worktrees/archon/, terminal event
landed on the orchestrator, both symphony_dispatches.status='completed'
and remote_agent_workflow_runs.status='completed' written.

Test coverage: 18 new tests across dispatcher.test.ts (5),
terminal-events.test.ts (5), reconcile.test.ts (4), plus 4 new
dispatches DB helper tests. Existing dispatch-loop and multi-tracker
tests rewritten to assert the real Phase 3 lifecycle. 61 symphony
tests pass (was 41 in Phase 2). Full repo `bun run validate` clean.

Phase 3 of docs/symphoney-legacy/plans/2026-04-30-archon-symphony-consolidation.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat(symphony): bridge dispatch to Archon workflow runs (Phase 3)
Adds /symphony route to @archon/web that renders the Symphony orchestrator's
running, retrying, and historical dispatches as a kanban board on top of
Phase 3's /api/symphony/* surface. Cards group by lifecycle (default), tracker
state, or repository, poll every 5s via TanStack Query, and deep-link each
workflow_run_id into Archon's existing /workflows/runs/:runId page.

Includes typed client + transform utilities (cards keyed by dispatch_key, with
live-state-wins dedup against stale terminal dispatch rows), bun-test coverage
for transform/group/client, and Inbox icon nav entry between Workflows and
Settings. Types are sourced from packages/web/src/lib/api.generated.d.ts after
regenerating against a server with ~/.archon/symphony.yaml present.

Phase 4 of the archon-symphony consolidation
(docs/symphoney-legacy/plans/2026-04-30-archon-symphony-consolidation.md).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat(web): symphony kanban page with workflow-run drill-through
Phase 5 of the archon-symphony consolidation
(docs/symphoney-legacy/plans/2026-04-30-archon-symphony-consolidation.md).

- packages/symphony/README.md: setup, codebase mapping, startup,
  /symphony kanban location, /api/symphony/* endpoint table, parity-
  with-spec note, and migration notes for users coming from the
  standalone symphoney-codex repo.
- root README.md: short banner after the badges identifying this as
  Ddell12/archon-symphony and pointing at the package README; upstream
  Archon content preserved verbatim below.

No code or schema changes. Documentation only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Ddell12
Copy link
Copy Markdown
Author

Ddell12 commented Apr 30, 2026

Mistargeted — meant for the fork Ddell12/archon-symphony, not upstream. Closing. (Phase 5 of internal archon-symphony consolidation; not relevant to coleam00/Archon.)

@Ddell12 Ddell12 closed this Apr 30, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 228c2608-a29d-4f23-b142-5a83ddebab52

📥 Commits

Reviewing files that changed from the base of the PR and between 8295ece and 4b9663c.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (126)
  • README.md
  • docs/symphoney-legacy/CLAUDE.md
  • docs/symphoney-legacy/PARITY_REPORT.md
  • docs/symphoney-legacy/PRD.md
  • docs/symphoney-legacy/README.md
  • docs/symphoney-legacy/ROADMAP.md
  • docs/symphoney-legacy/SPEC.md
  • docs/symphoney-legacy/WEB_GAPS.md
  • docs/symphoney-legacy/WORKFLOW.example.md
  • docs/symphoney-legacy/WORKFLOW.md
  • docs/symphoney-legacy/incidents/2026-04-30-app-273-data-loss.md
  • docs/symphoney-legacy/plans/2026-04-30-archon-symphony-consolidation.md
  • docs/symphoney-legacy/scripts/smoke-claude.ts
  • docs/symphoney-legacy/scripts/smoke-linear-graphql.ts
  • docs/symphoney-legacy/src/agent/claude-adapter.ts
  • docs/symphoney-legacy/src/agent/claude-client.ts
  • docs/symphoney-legacy/src/agent/client.ts
  • docs/symphoney-legacy/src/agent/events.ts
  • docs/symphoney-legacy/src/agent/factory.ts
  • docs/symphoney-legacy/src/agent/fake-client.ts
  • docs/symphoney-legacy/src/agent/linear-graphql-tool.ts
  • docs/symphoney-legacy/src/agent/stdio-client.ts
  • docs/symphoney-legacy/src/config/coerce.ts
  • docs/symphoney-legacy/src/config/defaults.ts
  • docs/symphoney-legacy/src/config/snapshot.ts
  • docs/symphoney-legacy/src/config/validate.ts
  • docs/symphoney-legacy/src/index.ts
  • docs/symphoney-legacy/src/logging/logger.ts
  • docs/symphoney-legacy/src/orchestrator/dispatch.ts
  • docs/symphoney-legacy/src/orchestrator/orchestrator.ts
  • docs/symphoney-legacy/src/orchestrator/retry.ts
  • docs/symphoney-legacy/src/orchestrator/state.ts
  • docs/symphoney-legacy/src/publisher/pr.ts
  • docs/symphoney-legacy/src/server/dashboard.ts
  • docs/symphoney-legacy/src/server/http.ts
  • docs/symphoney-legacy/src/server/issue-helpers.ts
  • docs/symphoney-legacy/src/service.ts
  • docs/symphoney-legacy/src/tracker/errors.ts
  • docs/symphoney-legacy/src/tracker/linear.ts
  • docs/symphoney-legacy/src/tracker/normalize.ts
  • docs/symphoney-legacy/src/tracker/types.ts
  • docs/symphoney-legacy/src/workflow/loader.ts
  • docs/symphoney-legacy/src/workflow/parse.ts
  • docs/symphoney-legacy/src/workflow/prompt.ts
  • docs/symphoney-legacy/src/workflow/watch.ts
  • docs/symphoney-legacy/symphoney-readme.md
  • docs/symphoney-legacy/test/helpers/fake-tracker.ts
  • docs/symphoney-legacy/test/integration/cli-smoke.test.ts
  • docs/symphoney-legacy/test/integration/http.test.ts
  • docs/symphoney-legacy/test/integration/orchestrator-claude.test.ts
  • docs/symphoney-legacy/test/integration/orchestrator-immediate-dispatch.test.ts
  • docs/symphoney-legacy/test/integration/orchestrator-reconcile-publish.test.ts
  • docs/symphoney-legacy/test/integration/orchestrator.test.ts
  • docs/symphoney-legacy/test/unit/agent-events.test.ts
  • docs/symphoney-legacy/test/unit/claude-client.test.ts
  • docs/symphoney-legacy/test/unit/config-snapshot.test.ts
  • docs/symphoney-legacy/test/unit/config-validate.test.ts
  • docs/symphoney-legacy/test/unit/linear-graphql-tool.test.ts
  • docs/symphoney-legacy/test/unit/orchestrator-dispatch.test.ts
  • docs/symphoney-legacy/test/unit/pr-publisher.test.ts
  • docs/symphoney-legacy/test/unit/prompt.test.ts
  • docs/symphoney-legacy/test/unit/stdio-client.test.ts
  • docs/symphoney-legacy/test/unit/tracker-normalize.test.ts
  • docs/symphoney-legacy/test/unit/workflow-parse.test.ts
  • docs/symphoney-legacy/test/unit/workspace-hooks.test.ts
  • docs/symphoney-legacy/test/unit/workspace-manager.test.ts
  • docs/symphoney-legacy/test/unit/workspace-safety.test.ts
  • eslint.config.mjs
  • migrations/000_combined.sql
  • migrations/022_symphony_dispatches.sql
  • packages/core/src/db/adapters/sqlite.ts
  • packages/server/package.json
  • packages/server/src/index.ts
  • packages/server/src/routes/api.symphony.ts
  • packages/server/src/routes/schemas/symphony.schemas.ts
  • packages/symphony/README.md
  • packages/symphony/package.json
  • packages/symphony/src/cli/dev.ts
  • packages/symphony/src/config/coerce.ts
  • packages/symphony/src/config/defaults.ts
  • packages/symphony/src/config/parse.ts
  • packages/symphony/src/config/snapshot.test.ts
  • packages/symphony/src/config/snapshot.ts
  • packages/symphony/src/db/dispatches.test.ts
  • packages/symphony/src/db/dispatches.ts
  • packages/symphony/src/index.ts
  • packages/symphony/src/orchestrator/dispatch-loop.test.ts
  • packages/symphony/src/orchestrator/dispatch.test.ts
  • packages/symphony/src/orchestrator/dispatch.ts
  • packages/symphony/src/orchestrator/multi-tracker.test.ts
  • packages/symphony/src/orchestrator/orchestrator.ts
  • packages/symphony/src/orchestrator/reconcile.test.ts
  • packages/symphony/src/orchestrator/retry.ts
  • packages/symphony/src/orchestrator/state.ts
  • packages/symphony/src/orchestrator/terminal-events.test.ts
  • packages/symphony/src/service.ts
  • packages/symphony/src/test/fake-bridge.ts
  • packages/symphony/src/test/fake-tracker.ts
  • packages/symphony/src/tracker/errors.ts
  • packages/symphony/src/tracker/github.ts
  • packages/symphony/src/tracker/linear.ts
  • packages/symphony/src/tracker/normalize.test.ts
  • packages/symphony/src/tracker/normalize.ts
  • packages/symphony/src/tracker/types.ts
  • packages/symphony/src/workflow-bridge/dispatcher.test.ts
  • packages/symphony/src/workflow-bridge/dispatcher.ts
  • packages/symphony/src/workflow-bridge/factory.ts
  • packages/symphony/src/workflow-bridge/types.ts
  • packages/symphony/symphony.yaml.example
  • packages/symphony/tsconfig.json
  • packages/web/src/App.tsx
  • packages/web/src/components/layout/TopNav.tsx
  • packages/web/src/components/symphony/SymphonyCard.tsx
  • packages/web/src/components/symphony/SymphonyColumn.tsx
  • packages/web/src/components/symphony/SymphonyKanban.tsx
  • packages/web/src/components/symphony/index.ts
  • packages/web/src/lib/api.generated.d.ts
  • packages/web/src/lib/symphony/client.test.ts
  • packages/web/src/lib/symphony/client.ts
  • packages/web/src/lib/symphony/group.test.ts
  • packages/web/src/lib/symphony/group.ts
  • packages/web/src/lib/symphony/transform.test.ts
  • packages/web/src/lib/symphony/transform.ts
  • packages/web/src/lib/symphony/types.ts
  • packages/web/src/lib/symphony/use-symphony.ts
  • packages/web/src/routes/SymphonyPage.tsx

📝 Walkthrough

Walkthrough

A comprehensive Symphony orchestrator is integrated into Archon, enabling poll-based issue dispatch to workflows across Linear and GitHub trackers. The addition includes orchestrator, tracker adapters, database persistence, workflow bridge integration, web UI, and extensive legacy documentation from the prior standalone daemon.

Changes

Cohort / File(s) Summary
Project Setup & Configuration
README.md, eslint.config.mjs, packages/symphony/package.json, packages/symphony/tsconfig.json, packages/symphony/symphony.yaml.example
Added Symphony package configuration, example YAML config, ESLint exclusions for legacy docs, and updated root README with fork branding/Symphony callout.
Legacy Documentation
docs/symphoney-legacy/*
Captured comprehensive pre-archive snapshot of the symphoney-codex daemon (2026-04-30), including spec, PRD, roadmap, parity reports, incident logs, consolidation plan, example workflows, smoke tests, and CLI/agent/tracker/orchestrator source code documentation.
Database Schema
migrations/022_symphony_dispatches.sql, migrations/000_combined.sql, packages/core/src/db/adapters/sqlite.ts
Added symphony_dispatches table with dispatch tracking (issue linkage, tracker, workflow run association, status, retry state) and supporting indexes for query patterns; SQLite adapter now creates the schema.
Symphony Package Core
packages/symphony/src/index.ts, packages/symphony/src/service.ts, packages/symphony/README.md
Introduced @archon/symphony package with service entrypoint, config loading, tracker wiring, orchestrator setup, and public API surface (dispatches DB, orchestrator, trackers, types).
Configuration & Snapshot
packages/symphony/src/config/*
Added config parsing (YAML), snapshot building, environment coercion, defaults, and validation; supports Linear/GitHub tracker configuration with state-to-workflow mappings and codebase linkages.
Orchestrator Core
packages/symphony/src/orchestrator/orchestrator.ts, packages/symphony/src/orchestrator/state.ts, packages/symphony/src/orchestrator/dispatch.ts, packages/symphony/src/orchestrator/retry.ts
Implemented orchestrator with in-memory running/retry/completed tracking, tick-based polling loop, dispatch eligibility evaluation, slot capacity management, retry backoff computation, and workflow terminal event reconciliation.
Trackers
packages/symphony/src/tracker/types.ts, packages/symphony/src/tracker/linear.ts, packages/symphony/src/tracker/github.ts, packages/symphony/src/tracker/normalize.ts, packages/symphony/src/tracker/errors.ts
Added Linear and GitHub tracker implementations with GraphQL/REST query logic, issue normalization, pagination, create/comment capabilities, and centralized error handling.
Workflow Bridge
packages/symphony/src/workflow-bridge/types.ts, packages/symphony/src/workflow-bridge/factory.ts, packages/symphony/src/workflow-bridge/dispatcher.ts
Defined bridge abstraction for workflow execution, implemented production bridge connecting to Archon workflow store, and dispatcher that converts tracker issues into workflow runs with durable dispatch row state.
Database Layer
packages/symphony/src/db/dispatches.ts
Added dispatch persistence operations: insert, query by key/id/workflow run, list with filtering, status updates, and workflow run attachment with conflict detection.
Test Infrastructure
packages/symphony/src/test/fake-*.ts
Provided in-memory fake implementations for bridge, tracker, and orchestrator testing.
Orchestrator Integration Tests
packages/symphony/src/orchestrator/*.test.ts
Added comprehensive test suites covering dispatch eligibility, multi-tracker scenarios, dispatch loop, terminal events, reconciliation, and retry behavior.
Tracker & Config Unit Tests
packages/symphony/src/tracker/*.test.ts, packages/symphony/src/config/snapshot.test.ts
Added unit tests validating tracker normalization, error handling, config snapshot building, and environment variable resolution.
Server Integration
packages/server/src/index.ts, packages/server/src/routes/api.symphony.ts, packages/server/src/routes/schemas/symphony.schemas.ts, packages/server/package.json
Conditionally boots Symphony from ~/.archon/symphony.yaml, registers /api/symphony/* REST endpoints (state snapshot, dispatch list/detail, dispatch/cancel/refresh actions), and adds OpenAPI schemas for validation.
Web UI
packages/web/src/App.tsx, packages/web/src/components/layout/TopNav.tsx, packages/web/src/components/symphony/*.tsx
Added /symphony route with kanban board UI (SymphonyKanban, SymphonyColumn, SymphonyCard) supporting grouping, dispatch/cancel actions, error handling, and run deep-links to workflow details.

Sequence Diagram(s)

sequenceDiagram
    participant OrchestratorLoop as Orchestrator Tick
    participant Tracker
    participant DB as Dispatch DB
    participant Bridge as Workflow Bridge
    participant WorkflowStore as Workflow Store

    OrchestratorLoop->>Tracker: fetchCandidateIssues()
    Tracker-->>OrchestratorLoop: Issue[]
    
    OrchestratorLoop->>OrchestratorLoop: Filter by eligibility<br/>(state, capacity, blockers)
    
    loop For each eligible issue
        OrchestratorLoop->>DB: insertDispatch(pending)
        DB-->>OrchestratorLoop: DispatchRow
        
        OrchestratorLoop->>Bridge: dispatchToWorkflow()
        
        Bridge->>WorkflowStore: resolveWorkflow()
        WorkflowStore-->>Bridge: WorkflowDefinition
        
        Bridge->>WorkflowStore: createWorkerConversation()
        WorkflowStore-->>Bridge: ConversationId
        
        Bridge->>WorkflowStore: createWorkflowRun()
        WorkflowStore-->>Bridge: WorkflowRunId
        
        Bridge->>DB: attachWorkflowRun(dispatch, runId)
        DB-->>Bridge: success
        
        Bridge->>WorkflowStore: executeWorkflow()
        WorkflowStore-->>Bridge: Promise<WorkflowExecutionResult>
    end
    
    OrchestratorLoop->>OrchestratorLoop: Schedule next tick
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Rationale: This is a substantial, multi-package architectural addition introducing a new orchestrator subsystem with orchestration logic, multiple tracker implementations, database persistence, workflow bridge integration, server routing, and web UI—totaling ~7,700 lines of production code and ~4,000 lines of tests across heterogeneous components (config parsing, orchestration state machines, tracker GraphQL/REST clients, bridge orchestration, database operations, React components). The changes span the entire stack (backend service, database, HTTP API, web UI) with complex interdependencies and non-trivial control flow (dispatch eligibility, retry backoff, terminal event reconciliation). Although the legacy documentation is large, the production code density and architectural scope demand careful review of orchestrator correctness, state management, tracker implementation details, bridge integration contracts, and data consistency across multiple subsystems.

Possibly related PRs

Suggested reviewers

  • leex279

🐰 Hops in with glee – Symphony's here to stay!
Issues to workflows, dispatched each day,
Linear, GitHub, trackers aligned,
A rabbit-approved orchestrator design! 🎼✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant