Documentation
¶
Overview ¶
Package specarch carries into the program what it says about itself: the definitions of its commands, read from its own specification, and the help topics. help, capabilities and guide answer from them, so an installed program describes exactly the commands it was built with.
Index ¶
Constants ¶
View Source
const Version = "1.2.0"
Version is the program version, set at release time. Every plug-in built from this repository reports it too.
Variables ¶
View Source
var Commands embed.FS
Commands holds the specification's command definitions, one fragment per file, as spec/design/commands/<command>.yaml.
View Source
var Help embed.FS
Help holds the help topics, as docs/help/<topic>.txt.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
specarch
command
Command specarch checks SpecArch specifications and makes documents and code from them.
|
Command specarch checks SpecArch specifications and makes documents and code from them. |
|
specarch-gen-bpmn
command
Command specarch-gen-bpmn is the plug-in behind specarch generate bpmn: it writes each workflow of a specification as a BPMN 2.0 XML file with its diagram, and the diagram as SVG.
|
Command specarch-gen-bpmn is the plug-in behind specarch generate bpmn: it writes each workflow of a specification as a BPMN 2.0 XML file with its diagram, and the diagram as SVG. |
|
specarch-gen-go-dxlib
command
Command specarch-gen-go-dxlib is the plug-in behind specarch generate go-dxlib: it writes the Go of a service on dxlib from a specification.
|
Command specarch-gen-go-dxlib is the plug-in behind specarch generate go-dxlib: it writes the Go of a service on dxlib from a specification. |
|
specarch-gen-openapi
command
Command specarch-gen-openapi is the plug-in behind specarch generate openapi: it writes the OpenAPI 3.1 document of a specification, in the standard dialect.
|
Command specarch-gen-openapi is the plug-in behind specarch generate openapi: it writes the OpenAPI 3.1 document of a specification, in the standard dialect. |
|
specarch-gen-scripts
command
Command specarch-gen-scripts is the plug-in behind specarch generate scripts: it writes the guarded operational scripts a specification derives, against the tables specarch-gen-sql writes.
|
Command specarch-gen-scripts is the plug-in behind specarch generate scripts: it writes the guarded operational scripts a specification derives, against the tables specarch-gen-sql writes. |
|
specarch-gen-sql
command
Command specarch-gen-sql is the plug-in behind specarch generate sql: it writes the SQL migrations of a specification in the dialect of the target, through the type-rendering idiom.
|
Command specarch-gen-sql is the plug-in behind specarch generate sql: it writes the SQL migrations of a specification in the dialect of the target, through the type-rendering idiom. |
|
specarch-gen-sqlc
command
Command specarch-gen-sqlc is the plug-in behind specarch generate sqlc: it writes the sqlc queries a specification derives, against the tables specarch-gen-sql writes.
|
Command specarch-gen-sqlc is the plug-in behind specarch generate sqlc: it writes the sqlc queries a specification derives, against the tables specarch-gen-sql writes. |
|
specarch-gen-tests-dart
command
Command specarch-gen-tests-dart is the plug-in behind specarch generate tests for an implementation file whose language is Dart.
|
Command specarch-gen-tests-dart is the plug-in behind specarch generate tests for an implementation file whose language is Dart. |
|
specarch-gen-tests-go
command
Command specarch-gen-tests-go is the plug-in behind specarch generate tests for an implementation file whose language is Go.
|
Command specarch-gen-tests-go is the plug-in behind specarch generate tests for an implementation file whose language is Go. |
|
specarch-gen-tests-swift
command
Command specarch-gen-tests-swift is the plug-in behind specarch generate tests for an implementation file whose language is Swift.
|
Command specarch-gen-tests-swift is the plug-in behind specarch generate tests for an implementation file whose language is Swift. |
|
specarch-gen-ui
command
Command specarch-gen-ui is the plug-in behind specarch generate ui: it writes the screens of a specification for the web in plain JavaScript.
|
Command specarch-gen-ui is the plug-in behind specarch generate ui: it writes the screens of a specification for the web in plain JavaScript. |
|
specarch-gen-ui-swiftui
command
Command specarch-gen-ui-swiftui is the plug-in behind specarch generate ui for a ui target of platform iphone in an implementation file in Swift: it writes the screens of a specification in SwiftUI, into a Swift package.
|
Command specarch-gen-ui-swiftui is the plug-in behind specarch generate ui for a ui target of platform iphone in an implementation file in Swift: it writes the screens of a specification in SwiftUI, into a Swift package. |
|
specarch-gen-ui-typescript
command
Command specarch-gen-ui-typescript is the plug-in behind specarch generate ui for an implementation file in TypeScript: it writes the screens of a specification for Next.js's app router and IBM's Carbon design system.
|
Command specarch-gen-ui-typescript is the plug-in behind specarch generate ui for an implementation file in TypeScript: it writes the screens of a specification for Next.js's app router and IBM's Carbon design system. |
|
Package idioms embeds the idioms SpecArch ships, so a project that installs one release has one idiom set.
|
Package idioms embeds the idioms SpecArch ships, so a project that installs one release has one idiom set. |
|
internal
|
|
|
approval
Package approval reads and writes the record that says the owner read the documents of a specification and approves it for code generation.
|
Package approval reads and writes the record that says the owner read the documents of a specification and approves it for code generation. |
|
canonical
Package canonical writes a JSON value in the canonical form of RFC 8785, the JSON Canonicalization Scheme: the members of every object sorted by their names as UTF-16 code units, no whitespace, every string in one spelling and every number as ECMAScript prints a double.
|
Package canonical writes a JSON value in the canonical form of RFC 8785, the JSON Canonicalization Scheme: the members of every object sorted by their names as UTF-16 code units, no whitespace, every string in one spelling and every number as ECMAScript prints a double. |
|
capability
Package capability is what the specarch program says about itself: its commands as its specification defines them, the plug-ins it finds, the formats it reads and writes, and the order of work.
|
Package capability is what the specarch program says about itself: its commands as its specification defines them, the plug-ins it finds, the formats it reads and writes, and the order of work. |
|
diff
Package diff compares two versions of a specification element by element and classifies each difference by the version step it needs, as docs/maintenance.md (The diff verb) describes.
|
Package diff compares two versions of a specification element by element and classifies each difference by the version step it needs, as docs/maintenance.md (The diff verb) describes. |
|
disk
Package disk is where the commands write their files.
|
Package disk is where the commands write their files. |
|
expr
Package expr is SpecArch's expression subset of CEL: it parses with the CEL parser, refuses whatever is outside the subset, checks types and evaluates with exact numbers.
|
Package expr is SpecArch's expression subset of CEL: it parses with the CEL parser, refuses whatever is outside the subset, checks types and evaluates with exact numbers. |
|
extract
Package extract holds the readers of specarch extract.
|
Package extract holds the readers of specarch extract. |
|
genbpmn
Package genbpmn writes the workflows of a specification as BPMN 2.0: the logic of the specarch-gen-bpmn plug-in.
|
Package genbpmn writes the workflows of a specification as BPMN 2.0: the logic of the specarch-gen-bpmn plug-in. |
|
gendxlib
Package gendxlib writes the Go of a service on dxlib from a specification: the logic of the specarch-gen-go-dxlib plug-in.
|
Package gendxlib writes the Go of a service on dxlib from a specification: the logic of the specarch-gen-go-dxlib plug-in. |
|
generate
Package generate writes documents from SpecArch files.
|
Package generate writes documents from SpecArch files. |
|
genopenapi
Package genopenapi writes the OpenAPI 3.1 document of a specification: the logic of the specarch-gen-openapi plug-in, in the standard dialect.
|
Package genopenapi writes the OpenAPI 3.1 document of a specification: the logic of the specarch-gen-openapi plug-in, in the standard dialect. |
|
genscreens
Package genscreens reads the screens of a specification for the UI generators that write a page as data: the task, list and form pages and the views, each as the members of a schema keyed by the names of the ui-components idiom for the generator's framework, with the routes its events lead to, the hooks it takes and whether it needs a permission; the session the target's settings name, the menu, the translations the settings name, the theme's colours by the design-tokens idiom, and the problems each reports.
|
Package genscreens reads the screens of a specification for the UI generators that write a page as data: the task, list and form pages and the views, each as the members of a schema keyed by the names of the ui-components idiom for the generator's framework, with the routes its events lead to, the hooks it takes and whether it needs a permission; the session the target's settings name, the menu, the translations the settings name, the theme's colours by the design-tokens idiom, and the problems each reports. |
|
genscripts
Package genscripts writes the guarded operational scripts a specification derives: one script per operation or command that carries a guard and whose change the design says, by a transition it triggers, a PUT of the entity by its key, a DELETE by its key or the guard's writes (ADR-168).
|
Package genscripts writes the guarded operational scripts a specification derives: one script per operation or command that carries a guard and whose change the design says, by a transition it triggers, a PUT of the entity by its key, a DELETE by its key or the guard's writes (ADR-168). |
|
gensql
Package gensql writes the SQL migrations of a specification: the logic of the specarch-gen-sql plug-in.
|
Package gensql writes the SQL migrations of a specification: the logic of the specarch-gen-sql plug-in. |
|
gensqlc
Package gensqlc writes the sqlc queries a specification derives: one per operation that writes an entity's record or reads one by its key, and one per list with its filters, search, sorts and page, with a second query for the list's total.
|
Package gensqlc writes the sqlc queries a specification derives: one per operation that writes an entity's record or reads one by its key, and one per list with its filters, search, sorts and page, with a second query for the list's total. |
|
genswiftui
Package genswiftui writes the screens of a specification for the iPhone in SwiftUI: the logic of the specarch-gen-ui-swiftui plug-in.
|
Package genswiftui writes the screens of a specification for the iPhone in SwiftUI: the logic of the specarch-gen-ui-swiftui plug-in. |
|
gentests
Package gentests writes the tests of a specification's design tests and worked examples, in Go, Swift or Dart: the logic of the specarch-gen-tests-go, -swift and -dart plug-ins.
|
Package gentests writes the tests of a specification's design tests and worked examples, in Go, Swift or Dart: the logic of the specarch-gen-tests-go, -swift and -dart plug-ins. |
|
genui
Package genui writes the screens of a specification for the web in plain JavaScript: the logic of the specarch-gen-ui plug-in.
|
Package genui writes the screens of a specification for the web in plain JavaScript: the logic of the specarch-gen-ui plug-in. |
|
genuits
Package genuits writes the screens of a specification for the web in TypeScript, on Next.js's app router and IBM's Carbon design system: the logic of the specarch-gen-ui-typescript plug-in.
|
Package genuits writes the screens of a specification for the web in TypeScript, on Next.js's app router and IBM's Carbon design system: the logic of the specarch-gen-ui-typescript plug-in. |
|
implies
Package implies expands a set of permissions through the implications the design declares on them (permissions.<name>.implies, ADR-100): a holder of a permission holds every one it implies, transitively.
|
Package implies expands a set of permissions through the implications the design declares on them (permissions.<name>.implies, ADR-100): a holder of a permission holds every one it implies, transitively. |
|
literal
Package literal reads a TypeScript file that holds one object literal of data, in the subset of TypeScript that is also JSON5, and compares two such files by value (ADR-093).
|
Package literal reads a TypeScript file that holds one object literal of data, in the subset of TypeScript that is also JSON5, and compares two such files by value (ADR-093). |
|
mark
Package mark places a specification's problems at the entries a generated file shows (docs/diagnostics.md, section 5): the rule every generator plug-in marks its output by, so each target puts a problem at the same entry and writes only its own comment form.
|
Package mark places a specification's problems at the entries a generated file shows (docs/diagnostics.md, section 5): the rule every generator plug-in marks its output by, so each target puts a problem at the same entry and writes only its own comment form. |
|
metamodel
Package metamodel reads the version line of a SpecArch file: which rules the file is written against, and so which schema checks it (docs/meta-model-1.0.0.md).
|
Package metamodel reads the version line of a SpecArch file: which rules the file is written against, and so which schema checks it (docs/meta-model-1.0.0.md). |
|
ownership
Package ownership reads the ownedBy marks of an implementation file's mappings, which every generator follows: an element another stakeholder owns, and everything under its pointer, is described and compared but never generated (ADR-046).
|
Package ownership reads the ownedBy marks of an implementation file's mappings, which every generator follows: an element another stakeholder owns, and everything under its pointer, is described and compared but never generated (ADR-046). |
|
problems
Package problems gathers every problem of a specification, the errors and warnings validate finds and the open questions, into one list, and writes it as the problems file and as a SARIF 2.1.0 log (ADR-065).
|
Package problems gathers every problem of a specification, the errors and warnings validate finds and the open questions, into one list, and writes it as the problems file and as a SARIF 2.1.0 log (ADR-065). |
|
refine
Package refine answers an open question: it writes the decision record that closes it and takes the question's entry out of its file as text, so that the author's other lines stay as they were (ADR-155).
|
Package refine answers an open question: it writes the decision record that closes it and takes the question's entry out of its file as text, so that the author's other lines stay as they were (ADR-155). |
|
semver
Package semver reads and orders Semantic Versioning 2.0.0 versions and says how far one steps from another.
|
Package semver reads and orders Semantic Versioning 2.0.0 versions and says how far one steps from another. |
|
source
Package source reads a SpecArch YAML file into a node tree that keeps the line of every value, and into the plain value the JSON Schema check needs.
|
Package source reads a SpecArch YAML file into a node tree that keeps the line of every value, and into the plain value the JSON Schema check needs. |
|
spec
Package spec reads a SpecArch specification from disk: the root file specarch.yaml and the stage folders beside it, merged into one document the validator and the generators work on.
|
Package spec reads a SpecArch specification from disk: the root file specarch.yaml and the stage folders beside it, merged into one document the validator and the generators work on. |
|
typerows
Package typerows matches a field of the design to a row of a type rendering (docs/idioms.md, "Stacks and type rows").
|
Package typerows matches a field of the design to a row of a type rendering (docs/idioms.md, "Stacks and type rows"). |
|
upgrade
Package upgrade finds what moving one file to the newest version of its format changes (docs/meta-model-1.0.0.md, specarch upgrade): its version line, its editor hint and the keys 1.0.0 renamed.
|
Package upgrade finds what moving one file to the newest version of its format changes (docs/meta-model-1.0.0.md, specarch upgrade): its version line, its editor hint and the keys 1.0.0 renamed. |
|
validate
Package validate checks SpecArch specifications and implementation files: the JSON Schema of their kind first, then the rules a schema cannot express.
|
Package validate checks SpecArch specifications and implementation files: the JSON Schema of their kind first, then the rules a schema cannot express. |
|
vocabulary
Package vocabulary reads a vocabulary: the words of one language that extract documents finds a commitment and reads a table of fields by, and that merge reads a number of days by (docs/vocabularies.md, ADR-105).
|
Package vocabulary reads a vocabulary: the words of one language that extract documents finds a commitment and reads a table of fields by, and that merge reads a number of days by (docs/vocabularies.md, ADR-105). |
|
wirename
Package wirename writes a property's name as it goes on the wire, by the rule info.wireNames names (ADR-062), and a role's, by the rule info.roleNames names (ADR-099).
|
Package wirename writes a property's name as it goes on the wire, by the rule info.wireNames names (ADR-062), and a role's, by the rule info.roleNames names (ADR-099). |
|
xref
Package xref reads, for a generator, the elements a specification names in another specification of its estate through a dependency, as <dependency>#/<pointer> (ADR-112).
|
Package xref reads, for a generator, the elements a specification names in another specification of its estate through a dependency, as <dependency>#/<pointer> (ADR-112). |
|
Package readers holds the readers of code-facts dumps that run on a language's own toolchain, Swift and Dart, as source with the lock files that pin every dependency.
|
Package readers holds the readers of code-facts dumps that run on a language's own toolchain, Swift and Dart, as source with the lock files that pin every dependency. |
|
Package schema embeds the meta-model's JSON Schemas, the same files editors load, so the validator and the editors share one definition.
|
Package schema embeds the meta-model's JSON Schemas, the same files editors load, so the validator and the editors share one definition. |
|
spec
|
|
|
third_party
|
|
|
typescript-go/bundled
Package bundled provides access to files bundled with TypeScript.
|
Package bundled provides access to files bundled with TypeScript. |
|
typescript-go/compiler
Package compiler implements the TypeScript compiler.
|
Package compiler implements the TypeScript compiler. |
|
typescript-go/diagnostics
Package diagnostics contains generated localizable diagnostic messages.
|
Package diagnostics contains generated localizable diagnostic messages. |
|
typescript-go/jsnum
Package jsnum provides JS-like number handling.
|
Package jsnum provides JS-like number handling. |
|
typescript-go/nodebuilder
Exports interfaces and types defining the node builder - concrete implementations are on top of the checker, but these types and interfaces are used by the emit resolver in the printer
|
Exports interfaces and types defining the node builder - concrete implementations are on top of the checker, but these types and interfaces are used by the emit resolver in the printer |
|
typescript-go/printer
Package printer exports a Printer for pretty-printing TS ASTs and writer interfaces and implementations for using them Intended ultimate usage:
|
Package printer exports a Printer for pretty-printing TS ASTs and writer interfaces and implementations for using them Intended ultimate usage: |
|
typescript-go/pseudochecker
pseudochecker is a limited "checker" that returns pseudo-"types" of expressions - mostly those which trivially have type nodes
|
pseudochecker is a limited "checker" that returns pseudo-"types" of expressions - mostly those which trivially have type nodes |
|
typescript-go/stringutil
Package stringutil Exports common rune utilities for parsing and emitting javascript
|
Package stringutil Exports common rune utilities for parsing and emitting javascript |
|
tools
|
|
|
fragment-schemas
command
Command fragment-schemas writes the schema of each kind of fragment file from the design schema, and points every fragment of the repository's own specifications at its schema.
|
Command fragment-schemas writes the schema of each kind of fragment file from the design schema, and points every fragment of the repository's own specifications at its schema. |
|
Package vocabularies embeds the vocabularies SpecArch ships: the words of one language that extract documents and merge read a document by.
|
Package vocabularies embeds the vocabularies SpecArch ships: the words of one language that extract documents and merge read a document by. |
Click to show internal directories.
Click to hide internal directories.