Skip to content

Configuration Reference

Fields in usmconfig.json — the configuration file that drives usm init and usm scan.

Top-Level Fields

FieldTypeDescription
$schema (required)stringSchema reference URI
version (required)stringConfig schema version
name (required)stringProject name (used in generated $id namespaces)
sources$ref → #/$defs/sourcesWhere to scan for code and manifests
sharedarrayPackages that aren't services (shared libraries, utilities, etc.)
servicesarrayExplicit service detection rules
apisarrayAPI detection rules
dataarrayData model detection rules
features$ref → #/$defs/featureConfigFeature detection configuration
outputs$ref → #/$defs/outputsWhere to write generated artifacts
generation$ref → #/$defs/generationGeneration behavior settings
llm$ref → #/$defs/llmConfigLLM configuration for future semantic scan (optional)
enrichment$ref → #/$defs/enrichmentConfigLLM-based semantic enrichment configuration (optional)

sources

FieldTypeDescription
rootstringRepository root directory (relative to config file location)
include$refGlob patterns for directories to include in scanning
exclude$refGlob patterns for directories to exclude from scanning
package_manifests$refGlob patterns for package manifest files
code_globs$refGlob patterns for source code files

sharedPackage

FieldTypeDescription
id (required)stringUnique identifier for this shared package
match (required)stringGlob pattern to match this package's directory
kind (required)stringClassification of the shared package
summarystringHuman-readable summary of this package's purpose

serviceRule

FieldTypeDescription
match (required)stringGlob pattern to match service directories
kind (required)stringService type classification
port_fromstringHint for port extraction (e.g. 'package.json:scripts.start', '.env:PORT')
framework_detectarrayGlob patterns for files that indicate this framework
summarystringHuman-readable summary of what this service does

extractConfig

FieldTypeDescription
routesbooleanExtract route definitions
request_typesbooleanExtract request type schemas
response_typesbooleanExtract response type schemas
auth_requiredbooleanExtract auth requirements per endpoint

apiRule

FieldTypeDescription
match (required)stringGlob pattern to match API directories or files
kind (required)stringAPI type classification
extract$refWhat to extract from the API definitions

dataExtractConfig

FieldTypeDescription
modelsbooleanExtract model/entity names
relationsbooleanExtract model relations
enumsbooleanExtract enum definitions

dataRule

FieldTypeDescription
match (required)stringGlob pattern to match schema files
kind (required)stringORM/database type
extract$refWhat to extract from the schema

featureConfig

FieldTypeDescription
detect_fromarrayGlob patterns for files that contain feature definitions
group_bystringHow to group detected features
exclude_patternsarrayGlob patterns for files/directories to exclude from feature detection

outputs

FieldTypeDescription
workspacestringRoot directory for all generated output
docsstringDirectory for generated developer docs (markdown)
help_docsstringDirectory for generated help docs (filtered, public-facing)
archimatestringDirectory for generated ArchiMate XML
togafstringDirectory for generated TOGAF deliverables
openapistringDirectory for generated OpenAPI spec and types
testsstringDirectory for generated test specs
usm_sourcestringDirectory for .usm source files
agents_mdstringPath for generated AGENTS.md file

generation

FieldTypeDescription
merge_with_existingstringHow to handle existing files: smart (preserve decisions), overwrite, skip, or fail
preserve_commentsbooleanPreserve YAML comments in existing files when merging
formatstringMarkdown format for generated documentation

llmConfig

FieldTypeDescription
providerstringLLM provider for semantic scanning
modelstringModel identifier (e.g. 'claude-sonnet-4-20250514')
api_key_envstringEnvironment variable name holding the API key

enrichmentConfig

FieldTypeDescription
enabledbooleanWhether enrichment is enabled
providerstringLLM provider for semantic enrichment
urlstringBase URL for the LLM API endpoint
apiKeystringAPI key for the LLM provider (optional for local providers like Ollama)
modelstringModel identifier for the LLM
temperaturenumberTemperature for LLM generation
max_tokens_per_fileintegerMaximum tokens per file enrichment call
fieldsarrayWhich fields to enrich (only fields with TODO: describe will be filled)
preserve_human_editsbooleanWhether to preserve hand-written content during merge
max_source_file_charsintegerMaximum characters to read from each source file (keeps context manageable)