ts-procedures 8.1.1 → 8.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/agent_config/bin/setup.mjs +2 -2
  2. package/agent_config/claude-code/.claude-plugin/plugin.json +1 -1
  3. package/agent_config/claude-code/agents/ts-procedures-architect.md +1 -1
  4. package/agent_config/claude-code/skills/ts-procedures/SKILL.md +348 -5
  5. package/agent_config/claude-code/skills/ts-procedures/api-reference.md +2 -2
  6. package/agent_config/claude-code/skills/ts-procedures/patterns.md +3 -3
  7. package/agent_config/claude-code/skills/{ts-procedures-scaffold → ts-procedures}/templates/client.md +4 -2
  8. package/agent_config/copilot/copilot-instructions.md +3 -3
  9. package/agent_config/cursor/cursorrules +3 -3
  10. package/agent_config/lib/install-claude.mjs +4 -4
  11. package/build/codegen/bin/cli.js +1 -1
  12. package/build/codegen/bin/cli.js.map +1 -1
  13. package/build/codegen/bin/cli.test.js +2 -2
  14. package/build/codegen/bin/cli.test.js.map +1 -1
  15. package/build/codegen/constants.d.ts +8 -1
  16. package/build/codegen/constants.js +9 -1
  17. package/build/codegen/constants.js.map +1 -1
  18. package/build/codegen/e2e.test.js +1 -1
  19. package/build/codegen/e2e.test.js.map +1 -1
  20. package/build/codegen/emit-errors.test.js +1 -1
  21. package/build/codegen/emit-errors.test.js.map +1 -1
  22. package/build/codegen/emit-index.test.js +1 -1
  23. package/build/codegen/emit-index.test.js.map +1 -1
  24. package/build/codegen/emit-scope.test.js +1 -1
  25. package/build/codegen/emit-scope.test.js.map +1 -1
  26. package/build/codegen/pipeline.js +1 -1
  27. package/build/codegen/pipeline.js.map +1 -1
  28. package/build/codegen/pipeline.test.js +33 -10
  29. package/build/codegen/pipeline.test.js.map +1 -1
  30. package/build/codegen/targets/_shared/write-files.d.ts +11 -5
  31. package/build/codegen/targets/_shared/write-files.js +49 -7
  32. package/build/codegen/targets/_shared/write-files.js.map +1 -1
  33. package/build/codegen/targets/_shared/write-files.test.js +87 -21
  34. package/build/codegen/targets/_shared/write-files.test.js.map +1 -1
  35. package/build/codegen/targets/kotlin/emit-scope-kotlin.js +3 -2
  36. package/build/codegen/targets/kotlin/emit-scope-kotlin.js.map +1 -1
  37. package/build/codegen/targets/kotlin/format-kotlin.d.ts +6 -0
  38. package/build/codegen/targets/kotlin/format-kotlin.js +9 -0
  39. package/build/codegen/targets/kotlin/format-kotlin.js.map +1 -1
  40. package/build/codegen/targets/kotlin/format-kotlin.test.js +8 -1
  41. package/build/codegen/targets/kotlin/format-kotlin.test.js.map +1 -1
  42. package/build/codegen/targets/swift/format-swift.js +4 -1
  43. package/build/codegen/targets/swift/format-swift.js.map +1 -1
  44. package/docs/ai-agent-setup.md +5 -6
  45. package/docs/client-and-codegen.md +2 -2
  46. package/package.json +1 -1
  47. package/src/codegen/bin/cli.test.ts +2 -2
  48. package/src/codegen/bin/cli.ts +1 -1
  49. package/src/codegen/constants.ts +10 -1
  50. package/src/codegen/e2e.test.ts +1 -1
  51. package/src/codegen/emit-errors.test.ts +1 -1
  52. package/src/codegen/emit-index.test.ts +1 -1
  53. package/src/codegen/emit-scope.test.ts +1 -1
  54. package/src/codegen/pipeline.test.ts +39 -10
  55. package/src/codegen/pipeline.ts +1 -1
  56. package/src/codegen/targets/_shared/write-files.test.ts +143 -32
  57. package/src/codegen/targets/_shared/write-files.ts +53 -8
  58. package/src/codegen/targets/kotlin/__fixtures__/users-golden.kt +1 -0
  59. package/src/codegen/targets/kotlin/emit-scope-kotlin.ts +3 -2
  60. package/src/codegen/targets/kotlin/format-kotlin.test.ts +9 -0
  61. package/src/codegen/targets/kotlin/format-kotlin.ts +11 -0
  62. package/src/codegen/targets/swift/format-swift.ts +5 -1
  63. package/agent_config/claude-code/skills/ts-procedures-kotlin/SKILL.md +0 -106
  64. package/agent_config/claude-code/skills/ts-procedures-review/SKILL.md +0 -48
  65. package/agent_config/claude-code/skills/ts-procedures-scaffold/SKILL.md +0 -50
  66. package/agent_config/claude-code/skills/ts-procedures-swift/SKILL.md +0 -119
  67. /package/agent_config/claude-code/skills/{ts-procedures-review → ts-procedures}/checklist.md +0 -0
  68. /package/agent_config/claude-code/skills/{ts-procedures-scaffold → ts-procedures}/templates/astro-catchall.md +0 -0
  69. /package/agent_config/claude-code/skills/{ts-procedures-scaffold → ts-procedures}/templates/hono.md +0 -0
  70. /package/agent_config/claude-code/skills/{ts-procedures-scaffold → ts-procedures}/templates/procedure.md +0 -0
  71. /package/agent_config/claude-code/skills/{ts-procedures-scaffold → ts-procedures}/templates/stream-procedure.md +0 -0
