classRequirementsAssistant:"""AI assistant for requirements gathering."""def__init__(self,llm):self.llm=llmdefprocess_interview_transcript(self,transcript):"""Extract requirements from interview transcript."""prompt="""
Analyze this stakeholder interview and extract:
1. FUNCTIONAL REQUIREMENTS
- What the system should do
- User actions and system responses
2. NON-FUNCTIONAL REQUIREMENTS
- Performance, security, scalability needs
3. USER STORIES
Format: As a [user], I want [goal], so that [benefit]
4. ACCEPTANCE CRITERIA
- Given/When/Then format
5. OPEN QUESTIONS
- Ambiguities that need clarification
6. EDGE CASES
- Scenarios that weren't discussed
Interview Transcript:
{transcript}
Output as structured JSON.
"""returnself.llm.generate(prompt.format(transcript=transcript))defidentify_gaps(self,requirements,existing_system):"""Identify gaps and inconsistencies in requirements."""prompt="""
Analyze these requirements for:
1. INCONSISTENCIES
- Conflicting requirements
- Contradictory user stories
2. GAPS
- Missing edge cases
- Unhandled error scenarios
- Undefined behaviors
3. AMBIGUITIES
- Vague language
- Undefined terms
- Unclear acceptance criteria
4. QUESTIONS FOR STAKEHOLDERS
- What needs clarification
Requirements:
{requirements}
Existing System Context:
{existing_system}
Output as structured report.
"""returnself.llm.generate(prompt.format(requirements=requirements,existing_system=existing_system))defgenerate_user_stories(self,requirements):"""Generate detailed user stories from requirements."""prompt="""
Convert these requirements into user stories.
For each story, include:
- Title
- As a [user role]
- I want [goal]
- So that [benefit]
- Acceptance criteria (Given/When/Then)
- Priority (MoSCoW: Must/Should/Could/Won't)
- Estimated complexity (S/M/L/XL)
Requirements:
{requirements}
"""returnself.llm.generate(prompt.format(requirements=requirements))
What Changes
Aspect
Before
After
Transcription
Manual notes
AI transcribes + summarizes
Story generation
Manual writing
AI drafts, human refines
Gap analysis
Experience-based
AI identifies patterns
Formatting
Manual
Automated
Human role
Writer
Editor + validator
What Stays the Same
Stakeholder conversations (still need human empathy)
classArchitectureAssistant:"""AI assistant for system design."""def__init__(self,llm,knowledge_base):self.llm=llmself.kb=knowledge_basedefpropose_architectures(self,requirements,constraints):"""Propose multiple architecture options."""prompt="""
Based on these requirements and constraints, propose 3
different architecture approaches.
For each architecture, include:
1. OVERVIEW
- High-level description
- Key components
2. COMPONENTS
- Services/modules
- Data stores
- External dependencies
3. TRADE-OFFS
- Pros
- Cons
- Risks
4. WHEN TO CHOOSE
- Ideal scenarios
- When to avoid
5. TECHNOLOGY STACK
- Recommended technologies
- Alternatives
Requirements:
{requirements}
Constraints:
{constraints}
"""returnself.llm.generate(prompt.format(requirements=requirements,constraints=constraints))defanalyze_trade_offs(self,architectures,context):"""Deep analysis of trade-offs between options."""prompt="""
Compare these architecture options and provide:
1. DECISION MATRIX
| Criteria | Option A | Option B | Option C |
|----------|----------|----------|----------|
| Cost | | | |
| Scale | | | |
| Complexity| | | |
| Time | | | |
2. RECOMMENDATION
- Which option for which scenario
- Key decision factors
3. RISK ANALYSIS
- What could go wrong with each
- Mitigation strategies
4. MIGRATION PATH
- How to evolve from one to another
- Reversibility assessment
Architectures:
{architectures}
Context:
{context}
"""returnself.llm.generate(prompt.format(architectures=architectures,context=context))defgenerate_adr(self,decision,context):"""Generate Architecture Decision Record."""prompt="""
Create an Architecture Decision Record (ADR) with:
# Title
# Status (Proposed/Accepted/Deprecated)
# Context
# Decision
# Consequences (Positive, Negative, Neutral)
# Compliance (How to verify this decision is followed)
Decision Context:
{decision}
Background:
{context}
"""returnself.llm.generate(prompt.format(decision=decision,context=context))defgenerate_diagram(self,architecture_description):"""Generate Mermaid diagram from description."""prompt="""
Convert this architecture description into a Mermaid
flowchart diagram.
Include:
- All components
- Data flows
- External dependencies
Architecture:
{architecture}
Output only the Mermaid code, no explanation.
"""returnself.llm.generate(prompt.format(architecture=architecture_description))
What Changes
Aspect
Before
After
Option generation
Manual research
AI proposes multiple options
Trade-off analysis
Experience-based
AI documents systematically
Diagram creation
Manual drawing
AI generates from description
Documentation
Labor-intensive
AI drafts, human refines
Human role
Creator
Decision-maker + editor
What Stays the Same
Final architecture decisions (still need human judgment)
Accountability for decisions (still on humans)
Understanding business context (still requires human knowledge)
┌─────────────────────────────────────────────────────────────┐
│ Testing (AI-Enhanced) │
├─────────────────────────────────────────────────────────────┤
│ │
│ Process: │
│ 1. AI generates test cases from spec │
│ 2. AI identifies edge cases │
│ 3. AI creates test data │
│ 4. AI analyzes failures + suggests fixes │
│ 5. Human reviews + extends │
│ │
│ Challenges: │
│ - AI may miss domain-specific cases │
│ - Need human validation of test quality │
│ - False positives/negatives │
│ │
└─────────────────────────────────────────────────────────────┘
classTestingAssistant:"""AI assistant for testing."""def__init__(self,llm):self.llm=llmdefgenerate_test_plan(self,spec,code):"""Generate comprehensive test plan."""prompt="""
Create a test plan for this feature.
Include:
1. TEST CATEGORIES
- Unit tests
- Integration tests
- End-to-end tests
2. TEST SCENARIOS
- Happy path
- Edge cases
- Error conditions
- Boundary values
3. TEST DATA REQUIREMENTS
- What data is needed
4. MOCKS/STUBS NEEDED
- External dependencies to mock
Specification:
{spec}
Code:
{code}
"""returnself.llm.generate(prompt.format(spec=spec,code=code))defidentify_edge_cases(self,spec):"""Identify edge cases that should be tested."""prompt="""
Identify edge cases for this specification.
Consider:
- Empty/null inputs
- Maximum values
- Invalid inputs
- Race conditions
- Concurrent access
- Network failures
- Resource exhaustion
Specification:
{spec}
Edge Cases:
"""returnself.llm.generate(prompt.format(spec=spec))defanalyze_test_failure(self,test_code,error,context):"""Analyze test failure and suggest fix."""prompt="""
Analyze this test failure:
1. ROOT CAUSE
- Why did the test fail?
2. IS THE TEST CORRECT?
- Does the test accurately reflect requirements?
3. IS THE CODE INCORRECT?
- What's wrong with the implementation?
4. SUGGESTED FIX
- Specific code changes
Test Code:
{test_code}
Error:
{error}
Related Code:
{context}
"""returnself.llm.generate(prompt.format(test_code=test_code,error=error,context=context))defgenerate_test_data(self,schema,scenarios):"""Generate test data for various scenarios."""prompt="""
Generate test data for these scenarios.
Schema:
{schema}
Scenarios:
{scenarios}
For each scenario, provide:
- Valid test data
- Invalid test data (for error testing)
- Edge case data
Output as JSON.
"""returnself.llm.generate(prompt.format(schema=schema,scenarios=scenarios))
classMaintenanceAssistant:"""AI assistant for maintenance."""def__init__(self,llm,codebase,logs):self.llm=llmself.codebase=codebaseself.logs=logsdefanalyze_bug_report(self,report):"""Analyze bug report and suggest investigation path."""prompt="""
Analyze this bug report:
1. LIKELY CAUSE
- What's probably causing this?
2. INVESTIGATION STEPS
- What to check first
- What logs to examine
- What code to review
3. SIMILAR ISSUES
- Has this happened before?
4. QUICK WINS
- Common fixes to try first
Bug Report:
{report}
"""returnself.llm.generate(prompt.format(report=report))defdebug_issue(self,error,context,logs):"""Assist with debugging."""prompt="""
Help debug this issue:
Error:
{error}
Code Context:
{context}
Relevant Logs:
{logs}
Provide:
1. ROOT CAUSE HYPOTHESIS
2. HOW TO CONFIRM
3. LIKELY FIX
4. PREVENTION
"""returnself.llm.generate(prompt.format(error=error,context=context,logs=logs))defsuggest_refactoring(self,code_area):"""Suggest refactoring opportunities."""prompt="""
Analyze this code area for refactoring opportunities:
1. CODE SMELLS
- What patterns indicate problems?
2. TECHNICAL DEBT
- What shortcuts were taken?
3. REFACTORING SUGGESTIONS
- Specific improvements
- Priority order
4. RISK ASSESSMENT
- What could break?
- Testing needed
Code:
{code}
"""returnself.llm.generate(prompt.format(code=code_area))
┌─────────────────────────────────────────────────────────────┐
│ AI-Enhanced Software Development Lifecycle │
├─────────────────────────────────────────────────────────────┤
│ │
│ Requirements ←→ AI extracts, human validates │
│ ↓ │
│ Design ←→ AI proposes, human decides │
│ ↓ │
│ Implementation ←→ AI drafts, human refines │
│ ↓ │
│ Testing ←→ AI generates, human extends │
│ ↓ │
│ Deployment ←→ AI prepares, human approves │
│ ↓ │
│ Maintenance ←→ AI assists, human directs │
│ │
│ ───────────────────────────────────────────────────────── │
│ │
│ Key Principles: │
│ - AI amplifies human capability, doesn't replace │
│ - Human judgment remains critical │
│ - Accountability stays with humans │
│ - Iteration becomes faster │
│ - Quality depends on human oversight │
│ │
└─────────────────────────────────────────────────────────────┘
Key Takeaways
Every phase is affected: Requirements, design, code, test, deploy, maintain—all transformed.
Human role shifts: From creator to editor, from doer to validator, from worker to director.
Speed increases: What took days now takes hours, but quality still needs human judgment.
Hybrid is best: AI handles routine, humans handle complex/ambiguous.
Accountability unchanged: Humans are still responsible for what ships.
Next Article
In Article 9: The AI-Era Developer Role, we’ll explore what all this means for you as a developer. What skills matter now? What becomes obsolete? How do you stay relevant and thrive in the AI era?
This is the eighth article in the “Software Engineering in the LLM Era” series. Read previous articles.
💬 How has AI changed your development workflow? Which phase has seen the biggest transformation in your team? Share your experiences! 🚀