martin1847/evolab / skills/cto-orchestration
cto-orchestration
Unverified以 CTO/orchestrator 模式管理多 agent 软件交付。用户要求“你做 CTO/编排者”“派 omp/codex 去做”“goal 模式派发”、管理多会话开发或接入这套工作流时使用;“复盘/收口/retro/retrospective”“工作盘点/盘点候选/stocktake”也必须触发,盘点只提案不动工。新项目先用 repo-governance-bootstrap 建治理骨架。不用于单 agent 小任务、无需评审循环的局部改动或纯文档初始化。
references/agentctl/codegraph-hooks.sh
View on GitHub#!/usr/bin/env bash
# codegraph git hooks — three events schedule best-effort index updates.
#
# Linked worktrees without an index attempt init after checkout; trees with an index
# attempt sync after checkout, commit, or merge. Detached startup does not guarantee
# completion, freshness, or coverage; failures remain in the /tmp log.
# Multiple events may contend. Callers must assess readiness or use source search.
#
# Wire it (per repo, hooks are not cloned):
# for h in post-checkout post-commit post-merge; do
# ln -s <abs path to this file> <repo>/.git/hooks/$h
# done
# The event is read from the LINK NAME (basename "$0"), which is how git invokes a hook; a
# trailing `-codegraph.sh` is stripped so the pre-0922 wiring name (post-checkout-codegraph.sh)
# keeps working. Any other name is a no-op.
# Ensure `.codegraph/` is in the repo's .gitignore — an untracked index makes every new
# worktree dirty and trips the dirty-worktree dispatch gate.
#
# Contract: NEVER fail or delay a git operation (always exit 0; codegraph runs detached, log
# under /tmp; no daemon, no lock, no result check, nothing is waited on). Two events firing at
# once just run two syncs. `init` fires only for a freshly created linked worktree ($3 = 1,
# git-dir != git-common-dir) that has no index yet; `sync` fires only where an index already
# exists, so a checkout that is not ours is left alone rather than silently indexed.
# git runs all three hooks with cwd = the worktree root.
set -u
hook="$(basename "$0")"
hook="${hook%-codegraph.sh}"
case "$hook" in
post-checkout | post-commit | post-merge) ;;
*) exit 0 ;;
esac
command -v codegraph >/dev/null 2>&1 || exit 0
wt="$(pwd)"
# (a) freshly created linked worktree, no index yet -> build one.
if [ "$hook" = "post-checkout" ] && [ "${3:-0}" = "1" ] && [ ! -e .codegraph ]; then
gd="$(git rev-parse --git-dir 2>/dev/null)" || exit 0
gcd="$(git rev-parse --git-common-dir 2>/dev/null)" || exit 0
if [ "$gd" != "$gcd" ]; then # main checkout: not our job
log="/tmp/codegraph-init-$(basename "$wt")-$$.log"
nohup codegraph init >"$log" 2>&1 </dev/null &
echo "post-checkout: codegraph init started in background for $wt (log: $log)" >&2
fi
exit 0
fi
# (b) any of the three events on a tree that already has an index -> refresh it.
[ -e .codegraph ] || exit 0
log="/tmp/codegraph-sync-$(basename "$wt")-$$.log"
nohup codegraph sync -q >"$log" 2>&1 </dev/null &
echo "$hook: codegraph sync started in background for $wt (log: $log)" >&2
exit 0
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse 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 | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |