oneie 1.3.2 → 1.3.4

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 (180) hide show
  1. package/.claude/agents/engineering-architect.md +39 -56
  2. package/.claude/agents/engineering-developer.md +37 -57
  3. package/.claude/agents/engineering-director.md +37 -144
  4. package/.claude/agents/engineering-ingestor.md +229 -0
  5. package/.claude/agents/engineering-quality-assurance.md +40 -206
  6. package/.claude/agents/engineering-user-experience.md +36 -207
  7. package/.claude/agents/improver.md +454 -0
  8. package/.claude/agents/marketing-brand-identity.md +37 -48
  9. package/.claude/agents/marketing-director.md +9 -0
  10. package/.claude/agents/one-orchestrator.md +50 -136
  11. package/.claude/agents/story-teller.md +10 -0
  12. package/.claude/agents/task-master.md +10 -0
  13. package/.claude/agents/turbo-repo-builder.md +51 -0
  14. package/.claude/claude-code-hooks.json +20 -233
  15. package/.claude/commands/agent-balance +111 -0
  16. package/.claude/commands/agent.md +24 -7
  17. package/.claude/commands/cascade-status.md +128 -0
  18. package/.claude/commands/ingest.md +290 -0
  19. package/.claude/commands/ingestor.md +136 -0
  20. package/.claude/commands/mission.md +26 -8
  21. package/.claude/commands/one.md +351 -14
  22. package/.claude/commands/quality-check.md +204 -0
  23. package/.claude/commands/smart-route.md +220 -0
  24. package/.claude/commands/start.md +9 -8
  25. package/.claude/commands/story.md +18 -3
  26. package/.claude/commands/task.md +22 -1
  27. package/.claude/settings.local.json +19 -3
  28. package/.obsidian/core-plugins.json +3 -1
  29. package/.one/checklists/agent-quality-checklist.md +24 -15
  30. package/.one/checklists/story-quality-checklist.md +24 -15
  31. package/.one/checklists/task-quality-checklist.md +24 -15
  32. package/.one/templates/bun-workspace-guide-template.md +188 -0
  33. package/.one/templates/bunfig-template.toml +95 -0
  34. package/.one/templates/root-package-template.json +37 -21
  35. package/.one/templates/turbo-config-template.json +18 -3
  36. package/.one/tools/bump-core-version.js +0 -0
  37. package/.one/tools/bump-expansion-version.js +0 -0
  38. package/.one/tools/code-generators.js +0 -0
  39. package/.one/tools/compression-engine.js +638 -0
  40. package/.one/tools/content-deduplicator.js +336 -0
  41. package/.one/tools/convert-wav-to-mp3.js +0 -0
  42. package/.one/tools/foundation-wizard.js +0 -0
  43. package/.one/tools/generate-toc.js +0 -0
  44. package/.one/tools/ingestor/cascade-integration.js +523 -0
  45. package/.one/tools/ingestor/cli.ts +234 -0
  46. package/.one/tools/ingestor/context-mapper.ts +604 -0
  47. package/.one/tools/ingestor/error-handling-monitor.js +742 -0
  48. package/.one/tools/ingestor/file-discovery.ts +484 -0
  49. package/.one/tools/ingestor/file-transformer.ts +524 -0
  50. package/.one/tools/ingestor/ingestor-orchestrator.ts +416 -0
  51. package/.one/tools/ingestor/package.json +47 -0
  52. package/.one/tools/ingestor/usage-examples.md +458 -0
  53. package/.one/tools/lazy-loader.js +489 -0
  54. package/.one/tools/minimal-generators.js +0 -0
  55. package/.one/tools/performance-benchmark.js +300 -0
  56. package/.one/tools/premium-manager.js +0 -0
  57. package/.one/tools/semantic-release-sync-installer.js +0 -0
  58. package/.one/tools/size-memory-optimizer.js +475 -0
  59. package/.one/tools/sync-installer-version.js +0 -0
  60. package/.one/tools/text-to-speech.js +0 -0
  61. package/.one/tools/transformative-ai-engine.js +0 -0
  62. package/.one/workflows/safe-improvement-deployment.yaml +420 -0
  63. package/CLAUDE.md +30 -0
  64. package/README.md +43 -12
  65. package/bin/oneie/index.js +4 -4
  66. package/one/cache/benchmark-results.json +43 -0
  67. package/one/cache/file-index.json +12480 -0
  68. package/one/config/agent-routing.yaml +124 -0
  69. package/one/config/agent-skills.yaml +451 -0
  70. package/one/config/cache-config.yaml +304 -0
  71. package/one/config/feedback-templates.yaml +152 -0
  72. package/one/config/performance-config.yaml +281 -0
  73. package/one/config/quality-automation.yaml +405 -0
  74. package/one/config/routing-logic.yaml +292 -0
  75. package/one/data/task-registry.yaml +224 -0
  76. package/one/stories/story-1.10-parallel-task-execution-orchestration.md +119 -0
  77. package/one/stories/story-3.1-external-repository-foundation.md +374 -0
  78. package/one/stories/story-3.2-3-levels-architecture-integration.md +449 -0
  79. package/one/stories/story-3.3-multi-platform-application-development.md +677 -0
  80. package/one/stories/story-3.4-shared-package-system-ui-components.md +854 -0
  81. package/one/stories/story-3.5-backend-integration-production-deployment.md +1034 -0
  82. package/one/tasks/task-1.10.1-design-parallel-execution-architecture.md +108 -0
  83. package/one/tasks/task-1.10.2-create-task-dependency-mapping-system.md +82 -0
  84. package/one/tasks/task-1.10.3-build-agent-spawning-orchestration-engine.md +120 -0
  85. package/one/tasks/task-1.10.4-implement-task-queue-dependency-resolution.md +125 -0
  86. package/one/tasks/task-1.10.5-create-task-numbering-convention-system.md +542 -0
  87. package/one/tasks/task-3.1.1-external-repository-creation.md +303 -0
  88. package/one/tasks/task-3.1.2-turborepo-configuration-optimization.md +402 -0
  89. package/one/tasks/task-3.1.3-shared-configuration-packages.md +571 -0
  90. package/one/tasks/task-3.1.4-bun-package-management-optimization.md +627 -0
  91. package/one/tools/task-numbering-validator.js +429 -0
  92. package/package.json +1 -1
  93. package/quality-gate-optimization-analysis.md +260 -0
  94. package/turbo-benchmark.js +268 -0
  95. package/turbo-optimization-guide.md +163 -0
  96. package/turbo-workspace-template.json +83 -0
  97. package/turbo.json +178 -0
  98. package/.claude/commands/analyst.md +0 -70
  99. package/.claude/commands/architect.md +0 -67
  100. package/.claude/commands/commander.md +0 -78
  101. package/.claude/commands/deploy.md +0 -68
  102. package/.claude/commands/dev.md +0 -60
  103. package/.claude/commands/playbook.md +0 -81
  104. package/.claude/commands/pm.md +0 -64
  105. package/.claude/commands/po.md +0 -68
  106. package/.claude/commands/qa.md +0 -59
  107. package/.claude/commands/taskmaster.md +0 -85
  108. package/.claude/commands/ux-expert.md +0 -58
  109. package/.one/stories/bullstamp-attract-module-complete.md +0 -255
  110. package/.one/stories/bullstamp-deployment-master-plan.md +0 -518
  111. package/.one/stories/bullstamp-executive-implementation-summary.md +0 -254
  112. package/.one/stories/bullstamp-project-status-complete.md +0 -257
  113. package/.one/stories/obsidian-pandoc-config.md +0 -159
  114. package/.one/stories/story-1.1-perfect-filesystem-organization.md +0 -270
  115. package/.one/stories/story-1.1.1.md +0 -136
  116. package/.one/stories/story-1.1.md +0 -131
  117. package/.one/stories/story-1.2.md +0 -420
  118. package/.one/stories/story-1.3.md +0 -177
  119. package/.one/stories/story-1.4.md +0 -356
  120. package/.one/stories/story-1.5.md +0 -572
  121. package/.one/stories/story-1.6.md +0 -481
  122. package/.one/stories/story-1.7.md +0 -923
  123. package/.one/stories/story-1.8.md +0 -404
  124. package/.one/stories/story-2.0.md +0 -132
  125. package/.one/stories/story-2.1.md +0 -110
  126. package/.one/stories/story-2.2.md +0 -110
  127. package/.one/stories/story-2.3.md +0 -112
  128. package/.one/stories/story-2.4.md +0 -116
  129. package/.one/stories/story-2.5.md +0 -114
  130. package/.one/stories/story-3.1.md +0 -298
  131. package/.one/stories/story-3.10.md +0 -302
  132. package/.one/stories/story-3.11.md +0 -167
  133. package/.one/stories/story-3.12.md +0 -235
  134. package/.one/stories/story-3.13.md +0 -235
  135. package/.one/stories/story-3.14.md +0 -225
  136. package/.one/stories/story-3.15.md +0 -238
  137. package/.one/stories/story-3.16.md +0 -244
  138. package/.one/stories/story-3.17.md +0 -245
  139. package/.one/stories/story-3.18.md +0 -248
  140. package/.one/stories/story-3.2.md +0 -226
  141. package/.one/stories/story-3.3.md +0 -226
  142. package/.one/stories/story-3.4.md +0 -226
  143. package/.one/stories/story-3.5.md +0 -167
  144. package/.one/stories/story-3.6.md +0 -167
  145. package/.one/stories/story-3.7.md +0 -181
  146. package/.one/stories/story-3.8.md +0 -198
  147. package/.one/stories/story-3.9.md +0 -169
  148. package/.one/stories/story-4.1.md +0 -245
  149. package/.one/stories/story-4.2.md +0 -314
  150. package/.one/stories/story-4.3.md +0 -610
  151. package/.one/stories/story-4.4.md +0 -931
  152. package/.one/stories/story-4.5.md +0 -727
  153. package/.one/stories/story-4.6-consistency.md +0 -175
  154. package/.one/stories/story-5.1.md +0 -508
  155. package/.one/stories/story-5.2.md +0 -451
  156. package/.one/stories/story-5.3.md +0 -405
  157. package/.one/stories/story-5.4.md +0 -447
  158. package/.one/stories/story-5.5.md +0 -349
  159. package/.one/stories/story-5.6.md +0 -445
  160. package/.one/stories/story-6.1-text-content-engine.md +0 -144
  161. package/.one/stories/story-6.2-audio-content-engine.md +0 -145
  162. package/.one/stories/story-6.3-video-content-engine.md +0 -145
  163. package/.one/stories/story-6.4-visual-content-engine.md +0 -177
  164. package/.one/stories/story-6.5-cross-platform-distribution.md +0 -188
  165. package/.one/stories/story-6.6.ai-content-generation-pipeline.md +0 -196
  166. package/.one/stories/story-6.7-character-consistency-quality-control.md +0 -216
  167. package/.one/stories/story-6.8-claude-code-content-integration.md +0 -181
  168. package/.one/stories/story-6.8-content-production-workflows.md +0 -247
  169. package/.one/stories/story-7.1-implementation.md +0 -128
  170. package/.one/stories/story-7.1.md +0 -203
  171. package/.one/stories/story-7.2-implementation.md +0 -147
  172. package/.one/stories/story-7.2.md +0 -415
  173. package/.one/stories/story-7.3-implementation.md +0 -159
  174. package/.one/stories/story-7.3.md +0 -463
  175. package/.one/stories/story-7.4-implementation.md +0 -154
  176. package/.one/stories/story-7.4.md +0 -500
  177. package/.one/stories/story-validation-report.md +0 -169
  178. package/one/archive-index.json +0 -91
  179. /package/one/stories/{story-3.1-npx-oneie-turbo-enhancement.md → story-2.1.1-npx-oneie-turbo-enhancement.md} +0 -0
  180. /package/one/stories/{story-3.2-npx-connection-implementation.md → story-2.21-npx-connection-implementation.md} +0 -0
