Bootstrap
Initial setup for a host project that wants to use Yoke. At v2.0.0, /yoke:bootstrap is the single entry point through which a host project's `.yoke/config.yaml :: canonical_memory.provider` lands. Two flows are supported: (Flow A) legacy detection and migration — when the project is on Yoke v1.x, bootstrap detects either `<plugin_dir>/memories.json` or a v1.x-shaped `.yoke/config.yaml` lacking the `provider:` key, preserves `url`/`name`/`default_branch` as passthrough keys, defaults the migrated provider to `bedrock`, and removes `memories.json` after final confirmation; (Flow B) fresh bootstrap — bootstrap reads the curated provider list from the plugin's `providers.yaml`, prompts (or non-interactively selects via `--provider`), warns when the selected provider's `requires.plugin` is not installed, and writes `.yoke/config.yaml`. Idempotent. /yoke:bootstrap is the only Yoke skill that does NOT source `lib/yoke-prelude.sh` — it is the migration entry point.From its SKILL.md
npx -y skills add iurykrieger/claude-yoke --skill bootstrapAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
12.1 KB, as published. Nobody here has run it
/yoke:bootstrap — Phase 0 setup (provider selection + v1.x migration)
Prepares a host project to use Yoke v2.0.0 and ensures
.yoke/config.yaml :: canonical_memory.provider is populated. After
this skill returns, every other Yoke skill's hard-break pre-flight
(sourced from lib/yoke-prelude.sh) will pass.
Objective
Make a project Yoke-ready at v2.0.0 by:
- Verifying environment dependencies (
ghCLI, bash 4+, git repo). - Selecting an active canonical-memory provider — either interactively
from
providers.yamlor via the--provider <name>flag. - Detecting v1.x state (legacy
<plugin_dir>/memories.jsonor a v1.x-shaped.yoke/config.yaml) and migrating to the v2.0.0 schema under explicit confirmation, preservingurl,name, anddefault_branchasconfig_passthroughkeys. - Writing
.yoke/config.yamlfromtemplates/yoke-config.yamlwith the selected provider plus any provider-specified passthrough keys. - Creating
.yoke/runtime/and.yoke/.gitignore. - Pointing the user at
/yoke:discoveras the next step.
Pre-conditions
- The current directory is the root of a git repository. Bootstrap aborts otherwise.
ghCLI installed and authenticated. Hard-fails with install instructions if missing — no degraded mode (perconcepts/yoke-decision-*in canonical memory).- bash 4 or newer. macOS users need
brew install bash. - A host
CLAUDE.md(created fromtemplates/project-claude-md.mdif absent — never overwritten if present). <plugin_dir>/providers.yamlexists. Bootstrap aborts if the curated provider registry is missing or unparseable.
Argument parsing
--provider <name>— non-interactive override. The value must match a key underproviders:in<plugin_dir>/providers.yaml. Aborts with a registered-providers listing if not.--non-interactive— flag. Requires--provider. Skips every confirmation prompt; aborts on any ambiguity that would otherwise prompt the user.--canonical-memory <url>— optional URL for the per-provider passthrough keys (forwarded to the active provider plugin verbatim). Equivalent to the legacy v1.xcanonical_memory.url.
Pre-flight
Bootstrap is the only Yoke skill that does NOT source
lib/yoke-prelude.sh — it is the migration entry point. Sourcing the
prelude here would make bootstrap self-defeating on a v1.x project.
Bootstrap does source the working-memory paths helper and
lib/canonical-memory/resolve-provider.sh for validation only:
source "$PLUGIN/lib/working-memory/paths.sh"
# resolve-provider.sh is used to validate provider names against
# providers.yaml; it is NOT used to require a provider in
# .yoke/config.yaml (that is the job of every other skill's
# hard-break pre-flight call into the prelude helper).
source "$PLUGIN/lib/canonical-memory/resolve-provider.sh"
What it does
Step 1 — verify environment
- Check that the current directory is a git repo
(
git rev-parse --git-dir). Abort with a clear error if not. - Check
gh --versionsucceeds. If not, abort and link to https://cli.github.com/. - Check
bash --versionreports 4 or newer. On macOS, suggestbrew install bash. - Check
<plugin_dir>/providers.yamlexists and parses. Abort otherwise (this is a packaging error, not a user error).
Step 2 — detect legacy v1.x state
Compute two markers:
legacy_registry—[ -f "$PLUGIN/memories.json" ]. The v1.x vault registry that lived in the plugin directory.legacy_config—.yoke/config.yamlexists at the host project root, AND thecanonical_memory.providerkey is missing or empty.
If either marker is true, print:
wm: legacy Yoke v1.x state detected. Migrating to v2.0.0 schema.
…and proceed to Flow A — legacy migration. Otherwise, proceed to Flow B — fresh bootstrap.
Step 3 — Flow A: legacy migration
- Read the existing v1.x state. If
legacy_registry: read the first entry from<plugin_dir>/memories.jsonand extracturl,name,default_branch. Iflegacy_config: read.yoke/config.yamland extractcanonical_memory.url,canonical_memory.name,canonical_memory.default_branch. Either source provides the same three keys. - Default the migrated provider to
bedrock. Bedrock was the only viable v1.x backend, so the migration default is deterministic. If--providerwas passed with a value other thanbedrock, abort with:
The user can always re-bootstrap after the migration to switch providers.wm: --provider <name> conflicts with v1.x migration default (bedrock). Re-run without --provider, or use --provider bedrock to be explicit. - Confirm interactively (skipped under
--non-interactive):
OnMigrating Yoke v1.x → v2.0.0: provider: bedrock passthrough: url=<...>, name=<...>, default_branch=<...> This will: - write .yoke/config.yaml with canonical_memory.provider: bedrock - remove <plugin_dir>/memories.json (after the config write succeeds) Proceed? [y/N]nreply, abort without modifying any files. Onyreply, continue. - Write
.yoke/config.yamlfromtemplates/yoke-config.yamlsubstituting:canonical_memory_provider→bedrockcanonical_memory_url→ capturedurl- the captured
nameanddefault_branchgo undercanonical_memory:as additional keys (perproviders.yamlbedrock.config_passthrough: [url, name, default_branch]) created_at(today's ISO 8601 date)yoke_version(from this plugin'splugin.json)host_project_name,host_actor_name(from the working-memoryhost-actorhelper)
- Create
.yoke/runtime/(idempotent — no-op if it exists) and.yoke/.gitignorecontaining exactly the lineruntime/. - Verify the new config, then delete the legacy
memories.jsonif it existed. Order is strict:write new config → verify provider key parses → delete memories.json. The legacy file is never deleted before the new config is in place.
Step 4 — Flow B: fresh bootstrap
- Read available providers from
<plugin_dir>/providers.yaml. - Select the active provider:
- If
--provider <name>was passed: validate it against theproviders:keys; abort with the available-providers list on mismatch. - Else if
--non-interactivewas passed: abort with--non-interactive requires --provider. - Else if there is exactly one provider entry: select it automatically (with a one-line note to the user).
- Else (multiple providers, interactive mode): prompt the user
with the list, e.g.:
Available canonical-memory providers: 1) bedrock — Markdown frontmatter graph in a separate git repo (requires plugin: claude-bedrock ≥ 0.1.0) 2) <other> — <description> Select a provider [1-N]:
- If
- Warn if
requires.pluginis not installed. When the chosen provider entry setsrequires.plugin, check whether the named peer plugin is installed (Claude Code's plugin list — exact detection mechanism is the framework's responsibility, not the skill's). If not, print a warning but continue:
This is a warning, not an abort, because the user may install the peer plugin between bootstrap and first use.warning: provider 'bedrock' requires the 'claude-bedrock' plugin (>=0.1.0). It does not appear to be installed. Install it via claude plugin install claude-bedrock before invoking /yoke:search-canonical-memory or /yoke:canonize. - Prompt for
config_passthroughkeys named in the provider's entry. For each key inproviders.<name>.config_passthroughthat is not already provided via flag (e.g.--canonical-memory):
Skipped under<key> [<default-or-empty>]:--non-interactive; defaults are used. - Write
.yoke/config.yamlfromtemplates/yoke-config.yamlsubstituting the selected provider intocanonical_memory.providerplus the captured passthrough values. - Create
.yoke/runtime/and.yoke/.gitignore(line:runtime/).
Step 5 — re-bootstrap detection
If .yoke/config.yaml already exists AND has a non-empty
canonical_memory.provider key (i.e. it's already on the v2.0.0
schema):
- In interactive mode, ask
re-bootstrap? overwrite existing config? [y/N]. Default =n(no-op exit 0). Onn, abort without touching any file. - Under
--non-interactive, abort with exit 0 and a shortalready-bootstrappedmessage — never overwrite an existing v2.0.0 config without explicit user consent.
Step 6 — host CLAUDE.md
- If the host has no
CLAUDE.md: copytemplates/project-claude-md.mdto./CLAUDE.md. - If the host has a
CLAUDE.md: leave it alone. Print a hint that Yoke parses## Testing,## Linting,## Buildsections — point atdocs/canonical-memory-setup.md.
Step 7 — next steps
Print:
- "Yoke is ready. Run
/yoke:discover \"<your idea>\"to start your first task." - A pointer to
docs/quickstart.md. - The selected provider name and a one-line summary of the passthrough keys captured.
Output contract
- Exit 0 on success.
- Exit non-zero with a clear, actionable error message on any failure listed above.
- File writes are idempotent and reversible. The skill never destroys user content without explicit confirmation.
- Migration ordering is strict: write new config → verify provider
key parses → delete
memories.json. The legacy registry file is never deleted before the new config write succeeds. - Re-bootstrap on an existing v2.0.0 config requires explicit
yconsent (interactive) or aborts withalready-bootstrapped(non-interactive). Never overwrite silently.
Anti-patterns (do NOT do these)
- Do not source
lib/yoke-prelude.sh. Bootstrap is the migration entry point — sourcing the prelude on a v1.x project would make this skill self-defeating. The audit grep (prelude-source-line-auditsensor) explicitly asserts that this file does NOT contain the prelude helper-function name. - Do not silently default a missing provider. Always select via
--provider <name>, an interactive prompt, or the single-entry-only fallback. The PRD invariant says: hard break is preferable to silent default. - Do not delete
<plugin_dir>/memories.jsonbefore the new.yoke/config.yamlis in place and verified. Migration must be safe under partial failure. - Do not overwrite an existing v2.0.0
.yoke/config.yamlwithout explicit user consent. Re-bootstrap is ay/Nprompt, never a defaulty. - Do not auto-create
ghrepos without confirmation. Always ask. - Do not overwrite an existing
CLAUDE.md. The host's CLAUDE.md is the user's, not Yoke's. - Do not silently degrade if
ghis missing. Hard-fail. - Do not write outside
.yoke/, the hostCLAUDE.md, the registered memory's checkout path (when applicable), the registry file, and the optionalgh repo createcall. Bootstrap touches only those surfaces.