openuispec 0.1.33 → 0.1.34

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 (2) hide show
  1. package/cli/init.ts +11 -5
  2. package/package.json +1 -1
package/cli/init.ts CHANGED
@@ -347,7 +347,9 @@ This means the project has existing UI code but hasn't been specced yet. Your jo
347
347
  type: scroll_vertical
348
348
  \`\`\`
349
349
  4. **Extract tokens** — scan for colors, fonts, spacing and create files in \`${specDir}/tokens/\`.
350
- 5. **Update the manifest** — fill in \`data_model\`, \`api.endpoints\`, and \`generation.code_roots.backend\` in \`${specDir}/openuispec.yaml\`.
350
+ 5. **Create contract extensions** — define visual variants for the 7 built-in contracts (action_trigger, data_display, input_field, collection, nav_container, feedback, surface) in \`${specDir}/contracts/\`. These encode the design system's visual identity (shapes, token overrides, platform mappings). Read \`schema/contract.schema.json\` and examples in the package for the format.
351
+ 6. **Create locale files** — for each locale in \`i18n.supported_locales\`, create \`${specDir}/locales/<locale>.json\` with all \`$t:\` keys used in screens and flows.
352
+ 7. **Update the manifest** — fill in \`data_model\`, \`api.endpoints\` in \`${specDir}/openuispec.yaml\`.
351
353
 
352
354
  ## OpenUISpec Source Of Truth
353
355
 
@@ -762,10 +764,14 @@ Done! Your spec project is ready at ./${answers.specDir}/
762
764
 
763
765
  Getting started (new project):
764
766
  1. Edit ${answers.specDir}/openuispec.yaml — define your data model and API
765
- 2. Create screens in ${answers.specDir}/screens/ (one YAML per screen)
766
- 3. Create flows in ${answers.specDir}/flows/ (multi-step navigation)
767
- 4. Ask AI to generate native code from the spec
768
- 5. Run \`openuispec drift --snapshot --target ${answers.targets[0]}\` to baseline the first accepted target state after that target output directory exists
767
+ 2. Create tokens in ${answers.specDir}/tokens/ (colors, typography, spacing, etc.)
768
+ 3. Create contract extensions in ${answers.specDir}/contracts/ (visual variants for the 7 built-in contracts)
769
+ 4. Create screens in ${answers.specDir}/screens/ (one YAML per screen)
770
+ 5. Create flows in ${answers.specDir}/flows/ (multi-step navigation)
771
+ 6. Create locale files in ${answers.specDir}/locales/ (one JSON per supported locale)
772
+ 7. Run \`openuispec validate\` and \`openuispec validate semantic\` to check everything
773
+ 8. Ask AI to generate native code from the spec
774
+ 9. Run \`openuispec drift --snapshot --target ${answers.targets[0]}\` to baseline the first accepted target state after that target output directory exists
769
775
 
770
776
  Getting started (existing project):
771
777
  1. Ask AI to read your existing UI code and generate spec files:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openuispec",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A semantic UI specification format for AI-native, platform-native app development",