js: define TypeScript interfaces for OTA, Commit, Branch, Context
Swadhin Biswas committed 7 months ago
3ecf047
1 parent 4b66fa2
commit 3ecf047
1 file changed
+55 -0
Showing 1 changed file+55-0
▼JS/src/types.ts
+55-0
| @@ -0,0 +1,55 @@ | ||
1 | +/** | |
2 | + * GCC (Git-Context-Controller) type definitions. | |
3 | + * Paper: arXiv:2508.00031v2 — Junde Wu et al., 2025 | |
4 | + */ | |
5 | + | |
6 | +/** A single Observation–Thought–Action cycle logged to log.md. */ | |
7 | +export interface OTARecord { | |
8 | + step: number; | |
9 | + timestamp: string; | |
10 | + observation: string; | |
11 | + thought: string; | |
12 | + action: string; | |
13 | +} | |
14 | + | |
15 | +/** | |
16 | + * A commit checkpoint (paper §3.2). | |
17 | + * Fields: Branch Purpose, Previous Progress Summary, This Commit's Contribution. | |
18 | + */ | |
19 | +export interface CommitRecord { | |
20 | + commitId: string; | |
21 | + branchName: string; | |
22 | + branchPurpose: string; | |
23 | + previousProgressSummary: string; | |
24 | + thisCommitContribution: string; | |
25 | + timestamp: string; | |
26 | +} | |
27 | + | |
28 | +/** | |
29 | + * Branch metadata stored in metadata.yaml (paper §3.1). | |
30 | + * Records architectural intent and motivation. | |
31 | + */ | |
32 | +export interface BranchMetadata { | |
33 | + name: string; | |
34 | + purpose: string; | |
35 | + createdFrom: string; | |
36 | + createdAt: string; | |
37 | + status: "active" | "merged" | "abandoned"; | |
38 | + mergedInto?: string; | |
39 | + mergedAt?: string; | |
40 | +} | |
41 | + | |
42 | +/** | |
43 | + * Result of the CONTEXT command (paper §3.5). | |
44 | + * K controls the commit retrieval window (paper experiments: K=1). | |
45 | + */ | |
46 | +export interface ContextResult { | |
47 | + branchName: string; | |
48 | + k: number; | |
49 | + commits: CommitRecord[]; | |
50 | + otaRecords: OTARecord[]; | |
51 | + mainRoadmap: string; | |
52 | + metadata?: BranchMetadata; | |
53 | + summary(): string; | |
54 | +} | |
55 | + | |
0 | 56 | |