Adding Capabilities
Using verikt add
Section titled “Using verikt add”The simplest way to add capabilities to an existing project:
verikt add redis- Validates the capability exists and checks for conflicts
- Auto-resolves transitive dependencies
- Renders new files (skipping any that already exist)
- Updates your
verikt.yaml - Regenerates AI agent context via
verikt guide
Adding Multiple Capabilities
Section titled “Adding Multiple Capabilities”verikt add kafka-consumer observability redisTransitive Dependencies
Section titled “Transitive Dependencies”Some capabilities require others. verikt resolves these automatically:
verikt add bff# Output:# Adding capabilities:# + http-api (auto-dependency)# + bffConflict Detection
Section titled “Conflict Detection”If a capability conflicts with one already installed, verikt will stop and tell you:
verikt add grpc# Error: capability "grpc" conflicts with "http-api"At Scaffold Time
Section titled “At Scaffold Time”You can also include capabilities when creating a new project:
verikt new my-service \ --language go \ --arch hexagonal \ --cap platform,bootstrap,http-api,mysql,redis,dockerOr use the interactive wizard to explore all capabilities with descriptions and smart suggestions:
verikt new my-service --language goUnderstanding Capability Structure
Section titled “Understanding Capability Structure”Each capability provides:
- Template files — Source files rendered into your project
- Partials — Code snippets that wire into
bootstrap.go - Config fields — Struct fields added to
config/config.go - Manifest — Metadata about requirements, suggestions, and conflicts
Example: What mysql Provides
Section titled “Example: What mysql Provides”capabilities/mysql/├── capability.yaml # name, requires, suggests, conflicts├── files/│ └── adapter/mysqlrepo/│ └── connection.go.tmpl # Connection pooling setup└── _partials/ ├── main_imports.go.tmpl # import "github.com/org/svc/adapter/mysqlrepo" ├── main_init.go.tmpl # db, err := mysqlrepo.NewConnection(...) └── main_shutdown.go.tmpl # app.OnShutdown("mysql", ...)Checking Compatibility
Section titled “Checking Compatibility”Before adding a capability, check its capability.yaml for:
requires— Other capabilities that must be present (auto-resolved byverikt add)suggests— Recommended companionsconflicts— Capabilities that can’t coexist
# Example: auth-jwt requires http-apiname: auth-jwtrequires: - http-apisuggests: []conflicts: []Manual Addition
Section titled “Manual Addition”If you prefer to add capabilities by hand:
-
Add the source files
Look at the capability’s
files/directory for what to create. For example, adding Redis means creatingadapter/redisrepo/connection.go. -
Update config
Add the capability’s config struct and fields to
config/config.go:type RedisConfig struct {Addr string `yaml:"addr"`Password string `yaml:"password"`DB int `yaml:"db"`} -
Wire into bootstrap
Add initialization and shutdown code to
internal/bootstrap/bootstrap.go. -
Update verikt.yaml
Add the capability to your project’s capability list:
capabilities:- platform- bootstrap- http-api- mysql- redis # Added -
Regenerate guide
Terminal window verikt guide --target claude