Agentic-RagBot / docs /archive /WEEK1_EXECUTION_PLAN.md
Nikhil Pravin Pise
docs: update all documentation to reflect current codebase state
aefac4f

╔════════════════════════════════════════════════════════════════════════════╗ β•‘ 🎯 QUICK START: THIS WEEK'S TASKS (12-Week Plan) β•‘ β•‘ Use this for daily execution and progress tracking β•‘ β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

PHASE 1 - WEEK 1 ([CURRENT]) - Security + State Propagation ════════════════════════════════════════════════════════════════════════════════

MONDAY-TUESDAY: OWASP Audit + API Security β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Task 1.1: Run OWASP Security Check (Skill #18) β”‚ β”‚ Time: 2-3 hours β”‚ β”‚ Actions: β”‚ β”‚ β–‘ npx skills unlock owasp-security-check β”‚ β”‚ β–‘ Read ~/.agents/skills/owasp-security-check/SKILL.md β”‚ β”‚ β–‘ Run security scan on /api and /src β”‚ β”‚ β–‘ Document findings in docs/SECURITY_AUDIT.md β”‚ β”‚ β–‘ Create GitHub issues for each finding β”‚ β”‚ Deliverable: SECURITY_AUDIT.md with prioritized issues β”‚ β”‚ Success: Report shows all vulnerabilities categorized β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Task 1.2: Implement JWT Authentication (Skill #17) β”‚ β”‚ Time: 4-6 hours β”‚ β”‚ Actions: β”‚ β”‚ β–‘ npx skills unlock api-security-hardening β”‚ β”‚ β–‘ Read ~/.agents/skills/api-security-hardening/SKILL.md β”‚ β”‚ β–‘ Create api/app/middleware/auth.py (JWT generation + validation) β”‚ β”‚ β–‘ Add @require_auth decorator to api/app/routes/analyze.py β”‚ β”‚ β–‘ Update api/main.py to include auth middleware β”‚ β”‚ β–‘ Test: curl -H "Authorization: Bearer " /api/v1/analyze β”‚ β”‚ Deliverable: JWT auth working on all endpoints β”‚ β”‚ Success: Unauthorized requests return 401 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

WEDNESDAY-THURSDAY: Test Infrastructure + State Fixing β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Task 1.3: Create Testing Infrastructure (Skill #22) β”‚ β”‚ Time: 2-3 hours β”‚ β”‚ Actions: β”‚ β”‚ β–‘ npx skills unlock python-testing-patterns β”‚ β”‚ β–‘ Create tests/conftest.py with fixtures β”‚ β”‚ β–‘ Create tests/fixtures/auth.py (JWT token generator) β”‚ β”‚ β–‘ Create tests/fixtures/biomarkers.py (test data) β”‚ β”‚ β–‘ Create tests/test_api_auth.py with 10+ auth tests β”‚ β”‚ β–‘ Run: pytest tests/test_api_auth.py -v β”‚ β”‚ Deliverable: Auth tests with 80%+ coverage β”‚ β”‚ Success: All auth tests passing β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Task 1.4: Fix State Propagation in Workflow (Skill #2) β”‚ β”‚ Time: 4-6 hours β”‚ β”‚ Actions: β”‚ β”‚ β–‘ npx skills unlock workflow-orchestration-patterns β”‚ β”‚ β–‘ Read ~/.agents/skills/workflow-orchestration-patterns/SKILL.md β”‚ β”‚ β–‘ Review src/state.py - identify missing fields β”‚ β”‚ β–‘ Add to GuildState: biomarker_flags, safety_alerts β”‚ β”‚ β–‘ Update each agent to return complete state: β”‚ β”‚ - BiomarkerAnalyzerAgent: add flags β”‚ β”‚ - DiseaseExplainerAgent: preserve incoming flags β”‚ β”‚ - ConfidenceAssessorAgent: preserve all state β”‚ β”‚ β–‘ Test: python scripts/test_chat_demo.py β”‚ β”‚ β–‘ Verify state carries through entire workflow β”‚ β”‚ Deliverable: State propagates end-to-end β”‚ β”‚ Success: All fields present in final response β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

FRIDAY: Schema Unification + Rate Limiting β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Task 1.5: Unify Response Schema (Skill #16) β”‚ β”‚ Time: 3-5 hours β”‚ β”‚ Actions: β”‚ β”‚ β–‘ npx skills unlock ai-wrapper-product β”‚ β”‚ β–‘ Create api/app/models/response.py (unified schema) β”‚ β”‚ β–‘ Define BaseAnalysisResponse with all fields: β”‚ β”‚ - biomarkers: dict β”‚ β”‚ - disease: str β”‚ β”‚ - confidence: float β”‚ β”‚ - biomarker_flags: list β”‚ β”‚ - safety_alerts: list (NEW) β”‚ β”‚ β–‘ Update api/app/services/ragbot.py to use unified schema β”‚ β”‚ β–‘ Test all endpoints return correct schema β”‚ β”‚ β–‘ Run: pytest tests/test_response_schema.py -v β”‚ β”‚ Deliverable: Unified schema in place β”‚ β”‚ Success: Pydantic validation passes β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Task 1.6: Add Rate Limiting (Skill #20) β”‚ β”‚ Time: 2-3 hours β”‚ β”‚ Actions: β”‚ β”‚ β–‘ npx skills unlock api-rate-limiting β”‚ β”‚ β–‘ Create api/app/middleware/rate_limiter.py β”‚ β”‚ β–‘ Add rate limiting to api/main.py: β”‚ β”‚ - 10 requests/minute (free tier) β”‚ β”‚ - 100 requests/minute (pro tier) β”‚ β”‚ β–‘ Return 429 Too Many Requests with retry-after header β”‚ β”‚ β–‘ Test rate limiting behavior β”‚ β”‚ Deliverable: Rate limiting active β”‚ β”‚ Success: 11th request returns 429 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

FRIDAY (EVENING): Code Review + Commit

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Task 1.7: Code Review & Commit Week 1 Work β”‚ β”‚ Actions: β”‚ β”‚ β–‘ Review all changes for: β”‚ β”‚ - No hardcoded secrets β”‚ β”‚ - Proper error handling β”‚ β”‚ - Consistent code style β”‚ β”‚ - Docstrings added β”‚ β”‚ β–‘ Run full test suite: pytest tests/ -v --cov src β”‚ β”‚ β–‘ Ensure coverage >75% β”‚ β”‚ β–‘ Create PR titled: "Phase 1 Week 1: Security + State Propagation" β”‚ β”‚ β–‘ Update IMPLEMENTATION_ROADMAP.md with actual times β”‚ β”‚ Success: PR ready for review β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

WEEK 1 SUMMARY ════════════════════════════════════════════════════════════════════════════════

βœ“ Security audit completed βœ“ JWT authentication implemented βœ“ Testing infrastructure created βœ“ State propagation fixed βœ“ Response schema unified βœ“ Rate limiting added βœ“ Tests written & passing

Metrics to Track:

  • Lines of code added: ____
  • Tests added: ____
  • Coverage improvement: __% β†’ __%
  • Issues found (OWASP): ____
  • Issues resolved: ____

════════════════════════════════════════════════════════════════════════════════

AFTER WEEK 1: Next Steps

Move to Phase 1 Week 2: Task 2.1: Multi-Agent Orchestration fixes Task 2.2: LLM Security (prompt injection) Task 2.3: Error handling framework

Then Phase 2 begins immediately with testing expansion.

════════════════════════════════════════════════════════════════════════════════

USEFUL COMMANDS FOR THIS WEEK:

Check skill is installed:

Test-Path "$env:USERPROFILE.agents\skills\owasp-security-check\SKILL.md"

Run tests with coverage:

python -m pytest tests/ -v --cov src --cov-report=html

Check code style:

pip install black pylint; black src/ --check

Run security scan locally:

pip install bandit; bandit -r api/app src/

Start API for manual testing:

cd api && python -m uvicorn app.main:app --reload

View auto-generated API docs:

Open browser to http://localhost:8000/docs

════════════════════════════════════════════════════════════════════════════════

DAILY STANDUP TEMPLATE (Use this each day):

Date: _______________ Standup Lead: _______

What did you complete yesterday? [ ] _____________________________________

What are you doing today? [ ] _____________________________________

What blockers do you have? [ ] _____________________________________

Metrics: Coverage: __% Tests passing: __ Errors: __

Status: 🟒 On Track / 🟑 At Risk / πŸ”΄ Blocked ════════════════════════════════════════════════════════════════════════════════