brainforge-ai 1.2.1 → 1.2.3
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 +344 -863
- package/dist/commands/defensePack.js +194 -194
- package/dist/commands/difficulty.js +116 -116
- package/dist/commands/help.d.ts.map +1 -1
- package/dist/commands/help.js +0 -1
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/study.js +119 -119
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +18 -2
- package/dist/commands/update.js.map +1 -1
- package/dist/core/dashboardTemplate.js +748 -748
- package/dist/core/templates.d.ts.map +1 -1
- package/dist/core/templates.js +208 -84
- package/dist/core/templates.js.map +1 -1
- package/package.json +2 -2
|
@@ -64,206 +64,206 @@ async function defensePackCommand() {
|
|
|
64
64
|
console.log();
|
|
65
65
|
}
|
|
66
66
|
function generateDefensePackTemplate(projectName) {
|
|
67
|
-
return `# Defense Pack — ${projectName}
|
|
68
|
-
|
|
69
|
-
_Generated by \`brainforge defense-pack\`. Run \`/defense-pack\` in your AI tool to fill this in._
|
|
70
|
-
|
|
71
|
-
## Project summary
|
|
72
|
-
|
|
73
|
-
### 30-second explanation
|
|
74
|
-
|
|
75
|
-
_To be filled._
|
|
76
|
-
|
|
77
|
-
### 1-minute explanation
|
|
78
|
-
|
|
79
|
-
_To be filled._
|
|
80
|
-
|
|
81
|
-
### 5-minute explanation
|
|
82
|
-
|
|
83
|
-
_To be filled._
|
|
84
|
-
|
|
85
|
-
## Problem and solution
|
|
86
|
-
|
|
87
|
-
_To be filled._
|
|
88
|
-
|
|
89
|
-
## Main features
|
|
90
|
-
|
|
91
|
-
_To be filled._
|
|
92
|
-
|
|
93
|
-
## Architecture explained simply
|
|
94
|
-
|
|
95
|
-
_To be filled._
|
|
96
|
-
|
|
97
|
-
## Folder structure explained
|
|
98
|
-
|
|
99
|
-
_To be filled._
|
|
100
|
-
|
|
101
|
-
## Database / API / UI explanation
|
|
102
|
-
|
|
103
|
-
_Only sections relevant to the project stack._
|
|
104
|
-
|
|
105
|
-
## What each important file does
|
|
106
|
-
|
|
107
|
-
| File | Role | How to explain it |
|
|
108
|
-
|------|------|------------------|
|
|
109
|
-
| _To be filled_ | | |
|
|
110
|
-
|
|
111
|
-
## Difficult parts to revise
|
|
112
|
-
|
|
113
|
-
| Topic | Why it is difficult | How to explain simply |
|
|
114
|
-
|-------|-------------------|----------------------|
|
|
115
|
-
| _To be filled_ | | |
|
|
116
|
-
|
|
117
|
-
## Professor questions and answers
|
|
118
|
-
|
|
119
|
-
| Question | Suggested answer |
|
|
120
|
-
|----------|-----------------|
|
|
121
|
-
| _To be filled_ | |
|
|
122
|
-
|
|
123
|
-
## Demo script
|
|
124
|
-
|
|
125
|
-
_To be filled._
|
|
126
|
-
|
|
127
|
-
## What to say if asked "Did you use AI?"
|
|
128
|
-
|
|
129
|
-
_To be filled._
|
|
130
|
-
|
|
131
|
-
## Final checklist before presentation
|
|
132
|
-
|
|
133
|
-
- [ ] I can explain the project goal
|
|
134
|
-
- [ ] I can explain the architecture
|
|
135
|
-
- [ ] I can explain the important files
|
|
136
|
-
- [ ] I can run the project
|
|
137
|
-
- [ ] I can answer likely questions
|
|
67
|
+
return `# Defense Pack — ${projectName}
|
|
68
|
+
|
|
69
|
+
_Generated by \`brainforge defense-pack\`. Run \`/defense-pack\` in your AI tool to fill this in._
|
|
70
|
+
|
|
71
|
+
## Project summary
|
|
72
|
+
|
|
73
|
+
### 30-second explanation
|
|
74
|
+
|
|
75
|
+
_To be filled._
|
|
76
|
+
|
|
77
|
+
### 1-minute explanation
|
|
78
|
+
|
|
79
|
+
_To be filled._
|
|
80
|
+
|
|
81
|
+
### 5-minute explanation
|
|
82
|
+
|
|
83
|
+
_To be filled._
|
|
84
|
+
|
|
85
|
+
## Problem and solution
|
|
86
|
+
|
|
87
|
+
_To be filled._
|
|
88
|
+
|
|
89
|
+
## Main features
|
|
90
|
+
|
|
91
|
+
_To be filled._
|
|
92
|
+
|
|
93
|
+
## Architecture explained simply
|
|
94
|
+
|
|
95
|
+
_To be filled._
|
|
96
|
+
|
|
97
|
+
## Folder structure explained
|
|
98
|
+
|
|
99
|
+
_To be filled._
|
|
100
|
+
|
|
101
|
+
## Database / API / UI explanation
|
|
102
|
+
|
|
103
|
+
_Only sections relevant to the project stack._
|
|
104
|
+
|
|
105
|
+
## What each important file does
|
|
106
|
+
|
|
107
|
+
| File | Role | How to explain it |
|
|
108
|
+
|------|------|------------------|
|
|
109
|
+
| _To be filled_ | | |
|
|
110
|
+
|
|
111
|
+
## Difficult parts to revise
|
|
112
|
+
|
|
113
|
+
| Topic | Why it is difficult | How to explain simply |
|
|
114
|
+
|-------|-------------------|----------------------|
|
|
115
|
+
| _To be filled_ | | |
|
|
116
|
+
|
|
117
|
+
## Professor questions and answers
|
|
118
|
+
|
|
119
|
+
| Question | Suggested answer |
|
|
120
|
+
|----------|-----------------|
|
|
121
|
+
| _To be filled_ | |
|
|
122
|
+
|
|
123
|
+
## Demo script
|
|
124
|
+
|
|
125
|
+
_To be filled._
|
|
126
|
+
|
|
127
|
+
## What to say if asked "Did you use AI?"
|
|
128
|
+
|
|
129
|
+
_To be filled._
|
|
130
|
+
|
|
131
|
+
## Final checklist before presentation
|
|
132
|
+
|
|
133
|
+
- [ ] I can explain the project goal
|
|
134
|
+
- [ ] I can explain the architecture
|
|
135
|
+
- [ ] I can explain the important files
|
|
136
|
+
- [ ] I can run the project
|
|
137
|
+
- [ ] I can answer likely questions
|
|
138
138
|
`;
|
|
139
139
|
}
|
|
140
140
|
function generateOralDefenseTemplate() {
|
|
141
|
-
return `# Oral Defense Preparation
|
|
142
|
-
|
|
143
|
-
## 30-second project explanation
|
|
144
|
-
|
|
145
|
-
_To be filled by /defense-pack._
|
|
146
|
-
|
|
147
|
-
## 1-minute project explanation
|
|
148
|
-
|
|
149
|
-
_To be filled._
|
|
150
|
-
|
|
151
|
-
## 5-minute project explanation
|
|
152
|
-
|
|
153
|
-
_To be filled._
|
|
154
|
-
|
|
155
|
-
## Architecture explanation
|
|
156
|
-
|
|
157
|
-
_To be filled._
|
|
158
|
-
|
|
159
|
-
## Main features
|
|
160
|
-
|
|
161
|
-
_To be filled._
|
|
162
|
-
|
|
163
|
-
## What I built myself
|
|
164
|
-
|
|
165
|
-
_To be filled._
|
|
166
|
-
|
|
167
|
-
## What I should be ready to explain
|
|
168
|
-
|
|
169
|
-
_To be filled._
|
|
141
|
+
return `# Oral Defense Preparation
|
|
142
|
+
|
|
143
|
+
## 30-second project explanation
|
|
144
|
+
|
|
145
|
+
_To be filled by /defense-pack._
|
|
146
|
+
|
|
147
|
+
## 1-minute project explanation
|
|
148
|
+
|
|
149
|
+
_To be filled._
|
|
150
|
+
|
|
151
|
+
## 5-minute project explanation
|
|
152
|
+
|
|
153
|
+
_To be filled._
|
|
154
|
+
|
|
155
|
+
## Architecture explanation
|
|
156
|
+
|
|
157
|
+
_To be filled._
|
|
158
|
+
|
|
159
|
+
## Main features
|
|
160
|
+
|
|
161
|
+
_To be filled._
|
|
162
|
+
|
|
163
|
+
## What I built myself
|
|
164
|
+
|
|
165
|
+
_To be filled._
|
|
166
|
+
|
|
167
|
+
## What I should be ready to explain
|
|
168
|
+
|
|
169
|
+
_To be filled._
|
|
170
170
|
`;
|
|
171
171
|
}
|
|
172
172
|
function generateDefensePackCommand(config) {
|
|
173
|
-
return `# /defense-pack
|
|
174
|
-
|
|
175
|
-
**Objective:** Generate a complete presentation and oral defense preparation document.
|
|
176
|
-
|
|
177
|
-
## Context to Read First
|
|
178
|
-
|
|
179
|
-
Read these files (skip gracefully if they don't exist):
|
|
180
|
-
|
|
181
|
-
- \`.brainforge/brain.md\`
|
|
182
|
-
- \`.brainforge/project.md\`
|
|
183
|
-
- \`.brainforge/roadmap.md\`
|
|
184
|
-
- \`.brainforge/phases/\` (all phase files)
|
|
185
|
-
- \`.brainforge/memory/architecture.md\`
|
|
186
|
-
- \`.brainforge/memory/learning-notes.md\`
|
|
187
|
-
- \`.brainforge/reports/difficulty-report.md\`
|
|
188
|
-
- \`.brainforge/reports/professor-check.md\`
|
|
189
|
-
|
|
190
|
-
## Project Info
|
|
191
|
-
|
|
192
|
-
- **Project:** ${config.projectName}
|
|
193
|
-
- **Stack:** ${config.stack.join(', ')}
|
|
194
|
-
- **Code level:** ${config.codeLevel}
|
|
195
|
-
- **User level:** ${config.userLevel}
|
|
196
|
-
- **Academic:** ${config.isAcademic ? 'Yes' : 'No'}
|
|
197
|
-
|
|
198
|
-
## Steps
|
|
199
|
-
|
|
200
|
-
1. Read all available context files
|
|
201
|
-
2. Generate all sections of the Defense Pack
|
|
202
|
-
3. Write results to \`.brainforge/reports/defense-pack.md\`
|
|
203
|
-
4. Update \`.brainforge/study/oral-defense.md\` with the 30s / 1min / 5min explanations
|
|
204
|
-
|
|
205
|
-
## Output Format
|
|
206
|
-
|
|
207
|
-
Write to \`.brainforge/reports/defense-pack.md\`:
|
|
208
|
-
|
|
209
|
-
\`\`\`md
|
|
210
|
-
# Defense Pack — ${config.projectName}
|
|
211
|
-
|
|
212
|
-
## Project summary
|
|
213
|
-
|
|
214
|
-
### 30-second explanation
|
|
215
|
-
[One clear sentence anyone can understand]
|
|
216
|
-
|
|
217
|
-
### 1-minute explanation
|
|
218
|
-
[3-4 sentences: problem, solution, main features, tech used]
|
|
219
|
-
|
|
220
|
-
### 5-minute explanation
|
|
221
|
-
[Full story: context, problem, solution, architecture, features, demo flow]
|
|
222
|
-
|
|
223
|
-
## Problem and solution
|
|
224
|
-
[What problem does the project solve? For whom?]
|
|
225
|
-
|
|
226
|
-
## Main features
|
|
227
|
-
[Bullet list of core features]
|
|
228
|
-
|
|
229
|
-
## Architecture explained simply
|
|
230
|
-
[Simple diagram or description — no jargon]
|
|
231
|
-
|
|
232
|
-
## Folder structure explained
|
|
233
|
-
[Each folder and what it contains]
|
|
234
|
-
|
|
235
|
-
## Database / API / UI explanation
|
|
236
|
-
[Only sections relevant to: ${config.stack.join(', ')}]
|
|
237
|
-
|
|
238
|
-
## What each important file does
|
|
239
|
-
| File | Role | How to explain it |
|
|
240
|
-
|
|
241
|
-
## Difficult parts to revise
|
|
242
|
-
| Topic | Why it is difficult | How to explain simply |
|
|
243
|
-
|
|
244
|
-
## Professor questions and answers
|
|
245
|
-
| Question | Suggested answer |
|
|
246
|
-
|
|
247
|
-
## Demo script
|
|
248
|
-
Step 1: [Show...]
|
|
249
|
-
Step 2: [Navigate to...]
|
|
250
|
-
Step 3: [Demonstrate...]
|
|
251
|
-
|
|
252
|
-
## What to say if asked "Did you use AI?"
|
|
253
|
-
Give an honest, ethical answer:
|
|
254
|
-
- AI was used as an assistant for structure, review, and learning
|
|
255
|
-
- The student understands the code and can defend the choices
|
|
256
|
-
- Do not encourage lying
|
|
257
|
-
- Example: "Yes, I used AI as a tool to help structure my work and review my code,
|
|
258
|
-
similar to how a developer uses Stack Overflow. I wrote and understand all the code."
|
|
259
|
-
|
|
260
|
-
## Final checklist before presentation
|
|
261
|
-
- [ ] I can explain the project goal
|
|
262
|
-
- [ ] I can explain the architecture
|
|
263
|
-
- [ ] I can explain every important file
|
|
264
|
-
- [ ] I can run the project without errors
|
|
265
|
-
- [ ] I can answer the professor questions above
|
|
266
|
-
\`\`\`
|
|
173
|
+
return `# /defense-pack
|
|
174
|
+
|
|
175
|
+
**Objective:** Generate a complete presentation and oral defense preparation document.
|
|
176
|
+
|
|
177
|
+
## Context to Read First
|
|
178
|
+
|
|
179
|
+
Read these files (skip gracefully if they don't exist):
|
|
180
|
+
|
|
181
|
+
- \`.brainforge/brain.md\`
|
|
182
|
+
- \`.brainforge/project.md\`
|
|
183
|
+
- \`.brainforge/roadmap.md\`
|
|
184
|
+
- \`.brainforge/phases/\` (all phase files)
|
|
185
|
+
- \`.brainforge/memory/architecture.md\`
|
|
186
|
+
- \`.brainforge/memory/learning-notes.md\`
|
|
187
|
+
- \`.brainforge/reports/difficulty-report.md\`
|
|
188
|
+
- \`.brainforge/reports/professor-check.md\`
|
|
189
|
+
|
|
190
|
+
## Project Info
|
|
191
|
+
|
|
192
|
+
- **Project:** ${config.projectName}
|
|
193
|
+
- **Stack:** ${config.stack.join(', ')}
|
|
194
|
+
- **Code level:** ${config.codeLevel}
|
|
195
|
+
- **User level:** ${config.userLevel}
|
|
196
|
+
- **Academic:** ${config.isAcademic ? 'Yes' : 'No'}
|
|
197
|
+
|
|
198
|
+
## Steps
|
|
199
|
+
|
|
200
|
+
1. Read all available context files
|
|
201
|
+
2. Generate all sections of the Defense Pack
|
|
202
|
+
3. Write results to \`.brainforge/reports/defense-pack.md\`
|
|
203
|
+
4. Update \`.brainforge/study/oral-defense.md\` with the 30s / 1min / 5min explanations
|
|
204
|
+
|
|
205
|
+
## Output Format
|
|
206
|
+
|
|
207
|
+
Write to \`.brainforge/reports/defense-pack.md\`:
|
|
208
|
+
|
|
209
|
+
\`\`\`md
|
|
210
|
+
# Defense Pack — ${config.projectName}
|
|
211
|
+
|
|
212
|
+
## Project summary
|
|
213
|
+
|
|
214
|
+
### 30-second explanation
|
|
215
|
+
[One clear sentence anyone can understand]
|
|
216
|
+
|
|
217
|
+
### 1-minute explanation
|
|
218
|
+
[3-4 sentences: problem, solution, main features, tech used]
|
|
219
|
+
|
|
220
|
+
### 5-minute explanation
|
|
221
|
+
[Full story: context, problem, solution, architecture, features, demo flow]
|
|
222
|
+
|
|
223
|
+
## Problem and solution
|
|
224
|
+
[What problem does the project solve? For whom?]
|
|
225
|
+
|
|
226
|
+
## Main features
|
|
227
|
+
[Bullet list of core features]
|
|
228
|
+
|
|
229
|
+
## Architecture explained simply
|
|
230
|
+
[Simple diagram or description — no jargon]
|
|
231
|
+
|
|
232
|
+
## Folder structure explained
|
|
233
|
+
[Each folder and what it contains]
|
|
234
|
+
|
|
235
|
+
## Database / API / UI explanation
|
|
236
|
+
[Only sections relevant to: ${config.stack.join(', ')}]
|
|
237
|
+
|
|
238
|
+
## What each important file does
|
|
239
|
+
| File | Role | How to explain it |
|
|
240
|
+
|
|
241
|
+
## Difficult parts to revise
|
|
242
|
+
| Topic | Why it is difficult | How to explain simply |
|
|
243
|
+
|
|
244
|
+
## Professor questions and answers
|
|
245
|
+
| Question | Suggested answer |
|
|
246
|
+
|
|
247
|
+
## Demo script
|
|
248
|
+
Step 1: [Show...]
|
|
249
|
+
Step 2: [Navigate to...]
|
|
250
|
+
Step 3: [Demonstrate...]
|
|
251
|
+
|
|
252
|
+
## What to say if asked "Did you use AI?"
|
|
253
|
+
Give an honest, ethical answer:
|
|
254
|
+
- AI was used as an assistant for structure, review, and learning
|
|
255
|
+
- The student understands the code and can defend the choices
|
|
256
|
+
- Do not encourage lying
|
|
257
|
+
- Example: "Yes, I used AI as a tool to help structure my work and review my code,
|
|
258
|
+
similar to how a developer uses Stack Overflow. I wrote and understand all the code."
|
|
259
|
+
|
|
260
|
+
## Final checklist before presentation
|
|
261
|
+
- [ ] I can explain the project goal
|
|
262
|
+
- [ ] I can explain the architecture
|
|
263
|
+
- [ ] I can explain every important file
|
|
264
|
+
- [ ] I can run the project without errors
|
|
265
|
+
- [ ] I can answer the professor questions above
|
|
266
|
+
\`\`\`
|
|
267
267
|
`;
|
|
268
268
|
}
|
|
269
269
|
//# sourceMappingURL=defensePack.js.map
|
|
@@ -53,125 +53,125 @@ async function difficultyCommand() {
|
|
|
53
53
|
console.log();
|
|
54
54
|
}
|
|
55
55
|
function generateDifficultyReportTemplate(projectName) {
|
|
56
|
-
return `# Difficulty Report — ${projectName}
|
|
57
|
-
|
|
58
|
-
_Generated by \`brainforge difficulty\`. Run \`/analyze-difficulty\` in your AI tool to fill this in._
|
|
59
|
-
|
|
60
|
-
## Summary
|
|
61
|
-
|
|
62
|
-
- **Overall difficulty:** _To be filled_
|
|
63
|
-
- **Risk for oral defense:** _To be filled_
|
|
64
|
-
|
|
65
|
-
## File Difficulty Map
|
|
66
|
-
|
|
67
|
-
| File | Difficulty /10 | Reason | Concepts needed | Defense risk |
|
|
68
|
-
|------|---------------:|--------|-----------------|-------------|
|
|
69
|
-
| _To be filled_ | | | | |
|
|
70
|
-
|
|
71
|
-
## Top files to study first
|
|
72
|
-
|
|
73
|
-
1. _To be filled_
|
|
74
|
-
2.
|
|
75
|
-
3.
|
|
76
|
-
|
|
77
|
-
## Too advanced patterns
|
|
78
|
-
|
|
79
|
-
| File | Pattern | Why difficult | Simpler alternative |
|
|
80
|
-
|------|---------|--------------|-------------------|
|
|
81
|
-
| _To be filled_ | | | |
|
|
82
|
-
|
|
83
|
-
## Concepts to review
|
|
84
|
-
|
|
85
|
-
| Concept | Files | Priority |
|
|
86
|
-
|---------|-------|----------|
|
|
87
|
-
| _To be filled_ | | |
|
|
88
|
-
|
|
89
|
-
## Recommended study plan
|
|
90
|
-
|
|
91
|
-
1. _To be filled_
|
|
92
|
-
2.
|
|
93
|
-
3.
|
|
56
|
+
return `# Difficulty Report — ${projectName}
|
|
57
|
+
|
|
58
|
+
_Generated by \`brainforge difficulty\`. Run \`/analyze-difficulty\` in your AI tool to fill this in._
|
|
59
|
+
|
|
60
|
+
## Summary
|
|
61
|
+
|
|
62
|
+
- **Overall difficulty:** _To be filled_
|
|
63
|
+
- **Risk for oral defense:** _To be filled_
|
|
64
|
+
|
|
65
|
+
## File Difficulty Map
|
|
66
|
+
|
|
67
|
+
| File | Difficulty /10 | Reason | Concepts needed | Defense risk |
|
|
68
|
+
|------|---------------:|--------|-----------------|-------------|
|
|
69
|
+
| _To be filled_ | | | | |
|
|
70
|
+
|
|
71
|
+
## Top files to study first
|
|
72
|
+
|
|
73
|
+
1. _To be filled_
|
|
74
|
+
2.
|
|
75
|
+
3.
|
|
76
|
+
|
|
77
|
+
## Too advanced patterns
|
|
78
|
+
|
|
79
|
+
| File | Pattern | Why difficult | Simpler alternative |
|
|
80
|
+
|------|---------|--------------|-------------------|
|
|
81
|
+
| _To be filled_ | | | |
|
|
82
|
+
|
|
83
|
+
## Concepts to review
|
|
84
|
+
|
|
85
|
+
| Concept | Files | Priority |
|
|
86
|
+
|---------|-------|----------|
|
|
87
|
+
| _To be filled_ | | |
|
|
88
|
+
|
|
89
|
+
## Recommended study plan
|
|
90
|
+
|
|
91
|
+
1. _To be filled_
|
|
92
|
+
2.
|
|
93
|
+
3.
|
|
94
94
|
`;
|
|
95
95
|
}
|
|
96
96
|
function generateAnalyzeDifficultyCommand(config) {
|
|
97
|
-
return `# /analyze-difficulty
|
|
98
|
-
|
|
99
|
-
**Objective:** Scan the project codebase, score file complexity, and produce a difficulty report.
|
|
100
|
-
|
|
101
|
-
## Context to Read First
|
|
102
|
-
|
|
103
|
-
- \`.brainforge/brain.md\`
|
|
104
|
-
- \`.brainforge/memory/coding-style.md\`
|
|
105
|
-
- \`.brainforge/memory/architecture.md\`
|
|
106
|
-
|
|
107
|
-
## Project Info
|
|
108
|
-
|
|
109
|
-
- **Project:** ${config.projectName}
|
|
110
|
-
- **Stack:** ${config.stack.join(', ')}
|
|
111
|
-
- **Code level:** ${config.codeLevel}
|
|
112
|
-
- **User level:** ${config.userLevel}
|
|
113
|
-
|
|
114
|
-
## Steps
|
|
115
|
-
|
|
116
|
-
1. Scan all source files in the project (exclude node_modules, dist, .git)
|
|
117
|
-
2. For each file, compute a difficulty score 1–10 using the criteria below
|
|
118
|
-
3. Identify patterns that would be hard to explain to a professor
|
|
119
|
-
4. Generate a recommended study plan
|
|
120
|
-
5. Write results to \`.brainforge/reports/difficulty-report.md\`
|
|
121
|
-
6. Update \`.brainforge/study/file-map.md\`
|
|
122
|
-
7. Update \`.brainforge/study/concepts-to-review.md\`
|
|
123
|
-
8. Update \`.brainforge/memory/learning-notes.md\` with files to understand
|
|
124
|
-
|
|
125
|
-
## Difficulty Scoring Criteria
|
|
126
|
-
|
|
127
|
-
Score each file from 1 (trivial) to 10 (very hard):
|
|
128
|
-
|
|
129
|
-
| Factor | Points |
|
|
130
|
-
|--------|--------|
|
|
131
|
-
| Multiple responsibilities in one file | +1-2 |
|
|
132
|
-
| Async / database / API logic | +1 |
|
|
133
|
-
| Authentication / session / security logic | +1-2 |
|
|
134
|
-
| Advanced TypeScript (generics, utility types) | +1-2 |
|
|
135
|
-
| Complex state management | +1 |
|
|
136
|
-
| Hidden side effects | +1 |
|
|
137
|
-
| External services integration | +1 |
|
|
138
|
-
| Testing / mocking complexity | +1 |
|
|
139
|
-
| Architecture patterns (middleware, DI, etc.) | +1-2 |
|
|
140
|
-
| Large file (>200 lines) | +1 |
|
|
141
|
-
|
|
142
|
-
## Output Format
|
|
143
|
-
|
|
144
|
-
Write to \`.brainforge/reports/difficulty-report.md\`:
|
|
145
|
-
|
|
146
|
-
\`\`\`md
|
|
147
|
-
## Summary
|
|
148
|
-
Overall difficulty: beginner | intermediate | advanced | professional
|
|
149
|
-
Risk for oral defense: low | medium | high
|
|
150
|
-
|
|
151
|
-
## File Difficulty Map
|
|
152
|
-
| File | Difficulty /10 | Reason | Concepts needed | Defense risk |
|
|
153
|
-
|
|
154
|
-
## Top files to study first
|
|
155
|
-
1.
|
|
156
|
-
2.
|
|
157
|
-
3.
|
|
158
|
-
|
|
159
|
-
## Too advanced patterns
|
|
160
|
-
| File | Pattern | Why difficult | Simpler alternative |
|
|
161
|
-
|
|
162
|
-
## Concepts to review
|
|
163
|
-
| Concept | Files | Priority |
|
|
164
|
-
|
|
165
|
-
## Recommended study plan
|
|
166
|
-
1.
|
|
167
|
-
2.
|
|
168
|
-
3.
|
|
169
|
-
\`\`\`
|
|
170
|
-
|
|
171
|
-
Also update:
|
|
172
|
-
- \`.brainforge/study/file-map.md\` — add each file with difficulty and must-understand flag
|
|
173
|
-
- \`.brainforge/study/concepts-to-review.md\` — add key concepts
|
|
174
|
-
- \`.brainforge/memory/learning-notes.md\` — add files to understand section
|
|
97
|
+
return `# /analyze-difficulty
|
|
98
|
+
|
|
99
|
+
**Objective:** Scan the project codebase, score file complexity, and produce a difficulty report.
|
|
100
|
+
|
|
101
|
+
## Context to Read First
|
|
102
|
+
|
|
103
|
+
- \`.brainforge/brain.md\`
|
|
104
|
+
- \`.brainforge/memory/coding-style.md\`
|
|
105
|
+
- \`.brainforge/memory/architecture.md\`
|
|
106
|
+
|
|
107
|
+
## Project Info
|
|
108
|
+
|
|
109
|
+
- **Project:** ${config.projectName}
|
|
110
|
+
- **Stack:** ${config.stack.join(', ')}
|
|
111
|
+
- **Code level:** ${config.codeLevel}
|
|
112
|
+
- **User level:** ${config.userLevel}
|
|
113
|
+
|
|
114
|
+
## Steps
|
|
115
|
+
|
|
116
|
+
1. Scan all source files in the project (exclude node_modules, dist, .git)
|
|
117
|
+
2. For each file, compute a difficulty score 1–10 using the criteria below
|
|
118
|
+
3. Identify patterns that would be hard to explain to a professor
|
|
119
|
+
4. Generate a recommended study plan
|
|
120
|
+
5. Write results to \`.brainforge/reports/difficulty-report.md\`
|
|
121
|
+
6. Update \`.brainforge/study/file-map.md\`
|
|
122
|
+
7. Update \`.brainforge/study/concepts-to-review.md\`
|
|
123
|
+
8. Update \`.brainforge/memory/learning-notes.md\` with files to understand
|
|
124
|
+
|
|
125
|
+
## Difficulty Scoring Criteria
|
|
126
|
+
|
|
127
|
+
Score each file from 1 (trivial) to 10 (very hard):
|
|
128
|
+
|
|
129
|
+
| Factor | Points |
|
|
130
|
+
|--------|--------|
|
|
131
|
+
| Multiple responsibilities in one file | +1-2 |
|
|
132
|
+
| Async / database / API logic | +1 |
|
|
133
|
+
| Authentication / session / security logic | +1-2 |
|
|
134
|
+
| Advanced TypeScript (generics, utility types) | +1-2 |
|
|
135
|
+
| Complex state management | +1 |
|
|
136
|
+
| Hidden side effects | +1 |
|
|
137
|
+
| External services integration | +1 |
|
|
138
|
+
| Testing / mocking complexity | +1 |
|
|
139
|
+
| Architecture patterns (middleware, DI, etc.) | +1-2 |
|
|
140
|
+
| Large file (>200 lines) | +1 |
|
|
141
|
+
|
|
142
|
+
## Output Format
|
|
143
|
+
|
|
144
|
+
Write to \`.brainforge/reports/difficulty-report.md\`:
|
|
145
|
+
|
|
146
|
+
\`\`\`md
|
|
147
|
+
## Summary
|
|
148
|
+
Overall difficulty: beginner | intermediate | advanced | professional
|
|
149
|
+
Risk for oral defense: low | medium | high
|
|
150
|
+
|
|
151
|
+
## File Difficulty Map
|
|
152
|
+
| File | Difficulty /10 | Reason | Concepts needed | Defense risk |
|
|
153
|
+
|
|
154
|
+
## Top files to study first
|
|
155
|
+
1.
|
|
156
|
+
2.
|
|
157
|
+
3.
|
|
158
|
+
|
|
159
|
+
## Too advanced patterns
|
|
160
|
+
| File | Pattern | Why difficult | Simpler alternative |
|
|
161
|
+
|
|
162
|
+
## Concepts to review
|
|
163
|
+
| Concept | Files | Priority |
|
|
164
|
+
|
|
165
|
+
## Recommended study plan
|
|
166
|
+
1.
|
|
167
|
+
2.
|
|
168
|
+
3.
|
|
169
|
+
\`\`\`
|
|
170
|
+
|
|
171
|
+
Also update:
|
|
172
|
+
- \`.brainforge/study/file-map.md\` — add each file with difficulty and must-understand flag
|
|
173
|
+
- \`.brainforge/study/concepts-to-review.md\` — add key concepts
|
|
174
|
+
- \`.brainforge/memory/learning-notes.md\` — add files to understand section
|
|
175
175
|
`;
|
|
176
176
|
}
|
|
177
177
|
//# sourceMappingURL=difficulty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AAmEA,wBAAgB,WAAW,IAAI,IAAI,CAmGlC"}
|
package/dist/commands/help.js
CHANGED
|
@@ -51,7 +51,6 @@ const SLASH_COMMANDS = [
|
|
|
51
51
|
{
|
|
52
52
|
group: 'Study & Defense',
|
|
53
53
|
commands: [
|
|
54
|
-
{ cmd: '/router', desc: 'Choose the best next command or workflow' },
|
|
55
54
|
{ cmd: '/study-phase N', desc: 'Generate study material for a phase' },
|
|
56
55
|
{ cmd: '/analyze-difficulty', desc: 'Score file complexity and create study plan' },
|
|
57
56
|
{ cmd: '/defense-pack', desc: 'Generate full oral defense preparation' },
|