Skip to main content

Usage

# Validate an entire use case folder
codika-helper verify use-case <path> [options]

# Validate a single workflow file
codika-helper verify workflow <path> [options]
No authentication required. Validation runs entirely locally.

Options

OptionDescription
--jsonMachine-readable JSON output
--strictTreat should severity findings as must (fail on warnings)
--fixAuto-fix fixable violations in place
--dry-runShow what --fix would change without modifying files
--rules <ids>Run only these rules (comma-separated)
--exclude-rules <ids>Skip these rules (comma-separated)

Validation layers

The validator runs four layers of checks, from low-level to high-level:

Layer 1: Flowlint core rules

Static analysis rules that check graph connectivity and basic workflow structure.
RuleSeverityWhat it checks
R1mustNo disconnected nodes
R5-R11variesVarious connectivity rules
R13shouldError handling completeness
Rules R3 (idempotency guard) and R12 are excluded by default (replaced by custom Codika rules).

Layer 2: Custom Codika rules

Graph-based checks specific to Codika patterns.
RuleSeverityWhat it checks
CK-INITmustEvery parent workflow has a Codika Init node
CK-SUBMITmustSuccess paths end with Codika Submit Result
CK-ERRORmustError paths end with Codika Report Error
CK-SCHEDULE-CONVERGENCEmustSchedule/webhook triggers converge at Codika Init
CK-SUBWORKFLOW-PARAMSshouldSub-workflows have at least 1 input parameter

Layer 3: Workflow scripts

Content-based checks that inspect workflow JSON values.
RuleSeverityWhat it checksAuto-fixable
CK-PLACEHOLDERSmustPlaceholder syntax follows {{TYPE_KEY_SUFFIX}} patternNo
CK-CREDENTIALSmustCredentials use Codika placeholder patternsNo
WF-WEBHOOK-IDshouldWebhook IDs use correct placeholdersNo
WF-LLM-OUTPUTshouldLLM output node access patterns are correctNo
WF-LLM-MODELshouldLLM model IDs are validNo
WF-INSTPARM-QUOTINGshouldINSTPARM placeholders not double-quotedNo
WF-SANITIZATIONmustNo transient IDs (versionId, meta, active, etc.)Yes
WF-SETTINGSmustRequired settings present (executionOrder, errorWorkflow, timezone)Yes

Layer 4: Use-case scripts (use-case command only)

Folder-level checks that validate the use case as a whole.
RuleSeverityWhat it checks
UC-TRIGGERSmustAt least one trigger defined
UC-CONFIG-EXPORTSmustconfig.ts exports required members (WORKFLOW_FILES, getConfiguration)
UC-WORKFLOW-IMPORTSmustAll workflows referenced in config are present as files
UC-SUBWORKFLOW-REFSmustSub-workflow SUBWKFL references are valid
UC-TRIGGER-CONSISTENCYshouldTrigger types match workflow definitions
UC-WEBHOOK-PATHSshouldWebhook paths are unique per workflow
UC-CALLEDBYshouldcalledBy arrays are consistent with actual usage
UC-SCHEMA-TYPESshouldInput/output schema field types are valid
UC-INTEGRATIONSshouldIntegration UIDs are properly inherited

Output

Text mode (default)

✓ Use case validation passed
  must: 0  should: 0  nit: 0
Or with findings:
✗ Use case validation failed

workflows/main-workflow.json:
  ✗ [CK-INIT] must: Parent workflow must have Codika Init node
  ⚠ [WF-SETTINGS] must: Missing required setting: errorWorkflow (fixable)

config.ts:
  ⚠ [UC-SCHEMA-TYPES] should: Unknown field type "textarea" in input schema

  must: 1  should: 1  nit: 0

JSON mode (--json)

{
  "valid": false,
  "findings": [
    {
      "rule": "CK-INIT",
      "severity": "must",
      "message": "Parent workflow must have Codika Init node",
      "path": "workflows/main-workflow.json",
      "nodeId": null,
      "fixable": false
    }
  ],
  "summary": { "must": 1, "should": 0, "nit": 0 }
}
# 1. Run verification to see all issues
codika-helper verify use-case ./my-use-case

# 2. Auto-fix what you can
codika-helper verify use-case ./my-use-case --fix

# 3. Manually fix remaining "must" violations

# 4. Verify again to confirm clean
codika-helper verify use-case ./my-use-case

# 5. Deploy
codika-helper deploy use-case ./my-use-case

Examples

# Validate and auto-fix
codika-helper verify use-case ./email-automation --fix

# Strict mode (warnings become errors)
codika-helper verify use-case ./email-automation --strict

# Run only specific rules
codika-helper verify use-case ./email-automation --rules CK-INIT,CK-SUBMIT

# Exclude rules
codika-helper verify use-case ./email-automation --exclude-rules WF-LLM-MODEL

# Preview fixes without applying
codika-helper verify use-case ./email-automation --fix --dry-run

# Validate a single workflow
codika-helper verify workflow ./email-automation/workflows/main.json

# JSON output for CI pipelines
codika-helper verify use-case ./email-automation --json

Exit codes

CodeMeaning
0All validations passed
1Validation failures found