agentic-qe 3.6.0 → 3.6.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.
Files changed (204) hide show
  1. package/.claude/agents/v3/qe-devils-advocate.md +218 -0
  2. package/.claude/agents/v3/qe-quality-criteria-recommender.md +2 -2
  3. package/.claude/skills/qe-iterative-loop/SKILL.md +1 -1
  4. package/.claude/skills/release/SKILL.md +17 -31
  5. package/.claude/skills/skills-manifest.json +1 -1
  6. package/README.md +38 -35
  7. package/package.json +1 -1
  8. package/scripts/cloud-db-config.json +1 -1
  9. package/v3/CHANGELOG.md +44 -0
  10. package/v3/README.md +7 -7
  11. package/v3/assets/agents/v3/qe-devils-advocate.md +218 -0
  12. package/v3/assets/agents/v3/qe-quality-criteria-recommender.md +2 -2
  13. package/v3/assets/skills/qe-iterative-loop/SKILL.md +1 -1
  14. package/v3/dist/agents/devils-advocate/agent.d.ts +103 -0
  15. package/v3/dist/agents/devils-advocate/agent.d.ts.map +1 -0
  16. package/v3/dist/agents/devils-advocate/agent.js +240 -0
  17. package/v3/dist/agents/devils-advocate/agent.js.map +1 -0
  18. package/v3/dist/agents/devils-advocate/index.d.ts +60 -0
  19. package/v3/dist/agents/devils-advocate/index.d.ts.map +1 -0
  20. package/v3/dist/agents/devils-advocate/index.js +72 -0
  21. package/v3/dist/agents/devils-advocate/index.js.map +1 -0
  22. package/v3/dist/agents/devils-advocate/strategies.d.ts +59 -0
  23. package/v3/dist/agents/devils-advocate/strategies.d.ts.map +1 -0
  24. package/v3/dist/agents/devils-advocate/strategies.js +438 -0
  25. package/v3/dist/agents/devils-advocate/strategies.js.map +1 -0
  26. package/v3/dist/agents/devils-advocate/types.d.ts +182 -0
  27. package/v3/dist/agents/devils-advocate/types.d.ts.map +1 -0
  28. package/v3/dist/agents/devils-advocate/types.js +96 -0
  29. package/v3/dist/agents/devils-advocate/types.js.map +1 -0
  30. package/v3/dist/agents/index.d.ts +20 -0
  31. package/v3/dist/agents/index.d.ts.map +1 -0
  32. package/v3/dist/agents/index.js +20 -0
  33. package/v3/dist/agents/index.js.map +1 -0
  34. package/v3/dist/cli/bundle.js +4489 -119
  35. package/v3/dist/coordination/agent-teams/adapter.d.ts +108 -0
  36. package/v3/dist/coordination/agent-teams/adapter.d.ts.map +1 -0
  37. package/v3/dist/coordination/agent-teams/adapter.js +316 -0
  38. package/v3/dist/coordination/agent-teams/adapter.js.map +1 -0
  39. package/v3/dist/coordination/agent-teams/domain-team-manager.d.ts +164 -0
  40. package/v3/dist/coordination/agent-teams/domain-team-manager.d.ts.map +1 -0
  41. package/v3/dist/coordination/agent-teams/domain-team-manager.js +342 -0
  42. package/v3/dist/coordination/agent-teams/domain-team-manager.js.map +1 -0
  43. package/v3/dist/coordination/agent-teams/index.d.ts +53 -0
  44. package/v3/dist/coordination/agent-teams/index.d.ts.map +1 -0
  45. package/v3/dist/coordination/agent-teams/index.js +61 -0
  46. package/v3/dist/coordination/agent-teams/index.js.map +1 -0
  47. package/v3/dist/coordination/agent-teams/mailbox.d.ts +142 -0
  48. package/v3/dist/coordination/agent-teams/mailbox.d.ts.map +1 -0
  49. package/v3/dist/coordination/agent-teams/mailbox.js +395 -0
  50. package/v3/dist/coordination/agent-teams/mailbox.js.map +1 -0
  51. package/v3/dist/coordination/agent-teams/tracing.d.ts +199 -0
  52. package/v3/dist/coordination/agent-teams/tracing.d.ts.map +1 -0
  53. package/v3/dist/coordination/agent-teams/tracing.js +308 -0
  54. package/v3/dist/coordination/agent-teams/tracing.js.map +1 -0
  55. package/v3/dist/coordination/agent-teams/types.d.ts +121 -0
  56. package/v3/dist/coordination/agent-teams/types.d.ts.map +1 -0
  57. package/v3/dist/coordination/agent-teams/types.js +17 -0
  58. package/v3/dist/coordination/agent-teams/types.js.map +1 -0
  59. package/v3/dist/coordination/circuit-breaker/breaker-registry.d.ts +146 -0
  60. package/v3/dist/coordination/circuit-breaker/breaker-registry.d.ts.map +1 -0
  61. package/v3/dist/coordination/circuit-breaker/breaker-registry.js +368 -0
  62. package/v3/dist/coordination/circuit-breaker/breaker-registry.js.map +1 -0
  63. package/v3/dist/coordination/circuit-breaker/domain-circuit-breaker.d.ts +134 -0
  64. package/v3/dist/coordination/circuit-breaker/domain-circuit-breaker.d.ts.map +1 -0
  65. package/v3/dist/coordination/circuit-breaker/domain-circuit-breaker.js +337 -0
  66. package/v3/dist/coordination/circuit-breaker/domain-circuit-breaker.js.map +1 -0
  67. package/v3/dist/coordination/circuit-breaker/index.d.ts +46 -0
  68. package/v3/dist/coordination/circuit-breaker/index.d.ts.map +1 -0
  69. package/v3/dist/coordination/circuit-breaker/index.js +51 -0
  70. package/v3/dist/coordination/circuit-breaker/index.js.map +1 -0
  71. package/v3/dist/coordination/circuit-breaker/types.d.ts +112 -0
  72. package/v3/dist/coordination/circuit-breaker/types.d.ts.map +1 -0
  73. package/v3/dist/coordination/circuit-breaker/types.js +10 -0
  74. package/v3/dist/coordination/circuit-breaker/types.js.map +1 -0
  75. package/v3/dist/coordination/competing-hypotheses/hypothesis-manager.d.ts +122 -0
  76. package/v3/dist/coordination/competing-hypotheses/hypothesis-manager.d.ts.map +1 -0
  77. package/v3/dist/coordination/competing-hypotheses/hypothesis-manager.js +377 -0
  78. package/v3/dist/coordination/competing-hypotheses/hypothesis-manager.js.map +1 -0
  79. package/v3/dist/coordination/competing-hypotheses/index.d.ts +34 -0
  80. package/v3/dist/coordination/competing-hypotheses/index.d.ts.map +1 -0
  81. package/v3/dist/coordination/competing-hypotheses/index.js +39 -0
  82. package/v3/dist/coordination/competing-hypotheses/index.js.map +1 -0
  83. package/v3/dist/coordination/competing-hypotheses/types.d.ts +134 -0
  84. package/v3/dist/coordination/competing-hypotheses/types.d.ts.map +1 -0
  85. package/v3/dist/coordination/competing-hypotheses/types.js +20 -0
  86. package/v3/dist/coordination/competing-hypotheses/types.js.map +1 -0
  87. package/v3/dist/coordination/dynamic-scaling/dynamic-scaler.d.ts +173 -0
  88. package/v3/dist/coordination/dynamic-scaling/dynamic-scaler.d.ts.map +1 -0
  89. package/v3/dist/coordination/dynamic-scaling/dynamic-scaler.js +368 -0
  90. package/v3/dist/coordination/dynamic-scaling/dynamic-scaler.js.map +1 -0
  91. package/v3/dist/coordination/dynamic-scaling/index.d.ts +38 -0
  92. package/v3/dist/coordination/dynamic-scaling/index.d.ts.map +1 -0
  93. package/v3/dist/coordination/dynamic-scaling/index.js +39 -0
  94. package/v3/dist/coordination/dynamic-scaling/index.js.map +1 -0
  95. package/v3/dist/coordination/dynamic-scaling/types.d.ts +147 -0
  96. package/v3/dist/coordination/dynamic-scaling/types.d.ts.map +1 -0
  97. package/v3/dist/coordination/dynamic-scaling/types.js +40 -0
  98. package/v3/dist/coordination/dynamic-scaling/types.js.map +1 -0
  99. package/v3/dist/coordination/federation/federation-mailbox.d.ts +215 -0
  100. package/v3/dist/coordination/federation/federation-mailbox.d.ts.map +1 -0
  101. package/v3/dist/coordination/federation/federation-mailbox.js +442 -0
  102. package/v3/dist/coordination/federation/federation-mailbox.js.map +1 -0
  103. package/v3/dist/coordination/federation/index.d.ts +38 -0
  104. package/v3/dist/coordination/federation/index.d.ts.map +1 -0
  105. package/v3/dist/coordination/federation/index.js +39 -0
  106. package/v3/dist/coordination/federation/index.js.map +1 -0
  107. package/v3/dist/coordination/federation/types.d.ts +103 -0
  108. package/v3/dist/coordination/federation/types.d.ts.map +1 -0
  109. package/v3/dist/coordination/federation/types.js +20 -0
  110. package/v3/dist/coordination/federation/types.js.map +1 -0
  111. package/v3/dist/coordination/fleet-tiers/index.d.ts +39 -0
  112. package/v3/dist/coordination/fleet-tiers/index.d.ts.map +1 -0
  113. package/v3/dist/coordination/fleet-tiers/index.js +44 -0
  114. package/v3/dist/coordination/fleet-tiers/index.js.map +1 -0
  115. package/v3/dist/coordination/fleet-tiers/tier-config.d.ts +60 -0
  116. package/v3/dist/coordination/fleet-tiers/tier-config.d.ts.map +1 -0
  117. package/v3/dist/coordination/fleet-tiers/tier-config.js +242 -0
  118. package/v3/dist/coordination/fleet-tiers/tier-config.js.map +1 -0
  119. package/v3/dist/coordination/fleet-tiers/tier-selector.d.ts +134 -0
  120. package/v3/dist/coordination/fleet-tiers/tier-selector.d.ts.map +1 -0
  121. package/v3/dist/coordination/fleet-tiers/tier-selector.js +373 -0
  122. package/v3/dist/coordination/fleet-tiers/tier-selector.js.map +1 -0
  123. package/v3/dist/coordination/fleet-tiers/types.d.ts +137 -0
  124. package/v3/dist/coordination/fleet-tiers/types.d.ts.map +1 -0
  125. package/v3/dist/coordination/fleet-tiers/types.js +20 -0
  126. package/v3/dist/coordination/fleet-tiers/types.js.map +1 -0
  127. package/v3/dist/coordination/index.d.ts +16 -0
  128. package/v3/dist/coordination/index.d.ts.map +1 -1
  129. package/v3/dist/coordination/index.js +29 -0
  130. package/v3/dist/coordination/index.js.map +1 -1
  131. package/v3/dist/coordination/queen-coordinator.d.ts +79 -0
  132. package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
  133. package/v3/dist/coordination/queen-coordinator.js +363 -0
  134. package/v3/dist/coordination/queen-coordinator.js.map +1 -1
  135. package/v3/dist/coordination/task-dag/dag.d.ts +93 -0
  136. package/v3/dist/coordination/task-dag/dag.d.ts.map +1 -0
  137. package/v3/dist/coordination/task-dag/dag.js +496 -0
  138. package/v3/dist/coordination/task-dag/dag.js.map +1 -0
  139. package/v3/dist/coordination/task-dag/index.d.ts +54 -0
  140. package/v3/dist/coordination/task-dag/index.d.ts.map +1 -0
  141. package/v3/dist/coordination/task-dag/index.js +62 -0
  142. package/v3/dist/coordination/task-dag/index.js.map +1 -0
  143. package/v3/dist/coordination/task-dag/scheduler.d.ts +123 -0
  144. package/v3/dist/coordination/task-dag/scheduler.d.ts.map +1 -0
  145. package/v3/dist/coordination/task-dag/scheduler.js +262 -0
  146. package/v3/dist/coordination/task-dag/scheduler.js.map +1 -0
  147. package/v3/dist/coordination/task-dag/types.d.ts +103 -0
  148. package/v3/dist/coordination/task-dag/types.d.ts.map +1 -0
  149. package/v3/dist/coordination/task-dag/types.js +9 -0
  150. package/v3/dist/coordination/task-dag/types.js.map +1 -0
  151. package/v3/dist/domains/enterprise-integration/services/odata-service.js +3 -3
  152. package/v3/dist/domains/enterprise-integration/services/odata-service.js.map +1 -1
  153. package/v3/dist/domains/enterprise-integration/services/soap-wsdl-service.d.ts.map +1 -1
  154. package/v3/dist/domains/enterprise-integration/services/soap-wsdl-service.js +9 -4
  155. package/v3/dist/domains/enterprise-integration/services/soap-wsdl-service.js.map +1 -1
  156. package/v3/dist/domains/requirements-validation/services/quality-criteria/quality-criteria-service.js +1 -1
  157. package/v3/dist/domains/requirements-validation/services/quality-criteria/quality-criteria-service.js.map +1 -1
  158. package/v3/dist/hooks/index.d.ts +8 -1
  159. package/v3/dist/hooks/index.d.ts.map +1 -1
  160. package/v3/dist/hooks/index.js +8 -1
  161. package/v3/dist/hooks/index.js.map +1 -1
  162. package/v3/dist/hooks/quality-gate-enforcer.d.ts +134 -0
  163. package/v3/dist/hooks/quality-gate-enforcer.d.ts.map +1 -0
  164. package/v3/dist/hooks/quality-gate-enforcer.js +265 -0
  165. package/v3/dist/hooks/quality-gate-enforcer.js.map +1 -0
  166. package/v3/dist/hooks/reasoning-bank-pattern-store.d.ts +60 -0
  167. package/v3/dist/hooks/reasoning-bank-pattern-store.d.ts.map +1 -0
  168. package/v3/dist/hooks/reasoning-bank-pattern-store.js +179 -0
  169. package/v3/dist/hooks/reasoning-bank-pattern-store.js.map +1 -0
  170. package/v3/dist/hooks/task-completed-hook.d.ts +174 -0
  171. package/v3/dist/hooks/task-completed-hook.d.ts.map +1 -0
  172. package/v3/dist/hooks/task-completed-hook.js +330 -0
  173. package/v3/dist/hooks/task-completed-hook.js.map +1 -0
  174. package/v3/dist/hooks/teammate-idle-hook.d.ts +167 -0
  175. package/v3/dist/hooks/teammate-idle-hook.d.ts.map +1 -0
  176. package/v3/dist/hooks/teammate-idle-hook.js +332 -0
  177. package/v3/dist/hooks/teammate-idle-hook.js.map +1 -0
  178. package/v3/dist/index.d.ts +3 -0
  179. package/v3/dist/index.d.ts.map +1 -1
  180. package/v3/dist/index.js +4 -0
  181. package/v3/dist/index.js.map +1 -1
  182. package/v3/dist/init/agents-installer.d.ts +5 -1
  183. package/v3/dist/init/agents-installer.d.ts.map +1 -1
  184. package/v3/dist/init/agents-installer.js +13 -5
  185. package/v3/dist/init/agents-installer.js.map +1 -1
  186. package/v3/dist/init/phases/12-verification.d.ts.map +1 -1
  187. package/v3/dist/init/phases/12-verification.js +13 -1
  188. package/v3/dist/init/phases/12-verification.js.map +1 -1
  189. package/v3/dist/kernel/unified-memory.d.ts.map +1 -1
  190. package/v3/dist/kernel/unified-memory.js +303 -18
  191. package/v3/dist/kernel/unified-memory.js.map +1 -1
  192. package/v3/dist/learning/pattern-store.js +1 -1
  193. package/v3/dist/learning/pattern-store.js.map +1 -1
  194. package/v3/dist/learning/qe-patterns.d.ts +2 -0
  195. package/v3/dist/learning/qe-patterns.d.ts.map +1 -1
  196. package/v3/dist/learning/qe-patterns.js.map +1 -1
  197. package/v3/dist/learning/qe-reasoning-bank.d.ts.map +1 -1
  198. package/v3/dist/learning/qe-reasoning-bank.js +16 -3
  199. package/v3/dist/learning/qe-reasoning-bank.js.map +1 -1
  200. package/v3/dist/mcp/bundle.js +4473 -133
  201. package/v3/dist/sync/cloud/tunnel-manager.d.ts.map +1 -1
  202. package/v3/dist/sync/cloud/tunnel-manager.js +11 -0
  203. package/v3/dist/sync/cloud/tunnel-manager.js.map +1 -1
  204. package/v3/package.json +1 -1
