Skip to content

Latest commit

 

History

History
76 lines (65 loc) · 12.4 KB

README.md

File metadata and controls

76 lines (65 loc) · 12.4 KB

coding-study documentation

coding-study is a local, IDE-first study tool for software engineers: original problems stored as data, solved in your own editor in Python, TypeScript, Java, Kotlin, Go or Rust, and driven by a CLI (cstudy) that tests, benchmarks, explains and schedules reviews, in the terminal or through the local page cstudy serve serves. To install it and start practicing, read the README; to upgrade from an earlier 0.x, read UPGRADING; to change it, read CONTRIBUTING.

Reading order

  1. PRD: why, for whom, requirements, success metrics, risks, open questions.
  2. Architecture: components, hexagonal boundaries, data flows, repository layout, toolchain.
  3. Specs, in the order an implementer needs them (below).
  4. Roadmap: the v1.0.0 definition, compatibility promise, release criteria and milestones, then the phases and their exit criteria.
  5. Decisions: the ADRs behind the major choices.

Specs

Spec Defines Read when
problem-format meta.yaml, tests.json, type DSL and per-language mapping, serialization, comparators, design, progressive, project and concurrent formats, worked examples Building codegen, runners, verify, or writing content
runners CLI-runner protocol (test and bench modes), exit codes, hang guard, code location, project and suite jobs, stub generation, reference materialization Building a runner or the runner adapter
cli Every command, flag, output example, exit code; the config file Building commands
progress-and-scheduling SQLite schema, grades, SM-2 variant, weakness score, cstudy next Building progress features
performance-analysis Optional time limits, size ladder, measurement, complexity classification, verdicts and confidence Building cstudy bench or time limits
content Tracks, labels, pattern taxonomy and targets, batches, rubric-checked problems, copyright policy Planning content
catalog Binding manifest of every problem: slugs, titles, patterns, difficulty, kind, labels, batch, owner stream Writing content in a stream, or adding to the catalog
service-projects Problems that run a real app in a Docker sandbox with lifecycle commands, built-in mock servers, HTTP grading and a dependency list shown before starting. Built through P8, with the first catalog problem in TypeScript and Python, and P10's backing services; parallel cases, the Web UI and code intelligence are planned Working on ADR 0019's phases, or on a service project
versioning Commit types and version bumps, the version workflow, CHANGELOG.md, cstudy --version, the GitHub release and the Homebrew tap Committing, or changing how releases are versioned or published
authoring Authoring workflow, problem.md and explanation.md formats, ready criteria, every cstudy verify check Writing or reviewing a problem
web-ui cstudy serve: the local page, its API v1, runs and jobs as server-sent events, the security model, file API rules, code intelligence sessions with language servers, page behavior, mocks, solutions, preferences and assets Building or changing the web UI
guides Concept guides and learning paths: the guides/ folder, meta.yaml, guide.md's sections, tested examples, Mermaid diagrams with their text drawings, paths, the static checks, reading progress and cstudy learn Writing a guide or a path, or building on them
user-docs The user docs: the user-docs/ folder, a page's front matter and body, the topics, cstudy docs, the Docs view, the static checks with the command accuracy check, and what the website reads Writing or changing a user page, or building on them
ai The AI preview with your own key: the [ai] settings, keys in credentials.toml, four providers behind one model port, routing, consent, usage and the daily token cap, the check, AI review of rubric problems and its record, and what holds with AI off Building or changing an AI feature, or anything that could send data off the machine
compatibility What 1.x promises: public, internal and preview surfaces, breaking changes, deprecation and support; the snapshots and schemas that hold them; canonical IDs <type>/<slug>, problem folders by slug, rubric-checked problems, Checked by; backups before migrations Changing a command, flag, exit code, config key, environment variable, --json document, the workspace layout or progress.db, or how content is named
installation-and-workspaces Packaging, content and workspace resolution, cstudy init, the runner runtime, project folders, IDE files, your own problems Installing cstudy, setting up a workspace, or changing where files live

User docs

How to use cstudy lives in user-docs/, shipped with it and read with cstudy docs or in the web UI's Docs view (user-docs): getting started, the toolchains, cstudy doctor, the workspace, upgrading, working on a problem, the kinds of problems, levels, service projects, your IDE and the debugger, guides, planning, your own problems, the web UI, the editor, settings, the command reference and troubleshooting.

Decisions

