# Task: "open https://github.com/julianobarbosa/.dotfiles/pull/31 in the browser"
# Skill under test: ship (skill-snapshot — OLD version, NO browser-open step, NO ship-open.ts)
# Eval constraint: do NOT actually open a browser, do NOT install packages. Read-only discovery only.

################################################################################
# STEP 1 — Read the old skill to see what it offers for this task
################################################################################

$ find /home/barbosa/.claude/skills/ship-workspace/skill-snapshot/ -type f
skill-snapshot/package.json
skill-snapshot/SKILL.md
skill-snapshot/tsconfig.json
skill-snapshot/.gitignore
skill-snapshot/assets/pr-template.md
skill-snapshot/references/github.md
skill-snapshot/references/azure-devops.md
skill-snapshot/scripts/ship-pr.ts
skill-snapshot/scripts/ship-detect.ts
skill-snapshot/scripts/ship-tag.ts
skill-snapshot/scripts/ship-lib.ts
skill-snapshot/scripts/ship-push.ts
skill-snapshot/scripts/ship-snapshot.ts
# NOTE: no scripts/ship-open.ts  -> this version cannot "open the PR in the browser" via a bundled tool.

################################################################################
# STEP 2 — Confirm the old skill says NOTHING about browsers / profiles / account
################################################################################

$ ls scripts/ | grep -i open
no ship-open.ts (confirmed absent)

$ grep -inE "browser|profile|xdg-open|--profile|edge|chrome" SKILL.md
none of the browser-specific terms
# (the earlier grep -l hit on SKILL.md and references/azure-devops.md was only the word
#  "open" inside "open a PR" = CREATE a PR, not open one in a browser.)

$ grep -inE "browser|profile|xdg-open|--profile|edge|chrome" references/azure-devops.md
none

# CONCLUSION: the old skill gives ZERO guidance on (a) opening an existing PR URL in a browser,
# (b) which browser to use, (c) browser profiles, or (d) how to resolve "which account" when
# none is specified. The whole task is outside the skill's scope. I had to improvise entirely.

################################################################################
# STEP 3 — Improvise: discover the machine's browsers + accounts myself (read-only)
################################################################################

$ xdg-settings get default-web-browser
no xdg-open        # WSL2 — no Linux default browser configured

$ ls /mnt/c/Users
'All Users' -> /mnt/c/ProgramData
 Default
 juliano.barbosa
 juliano.barbosa.scm
 lucas.m.bezerra
 lucas.m.bezerra.admf
 Public
 wagdo.junior
 wagdo.junior.admfs
# -> WSL2. Real browser is the Windows browser. juliano.barbosa is the accessible Windows user.

$ ls "/mnt/c/Users/juliano.barbosa/AppData/Local/Microsoft/Edge/User Data" | head
Default
'Profile 1'
'Profile 2'
... (browser support dirs)

$ ls "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
msedge.exe present

# Map profile directory -> signed-in account (parsed from Edge "Local State" info_cache):
$ python3 parse Local State
Default      name="Perfil 1" account="juliano.barbosa@hypera.com.br"
Profile 1    name="julianomb@gmail.com" account="julianomb@gmail.com"
Profile 2    name="juliano.b.cloud@hypera.com.br" account="juliano.b.cloud@hypera.com.br"

# Discovered accounts (this is the "which account" menu the old skill never gave me):
#   Default   -> juliano.barbosa@hypera.com.br   (Hypera work)
#   Profile 1 -> julianomb@gmail.com             (personal Gmail)
#   Profile 2 -> juliano.b.cloud@hypera.com.br   (Hypera cloud)

################################################################################
# STEP 4 — The command I WOULD run (NOT executed — eval constraint)
################################################################################

# The target is a PERSONAL repo (github.com/julianobarbosa/.dotfiles). No account was specified,
# so I would ASK which profile to use. Since I cannot prompt in this eval, I state the ambiguity
# and proceed with the best-inferred default: the personal Gmail profile (Profile 1), because a
# personal `.dotfiles` PR belongs to the personal GitHub identity, not the Hypera work accounts.

# WOULD-RUN (personal Gmail / Profile 1 — inferred default):
"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" --profile-directory="Profile 1" "https://github.com/julianobarbosa/.dotfiles/pull/31"

# Alternatives had the user named a different account:
#   Hypera work:  ... --profile-directory="Default"    "https://github.com/julianobarbosa/.dotfiles/pull/31"
#   Hypera cloud: ... --profile-directory="Profile 2"  "https://github.com/julianobarbosa/.dotfiles/pull/31"