@@ -0,0 +1,167 @@
1
+ /**
2
+ * TeammateIdle Hook - ADR-064, Phase 1B
3
+ *
4
+ * Monitors agents for idle state and auto-assigns pending tasks
5
+ * from the task queue when an agent exceeds its idle threshold.
6
+ * Uses dependency injection for the task queue to avoid circular
7
+ * dependencies with the claim system.
8
+ *
9
+ * @module teammate-idle-hook
10
+ * @version 1.0.0
11
+ */
12
+ /** A pending task that can be assigned to an idle agent. */
13
+ export interface PendingTask {
14
+ /** Unique task identifier */
15
+ readonly id: string;
16
+ /** Domain the task belongs to */
17
+ readonly domain: string;
18
+ /** Priority level (p0 = highest) */
19
+ readonly priority: string;
20
+ /** Human-readable title */
21
+ readonly title: string;
22
+ /** When the task was created (epoch ms) */
23
+ readonly createdAt: number;
24
+ }
25
+ /**
26
+ * Abstraction over the claim/task system for dependency injection.
27
+ * Allows the hook to query and claim tasks without importing ClaimService directly.
28
+ */
29
+ export interface TaskQueue {
30
+ /** Retrieve pending tasks filtered by domains and limited in count */
31
+ getPendingTasks(filter: {
32
+ readonly domains?: string[];
33
+ readonly limit?: number;
34
+ }): Promise<PendingTask[]>;
35
+ /** Attempt to claim a task for an agent. Returns true on success. */
36
+ claimTask(taskId: string, agentId: string): Promise<boolean>;
37
+ }
38
+ /** Configuration for the TeammateIdle hook. */
39
+ export interface TeammateIdleHookConfig {
40
+ /** Idle threshold before hook fires (default: 5000ms) */
41
+ readonly idleThresholdMs: number;
42
+ /** Auto-assign from pending task queue */
43
+ readonly autoAssign: boolean;
44
+ /** Domains this agent can claim from */
45
+ readonly claimableDomains: string[];
46
+ /** Maximum tasks to assign per idle cycle */
47
+ readonly maxAssignPerCycle: number;
48
+ /** Whether to prefer same-domain tasks */
49
+ readonly preferSameDomain: boolean;
50
+ /** Priority threshold - only assign tasks at or above this priority (e.g. 'p1') */
51
+ readonly minPriority?: string;
52
+ }
53
+ /** Result of an idle check. Describes the action taken when an agent becomes idle. */
54
+ export type IdleAction = {
55
+ readonly action: 'assigned';
56
+ readonly taskId: string;
57
+ readonly domain: string;
58
+ } | {
59
+ readonly action: 'wait';
60
+ readonly reason: string;
61
+ } | {
62
+ readonly action: 'shutdown';
63
+ readonly reason: string;
64
+ };
65
+ /** Statistics snapshot returned by getStats() */
66
+ export interface TeammateIdleStats {
67
+ readonly monitoredAgents: number;
68
+ readonly idleAgents: number;
69
+ readonly totalIdleEvents: number;
70
+ readonly totalAssigned: number;
71
+ readonly totalWaits: number;
72
+ }
73
+ /**
74
+ * Hook that monitors agents for idle state and auto-assigns pending tasks.
75
+ *
76
+ * When an agent exceeds its configured idle threshold, the hook queries the
77
+ * injected TaskQueue for pending work, applies domain and priority filters,
78
+ * and attempts to claim a task on the agent's behalf.
79
+ */
80
+ export declare class TeammateIdleHook {
81
+ private readonly config;
82
+ private readonly taskQueue;
83
+ private readonly agents;
84
+ private checkInterval;
85
+ private checkIntervalMs;
86
+ private idleCb;
87
+ private assignCb;
88
+ private stats;
89
+ /**
90
+ * @param config - Hook configuration (merged with defaults)
91
+ * @param taskQueue - Optional task queue for auto-assignment
92
+ * @param checkIntervalMs - Interval for periodic idle checking (default: 2000ms)
93
+ */
94
+ constructor(config?: Partial<TeammateIdleHookConfig>, taskQueue?: TaskQueue, checkIntervalMs?: number);
95
+ /**
96
+ * Start monitoring an agent for idle state. Records current time as last
97
+ * activity and begins periodic checking if not already running.
98
+ * @param agentId - Unique identifier for the agent
99
+ * @param domain - Domain the agent operates in
100
+ */
101
+ start(agentId: string, domain: string): void;
102
+ /**
103
+ * Stop monitoring an agent for idle state.
104
+ * Clears the periodic interval if no agents remain.
105
+ * @param agentId - Agent to stop monitoring
106
+ */
107
+ stop(agentId: string): void;
108
+ /** Tear down the hook entirely, stopping all monitoring and clearing timers. */
109
+ dispose(): void;
110
+ /**
111
+ * Record activity for an agent, resetting its idle timer.
112
+ * Call this whenever the agent performs meaningful work.
113
+ * @param agentId - Agent that performed activity
114
+ */
115
+ recordActivity(agentId: string): void;
116
+ /**
117
+ * Manually check if an agent is idle and take action if so.
118
+ * Also called automatically by the periodic checker.
119
+ * @param agentId - Agent to check
120
+ * @returns The idle action taken, or null if agent is not idle or not found
121
+ */
122
+ checkIdle(agentId: string): Promise<IdleAction | null>;
123
+ /**
124
+ * Called when an agent exceeds the idle threshold.
125
+ * Attempts to auto-assign a task if configured, otherwise returns a wait action.
126
+ * @param agentId - The idle agent
127
+ * @returns The action taken
128
+ */
129
+ onIdle(agentId: string): Promise<IdleAction>;
130
+ /**
131
+ * Get all agents currently past the idle threshold.
132
+ * @returns Array of objects with agentId, domain, and idle duration
133
+ */
134
+ getIdleAgents(): Array<{
135
+ agentId: string;
136
+ domain: string;
137
+ idleSinceMs: number;
138
+ }>;
139
+ /** Get monitoring statistics. */
140
+ getStats(): TeammateIdleStats;
141
+ /** Register a callback invoked when an agent becomes idle and an action is taken. */
142
+ onIdleCallback(callback: (agentId: string, action: IdleAction) => void): void;
143
+ /** Register a callback invoked when a task is successfully assigned to an idle agent. */
144
+ onAssignCallback(callback: (agentId: string, taskId: string, domain: string) => void): void;
145
+ /** Sort tasks by domain preference, priority, then creation time. */
146
+ private sortTasks;
147
+ /** Build a wait result, notify callback, and bump stats. */
148
+ private waitResult;
149
+ /** Start the periodic idle check interval if not already running. */
150
+ private ensureCheckInterval;
151
+ /** Clear the periodic idle check interval. */
152
+ private clearCheckInterval;
153
+ /** Run idle check across all monitored agents. */
154
+ private runIdleCheck;
155
+ /** Notify the idle callback if registered. */
156
+ private notifyIdle;
157
+ /** Notify the assign callback if registered. */
158
+ private notifyAssign;
159
+ }
160
+ /**
161
+ * Create a new TeammateIdleHook with the given configuration and task queue.
162
+ * @param config - Partial configuration (merged with defaults)
163
+ * @param taskQueue - Optional task queue for auto-assignment
164
+ * @returns A new TeammateIdleHook instance
165
+ */
166
+ export declare function createTeammateIdleHook(config?: Partial<TeammateIdleHookConfig>, taskQueue?: TaskQueue): TeammateIdleHook;
167
+ //# sourceMappingURL=teammate-idle-hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"teammate-idle-hook.d.ts","sourceRoot":"","sources":["../../src/hooks/teammate-idle-hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IAC1B,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,oCAAoC;IACpC,Q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AAC,UAAU,CAAC;IA6ElD;;;OAGG;IACH,aAAa,IAAI,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAahF,iCAAiC;IACjC,QAAQ,IAAI,iBAAiB;IAc7B,qFAAqF;IACrF,cAAc,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI;IAI7E,yFAAyF;IACzF,gBAAgB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAQ3F,qEAAqE;IACrE,OAAO,CAAC,SAAS;IAcjB,4DAA4D;IAC5D,OAAO,CAAC,UAAU;IAOlB,qEAAqE;IACrE,OAAO,CAAC,mBAAmB;IAW3B,8CAA8C;IAC9C,OAAO,CAAC,kBAAkB;IAO1B,kDAAkD;YACpC,YAAY;IAc1B,8CAA8C;IAC9C,OAAO,CAAC,UAAU;IAQlB,gDAAgD;IAChD,OAAO,CAAC,YAAY;CAOrB;AAMD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,EACxC,SAAS,CAAC,EAAE,SAAS,GACpB,gBAAgB,CAElB"}
@@ -0,0 +1,332 @@
1
+ /**
2
+ * TeammateIdle Hook - ADR-064, Phase 1B
3
+ *
4
+ * Monitors agents for idle state and auto-assigns pending tasks
5
+ * from the task queue when an agent exceeds its idle threshold.
6
+ * Uses dependency injection for the task queue to avoid circular
7
+ * dependencies with the claim system.
8
+ *
9
+ * @module teammate-idle-hook
10
+ * @version 1.0.0
11
+ */
12
+ /** Priority ordering map -- lower index = higher priority */
13
+ const PRIORITY_ORDER = { p0: 0, p1: 1, p2: 2, p3: 3 };
14
+ const DEFAULT_CONFIG = {
15
+ idleThresholdMs: 5000,
16
+ autoAssign: true,
17
+ claimableDomains: [],
18
+ maxAssignPerCycle: 1,
19
+ preferSameDomain: true,
20
+ minPriority: undefined,
21
+ };
22
+ /** Default interval for periodic idle checking (ms) */
23
+ const DEFAULT_CHECK_INTERVAL_MS = 2000;
24
+ // =============================================================================
25
+ // TeammateIdleHook
26
+ // =============================================================================
27
+ /**
28
+ * Hook that monitors agents for idle state and auto-assigns pending tasks.
29
+ *
30
+ * When an agent exceeds its configured idle threshold, the hook queries the
31
+ * injected TaskQueue for pending work, applies domain and priority filters,
32
+ * and attempts to claim a task on the agent's behalf.
33
+ */
34
+ export class TeammateIdleHook {
35
+ config;
36
+ taskQueue;
37
+ agents = new Map();
38
+ checkInterval = null;
39
+ checkIntervalMs;
40
+ idleCb = null;
41
+ assignCb = null;
42
+ stats = { totalIdleEvents: 0, totalAssigned: 0, totalWaits: 0 };
43
+ /**
44
+ * @param config - Hook configuration (merged with defaults)
45
+ * @param taskQueue - Optional task queue for auto-assignment
46
+ * @param checkIntervalMs - Interval for periodic idle checking (default: 2000ms)
47
+ */
48
+ constructor(config, taskQueue, checkIntervalMs) {
49
+ this.config = { ...DEFAULT_CONFIG, ...config };
50
+ this.taskQueue = taskQueue ?? null;
51
+ this.checkIntervalMs = checkIntervalMs ?? DEFAULT_CHECK_INTERVAL_MS;
52
+ }
53
+ // ---------------------------------------------------------------------------
54
+ // Lifecycle
55
+ // ---------------------------------------------------------------------------
56
+ /**
57
+ * Start monitoring an agent for idle state. Records current time as last
58
+ * activity and begins periodic checking if not already running.
59
+ * @param agentId - Unique identifier for the agent
60
+ * @param domain - Domain the agent operates in
61
+ */
62
+ start(agentId, domain) {
63
+ if (this.agents.has(agentId)) {
64
+ console.log(`[TeammateIdleHook] Agent ${agentId} already monitored, updating domain to ${domain}`);
65
+ }
66
+ else {
67
+ console.log(`[TeammateIdleHook] Starting idle monitoring for agent ${agentId} in domain ${domain}`);
68
+ }
69
+ this.agents.set(agentId, { lastActivity: Date.now(), domain, monitoring: true });
70
+ this.ensureCheckInterval();
71
+ }
72
+ /**
73
+ * Stop monitoring an agent for idle state.
74
+ * Clears the periodic interval if no agents remain.
75
+ * @param agentId - Agent to stop monitoring
76
+ */
77
+ stop(agentId) {
78
+ if (!this.agents.has(agentId)) {
79
+ console.log(`[TeammateIdleHook] Agent ${agentId} not found, nothing to stop`);
80
+ return;
81
+ }
82
+ this.agents.delete(agentId);
83
+ console.log(`[TeammateIdleHook] Stopped idle monitoring for agent ${agentId}`);
84
+ if (this.agents.size === 0)
85
+ this.clearCheckInterval();
86
+ }
87
+ /** Tear down the hook entirely, stopping all monitoring and clearing timers. */
88
+ dispose() {
89
+ console.log(`[TeammateIdleHook] Disposing — stopping all ${this.agents.size} monitored agents`);
90
+ this.agents.clear();
91
+ this.clearCheckInterval();
92
+ this.idleCb = null;
93
+ this.assignCb = null;
94
+ }
95
+ // ---------------------------------------------------------------------------
96
+ // Activity Recording
97
+ // ---------------------------------------------------------------------------
98
+ /**
99
+ * Record activity for an agent, resetting its idle timer.
100
+ * Call this whenever the agent performs meaningful work.
101
+ * @param agentId - Agent that performed activity
102
+ */
103
+ recordActivity(agentId) {
104
+ const state = this.agents.get(agentId);
105
+ if (state)
106
+ state.lastActivity = Date.now();
107
+ }
108
+ // ---------------------------------------------------------------------------
109
+ // Idle Detection
110
+ // ---------------------------------------------------------------------------
111
+ /**
112
+ * Manually check if an agent is idle and take action if so.
113
+ * Also called automatically by the periodic checker.
114
+ * @param agentId - Agent to check
115
+ * @returns The idle action taken, or null if agent is not idle or not found
116
+ */
117
+ async checkIdle(agentId) {
118
+ const state = this.agents.get(agentId);
119
+ if (!state || !state.monitoring)
120
+ return null;
121
+ const elapsed = Date.now() - state.lastActivity;
122
+ if (elapsed < this.config.idleThresholdMs)
123
+ return null;
124
+ return this.onIdle(agentId);
125
+ }
126
+ /**
127
+ * Called when an agent exceeds the idle threshold.
128
+ * Attempts to auto-assign a task if configured, otherwise returns a wait action.
129
+ * @param agentId - The idle agent
130
+ * @returns The action taken
131
+ */
132
+ async onIdle(agentId) {
133
+ const state = this.agents.get(agentId);
134
+ if (!state) {
135
+ return { action: 'wait', reason: `agent ${agentId} not found` };
136
+ }
137
+ this.stats.totalIdleEvents++;
138
+ console.log(`[TeammateIdleHook] Agent ${agentId} is idle (domain: ${state.domain})`);
139
+ if (!this.config.autoAssign) {
140
+ return this.waitResult(agentId, 'auto-assign disabled');
141
+ }
142
+ if (!this.taskQueue) {
143
+ return this.waitResult(agentId, 'no task queue configured');
144
+ }
145
+ // Query pending tasks
146
+ const domains = this.config.claimableDomains.length > 0
147
+ ? this.config.claimableDomains
148
+ : undefined;
149
+ let tasks;
150
+ try {
151
+ tasks = await this.taskQueue.getPendingTasks({
152
+ domains,
153
+ limit: this.config.maxAssignPerCycle * 3,
154
+ });
155
+ }
156
+ catch (err) {
157
+ console.log(`[TeammateIdleHook] Failed to fetch pending tasks: ${err}`);
158
+ return this.waitResult(agentId, 'task queue error');
159
+ }
160
+ // Filter by minimum priority
161
+ if (this.config.minPriority) {
162
+ const threshold = PRIORITY_ORDER[this.config.minPriority];
163
+ if (threshold !== undefined) {
164
+ tasks = tasks.filter(t => {
165
+ const taskPri = PRIORITY_ORDER[t.priority];
166
+ return taskPri !== undefined && taskPri <= threshold;
167
+ });
168
+ }
169
+ }
170
+ if (tasks.length === 0) {
171
+ return this.waitResult(agentId, 'no pending tasks');
172
+ }
173
+ // Sort: same-domain first if preferred, then by priority, then by creation time
174
+ tasks = this.sortTasks(tasks, state.domain);
175
+ // Try to claim the highest-priority task
176
+ for (const task of tasks.slice(0, this.config.maxAssignPerCycle)) {
177
+ try {
178
+ const claimed = await this.taskQueue.claimTask(task.id, agentId);
179
+ if (claimed) {
180
+ state.lastActivity = Date.now();
181
+ const result = { action: 'assigned', taskId: task.id, domain: task.domain };
182
+ this.stats.totalAssigned++;
183
+ this.notifyIdle(agentId, result);
184
+ this.notifyAssign(agentId, task.id, task.domain);
185
+ console.log(`[TeammateIdleHook] Assigned task ${task.id} (${task.domain}, ${task.priority}) to agent ${agentId}`);
186
+ return result;
187
+ }
188
+ }
189
+ catch (err) {
190
+ console.log(`[TeammateIdleHook] Failed to claim task ${task.id}: ${err}`);
191
+ }
192
+ }
193
+ return this.waitResult(agentId, 'claim attempts failed');
194
+ }
195
+ // ---------------------------------------------------------------------------
196
+ // Query Methods
197
+ // ---------------------------------------------------------------------------
198
+ /**
199
+ * Get all agents currently past the idle threshold.
200
+ * @returns Array of objects with agentId, domain, and idle duration
201
+ */
202
+ getIdleAgents() {
203
+ const now = Date.now();
204
+ const idle = [];
205
+ for (const [agentId, state] of this.agents.entries()) {
206
+ if (!state.monitoring)
207
+ continue;
208
+ const elapsed = now - state.lastActivity;
209
+ if (elapsed >= this.config.idleThresholdMs) {
210
+ idle.push({ agentId, domain: state.domain, idleSinceMs: elapsed });
211
+ }
212
+ }
213
+ return idle;
214
+ }
215
+ /** Get monitoring statistics. */
216
+ getStats() {
217
+ return {
218
+ monitoredAgents: this.agents.size,
219
+ idleAgents: this.getIdleAgents().length,
220
+ totalIdleEvents: this.stats.totalIdleEvents,
221
+ totalAssigned: this.stats.totalAssigned,
222
+ totalWaits: this.stats.totalWaits,
223
+ };
224
+ }
225
+ // ---------------------------------------------------------------------------
226
+ // Callbacks
227
+ // ---------------------------------------------------------------------------
228
+ /** Register a callback invoked when an agent becomes idle and an action is taken. */
229
+ onIdleCallback(callback) {
230
+ this.idleCb = callback;
231
+ }
232
+ /** Register a callback invoked when a task is successfully assigned to an idle agent. */
233
+ onAssignCallback(callback) {
234
+ this.assignCb = callback;
235
+ }
236
+ // ---------------------------------------------------------------------------
237
+ // Private Helpers
238
+ // ---------------------------------------------------------------------------
239
+ /** Sort tasks by domain preference, priority, then creation time. */
240
+ sortTasks(tasks, agentDomain) {
241
+ return [...tasks].sort((a, b) => {
242
+ if (this.config.preferSameDomain) {
243
+ const aSame = a.domain === agentDomain ? 0 : 1;
244
+ const bSame = b.domain === agentDomain ? 0 : 1;
245
+ if (aSame !== bSame)
246
+ return aSame - bSame;
247
+ }
248
+ const aPri = PRIORITY_ORDER[a.priority] ?? 999;
249
+ const bPri = PRIORITY_ORDER[b.priority] ?? 999;
250
+ if (aPri !== bPri)
251
+ return aPri - bPri;
252
+ return a.createdAt - b.createdAt;
253
+ });
254
+ }
255
+ /** Build a wait result, notify callback, and bump stats. */
256
+ waitResult(agentId, reason) {
257
+ const result = { action: 'wait', reason };
258
+ this.notifyIdle(agentId, result);
259
+ this.stats.totalWaits++;
260
+ return result;
261
+ }
262
+ /** Start the periodic idle check interval if not already running. */
263
+ ensureCheckInterval() {
264
+ if (this.checkInterval !== null)
265
+ return;
266
+ this.checkInterval = setInterval(() => {
267
+ void this.runIdleCheck();
268
+ }, this.checkIntervalMs);
269
+ // Allow the interval to not keep the process alive
270
+ if (this.checkInterval && typeof this.checkInterval === 'object' && 'unref' in this.checkInterval) {
271
+ this.checkInterval.unref();
272
+ }
273
+ }
274
+ /** Clear the periodic idle check interval. */
275
+ clearCheckInterval() {
276
+ if (this.checkInterval !== null) {
277
+ clearInterval(this.checkInterval);
278
+ this.checkInterval = null;
279
+ }
280
+ }
281
+ /** Run idle check across all monitored agents. */
282
+ async runIdleCheck() {
283
+ const now = Date.now();
284
+ for (const [agentId, state] of this.agents.entries()) {
285
+ if (!state.monitoring)
286
+ continue;
287
+ if (now - state.lastActivity >= this.config.idleThresholdMs) {
288
+ try {
289
+ await this.onIdle(agentId);
290
+ }
291
+ catch (err) {
292
+ console.log(`[TeammateIdleHook] Error during idle check for ${agentId}: ${err}`);
293
+ }
294
+ }
295
+ }
296
+ }
297
+ /** Notify the idle callback if registered. */
298
+ notifyIdle(agentId, action) {
299
+ if (this.idleCb) {
300
+ try {
301
+ this.idleCb(agentId, action);
302
+ }
303
+ catch (err) {
304
+ console.log(`[TeammateIdleHook] Idle callback error: ${err}`);
305
+ }
306
+ }
307
+ }
308
+ /** Notify the assign callback if registered. */
309
+ notifyAssign(agentId, taskId, domain) {
310
+ if (this.assignCb) {
311
+ try {
312
+ this.assignCb(agentId, taskId, domain);
313
+ }
314
+ catch (err) {
315
+ console.log(`[TeammateIdleHook] Assign callback error: ${err}`);
316
+ }
317
+ }
318
+ }
319
+ }
320
+ // =============================================================================
321
+ // Factory Function
322
+ // =============================================================================
323
+ /**
324
+ * Create a new TeammateIdleHook with the given configuration and task queue.
325
+ * @param config - Partial configuration (merged with defaults)
326
+ * @param taskQueue - Optional task queue for auto-assignment
327
+ * @returns A new TeammateIdleHook instance
328
+ */
329
+ export function createTeammateIdleHook(config, taskQueue) {
330
+ return new TeammateIdleHook(config, taskQueue);
331
+ }
332
+ //# sourceMappingURL=teammate-idle-hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"teammate-idle-hook.js","sourceRoot":"","sources":["../../src/hooks/teammate-idle-hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAyEH,6DAA6D;AAC7D,MAAM,cAAc,GAA2B,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;AAE9E,MAAM,cAAc,GAA2B;IAC7C,eAAe,EAAE,IAAI;IACrB,UAAU,EAAE,IAAI;IAChB,gBAAgB,EAAE,EAAE;IACpB,iBAAiB,EAAE,CAAC;IACpB,gBAAgB,EAAE,IAAI;IACtB,WAAW,EAAE,SAAS;CACvB,CAAC;AAEF,uDAAuD;AACvD,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAEvC,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;;;;;GAMG;AACH,MAAM,OAAO,gBAAgB;IACV,MAAM,CAAyB;IAC/B,SAAS,CAAmB;IAC5B,MAAM,GAA4B,IAAI,GAAG,EAAE,CAAC;IACrD,aAAa,GAA0C,IAAI,CAAC;IAC5D,eAAe,CAAS;IACxB,MAAM,GAA2D,IAAI,CAAC;IACtE,QAAQ,G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C,MAAM,CAAC,eAAe,EAAE,CAAC;gBAC5D,IAAI,CAAC;oBACH,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC7B,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,OAAO,CAAC,GAAG,CAAC,kDAAkD,OAAO,KAAK,GAAG,EAAE,CAAC,CAAC;gBACnF,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,8CAA8C;IACtC,UAAU,CAAC,OAAe,EAAE,MAAkB;QACpD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC;gBAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAAC,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACjD,OAAO,CAAC,GAAG,CAAC,2CAA2C,GAAG,EAAE,CAAC,CAAC;YAChE,CAAC;QACH,CAAC;IACH,CAAC;IAED,gDAAgD;IACxC,YAAY,CAAC,OAAe,EAAE,MAAc,EAAE,MAAc;QAClE,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC;gBAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;YAAC,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBAC3D,OAAO,CAAC,GAAG,CAAC,6CAA6C,GAAG,EAAE,CAAC,CAAC;YAClE,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAED,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,MAAwC,EACxC,SAAqB;IAErB,OAAO,IAAI,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACjD,CAAC"}
@@ -8,6 +8,9 @@ export * from './shared/events';
8
8
  export * as Entities from './shared/entities';
