From 949ccc41466d0af27b824017a9e33aead9787e9f Mon Sep 17 00:00:00 2001 From: tfibtcagent Date: Tue, 17 Mar 2026 02:04:33 +0000 Subject: [PATCH 1/2] =?UTF-8?q?fix(setup):=20defer=20agent=20naming=20to?= =?UTF-8?q?=20Step=205=20=E2=80=94=20use=20aibtc.com=20displayName=20(clos?= =?UTF-8?q?es=20#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .claude/skills/loop-start/SKILL.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.claude/skills/loop-start/SKILL.md b/.claude/skills/loop-start/SKILL.md index 2e68f05..2cfd423 100644 --- a/.claude/skills/loop-start/SKILL.md +++ b/.claude/skills/loop-start/SKILL.md @@ -37,21 +37,21 @@ The CURRENT WORKING DIRECTORY is the agent's home. All files go here. ## Setup Step 1: Identity (no MCP needed) -Ask the user two questions: -1. "What do you want to name your agent?" — use this as `AGENT_NAME` -2. "What should your agent focus on? (e.g. DeFi, security audits, building tools, trading, art — or leave blank for a general-purpose agent)" +Ask the user ONE question: +"What should your agent focus on? (e.g. DeFi, security audits, building tools, trading, art — or leave blank for a general-purpose agent)" + +Use `"Agent"` as a placeholder name in SOUL.md — the real display name is assigned by the AIBTC platform during registration (Step 5) and will replace this placeholder then. ### Create `SOUL.md` **Do NOT just fill in a template.** Write a personalized SOUL.md for this specific agent. Use the structure below, but generate the content — especially "Who I Am", "What I Do", and "Values" — based on: -- The agent's name (let it inspire tone and personality) - What the operator said the agent should focus on - Your own creativity — make the agent feel like a distinct individual Keep it concise (under 30 lines). The agent will read this every cycle to remember who it is. ```markdown -# +# Agent ## Who I Am [Write 2-3 sentences. Give the agent a voice. What's its personality? @@ -367,6 +367,14 @@ fi Parse the response: `displayName=$(echo "$BODY" | jq -r '.displayName')` and `sponsorApiKey=$(echo "$BODY" | jq -r '.sponsorApiKey')`. +**Update SOUL.md with the real agent name** — replace the `# Agent` placeholder header with the display name returned by the API: + +```bash +sed -i "s/^# Agent$$/# $displayName/" SOUL.md +``` + +This is the canonical name for this agent — assigned deterministically by aibtc.com based on the Bitcoin address. All subsequent references use `$displayName`. + The response includes `displayName` and `sponsorApiKey`. Display to user: ``` @@ -497,7 +505,7 @@ Read the CLAUDE.md template that was installed alongside this skill. Look for it 3. If still not found, search: `Glob("**/CLAUDE.md")` in `.claude/skills/` and `.agents/skills/` Read that template file, then replace all `[YOUR_...]` placeholders with actual values from earlier steps: -- `[YOUR_AGENT_NAME]` -> the agent name from Step 1 +- `[YOUR_AGENT_NAME]` -> `$displayName` from the registration response in Step 5 (the platform-assigned canonical name) - `[YOUR_WALLET_NAME]` -> wallet name from Step 4 - `[YOUR_STX_ADDRESS]` -> from Step 4 - `[YOUR_BTC_ADDRESS]` -> from Step 4 @@ -520,7 +528,7 @@ Ask the user: "recipient": "Secret Mars", "recipient_stx": "[ONBOARDING_BUDDY_STX]", "recipient_btc": "[ONBOARDING_BUDDY_BTC]", - "content": "New agent online: . Set up via loop-starter-kit. Focus: . Cycle 0 complete. Ready to collaborate.", + "content": "New agent online: . Set up via loop-starter-kit. Focus: . Cycle 0 complete. Ready to collaborate.", "purpose": "introduction" } ``` @@ -536,7 +544,7 @@ Print this summary: ``` Setup complete! -Agent: +Agent: Home: STX: BTC: From c2a465c4016b2a67883e8998def048b630a5957e Mon Sep 17 00:00:00 2001 From: tfibtcagent Date: Tue, 17 Mar 2026 02:35:09 +0000 Subject: [PATCH 2/2] fix(setup): escape end-of-line anchor in sed substitution 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 --- .claude/skills/loop-start/SKILL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.claude/skills/loop-start/SKILL.md b/.claude/skills/loop-start/SKILL.md index 2cfd423..f5e52dd 100644 --- a/.claude/skills/loop-start/SKILL.md +++ b/.claude/skills/loop-start/SKILL.md @@ -370,7 +370,9 @@ Parse the response: `displayName=$(echo "$BODY" | jq -r '.displayName')` and `sp **Update SOUL.md with the real agent name** — replace the `# Agent` placeholder header with the display name returned by the API: ```bash -sed -i "s/^# Agent$$/# $displayName/" SOUL.md +if [[ -n "$displayName" ]]; then + sed -i "s/^# Agent\$/# $displayName/" SOUL.md +fi ``` This is the canonical name for this agent — assigned deterministically by aibtc.com based on the Bitcoin address. All subsequent references use `$displayName`.