This project defines a portable local workspace for Codex, Claude Code, and GitHub.
It is intentionally generic: machine paths, GitHub organization names, binary paths, and secret-scanning commands belong in local config, not in this repository.
For new machines, start with BOOTSTRAP.md.
- one configurable local project root, usually
~/projects - one interactive launcher for Codex and Claude Code
- one conservative sync command for all managed Git repositories
- explicit separation between target repositories and delivery workbenches
- optional scheduled sync at 13:00, 19:00, and 23:50
- shared global and project-level instructions
- reusable bootstrap prompts for new machines
- optional syncing of reusable agent assets through a configured GitHub organization or user account
- a first-run prompt for discovering scattered local projects and normalizing them into the workspace
workspace-configure- interactively write local machine config to~/.config/ai-workspace/config.workspace-shell-setup- addLOCAL_BIN_DIRto shell startup files through a managed PATH block.ai-launch codex- choose a project, then start Codex there.ai-launch claude- choose a project, then start Claude Code there.workspace-sync- clone missing GitHub repos, then pull/push clean repos only.workspace-sync --commit- interactively commit dirty repos before syncing.workspace-sync --scheduled- safe scheduled mode; never commits automatically and never pushes to externaloriginremotes.workspace-sync --clone-only- hydrate this machine with missing repos fromGITHUB_ORG, then exit.workspace-new-project <name>- create a new project under the configured project root.workspace-ensure-backup --push- add privatebackupremotes in the configured GitHub org/user for upstream repos.
The launcher always offers these first:
New projectNo project
Then it lists discovered projects from configured roots.
Directories with .git, workspace.yaml, AGENTS.md, CLAUDE.md, README.md, or common package files are treated as projects.
New project initializes a real Git repository with baseline docs and an initial commit.
No project starts the agent from $HOME, useful for one-off questions or work that does not need repository context.
For machines that already contain scattered projects, use:
prompts/discover-and-normalize-local-projects.md
That prompt inventories local directories, proposes a move plan into the configured project root, adds baseline project and agent docs, and initializes Git only for real projects.
The system treats global agent files as machine-level preferences:
~/.codex/AGENTS.md~/.claude/CLAUDE.md~/.claude/rules/*.md
Agents should not overwrite these files. If they already exist, preserve them and propose or apply additive changes only after approval.
Automated sync is intentionally conservative:
- clones missing repositories from
GITHUB_ORGintoPROJECTS_HOME - fetches remotes
- pulls only clean worktrees with upstream branches
- pushes only committed local changes
- pushes external/upstream repositories only to their private
backupremotes - skips dirty repos unless
--commitis used interactively - never force-pushes
- never auto-commits in scheduled mode
This avoids accidental uploads of secrets, broken work, generated files, and half-finished edits.
Local config lives at:
~/.config/ai-workspace/config
Create or update it with:
workspace-configureTemplate:
PROJECTS_HOME="$HOME/projects"
LOCAL_BIN_DIR="$HOME/.local/bin"
PROJECT_ROOTS="$HOME/projects"
SYNC_ROOTS="$HOME/projects"
GITHUB_ORG=""
GITHUB_SYNC_REPOS="1"
GITHUB_CLONE_PROTOCOL="https"
GITHUB_REPO_LIMIT="200"
BACKUP_REMOTE="backup"
CODEX_BIN="$HOME/.local/bin/codex"
CLAUDE_BIN="$HOME/.local/bin/claude"
SECRET_SCAN_CMD=""
Use PROJECT_ROOTS for what appears in the picker.
Use SYNC_ROOTS for what scheduled sync touches.
Use LOCAL_BIN_DIR for the symlinked helper commands installed by install-local.
Run workspace-shell-setup when ai-launch or workspace-* commands are not found in a new shell.
Set GITHUB_ORG to a GitHub organization or user account only on machines where helpers should create or use GitHub repositories.
When GITHUB_SYNC_REPOS=1, workspace-sync first lists repositories in GITHUB_ORG with gh repo list and clones any missing ones into PROJECTS_HOME.
Use GITHUB_CLONE_PROTOCOL=ssh only on machines with working SSH auth; otherwise keep the default https.
SECRET_SCAN_CMD is optional. If set, workspace-sync --commit runs it before committing and appends the repository path as the final argument.
Claude Code reads CLAUDE.md, not AGENTS.md. For shared project instructions, keep AGENTS.md canonical and make CLAUDE.md import it with:
@AGENTS.md
## Claude Code
- Add Claude-specific notes here.Codex reads AGENTS.md automatically.
Use two project types when preparing changes for another repo:
- target repo: owns reviewed code, website content, public docs, and PR branches
- delivery workbench: owns prompts, research, briefs, raw inputs, generated drafts, pipeline state, and agent assets
Connect them with workspace.yaml. Agents must ask before copying workbench output into a target repo or pushing to any external upstream.
- Architecture
- GitHub Organization Plan
- GitHub Remotes Playbook
- Launcher, Project Discovery, And Global Instructions
- New Machine Setup
- Project Boundaries
- Recommendations
- Russian Documentation
- Discover And Normalize Local Projects - find scattered local projects, move approved ones into the configured project root, add baseline docs, and initialize Git where appropriate.
- Bootstrap New Machine For Codex
- Bootstrap New Machine For Claude Code
Apache License 2.0 — see LICENSE and NOTICE. Per-file Apache headers are in the executable sources under bin/ and systemd/; the repo-level LICENSE covers docs, prompts, templates, and config.