Agent Skills Framework Extension
Project Discovery Patterns Skill
When to Use This Skill
Use this skill when implementing project discovery patterns patterns in your codebase.
How to Use This Skill
- Review the patterns and examples below
- Apply the relevant patterns to your implementation
- Follow the best practices outlined in this skill
Comprehensive project discovery with stakeholder interviews, requirements gathering, risk assessment, and scoping.
Core Capabilities
- Stakeholder Interviews - Structured interview frameworks
- Requirements Gathering - User stories and acceptance criteria
- Risk Assessment - Risk identification and mitigation planning
- Technical Feasibility - Technology stack evaluation
- Project Scoping - Effort estimation and timeline planning
Discovery Interview Framework
# Project Discovery Interview Template
## Project Overview
- **Project Name:**
- **Stakeholders:**
- **Interview Date:**
- **Interviewer:**
## Business Context
1. What problem are we solving?
2. Who are the primary users?
3. What are the success criteria?
4. What are the business constraints (budget, timeline)?
## Functional Requirements
1. What are the core features?
2. What are the nice-to-have features?
3. What integrations are required?
4. What data needs to be managed?
## Non-Functional Requirements
1. Expected user volume?
2. Performance requirements (response time, throughput)?
3. Security requirements?
4. Compliance requirements (GDPR, HIPAA, etc.)?
5. Availability requirements (uptime SLA)?
## Technical Constraints
1. Existing technology stack?
2. Infrastructure constraints?
3. Integration with legacy systems?
4. Data migration requirements?
## Risk Identification
1. Technical risks?
2. Resource risks?
3. Timeline risks?
4. Dependency risks?
## Next Steps
1. Follow-up questions?
2. Additional stakeholders to interview?
3. Documentation to review?
Requirements Gathering Template
# Requirements Document
## User Stories
### Epic: [Feature Name]
**As a** [user type]
**I want** [goal]
**So that** [benefit]
**Acceptance Criteria:**
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3
**Technical Notes:**
- Implementation approach
- Dependencies
- Estimated effort
### User Story 1
- **Priority:** High/Medium/Low
- **Complexity:** 1-5
- **Dependencies:** [Other stories]
## Functional Requirements
| ID | Requirement | Priority | Acceptance Criteria |
|----|-------------|----------|---------------------|
| FR-1 | User authentication | High | Users can login with email/password |
| FR-2 | Password reset | Medium | Users can reset password via email |
## Non-Functional Requirements
| ID | Requirement | Target | Measurement |
|----|-------------|--------|-------------|
| NFR-1 | Page load time | <2s | 95th percentile |
| NFR-2 | Availability | 99.9% | Monthly uptime |
| NFR-3 | Concurrent users | 10,000 | Load testing |
## Out of Scope
- Feature X (future release)
- Integration Y (not required for MVP)
Risk Assessment Matrix
#!/usr/bin/env python3
"""
Project risk assessment and mitigation planning.
"""
from dataclasses import dataclass
from typing import List
from enum import Enum
class Impact(Enum):
LOW = 1
MEDIUM = 2
HIGH = 3
CRITICAL = 4
class Probability(Enum):
UNLIKELY = 1
POSSIBLE = 2
LIKELY = 3
ALMOST_CERTAIN = 4
@dataclass
class Risk:
id: str
description: str
category: str
impact: Impact
probability: Probability
mitigation: str
owner: str
@property
def risk_score(self) -> int:
return self.impact.value * self.probability.value
@property
def risk_level(self) -> str:
score = self.risk_score
if score >= 12:
return "CRITICAL"
elif score >= 9:
return "HIGH"
elif score >= 4:
return "MEDIUM"
else:
return "LOW"
class RiskAssessment:
def __init__(self):
self.risks: List[Risk] = []
def add_risk(self, risk: Risk):
self.risks.append(risk)
def generate_report(self) -> str:
"""Generate risk assessment report."""
# Sort by risk score (highest first)
sorted_risks = sorted(self.risks, key=lambda r: r.risk_score, reverse=True)
report = "# Risk Assessment Report\n\n"
report += f"## Summary\n\n"
report += f"Total Risks: {len(self.risks)}\n\n"
# Count by level
critical = len([r for r in self.risks if r.risk_level == "CRITICAL"])
high = len([r for r in self.risks if r.risk_level == "HIGH"])
medium = len([r for r in self.risks if r.risk_level == "MEDIUM"])
low = len([r for r in self.risks if r.risk_level == "LOW"])
report += f"- Critical: {critical}\n"
report += f"- High: {high}\n"
report += f"- Medium: {medium}\n"
report += f"- Low: {low}\n\n"
report += "## Risks\n\n"
for risk in sorted_risks:
report += f"### {risk.id}: {risk.description}\n\n"
report += f"- **Category:** {risk.category}\n"
report += f"- **Impact:** {risk.impact.name}\n"
report += f"- **Probability:** {risk.probability.name}\n"
report += f"- **Risk Level:** {risk.risk_level}\n"
report += f"- **Risk Score:** {risk.risk_score}/16\n"
report += f"- **Mitigation:** {risk.mitigation}\n"
report += f"- **Owner:** {risk.owner}\n\n"
return report
# Example usage
if __name__ == '__main__':
assessment = RiskAssessment()
assessment.add_risk(Risk(
id="R-001",
description="Database migration failure",
category="Technical",
impact=Impact.CRITICAL,
probability=Probability.POSSIBLE,
mitigation="Implement rollback plan, test in staging",
owner="DevOps Team"
))
assessment.add_risk(Risk(
id="R-002",
description="Key developer leaves project",
category="Resource",
impact=Impact.HIGH,
probability=Probability.UNLIKELY,
mitigation="Cross-training, documentation",
owner="Project Manager"
))
print(assessment.generate_report())
Project Scoping Template
# Project Scope Document
## Project Summary
**Name:** [Project Name]
**Duration:** [Estimated timeline]
**Budget:** [Estimated cost]
**Team Size:** [Number of team members]
## Objectives
1. Primary objective
2. Secondary objectives
## Deliverables
- [ ] Deliverable 1 (Due: [Date])
- [ ] Deliverable 2 (Due: [Date])
- [ ] Deliverable 3 (Due: [Date])
## Technology Stack
- **Frontend:** React, TypeScript
- **Backend:** Node.js, Express
- **Database:** PostgreSQL
- **Infrastructure:** AWS (ECS, RDS, S3)
- **CI/CD:** GitHub Actions
## Timeline
| Phase | Duration | Deliverables |
|-------|----------|-------------|
| Discovery | 2 weeks | Requirements doc, risk assessment |
| Design | 3 weeks | Architecture, UI/UX mockups |
| Development | 12 weeks | MVP features |
| Testing | 3 weeks | QA, security audit |
| Deployment | 1 week | Production release |
## Resource Plan
| Role | Allocation | Duration |
|------|-----------|----------|
| Project Manager | 50% | 20 weeks |
| Tech Lead | 100% | 20 weeks |
| Frontend Developer | 100% | 16 weeks |
| Backend Developer | 100% | 16 weeks |
| QA Engineer | 100% | 4 weeks |
## Assumptions
1. Stakeholder availability for weekly reviews
2. Third-party API documentation available
3. Access to production infrastructure
## Constraints
1. Must launch before Q4
2. Budget limit: $200K
3. Compliance with GDPR
## Out of Scope
- Mobile applications (phase 2)
- Multi-language support (phase 2)
Usage Examples
Conduct Discovery Interviews
Apply project-discovery-patterns skill to facilitate stakeholder interviews and generate requirements documentation
Risk Assessment
Apply project-discovery-patterns skill to identify project risks and create mitigation plans with risk matrix
Project Scoping
Apply project-discovery-patterns skill to create comprehensive project scope with timeline and resource estimates
Integration Points
- project-organization-patterns - Project structure setup
- orchestration-patterns - Multi-phase project coordination
- documentation-patterns - Discovery documentation
Success Output
When successful, this skill MUST output:
✅ SKILL COMPLETE: project-discovery-patterns
Completed:
- [x] Stakeholder interviews conducted
- [x] Requirements document generated
- [x] Risk assessment matrix created
- [x] Project scope defined
- [x] Timeline and resource plan established
Outputs:
- Interview notes: docs/discovery/interviews/
- Requirements doc: docs/discovery/REQUIREMENTS.md
- Risk assessment: docs/discovery/RISK-ASSESSMENT.md
- Project scope: docs/discovery/PROJECT-SCOPE.md
- Timeline: docs/discovery/TIMELINE.md
Key Findings:
- Functional requirements: {count}
- Non-functional requirements: {count}
- Identified risks: {count} (Critical: {count}, High: {count})
- Estimated duration: {weeks} weeks
- Team size: {count} members
Completion Checklist
Before marking this skill as complete, verify:
- All stakeholders interviewed
- Interview notes documented
- User stories created with acceptance criteria
- Functional requirements captured
- Non-functional requirements defined
- Risk assessment completed
- Mitigation plans for critical risks
- Project scope document finalized
- Timeline with milestones created
- Resource allocation planned
- Out-of-scope items documented
- Stakeholder approval obtained
Failure Indicators
This skill has FAILED if:
- ❌ Key stakeholders not interviewed
- ❌ Requirements too vague or incomplete
- ❌ Critical risks not identified
- ❌ No acceptance criteria for user stories
- ❌ Timeline unrealistic or missing dependencies
- ❌ Resource constraints not documented
- ❌ Scope creep not addressed
- ❌ Business constraints ignored
When NOT to Use
Do NOT use this skill when:
- Project scope is already well-defined (skip to implementation)
- Working on a small bug fix or minor feature (too heavyweight)
- Requirements are crystal clear with no ambiguity (use agile-story-writing instead)
- Discovery already completed (use existing documentation)
- Project is exploratory/experimental (use rapid-prototyping instead)
- You need to START implementation immediately (discovery will delay)
- Working on internal tooling with no external stakeholders (simplified discovery sufficient)
Anti-Patterns (Avoid)
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Skipping stakeholder interviews | Misaligned requirements | Always interview all key stakeholders |
| No acceptance criteria | Ambiguous requirements | Define testable acceptance criteria |
| Ignoring non-functional requirements | Performance/security issues | Capture scalability, security, availability needs |
| Underestimating risks | Project failure | Conduct thorough risk assessment |
| No risk mitigation plans | Reactive crisis management | Define proactive mitigation strategies |
| Overly optimistic timelines | Missed deadlines | Add contingency buffers |
| Not documenting assumptions | Scope creep | Explicitly list all assumptions |
| Skipping out-of-scope definition | Scope creep | Clearly define what's NOT included |
| No resource constraints | Unrealistic plans | Document budget, team, infrastructure limits |
| One-time discovery | Requirements drift | Plan follow-up sessions |
Principles
This skill embodies:
- #5 Eliminate Ambiguity - Structured interviews and requirements eliminate unclear expectations
- #6 Clear, Understandable, Explainable - Risk matrix and scope docs provide clarity
- #7 Evidence-Based Decision Making - Stakeholder input drives requirements
- #8 No Assumptions - Explicit assumption documentation prevents misunderstandings
- #10 Fail Closed - Risk assessment identifies blockers before they cause failure
- #14 Progressive Disclosure - Discovery → Requirements → Scoping progression
Full Standard: CODITECT-STANDARD-AUTOMATION.md