@syntesseraai/opencode-feature-factory 0.1.23 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/stop-quality-gate.ts +3 -1
- package/src/tools/ffAcceptance.ts +43 -47
- package/src/tools/ffMiniPlan.ts +43 -26
- package/src/tools/ffReview.ts +34 -27
- package/src/tools/ffSecurity.ts +40 -29
- package/src/tools/ffValidate.ts +58 -73
- package/src/tools/ffWellArchitected.ts +89 -75
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@syntesseraai/opencode-feature-factory",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.25",
|
|
5
5
|
"description": "OpenCode plugin for Feature Factory agents - provides planning, implementation, review, testing, and validation agents",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
package/src/stop-quality-gate.ts
CHANGED
|
@@ -325,7 +325,9 @@ export async function createQualityGateHooks(input: PluginInput): Promise<Partia
|
|
|
325
325
|
const sanitizedOutput = truncateOutput(sanitizeOutput(ciOutput), 20);
|
|
326
326
|
const instructions = `
|
|
327
327
|
|
|
328
|
-
**Important:** Do not interrupt your current task. Add "Fix quality gate failures" to your todo list and continue with what you were doing. Address the quality gate issues after completing your current task
|
|
328
|
+
**Important:** Do not interrupt your current task. Add "Fix quality gate failures" to your todo list and continue with what you were doing. Address the quality gate issues after completing your current task.
|
|
329
|
+
|
|
330
|
+
If the failure details are missing or truncated, run "management/ci.sh" to get the full output.`;
|
|
329
331
|
const message = timedOut
|
|
330
332
|
? `⏱️ Quality gate timed out\n\nThe CI execution exceeded the ${CI_TIMEOUT_MS / 1000} second timeout. The build may be hanging or taking too long.\n\n\`\`\`\n${sanitizedOutput}\n\`\`\`${instructions}`
|
|
331
333
|
: `❌ Quality gate failed\n\nThe CI checks did not pass. Please review the output below and fix the issues:\n\n\`\`\`\n${sanitizedOutput}\n\`\`\`${instructions}`;
|
|
@@ -58,52 +58,47 @@ You are an acceptance criteria validator for Feature Factory. Your role is to st
|
|
|
58
58
|
|
|
59
59
|
## Output Format
|
|
60
60
|
|
|
61
|
-
Output your validation as structured
|
|
62
|
-
|
|
63
|
-
\`\`\`
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"Add comprehensive error messages for validation failures",
|
|
103
|
-
"Implement missing password reset workflow",
|
|
104
|
-
"Add unit tests for edge cases"
|
|
105
|
-
]
|
|
106
|
-
}
|
|
61
|
+
Output your validation as a structured Markdown report:
|
|
62
|
+
|
|
63
|
+
\`\`\`markdown
|
|
64
|
+
# Acceptance Criteria Report
|
|
65
|
+
|
|
66
|
+
**Status:** Accepted / Changes Requested
|
|
67
|
+
**Confidence:** 95%
|
|
68
|
+
**Coverage:** 95%
|
|
69
|
+
|
|
70
|
+
**Summary:** Validation summary and key findings
|
|
71
|
+
|
|
72
|
+
## ✅ Criteria Met
|
|
73
|
+
|
|
74
|
+
- **User authentication implemented**
|
|
75
|
+
- Evidence: \`AuthMiddleware.ts\` (lines 45-78)
|
|
76
|
+
- Status: Fully Implemented
|
|
77
|
+
|
|
78
|
+
## ❌ Criteria Not Met
|
|
79
|
+
|
|
80
|
+
- **Password reset functionality** (High Severity)
|
|
81
|
+
- Reason: No password reset endpoint found
|
|
82
|
+
- Location: \`AuthController.ts\` - missing
|
|
83
|
+
- Suggestion: Implement password reset endpoint and email service
|
|
84
|
+
|
|
85
|
+
## ⚠️ Edge Cases & Integration
|
|
86
|
+
|
|
87
|
+
**Edge Cases Missed:**
|
|
88
|
+
- **Empty password field** (Medium Severity)
|
|
89
|
+
- Current Behavior: Returns generic error
|
|
90
|
+
- Suggestion: Add validation for empty passwords
|
|
91
|
+
|
|
92
|
+
**Integration Issues:**
|
|
93
|
+
- **Database schema mismatch** (High Severity)
|
|
94
|
+
- Component: UserModel vs users table
|
|
95
|
+
- Fix: Update migration to include new columns
|
|
96
|
+
|
|
97
|
+
## 📋 Recommendations
|
|
98
|
+
|
|
99
|
+
- Add comprehensive error messages for validation failures
|
|
100
|
+
- Implement missing password reset workflow
|
|
101
|
+
- Add unit tests for edge cases
|
|
107
102
|
\`\`\`
|
|
108
103
|
|
|
109
104
|
## Severity Levels
|
|
@@ -135,7 +130,8 @@ export const FFAcceptancePlugin: Plugin = async () => {
|
|
|
135
130
|
return {
|
|
136
131
|
tool: {
|
|
137
132
|
ff_acceptance: tool({
|
|
138
|
-
description:
|
|
133
|
+
description:
|
|
134
|
+
'Validates implementation against acceptance criteria (@ff-acceptance), checks if code meets all requirements',
|
|
139
135
|
args: {
|
|
140
136
|
task: tool.schema
|
|
141
137
|
.string()
|
package/src/tools/ffMiniPlan.ts
CHANGED
|
@@ -33,35 +33,51 @@ Recommend \`@ff-plan\` when:
|
|
|
33
33
|
|
|
34
34
|
## Output Format
|
|
35
35
|
|
|
36
|
-
Output your plan as structured
|
|
37
|
-
|
|
38
|
-
\`\`\`
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
36
|
+
Output your plan as a structured Markdown report:
|
|
37
|
+
|
|
38
|
+
\`\`\`markdown
|
|
39
|
+
# Mini Plan
|
|
40
|
+
|
|
41
|
+
**Status:** Ready / Escalate to @ff-plan
|
|
42
|
+
**Time Estimate:** 5-10 minutes total
|
|
43
|
+
**Complexity:** Simple
|
|
44
|
+
|
|
45
|
+
## 📋 Steps
|
|
46
|
+
|
|
47
|
+
1. **Step Title**
|
|
48
|
+
- What to do in this step
|
|
49
|
+
- *Files:* \`file1.ts\`, \`file2.ts\`
|
|
50
|
+
|
|
51
|
+
2. **Another Step**
|
|
52
|
+
- Action description
|
|
53
|
+
- *Files:* \`file.ts\`
|
|
54
|
+
|
|
55
|
+
## ⚡ Quick Wins
|
|
56
|
+
|
|
57
|
+
- Optional improvement 1
|
|
58
|
+
- Optional improvement 2
|
|
59
|
+
|
|
60
|
+
## 📄 Files to Change
|
|
61
|
+
|
|
62
|
+
- \`file1.ts\`
|
|
63
|
+
- \`file2.ts\`
|
|
55
64
|
\`\`\`
|
|
56
65
|
|
|
57
66
|
If the task is too complex, output:
|
|
58
67
|
|
|
59
|
-
\`\`\`
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
\`\`\`markdown
|
|
69
|
+
# Mini Plan - Escalation Required
|
|
70
|
+
|
|
71
|
+
**Status:** Escalate to @ff-plan
|
|
72
|
+
|
|
73
|
+
## 🔄 Escalation Reason
|
|
74
|
+
|
|
75
|
+
This task requires architecture decisions across multiple services and exceeds the 5-step limit for mini-plans.
|
|
76
|
+
|
|
77
|
+
## 📋 Recommended Agent
|
|
78
|
+
|
|
79
|
+
- **Agent:** @ff-plan
|
|
80
|
+
- **Reason:** Requires architecture decisions across multiple services
|
|
65
81
|
\`\`\`
|
|
66
82
|
|
|
67
83
|
## Guidelines
|
|
@@ -78,7 +94,8 @@ export const FFMiniPlanPlugin: Plugin = async () => {
|
|
|
78
94
|
return {
|
|
79
95
|
tool: {
|
|
80
96
|
ff_mini_plan: tool({
|
|
81
|
-
description:
|
|
97
|
+
description:
|
|
98
|
+
'Creates mini implementation plans for smaller tasks (2-5 steps) (@ff-mini-plan), quick planning, small fixes',
|
|
82
99
|
args: {
|
|
83
100
|
task: tool.schema.string().describe('The simple task or issue description to plan for'),
|
|
84
101
|
},
|
package/src/tools/ffReview.ts
CHANGED
|
@@ -65,32 +65,38 @@ You are a code review specialist for Feature Factory. Your role is to review cod
|
|
|
65
65
|
|
|
66
66
|
## Review Output Format
|
|
67
67
|
|
|
68
|
-
Output your review as structured
|
|
69
|
-
|
|
70
|
-
\`\`\`
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
68
|
+
Output your review as a structured Markdown report:
|
|
69
|
+
|
|
70
|
+
\`\`\`markdown
|
|
71
|
+
# Code Review
|
|
72
|
+
|
|
73
|
+
**Status:** Approved / Request Changes
|
|
74
|
+
**Confidence:** 95%
|
|
75
|
+
|
|
76
|
+
**Summary:** Brief summary of the review findings
|
|
77
|
+
|
|
78
|
+
## 🔴 Issues (High Severity)
|
|
79
|
+
|
|
80
|
+
- **Issue Description**
|
|
81
|
+
- *File:* \`path/to/file.ts\` (Line 42)
|
|
82
|
+
- *Description:* Description of the issue
|
|
83
|
+
- *Suggestion:* How to fix the issue
|
|
84
|
+
|
|
85
|
+
## 🟡 Improvements (Medium/Low Severity)
|
|
86
|
+
|
|
87
|
+
- **Improvement Title**
|
|
88
|
+
- *File:* \`path/to/file.ts\` (Line 100)
|
|
89
|
+
- *Suggestion:* Optional improvement suggestion
|
|
90
|
+
|
|
91
|
+
## 🟢 Positives
|
|
92
|
+
|
|
93
|
+
- Code is well-structured and readable
|
|
94
|
+
- Good error handling throughout
|
|
95
|
+
- Proper separation of concerns
|
|
96
|
+
|
|
97
|
+
## 📌 Delegate To
|
|
98
|
+
|
|
99
|
+
- @ff-security if security concerns found
|
|
94
100
|
\`\`\`
|
|
95
101
|
|
|
96
102
|
## Severity Levels
|
|
@@ -120,7 +126,8 @@ export const FFReviewPlugin: Plugin = async () => {
|
|
|
120
126
|
return {
|
|
121
127
|
tool: {
|
|
122
128
|
ff_review: tool({
|
|
123
|
-
description:
|
|
129
|
+
description:
|
|
130
|
+
'Reviews code changes for correctness, quality, and test coverage (@ff-review), code review, quality check',
|
|
124
131
|
args: {
|
|
125
132
|
task: tool.schema.string().describe('The code review task or diff to analyze'),
|
|
126
133
|
},
|
package/src/tools/ffSecurity.ts
CHANGED
|
@@ -110,34 +110,44 @@ app.get('/admin', (req, res) => { ... });
|
|
|
110
110
|
|
|
111
111
|
## Audit Output Format
|
|
112
112
|
|
|
113
|
-
Output your audit as structured
|
|
114
|
-
|
|
115
|
-
\`\`\`
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
113
|
+
Output your audit as a structured Markdown report:
|
|
114
|
+
|
|
115
|
+
\`\`\`markdown
|
|
116
|
+
# Security Audit
|
|
117
|
+
|
|
118
|
+
**Status:** Approved / Failed
|
|
119
|
+
**Confidence:** 85%
|
|
120
|
+
|
|
121
|
+
**Summary:** Security audit summary
|
|
122
|
+
|
|
123
|
+
## 🛡️ Vulnerabilities
|
|
124
|
+
|
|
125
|
+
| Severity | Category | File | Line | Description |
|
|
126
|
+
|----------|----------|------|------|-------------|
|
|
127
|
+
| Critical | Injection | \`path/to/file.ts\` | 42 | SQL injection vulnerability |
|
|
128
|
+
|
|
129
|
+
### Vulnerability Details
|
|
130
|
+
|
|
131
|
+
- **SQL Injection Vulnerability** (High Severity)
|
|
132
|
+
- *File:* \`path/to/file.ts\` (Line 42)
|
|
133
|
+
- *Category:* Injection
|
|
134
|
+
- *Description:* SQL injection vulnerability
|
|
135
|
+
- *Impact:* Data breach, unauthorized access
|
|
136
|
+
- *Remediation:* Use parameterized queries
|
|
137
|
+
- *References:* OWASP A03:2021
|
|
138
|
+
|
|
139
|
+
## 💡 Recommendations
|
|
140
|
+
|
|
141
|
+
1. **Best Practice** (Medium Priority)
|
|
142
|
+
- Consider implementing rate limiting
|
|
143
|
+
|
|
144
|
+
2. **Authentication** (High Priority)
|
|
145
|
+
- Add multi-factor authentication checks
|
|
146
|
+
|
|
147
|
+
## 📋 Compliance Notes
|
|
148
|
+
|
|
149
|
+
- GDPR: Ensure PII handling is documented
|
|
150
|
+
- HIPAA: Verify data encryption standards
|
|
141
151
|
\`\`\`
|
|
142
152
|
|
|
143
153
|
## Severity Classifications
|
|
@@ -160,7 +170,8 @@ export const FFSecurityPlugin: Plugin = async () => {
|
|
|
160
170
|
return {
|
|
161
171
|
tool: {
|
|
162
172
|
ff_security: tool({
|
|
163
|
-
description:
|
|
173
|
+
description:
|
|
174
|
+
'Performs deep security audits on code changes (@ff-security), security check, vulnerability audit',
|
|
164
175
|
args: {
|
|
165
176
|
task: tool.schema.string().describe('The security audit task or code to analyze'),
|
|
166
177
|
},
|
package/src/tools/ffValidate.ts
CHANGED
|
@@ -55,81 +55,66 @@ Launch these agents **in parallel** using the Task tool:
|
|
|
55
55
|
- Determine overall pass/fail status
|
|
56
56
|
- Provide clear rationale
|
|
57
57
|
- List blocking vs non-blocking issues
|
|
58
|
+
- **Generate a Consolidated Todo List** with actionable checkboxes for all issues
|
|
58
59
|
|
|
59
60
|
## Output Format
|
|
60
61
|
|
|
61
|
-
Output your validation results as structured
|
|
62
|
-
|
|
63
|
-
\`\`\`
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
"recommendations": [
|
|
120
|
-
"Fix SQL injection before merging",
|
|
121
|
-
"Update failing tests",
|
|
122
|
-
"Consider adding error handling in API layer"
|
|
123
|
-
],
|
|
124
|
-
"metrics": {
|
|
125
|
-
"testsPassed": "139/142",
|
|
126
|
-
"coverage": "87%",
|
|
127
|
-
"securityScore": 45,
|
|
128
|
-
"codeQualityScore": 85,
|
|
129
|
-
"acceptanceScore": 100,
|
|
130
|
-
"architectureScore": 88
|
|
131
|
-
}
|
|
132
|
-
}
|
|
62
|
+
Output your validation results as a structured Markdown report:
|
|
63
|
+
|
|
64
|
+
\`\`\`markdown
|
|
65
|
+
# Validation Report
|
|
66
|
+
|
|
67
|
+
**Verdict:** Changes Requested / Approved
|
|
68
|
+
**Confidence:** 75%
|
|
69
|
+
**Summary:** Validation found 2 blocking issues that must be addressed
|
|
70
|
+
|
|
71
|
+
## 📊 Metrics
|
|
72
|
+
|
|
73
|
+
- **Tests Passed:** 139/142
|
|
74
|
+
- **Coverage:** 87%
|
|
75
|
+
- **Security Score:** 45/100
|
|
76
|
+
- **Code Quality Score:** 85/100
|
|
77
|
+
- **Acceptance Score:** 100/100
|
|
78
|
+
- **Architecture Score:** 88/100
|
|
79
|
+
|
|
80
|
+
## 🤖 Agent Results
|
|
81
|
+
|
|
82
|
+
| Agent | Status | Summary | Blocking |
|
|
83
|
+
|-------|--------|---------|----------|
|
|
84
|
+
| Review | ✅ Passed | Code quality acceptable with minor suggestions | No |
|
|
85
|
+
| Security | ❌ Failed | SQL injection vulnerability detected | Yes |
|
|
86
|
+
| Acceptance | ✅ Passed | All acceptance criteria met | No |
|
|
87
|
+
| Well-Architected | ✅ Passed | Architecture follows best practices | No |
|
|
88
|
+
|
|
89
|
+
## 🚨 Blocking Issues (Must Fix)
|
|
90
|
+
|
|
91
|
+
- **[ff-security] SQL Injection Vulnerability**
|
|
92
|
+
- *File:* \`lib/database.ts\` (Line 45)
|
|
93
|
+
- *Description:* User input directly concatenated in SQL query
|
|
94
|
+
- *Fix:* Use parameterized queries
|
|
95
|
+
- *Severity:* CRITICAL
|
|
96
|
+
|
|
97
|
+
## ⚠️ Non-Blocking Issues (Should Address)
|
|
98
|
+
|
|
99
|
+
- **[ff-review] Missing Error Handling**
|
|
100
|
+
- *File:* \`lib/api.ts\` (Line 78)
|
|
101
|
+
- *Description:* No error handling in async operation
|
|
102
|
+
- *Suggestion:* Add try-catch around async operation
|
|
103
|
+
- *Severity:* Medium
|
|
104
|
+
|
|
105
|
+
## ✅ Consolidated Todo List
|
|
106
|
+
|
|
107
|
+
### 🔴 Critical - Must Complete Before Merge
|
|
108
|
+
- [ ] Fix SQL injection vulnerability in \`lib/database.ts:45\` - Use parameterized queries
|
|
109
|
+
|
|
110
|
+
### 🟡 High Priority - Should Complete
|
|
111
|
+
- [ ] Add error handling in \`lib/api.ts:78\` - Wrap async operation in try-catch
|
|
112
|
+
|
|
113
|
+
### 📝 Recommendations
|
|
114
|
+
|
|
115
|
+
1. Fix SQL injection before merging
|
|
116
|
+
2. Update failing tests
|
|
117
|
+
3. Consider adding error handling in API layer
|
|
133
118
|
\`\`\`
|
|
134
119
|
|
|
135
120
|
## Approval Criteria
|
|
@@ -170,7 +155,7 @@ export const FFValidatePlugin: Plugin = async () => {
|
|
|
170
155
|
tool: {
|
|
171
156
|
ff_validate: tool({
|
|
172
157
|
description:
|
|
173
|
-
'Orchestrates comprehensive validation by running multiple review agents in parallel',
|
|
158
|
+
'Orchestrates comprehensive validation by running multiple review agents in parallel (@ff-validate), validate changes, comprehensive review',
|
|
174
159
|
args: {
|
|
175
160
|
task: tool.schema.string().describe('The validation task description'),
|
|
176
161
|
},
|
|
@@ -63,80 +63,93 @@ For each pillar, assess:
|
|
|
63
63
|
|
|
64
64
|
## Output Format
|
|
65
65
|
|
|
66
|
-
Output your review as structured
|
|
67
|
-
|
|
68
|
-
\`\`\`
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
66
|
+
Output your review as a structured Markdown report:
|
|
67
|
+
|
|
68
|
+
\`\`\`markdown
|
|
69
|
+
# Well-Architected Review
|
|
70
|
+
|
|
71
|
+
**Overall Score:** 83/100
|
|
72
|
+
**Status:** Approved / Changes Requested
|
|
73
|
+
**Confidence:** 95%
|
|
74
|
+
|
|
75
|
+
**Summary:** Overall assessment of the Well-Architected review
|
|
76
|
+
|
|
77
|
+
## 🏛️ Pillar Reviews
|
|
78
|
+
|
|
79
|
+
### 1️⃣ Operational Excellence (Score: 85)
|
|
80
|
+
|
|
81
|
+
✅ **Strengths:**
|
|
82
|
+
- Uses established patterns
|
|
83
|
+
- Good error handling
|
|
84
|
+
|
|
85
|
+
⚠️ **Findings:**
|
|
86
|
+
- **Missing Monitoring** (Medium Severity)
|
|
87
|
+
- *Description:* Lack of adequate logging and monitoring
|
|
88
|
+
- *Recommendation:* Add structured logging and metrics
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
### 2️⃣ Security (Score: 90)
|
|
93
|
+
|
|
94
|
+
✅ **Strengths:**
|
|
95
|
+
- Proper input validation
|
|
96
|
+
- No hardcoded secrets
|
|
97
|
+
|
|
98
|
+
⚠️ **Findings:** None
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
### 3️⃣ Reliability (Score: 75)
|
|
103
|
+
|
|
104
|
+
✅ **Strengths:**
|
|
105
|
+
- Good error recovery
|
|
106
|
+
|
|
107
|
+
⚠️ **Findings:**
|
|
108
|
+
- **Single Point of Failure** (High Severity)
|
|
109
|
+
- *Description:* No redundancy for critical component
|
|
110
|
+
- *Recommendation:* Implement failover mechanism
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
### 4️⃣ Performance Efficiency (Score: 80)
|
|
115
|
+
|
|
116
|
+
✅ **Strengths:**
|
|
117
|
+
- Proper caching strategy
|
|
118
|
+
|
|
119
|
+
⚠️ **Findings:**
|
|
120
|
+
- **Inefficient Database Query** (Medium Severity)
|
|
121
|
+
- *Description:* N+1 query pattern detected
|
|
122
|
+
- *Recommendation:* Use efficient joining or batch queries
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
### 5️⃣ Cost Optimization (Score: 85)
|
|
127
|
+
|
|
128
|
+
✅ **Strengths:**
|
|
129
|
+
- Appropriate resource sizing
|
|
130
|
+
- No over-provisioning
|
|
131
|
+
|
|
132
|
+
⚠️ **Findings:** None
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### 6️⃣ Sustainability (Score: 70)
|
|
137
|
+
|
|
138
|
+
✅ **Strengths:**
|
|
139
|
+
- Efficient algorithm choice
|
|
140
|
+
|
|
141
|
+
⚠️ **Findings:**
|
|
142
|
+
- **Resource Waste** (Low Severity)
|
|
143
|
+
- *Description:* Unused resources in idle periods
|
|
144
|
+
- *Recommendation:* Implement auto-scaling or sleep mode
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## 📝 Recommendations
|
|
149
|
+
|
|
150
|
+
1. Add comprehensive monitoring and logging
|
|
151
|
+
2. Implement redundancy for critical paths
|
|
152
|
+
3. Optimize database queries for efficiency
|
|
140
153
|
\`\`\`
|
|
141
154
|
|
|
142
155
|
## Severity Levels
|
|
@@ -161,7 +174,8 @@ export const FFWellArchitectedPlugin: Plugin = async () => {
|
|
|
161
174
|
return {
|
|
162
175
|
tool: {
|
|
163
176
|
ff_well_architected: tool({
|
|
164
|
-
description:
|
|
177
|
+
description:
|
|
178
|
+
'Reviews code against AWS Well-Architected Framework pillars (@ff-well-architected), architecture review, AWS best practices',
|
|
165
179
|
args: {
|
|
166
180
|
task: tool.schema
|
|
167
181
|
.string()
|