Prompt file imported from ZVanoZ/ts-react-petrichenko (
.cursor/commands/review.md). Copyright stays with the author.
REVIEW Command - Course Material & Solution Analysis
This command focuses on the @TODO: "Cursor AI" block from the root readme.md. It checks lesson relevance using up‑to‑date documentation (via MCP user-context7 / @context7) and attaches short results to the course table of contents, while writing detailed reports next to each lesson.
The command is independent from vanzan01 "cursor-memory-bank": it does not require any Memory Bank files to exist and does not create or update them. It works only with lesson folders and the project documentation files described below.
Responsibilities
The /review command implements the following high‑level tasks:
-
Relevance check for a single lesson
- Use up‑to‑date documentation and examples (via MCP
user-context7/@context7) to verify that the lesson content is still accurate and complete. - Write a detailed report to
ai-review.mdin the lesson folder. - Add or update a collapsible
detailsblock in the rootreadme.mdunder the corresponding lesson entry in the## Содержаниеsection.
- Use up‑to‑date documentation and examples (via MCP
-
Bulk relevance check for all lessons
- Iterate over all lessons listed in the
## Содержаниеsection of the rootreadme.md. - For each lesson, perform the same workflow as for a single lesson, updating both the per‑lesson
ai-review.mdand the relevantdetailsblock inreadme.md.
- Iterate over all lessons listed in the
-
Solution quality analysis
- For a given lesson, analyze the user's solution:
- highlight knowledge gaps;
- identify weak or non‑idiomatic implementations;
- recommend concrete improvements and next study steps.
- Record this analysis in
ai-review.md(in a dedicated section) or in a separatelesson-reviewsection, depending on the lesson structure.
- For a given lesson, analyze the user's solution:
-
Usage guide for Cursor AI
- Generate and maintain a concise guide that explains how to use Cursor AI effectively in this repository (including
/van,/plan,/build,/reviewand other commands). - Store this guide in
cursor-ai-usage.mdat the repository root and reference it from the rootreadme.md.
- Generate and maintain a concise guide that explains how to use Cursor AI effectively in this repository (including
Subcommands
/review lesson <lesson-path>
Purpose: Run a relevance check for a single lesson and update its summary in the root readme.md.
- Input
lesson-path: relative path to the lesson directory (for example,20-ts/40-classes/110-this-and-typed-context).
- Expected lesson content (typical)
readme.mdwith theory, tasks or notes and/orsrcdirectory with the lesson source code.
- Workflow
- Determine lesson context
- Read
readme.mdand/or relevant files underlesson-path(especiallysrc). - Extract key topics and concepts to verify (for example,
Type aliases,Generics functions,thistyping, etc.).
- Read
- Check relevance via MCP
user-context7/@context7- For each key topic, query the external documentation and examples:
- identify breaking changes, deprecated patterns, or new best practices;
- detect missing but important subtopics.
- For each key topic, query the external documentation and examples:
- Write or update
lesson-path/ai-review.md- Create the file if it does not exist.
- At minimum, include:
- date of the check;
- overall status;
- detailed per‑topic notes;
- recommended extra topics to learn if content is incomplete or outdated.
- Update the corresponding entry in the root
readme.md- Locate the lesson item in the
## Содержаниеsection:- find the numbered list entry describing the lesson;
- use the immediately following bullet with a link (for example,
* [src](20-ts/40-classes/110-this-and-typed-context)) to matchlesson-path.
- Under this entry, ensure there is exactly one collapsible block:
<details> <summary>ai-relevance</summary> [ai-review.md](<lesson-path>/ai-review.md) ```text Дата проверки: <YYYY-MM-DD> Статус: <Актуально | Частично устарело | Устарело> ``` </details> - If the block does not exist, create it in this exact format, preserving the surrounding indentation style.
- If the block already exists, only update:
- the link to
ai-review.md(if the path has changed); - the
Дата проверкиline; - the
Статусline.
- the link to
- Locate the lesson item in the
- Determine lesson context
/review all
Purpose: Perform relevance checks for all lessons listed in the ## Содержание section.
- Workflow
- Read the root
readme.md. - Parse the
## Содержаниеsection and collect all lesson entries that:- have a numbered item with a lesson title;
- are immediately followed by a bullet item containing a link either to
srcor toreadme.mdin a lesson directory (for example,* [src](20-ts/40-classes/110-this-and-typed-context)).
- For each collected lesson:
- determine
lesson-pathfrom the link target; - run the same workflow as
/review lesson <lesson-path>:- compute relevance using up‑to‑date docs;
- write/update
ai-relevance.md; - add/update the corresponding
<details>block under that lesson entry inreadme.md.
- determine
- Optionally, implementations may support skipping recently checked lessons (for example, based on
Дата проверкиwithin a certain threshold), but this is an optimization, not a requirement of the command contract.
- Read the root
/review analyze <lesson-path>
Purpose: Analyze the quality of the user's solution for a specific lesson and point out knowledge gaps and weak parts of the implementation.
- Input
lesson-path: relative path to the lesson directory where the user's work resides.
- Workflow
- Read the solution code and any solution‑specific
readme.mdunderlesson-path. - Using MCP
user-context7/@context7and, where available, the official or reference solutions:- compare interfaces, types, patterns and architecture;
- identify:
- missing required features for this lesson;
- non‑idiomatic or unsafe TypeScript or React usage;
- unnecessary complexity or code smells.
- Write analysis into
lesson-path/ai-review.md:- Ensure there is a single top‑level section
## Анализ вашего решенияthat acts as a chronological log of all analysis runs for this lesson. - For each invocation of
/review analyze <lesson-path>:- insert a new sub‑section at the top of
## Анализ вашего решенияwith the heading:### Дата: <YYYY-MM-DD HH:mm>(24‑hour format, whereHH= hours andmm= minutes, using the actual local analysis time);
- inside this sub‑section, structure the content using the following blocks and numbered lists:
where:## Анализ вашего решения ### Дата: <YYYY-MM-DD HH:mm> #### Выполнено: 1. "<OLD-DATE> п.N" #### "@TODO: 1. "<OLD-DATE> п.M" #### Пробелы в знаниях 1. ... #### Замечания к реализации 1. ... #### Рекомендованные шаги 1. ..."<OLD-DATE> п.N"is a reference to itemNfrom an earlier### Дата: ...section in the sameai-review.mdfile.
- insert a new sub‑section at the top of
- When constructing
Выполненоand"@TODO:- parse all earlier
### Дата: ...sections within## Анализ вашего решения; - for each previously suggested item, determine whether the current solution code now satisfies it:
- if yes, add a reference under
Выполненоand treat this recommendation as closed; - if no, add or keep a reference under
"@TODOuntil it is eventually satisfied in a future run.
- if yes, add a reference under
- parse all earlier
- Preserve all previous
### Дата: ...sections verbatim to maintain a full history; never overwrite or delete historical analysis entries.
- Ensure there is a single top‑level section
- Keep the short
<details>block inreadme.mdfocused on the overall status and date; deep analysis remains only inai-review.md.
- Read the solution code and any solution‑specific
AI markers in code (@ai-review)
To help /review analyze associate concrete pieces of code with specific recommendations in ai-review.md, you can place markers in comments inside lesson code and related scripts.
-
Generic marker syntax (human‑readable path)
@ai-review|Анализ вашего решения/Дата: "<YYYY-MM-DD HH:mm>"/<block-title>/<item-number>|<free-text>Where:
- The part between
@ai-review|and the final|is a path that mirrors the physical structure ofai-review.md:Анализ вашего решения– the## Анализ вашего решенияsection.Дата: "<YYYY-MM-DD HH:mm>"– the exact### Дата: ...heading for this analysis run.<block-title>– one of the subsection headings under that date, for example:Пробелы в знанияхЗамечания к реализацииРекомендованные шаги
<item-number>– 1‑based index of the bullet within that subsection’s numbered list.
<free-text>– optional human‑readable explanation for maintainers; it does not participate in linking logic.
When scanning code,
/review analyzeshould:- Look for lines containing
@ai-review|. - Split the marker on the first
|into:- the path (
Анализ вашего решения/.../<item-number>); - optional
<free-text>.
- the path (
- Use the path to locate the referenced recommendation inside
ai-review.md:- find
## Анализ вашего решения; - within it, the matching
### Дата: "<YYYY-MM-DD HH:mm>"; - within that date block, the subsection with title
<block-title>; - and then the
<item-number>‑th item in that subsection’s list.
- find
This linkage can then be used when deciding whether a specific recommendation should be moved from
"@TODOtoВыполненоin a new analysis entry. - The part between
/review cource-plan-for-ai
Purpose: Refresh the AI-facing course plan used by /review based on the current source URL.
- Workflow
- Read
cource-plan-for-ai.mdat the repository root. - Read the
## "ai-options"section and parse theinicode block. - Extract
plan-urlfrom the ini block (for example:plan-url="https://..."). - Perform an HTTP request to
plan-urland, исходя исключительно из структуры страницы курса (а не локальногоreadme.md), построить иерархический набросок плана:- разделы и подмодули курса;
- отдельные уроки с их номерами и ссылками.
- Validation (mandatory): verify that the fetched page actually contains the lesson list:
- if the page is paywalled / requires authentication / does not contain a parseable plan, the command must:
- stop;
- write a short note in
cource-plan-for-ai.md(above## "cource-plan") that the plan cannot be regenerated automatically fromplan-urland why; - NOT regenerate
## "cource-plan"from any local sources by default.
- The command must never silently fall back to using the local
readme.mdas the source of truth.
- if the page is paywalled / requires authentication / does not contain a parseable plan, the command must:
- Optional fallback (explicit only):
- implementations may support a flag like
--from-readmeto regenerate the plan from the localreadme.md, but only when the user explicitly requests it.
- implementations may support a flag like
- Regenerate the
## "cource-plan"section incource-plan-for-ai.md:- replace everything under
## "cource-plan"with a hierarchical markdown bullet list that mirrors the course page structure (sections, subsections, lessons with their links and, при наличии, путями к локальным директориям); - keep the introductory part of the file (description, rules) intact.
- replace everything under
- The regenerated plan must preserve lesson order so that
/review lessonand/review analyzecan:- know which lessons come before and after the current one;
- avoid marking topics as "not covered" in
ai-relevance.mdif those topics belong to lessons that come after the current lesson in the plan.
- Read
/review guide
Purpose: Create or update a short guide on how to use Cursor AI and the project‑specific commands effectively.
- Workflow
- Create or update
cursor-ai-usage.mdat the repository root. - Include at least:
- how to call
/van,/plan,/build,/review; - how the Memory Bank system is used conceptually (without making
/reviewdepend on it); - how relevance checks and solution analysis work at a high level;
- tips on requesting concise answers and avoiding unnecessary context to reduce token usage.
- how to call
- Ensure that the root
readme.mdreferencescursor-ai-usage.mdfrom the### Помощник AIsection or another clearly visible place.
- Create or update
Status Values
The Статус line in the ai-relevance block and in ai-review.md should use one of the following values:
АктуальноЧастично устарелоУстарело
Implementations may also provide additional explanation or sub‑status inside ai-relevance.md, but these three values form the stable external contract exposed in the root readme.md.
Usage
-
/review lesson 20-ts/40-classes/110-this-and-typed-context
Check the relevance of thethis и типизация контекстаlesson, write/updateai-relevance.mdin its folder and attach/refresh theai-relevancedetails block under this lesson in the## Содержаниеsection. -
/review all
Iterate through all lessons listed in the## Содержаниеsection ofreadme.md, perform relevance checks, and update their associatedai-relevanceblocks. -
/review analyze 20-ts/30-generics-manipulation/160-practice
Analyze the user's solution for the generics practice lesson and record gaps and issues inai-relevance.md. -
/review cource-plan-for-ai
Readcource-plan-for-ai.md, takeplan-urlfrom the## "ai-options"ini block, fetch the actual course plan, and fully regenerate the## "cource-plan"section so that subsequent/reviewcalls can correctly distinguish between current and future topics. -
/review guide
Generate or refresh thecursor-ai-usage.mdguide and ensure it is referenced from the rootreadme.md.
