feat: academy-first CLI/MCP workflow and stronger quality gate - #114
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…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>
…heck 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
graspful create academyCLI +graspful_create_academyMCP tool, newgraspful_import_academyMCP tool, andgraspful importsupport for academy manifests with--course-dirand per-course publish. Backendacademy-graph.controllernow accepts API-key auth viaJwtOrApiKeyGuardso the CLI can drive the whole loop without a browser session.cross_concept_coveragewithproblem_teaching_alignment(problems must reference material introduced in the current KP, earlier KPs, or prerequisite concepts) and add akp_atomicityadvisory warning when a KP instruction contains a long parallel list (6+ items, The Math Academy Way Ch. 14). Warnings surface ingraspful reviewoutput. Bump the default KP stub count from 2 to 3 and teach the brand scaffold to accept--topicfor specific landing copy.startTransitionand show a "Saving answer..." indicator, with rollback on failure. Covered by new Vitest tests.posthog-use-case-selling.yamlto pass the new teaching alignment and atomicity checks; refresh AGENTS.md, CLAUDE.md, README.md,docs/adding-a-course.md, and per-package READMEs so the academy-first workflow is canonical. Check in the draft plan for the wrong-answer remediation loop.agent-academy-cli-flow.spec.tsscaffolds, imports, and publishes an academy through the real CLI against a live backend.Test plan
bun run test— 578 backend, 263 web, 35 shared, 10 mcp, CLI all pass. Fixed stale MCPTOOLS.lengthassertion (10 -> 12).bun run build— all 6 turbo tasks pass (effective typecheck).bun run lint— touched workspaces lint clean. Pre-existing ESLint v9 config gap inapps/siteis unrelated and reproduces onmain.bun x playwright test agent-academy-cli-flow— new academy CLI e2e passes (21.8s).bun x playwright test docs-smoke— 24 smoke tests pass (covers every doc page touched in this PR).Generated with Claude Code