Repository navigation
feat(db): db schema rules and the Hub's schema design warnings - #78
Merged
Merged
Conversation
…ct field shapes Emails and links need a format, language / currency / country and every list people pick from are taxonomy pickers (enum only for developer flags), user ids are user references. Works offline (ux-fixes item 13). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a schema check and in the bundle dry run Warnings go to stderr so --json stdout stays one document; only saveDatabaseSchema and validateSchema print them. The database help and the create / update help point at db schema rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ma rules before writing a schema Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndle dry run, and the agent files Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🎉 This PR is included in version 1.32.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A coding agent building a schema through the CLI saved an app link, an email, language and currency as bare text and
created_by_user_idas text (ux-fixes item 13). The CLI now shows the rules and the Hub's warnings:norbix db schema rules [--json]prints the schema design rules with the exact dataSchema shape per field (email / uri format, taxonomy picker for language / currency / country, user reference, money, date). Offline.db schema create,hub database schema saveandhub account schema validateprint the Hub's designwarningson stderr (stdout stays one JSON document with--json); the bundle dry run'svalidationcarries them too. Only these methods print them (IdResponse.warnings is shared).norbix ai init), docs/AGENTS.md, docs/database.md, README and the create / update / database help point atdb schema rules.Gateway side (shipped to refactoringV2, f19c1e862): save_database_schema returns
IdResponse.Warnings, validate_schema returnsWarnings.No new SDK method:
warningsis read from the response JSON through anunknownguard, so this works with @norbix.ai/ts 4.26.0. Regenerating hub2.dtos.ts (typedwarnings) is a follow-up in sdk-ts.Tests:
npx vitest run→ 35 files, 980 tests passed (12 new in tests/schema-rules.test.ts; ai-init and thenorbix schemasnapshot updated).Task file: /Users/djovaisas/Projects/norbix/docs/tasks/ux-fixes-2026-10-14/schema-guidance.md (workspace root, not a git repo)
🤖 Generated with Claude Code