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,283 +0,0 @@
1
- # Phase: Code
2
-
3
- ## INTENT
4
- To write the minimal, testable code needed to fix the bug or implement the feature, following approved designs and established patterns.
5
-
6
- ## OUTCOME
7
- Working implementation that:
8
- - Fixes the bug or implements the feature
9
- - Follows approved design/RFC
10
- - Includes comprehensive tests
11
- - Maintains code quality
12
- - Is ready for validation
13
-
14
- ## 🎯 SUCCESS MINDSET
15
-
16
- **Your Goal**: Working application that users can actually use, not just passing tests.
17
-
18
- **Critical Success Factors**:
19
- - 🔍 **Manual validation is MANDATORY** - You WILL test in browser/API/CLI manually
20
- - ⚠️ **Every error must be investigated** - No assumptions, no "that's probably fine"
21
- - 🚫 **No placeholder code** - Implement complete solutions, no task placeholders or "for now" comments
22
- - 📊 **100% test success required** - 91% is failure, 99% is failure, only 100% is success
23
- - 🏗️ **Prototype-first** - Build simplest end-to-end solution, then engineer it properly
24
-
25
- ## RULES FOR THIS PHASE
26
-
27
- ### Success Criteria
28
- Read `registry/rules/agent-success-criteria.md` via `get_fraim_file` for the complete framework. Focus especially on:
29
- - **Integrity** (never claim tests pass if you didn't run them)
30
- - **Correctness** (follow architecture, tests must pass, no `any` types)
31
- - **Completeness** (implement everything in the issue description)
32
-
33
- ### Simplicity Principles
34
- Read `registry/rules/simplicity.md` via `get_fraim_file` for complete guidelines. Critical for coding phase:
35
- - **Prototype-First Development**: Build simplest solution that works end-to-end, validate manually, then engineer correctly
36
- - **Manual Validation Required**: Test with browser/curl before creating automated tests
37
- - **Resource Waste Prevention**: Maximum 2 retries for expensive operations
38
- - **NEVER use placeholder comments** like "For now", "task placeholders", "fix-me notes"
39
-
40
- ### Architecture Compliance
41
- Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full architecture guidelines. Follow all architectural standards - no shortcuts.
42
-
43
- ### Git Operations (if needed)
44
- 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.
45
-
46
- ### Failure Handling
47
- - **If implementation fails**: Return to implement-scoping phase to re-understand requirements
48
- - **If tests fail**: Fix implementation until all tests pass
49
- - **If architecture violations**: Return to implement-scoping to understand constraints better
50
-
51
- ## PRINCIPLES
52
- - **Design-Driven**: Follow approved RFCs and design documents
53
- - **Minimal Implementation**: Write only code needed for this issue
54
- - **Test-First**: Write tests before or alongside implementation
55
- - **Quality Focus**: Maintain code quality and follow patterns
56
- - **Complete**: All aspects of design/spec implemented
57
-
58
- ## 📋 ENHANCED WORKFLOW
59
-
60
- ### Step 1: Prototype-First Development
61
-
62
- **Build Simplest End-to-End Solution**:
63
- - Focus on getting something working, not perfect
64
- - Don't worry about code quality initially
65
- - Prove the approach works before optimizing
66
- - Get basic functionality working first
67
-
68
- **Manual Validation (CRITICAL)**:
69
- - Test every step manually using browser/curl/CLI
70
- - Verify each acceptance criteria works
71
- - Take screenshots/capture output as evidence
72
- - Fix any issues found immediately
73
-
74
- ### Step 2: Review Design/Spec
75
-
76
- **For Bugs:**
77
- - Review bug description and repro test
78
- - Understand root cause
79
- - Plan minimal fix
80
-
81
- **For Features:**
82
- - Review approved RFC/design document
83
- - Review spike/POC findings (if applicable)
84
- - Understand all acceptance criteria
85
- - Plan implementation approach
86
-
87
- ### Step 3: Check for Design and PR Feedback
88
-
89
- **CRITICAL**: Before implementing, check for feedback:
90
- - **Design Review Feedback**: `docs/evidence/{issue_number}-design-reviewer-feedback.md`
91
- - **Feature Review Feedback**: `docs/evidence/{issue_number}-feature-reviewer-feedback.md`
92
- - **PR Review Feedback**: `docs/evidence/{issue_number}-implement-feedback.md`
93
-
94
- **If any feedback exists:**
95
- - **MUST address all UNADDRESSED items** before proceeding
96
- - Update feedback files after addressing each item
97
- - Change status from UNADDRESSED to ADDRESSED with resolution details
98
- - Cannot skip or defer feedback items
99
- - Phase cannot complete until all feedback is addressed
100
-
101
- **PR Feedback File Format** (if exists):
102
- ```markdown
103
- ### Comment X - ADDRESSED
104
- - **Author**: reviewer_name
105
- - **Comment**: Original feedback
106
- - **Status**: ADDRESSED
107
- - **Resolution**: How you addressed this feedback
108
- ```
109
-
110
- ### Step 4: Implement Changes
111
-
112
- **For Bugs:**
113
- - Make minimal changes to fix the issue
114
- - Focus on root cause, not symptoms
115
- - Avoid unrelated changes
116
- - Keep diff small and focused
117
-
118
- **For Features:**
119
- - Implement all aspects from design/spec
120
- - Follow existing patterns and architecture
121
- - Create necessary files/modules
122
- - Implement all API contracts
123
- - Implement all data models
124
- - Implement all user interfaces
125
- - No placeholder code for core functionality
126
-
127
- ### Step 5: Fix All Errors (MANDATORY)
128
-
129
- **Error Investigation Requirements**:
130
- - **Every error in logs must be investigated**
131
- - **No error is "expected" until proven**
132
- - **Fix root causes, not symptoms**
133
- - **Document why any remaining errors are acceptable**
134
-
135
- **Common Error Sources**:
136
- - Server startup errors
137
- - API connection errors
138
- - Database connection errors
139
- - TypeScript compilation errors
140
- - Test execution errors
141
-
142
- ### Step 6: Write Comprehensive Tests
143
-
144
- **MANDATORY**: Every issue requires tests - no exceptions.
145
-
146
- **For Bugs:**
147
- - Verify repro test from implement-repro phase now passes
148
- - Add additional edge case tests if needed
149
- - Ensure tests cover the fix
150
-
151
- **For Features:**
152
- - Write tests for all acceptance criteria
153
- - Test main user scenarios
154
- - Test edge cases
155
- - Test error conditions
156
- - Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full test architecture standards
157
-
158
- **Test Requirements:**
159
- - Use shared-server-utils.ts for server tests
160
- - Unique API keys per test
161
- - Proper cleanup in finally blocks
162
- - No individual server instances
163
- - Proper timeouts (5-10s for network calls)
164
- - Tests must validate real functionality, not mocks
165
- - No tests that default to passing
166
-
167
- **Test Tagging Guidelines:**
168
- Tag tests appropriately to ensure proper test suite execution:
169
-
170
- - **`smoke`**: Tag tests as "smoke" if they verify:
171
- - Core system functionality (CLI commands, server startup, basic workflows)
172
- - Critical user journeys (init, sync, basic operations)
173
- - Integration points between major components
174
- - Functionality that, if broken, would make the system unusable
175
-
176
- - **`integration`**: Tests that verify multiple components working together
177
- - **`unit`**: Tests that verify individual functions or classes in isolation
178
- - **`e2e`**: End-to-end tests that verify complete user workflows
179
-
180
- ### Step 7: Basic Compilation Check
181
-
182
- **Verify code compiles:**
183
-
184
- **Build Commands**: Always check `.fraim/config.json` first for `customizations.validation.buildCommand`, use that if available, otherwise default to `npm run build`.
185
-
186
- **What to Look For**:
187
- - Exit code 0 (success)
188
- - No TypeScript compilation errors
189
- - Clean build output
190
-
191
- **Must exit with code 0** (no errors)
192
-
193
- If compilation fails:
194
- - Fix TypeScript errors
195
- - Re-compile
196
- - Iterate until clean
197
-
198
- **Note**: Full validation, testing, and manual verification will be handled in subsequent phases (implement-validate, implement-smoke, implement-regression).
199
-
200
- ## 📸 EVIDENCE REQUIREMENTS
201
-
202
- You MUST provide concrete evidence for all claims:
203
-
204
- 1. **Implementation Complete**: Code written per design/spec
205
- 2. **Tests Written**: Comprehensive test coverage for new functionality
206
- 3. **Compilation Success**: TypeScript compiles without errors
207
- 4. **Basic Functionality**: Code implements the required features/fixes
208
-
209
- **Note**: Screenshots, manual validation, server logs, and API responses will be captured in the implement-validate phase.
210
-
211
- ## VALIDATION
212
-
213
- ### Phase Complete When:
214
- - ✅ Implementation complete per design/spec
215
- - ✅ (Bugs) Minimal, focused changes
216
- - ✅ (Features) All design aspects implemented
217
- - ✅ Tests written for new functionality
218
- - ✅ TypeScript compiles cleanly
219
- - ✅ Design feedback addressed (if applicable)
220
- - ✅ **PR feedback addressed** (if `docs/evidence/{issue_number}-implement-feedback.md` exists)
221
- - ✅ Code implements required features/fixes
222
-
223
- ### Phase Incomplete If:
224
- - ❌ Design/spec not fully implemented
225
- - ❌ No tests written for new functionality
226
- - ❌ TypeScript compilation errors
227
- - ❌ Design feedback not addressed
228
- - ❌ **PR feedback not addressed** (UNADDRESSED items remain in feedback file)
229
- - ❌ Code doesn't implement required functionality
230
-
231
- ### Report Back:
232
- When you complete this phase, call:
233
-
234
- ```javascript
235
- seekCoachingOnNextStep({
236
- workflowType: "implement",
237
- issueNumber: "{issue_number}",
238
- currentPhase: "implement-code",
239
- status: "complete",
240
- findings: {
241
- issueType: "bug", // or "feature" - Required for phase validation
242
- evidence: "Brief summary of what you implemented and validated"
243
- },
244
- evidence: {
245
- implementation: "Brief summary of what you implemented",
246
- testsWritten: "Description of tests created for new functionality",
247
- compilationStatus: "TypeScript compiles without errors",
248
- feedbackAddressed: "All design/PR feedback addressed (if applicable)"
249
- }
250
- })
251
- ```
252
-
253
- If implementation incomplete, iterate:
254
- ```javascript
255
- seekCoachingOnNextStep({
256
- workflowType: "implement",
257
- issueNumber: "{issue_number}",
258
- currentPhase: "implement-code",
259
- status: "incomplete",
260
- findings: {
261
- issueType: "bug", // or "feature" - Required for phase validation
262
- uncertainties: ["Issues encountered", "What needs to be fixed"]
263
- }
264
- })
265
- ```
266
- ```
267
-
268
- ## SCRIPTS
269
-
270
- **Run tests:**
271
- ```bash
272
- npm test -- path/to/test.test.ts
273
- ```
274
-
275
- **Compile TypeScript:**
276
- ```bash
277
- npx tsc --noEmit --skipLibCheck
278
- ```
279
-
280
- **Start dev server (for manual testing in validate phase):**
281
- ```bash
282
- npm run dev
283
- ```
@@ -1,120 +0,0 @@
1
- # Phase: Implement-Completeness-Review
2
-
3
- ## INTENT
4
- To verify that all design aspects have been implemented and that the work fully addresses the requirements from the design document or issue specification.
5
-
6
- ## OUTCOME
7
- Confirmation that:
8
- - All design aspects implemented
9
- - All acceptance criteria met
10
- - Implementation matches design specifications
11
- - Work is complete and ready for finalization
12
-
13
- ## PRINCIPLES
14
- - **Design Fidelity**: Implementation must match design specifications
15
- - **Complete Coverage**: All design aspects must be addressed
16
- - **Evidence-Based**: Use existing comprehensive review workflows
17
-
18
- ## WORKFLOW
19
-
20
- ### Step 1: Check for PR Feedback to Address
21
-
22
- - Check for PR feedback file: `docs/evidence/{issue_number}-implement-feedback.md`
23
- - If feedback file exists, verify all comments have been addressed before proceeding
24
-
25
- **PR Feedback Validation:**
26
- - Read the feedback file to see all previous review rounds
27
- - Ensure all items marked as UNADDRESSED have been resolved
28
- - Update feedback file with ADDRESSED status and resolution details
29
- - Cannot proceed until all feedback items are properly addressed
30
-
31
- **Expected behavior:**
32
- - All UNADDRESSED items in feedback file must be resolved
33
- - Each resolved item should have detailed resolution explanation
34
- - Phase cannot complete with any remaining UNADDRESSED items
35
-
36
- ### Step 2: Execute Design Review Workflow
37
-
38
- Use the comprehensive design validation workflow:
39
- - Read `registry/workflows/reviewer/review-implementation-vs-design-spec.md` via `get_fraim_file`
40
- - Follow the complete systematic review process
41
- - This workflow provides detailed checklists, validation steps, and templates
42
- - Works for both bugs and features - all should be reviewed against their design spec
43
-
44
- ### Step 3: Execute Review Workflow
45
-
46
- **Follow the design review workflow completely:**
47
- - Use all the checklists provided
48
- - Execute all validation steps
49
- - Create feedback documents using the templates
50
- - Follow the iteration limits (max 3)
51
-
52
- ### Step 4: Architecture Compliance
53
-
54
- Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full architecture guidelines. Verify implementation follows all design standards.
55
-
56
- ## VALIDATION
57
-
58
- ### Phase Complete When:
59
- - ✅ PR comments addressed (if applicable)
60
- - ✅ PR comment verification script passes (if applicable)
61
- - ✅ Appropriate review workflow executed completely
62
- - ✅ All workflow checklists completed
63
- - ✅ All design aspects verified per workflow
64
- - ✅ Evidence quality meets workflow standards
65
- - ✅ Feedback documents created using workflow templates
66
- - ✅ Architecture compliance verified
67
-
68
- ### Phase Incomplete If:
69
- - ❌ PR comments not properly addressed
70
- - ❌ PR comment verification script fails
71
- - ❌ Review workflow not followed completely
72
- - ❌ Workflow checklists incomplete
73
- - ❌ Design aspects not verified per workflow standards
74
- - ❌ Evidence quality insufficient per workflow criteria
75
- - ❌ Feedback documents missing or not using templates
76
-
77
- ### Report Back:
78
- When you complete this phase, call:
79
-
80
- ```javascript
81
- seekCoachingOnNextStep({
82
- workflowType: "implement",
83
- issueNumber: "{issue_number}",
84
- currentPhase: "implement-completeness-review",
85
- status: "complete",
86
- findings: {
87
- issueType: "bug" // or "feature" - Required for phase validation
88
- },
89
- evidence: {
90
- reviewWorkflowUsed: "review-implementation-vs-design-spec", // Which workflow was used
91
- workflowChecklistsComplete: "YES", // All checklists from workflow completed?
92
- designAspectsVerified: "YES", // All design aspects verified per workflow?
93
- evidenceQualityMet: "YES", // Evidence meets workflow standards?
94
- feedbackDocumentsCreated: "YES", // Feedback documents created using templates?
95
- architectureCompliant: "YES", // Architecture compliance verified?
96
- reviewDecision: "APPROVE", // APPROVE/REQUEST_CHANGES/REJECT per workflow
97
- summary: "Completed systematic design review using comprehensive workflow. All design aspects verified and documented."
98
- }
99
- })
100
- ```
101
-
102
- If review reveals issues:
103
- ```javascript
104
- seekCoachingOnNextStep({
105
- workflowType: "implement",
106
- issueNumber: "{issue_number}",
107
- currentPhase: "implement-completeness-review",
108
- status: "incomplete",
109
- findings: {
110
- issueType: "bug" // or "feature" - Required for phase validation
111
- },
112
- evidence: {
113
- reviewWorkflowUsed: "review-implementation-vs-design-spec",
114
- reviewDecision: "REQUEST_CHANGES", // or "REJECT"
115
- issuesFound: ["Missing test case X per workflow checklist", "Design requirement Y not implemented"],
116
- feedbackDocumentLocation: "docs/evidence/{issue}-design-reviewer-feedback.md",
117
- nextAction: "Implementation agent must address feedback per workflow iteration process"
118
- }
119
- })
120
- ```
@@ -1,173 +0,0 @@
1
- # Phase: Regression
2
-
3
- ## INTENT
4
- For bugs: Verify the repro test now passes. For features: Write comprehensive regression tests to prevent future breakage.
5
-
6
- ## OUTCOME
7
- **For Bugs:**
8
- - Repro test from implement-repro phase now PASSES
9
- - Bug is confirmed fixed
10
- - Test serves as regression protection
11
-
12
- **For Features:**
13
- - New regression tests written
14
- - All key functionality covered
15
- - Tests verify acceptance criteria
16
- - All tests pass
17
-
18
- **Note**: This phase focuses specifically on regression testing. Build validation and manual testing are handled in other phases.
19
-
20
- ## PRINCIPLES
21
- - **Test Quality**: Write meaningful tests, not checkbox tests
22
- - **Coverage**: Test main scenarios and edge cases
23
- - **Real Testing**: Test actual functionality, not mocks
24
- - **Maintainable**: Tests should be clear and maintainable
25
-
26
- ## WORKFLOW
27
-
28
- ### For Bug Fixes:
29
-
30
- #### Step 1: Run Repro Test
31
- ```bash
32
- npm test -- path/to/repro/test.test.ts
33
- ```
34
-
35
- #### Step 2: Verify Test Passes
36
- - Test should now PASS (was failing in implement-repro phase)
37
- - Confirms bug is fixed
38
- - Test serves as regression protection
39
-
40
- #### Step 3: If Test Still Fails
41
- **Return to implement phase:**
42
- - Bug is not actually fixed
43
- - Review the fix
44
- - Debug why test still fails
45
- - Fix and re-validate
46
-
47
- ### For Features:
48
-
49
- #### Step 1: Identify Test Coverage Needed
50
- Based on acceptance criteria:
51
- - Main user scenarios
52
- - Edge cases
53
- - Error conditions
54
- - Integration points
55
-
56
- #### Step 2: Write Regression Tests
57
- - Create tests for all key functionality
58
- - Test main user workflows
59
- - Cover edge cases
60
- - Test error handling
61
-
62
- #### Step 3: Follow Test Architecture
63
- Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full architecture guidelines. Key requirements:
64
- - Use shared-server-utils.ts
65
- - Unique API keys per test
66
- - Proper cleanup in finally blocks
67
- - No individual server instances
68
- - Proper timeouts (5-10s for network calls)
69
-
70
- #### Step 4: Run All New Tests
71
- ```bash
72
- npm test -- path/to/new/tests.test.ts
73
- ```
74
-
75
- Verify all tests pass
76
-
77
- #### Step 5: Tag Tests Appropriately
78
- - `smoke`: If testing core functionality
79
- - `integration`: If testing multiple components
80
- - `unit`: If testing individual functions
81
- - `e2e`: If testing complete workflows
82
-
83
- ## VALIDATION
84
-
85
- ### Phase Complete When:
86
-
87
- **For Bugs:**
88
- - ✅ Repro test now PASSES
89
- - ✅ Bug confirmed fixed
90
- - ✅ Test output documented
91
-
92
- **For Features:**
93
- - ✅ Regression tests written
94
- - ✅ All acceptance criteria covered
95
- - ✅ Tests follow architecture standards
96
- - ✅ All tests pass
97
- - ✅ Tests appropriately tagged
98
-
99
- ### Phase Incomplete If:
100
- - ❌ (Bugs) Repro test still fails
101
- - ❌ (Features) No regression tests written
102
- - ❌ (Features) Tests don't cover acceptance criteria
103
- - ❌ Any tests fail
104
- - ❌ Tests violate architecture standards
105
-
106
- ## RULES FOR THIS PHASE
107
- - Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full test architecture guidelines
108
- - Use Successful Debugging Patterns from `rules/successful-debugging-patterns.md` via `get_fraim_file`
109
- - Follow Git Safe Commands from `rules/git-safe-commands.md` via `get_fraim_file`
110
-
111
- ### Failure Handling
112
- - **If regression tests fail**: Return to implement-code phase
113
- - **If test writing fails**: Return to implement-code phase to understand implementation better
114
- - Fix the implementation first, then write proper regression tests
115
-
116
- ## TEST QUALITY REQUIREMENTS
117
- - Tests must validate real functionality, not mocked behavior
118
- - No tests that default to passing without validation
119
- - Use flow testing, not just static analysis
120
- - Tests should fail if code is broken
121
-
122
- ## SCRIPTS
123
-
124
- **Run tests:**
125
- ```bash
126
- npm test -- path/to/test.test.ts
127
- ```
128
-
129
- **Run all tests:**
130
- ```bash
131
- npm test
132
- ```
133
-
134
- ### Report Back (Bugs):
135
- When you complete this phase for a bug fix, call:
136
-
137
- ```javascript
138
- seekCoachingOnNextStep({
139
- workflowType: "implement",
140
- issueNumber: "{issue_number}",
141
- currentPhase: "implement-regression",
142
- status: "complete",
143
- findings: {
144
- issueType: "bug" // Required for phase validation
145
- },
146
- evidence: {
147
- reproTestResult: "Repro test at test/sync.test.ts:45 now PASSES",
148
- bugStatus: "Bug confirmed fixed",
149
- regressionProtection: "Test serves as regression protection"
150
- }
151
- })
152
- ```
153
-
154
- ### Report Back (Features):
155
- When you complete this phase for a feature, call:
156
-
157
- ```javascript
158
- seekCoachingOnNextStep({
159
- workflowType: "implement",
160
- issueNumber: "{issue_number}",
161
- currentPhase: "implement-regression",
162
- status: "complete",
163
- findings: {
164
- issueType: "feature" // Required for phase validation
165
- },
166
- evidence: {
167
- testLocation: "test/auth.test.ts",
168
- testCoverage: "All acceptance criteria covered",
169
- testResults: "8/8 tests passing",
170
- testTags: "Tagged as integration"
171
- }
172
- })
173
- ```
@@ -1,104 +0,0 @@
1
- # Phase: Implement-Repro
2
-
3
- ## INTENT
4
- To create a failing test that reproduces the reported bug, demonstrating that the issue exists and providing a clear success criterion for the fix.
5
-
6
- ## OUTCOME
7
- A test that:
8
- - **FAILS** when run, reproducing the bug
9
- - Clearly demonstrates the incorrect behavior
10
- - Will pass once the bug is fixed
11
- - Serves as a regression test
12
-
13
- ## PRINCIPLES
14
- - **Test-First**: Create the failing test before fixing
15
- - **Actual Reproduction**: Use real reproduction, not hypothetical scenarios
16
- - **Clear Failure**: Test should fail obviously and consistently
17
- - **No Assumptions**: If reproduction steps are unclear, escalate to user
18
- - **Minimal Test**: Focus on reproducing the specific bug
19
-
20
- ## WORKFLOW
21
-
22
- ### Step 1: Review Bug Spec
23
- - Read the bug description thoroughly
24
- - Note the reproduction steps
25
- - Understand the expected vs actual behavior
26
- - Identify the failure conditions
27
-
28
- ### Step 2: Check Reproduction Steps
29
- **If reproduction steps are clear:**
30
- - Proceed to create test
31
-
32
- **If reproduction steps are unclear or missing:**
33
- - **DO NOT** hypothesize about the issue
34
- - **ESCALATE** to user with specific questions:
35
- - What exact steps trigger the bug?
36
- - What is the expected behavior?
37
- - What is the actual (incorrect) behavior?
38
- - Are there specific inputs or conditions?
39
-
40
- ### Step 3: Create Failing Test
41
- - Choose appropriate test file location
42
- - Write test that follows reproduction steps
43
- - Test should demonstrate the bug clearly
44
- - Use descriptive test name: `test: reproduces bug #{issue_number} - {description}`
45
-
46
- ### Step 4: Run the Test
47
- - Execute the test
48
- - **Verify it FAILS** as expected
49
- - Capture the failure output
50
- - Confirm it fails for the right reason (reproducing the bug, not test errors)
51
-
52
- ### Step 5: Document Test Location
53
- In your evidence, include:
54
- - Path to the test file
55
- - Test name/description
56
- - Failure output showing the bug
57
- - Confirmation that test reproduces the issue
58
-
59
- ## VALIDATION
60
-
61
- ### Phase Complete When:
62
- - ✅ Test created that reproduces the bug
63
- - ✅ Test FAILS when run
64
- - ✅ Failure clearly demonstrates the bug
65
- - ✅ Test will pass once bug is fixed
66
- - ✅ Test location documented
67
-
68
- ### Phase Incomplete If:
69
- - ❌ Test passes (not reproducing the bug)
70
- - ❌ Test fails for wrong reason (test error, not bug)
71
- - ❌ Reproduction steps were unclear and not escalated
72
- - ❌ Test is hypothetical, not based on actual reproduction
73
-
74
- ## RULES FOR THIS PHASE
75
- - Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full test architecture standards
76
- - Use Successful Debugging Patterns from `rules/successful-debugging-patterns.md` via `get_fraim_file`
77
- - Follow Git Safe Commands from `rules/git-safe-commands.md` via `get_fraim_file`
78
-
79
- ## SCRIPTS
80
- Run test:
81
- ```bash
82
- npm test -- path/to/test/file.test.ts
83
- ```
84
-
85
- ### Report Back:
86
- When you complete this phase, call:
87
-
88
- ```javascript
89
- seekCoachingOnNextStep({
90
- workflowType: "implement",
91
- issueNumber: "{issue_number}",
92
- currentPhase: "implement-repro",
93
- status: "complete",
94
- findings: {
95
- issueType: "bug" // Required for phase validation
96
- },
97
- evidence: {
98
- testLocation: "test/sync.test.ts:45",
99
- testResult: "FAILS with timeout after 30s",
100
- reproductionConfirmed: true,
101
- testOutput: "Include actual test failure output here"
102
- }
103
- })
104
- ```