How to Handle Course Dependencies When Interrupted in the Open Source CS Degree

When interrupted during the OSSU computer science curriculum, treat the README.md as a static dependency graph and maintain a separate progress.json file to track completion states, allowing you to resume by automatically recomputing which courses have satisfied prerequisites.

The open-source-cs repository by ForrestKnight models the complete OSSU computer science degree as a dependency graph where each course lists specific prerequisites in the master table. Unlike learning platforms that enforce sequential progress, this repository stores only static relationships, meaning you must implement a personal tracking system to manage interruptions without losing your place in the prerequisite chain.

Understanding the Dependency Model in README.md

The repository encodes course relationships directly in the markdown table within README.md. Each row contains a Prerequisites column that points to specific predecessor courses, creating a directed acyclic graph (DAG) that you can parse programmatically.

For example, Calculus 1B: Integration lists Calculus 1A: Differentiation as its requirement (see line 30), while the Software Engineering: Introduction course depends on completing the introductory programming sequence (line 59). The Theory courses similarly chain through discrete mathematics prerequisites (line 50). This structure means the repository itself never tracks your personal progress—it only describes which intellectual dependencies must exist before attempting advanced material.

Creating a Progress Tracking System

To handle interruptions safely, you must separate the static dependency data from your dynamic learning state.

Parsing the Markdown Table

The prerequisite information lives in standard markdown tables that include columns for Courses, School, Duration, and Prerequisites. You can extract this data using any markdown parser to build an in-memory map where each course points to its immediate prerequisite.

Structuring Your State File

Create a local progress.json file to survive interruptions. This file should track three states for each course:

  • completed – You have finished the course and satisfy its downstream dependencies
  • in-progress – You are currently enrolled or studying the material
  • paused – You stopped mid-course and have not yet completed the requirements

By storing this state independently from the repository, you ensure that updating the open-source-cs curriculum (via git pull) never overwrites your personal progress data.

Resuming After an Interruption

When you return to your studies after a break, your system must recompute which courses are available to start. The logic layer traverses the DAG and checks your progress.json state to identify "ready" courses—those where all prerequisites are marked completed.

If you pause Calculus 1A: Differentiation midway through, the system will automatically withhold Calculus 1B: Integration from your "ready to start" list until you mark the prerequisite as completed. This prevents accidentally skipping foundational material required for advanced topics like linear algebra or machine learning.

Implementation: Python Helper Script

Below is a complete implementation that parses README.md, loads your progress state, and prints only the courses you can safely begin. This script uses the mistune library to parse the markdown AST and construct the dependency graph.

import json
import pathlib
import re
from collections import defaultdict

import mistune  # markdown parser – see https://github.com/lepture/mistune

REPO_ROOT = pathlib.Path(__file__).parent.parent  # adjust if script lives elsewhere

README = REPO_ROOT / "README.md"
PROGRESS = REPO_ROOT / "progress.json"


def load_readme() -> str:
    return README.read_text(encoding="utf‑8")


def extract_courses(md: str):
    """Return a dict: {course_name: prereq_name or None}."""
    parser = mistune.create_markdown(renderer=mistune.AstRenderer())
    ast = parser(md)

    courses = {}
    # Tables are stored as list of rows under "table" nodes

    for node in ast:
        if node["type"] == "table":
            headers = [c["text"] for c in node["header"]]
            prereq_idx = headers.index("Prerequisites")
            title_idx = headers.index("Courses")
            for row in node["children"]:
                title = row[title_idx]["text"]
                prereq = row[prereq_idx]["text"]
                # Normalise "none" → None, otherwise keep the first listed prerequisite

                prereq = None if prereq.lower() == "none" else prereq.split(",")[0].strip()
                courses[title] = prereq
    return courses


def load_progress():
    if PROGRESS.exists():
        return json.loads(PROGRESS.read_text())
    return {}


def save_progress(state):
    PROGRESS.write_text(json.dumps(state, indent=2))


def ready_courses(courses, state):
    """Return list of courses whose prerequisites are marked completed."""
    ready = []
    for course, prereq in courses.items():
        if state.get(course) == "completed":
            continue
        if not prereq or state.get(prereq) == "completed":
            ready.append(course)
    return ready


def main():
    md = load_readme()
    courses = extract_courses(md)

    state = load_progress()          # {"Course Name": "completed|in‑progress|paused"}

    next_up = ready_courses(courses, state)

    print("\nCourses you can start now (prereqs satisfied):")
    for c in next_up:
        print(f"  • {c}")

    # Example: mark a course as in-progress

    # state["Calculus 1A: Differentiation"] = "in-progress"

    # save_progress(state)


if __name__ == "__main__":
    main()

This script operates on three distinct layers:

  1. Data Layer – Reads README.md to build the DAG using the Prerequisites column
  2. State Layer – Persists your progress to progress.json
  3. Logic Layer – Filters courses to show only those with completed prerequisites

When you interrupt your studies, simply stop the script. Your progress.json preserves your state, and running the script again recomputes the viable next steps based on what you previously marked as completed.

Summary

  • The open-source-cs repository stores course dependencies in README.md as a static graph, not as an interactive progression system.
  • You must maintain a separate progress.json file to track completed, in-progress, and paused states.
  • The prerequisite data includes specific chains like Calculus 1A → Calculus 1B (lines 30-31) and Theory prerequisites (line 50).
  • A helper script can parse the markdown table and automatically determine which courses are safe to start after an interruption.
  • Always check that prerequisite nodes are marked completed before beginning dependent courses to ensure proper knowledge foundations.

Frequently Asked Questions

Where are course prerequisites defined in the repository?

Course prerequisites are defined in the Prerequisites column of the markdown table in README.md. For example, line 30 shows Calculus 1B: Integration requiring Calculus 1A: Differentiation, while line 59 lists prerequisites for Software Engineering courses. The repository treats this as plain text data that you can parse to build a dependency graph.

What happens if I mark a prerequisite course as paused?

If you mark a prerequisite as paused rather than completed, the ready_courses function will treat it as incomplete. Consequently, any downstream courses that depend on it will not appear in your "ready to start" list. This safety mechanism prevents you from beginning advanced material like Linear Algebra before completing its Calculus prerequisites.

Can I track progress directly in the repository files?

No, you should not modify the repository files to track progress. The README.md in ForrestKnight/open-source-cs is meant to remain a clean reference of the official OSSU curriculum. Instead, create a separate progress.json file (or use the Python script provided) to store your personal completion state without dirtying the git history.

How do I handle courses with multiple prerequisites?

The example script handles multiple prerequisites by splitting on commas in the Prerequisites column. When parsing prereq.split(",")[0].strip(), you can modify the logic to check that all listed prerequisites exist in your completed state, not just the first one. This ensures courses like advanced algorithms that require both discrete math and data structures remain locked until you complete both dependencies.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →