create-merlin-brain 3.5.9 → 3.5.11

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.
Files changed (35) hide show
  1. package/bin/install.cjs +32 -2
  2. package/files/CLAUDE.md +37 -1070
  3. package/files/agents/code-organization-supervisor.md +3 -0
  4. package/files/agents/context-guardian.md +2 -0
  5. package/files/agents/docs-keeper.md +3 -0
  6. package/files/agents/dry-refactor.md +3 -0
  7. package/files/agents/elite-code-refactorer.md +3 -0
  8. package/files/agents/hardening-guard.md +3 -0
  9. package/files/agents/implementation-dev.md +3 -0
  10. package/files/agents/merlin-api-designer.md +3 -0
  11. package/files/agents/merlin-codebase-mapper.md +3 -0
  12. package/files/agents/merlin-debugger.md +3 -0
  13. package/files/agents/merlin-executor.md +3 -0
  14. package/files/agents/merlin-frontend.md +3 -0
  15. package/files/agents/merlin-integration-checker.md +3 -0
  16. package/files/agents/merlin-migrator.md +3 -0
  17. package/files/agents/merlin-milestone-auditor.md +3 -0
  18. package/files/agents/merlin-performance.md +3 -0
  19. package/files/agents/merlin-planner.md +3 -0
  20. package/files/agents/merlin-researcher.md +3 -0
  21. package/files/agents/merlin-reviewer.md +3 -0
  22. package/files/agents/merlin-security.md +3 -0
  23. package/files/agents/merlin-verifier.md +3 -0
  24. package/files/agents/merlin-work-verifier.md +3 -0
  25. package/files/agents/merlin.md +25 -1
  26. package/files/agents/ops-railway.md +3 -0
  27. package/files/agents/orchestrator-retrofit.md +3 -0
  28. package/files/agents/product-spec.md +3 -0
  29. package/files/agents/remotion.md +362 -0
  30. package/files/agents/system-architect.md +3 -0
  31. package/files/agents/tests-qa.md +3 -0
  32. package/files/hooks/pre-compact.sh +27 -0
  33. package/files/merlin/VERSION +1 -1
  34. package/files/merlin/agent-manifest.json +181 -0
  35. package/package.json +1 -1
package/bin/install.cjs CHANGED
@@ -813,12 +813,30 @@ async function install() {
813
813
  logWarn('Merlin workflows not found in package');
814
814
  }
815
815
 
816
- // Step 4: Install agents
816
+ // Step 4: Install agents (tiered)
817
817
  logStep('4/10', 'Installing Merlin agents...');
818
818
  const agentsSrc = path.join(filesDir, 'agents');
819
819
  if (fs.existsSync(agentsSrc)) {
820
+ // Load agent manifest for tiered display
821
+ const manifestPath = path.join(filesDir, 'merlin', 'agent-manifest.json');
822
+ let manifest = null;
823
+ try {
824
+ if (fs.existsSync(manifestPath)) {
825
+ manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
826
+ }
827
+ } catch (e) { /* ignore - fallback to flat install */ }
828
+
829
+ // Install all agents (they're only loaded when spawned via --agent)
820
830
  const count = copyDirRecursive(agentsSrc, AGENTS_DIR);
821
- logSuccess(`Installed ${count} agent files`);
831
+
832
+ if (manifest && manifest.tiers) {
833
+ const coreCount = manifest.tiers.core ? manifest.tiers.core.agents.length : 0;
834
+ const workflowCount = manifest.tiers.workflow ? manifest.tiers.workflow.agents.length : 0;
835
+ const specialistCount = manifest.tiers.specialist ? manifest.tiers.specialist.agents.length : 0;
836
+ logSuccess(`Installed ${count} agents (${coreCount} core, ${workflowCount} workflow, ${specialistCount} specialist)`);
837
+ } else {
838
+ logSuccess(`Installed ${count} agent files`);
839
+ }
822
840
  } else {
823
841
  logWarn('Agents not found in package');
824
842
  }
@@ -983,6 +1001,18 @@ async function install() {
983
1001
  hooks: [{ type: 'command', command: 'bash ~/.claude/hooks/subagent-context.sh' }]
984
1002
  });
985
1003
 
1004
+ // PreCompact hook (save state before context compaction)
1005
+ settings.hooks.PreCompact = settings.hooks.PreCompact || [];
1006
+ addHookIfMissing(settings.hooks.PreCompact, {
1007
+ hooks: [{ type: 'command', command: 'bash ~/.claude/hooks/pre-compact.sh' }]
1008
+ });
1009
+
1010
+ // TaskCompleted hook (lightweight build/type verification)
1011
+ settings.hooks.TaskCompleted = settings.hooks.TaskCompleted || [];
1012
+ addHookIfMissing(settings.hooks.TaskCompleted, {
1013
+ hooks: [{ type: 'command', command: 'bash ~/.claude/hooks/task-completed-verify.sh' }]
1014
+ });
1015
+
986
1016
  // --- Prompt-based hooks cleanup & registration ---
987
1017
  // Remove ALL prompt-type hooks from Merlin (identified by type: 'prompt').
988
1018
  // This prevents duplicates across version upgrades and removes broken hooks.