fraim-framework 2.0.56 → 2.0.58

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.
Files changed (224) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/bin/fraim-mcp.js +14 -0
  3. package/bin/fraim.js +23 -0
  4. package/dist/src/cli/commands/init-project.js +10 -4
  5. package/dist/src/cli/commands/mcp.js +65 -0
  6. package/dist/src/cli/setup/mcp-config-generator.js +19 -16
  7. package/dist/src/fraim/issue-tracking/ado-provider.js +304 -0
  8. package/dist/src/fraim/issue-tracking/factory.js +63 -0
  9. package/dist/src/fraim/issue-tracking/github-provider.js +200 -0
  10. package/dist/src/fraim/issue-tracking/types.js +7 -0
  11. package/dist/src/fraim/issue-tracking-config.js +83 -0
  12. package/dist/src/local-mcp-server/stdio-server.js +207 -0
  13. package/dist/src/utils/workflow-parser.js +81 -0
  14. package/package.json +17 -12
  15. package/registry/scripts/pdf-styles.css +172 -0
  16. package/registry/scripts/prep-issue.sh +46 -4
  17. package/registry/scripts/profile-server.ts +131 -130
  18. package/registry/stubs/workflows/customer-development/user-survey-dispatch.md +1 -1
  19. package/registry/stubs/workflows/customer-development/users-to-target.md +1 -1
  20. package/registry/stubs/workflows/product-building/design.md +1 -1
  21. package/registry/stubs/workflows/product-building/implement.md +1 -1
  22. package/Claude.md +0 -1
  23. package/dist/registry/ai-manager-rules/customer-development-phases/phase1-customer-profiling.md +0 -101
  24. package/dist/registry/ai-manager-rules/customer-development-phases/phase2-platform-discovery.md +0 -235
  25. package/dist/registry/ai-manager-rules/customer-development-phases/phase3-prospect-qualification.md +0 -243
  26. package/dist/registry/ai-manager-rules/customer-development-phases/phase4-inventory-compilation.md +0 -206
  27. package/dist/registry/ai-manager-rules/design-phases/design-completeness-review.md +0 -73
  28. package/dist/registry/ai-manager-rules/design-phases/design-design.md +0 -145
  29. package/dist/registry/ai-manager-rules/implement-phases/implement-code.md +0 -283
  30. package/dist/registry/ai-manager-rules/implement-phases/implement-completeness-review.md +0 -120
  31. package/dist/registry/ai-manager-rules/implement-phases/implement-regression.md +0 -173
  32. package/dist/registry/ai-manager-rules/implement-phases/implement-repro.md +0 -104
  33. package/dist/registry/ai-manager-rules/implement-phases/implement-scoping.md +0 -100
  34. package/dist/registry/ai-manager-rules/implement-phases/implement-smoke.md +0 -237
  35. package/dist/registry/ai-manager-rules/implement-phases/implement-spike.md +0 -121
  36. package/dist/registry/ai-manager-rules/implement-phases/implement-validate.md +0 -375
  37. package/dist/registry/ai-manager-rules/retrospective.md +0 -116
  38. package/dist/registry/ai-manager-rules/shared-phases/address-pr-feedback.md +0 -188
  39. package/dist/registry/ai-manager-rules/shared-phases/submit-pr.md +0 -202
  40. package/dist/registry/ai-manager-rules/shared-phases/wait-for-pr-review.md +0 -170
  41. package/dist/registry/ai-manager-rules/spec-phases/spec-competitor-analysis.md +0 -105
  42. package/dist/registry/ai-manager-rules/spec-phases/spec-completeness-review.md +0 -66
  43. package/dist/registry/ai-manager-rules/spec-phases/spec-spec.md +0 -139
  44. package/dist/registry/ai-manager-rules/user-survey-phases/phase1-survey-scoping.md +0 -60
  45. package/dist/registry/ai-manager-rules/user-survey-phases/phase2-survey-build-linkedin.md +0 -23
  46. package/dist/registry/ai-manager-rules/user-survey-phases/phase3-survey-build-reddit.md +0 -22
  47. package/dist/registry/ai-manager-rules/user-survey-phases/phase4-survey-build-x.md +0 -21
  48. package/dist/registry/ai-manager-rules/user-survey-phases/phase5-survey-build-facebook.md +0 -19
  49. package/dist/registry/ai-manager-rules/user-survey-phases/phase6-survey-build-custom.md +0 -15
  50. package/dist/registry/ai-manager-rules/user-survey-phases/phase7-survey-dispatch.md +0 -45
  51. package/dist/registry/providers/ado.json +0 -19
  52. package/dist/registry/providers/github.json +0 -19
  53. package/dist/registry/scripts/cleanup-branch.js +0 -287
  54. package/dist/registry/scripts/evaluate-code-quality.js +0 -66
  55. package/dist/registry/scripts/exec-with-timeout.js +0 -142
  56. package/dist/registry/scripts/generate-engagement-emails.js +0 -705
  57. package/dist/registry/scripts/newsletter-helpers.js +0 -671
  58. package/dist/registry/scripts/profile-server.js +0 -388
  59. package/dist/registry/scripts/run-thank-you-workflow.js +0 -92
  60. package/dist/registry/scripts/send-newsletter-simple.js +0 -85
  61. package/dist/registry/scripts/send-thank-you-emails.js +0 -54
  62. package/dist/registry/scripts/validate-openapi-limits.js +0 -311
  63. package/dist/registry/scripts/validate-test-coverage.js +0 -262
  64. package/dist/registry/scripts/verify-test-coverage.js +0 -66
  65. package/dist/registry/templates/bootstrap/ARCHITECTURE-TEMPLATE.md +0 -53
  66. package/dist/registry/templates/bootstrap/CODE-QUALITY-REPORT-TEMPLATE.md +0 -37
  67. package/dist/registry/templates/bootstrap/TEST-COVERAGE-REPORT-TEMPLATE.md +0 -35
  68. package/dist/registry/templates/business-development/IDEATION-REPORT-TEMPLATE.md +0 -29
  69. package/dist/registry/templates/business-development/PRICING-STRATEGY-TEMPLATE.md +0 -126
  70. package/dist/registry/templates/customer-development/customer-interview-template.md +0 -99
  71. package/dist/registry/templates/customer-development/customer-persona-template.md +0 -69
  72. package/dist/registry/templates/customer-development/follow-up-email-templates.md +0 -132
  73. package/dist/registry/templates/customer-development/insight-analysis-template.md +0 -74
  74. package/dist/registry/templates/customer-development/prospect-inventory-template.csv +0 -3
  75. package/dist/registry/templates/customer-development/search-strategy-template.md +0 -123
  76. package/dist/registry/templates/customer-development/strategic-recommendations-template.md +0 -53
  77. package/dist/registry/templates/customer-development/thank-you-email-template.html +0 -124
  78. package/dist/registry/templates/customer-development/thank-you-note-template.md +0 -16
  79. package/dist/registry/templates/customer-development/triage-log-template.md +0 -278
  80. package/dist/registry/templates/customer-development/weekly-newsletter-template.html +0 -204
  81. package/dist/registry/templates/evidence/Design-Evidence.md +0 -30
  82. package/dist/registry/templates/evidence/Implementation-BugEvidence.md +0 -94
  83. package/dist/registry/templates/evidence/Implementation-FeatureEvidence.md +0 -129
  84. package/dist/registry/templates/evidence/Spec-Evidence.md +0 -19
  85. package/dist/registry/templates/help/HelpNeeded.md +0 -14
  86. package/dist/registry/templates/legal/NDA-TEMPLATE.md +0 -170
  87. package/dist/registry/templates/legal/PATENT-TEMPLATE.md +0 -372
  88. package/dist/registry/templates/legal/TRADEMARK-TEMPLATE.md +0 -339
  89. package/dist/registry/templates/legal/contract-review-checklist.md +0 -193
  90. package/dist/registry/templates/legal/review-report-template.md +0 -198
  91. package/dist/registry/templates/legal/saas-terms-template.md +0 -174
  92. package/dist/registry/templates/legal/sow-template.md +0 -117
  93. package/dist/registry/templates/legal/template-variables.md +0 -131
  94. package/dist/registry/templates/marketing/DOMAIN-REGISTRATION-TEMPLATE.md +0 -194
  95. package/dist/registry/templates/marketing/HBR-ARTICLE-TEMPLATE.md +0 -66
  96. package/dist/registry/templates/marketing/STORYTELLING-TEMPLATE.md +0 -130
  97. package/dist/registry/templates/marketing/WEBSITE-TEMPLATE.md +0 -262
  98. package/dist/registry/templates/marketing/github-pages-workflow.yml +0 -64
  99. package/dist/registry/templates/replicate/implementation-checklist.md +0 -39
  100. package/dist/registry/templates/replicate/use-cases-template.md +0 -88
  101. package/dist/registry/templates/retrospective/RETROSPECTIVE-TEMPLATE.md +0 -55
  102. package/dist/registry/templates/specs/BUGSPEC-TEMPLATE.md +0 -37
  103. package/dist/registry/templates/specs/FEATURESPEC-TEMPLATE.md +0 -66
  104. package/dist/registry/templates/specs/TECHSPEC-TEMPLATE.md +0 -39
  105. package/dist/registry/workflows/bootstrap/create-architecture.md +0 -38
  106. package/dist/registry/workflows/bootstrap/detect-broken-windows.md +0 -300
  107. package/dist/registry/workflows/bootstrap/evaluate-code-quality.md +0 -35
  108. package/dist/registry/workflows/bootstrap/verify-test-coverage.md +0 -36
  109. package/dist/registry/workflows/brainstorming/blue-sky-brainstorming.md +0 -211
  110. package/dist/registry/workflows/brainstorming/codebase-brainstorming.md +0 -165
  111. package/dist/registry/workflows/business-development/create-business-plan.md +0 -737
  112. package/dist/registry/workflows/business-development/ideate-business-opportunity.md +0 -55
  113. package/dist/registry/workflows/business-development/price-product.md +0 -325
  114. package/dist/registry/workflows/compliance/detect-compliance-requirements.md +0 -78
  115. package/dist/registry/workflows/compliance/generate-audit-evidence.md +0 -75
  116. package/dist/registry/workflows/compliance/soc2-evidence-generator.md +0 -332
  117. package/dist/registry/workflows/customer-development/insight-analysis.md +0 -156
  118. package/dist/registry/workflows/customer-development/insight-triage.md +0 -938
  119. package/dist/registry/workflows/customer-development/interview-preparation.md +0 -452
  120. package/dist/registry/workflows/customer-development/linkedin-outreach.md +0 -593
  121. package/dist/registry/workflows/customer-development/strategic-brainstorming.md +0 -146
  122. package/dist/registry/workflows/customer-development/thank-customers.md +0 -203
  123. package/dist/registry/workflows/customer-development/user-survey-dispatch.md +0 -60
  124. package/dist/registry/workflows/customer-development/users-to-target.md +0 -112
  125. package/dist/registry/workflows/customer-development/weekly-newsletter.md +0 -366
  126. package/dist/registry/workflows/deploy/cloud-deployment.md +0 -310
  127. package/dist/registry/workflows/improve-fraim/contribute.md +0 -32
  128. package/dist/registry/workflows/improve-fraim/file-issue.md +0 -32
  129. package/dist/registry/workflows/learning/build-skillset.md +0 -212
  130. package/dist/registry/workflows/learning/synthesize-learnings.md +0 -284
  131. package/dist/registry/workflows/legal/contract-review-analysis.md +0 -382
  132. package/dist/registry/workflows/legal/nda.md +0 -69
  133. package/dist/registry/workflows/legal/patent-filing.md +0 -76
  134. package/dist/registry/workflows/legal/saas-contract-development.md +0 -213
  135. package/dist/registry/workflows/legal/trademark-filing.md +0 -77
  136. package/dist/registry/workflows/marketing/content-creation.md +0 -37
  137. package/dist/registry/workflows/marketing/convert-to-pdf.md +0 -235
  138. package/dist/registry/workflows/marketing/create-modern-website.md +0 -456
  139. package/dist/registry/workflows/marketing/domain-registration.md +0 -323
  140. package/dist/registry/workflows/marketing/hbr-article.md +0 -73
  141. package/dist/registry/workflows/marketing/launch-checklist.md +0 -37
  142. package/dist/registry/workflows/marketing/marketing-strategy.md +0 -45
  143. package/dist/registry/workflows/marketing/storytelling.md +0 -65
  144. package/dist/registry/workflows/performance/analyze-performance.md +0 -65
  145. package/dist/registry/workflows/product-building/design.md +0 -103
  146. package/dist/registry/workflows/product-building/implement.md +0 -74
  147. package/dist/registry/workflows/product-building/iterate-on-pr-comments.md +0 -70
  148. package/dist/registry/workflows/product-building/prep-issue.md +0 -41
  149. package/dist/registry/workflows/product-building/prototype.md +0 -65
  150. package/dist/registry/workflows/product-building/resolve.md +0 -168
  151. package/dist/registry/workflows/product-building/retrospect.md +0 -86
  152. package/dist/registry/workflows/product-building/spec.md +0 -181
  153. package/dist/registry/workflows/product-building/test.md +0 -125
  154. package/dist/registry/workflows/productivity-report/productivity-report.md +0 -263
  155. package/dist/registry/workflows/quality-assurance/browser-validation.md +0 -221
  156. package/dist/registry/workflows/quality-assurance/iterative-improvement-cycle.md +0 -562
  157. package/dist/registry/workflows/replicate/replicate-discovery.md +0 -336
  158. package/dist/registry/workflows/replicate/replicate-to-issues.md +0 -324
  159. package/dist/registry/workflows/reviewer/review-implementation-vs-design-spec.md +0 -638
  160. package/dist/registry/workflows/reviewer/review-implementation-vs-feature-spec.md +0 -675
  161. package/dist/registry/workflows/startup-credits/aws-activate-application.md +0 -535
  162. package/dist/registry/workflows/startup-credits/google-cloud-application.md +0 -647
  163. package/dist/registry/workflows/startup-credits/microsoft-azure-application.md +0 -538
  164. package/dist/scripts/build-stub-registry.js +0 -108
  165. package/dist/src/ai-manager/ai-manager.js +0 -480
  166. package/dist/src/ai-manager/phase-flow.js +0 -357
  167. package/dist/src/ai-manager/types.js +0 -5
  168. package/dist/src/fraim-mcp-server.js +0 -1885
  169. package/dist/tests/debug-tools.js +0 -80
  170. package/dist/tests/shared-server-utils.js +0 -57
  171. package/dist/tests/test-add-ide.js +0 -283
  172. package/dist/tests/test-ai-coach-edge-cases.js +0 -420
  173. package/dist/tests/test-ai-coach-mcp-integration.js +0 -450
  174. package/dist/tests/test-ai-coach-performance.js +0 -328
  175. package/dist/tests/test-ai-coach-phase-content.js +0 -264
  176. package/dist/tests/test-ai-coach-workflows.js +0 -514
  177. package/dist/tests/test-cli.js +0 -228
  178. package/dist/tests/test-client-scripts-validation.js +0 -167
  179. package/dist/tests/test-complete-setup-flow.js +0 -110
  180. package/dist/tests/test-config-system.js +0 -279
  181. package/dist/tests/test-debug-session.js +0 -134
  182. package/dist/tests/test-end-to-end-hybrid-validation.js +0 -328
  183. package/dist/tests/test-enhanced-session-init.js +0 -188
  184. package/dist/tests/test-first-run-journey.js +0 -368
  185. package/dist/tests/test-fraim-issues.js +0 -59
  186. package/dist/tests/test-genericization.js +0 -44
  187. package/dist/tests/test-hybrid-script-execution.js +0 -340
  188. package/dist/tests/test-ide-detector.js +0 -46
  189. package/dist/tests/test-improved-setup.js +0 -121
  190. package/dist/tests/test-mcp-config-generator.js +0 -99
  191. package/dist/tests/test-mcp-connection.js +0 -107
  192. package/dist/tests/test-mcp-issue-integration.js +0 -156
  193. package/dist/tests/test-mcp-lifecycle-methods.js +0 -240
  194. package/dist/tests/test-mcp-shared-server.js +0 -308
  195. package/dist/tests/test-mcp-template-processing.js +0 -160
  196. package/dist/tests/test-modular-issue-tracking.js +0 -165
  197. package/dist/tests/test-node-compatibility.js +0 -95
  198. package/dist/tests/test-npm-install.js +0 -68
  199. package/dist/tests/test-package-size.js +0 -108
  200. package/dist/tests/test-pr-review-workflow.js +0 -307
  201. package/dist/tests/test-prep-issue.js +0 -129
  202. package/dist/tests/test-productivity-integration.js +0 -157
  203. package/dist/tests/test-script-location-independence.js +0 -198
  204. package/dist/tests/test-script-sync.js +0 -557
  205. package/dist/tests/test-server-utils.js +0 -32
  206. package/dist/tests/test-session-rehydration.js +0 -148
  207. package/dist/tests/test-setup-integration.js +0 -98
  208. package/dist/tests/test-setup-scenarios.js +0 -322
  209. package/dist/tests/test-standalone.js +0 -143
  210. package/dist/tests/test-stub-registry.js +0 -136
  211. package/dist/tests/test-sync-stubs.js +0 -143
  212. package/dist/tests/test-sync-version-update.js +0 -93
  213. package/dist/tests/test-telemetry.js +0 -193
  214. package/dist/tests/test-token-validator.js +0 -30
  215. package/dist/tests/test-user-journey.js +0 -236
  216. package/dist/tests/test-users-to-target-workflow.js +0 -253
  217. package/dist/tests/test-utils.js +0 -109
  218. package/dist/tests/test-wizard.js +0 -71
  219. package/dist/tests/test-workflow-discovery.js +0 -242
  220. package/labels.json +0 -52
  221. package/registry/agent-guardrails.md +0 -63
  222. package/registry/fraim.md +0 -48
  223. package/setup.js +0 -171
  224. package/tsconfig.json +0 -23