ADR Decision
0001 Tests are language-neutral data; runners invoke, the CLI compares
0002 The CLI is Python 3.13 managed with uv
0003 Java and Kotlin build with a committed Gradle wrapper
0004 All problem text and tests are original
0005 Optimality is judged empirically against a reference ladder, with stated confidence
0006 Concurrency problems are stress-tested against invariants over many runs, and broken references prove each scenario catches its bugs
0007 No persistent JVM runner in v1: the warm Java and Kotlin cstudy test meets NFR-1 through the Gradle daemon and a fresh JVM
0008 cstudy is installed with its content bundled, and you practice in a separate workspace created by cstudy init
0009 The ladder check tolerates drift and fixed costs, needs super-polynomial evidence for exponential growth, and treats sublinear classes as one band
0010 Workspaces ship VS Code and IntelliJ project files that run cstudy and attach debuggers to its runner; cstudy stays the judge
0011 decimal and date are scalar types with string wire forms; runners write decimals in canonical form so the comparators stay type-blind
0012 Go and Rust are required of every problem, after a per-problem backfill; compiled runners, exhaustive language dispatch
0013 Each release attaches the wheel and a hashed requirements file to a GitHub release, and the workflow points the cstudy formula in bkuberek/homebrew-tap at them
0014 Project problems are seeded folders in one language, solved in levels: native tests generated from tests.json for feedback, cstudy submit grades and opens levels
0015 A local web UI, cstudy serve, with full practice parity: every action calls the CLI's use case or runs its command, and runs stream live for every kind
0016 Java and Kotlin run on JDK 21 to 26, within the range each problem declares
0017 Project problems grade asynchronous code on a virtual clock and concurrent code under stress: async methods, harness operations, stress cases with broken overlays, and Go 1.25
0018 The page's editor gets code intelligence from local language servers behind a setting, and completion behind a second one: live diagnostics, hover documentation and go to definition over one WebSocket per tab and root
0019 Service projects always run in a Docker sandbox, a real app against mock servers and optional backing services, graded over HTTP. Built through P8, the first catalog problem in TypeScript and Python, and P10's backing services; later phases are planned
0020 Problems and items have three independent labels, domain, role and scope, with filters in cstudy list, cstudy next and the Problems view; the first seven security and AI/LLM problems, in Python and TypeScript; amended by 0027, which makes the items rubric-checked problems
0021 Planned, not built: an opt-in class of problems reviewed by a live LLM with your own key; "works on your own machine" replaces "works offline"
0022 The Settings view edits the whole config.toml with tomlkit, keeping the user's comments, from a description of each key held by the parser; cstudy reset and a Danger section delete progress after a preview and a typed word
0023 Problem sets are a file in the workspace, sets.yaml, changed by the lines a change needs; cstudy set, --set on cstudy list and cstudy next, which goes in the set's order, and a Sets view; the whole-bundle budget rises
0024 A pass through level N of M is a pass, graded from the rating with no level cap; a mock keeps the old rules; the best level per language is the problem's mastery, and the next attempt shows the level to try
0025 Concept guides and learning paths are content in guides/, checked by cstudy verify and read with cstudy learn; diagrams are Mermaid with text drawings made when a guide is written, examples are run by a test, and reading is marked in progress.db
0026 User docs are Markdown pages with front matter in user-docs/, shipped as content, read with cstudy docs and the web UI's Docs view, checked by cstudy verify against the command line, and copied by the website
0027 A compatibility contract held by snapshots and JSON Schemas, with deprecation warnings on stderr only; content named <type>/<slug>, problem folders named by slug with no number, the items as rubric-checked problems, and a backup before every migration
0028 A learner profile of languages, job roles and domains is the default filter of every list you choose from, in the terminal and the page, with a dim line or a chip that says how much it hides; roles and domains live in config.toml, languages in the workspace's marker, which decide its folders, doctor rows and IDE files, and cstudy lang or Settings adds or removes them, keeping or deleting the folder; one filter component; labels on guides
0029 The AI foundation: one model port and four providers (Anthropic, OpenAI, Google, OpenRouter) over the standard library's HTTP, keys only in credentials.toml, consent per provider, model and purpose, a daily token cap with the cost providers report, fixed or tiered routing, and AI review of rubric problems as a public record that never changes a grade; with AI off nothing leaves the machine, which a network guard on every fast test proves

Conventions

  • Lowercase hyphenated filenames; GitHub-flavored Markdown.
  • Specs are normative: an implementation that disagrees with a spec is a bug in one of them, fixed in the same change.
  • Unsettled items live in PRD open questions with the default the specs assume.