Skip to content

chore: scaffold backend/ and frontend/ skeletons for rewrite#1

Merged
harshitsinghbhandari merged 1 commit into
mainfrom
feat/repo-skeleton
May 26, 2026
Merged

chore: scaffold backend/ and frontend/ skeletons for rewrite#1
harshitsinghbhandari merged 1 commit into
mainfrom
feat/repo-skeleton

Conversation

@harshitsinghbhandari
Copy link
Copy Markdown
Collaborator

Summary

Initial scaffolding only for the agent-orchestrator rewrite. This is a fresh skeleton — expect it to change going forward as the real architecture lands in later tasks. No business logic, no architecture layering yet.

Splits the repo into the two top-level folders agreed in the rewrite office-hours call: a long-running Go backend daemon and an Electron + TypeScript frontend.

What's here

backend/ — Go daemon skeleton

  • go.mod — module github.com/aoagents/agent-orchestrator/backend, Go 1.22
  • main.go — minimal package main that compiles and prints ao backend daemon starting (no HTTP/daemon logic yet)

frontend/ — Electron + TypeScript skeleton

  • package.json — electron + typescript devDependencies, build/typecheck/start scripts
  • tsconfig.json — strict TS config targeting Electron (ES2022, CommonJS)
  • src/main.ts — Electron main-process stub (creates a window, standard lifecycle handlers)

Root

  • .gitignore — Node/Electron (node_modules, dist), Go (bin, *.test, vendor, compiled daemon binary), OS (.DS_Store), editor, and env files
  • README.md — one-line note describing the new two-folder structure

Verification

  • cd backend && go build ./... ✅ (binary runs, prints startup line)
  • cd frontend && npm install && npx tsc --noEmit
  • node_modules not committed; package-lock.json is committed for reproducibility

Out of scope (later tasks)

  • Deep architecture layering (routes → controllers → services → domain → storage)
  • HTTP server / single-port serving, OpenAPI generation, Mux/WebSocket, CDC/eventing, LCM/SCM

🤖 Generated with Claude Code

Initial buildable skeleton for the agent-orchestrator rewrite, splitting
the repo into a Go backend daemon and an Electron + TypeScript frontend.

- backend/: go.mod (Go 1.22) + main.go that compiles and prints a startup line
- frontend/: package.json, strict tsconfig.json, Electron main-process stub
- .gitignore for Node/Electron/Go/OS/editor/env artifacts
- README note describing the new two-folder structure

No app logic or architecture layering yet (routes/controllers/services/etc.
come in a later task). go build and tsc --noEmit both pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@harshitsinghbhandari harshitsinghbhandari merged commit 21564cd into main May 26, 2026
harshitsinghbhandari added a commit that referenced this pull request May 26, 2026
Address Harshit's PR #5 review (approve w/ design confirms + polish):

- #1 (design decision): a valid activity signal is proof of life, so it now
  resolves a detecting session — writes the activity-mapped session state and
  clears the quarantine memory. Scoped to detecting only; a liveness-escalated
  stuck stays the probe pipeline's to resolve. Terminal still never reopens.
- #2: document why a merged/closed PR parks the session axis even over an
  activity-owned needs_input/blocked (a merge is a milestone), unlike the
  open-PR path that defers to activity.
- #3: map plain idle activity to a neutral session reason instead of the
  misleading research_complete (kept for ready, which implies completion).
- #6: cover all three kill kinds (manual/cleanup/error), the open-PR review
  branches (changes_requested/mergeable/review_pending), and the neutral idle
  reason. Coverage 86.5% -> 88.6%.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
harshitsinghbhandari added a commit that referenced this pull request May 26, 2026
 review)

Address review finding #1: the persistent ci-failed tracker leaked and could
stale-silence a future regression. It was only cleared when leaving the
ci-failed reaction AND incidentOver held at that moment — so a recovery to
another open-PR state (ci-failed -> approved -> merged) never cleared it.

- react() now clears ALL of a session's trackers when the state REACHED is
  incident-over (PR resolved / session terminal) OR a genuine recovery
  (approved/mergeable, which the open-PR ladder guarantees means CI is no
  longer failing). Keyed on the state reached, not the one left, since the
  recovery transition is typically review_pending->approved (empty beforeKey).
- Persistent ci-failed still survives the ambiguous review_pending limbo, so
  fail->pending->fail keeps one shared budget (§4.2).
- Document the out-of-lock react() dispatch caveat for the daemon integration
  step (review #2) and the intentionally-skipped agent-stuck 10m threshold.

Tests: re-arm after a genuine recovery (regression re-nudges, not silenced);
all session trackers cleared once the incident is over.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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