Skip to content

Junhanliu-dev/espalier-engineering / skills/espalier-init

espalier-init

Verified

Analyze 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/).

FileKindSize
SKILL.mdskill md43.5 KB
hook-templates/check-layer-boundaries-go.shscript665 B
hook-templates/check-layer-boundaries-python.shscript821 B
hook-templates/check-layer-boundaries-typescript.shscript1.6 KB
hook-templates/copilot-hook-adapter.shscript2.4 KB
hook-templates/drift-detect.shscript5.7 KB
hook-templates/drift-helpers.shscript56.4 KB
hook-templates/espalier-outside.shexecutablescript28.8 KB
hook-templates/espalier-pr.shexecutablescript43.2 KB
hook-templates/espalier-stats.shexecutablescript27.3 KB
hook-templates/lookup-helpers.shscript9.5 KB
hook-templates/map-guard.shexecutablescript3.9 KB
hook-templates/maprun-dispatch.shexecutablescript21.0 KB
hook-templates/maprun-integration.shexecutablescript3.4 KB
hook-templates/maprun-merge.shexecutablescript2.9 KB
hook-templates/maprun-pr.shexecutablescript12.8 KB
hook-templates/maprun-verify.shexecutablescript5.0 KB
hook-templates/maprun.pyscript65.6 KB
hook-templates/parse-drift-blocks.pyscript1.1 KB
hook-templates/post-edit-wrapper.shscript2.0 KB
hook-templates/post-merge-backlink.shscript2.2 KB
hook-templates/pre-push-gate-wrapper.shscript3.0 KB
hook-templates/pre-push-gate.shscript18.1 KB
hook-templates/rebuild-commit-index.shscript2.6 KB
references/discovery-checklist.mdmarkdown18.5 KB
references/validation.mdmarkdown16.7 KB
references/wiki-templates.mdmarkdown710 B
references/wiring.mdmarkdown13.5 KB
templates/agent.mdmarkdown3.7 KB
templates/agents/harness-coder.mdmarkdown33.9 KB
templates/agents/harness-reviewer.mdmarkdown25.1 KB
templates/agents/harness-security.mdmarkdown14.0 KB
templates/agents/modes/fix-round.mdmarkdown3.0 KB
templates/agents/modes/re-review.mdmarkdown5.3 KB
templates/agents/modes/repo-audit.mdmarkdown2.8 KB
templates/agents/modes/simplification.mdmarkdown7.0 KB
templates/agents/modes/stage6-abuse-coverage.mdmarkdown1.3 KB
templates/agents/modes/wiki-sweep.mdmarkdown5.6 KB
templates/pipeline.mdmarkdown18.9 KB
templates/rules/coding-standards.mdmarkdown3.2 KB
templates/rules/development-process.mdmarkdown3.2 KB
templates/rules/engineering-structure.mdmarkdown1008 B
templates/rules/production-standards.mdmarkdown5.8 KB
templates/rules/security-standards.mdmarkdown5.6 KB
templates/scout-prompts.mdmarkdown9.0 KB
templates/skills/espalier-ask.mdmarkdown6.4 KB
templates/skills/espalier-audit.mdmarkdown10.0 KB
templates/skills/espalier-coding-references/platform-native.mdmarkdown9.4 KB
templates/skills/espalier-coding-spec.mdmarkdown496 B
templates/skills/espalier-coding.mdmarkdown4.0 KB
templates/skills/espalier-doctor.mdmarkdown8.0 KB
templates/skills/espalier-fix.mdmarkdown77.5 KB
templates/skills/espalier-grill.mdmarkdown21.5 KB
templates/skills/espalier-map.mdmarkdown20.0 KB
templates/skills/espalier-maprun.mdmarkdown31.1 KB
templates/skills/espalier-prune.mdmarkdown13.0 KB
templates/skills/espalier-repot.mdmarkdown7.6 KB
templates/skills/espalier-requirements.mdmarkdown4.7 KB
templates/skills/espalier-review.mdmarkdown4.5 KB
templates/skills/espalier-security.mdmarkdown5.6 KB
templates/skills/espalier-simplify.mdmarkdown25.0 KB
templates/skills/espalier-stages/1-2-requirements.mdmarkdown7.6 KB
templates/skills/espalier-stages/3-coding.mdmarkdown15.0 KB
templates/skills/espalier-stages/4-panel.mdmarkdown14.3 KB
templates/skills/espalier-stages/5-6-contract.mdmarkdown10.3 KB
templates/skills/espalier-stages/7-10-delivery.mdmarkdown16.8 KB
templates/skills/espalier-stages/simple.mdmarkdown14.0 KB
templates/skills/espalier-testing.mdmarkdown2.9 KB
templates/skills/espalier.mdmarkdown27.7 KB

hook-templates/maprun-verify.sh

View on GitHub
#!/usr/bin/env bash
# maprun-verify.sh — integration verification on the assembled branch.
#
#   maprun-verify.sh <map-dir>
#
# Every ticket already built, linted, tested and passed a review panel ON ITS
# OWN. This checks the thing none of them could: that the union of them all is
# coherent. It is the difference between "each part works" and "the system works".
#
# What runs comes from plan.json `verify`:
#   "verify": {
#     "commands":            [{"name": "backend build", "dir": "backend", "run": "npm run build"}, …],
#     "clean_after_build":   ["backend/schema.prisma", …],       # generated files that must not drift
#     "forbidden_patterns":  [{"name": "no allowAll survivors",
#                              "pattern": "access: allowAll", "path": "backend/schemas/"}, …],
#     "expected_registrations": {"file": "backend/schemas/index.ts",
#                                "pattern": "^\\s*[A-Za-z]+:", "min": 26}
#   }
# Absent keys are skipped. Writes <map>/plan/verify-report.md; exits non-zero
# on any failure.
set -uo pipefail

