diff --git a/portability.md b/portability.md index 90f0b1c..45ed737 100644 --- a/portability.md +++ b/portability.md @@ -6,7 +6,7 @@ ``` ~/Projects/standards/ - how-i-work.md portability.md retrofit-playbook.md subagents-handbook.md + how-i-work.md portability.md retrofit-playbook.md guides/ ← neutral substance (vendor-agnostic): checklists, role knowledge adapters/ claude/ @@ -14,7 +14,7 @@ agents/ ← ~/.claude/agents symlinks here (global subagents) ``` -Companions: `how-i-work.md` (the always-loaded user layer, under 50 lines), `retrofit-playbook.md` (the one-time conversion manual), and `subagents-handbook.md` (designing and running delegated agents). This document is reference material — never symlink it into anything always-loaded. +Companions: `how-i-work.md` (the always-loaded user layer, under 50 lines) and `retrofit-playbook.md` (the one-time conversion manual). This document is reference material — never symlink it into anything always-loaded. ## The principle @@ -24,7 +24,7 @@ Corollaries: 1. **Repos are self-contained.** Everything required to work on a project correctly lives in the repo. Global and user-level files add preferences, never requirements. 2. **Swap at session boundaries.** The close-out ritual (update Current state → commit → push) is the handoff protocol between providers, not just between sessions. -3. **Convert machinery, never knowledge.** At adoption time, an agent regenerates wrappers (subagents, commands, rule loaders). The markdown they point at never moves. In every wrapper, vendor syntax stays confined to the header; the body is plain prose any agent could follow — so even when substance lives inline (a self-contained command like /handoff), conversion is a one-prompt header swap. +3. **Convert machinery, never knowledge.** At adoption time, an agent regenerates wrappers (subagents, commands, rule loaders). The substance they point at never moves. Every command and subagent is a thin wrapper in `adapters//` whose substance lives in `guides/` — no inline exceptions, so any wrapper converts to a new tool by swapping its header. 4. **Session state is disposable by design.** Conversations and per-tool caches (e.g. Claude's auto memory) are conveniences. Anything important gets promoted into the files below. 5. **No secrets in any of these files.** Secrets live in gitignored .env files; documents reference env-var names only. @@ -37,8 +37,8 @@ Corollaries: | Scoped guides | `/docs/guides/.md` with `paths:` frontmatter, plus one index line each in AGENTS.md | symlinks from `.claude/rules/` (auto lazy-load) | Content fully portable; lazy-loading is per-tool. Other tools find guides via the index lines | | User preferences | `~/Projects/standards/how-i-work.md` | symlink `~/.claude/CLAUDE.md` → it | No cross-tool standard above repo level; each tool's global file symlinks here at adoption | | Skills (procedures) | folders of `SKILL.md` + plain bash/python scripts | `.claude/skills/` | Format is open markdown; a cross-tool home (`.agents/skills/`) is emerging. Worst case: a pointer line in AGENTS.md | -| Subagents (delegation) | guides folder at matching scope — `/docs/guides/` for project agents, `standards/guides/` for global — or inline as plain prose if self-contained | thin wrapper in `.claude/agents/` (project) or `standards/adapters/claude/agents/` (global, symlinked as `~/.claude/agents`) | No standard exists. Wrappers regenerated per tool at adoption | -| Commands (saved prompt shortcuts) | same scope rule as subagents; self-contained procedures (like /handoff) may keep substance inline as plain prose | `.claude/commands/` (project) or `standards/adapters/claude/commands/` (global, symlinked as `~/.claude/commands`) | No standard. Same treatment as subagents | +| Subagents (delegation) | guides folder at matching scope — `/docs/guides/` for project agents, `standards/guides/` for global | thin wrapper in `.claude/agents/` (project) or `standards/adapters/claude/agents/` (global, symlinked as `~/.claude/agents`) | No standard exists. Wrappers regenerated per tool at adoption | +| Commands (saved prompt shortcuts) | substance in `guides/` at matching scope, same rule as subagents | thin wrapper in `.claude/commands/` (project) or `standards/adapters/claude/commands/` (global, symlinked as `~/.claude/commands`) | No standard. Same treatment as subagents | **Scope rule:** every artifact lives at the scope it describes — project-specific in that repo; universal in the standards repo. There, neutral substance goes in `guides/` and vendor machinery is quarantined under `adapters//` (so a second provider's wrappers never intermix with Claude's or with the shared guides).