Skip to content

feat(flux): verify and document list value support in --set flag #102

@kriscoleman

Description

@kriscoleman

Problem

The --set flag is used to override flux values from the CLI:

ailloy cast github.com/nimble-giant/nimble-mold --set agent.targets="[claude,copilot]"

It's unclear whether this correctly produces a list value that works with the has template function:

{{- if has "claude" .agent.targets -}}

If SetNestedValue in pkg/mold/flux.go stores "[claude,copilot]" as a string rather than parsing it into a []interface{}{"claude", "copilot"}, the has function will fail.

Requested

  1. Verify that --set key="[a,b,c]" correctly produces a list value (not a string)
  2. If it doesn't work correctly, add parsing for bracketed list syntax in SetNestedValue
  3. Document the correct syntax for setting list values via --set in the CLI help and README

Use Case

Multi-agent molds like nimble-mold use agent.targets as a list and check membership with has. Users need to be able to override this from the CLI:

ailloy cast ./my-mold --set agent.targets="[claude,copilot,cursor]"

Acceptance Criteria

  • --set key="[a,b,c]" produces a list value usable with has, range, etc.
  • CLI help documents the syntax for setting list values
  • Existing string --set behavior is preserved (backward compatible)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions