executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
habitat-usageGuidance on using Habitat to manage multi-repo source and asset dependencies via .habitat/DEPS and hab sync, plus troubleshooting common sync failures.
Independent GitHub snapshot · Automated classification · Original documentation governs
Habitat is a dependency-sync tool for mono-repo-like layouts built from multiple Git repos and asset downloads. This skill provides setup guidance, copy-pastable config snippets, and a troubleshooting checklist for common sync failures.
.habitat + DEPShab sync failures related to config, auth, network, or integrity checksWhen sync fails (fetch errors, permission issues, timeouts), collect:
./hab wrapper in repo, hab.pex, etc.).habitatDEPS (or the file pointed to by deps_file in .habitat)Prefer committing the Habitat wrapper (hab) and config files (.habitat, DEPS) into the repository so developers and CI use the same version and configuration.
Avoid downloading releases/latest in automation, because it is not reproducible. Instead, pin to a specific release version (tag) and keep that pinned version consistent across developers and CI.
HABITAT_VERSION="0.3.145"
curl -L -o hab "https://github.com/lynx-family/habitat/releases/download/${HABITAT_VERSION}/hab"
chmod +x hab
If you just want to try Habitat locally (not recommended for CI), you can download the latest release:
curl -L -o hab "https://github.com/lynx-family/habitat/releases/latest/download/hab"
chmod +x hab
If you need integrity verification, pin an expected SHA-256 for hab in your repo/CI and verify after download:
EXPECTED_SHA256="<fill-me>"
if command -v shasum >/dev/null 2>&1; then
echo "${EXPECTED_SHA256} hab" | shasum -a 256 -c -
else
echo "${EXPECTED_SHA256} hab" | sha256sum -c -
fi
.habitat (solution config)Generate the Habitat config at the main repo root:
./hab config <repo remote uri>
.habitat describes one or more solutions. Minimal example:
solutions = [
{
"name": ".",
"deps_file": "DEPS",
"url": "git@github.com:namespace/repo.git",
}
]
Fields:
name: solution name, typically "." for the main repodeps_file: dependency manifest path (relative to the main repo root)url: the main repo remote URL (used by the tool/CI)DEPS (dependency manifest)In DEPS, define deps = { ... }. The key is the destination path in the main repo, and the value describes the dependency type and parameters.
deps = {
"lib/example": {
"type": "git",
"url": "git@github.com:namespace/lib.git",
"branch": "dev",
}
}
Notes:
If a dependency has its own dependency tree, you can bring it in as a solution and sync recursively:
deps = {
"third_party/some_solution": {
"type": "solution",
"url": "git@github.com:namespace/solution_repo.git",
"branch": "main",
"deps_file": "DEPS",
}
}
Use this to download archives, toolchains, model files, etc. Prefer providing integrity checks for verifiability and reproducibility:
deps = {
"third_party/tooling": {
"type": "http",
"url": "https://example.com/tooling.zip",
"sha256": "SHA256_HEX",
}
}
Use this to run extra steps during sync (generate files, copy assets, apply patches, etc.). Example:
def example_function():
from pathlib import Path
import shutil
dest_dir = Path("scripts/sync_something")
dest_dir.mkdir(parents=True, exist_ok=True)
src = dest_dir / "input.txt"
dst = dest_dir / "output.txt"
src.write_text("example\n", encoding="utf-8")
shutil.copyfile(src, dst)
deps = {
"scripts/sync_something": {
"type": "action",
"function": example_function,
}
}
Run at the main repo root:
./hab sync .
After sync, dependencies are materialized into the paths specified by the keys in DEPS.
Commit the wrapper and config files to enable one-command bootstrapping for developers and CI:
git add hab .habitat DEPS && git commit -m "Add habitat to manage dependencies."
Symptoms:
Permission denied, Authentication failed, or Could not read from remote repositoryFix:
url protocol matches your environment (SSH/HTTPS).Symptoms:
Fix:
url content changed or redirects to different content.sha256 in DEPS.Fix:
When a user asks for help configuring deps, fixing errors, or speeding up sync, respond in this order:
.habitat / DEPS / ./hab sync .)