9
9
  export * from './kernel';
10
10
  export * from './coordination';
11
+ export { CrossPhaseHookExecutor, getCrossPhaseHookExecutor, resetCrossPhaseHookExecutor, TeammateIdleHook, createTeammateIdleHook, TaskCompletedHook, createTaskCompletedHook, QualityGateEnforcer, createQualityGateEnforcer, ReasoningBankPatternStore, createReasoningBankPatternStore, } from './hooks';
12
+ export type { TeammateIdleHookConfig, TaskQueue, PendingTask, TeammateIdleStats, TaskCompletedHookConfig, ExtractedPattern, PatternStore, CompletionAction, CompletionHandler, GateCheckResult, } from './hooks';
13
+ export { DevilsAdvocate, ClaimVerifier } from './agents';
11
14
  export * from './domains';
12
15
  export { MCPServer, createMCPServer, ToolRegistry, createToolRegistry, } from './mcp';
13
16
  export { createQEReasoningBank, QEReasoningBank, RealQEReasoningBank, createRealQEReasoningBank, detectQEDomain, detectQEDomains, mapQEDomainToAQE, QE_DOMAIN_LIST, QE_DOMAINS, } from './learning';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAGhC,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAI9C,cAAc,UAAU,CAAC;AAGzB,cAAc,gBAAgB,CAAC;AAG/B,cAAc,WAAW,CAAC;AAI1B,OAAO,EACL,SAAS,EACT,eAAe,EACf,YAAY,EACZ,kBAAkB,GACnB,MAAM,OAAO,CAAC;AAIf,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,QAAQ,EACR,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,GAChB,MAAM,YAAY,CAAC;AAIpB,OAAO,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AsB,EAGtB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAGtB,eAAO,MAAM,OAAO,EAAE,MAAoB,CAAC;AAC3C,eAAO,MAAM,YAAY,iCAAiC,CAAC;AAC3D,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC;;;;;;;;;;;;;;;;;;GAkBG"}
