-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreate-mission-structure.js
More file actions
115 lines (74 loc) · 2.62 KB
/
Copy pathcreate-mission-structure.js
File metadata and controls
115 lines (74 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import fs from 'fs/promises';
import path from 'path';
async function createMissionStructure() {
try {
console.log('Creating missions directory structure...');
// Create main directories
await fs.mkdir('missions', { recursive: true });
await fs.mkdir('missions/tasks', { recursive: true });
await fs.mkdir('missions/memory', { recursive: true });
// Create README files
const mainReadme = `# Missions
This directory contains automated missions for the COREAI research system.
## Directory Structure
- \`tasks/\` - Individual mission files
- \`memory/\` - Mission execution logs and outputs
## Mission Format
Missions are defined in Markdown files with specific frontmatter and sections:
\`\`\`markdown
# Mission Title
Status: Pending
Priority: Medium|High|Low
Schedule: Hourly|Daily|Weekly|Monthly|As needed|Every 5 minutes
## Description
research "query string" depth 3 breadth 5
## Execution Log
\`\`\`
The system will automatically parse the description to extract research parameters and schedule execution based on the defined schedule.
`;
const tasksReadme = `# Tasks
This directory contains individual mission task files.
## Task Format
Each task is defined in a Markdown file with the following structure:
\`\`\`markdown
# Mission Title
Status: Pending
Priority: Medium|High|Low
Schedule: Hourly|Daily|Weekly|Monthly|As needed|Every 5 minutes
## Description
research "query string" depth 3 breadth 5
## Execution Log
\`\`\`
## Example Research Mission
\`\`\`markdown
# Research on Quantum Computing
Status: Pending
Priority: High
Schedule: Daily
## Description
This mission aims to gather the latest information on quantum computing advancements.
research "quantum computing developments" depth 3 breadth 5
## Execution Log
\`\`\`
`;
const exampleMission = `# Example Research Mission
Status: Pending
Priority: Medium
Schedule: Every 5 minutes
## Description
This is an example research mission that demonstrates the format.
research "artificial intelligence trends" depth 2 breadth 3
## Execution Log
`;
// Write README files
await fs.writeFile(path.join('missions', 'README.md'), mainReadme);
await fs.writeFile(path.join('missions', 'tasks', 'README.md'), tasksReadme);
// Create example mission
await fs.writeFile(path.join('missions', 'tasks', 'example-mission.md'), exampleMission);
console.log('Mission structure created successfully!');
console.log('Example mission created at: missions/tasks/example-mission.md');
} catch (error) {
console.error('Error creating mission structure:', error);
}
}
createMissionStructure();