@@ -92,7 +92,7 @@ function setupClaude({ dryRun, check } = {}) {
92
92
  // Mirror install-claude.mjs: copy every file under each source skill dir, plus the agent.
93
93
  const claudeFiles = [];
94
94
  const skillsSrc = join(AGENT_CONFIG_DIR, 'claude-code', 'skills');
95
- for (const skill of ['ts-procedures', 'ts-procedures-review', 'ts-procedures-scaffold', 'ts-procedures-kotlin', 'ts-procedures-swift']) {
95
+ for (const skill of ['ts-procedures']) {
96
96
  const walk = (dir, prefix) => {
97
97
  for (const entry of readdirSync(dir)) {
98
98
  const full = join(dir, entry);
@@ -128,7 +128,7 @@ function setupClaude({ dryRun, check } = {}) {
128
128
  console.log(` ${f}`);
129
129
  }
130
130
  console.log('');
131
- console.log(' Skills: ts-procedures, ts-procedures-scaffold, ts-procedures-review, ts-procedures-kotlin, ts-procedures-swift');
131
+ console.log(' Skills: ts-procedures (use `/ts-procedures review <path>` and `/ts-procedures scaffold <type> <Name>`; Kotlin/Swift codegen reference included)');
132
132
  console.log(' Agent: ts-procedures-architect (architecture planning)\n');
133
133
  return false;
134
134
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "ts-procedures",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "AI coding assistant plugin for ts-procedures — a TypeScript RPC framework for type-safe, schema-validated procedure calls with automatic validation, streaming support, and HTTP framework integrations."
5
5
  }
@@ -134,4 +134,4 @@ type AuthContext = { userId: string; requestId: string; db: Database }
134
134
 
135
135
  ## Next Steps
136
136
 
137
- After planning, use `/ts-procedures:scaffold <type> <Name>` to generate each procedure with correct patterns and tests.
137
+ After planning, use `/ts-procedures scaffold <type> <Name>` to generate each procedure with correct patterns and tests.
@@ -1,13 +1,37 @@
1
1
  ---
2
2
  name: ts-procedures
3
- description: "TypeScript RPC framework reference for ts-procedures — schema validation, error handling, HTTP builders, streaming, and code generation. Use when writing, reviewing, or debugging procedures, configuring HTTP builders, or designing schemas."
4
- user-invocable: false
3
+ description: "TypeScript RPC framework reference for ts-procedures — type-safe schema-validated procedures (TypeBox, AJV), error classes and taxonomy, HonoAppBuilder, SSE/streaming, and client code generation for TypeScript, Kotlin (Android/JVM, kotlinx-serialization), and Swift (iOS/macOS/Apple, Codable). Use when writing, reviewing, scaffolding, or debugging ts-procedures procedures, HTTP builders, schemas, error handling, or generated clients."
4
+ argument-hint: "[review <path> | scaffold <type> <Name>]"
5
+ allowed-tools: Read, Write, Edit, Grep, Glob
5
6
  ---
6
7
 
8
+ <!-- MAINTAINER NOTES (not part of the skill content):
9
+ 1. Write/Edit are granted skill-wide because Scaffold Mode generates files. Claude Code
10
+ cannot scope allowed-tools per-mode within a single SKILL.md, so the write capability is
11
+ kept dormant by the File-write guard below — writes happen only when the literal first
12
+ word of $ARGUMENTS is `scaffold`. If the modes are ever split back into separate skills,
13
+ re-scope tools per skill accordingly.
14
+ 2. The former standalone `ts-procedures-review` skill ran with `context: fork` and
15
+ `effort: high`. Those are skill-level settings that cannot be scoped to one mode, so
16
+ Review Mode now runs inline in the main context instead of a forked one. Review Mode
17
+ recovers isolation by suggesting a subagent for large reviews (see that section). -->
18
+
7
19
  # ts-procedures Framework Reference
8
20
 
9
21
  You are assisting a developer using **ts-procedures**, a TypeScript RPC framework that creates type-safe, schema-validated procedure calls with a single function definition. Always follow these rules when writing or reviewing code.
10
22
 
23
+ ## Modes
24
+
25
+ This skill has three modes, selected by the **first whitespace-delimited word of `$ARGUMENTS`**:
26
+
27
+ | First word of `$ARGUMENTS` | Mode | What happens |
28
+ |----------------------------|------|--------------|
29
+ | *(empty)* | **Reference** | The framework knowledge below auto-loads. Read [patterns.md](patterns.md), [anti-patterns.md](anti-patterns.md), or [api-reference.md](api-reference.md) as needed. Kotlin/Swift client codegen have dedicated reference sections lower down. |
30
+ | `review` | **Review Mode** | Audit the file/dir at the path argument against [checklist.md](checklist.md). Read-only. See the **Review Mode** section below. |
31
+ | `scaffold` | **Scaffold Mode** | Generate implementation + test files from [templates/](templates). **Writes files.** See the **Scaffold Mode** section below. |
32
+
33
+ **File-write guard.** This skill writes files in **Scaffold Mode only**. Scaffold Mode is entered **if and only if** the literal first word of `$ARGUMENTS` is `scaffold`. In every other case — empty `$ARGUMENTS` (reference), `review`, or any reference/codegen question (including Kotlin and Swift) — operate strictly read-only: use Read/Grep/Glob, never Write or Edit. Do **not** infer write permission from the surrounding task ("the user is obviously building an API, so I'll scaffold") — during an active build that reasoning is always pre-satisfied and is exactly the trap to avoid. Only the literal `scaffold` first word unlocks file writes. If you are unsure which mode you are in, you are not in Scaffold Mode.
34
+
11
35
  ## What Are You Trying to Do?
12
36
 
13
37
  Load the right reference for your task:
@@ -15,8 +39,8 @@ Load the right reference for your task:
15
39
  - **Writing new procedures or HTTP routes?** Read [patterns.md](patterns.md) — prescribed code examples for every procedure type and HTTP integration
16
40
  - **Reviewing or debugging existing code?** Read [anti-patterns.md](anti-patterns.md) — 20 common mistakes with before/after fixes and severity ratings
17
41
  - **Need exact API signatures or type definitions?** Read [api-reference.md](api-reference.md) — complete API documentation with type signatures for every export
18
- - **Generating a Kotlin client for Android/JVM consumers?** Use the separate `ts-procedures-kotlin` skill — it covers `--target kotlin` end-to-end and won't load unless the user mentions Kotlin/Android.
19
- - **Generating a Swift client for iOS/macOS/Apple-platform consumers?** Use the separate `ts-procedures-swift` skill — it covers `--target swift` end-to-end and won't load unless the user mentions Swift/iOS/Apple platforms.
42
+ - **Generating a Kotlin client for Android/JVM consumers?** See the **Kotlin Client Codegen** section below — it covers `--target kotlin` end-to-end.
43
+ - **Generating a Swift client for iOS/macOS/Apple-platform consumers?** See the **Swift Client Codegen** section below — it covers `--target swift` end-to-end.
20
44
 
21
45
  ## Core Flow
22
46
 
@@ -173,8 +197,327 @@ The npm package ships user-facing documentation with narrative explanations and
173
197
  | `docs/http-integrations.md` | Hono unified builder (`HonoAppBuilder` — RPC + HTTP + streaming with stratified config), **error taxonomy (canonical)**, DocRegistry (unified constructor, `.documentError()`) |
174
198
  | `docs/client-and-codegen.md` | Client code generation, `createApiClient`/`createClient`, typed error dispatch, per-route `Errors` unions, per-call options, client-level defaults, typed RequestMeta augmentation, CLI options |
175
199
  | `docs/client-error-handling.md` | **Canonical guide** for 7.0+ client error surface: normalized error classes, `.safe()` Result API, `ClientErrorMap` augmentation, custom `ErrorClassifier`, migration from `ClientRequestError`. |
200
+ | `docs/codegen-kotlin.md` | Kotlin target consumer setup (Gradle deps, contextual serializers, sealed interfaces) |
201
+ | `docs/codegen-swift.md` | Swift target consumer setup (SPM/Xcode integration, JSONDecoder config, discriminated unions, error dispatch patterns) |
176
202
  | `CHANGELOG.md` | Release notes — see `[7.0.0]` for the safe-result API, new error classes, and `ClientRequestError` → `ClientHttpError` rename. See `[6.0.0]` for the peer error-handling model (taxonomy + `onError` + `onRequestError`). |
177
203
 
178
204
  ## Workflow
179
205
 
180
- After planning with the **ts-procedures-architect** agent, use `/ts-procedures:scaffold <type> <Name>` to generate implementations. Use `/ts-procedures:review <path>` to validate existing code.
206
+ After planning with the **ts-procedures-architect** agent, use `/ts-procedures scaffold <type> <Name>` to generate implementations. Use `/ts-procedures review <path>` to validate existing code.
207
+
208
+ ---
209
+
210
+ ## Review Mode
211
+
212
+ *Entered when the first word of `$ARGUMENTS` is `review`. Read-only — never Write or Edit in this mode. Run thoroughly and at high effort.*
213
+
214
+ > **Isolation note:** as a standalone skill this review ran in a forked context. Folded into one skill it runs inline. For a large review where you want isolation (so the audit doesn't pollute the main conversation), dispatch this review to a subagent and relay its findings.
215
+
216
+ Parse the remainder of `$ARGUMENTS` (everything after `review`) as a file or directory path. If a directory, review all `.ts` and `.tsx` files within it.
217
+
218
+ ### Instructions
219
+
220
+ 1. Read the target file(s).
221
+ 2. Identify ts-procedures imports (`ts-procedures`, `ts-procedures/hono`, `ts-procedures/http`, `ts-procedures/http-docs`, `ts-procedures/http-errors`, `ts-procedures/client`, `ts-procedures/codegen`) to determine file types.
222
+ 3. Check each file against the categorized checklist in [checklist.md](checklist.md).
223
+ 4. For detailed code examples of each violation pattern, reference [anti-patterns.md](anti-patterns.md) — it shows 20 common mistakes with before/after code fixes and severity ratings.
224
+ 5. Output findings grouped by severity.
225
+
226
+ ### Output Format
227
+
228
+ For each finding:
229
+
230
+ ```
231
+ [SEVERITY] file:line — Violation
232
+ Problem: What's wrong
233
+ Fix: Concrete before/after code
234
+ ```
235
+
236
+ Severity levels:
237
+ - **CRITICAL** — Will cause bugs, silent failures, resource leaks, or runtime errors. Must fix.
238
+ - **WARNING** — Anti-pattern that hurts maintainability or correctness. Should fix.
239
+ - **SUGGESTION** — Improvement for readability, type safety, or DX. Nice to have.
240
+
241
+ ### Summary
242
+
243
+ After individual findings, provide:
244
+ - Total findings by severity
245
+ - Overall assessment (healthy / needs attention / significant issues)
246
+ - Top 3 priorities to address
247
+ - If structural issues found, suggest `/ts-procedures scaffold <type> <Name>` to generate correct implementations
248
+
249
+ ### Reference
250
+
251
+ See [checklist.md](checklist.md) for the complete categorized checklist by file type.
252
+ See [anti-patterns.md](anti-patterns.md) for detailed code examples of each violation.
253
+
254
+ ---
255
+
256
+ ## Scaffold Mode
257
+
258
+ *Entered when the first word of `$ARGUMENTS` is `scaffold`. This is the only mode that writes files (see the File-write guard above).*
259
+
260
+ Parse `$ARGUMENTS` as `scaffold <type> <Name>`. The first word (`scaffold`) is the mode selector; `<type>` is the second word, `<Name>` is the third.
261
+
262
+ If `<type>` or `<Name>` is missing, ask the user for them before writing anything.
263
+
264
+ ### Instructions
265
+
266
+ 1. Validate `<type>` is a recognized type (see table below). Case-insensitive. **If it is not an exact match for one of the valid types, do not improvise or guess a template — list the valid types and ask the user to pick one.**
267
+ 2. Validate `<Name>` is PascalCase (e.g., `UserProfile`).
268
+ 3. Derive placeholder variants from the provided PascalCase Name:
269
+ - `{{Name}}` — PascalCase as given (e.g., `UserProfile`)
270
+ - `{{name}}` — camelCase (e.g., `userProfile`)
271
+ - `{{kebab}}` — kebab-case (e.g., `user-profile`)
272
+ 4. Read the template file from `templates/<type>.md` (relative to this skill directory).
273
+ 5. Replace all `{{Name}}`, `{{name}}`, and `{{kebab}}` placeholders with the appropriate variants.
274
+ 6. Generate the implementation file(s) following the template exactly.
275
+ 7. Also generate a colocated test file following ts-procedures test conventions.
276
+
277
+ ### Valid Types
278
+
279
+ | Type | Template | Files Generated |
280
+ |------|----------|----------------|
281
+ | `procedure` | `templates/procedure.md` | `{{Name}}.procedure.ts`, `{{Name}}.procedure.test.ts` |
282
+ | `stream-procedure` | `templates/stream-procedure.md` | `{{Name}}.stream.ts`, `{{Name}}.stream.test.ts` |
283
+ | `hono` | `templates/hono.md` | `{{Name}}.hono.ts`, `{{Name}}.hono.test.ts` |
284
+ | `client` | `templates/client.md` | `{{Name}}.client.ts`, `{{Name}}.client.test.ts` |
285
+ | `astro-catchall` | `templates/astro-catchall.md` | `src/pages/api/[...rest].ts` |
286
+
287
+ ### Rules
288
+
289
+ - Use `ctx.error()` for ad-hoc business errors; for structured errors with status codes and typed client dispatch, throw custom error classes and register them via `defineErrorTaxonomy` in the builder's `errors` config (see the HTTP builder templates).
290
+ - Never throw raw `Error` — either use `ctx.error()` or a typed class registered in the taxonomy.
291
+ - `schema.params` is validated at runtime; `schema.returnType` is documentation only.
292
+ - Pass `ctx.signal` to all downstream async calls.
293
+ - Stream handlers always have `ctx.signal` (guaranteed `AbortSignal`).
294
+ - Use TypeBox for schema definitions (`import { Type } from 'typebox'`).
295
+ - AJV config: `allErrors: true`, `coerceTypes: true`, `removeAdditional: true`.
296
+ - Test files use `describe`/`test` from vitest.
297
+
298
+ ### Workflow
299
+
300
+ Use the **ts-procedures-architect** agent to plan your API structure first, then scaffold each procedure. After scaffolding, use `/ts-procedures review <path>` to validate the implementation.
301
+
302
+ ---
303
+
304
+ ## Kotlin Client Codegen
305
+
306
+ *Reference section — read-only. The Kotlin target is **types-only**: no runtime, no adapter, no error registry. Mobile/Android consumers own the HTTP layer.*
307
+
308
+ You are assisting a developer who needs to generate Kotlin types from a `ts-procedures` server's `DocEnvelope`.
309
+
310
+ ### When this section applies
311
+
312
+ - The user mentions Kotlin, Android, kotlinx-serialization, mobile client, or `--target kotlin`.
313
+ - The user wants to share API types between a `ts-procedures` server and a Kotlin/JVM consumer.
314
+ - The user is debugging Kotlin codegen output, Gradle setup, or contextual serializer registration.
315
+
316
+ If the user is generating a **TypeScript** client, use the main reference above. For **Swift / iOS / macOS / Apple-platform** consumers, see the **Swift Client Codegen** section below.
317
+
318
+ ### Quickstart
319
+
320
+ ```bash
321
+ npx ts-procedures-codegen \
322
+ --target kotlin \
323
+ --kotlin-package com.example.api \
324
+ --url https://api.example.com/_ts-procedures.json \
325
+ --out ./src/main/kotlin/com/example/api
326
+ ```
327
+
328
+ One `.kt` file per scope. Types accessed as `Users.GetUser.Response`, `Users.GetUser.Body.Address` (nested classes via `inlineTypes: true`), `Users.GetUser.Errors.NotFound`.
329
+
330
+ ### CLI flags (Kotlin-specific)
331
+
332
+ | Flag | Default | Purpose |
333
+ |---|---|---|
334
+ | `--target kotlin` | `ts` | Switch to the Kotlin codegen path |
335
+ | `--kotlin-package <com.example.api>` | required | Sets the `package` declaration on every emitted `.kt` file |
336
+ | `--kotlin-serializer <kotlinx\|none>` | `kotlinx` | `kotlinx` emits `@Serializable`; `none` emits plain data classes for Moshi/Gson/hand-written serialization |
337
+ | `--unsupported-unions <throw\|fallback>` | `throw` | **Currently a no-op for Kotlin** — ajsc v7.2 silently emits an empty `data class` for untagged `oneOf` regardless. CLI warns when set |
338
+
339
+ `--array-item-naming`, `--depluralize`, `--uncountable-words` also apply to the Kotlin target.
340
+
341
+ ### Output shape (what consumers see)
342
+
343
+ ```kotlin
344
+ package com.example.api
345
+
346
+ import kotlinx.serialization.Serializable
347
+ import kotlinx.serialization.SerialName
348
+ import kotlinx.serialization.Contextual
349
+ import kotlinx.serialization.json.JsonClassDiscriminator
350
+
351
+ object Users {
352
+ object GetUser {
353
+ const val method = "GET"
354
+ const val pathTemplate = "/users/{id}"
355
+ fun path(p: PathParams): String = "/users/${p.id}"
356
+
357
+ @Serializable data class PathParams(val id: String)
358
+
359
+ @Serializable
360
+ data class Response(
361
+ val id: String,
362
+ @SerialName("created-at") @Contextual val createdAt: java.time.Instant,
363
+ val address: Address,
364
+ ) {
365
+ @Serializable data class Address(val street: String, val city: String)
366
+ }
367
+
368
+ object Errors {
369
+ @Serializable
370
+ data class NotFound(val name: String = "NotFound", val message: String)
371
+ }
372
+ }
373
+ }
374
+ ```
375
+
376
+ For routes without path params, `path` is a `const val`, not a function.
377
+
378
+ ### Consumer-side setup the dev MUST do
379
+
380
+ The generated code requires these on the Android/JVM side. **Don't let the user assume the codegen handles them.**
381
+
382
+ 1. **Gradle:** `kotlin("plugin.serialization")` plugin + `org.jetbrains.kotlinx:kotlinx-serialization-json` dependency. (`kotlinx-serialization-core` is a transitive dep; no need to declare it explicitly.)
383
+
384
+ 2. **Contextual serializers:** `format: date-time`/`uuid`/`uri`/`date`/`time` map to JVM stdlib types annotated with `@Contextual`. The consumer's `Json` configuration MUST register `contextual(java.time.Instant::class, ...)` etc., otherwise decoding fails. We don't ship the serializers — choice between ISO-8601 and epoch ms is application-specific.
385
+
386
+ 3. **Discriminated unions:** `@JsonClassDiscriminator` is read automatically by `kotlinx-serialization-json` — no extra config needed.
387
+
388
+ 4. **No runtime dispatch:** error types are emitted as nested data classes (`Users.GetUser.Errors.NotFound`), but there's no `instanceof`-style registry, no `dispatchTypedError`. Consumers catch HTTP failures themselves and inspect `body.name` (a regular `String` field, not a type-system discriminator) to decide which error data class to deserialize against. This is by design; don't suggest implementing it.
389
+
390
+ The full setup guide lives at `docs/codegen-kotlin.md` in the `ts-procedures` repo.
391
+
392
+ ### Documented limitations to flag during reviews
393
+
394
+ - **Untagged `oneOf` produces an empty `data class`.** Won't round-trip. Add a server-side discriminator, hand-write a `KSerializer`, or pre-process the envelope.
395
+ - **Tuples > 3 elements throw** at codegen time. Refactor to a struct schema upstream.
396
+ - **`additionalProperties: { type: T }` is silently dropped** with a KDoc note. Add a sibling `Map<String, T>` field by hand if your contract uses extra keys.
397
+ - **Schema-level `examples` are not modeled.** They're documentation-only on the server side; consumers don't see them.
398
+
399
+ ### Anti-patterns (Kotlin)
400
+
401
+ - Suggesting the Kotlin target ships an HTTP adapter or error registry.
402
+ - Recommending `--kotlin-serializer none` without noting the consumer is responsible for adapter setup.
403
+ - Treating `--unsupported-unions fallback` as functional for Kotlin — it's a no-op (the CLI itself warns when set).
404
+ - Saying KMP (Kotlin Multiplatform) is supported — JVM only for now.
405
+ - Mixing `--target kotlin` flags into a TypeScript-target invocation; some flags are silently ignored, others (like `--kotlin-package`) are required only for kotlin.
406
+
407
+ ---
408
+
409
+ ## Swift Client Codegen
410
+
411
+ *Reference section — read-only. The Swift target is **types-only**: no runtime, no adapter, no error registry. iOS / macOS / Apple-platform consumers own the HTTP layer.*
412
+
413
+ You are assisting a developer who needs to generate Swift types from a `ts-procedures` server's `DocEnvelope`.
414
+
415
+ ### When this section applies
416
+
417
+ - The user mentions Swift, iOS, macOS, watchOS, tvOS, visionOS, Apple platforms, `Codable`, `URLSession`, or `--target swift`.
418
+ - The user wants to share API types between a `ts-procedures` server and a Swift consumer.
419
+ - The user is debugging Swift codegen output, SPM/Xcode integration, `JSONDecoder` configuration, or `Codable` conformance issues.
420
+
421
+ If the user is generating a **TypeScript** client, use the main reference above. For **Kotlin/Android** consumers, see the **Kotlin Client Codegen** section above.
422
+
423
+ ### Quickstart
424
+
425
+ ```bash
426
+ npx ts-procedures-codegen \
427
+ --target swift \
428
+ --url https://api.example.com/_ts-procedures.json \
429
+ --out ./Sources/MyApp/Generated
430
+ ```
431
+
432
+ One `.swift` file per scope. Types accessed as `Users.GetUser.Response`, `Users.GetUser.PathParams`, `Users.GetUser.Response.Address` (nested structs via `inlineTypes: true`), `Users.GetUser.Errors.NotFound`.
433
+
434
+ **Note:** unlike the Kotlin target, no `--swift-package` flag exists or is required. Swift modules are defined by Xcode/SPM targets.
435
+
436
+ ### CLI flags (Swift-specific)
437
+
438
+ | Flag | Default | Purpose |
439
+ |---|---|---|
440
+ | `--target swift` | `ts` | Switch to the Swift codegen path |
441
+ | `--swift-serializer <codable\|none>` | `codable` | `codable` emits `: Codable` + `CodingKeys`; `none` emits plain structs (consumer handles serialization) |
442
+ | `--swift-access-level <public\|internal>` | `public` | Threads through to ajsc's `accessLevel`; use `internal` when generated types shouldn't appear in module ABI |
443
+ | `--unsupported-unions <throw\|fallback>` | `throw` | **Functional for Swift** (unlike Kotlin where it's a no-op) — `fallback` emits a self-contained `AnyCodable` helper for untagged `anyOf`/`oneOf` |
444
+
445
+ `--array-item-naming`, `--depluralize`, `--uncountable-words` also apply to the Swift target.
446
+
447
+ ### Output shape (what consumers see)
448
+
449
+ ```swift
450
+ import Foundation
451
+
452
+ public enum Users {
453
+ public enum GetUser {
454
+ public static let method = "GET"
455
+ public static let pathTemplate = "/users/{id}"
456
+ public static func path(_ p: PathParams) -> String { return "/users/\(p.id)" }
457
+
458
+ public struct PathParams: Codable {
459
+ public let id: String
460
+ }
461
+
462
+ public struct Response: Codable {
463
+ public let id: String
464
+ public let createdAt: Date
465
+ public let address: Address
466
+
467
+ enum CodingKeys: String, CodingKey {
468
+ case id
469
+ case createdAt = "created-at"
470
+ case address
471
+ }
472
+
473
+ public struct Address: Codable {
474
+ public let street: String
475
+ public let city: String
476
+ }
477
+ }
478
+
479
+ public enum Errors {
480
+ public struct NotFound: Codable {
481
+ public let name: String
482
+ public let message: String
483
+ }
484
+ }
485
+ }
486
+ }
487
+ ```
488
+
489
+ For routes without path params, `path` is a `static let`, not a function. Namespaces are caseless `enum`s (the standard Swift idiom — uninstantiable, zero runtime cost).
490
+
491
+ ### Consumer-side setup the dev MUST do
492
+
493
+ The generated code requires these on the Apple-platform side. **Don't let the user assume the codegen handles them.**
494
+
495
+ 1. **Drop generated files into your SPM target or Xcode source group.** Any target containing the generated dir picks them up — no special build config. SPM globs sources recursively; for Xcode, use **File → Add Files to "<TargetName>"…** and ensure target membership is checked.
496
+
497
+ 2. **Configure `JSONDecoder.dateDecodingStrategy = .iso8601`.** **Required** if the schema uses any `format: date-time` field (which become `Foundation.Date`). Without this, decoding fails with `DecodingError.typeMismatch`. Symmetric: set `JSONEncoder.dateEncodingStrategy = .iso8601` for request bodies.
498
+
499
+ 3. **HTTP transport is the consumer's choice.** `URLSession` (with `async/await`) is the default recommendation — it's built-in and works on all Apple platforms with no dependencies. Alamofire / other libraries are fine but never required.
500
+
501
+ 4. **No runtime dispatch.** Error types are emitted as nested structs (`Users.GetUser.Errors.NotFound`), but there's no registry, no `instanceof`-style lookup, no `dispatchTypedError`. Consumers catch HTTP failures themselves and dispatch on status code or `body.name` (a regular `String` field, not a type-system discriminator) to decide which error struct to decode against. To make error structs throwable, declare a one-line `extension X.Errors.NotFound: Error {}` in user code (keep it out of the generated file so re-runs don't clobber it). This is by design; don't suggest implementing a registry.
502
+
503
+ The full setup guide lives at `docs/codegen-swift.md` in the `ts-procedures` repo.
504
+
505
+ ### Documented limitations to flag during reviews
506
+
507
+ - **`format: date` and `format: time` map to `String`.** Foundation has no native date-only or time-only type. Parse with `DateFormatter` if a typed value is needed.
508
+ - **`type: integer` maps to `Int64`** (not `Int`). 32-bit Apple platforms exist; `Int64` guarantees range parity.
509
+ - **`type: number` maps to `Double`.** For monetary values, convert to `Decimal` at the parse boundary.
510
+ - **Heterogeneous tuples throw under `Codable`.** Swift tuples aren't `Codable`. Schemas with positional-tuple `items: [...]` arrays throw at codegen time. Refactor to a struct schema upstream.
511
+ - **`additionalProperties: { type: T }` is silently dropped** with a doc-comment. Add a sibling `[String: T]` field by hand if your contract uses extra keys.
512
+ - **`not` and `patternProperties` throw at codegen time.** Simplify the schema upstream.
513
+ - **Untagged `oneOf` throws by default.** Add a discriminator, or pass `--unsupported-unions fallback` to emit `AnyCodable`-typed values (loses static typing).
514
+
515
+ ### Anti-patterns (Swift)
516
+
517
+ - **Suggesting the Swift target ships a networking layer or HTTP adapter.** It does not — consumers own `URLSession`/etc. entirely.
518
+ - **Recommending Alamofire as required.** `URLSession` + `async/await` is fine and ships with the OS. Alamofire is a personal-preference choice, not a dependency of the generated code.
519
+ - **Conflating `--swift-serializer none` with "no setup needed".** `none` removes `Codable` conformance and `CodingKeys` — the consumer then needs their own serialization plan (hand-rolled, SwiftyJSON, etc.). It's strictly *more* setup, not less.
520
+ - **Treating `--unsupported-unions fallback` as a no-op for Swift.** Unlike Kotlin (where it's silently dropped), the Swift target actually emits an `AnyCodable` helper that round-trips correctly. Use it when needed.
521
+ - **Suggesting backwards compatibility with Swift 4 / pre-async-await.** Assume Swift 5.5+ (the async/await era). Sample dispatch code in docs uses `async throws`.
522
+ - **Suggesting the codegen emits `: Error` conformance on error structs.** It doesn't (`Codable` only) — consumers add a one-line extension. Don't ask for this to be added to the codegen; it would force users into a particular error model.
523
+ - **Mixing `--target swift` flags into a TypeScript-target invocation.** The flags are silently ignored; no harm, but the user is probably running the wrong target.
@@ -1222,7 +1222,7 @@ const adapter = createFetchAdapter({ fetch: customFetch })
1222
1222
 
1223
1223
  ## generateClient(options)
1224
1224
 
1225
- > For **Kotlin** client codegen (Android/JVM, types-only output), see the dedicated `ts-procedures-kotlin` skill. For **Swift** client codegen (iOS/macOS/Apple platforms, types-only output), see the dedicated `ts-procedures-swift` skill. The reference below covers TypeScript codegen only.
1225
+ > For **Kotlin** client codegen (Android/JVM, types-only output), see the *Kotlin Client Codegen* section in `SKILL.md`. For **Swift** client codegen (iOS/macOS/Apple platforms, types-only output), see the *Swift Client Codegen* section in `SKILL.md`. The reference below covers TypeScript codegen only.
1226
1226
 
1227
1227
  Build-time CLI and programmatic API for generating typed client files from a `DocEnvelope`.
1228
1228
 
@@ -1269,7 +1269,7 @@ async function generateClient(options: {
1269
1269
  | `--array-item-naming <value>` | Postfix for array item type names (ignored with `--no-namespace-types`) |
1270
1270
  | `--uncountable-words <list>` | Comma-separated words to skip singularization (ignored with `--no-namespace-types`) |
1271
1271
  | `--service-name <name>` | Names the service namespace and binding factory (e.g., `Auth` → `export namespace Auth { ... }` + `createAuthBindings`). Also prefixes `${Name}Errors` and `${Name}ProcedureErrorUnion` in `_errors.ts`. **Default: `Api`.** |
1272
- | `--clean-out-dir` / `--no-clean-out-dir` | Recursively remove `--out <dir>` before writing so stale scope files (e.g. from removed scopes) are pruned. Skipped under `--dry-run`. **Default: off.** |
1272
+ | `--clean-out-dir` / `--no-clean-out-dir` | Prune orphaned generated files from `--out <dir>` before writing files carrying the `ts-procedures-codegen` signature that this run no longer emits (e.g. from removed scopes). Hand-written files (no signature) and subdirectories are never touched. Skipped under `--dry-run`. Pass `--no-clean-out-dir` to opt out. **Default: on.** |
1273
1273
 
1274
1274
  > **Strict flag parsing:** any unknown `--…` token errors out immediately with a `Did you mean …?` suggestion when it's a near-miss (`--targt` → `--target`, `--service` → `--service-name`). Typos no longer fall through silently to produce empty or wrong output.
1275
1275
 
@@ -930,10 +930,10 @@ app.get('/docs', (c) => c.json(docs.toJSON()))
930
930
 
931
931
  // Then generate client:
932
932
  // npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated/api
933
- // Defaults: --self-contained --namespace-types --jsdoc
933
+ // Defaults: --self-contained --namespace-types --jsdoc --clean-out-dir
934
+ // (--clean-out-dir prunes orphaned generated files signed by ts-procedures-codegen; never deletes hand-written files)
934
935
  // Optional: --service-name Auth --depluralize --enum-style union
935
- // --clean-out-dir // wipe --out before writing (prunes stale scope files)
936
- // Opt-out: --no-self-contained --no-namespace-types --no-jsdoc
936
+ // Opt-out: --no-self-contained --no-namespace-types --no-jsdoc --no-clean-out-dir
937
937
  ```
938
938
 
939
939
  ---
@@ -148,6 +148,8 @@ npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated
148
148
  # Watch mode for development
149
149
  npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated/api --watch
150
150
 
151
- # Wipe the output directory before writing (prunes stale scope files left over from removed scopes)
152
- npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated/api --clean-out-dir
151
+ # Orphaned generated files (e.g. from removed scopes) are pruned by default
152
+ # only files signed by ts-procedures-codegen are removed; hand-written files are never touched.
153
+ # Opt out to leave them in place:
154
+ npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated/api --no-clean-out-dir
153
155
  ```
@@ -372,13 +372,13 @@ import { generateClient } from 'ts-procedures/codegen'
372
372
 
373
373
  ```bash
374
374
  npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated/api
375
- # Defaults (on): --self-contained --namespace-types --jsdoc
376
- # Opt-out flags: --no-self-contained --no-namespace-types --no-jsdoc
375
+ # Defaults (on): --self-contained --namespace-types --jsdoc --clean-out-dir
376
+ # (--clean-out-dir prunes orphaned generated files signed by ts-procedures-codegen; never deletes hand-written files)
377
+ # Opt-out flags: --no-self-contained --no-namespace-types --no-jsdoc --no-clean-out-dir
377
378
  # Optional flags: --depluralize --enum-style union
378
379
  # --array-item-naming Item --uncountable-words criteria,alumni
379
380
  # --dry-run --watch --client-import-path @my-app/client
380
381
  # --config ./codegen.config.json --service-name Auth
381
- # --clean-out-dir # recursively wipe --out before writing (prunes stale scope files)
382
382
  ```
383
383
 
384
384
  For Kotlin codegen (Android/JVM consumers), see `docs/codegen-kotlin.md` in the ts-procedures repo. The Kotlin target is types-only; consumer apps own HTTP/error handling.
@@ -372,13 +372,13 @@ import { generateClient } from 'ts-procedures/codegen'
372
372
 
373
373
  ```bash
374
374
  npx ts-procedures-codegen --url http://localhost:3000/docs --out ./src/generated/api
375
- # Defaults (on): --self-contained --namespace-types --jsdoc
376
- # Opt-out flags: --no-self-contained --no-namespace-types --no-jsdoc
375
+ # Defaults (on): --self-contained --namespace-types --jsdoc --clean-out-dir
376
+ # (--clean-out-dir prunes orphaned generated files signed by ts-procedures-codegen; never deletes hand-written files)
377
+ # Opt-out flags: --no-self-contained --no-namespace-types --no-jsdoc --no-clean-out-dir
377
378
  # Optional flags: --depluralize --enum-style union
378
379
  # --array-item-naming Item --uncountable-words criteria,alumni
379
380
  # --dry-run --watch --client-import-path @my-app/client
380
381
  # --config ./codegen.config.json --service-name Auth
381
- # --clean-out-dir # recursively wipe --out before writing (prunes stale scope files)
382
382
  ```
383
383
 
384
384
  For Kotlin codegen (Android/JVM consumers), see `docs/codegen-kotlin.md` in the ts-procedures repo. The Kotlin target is types-only; consumer apps own HTTP/error handling.
@@ -6,7 +6,7 @@ const __filename = fileURLToPath(import.meta.url);
6
6
  const __dirname = dirname(__filename);
7
7
  const SOURCE_DIR = join(__dirname, '..', 'claude-code');
8
8
 
9
- const SKILL_NAMES = ['ts-procedures', 'ts-procedures-review', 'ts-procedures-scaffold', 'ts-procedures-kotlin', 'ts-procedures-swift'];
9
+ const SKILL_NAMES = ['ts-procedures'];
10
10
  const AGENT_FILES = ['ts-procedures-architect.md'];
11
11
 
12
12
  function listFilesRecursive(dir) {
@@ -26,9 +26,9 @@ function listFilesRecursive(dir) {
26
26
  * Install Claude Code integration files into a project's .claude/ directory.
27
27
  *
28
28
  * Creates:
29
- * .claude/skills/ts-procedures/ — Framework reference skill
30
- * .claude/skills/ts-procedures-scaffold/ — Scaffold skill (templates included)
31
- * .claude/skills/ts-procedures-review/ — Review skill
29
+ * .claude/skills/ts-procedures/ — Unified skill: framework reference plus
30
+ * `review`/`scaffold` $ARGUMENTS modes (checklist +
31
+ * templates bundled) and Kotlin/Swift codegen reference
32
32
  * .claude/agents/ts-procedures-architect.md — Architecture planning agent
33
33
  *
34
34
  * @param {string} projectRoot — Absolute path to the consuming project's root
@@ -128,7 +128,7 @@ export function parseArgs(argv, config) {
128
128
  let namespaceTypes = config?.namespaceTypes ?? true;
129
129
  let selfContained = config?.selfContained ?? true;
130
130
  let serviceName = config?.serviceName;
131
- let cleanOutDir = config?.cleanOutDir ?? false;
131
+ let cleanOutDir = config?.cleanOutDir ?? true;
132
132
  let target = config?.target;
133
133
  let kotlinPackage = config?.kotlin?.package;
134
134
  let kotlinSerializer = config?.kotlin?.serializer;
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/codegen/bin/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,cAAc,EAA8B,MAAM,aAAa,CAAA;AA6CxE,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,mBAAmB,GAAG,mCAAmC,CAAA;AAE/D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,UAAmB;IACtD,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,IAAI,mBAAmB,CAAC,CAAA;IAC3D,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;QAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAkB,CAAA;IACzC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,+BAA+B;YAC/B,MAAM,IAAI,KAAK,CAAC,sDAAsD,QAAQ,KAAK,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAA;QAChI,CAAC;QACD,8CAA8C;QAC9C,OAAO,SAAS,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AC,CAAC,GAAG,CAAC,CAAA;QAC/F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -159,9 +159,9 @@ describe('parseArgs', () => {
159
159
  const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out', '--clean-out-dir']);
160
160
  expect(result.cleanOutDir).toBe(true);
161
161
  });
162
- it('defaults cleanOutDir to false when not provided', () => {
162
+ it('defaults cleanOutDir to true when not provided', () => {
163
163
  const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out']);
164
- expect(result.cleanOutDir).toBe(false);
164
+ expect(result.cleanOutDir).toBe(true);
165
165
  });
166
166
  it('parses --no-clean-out-dir flag', () => {
167
167
  const result = parseArgs(['--url', 'http://x.com/docs', '--out', './out', '--no-clean-out-dir']);