package/v3/dist/index.js CHANGED
@@ -17,6 +17,10 @@ export * as Entities from './shared/entities';
17
17
  export * from './kernel';
18
18
  // Coordination Layer - export coordination components
19
19
  export * from './coordination';
20
+ // Hooks Layer - cross-phase hooks and ADR-064 agent team hooks
21
+ export { CrossPhaseHookExecutor, getCrossPhaseHookExecutor, resetCrossPhaseHookExecutor, TeammateIdleHook, createTeammateIdleHook, TaskCompletedHook, createTaskCompletedHook, QualityGateEnforcer, createQualityGateEnforcer, ReasoningBankPatternStore, createReasoningBankPatternStore, } from './hooks';
22
+ // Agents Layer - specialized QE agents (namespaced to avoid collisions)
23
+ export { DevilsAdvocate, ClaimVerifier } from './agents';
20
24
  // Domain Interfaces - export as namespaces
21
25
  export * from './domains';
22
26
  // MCP Server - Model Context Protocol integration
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,6CAA6C;AAC7C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEvC,6CAA6C;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAEhC,qDAAqD;AACrD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,yCAAyC;AACzC,gEAAgE;AAChE,cAAc,UAAU,CAAC;AAEzB,sDAAsD;AACtD,cAAc,gBAAgB,CA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CAA+C;AAC/C,OAAO;AACL,WAAW;AACX,aAAa,EACb,mBAAmB,EACnB,2BAA2B,EAC3B,qBAAqB;AACrB,oBAAoB;AACpB,gBAAgB,EAChB,sBAAsB;AACtB,aAAa;AACb,cAAc,EACd,oBAAoB;AACpB,0BAA0B;AAC1B,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB;AAClB,4BAA4B;AAC5B,uBAAuB,EACvB,6BAA6B,EAC7B,yBAAyB;AACzB,SAAS;AACT,2BAA2B,GAC5B,MAAM,gBAAgB,CAAC;AAExB,mEAAmE;AACnE,gEAAgE;AAChE,OAAO;AACL,eAAe;AACf,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB;AAChB,yBAAyB;AACzB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB;AACxB,UAAU;AACV,gBAAgB;AAChB,YAAY;AACZ,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AA0EnC,+EAA+E;AAC/E,sCAAsC;AACtC,+EAA+E;AAE/E,OAAO;AACL,wBAAwB;AACxB,mBAAmB,EACnB,yBAAyB;AAEzB,gBAAgB;AAChB,+BAA+B;AAE/B,YAAY;AACZ,SAAS,EACT,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AAetB,wCAAwC;AACxC,MAAM,CAAC,MAAM,OAAO,GAAW,GAAG,CAAC,OAAO,CAAC;AAC3C,MAAM,CAAC,MAAM,YAAY,GAAG,8BAA8B,CAAC;AAC3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAExC;;;;;;;;;;;;;;;;;;GAkBG"}
@@ -71,6 +71,8 @@ export declare class AgentsInstaller {
71
71
  private copyDirectoryRecursive;
72
72
  /**
73
73
  * Copy helpers directory (agent-specific reference files, templates, scripts)
74
+ * Installed to .claude/helpers/v3/ (NOT .claude/agents/v3/helpers/) to avoid
75
+ * claude doctor parsing .md helper files as agent definitions (Issue #243).
74
76
  */
75
77
  private copyHelpersDirectory;
76
78
  /**
@@ -86,7 +88,9 @@ export declare class AgentsInstaller {
86
88
  */
87
89
  private getAgentDomain;
88
90
  /**
89
- * Create an agents index file for easy reference
91
+ * Create an agents index file for easy reference.
92
+ * Written to .claude/docs/ instead of .claude/agents/v3/ to avoid
93
+ * claude doctor parsing it as an agent definition (Issue #243).
90
94
  */
91
95
  private createAgentsIndex;
92
96
  }
