Miranda's Project Guide
Project: PlainText Pal Category: Web App (Flask) + Anthropic API Last updated: April 14
Note: This guide is created based on the latest state of your project repository + any notes from our discussion. It may not always reflect the most up-to-date information.
Where You Are
Your spec is in great shape: "PlainText Pal" has a clear name, description, focused MVP features, and good inspiration references. You know what you want to build -- a website where users paste text and get readability suggestions powered by Claude.
What's missing is the scaffolding and your journal entry. Your repo currently has just the template files. The goal between now and Thursday is to get a running Flask app with a basic round-trip: paste text → get suggestions → display them.
What We Talked About
We mapped out the architecture:
- Flask app -- A web form where users paste their writing
pal.py-- Your core module that talks to Claude. The key function:def get_suggestions(text)→ returns a dictionary with:intent: the inferred intent of the writing (e.g. "professional", "academic")suggestions: a list of strings with readability suggestions
- Claude API -- Use Claude Sonnet via the Anthropic Python SDK
- SDK docs: https://platform.claude.com/docs/en/api/sdks/python
- Use the class API key (keep it in your code for now since the repo is private; if you ever make it public, move it to a
.envfile)
Next Steps (Before Thursday)
-
Scaffold your project. Use this prompt with your agent:
Read my project.spec.md and the Flask setup guide at https://csc-121.path.app/unit-3/resources/flask-setup.guide.llm.md Set up my project: initialize uv, install Flask and anthropic, create the basic file structure, and build a minimal starting point I can run. -
Create
pal.py. Start with a simple version ofget_suggestions(). Even a hardcoded response is fine as a first step -- you can wire up Claude after the Flask app works.Help me create a pal.py module with a function called get_suggestions(text) that takes a string and returns a dictionary with "intent" and "suggestions" keys. Start with a version that calls the Anthropic API using Claude Sonnet. Here are the SDK docs: https://platform.claude.com/docs/en/api/sdks/python -
Wire it together. Build one Flask route with a text box and a submit button. When the user submits, call
get_suggestions()and display the results. -
Update your journal. Fill in the Checkpoint 1 section of
project.journal.md-- what you did, what's next, and any blockers. -
Commit and push.
Checkpoint 1 Readiness
By Thursday April 16th, you need:
Helpful Resources
- Flask Setup Guide -- follow this to scaffold your project
- Anthropic Python SDK -- reference for
pal.py - Prompt Engineering Guide -- useful for crafting the Claude prompt
- Checkpoint 1 Instructions -- the full checkpoint requirements