Skip to content
bitzorcas
中EN

Concept

CLI and controlled tooling

Select Consumer Solution templates, code generation, schema, seed, workflow, and database-maintenance entries while understanding write surface, privilege, and evidence boundaries.

Last updated

BitzOrcas Tooling has three families: generate a customer solution, generate customer-owned source scaffolding, and controlled operations/migration. None belongs in application runtime dependencies, but their risks differ sharply. Templates write a new tree and Codegen writes staging; Schema, Workflow, and Database tools can connect to real databases and need approval plus audit.

Tooling map

BitzOrcas Tooling

Distributable template package & scaffolder

Visual & architecture workbench

Development source generation

Controlled operations/migration

Governance

BitzOrcas.Cli (bitz)
interactive Consumer scaffolder

Modern.Templates
Consumer Solution

BitzOrcas Suite (bitz suite)
dual-mode modeling / Diff / DDL / Git / ER

CodeGeneration.Cli
aggregate/use-case scaffold

SchemaMaintenance
drift/migration/seed

SeedData.Exporter
legacy→owner CSV

Workflow.Migrator
bitzorcas/saury definition→DSL

DatabaseMaintenance
backup/restore/export

Upgrade.Cli (bitz-upgrade)
plan/apply/rollback versions

mcp-bitzsaury
read-only foundation/legacy/PRD search

ErrorCatalog.Cli
strong-typed error manifest

The repository ships exactly four distributables: the BitzOrcas.Modern.Templates template package plus three PackAsTool tools — bitz (BitzOrcas.Cli, including the embedded Suite dual-mode studio), bitz-codegen (CodeGeneration.Cli), and bitz-upgrade (Upgrade.Cli). Remaining tools are standalone net10.0 executables run from source at the matching release commit. Short names in documentation are not promises of published global tools.

Capability and risk matrix

ToolInputWrite surfaceDefault safetyDoes not prove
BitzOrcas.Cli (bitz)scenario preset + orthogonal dimension flagsnew Consumer Solution tree (frontend included)fail-fast parsing + dependency self-healing + dual-ORM golden gatesproduction License/deployment complete
BitzOrcas Suite (bitz suite)domain entity model + CLI interaction contextphysical slice source atomic write (scoped to module)memory read-only Diff review + Git history isolation + strict schema validationcomplete business logic closure
Modern TemplatesProfileChoice + RuntimeAdapternew Consumer Solution15 Profiles + native physical generation + isolated restoreproduction License/deployment complete
CodeGeneration.Clibusiness-slice schema v1atomic placement under .codegen-outputlegacy inline/module/use-case entries fail-closed as audits; BOCG3xx = zero writescorrect business rules/authorization
SchemaMaintenancemetadata + SQL Serverscript/schema; or read-onlycheck/dry run/SafeOnlyzero downtime/data compatibility
SeedData.Exporterlegacy stagingfourteen owner CSVambiguous relation fail-closedPII compliance/replay idempotency
Workflow.MigratorBitzOrcas five tables or Saury definition tablesdefinition + published binding + sidecar reportDryRun + source detectioninstance migration/semantic equivalence
DatabaseMaintenanceSQL Server/backup/table.bak, restore, exportRESTORE token + path guardsRTO/actual recoverability
Upgrade.Cliupgrade map + target versionDirectory.Packages.props onlyplan/rollback, fail-closed on irreversible stepsbusiness-source/config correctness
BitzSaury migration MCPfoundation, legacy, and PRD repository pathsnone; all 12 tools are read-onlyenvironment-path validation + stdio protocol isolationmigration semantics or code compliance
ErrorCatalog.Clirepo source (src/**/*.cs)0008-error-catalog.json manifest--check drift gateruntime error behavior

Choose by required evidence, not by the fact that all live under src/Tooling.

bitz: the next-generation interactive scaffolder

The bitz CLI replaces the legacy bitzorcas-compose.py static 15-combination matrix with scenario presets and orthogonal dimensions (topology/tenancy/ORM/platform capabilities/business slice/sandbox/frontend). It is the recommended Consumer Solution creation channel: an interactive wizard or pure-flag script mode generates commercial-package composition hosts, SqlSugar/EF Core persistence ORM adapters, per-solution test projects, and the --migrate-schema/--seed-only operational commands, plus bitz add/remove module for mutating existing solutions. It coexists with the dotnet new bitzorcas-host matrix below with a shared contract source (the verified consumer baseline); retirement conditions are tracked in 0004-template-upgrade-map.json.

BitzOrcas Suite: Modern Dual-Mode Architecture Studio

BitzOrcas Suite is the lightweight, visual developer workbench embedded directly within the CLI (launched via bitz suite or bitz suite --web). Purpose-built to eliminate repetitive boilerplate and cognitive overhead in Clean Architecture & DDD slice development, Suite features:

  • Entity Designer & Property Grid: visually configure schema fields, invariant constraints, foreign keys, and multi-tenant flags;
  • Virtual File System (VFS) Memory Review: integrated Monaco Editor for side-by-side Diff between existing disk files and projected code;
  • Multi-Dialect DDL Live Preview: dual SQL Server & PostgreSQL script generation with Chinese/English comments, drag-to-reposition, and fullscreen modals;
  • Cursor-Centric Smooth ER Topology Canvas: navigate relational networks with smooth mousewheel zoom and export to Retina 2x PNG, SVG, or Mermaid;
  • Physical Git Timeline & Comparison Drawer: multi-dimensional commit search, expandable second-tier width drawer with 36px collapsible rails, and two-pane file diffing.

For comprehensive operational guidance, see the dedicated BitzOrcas Suite Studio Guide.

Consumer Solution template chapters

One switch list cannot explain the solution template. Read in order:

OrderPageQuestion
1Template and composition selectionwhich of 15 supported combinations fits the business
2Create a Consumer Solutioninstall, generate, restore, build, test, run
3Generated outputHost, Profile, commercial package, manifest, customer source
4Parameters and constraintsall values, defaults, allowed combinations, diagnostics
5Template troubleshootinggeneration, Feed, Generator, License diagnosis

The generated Starter Module is consumer-owned; Framework, Workflow, and Licensing come from commercial packages. A template tree is not copied product source.

Code-generation entry

Code generator has exactly one production entry:

Terminal window
# Install from the local commercial feed, or dotnet run from source at the release commit.
dotnet new tool-manifest
dotnet tool install BitzOrcas.CodeGeneration.Cli \
--version 1.0.0-alpha1 --add-source <commercial-feed>
dotnet bitz-codegen --business-slice ./design/matter-intakes.v1.json \
--output .codegen-output

The production entry accepts only a strictly validated slice schema (industry-neutral unified aggregate plus one Create command); the legacy --inline/--module/--use-case flags are fail-closed audit entries — zero C#, a diagnostic manifest, exit code 2. Manually wire slnx membership, invariants, authorization resource, tenant/data scope, and real test fixtures afterwards.

Schema and Seed responsibilities

Schema Maintenance compares compiled metadata with SQL Server schema and can validate CSV length offline. Seed Exporter creates owner-local CSV from an approved legacy snapshot.

Legacy snapshot

Seed Exporter

Candidate owner CSV

Schema --validate-seed

SeedRunner replay contracts

Compiled metadata

Schema drift check

Target SQL Server

Seed length validation is not idempotency/dependency/sensitive-data proof; clean schema drift does not prove seed correctness. The chains meet before release but evidence is not interchangeable.

Workflow definition migration

Workflow Migrator moves definitions only. source selects the BitzOrcas five-table set or Saury T_WorkflowDefinition*; when omitted, the tool probes the source catalog. Saury also writes a sidecar report for IBusinessIntegrationCallback. Unknown nodes, untranslated conditions, and missing assignees are warnings only, so every flow needs dry-run review.

Kebab-case command-line switches overlay the bound Migrator section and win over JSON and MIGRATOR_ environment values. Connection strings should still live in gitignored appsettings.local.json.

BitzSaury migration MCP provides three stdio servers and twelve read-only tools. Environment variables connect them to BitzOrcasVNext, Saury/BitzOrcas legacy repositories, and the migration knowledge base. They establish contract and legacy-behavior evidence before migration; they do not transform code or write a database.

Database Maintenance

Database Maintenance calls SQL Server BACKUP/RESTORE directly and can SELECT * one table. Backup path must be visible to SQL Server and CLI; Restore uses WITH REPLACE with no dry run; Export has no tenant filter or field masking.

Rehearse in isolated restore environments. Passing RESTORE VERIFYONLY is not GA disaster-recovery evidence; real restore, application smoke, RTO/RPO, and chain reconciliation are required.

Common safety workflow

Bind commit/SDK

Confirm input and target identity

Preview / dry run / check

Owner + security/DBA approval

Execute in isolation

Business and technical validation

Archive command/exit/artifacts

Run target environment runbook

Every tool records source commit, SDK, cwd, configuration source, input snapshot, target identity, command, exit, duration, and omitted risk. A final “success” line is not auditable evidence.

Secrets and logs

  • Inject connections from a secret store into gitignored local settings or short-lived environment.
  • Never put password/license in PR, shell history, or echoed CI command.
  • Password/Pwd masking does not guarantee safe stack traces or driver logs.
  • Workflow JSON, Seed CSV, table exports, and backups may contain PII/secrets.
  • Temporary directories need least privilege, encryption, expiry, and failed-artifact quarantine.

Working-directory semantics

Executables use Directory.GetCurrentDirectory() for appsettings and relative paths. Running at repository root versus inside a project may load different local configuration/output. Fix cwd in runbooks or use absolute paths.

Terminal window
# Capture execution context before any controlled operation.
pwd
git rev-parse HEAD
dotnet --info | sed -n '1,36p'
# Inspect real Tooling packability and output types.
rg -n '<OutputType>|<IsPackable>|<TargetFramework>' \
src/Tooling --glob '*.csproj'

Exit codes are not one protocol

Schema, Workflow, and Database tools broadly use 0/1/2/3/99, but code 2 means different business results; Seed Exporter and Codegen have no identical catalog. Automation interprets tool plus mode, never global exit 2 = drift.

Notably, Database Log backup may skip under SIMPLE with code 0; Workflow code 0 may contain warnings; Schema check code 2 is expected drift evidence.

Completion gate

  • Tool commit matches target version.
  • Documentation does not overstate packability/installability.
  • Input snapshot, target database/tenant/path are explicit and double-checked.
  • Read-only/preview/dry-run evidence precedes writes.
  • Privileged backup/restore identity is separate from export read-only identity.
  • Partial success, cancellation, and rerun are in the runbook.
  • Generated artifacts pass PII/secret and ownership review.
  • Technical validation and business smoke both pass.
  • Missing capabilities and manual compensation are explicit.
  • Temporary output, local settings, and run logs stay out of Git.

See also


Chapter Navigation

100%

Scroll or use controls to zoom · drag when enlarged · double-click for 100% / 200%