This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
A bilingual (Russian-language content) training course for advanced Claude Code techniques on Opus 4.8, centered on the Workflow tool (multi-agent orchestration). It is not an application — it is teaching material plus runnable example Workflow scripts. There is no build system, no package.json, no test runner, no linter, and it is not a git repo. Do not invent build/test commands.
The audience is Russian-speaking learners who may not be programmers and are learning Claude Code through practical authoring and publishing work: a technical author receives a publisher commission, creates the publisher's GitHub repository, and develops a practical guide to advanced Claude Code techniques for textbook authors. Prose favors plain-language framing over jargon. All user-facing content is Russian — keep it Russian when editing chapters, labs, or comments. Match the existing calm, problem-first tone (see the memory note on explanation style: lead with the real-world problem, not the tool capability).
-
web/— a self-contained browser trainer (single-page app, no bundler).index.htmlloadscontent.jsthenapp.jsfrom disk and pullsmarked+prismjsfrom CDN. Both local scripts are cache-busted with?v=Nquery strings — bump thatvinindex.htmlwhen you changecontent.jsorapp.js, or the browser serves stale cached copies.content.jsis the single source of truth for all chapter prose (theCHAPTERSarray) and the cheatsheet panel (CHEATSHEETS). The header comment says "ported from GUIDE.md" but no GUIDE.md exists — edit chapters directly incontent.js. Each chapter is{ id, num, title, summary, body (markdown), widget?, quiz? }.app.jsis routing/state/rendering. State (progress, the Chapter-0 concept wizard, theme) persists inlocalStorageundercc-trainer-state-v1. Two interactive widgets are mounted by id from chapterbody:conceptWizard(Глава 0) andparallelAnimator(Глава 2). Adding a widget means: reference its<div id="...">in the markdownbody, setwidget:on the chapter, and add amount...branch inrenderChapter.- To preview: open
web/index.htmldirectly, or serve the folder over any static server. No build step.
-
labs/— 14 hands-on labs (00-setup…13-capstone), each alab.md(Russian, with difficulty stars + success criteria) and sometimes astarter.js.solutions/holds reference solutions for a subset of labs (02, 03, 06 only — others are intentionally omitted).cheatsheets/are standalone quick-reference markdown.
The web chapters and the labs cover the same 12-chapter arc in parallel (CLI → first agent → parallel → pipeline → dynamic loops → schema → adversarial verify → completeness → hooks → memory → skills/MCP → budget → worktree). Keep them conceptually in sync when changing one.
Every .js under project/, solutions/, examples/, and labs/*/starter.js is a script for the Claude Code Workflow tool, not a standalone Node module. Never run them with node. They run only inside a Workflow invocation, where these globals are injected (no imports): agent(), parallel(), pipeline(), phase(), log(), budget, args, workflow(). They are plain JS (not TypeScript), and Date.now() / Math.random() / argless new Date() are unavailable by design (they break workflow resume).
A user runs one by telling Claude, e.g. Запусти project/system.js как workflow +100k — Claude reads the file and passes its contents to the Workflow tool. The +Nk suffix sets the token budget exposed as budget.total.
When writing or reviewing these scripts, the course's own rules are the house style — enforce them:
export const metamust be a pure literal (no variables/calls) — required for resume;meta.phases[].titlemust match thephase('...')strings used in the body.parallel()returnsnull(never throws) for a failed agent → always.filter(Boolean)before use.pipeline()is the default for multi-stage work; reserve aparallel()barrier between stages only when stage N genuinely needs all of stage N-1 (dedup, early-exit, cross-item comparison).loop-until-dry: dedup new findings against a persistentseenSet, not against the accumulated/confirmed results — comparing against results makes verifier-rejected items reappear forever.- Adversarial verify defaults skeptics to
refuted=trueon doubt; survival is a majority vote. - Budget loops must guard on
budget.total(while (... && (!budget.total || budget.remaining() > N))) becauseremaining()isInfinitywhen no budget was set. schema(JSON Schema) onagent()forces structured output with auto-retry on mismatch; prefer strictenum/requiredover free strings.
target/app.js is a deliberately flawed file used as the analysis subject by project/system.js and several labs — its bugs/vulnerabilities are intentional teaching fixtures, not defects to fix.
The whole course is organized around designing a system from the goal backward, and the user holds this strongly (see memory): Goal (to-be end state) → Decomposition (tasks as input→output) → Processes (how tasks relate in time) → Resources (solvers: agents/schemas) — resources LAST. Reject input-first framing ("what data do I have?"). Chapter 0's interactive wizard (mountConceptWizard in app.js) walks the user through these four nodes and emits a concept prompt they hand back to Claude to scaffold project/system.js. New example workflows (see the header comments in project/system.js, project/infolimp-audit.js, examples/publisher-manual/publisher-manual-workflow.js) document themselves against these four nodes — follow that convention.