dual-brain 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install.mjs +13 -5
- package/package.json +1 -1
package/install.mjs
CHANGED
|
@@ -916,7 +916,10 @@ function install(workspace, env, mode) {
|
|
|
916
916
|
'auto-update-wrapper.mjs',
|
|
917
917
|
'head-guard.mjs',
|
|
918
918
|
];
|
|
919
|
-
for (const h of HOOKS)
|
|
919
|
+
for (const h of HOOKS) {
|
|
920
|
+
const hSrc = join(__dirname, 'hooks', h);
|
|
921
|
+
if (existsSync(hSrc)) cpSync(hSrc, join(target, 'hooks', h));
|
|
922
|
+
}
|
|
920
923
|
|
|
921
924
|
// Copy bash hooks (auto-update.sh lives alongside .mjs hooks in the package)
|
|
922
925
|
const BASH_HOOKS = ['auto-update.sh'];
|
|
@@ -935,8 +938,12 @@ function install(workspace, env, mode) {
|
|
|
935
938
|
'hookify.orchestrator-gate.local.md',
|
|
936
939
|
'hookify.orchestrator-cost.local.md',
|
|
937
940
|
];
|
|
938
|
-
|
|
939
|
-
|
|
941
|
+
let rulesInstalled = 0;
|
|
942
|
+
for (const r of RULES) {
|
|
943
|
+
const rSrc = join(__dirname, r);
|
|
944
|
+
if (existsSync(rSrc)) { cpSync(rSrc, join(target, r)); rulesInstalled++; }
|
|
945
|
+
}
|
|
946
|
+
if (rulesInstalled) actions.push(`✓ ${rulesInstalled} hookify rules`);
|
|
940
947
|
|
|
941
948
|
const orch = generateOrchestrator(mode, workspace);
|
|
942
949
|
writeFileSync(join(target, 'orchestrator.json'), JSON.stringify(orch, null, 2) + '\n');
|
|
@@ -954,8 +961,9 @@ function install(workspace, env, mode) {
|
|
|
954
961
|
actions.push('✓ CLAUDE.md (session instructions)');
|
|
955
962
|
|
|
956
963
|
const rulesTarget = join(target, 'review-rules.md');
|
|
957
|
-
|
|
958
|
-
|
|
964
|
+
const rulesSrc = join(__dirname, 'review-rules.md');
|
|
965
|
+
if (existsSync(rulesSrc) && (!existsSync(rulesTarget) || force)) {
|
|
966
|
+
cpSync(rulesSrc, rulesTarget);
|
|
959
967
|
actions.push('✓ review-rules.md template');
|
|
960
968
|
} else {
|
|
961
969
|
actions.push('⊘ review-rules.md (kept yours)');
|