MAP_DIR="${1:?usage: maprun-verify.sh <map-dir>}"
MAP_DIR="$(cd "$MAP_DIR" && pwd)"
PLAN="$MAP_DIR/plan/plan.json"
REPO="$(git rev-parse --show-toplevel)"
REPORT="$MAP_DIR/plan/verify-report.md"
[ -f "$PLAN" ] || { echo "verify: no plan.json at $PLAN"; 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)'; }
vrows() { # vrows <verify-subkey> <field1,field2,...>
  PLAN="$PLAN" K="$1" FIELDS="$2" python3 - << 'PYR'
import json, os
p = json.load(open(os.environ["PLAN"]))
v = p.get("verify") or {}
fields = os.environ["FIELDS"].split(",")
for item in (v.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)"

# Refuse to "verify" a branch nothing was merged into — a bare integration
# branch equals the base and would false-PASS every check.
if ! git -C "$REPO" show-ref --verify --quiet "refs/heads/$INTEGRATION"; then
  echo "verify: integration branch $INTEGRATION does not exist — nothing merged yet"; exit 1
fi
AHEAD="$(git -C "$REPO" rev-list --count "$BASE..$INTEGRATION" 2>/dev/null || echo 0)"
if [ "${AHEAD:-0}" = "0" ]; then
  echo "verify: $INTEGRATION has no commits beyond $BASE — nothing merged yet"; exit 1
fi

IWT="$(bash "$REPO/espalier/hooks/maprun-integration.sh" "$MAP_DIR")"

FAILED=0
{
  echo "# Integration verification"
  echo
  echo "- Branch: \`$INTEGRATION\`"
  echo "- Worktree: \`$IWT\`"
  echo "- Head: \`$(git -C "$IWT" rev-parse --short HEAD)\`"
  echo "- Run at: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
  echo
  echo "| Check | Result |"
  echo "|---|---|"
} > "$REPORT"

pass() { echo "| $1 | PASS |" >> "$REPORT"; echo "  PASS  $1"; }
fail() { echo "| $1 | **FAIL** |" >> "$REPORT"; echo "  FAIL  $1"; FAILED=1; }

echo "verify: $INTEGRATION @ $(git -C "$IWT" rev-parse --short HEAD)"

# 1. declared build/test commands
while IFS=$'\t' read -r name dir runcmd; do
  [ -n "$name" ] || continue
  if ( cd "$IWT/${dir:-.}" && bash -c "$runcmd" ) >/dev/null 2>&1; then
    pass "$name"
  else
    fail "$name"
  fi
done < <(vrows commands name,dir,run)

# 2. generated files that must not drift after the builds
while IFS= read -r path; do
  [ -n "$path" ] || continue
  [ -f "$IWT/$path" ] || continue
  if git -C "$IWT" diff --quiet -- "$path"; then
    pass "$path current"
  else
    fail "$path stale (build regenerated it)"
  fi
done < <(vrows clean_after_build path)

# 3. forbidden patterns (scaffold defaults that must not survive)
while IFS=$'\t' read -r name pattern path; do
  [ -n "$name" ] || continue
  STRAY="$(grep -rl "$pattern" "$IWT/$path" 2>/dev/null || true)"
  if [ -z "$STRAY" ]; then
    pass "$name"
  else
    fail "$name"
    { echo; echo "Files still matching \`$pattern\`:";
      echo "$STRAY" | sed "s|$IWT/|- \`|;s|\$|\`|"; } >> "$REPORT"
    echo "$STRAY" | sed 's/^/        /'
  fi
done < <(vrows forbidden_patterns name,pattern,path)

# 4. expected registrations (e.g. every schema list registered in the index)
REG="$(PLAN="$PLAN" python3 -c '
import json, os
v = (json.load(open(os.environ["PLAN"])).get("verify") or {}).get("expected_registrations") or {}
print("\t".join(str(v.get(k, "")) for k in ("file", "pattern", "min")))
')"
IFS=$'\t' read -r REG_FILE REG_PAT REG_MIN <<< "$REG"
if [ -n "$REG_FILE" ] && [ -n "$REG_MIN" ] && [ "$REG_MIN" != "0" ] && [ -f "$IWT/$REG_FILE" ]; then
  ACTUAL="$(grep -cE "$REG_PAT" "$IWT/$REG_FILE" 2>/dev/null || echo 0)"
  if [ "$ACTUAL" -ge "$REG_MIN" ]; then
    pass "registrations ($ACTUAL/$REG_MIN) in $REG_FILE"
  else
    fail "registrations ($ACTUAL/$REG_MIN) in $REG_FILE"
  fi
fi

{
  echo
  if [ "$FAILED" = "0" ]; then
    echo "**VERDICT: PASS** — the assembled branch is coherent."
  else
    echo "**VERDICT: FAIL** — see the failures above. The run does not report"
    echo "COMPLETE until this passes."
  fi
} >> "$REPORT"

echo "verify: report → $REPORT"
exit "$FAILED"
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
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: 197kUpdated Claude CodeCodexVerifiedInstall
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: 119kUpdated Claude CodeCodexVerifiedInstall
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: 118kUpdated Claude CodeCodexVerifiedInstall