You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+190-7Lines changed: 190 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,22 @@ This file provides guidance to AI agents when working with the OSMO codebase.
6
6
7
7
OSMO is a workflow orchestration platform for Physical AI, managing heterogeneous Kubernetes clusters for training, simulation, and edge compute workloads.
8
8
9
+
## Workflow Requirements
10
+
11
+
Before making any code changes in this repo, you MUST:
12
+
13
+
1.**Explore first**: Use the Codebase Structure section below to orient yourself, then read relevant source files before proposing changes. Read existing implementations, tests, and related modules. Never modify code you haven't read.
14
+
2.**Plan before implementing**: For any non-trivial change (more than a simple one-line fix), create an explicit plan that identifies:
15
+
- Which files need to change and why
16
+
- How the change fits with existing patterns in the codebase
17
+
- What tests exist and what new tests are needed
18
+
- Any cross-cutting concerns (e.g., auth, storage backends, IPC protocols)
19
+
- A verification plan: how to confirm the change works (e.g., specific tests to run, build commands, manual checks)
20
+
3.**Check for downstream impact**: This is a multi-service platform — changes in shared libraries (`lib/`, `utils/`) can affect multiple services. Grep for usages before modifying shared code.
21
+
4.**Verify after implementation**: After completing changes, execute the verification plan — run the relevant tests/builds and confirm they pass before claiming the work is done. Never assert success without evidence.
22
+
5.**Simplify before committing**: Review your changes for unnecessary complexity, redundancy, and over-engineering before committing. Prefer the simplest solution that meets the requirements.
23
+
6.**Update documentation**: If adding, removing, or renaming a service, module, or major component, update the "Codebase Structure" section in this file as part of the same change.
24
+
9
25
## Team Guidelines
10
26
11
27
- Follow existing code patterns and conventions in the codebase
@@ -15,15 +31,10 @@ OSMO is a workflow orchestration platform for Physical AI, managing heterogeneou
15
31
- Copyright headers must keep "All rights reserved." on the same line as "NVIDIA CORPORATION & AFFILIATES"
16
32
- If copyright lines exceed 100 characters, add `# pylint: disable=line-too-long` comment instead of breaking into multiple lines
17
33
18
-
## Tool Usage Preferences
19
-
20
-
- Use specialized tools (Read, Edit, Write, Grep, Glob) instead of Bash commands whenever possible
21
-
- Bash tools require user intervention to allow and should only be used as a last resort
22
-
- Prefer Read over cat, Edit over sed, Write over echo/heredoc, Grep over grep, and Glob over find
23
-
24
-
## Coding Standards
34
+
## Python Coding Standards
25
35
26
36
### Import Statements
37
+
27
38
- All imports must be at the top level of the module
28
39
- Place all imports at the top of the file after the module docstring
29
40
-**No exceptions**: Imports inside functions are not allowed
@@ -35,12 +46,14 @@ OSMO is a workflow orchestration platform for Physical AI, managing heterogeneou
35
46
- Use late binding or forward references for type hints (PEP 563)
36
47
37
48
### Variable Naming
49
+
38
50
- Do not use abbreviations in variable names unless they are well-understood abbreviations or common conventions
|`runtime/cmd/ctrl/`|**osmo_ctrl** — Orchestrates workflow execution. WebSocket to workflow service. Unix socket to osmo_user. Manages data download/upload, barriers for multi-task sync, port forwarding. |
150
+
|`runtime/cmd/user/`|**osmo_user** — Executes user commands with PTY. Streams stdout/stderr to ctrl. Handles checkpointing (periodic uploads). |
151
+
|`runtime/cmd/rsync/`|**osmo_rsync** — Rsync daemon with bandwidth limiting. |
152
+
153
+
### Go Runtime Packages (`runtime/pkg/`)
154
+
155
+
| Package | Purpose |
156
+
|---------|---------|
157
+
|`args/`| CLI flag parsing for ctrl and user containers. |
-**API layer**: OpenAPI-generated types (`lib/api/generated.ts` — DO NOT EDIT) + adapter layer (`lib/api/adapter/`) that bridges backend quirks to UI expectations
0 commit comments