mirror of
https://github.com/boxpositron/absolute-dotfiles.git
synced 2026-10-24 08:23:19 +00:00
feat(ai): share agent preferences across tools and add link-ai-configs.sh
Adds .config/ai/AGENTS.md, Claude's global CLAUDE.md, settings and OMC preferences, a script that symlinks them into HOME with backups, and the README section that documents the restore.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# Shared agent preferences
|
||||
|
||||
These preferences apply across coding assistants. Host-specific orchestration belongs in each tool's own configuration.
|
||||
|
||||
## Commits and attribution
|
||||
|
||||
Never add `Co-Authored-By: Claude` or any Claude attribution to git commit messages, pull request descriptions, or generated documentation. This applies across all projects and all commit, PR, and documentation workflows.
|
||||
|
||||
## Identity values
|
||||
|
||||
Never use the email address, name, or other identity details associated with the assistant session (for example, an injected `userEmail`, git `user.name` or `user.email`, or an account identity surfaced by the environment) as a value inside any project. This covers code, config, environment files, seed and test data, credentials, account creation, and documentation. Never assume or infer these values. When a real email, name, or identity value is required, ask the user for it.
|
||||
|
||||
## Writing style
|
||||
|
||||
Do not use em dashes or en dashes in prose written for the user, including emails, messages, documents, drafts, and chat replies. Use commas, periods, colons, or parentheses instead. This applies across all projects.
|
||||
@@ -0,0 +1,76 @@
|
||||
<!-- OMC:START -->
|
||||
<!-- OMC:VERSION:4.15.7 -->
|
||||
|
||||
# oh-my-claudecode - Intelligent Multi-Agent Orchestration
|
||||
|
||||
You are running with oh-my-claudecode (OMC), a multi-agent orchestration layer for Claude Code.
|
||||
Coordinate specialized agents, tools, and skills so work is completed accurately and efficiently.
|
||||
|
||||
<operating_principles>
|
||||
- Delegate specialized work to the most appropriate agent.
|
||||
- Prefer evidence over assumptions: verify outcomes before final claims.
|
||||
- Choose the lightest-weight path that preserves quality.
|
||||
- Consult official docs before implementing with SDKs/frameworks/APIs.
|
||||
</operating_principles>
|
||||
|
||||
<delegation_rules>
|
||||
Delegate for: multi-file changes, refactors, debugging, reviews, planning, research, verification.
|
||||
Work directly for: trivial ops, small clarifications, single commands.
|
||||
Route code to `executor` (use `model=opus` for complex work). Uncertain SDK usage → `document-specialist` (repo docs first; Context Hub / `chub` when available, graceful web fallback otherwise).
|
||||
</delegation_rules>
|
||||
|
||||
<model_routing>
|
||||
`haiku` (quick lookups), `sonnet` (standard), `opus` (architecture, deep analysis).
|
||||
Direct writes OK for: `~/.claude/**`, `.omc/**`, `.claude/**`, `CLAUDE.md`, `AGENTS.md`.
|
||||
</model_routing>
|
||||
|
||||
<skills>
|
||||
Invoke via `/oh-my-claudecode:<name>`. Trigger patterns auto-detect keywords.
|
||||
Tier-0 workflows include `autopilot`, `ultrawork`, `ralph`, `team`, and `ralplan`.
|
||||
Keyword triggers: `"autopilot"→autopilot`, `"ralph"→ralph`, `"ulw"→ultrawork`, `"ccg"→ccg`, `"ralplan"→ralplan`, `"deep interview"→deep-interview`, `"deslop"`/`"anti-slop"`→ai-slop-cleaner, `"deep-analyze"`→analysis mode, `"tdd"`→TDD mode, `"deepsearch"`→codebase search, `"ultrathink"`→deep reasoning, `"cancelomc"`→cancel.
|
||||
Team orchestration is explicit via `/team`.
|
||||
Detailed agent catalog, tools, team pipeline, commit protocol, and full skills registry live in the native `omc-reference` skill when skills are available, including reference for `explore`, `planner`, `architect`, `executor`, `designer`, and `writer`; this file remains sufficient without skill support.
|
||||
</skills>
|
||||
|
||||
<verification>
|
||||
Verify before claiming completion. Size appropriately: small→haiku, standard→sonnet, large/security→opus.
|
||||
If verification fails, keep iterating.
|
||||
</verification>
|
||||
|
||||
<failure_mode_guards>
|
||||
User input: when clarification, preference, or approval is required and AskUserQuestion is available, use AskUserQuestion instead of ending with a prose question; ask one focused question with 2-4 options. Use prose only when AskUserQuestion is unavailable or a free-form value is required.
|
||||
Session/worktree continuity: before editing after resume/compaction or inside a linked worktree, re-check `git status --short --branch`, current cwd, and relevant `.omc/state/` or `.omc/handoffs/` artifacts so work does not continue on the wrong branch or stale context.
|
||||
No fake completion: TODO-style placeholder notes, `test.skip`/`.only`, stub tests, and unimplemented branches are blockers, not evidence. Before completion, inspect changed files for these patterns and either implement them or report the blocker explicitly.
|
||||
</failure_mode_guards>
|
||||
|
||||
<execution_protocols>
|
||||
Broad requests: explore first, then plan. 2+ independent tasks in parallel. `run_in_background` for builds/tests.
|
||||
Keep authoring and review as separate passes: writer pass creates or revises content, reviewer/verifier pass evaluates it later in a separate lane.
|
||||
Never self-approve in the same active context; use `code-reviewer` or `verifier` for the approval pass.
|
||||
Before concluding: zero pending tasks, tests passing, verifier evidence collected.
|
||||
</execution_protocols>
|
||||
|
||||
<hooks_and_context>
|
||||
Hooks inject `<system-reminder>` tags. Key patterns: `hook success: Success` (proceed), `[MAGIC KEYWORD: ...]` (invoke skill), `The boulder never stops` (ralph/ultrawork active).
|
||||
Persistence: `<remember>` (7 days), `<remember priority>` (permanent).
|
||||
Kill switches: `DISABLE_OMC`, `OMC_SKIP_HOOKS` (comma-separated).
|
||||
</hooks_and_context>
|
||||
|
||||
<cancellation>
|
||||
`/oh-my-claudecode:cancel` ends execution modes. Cancel when done+verified or blocked. Don't cancel if work incomplete.
|
||||
</cancellation>
|
||||
|
||||
<worktree_paths>
|
||||
State root: `.omc/` by default, or `$OMC_STATE_DIR/{project-id}/` when `OMC_STATE_DIR` is set, or the parent `.omc/` when a `.omc-workspace` marker anchors a multi-repo workspace. Runtime state includes `.omc/state/`, `.omc/state/sessions/{sessionId}/`, `.omc/notepad.md`, `.omc/project-memory.json`, `.omc/plans/`, `.omc/research/`, `.omc/logs/`, `.omc/artifacts/`, `.omc/handoffs/`, and `.omc/ultragoal/`. These are ignored operational artifacts by default; `.omc/skills/**` is the intentional committable exception for project-scoped skills. In linked git worktrees, local `.omc/` state is removed with the worktree unless centralized via `OMC_STATE_DIR`.
|
||||
</worktree_paths>
|
||||
|
||||
## Setup
|
||||
|
||||
Say "setup omc" or run `/oh-my-claudecode:omc-setup`.
|
||||
|
||||
<!-- OMC:END -->
|
||||
|
||||
<!-- User customizations -->
|
||||
## Shared preferences
|
||||
|
||||
@~/.config/ai/AGENTS.md
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"defaultExecutionMode": "ultrawork",
|
||||
"configuredAt": "2026-04-30T16:25:55Z",
|
||||
"team": {
|
||||
"maxAgents": 5,
|
||||
"defaultAgentType": "claude",
|
||||
"monitorIntervalMs": 30000,
|
||||
"shutdownTimeoutMs": 15000
|
||||
},
|
||||
"setupCompleted": "2026-04-30T17:30:46+01:00",
|
||||
"setupVersion": "v4.15.7",
|
||||
"taskTool": "builtin",
|
||||
"taskToolConfig": {
|
||||
"injectInstructions": true,
|
||||
"useMcp": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"env": {
|
||||
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
|
||||
},
|
||||
"model": "opus",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "sh ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hud/omc-hud-cache.sh ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hud/omc-hud.mjs"
|
||||
},
|
||||
"enabledPlugins": {
|
||||
"oh-my-claudecode@omc": true,
|
||||
"frontend-design@claude-plugins-official": true,
|
||||
"superpowers@claude-plugins-official": true,
|
||||
"typescript-lsp@claude-plugins-official": true,
|
||||
"playwright@claude-plugins-official": true,
|
||||
"rust-analyzer-lsp@claude-plugins-official": true,
|
||||
"pyright-lsp@claude-plugins-official": true,
|
||||
"security-guidance@claude-plugins-official": true,
|
||||
"chrome-devtools-mcp@claude-plugins-official": true,
|
||||
"searchfit-seo@claude-plugins-official": true,
|
||||
"skill-creator@claude-plugins-official": true,
|
||||
"gopls-lsp@claude-plugins-official": true,
|
||||
"csharp-lsp@claude-plugins-official": true,
|
||||
"jdtls-lsp@claude-plugins-official": true,
|
||||
"php-lsp@claude-plugins-official": true,
|
||||
"clangd-lsp@claude-plugins-official": true,
|
||||
"swift-lsp@claude-plugins-official": true,
|
||||
"kotlin-lsp@claude-plugins-official": true,
|
||||
"lua-lsp@claude-plugins-official": true,
|
||||
"remember@claude-plugins-official": true,
|
||||
"mcp-server-dev@claude-plugins-official": true,
|
||||
"claude-notifications-go@claude-notifications-go": true,
|
||||
"linear@claude-plugins-official": true
|
||||
},
|
||||
"extraKnownMarketplaces": {
|
||||
"omc": {
|
||||
"source": {
|
||||
"source": "git",
|
||||
"url": "https://github.com/Yeachan-Heo/oh-my-claudecode.git"
|
||||
}
|
||||
},
|
||||
"claude-plugins-official": {
|
||||
"source": {
|
||||
"source": "git",
|
||||
"url": "https://github.com/anthropics/claude-plugins-official.git"
|
||||
}
|
||||
},
|
||||
"claude-notifications-go": {
|
||||
"source": {
|
||||
"source": "github",
|
||||
"repo": "777genius/claude-notifications-go"
|
||||
}
|
||||
}
|
||||
},
|
||||
"effortLevel": "xhigh",
|
||||
"awaySummaryEnabled": false,
|
||||
"tui": "fullscreen",
|
||||
"skipDangerousModePermissionPrompt": true,
|
||||
"verbose": true,
|
||||
"teammateMode": "in-process",
|
||||
"remoteControlAtStartup": false
|
||||
}
|
||||
@@ -81,6 +81,26 @@ ln -s ~/dotfiles/.config/wezterm ~/.config/wezterm
|
||||
ln -s ~/dotfiles/.zshrc ~/.zshrc
|
||||
```
|
||||
|
||||
### AI configuration restore
|
||||
|
||||
After installing Node.js, OpenCode, Claude Code, and OMC, restore the selected AI configuration files separately from the package installer:
|
||||
|
||||
```bash
|
||||
bash ~/dotfiles/link-ai-configs.sh --dry-run
|
||||
bash ~/dotfiles/link-ai-configs.sh
|
||||
```
|
||||
|
||||
The script creates individual relative symlinks, skips existing correct links, and backs up replaced files or links under `~/.local/state/dotfiles-ai/backups/`. It does not replace whole configuration directories. To undo a replacement, remove that individual symlink and move its corresponding backup back to the original path.
|
||||
|
||||
- `.config/omo/omo.jsonc` supplies `~/.omo/omo.jsonc`. Model routing is preserved; the OpenCode overlay excludes only the OMC Claude plugin through `claude_code.plugins_override`.
|
||||
- `.config/ai/AGENTS.md` holds shared personal preferences. OpenCode loads it through `~/.config/opencode/AGENTS.md` instead of falling back to Claude's global orchestration instructions. Claude imports it from its own `CLAUDE.md`.
|
||||
- `.config/claude/` supplies Claude's global instructions, settings, and OMC preferences. The machine-specific OMC `nodeBinary` cache is intentionally omitted; install Node.js and run OMC setup on each new machine to configure its runtime and HUD.
|
||||
- OpenCode's main configuration, TUI registration, and existing command/MCP isolation plugins are linked individually. Other portable Claude plugins and user skills remain enabled.
|
||||
|
||||
Credentials, `settings.local.json`, plugin installations, unrelated user skills, histories, caches, and runtime state are not copied into this repository or managed by this script. The selected Impeccable, Vercel web-design-guidelines and frontend-workflow skills are managed individually; see [the GPT visual workflow](.config/opencode/README.md) for provenance, verification and rollback. Install other desired plugins and portable skills separately. Existing OpenCode configuration still contains machine-specific MCP paths; review them on a new machine.
|
||||
|
||||
Restart OpenCode and Claude Code after applying changes. On first use, Claude may ask to approve the shared preferences import. Updates can rewrite generated configuration or replace symlinks: review the live files and repository diff before rerunning the link script, which backs up divergent live files rather than merging them. No plugin versions or model choices are changed by this restore step.
|
||||
|
||||
## Components
|
||||
|
||||
### Neovim Configuration (`.config/nvim/`)
|
||||
@@ -343,4 +363,4 @@ For questions, issues, or suggestions, please open an issue on the GitHub reposi
|
||||
**Platform**: macOS (Darwin)
|
||||
**Primary Editor**: Neovim
|
||||
**Shell**: Zsh
|
||||
**AI Tools**: OpenCode, Claude
|
||||
**AI Tools**: OpenCode, Claude
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
dry_run=false
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
--dry-run) dry_run=true ;;
|
||||
--help|-h)
|
||||
printf '%s\n' 'Usage: bash link-ai-configs.sh [--dry-run]' \
|
||||
'Link selected AI configuration files into HOME. Requires Node.js.' \
|
||||
'Existing files and links are moved to ~/.local/state/dotfiles-ai/backups/.' \
|
||||
'Credentials, local settings, installed plugins, unrelated skills, and runtime state are not managed.'
|
||||
exit 0
|
||||
;;
|
||||
*) printf 'Unknown option: %s\n' "$1" >&2; exit 2 ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
: "${HOME:?HOME must be set}"
|
||||
if ! command -v node >/dev/null 2>&1; then
|
||||
printf '%s\n' 'Node.js is required to resolve portable symlink paths.' >&2
|
||||
exit 1
|
||||
fi
|
||||
repo_root=$(node -e 'console.log(require("node:path").dirname(require("node:fs").realpathSync(process.argv[1])))' "$0")
|
||||
|
||||
sources=(
|
||||
.config/ai/AGENTS.md
|
||||
.config/ai/AGENTS.md
|
||||
.config/omo/omo.jsonc
|
||||
.config/claude/omc.json
|
||||
.config/claude/CLAUDE.md
|
||||
.config/claude/settings.json
|
||||
.config/opencode/opencode.json
|
||||
.config/opencode/tui.json
|
||||
.config/opencode/plugin/strip-omc-mcp.ts
|
||||
.config/opencode/plugin/strip-claude-only-commands.ts
|
||||
.config/opencode/plugin/lib/claude-only-command-registry.ts
|
||||
.config/opencode/UI-WORKFLOW.md
|
||||
.config/opencode/DEVELOPMENT-WORKFLOW.md
|
||||
.config/opencode/skills/frontend-workflow
|
||||
.config/opencode/skills/impeccable
|
||||
.config/opencode/skills/web-design-guidelines
|
||||
)
|
||||
targets=(
|
||||
.config/ai/AGENTS.md
|
||||
.config/opencode/AGENTS.md
|
||||
.omo/omo.jsonc
|
||||
.claude/.omc-config.json
|
||||
.claude/CLAUDE.md
|
||||
.claude/settings.json
|
||||
.config/opencode/opencode.json
|
||||
.config/opencode/tui.json
|
||||
.config/opencode/plugin/strip-omc-mcp.ts
|
||||
.config/opencode/plugin/strip-claude-only-commands.ts
|
||||
.config/opencode/plugin/lib/claude-only-command-registry.ts
|
||||
.config/opencode/UI-WORKFLOW.md
|
||||
.config/opencode/DEVELOPMENT-WORKFLOW.md
|
||||
.config/opencode/skills/frontend-workflow
|
||||
.config/opencode/skills/impeccable
|
||||
.config/opencode/skills/web-design-guidelines
|
||||
)
|
||||
|
||||
# Preflight the entire manifest before changing any live file.
|
||||
for i in "${!sources[@]}"; do
|
||||
source="$repo_root/${sources[$i]}"
|
||||
target="$HOME/${targets[$i]}"
|
||||
if [ ! -e "$source" ] || { [ -d "$target" ] && [ ! -L "$target" ]; }; then
|
||||
printf 'Refusing missing source or directory target: %s -> %s\n' "$source" "$target" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
umask 077
|
||||
backup_dir=''
|
||||
for i in "${!sources[@]}"; do
|
||||
source="$repo_root/${sources[$i]}"
|
||||
target="$HOME/${targets[$i]}"
|
||||
if [ "$source" -ef "$target" ]; then
|
||||
printf 'Already linked: %s\n' "$target"
|
||||
continue
|
||||
fi
|
||||
parent=$(dirname "$target")
|
||||
if "$dry_run"; then
|
||||
if [ -e "$target" ] || [ -L "$target" ]; then
|
||||
printf 'Would back up: %s\n' "$target"
|
||||
fi
|
||||
printf 'Would link: %s -> %s\n' "$target" "$source"
|
||||
continue
|
||||
fi
|
||||
mkdir -p "$parent"
|
||||
relative=$(node -e 'console.log(require("node:path").relative(require("node:fs").realpathSync(process.argv[1]), process.argv[2]))' "$parent" "$source")
|
||||
backup=''
|
||||
if [ -e "$target" ] || [ -L "$target" ]; then
|
||||
if [ -z "$backup_dir" ]; then
|
||||
backup_base="$HOME/.local/state/dotfiles-ai/backups"
|
||||
mkdir -p "$backup_base"
|
||||
backup_dir=$(mktemp -d "$backup_base/$(date +%Y-%m-%dT%H-%M-%S).XXXXXX")
|
||||
fi
|
||||
backup="$backup_dir/${targets[$i]}"
|
||||
mkdir -p "$(dirname "$backup")"
|
||||
mv "$target" "$backup"
|
||||
printf 'Backed up: %s\n' "$backup"
|
||||
fi
|
||||
if ! ln -s "$relative" "$target"; then
|
||||
if [ -n "$backup" ]; then mv "$backup" "$target"; fi
|
||||
exit 1
|
||||
fi
|
||||
printf 'Linked: %s -> %s\n' "$target" "$relative"
|
||||
done
|
||||
Reference in New Issue
Block a user