Adopt lower camelCase for all Star-Lang field names #4

Closed
opened 2026-08-02 17:18:40 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-08-02 17:18:40 +00:00 (Migrated from github.com)

Decision

Star-Lang field identifiers must use lower camelCase, not kebab-case.

Examples:

  • candidateId, not candidate-id
  • messageId, not message-id
  • correlationId, not correlation-id
  • replyTo, not reply-to

This applies to:

  • document fields
  • message payload fields
  • wire-envelope field names
  • normalized IR and portable manifest field keys
  • canonical JSON
  • generated Python and TypeScript bindings
  • fixtures, tests, and user-facing documentation

Boundary

Do not mechanically rename declaration or DSL identifiers that are not fields. Forms and named declarations such as spec-library, ingest-page, candidate-id as a scalar/type name, predicates, actors, and compiler options may remain kebab-case. The rule is specifically for field identifiers and serialized field keys.

Required implementation

  • Define and enforce the lower-camelCase field grammar.
  • Reject newly declared kebab-case fields with a structured compiler diagnostic.
  • Preserve camelCase exactly through parsing, normalized IR, manifests, and serialization.
  • Emit camelCase keys in canonical JSON and generated bindings without silent renaming.
  • Migrate all Star-Lang fixtures and tests that currently use kebab-case field keys.
  • Update wire-envelope keys such as messageId, messageType, correlationId, and replyTo.
  • Add negative tests proving kebab-case field declarations are rejected.

Research authority

This supersedes the field-naming portions of the existing Star-Lang research. STAR-LANG-RESEARCH-008 remains approved with this amendment; STAR-LANG-RESEARCH-009 must be reviewed against the camelCase rule.

## Decision Star-Lang field identifiers must use **lower camelCase**, not kebab-case. Examples: - `candidateId`, not `candidate-id` - `messageId`, not `message-id` - `correlationId`, not `correlation-id` - `replyTo`, not `reply-to` This applies to: - document fields - message payload fields - wire-envelope field names - normalized IR and portable manifest field keys - canonical JSON - generated Python and TypeScript bindings - fixtures, tests, and user-facing documentation ## Boundary Do not mechanically rename declaration or DSL identifiers that are not fields. Forms and named declarations such as `spec-library`, `ingest-page`, `candidate-id` as a scalar/type name, predicates, actors, and compiler options may remain kebab-case. The rule is specifically for **field identifiers and serialized field keys**. ## Required implementation - [ ] Define and enforce the lower-camelCase field grammar. - [ ] Reject newly declared kebab-case fields with a structured compiler diagnostic. - [ ] Preserve camelCase exactly through parsing, normalized IR, manifests, and serialization. - [ ] Emit camelCase keys in canonical JSON and generated bindings without silent renaming. - [ ] Migrate all Star-Lang fixtures and tests that currently use kebab-case field keys. - [ ] Update wire-envelope keys such as `messageId`, `messageType`, `correlationId`, and `replyTo`. - [ ] Add negative tests proving kebab-case field declarations are rejected. ## Research authority This supersedes the field-naming portions of the existing Star-Lang research. `STAR-LANG-RESEARCH-008` remains approved with this amendment; `STAR-LANG-RESEARCH-009` must be reviewed against the camelCase rule.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/star-lang#4
No description provided.