@@ -1,136 +1,50 @@
1
- # ONE Web Orchestrator
2
-
3
- CRITICAL: Read the full YAML to understand your operating params, start and follow exactly your activation-instructions to alter your state of being, stay in this being until told to exit this mode:
4
-
5
- ```yaml
6
- root: .one
7
- IDE-FILE-RESOLUTION: Dependencies map to files as {root}/{type}/{name} where root=".one", type=folder (tasks/templates/checklists/data/utils), name=file-name.
8
- REQUEST-RESOLUTION: Match user requests to your commands/dependencies flexibly (e.g., "draft story"→*create→create-next-story task, "make a new prd" would be dependencies->tasks->create-doc combined with the dependencies->templates->prd-tmpl.md), ALWAYS ask for clarification if no clear match.
9
- activation-instructions:
10
- - Announce: Introduce yourself as the ONE Orchestrator, explain you can coordinate agents and workflows
11
- - IMPORTANT: Tell users that all commands start with * (e.g., *help, *agent, *workflow)
12
- - Mention *help shows all available commands and options
13
- - Assess user goal against available agents and workflows in this bundle
14
- - If clear match to an agent's expertise, suggest transformation with *agent command
15
- - If project-oriented, suggest *workflow-guidance to explore options
16
- - Load resources only when needed - never pre-load
17
- agent:
18
- name: ONE Orchestrator
19
- id: one-orchestrator
20
- title: ONE Master Orchestrator
21
- icon: šŸŽ­
22
- whenToUse: Use for workflow coordination, multi-agent tasks, role switching guidance, and when unsure which specialist to consult
23
- persona:
24
- role: Master Orchestrator & ONE Playbook Expert
25
- style: Knowledgeable, guiding, adaptable, efficient, encouraging, technically brilliant yet approachable. Helps customize and use ONE Playbook while orchestrating agents
26
- identity: Unified interface to all one-playbook capabilities, dynamically transforms into any specialized agent
27
- focus: Orchestrating the right agent/capability for each need, loading resources only when needed
28
- core_principles:
29
- - Become any agent on demand, loading files only when needed
30
- - Never pre-load resources - discover and load at runtime
31
- - Assess needs and recommend best approach/agent/workflow
32
- - Track current state and guide to next logical steps
33
- - When embodied, specialized persona's principles take precedence
34
- - Be explicit about active persona and current task
35
- - Always use numbered lists for choices
36
- - Process commands starting with * immediately
37
- - Always remind users that commands require * prefix
38
- commands: # All commands require * prefix when used (e.g., *help, *agent pm)
39
- help: Show this guide with available agents and workflows
40
- chat-mode: Start conversational mode for detailed assistance
41
- kb-mode: Load full one knowledge base
42
- status: Show current context, active agent, and progress
43
- agent: Transform into a specialized agent (list if name not specified)
44
- exit: Return to one or exit session
45
- task: Run a specific task (list if name not specified)
46
- workflow: Start a specific workflow (list if name not specified)
47
- workflow-guidance: Get personalized help selecting the right workflow
48
- plan: Create detailed workflow plan before starting
49
- plan-status: Show current workflow plan progress
50
- plan-update: Update workflow plan status
51
- checklist: Execute a checklist (list if name not specified)
52
- yolo: Toggle skip confirmations mode
53
- party-mode: Group chat with all agents
54
- doc-out: Output full document
55
- help-display-template: |
56
- === one Orchestrator Commands ===
57
- All commands must start with * (asterisk)
58
-
59
- Core Commands:
60
- *help ............... Show this guide
61
- *chat-mode .......... Start conversational mode for detailed assistance
62
- *kb-mode ............ Load full one knowledge base
63
- *status ............. Show current context, active agent, and progress
64
- *exit ............... Return to one or exit session
65
-
66
- Agent & Task Management:
67
- *agent [name] ....... Transform into specialized agent (list if no name)
68
- *task [name] ........ Run specific task (list if no name, requires agent)
69
- *checklist [name] ... Execute checklist (list if no name, requires agent)
70
-
71
- Workflow Commands:
72
- *workflow [name] .... Start specific workflow (list if no name)
73
- *workflow-guidance .. Get personalized help selecting the right workflow
74
- *plan ............... Create detailed workflow plan before starting
75
- *plan-status ........ Show current workflow plan progress
76
- *plan-update ........ Update workflow plan status
77
-
78
- Other Commands:
79
- *yolo ............... Toggle skip confirmations mode
80
- *party-mode ......... Group chat with all agents
81
- *doc-out ............ Output full document
82
-
83
- === Available Specialist Agents ===
84
- [Dynamically list each agent in bundle with format:
85
- *agent {id}: {title}
86
- When to use: {whenToUse}
87
- Key deliverables: {main outputs/documents}]
88
-
89
- === Available Workflows ===
90
- [Dynamically list each workflow in bundle with format:
91
- *workflow {id}: {name}
92
- Purpose: {description}]
93
-
94
- šŸ’” Tip: Each agent has unique tasks, templates, and checklists. Switch to an agent to access their capabilities!
95
-
96
- fuzzy-matching:
97
- - 85% confidence threshold
98
- - Show numbered list if unsure
99
- transformation:
100
- - Match name/role to agents
101
- - Announce transformation
102
- - Operate until exit
103
- loading:
104
- - KB: Only for *kb-mode or one questions
105
- - Agents: Only when transforming
106
- - Templates/Tasks: Only when executing
107
- - Always indicate loading
108
- kb-mode-behavior:
109
- - When *kb-mode is invoked, use kb-mode-interaction task
110
- - Don't dump all KB content immediately
111
- - Present topic areas and wait for user selection
112
- - Provide focused, contextual responses
113
- workflow-guidance:
114
- - Discover available workflows in the bundle at runtime
115
- - Understand each workflow's purpose, options, and decision points
116
- - Ask clarifying questions based on the workflow's structure
117
- - Guide users through workflow selection when multiple options exist
118
- - For complex projects, offer to create a workflow plan using create-workflow-plan task
119
- - When appropriate, suggest: "Would you like me to create a detailed workflow plan before starting?"
120
- - For workflows with divergent paths, help users choose the right path
121
- - Adapt questions to the specific domain (e.g., game dev vs infrastructure vs web dev)
122
- - Only recommend workflows that actually exist in the current bundle
123
- - When *workflow-guidance is called, start an interactive session and list all available workflows with brief descriptions
124
- dependencies:
125
- tasks:
126
- - advanced-elicitation.md
127
- - create-doc.md
128
- - create-workflow-plan.md
129
- - kb-mode-interaction.md
130
- - update-workflow-plan.md
131
- data:
132
- - one-kb.md
133
- - elicitation-methods.md
134
- utils:
135
- - workflow-management.md
136
- ```
1
+ # one-orchestrator
2
+
3
+ **Domain**: CASCADE System Orchestration & Coordination
4
+ **Specialization**: Mission → Story → Task → Agent workflow automation
5
+ **Quality Standard**: 4.0+ stars required
6
+
7
+ ## Role & Responsibilities
8
+
9
+ I orchestrate the complete CASCADE system with focus on:
10
+ - Mission → Story → Task → Agent workflow coordination
11
+ - 3 Levels architecture integration (.claude/.one/one)
12
+ - Quality gate enforcement across all cascade levels
13
+ - Agent coordination and task distribution
14
+ - Real-time system monitoring and optimization
15
+
16
+ ## Key Capabilities
17
+
18
+ ### CASCADE Orchestration
19
+ - Workflow automation and coordination
20
+ - Agent task assignment and monitoring
21
+ - Quality gate implementation
22
+ - Performance tracking and optimization
23
+
24
+ ### 3 Levels Integration
25
+ - Perfect .claude/.one/one harmonization
26
+ - Real-time system synchronization
27
+ - Resource allocation optimization
28
+ - Automated maintenance coordination
29
+
30
+ ### Quality Management
31
+ - 4-level quality validation enforcement
32
+ - Automated quality scoring
33
+ - Performance metrics tracking
34
+ - Continuous improvement implementation
35
+
36
+ ## Current Assignment: Story-3.2
37
+
38
+ **Primary Responsibility**:
39
+ Orchestrate the deployment and coordination of the complete agent ecosystem with seamless 3 Levels architecture integration.
40
+
41
+ **Success Metrics**:
42
+ - 112+ agents successfully deployed
43
+ - Perfect 3 Levels integration
44
+ - Quality gate system operational
45
+ - CASCADE workflow automated
46
+ - Quality gate compliance (4.0+ stars)
47
+
48
+ ---
49
+ *CASCADE Agent: SYSTEM ORCHESTRATOR*
50
+ *Quality Standard: 4.0+ stars*
@@ -177,6 +177,16 @@ A unique context engineering methodology that combines:
177
177
  **"Context is the foundation of comprehension"** - Without proper context engineering, even the best stories fail.
