fraim-framework 2.0.35 → 2.0.37

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 (159) hide show
  1. package/dist/registry/scripts/cleanup-branch.js +62 -33
  2. package/dist/registry/scripts/generate-engagement-emails.js +119 -44
  3. package/dist/registry/scripts/newsletter-helpers.js +208 -268
  4. package/dist/registry/scripts/profile-server.js +387 -0
  5. package/dist/scripts/build-stub-registry.js +108 -0
  6. package/dist/src/cli/commands/doctor.js +5 -5
  7. package/dist/src/cli/commands/sync.js +33 -19
  8. package/dist/tests/test-client-scripts-validation.js +133 -0
  9. package/dist/tests/test-package-size.js +88 -0
  10. package/dist/tests/test-script-location-independence.js +76 -28
  11. package/dist/tests/test-stub-registry.js +120 -0
  12. package/dist/tests/test-sync-stubs.js +143 -0
  13. package/package.json +7 -9
  14. package/registry/scripts/cleanup-branch.ts +341 -0
  15. package/registry/scripts/generate-engagement-emails.ts +830 -0
  16. package/registry/scripts/markdown-to-pdf.js +7 -3
  17. package/registry/scripts/newsletter-helpers.ts +777 -0
  18. package/registry/scripts/profile-server.ts +424 -0
  19. package/registry/scripts/run-thank-you-workflow.ts +122 -0
  20. package/registry/scripts/send-newsletter-simple.ts +102 -0
  21. package/registry/scripts/send-thank-you-emails.ts +57 -0
  22. package/registry/stubs/workflows/bootstrap/create-architecture.md +11 -0
  23. package/registry/stubs/workflows/bootstrap/detect-broken-windows.md +11 -0
  24. package/registry/stubs/workflows/bootstrap/evaluate-code-quality.md +11 -0
  25. package/registry/stubs/workflows/bootstrap/verify-test-coverage.md +11 -0
  26. package/registry/stubs/workflows/business-development/create-business-plan.md +11 -0
  27. package/registry/stubs/workflows/business-development/ideate-business-opportunity.md +11 -0
  28. package/registry/stubs/workflows/business-development/price-product.md +18 -0
  29. package/registry/stubs/workflows/convert-to-pdf.md +11 -0
  30. package/registry/stubs/workflows/customer-development/insight-analysis.md +11 -0
  31. package/registry/stubs/workflows/customer-development/insight-triage.md +11 -0
  32. package/registry/stubs/workflows/customer-development/interview-preparation.md +11 -0
  33. package/registry/stubs/workflows/customer-development/linkedin-outreach.md +11 -0
  34. package/registry/stubs/workflows/customer-development/strategic-brainstorming.md +11 -0
  35. package/registry/stubs/workflows/customer-development/thank-customers.md +11 -0
  36. package/registry/stubs/workflows/customer-development/weekly-newsletter.md +11 -0
  37. package/registry/stubs/workflows/deploy/cloud-deployment.md +11 -0
  38. package/registry/stubs/workflows/improve-fraim/contribute.md +11 -0
  39. package/registry/stubs/workflows/improve-fraim/file-issue.md +11 -0
  40. package/registry/stubs/workflows/marketing/content-creation.md +11 -0
  41. package/registry/stubs/workflows/marketing/hbr-article.md +11 -0
  42. package/registry/stubs/workflows/marketing/launch-checklist.md +11 -0
  43. package/registry/stubs/workflows/marketing/marketing-strategy.md +11 -0
  44. package/registry/stubs/workflows/marketing/storytelling.md +11 -0
  45. package/registry/stubs/workflows/performance/analyze-performance.md +11 -0
  46. package/registry/stubs/workflows/product-building/design.md +11 -0
  47. package/registry/stubs/workflows/product-building/implement.md +12 -0
  48. package/registry/stubs/workflows/product-building/iterate-on-pr-comments.md +11 -0
  49. package/registry/stubs/workflows/product-building/prep-issue.md +11 -0
  50. package/registry/stubs/workflows/product-building/prototype.md +11 -0
  51. package/registry/stubs/workflows/product-building/resolve.md +11 -0
  52. package/registry/stubs/workflows/product-building/retrospect.md +11 -0
  53. package/registry/stubs/workflows/product-building/spec.md +11 -0
  54. package/registry/stubs/workflows/product-building/test.md +11 -0
  55. package/registry/stubs/workflows/quality-assurance/browser-validation.md +11 -0
  56. package/registry/stubs/workflows/quality-assurance/iterative-improvement-cycle.md +11 -0
  57. package/registry/stubs/workflows/replicate/replicate-discovery.md +11 -0
  58. package/registry/stubs/workflows/replicate/replicate-to-issues.md +11 -0
  59. package/registry/stubs/workflows/reviewer/review-implementation-vs-design-spec.md +11 -0
  60. package/registry/stubs/workflows/reviewer/review-implementation-vs-feature-spec.md +11 -0
  61. package/registry/stubs/workflows/startup-credits/aws-activate-application.md +11 -0
  62. package/registry/stubs/workflows/startup-credits/google-cloud-application.md +11 -0
  63. package/registry/stubs/workflows/startup-credits/microsoft-azure-application.md +11 -0
  64. package/.github/workflows/ci.yml +0 -65
  65. package/.github/workflows/deploy-fraim.yml +0 -87
  66. package/.github/workflows/phase-change.yml +0 -251
  67. package/.github/workflows/status-change.yml +0 -68
  68. package/.github/workflows/sync-on-pr-review.yml +0 -66
  69. package/examples/simple-webapp/TESTING.md +0 -62
  70. package/examples/simple-webapp/example-test.ts +0 -186
  71. package/registry/github/workflows/ci.yml +0 -51
  72. package/registry/github/workflows/phase-change.yml +0 -251
  73. package/registry/github/workflows/status-change.yml +0 -68
  74. package/registry/github/workflows/sync-on-pr-review.yml +0 -66
  75. package/registry/mcp-template.jsonc +0 -29
  76. package/registry/rules/agent-success-criteria.md +0 -52
  77. package/registry/rules/agent-testing-guidelines.md +0 -502
  78. package/registry/rules/architecture.md +0 -52
  79. package/registry/rules/communication.md +0 -122
  80. package/registry/rules/continuous-learning.md +0 -55
  81. package/registry/rules/debugging-multitenancy-issues.md +0 -85
  82. package/registry/rules/ephemeral-execution.md +0 -57
  83. package/registry/rules/git-safe-commands.md +0 -34
  84. package/registry/rules/hitl-ppe-record-analysis.md +0 -302
  85. package/registry/rules/integrity-and-test-ethics.md +0 -275
  86. package/registry/rules/local-development.md +0 -254
  87. package/registry/rules/merge-requirements.md +0 -231
  88. package/registry/rules/simplicity.md +0 -118
  89. package/registry/rules/software-development-lifecycle.md +0 -105
  90. package/registry/rules/spike-first-development.md +0 -205
  91. package/registry/rules/successful-debugging-patterns.md +0 -491
  92. package/registry/rules/telemetry.md +0 -67
  93. package/registry/templates/bootstrap/ARCHITECTURE-TEMPLATE.md +0 -53
  94. package/registry/templates/bootstrap/CODE-QUALITY-REPORT-TEMPLATE.md +0 -37
  95. package/registry/templates/bootstrap/TEST-COVERAGE-REPORT-TEMPLATE.md +0 -35
  96. package/registry/templates/business-development/IDEATION-REPORT-TEMPLATE.md +0 -29
  97. package/registry/templates/business-development/PRICING-STRATEGY-TEMPLATE.md +0 -126
  98. package/registry/templates/customer-development/customer-interview-template.md +0 -99
  99. package/registry/templates/customer-development/follow-up-email-templates.md +0 -132
  100. package/registry/templates/customer-development/insight-analysis-template.md +0 -74
  101. package/registry/templates/customer-development/strategic-recommendations-template.md +0 -53
  102. package/registry/templates/customer-development/thank-you-email-template.html +0 -124
  103. package/registry/templates/customer-development/thank-you-note-template.md +0 -16
  104. package/registry/templates/customer-development/triage-log-template.md +0 -278
  105. package/registry/templates/customer-development/weekly-newsletter-template.html +0 -204
  106. package/registry/templates/evidence/Design-Evidence.md +0 -30
  107. package/registry/templates/evidence/Implementation-BugEvidence.md +0 -86
  108. package/registry/templates/evidence/Implementation-FeatureEvidence.md +0 -121
  109. package/registry/templates/evidence/Spec-Evidence.md +0 -19
  110. package/registry/templates/help/HelpNeeded.md +0 -14
  111. package/registry/templates/marketing/HBR-ARTICLE-TEMPLATE.md +0 -66
  112. package/registry/templates/marketing/STORYTELLING-TEMPLATE.md +0 -130
  113. package/registry/templates/replicate/implementation-checklist.md +0 -39
  114. package/registry/templates/replicate/use-cases-template.md +0 -88
  115. package/registry/templates/retrospective/RETROSPECTIVE-TEMPLATE.md +0 -55
  116. package/registry/templates/specs/BUGSPEC-TEMPLATE.md +0 -37
  117. package/registry/templates/specs/FEATURESPEC-TEMPLATE.md +0 -29
  118. package/registry/templates/specs/TECHSPEC-TEMPLATE.md +0 -39
  119. package/registry/workflows/bootstrap/create-architecture.md +0 -38
  120. package/registry/workflows/bootstrap/evaluate-code-quality.md +0 -36
  121. package/registry/workflows/bootstrap/verify-test-coverage.md +0 -37
  122. package/registry/workflows/business-development/create-business-plan.md +0 -737
  123. package/registry/workflows/business-development/ideate-business-opportunity.md +0 -55
  124. package/registry/workflows/business-development/price-product.md +0 -325
  125. package/registry/workflows/convert-to-pdf.md +0 -235
  126. package/registry/workflows/customer-development/insight-analysis.md +0 -156
  127. package/registry/workflows/customer-development/insight-triage.md +0 -933
  128. package/registry/workflows/customer-development/interview-preparation.md +0 -421
  129. package/registry/workflows/customer-development/linkedin-outreach.md +0 -593
  130. package/registry/workflows/customer-development/strategic-brainstorming.md +0 -146
  131. package/registry/workflows/customer-development/thank-customers.md +0 -203
  132. package/registry/workflows/customer-development/weekly-newsletter.md +0 -366
  133. package/registry/workflows/deploy/cloud-deployment.md +0 -310
  134. package/registry/workflows/improve-fraim/contribute.md +0 -32
  135. package/registry/workflows/improve-fraim/file-issue.md +0 -32
  136. package/registry/workflows/marketing/content-creation.md +0 -37
  137. package/registry/workflows/marketing/hbr-article.md +0 -73
  138. package/registry/workflows/marketing/launch-checklist.md +0 -37
  139. package/registry/workflows/marketing/marketing-strategy.md +0 -45
  140. package/registry/workflows/marketing/storytelling.md +0 -65
  141. package/registry/workflows/performance/analyze-performance.md +0 -65
  142. package/registry/workflows/product-building/design.md +0 -130
  143. package/registry/workflows/product-building/implement.md +0 -315
  144. package/registry/workflows/product-building/iterate-on-pr-comments.md +0 -70
  145. package/registry/workflows/product-building/prep-issue.md +0 -43
  146. package/registry/workflows/product-building/prototype.md +0 -60
  147. package/registry/workflows/product-building/resolve.md +0 -164
  148. package/registry/workflows/product-building/retrospect.md +0 -86
  149. package/registry/workflows/product-building/spec.md +0 -117
  150. package/registry/workflows/product-building/test.md +0 -120
  151. package/registry/workflows/quality-assurance/browser-validation.md +0 -221
  152. package/registry/workflows/quality-assurance/iterative-improvement-cycle.md +0 -562
  153. package/registry/workflows/replicate/replicate-discovery.md +0 -336
  154. package/registry/workflows/replicate/replicate-to-issues.md +0 -319
  155. package/registry/workflows/reviewer/review-implementation-vs-design-spec.md +0 -632
  156. package/registry/workflows/reviewer/review-implementation-vs-feature-spec.md +0 -669
  157. package/registry/workflows/startup-credits/aws-activate-application.md +0 -535
  158. package/registry/workflows/startup-credits/google-cloud-application.md +0 -647
  159. package/registry/workflows/startup-credits/microsoft-azure-application.md +0 -538
@@ -1,231 +0,0 @@
1
- # Merge Requirements
2
-
3
- ## INTENT
4
- To ensure the stability of the `master` branch and prevent accidental overwrites by requiring all agents to apply their local changes *on top of* the latest `master` branch changes, ensuring `master`'s history is never overwritten.
5
-
6
- ## PRINCIPLES
7
- - **Rebase, Don't Merge:** Always rebase your feature branch on top of the latest `master` to maintain a clean, linear history and ensure changes from `master` are applied first.
8
- - **Verify After Rebase:** Run all tests and builds *after* a successful rebase to ensure stability before pushing.
9
- - **Document Conflict Resolution:** Clearly document how any rebase conflicts were resolved, emphasizing how `master`'s changes were preserved.
10
- - **Force-with-Lease:** When pushing a rebased branch, use `git push --force-with-lease` to avoid overwriting work from other contributors.
11
-
12
- ## WORKFLOW
13
-
14
- ## MANDATORY PRE-PUSH WORKFLOW
15
-
16
- ### Before ANY push to your feature branch:
17
- ```bash
18
- # 1. Sync with latest master
19
- git fetch origin
20
- git rebase origin/master
21
-
22
- # 2. If conflicts occur, resolve them using conflict resolution guide
23
- # (Git will pause and show you conflict markers)
24
- git rebase --continue
25
-
26
- # 3. Verify everything works
27
- npm run build
28
- npm run test-smoke test*.ts
29
-
30
- # 4. Only then push
31
- git push origin <your-feature-branch> --force-with-lease
32
- ```
33
-
34
- ### This workflow is MANDATORY because:
35
- - Prevents creating stale PRs
36
- - Ensures your changes work with latest master
37
- - Reduces merge conflicts
38
- - Required by GitHub branch protection rules
39
-
40
- ## DETAILED REBASE PROCESS
41
- 1. **Sync with `master`:** Before pushing your changes, rebase your feature branch on top of the latest `master` branch. This applies `master`'s changes first, then your local changes on top.
42
-
43
- ```bash
44
- git checkout <your-feature-branch>
45
- git fetch origin
46
- git rebase origin/master
47
- ```
48
-
49
- 2. **Resolve Rebase Conflicts:** If there are any conflicts during the rebase, you must resolve them intelligently. The rebase process will pause to allow you to fix the files. Your goal is to preserve the changes from `master` while reapplying your feature's changes.
50
-
51
- ## CONFLICT RESOLUTION DURING REBASE
52
-
53
- ### When Git Pauses for Conflicts:
54
- 1. **Read the conflict markers carefully:**
55
- - `<<<<<<< HEAD` = Your changes
56
- - `=======` = Separator
57
- - `>>>>>>> origin/master` = Master's changes
58
-
59
- 2. **Understand what each version does:**
60
- - Master's version = What's already in production
61
- - Your version = What you're trying to add
62
-
63
- 3. **Resolution Strategy:**
64
- - **Keep master's base** (it's already tested/deployed)
65
- - **Add your enhancements** on top
66
- - **Never overwrite master's working code**
67
- - **Never lose your new functionality**
68
-
69
- 4. **Common Conflict Scenarios:**
70
-
71
- **Scenario 1: Same function, different implementations**
72
- ```typescript
73
- <<<<<<< HEAD (your changes)
74
- async function processMessage(message: string) {
75
- // Your new implementation
76
- return await this.messageService.process(message);
77
- }
78
- =======
79
- async function processMessage(message: string) {
80
- // Master's updated implementation
81
- return await this.messageService.processWithValidation(message);
82
- }
83
- >>>>>>> origin/master
84
- ```
85
-
86
- **Resolution:** Keep master's version + add your enhancements
87
- ```typescript
88
- async function processMessage(message: string) {
89
- // Master's base implementation
90
- const result = await this.messageService.processWithValidation(message);
91
- // Your additional logic
92
- return await this.enhanceResult(result);
93
- }
94
- ```
95
-
96
- **Scenario 2: Different functions, no overlap**
97
- ```typescript
98
- <<<<<<< HEAD (your changes)
99
- // Your new function
100
- async function newFeature() {
101
- return "new stuff";
102
- }
103
- =======
104
- // Master's new function
105
- async function masterFeature() {
106
- return "master stuff";
107
- }
108
- >>>>>>> origin/master
109
- ```
110
-
111
- **Resolution:** Keep both (no conflict, just different functions)
112
- ```typescript
113
- // Master's function
114
- async function masterFeature() {
115
- return "master stuff";
116
- }
117
-
118
- // Your function
119
- async function newFeature() {
120
- return "new stuff";
121
- }
122
- ```
123
-
124
- 5. **After resolving conflicts:**
125
- ```bash
126
- # After resolving conflicts in your IDE
127
- git add <resolved-file-1> <resolved-file-2>
128
- git rebase --continue
129
- ```
130
-
131
- ### NEVER DO THIS:
132
- ❌ "Accept Current Change" (your version) - overwrites master
133
- ❌ "Accept Incoming Change" (master's version) - loses your work
134
- ❌ "Accept Both Changes" - creates duplicate code
135
-
136
- ### ALWAYS DO THIS:
137
- ✅ Read both versions carefully
138
- ✅ Understand what each change does
139
- ✅ Merge intelligently or choose the better implementation
140
- ✅ Test the resolution with: npm run build && npm run test-smoke
141
- ✅ Document your resolution in the PR description
142
-
143
- 3. **Run Verification Checks:** After the rebase is complete, you must run all local verification checks to ensure the codebase is stable.
144
- * **Build the project:** Run the build command to ensure there are no compilation errors.
145
- * **Run tests:** Execute the full test suite to confirm that your changes have not introduced any regressions.
146
-
147
- 4. **Push Your Changes:** Once all checks have passed, push your rebased branch. You must use `--force-with-lease` because the rebase has rewritten your branch's commit history.
148
-
149
- ```bash
150
- git push origin <your-feature-branch> --force-with-lease
151
- ```
152
-
153
- 5. **Pull Request:** When creating a pull request, the description must include a confirmation that this rebase process was followed and a detailed summary of how any conflicts were resolved.
154
-
155
- ## PR Description Template
156
- ```markdown
157
- ## Merge Process Confirmation
158
- - [ ] Rebased on latest master
159
- - [ ] Resolved X conflicts in files: [list files]
160
- - [ ] Resolution strategy: [explain what you did]
161
- - [ ] Verified with: npm run build && npm run test-smoke
162
- - [ ] All tests passing: ✅
163
-
164
- ## Conflict Resolution Summary
165
- ### Files with conflicts:
166
- - `src/file1.ts`: [Brief description of how conflict was resolved]
167
- - `src/file2.ts`: [Brief description of how conflict was resolved]
168
-
169
- ### Resolution approach:
170
- [Explain your overall strategy - e.g., "Kept master's base implementation and added my enhancements on top"]
171
- ```
172
-
173
- ## FINAL MERGE PROCESS (After PR Approval)
174
-
175
- ### 6. **Execute the Merge:** Once your PR is approved and ready, perform the final merge:
176
-
177
- ```bash
178
- # 1. Navigate to your PR on GitHub
179
- # 2. Click "Merge pull request" button
180
- # 3. GitHub will automatically:
181
- # - Rebase your branch on latest master
182
- # - Apply your changes on top
183
- # - Create a clean, linear history
184
- # - Merge into master
185
- ```
186
-
187
- ### 7. **Post-Merge Cleanup:** After successful merge:
188
-
189
- ```bash
190
- # 1. Switch to master and pull latest changes
191
- git checkout master
192
- git pull origin master
193
-
194
- # 2. Delete your feature branch (local)
195
- git branch -d <your-feature-branch>
196
-
197
- # 3. Delete your feature branch (remote)
198
- git push origin --delete <your-feature-branch>
199
-
200
- # 4. Verify the merge was successful
201
- git log --oneline -5
202
- ```
203
-
204
- ### 8. **Final Verification:** Ensure everything is working:
205
-
206
- ```bash
207
- # Run final tests to confirm merge didn't break anything
208
- npm run build
209
- npm run test-smoke test*.ts
210
- ```
211
-
212
- ## MERGE WORKFLOW SUMMARY
213
-
214
- ### Complete Process:
215
- 1. **Development** → Work on feature branch
216
- 2. **Pre-Push** → Rebase on master, resolve conflicts, test
217
- 3. **Push** → Push to GitHub
218
- 4. **PR Creation** → Create PR with detailed description
219
- 5. **Review** → Wait for approval
220
- 6. **Merge** → Click "Merge pull request" on GitHub
221
- 7. **Cleanup** → Delete branches, verify merge
222
- 8. **Verification** → Run final tests
223
-
224
- ### Key Points:
225
- - ✅ **GitHub handles the final rebase** automatically during merge
226
- - ✅ **No manual rebasing** needed before merge
227
- - ✅ **Linear history** maintained automatically
228
- - ✅ **All conflicts resolved** during the merge process
229
- - ✅ **Clean, up-to-date master** branch
230
-
231
- By following this process, we ensure that the `master` branch always remains in a stable and deployable state. Failure to follow these rules will result in the rejection of your pull request.
@@ -1,118 +0,0 @@
1
- # Rule: simplicity
2
-
3
- **Path:** `rules/simplicity.md`
4
-
5
- ---
6
-
7
- # Simplicity
8
-
9
- ## INTENT
10
- To maintain code quality and development velocity by preventing over-engineering, ensuring agents focus on solving the specific problem at hand rather than building unnecessary complexity.
11
-
12
- ## PRINCIPLES
13
- - Keep it simple. Don't over-engineer.
14
- - Don't over-think it.
15
- - Focus on the assigned issue only.
16
- - Don't fix other issues or make unrelated changes.
17
-
18
- ## REQUIREMENTS
19
- - While fixing an issue, focus on that issue only
20
- - Don't fix other issues or make unrelated changes
21
- - If you find other issues that must be fixed, include them in your final report as a suggested Git issue
22
- - Don't over-engineer solutions
23
- - Choose the simplest approach that solves the problem
24
- - **NEVER use placeholder comments** like "For now", "TODO", "FIXME", or "This is a placeholder"
25
- - **ALWAYS implement complete solutions** - if something needs to be customized later, implement it properly with clear configuration
26
-
27
- ## PROTOTYPE-FIRST DEVELOPMENT PATTERN
28
-
29
- ### Core Principle
30
- **Always prototype the end-to-end solution manually before engineering it correctly.**
31
-
32
- ### Development Flow
33
- 1. **Prototype**: Build simplest possible solution that works end-to-end
34
- 2. **Manual Validation**: Test each step manually using browser/API calls
35
- 3. **Verify**: Confirm everything works before creating automated tests
36
- 4. **Engineer**: Refactor to production quality once proven to work
37
- 5. **Automate**: Create Playwright tests only after manual validation
38
-
39
- ### Anti-Patterns to Avoid
40
- - ❌ **"Assume It Works"**: Creating tests before manual validation
41
- - ❌ **"Over-Engineer First"**: Building complex architecture before proving simple solution works
42
- - ❌ **"Test-Driven Over-Engineering"**: Writing comprehensive test suites for unproven solutions
43
- - ❌ **"Band-Aid Fixes"**: Adding delays, retries, workarounds instead of fixing root cause
44
- - ❌ **"Resource Waste"**: Running expensive operations repeatedly without analyzing failures
45
-
46
- ### Validation Requirements
47
- - **Manual Testing**: Use browser/curl to test each step manually
48
- - **End-to-End Flow**: Verify complete user journey works
49
- - **No Assumptions**: Don't assume anything works until manually verified
50
- - **Simple First**: Start with simplest possible implementation
51
- - **Prove Then Improve**: Only add complexity after proving simple version works
52
-
53
- ## RESOURCE WASTE PREVENTION
54
- - Maximum 2 retries for expensive operations (Playwright, API calls, database)
55
- - After 2 failures: STOP, analyze, propose different approach
56
- - **STOP** if tests are consuming significant resources repeatedly
57
- - **Manual validation required** before creating automated tests
58
-
59
- ## EXAMPLES
60
-
61
- ### Good: Prototype-First Development
62
- ```
63
- Issue: "Add OAuth login"
64
- Action:
65
- 1. Built simple OAuth callback → JWT → redirect
66
- 2. Manually tested with browser (login → redirect → dashboard works)
67
- 3. Verified end-to-end flow works
68
- 4. Then created Playwright tests
69
- Result: Working solution, no overengineering
70
- ```
71
-
72
- ### Bad: Over-Engineering First
73
- ```
74
- Issue: "Add OAuth login"
75
- Action:
76
- 1. Built complex session management system
77
- 2. Created comprehensive test suite
78
- 3. Added session validation endpoints
79
- 4. Created infinite redirect loops
80
- 5. Added delays/retries to fix timing issues
81
- Result: Over-engineered, resource waste, doesn't work
82
- ```
83
-
84
- ### Good: Manual Validation First
85
- ```
86
- Issue: "Fix API endpoint"
87
- Action:
88
- 1. Fixed the code
89
- 2. Tested with curl to verify it works
90
- 3. Tested in browser to verify UI works
91
- 4. Then created automated tests
92
- Result: Confident solution works before automation
93
- ```
94
-
95
- ### Bad: Assume It Works
96
- ```
97
- Issue: "Fix API endpoint"
98
- Action:
99
- 1. Fixed the code
100
- 2. Created Playwright tests immediately
101
- 3. Tests fail because solution doesn't actually work
102
- 4. Keep retrying tests instead of fixing code
103
- Result: Wasted resources, false confidence
104
- ```
105
-
106
- ### Good: Simple Solution
107
- ```
108
- Issue: "Add error message for invalid input"
109
- Action: Added single validation check with clear error message
110
- Result: Clean, focused solution
111
- ```
112
-
113
- ### Bad: Complex Solution
114
- ```
115
- Issue: "Add error message for invalid input"
116
- Action: Built comprehensive validation framework with multiple error types, internationalization, and complex state management
117
- Result: Over-engineered for simple requirement
118
- ```
@@ -1,105 +0,0 @@
1
- # Software Development Lifecycle
2
-
3
- ## INTENT
4
- To provide a structured, phase-based approach to issue resolution that ensures proper planning, implementation, testing, and cleanup while maintaining coordination with other agents and respecting project governance.
5
-
6
- ## PRINCIPLES
7
- - **Phase-Based Development**: Clear phases with specific deliverables
8
- - **Branch Safety**: Never work on master, always use feature branches
9
- - **Local Development**: Work in isolated clones to prevent conflicts
10
- - **Coordination**: Use GitHub for agent coordination and status management
11
- - **Governance**: Respect CODEOWNERS and project policies
12
-
13
- ## CORE WORKFLOW
14
- Always work on the feature branch for the current issue: `feature/<issue#>-<kebab-title>`. Never push to master.
15
-
16
- ### Development Workflow
17
- 1. **Clone Setup**: Work in your own cloned repository folder. Folder name should be `Ashley Calendar AI - Issue {issue_number}`
18
- 2. **Branch Management**: Create/checkout feature branch for your issue
19
- 3. **Local Development**: Make changes, run tests locally
20
- 4. **Check before commit**: Only commit after approval from the user.
21
- 5. **Remote Coordination**: Use GitHub MCP for issue labels
22
-
23
- ## MANDATORY PRE-COMMIT VALIDATION
24
- Before ANY commit, run: `git branch` and verify NOT on master
25
-
26
- ## PHASES
27
-
28
- ### Design Phase
29
- - **Trigger**: Set ISSUE to `phase:design`
30
- - **Deliverable**: Create RFC document
31
- - **Status**: Automatically set to `status:wip`
32
-
33
- ### Implementation Phase
34
- - **Trigger**: Set ISSUE to `phase:impl`
35
- - **Deliverable**: Working code with tests
36
- - **Status**: Set to `status:needs-review` when ready
37
-
38
- ## STATUS MANAGEMENT
39
- - **WIP**: Automatically set when entering new phase
40
- - **Needs Review**: Set this when work is ready for review
41
- - **Complete**: Automatically set when PR is approved
42
-
43
- ## EXAMPLES
44
-
45
- ### Good: Proper Phase Management
46
- ```
47
- Issue #84: "Fix calendar sync timeout"
48
- 1. Set phase:design → Create RFC for retry logic
49
- 2. Set phase:impl → Implement exponential backoff
50
- 3. Set status:needs-review → Ready for code review
51
- 4. PR approved → Set status:complete
52
- Result: Clear progression through phases
53
- ```
54
-
55
- ### Bad: Skipping Phases
56
- ```
57
- Issue #84: "Fix calendar sync timeout"
58
- 1. Jump straight to coding without design
59
- 2. No RFC created
60
- 3. Implementation lacks proper planning
61
- Result: Incomplete solution, potential rework
62
- ```
63
-
64
- ## PRE-PHASE VALIDATION
65
-
66
- ### Before Starting Any Phase
67
- Agents MUST complete validation checklist:
68
-
69
- 1. **Read Relevant Rules**:
70
- - [ ] Read `get_fraim_file({ path: "rules/software-development-lifecycle.md" })`
71
- - [ ] Read phase-specific workflow via `get_fraim_file` (e.g. `workflows/product-building/design.md`)
72
- - [ ] Read retrospectives folder thoroughly and understand past learnings
73
-
74
- 2. **Verify Environment**:
75
- - [ ] Confirm working directory is correct
76
- - [ ] Verify branch exists and is checked out
77
- - [ ] Check issue labels are correct
78
-
79
- 3. **Template Validation**:
80
- - [ ] Locate correct template file
81
- - [ ] Verify template exists and is readable
82
- - [ ] Confirm naming convention understanding
83
-
84
- 4. **Technical Understanding**:
85
- - [ ] Understand relevant technical patterns for the issue
86
- - [ ] Plan test strategy for core functionality
87
-
88
- ### Validation Failure Response
89
- If any validation step fails:
90
- 1. Stop work immediately
91
- 2. Read missing documentation
92
- 3. Ask clarifying questions if needed
93
- 4. Resume only after validation complete
94
-
95
- ## CLEANUP
96
- When user confirms code is correctly merged into master, confirm with the user, then
97
- - delete remote branch
98
- - delete local branch
99
- - remove your local clone folder:
100
- ```
101
- cd ..
102
- Remove-Item -Recurse -Force "Ashley Calendar AI - Issue {issue_number}"
103
- ```
104
-
105
- Respect CODEOWNERS; don't modify auth/CI without approval.
@@ -1,205 +0,0 @@
1
- # Rule: spike-first-development
2
-
3
- **Path:** `rules/spike-first-development.md`
4
-
5
- ---
6
-
7
- # Spike-First Development Pattern
8
-
9
- ## INTENT
10
- Prevent the "Build First, Integrate Later" anti-pattern that leads to wasted work, technical debt, and incomplete implementations. Ensure agents validate technology compatibility and requirements understanding before building complex solutions.
11
-
12
- ## PRINCIPLES
13
- **"Validate Early, Validate Often"** - Always prove that your approach works with the smallest possible test before building anything complex.
14
-
15
- ## THE ANTI-PATTERN: "Build First, Integrate Later" ❌
16
-
17
- ### What It Looks Like
18
- 1. **Build Infrastructure First**: Create complex modular systems, frameworks, or architectures
19
- 2. **Assume Technology Support**: Assume unfamiliar technologies will support your approach
20
- 3. **Attempt Integration**: Discover incompatibilities or limitations late in the process
21
- 4. **Panic Implementation**: Rush to salvage work, often missing original requirements
22
-
23
- ### Why It's Dangerous
24
- - **Wasted Work**: Build incompatible solutions that must be thrown away
25
- - **Rushed Integration**: Leads to incomplete implementations and missed requirements
26
- - **Technical Debt**: Creates bloat and confusion in the codebase
27
- - **False Progress**: Appears productive while actually going backwards
28
- - **Missed Requirements**: Focus on infrastructure instead of actual goals
29
-
30
- ## THE CORRECT PATTERN: "Spike, Analyze, Implement Incrementally" ✅
31
-
32
- ### 1. SPIKE/PROOF-OF-CONCEPT FIRST (5-15 minutes)
33
- **Goal**: Validate the basic technology works with minimal effort
34
-
35
- **Examples**:
36
- - Testing Jinja in BAML: Add `{% if true %}Hello{% endif %}` to a prompt
37
- - Testing API integration: Make one simple API call
38
- - Testing database connection: Execute one basic query
39
- - Testing new library: Import and call one function
40
-
41
- **Questions to Answer**:
42
- - Does the technology support what I need?
43
- - What are the syntax requirements?
44
- - What are the limitations?
45
- - Does it integrate with existing systems?
46
-
47
- ### 2. ANALYZE DATA STRUCTURES (10-20 minutes)
48
- **Goal**: Understand what data is available for your implementation
49
-
50
- **Examples**:
51
- - Examine input/output classes and their fields
52
- - Review existing data flows and transformations
53
- - Identify what fields are available for conditional logic
54
- - Map data relationships and dependencies
55
-
56
- **Questions to Answer**:
57
- - What fields can I use for conditionals?
58
- - What data is available at runtime?
59
- - How does data flow through the system?
60
- - What are the data constraints?
61
-
62
- ### 3. IDENTIFY OPPORTUNITIES (15-30 minutes)
63
- **Goal**: Map requirements to implementation opportunities
64
-
65
- **Examples**:
66
- - Identify large code sections that should be conditional
67
- - Find repetitive patterns that can be optimized
68
- - Locate areas where data-driven logic would help
69
- - Spot opportunities for code reduction or simplification
70
-
71
- **Questions to Answer**:
72
- - Where should conditional logic be applied?
73
- - What sections are candidates for optimization?
74
- - How can I reduce complexity or bloat?
75
- - What are the highest-impact changes?
76
-
77
- ### 4. IMPLEMENT INCREMENTALLY (Variable time)
78
- **Goal**: Build one small piece at a time with continuous validation
79
-
80
- **Process**:
81
- - Add ONE conditional/feature at a time
82
- - Test after each change
83
- - Ensure existing functionality is preserved
84
- - Validate requirements are being met
85
- - Only proceed to next change after current one works
86
-
87
- **Examples**:
88
- - Add one `{% if %}` conditional, test, then add next
89
- - Implement one API endpoint, test, then add next
90
- - Add one database operation, test, then add next
91
-
92
- ### 5. VALIDATE CONTINUOUSLY (Throughout)
93
- **Goal**: Ensure each step works before proceeding
94
-
95
- **Validation Steps**:
96
- - Run tests after each change
97
- - Verify compilation/generation works
98
- - Check that existing functionality is preserved
99
- - Confirm requirements are being addressed
100
- - Get feedback early and often
101
-
102
- ## GOOD vs BAD EXAMPLES
103
-
104
- ### ❌ BAD: Jinja Templating Implementation
105
- ```
106
- 1. Create 15 modular Jinja template files
107
- 2. Build complex include system
108
- 3. Assume BAML supports {% include %}
109
- 4. Discover BAML doesn't support includes
110
- 5. Panic and rush minimal implementation
111
- 6. Miss obvious conditional opportunities
112
- 7. Break existing functionality
113
- ```
114
-
115
- ### ✅ GOOD: Jinja Templating Implementation
116
- ```
117
- 1. SPIKE: Test {% if true %}Hello{% endif %} in BAML (5 min)
118
- 2. ANALYZE: Examine CalendarIntent/AccountabilityInfo classes (10 min)
119
- 3. IDENTIFY: Map prompt sections to conditional opportunities (15 min)
120
- 4. IMPLEMENT: Add {% if accountability.accountable_party == "@me" %} around booking logic (20 min)
121
- 5. VALIDATE: Run tests, ensure functionality preserved (10 min)
122
- 6. REPEAT: Add next conditional incrementally
123
- ```
124
-
125
- ### ❌ BAD: API Integration
126
- ```
127
- 1. Build complex API client framework
128
- 2. Create elaborate error handling system
129
- 3. Design sophisticated caching layer
130
- 4. Discover API has rate limits that break the design
131
- 5. Rush to add rate limiting as afterthought
132
- 6. End up with over-engineered, fragile system
133
- ```
134
-
135
- ### ✅ GOOD: API Integration
136
- ```
137
- 1. SPIKE: Make one simple API call (5 min)
138
- 2. ANALYZE: Read API documentation for limits/constraints (15 min)
139
- 3. IDENTIFY: Determine what endpoints are needed (10 min)
140
- 4. IMPLEMENT: Add one endpoint call with basic error handling (30 min)
141
- 5. VALIDATE: Test the call works reliably (10 min)
142
- 6. REPEAT: Add next endpoint incrementally
143
- ```
144
-
145
- ### ❌ BAD: Database Schema Changes
146
- ```
147
- 1. Design complete new schema
148
- 2. Write migration scripts for all tables
149
- 3. Update all model classes
150
- 4. Discover performance issues with new design
151
- 5. Rush to add indexes and optimize queries
152
- 6. Break existing functionality in multiple places
153
- ```
154
-
155
- ### ✅ GOOD: Database Schema Changes
156
- ```
157
- 1. SPIKE: Test schema change on one small table (10 min)
158
- 2. ANALYZE: Review existing queries and performance (20 min)
159
- 3. IDENTIFY: Plan migration strategy and rollback plan (15 min)
160
- 4. IMPLEMENT: Change one table with migration (45 min)
161
- 5. VALIDATE: Test performance and functionality (15 min)
162
- 6. REPEAT: Migrate next table incrementally
163
- ```
164
-
165
- ## ENFORCEMENT RULES
166
-
167
- ### MANDATORY SPIKE REQUIREMENTS
168
- - **Any unfamiliar technology**: Must spike basic functionality first
169
- - **Any complex integration**: Must test simplest case first
170
- - **Any architectural changes**: Must validate approach with minimal example
171
- - **Any new libraries/frameworks**: Must test basic usage first
172
-
173
- ### VALIDATION CHECKPOINTS
174
- - After spike: Technology compatibility confirmed
175
- - After analysis: Data structures and constraints understood
176
- - After identification: Implementation plan is clear and achievable
177
- - After each increment: Functionality works and tests pass
178
- - Before completion: All requirements met and validated
179
-
180
- ### RED FLAGS (Stop and Spike)
181
- - Building complex systems without testing basic functionality
182
- - Making assumptions about unfamiliar technology capabilities
183
- - Creating elaborate architectures before validating core concepts
184
- - Spending significant time on infrastructure before proving it works
185
- - Claiming progress without demonstrable working functionality
186
-
187
- ## BENEFITS OF SPIKE-FIRST DEVELOPMENT
188
-
189
- 1. **Reduced Risk**: Discover incompatibilities early when they're cheap to fix
190
- 2. **Faster Delivery**: Avoid wasted work on incompatible approaches
191
- 3. **Better Quality**: Continuous validation ensures functionality is preserved
192
- 4. **Clearer Requirements**: Understanding constraints leads to better solutions
193
- 5. **Increased Confidence**: Each step is validated before proceeding
194
- 6. **Easier Debugging**: Problems are isolated to small, recent changes
195
-
196
- ## SUMMARY
197
-
198
- The spike-first development pattern prevents catastrophic failures by ensuring agents:
199
- - Validate technology compatibility before building
200
- - Understand data structures and constraints upfront
201
- - Implement incrementally with continuous validation
202
- - Focus on requirements rather than infrastructure
203
- - Avoid the dangerous "Build First, Integrate Later" anti-pattern
204
-
205
- **Remember**: It's always faster to spike first than to rebuild later.