Synaptic AI Consulting
Estimated time: ~30 minutes
Outcome: Package, run, and document operations for your recruitment assistant via deploy.md
Framework version: AAMAD v0.7.5 (Tier-0 simplified Deliver — primary artifact is deploy.md)
By the end of this module, you will be able to:
@devops.eng to create deployment configurationsproject-context/3.deliver/deploy.md as the primary delivery runbookqa.md)recruitment-assistant project with all Build phase artifactsThe Deliver phase ensures your application can run reliably, be monitored, and evolve over time. As an Agentic Architect, you’ll wear your Technical Hat to orchestrate @devops.eng, ensuring:
deploy.md enables others to operate the systemTier-0 key activities:
deploy.md — Hosting, env matrix, access, rollback, how to run (consolidates deployment + runbook)Go deeper (optional): Full AAMAD also recommends
@security.eng→security.mdbefore Deliver,*document-user-guide→user-guide.md, andaamad validate --phase deliver. See CHECKLIST.md.
deploy.md and ConfigurationsThe DevOps Engineer packages the validated MVP for delivery.
git checkout -b feature/deployment
Start a NEW chat session:
@devops.eng
I need you to prepare the recruitment assistant for delivery. Please:
1. Review the PRD: project-context/1.define/prd.md
2. Review the SAD: project-context/1.define/sad.md
3. Confirm QA status: project-context/2.build/qa.md
4. Note security.md status (present or accepted gap for this Tier-0 mini-project)
5. Align packaging with AAMAD_TARGET_RUNTIME=crewai
6. Create deployment configs as needed (Dockerfile, docker-compose.yml, main.py, requirements.txt)
7. Complete project-context/3.deliver/deploy.md including:
- Release scope / version summary
- Hosting approach (local and/or Docker)
- Environment variable matrix (reference .env.example keys only — no secrets)
- How to install, start, stop, and roll back
- Access control notes (MVP scope)
- Monitoring / logging overview
- Troubleshooting
- Sources, Assumptions, Open Questions, Audit
(use *prepare-release, *define-deploy, *document-deploy as available)
deploy.mdWearing your Technical Hat, review:
Iterate with @devops.eng if needed.
Common Deployment Options for Mini-Project:
main.py or run.py entry pointrequirements.txt with all dependenciespython main.pyDockerfiledocker-compose.yml (if needed)docker build -t recruitment-assistant . && docker run --env-file .env recruitment-assistantclick or argparse for CLIdeploy.mdgit add project-context/3.deliver/deploy.md Dockerfile docker-compose.yml requirements.txt main.py
git commit -m "feat: Add deploy.md and deployment configuration
- DevOps Engineer created deploy runbook
- Deployment configurations added
- Ready for local/Docker run"
git checkout main
git merge feature/deployment
git branch -d feature/deployment
Add basic observability. For Tier 0, document monitoring inside deploy.md (or a short subsection) rather than a separate monitoring-plan file.
git checkout -b feature/monitoring
@devops.eng
I need you to add monitoring and logging to the recruitment assistant. Please:
1. Review: project-context/3.deliver/deploy.md
2. Add basic logging to the application:
- Log application startup
- Log agent execution (when Application Crew runs)
- Log API requests/responses
- Log errors and exceptions
3. Enable CrewAI tracing for the Application Crew (optional but recommended):
- Document crewai login / tracing=True setup
- Document how to view traces in the CrewAI dashboard
4. Update deploy.md with a Monitoring & Observability section covering:
- What to monitor
- Log levels and where logs are stored
- CrewAI tracing setup and access
5. Implement logging in the application code
import logging
from datetime import datetime
# Configure logging
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
handlers=[
logging.FileHandler('logs/app.log'),
logging.StreamHandler()
]
)
logger = logging.getLogger(__name__)
# Use in application
logger.info("Application started")
logger.info("Researcher agent executing...")
logger.error("Error occurred: %s", error_message)
CrewAI provides built-in tracing for Application Crew observability.
pip install "crewai[tools]"crewai loginfrom crewai import Agent, Crew, Process, Task
crew = Crew(
agents=[researcher, evaluator, recommender],
tasks=[research_task, evaluation_task, recommendation_task],
process=Process.sequential,
tracing=True, # Enable built-in tracing
verbose=True
)
result = crew.kickoff()
Or set in .env:
CREWAI_TRACING_ENABLED=true
Reference: CrewAI Tracing Documentation
git add project-context/3.deliver/deploy.md src/ logs/
git commit -m "feat: Add monitoring and logging
- Logging infrastructure added
- CrewAI tracing documented in deploy.md
- Observability section updated"
git checkout main
git merge feature/monitoring
git branch -d feature/monitoring
Run your application end-to-end and capture the results.
# Install dependencies
pip install -r requirements.txt
# Verify .env file is configured
cat .env | grep OPENAI_API_KEY
cat .env | grep AAMAD_TARGET_RUNTIME
# Review deploy runbook
cat project-context/3.deliver/deploy.md
Follow deploy.md:
Option 1: Local Python Script
python main.py
Option 2: Docker
docker build -t recruitment-assistant .
docker run --env-file .env recruitment-assistant
Option 3: CLI Entry Point
python -m src.cli --job-description "Python Developer" --requirements "5 years experience"
git checkout -b feature/execution-results
Create project-context/3.deliver/execution-results.md:
# Execution Results
## Test Run: [Date]
### Input
- Job Description: [Your test job description]
- Requirements: [Key requirements]
### Execution
- Start Time: [timestamp]
- End Time: [timestamp]
- Duration: [duration]
### Application Crew Execution
- Researcher Agent: [Status and findings]
- Evaluator Agent: [Status and findings]
- Recommender Agent: [Status and recommendations]
### Output
[Capture the actual output/recommendations]
### Logs / Traces
[Key log entries or CrewAI AOP trace link]
### Issues Encountered
[Any errors or unexpected behavior]
### Observations
[What worked well, what didn't]
git add project-context/3.deliver/execution-results.md
git commit -m "docs: Add execution results
- End-to-end test execution completed
- Application Crew executed successfully
- Results documented"
git checkout main
git merge feature/execution-results
git branch -d feature/execution-results
Optional quality gate:
aamad validate --phase deliver
Reflect on the entire project and document insights.
git checkout -b feature/lessons-learned
Create LESSONS.md in your project root covering:
@product-mgr helpeddeploy.md; observabilitygit add LESSONS.md
git commit -m "docs: Add lessons learned
- Document insights from entire project
- Reflect on AAMAD framework experience
- Capture recommendations for future projects"
git checkout main
git merge feature/lessons-learned
git branch -d feature/lessons-learned
project-context/3.deliver/deploy.md — Primary delivery / operational guideproject-context/3.deliver/execution-results.md — Test execution documentedLESSONS.md — Lessons learned capturedUpdate your project README with:
deploy.md)Go deeper: Ask
@devops.engto run*document-user-guideand produceproject-context/3.deliver/user-guide.mdfrom.cursor/templates/user-guide-template.md.
git add README.md
git commit -m "docs: Complete Deliver phase documentation
- deploy.md and execution results complete
- README updated with project status
- Project ready for demonstration"
Complete the Deliver phase by:
@devops.eng: Create deploy.md and deployment configurationsKey Practices Applied:
@devops.engdeploy.md)By the end of this module, you should have:
project-context/3.deliver/deploy.md — Deployment + operations runbookproject-context/3.deliver/execution-results.md — Test execution resultsLESSONS.md — Lessons learned documentmain.py)deploy.md?
Issue: Application won’t start
deploy.md for correct startup procedureIssue: Docker build fails
.dockerignore if files are missingIssue: Logs not appearing
Issue: CrewAI traces not appearing in dashboard
crewai logintracing=True or CREWAI_TRACING_ENABLED=trueIssue: Application Crew agents not executing
AAMAD_TARGET_RUNTIME=crewai in .envIssue: Can’t follow deploy.md
@devops.engdeploy.md enables operational independenceOnce the Deliver phase is complete:
Continue to Module 08: Value and Next Steps