@@ -1,202 +0,0 @@
1
- # Phase: submit-pr
2
-
3
- ## INTENT
4
- To submit completed work for review by creating/updating PR, setting proper labels, and documenting evidence.
5
-
6
- ## OUTCOME
7
- Work is submitted for review with:
8
- - PR created/updated with work
9
- - Proper issue labels applied
10
- - Evidence documented
11
- - Ready to enter PR review phase
12
-
13
- ## PRINCIPLES
14
- - **Complete Documentation**: Evidence shows all work done
15
- - **Proper Labels**: Issue status reflects PR submission
16
- - **Clear Communication**: PR and evidence are clear
17
- - **Ready for Review**: No blockers for PR review process
18
-
19
- ## RULES FOR THIS PHASE
20
-
21
- ### Success Criteria
22
- Read `registry/rules/agent-success-criteria.md` via `get_fraim_file` for the complete framework. Focus on:
23
- - **Integrity** (honest documentation of all work completed)
24
- - **Completeness** (all finalization steps completed)
25
-
26
- ### Simplicity Principles
27
- Read `registry/rules/simplicity.md` via `get_fraim_file` for complete guidelines. Key for finalization:
28
- - **Focus on the assigned issue only** - document only relevant work
29
- - **Clear communication** - evidence should be easy to understand
30
-
31
- ### Git Operations (if needed)
32
- When using git commands directly (if MCP tools unavailable), read `rules/git-safe-commands.md` via `get_fraim_file` to avoid interactive commands that hang agents.
33
-
34
- ## WORKFLOW
35
-
36
- ### Step 1: Create Evidence Document
37
-
38
- **File location:**
39
- ```
40
- docs/evidence/{issue_number}-{workflow_type}-evidence.md
41
- ```
42
-
43
- **Evidence document should include:**
44
-
45
- #### Summary
46
- - Issue number and title
47
- - Workflow type (spec, design, implement, test)
48
- - Brief description of work completed
49
-
50
- #### Work Completed
51
- **For Spec Workflow:**
52
- - Specification document created
53
- - High-fidelity HTML mocks (if UI changes)
54
- - Requirements coverage
55
-
56
- **For Design Workflow:**
57
- - Technical design document
58
- - Architecture decisions
59
- - API specifications
60
- - Database schema (if applicable)
61
-
62
- **For Implement Workflow:**
63
- - Implementation details
64
- - Key files changed
65
- - Approach taken
66
- - Testing completed
67
-
68
- **For Test Workflow:**
69
- - Test suite created/enhanced
70
- - Coverage metrics
71
- - Test results
72
-
73
- #### PR Feedback History (if applicable)
74
- **CRITICAL**: If PR feedback file exists (`docs/evidence/{issue_number}-{workflow_type}-feedback.md`), include its complete contents in the evidence document under this section.
75
-
76
- This shows reviewers:
77
- - All previous feedback received
78
- - How each item was addressed
79
- - Complete audit trail of review iterations
80
-
81
- #### Validation
82
- - How work was validated
83
- - Validation results
84
- - Screenshots/output (if applicable)
85
-
86
- #### Quality Checks
87
- - All deliverables complete
88
- - Documentation clear and professional
89
- - Work ready for next phase or review
90
-
91
- #### Phase Completion
92
- - All phases completed for this workflow
93
- - Evidence from each phase
94
- - Any iterations or challenges
95
-
96
- ### Step 2: Commit and Sync Work
97
-
98
- **Commit all changes:**
99
- - Stage all modified files
100
- - Create commit with descriptive message
101
- - Push to feature branch
102
-
103
- **Commit message format:**
104
- ```
105
- {workflow_type}({issue_number}): complete {phase_name} phase
106
-
107
- - Evidence document created
108
- - All deliverables complete
109
- - Ready for review
110
- ```
111
-
112
- ### Step 3: Verify PR Exists
113
-
114
- **Verify PR:**
115
- - PR exists for the feature branch
116
- - PR title reflects the issue and workflow
117
- - PR description includes context and links to deliverables
118
-
119
- **If PR doesn't exist:**
120
- - Create PR manually
121
- - Link to issue
122
- - Add evidence document link
123
-
124
- ### Step 4: Add PR Comment
125
-
126
- Add comment to PR with link to evidence:
127
- ```
128
- {Workflow_type} workflow complete. Evidence document: docs/evidence/{issue_number}-{workflow_type}-evidence.md
129
-
130
- All phases completed:
131
- {workflow_specific_phases_checklist}
132
-
133
- **PR Feedback History**:
134
- {If feedback file exists, include: "This submission addresses all feedback from previous review rounds. See evidence document for complete feedback history and resolutions."}
135
-
136
- Ready for human review.
137
- ```
138
-
139
- ### Step 5: Update Issue Labels
140
-
141
- **Remove:**
142
- - `status:wip`
143
-
144
- **Add:**
145
- - `status:needs-review`
146
-
147
- **Keep:**
148
- - Current phase label (e.g., `phase:spec`, `phase:design`, `phase:impl`) to indicate which phase is in PR
149
-
150
- **GitHub Repository Context:**
151
- Read `.fraim/config.json` for:
152
- - `git.repoOwner` - GitHub repository owner
153
- - `git.repoName` - GitHub repository name
154
-
155
- Use GitHub MCP tools to update labels.
156
-
157
- ### Step 6: Final Verification
158
-
159
- **Checklist:**
160
- - ✅ Issue labels updated (kept phase label, added needs-review)
161
- - ✅ Evidence document created and complete
162
- - ✅ All work committed and pushed to feature branch
163
- - ✅ PR exists and is ready
164
- - ✅ PR comment added with evidence link
165
- - ✅ All deliverables complete
166
- - ✅ Git status clean
167
-
168
- ## VALIDATION
169
-
170
- ### Phase Complete When:
171
- - ✅ Issue has `status:needs-review` label
172
- - ✅ Issue keeps current phase label to indicate what needs review
173
- - ✅ Evidence document exists and is complete
174
- - ✅ All work committed and synced to remote
175
- - ✅ PR exists and is ready for review
176
- - ✅ PR has comment linking to evidence
177
- - ✅ All previous phases complete
178
-
179
- ### Phase Incomplete If:
180
- - ❌ Labels not updated correctly
181
- - ❌ Evidence document missing or incomplete
182
- - ❌ Work not committed and synced
183
- - ❌ PR not ready
184
- - ❌ Previous phases not complete
185
-
186
- ### Report Back:
187
- ```javascript
188
- seekCoachingOnNextStep({
189
- workflowType: "{workflow_type}",
190
- issueNumber: "{issue_number}",
191
- currentPhase: "submit-pr",
192
- status: "complete",
193
- evidence: {
194
- labelsUpdated: "Issue has status:needs-review and keeps phase label",
195
- evidenceDocument: "docs/evidence/{issue_number}-{workflow_type}-evidence.md created",
196
- workCommitted: "All changes committed and pushed to feature branch",
197
- prStatus: "PR ready for review",
198
- prComment: "PR comment added with evidence link",
199
- allPhasesComplete: "All {workflow_type} phases completed successfully"
200
- }
201
- })
202
- ```
@@ -1,170 +0,0 @@
1
- # Phase: wait-for-pr-review
2
-
3
- ## INTENT
4
- Wait for human instruction to check PR status, then evaluate if PR is ready for merge or needs more work.
5
-
6
- ## OUTCOME
7
- Either:
8
- - **PR Approved**: Workflow complete, ready for merge
9
- - **PR Has Comments**: Write feedback file and return to workflow to address feedback
10
-
11
- ## RULES FOR THIS PHASE
12
-
13
- ### Success Criteria
14
- Read `registry/rules/agent-success-criteria.md` via `get_fraim_file` for the complete framework.
15
-
16
- ## WORKFLOW
17
-
18
- ### Step 1: Wait for Human Instruction
19
-
20
- **Your task is to wait for human instruction.** Do not automatically poll or check PR status.
21
-
22
- When human says "check the PR" or "proceed", move to Step 2.
23
-
24
- ### Step 2: Check PR Status and Comments
25
-
26
- Use GitHub MCP tools to check the PR comprehensively:
27
-
28
- 1. **Get PR Status**: Use `mcp_github_pull_request_read` with method `get` to check if PR is approved
29
- 2. **Get All Comment Types**:
30
- - **PR-level comments**: Use method `get_comments`
31
- - **Review comments**: Use method `get_review_comments` (inline/detailed comments)
32
- - **Review status**: Use method `get_reviews` (approval/changes requested)
33
-
34
- ### Step 3: Evaluate Results and Write Feedback File
35
-
36
- **If PR status shows "approved" AND no unresolved comments:**
37
- - PR is ready for merge
38
- - Report success
39
-
40
- **If PR has ANY comments OR is not approved:**
41
- - PR needs more work
42
- - **CRITICAL**: Write feedback file to `docs/evidence/{issueNumber}-{workflowType}-feedback.md`
43
- - Use Round X format (check existing file to determine next round number)
44
- - Report failure with feedback file path
45
-
46
- ## FEEDBACK FILE FORMAT
47
-
48
- Create or append to `docs/evidence/{issueNumber}-{workflowType}-feedback.md`:
49
-
50
- ```markdown
51
- # PR Feedback for Issue #{issueNumber} - {WorkflowType} Workflow
52
-
53
- ## Round {X} Feedback
54
- *Received: {timestamp}*
55
-
56
- ### Comment {N} - UNADDRESSED
57
- - **Author**: {author}
58
- - **Type**: {pr_comment|review_comment|review}
59
- - **File**: {file_path} (if applicable)
60
- - **Line**: {line_number} (if applicable)
61
- - **Comment**: {comment_body}
62
- - **Status**: UNADDRESSED
63
- ```
64
-
65
- **Round Detection Logic**:
66
- 1. If feedback file doesn't exist → Start with "Round 1"
67
- 2. If feedback file exists → Parse to find highest "Round X", use "Round X+1"
68
- 3. Always append new round, never overwrite existing rounds
69
-
70
- ## VALIDATION
71
-
72
- ### Phase Complete When:
73
- - ✅ PR status is "approved" in GitHub
74
- - ✅ No unresolved comment threads exist
75
- - ✅ No pending review comments
76
-
77
- **Report back with:**
78
- ```javascript
79
- seekCoachingOnNextStep({
80
- workflowType: "{workflow_type}",
81
- issueNumber: "{issue_number}",
82
- currentPhase: "wait-for-pr-review",
83
- status: "complete",
84
- evidence: {
85
- prStatus: "approved",
86
- commentsResolved: true,
87
- readyForMerge: true
88
- }
89
- })
90
- ```
91
-
92
- ### Phase Failed When:
93
- - ✅ PR has unresolved comments
94
- - ✅ PR status is not "approved"
95
- - ✅ Review requests changes
96
-
97
- ### Report Back:
98
-
99
- **When PR is approved and ready:**
100
- ```javascript
101
- seekCoachingOnNextStep({
102
- workflowType: "{workflow_type}",
103
- issueNumber: "{issue_number}",
104
- currentPhase: "wait-for-pr-review",
105
- status: "complete",
106
- evidence: {
107
- prStatus: "approved",
108
- commentsResolved: true,
109
- readyForMerge: true
110
- }
111
- })
112
- ```
113
-
114
- **When PR has comments (CRITICAL: Write feedback file first):**
115
- ```javascript
116
- seekCoachingOnNextStep({
117
- workflowType: "{workflow_type}",
118
- issueNumber: "{issue_number}",
119
- currentPhase: "wait-for-pr-review",
120
- status: "failure",
121
- findings: {
122
- feedbackFile: "{issueNumber}-{workflowType}-feedback.md",
123
- roundNumber: {X},
124
- commentCount: {total_comments},
125
- prStatus: "{current_status}"
126
- }
127
- })
128
- ```
129
-
130
- ## GITHUB MCP TOOLS TO USE
131
-
132
- 1. **Check PR Status**:
133
- ```javascript
134
- mcp_github_pull_request_read({
135
- method: "get",
136
- owner: "{repo_owner}",
137
- repo: "{repo_name}",
138
- pullNumber: {pr_number}
139
- })
140
- ```
141
-
142
- 2. **Get PR Comments**:
143
- ```javascript
144
- mcp_github_pull_request_read({
145
- method: "get_comments",
146
- owner: "{repo_owner}",
147
- repo: "{repo_name}",
148
- pullNumber: {pr_number}
149
- })
150
- ```
151
-
152
- 3. **Get Review Comments**:
153
- ```javascript
154
- mcp_github_pull_request_read({
155
- method: "get_review_comments",
156
- owner: "{repo_owner}",
157
- repo: "{repo_name}",
158
- pullNumber: {pr_number}
159
- })
160
- ```
161
-
162
- 4. **Get Reviews**:
163
- ```javascript
164
- mcp_github_pull_request_read({
165
- method: "get_reviews",
166
- owner: "{repo_owner}",
167
- repo: "{repo_name}",
168
- pullNumber: {pr_number}
169
- })
170
- ```
@@ -1,105 +0,0 @@
1
- # Phase: spec-competitor-analysis
2
-
3
- ## INTENT
4
- To conduct systematic competitive research and analysis for the feature being specified, ensuring comprehensive understanding of competitive landscape and clear differentiation strategy.
5
-
6
- ## OUTCOME
7
- A comprehensive competitive analysis that:
8
- - Documents all configured competitors and their approaches
9
- - Identifies new competitors through systematic research
10
- - Proposes configuration updates with user approval
11
- - Defines clear differentiation strategy and competitive positioning
12
- - Updates the specification with complete competitive landscape analysis
13
-
14
- ## TRIGGER
15
- This phase is triggered after `spec-spec` completion and before `spec-completeness-review`.
16
-
17
- ## CONTEXT ADVANTAGES
18
- - **Full Feature Context**: Complete understanding of proposed feature and requirements
19
- - **Fresh Research**: Current competitive landscape information
20
- - **Strategic Positioning**: Ability to influence feature design based on competitive insights
21
- - **Configuration-Driven**: Systematic analysis of known competitors plus discovery of new ones
22
-
23
- ## WORKFLOW
24
-
25
- ### Step 1: Load Competitor Configuration
26
- - Read `.fraim/config.json` competitors section
27
- - Extract configured competitors and their competitive spaces
28
- - Note any existing competitive intelligence
29
-
30
- ### Step 2: Research Configured Competitors
31
- For each competitor in config:
32
- - Research their current solution for this feature area
33
- - Analyze their strengths and weaknesses in this space
34
- - Gather customer feedback and reviews
35
- - Assess market position and pricing approach
36
- - Document findings in structured format
37
-
38
- ### Step 3: Discover Additional Competitors
39
- - Use web search to find other competitors in the feature space
40
- - Research market for competitors not in configuration
41
- - Identify direct, adjacent, and emerging competitors
42
- - Focus on competitors specifically relevant to this feature
43
-
44
- ### Step 4: Competitor Configuration Updates
45
- - **Identify New Competitors**: Present newly discovered competitors to user
46
- - **Configuration Proposal**: Suggest adding relevant competitors to `.fraim/config.json`
47
- - **User Approval**: Ask user to approve additions: "Found new competitor 'X' in space 'Y'. Add to config?"
48
- - **Auto-Update**: If user approves, automatically update configuration file
49
- - **Documentation**: Note configuration changes in competitive analysis
50
-
51
- ### Step 5: Competitive Analysis
52
- - Compare competitor approaches to our proposed solution
53
- - Identify competitive advantages and disadvantages
54
- - Develop differentiation strategy
55
- - Plan competitive response strategies
56
- - Define market positioning approach
57
-
58
- ### Step 6: Update Specification
59
- - Update Competitive Landscape section with findings
60
- - Ensure all configured competitors are covered
61
- - Include newly discovered competitors
62
- - Add competitive positioning strategy
63
- - Document research sources and methodology
64
- - Validate analysis completeness
65
-
66
- ## VALIDATION
67
-
68
- ### Phase Complete When:
69
- - ✅ All configured competitors analyzed
70
- - ✅ Additional competitors discovered through research
71
- - ✅ User consulted on adding new competitors to config
72
- - ✅ Configuration updated with user-approved competitors
73
- - ✅ Competitive positioning strategy defined
74
- - ✅ Differentiation advantages clearly articulated
75
- - ✅ Research sources documented
76
- - ✅ Analysis covers both configured and discovered competitors
77
- - ✅ Specification competitive landscape section updated
78
-
79
- ### Report Back:
80
- When this phase is complete, call:
81
- ```javascript
82
- seekCoachingOnNextStep({
83
- workflowType: "spec",
84
- issueNumber: "your-issue-number",
85
- currentPhase: "spec-competitor-analysis",
86
- status: "complete",
87
- evidence: {
88
- competitorsAnalyzed: ["competitor1", "competitor2"],
89
- newCompetitorsFound: ["new-competitor1"],
90
- configurationUpdated: true,
91
- differentiationStrategy: "summary of strategy",
92
- specificationUpdated: true
93
- }
94
- })
95
- ```
96
-
97
- ### Phase Incomplete If:
98
- - Configuration competitors not fully researched
99
- - No additional competitor discovery attempted
100
- - User not consulted on configuration updates
101
- - Competitive positioning strategy missing
102
- - Specification not updated with findings
103
-
104
- ## NEXT PHASE
105
- After completing competitor-analysis, proceed to `spec-completeness-review` phase.
@@ -1,66 +0,0 @@
1
- # Phase: Spec-Completeness-Review
2
-
3
- ## INTENT
4
- To verify that the specification is complete and includes high-fidelity HTML mocks when UI changes are involved.
5
-
6
- ## OUTCOME
7
- Confirmation that:
8
- - Specification document is complete and follows template
9
- - High-fidelity HTML mocks exist for UI changes (not markdown code blocks)
10
- - Mocks are accessible and render properly in browser
11
- - All requirements from original issue are addressed
12
-
13
- ## WORKFLOW
14
-
15
- ### Step 1: Check Specification Completeness
16
- - Verify spec document exists at `docs/feature specs/{issue_number}-*.md`
17
- - Confirm all template sections are complete (not placeholder text)
18
- - Check that customer, desired outcome, and user experience are well-defined
19
-
20
- ### Step 2: Validate Mocks (if UI changes)
21
- **If the feature involves UI changes:**
22
- - Check that HTML mock files exist in `docs/feature specs/mocks/`
23
- - Verify mocks are named `{issue_number}-*.html`
24
- - Confirm mocks are actual HTML files (not markdown code blocks)
25
- - **Ask agent to open mocks in browser** to verify they render properly
26
- - Check that mocks show different states/views of the feature
27
-
28
- **If no UI changes:**
29
- - Confirm this is documented in the spec
30
- - Verify the feature is purely backend/API
31
-
32
- ### Step 3: Requirements Coverage
33
- - Review original GitHub issue requirements
34
- - Confirm all requirements are addressed in the specification
35
- - Check that acceptance criteria are covered
36
-
37
- ## VALIDATION
38
-
39
- ### Phase Complete When:
40
- - ✅ Specification document complete and professional quality
41
- - ✅ High-fidelity HTML mocks created (if UI changes required)
42
- - ✅ Agent has opened mocks in browser and confirmed they render
43
- - ✅ All original issue requirements addressed
44
- - ✅ Ready for design phase
45
-
46
- ### Phase Incomplete If:
47
- - ❌ Specification incomplete or poor quality
48
- - ❌ UI changes specified but no HTML mocks provided
49
- - ❌ Mocks don't render properly in browser
50
- - ❌ Original requirements not fully addressed
51
-
52
- ### Report Back:
53
- ```javascript
54
- seekCoachingOnNextStep({
55
- workflowType: "spec",
56
- issueNumber: "{issue_number}",
57
- currentPhase: "spec-completeness-review",
58
- status: "complete",
59
- evidence: {
60
- specComplete: true,
61
- mockFilesCreated: ["docs/feature specs/mocks/21-view1.html", "21-view2.html"],
62
- browserValidated: true,
63
- requirementsCovered: true
64
- }
65
- })
66
- ```
@@ -1,139 +0,0 @@
1
- # Phase: Spec-Spec
2
-
3
- ## INTENT
4
- To create a comprehensive feature specification that clearly defines customer needs, desired outcomes, user experience, and validation criteria.
5
-
6
- ## OUTCOME
7
- A complete specification document that:
8
- - Identifies the target customer and their needs
9
- - Defines the desired outcome and success criteria
10
- - Describes the user experience in detail
11
- - Includes high-fidelity mocks for UI changes
12
- - Provides a comprehensive validation plan
13
- - Analyzes alternatives and competitive landscape
14
-
15
- ## PRINCIPLES
16
- - **Customer-First**: Start with customer identification and needs
17
- - **Outcome-Driven**: Focus on what the customer wants to achieve
18
- - **Experience-Detailed**: Provide step-by-step user workflows
19
- - **Validation-Ready**: Include specific, executable validation steps
20
- - **Template-Compliant**: Follow FEATURESPEC template structure
21
-
22
- ## WORKFLOW
23
-
24
- ### Step 1: Get Repository Context and Issue Details
25
-
26
- **GitHub Repository Context**: Before using GitHub MCP tools, read the local `.fraim/config.json` file to get the repository context:
27
- - Use `git.repoOwner` for the GitHub repository owner
28
- - Use `git.repoName` for the GitHub repository name
29
- - These values are required for GitHub MCP API calls (owner/repo parameters)
30
-
31
- **Read Issue Details**: Use GitHub MCP tools to get the complete issue information:
32
- - Read the full issue description, title, and labels
33
- - Check for linked documents or references
34
- - Review any comments or discussion threads
35
- - Note any existing requirements or context
36
- - Understand the customer problem being addressed
37
-
38
- ### Step 2: Load Template and Rules
39
- - Call `get_fraim_file({ path: "templates/specs/FEATURESPEC-TEMPLATE.md" })`
40
- - Call `get_fraim_file({ path: "rules/communication.md" })`
41
- - Call `get_fraim_file({ path: "rules/pr-workflow-completeness.md" })`
42
-
43
- ### Step 3: Check for PR Feedback
44
-
45
- **CRITICAL**: Before creating specification, check for feedback:
46
- - **PR Review Feedback**: `docs/evidence/{issue_number}-spec-feedback.md`
47
-
48
- **If PR feedback exists:**
49
- - **MUST address all UNADDRESSED items** before proceeding
50
- - Update feedback file after addressing each item
51
- - Change status from UNADDRESSED to ADDRESSED with resolution details
52
- - Cannot skip or defer feedback items
53
- - Phase cannot complete until all feedback is addressed
54
-
55
- **PR Feedback File Format** (if exists):
56
- ```markdown
57
- ### Comment X - ADDRESSED
58
- - **Author**: reviewer_name
59
- - **Comment**: Original feedback
60
- - **Status**: ADDRESSED
61
- - **Resolution**: How you addressed this feedback
62
- ```
63
-
64
- ### Step 4: Create Specification Document
65
- - Create spec file at `docs/feature specs/{issue_number}-{kebab-case-title}.md`
66
- - Follow FEATURESPEC template structure exactly
67
- - Include all required sections:
68
- - Customer identification
69
- - Customer's desired outcome
70
- - Customer problem definition
71
- - User experience with detailed workflows
72
- - Validation plan
73
- - Alternatives analysis
74
- - Competitive landscape
75
-
76
- ### Step 4: Create High-Fidelity Mocks (if UI changes)
77
- If the feature involves UI changes:
78
- - Create HTML/CSS mocks in `docs/feature specs/mocks/`
79
- - Name files: `{issue_number}-{descriptive-name}.html`
80
- - Include at least 3 different views/states
81
- - Link mocks in the specification document
82
- - **Note**: Markdown code blocks are NOT sufficient - must be actual HTML files
83
-
84
- ### Step 5: Validate Completeness
85
- - Ensure all template sections are complete
86
- - Verify customer focus is clear and specific
87
- - Check that user experience includes step-by-step workflows
88
- - Confirm validation plan is actionable and executable
89
- - Review alternatives and competitive analysis
90
-
91
- ### Step 6: Apply Labels
92
- - Label the GitHub issue with `phase:spec`
93
- - This will trigger automatic PR creation/update
94
-
95
- ## VALIDATION
96
-
97
- ### Phase Complete When:
98
- - ✅ Specification document created using FEATURESPEC template
99
- - ✅ All required sections completed with substantial content
100
- - ✅ Customer and desired outcome clearly identified
101
- - ✅ User experience includes detailed step-by-step workflows
102
- - ✅ High-fidelity mocks created (if UI changes required)
103
- - ✅ Validation plan includes specific, executable steps
104
- - ✅ Alternatives and competitive landscape analyzed
105
- - ✅ **PR feedback addressed** (if `docs/evidence/{issue_number}-spec-feedback.md` exists)
106
- - ✅ Issue labeled with `phase:spec`
107
-
108
- ### Phase Incomplete If:
109
- - ❌ Specification document missing or incomplete
110
- - ❌ Template structure not followed
111
- - ❌ Customer identification vague or missing
112
- - ❌ User experience lacks detailed workflows
113
- - ❌ UI changes specified but no HTML mocks provided
114
- - ❌ Validation plan not actionable
115
- - ❌ Alternatives or competitive analysis missing
116
- - ❌ **PR feedback not addressed** (UNADDRESSED items remain in feedback file)
117
-
118
- ### Report Back:
119
- When you complete this phase, call:
120
-
121
- ```javascript
122
- seekCoachingOnNextStep({
123
- workflowType: "spec",
124
- issueNumber: "{issue_number}",
125
- currentPhase: "spec-spec",
126
- status: "complete",
127
- evidence: {
128
- specDocument: "docs/feature specs/{issue_number}-{title}.md",
129
- templateUsed: "FEATURESPEC-TEMPLATE.md",
130
- mockFiles: ["docs/feature specs/mocks/{issue_number}-view1.html", "..."],
131
- namingConvention: "{issue_number}-{kebab-case-title}.md",
132
- issueLabeled: "phase:spec"
133
- },
134
- findings: {
135
- completedSections: ["Customer identification", "Customer desired outcome", "..."],
136
- keyInsights: ["Key insight 1", "Key insight 2", "..."]
137
- }
138
- })
139
- ```