diff --git a/project_51_claude_code/1_40001_introduction_to_claude_code.html b/project_51_claude_code/1_40001_introduction_to_claude_code.html new file mode 100644 index 0000000..7580374 --- /dev/null +++ b/project_51_claude_code/1_40001_introduction_to_claude_code.html @@ -0,0 +1,41 @@ + + +
In this course, you'll learn how to harness the power of AI to streamline your development process. We'll be using Claude Code, a cutting-edge tool from Anthropic that integrates the advanced reasoning of the Claude 3 model family directly into your command line.
+ +Claude Code is a command-line interface (CLI) that acts as your AI coding partner. It can help you with a wide range of development tasks, from generating boilerplate code and writing unit tests to debugging complex issues and designing application architecture. By bringing AI into your terminal, Claude Code helps you code faster, smarter, and with greater consistency.
+ +You will learn about a powerful software development approach called semi-deterministic workflow. This method combines the consistency of automated scripts with the creative problem-solving of large language models. By the end of this tutorial, you'll be able to build robust applications more efficiently by letting the AI handle the heavy lifting while you guide the overall strategy.
+ +In this course, you will create a simple task manager application using Claude Code and a semi-deterministic workflow approach. This workflow combines the predictability of automated processes with the intelligence of AI-driven decision making.
+ +The task manager will feature:
+But more importantly, you'll learn how to set up workflows where Claude Code handles architectural decisions while maintaining consistent coding standards.
+ +Semi-deterministic workflows represent a powerful approach to software development that combines the best of both worlds:
+ +Deterministic part: Pre-configured rules and automatic actions such as code formatting, testing, commits, and consistent project structure. These elements remain predictable and standardized.
+ +Semi-deterministic part: Claude makes intelligent decisions about code structure, architecture, feature implementation, and improvements based on the current context and project needs.
+ +This approach allows you to maintain coding standards while leveraging AI's creativity and problem-solving capabilities for complex development decisions.
+ +Now that you have an understanding of Claude Code and semi-deterministic workflows, it's time to set up your environment. In the next stage, we'll install and configure Claude Code to get you ready for building our task manager application.
diff --git a/project_51_claude_code/2_40002_installing_claude_code.html b/project_51_claude_code/2_40002_installing_claude_code.html new file mode 100644 index 0000000..a317dd0 --- /dev/null +++ b/project_51_claude_code/2_40002_installing_claude_code.html @@ -0,0 +1,67 @@ + + +Before we begin building our task manager, we need to install Claude Code CLI. Claude Code is a powerful command-line tool that brings Claude's capabilities directly into your development environment.
+ +Make sure your system meets these requirements:
+Let's install Claude Code using npm. The installation is straightforward but there are important considerations for different operating systems.
+ +After installation, let's verify that everything is working correctly.
+ +Claude Code offers several authentication options. For this tutorial, we'll use the most common approach:
+ +You'll be prompted to authenticate. Choose one of these options:
+Now that you have Claude Code installed and authenticated, you're ready to start building our task manager application using semi-deterministic workflows. In the next stage, we'll set up our project structure and create the foundation for our intelligent development workflow.
+ +Now that Claude Code is installed and authenticated, it's time to experience its power firsthand. In this stage, we'll create a basic task manager application structure and see how Claude Code can intelligently generate code, suggest architecture, and set up development environments.
+ +This hands-on practice will demonstrate the Claude Code in action - we'll provide the requirements, and Claude Code will make smart decisions about implementation details.
+ +Let's start by creating a dedicated workspace for our task manager application. We'll set up the basic project structure manually first, then let Claude Code enhance it with intelligent suggestions.
+ +Let's set up the basic project structure with npm and create our initial files:
+ +This creates a basic structure with a `package.json` file and our main source files in the `src` directory.
+ +Now comes the exciting part - let's start Claude Code and see how it can help us build our application:
+ +Here's where the magic happens. We'll give Claude Code a clear prompt about what we want to build, and it will make intelligent decisions about the implementation:
+ +After running this prompt, Claude Code will demonstrate several key capabilities of semi-deterministic workflows:
+ +Once Claude Code finishes generating your application, let's verify everything is working correctly:
+ +Now let's run and test the application.
+ +By the end of this stage, you should have:
+ +Congratulations! You've successfully used Claude Code to generate a complete web application. In the next stage, we'll dive deeper into the semi-deterministic workflow by customizing and enhancing the application, demonstrating how Claude Code can adapt to changing requirements while maintaining code quality.
\ No newline at end of file diff --git a/project_51_claude_code/4_40004_setting_up_deterministic_hooks.html b/project_51_claude_code/4_40004_setting_up_deterministic_hooks.html new file mode 100644 index 0000000..569c88c --- /dev/null +++ b/project_51_claude_code/4_40004_setting_up_deterministic_hooks.html @@ -0,0 +1,139 @@ + + +In the previous stage, you saw how Claude Code can make intelligent decisions to generate a complete application. Now, we'll focus on the deterministic part of our workflow by setting up hooks. Hooks are automated actions that run at specific points in the development process, ensuring consistency and quality without manual intervention.
+ +Hooks in Claude Code are the deterministic core of your workflow. They automatically perform specific actions at key moments:
+By automating these routine tasks, you can focus on the creative aspects of development while maintaining a high standard of code quality.
+ +First, we need to create a directory and a file to store our hook configurations. Claude Code looks for these configurations in a .claude directory in your project root.
Now, let's instruct Claude to populate our hooks.json file. We will configure hooks for automatic logging of all the bash commands used by Claude Code agent.
We have created a simple logger script, but in fact you can create more complex hooks in the language you like.
+ +How we have to configure the conditions under which the script will be executed. Let's ask an assistant to create a configuration file:
+ +In this configuration, we set up a PostToolUse hook that triggers our logging script after every use of the Bash tool. This way, every command executed by Claude will be logged with a timestamp and description.
Now in the terminal, ask Claude Code to do some analysis of your project filesystem:
+ +After Claude completes the task, check the claude-logs.txt file in your project root. You should see a log entry for the bash command that was executed.
By the end of this stage, you will have a more robust and automated workflow:
+ +Feel free to test your custom hooks. For more information about how the Claude Hooks can be configured, refer to official documentation
+ +/hooks and then selecting Disable all hooks, and then re-enable it by calling /hooks again.With deterministic hooks in place, your workflow is now smarter and more efficient. In the next stage, we'll explore the other side of the coin: creating semi-deterministic custom commands that empower Claude to make intelligent decisions within a structured framework.
diff --git a/project_51_claude_code/5_40005_creating_semi_deterministic_commands.html b/project_51_claude_code/5_40005_creating_semi_deterministic_commands.html new file mode 100644 index 0000000..359b543 --- /dev/null +++ b/project_51_claude_code/5_40005_creating_semi_deterministic_commands.html @@ -0,0 +1,60 @@ + + +You've successfully set up the deterministic part of your workflow with hooks. Now, it's time to build the semi-deterministic part using custom commands. Custom slash commands allow you to give Claude specific instructions and context, empowering it to make intelligent decisions within a well-defined framework.
+ +Custom commands are markdown files that act as templates for prompts. They allow you to create reusable, context-aware instructions for Claude. This is the core of the semi-deterministic approach: you define the rules and the goals, and Claude uses its intelligence to figure out the best way to achieve them.
+ +First, we need a place to store our custom commands. Claude Code looks for a commands directory inside the .claude folder.
Now, let's ask Claude to create three essential commands for our web development workflow: one for adding features, one for reviewing code, and one for debugging.
+ +To help Claude make better decisions, we should provide it with high-level context about our project. The CLAUDE.md file in the root of your project is the perfect place for this.
After completing this stage, your workflow will be significantly more powerful:
+ +You have now established a complete semi-deterministic workflow with both automated hooks and intelligent custom commands. In the next stage, we'll put this workflow into practice by developing new features for our Task Manager application.
diff --git a/project_51_claude_code/6_40006_feature_development_with_automation.html b/project_51_claude_code/6_40006_feature_development_with_automation.html new file mode 100644 index 0000000..c8ae394 --- /dev/null +++ b/project_51_claude_code/6_40006_feature_development_with_automation.html @@ -0,0 +1,60 @@ + + +With our semi-deterministic workflow fully configured, it's time to see it in action. In this stage, we'll use our custom /add-feature command to build out the functionality of our Task Manager application. You'll witness how Claude makes architectural decisions while the hooks you configured handle the routine tasks of formatting and committing the code.
Let's start by creating the core interface for our Task Manager. We'll ask Claude to add the ability to add, delete, and mark tasks as complete.
+ +Observe the process. Claude will analyze your request, generate the necessary HTML, CSS, and JavaScript, and then your hooks will automatically trigger to format the new code and commit the changes to your git repository.
+ +Now that we have the basic functionality, let's extend it. We'll add the ability to edit tasks and filter them by their status.
+ +Let's use the /add-feature command again to add more functionality:
After Claude has finished implementing the new features, it's time to test the application and see the results of our automated workflow.
+ +Your browser should open with the Task Manager application running. Test out all the features: adding, editing, deleting, and filtering tasks.
+ +Our semi-deterministic workflow isn't just for adding features. Let's use the /review-code command to get suggestions for improving what we've built.
After executing the command, Claude will provide suggestions for improvements in the application's performance and readability.
+ +Your application is now feature-complete. In the next stage, we'll focus on testing and debugging, using our custom /debug-issue command to find and fix problems, further demonstrating the power of a semi-deterministic workflow.
In real-world development, things don't always go as planned. Bugs happen. That's why a robust workflow needs to account for testing and debugging. In this stage, you'll learn how to use your semi-deterministic workflow to identify, analyze, and fix issues in your application.
+ +Let's start by intentionally introducing an error into our application to simulate a real-world bug. Then, we'll use our custom /debug-issue command to find and fix it.
First, open src/app.js and comment out the line where you add the event listener to the "Add Task" button. This will break the task addition functionality.
Now, let's use our debugging command to find and fix the bug:
+ +Claude will analyze the code, identify the missing event listener, and suggest a fix. Once you approve the fix, the bug will be resolved, and your hooks will format and commit the changes.
+ +A common feature request for an application like this is data persistence. Users want their tasks to be saved even after they close the browser. Let's add this feature using our workflow.
+ +Before we conclude, let's perform one last code review to ensure everything is working correctly and the code is of high quality.
+ +Congratulations! You have successfully built a complete Task Manager web application from scratch using a semi-deterministic workflow with Claude Code. More importantly, you've learned a powerful new way to approach software development, blending the best of automation and AI-driven intelligence.
+ +Let's recap what you've accomplished and solidify your understanding of the semi-deterministic workflow you created.
+ +Deterministic Components (predictable and automated):
+Semi-deterministic Components (intelligent decisions by Claude):
+/review-code command allowed Claude to analyze your code and suggest meaningful improvements./debug-issue command empowered Claude to diagnose and solve problems in your codebase.You now know how to create powerful development workflows where routine tasks are automated and complex decisions are made by an intelligent AI assistant working within a set of rules you define. This approach allows you to build better software faster, and we can't wait to see what you build next!
diff --git a/project_51_claude_code/project.json b/project_51_claude_code/project.json new file mode 100644 index 0000000..3c0433d --- /dev/null +++ b/project_51_claude_code/project.json @@ -0,0 +1,10 @@ +{ + "id": 51, + "description": "Learn how to build a simple task manager by combining the predictability of automated processes with the intelligence of AI-driven decisions using Claude Code.", + "title": "Semi-Deterministic Workflows with Claude Code", + "categories": "AI Agents, Claude, AI Engineering, Deterministic Workflows", + "cover_url": "https://ucarecdn.com/0c6b884e-7ae2-4d44-b268-9b4ddd626d5f/", + "readme": "# Semi-Deterministic Workflows with Claude Code\n\nThis course teaches you how to build a simple task manager application using a semi-deterministic workflow. You'll learn to leverage Claude Code for intelligent decision-making while maintaining predictable, automated processes for code quality and structure.", + "short_description": "Build a task manager using AI-driven semi-deterministic workflows with Claude Code.", + "ides": "cursor" +}