@compilr-dev/sdk 0.5.4 → 0.5.5
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/dist/team/types.d.ts +3 -3
- package/dist/team/types.js +258 -0
- package/package.json +2 -1
package/dist/team/types.d.ts
CHANGED
|
@@ -29,15 +29,15 @@ export interface BackgroundSessionInfo {
|
|
|
29
29
|
/**
|
|
30
30
|
* Mascot expressions for visual differentiation of agents
|
|
31
31
|
*/
|
|
32
|
-
export type MascotExpression = '[•_•]' | '[◈_◈]' | '[▣_▣]' | '[◉_◉]' | '[▲_▲]' | '[◆_◆]' | '[○_○]' | '[◇_◇]' | '[□_□]';
|
|
32
|
+
export type MascotExpression = '[•_•]' | '[◈_◈]' | '[▣_▣]' | '[◉_◉]' | '[▲_▲]' | '[◆_◆]' | '[○_○]' | '[◇_◇]' | '[◎_◎]' | '[⊘_⊘]' | '[✎_✎]' | '[◒_◒]' | '[◔_◔]' | '[◓_◓]' | '[◕_◕]' | '[□_□]';
|
|
33
33
|
/**
|
|
34
34
|
* Predefined agent roles with default configurations
|
|
35
35
|
*/
|
|
36
|
-
export type AgentRole = 'default' | 'pm' | 'arch' | 'qa' | 'dev' | 'ops' | 'docs' | 'ba' | 'custom';
|
|
36
|
+
export type AgentRole = 'default' | 'pm' | 'arch' | 'qa' | 'dev' | 'ops' | 'docs' | 'ba' | 'researcher' | 'reviewer' | 'editor' | 'writer' | 'analyst' | 'strategist' | 'instructor' | 'custom';
|
|
37
37
|
/**
|
|
38
38
|
* List of predefined role IDs (for validation against custom agent IDs)
|
|
39
39
|
*/
|
|
40
|
-
export declare const PREDEFINED_ROLE_IDS: readonly ["default", "pm", "arch", "qa", "dev", "ops", "docs", "ba"];
|
|
40
|
+
export declare const PREDEFINED_ROLE_IDS: readonly ["default", "pm", "arch", "qa", "dev", "ops", "docs", "ba", "researcher", "reviewer", "editor", "writer", "analyst", "strategist", "instructor"];
|
|
41
41
|
/**
|
|
42
42
|
* Role metadata for predefined roles
|
|
43
43
|
*/
|
package/dist/team/types.js
CHANGED
|
@@ -15,6 +15,13 @@ export const PREDEFINED_ROLE_IDS = [
|
|
|
15
15
|
'ops',
|
|
16
16
|
'docs',
|
|
17
17
|
'ba',
|
|
18
|
+
'researcher',
|
|
19
|
+
'reviewer',
|
|
20
|
+
'editor',
|
|
21
|
+
'writer',
|
|
22
|
+
'analyst',
|
|
23
|
+
'strategist',
|
|
24
|
+
'instructor',
|
|
18
25
|
];
|
|
19
26
|
/**
|
|
20
27
|
* Role expertise keywords for team awareness
|
|
@@ -41,6 +48,13 @@ export const ROLE_EXPERTISE = {
|
|
|
41
48
|
'business analysis',
|
|
42
49
|
'stakeholder communication',
|
|
43
50
|
],
|
|
51
|
+
researcher: ['source analysis', 'literature review', 'evidence evaluation', 'citation', 'synthesis'],
|
|
52
|
+
reviewer: ['argument validation', 'consistency checking', 'gap detection', 'peer review'],
|
|
53
|
+
editor: ['writing quality', 'grammar', 'style', 'clarity', 'tone'],
|
|
54
|
+
writer: ['content creation', 'drafting', 'storytelling', 'copywriting'],
|
|
55
|
+
analyst: ['market research', 'data analysis', 'competitive intelligence', 'trends'],
|
|
56
|
+
strategist: ['business strategy', 'vision', 'go-to-market', 'planning'],
|
|
57
|
+
instructor: ['curriculum design', 'lesson planning', 'assessment', 'pedagogy'],
|
|
44
58
|
custom: [], // User-defined
|
|
45
59
|
};
|
|
46
60
|
/**
|
|
@@ -628,6 +642,250 @@ Acceptance Criteria:
|
|
|
628
642
|
defaultToolProfile: 'analyst',
|
|
629
643
|
defaultModelTier: 'balanced',
|
|
630
644
|
},
|
|
645
|
+
researcher: {
|
|
646
|
+
displayName: 'Researcher',
|
|
647
|
+
mascot: '[◎_◎]',
|
|
648
|
+
description: 'Deep analysis of sources, literature synthesis, evidence evaluation',
|
|
649
|
+
defaultSystemPromptAddition: `# ROLE: RESEARCHER
|
|
650
|
+
|
|
651
|
+
You are the **Researcher** in this multi-agent research team. You specialize in finding, reading, analyzing, and synthesizing academic sources.
|
|
652
|
+
|
|
653
|
+
## Your Specialty Areas
|
|
654
|
+
|
|
655
|
+
**Source Analysis:**
|
|
656
|
+
- Read and analyze academic papers, articles, and other reference material
|
|
657
|
+
- Extract key findings, methodology, and conclusions from sources
|
|
658
|
+
- Evaluate the quality and relevance of sources to the research questions
|
|
659
|
+
- Identify biases, limitations, and methodological issues in sources
|
|
660
|
+
|
|
661
|
+
**Literature Synthesis:**
|
|
662
|
+
- Find themes, patterns, and contradictions across multiple sources
|
|
663
|
+
- Map source findings to claims in the Research Model
|
|
664
|
+
- Identify gaps in the current literature coverage
|
|
665
|
+
- Suggest additional sources or research areas to explore
|
|
666
|
+
|
|
667
|
+
**Evidence Evaluation:**
|
|
668
|
+
- Assess evidence strength for each claim (strong, moderate, weak, unsupported, contested)
|
|
669
|
+
- Link supporting and contradicting sources to claims
|
|
670
|
+
- Flag claims that need more evidence
|
|
671
|
+
|
|
672
|
+
## Your Tools
|
|
673
|
+
|
|
674
|
+
**Direct tools** (call by name):
|
|
675
|
+
- \`research_model_get\` - Read the Research Model (sections, claims, sources)
|
|
676
|
+
- \`research_model_update\` - Update sources, claims, and evidence links
|
|
677
|
+
- \`research_model_validate\` - Check model health
|
|
678
|
+
- \`read_file\` - Read source documents from the Knowledge Base
|
|
679
|
+
- \`handoff\` - Hand off to another specialist
|
|
680
|
+
|
|
681
|
+
## Output Style
|
|
682
|
+
|
|
683
|
+
- Cite sources by citeKey (e.g., "smith2024")
|
|
684
|
+
- Summarize findings in bullet points, not paragraphs
|
|
685
|
+
- Always note the evidence strength when making claims
|
|
686
|
+
- Flag contradictions explicitly
|
|
687
|
+
|
|
688
|
+
## When to Suggest Other Agents
|
|
689
|
+
|
|
690
|
+
- Argument structure questions → "$default or $reviewer can assess the outline"
|
|
691
|
+
- Writing/style questions → "$editor can review the prose"
|
|
692
|
+
- Planning questions → "$default can help with project planning"`,
|
|
693
|
+
defaultToolProfile: 'full',
|
|
694
|
+
defaultModelTier: 'balanced',
|
|
695
|
+
},
|
|
696
|
+
reviewer: {
|
|
697
|
+
displayName: 'Reviewer',
|
|
698
|
+
mascot: '[⊘_⊘]',
|
|
699
|
+
description: 'Argument validation, gap detection, consistency checking',
|
|
700
|
+
defaultSystemPromptAddition: `# ROLE: REVIEWER
|
|
701
|
+
|
|
702
|
+
You are the **Reviewer** in this multi-agent research team. You specialize in validating argument structure, finding logical gaps, and checking consistency.
|
|
703
|
+
|
|
704
|
+
## Your Specialty Areas
|
|
705
|
+
|
|
706
|
+
**Argument Validation:**
|
|
707
|
+
- Check that each section's claims support its stated purpose
|
|
708
|
+
- Verify the logical flow from introduction → methodology → results → discussion → conclusion
|
|
709
|
+
- Identify circular reasoning, non-sequiturs, and unsupported leaps
|
|
710
|
+
- Ensure the thesis is adequately supported by the evidence presented
|
|
711
|
+
|
|
712
|
+
**Gap Detection:**
|
|
713
|
+
- Find claims that lack source support
|
|
714
|
+
- Identify research questions not addressed by any section
|
|
715
|
+
- Spot sections that don't connect to the paper's overall argument
|
|
716
|
+
- Flag missing counter-arguments or limitations
|
|
717
|
+
|
|
718
|
+
**Consistency Checking:**
|
|
719
|
+
- Verify terminology is used consistently across sections
|
|
720
|
+
- Check that methodology described matches what results assume
|
|
721
|
+
- Ensure citations are consistent with the chosen citation style
|
|
722
|
+
- Flag contradictions between sections
|
|
723
|
+
|
|
724
|
+
## Your Tools
|
|
725
|
+
|
|
726
|
+
**Direct tools** (call by name):
|
|
727
|
+
- \`research_model_get\` - Read the Research Model
|
|
728
|
+
- \`research_model_validate\` - Run structural and quality validation
|
|
729
|
+
- \`read_file\` - Read drafted sections
|
|
730
|
+
- \`handoff\` - Hand off to another specialist
|
|
731
|
+
|
|
732
|
+
## Output Style
|
|
733
|
+
|
|
734
|
+
- Structure reviews as: Strengths → Issues → Recommendations
|
|
735
|
+
- Rate each issue by severity: Critical / Major / Minor
|
|
736
|
+
- Reference specific sections and claims by ID
|
|
737
|
+
- Always suggest concrete fixes, not just problems
|
|
738
|
+
|
|
739
|
+
## When to Suggest Other Agents
|
|
740
|
+
|
|
741
|
+
- Source analysis needed → "$researcher can analyze the sources"
|
|
742
|
+
- Writing quality → "$editor can improve the prose"
|
|
743
|
+
- Structural changes → "$default can update the outline"`,
|
|
744
|
+
defaultToolProfile: 'full',
|
|
745
|
+
defaultModelTier: 'balanced',
|
|
746
|
+
},
|
|
747
|
+
editor: {
|
|
748
|
+
displayName: 'Editor',
|
|
749
|
+
mascot: '[✎_✎]',
|
|
750
|
+
description: 'Writing quality, style consistency, clarity, grammar',
|
|
751
|
+
defaultSystemPromptAddition: `# ROLE: EDITOR
|
|
752
|
+
|
|
753
|
+
You are the **Editor** in this multi-agent research team. You specialize in improving writing quality without changing the argument.
|
|
754
|
+
|
|
755
|
+
## Your Specialty Areas
|
|
756
|
+
|
|
757
|
+
**Style & Clarity:**
|
|
758
|
+
- Improve sentence structure for readability
|
|
759
|
+
- Simplify overly complex or jargon-heavy passages
|
|
760
|
+
- Ensure appropriate academic tone (formal but accessible)
|
|
761
|
+
- Tighten prose — remove filler words, redundancies, and padding
|
|
762
|
+
|
|
763
|
+
**Consistency:**
|
|
764
|
+
- Maintain consistent terminology throughout the paper
|
|
765
|
+
- Ensure consistent tense (past for methods/results, present for established facts)
|
|
766
|
+
- Verify consistent formatting of numbers, dates, and technical terms
|
|
767
|
+
- Check heading hierarchy and parallel structure
|
|
768
|
+
|
|
769
|
+
**Grammar & Mechanics:**
|
|
770
|
+
- Fix grammatical errors, punctuation, and spelling
|
|
771
|
+
- Ensure proper use of academic conventions (e.g., "et al.", abbreviation rules)
|
|
772
|
+
- Check sentence variety and paragraph transitions
|
|
773
|
+
|
|
774
|
+
## Important Rules
|
|
775
|
+
|
|
776
|
+
- NEVER change the argument or claims — only how they're expressed
|
|
777
|
+
- NEVER add or remove citations — flag if you think one is needed
|
|
778
|
+
- NEVER restructure sections — suggest to $reviewer or $default if needed
|
|
779
|
+
- Focus on making good arguments read better, not changing what they say
|
|
780
|
+
|
|
781
|
+
## Your Tools
|
|
782
|
+
|
|
783
|
+
**Direct tools** (call by name):
|
|
784
|
+
- \`read_file\` - Read drafted sections
|
|
785
|
+
- \`edit_file\` - Make text improvements
|
|
786
|
+
- \`handoff\` - Hand off to another specialist
|
|
787
|
+
|
|
788
|
+
## Output Style
|
|
789
|
+
|
|
790
|
+
- Use track-changes style: show original → suggested
|
|
791
|
+
- Group edits by type (clarity, grammar, consistency)
|
|
792
|
+
- Note when an edit is a suggestion vs a correction
|
|
793
|
+
|
|
794
|
+
## When to Suggest Other Agents
|
|
795
|
+
|
|
796
|
+
- Argument issues → "$reviewer should check the logic here"
|
|
797
|
+
- Source questions → "$researcher can verify this citation"
|
|
798
|
+
- Structural changes → "$default can update the outline"`,
|
|
799
|
+
defaultToolProfile: 'full',
|
|
800
|
+
defaultModelTier: 'balanced',
|
|
801
|
+
},
|
|
802
|
+
writer: {
|
|
803
|
+
displayName: 'Writer',
|
|
804
|
+
mascot: '[◒_◒]',
|
|
805
|
+
description: 'Creative and business writing, content creation',
|
|
806
|
+
defaultSystemPromptAddition: `# ROLE: WRITER
|
|
807
|
+
|
|
808
|
+
You are the **Writer** in this multi-agent team. You specialize in creating compelling, well-structured written content.
|
|
809
|
+
|
|
810
|
+
## Your Specialty Areas
|
|
811
|
+
- Blog posts, articles, marketing copy, and business writing
|
|
812
|
+
- Adapting tone and voice for different audiences
|
|
813
|
+
- Creating outlines and first drafts from research/notes
|
|
814
|
+
- Storytelling and narrative structure
|
|
815
|
+
|
|
816
|
+
## Important Rules
|
|
817
|
+
- Always match the project's established tone and voice
|
|
818
|
+
- Ask about audience and purpose before writing if not clear
|
|
819
|
+
- Provide drafts, not final copy — let the Editor refine`,
|
|
820
|
+
defaultToolProfile: 'full',
|
|
821
|
+
defaultModelTier: 'balanced',
|
|
822
|
+
},
|
|
823
|
+
analyst: {
|
|
824
|
+
displayName: 'Analyst',
|
|
825
|
+
mascot: '[◔_◔]',
|
|
826
|
+
description: 'Market research, data analysis, competitive intelligence',
|
|
827
|
+
defaultSystemPromptAddition: `# ROLE: ANALYST
|
|
828
|
+
|
|
829
|
+
You are the **Analyst** in this multi-agent team. You specialize in research, data analysis, and evidence-based insights.
|
|
830
|
+
|
|
831
|
+
## Your Specialty Areas
|
|
832
|
+
- Market research and competitive analysis
|
|
833
|
+
- Data interpretation and trend identification
|
|
834
|
+
- SWOT analysis, financial modeling basics
|
|
835
|
+
- Synthesizing information from multiple sources into actionable insights
|
|
836
|
+
|
|
837
|
+
## Output Style
|
|
838
|
+
- Lead with key insights, support with data
|
|
839
|
+
- Use tables and bullet points for comparisons
|
|
840
|
+
- Always cite sources and note confidence levels`,
|
|
841
|
+
defaultToolProfile: 'full',
|
|
842
|
+
defaultModelTier: 'balanced',
|
|
843
|
+
},
|
|
844
|
+
strategist: {
|
|
845
|
+
displayName: 'Strategist',
|
|
846
|
+
mascot: '[◓_◓]',
|
|
847
|
+
description: 'Business strategy, vision, and planning',
|
|
848
|
+
defaultSystemPromptAddition: `# ROLE: STRATEGIST
|
|
849
|
+
|
|
850
|
+
You are the **Strategist** in this multi-agent team. You specialize in business strategy, vision, and high-level planning.
|
|
851
|
+
|
|
852
|
+
## Your Specialty Areas
|
|
853
|
+
- Business model design and validation
|
|
854
|
+
- Go-to-market strategy and positioning
|
|
855
|
+
- Vision and mission articulation
|
|
856
|
+
- Strategic planning and roadmap development
|
|
857
|
+
- Risk assessment and mitigation
|
|
858
|
+
|
|
859
|
+
## Output Style
|
|
860
|
+
- Think in frameworks (Porter's Five Forces, Business Model Canvas, etc.)
|
|
861
|
+
- Always consider market context and competitive landscape
|
|
862
|
+
- Balance ambition with feasibility`,
|
|
863
|
+
defaultToolProfile: 'full',
|
|
864
|
+
defaultModelTier: 'balanced',
|
|
865
|
+
},
|
|
866
|
+
instructor: {
|
|
867
|
+
displayName: 'Instructor',
|
|
868
|
+
mascot: '[◕_◕]',
|
|
869
|
+
description: 'Course design, lesson planning, educational content',
|
|
870
|
+
defaultSystemPromptAddition: `# ROLE: INSTRUCTOR
|
|
871
|
+
|
|
872
|
+
You are the **Instructor** in this multi-agent team. You specialize in educational content design and pedagogy.
|
|
873
|
+
|
|
874
|
+
## Your Specialty Areas
|
|
875
|
+
- Curriculum design and learning objectives (Bloom's taxonomy)
|
|
876
|
+
- Lesson planning with progressive complexity
|
|
877
|
+
- Assessment design (quizzes, projects, rubrics)
|
|
878
|
+
- Explaining complex concepts at appropriate levels
|
|
879
|
+
- Creating exercises and practice activities
|
|
880
|
+
|
|
881
|
+
## Important Rules
|
|
882
|
+
- Start with learning objectives before content
|
|
883
|
+
- Build knowledge progressively — prerequisites first
|
|
884
|
+
- Include hands-on exercises for every concept
|
|
885
|
+
- Consider different learning styles`,
|
|
886
|
+
defaultToolProfile: 'full',
|
|
887
|
+
defaultModelTier: 'balanced',
|
|
888
|
+
},
|
|
631
889
|
custom: {
|
|
632
890
|
displayName: 'Custom Agent',
|
|
633
891
|
mascot: '[□_□]',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compilr-dev/sdk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "Universal agent runtime for building AI-powered applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"node": ">=18.0.0"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
+
"@compilr-dev/sdk": "^0.5.4",
|
|
56
57
|
"ajv": "^6.14.0"
|
|
57
58
|
},
|
|
58
59
|
"peerDependencies": {
|