martin1847/evolab / skills/repo-governance-bootstrap
repo-governance-bootstrap
Verified一次性初始化 AI 协作项目的轻量工程治理骨架。新仓库 / 文档治理初始化时调用(也是 cto-orchestration 接入新项目的第一步)。One-shot governance bootstrap for a new repo.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 16.9 KB |
| hooks.json | config | 592 B |
| references/PROJECT_AGENT.md | markdown | 7.9 KB |
| references/PR_SELF_CHECK.skeleton.md | markdown | 826 B |
| references/docs-check.shexecutable | script | 7.4 KB |
| references/engineering-gate.conf.example | other | 361 B |
| references/engineering-gate.shexecutable | script | 6.8 KB |
| references/hook-wiring.md | markdown | 2.4 KB |
| references/memory-discipline-hook.pyexecutable | script | 2.7 KB |
| references/memory-discipline-hook.ts | script | 1.5 KB |
| references/pre-commit.shexecutable | script | 1.4 KB |
| references/pre-push.template | other | 3.5 KB |
| references/templates.md | markdown | 14.4 KB |
references/memory-discipline-hook.ts
View on GitHub// memory-discipline-hook.ts — omp counterpart of memory-discipline-hook.py (Claude Code + codex).
//
// omp has no command/stdin PostToolUse hook; it uses a JS factory + tool_result event.
// Verified 2026-06 on omp/16.0.3: pi.sendUserMessage(text, { deliverAs: "followUp" })
// lands a role:"user" entry in the transcript that the model reads on its next turn and
// follows. (pi.sendMessage is a hidden/developer channel — the model often ignores it; do
// not use it here.) Wording MUST stay a neutral reminder — fake-SYSTEM / "you must …"
// phrasing gets flagged as prompt-injection and refused.
//
// Behavior mirrors the .sh: a write/edit on a memory/*.md file (not the MEMORY.md index)
// -> inject the offload reminder. Anything else -> no-op.
//
// Wiring: omp --hook <this> … (or drop in .omp/hooks/). Test: test/memory-hook-omp.bun.ts.
const REMINDER =
"[memory 提醒] 刚写了 memory/ 文件:事实细节(schema/config/creds/endpoint/长清单)宜放 ACCESS.local.md/docs,memory 正文留指针+教训即可。";
const isMemoryDoc = (p: string): boolean =>
/(^|\/)memory\/.*\.md$/.test(p) && p.split("/").pop() !== "MEMORY.md";
export default (pi: any) => {
pi.on("tool_result", async (event: any) => {
if (event?.isError) return;
const name = String(event?.toolName ?? "").toLowerCase();
if (name !== "write" && name !== "edit") return; // omp tool names are lowercase
if (!isMemoryDoc(String(event?.input?.path ?? ""))) return;
await pi.sendUserMessage(REMINDER, { deliverAs: "followUp" });
});
};
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |