shareAI-lab/learn-claude-code
50.9
Adequate · 15 November 2026
26.2k
lines of production code
Python
with TypeScript
5
measurements over time
What this system is
Features
Agent gains read, write, edit, and glob tools with dispatch map
The s02 tool-use lesson expands the agent from a single bash tool to five: read\_file, write\_file, edit\_file, and glob, in addition to bash. Tool execution now uses a TOOL\_HANDLERS dispatch map instead of a hardcoded run\_bash call, allowing the agent to invoke these new capabilities directly. File operations are protected by safe\_path validation to keep access within the workspace, and the agent loop remains unchanged, executing multiple tool calls in their original order.
_s02\_tool\use · high confidence
Background execution for slow Bash commands
The s11 harness now supports running slow Bash commands in the background so the Agent Loop is not blocked. When a tool call explicitly sets \run\_in\_background\ to \true\, the system returns an immediate placeholder result with a \bg\_id\ and executes the command in a daemon thread. Completed results are collected on subsequent turns and injected into the conversation as \\<task\_notification\>\ messages, allowing the agent to continue with other tasks while long-running operations (like builds or test suites) finish.
_s11\_background\tasks · high confidence
Introduce MCP-based dynamic tool discovery and dispatch
The s14 lesson adds a new harness layer that connects to external MCP servers, discovers their tools, and dynamically assembles them into the agent's tool pool alongside the five built-in tools. The \MCPClient\ class stores discovered tool definitions and call handlers, while \connect\mcp\ establishes connections to mock servers (like \docs\ and \deploy\). Discovered tools are prefixed with \mcp\\{server}\\_{tool}\ to prevent name collisions, and a host-side \MCP\_HOST\_POLICY\ enforces permissions (allow or confirm) for these external tools. Input errors from external tools are caught and returned as error results, allowing the agent to correct arguments without terminating the loop.
_s14\_mcp\plugin · high confidence
Introduce TodoWrite tool and planning reminder in s05
The s05 harness adds a new \todo\_write\ tool that lets the agent maintain an in-memory task list with \pending\, \in\_progress\, and \completed\ statuses, capped at 20 items and allowing only one item in progress at a time. Input is accepted as a list or a JSON/Python-list string parsed without \eval\, and the system prompt now instructs the agent to plan steps before execution. Additionally, if the agent goes three consecutive tool-use rounds without calling \todo\_write\, the harness automatically appends a \\<reminder\>Update your todos.\</reminder\>\ to the third round's results and resets the counter. This change is localized to the s05 lesson's \code.py\ and its multilingual READMEs and diagrams.
_s05\_todo\write · high confidence
Introduce lazy skill loading to reduce system prompt size
The s07\_skill\loading module now implements a \SkillLoader\ that scans \skills/\/SKILL.md\ files at startup to build a catalog of names and descriptions, which is injected into the system prompt. Instead of loading all skill instructions upfront, the agent calls \load\_skill(name)\ at runtime to retrieve the full \SKILL.md\ content, which is then returned as a \tool\_result\. This approach prevents unnecessary context window usage by only loading relevant skill instructions when needed, and includes robust frontmatter parsing with YAML support and UTF-8 encoding.
_s07\_skill\loading · high confidence
Introduce s09 Memory system for cross-session knowledge retention
This change adds the s09 Memory lesson, providing a complete implementation for storing, recalling, extracting, and consolidating reusable knowledge across agent sessions. The system saves information as individual Markdown files with YAML frontmatter in a \.memory/\ directory, indexed by \MEMORY.md\. It uses a lightweight model call to select relevant records (with a keyword-matching fallback) and limits recalled text size. Extraction occurs after each turn, filtering for durable, non-duplicate, non-temporary records. Consolidation merges duplicates and stale entries when the store reaches a threshold, with snapshot-based rollback on failure. The entry also includes the full course documentation in English, Japanese, and Chinese.
_s09\memory · high confidence
Introduce s12 Cron Scheduler for time-based task automation
This location adds the s12 Cron Scheduler, a new capability that allows users to schedule tasks to run at specific times using standard five-field cron expressions. The implementation introduces three new tools—\schedule\_cron\, \list\_crons\, and \cancel\_cron\—and a background daemon thread that monitors the system clock. When a scheduled time arrives, the scheduler enqueues the associated prompt into a \cron\_queue\, which is then delivered to the Agent Loop once the agent becomes idle. The system supports both session-only (in-memory) and durable (persisted to \.scheduled\_tasks.json\) job storage, ensuring that scheduled tasks survive process restarts.
_s12\_cron\scheduler · high confidence
Introduce the s01 Agent Loop harness with OS-aware shell context and UTF-8 readline fixes
The s01\_agent\_loop module now provides a minimal, runnable agent harness that drives an AI coding agent via a single while-True loop: the model proposes tool calls (bash commands), the harness executes them, feeds the results back into the message history, and repeats until the model stops calling tools. The entry point (code.py) adds an OS-aware system prompt so Windows users receive cmd.exe syntax guidance, and it fixes UTF-8 backspace handling on macOS libedit via readline bindings. The loop also safely limits subprocess output to 50,000 characters and blocks dangerous commands (e.g., rm -rf /, sudo, shutdown, reboot, \> /dev/). Documentation and diagrams are provided in English, Chinese, and Japanese to explain the loop’s behavior and how to run it.
_s01\_agent\loop · high confidence
Introduce the s06\_subagent lesson with task delegation and message isolation
The s06\_subagent location now provides a complete, runnable lesson demonstrating subagent delegation. The code.py implementation adds a \task\ tool that spawns a nested agent loop with a fresh \messages\[\]\ list, allowing the subagent to use the five base tools (bash, read, write, edit, glob) without recursive delegation. This isolates intermediate tool calls and results from the parent conversation, returning only the final text as the tool result. The lesson includes multilingual documentation (English, Japanese, Chinese) and architecture diagrams explaining the message isolation and shared WORKDIR behavior.
_s06\subagent · high confidence
Introduces a hook system to externalize agent loop extensions
The s04\_hooks module adds a new hook registry and \trigger\_hooks()\ mechanism that allows extension logic to be injected at key points in the agent cycle—UserPromptSubmit, PreToolUse, PostToolUse, and Stop—without modifying the core \agent\_loop\. This replaces the previous pattern of hardcoding checks like \check\_permission()\ directly in the loop, enabling features such as permission checks, logging, and output monitoring to be added via \register\_hook()\ callbacks while keeping the main execution path stable.
_s04\hooks · high confidence
New interactive visualizations for agent architecture lessons
Added a series of new, step-by-step interactive visualizations in the web course interface to explain core agent concepts. These components cover the permission system (s03-permission), hook lifecycle (s04-hooks), memory management (s09-memory), task board dependencies (s10-task-system), cron scheduling (s12-cron-scheduler), team runtime (s13-team-runtime), MCP tool integration (s14-mcp-tools), and the integrated harness workflow (s15-integrated-harness). Each visualization uses a shared stepped-player interface to animate the flow of data and control, helping users understand how these mechanisms work together in the agent loop.
web/src/components/visualizations · high confidence
New lesson modules for task systems, agent teams, and integrated workflows
Added five new Python lesson modules (s10 through s17) that progressively introduce persistent task management, multi-agent team coordination, an integrated runtime harness, workflow orchestration, and a goal-driven loop. These files provide the complete, runnable implementations for these capabilities, including task storage, dependency tracking, cross-process locking, and safety guards against destructive commands.
python · high confidence
Three-gate permission pipeline for tool execution
The s03\_permission module introduces a safety layer that intercepts tool calls before they run. It enforces a three-stage check: a hard deny list (blocking commands like \rm -rf /\ and \sudo\), rule-based matching (requiring approval for destructive shell commands or file operations outside the workspace), and user confirmation. This ensures that risky operations are either blocked outright or paused for explicit user consent.
_s03\permission · high confidence
s08 Context Compact lesson introduces a four-step pipeline to manage context window limits
The s08\_context\_compact module now provides a complete implementation and documentation for a four-step context compaction pipeline. This feature allows the agent to handle long-running tasks by preventing context window overflow. The pipeline executes in a specific order: first, it persists oversized tool results to disk (tool\_result\_budget); second, it archives the middle of the message history while preserving tool-use/result pairs (snip\_compact); third, it shortens older, consumed tool results by replacing them with recovery paths (micro\_compact); and finally, if the context is still too large, it summarizes the entire history into a single compact message (compact\_history). The lesson includes the Python implementation in code.py and detailed explanations in English, Japanese, and Chinese README files.
_s08\_context\compact · high confidence
Behavioural changes
2 commits (0 fixes) modifying web/src/components/docs, web/src/types
A change to existing behaviour in web/src/components/docs, web/src/types — 2 commits, 2 files: “feat: build an AI agent from 0 to 1 -- 11 progressive sessions”; “feat: complete web curriculum visuals”.
web/src/components/docs, web/src/types · medium confidence · unverified
9 commits (1 fix) modifying web/src/data
A change to existing behaviour in web/src/data — 9 commits (1 fix), 1 file: “feat: consolidate course into 21 lessons”; “fix: build task dependencies in two phases”; “refactor: streamline the course to 17 lessons”; and 6 more.
web/src/data · medium confidence · unverified
Course curriculum expanded to 17 sessions with updated content and structure
The learning path in the web library has been consolidated and expanded from 11 to 17 sessions (s01–s17). This update introduces new topics including Permission, Hooks, Cron Scheduler, MCP Tools, Integrated Harness, Workflow Runtime, and Goal Loop, while refining the descriptions and core additions for existing sessions. The course structure now maps these sessions across five layers: Tools & Execution, Planning & Coordination, Memory Management, Concurrency, and Collaboration, providing a more comprehensive progression for building AI agents.
web/src/lib · high confidence
Enhanced Python source parsing and course asset discovery
The script used to generate web content now discovers course chapters by scanning repository root directories instead of relying on a fixed agents/docs directory structure. Parsing logic has been updated to correctly identify async functions and extract assignment bodies (lists and dicts) with proper handling of nested structures, quotes, and comments, ensuring more accurate extraction of code content for the curriculum.
web/scripts · high confidence
Expanded architecture visuals and stabilized UI components
The architecture diagram now includes descriptions for four new agent concepts: CronJob, ProtocolState, MCPClient, and RecoveryState. The execution flow visualization has been significantly improved with dynamic node sizing, text wrapping, and smarter edge routing (including loop-back rails and step buses) to handle complex flows without overlap. The message flow animation was stabilized by replacing the interval-based timer with a self-scheduling timeout to prevent race conditions, and chips now wrap gracefully instead of overflowing. Additionally, the design decisions and agent loop simulator components now display explicit placeholder messages when content is unavailable for a specific lesson, rather than rendering nothing.
web/src/components/architecture · high confidence
Improved robustness of file and subprocess operations in agent-builder skills
The agent-builder reference code and scripts now explicitly handle text encoding and decoding errors. File read/write operations (read\_file, write\_file, edit\_file) and subprocess execution (run\_bash) explicitly use UTF-8 encoding and set errors='replace' to prevent crashes when encountering non-UTF-8 characters in file content or command output. Additionally, the agent-philosophy reference has been updated to reflect a shift in terminology from 'capabilities' to 'tools' and 'agent' to 'harness', aligning the documentation with the engineering focus on building the environment for the model.
skills · high confidence
Root path redirects to English locale and UI styling for content improves
Visiting the root URL now automatically redirects to the English locale (/en/). Additionally, the visual presentation of content has been refined: code blocks and tables within the prose layout now handle overflow and width more gracefully to prevent horizontal scrolling issues, and new TypeScript types have been introduced to support chapter images and agent layer classifications.
web/src/app · high confidence
Fixes
Fix theme icon flicker on initial load
The header's dark/light mode toggle icon no longer flashes or displays incorrectly during the initial page render. By deferring the theme state check until after the component mounts, the UI now shows a neutral placeholder until the actual theme preference is determined, preventing visual glitches caused by server-client hydration mismatches.
web/src/components/layout · high confidence
Fixes for UTF-8 handling, subprocess errors, and readline compatibility across agent harnesses
This update resolves several stability and compatibility issues across the agent lesson files (s01–s12). File read/write operations now explicitly use UTF-8 encoding to prevent corruption of non-ASCII text. Subprocess execution is hardened to handle \OSError\ and \FileNotFoundError\ gracefully, and output decoding uses \errors='replace'\ to avoid crashes on invalid byte sequences. The interactive CLI now uses ANSI escape wrappers (\\\001\/\\\002\) to fix readline backspace issues on macOS. Additionally, the task system simplifies dependency management by removing the \blocks\ field in favor of a single-source \blockedBy\ graph, and the skill loader now uses \yaml.safe\_load\ for more robust frontmatter parsing.
agents · high confidence
Test coverage
29 commits adding/updating tests in tests
Test coverage in tests — 29 commits (19 fixs), 20 files.
tests · high confidence · unverified
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 51 → 51 (+0.4)
- Rubric changed (rubric-2026.11.1 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 69 → 60 (-8.8)
- Architecture 82 → 82 (-0.0)
- Maturity 80 → 80 (-0.4)
- Readiness 32 → 32 (+0.0)
- Security 81 → 82 (+0.9)
- Accessibility 54 → 61 (+6.8)
- Performance 100 → 100 (+0.0)
Resolved (7)
- Duplicated block (41–43 lines × 2) (s14_mcp_plugin/code.py)
- Hotspot: s09_memory/code.py (s09_memory/code.py)
- Hotspot: s13_agent_teams/code.py (s13_agent_teams/code.py)
- Hotspot: s15_integrated_harness/code.py (s15_integrated_harness/code.py)
- No ADRs found
- Off-boarding risk: anonymized user #1
- Projects may be oversized for their cohesion
New (65)
- Duplicated block (38–40 lines × 2) (s14_mcp_plugin/code.py)
- Edited copies of one member (3 members, 29+ corresponding lines) (s07_skill_loading/code.py)
- Edited copies of one member (3 members, 30+ corresponding lines) (s01_agent_loop/code.py)
- Edited copies of one member (3 members, 6+ corresponding lines) (s05_todo_write/code.py)
- Edited copies of one member (4 members, 3+ corresponding lines) (agents/s09_agent_teams.py)
- Edited copies of one member (4 members, 4+ corresponding lines) (s04_hooks/code.py)
- Edited copies of one member (4 members, 4+ corresponding lines) (s10_task_system/code.py)
- Edited copies of one member (4 members, 5+ corresponding lines) (agents/s09_agent_teams.py)
- Edited copies of one member (8 members, 3+ corresponding lines) (s04_hooks/code.py)
- Edited copy of a member (10 corresponding lines) (s13_agent_teams/code.py)
- Edited copy of a member (10 corresponding lines) (s13_agent_teams/code.py)
- Edited copy of a member (11 corresponding lines) (s12_cron_scheduler/code.py)
- Edited copy of a member (11 corresponding lines) (s13_agent_teams/code.py)
- Edited copy of a member (12 corresponding lines) (agents/s04_subagent.py)
- Edited copy of a member (12 corresponding lines) (s06_subagent/code.py)
- Edited copy of a member (12 corresponding lines) (s13_agent_teams/code.py)
- Edited copy of a member (12 corresponding lines) (s14_mcp_plugin/code.py)
- Edited copy of a member (13 corresponding lines) (s08_context_compact/code.py)
- Edited copy of a member (13 corresponding lines) (s10_task_system/code.py)
- Edited copy of a member (14 corresponding lines) (s13_agent_teams/code.py)
- …and 45 more
Changes since last survey
- 4 commits — 1 feature/other, 3 fixes
By area
- web/src — 2 commits
- s14_mcp_plugin/README.ja.md — 1 commit
- tests/test_web_scenarios.py — 1 commit
Notable commits
- fix: fix(web): align s03 scenario with permission pipeline (#610)
- fix: fix: keep tool input from overriding the MCP handler's tool (#613)
- fix: fix: workflow discovery and guarded owned-task recovery (#624)
- change: test(s16): ignore scheduler order for concurrent agent events (#623)
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
shareAI-lab/learn-claude-code was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 448c75bb596917ad196cc1fb7558f459c5c50fdd — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.73+preprod-52de90b74216.