# Open Orchestra Dogfooding Findings

This file records what Open Orchestra contributed while building Open Orchestra
itself, plus issues found by using the CLI as the local control plane.

## What Helped

- **Backlog alignment:** GitHub issues, local `.agent-workflow/tasks.json`, and
  semantic commits stayed tied to backlog IDs such as `ROLE-003`, `WFLOW-001`,
  and `BUG-087`.
- **Explicit delegation:** `orchestra delegation decide` made role selection
  visible before implementation, including write scopes and expected outputs.
- **Evidence discipline:** fixes were closed with command evidence,
  reviewer records, and `npm run precommit` results instead of relying on a
  prose claim.
- **Bug discovery:** concurrent state writes exposed real bugs in task and lock
  mutation safety. Those became tracked fixes instead of one-off manual repairs.
- **Context control:** skills, source-of-truth, lessons, protocols, and workflow
  templates kept primary instruction files smaller while preserving task-specific
  context.
- **Runtime portability:** the same workflow state supported Codex, CLI, web/API,
  VS Code extension scaffolding, and future Claude/Cursor instruction renders.

## Finding: Parallel Independent Commands Are Safe So Far

- **Date checked:** 2026-05-06
- **Workspace:** `/tmp/oo-parallel-dogfood`
- **Commands tested in parallel:** `task add`, `delegation decide`,
  duplicate `task add`, same-path `lock claim`, `validate`, `task list`, and
  concurrent `evidence add`.
- **Observed behavior:** independent writes serialized correctly. Duplicate
  tasks failed with `task already exists`. Same-path locks allowed one winner
  and blocked the second. Concurrent evidence writes produced distinct artifacts
  and a valid event log.
- **Validation:** `orchestra validate --json` returned valid after the stress
  run.

## Finding: Parallel Dependent Commands Need DAG Semantics

- **Date found:** 2026-05-06
- **Observed behavior:** when a parent agent schedules `task add` and an
  immediate dependent command such as `delegation decide --task <id>` in the
  same parallel batch, the dependent command can run before the task exists and
  fail with `unknown task`.
- **Impact:** this is not state corruption, but it creates noisy false failures
  when the parent agent treats dependent steps as independent parallel work.
- **Recommended product fix:** add a future batch runner with explicit
  `dependsOn` ordering, or make dependent command failures retryable when the
  missing task is being created in the same batch.
- **Current workaround:** only run independent Open Orchestra commands in
  parallel. Run `task add` before `context`, `delegation`, `plan`, `review`, or
  `evidence` for that task.

## Finding: Renamed Project Paths Must Be Revalidated Before Generation

- **Date found:** 2026-05-06
- **Observed behavior:** after the project directory moved from `cursor-rules`
  to `open-orchestra`, a file-generation tool attempted to write new files
  through stale path context.
- **Impact:** generated files can be created outside the intended repo, leaving
  imports in the current repo pointing at missing files.
- **Recommended product fix:** add a workspace guard that verifies `cwd`,
  `package.json`, and `.git` root before generated file writes.
- **Current workaround:** after a rename or context transition, run
  `pwd`, `git status --short`, and `ls` for every newly generated file before
  continuing.
