architecture Cursor ruleA
This file is byte-identical to the first copy the registry indexed, one of 3 indexed copies. Same content hash, so the same checks give both the same grade.
architecture from autonomous-ai/physical-ai-operating-system is a Cursor rule: instructions the Cursor agent follows in that repo.
mdr add autonomous-ai/physical-ai-operating-system/.cursor/rules/architecture.mdc@git:20260324.7a91f3bPins git:20260324.7a91f3b in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 14 of 14 checks passed
- Kind
- Cursor rule
- Repository
- autonomous-ai/physical-ai-operating-system
- Path
.cursor/rules/architecture.mdc- Versions recorded
- 1
- Latest version
- git:20260324.7a91f3b, committed Mar 24, 2026
- Size
- 1,709 bytes
- Repository stars
- 479
- License
- Apache-2.0
Architecture and coding conventions for AI Lamp OpenClaw.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Architecture Rules
## Package Structure
- **Handlers** go in `server/<domain>/delivery/http/handler.go`
- **Services** go in `internal/<domain>/service.go`
- **Domain types** go in `domain/<type>.go`
- **Wire providers** go in `server/wire.go` and `bootstrap/wire.go`
- **Shared libraries** go in `lib/`
## Dependency Injection
- Use **Google Wire** for compile-time DI — no runtime reflection
- After changing any provider signature: run `make generate`
- Never manually edit `wire_gen.go` files
## API Conventions
- All responses use `serializers.ResponseSuccess(data)` or `serializers.ResponseError(err)`
- Response format: `{"status": 1|0, "data": <payload>|null, "message": null|"error"}`
- Validate requests with `go-playground/validator` at handler level
- Return early on validation failure with `http.StatusBadRequest`
## Error Handling
- Always wrap errors with context: `fmt.Errorf("operation: %w", err)`
- Log with component prefix: `log.Println("[led] starting engine")`
- Never swallow errors silently
## Goroutines & Concurrency
- Always pass `context.Context` for cancellation
- Background goroutines must select on `ctx.Done()`
…Read the whole file at its exact version.
How to install
mdr add autonomous-ai/physical-ai-operating-system/.cursor/rules/architecture.mdc@sha256:eee522c2d571ecc2The line at the top of this page pins the label git:20260324.7a91f3b, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_t2blvhkvp4i7jh2n)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Mar 24, 2026.
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (1709 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
autonomous-ai/physical-ai-operating-system · 479 stars · license Apache-2.0 · pushed 2026-10-21 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_t2blvhkvp4i7jh2n GET https://markdownregistry.com/api/v1/resolve?ref=autonomous-ai/physical-ai-operating-system/.cursor/rules/architecture.mdc GET https://markdownregistry.com/api/v1/blob/eee522c2d571ecc2f0e22d4b93db655fb8a8b88b192965218e1ab0a083a9ad7e
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: Cursor rules vs AGENTS.md · which agent file does what.
More from autonomous-ai/physical-ai-operating-system
Every file in autonomous-ai/physical-ai-operating-system