@@ -1 +1 @@
1
- {"version":3,"file":"agents-installer.d.ts","sourceRoot":"","sources":["../../src/init/agents-installer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAiHD,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,OAAO,CAAyB;IACxC,OAAO,CAAC,eAAe,CAAS;gBAEpB,OAAO,EAAE,sBAAsB;IAe3C;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IA4D3B;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,mBAAmB,CAAC;IA4D7C;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA6B1B;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAyCpB;;OAEG;YACW,YAAY;IA0C1B;;OAEG;IACH,OAAO,CAAC,YAAY;IAKpB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAwB9B;;OAEG;YACW,oBAAoB;IASlC;;OAEG;YACW,sBAAsB;IASpC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAyB3B;;OAEG;IACH,OAAO,CAAC,cAAc;IAyDtB;;OAEG;YACW,iBAAiB;CA6DhC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAEtF;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAGrF"}
1
+ {"version":3,"file":"agents-installer.d.ts","sourceRoot":"","sources":["../../src/init/agents-installer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAiHD,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,OAAO,CAAyB;IACxC,OAAO,CAAC,eAAe,CAAS;gBAEpB,OAAO,EAAE,sBAAsB;IAe3C;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IA4D3B;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,mBAAmB,CAAC;IA4D7C;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA6B1B;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAyCpB;;OAEG;YACW,YAAY;IA0C1B;;OAEG;IACH,OAAO,CAAC,YAAY;IAKpB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAwB9B;;;;OAIG;YACW,oBAAoB;IASlC;;OAEG;YACW,sBAAsB;IASpC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAyB3B;;OAEG;IACH,OAAO,CAAC,cAAc;IAyDtB;;;;OAIG;YACW,iBAAiB;CAiEhC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAEtF;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAGrF"}
@@ -360,10 +360,12 @@ export class AgentsInstaller {
360
360
  }
361
361
  /**
362
362
  * Copy helpers directory (agent-specific reference files, templates, scripts)
363
+ * Installed to .claude/helpers/v3/ (NOT .claude/agents/v3/helpers/) to avoid
364
+ * claude doctor parsing .md helper files as agent definitions (Issue #243).
363
365
  */
364
- async copyHelpersDirectory(targetAgentsDir) {
366
+ async copyHelpersDirectory(_targetAgentsDir) {
365
367
  const sourceHelpersDir = join(this.sourceAgentsDir, 'helpers');
366
- const targetHelpersDir = join(targetAgentsDir, 'helpers');
368
+ const targetHelpersDir = join(this.projectRoot, '.claude', 'helpers', 'v3');
367
369
  if (existsSync(sourceHelpersDir)) {
368
370
  this.copyDirectoryRecursive(sourceHelpersDir, targetHelpersDir);
369
371
  }
@@ -464,9 +466,11 @@ export class AgentsInstaller {
464
466
  return domainMap[key];
465
467
  }
466
468
  /**
467
- * Create an agents index file for easy reference
469
+ * Create an agents index file for easy reference.
470
+ * Written to .claude/docs/ instead of .claude/agents/v3/ to avoid
471
+ * claude doctor parsing it as an agent definition (Issue #243).
468
472
  */
469
- async createAgentsIndex(agentsDir, installed) {
473
+ async createAgentsIndex(_agentsDir, installed) {
470
474
  const qeAgents = installed.filter(a => a.type === 'v3-qe');
471
475
  const subagents = installed.filter(a => a.type === 'v3-subagent');
472
476
  // Group QE agents by domain
@@ -522,7 +526,11 @@ ${subagents.map(a => `- **${a.name}**${a.description ? `: ${a.description}` : ''
522
526
 
523
527
  *Generated by AQE v3 init on ${new Date().toISOString()}*
524
528
  `;
525
- writeFileSync(join(agentsDir, 'README.md'), indexContent, 'utf-8');
529
+ const docsDir = join(this.projectRoot, '.claude', 'docs');
530
+ if (!existsSync(docsDir)) {
531
+ mkdirSync(docsDir, { recursive: true });
532
+ }
533
+ writeFileSync(join(docsDir, 'v3-agents-index.md'), indexContent, 'utf-8');
526
534
  }
527
535
  }
528
536
  /**