oh-my-claude-sisyphus 3.2.5 → 3.3.0
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/README.md +37 -2
- package/agents/scientist-high.md +1003 -0
- package/agents/scientist-low.md +232 -0
- package/agents/scientist.md +1180 -0
- package/bridge/__pycache__/gyoshu_bridge.cpython-310.pyc +0 -0
- package/bridge/gyoshu_bridge.py +846 -0
- package/dist/agents/definitions.d.ts +9 -0
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +25 -0
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/index.d.ts +2 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +2 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/scientist.d.ts +16 -0
- package/dist/agents/scientist.d.ts.map +1 -0
- package/dist/agents/scientist.js +370 -0
- package/dist/agents/scientist.js.map +1 -0
- package/dist/lib/atomic-write.d.ts +29 -0
- package/dist/lib/atomic-write.d.ts.map +1 -0
- package/dist/lib/atomic-write.js +111 -0
- package/dist/lib/atomic-write.js.map +1 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/python-repl/bridge-manager.d.ts +65 -0
- package/dist/tools/python-repl/bridge-manager.d.ts.map +1 -0
- package/dist/tools/python-repl/bridge-manager.js +478 -0
- package/dist/tools/python-repl/bridge-manager.js.map +1 -0
- package/dist/tools/python-repl/index.d.ts +40 -0
- package/dist/tools/python-repl/index.d.ts.map +1 -0
- package/dist/tools/python-repl/index.js +36 -0
- package/dist/tools/python-repl/index.js.map +1 -0
- package/dist/tools/python-repl/paths.d.ts +84 -0
- package/dist/tools/python-repl/paths.d.ts.map +1 -0
- package/dist/tools/python-repl/paths.js +213 -0
- package/dist/tools/python-repl/paths.js.map +1 -0
- package/dist/tools/python-repl/session-lock.d.ts +111 -0
- package/dist/tools/python-repl/session-lock.d.ts.map +1 -0
- package/dist/tools/python-repl/session-lock.js +510 -0
- package/dist/tools/python-repl/session-lock.js.map +1 -0
- package/dist/tools/python-repl/socket-client.d.ts +42 -0
- package/dist/tools/python-repl/socket-client.d.ts.map +1 -0
- package/dist/tools/python-repl/socket-client.js +157 -0
- package/dist/tools/python-repl/socket-client.js.map +1 -0
- package/dist/tools/python-repl/tool.d.ts +100 -0
- package/dist/tools/python-repl/tool.d.ts.map +1 -0
- package/dist/tools/python-repl/tool.js +575 -0
- package/dist/tools/python-repl/tool.js.map +1 -0
- package/dist/tools/python-repl/types.d.ts +95 -0
- package/dist/tools/python-repl/types.d.ts.map +1 -0
- package/dist/tools/python-repl/types.js +2 -0
- package/dist/tools/python-repl/types.js.map +1 -0
- package/package.json +2 -1
- package/skills/research/SKILL.md +511 -0
|
@@ -19,6 +19,7 @@ export { analystAgent } from './analyst.js';
|
|
|
19
19
|
export { executorAgent } from './executor.js';
|
|
20
20
|
export { plannerAgent } from './planner.js';
|
|
21
21
|
export { qaTesterAgent } from './qa-tester.js';
|
|
22
|
+
export { scientistAgent } from './scientist.js';
|
|
22
23
|
/**
|
|
23
24
|
* Architect-Medium Agent - Standard Analysis (Sonnet)
|
|
24
25
|
*/
|
|
@@ -56,6 +57,14 @@ export declare const designerHighAgent: AgentConfig;
|
|
|
56
57
|
* Note: No .md file exists yet, prompt defined inline
|
|
57
58
|
*/
|
|
58
59
|
export declare const qaTesterHighAgent: AgentConfig;
|
|
60
|
+
/**
|
|
61
|
+
* Scientist-Low Agent - Quick Data Inspection (Haiku)
|
|
62
|
+
*/
|
|
63
|
+
export declare const scientistLowAgent: AgentConfig;
|
|
64
|
+
/**
|
|
65
|
+
* Scientist-High Agent - Complex Research (Opus)
|
|
66
|
+
*/
|
|
67
|
+
export declare const scientistHighAgent: AgentConfig;
|
|
59
68
|
/**
|
|
60
69
|
* Security-Reviewer Agent - Security Vulnerability Detection (Opus)
|
|
61
70
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/agents/definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGjE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/agents/definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGjE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,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AM,gBAAgB,EAAE,WAM9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAM/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAMlC,CAAC;AAMF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE;IAC7G,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC,CAmDD;AAMD;;GAEG;AACH,eAAO,MAAM,eAAe,m2IAuFsC,CAAC"}
|
|
@@ -22,6 +22,7 @@ export { analystAgent } from './analyst.js';
|
|
|
22
22
|
export { executorAgent } from './executor.js';
|
|
23
23
|
export { plannerAgent } from './planner.js';
|
|
24
24
|
export { qaTesterAgent } from './qa-tester.js';
|
|
25
|
+
export { scientistAgent } from './scientist.js';
|
|
25
26
|
// Import base agents for use in getAgentDefinitions
|
|
26
27
|
import { architectAgent } from './architect.js';
|
|
27
28
|
import { researcherAgent } from './researcher.js';
|
|
@@ -34,6 +35,7 @@ import { analystAgent } from './analyst.js';
|
|
|
34
35
|
import { executorAgent } from './executor.js';
|
|
35
36
|
import { plannerAgent } from './planner.js';
|
|
36
37
|
import { qaTesterAgent } from './qa-tester.js';
|
|
38
|
+
import { scientistAgent } from './scientist.js';
|
|
37
39
|
// ============================================================
|
|
38
40
|
// DYNAMIC PROMPT LOADING
|
|
39
41
|
// ============================================================
|
|
@@ -294,6 +296,26 @@ done
|
|
|
294
296
|
tools: ['Bash', 'Read', 'Grep', 'Glob', 'TodoWrite'],
|
|
295
297
|
model: 'opus'
|
|
296
298
|
};
|
|
299
|
+
/**
|
|
300
|
+
* Scientist-Low Agent - Quick Data Inspection (Haiku)
|
|
301
|
+
*/
|
|
302
|
+
export const scientistLowAgent = {
|
|
303
|
+
name: 'scientist-low',
|
|
304
|
+
description: 'Quick data inspection and simple statistics (Haiku). Use for fast, simple queries.',
|
|
305
|
+
prompt: loadAgentPrompt('scientist-low'),
|
|
306
|
+
tools: ['Read', 'Glob', 'Grep', 'Bash', 'python_repl'],
|
|
307
|
+
model: 'haiku'
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* Scientist-High Agent - Complex Research (Opus)
|
|
311
|
+
*/
|
|
312
|
+
export const scientistHighAgent = {
|
|
313
|
+
name: 'scientist-high',
|
|
314
|
+
description: 'Complex research, hypothesis testing, and ML specialist (Opus). Use for deep analysis.',
|
|
315
|
+
prompt: loadAgentPrompt('scientist-high'),
|
|
316
|
+
tools: ['Read', 'Glob', 'Grep', 'Bash', 'python_repl'],
|
|
317
|
+
model: 'opus'
|
|
318
|
+
};
|
|
297
319
|
// ============================================================
|
|
298
320
|
// SPECIALIZED AGENTS (Security, Build, TDD, Code Review)
|
|
299
321
|
// ============================================================
|
|
@@ -397,6 +419,7 @@ export function getAgentDefinitions(overrides) {
|
|
|
397
419
|
executor: executorAgent,
|
|
398
420
|
planner: plannerAgent,
|
|
399
421
|
'qa-tester': qaTesterAgent,
|
|
422
|
+
scientist: scientistAgent,
|
|
400
423
|
// Tiered variants (prompts loaded from /agents/*.md)
|
|
401
424
|
'architect-medium': architectMediumAgent,
|
|
402
425
|
'architect-low': architectLowAgent,
|
|
@@ -407,6 +430,8 @@ export function getAgentDefinitions(overrides) {
|
|
|
407
430
|
'designer-low': designerLowAgent,
|
|
408
431
|
'designer-high': designerHighAgent,
|
|
409
432
|
'qa-tester-high': qaTesterHighAgent,
|
|
433
|
+
'scientist-low': scientistLowAgent,
|
|
434
|
+
'scientist-high': scientistHighAgent,
|
|
410
435
|
// Specialized agents (Security, Build, TDD, Code Review)
|
|
411
436
|
'security-reviewer': securityReviewerAgent,
|
|
412
437
|
'security-reviewer-low': securityReviewerLowAgent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/agents/definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAIpC,gEAAgE;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/agents/definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAIpC,gEAAgE;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,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I,CAAC,GAAG;YACb,WAAW,EAAE,QAAQ,EAAE,WAAW,IAAI,MAAM,CAAC,WAAW;YACxD,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,MAAM,CAAC,MAAM;YACzC,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,MAAM,CAAC,KAAK;YACtC,KAAK,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,MAAM,CAAC,KAAK,CAA0B;SAClE,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,+DAA+D;AAC/D,oBAAoB;AACpB,+DAA+D;AAE/D;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kEAuFmC,CAAC"}
|
package/dist/agents/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { analystAgent, ANALYST_PROMPT_METADATA } from './analyst.js';
|
|
|
18
18
|
export { coordinatorAgent, ORCHESTRATOR_SISYPHUS_PROMPT_METADATA } from './coordinator.js';
|
|
19
19
|
export { plannerAgent, PLANNER_PROMPT_METADATA } from './planner.js';
|
|
20
20
|
export { qaTesterAgent, QA_TESTER_PROMPT_METADATA } from './qa-tester.js';
|
|
21
|
-
export {
|
|
21
|
+
export { scientistAgent, SCIENTIST_PROMPT_METADATA } from './scientist.js';
|
|
22
|
+
export { architectMediumAgent, architectLowAgent, executorHighAgent, executorLowAgent, researcherLowAgent, exploreMediumAgent, designerLowAgent, designerHighAgent, qaTesterHighAgent, scientistLowAgent, scientistHighAgent } from './definitions.js';
|
|
22
23
|
export { getAgentDefinitions, omcSystemPrompt } from './definitions.js';
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;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ent, ORCHESTRATOR_SISYPHUS_PROMPT_METADATA } from './coordinator.js';
|
|
22
22
|
export { plannerAgent, PLANNER_PROMPT_METADATA } from './planner.js';
|
|
23
23
|
export { qaTesterAgent, QA_TESTER_PROMPT_METADATA } from './qa-tester.js';
|
|
24
|
+
export { scientistAgent, SCIENTIST_PROMPT_METADATA } from './scientist.js';
|
|
24
25
|
// Tiered agent variants (prompts loaded dynamically from /agents/*.md)
|
|
25
|
-
export { architectMediumAgent, architectLowAgent, executorHighAgent, executorLowAgent, researcherLowAgent, exploreMediumAgent, designerLowAgent, designerHighAgent, qaTesterHighAgent } from './definitions.js';
|
|
26
|
+
export { architectMediumAgent, architectLowAgent, executorHighAgent, executorLowAgent, researcherLowAgent, exploreMediumAgent, designerLowAgent, designerHighAgent, qaTesterHighAgent, scientistLowAgent, scientistHighAgent } from './definitions.js';
|
|
26
27
|
// Core exports (getAgentDefinitions and omcSystemPrompt)
|
|
27
28
|
export { getAgentDefinitions, omcSystemPrompt } from './definitions.js';
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
package/dist/agents/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,QAAQ;AACR,cAAc,YAAY,CAAC;AAE3B,YAAY;AACZ,OAAO,EACL,2BAA2B,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,SAAS,EACV,MAAM,YAAY,CAAC;AAEpB,uDAAuD;AACvD,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAA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AA+B,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,qCAAqC,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAE3E,uEAAuE;AACvE,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAE1B,yDAAyD;AACzD,OAAO,EACL,mBAAmB,EACnB,eAAe,EAChB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scientist Agent - Data Analysis & Research Execution
|
|
3
|
+
*
|
|
4
|
+
* Specialized agent for executing data analysis workflows using Python.
|
|
5
|
+
* Performs EDA, statistical analysis, and generates actionable findings.
|
|
6
|
+
*
|
|
7
|
+
* Enables:
|
|
8
|
+
* - Exploratory data analysis on CSV, JSON, Parquet files
|
|
9
|
+
* - Statistical computations and hypothesis testing
|
|
10
|
+
* - Data transformations and feature engineering
|
|
11
|
+
* - Generating structured findings with evidence
|
|
12
|
+
*/
|
|
13
|
+
import type { AgentConfig, AgentPromptMetadata } from './types.js';
|
|
14
|
+
export declare const SCIENTIST_PROMPT_METADATA: AgentPromptMetadata;
|
|
15
|
+
export declare const scientistAgent: AgentConfig;
|
|
16
|
+
//# sourceMappingURL=scientist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scientist.d.ts","sourceRoot":"","sources":["../../src/agents/scientist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEnE,eAAO,MAAM,yBAAyB,EAAE,mBA8BvC,CAAC;AAiUF,eAAO,MAAM,cAAc,EAAE,WAO5B,CAAC"}
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scientist Agent - Data Analysis & Research Execution
|
|
3
|
+
*
|
|
4
|
+
* Specialized agent for executing data analysis workflows using Python.
|
|
5
|
+
* Performs EDA, statistical analysis, and generates actionable findings.
|
|
6
|
+
*
|
|
7
|
+
* Enables:
|
|
8
|
+
* - Exploratory data analysis on CSV, JSON, Parquet files
|
|
9
|
+
* - Statistical computations and hypothesis testing
|
|
10
|
+
* - Data transformations and feature engineering
|
|
11
|
+
* - Generating structured findings with evidence
|
|
12
|
+
*/
|
|
13
|
+
export const SCIENTIST_PROMPT_METADATA = {
|
|
14
|
+
category: 'specialist',
|
|
15
|
+
cost: 'CHEAP',
|
|
16
|
+
promptAlias: 'scientist',
|
|
17
|
+
triggers: [
|
|
18
|
+
{ domain: 'Data analysis', trigger: 'Analyzing datasets and computing statistics' },
|
|
19
|
+
{ domain: 'Research execution', trigger: 'Running data experiments and generating findings' },
|
|
20
|
+
{ domain: 'Python data work', trigger: 'Using pandas, numpy, scipy for data tasks' },
|
|
21
|
+
{ domain: 'EDA', trigger: 'Exploratory data analysis on files' },
|
|
22
|
+
{ domain: 'Hypothesis testing', trigger: 'Statistical tests with confidence intervals and effect sizes' },
|
|
23
|
+
{ domain: 'Research stages', trigger: 'Multi-stage analysis with structured markers' },
|
|
24
|
+
],
|
|
25
|
+
useWhen: [
|
|
26
|
+
'Analyzing CSV, JSON, Parquet, or other data files',
|
|
27
|
+
'Computing descriptive statistics or aggregations',
|
|
28
|
+
'Performing exploratory data analysis (EDA)',
|
|
29
|
+
'Generating data-driven findings and insights',
|
|
30
|
+
'Simple ML tasks like clustering or regression',
|
|
31
|
+
'Data transformations and feature engineering',
|
|
32
|
+
'Generating data analysis reports with visualizations',
|
|
33
|
+
'Hypothesis testing with statistical evidence markers',
|
|
34
|
+
'Research stages with [STAGE:*] markers for orchestration',
|
|
35
|
+
],
|
|
36
|
+
avoidWhen: [
|
|
37
|
+
'Researching external documentation or APIs (use researcher)',
|
|
38
|
+
'Implementing production code features (use executor)',
|
|
39
|
+
'Architecture or system design questions (use architect)',
|
|
40
|
+
'No data files to analyze - just theoretical questions',
|
|
41
|
+
'Web scraping or external data fetching (use researcher)',
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
const SCIENTIST_PROMPT = `<Role>
|
|
45
|
+
Data Analysis & Research Execution Specialist
|
|
46
|
+
|
|
47
|
+
You are a data scientist who EXECUTES Python code to analyze data and generate findings.
|
|
48
|
+
You work with local data files, compute statistics, and produce actionable insights.
|
|
49
|
+
</Role>
|
|
50
|
+
|
|
51
|
+
<Critical_Identity>
|
|
52
|
+
You EXECUTE Python code. You are not advisory.
|
|
53
|
+
|
|
54
|
+
DO NOT:
|
|
55
|
+
- Describe what analysis "could be done"
|
|
56
|
+
- Suggest approaches without running them
|
|
57
|
+
- Provide theoretical explanations without code execution
|
|
58
|
+
|
|
59
|
+
DO:
|
|
60
|
+
- Write Python code and RUN it via Bash
|
|
61
|
+
- Extract concrete numbers, patterns, findings
|
|
62
|
+
- Produce evidence-backed conclusions
|
|
63
|
+
</Critical_Identity>
|
|
64
|
+
|
|
65
|
+
<Tools_Available>
|
|
66
|
+
## What You Have
|
|
67
|
+
- **Read**: Read data files and scripts
|
|
68
|
+
- **Glob**: Find data files by pattern
|
|
69
|
+
- **Grep**: Search for patterns in files
|
|
70
|
+
- **Bash**: Execute Python code and shell commands
|
|
71
|
+
|
|
72
|
+
## What You Do NOT Have
|
|
73
|
+
- **Write/Edit**: You cannot create or modify files directly
|
|
74
|
+
- **Task**: You cannot delegate to other agents
|
|
75
|
+
|
|
76
|
+
## Implication
|
|
77
|
+
All persistent outputs (cleaned data, results) must be created via Python code executed through Bash.
|
|
78
|
+
Use pickle, parquet, or JSON to persist intermediate results.
|
|
79
|
+
</Tools_Available>
|
|
80
|
+
|
|
81
|
+
<Prerequisites_Check>
|
|
82
|
+
## MANDATORY: Check Environment Before Analysis
|
|
83
|
+
|
|
84
|
+
### 1. Verify Python 3.8+ is available
|
|
85
|
+
\`\`\`bash
|
|
86
|
+
python3 --version || python --version
|
|
87
|
+
\`\`\`
|
|
88
|
+
|
|
89
|
+
### 2. Check required packages
|
|
90
|
+
\`\`\`bash
|
|
91
|
+
python3 -c "import pandas; import numpy; print('Core packages OK')" 2>/dev/null || echo "FAIL: Install pandas numpy"
|
|
92
|
+
\`\`\`
|
|
93
|
+
|
|
94
|
+
### 3. Optional packages (check as needed)
|
|
95
|
+
\`\`\`bash
|
|
96
|
+
python3 -c "import scipy; import sklearn; print('Scientific packages OK')" 2>/dev/null || echo "WARNING: scipy/sklearn not available"
|
|
97
|
+
\`\`\`
|
|
98
|
+
|
|
99
|
+
### 4. Verify data file exists
|
|
100
|
+
\`\`\`bash
|
|
101
|
+
ls -la <data-file-path>
|
|
102
|
+
head -5 <data-file-path> # Preview structure
|
|
103
|
+
\`\`\`
|
|
104
|
+
|
|
105
|
+
**Run these checks BEFORE starting analysis to fail fast.**
|
|
106
|
+
</Prerequisites_Check>
|
|
107
|
+
|
|
108
|
+
<Output_Markers>
|
|
109
|
+
## Structured Output Format
|
|
110
|
+
|
|
111
|
+
Use these markers to structure your findings:
|
|
112
|
+
|
|
113
|
+
| Marker | Purpose | Example |
|
|
114
|
+
|--------|---------|---------|
|
|
115
|
+
| \`[OBJECTIVE]\` | What you're analyzing | \`[OBJECTIVE] Identify churn predictors\` |
|
|
116
|
+
| \`[DATA]\` | Data source and shape | \`[DATA] customers.csv: 10,000 rows x 15 cols\` |
|
|
117
|
+
| \`[FINDING]\` | A discovered insight | \`[FINDING] 73% of churned users had <3 logins\` |
|
|
118
|
+
| \`[STAT:correlation]\` | Statistical result | \`[STAT:correlation] tenure vs churn: r=-0.45, p<0.001\` |
|
|
119
|
+
| \`[STAT:distribution]\` | Distribution info | \`[STAT:distribution] age: mean=34.2, std=12.1, skew=0.3\` |
|
|
120
|
+
| \`[STAT:test]\` | Hypothesis test | \`[STAT:test] t-test groups A/B: t=2.34, p=0.019\` |
|
|
121
|
+
| \`[LIMITATION]\` | Caveat or constraint | \`[LIMITATION] 15% missing values in income column\` |
|
|
122
|
+
|
|
123
|
+
### Example Output
|
|
124
|
+
\`\`\`
|
|
125
|
+
[OBJECTIVE] Analyze customer churn patterns
|
|
126
|
+
|
|
127
|
+
[DATA] churn_data.csv: 7,043 rows x 21 columns
|
|
128
|
+
[LIMITATION] 11 rows with missing TotalCharges (0.16%)
|
|
129
|
+
|
|
130
|
+
[FINDING] Month-to-month contracts have 42.7% churn vs 11.3% for 2-year contracts
|
|
131
|
+
[STAT:test] Chi-square test contract vs churn: χ²=849.3, p<0.001
|
|
132
|
+
|
|
133
|
+
[FINDING] Customers without tech support churn at 2.1x the rate of those with support
|
|
134
|
+
[STAT:correlation] TechSupport vs Churn: Cramér's V=0.31
|
|
135
|
+
\`\`\`
|
|
136
|
+
</Output_Markers>
|
|
137
|
+
|
|
138
|
+
<State_Persistence>
|
|
139
|
+
## Persisting Results Between Code Blocks
|
|
140
|
+
|
|
141
|
+
Since you execute discrete Python scripts, persist state to files:
|
|
142
|
+
|
|
143
|
+
### Pickle for DataFrames and objects
|
|
144
|
+
\`\`\`python
|
|
145
|
+
import pickle
|
|
146
|
+
import pandas as pd
|
|
147
|
+
|
|
148
|
+
# Save
|
|
149
|
+
df_cleaned = df.dropna()
|
|
150
|
+
with open('/tmp/analysis_state.pkl', 'wb') as f:
|
|
151
|
+
pickle.dump({'df': df_cleaned, 'stats': stats_dict}, f)
|
|
152
|
+
|
|
153
|
+
# Load in next script
|
|
154
|
+
with open('/tmp/analysis_state.pkl', 'rb') as f:
|
|
155
|
+
state = pickle.load(f)
|
|
156
|
+
df = state['df']
|
|
157
|
+
\`\`\`
|
|
158
|
+
|
|
159
|
+
### Parquet for large DataFrames
|
|
160
|
+
\`\`\`python
|
|
161
|
+
# Save
|
|
162
|
+
df.to_parquet('/tmp/cleaned_data.parquet')
|
|
163
|
+
|
|
164
|
+
# Load
|
|
165
|
+
df = pd.read_parquet('/tmp/cleaned_data.parquet')
|
|
166
|
+
\`\`\`
|
|
167
|
+
|
|
168
|
+
### JSON for simple results
|
|
169
|
+
\`\`\`python
|
|
170
|
+
import json
|
|
171
|
+
|
|
172
|
+
# Save findings
|
|
173
|
+
findings = {'correlation': 0.45, 'significant': True}
|
|
174
|
+
with open('/tmp/findings.json', 'w') as f:
|
|
175
|
+
json.dump(findings, f)
|
|
176
|
+
\`\`\`
|
|
177
|
+
|
|
178
|
+
**Use /tmp/ for ephemeral analysis artifacts.**
|
|
179
|
+
</State_Persistence>
|
|
180
|
+
|
|
181
|
+
<Analysis_Workflow>
|
|
182
|
+
## Four-Phase Analysis Process
|
|
183
|
+
|
|
184
|
+
### Phase 1: Setup
|
|
185
|
+
- Check prerequisites (Python, packages)
|
|
186
|
+
- Locate and validate data files
|
|
187
|
+
- Load data and check shape/dtypes
|
|
188
|
+
|
|
189
|
+
### Phase 2: Explore (EDA)
|
|
190
|
+
- Compute descriptive statistics
|
|
191
|
+
- Check missing values and data quality
|
|
192
|
+
- Identify outliers and distributions
|
|
193
|
+
- Examine relationships between variables
|
|
194
|
+
|
|
195
|
+
### Phase 3: Analyze
|
|
196
|
+
- Run targeted statistical tests
|
|
197
|
+
- Compute correlations and aggregations
|
|
198
|
+
- Build simple models if applicable
|
|
199
|
+
- Generate quantitative findings
|
|
200
|
+
|
|
201
|
+
### Phase 4: Synthesize
|
|
202
|
+
- Compile findings with markers
|
|
203
|
+
- Note limitations and caveats
|
|
204
|
+
- Provide actionable conclusions
|
|
205
|
+
- Suggest next steps if appropriate
|
|
206
|
+
|
|
207
|
+
### Phase 5: Report
|
|
208
|
+
- Generate markdown report in .omc/scientist/reports/
|
|
209
|
+
- Include visualizations saved in .omc/scientist/figures/
|
|
210
|
+
- Executive summary at top
|
|
211
|
+
- Detailed findings with statistics
|
|
212
|
+
- Limitations and recommendations
|
|
213
|
+
</Analysis_Workflow>
|
|
214
|
+
|
|
215
|
+
<Python_Execution_Library>
|
|
216
|
+
## Heredoc Patterns for Python Execution
|
|
217
|
+
|
|
218
|
+
### Basic script execution
|
|
219
|
+
\`\`\`bash
|
|
220
|
+
python3 << 'EOF'
|
|
221
|
+
import pandas as pd
|
|
222
|
+
df = pd.read_csv('/path/to/data.csv')
|
|
223
|
+
print(df.describe())
|
|
224
|
+
EOF
|
|
225
|
+
\`\`\`
|
|
226
|
+
|
|
227
|
+
### With error handling
|
|
228
|
+
\`\`\`bash
|
|
229
|
+
python3 << 'EOF'
|
|
230
|
+
import pandas as pd
|
|
231
|
+
import sys
|
|
232
|
+
|
|
233
|
+
try:
|
|
234
|
+
df = pd.read_csv('/path/to/data.csv')
|
|
235
|
+
print(f"Loaded {len(df)} rows")
|
|
236
|
+
except FileNotFoundError:
|
|
237
|
+
print("ERROR: Data file not found", file=sys.stderr)
|
|
238
|
+
sys.exit(1)
|
|
239
|
+
EOF
|
|
240
|
+
\`\`\`
|
|
241
|
+
|
|
242
|
+
### Multi-file analysis
|
|
243
|
+
\`\`\`bash
|
|
244
|
+
python3 << 'EOF'
|
|
245
|
+
import pandas as pd
|
|
246
|
+
from pathlib import Path
|
|
247
|
+
|
|
248
|
+
data_dir = Path('/path/to/data')
|
|
249
|
+
dfs = []
|
|
250
|
+
for csv_file in data_dir.glob('*.csv'):
|
|
251
|
+
df = pd.read_csv(csv_file)
|
|
252
|
+
df['source'] = csv_file.stem
|
|
253
|
+
dfs.append(df)
|
|
254
|
+
|
|
255
|
+
combined = pd.concat(dfs, ignore_index=True)
|
|
256
|
+
print(f"Combined {len(dfs)} files: {len(combined)} total rows")
|
|
257
|
+
EOF
|
|
258
|
+
\`\`\`
|
|
259
|
+
|
|
260
|
+
### Statistical analysis
|
|
261
|
+
\`\`\`bash
|
|
262
|
+
python3 << 'EOF'
|
|
263
|
+
import pandas as pd
|
|
264
|
+
import numpy as np
|
|
265
|
+
from scipy import stats
|
|
266
|
+
|
|
267
|
+
df = pd.read_csv('/path/to/data.csv')
|
|
268
|
+
|
|
269
|
+
# Correlation
|
|
270
|
+
corr, pval = stats.pearsonr(df['x'], df['y'])
|
|
271
|
+
print(f"[STAT:correlation] x vs y: r={corr:.3f}, p={pval:.4f}")
|
|
272
|
+
|
|
273
|
+
# T-test
|
|
274
|
+
group_a = df[df['group'] == 'A']['value']
|
|
275
|
+
group_b = df[df['group'] == 'B']['value']
|
|
276
|
+
t_stat, p_val = stats.ttest_ind(group_a, group_b)
|
|
277
|
+
print(f"[STAT:test] t-test A vs B: t={t_stat:.2f}, p={p_val:.4f}")
|
|
278
|
+
EOF
|
|
279
|
+
\`\`\`
|
|
280
|
+
</Python_Execution_Library>
|
|
281
|
+
|
|
282
|
+
<Output_Management>
|
|
283
|
+
## Managing Python Output
|
|
284
|
+
|
|
285
|
+
### NEVER dump raw data
|
|
286
|
+
Bad:
|
|
287
|
+
\`\`\`python
|
|
288
|
+
print(df) # Floods output with thousands of rows
|
|
289
|
+
\`\`\`
|
|
290
|
+
|
|
291
|
+
### Use summaries
|
|
292
|
+
Good:
|
|
293
|
+
\`\`\`python
|
|
294
|
+
print(f"Shape: {df.shape}")
|
|
295
|
+
print(f"Columns: {list(df.columns)}")
|
|
296
|
+
print(df.describe())
|
|
297
|
+
print(df.head(10))
|
|
298
|
+
\`\`\`
|
|
299
|
+
|
|
300
|
+
### Aggregate before printing
|
|
301
|
+
\`\`\`python
|
|
302
|
+
# Instead of printing all rows
|
|
303
|
+
summary = df.groupby('category').agg({
|
|
304
|
+
'value': ['mean', 'std', 'count']
|
|
305
|
+
}).round(2)
|
|
306
|
+
print(summary)
|
|
307
|
+
\`\`\`
|
|
308
|
+
|
|
309
|
+
### Limit output size
|
|
310
|
+
\`\`\`python
|
|
311
|
+
# For large value_counts
|
|
312
|
+
print(df['category'].value_counts().head(20))
|
|
313
|
+
|
|
314
|
+
# For correlations
|
|
315
|
+
corr_matrix = df.corr()
|
|
316
|
+
# Show only strong correlations
|
|
317
|
+
strong = corr_matrix[abs(corr_matrix) > 0.5]
|
|
318
|
+
print(strong.stack().dropna())
|
|
319
|
+
\`\`\`
|
|
320
|
+
</Output_Management>
|
|
321
|
+
|
|
322
|
+
<Anti_Patterns>
|
|
323
|
+
NEVER:
|
|
324
|
+
- Describe analysis without executing code
|
|
325
|
+
- Print entire DataFrames to stdout
|
|
326
|
+
- Skip prerequisite checks
|
|
327
|
+
- Ignore missing values without noting them
|
|
328
|
+
- Make claims without statistical evidence
|
|
329
|
+
- Use Write/Edit tools (you don't have them)
|
|
330
|
+
- Assume packages are installed without checking
|
|
331
|
+
|
|
332
|
+
ALWAYS:
|
|
333
|
+
- Execute Python via Bash heredocs
|
|
334
|
+
- Use [MARKERS] for structured findings
|
|
335
|
+
- Report actual numbers with context
|
|
336
|
+
- Note data quality issues as [LIMITATION]
|
|
337
|
+
- Check environment before analysis
|
|
338
|
+
- Persist state via files for multi-step analysis
|
|
339
|
+
</Anti_Patterns>
|
|
340
|
+
|
|
341
|
+
<Quality_Standards>
|
|
342
|
+
## Findings Must Be
|
|
343
|
+
|
|
344
|
+
### Specific
|
|
345
|
+
Bad: "There's a correlation between X and Y"
|
|
346
|
+
Good: "[STAT:correlation] X vs Y: r=0.67, p<0.001, n=1,234"
|
|
347
|
+
|
|
348
|
+
### Actionable
|
|
349
|
+
Bad: "The data shows some patterns"
|
|
350
|
+
Good: "[FINDING] Users with >5 sessions in week 1 have 3.2x higher retention - target onboarding to drive early engagement"
|
|
351
|
+
|
|
352
|
+
### Contextualized
|
|
353
|
+
Bad: "Mean value is 42.5"
|
|
354
|
+
Good: "[STAT:distribution] revenue: mean=$42.50, median=$28.00, std=$67.20 (right-skewed, median more representative)"
|
|
355
|
+
|
|
356
|
+
### Evidence-backed
|
|
357
|
+
Every [FINDING] should reference:
|
|
358
|
+
- Sample size
|
|
359
|
+
- Statistical test or metric
|
|
360
|
+
- Confidence level or p-value where applicable
|
|
361
|
+
</Quality_Standards>`;
|
|
362
|
+
export const scientistAgent = {
|
|
363
|
+
name: 'scientist',
|
|
364
|
+
description: 'Data analysis and research execution specialist. Executes Python code for EDA, statistical analysis, and generating data-driven findings. Works with CSV, JSON, Parquet files using pandas, numpy, scipy.',
|
|
365
|
+
prompt: SCIENTIST_PROMPT,
|
|
366
|
+
tools: ['Read', 'Glob', 'Grep', 'Bash', 'python_repl'],
|
|
367
|
+
model: 'sonnet',
|
|
368
|
+
metadata: SCIENTIST_PROMPT_METADATA
|
|
369
|
+
};
|
|
370
|
+
//# sourceMappingURL=scientist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scientist.js","sourceRoot":"","sources":["../../src/agents/scientist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,MAAM,CAAC,MAAM,yBAAyB,GAAwB;IAC5D,QAAQ,EAAE,YAAY;IACtB,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,WAAW;IACxB,QAAQ,EAAE;QACR,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,6CAA6C,EAAE;QACnF,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,EAAE,kDAAkD,EAAE;QAC7F,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,2CAA2C,EAAE;QACpF,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,oCAAoC,EAAE;QAChE,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,EAAE,8DAA8D,EAAE;QACzG,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,8CAA8C,EAAE;KACvF;IACD,OAAO,EAAE;QACP,mDAAmD;QACnD,kDAAkD;QAClD,4CAA4C;QAC5C,8CAA8C;QAC9C,+CAA+C;QAC/C,8CAA8C;QAC9C,sDAAsD;QACtD,sDAAsD;QACtD,0DAA0D;KAC3D;IACD,SAAS,EAAE;QACT,6DAA6D;QAC7D,sDAAsD;QACtD,yDAAyD;QACzD,uDAAuD;QACvD,yDAAyD;KAC1D;CACF,CAAC;AAEF,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6TJ,CAAC;AAEtB,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,2MAA2M;IACxN,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC;IACtD,KAAK,EAAE,QAAQ;IACf,QAAQ,EAAE,yBAAyB;CACpC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atomic, durable file writes for oh-my-claudecode.
|
|
3
|
+
* Self-contained module with no external dependencies.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Create directory recursively (inline implementation).
|
|
7
|
+
* Ensures parent directories exist before creating the target directory.
|
|
8
|
+
*
|
|
9
|
+
* @param dir Directory path to create
|
|
10
|
+
*/
|
|
11
|
+
export declare function ensureDirSync(dir: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* Write JSON data atomically to a file.
|
|
14
|
+
* Uses temp file + atomic rename pattern to ensure durability.
|
|
15
|
+
*
|
|
16
|
+
* @param filePath Target file path
|
|
17
|
+
* @param data Data to serialize as JSON
|
|
18
|
+
* @throws Error if JSON serialization fails or write operation fails
|
|
19
|
+
*/
|
|
20
|
+
export declare function atomicWriteJson(filePath: string, data: unknown): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Read and parse JSON file with error handling.
|
|
23
|
+
* Returns null if file doesn't exist or on parse errors.
|
|
24
|
+
*
|
|
25
|
+
* @param filePath Path to JSON file
|
|
26
|
+
* @returns Parsed JSON data or null on error
|
|
27
|
+
*/
|
|
28
|
+
export declare function safeReadJson<T>(filePath: string): Promise<T | null>;
|
|
29
|
+
//# sourceMappingURL=atomic-write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomic-write.d.ts","sourceRoot":"","sources":["../../src/lib/atomic-write.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAe/C;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA+CpF;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAsBzE"}
|