mirror of
https://github.com/stablyai/orca.git
synced 2026-11-06 12:07:58 +00:00
552 lines
21 KiB
JSON
552 lines
21 KiB
JSON
{
|
|
"schemaVersion": 1,
|
|
"purpose": "Human-reviewed organization proposals and architecture labels; no source moves are authorized or executed by the generator.",
|
|
"areas": [
|
|
{
|
|
"id": "desktop-shell",
|
|
"path": "src/main",
|
|
"purpose": "Desktop application lifecycle, integrations, operating system services and execution adapters"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"path": "src/main/runtime",
|
|
"purpose": "Host-owned sessions, workspace state, command execution, RPC and orchestration"
|
|
},
|
|
{
|
|
"id": "ipc",
|
|
"path": "src/main/ipc",
|
|
"purpose": "Electron renderer-to-host request handlers"
|
|
},
|
|
{
|
|
"id": "terminal-daemon",
|
|
"path": "src/main/daemon",
|
|
"purpose": "Long-lived terminal processes, endpoint ownership and terminal history"
|
|
},
|
|
{
|
|
"id": "preload",
|
|
"path": "src/preload",
|
|
"purpose": "Typed Electron bridge exposed to renderer windows"
|
|
},
|
|
{
|
|
"id": "renderer",
|
|
"path": "src/renderer",
|
|
"purpose": "Desktop and web React interface, local state and runtime clients"
|
|
},
|
|
{
|
|
"id": "contracts",
|
|
"path": "src/shared",
|
|
"purpose": "Cross-surface contracts, schemas and domain rules; a physical folder, not one cohesive domain"
|
|
},
|
|
{
|
|
"id": "cli",
|
|
"path": "src/cli",
|
|
"purpose": "Orca command-line client and command presentation"
|
|
},
|
|
{
|
|
"id": "process-host",
|
|
"path": "src/packages",
|
|
"purpose": "Internal packages including the controlled subprocess API"
|
|
},
|
|
{
|
|
"id": "wsl-guest",
|
|
"path": "src/wsl-guest",
|
|
"purpose": "Windows Subsystem for Linux guest dispatcher and protocol"
|
|
},
|
|
{
|
|
"id": "types",
|
|
"path": "src/types",
|
|
"purpose": "Ambient TypeScript declarations and build constants"
|
|
},
|
|
{
|
|
"id": "mobile",
|
|
"path": "mobile",
|
|
"purpose": "Expo phone application, transport, embedded web engines and mobile tooling; independent workspace"
|
|
},
|
|
{
|
|
"id": "cloud",
|
|
"path": "cloud",
|
|
"purpose": "Relay, push services, wire packages, operations and infrastructure; independent workspace"
|
|
},
|
|
{
|
|
"id": "native",
|
|
"path": "native",
|
|
"purpose": "Platform-specific operating system integrations and native packages"
|
|
},
|
|
{
|
|
"id": "tooling",
|
|
"path": "config",
|
|
"purpose": "Build configuration, generators, audits, development scripts and CI checks"
|
|
},
|
|
{
|
|
"id": "integration-tests",
|
|
"path": "tests",
|
|
"purpose": "End-to-end, cross-version and test-tool coverage; unit tests also live beside source"
|
|
},
|
|
{
|
|
"id": "documentation-site",
|
|
"path": "docs/site",
|
|
"purpose": "Next.js documentation website; independent package"
|
|
},
|
|
{
|
|
"id": "documentation",
|
|
"path": "docs",
|
|
"purpose": "Engineering references, investigations, audits and documentation assets"
|
|
},
|
|
{
|
|
"id": "automation",
|
|
"path": ".github",
|
|
"purpose": "CI, release and cloud-operation workflows and actions"
|
|
},
|
|
{
|
|
"id": "repository-support",
|
|
"path": ".",
|
|
"purpose": "Repository root, resources, bundled skills, examples and remaining support files"
|
|
}
|
|
],
|
|
"featureTrails": [
|
|
{
|
|
"domain": "Jira",
|
|
"locations": [
|
|
{
|
|
"path": "src/main/jira",
|
|
"purpose": "Backend client, credentials, issues and attachments"
|
|
},
|
|
{
|
|
"path": "src/main/ipc",
|
|
"basenamePattern": "^jira(?:[-.]|$)",
|
|
"purpose": "Desktop transport handlers"
|
|
},
|
|
{
|
|
"path": "src/main/runtime/rpc/methods",
|
|
"basenamePattern": "^jira(?:[-.]|$)",
|
|
"purpose": "Runtime RPC methods"
|
|
},
|
|
{
|
|
"path": "src/shared",
|
|
"basenamePattern": "^jira(?:[-.]|$)",
|
|
"purpose": "Flat Jira contracts and domain rules"
|
|
},
|
|
{
|
|
"path": "src/shared/rpc-contract",
|
|
"basenamePattern": "^jira(?:[-.]|$)",
|
|
"purpose": "RPC parameter schemas"
|
|
},
|
|
{
|
|
"path": "src/renderer/src/components/task-page/jira",
|
|
"purpose": "Provider-specific Task Page UI"
|
|
},
|
|
{
|
|
"path": "src/renderer/src/store/slices",
|
|
"basenamePattern": "^jira(?:[-.]|$)",
|
|
"purpose": "Renderer state"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"domain": "Linear",
|
|
"locations": [
|
|
{
|
|
"path": "src/main/linear",
|
|
"purpose": "Backend client, issue context, mutations and workspace credentials"
|
|
},
|
|
{
|
|
"path": "src/main/ipc",
|
|
"basenamePattern": "^linear(?:[-.]|$)",
|
|
"purpose": "Desktop transport handlers"
|
|
},
|
|
{
|
|
"path": "src/main/runtime",
|
|
"basenamePattern": "^runtime-linear(?:[-.]|$)",
|
|
"purpose": "Host command implementations"
|
|
},
|
|
{
|
|
"path": "src/main/runtime/rpc/methods",
|
|
"basenamePattern": "^linear(?:[-.]|$)",
|
|
"purpose": "Runtime RPC methods"
|
|
},
|
|
{
|
|
"path": "src/shared/linear",
|
|
"purpose": "Existing domain contract folder"
|
|
},
|
|
{
|
|
"path": "src/renderer/src/components/task-page/linear",
|
|
"purpose": "Provider-specific Task Page UI"
|
|
},
|
|
{
|
|
"path": "src/renderer/src/store/slices",
|
|
"basenamePattern": "^linear(?:[-.]|$)",
|
|
"purpose": "Renderer state"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"domain": "Terminals",
|
|
"locations": [
|
|
{
|
|
"path": "src/renderer/src/components/terminal-pane",
|
|
"purpose": "Desktop terminal UI and input/output behavior"
|
|
},
|
|
{
|
|
"path": "src/main/ipc/pty",
|
|
"purpose": "Electron terminal request handling"
|
|
},
|
|
{
|
|
"path": "src/main/runtime/terminal",
|
|
"purpose": "Host terminal ownership and lifecycle"
|
|
},
|
|
{
|
|
"path": "src/main/daemon",
|
|
"purpose": "Persistent terminal process host"
|
|
},
|
|
{
|
|
"path": "src/packages/process-host",
|
|
"purpose": "Subprocess execution and termination"
|
|
},
|
|
{
|
|
"path": "mobile/src/transport",
|
|
"purpose": "Phone transport including terminal streams"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"domain": "Agent chat",
|
|
"locations": [
|
|
{
|
|
"path": "src/renderer/src/components/native-chat",
|
|
"purpose": "Desktop chat presentation and composer"
|
|
},
|
|
{
|
|
"path": "src/main/native-chat",
|
|
"purpose": "Agent session wire, journals and transcript integration"
|
|
},
|
|
{
|
|
"path": "src/main/runtime",
|
|
"basenamePattern": "^(?:structured-)?agent-session(?:[-.]|$)",
|
|
"purpose": "Session runtime lifecycle"
|
|
},
|
|
{
|
|
"path": "src/main/claude",
|
|
"purpose": "Claude provider adapter"
|
|
},
|
|
{
|
|
"path": "src/main/codex",
|
|
"purpose": "Codex provider adapter"
|
|
},
|
|
{
|
|
"path": "mobile/src/session",
|
|
"purpose": "Mobile session and chat interface"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"domain": "Workspace state",
|
|
"locations": [
|
|
{
|
|
"path": "src/shared/workspace-layout",
|
|
"purpose": "Layout commands and invariants"
|
|
},
|
|
{
|
|
"path": "src/main/runtime/sidebar-inputs",
|
|
"purpose": "Host-owned sidebar facts"
|
|
},
|
|
{
|
|
"path": "src/main/persistence",
|
|
"purpose": "Durable profile state, migration and restoration"
|
|
},
|
|
{
|
|
"path": "src/renderer/src/store/slices",
|
|
"purpose": "Renderer state projections and interactions"
|
|
},
|
|
{
|
|
"path": "src/main/ipc/worktrees",
|
|
"purpose": "Workspace discovery and desktop requests"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"proposals": [
|
|
{
|
|
"id": "ipc-linear",
|
|
"phase": 1,
|
|
"priority": "pilot",
|
|
"risk": "lower",
|
|
"directory": "src/main/ipc",
|
|
"basenamePattern": "^linear(?:[-.]|$)",
|
|
"targetDirectory": "src/main/ipc/linear",
|
|
"stripPrefix": "linear-",
|
|
"entryStem": "linear",
|
|
"targetEntryStem": "register-handlers",
|
|
"reason": "Seven adjacent transport files already form a named provider family. Keep them separate from the backend client.",
|
|
"review": "Preserve exported registration symbols, IPC channel strings, request validation and registration order. Resolve any file-versus-directory entry ambiguity explicitly."
|
|
},
|
|
{
|
|
"id": "ipc-jira",
|
|
"phase": 1,
|
|
"priority": "pilot",
|
|
"risk": "lower",
|
|
"directory": "src/main/ipc",
|
|
"basenamePattern": "^jira(?:[-.]|$)",
|
|
"targetDirectory": "src/main/ipc/jira",
|
|
"stripPrefix": "jira-",
|
|
"entryStem": "jira",
|
|
"targetEntryStem": "register-handlers",
|
|
"reason": "Jira registration, request validation, cancellation and metadata handling belong together within IPC.",
|
|
"review": "Preserve channels, cancellation ownership, site scope and registration order. Keep src/main/jira as the backend domain."
|
|
},
|
|
{
|
|
"id": "linear-issue-context",
|
|
"phase": 1,
|
|
"priority": "pilot",
|
|
"risk": "moderate",
|
|
"directory": "src/main/linear",
|
|
"basenamePattern": "^issue-context(?:[-.]|$)",
|
|
"targetDirectory": "src/main/linear/issue-context",
|
|
"stripPrefix": "issue-context-",
|
|
"entryStem": "issue-context",
|
|
"targetEntryStem": "read-context",
|
|
"reason": "The issue-context family covers resolution, optional includes, pagination and relations around one public read operation.",
|
|
"review": "Keep the current-context, linked-workspace, inline-media and partial-error behavior intact; choose the public read-context entry explicitly."
|
|
},
|
|
{
|
|
"id": "jira-attachments",
|
|
"phase": 1,
|
|
"priority": "pilot",
|
|
"risk": "moderate",
|
|
"directory": "src/main/jira",
|
|
"basenamePattern": "^attachment(?:[-.]|$)",
|
|
"targetDirectory": "src/main/jira/attachments",
|
|
"stripPrefix": "attachment-",
|
|
"reason": "Attachment discovery, authenticated image fetching, grants, caching and protocols are a concrete subdomain.",
|
|
"review": "Check image protocol registration, credential scope, cancellation and URL permissions; retain authenticated-request in its existing role."
|
|
},
|
|
{
|
|
"id": "ephemeral-vm",
|
|
"phase": 1,
|
|
"priority": "pilot",
|
|
"risk": "moderate",
|
|
"directory": "src/main",
|
|
"basenamePattern": "^ephemeral-vm(?:[-.]|$)",
|
|
"targetDirectory": "src/main/ephemeral-vm",
|
|
"stripPrefix": "ephemeral-vm-",
|
|
"reason": "VM provisioning, recipe execution, resume and SSH cleanup currently occupy the application root.",
|
|
"review": "Preserve provisioning and cleanup ownership, folder workspace support and remote environment behavior."
|
|
},
|
|
{
|
|
"id": "task-page-leftovers",
|
|
"phase": 2,
|
|
"priority": "high",
|
|
"risk": "moderate",
|
|
"directory": "src/renderer/src/components",
|
|
"basenamePattern": "^(?:use-)?task-page(?:[-.]|$)|^TaskPage",
|
|
"targetDirectory": "src/renderer/src/components/task-page",
|
|
"reason": "Finish the existing feature folder instead of creating another feature root. Most provider routing needs a later review inside its existing provider folders.",
|
|
"review": "Preserve React component identity, lazy-loading boundaries and task draft ownership. Retain basenames and route provider-specific files to existing children; split this scope into provider-sized PRs.",
|
|
"routes": [
|
|
{
|
|
"basenamePattern": "^(?:use-)?task-page-jira(?:[-.]|$)|^TaskPageJira",
|
|
"targetDirectory": "src/renderer/src/components/task-page/jira"
|
|
},
|
|
{
|
|
"basenamePattern": "^(?:use-)?task-page-linear(?:[-.]|$)|^TaskPageLinear",
|
|
"targetDirectory": "src/renderer/src/components/task-page/linear"
|
|
},
|
|
{
|
|
"basenamePattern": "^(?:use-)?task-page-github(?:[-.]|$)|^TaskPageGitHub",
|
|
"targetDirectory": "src/renderer/src/components/task-page/github"
|
|
},
|
|
{
|
|
"basenamePattern": "^(?:use-)?task-page-gitlab(?:[-.]|$)|^TaskPageGitLab",
|
|
"targetDirectory": "src/renderer/src/components/task-page/gitlab"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "settings-repository",
|
|
"phase": 2,
|
|
"priority": "high",
|
|
"risk": "moderate",
|
|
"directory": "src/renderer/src/components/settings",
|
|
"basenamePattern": "^(?:Repository|repository-)",
|
|
"targetDirectory": "src/renderer/src/components/settings/repository",
|
|
"reason": "Repository settings have one user-facing owner and a large mixed family of components, state and tests.",
|
|
"review": "Keep draft-state boundaries and workspace-window routing; do not introduce an all-settings barrel."
|
|
},
|
|
{
|
|
"id": "store-agent-status",
|
|
"phase": 2,
|
|
"priority": "high",
|
|
"risk": "moderate",
|
|
"directory": "src/renderer/src/store/slices",
|
|
"basenamePattern": "^agent-status(?:[-.]|$)",
|
|
"targetDirectory": "src/renderer/src/store/slices/agent-status",
|
|
"reason": "Status reduction, subscriptions and tests are scattered beside unrelated Zustand slices.",
|
|
"review": "Keep the root store as the composition point. Preserve subscription and reduction semantics; keep an explicit slice entry."
|
|
},
|
|
{
|
|
"id": "renderer-session-rules",
|
|
"phase": 2,
|
|
"priority": "high",
|
|
"risk": "moderate",
|
|
"directory": "src/renderer/src/lib",
|
|
"basenamePattern": "^structured-agent-session(?:[-.]|$)",
|
|
"targetDirectory": "src/renderer/src/lib/agent-session",
|
|
"reason": "A concrete session-rule family can leave the 1,292-file renderer lib root without inventing a generic helpers directory.",
|
|
"review": "Keep view rules in renderer and host rules in runtime. Review boundaries against native-chat before expanding the selection."
|
|
},
|
|
{
|
|
"id": "ipc-filesystem",
|
|
"phase": 2,
|
|
"priority": "high",
|
|
"risk": "higher",
|
|
"directory": "src/main/ipc",
|
|
"basenamePattern": "^(?:filesystem|parcel-watcher)(?:[-.]|$)",
|
|
"targetDirectory": "src/main/ipc/filesystem",
|
|
"reason": "Consolidate the flat filesystem and watcher families with the existing filesystem folder, then consider a watcher child.",
|
|
"review": "Preserve parcel worker output names and process boundaries, file permissions, cancellation and mixed local/remote paths. Review the existing filesystem entry before moving."
|
|
},
|
|
{
|
|
"id": "ipc-pty",
|
|
"phase": 3,
|
|
"priority": "high",
|
|
"risk": "higher",
|
|
"directory": "src/main/ipc",
|
|
"basenamePattern": "^pty(?:[-.]|$)",
|
|
"targetDirectory": "src/main/ipc/pty",
|
|
"reason": "Consolidate flat terminal transport files into the existing pty tree after agreeing its ownership boundaries.",
|
|
"review": "Preserve pane ownership, host identity, lifecycle ordering, Windows/WSL paths and daemon compatibility; use existing pty children when ownership is clear."
|
|
},
|
|
{
|
|
"id": "shared-jira",
|
|
"phase": 2,
|
|
"priority": "high",
|
|
"risk": "higher",
|
|
"directory": "src/shared",
|
|
"basenamePattern": "^jira(?:[-.]|$)",
|
|
"targetDirectory": "src/shared/jira",
|
|
"reason": "Give pure Jira contracts and rules a domain home, matching the existing shared Linear domain.",
|
|
"review": "Keep RPC schemas at their contract boundary unless a separate decision changes that layout. Preserve wire fields and all desktop/mobile consumers."
|
|
},
|
|
{
|
|
"id": "browser-cookie",
|
|
"phase": 2,
|
|
"priority": "medium",
|
|
"risk": "higher",
|
|
"directory": "src/main/browser",
|
|
"basenamePattern": "^browser-cookie(?:[-.]|$)",
|
|
"targetDirectory": "src/main/browser/cookies",
|
|
"reason": "Cookie reading, importing and cleanup are a concrete subsystem inside a 611-file directory.",
|
|
"review": "Review browser session ownership, credential handling and native platform adapters. Do not combine this with browser API changes."
|
|
},
|
|
{
|
|
"id": "cloud-relay-assignment",
|
|
"phase": 2,
|
|
"priority": "medium",
|
|
"risk": "higher",
|
|
"directory": "cloud/apps/relay/src",
|
|
"basenamePattern": "^assignment(?:[-.]|$)",
|
|
"targetDirectory": "cloud/apps/relay/src/assignment",
|
|
"reason": "Relay assignment is a named operational responsibility in an otherwise flat service root.",
|
|
"review": "Use cloud's independent checks and deployment ownership. Preserve director/cell roles and rolling-version wire compatibility."
|
|
},
|
|
{
|
|
"id": "tooling-mobile-web",
|
|
"phase": 2,
|
|
"priority": "medium",
|
|
"risk": "moderate",
|
|
"directory": "config/scripts",
|
|
"basenamePattern": "^mobile-web-app(?:[-.]|$)",
|
|
"targetDirectory": "config/scripts/mobile-web-app",
|
|
"reason": "Group one product-specific tool family; build-, run- and check- prefixes describe verbs, not ownership.",
|
|
"review": "Update package scripts, CI workflows, script-relative URLs and test fixture copying. Separate a move from changing the generated web engines."
|
|
},
|
|
{
|
|
"id": "shared-session",
|
|
"phase": 3,
|
|
"priority": "high",
|
|
"risk": "higher",
|
|
"directory": "src/shared",
|
|
"basenamePattern": "^(?:structured-)?agent-session(?:[-.]|$)",
|
|
"targetDirectory": "src/shared/agent-session",
|
|
"reason": "Agent-session contracts are a large cross-surface domain currently encoded in filenames.",
|
|
"review": "This is an initial ownership inventory, not a single PR. Identify public contracts and subdomains first; keep old-client fences and generated RPC files separate."
|
|
},
|
|
{
|
|
"id": "shared-native-chat",
|
|
"phase": 3,
|
|
"priority": "high",
|
|
"risk": "higher",
|
|
"directory": "src/shared",
|
|
"basenamePattern": "^native-chat(?:[-.]|$)",
|
|
"targetDirectory": "src/shared/native-chat",
|
|
"reason": "Chat data and pure rules need a concrete domain home rather than hundreds of sibling names.",
|
|
"review": "Review overlap with agent-session responsibility; retain wire-facing names and move in consumer-sized batches."
|
|
},
|
|
{
|
|
"id": "shared-remote-runtime",
|
|
"phase": 3,
|
|
"priority": "high",
|
|
"risk": "higher",
|
|
"directory": "src/shared",
|
|
"basenamePattern": "^remote-runtime(?:[-.]|$)",
|
|
"targetDirectory": "src/shared/remote-runtime",
|
|
"reason": "Remote runtime handshake, capabilities and transport contracts are one discoverable protocol domain.",
|
|
"review": "Preserve mixed-version client/server behavior. Rename source paths without renaming wire methods, protocol tags or capability fields."
|
|
},
|
|
{
|
|
"id": "runtime-session",
|
|
"phase": 3,
|
|
"priority": "high",
|
|
"risk": "higher",
|
|
"directory": "src/main/runtime",
|
|
"basenamePattern": "^(?:structured-)?agent-session(?:[-.]|$)",
|
|
"targetDirectory": "src/main/runtime/agent-session",
|
|
"reason": "Session lifecycle and persistence should be discoverable below the runtime composition layer.",
|
|
"review": "Partition acquisition, dispatch and observation by ownership before implementing; keep OrcaRuntime composition files and remote RPC surfaces explicit."
|
|
},
|
|
{
|
|
"id": "mobile-native-chat",
|
|
"phase": 3,
|
|
"priority": "high",
|
|
"risk": "higher",
|
|
"directory": "mobile/src/session",
|
|
"basenamePattern": "^(?:use-)?mobile-native-chat(?:[-.]|$)|^(?:use)?MobileNativeChat",
|
|
"targetDirectory": "mobile/src/session/native-chat",
|
|
"reason": "The phone's chat family is mixed into a 722-file session folder, including presentation, interaction and hooks.",
|
|
"review": "Use mobile's own workspace checks. Preserve native/web splits, hook identity, transport behavior and embedded WebView source paths."
|
|
},
|
|
{
|
|
"id": "claude-structured",
|
|
"phase": 3,
|
|
"priority": "medium",
|
|
"risk": "higher",
|
|
"directory": "src/main/claude",
|
|
"basenamePattern": "^claude-structured(?:[-.]|$)",
|
|
"targetDirectory": "src/main/claude/structured",
|
|
"reason": "Structured Claude session execution is a distinct provider mode within an already named provider folder.",
|
|
"review": "Review acquisition, process and journal boundaries. Preserve CLI launch flags, account routing and session recovery."
|
|
},
|
|
{
|
|
"id": "codex-app-server",
|
|
"phase": 3,
|
|
"priority": "medium",
|
|
"risk": "higher",
|
|
"directory": "src/main/codex",
|
|
"basenamePattern": "^codex-app-server(?:[-.]|$)",
|
|
"targetDirectory": "src/main/codex/app-server",
|
|
"reason": "The app-server protocol family is a more useful boundary than the broad codex filename prefix.",
|
|
"review": "Preserve protocol, account routing, reconnect and recovery behavior. Keep generic Codex launch code outside this subtree."
|
|
},
|
|
{
|
|
"id": "persistence-leftovers",
|
|
"phase": 3,
|
|
"priority": "medium",
|
|
"risk": "higher",
|
|
"directory": "src/main",
|
|
"basenamePattern": "^persistence(?:[-.]|$)",
|
|
"targetDirectory": "src/main/persistence",
|
|
"reason": "The existing persistence subtree and flat root tests split the same discovery trail.",
|
|
"review": "Mostly tests and support may move here. Keep the current persistence entry explicit; inspect source-reading tests and fixtures before relocating. Preserve on-disk formats."
|
|
}
|
|
]
|
|
}
|