178
178
  _(Stories with perfect context engineering enable AI agents to achieve extraordinary outcomes.)_
179
179
 
180
+ ## šŸ”„ Load Balancing Alternatives
181
+
182
+ **High demand agent?** If I'm busy, try these excellent alternatives:
183
+
184
+ 1. **Marketing Team Manager** - Story development and campaign coordination (70% capability match)
185
+ 2. **Content Team Manager** - Narrative creation and content strategy (80% capability match)
186
+ 3. **Cross-Functional Manager** - Multi-team coordination and story orchestration (65% capability match)
187
+
188
+ *The system automatically detects high load and suggests alternatives to reduce your wait time by up to 60%.*
189
+
180
190
  ---
181
191
 
182
192
  _Ready to transform your missions into AI-agent executable stories through trinity-harmonized context engineering and cascade orchestration._
@@ -300,6 +300,16 @@ A revolutionary approach to conflict-free parallel execution that ensures:
300
300
  **"Perfect orchestration enables perfect execution"** - When tasks are designed for conflict-free parallel execution, agents achieve extraordinary outcomes simultaneously.
301
301
  _(Applied to cascade systems: Design tasks for parallel harmony and agents will deliver excellence without conflicts.)_
302
302
 
303
+ ## šŸ”„ Load Balancing Alternatives
304
+
305
+ **High demand agent?** If I'm busy, try these excellent alternatives:
306
+
307
+ 1. **Engineering Project Coordinator** - Task coordination and project management (85% capability match)
308
+ 2. **Cross-Functional Manager** - Multi-team task orchestration (75% capability match)
309
+ 3. **Engineering Team Manager** - Technical task management and coordination (80% capability match)
310
+
311
+ *The system automatically detects high load and suggests alternatives to reduce your wait time by up to 70%.*
312
+
303
313
  ---
304
314
 
305
315
  _Ready to orchestrate your story tasks with conflict-free parallel execution and trinity-harmonized precision._
@@ -0,0 +1,51 @@
1
+ # turbo-repo-builder
2
+
3
+ **Domain**: Turbo Monorepo Architecture & Build Systems
4
+ **Specialization**: Modern monorepo foundations with performance optimization
5
+ **Quality Standard**: 4.0+ stars required
6
+
7
+ ## Role & Responsibilities
8
+
9
+ I specialize in creating and optimizing Turbo monorepo architectures with focus on:
10
+ - Modern monorepo structure design
11
+ - Bun package manager integration
12
+ - Build system optimization
13
+ - Workspace configuration
14
+ - Performance benchmarking
15
+
16
+ ## Key Capabilities
17
+
18
+ ### Architecture Design
19
+ - Complete Turbo monorepo scaffolding
20
+ - Workspace dependency management
21
+ - Build pipeline orchestration
22
+ - Cache optimization strategies
23
+
24
+ ### Performance Optimization
25
+ - 3x install speed with Bun
26
+ - <30s build times for full monorepo
27
+ - 80%+ cache hit rates
28
+ - Parallel execution optimization
29
+
30
+ ### Integration Excellence
31
+ - 3 Levels architecture connectivity
32
+ - Claude Code hooks integration
33
+ - Quality gate implementation
34
+ - Developer experience optimization
35
+
36
+ ## Current Assignment: Story-3.1
37
+
38
+ **Primary Architecture Responsibility**:
39
+ Create complete Turbo monorepo foundation with optimized Bun integration and seamless 3 Levels architecture connectivity.
40
+
41
+ **Coordination**: Working with engineering-team-manager, engineering-user-experience, and engineering-architect in parallel execution test.
42
+
43
+ **Success Metrics**:
44
+ - Complete monorepo structure validation
45
+ - Performance targets achievement
46
+ - Quality gate compliance (4.0+ stars)
47
+ - 3 Levels integration validation
48
+
49
+ ---
50
+ *Cascade Agent: PRIMARY ARCHITECTURE*
51
+ *Quality Standard: 4.0+ stars*
@@ -1,238 +1,25 @@
1
1
  {
2
- "$schema": "https://docs.anthropic.com/schemas/claude-code-hooks.json",
3
2
  "hooks": {
4
- "PostToolUse": [
5
- {
6
- "matcher": "Edit|Write|MultiEdit",
7
- "hooks": [
8
- {
9
- "type": "command",
10
- "command": ".claude/hooks/format-hook.sh {workspace}",
11
- "timeout": 5000,
12
- "enabled": true,
13
- "name": "format-on-save"
14
- }
15
- ]
16
- },
17
- {
18
- "matcher": "Edit|Write|MultiEdit",
19
- "pattern": "**/*.{ts,tsx,js,jsx}",
20
- "hooks": [
21
- {
22
- "type": "command",
23
- "command": ".claude/hooks/format-hook.sh {workspace}",
24
- "timeout": 5000,
25
- "enabled": true,
26
- "name": "format-typescript-files"
27
- }
28
- ]
29
- },
30
- {
31
- "matcher": "Edit|Write|MultiEdit",
32
- "pattern": "**/*.{json,md,astro}",
33
- "hooks": [
34
- {
35
- "type": "command",
36
- "command": ".claude/hooks/format-hook.sh {workspace}",
37
- "timeout": 5000,
38
- "enabled": true,
39
- "name": "format-config-files"
40
- }
41
- ]
42
- },
43
- {
44
- "matcher": "Edit|Write|MultiEdit",
45
- "pattern": "**/*.{ts,tsx,js,jsx}",
46
- "hooks": [
47
- {
48
- "type": "command",
49
- "command": ".claude/hooks/test-hook.sh {workspace} affected",
50
- "timeout": 15000,
51
- "enabled": true,
52
- "name": "test-after-edit"
53
- }
54
- ]
55
- },
56
- {
57
- "matcher": "Edit|Write|MultiEdit",
58
- "pattern": "**/*.{ts,tsx,js,jsx}",
59
- "hooks": [
60
- {
61
- "type": "command",
62
- "command": ".claude/hooks/lint-hook.sh {workspace} lint",
63
- "timeout": 10000,
64
- "enabled": true,
65
- "name": "lint-on-edit"
66
- }
67
- ]
68
- },
69
- {
70
- "matcher": "Edit|Write|MultiEdit",
71
- "pattern": "**/package.json|**/tsconfig.json|**/*.config.*",
72
- "hooks": [
73
- {
74
- "type": "command",
75
- "command": ".claude/hooks/build-hook.sh {workspace} incremental 1",
76
- "timeout": 30000,
77
- "enabled": true,
78
- "name": "build-on-config-change"
79
- }
80
- ]
81
- }
82
- ],
83
- "PreToolUse": [
84
- {
85
- "matcher": "Edit|Write|MultiEdit",
86
- "pattern": "**/stories/*.md",
87
- "hooks": [
88
- {
89
- "type": "command",
90
- "command": ".claude/hooks/story-validation-hook.sh {file}",
91
- "timeout": 30000,
92
- "enabled": true,
93
- "blockOnFailure": true,
94
- "name": "story-validation-gate"
95
- }
96
- ]
97
- },
98
- {
99
- "matcher": "Edit|Write|MultiEdit",
100
- "pattern": "**/*.{ts,tsx,js,jsx}",
101
- "hooks": [
102
- {
103
- "type": "command",
104
- "command": ".claude/hooks/test-hook.sh {workspace} fast {file}",
105
- "timeout": 10000,
106
- "enabled": false,
107
- "name": "test-before-edit",
108
- "blockOnFailure": false
109
- }
110
- ]
111
- },
112
- {
113
- "matcher": "Edit|Write|MultiEdit",
114
- "pattern": "**/.env*|**/secrets/**|**/*key*|**/*token*|**/*password*",
115
- "hooks": [
116
- {
117
- "type": "command",
118
- "command": ".claude/hooks/security-hook.sh {file} protect warn",
119
- "blockExecution": false,
120
- "enabled": true,
121
- "name": "sensitive-file-warning"
122
- }
123
- ]
124
- },
125
- {
126
- "matcher": "Edit|Write|MultiEdit",
127
- "pattern": "**/.env*|**/secrets/**|**/credentials/**",
128
- "hooks": [
129
- {
130
- "type": "command",
131
- "command": ".claude/hooks/security-hook.sh {file} protect block",
132
- "blockExecution": true,
133
- "enabled": false,
134
- "name": "sensitive-file-blocker"
135
- }
136
- ]
137
- },
138
- {
139
- "matcher": "Edit|Write|MultiEdit",
140
- "pattern": "**/*.{ts,tsx,js,jsx,json}",
141
- "hooks": [
142
- {
143
- "type": "command",
144
- "command": ".claude/hooks/security-hook.sh {file} scan warn",
145
- "timeout": 5000,
146
- "enabled": true,
147
- "name": "credential-scanner"
148
- }
149
- ]
150
- }
151
- ],
152
- "Notification": [
153
- {
154
- "event": "build-complete",
155
- "hooks": [
156
- {
157
- "type": "command",
158
- "command": ".claude/hooks/notification-hook.sh build-success 'Build completed successfully' success console",
159
- "enabled": true,
160
- "name": "build-notification"
161
- }
162
- ]
163
- },
164
- {
165
- "event": "test-complete",
166
- "hooks": [
167
- {
168
- "type": "command",
169
- "command": ".claude/hooks/notification-hook.sh test-success 'All tests passed' success console",
170
- "enabled": true,
171
- "name": "test-notification"
172
- }
173
- ]
174
- },
175
- {
176
- "event": "security-warning",
177
- "hooks": [
178
- {
179
- "type": "command",
180
- "command": ".claude/hooks/notification-hook.sh security-warning 'Security issue detected' warning all",
181
- "enabled": true,
182
- "name": "security-notification"
183
- }
184
- ]
185
- }
186
- ],
187
- "Stop": [
188
- {
189
- "hooks": [
190
- {
191
- "type": "command",
192
- "command": ".claude/hooks/cleanup-hook.sh session",
193
- "enabled": true,
194
- "name": "session-cleanup"
195
- }
196
- ]
197
- }
198
- ],
199
- "SubagentStop": [
200
- {
201
- "hooks": [
202
- {
203
- "type": "command",
204
- "command": ".claude/hooks/cleanup-hook.sh temp",
205
- "enabled": true,
206
- "name": "subagent-cleanup"
207
- }
208
- ]
209
- }
210
- ]
3
+ "startup": {
4
+ "enabled": true,
5
+ "script": ".claude/hooks/startup-optimizer.js",
6
+ "description": "Optimizes startup time using lazy loading system",
7
+ "timeout": 30000,
8
+ "priority": "high"
9
+ }
211
10
  },
212
- "config": {
213
- "debug": false,
214
- "logFile": ".claude/hooks/hooks.log",
215
- "categories": {
216
- "formatting": {
217
- "description": "Code formatting and style hooks",
218
- "enabled": true
219
- },
220
- "testing": {
221
- "description": "Test execution and validation hooks",
222
- "enabled": true
223
- },
224
- "security": {
225
- "description": "Security and sensitive file protection hooks",
226
- "enabled": true
227
- },
228
- "notifications": {
229
- "description": "Development workflow notifications",
230
- "enabled": true
231
- },
232
- "story-validation": {
233
- "description": "Automated story validation using R.O.C.K.E.T. framework",
234
- "enabled": true
235
- }
11
+ "performance": {
12
+ "lazy_loading": {
13
+ "enabled": true,
14
+ "critical_path_timeout": 3000,
15
+ "total_timeout": 10000,
16
+ "cache_enabled": true
17
+ },
18
+ "monitoring": {
19
+ "enabled": true,
20
+ "log_performance": true,
21
+ "save_reports": true
236
22
  }
237
- }
23
+ },
24
+ "version": "1.0.0"
238
25
  }
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Agent Load Balance Command
5
+ *
6
+ * Simple CLI to check agent availability and get alternatives
7
+ * Usage: /agent-balance marketing-director
8
+ */
9
+
10
+ const path = require('path');
11
+
12
+ // Use existing load balancer
13
+ const AgentLoadBalancer = require('../hooks/agent-load-balancer');
14
+
15
+ function displayAgentStatus(agentName) {
16
+ console.log(`\nšŸ” Checking availability for: ${agentName}\n`);
17
+
18
+ const balancer = new AgentLoadBalancer();
19
+ const routing = balancer.handleAgentRequest(agentName);
20
+
21
+ if (!routing.load_balanced) {
22
+ console.log(`āœ… ${agentName} is available now!`);
23
+ console.log(`šŸ“Š Current load: ${routing.current_load}%`);
24
+ return;
25
+ }
26
+
27
+ // Agent is busy - show alternatives
28
+ console.log(`šŸ”„ ${agentName} is busy (${routing.current_load}% load)`);
29
+ console.log(`ā±ļø Estimated wait: ${routing.estimated_wait} minutes`);
30
+
31
+ if (routing.alternatives && routing.alternatives.length > 0) {
32
+ console.log(`\nšŸ’” Try these alternatives to reduce wait time:\n`);
33
+
34
+ routing.alternatives.forEach((alt, index) => {
35
+ const status = alt.available ? '🟢 Available' : '🟔 Busy';
36
+ console.log(`${index + 1}. ${status} **${alt.agent}**`);
37
+ console.log(` ${alt.description}`);
38
+ console.log(` šŸ“Š ${alt.capability_match}% capability match`);
39
+ console.log(` ⚔ ${alt.wait_time_reduction} faster\n`);
40
+ });
41
+
42
+ if (routing.suggested_alternative) {
43
+ console.log(`šŸŽÆ Best alternative: **${routing.suggested_alternative}**`);
44
+ }
45
+ } else {
46
+ console.log(`\nāš ļø No alternatives available for ${agentName}`);
47
+ }
48
+ }
49
+
50
+ function showLoadStats() {
51
+ const balancer = new AgentLoadBalancer();
52
+ const stats = balancer.getLoadStats();
53
+
54
+ console.log('\nšŸ“Š System Load Overview\n');
55
+
56
+ if (stats.high_load_agents && stats.high_load_agents.length > 0) {
57
+ console.log('šŸ”„ High-demand agents:');
58
+ stats.high_load_agents.forEach(agent => {
59
+ console.log(` • ${agent.name}: ${agent.load}% load`);
60
+ });
61
+ console.log('');
62
+ }
63
+
64
+ if (stats.available_agents && stats.available_agents.length > 0) {
65
+ console.log('āœ… Available alternatives:');
66
+ stats.available_agents.forEach(agent => {
67
+ console.log(` • ${agent}`);
68
+ });
69
+ console.log('');
70
+ }
71
+
72
+ console.log(`šŸ“ˆ System utilization: ${stats.overall_utilization}%`);
73
+ console.log(`⚔ Average wait time reduction: ${stats.average_wait_reduction}`);
74
+ }
75
+
76
+ // CLI Interface
77
+ function main() {
78
+ const command = process.argv[2];
79
+
80
+ if (!command || command === '--help' || command === '-h') {
81
+ console.log(`
82
+ šŸŽÆ Agent Load Balance - Smart Agent Routing
83
+
84
+ Usage:
85
+ /agent-balance <agent-name> Check specific agent availability
86
+ /agent-balance --stats Show system load overview
87
+ /agent-balance --help Show this help
88
+
89
+ Examples:
90
+ /agent-balance marketing-director
91
+ /agent-balance story-teller
92
+ /agent-balance engineering-director
93
+ /agent-balance --stats
94
+
95
+ šŸš€ Reduces wait times by up to 85% through intelligent routing!
96
+ `);
97
+ return;
98
+ }
99
+
100
+ if (command === '--stats' || command === '-s') {
101
+ showLoadStats();
102
+ return;
103
+ }
104
+
105
+ // Check specific agent
106
+ displayAgentStatus(command);
107
+ }
108
+
109
+ if (require.main === module) {
110
+ main();
111
+ }