Featured resource
2026 Tech Forecast
2026 Tech Forecast

1,500+ tech insiders, business leaders, and Pluralsight Authors share their predictions on what’s shifting fastest and how to stay ahead.

Download the forecast
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
Labs

AI Ready: Advanced AI-assisted Development Lab

You will use Claude Code to assist in development of a shopping codebase to enable coupon functionality.

Lab platform
Lab Info
Level
Advanced
Last updated
Dec 02, 2026
Duration
30m

Contact sales

By clicking submit, you agree to our Privacy Policy and Terms of Use, and consent to receive marketing emails from Pluralsight.
Table of Contents
  1. Challenge

    Research before writing

    Research context and constraints

    Paste the following prompt. Keep the same Claude session for later steps. Use Claude Code's permission prompts to reject edits during research.

    Read only `README.md`, `AGENT_RULES.md`, `src/cart.py`, and `tests/test_cart.py`. Do not modify files or run shell commands. Research the current cart behavior and propose **two** implementation approaches for `SAVE10`. Explain trade-offs, invalid-code behavior, discount stacking, rounding, and regression risks. Recommend one option with a file-by-file plan. Stop and wait for my approval before any edit.

    Note: If desired, you could specify a save location for Claude's research to reference later in the lab.

  2. Challenge

    AI review and plan correction

    In the same Claude session, paste in the following prompt:

    Act as a requirements reviewer. Recheck your proposed plan against `README.md` and `AGENT_RULES.md`. Explicitly address whether `SAVE10` may stack with silver/gold tiers, unknown coupons, rounding, and backwards compatibility. List unsupported assumptions. Revise the plan **without editing files**. End with a numbered implementation checklist and wait for my approval.

    AI review can easily suffer from preexisting bias and foundational flaws, therefore it's important to check the plan against the project requirements. Request revisions if necessary until satisfied with the results.

  3. Challenge

    Single-agent role chaining

    Using a single agent, you will chain together the implement → validate → correction (if needed) workflow into a single session.

    The same Claude agent now receives the approved plan as its input. This is sequential role chaining, and is not using separate agents or having independent reviewers.

    Ask Claude to work only on the allowed files. Continue to enter the following prompts in the same Claude session.

    Implementation prompt:

    IMPLEMENTER ROLE. Follow the plan I approved. Add optional `coupon_code=None` support to `total()` in `src/cart.py`. `SAVE10` is valid only for `regular`; it cannot stack with silver or gold. Unknown coupon codes must raise `ValueError`. Preserve existing behavior and use `Decimal` with `ROUND_HALF_UP`. Add focused tests in `tests/test_cart.py`. Edit **only** these two files. Before each proposed edit, explain what you will change and ask me to approve it through the CLI permission prompt. Do not modify any other files. When done, summarize your changes and stop.

    Review Claude Code's permission requests before accepting writes. If the agent requests an unrelated command or file change, deny it. Do not enable bypass-permissions mode.

    Validation prompt:

    VALIDATOR ROLE. Inspect the actual diff and the two changed files against `README.md` and `AGENT_RULES.md`. Run `python -m pytest -q tests` if I approve the command. Report defects, missed cases, unsupported assumptions, and any deviations from the plan. Do not edit files. Present a severity-ranked findings list.

    Correction prompt:

    CORRECTOR ROLE. Use the validator findings and the independent test results I will provide. Propose the smallest fixes, explain each change, and request permission before editing. Touch only `src/cart.py` and `tests/test_cart.py`. Re-run the tests only with my approval. An AI agent may overlook defects in its own implementation or generate tests based on incorrect assumptions. Independent testing provides an additional layer of validation.

    The tests within artifacts check requirements beyond the starter tests. Run them after Claude implements the feature:

    1. Open a second Terminal: click the + beside the existing Terminal tab > New tab > Terminal.
    2. In the second Terminal at the bash prompt ($) run cd artifacts, then run

      python3 -m pytest test_loyalty.py test_coupons.py test_currency.py -v

    3. Paste failures from the tests into the Claude prompt (in the first Terminal).
      • You'll at this point need to allow Claude access to the artifacts directory, including perhaps creating some new test files. Do so, although keep any changes minimal.
      • Repeat until all tests pass.
  4. Challenge

    Recover from incorrect context and convention records

    Then correct the conversation explicitly:

    The stacking claim was incorrect. Treat `README.md` and `AGENT_RULES.md` as authoritative. Restate the correct rule. Explain how you would avoid repeating the mistake when context is compacted or the session is resumed.

    To persist team guidance for future Claude Code sessions, use the CLI to create or update CLAUDE.md in the project root after reviewing the content. This file is a Claude Code project-memory convention; the existing AGENT_RULES.md is a lab requirements document. Ask Claude to summarize the stable conventions into CLAUDE.md, with your approval, rather than relying on chat history alone.

    Draft a short `CLAUDE.md` using verified conventions from `AGENT_RULES.md`. Include currency rounding, no discount stacking, allowed edit scope, and human approval requirements. Show me the proposed text first; wait for approval before writing it.

About the author

I am, Josh Meier, an avid explorer of ideas an a lifelong learner. I have a background in AI with a focus in generative AI. I am passionate about AI and the ethics surrounding its use and creation and have honed my skills in generative AI models, ethics and applications and thrive to improve in my understanding of these models.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight