@compilr-dev/factory 0.1.13 → 0.1.14

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.
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Research Model Types
3
+ *
4
+ * The Research Model is the central data structure for research paper projects.
5
+ * It describes the paper's structure — sections, claims, sources, research
6
+ * questions — independently of the output format (LaTeX, Markdown, etc.).
7
+ */
8
+ export interface ResearchModel {
9
+ /** Paper metadata */
10
+ readonly title: string;
11
+ readonly abstract?: string;
12
+ readonly authors?: readonly string[];
13
+ readonly targetJournal?: string;
14
+ readonly citationStyle: CitationStyle;
15
+ readonly keywords?: readonly string[];
16
+ readonly methodology?: string;
17
+ /** The driving questions */
18
+ readonly researchQuestions: readonly ResearchQuestion[];
19
+ /** Hierarchical section structure */
20
+ readonly sections: readonly Section[];
21
+ /** Source registry */
22
+ readonly sources: readonly Source[];
23
+ /** Model metadata */
24
+ readonly meta: ResearchMeta;
25
+ }
26
+ export type CitationStyle = 'apa' | 'mla' | 'chicago' | 'ieee' | 'harvard';
27
+ export interface ResearchQuestion {
28
+ readonly id: string;
29
+ readonly question: string;
30
+ /** Which sections address this question */
31
+ readonly sectionRefs: readonly string[];
32
+ readonly status: QuestionStatus;
33
+ }
34
+ export type QuestionStatus = 'open' | 'partially-answered' | 'answered';
35
+ export interface Section {
36
+ readonly id: string;
37
+ readonly title: string;
38
+ /** What this section argues or establishes */
39
+ readonly purpose?: string;
40
+ readonly order: number;
41
+ /** null = top-level section */
42
+ readonly parentId?: string;
43
+ readonly status: SectionStatus;
44
+ /** Target word count */
45
+ readonly targetWordCount?: number;
46
+ /** Actual word count (updated on draft) */
47
+ readonly actualWordCount?: number;
48
+ /** Claims made in this section */
49
+ readonly claims: readonly Claim[];
50
+ /** Author notes */
51
+ readonly notes?: string;
52
+ }
53
+ export type SectionStatus = 'outlined' | 'drafted' | 'reviewed' | 'final';
54
+ export interface Claim {
55
+ readonly id: string;
56
+ /** The assertion being made */
57
+ readonly statement: string;
58
+ /** How well-supported is this claim? */
59
+ readonly evidenceStrength: EvidenceStrength;
60
+ /** Sources that support this claim */
61
+ readonly supportingSources: readonly SourceRef[];
62
+ /** Sources that contradict this claim */
63
+ readonly contradictingSources: readonly SourceRef[];
64
+ /** Author's original analysis, derived from sources, or synthesis of multiple sources */
65
+ readonly type: ClaimType;
66
+ }
67
+ export type EvidenceStrength = 'strong' | 'moderate' | 'weak' | 'unsupported' | 'contested';
68
+ export type ClaimType = 'original' | 'derived' | 'synthesis';
69
+ export interface SourceRef {
70
+ readonly sourceId: string;
71
+ /** Specific page, chapter, or section */
72
+ readonly location?: string;
73
+ /** Brief note on relevance */
74
+ readonly relevance?: string;
75
+ }
76
+ export interface Source {
77
+ readonly id: string;
78
+ /** Path in the knowledge base */
79
+ readonly kbPath?: string;
80
+ /** Citation key (e.g., "smith2024") */
81
+ readonly citeKey: string;
82
+ /** Structured citation info */
83
+ readonly citation: CitationInfo;
84
+ /** Agent-extracted key findings */
85
+ readonly keyFindings?: readonly string[];
86
+ /** Tags for categorization */
87
+ readonly tags?: readonly string[];
88
+ /** Relevance to the research */
89
+ readonly relevance?: SourceRelevance;
90
+ /** Has this source been analyzed? */
91
+ readonly analyzed: boolean;
92
+ }
93
+ export type SourceRelevance = 'primary' | 'secondary' | 'background';
94
+ export interface CitationInfo {
95
+ readonly type: CitationType;
96
+ readonly title: string;
97
+ readonly authors: readonly string[];
98
+ readonly year: number | string;
99
+ /** Journal, conference, publisher, or website */
100
+ readonly venue?: string;
101
+ readonly volume?: string;
102
+ readonly issue?: string;
103
+ readonly pages?: string;
104
+ readonly doi?: string;
105
+ readonly url?: string;
106
+ readonly accessedAt?: string;
107
+ }
108
+ export type CitationType = 'article' | 'book' | 'chapter' | 'conference' | 'thesis' | 'web' | 'report' | 'other';
109
+ export interface ResearchMeta {
110
+ readonly revision: number;
111
+ readonly createdAt: string;
112
+ readonly updatedAt: string;
113
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Research Model Types
3
+ *
4
+ * The Research Model is the central data structure for research paper projects.
5
+ * It describes the paper's structure — sections, claims, sources, research
6
+ * questions — independently of the output format (LaTeX, Markdown, etc.).
7
+ */
8
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/factory",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "AI-driven application scaffolder for the compilr-dev ecosystem",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,13 +21,9 @@
21
21
  "typecheck": "tsc --noEmit",
22
22
  "prepublishOnly": "npm run clean && npm run lint && npm run test && npm run build"
23
23
  },
24
- "peerDependencies": {
25
- "@compilr-dev/sdk": ">=0.1.12"
26
- },
27
24
  "devDependencies": {
28
25
  "@anthropic-ai/sdk": "^0.78.0",
29
26
  "@compilr-dev/agents": "^0.3.16",
30
- "@compilr-dev/sdk": "^0.4.1",
31
27
  "@eslint/js": "^9.17.0",
32
28
  "@types/node": "^22.10.2",
33
29
  "@vitest/coverage-v8": "^2.1.9",
@@ -47,5 +43,8 @@
47
43
  "factory",
48
44
  "scaffolder",
49
45
  "code-generation"
50
- ]
46
+ ],
47
+ "dependencies": {
48
+ "@compilr-dev/sdk": "^0.5.2"
49
+ }
51
50
  }