epam-ai-conductor 0.1.1 → 0.3.0
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 +69 -10
- package/bin/workshop.js +1 -1
- package/dist/auth-check.js +3 -3
- package/dist/auth-check.js.map +1 -1
- package/dist/cli.js +18 -5
- package/dist/cli.js.map +1 -1
- package/dist/context-builder.js +39 -97
- package/dist/context-builder.js.map +1 -1
- package/dist/criteria.d.ts +35 -0
- package/dist/criteria.js +151 -0
- package/dist/criteria.js.map +1 -0
- package/dist/logger.d.ts +2 -0
- package/dist/logger.js +32 -0
- package/dist/logger.js.map +1 -0
- package/dist/mcp-server.d.ts +1 -0
- package/dist/mcp-server.js +97 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/project-scan.d.ts +25 -0
- package/dist/project-scan.js +129 -0
- package/dist/project-scan.js.map +1 -0
- package/dist/prompts.d.ts +16 -0
- package/dist/prompts.js +106 -0
- package/dist/prompts.js.map +1 -0
- package/dist/test-expectations.d.ts +31 -0
- package/dist/test-expectations.js +97 -0
- package/dist/test-expectations.js.map +1 -0
- package/dist/version-pin.d.ts +5 -0
- package/dist/version-pin.js +84 -0
- package/dist/version-pin.js.map +1 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# epam-ai-conductor
|
|
2
2
|
|
|
3
|
-
Socratic mentor CLI for the React Fundamentals course, powered by CodeMie + Claude.
|
|
3
|
+
**EPAM AI Conductor** — a Socratic AI mentor CLI for the **React Fundamentals** course, powered by CodeMie + Claude.
|
|
4
4
|
|
|
5
|
-
The
|
|
5
|
+
The mentor knows the full course content and hidden test expectations, but guides students with questions instead of answers — so they learn by doing, never by copy-pasting.
|
|
6
6
|
|
|
7
7
|
## Student setup
|
|
8
8
|
|
|
@@ -11,23 +11,38 @@ The agent knows the full course content and test expectations but guides student
|
|
|
11
11
|
git clone <template-repo-url> my-react-app
|
|
12
12
|
cd my-react-app
|
|
13
13
|
|
|
14
|
-
# 2. Install
|
|
15
|
-
npm install -g
|
|
14
|
+
# 2. Install EPAM AI Conductor
|
|
15
|
+
npm install -g epam-ai-conductor
|
|
16
16
|
|
|
17
17
|
# 3. Start a module session
|
|
18
|
-
|
|
18
|
+
ai-conductor start -m 1
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
On first run it
|
|
21
|
+
On first run it walks you through CodeMie setup (EPAM SSO login).
|
|
22
22
|
|
|
23
|
-
###
|
|
23
|
+
### Commands
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
ai-conductor help # show usage
|
|
27
|
+
ai-conductor start # pick a module interactively
|
|
28
|
+
ai-conductor start -m <1-5> # start a specific module
|
|
29
|
+
ai-conductor start -m <1-5> -d <path> # start in a specific directory
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Slash commands during a session
|
|
24
33
|
|
|
25
34
|
| Command | What it does |
|
|
26
35
|
|----------|-------------|
|
|
27
36
|
| `/hint` | One targeted hint — a question, not code |
|
|
28
|
-
| `/check` | Reviews your src
|
|
37
|
+
| `/check` | Reviews your `src/` against the task criteria |
|
|
29
38
|
| `/step` | Suggests the single most logical next step |
|
|
30
39
|
|
|
40
|
+
## Requirements
|
|
41
|
+
|
|
42
|
+
- Node.js >= 20
|
|
43
|
+
- A CodeMie account (EPAM SSO) — set up automatically on first run
|
|
44
|
+
- `codemie-claude` installed (`codemie install claude`)
|
|
45
|
+
|
|
31
46
|
---
|
|
32
47
|
|
|
33
48
|
## Course coordinator — updating content
|
|
@@ -43,4 +58,48 @@ npm run sync-content # copies from sibling repos into src/content/
|
|
|
43
58
|
npm run build # compiles TS + copies content into dist/
|
|
44
59
|
```
|
|
45
60
|
|
|
46
|
-
|
|
61
|
+
### Publishing a new version
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# 1. Bump the version
|
|
65
|
+
npm version patch # 0.1.2 → 0.1.3
|
|
66
|
+
# or
|
|
67
|
+
npm version minor # 0.1.2 → 0.2.0
|
|
68
|
+
|
|
69
|
+
# 2. Push the tag — GitLab CI will publish to npm automatically
|
|
70
|
+
git push origin --tags
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
> Requires `NPM_TOKEN` set in GitLab: **Settings → CI/CD → Variables**
|
|
74
|
+
|
|
75
|
+
### How the mentor evaluates (and stays grounded)
|
|
76
|
+
|
|
77
|
+
The MCP server exposes these tools to the mentor:
|
|
78
|
+
|
|
79
|
+
| Tool | Purpose |
|
|
80
|
+
|------|---------|
|
|
81
|
+
| `get_criteria` | Graded checklist with stable ids + point weights (parsed from the `## Criteria` section of each module's task). The source of truth for "is it done". |
|
|
82
|
+
| `get_test_expectations` | The objective contract a component's hidden tests assert (expected export/path, props, required output text, queried roles/testids, interactions) — never the raw test code. |
|
|
83
|
+
| `get_module_overview` | The module map linking each component to its criteria and test contract. |
|
|
84
|
+
| `get_theory` | Course theory, filterable by topic. |
|
|
85
|
+
| `scan_project` | A fresh structural snapshot of the student's current code. `/check` and `/hint` call this first so assessments are never stale. |
|
|
86
|
+
|
|
87
|
+
The persona enforces an intake triage (conceptual / debugging / answer-request / progress-check) and a pre-send self-check that strips any task-solving code or quoted test source.
|
|
88
|
+
|
|
89
|
+
### Curated criteria overrides
|
|
90
|
+
|
|
91
|
+
Auto-extraction follows the coursebook. To hand-tune a module's checklist, add
|
|
92
|
+
`src/content/module-N/criteria.override.json` — an array of
|
|
93
|
+
`{ id, component, points, requirement, details, optional }` — and it fully
|
|
94
|
+
replaces the parsed list for that module.
|
|
95
|
+
|
|
96
|
+
> Note: a few coursebook modules state a "max points" total that doesn't equal
|
|
97
|
+
> the sum of their listed items (e.g. Module 2 lists 56 pts under a "35 max"
|
|
98
|
+
> heading). `get_criteria` reports the actual itemized total; fix the source or
|
|
99
|
+
> add an override to reconcile.
|
|
100
|
+
|
|
101
|
+
### Session logs
|
|
102
|
+
|
|
103
|
+
Each MCP tool call is appended (locally, anonymous) to
|
|
104
|
+
`~/.ai-conductor/logs/tools-YYYY-MM-DD.jsonl` — useful for spotting where the
|
|
105
|
+
mentor mis-assessed or leaked. Delete the dir to clear.
|
package/bin/workshop.js
CHANGED
package/dist/auth-check.js
CHANGED
|
@@ -10,10 +10,10 @@ export async function ensureAuth() {
|
|
|
10
10
|
return;
|
|
11
11
|
console.log();
|
|
12
12
|
console.log(chalk.bold.cyan('╔══════════════════════════════════════════════════════╗'));
|
|
13
|
-
console.log(chalk.bold.cyan('║
|
|
13
|
+
console.log(chalk.bold.cyan('║ EPAM AI Conductor — First Time Setup ║'));
|
|
14
14
|
console.log(chalk.bold.cyan('╚══════════════════════════════════════════════════════╝'));
|
|
15
15
|
console.log();
|
|
16
|
-
console.log(chalk.white('To use the
|
|
16
|
+
console.log(chalk.white('To use the AI Conductor mentor you need a CodeMie account.'));
|
|
17
17
|
console.log();
|
|
18
18
|
console.log(chalk.bold('Steps:'));
|
|
19
19
|
console.log(chalk.white(' 1. Go to ') + chalk.cyan('https://codemie.ai'));
|
|
@@ -27,7 +27,7 @@ export async function ensureAuth() {
|
|
|
27
27
|
default: true,
|
|
28
28
|
}]);
|
|
29
29
|
if (!ready) {
|
|
30
|
-
console.log(chalk.yellow('\nSetup cancelled. Run `
|
|
30
|
+
console.log(chalk.yellow('\nSetup cancelled. Run `ai-conductor start` again when ready.'));
|
|
31
31
|
process.exit(0);
|
|
32
32
|
}
|
|
33
33
|
console.log();
|
package/dist/auth-check.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-check.js","sourceRoot":"","sources":["../src/auth-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,MAAM,OAAO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AAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC;IACpD,OAAO,CAAC,GAAG,EAAE,CAAC;IAEd,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAErE,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QACtD,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,8EAA8E,CAAC,CAAC,CAAC;QACvG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC,CAAC;AACtF,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -9,8 +9,10 @@ import ora from 'ora';
|
|
|
9
9
|
import inquirer from 'inquirer';
|
|
10
10
|
import * as pty from 'node-pty';
|
|
11
11
|
import { ensureAuth } from './auth-check.js';
|
|
12
|
+
import { ensureSupportedClaude } from './version-pin.js';
|
|
12
13
|
import { buildContext, MODULE_TITLES } from './context-builder.js';
|
|
13
14
|
import { TOTAL_MODULES } from './content-loader.js';
|
|
15
|
+
import { startMcpServer } from './mcp-server.js';
|
|
14
16
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
17
|
function readVersion() {
|
|
16
18
|
try {
|
|
@@ -45,7 +47,7 @@ function launchMentor(moduleNum, targetDir, execPath) {
|
|
|
45
47
|
const titleLine = ` Module ${moduleNum}: ${rawTitle}`;
|
|
46
48
|
const banner = '\r\n' +
|
|
47
49
|
chalk.bold.cyan(` ╔${'═'.repeat(BOX)}╗`) + '\r\n' +
|
|
48
|
-
chalk.bold.cyan(' ║') + chalk.bold.white(pad(' ⚛
|
|
50
|
+
chalk.bold.cyan(' ║') + chalk.bold.white(pad(' ⚛ EPAM AI Conductor')) + chalk.bold.cyan('║') + '\r\n' +
|
|
49
51
|
chalk.bold.cyan(' ║') + chalk.cyan(pad(titleLine)) + chalk.bold.cyan('║') + '\r\n' +
|
|
50
52
|
chalk.bold.cyan(' ║') + chalk.gray(pad(' /hint · /check · /step')) + chalk.bold.cyan('║') + '\r\n' +
|
|
51
53
|
chalk.bold.cyan(` ╚${'═'.repeat(BOX)}╝`) + '\r\n';
|
|
@@ -81,8 +83,8 @@ function launchMentor(moduleNum, targetDir, execPath) {
|
|
|
81
83
|
}
|
|
82
84
|
const program = new Command();
|
|
83
85
|
program
|
|
84
|
-
.name('
|
|
85
|
-
.description('
|
|
86
|
+
.name('ai-conductor')
|
|
87
|
+
.description('EPAM AI Conductor — Socratic mentor for the React Fundamentals course, powered by CodeMie')
|
|
86
88
|
.version(readVersion());
|
|
87
89
|
program
|
|
88
90
|
.command('start')
|
|
@@ -91,7 +93,7 @@ program
|
|
|
91
93
|
.option('-d, --dir <path>', 'Path to your React project (default: current directory)', process.cwd())
|
|
92
94
|
.action(async (opts) => {
|
|
93
95
|
console.log();
|
|
94
|
-
console.log(chalk.bold.cyan('
|
|
96
|
+
console.log(chalk.bold.cyan(' EPAM AI Conductor'));
|
|
95
97
|
console.log(chalk.gray(' Powered by CodeMie + Claude\n'));
|
|
96
98
|
// 1. Auth check
|
|
97
99
|
await ensureAuth();
|
|
@@ -125,6 +127,9 @@ program
|
|
|
125
127
|
console.log(chalk.white(' Install it with:'), chalk.cyan('codemie install claude'));
|
|
126
128
|
process.exit(1);
|
|
127
129
|
}
|
|
130
|
+
// 3.5. Align Claude Code with the CodeMie-supported version (best-effort,
|
|
131
|
+
// avoids CodeMie's interactive version-mismatch menu mid-launch).
|
|
132
|
+
ensureSupportedClaude();
|
|
128
133
|
// 4. Build context into target dir
|
|
129
134
|
const spinner = ora(`Preparing Module ${moduleNum} mentor context...`).start();
|
|
130
135
|
try {
|
|
@@ -161,7 +166,7 @@ program
|
|
|
161
166
|
console.log();
|
|
162
167
|
console.log(chalk.bold.cyan(` ╔${'═'.repeat(BOX)}╗`));
|
|
163
168
|
console.log(chalk.bold.cyan(' ║') + chalk.bold.white(pad(' ⚛ EPAM AI Conductor')) + chalk.bold.cyan('║'));
|
|
164
|
-
console.log(chalk.bold.cyan(' ║') + chalk.gray(pad(' React Course
|
|
169
|
+
console.log(chalk.bold.cyan(' ║') + chalk.gray(pad(' React Fundamentals Course Mentor')) + chalk.bold.cyan('║'));
|
|
165
170
|
console.log(chalk.bold.cyan(` ╚${'═'.repeat(BOX)}╝`));
|
|
166
171
|
console.log();
|
|
167
172
|
console.log(chalk.bold(' Commands:'));
|
|
@@ -182,5 +187,13 @@ program
|
|
|
182
187
|
console.log(' ' + chalk.cyan('/step') + chalk.gray(' — move to the next step'));
|
|
183
188
|
console.log();
|
|
184
189
|
});
|
|
190
|
+
program
|
|
191
|
+
.command('mcp')
|
|
192
|
+
.description('Start MCP server for a module (used internally by Claude Code)')
|
|
193
|
+
.requiredOption('-m, --module <number>', 'Module number')
|
|
194
|
+
.action(async (opts) => {
|
|
195
|
+
const moduleNum = parseInt(opts.module, 10);
|
|
196
|
+
await startMcpServer(moduleNum);
|
|
197
|
+
});
|
|
185
198
|
program.parse(process.argv);
|
|
186
199
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MA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AE,CAAC;AAChB,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,KAAK,CAAC;KACd,WAAW,CAAC,gEAAgE,CAAC;KAC7E,cAAc,CAAC,uBAAuB,EAAE,eAAe,CAAC;KACxD,MAAM,CAAC,KAAK,EAAE,IAAwB,EAAE,EAAE;IACzC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC5C,MAAM,cAAc,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
package/dist/context-builder.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { writeFileSync, mkdirSync } from 'fs';
|
|
2
2
|
import { join } from 'path';
|
|
3
|
-
import {
|
|
3
|
+
import { hintCommand, checkCommand, stepCommand } from './prompts.js';
|
|
4
4
|
export const MODULE_TITLES = {
|
|
5
5
|
1: 'React Components & Project Structure',
|
|
6
6
|
2: 'Routing, Forms & Custom Hooks',
|
|
@@ -9,106 +9,48 @@ export const MODULE_TITLES = {
|
|
|
9
9
|
5: 'Testing with React Testing Library',
|
|
10
10
|
};
|
|
11
11
|
export function buildContext(moduleNum, targetDir) {
|
|
12
|
-
const { theory, task, tests } = loadModule(moduleNum);
|
|
13
|
-
const title = MODULE_TITLES[moduleNum] ?? `Module ${moduleNum}`;
|
|
14
|
-
// CLAUDE.md: persona + rules only (~2k chars), heavy content in @-imported files
|
|
15
|
-
const claudeMd = `# React Course — Module ${moduleNum}: ${title}
|
|
16
|
-
|
|
17
|
-
You are a Socratic mentor for a React fundamentals course.
|
|
18
|
-
The student is working on Module ${moduleNum} in their local project.
|
|
19
|
-
|
|
20
|
-
## Working Directory
|
|
21
|
-
|
|
22
|
-
You are running inside the student's React project at: \`${targetDir}\`
|
|
23
|
-
The student's source code lives in the \`src/\` subdirectory of this folder.
|
|
24
|
-
The project is a pre-configured React template — the student already has it set up locally.
|
|
25
|
-
Always use the Read tool to inspect the student's actual files — do not assume what they have written.
|
|
26
|
-
When referencing files, use paths relative to \`${targetDir}\` (e.g. \`src/components/Header.tsx\`).
|
|
27
|
-
|
|
28
|
-
## Mentor Rules — follow these strictly
|
|
29
|
-
|
|
30
|
-
- NEVER write working component code for the student.
|
|
31
|
-
- NEVER paste or quote from the test files.
|
|
32
|
-
- NEVER reveal expected test output directly.
|
|
33
|
-
- When the student is stuck: ask a targeted question — "What should this component return when the list is empty?"
|
|
34
|
-
- When code is wrong: point to the specific file/line and ask "What does this return right now?"
|
|
35
|
-
- When something is missing: ask "Which criterion from the task do you think isn't covered yet?"
|
|
36
|
-
- After the student writes or updates code: silently validate it against the task criteria and test expectations, then ask if they feel it's complete.
|
|
37
|
-
- Use the Read tool freely to look at the student's actual src/ files before commenting.
|
|
38
|
-
- NEVER ask the student to run terminal commands (find, ls, cat, etc.) to show you their files — you already have the Read tool and you know where the project is.
|
|
39
|
-
- NEVER ask the student to show you file contents, paste code, or tell you what's in a file — read it yourself with the Read tool.
|
|
40
|
-
- Keep responses concise — one point at a time.
|
|
41
|
-
|
|
42
|
-
## On module completion
|
|
43
|
-
|
|
44
|
-
When ALL criteria for Module ${moduleNum} are met (you verified with Read tool), congratulate the student and say exactly:
|
|
45
|
-
|
|
46
|
-
"🎉 Module ${moduleNum} complete! To start Module ${moduleNum + 1}, run this in your terminal:
|
|
47
|
-
\`react-workshop start --module ${moduleNum + 1}\`
|
|
48
|
-
This will load the new module context. See you there!"
|
|
49
|
-
|
|
50
|
-
Then do not continue the conversation — the session for this module is done.
|
|
51
|
-
|
|
52
|
-
## On session start
|
|
53
|
-
|
|
54
|
-
Greet the student warmly. Ask whether they have already read the task or if they'd like a quick overview.
|
|
55
|
-
Then ask: "Where would you like to start?"
|
|
56
|
-
|
|
57
|
-
Do NOT dump all criteria at once. Guide step by step.
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
@.claude/module-theory.md
|
|
62
|
-
@.claude/module-task.md
|
|
63
|
-
@.claude/module-tests.md
|
|
64
|
-
`;
|
|
65
|
-
const theoryMd = `## MODULE ${moduleNum} THEORY\n\n${theory}`;
|
|
66
|
-
const taskMd = `## MODULE ${moduleNum} TASK & CRITERIA\n\n${task}`;
|
|
67
|
-
const testsMd = `## TEST EXPECTATIONS — MENTOR EYES ONLY
|
|
68
|
-
|
|
69
|
-
> These are the automated tests that will validate the student's submission on AutoCode.
|
|
70
|
-
> Use this section as your private knowledge to guide the student accurately.
|
|
71
|
-
> NEVER quote, paraphrase, or reveal the test source code to the student.
|
|
72
|
-
> You may say things like "The tests check that this component renders X" without showing the test.
|
|
73
|
-
|
|
74
|
-
${tests}`;
|
|
75
|
-
const hintCmd = `Read the student's current src/ directory with the Read tool.
|
|
76
|
-
Based on what you see and the task requirements, give ONE specific hint.
|
|
77
|
-
The hint must be a guiding question or direction — never a code snippet or direct answer.
|
|
78
|
-
|
|
79
|
-
Good hint: "Your CourseCard receives duration in minutes — how would you display that as hours and minutes?"
|
|
80
|
-
Bad hint: "Use Math.floor(duration / 60) to get the hours."
|
|
81
|
-
|
|
82
|
-
After the hint, ask: "Does that point you in the right direction?"`;
|
|
83
|
-
const checkCmd = `Read all files in src/ with the Read tool.
|
|
84
|
-
Compare the student's implementation against each task criterion one by one.
|
|
85
|
-
|
|
86
|
-
For each criterion output one line:
|
|
87
|
-
✓ <criterion> — done
|
|
88
|
-
✗ <criterion> — missing
|
|
89
|
-
⚠ <criterion> — partially done, then explain what's missing in one sentence
|
|
90
|
-
|
|
91
|
-
For items marked ✗ or ⚠: ask the student what they think is needed — do not explain directly.
|
|
92
|
-
End with a summary: "X of Y criteria complete."
|
|
93
|
-
|
|
94
|
-
If ALL criteria are ✓, say:
|
|
95
|
-
"🎉 Module ${moduleNum} complete! To start Module ${moduleNum + 1}, run this in your terminal:
|
|
96
|
-
\`react-workshop start --module ${moduleNum + 1}\`
|
|
97
|
-
This will load the new module context. See you there!"`;
|
|
98
|
-
const stepCmd = `Read src/ with the Read tool.
|
|
99
|
-
Based on the task criteria and what the student has already implemented, identify the single most logical next step.
|
|
100
|
-
|
|
101
|
-
Present it as a question:
|
|
102
|
-
"It looks like Header is done. What component would you work on next according to the project architecture?"
|
|
103
|
-
|
|
104
|
-
Do not list multiple steps — one at a time only.`;
|
|
105
12
|
const claudeDir = join(targetDir, '.claude');
|
|
106
13
|
const commandsDir = join(claudeDir, 'commands');
|
|
107
14
|
mkdirSync(commandsDir, { recursive: true });
|
|
15
|
+
// Minimal CLAUDE.md — slash commands only, no persona (persona lives in MCP server instructions)
|
|
16
|
+
const claudeMd = `## Slash Commands
|
|
17
|
+
|
|
18
|
+
- \`/hint\` — get a targeted hint without spoiling the solution
|
|
19
|
+
- \`/check\` — check your current progress against all criteria
|
|
20
|
+
- \`/step\` — find out the single most logical next step
|
|
21
|
+
`;
|
|
22
|
+
const hintCmd = hintCommand(moduleNum);
|
|
23
|
+
const checkCmd = checkCommand(moduleNum);
|
|
24
|
+
const stepCmd = stepCommand(moduleNum);
|
|
25
|
+
// .mcp.json (project root) — Claude Code reads MCP servers from here (and
|
|
26
|
+
// ~/.claude.json), NOT from .claude/settings.json. This is what actually
|
|
27
|
+
// wires up the mentor's tools.
|
|
28
|
+
const mcpConfig = {
|
|
29
|
+
mcpServers: {
|
|
30
|
+
'ai-conductor': {
|
|
31
|
+
type: 'stdio',
|
|
32
|
+
command: 'ai-conductor',
|
|
33
|
+
args: ['mcp', '--module', String(moduleNum)],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
// settings.json — trust the project .mcp.json server automatically and
|
|
38
|
+
// pre-approve the tools the mentor needs, so the student is never
|
|
39
|
+
// interrupted by permission prompts. Only the MCP tools + read-only tools
|
|
40
|
+
// are allowed; Edit/Write/Bash still prompt (the mentor must never modify
|
|
41
|
+
// the student's code).
|
|
42
|
+
const settings = {
|
|
43
|
+
enableAllProjectMcpServers: true,
|
|
44
|
+
permissions: {
|
|
45
|
+
allow: [
|
|
46
|
+
'mcp__ai-conductor', // all ai-conductor MCP tools (criteria, scan_project, etc.)
|
|
47
|
+
'Read', // also covers Grep/Glob read operations
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
};
|
|
108
51
|
writeFileSync(join(claudeDir, 'CLAUDE.md'), claudeMd, 'utf-8');
|
|
109
|
-
writeFileSync(join(
|
|
110
|
-
writeFileSync(join(claudeDir, '
|
|
111
|
-
writeFileSync(join(claudeDir, 'module-tests.md'), testsMd, 'utf-8');
|
|
52
|
+
writeFileSync(join(targetDir, '.mcp.json'), JSON.stringify(mcpConfig, null, 2), 'utf-8');
|
|
53
|
+
writeFileSync(join(claudeDir, 'settings.json'), JSON.stringify(settings, null, 2), 'utf-8');
|
|
112
54
|
writeFileSync(join(commandsDir, 'hint.md'), hintCmd, 'utf-8');
|
|
113
55
|
writeFileSync(join(commandsDir, 'check.md'), checkCmd, 'utf-8');
|
|
114
56
|
writeFileSync(join(commandsDir, 'step.md'), stepCmd, 'utf-8');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-builder.js","sourceRoot":"","sources":["../src/context-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"context-builder.js","sourceRoot":"","sources":["../src/context-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtE,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,CAAC,EAAE,sCAAsC;IACzC,CAAC,EAAE,+BAA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AAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACzF,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC5F,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAChE,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface Criterion {
|
|
2
|
+
/** Stable id, e.g. "m1-coursecard-2" */
|
|
3
|
+
id: string;
|
|
4
|
+
/** Component / section this criterion belongs to */
|
|
5
|
+
component: string;
|
|
6
|
+
/** Point value (0 for ungraded extra-task items) */
|
|
7
|
+
points: number;
|
|
8
|
+
/** The requirement text */
|
|
9
|
+
requirement: string;
|
|
10
|
+
/** Indented sub-bullets that detail the requirement */
|
|
11
|
+
details: string[];
|
|
12
|
+
/** True for "Extra Task" items that are not part of the graded total */
|
|
13
|
+
optional: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Extract structured, graded criteria from a module's task markdown.
|
|
17
|
+
*
|
|
18
|
+
* Anchors to the "## Criteria" section so setup steps, project-structure
|
|
19
|
+
* trees and code samples earlier in the file are never mistaken for
|
|
20
|
+
* criteria. Captures point weights and indented sub-requirements, and
|
|
21
|
+
* marks everything under an "Extra Task" heading as optional.
|
|
22
|
+
*/
|
|
23
|
+
export declare function extractCriteria(taskMd: string, moduleNum: number): Criterion[];
|
|
24
|
+
/**
|
|
25
|
+
* Load criteria for a module. If a curated `criteria.override.json` exists in
|
|
26
|
+
* the module's content dir, it fully replaces the auto-extracted list — this
|
|
27
|
+
* lets a coordinator hand-tune criteria without changing the parser.
|
|
28
|
+
*/
|
|
29
|
+
export declare function loadCriteria(moduleNum: number, taskMd: string): Criterion[];
|
|
30
|
+
/** Group criteria by component for display. */
|
|
31
|
+
export declare function groupByComponent(criteria: Criterion[]): Map<string, Criterion[]>;
|
|
32
|
+
/** Total graded points (excludes optional extra-task items). */
|
|
33
|
+
export declare function totalPoints(criteria: Criterion[]): number;
|
|
34
|
+
/** Render a single criterion as one human-readable line. */
|
|
35
|
+
export declare function formatCriterion(c: Criterion): string;
|
package/dist/criteria.js
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from 'fs';
|
|
2
|
+
import { join, dirname } from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
const CONTENT_DIR = join(__dirname, 'content');
|
|
6
|
+
function slugify(s) {
|
|
7
|
+
return s
|
|
8
|
+
.toLowerCase()
|
|
9
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
10
|
+
.replace(/^-+|-+$/g, '') || 'general';
|
|
11
|
+
}
|
|
12
|
+
/** Clean a "### ..." heading into a component/section label. */
|
|
13
|
+
function cleanComponentHeading(raw) {
|
|
14
|
+
let s = raw.trim();
|
|
15
|
+
// Strip markdown link: [Header component](url) -> Header component
|
|
16
|
+
s = s.replace(/\[([^\]]+)\]\([^)]*\)/g, '$1');
|
|
17
|
+
// Prefer a bold token if present (modules 3 & 5 bold the component name)
|
|
18
|
+
const bold = s.match(/\*\*([^*]+)\*\*/);
|
|
19
|
+
if (bold)
|
|
20
|
+
return stripComponentWord(bold[1]);
|
|
21
|
+
// Otherwise strip formatting and trailing punctuation
|
|
22
|
+
s = s.replace(/\*\*/g, '').replace(/[:.\s]+$/g, '').trim();
|
|
23
|
+
return stripComponentWord(s) || 'General';
|
|
24
|
+
}
|
|
25
|
+
/** Drop a trailing "Component"/"components" word so headings match test names. */
|
|
26
|
+
function stripComponentWord(s) {
|
|
27
|
+
return s.replace(/\s+components?\s*$/i, '').trim() || s.trim();
|
|
28
|
+
}
|
|
29
|
+
const CRITERIA_HEADING = /^##\s+Criteria\b/i;
|
|
30
|
+
const EXTRA_HEADING = /^#{2,4}\s+.*\bExtra\s+Task\b/i;
|
|
31
|
+
const SUBHEADING = /^###\s+(.+)/;
|
|
32
|
+
const POINT_LINE = /^[*-]\s*\[\s*(\d+)\s*points?\s*\]\s*-?\s*(.+)$/i;
|
|
33
|
+
const TOP_BULLET = /^[*-]\s+(.+)$/;
|
|
34
|
+
const SUB_BULLET = /^\s+[*-]\s+(.+)$/;
|
|
35
|
+
/**
|
|
36
|
+
* Extract structured, graded criteria from a module's task markdown.
|
|
37
|
+
*
|
|
38
|
+
* Anchors to the "## Criteria" section so setup steps, project-structure
|
|
39
|
+
* trees and code samples earlier in the file are never mistaken for
|
|
40
|
+
* criteria. Captures point weights and indented sub-requirements, and
|
|
41
|
+
* marks everything under an "Extra Task" heading as optional.
|
|
42
|
+
*/
|
|
43
|
+
export function extractCriteria(taskMd, moduleNum) {
|
|
44
|
+
const lines = taskMd.split('\n');
|
|
45
|
+
// Find the start of the graded criteria section.
|
|
46
|
+
const start = lines.findIndex(l => CRITERIA_HEADING.test(l));
|
|
47
|
+
const scan = start === -1 ? lines : lines.slice(start + 1);
|
|
48
|
+
const criteria = [];
|
|
49
|
+
let component = 'Common';
|
|
50
|
+
let optional = false;
|
|
51
|
+
const seq = new Map();
|
|
52
|
+
const pushCriterion = (points, requirement) => {
|
|
53
|
+
const slug = slugify(component);
|
|
54
|
+
const n = (seq.get(slug) ?? 0) + 1;
|
|
55
|
+
seq.set(slug, n);
|
|
56
|
+
const c = {
|
|
57
|
+
id: `m${moduleNum}-${slug}-${n}`,
|
|
58
|
+
component,
|
|
59
|
+
points,
|
|
60
|
+
requirement: requirement.trim(),
|
|
61
|
+
details: [],
|
|
62
|
+
optional,
|
|
63
|
+
};
|
|
64
|
+
criteria.push(c);
|
|
65
|
+
return c;
|
|
66
|
+
};
|
|
67
|
+
let current = null;
|
|
68
|
+
for (const line of scan) {
|
|
69
|
+
if (EXTRA_HEADING.test(line)) {
|
|
70
|
+
optional = true;
|
|
71
|
+
const m = line.match(SUBHEADING);
|
|
72
|
+
if (m)
|
|
73
|
+
component = cleanComponentHeading(m[1]);
|
|
74
|
+
current = null;
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const heading = line.match(SUBHEADING);
|
|
78
|
+
if (heading) {
|
|
79
|
+
component = cleanComponentHeading(heading[1]);
|
|
80
|
+
current = null;
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
const sub = line.match(SUB_BULLET);
|
|
84
|
+
if (sub && current) {
|
|
85
|
+
current.details.push(sub[1].trim());
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
const pts = line.match(POINT_LINE);
|
|
89
|
+
if (pts) {
|
|
90
|
+
current = pushCriterion(parseInt(pts[1], 10), pts[2]);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
// Top-level bullet without a point value (e.g. optional extra-task items)
|
|
94
|
+
const bullet = line.match(TOP_BULLET);
|
|
95
|
+
if (bullet && !/^\s*\[/.test(bullet[1])) {
|
|
96
|
+
current = pushCriterion(0, bullet[1]);
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return criteria;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Load criteria for a module. If a curated `criteria.override.json` exists in
|
|
104
|
+
* the module's content dir, it fully replaces the auto-extracted list — this
|
|
105
|
+
* lets a coordinator hand-tune criteria without changing the parser.
|
|
106
|
+
*/
|
|
107
|
+
export function loadCriteria(moduleNum, taskMd) {
|
|
108
|
+
const overridePath = join(CONTENT_DIR, `module-${moduleNum}`, 'criteria.override.json');
|
|
109
|
+
if (existsSync(overridePath)) {
|
|
110
|
+
try {
|
|
111
|
+
const parsed = JSON.parse(readFileSync(overridePath, 'utf-8'));
|
|
112
|
+
if (Array.isArray(parsed) && parsed.length > 0) {
|
|
113
|
+
return parsed.map((c, i) => ({
|
|
114
|
+
id: c.id ?? `m${moduleNum}-override-${i + 1}`,
|
|
115
|
+
component: c.component ?? 'General',
|
|
116
|
+
points: c.points ?? 0,
|
|
117
|
+
requirement: c.requirement ?? '',
|
|
118
|
+
details: c.details ?? [],
|
|
119
|
+
optional: c.optional ?? false,
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
// Fall through to auto-extraction on malformed override.
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return extractCriteria(taskMd, moduleNum);
|
|
128
|
+
}
|
|
129
|
+
/** Group criteria by component for display. */
|
|
130
|
+
export function groupByComponent(criteria) {
|
|
131
|
+
const map = new Map();
|
|
132
|
+
for (const c of criteria) {
|
|
133
|
+
const list = map.get(c.component) ?? [];
|
|
134
|
+
list.push(c);
|
|
135
|
+
map.set(c.component, list);
|
|
136
|
+
}
|
|
137
|
+
return map;
|
|
138
|
+
}
|
|
139
|
+
/** Total graded points (excludes optional extra-task items). */
|
|
140
|
+
export function totalPoints(criteria) {
|
|
141
|
+
return criteria.filter(c => !c.optional).reduce((sum, c) => sum + c.points, 0);
|
|
142
|
+
}
|
|
143
|
+
/** Render a single criterion as one human-readable line. */
|
|
144
|
+
export function formatCriterion(c) {
|
|
145
|
+
const pts = c.optional ? 'extra' : `${c.points} pt${c.points === 1 ? '' : 's'}`;
|
|
146
|
+
const head = `[${c.id}] (${pts}) ${c.requirement}`;
|
|
147
|
+
if (c.details.length === 0)
|
|
148
|
+
return head;
|
|
149
|
+
return head + '\n' + c.details.map(d => ` • ${d}`).join('\n');
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=criteria.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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