Do not make any changes. The context contains the organization name. Is there way that…
- User
Do not make any changes. The context contains the organization name. Is there way that do not break any design rules that could make the int create command derive the organization parameter from that? That should also apply to the dashboard
Assistant
- User
I guess this is more of a template design question but would be benificial to the cli if there was some way to define global parameters, parameters that each template inherit so that you cant declare a parameter without it? You could then also if you fork the template repo hardcode for example organization at the template level so that the developers never need to care about it
Assistant
Good question — let me ground this in how the library and manifest format actually work before answering.
Assistant
Let me check one more thing — how
spec.valuesflows into rendering today, since that's adjacent to what you're describing.Assistant
- User
It sounds like it might not be worth the effort?
Assistant
Honestly? Probably not — at least not yet. Let me make the case against my own design.
The problem it solves is currently small. The library has a handful of templates. If the shared parameter set is really just
organization, the global manifest machinery — a new manifest kind, merge semantics, collision validation,Libraryplumbing, plus every future template author having to understand the merge rules — is a lot of infrastructure to deduplicate roughly five lines of YAML per template.The cheap paths cover most of the need:
- User
Ok so back to can we derive the organization parameter when scaffolding? Is there an easy clean implementation of this or are we just introducing a ton of complexity to save the developer a few keystrokes? We could also treat it the same way as we treat topic name. If you have specified it for the current system it is reused, i.e. first component you scaffold you need to enter it but the second it is derived
Most developer will work with a single organisation though, and atleast all developers will work with one organisation at a time so switching context makes sense also
Assistant
No — this one is genuinely cheap, and your topic analogy is the key insight. Let me show why both sources fit the existing machinery almost verbatim.
The topic-precedent route is nearly free.
BuildWorkspaceFactsalready indexes confirmed values from sibling scaffold records; already turns one candidate into a prefill (auto-resolved, noted on stderr) and several into a pick list. The whole change is:- User
yes implement it on the current branch. Do not push. One note though. A component can only belong to a single organization so I am not sure we need []string?
Assistant
Agreed on the singular — a component belongs to one org, so a
[]stringinvites exactly the pick-list ambiguity you ruled out. Let me look at the wiring before writing.Assistant
On branch
release/v1, clean tree. Let me check how the config flag plumbing works in the command layer, then implement.Assistant
Implementation is clear. Three small edits: the fact index (any block kind contributes organization; disagreement demotes), one registry case, and the config fallback seeded by the two callers.
Assistant
Now the suggestion registry:
Assistant
Now seed the config-derived fallback in
int create:Assistant
Tab indentation — let me match exactly:
Assistant
Now the dashboard. The
Optionsstruct gets anOrganizationfield, plumbed to the API server:Assistant
Now check the prompt note text so tests match reality, then build:
Assistant
Builds clean. Now tests — facts, suggest, and the two callers:
Assistant
All green. Now end-to-end tests for the config fallback in both surfaces. Checking test helpers:
Assistant
Done. Implemented on
release/v1, not pushed. Full suite, vet, and gofmt all clean.What landed
Fact index (
internal/template/facts.go) —WorkspaceFactsgains a singular, unexportedorganization, exactly per your note. Any block-kind record contributes itsorganizationvalue; records that disagree demote the fact entirely — the same rule contracts already use, so a mixed workspace suggests nothing rather than offering a pick list of values that can't all be right. Two accessors: and , the latter being fill-if-empty so the workspace always beats ambient config.