Wegent / wework-mobile
AGENTS.md867 starsChanged 3 months agoApache-2.0View on GitHub
Wework Mobile is the iOS and Android client of Wework. It is not an independent product model. For every Mobile feature, the PC Wework implementation under ../wework/ is the source of truth for product semantics, protocols, interfaces, data ownership, state transitions, architecture, and end-to-end flows. Wework Mobile is the mobile client for operating Wework cloud devices. The PC Wework cloud-device implementation is the primary and mandatory reference for every Mobile feature. Always trace the cloud-device path first, including its protocol,…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- backend-rs/AGENTS.mdAGENTS.md
- frontend/AGENTS.mdAGENTS.md
- wework/AGENTS.mdAGENTS.md
- backend-rs/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 0 are common, 10 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Always trace the cloud-device path first, including its protocol, API, device identity, workspace ownership, data transformation, execution …
- Distinctive: line 16
Do not copy the PC local-executor path when it differs from the cloud-device path.
- Distinctive: line 32
If no equivalent PC behavior exists, stop and establish the behavior in Wework before adding it to Mobile.
- Distinctive: line 37
Use these sources in order:
- Distinctive: line 65
Use one canonical domain transformation for all screens.
- Distinctive: line 73
After each material code change, compare the code against the diagram and update either one when they diverge.
- Distinctive: line 86
Do not hide a contract mismatch with retries, local caches, synthetic defaults, compatibility shims, or silent fallbacks.
- Very specific: line 91
Use strict TypeScript, function components, const, single quotes, and no semicolons.
- Very specific: line 92
Keep protocol types complete and aligned with the PC types in ../wework/src/types/ and Backend schemas.
- Very specific: line 94
Put domain rules in src/domain/, transport behavior in src/services/, orchestration in hooks, and platform presentation in components.
- Distinctive: line 97
Prefer Expo and React Native platform APIs.
- Distinctive: line 102
Read the corresponding PC tests before writing Mobile tests.
- Distinctive: line 113
Do not hand off a change with type errors, failing tests, or a failed iOS or Android export.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Wework Mobile contributor guide
Wework Mobile is the iOS and Android client of Wework. It is not an independent product model.
For every Mobile feature, the PC Wework implementation under ../wework/ is the source of truth
for product semantics, protocols, interfaces, data ownership, state transitions, architecture, and
end-to-end flows.
Highest-priority rule: follow PC Wework cloud-device behavior
Wework Mobile is the mobile client for operating Wework cloud devices. The PC Wework cloud-device implementation is the primary and mandatory reference for every Mobile feature. Always trace the cloud-device path first, including its protocol, API, device identity, workspace ownership, data transformation, execution routing, realtime events, task lifecycle, error handling, and user-visible flow.
Do not copy the PC local-executor path when it differs from the cloud-device path. Do not mix local App data with cloud-device data. A selected cloud device must expose only the projects, workspaces, tasks, sessions, capabilities, and state belonging to that device, using the same ownership and routing rules as PC Wework cloud devices.
Mandatory PC Wework reference
Before changing wework-mobile/**:
- Locate the corresponding PC Wework cloud-device implementation and its tests in
../wework/. - Trace the complete cloud-device flow: source object, storage owner, workspace, executor, task address, session lifecycle, request/response schema, and realtime events.
- Record the relevant PC files in the working notes or final handoff.
- Implement the same domain behavior in Mobile. Do not invent a Mobile-only protocol, data model, fallback, state machine, aggregation rule, or error interpretation.
If no equivalent PC behavior exists, stop and establish the behavior in Wework before adding it to Mobile. Do not infer a new product contract from screenshots or partial API responses.
Source-of-truth order
Use these sources in order:
- PC Wework cloud-device behavior and its tests.
- Shared Backend and executor schemas and runtime protocol handlers.
- Other PC Wework behavior when it does not conflict with the cloud-device path.
- Mobile presentation and platform integration.
Mobile may adapt visual layout, navigation, gestures, keyboard handling, safe areas, and native iOS or Android controls. Platform adaptation must not change domain meaning, supported operations, device ownership, execution routing, or lifecycle behavior.
Architecture boundary
flowchart LR
W[PC Wework cloud-device behavior and tests] --> C[Shared product contract]
B[Backend schemas and REST APIs] --> C
E[Executor Runtime RPC] --> C
S[Socket.IO runtime events] --> C
C --> M[Wework Mobile domain and services]
M --> I[iOS / Android native presentation]- Mobile is a remote client. It never runs an executor and never receives executor credentials.
- Preserve the distinction between project storage, code workspace location, executor location, task ownership, RPC routing device, and session lifecycle.
- Preserve PC Wework field semantics exactly, including optional fields. Do not drop metadata that
participates in routing or ownership, such as
workspaceSourceorremoteHostId. - Use one canonical domain transformation for all screens. Lists, selectors, creation flows, and conversation routing must not independently reinterpret the same runtime data.
- Reuse existing Mobile domain, service, and component abstractions before adding new ones. Delete obsolete paths when consolidating behavior.
Implementation workflow
For any non-trivial change, first draw the relevant Mermaid architecture, state, or sequence diagram. After each material code change, compare the code against the diagram and update either one when they diverge.
Protocol and data-flow changes require an explicit parity check against PC Wework for:
- endpoint and RPC method names;
- request, response, and event fields;
- device and workspace identity;
- ordering, filtering, grouping, and deduplication;
- loading, empty, offline, retry, cancellation, and terminal states;
- task creation, continuation, transcript recovery, and reconnect behavior;
- authorization and secret-storage boundaries.
Do not hide a contract mismatch with retries, local caches, synthetic defaults, compatibility shims, or silent fallbacks. Diagnose the primary flow from actual code, logs, and payloads, then fix it.
TypeScript and React Native
- Use strict TypeScript, function components,
const, single quotes, and no semicolons. - Keep protocol types complete and aligned with the PC types in
../wework/src/types/and Backend schemas. A smaller Mobile UI does not justify a lossy transport type. - Put domain rules in
src/domain/, transport behavior insrc/services/, orchestration in hooks, and platform presentation in components. - New interactive controls need descriptive
testIDvalues. Preserve existingtestIDvalues. - Prefer Expo and React Native platform APIs. Native presentation must preserve the PC operation's accessibility label, disabled state, confirmation behavior, and outcome.
Verification
Read the corresponding PC tests before writing Mobile tests. Every changed behavior needs focused Mobile coverage for the same primary, boundary, failure, and recovery paths.
Run from wework-mobile/:
pnpm typecheck
pnpm test
pnpm buildDo not hand off a change with type errors, failing tests, or a failed iOS or Android export.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

