PRD: Greeting CLI Tool
This is the sample PRD for Week 1's lab exercise. Students should use this as a reference when writing their own PRDs.
1. Overview
What
A command-line tool that greets users by name with customizable greeting styles.
Who
Developers learning PRD-first AI-assisted development.
Why
Practice the disciplined vibe coding workflow: PRD → Plan → Code → Verify.
2. Core Features (MVP)
- Basic Greeting: Accept a name as a command line argument and print "Hello, [name]!"
- Formal Mode:
--formalflag changes greeting to "Good day, [name]." - Time Mode:
--timeflag appends current time to the greeting - Help Text:
--helpdisplays usage information
3. Non-Goals
Features We Will NOT Build
- [ ] GUI or web interface
- [ ] Database storage of greetings
- [ ] User authentication
- [ ] Multi-language support
- [ ] Greeting history
Technologies We Will NOT Use
- [ ] External HTTP libraries
- [ ] Database packages
- [ ] Web frameworks
Scope Boundaries
- [ ] This is a single-file Python script
- [ ] No configuration files
- [ ] No persistent state
4. Technical Constraints
Language & Framework
- Primary Language: Python 3.11+
- Framework: None (stdlib only)
- Package Manager: pip (for dev dependencies only)
Dependencies
- Allowed: Python standard library only (argparse, datetime)
- Prohibited: requests, flask, django, any web/db packages
- Prefer: argparse for CLI argument parsing
Code Standards
- Style Guide: PEP 8
- Type Checking: Type hints recommended but not required
- Testing Framework: pytest or unittest
- Minimum Coverage: 3 test cases minimum
5. Success Criteria
Functional Tests
- [ ]
python main.py Aliceoutputs "Hello, Alice!" - [ ]
python main.py Bob --formaloutputs "Good day, Bob." - [ ]
python main.py Carol --timeoutputs "Hello, Carol! The time is [HH:MM]." - [ ]
python main.py --helpshows usage information
Quality Gates
- [ ] All unit tests pass
- [ ] Code runs without errors
- [ ] Help text is clear and accurate
6. Implementation Phases
Phase 1: Basic Greeting
Goal: Get the simplest version working.
Tasks:
- Create
main.pyfile - Use argparse to accept a name argument
- Print "Hello, [name]!"
Verification:
bash
python main.py Alice
# Expected output: Hello, Alice!Dependencies: None
Deliverables:
- [ ]
main.pywith basic functionality
Phase 2: Add Flags
Goal: Implement --formal and --time options.
Tasks:
- Add
--formalflag to argparse - Add
--timeflag to argparse - Implement conditional greeting logic
- Import datetime for time functionality
Verification:
bash
python main.py Alice --formal
# Expected: Good day, Alice.
python main.py Alice --time
# Expected: Hello, Alice! The time is 14:30.
python main.py Alice --formal --time
# Expected: Good day, Alice. The time is 14:30.Dependencies: Phase 1 complete
Deliverables:
- [ ] Updated
main.pywith flag support
Phase 3: Tests
Goal: Ensure code quality with automated tests.
Tasks:
- Create
test_main.py - Write test for basic greeting
- Write test for formal mode
- Write test for time mode
Verification:
bash
python -m pytest test_main.py -v
# All tests should passDependencies: Phase 2 complete
Deliverables:
- [ ]
test_main.pywith passing tests
7. Agent Boundaries
Always Do
- [ ] Run the script after changes to verify it works
- [ ] Follow PEP 8 style guidelines
- [ ] Include docstrings for functions
Ask First
- [ ] Before adding any external packages
- [ ] Before changing the output format
Never Do
- [ ] Install packages outside stdlib
- [ ] Create additional files beyond main.py and test_main.py
- [ ] Add features not in this PRD