fix(init): ask the instance name in the provider form so it is never skipped#60
Merged
Merged
Conversation
…skipped Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🛡️ Argus security reviewNo security findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The operator-chosen instance name (
persona.nameinargus.yaml— the name colleagues address the agent by as@<name>in addition to@argus) was effectively never captured duringargus init.Cause
The name was only asked in Phase B (the LLM-driven SOUL interview), as an optional "topic 7" placed last and marked "keep it light", persisted via a dedicated
set_persona_nametool. The interviewer LLM finalizes (callswrite_soul) before reaching topic 7, and the TUI exits the instantSOUL.mdis written (the mtime check indispatch). Net effect: the name question was almost never posed.Fix
Move the instance-name question from Phase B (non-deterministic LLM interview) to Phase A (the deterministic
huhprovider form). This is also more coherent:persona.namelives inargus.yaml, which is exactly the artifact Phase A writes.huh.NewInput()step to the provider form. Empty = skip (keeps the@argusbrand default). Non-empty is trimmed, has a leading@stripped, and must be a single word.@rule (previously insetPersonaName.Execute) is extracted into a sharednormalizePersonaNamehelper, used by both the form validator and the post-form normalization, and covered by a unit test.cfg.Persona.Namewhen re-runninginit, matching the other form steps.cfg.Persona.Namebefore Phase A'sSaveConfig.set_persona_nametool (setPersonaNametype + registration) and updatedinterviewerPersona(): dropped topic 7, the WHEN DONEset_persona_namebullet, and theset_persona_nameguardrail reference.Testing
go build ./...andgo test ./...both pass. ThesetPersonaNameunit tests were replaced with a table-driven test fornormalizePersonaName(strip@, trim, empty-is-valid, multi-word rejected). Thehuhform itself needs a TTY and is not driven headless.🤖 Generated with Claude Code