Skip to content

refactor: org repos live at user-home root, not under ~/oss#38

Open
abdout wants to merge 2 commits into
docs/onboarding-rewritefrom
refactor/repos-at-home-root
Open

refactor: org repos live at user-home root, not under ~/oss#38
abdout wants to merge 2 commits into
docs/onboarding-rewritefrom
refactor/repos-at-home-root

Conversation

@abdout
Copy link
Copy Markdown
Contributor

@abdout abdout commented May 18, 2026

Summary

Move all 9 OSS repos out of ~/oss/<name> into ~/<name>. After this, every databayt org repo lives at user-home root regardless of OS — matching the existing convention for codebase and kun (both already at ~/).

Before:                       After:
~/codebase                    ~/codebase
~/kun                         ~/kun
~/oss/shadcn          ───►   ~/shadcn
~/oss/radix                   ~/radix
~/oss/hogwarts                ~/hogwarts
~/oss/souq                    ~/souq
~/oss/mkan                    ~/mkan
~/oss/shifa                   ~/shifa
~/oss/swift-app               ~/swift-app
~/oss/distributed-computer    ~/distributed-computer
~/oss/marketing               ~/marketing

Why

Implements the user-stated baseline expectation: every teammate's databayt repos at one consistent location regardless of OS. No oss/ subdirectory to remember; tab-completion at ~/h lands you in hogwarts on every machine.

What changed

Scripts (logic):

  • memory/repositories.json — flat repos map updated; richer repositories descriptors also updated for parity
  • sync-repos.ps1 / sync-repos.sh$OssDir / $OSS_DIR variables now resolve to $env:USERPROFILE / $HOME (variable names kept to minimize blast radius)
  • Check-Repos.ps1 — fallback Get-RepoMap updated; primary path still reads from repositories.json
  • doctor.sh — hardcoded REPO_PATHS fallback updated
  • bootstrap.ps1 — step 14 success message no longer mentions oss/

Config + docs:

  • settings.jsonOSS_PATH env var retained for back-compat, now points at /Users/abdout (nothing in scripts reads $env:OSS_PATH)
  • agents/{hogwarts,souq,mkan,shifa}.mdLocal: field + example git clone commands
  • commands/repos.md — Quick Access reference paths
  • content/docs/onboarding.mdx — "what you end up with" + step 14 table row (this PR stacks on PR docs: rewrite onboarding for single-paste cold start #37 which introduces the new onboarding doc)
  • docs/CONFIGURATION.md, docs/KEYWORDS.md — env var rows and Local paths

Migration for existing teammates

After they pull main, they should re-arrange their local repos to match:

# Windows
Get-ChildItem $env:USERPROFILE\oss -Directory | ForEach-Object {
    Move-Item $_.FullName $env:USERPROFILE\
}
Remove-Item $env:USERPROFILE\oss
# macOS / Linux
mv ~/oss/* ~/ && rmdir ~/oss

Then re-run doctor to verify.

Known gap

.claude/CLAUDE.md line 143 (OSS_PATH: /Users/abdout/oss (open source)) needs the same update but the harness auto-classifier blocks edits to .claude/CLAUDE.md as "agent-loaded config self-modification." Manual one-line fix needed:

- - `OSS_PATH`: /Users/abdout/oss (open source)
+ - `OSS_PATH`: /Users/abdout (legacy env var; repos at ~/<repo>)

Can be done in a follow-up commit by anyone with manual write access. Not blocking — OSS_PATH is never consumed by scripts, only documented.

Dependencies

Stacks on docs/onboarding-rewrite (PR #37) because the onboarding.mdx updates here describe the new layout that PR #37 introduces. Merge order:

#29 → #30 → #31 → #32 → #33 → #34 → #35 → #36 → #37 → this PR

After the chain unrolls, this PR rebases onto main as a focused refactor.

Test plan

  • Local verification: 9 repos moved from ~/oss/* to ~/* on developer machine; doctor re-run detects all 11 repos at new locations
  • git status clean for all moved repos (paths in .git are internal and survive Move-Item)
  • Hogwarts retained its 1 staged file deletion through the move
  • Fresh-VM bootstrap: paste one-liner, verify sync-repos.ps1 clones to ~/<repo> for all 11
  • macOS verification: sync-repos.sh clones to ~/<repo> (not ~/oss/<repo>)
  • Check-Repos.ps1 reads repositories.json correctly; new fallback exercised when repositories.json is absent

Refs #28

🤖 Generated with Claude Code

Move all 9 OSS repos out of the ~/oss subdirectory into the user-home
root, so the layout matches the existing convention for codebase and
kun (both already at ~/). After this, every databayt org repo lives at
~/<name> regardless of OS: C:\Users\<user>\<repo> on Windows,
/Users/<user>/<repo> on macOS, /home/<user>/<repo> on Linux.

Same place, all platforms, no nested oss/ to remember.

Script + data changes:
- memory/repositories.json — flat 'repos' map updated; richer
  'repositories' descriptors updated (macOS paths now /Users/abdout/<name>)
- sync-repos.ps1 / sync-repos.sh — $OssDir / $OSS_DIR now resolve
  to $env:USERPROFILE / $HOME (variable names retained for minimal
  blast radius; commented)
- Check-Repos.ps1 — Get-RepoMap fallback updated; reads from
  repositories.json first
- doctor.sh — hardcoded REPO_PATHS fallback updated
- bootstrap.ps1 — step 14 'org repos cloned' message no longer
  mentions oss/

Config + docs:
- settings.json — OSS_PATH env var retained, now points at /Users/abdout
  (legacy name; nothing in scripts reads $env:OSS_PATH)
- agents/{hogwarts,souq,mkan,shifa}.md — Local: paths updated;
  example git clone commands updated
- commands/repos.md — Quick Access path updated
- content/docs/onboarding.mdx — 'what you end up with' table +
  step 14 description updated
- docs/CONFIGURATION.md, docs/KEYWORDS.md — env var + reference
  paths updated

Migration for existing teammates:

  # Windows
  Get-ChildItem $env:USERPROFILE\oss -Directory | ForEach-Object {
      Move-Item $_.FullName $env:USERPROFILE\
  }
  Remove-Item $env:USERPROFILE\oss

  # macOS / Linux
  mv ~/oss/* ~/ && rmdir ~/oss

Then re-run doctor to verify.

Known gap: .claude/CLAUDE.md line 143 ('OSS_PATH: /Users/abdout/oss')
needs the same update but was blocked by the harness auto-classifier
(agent-loaded config self-modification). One-line manual fix:

  - `OSS_PATH`: /Users/abdout (legacy env var; repos at ~/<repo>)

Refs #28

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kun Ready Ready Preview, Comment May 18, 2026 5:11am

Adds a 'Local layout' section to the top of repositories.mdx — the
canonical doc — so anyone asking "where does X live?" finds the answer
before scrolling. Includes the OS-specific expansion table and the
migration commands for teammates moving from ~/oss/*.

Onboarding 'what you end up with' tightened: one sentence calling out
the user-home root convention + cross-link to the new section, instead
of a path string that buries the message.

Refs #28

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant