dev-manager-tauri/.claude/hooks/blueprint-gate.cjs
lanrtop f7ab6dbbb8
All checks were successful
Push & PR Check / check (push) Successful in 50s
chore(self-onboarding): 炼境自身接入产物治理——块外恢复被抹定制 + lefthook 检查段补齐
批量分发实调反噬实锤:分支策略表/Agent 按钮清单/降级约定/启动协议
第 4 条曾写在 MANAGED 托管块内,v1.6.0/1.11.0 块升级原位覆盖时被抹。
全部恢复至块外「炼境自身约定」区,教训入决策记录(本地定制严禁写
进托管块)。顺带:块外与块内重复的通用约束去重(单一事实来源)、
lefthook 补齐 blueprint-gate/conventional/feature-confirmed 检查段
(verify_onboarding 复验 7/7)、收编 envoy/blueprint-gate 接入产物。

Rules-Applied: R13
2026-07-15 22:19:16 +09:00

33 lines
1.1 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env node
// 由炼境托管:重跑接入包会用最新模板覆盖本文件,请勿在此做项目定制。
// 蓝图门控pre-commit 检查未关闭的 🔵 任务卡warn onlyexit 0不阻断提交
const fs = require('fs');
const path = require('path');
const modulesDir = path.join(process.cwd(), '.blueprint', 'modules');
if (!fs.existsSync(modulesDir)) {
process.exit(0);
}
const unclosed = [];
for (const file of fs.readdirSync(modulesDir).filter(f => f.endsWith('.md'))) {
const content = fs.readFileSync(path.join(modulesDir, file), 'utf8');
for (const line of content.split('\n')) {
if (line.startsWith('### 🔵')) {
unclosed.push({ file, title: line.replace(/^###\s*🔵\s*/, '').trim() });
}
}
}
if (unclosed.length > 0) {
process.stderr.write('\n⚠ 蓝图门控:发现未关闭任务卡\n');
for (const { file, title } of unclosed) {
process.stderr.write(` 🔵 ${title}${file}\n`);
}
process.stderr.write('\n 已完成 → 改为 ✅;仍进行中 → 属预期,可忽略本提示。\n\n');
}
process.exit(0);