protocol-parity-synclisted
Install: claude install-skill wisnuwiry/padu
# Protocol & Cross-Client Parity Skill
This skill guides the developer or agent through synchronizing wire protocol changes, generating TypeScript bindings, updating `@padu/client` state reducers, and maintaining feature parity across all client surfaces (Desktop, Web, and Mobile).
---
## When to Use This Skill
- Modifying or adding wire types in `crates/padu-protocol/`.
- Adding new agent events or daemon commands.
- Implementing a user-facing feature on one client (Desktop or Web) and creating its counterpart.
- Resolving TypeScript build errors caused by out-of-sync generated types in `packages/padu-client/src/generated/`.
- Validating cross-client parity before submitting PRs.
---
## Workflow Steps
### Step 1: Modify Rust Protocol & Export Types
1. Edit `crates/padu-protocol/src/lib.rs` (or relevant module).
2. Ensure types derive `#[derive(Serialize, Deserialize, TS)]` and `#[ts(export)]`.
3. If adding a new root type, add it to `crates/padu-protocol/src/bin/export_types.rs`.
---
### Step 2: Generate & Check TypeScript Bindings
Execute:
```bash
bun run protocol:generate
bun run protocol:check
```
Verify the generated files in `packages/padu-client/src/generated/` and commit them alongside your Rust changes.
---
### Step 3: Update `@padu/client` State & Presentation
1. Handle new events in `packages/padu-client/src/event-reducer.ts`.
2. Update presentation helpers if needed (`transcript-presentation.ts`, `composer-preferences.ts`).
3. Add unit tests in `package