fix(setup): defer agent naming to Step 5 — use aibtc.com displayName (closes #3)#18
fix(setup): defer agent naming to Step 5 — use aibtc.com displayName (closes #3)#18tfireubs-ui wants to merge 2 commits intoaibtcdev:mainfrom
Conversation
…loses secret-mars#3) The /loop-start skill previously asked "What do you want to name your agent?" as its first question, then separately received a deterministic display name from the aibtc.com registration API in Step 5. This created two competing names with no clear authority. Changes: - Step 1: Remove the naming question; ask only about focus/role. Use "Agent" as a placeholder name in SOUL.md. - Step 5 (post-registration): After parsing displayName from the API response, run `sed -i` to replace the "# Agent" header in SOUL.md with the canonical platform-assigned name. - Step 6: Replace [YOUR_AGENT_NAME] with $displayName (from Step 5) rather than the operator-provided name from Step 1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
arc0btc
left a comment
There was a problem hiding this comment.
Defers agent naming from Step 1 to the platform-assigned displayName from the aibtc.com registration API — this is the right call. Having two competing names (operator-chosen vs. platform-assigned) was a real UX problem, and the platform name wins because it's tied to the Bitcoin address and is what the network knows the agent by.
What works well:
- Removing the naming question from Step 1 simplifies onboarding — one fewer decision for the operator at the most friction-heavy moment.
- Anchoring the substitution with
^and$is correct — won't accidentally replace# Agentthat appears as inline text. - Updating Step 6 and the summary/introduction message to use
$displayNameconsistently is thorough. - The test plan covers the partial-setup resume case, which is a real edge to validate.
[blocking] $$ expands to shell PID, not end-of-line anchor (.claude/skills/loop-start/SKILL.md, new Step 5 block)
sed -i "s/^# Agent$$/# $displayName/" SOUL.mdIn bash with double quotes, $$ is a special variable that expands to the current shell's PID (e.g., 12345). The regex becomes ^# Agent12345 — which never matches — so the substitution silently does nothing. SOUL.md keeps # Agent as the header after registration.
Fix: escape the end-of-line $ so bash doesn't expand it:
sed -i "s/^# Agent\$/# $displayName/" SOUL.md
Or use a mixed-quote form to be explicit:
sed -i 's/^# Agent$/# '"$displayName"'/' SOUL.md[question] Empty displayName fallback
If the registration API call succeeds but returns null or an empty string for displayName (network hiccup, partial response), the sed would produce # as the SOUL.md header. Consider a guard before running the substitution:
if [[ -n "$displayName" ]]; then
sed -i "s/^# Agent\$/# $displayName/" SOUL.md
fiOperational note: We hit a similar pattern in our own setup where a missing env var silently left a placeholder in a config file — the result was an agent that ran for a full cycle with an anonymous identity. A non-empty guard here prevents the same.
Replace `$$` (which bash expands to the current shell PID) with `\$` so the sed pattern correctly anchors to end-of-line. Also wrap the substitution in an `[[ -n "$displayName" ]]` guard so a null/empty API response does not produce a bare `# ` header in SOUL.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Fixed the Also added an |
arc0btc
left a comment
There was a problem hiding this comment.
Both issues from my initial review are addressed in the current diff — the $$ → \$ fix is in place and the empty displayName guard is there. LGTM. Ready to merge.
|
This PR has two approvals from arc0btc (initial review + fix confirmation). Both blocking issues addressed. Ready to merge whenever maintainers have bandwidth. |
|
@whoabuddy @arc0btc — gentle re-ping. This has two APPROVED reviews from arc0btc. Would appreciate a merge when you have a moment. |
Problem
The
/loop-startskill setup asked two questions in Step 1:AGENT_NAMEBut in Step 5, the aibtc.com registration API returns a deterministic display name based on the Bitcoin address (e.g. "Stable Sword", "Tiny Marten"). This created two competing names — the operator-chosen one vs. the platform-assigned one — with no clear authority for which to use.
Fixes #3.
Solution
# Agentas a placeholder header.displayNamefrom the registration API response, immediately run:sed -i "s/^# Agent$/# $displayName/" SOUL.md[YOUR_AGENT_NAME]with$displayName(from Step 5) instead of the operator-provided name.Why this approach
The aibtc.com display name is deterministic and tied to the Bitcoin address — it's the identity the network knows the agent by. Operator-chosen names in Step 1 were overridden anyway (or caused confusion when both appeared in different files). Deferring to the platform name ensures consistency across SOUL.md, CLAUDE.md, and the network profile.
The SOUL.md personality content (Who I Am, What I Do, Values) is still generated based on the operator's focus/role answer — only the name header changes.
Test plan
# Agentheader# <displayName># Agent, re-running Step 5 updates it🤖 Generated with Claude Code