Junhanliu-dev/espalier-engineering / skills/espalier-init
espalier-init
VerifiedAnalyze any existing codebase, discover its patterns and best practices, and generate an Espalier structure (rules, skills, wiki, pipeline) so AI coders produce code matching that project's language and conventions. Greenfield repos take the two-pass Decide-Then-Bind path (/espalier-map charts the conventions, init binds them); boilerplate repos run init normally, then map the product. Wires into Claude Code, Codex, and/or GitHub Copilot (.claude/, .agents/skills/ + .codex/, .github/).
hook-templates/maprun-integration.sh
View on GitHub#!/usr/bin/env bash
# maprun-integration.sh — ensure the integration worktree exists; print its path.
#
# maprun-integration.sh <map-dir>
#
# The master needs somewhere to edit requirements.md and merge ticket branches
# WITHOUT touching your working checkout. That place is this worktree, sitting
# on the integration branch, with push blocked like every other worktree.
set -euo pipefail
MAP_DIR="${1:?usage: maprun-integration.sh <map-dir>}"
MAP_DIR="$(cd "$MAP_DIR" && pwd)"
PLAN="$MAP_DIR/plan/plan.json"
REPO="$(git rev-parse --show-toplevel)"
[ -f "$PLAN" ] || { echo "integration: no plan.json at $PLAN" >&2; exit 1; }
get() { PLAN="$PLAN" F="$1" python3 -c 'import json,os;v=json.load(open(os.environ["PLAN"])).get(os.environ["F"],"");print("" if v is None else v)'; }
rows() { # rows <key> <field1,field2,...>
PLAN="$PLAN" K="$1" FIELDS="$2" python3 - << 'PYR'
import json, os
p = json.load(open(os.environ["PLAN"]))
fields = os.environ["FIELDS"].split(",")
for item in (p.get(os.environ["K"]) or []):
if isinstance(item, str):
print(item)
else:
print("\t".join(str(item.get(f, "")) for f in fields))
PYR
}
INTEGRATION="$(get integration_branch)"
BASE="$(get base_branch)"
WT_ROOT="$(get worktree_root)"
case "$WT_ROOT" in
/*) WT_BASE="$WT_ROOT" ;;
*) WT_BASE="$REPO/$WT_ROOT" ;;
esac
IWT="$WT_BASE/$(basename "$MAP_DIR")/_integration"
if ! git -C "$REPO" show-ref --verify --quiet "refs/heads/$INTEGRATION"; then
git -C "$REPO" branch "$INTEGRATION" "$BASE" >&2
echo "created branch $INTEGRATION from $BASE" >&2
fi
# Self-heal: earlier versions applied the push block below WITHOUT --worktree,
# poisoning the SHARED .git/config — which blocks the operator's own checkout
# (and the master's PR pushes). Only maprun ever writes this value, so unset
# on sight.
if [ "$(git -C "$REPO" config remote.origin.pushurl 2>/dev/null)" = "blocked://maprun-forbids-push" ]; then
git -C "$REPO" config --unset remote.origin.pushurl || true
echo "healed: removed maprun push block from the SHARED git config" >&2
fi
if [ ! -d "$IWT" ]; then
mkdir -p "$(dirname "$IWT")"
git -C "$REPO" worktree add "$IWT" "$INTEGRATION" >&2
# MUST be --worktree scoped (needs extensions.worktreeConfig): a plain
# `git config` here writes the SHARED .git/config and blocks the operator's
# checkout too — see the identical note in maprun-dispatch.sh.
git -C "$REPO" config extensions.worktreeConfig true
git -C "$IWT" config --worktree remote.origin.pushurl "blocked://maprun-forbids-push" || true
git -C "$IWT" config --worktree push.default nothing || true
# Workspace deps: clone from the main checkout (verify has to build here).
# Symlinks unsupported — bundlers reject out-of-root node_modules links.
rows workspaces dir,deps,deps_dir,install_cmd | while IFS=$'\t' read -r wsdir wsdeps wsddir wscmd; do
[ -n "$wsdir" ] || continue
wsddir="${wsddir:-node_modules}"
[ -d "$REPO/$wsdir" ] || continue
[ -e "$IWT/$wsdir/$wsddir" ] && continue
[ "$wsdeps" = "none" ] && continue
if [ -d "$REPO/$wsdir/$wsddir" ] && [ "$wsdeps" != "install" ]; then
cp -Rc "$REPO/$wsdir/$wsddir" "$IWT/$wsdir/$wsddir" 2>/dev/null \
|| cp -R "$REPO/$wsdir/$wsddir" "$IWT/$wsdir/$wsddir"
elif [ -n "$wscmd" ]; then
(cd "$IWT/$wsdir" && bash -c "$wscmd" >/dev/null 2>&1) || true
fi
done
echo "created integration worktree" >&2
fi
echo "$IWT"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |