Commit b88336e
feat: academy-first CLI/MCP workflow and stronger quality gate (#114)
* feat: academy-first CLI/MCP workflow and stronger quality gate
Most agent-authored courses should start as an academy — a connected
curriculum of one or more courses — not a single course file. This makes
that the default path across CLI, MCP, backend auth, and the runbook.
- Add `graspful create academy` CLI command and `graspful_create_academy`
MCP tool backed by shared `scaffoldAcademyObject`.
- Add `graspful_import_academy` MCP tool and `graspful import` support
for academy manifests with `--course-dir` resolution and per-course
publish.
- Allow API-key auth on `/orgs/:orgId/academies` by swapping
`SupabaseAuthGuard` for `JwtOrApiKeyGuard` so the CLI can import
academies without a browser session.
- Replace the weak `cross_concept_coverage` quality check with
`problem_teaching_alignment`: problems must reference material
introduced in the current KP, earlier KPs, or prerequisite concepts.
- Add advisory `kp_atomicity` warning that flags KP instructions with
long parallel lists (6+ items) as likely teaching multiple facts.
- Surface warnings in `graspful review` output and analytics.
- Bump default KP stub count from 2 to 3 and teach the brand scaffold
to take an optional `--topic` for specific landing copy.
- Optimistic quiz and section-exam UI: advance on submit via
`startTransition`, show a "Saving answer..." indicator, and roll back
on failure. Covered by new Vitest cases.
- Playwright config now builds the backend before starting it and
raises the timeout to 120s so live e2e runs are reproducible.
- Add end-to-end Playwright spec that scaffolds, imports, and publishes
an academy through the real CLI against a live backend.
- Refresh AGENTS.md, CLAUDE.md, README.md, docs/adding-a-course.md, and
per-package READMEs so the academy-first workflow is canonical.
- Rewrite `posthog-use-case-selling.yaml` to pass the new teaching
alignment and atomicity checks.
- Check in draft plan for the wrong-answer remediation loop.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: loosen teaching-alignment check to skip stubs and whole-KP drift
Harden checkProblemTeachingAlignment against false positives so a single
lexically drifted problem in an otherwise aligned KP no longer blocks the
review gate. Two changes:
- Skip the check when the teaching path has fewer than 8 distinct stems.
Stub fixtures and in-progress drafts effectively have nothing to judge
against and should not be punished by a content-quality gate.
- Only fail a KP when every judgable problem is off-topic. A drifted
single problem is a content-author nit, not a gate violation.
Also extracts the alignment ignore list to a module-level constant for
clarity and updates tests to cover the new whole-KP-drift behavior plus
stub-fixture immunity.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: align e2e test course fixture with stricter teaching-alignment check
The publish-draft-course e2e test was failing because its minimal course
YAML had stub-style instruction and workedExample text that shared no
vocabulary with the problems. The new problem_teaching_alignment check
correctly flagged the KPs as content the instruction doesn't teach, so
publish returned passed=false.
Update the fixture so instruction and worked example actually teach the
material the problems test — arithmetic addition, Rayleigh scattering,
water chemistry (concept-alpha) and addition, Earth's orbit, chemical
symbols (concept-beta). This is the canonical fix: the fixture should
model a real well-authored course, not a content-quality workaround.
Also clean up a set of stale planning docs that were already removed in
the working tree.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent c1e1405 commit b88336e
50 files changed
Lines changed: 2542 additions & 17189 deletions
File tree
- apps/web
- e2e
- src
- __tests__/components
- app/(marketing)/docs
- cli
- concepts/learning-staircase
- course-schema
- glossary
- components/app
- backend/src/knowledge-graph
- content
- courses
- docs
- future-plans
- plans
- packages
- cli
- src
- commands
- __tests__
- mcp
- src
- __tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
84 | 91 | | |
85 | 92 | | |
86 | | - | |
| 93 | + | |
87 | 94 | | |
88 | 95 | | |
89 | | - | |
| 96 | + | |
90 | 97 | | |
91 | 98 | | |
92 | | - | |
| 99 | + | |
93 | 100 | | |
94 | 101 | | |
95 | | - | |
96 | | - | |
| 102 | + | |
| 103 | + | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
101 | 108 | | |
| 109 | + | |
102 | 110 | | |
103 | 111 | | |
104 | 112 | | |
105 | 113 | | |
106 | 114 | | |
107 | | - | |
| 115 | + | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| |||
161 | 169 | | |
162 | 170 | | |
163 | 171 | | |
164 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
165 | 179 | | |
166 | 180 | | |
167 | 181 | | |
168 | 182 | | |
169 | | - | |
| 183 | + | |
170 | 184 | | |
171 | 185 | | |
172 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
80 | 84 | | |
81 | 85 | | |
82 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
83 | 90 | | |
84 | 91 | | |
85 | | - | |
| 92 | + | |
86 | 93 | | |
87 | 94 | | |
88 | | - | |
| 95 | + | |
89 | 96 | | |
90 | 97 | | |
91 | | - | |
| 98 | + | |
92 | 99 | | |
93 | 100 | | |
94 | | - | |
95 | | - | |
| 101 | + | |
| 102 | + | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
| 108 | + | |
101 | 109 | | |
102 | 110 | | |
103 | 111 | | |
104 | 112 | | |
105 | 113 | | |
106 | | - | |
| 114 | + | |
107 | 115 | | |
108 | 116 | | |
109 | 117 | | |
| |||
160 | 168 | | |
161 | 169 | | |
162 | 170 | | |
163 | | - | |
| 171 | + | |
164 | 172 | | |
165 | 173 | | |
166 | 174 | | |
| |||
169 | 177 | | |
170 | 178 | | |
171 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
172 | 186 | | |
173 | 187 | | |
174 | 188 | | |
175 | 189 | | |
176 | 190 | | |
177 | 191 | | |
178 | | - | |
| 192 | + | |
179 | 193 | | |
180 | 194 | | |
181 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | | - | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
65 | | - | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | | - | |
| 105 | + | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| |||
0 commit comments