fraim-framework 2.0.67 → 2.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/fraim.js +1 -1
- package/dist/src/cli/commands/doctor.js +1 -1
- package/dist/src/cli/commands/init-project.js +6 -12
- package/dist/src/cli/commands/list.js +1 -1
- package/dist/src/cli/commands/setup.js +15 -29
- package/dist/src/cli/commands/sync.js +36 -143
- package/dist/src/cli/fraim.js +0 -4
- package/dist/src/cli/setup/first-run.js +4 -4
- package/dist/src/cli/setup/ide-detector.js +15 -5
- package/dist/src/fraim/template-processor.js +7 -35
- package/dist/src/local-mcp-server/stdio-server.js +170 -181
- package/dist/src/utils/git-utils.js +2 -2
- package/dist/src/utils/object-utils.js +11 -0
- package/dist/src/utils/provider-utils.js +14 -0
- package/dist/src/utils/request-utils.js +23 -0
- package/dist/src/utils/workflow-parser.js +7 -7
- package/package.json +7 -5
- package/dist/registry/ai-manager-rules/customer-development-phases/phase1-customer-profiling.md +0 -101
- package/dist/registry/ai-manager-rules/customer-development-phases/phase2-platform-discovery.md +0 -235
- package/dist/registry/ai-manager-rules/customer-development-phases/phase3-prospect-qualification.md +0 -243
- package/dist/registry/ai-manager-rules/customer-development-phases/phase4-inventory-compilation.md +0 -206
- package/dist/registry/ai-manager-rules/design-phases/design-completeness-review.md +0 -73
- package/dist/registry/ai-manager-rules/design-phases/design-design.md +0 -145
- package/dist/registry/ai-manager-rules/design-phases/design.md +0 -108
- package/dist/registry/ai-manager-rules/design-phases/finalize.md +0 -60
- package/dist/registry/ai-manager-rules/design-phases/validate.md +0 -125
- package/dist/registry/ai-manager-rules/design.json +0 -97
- package/dist/registry/ai-manager-rules/implement-phases/code.md +0 -323
- package/dist/registry/ai-manager-rules/implement-phases/completeness-review.md +0 -94
- package/dist/registry/ai-manager-rules/implement-phases/finalize.md +0 -177
- package/dist/registry/ai-manager-rules/implement-phases/implement-code.md +0 -283
- package/dist/registry/ai-manager-rules/implement-phases/implement-completeness-review.md +0 -120
- package/dist/registry/ai-manager-rules/implement-phases/implement-regression.md +0 -173
- package/dist/registry/ai-manager-rules/implement-phases/implement-repro.md +0 -104
- package/dist/registry/ai-manager-rules/implement-phases/implement-scoping.md +0 -100
- package/dist/registry/ai-manager-rules/implement-phases/implement-smoke.md +0 -237
- package/dist/registry/ai-manager-rules/implement-phases/implement-spike.md +0 -121
- package/dist/registry/ai-manager-rules/implement-phases/implement-validate.md +0 -375
- package/dist/registry/ai-manager-rules/implement-phases/quality-review.md +0 -304
- package/dist/registry/ai-manager-rules/implement-phases/regression.md +0 -159
- package/dist/registry/ai-manager-rules/implement-phases/repro.md +0 -101
- package/dist/registry/ai-manager-rules/implement-phases/scoping.md +0 -93
- package/dist/registry/ai-manager-rules/implement-phases/smoke.md +0 -225
- package/dist/registry/ai-manager-rules/implement-phases/spike.md +0 -118
- package/dist/registry/ai-manager-rules/implement-phases/validate.md +0 -347
- package/dist/registry/ai-manager-rules/implement.json +0 -153
- package/dist/registry/ai-manager-rules/retrospective.md +0 -116
- package/dist/registry/ai-manager-rules/shared-phases/address-pr-feedback.md +0 -188
- package/dist/registry/ai-manager-rules/shared-phases/finalize.md +0 -169
- package/dist/registry/ai-manager-rules/shared-phases/submit-pr.md +0 -202
- package/dist/registry/ai-manager-rules/shared-phases/wait-for-pr-review.md +0 -170
- package/dist/registry/ai-manager-rules/spec-phases/finalize.md +0 -60
- package/dist/registry/ai-manager-rules/spec-phases/spec-competitor-analysis.md +0 -105
- package/dist/registry/ai-manager-rules/spec-phases/spec-completeness-review.md +0 -66
- package/dist/registry/ai-manager-rules/spec-phases/spec-spec.md +0 -139
- package/dist/registry/ai-manager-rules/spec-phases/spec.md +0 -102
- package/dist/registry/ai-manager-rules/spec-phases/validate.md +0 -118
- package/dist/registry/ai-manager-rules/spec.json +0 -112
- package/dist/registry/ai-manager-rules/test.json +0 -98
- package/dist/registry/ai-manager-rules/user-survey-phases/phase1-survey-scoping.md +0 -60
- package/dist/registry/ai-manager-rules/user-survey-phases/phase2-survey-build-linkedin.md +0 -23
- package/dist/registry/ai-manager-rules/user-survey-phases/phase3-survey-build-reddit.md +0 -22
- package/dist/registry/ai-manager-rules/user-survey-phases/phase4-survey-build-x.md +0 -21
- package/dist/registry/ai-manager-rules/user-survey-phases/phase5-survey-build-facebook.md +0 -19
- package/dist/registry/ai-manager-rules/user-survey-phases/phase6-survey-build-custom.md +0 -15
- package/dist/registry/ai-manager-rules/user-survey-phases/phase7-survey-dispatch.md +0 -45
- package/dist/registry/delivery/address-feedback.md +0 -83
- package/dist/registry/delivery/retrospective.md +0 -78
- package/dist/registry/delivery/submit.md +0 -79
- package/dist/registry/providers/ado.json +0 -19
- package/dist/registry/providers/delivery-conversation.json +0 -9
- package/dist/registry/providers/delivery-pr.json +0 -9
- package/dist/registry/providers/github.json +0 -19
- package/dist/registry/rules/agent-success-criteria.md +0 -101
- package/dist/registry/rules/agent-testing-guidelines.md +0 -502
- package/dist/registry/rules/architecture.md +0 -126
- package/dist/registry/rules/communication.md +0 -122
- package/dist/registry/rules/continuous-learning.md +0 -55
- package/dist/registry/rules/debugging-multitenancy-issues.md +0 -85
- package/dist/registry/rules/ephemeral-execution.md +0 -54
- package/dist/registry/rules/git-safe-commands.md +0 -34
- package/dist/registry/rules/hitl-ppe-record-analysis.md +0 -302
- package/dist/registry/rules/integrity-and-test-ethics.md +0 -275
- package/dist/registry/rules/local-development.md +0 -275
- package/dist/registry/rules/mandatory-pre-completion-reflection.md +0 -193
- package/dist/registry/rules/merge-requirements.md +0 -238
- package/dist/registry/rules/simplicity.md +0 -118
- package/dist/registry/rules/software-development-lifecycle.md +0 -105
- package/dist/registry/rules/spike-first-development.md +0 -205
- package/dist/registry/rules/successful-debugging-patterns.md +0 -488
- package/dist/registry/scripts/build-scripts-generator.js +0 -205
- package/dist/registry/scripts/cleanup-branch.js +0 -287
- package/dist/registry/scripts/evaluate-code-quality.js +0 -66
- package/dist/registry/scripts/exec-with-timeout.js +0 -142
- package/dist/registry/scripts/fraim-config.js +0 -61
- package/dist/registry/scripts/generate-engagement-emails.js +0 -705
- package/dist/registry/scripts/generic-issues-api.js +0 -100
- package/dist/registry/scripts/newsletter-helpers.js +0 -671
- package/dist/registry/scripts/openapi-generator.js +0 -664
- package/dist/registry/scripts/performance/profile-server.js +0 -390
- package/dist/registry/scripts/profile-server.js +0 -389
- package/dist/registry/scripts/run-thank-you-workflow.js +0 -92
- package/dist/registry/scripts/send-newsletter-simple.js +0 -85
- package/dist/registry/scripts/send-thank-you-emails.js +0 -54
- package/dist/registry/scripts/validate-openapi-limits.js +0 -311
- package/dist/registry/scripts/validate-test-coverage.js +0 -262
- package/dist/registry/scripts/verify-test-coverage.js +0 -66
- package/dist/registry/stubs/workflows/azure/cost-optimization.md +0 -11
- package/dist/registry/stubs/workflows/bootstrap/create-architecture.md +0 -11
- package/dist/registry/stubs/workflows/bootstrap/detect-broken-windows.md +0 -11
- package/dist/registry/stubs/workflows/bootstrap/evaluate-code-quality.md +0 -11
- package/dist/registry/stubs/workflows/bootstrap/verify-test-coverage.md +0 -11
- package/dist/registry/stubs/workflows/brainstorming/blue-sky-brainstorming.md +0 -11
- package/dist/registry/stubs/workflows/brainstorming/codebase-brainstorming.md +0 -11
- package/dist/registry/stubs/workflows/business-development/create-business-plan.md +0 -11
- package/dist/registry/stubs/workflows/business-development/ideate-business-opportunity.md +0 -11
- package/dist/registry/stubs/workflows/business-development/price-product.md +0 -18
- package/dist/registry/stubs/workflows/compliance/detect-compliance-requirements.md +0 -11
- package/dist/registry/stubs/workflows/compliance/generate-audit-evidence.md +0 -11
- package/dist/registry/stubs/workflows/compliance/soc2-evidence-generator.md +0 -11
- package/dist/registry/stubs/workflows/customer-development/insight-analysis.md +0 -11
- package/dist/registry/stubs/workflows/customer-development/insight-triage.md +0 -11
- package/dist/registry/stubs/workflows/customer-development/interview-preparation.md +0 -11
- package/dist/registry/stubs/workflows/customer-development/linkedin-outreach.md +0 -11
- package/dist/registry/stubs/workflows/customer-development/strategic-brainstorming.md +0 -11
- package/dist/registry/stubs/workflows/customer-development/thank-customers.md +0 -11
- package/dist/registry/stubs/workflows/customer-development/user-survey-dispatch.md +0 -11
- package/dist/registry/stubs/workflows/customer-development/users-to-target.md +0 -11
- package/dist/registry/stubs/workflows/customer-development/weekly-newsletter.md +0 -11
- package/dist/registry/stubs/workflows/deploy/cloud-deployment.md +0 -11
- package/dist/registry/stubs/workflows/improve-fraim/contribute.md +0 -11
- package/dist/registry/stubs/workflows/improve-fraim/file-issue.md +0 -11
- package/dist/registry/stubs/workflows/learning/build-skillset.md +0 -11
- package/dist/registry/stubs/workflows/learning/synthesize-learnings.md +0 -11
- package/dist/registry/stubs/workflows/legal/contract-review-analysis.md +0 -11
- package/dist/registry/stubs/workflows/legal/nda.md +0 -11
- package/dist/registry/stubs/workflows/legal/patent-filing.md +0 -11
- package/dist/registry/stubs/workflows/legal/saas-contract-development.md +0 -11
- package/dist/registry/stubs/workflows/legal/trademark-filing.md +0 -11
- package/dist/registry/stubs/workflows/marketing/content-creation.md +0 -11
- package/dist/registry/stubs/workflows/marketing/convert-to-pdf.md +0 -11
- package/dist/registry/stubs/workflows/marketing/create-modern-website.md +0 -11
- package/dist/registry/stubs/workflows/marketing/domain-registration.md +0 -11
- package/dist/registry/stubs/workflows/marketing/evangelize.md +0 -11
- package/dist/registry/stubs/workflows/marketing/hbr-article.md +0 -11
- package/dist/registry/stubs/workflows/marketing/launch-checklist.md +0 -11
- package/dist/registry/stubs/workflows/marketing/marketing-strategy.md +0 -11
- package/dist/registry/stubs/workflows/marketing/storytelling.md +0 -11
- package/dist/registry/stubs/workflows/performance/analyze-performance.md +0 -11
- package/dist/registry/stubs/workflows/product-building/design.md +0 -11
- package/dist/registry/stubs/workflows/product-building/implement.md +0 -11
- package/dist/registry/stubs/workflows/product-building/iterate-on-pr-comments.md +0 -11
- package/dist/registry/stubs/workflows/product-building/prep-issue.md +0 -11
- package/dist/registry/stubs/workflows/product-building/prototype.md +0 -11
- package/dist/registry/stubs/workflows/product-building/resolve.md +0 -11
- package/dist/registry/stubs/workflows/product-building/retrospect.md +0 -11
- package/dist/registry/stubs/workflows/product-building/spec.md +0 -11
- package/dist/registry/stubs/workflows/product-building/test.md +0 -11
- package/dist/registry/stubs/workflows/productivity-report/productivity-report.md +0 -11
- package/dist/registry/stubs/workflows/quality-assurance/browser-validation.md +0 -11
- package/dist/registry/stubs/workflows/quality-assurance/iterative-improvement-cycle.md +0 -11
- package/dist/registry/stubs/workflows/replicate/replicate-discovery.md +0 -11
- package/dist/registry/stubs/workflows/replicate/replicate-to-issues.md +0 -11
- package/dist/registry/stubs/workflows/reviewer/review-implementation-vs-design-spec.md +0 -11
- package/dist/registry/stubs/workflows/reviewer/review-implementation-vs-feature-spec.md +0 -11
- package/dist/registry/stubs/workflows/startup-credits/aws-activate-application.md +0 -11
- package/dist/registry/stubs/workflows/startup-credits/google-cloud-application.md +0 -11
- package/dist/registry/stubs/workflows/startup-credits/microsoft-azure-application.md +0 -11
- package/dist/registry/templates/bootstrap/ARCHITECTURE-TEMPLATE.md +0 -53
- package/dist/registry/templates/bootstrap/CODE-QUALITY-REPORT-TEMPLATE.md +0 -37
- package/dist/registry/templates/bootstrap/TEST-COVERAGE-REPORT-TEMPLATE.md +0 -35
- package/dist/registry/templates/business-development/IDEATION-REPORT-TEMPLATE.md +0 -29
- package/dist/registry/templates/business-development/PRICING-STRATEGY-TEMPLATE.md +0 -126
- package/dist/registry/templates/customer-development/customer-interview-template.md +0 -99
- package/dist/registry/templates/customer-development/customer-persona-template.md +0 -69
- package/dist/registry/templates/customer-development/follow-up-email-templates.md +0 -132
- package/dist/registry/templates/customer-development/insight-analysis-template.md +0 -74
- package/dist/registry/templates/customer-development/prospect-inventory-template.csv +0 -3
- package/dist/registry/templates/customer-development/search-strategy-template.md +0 -123
- package/dist/registry/templates/customer-development/strategic-recommendations-template.md +0 -53
- package/dist/registry/templates/customer-development/thank-you-email-template.html +0 -124
- package/dist/registry/templates/customer-development/thank-you-note-template.md +0 -16
- package/dist/registry/templates/customer-development/triage-log-template.md +0 -278
- package/dist/registry/templates/customer-development/weekly-newsletter-template.html +0 -204
- package/dist/registry/templates/evidence/Design-Evidence.md +0 -30
- package/dist/registry/templates/evidence/Implementation-BugEvidence.md +0 -122
- package/dist/registry/templates/evidence/Implementation-FeatureEvidence.md +0 -160
- package/dist/registry/templates/evidence/Spec-Evidence.md +0 -19
- package/dist/registry/templates/help/HelpNeeded.md +0 -14
- package/dist/registry/templates/legal/NDA-TEMPLATE.md +0 -170
- package/dist/registry/templates/legal/PATENT-TEMPLATE.md +0 -372
- package/dist/registry/templates/legal/TRADEMARK-TEMPLATE.md +0 -339
- package/dist/registry/templates/legal/contract-review-checklist.md +0 -193
- package/dist/registry/templates/legal/review-report-template.md +0 -198
- package/dist/registry/templates/legal/saas-terms-template.md +0 -174
- package/dist/registry/templates/legal/sow-template.md +0 -117
- package/dist/registry/templates/legal/template-variables.md +0 -131
- package/dist/registry/templates/marketing/DOMAIN-REGISTRATION-TEMPLATE.md +0 -194
- package/dist/registry/templates/marketing/EVANGELIZE-TEMPLATE.md +0 -102
- package/dist/registry/templates/marketing/HBR-ARTICLE-TEMPLATE.md +0 -66
- package/dist/registry/templates/marketing/STORYTELLING-TEMPLATE.md +0 -130
- package/dist/registry/templates/marketing/WEBSITE-TEMPLATE.md +0 -262
- package/dist/registry/templates/marketing/github-pages-workflow.yml +0 -64
- package/dist/registry/templates/replicate/implementation-checklist.md +0 -39
- package/dist/registry/templates/replicate/use-cases-template.md +0 -88
- package/dist/registry/templates/retrospective/RETROSPECTIVE-TEMPLATE.md +0 -55
- package/dist/registry/templates/specs/BUGSPEC-TEMPLATE.md +0 -37
- package/dist/registry/templates/specs/FEATURESPEC-TEMPLATE.md +0 -66
- package/dist/registry/templates/specs/TECHSPEC-TEMPLATE.md +0 -39
- package/dist/registry/workflows/azure/cost-optimization.md +0 -772
- package/dist/registry/workflows/bootstrap/create-architecture.md +0 -37
- package/dist/registry/workflows/bootstrap/detect-broken-windows.md +0 -300
- package/dist/registry/workflows/bootstrap/evaluate-code-quality.md +0 -35
- package/dist/registry/workflows/bootstrap/verify-test-coverage.md +0 -36
- package/dist/registry/workflows/brainstorming/blue-sky-brainstorming.md +0 -211
- package/dist/registry/workflows/brainstorming/codebase-brainstorming.md +0 -159
- package/dist/registry/workflows/business-development/create-business-plan.md +0 -737
- package/dist/registry/workflows/business-development/ideate-business-opportunity.md +0 -55
- package/dist/registry/workflows/business-development/price-product.md +0 -325
- package/dist/registry/workflows/compliance/detect-compliance-requirements.md +0 -80
- package/dist/registry/workflows/compliance/generate-audit-evidence.md +0 -80
- package/dist/registry/workflows/compliance/soc2-evidence-generator.md +0 -332
- package/dist/registry/workflows/customer-development/insight-analysis.md +0 -156
- package/dist/registry/workflows/customer-development/insight-triage.md +0 -933
- package/dist/registry/workflows/customer-development/interview-preparation.md +0 -452
- package/dist/registry/workflows/customer-development/linkedin-outreach.md +0 -599
- package/dist/registry/workflows/customer-development/strategic-brainstorming.md +0 -146
- package/dist/registry/workflows/customer-development/thank-customers.md +0 -203
- package/dist/registry/workflows/customer-development/user-survey-dispatch.md +0 -312
- package/dist/registry/workflows/customer-development/users-to-target.md +0 -427
- package/dist/registry/workflows/customer-development/weekly-newsletter.md +0 -366
- package/dist/registry/workflows/deploy/cloud-deployment.md +0 -310
- package/dist/registry/workflows/improve-fraim/contribute.md +0 -32
- package/dist/registry/workflows/improve-fraim/file-issue.md +0 -32
- package/dist/registry/workflows/learning/build-skillset.md +0 -212
- package/dist/registry/workflows/learning/synthesize-learnings.md +0 -369
- package/dist/registry/workflows/legal/contract-review-analysis.md +0 -382
- package/dist/registry/workflows/legal/nda.md +0 -69
- package/dist/registry/workflows/legal/patent-filing.md +0 -76
- package/dist/registry/workflows/legal/saas-contract-development.md +0 -204
- package/dist/registry/workflows/legal/trademark-filing.md +0 -77
- package/dist/registry/workflows/marketing/content-creation.md +0 -40
- package/dist/registry/workflows/marketing/convert-to-pdf.md +0 -265
- package/dist/registry/workflows/marketing/create-modern-website.md +0 -456
- package/dist/registry/workflows/marketing/domain-registration.md +0 -323
- package/dist/registry/workflows/marketing/evangelize.md +0 -426
- package/dist/registry/workflows/marketing/hbr-article.md +0 -73
- package/dist/registry/workflows/marketing/launch-checklist.md +0 -37
- package/dist/registry/workflows/marketing/marketing-strategy.md +0 -45
- package/dist/registry/workflows/marketing/storytelling.md +0 -65
- package/dist/registry/workflows/performance/analyze-performance.md +0 -65
- package/dist/registry/workflows/product-building/design.md +0 -263
- package/dist/registry/workflows/product-building/implement.md +0 -771
- package/dist/registry/workflows/product-building/iterate-on-pr-comments.md +0 -70
- package/dist/registry/workflows/product-building/prep-issue.md +0 -41
- package/dist/registry/workflows/product-building/prototype.md +0 -60
- package/dist/registry/workflows/product-building/resolve.md +0 -175
- package/dist/registry/workflows/product-building/retrospect.md +0 -86
- package/dist/registry/workflows/product-building/spec.md +0 -303
- package/dist/registry/workflows/product-building/test.md +0 -125
- package/dist/registry/workflows/productivity-report/productivity-report.md +0 -263
- package/dist/registry/workflows/quality-assurance/browser-validation.md +0 -221
- package/dist/registry/workflows/quality-assurance/iterative-improvement-cycle.md +0 -562
- package/dist/registry/workflows/replicate/replicate-discovery.md +0 -336
- package/dist/registry/workflows/replicate/replicate-to-issues.md +0 -319
- package/dist/registry/workflows/reviewer/review-implementation-vs-design-spec.md +0 -694
- package/dist/registry/workflows/reviewer/review-implementation-vs-feature-spec.md +0 -734
- package/dist/registry/workflows/startup-credits/aws-activate-application.md +0 -535
- package/dist/registry/workflows/startup-credits/google-cloud-application.md +0 -647
- package/dist/registry/workflows/startup-credits/microsoft-azure-application.md +0 -538
- package/dist/src/cli/commands/init.js +0 -148
- package/dist/src/cli/commands/mcp.js +0 -65
- package/dist/src/cli/commands/wizard.js +0 -35
- package/dist/src/fraim/issue-tracking/ado-provider.js +0 -304
- package/dist/src/fraim/issue-tracking/factory.js +0 -63
- package/dist/src/fraim/issue-tracking/github-provider.js +0 -200
- package/dist/src/fraim/issue-tracking/types.js +0 -7
- package/dist/src/fraim/issue-tracking-config.js +0 -83
- package/dist/src/fraim/retrospective-learner.js +0 -301
- package/dist/src/fraim/setup-wizard.js +0 -99
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
# Communication
|
|
2
|
-
|
|
3
|
-
## INTENT
|
|
4
|
-
To establish clear communication patterns and progress reporting standards that enable effective coordination between agents and stakeholders, ensuring transparent progress tracking and proper status updates throughout the development process.
|
|
5
|
-
|
|
6
|
-
## PRINCIPLES
|
|
7
|
-
- **Clear Communication**: Provide transparent progress updates
|
|
8
|
-
- **Evidence-Based**: Show concrete progress with specific details
|
|
9
|
-
- **Consistent Format**: Use standardized reporting templates
|
|
10
|
-
- **Stakeholder Focus**: Communicate what matters to reviewers and users
|
|
11
|
-
- **Actionable Updates**: Provide clear next steps and blocking issues
|
|
12
|
-
- **Ask for help**: When blocked and out of options, ask user for help
|
|
13
|
-
- **ABSOLUTE ACCOUNTABILITY**: Agent is 100% responsible for fixing their own work and mistakes
|
|
14
|
-
|
|
15
|
-
## COMMUNICATION REQUIREMENTS
|
|
16
|
-
|
|
17
|
-
### Progress Updates
|
|
18
|
-
Always provide clear progress updates with:
|
|
19
|
-
1. **Actions executed** (imperative, past tense)
|
|
20
|
-
2. **Local progress** (files modified, tests run)
|
|
21
|
-
3. **Remote artifacts** (branch, PR status)
|
|
22
|
-
4. **Next steps** for this issue
|
|
23
|
-
5. **Blocking issues** (if any)
|
|
24
|
-
|
|
25
|
-
### Status Reporting
|
|
26
|
-
- **Be specific**: "Fixed calendar sync timeout" not "Made changes"
|
|
27
|
-
- **Include evidence**: "Tests run: npm test test-calendar-sync.ts ✅ PASSED"
|
|
28
|
-
- **Show concrete progress**: "Files modified: src/calendar-api.ts, test-calendar-sync.ts"
|
|
29
|
-
- **Indicate readiness**: "Ready for code review" vs "Still working on implementation"
|
|
30
|
-
|
|
31
|
-
### Communication Channel
|
|
32
|
-
- **GitHub**: The PR is the best way to communicate with your stakeholders. Update the PR with standard templates as covered below
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
## COMMUNICATION TEMPLATES
|
|
36
|
-
1. When you need feedback on a completed spec - Retrieve via `get_fraim_file({ path: "templates/evidence/Spec-Evidence.md" })`
|
|
37
|
-
2. When you need feedback on a completed design - Retrieve via `get_fraim_file({ path: "templates/evidence/Design-Evidence.md" })`
|
|
38
|
-
3. When you need feedback on a completed bug fix implementation - Retrieve via `get_fraim_file({ path: "templates/evidence/Implementation-BugEvidence.md" })`
|
|
39
|
-
4. When you need feedback on a completed feature implementation - Retrieve via `get_fraim_file({ path: "templates/evidence/Implementation-FeatureEvidence.md" })`
|
|
40
|
-
5. When you are stuck and need help - Retrieve via `get_fraim_file({ path: "templates/help/HelpNeeded.md" })`
|
|
41
|
-
|
|
42
|
-
## EXAMPLES
|
|
43
|
-
|
|
44
|
-
### Good: Clear Progress Update
|
|
45
|
-
```
|
|
46
|
-
Summary:
|
|
47
|
-
- Local progress: Fixed calendar sync timeout, added retry logic, ran tests
|
|
48
|
-
- Files modified: src/calendar-api.ts, test-calendar-sync.ts
|
|
49
|
-
- Tests run: npm test test-calendar-sync.ts ✅ PASSED
|
|
50
|
-
- Remote status: Branch feature/84-fix-sync pushed, Draft PR created
|
|
51
|
-
- Next steps: Wait for code review
|
|
52
|
-
- Blocking issues: None
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Bad: Vague Progress Update
|
|
56
|
-
```
|
|
57
|
-
Summary:
|
|
58
|
-
- Local progress: Made some changes
|
|
59
|
-
- Remote status: Something happened
|
|
60
|
-
- Next steps: Not sure
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Good: Specific Status Update
|
|
64
|
-
```
|
|
65
|
-
Issue #84: "Fix calendar sync timeout"
|
|
66
|
-
- ✅ Identified root cause: Missing retry logic in calendar API
|
|
67
|
-
- ✅ Implemented exponential backoff with jitter
|
|
68
|
-
- ✅ Added comprehensive test coverage (5 new test cases)
|
|
69
|
-
- ✅ All tests passing locally
|
|
70
|
-
- ✅ Pushed to feature/84-fix-sync
|
|
71
|
-
- ✅ Draft PR created and ready for review
|
|
72
|
-
- Next: Waiting for code review feedback
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### Bad: Generic Status Update
|
|
76
|
-
```
|
|
77
|
-
Issue #84: "Fix calendar sync timeout"
|
|
78
|
-
- Working on it
|
|
79
|
-
- Made some changes
|
|
80
|
-
- Need to test more
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## ACCOUNTABILITY AND RESPONSIBILITY RULES
|
|
84
|
-
|
|
85
|
-
### ABSOLUTE ACCOUNTABILITY PRINCIPLE
|
|
86
|
-
**The agent is 100% responsible for fixing their own work and mistakes. No exceptions.**
|
|
87
|
-
|
|
88
|
-
### PROHIBITED ACCOUNTABILITY DEFLECTION
|
|
89
|
-
**NEVER suggest the user should handle the agent's responsibilities:**
|
|
90
|
-
|
|
91
|
-
❌ **PROHIBITED LANGUAGE:**
|
|
92
|
-
- "Would you like me to work with you to fix this, or would you prefer to handle it yourself?"
|
|
93
|
-
- "Should I do X or would you prefer to do Y?"
|
|
94
|
-
- "Do you want to fix this yourself?"
|
|
95
|
-
- "Can you handle this part for me?"
|
|
96
|
-
- "Would you like to take over this task?"
|
|
97
|
-
|
|
98
|
-
✅ **REQUIRED LANGUAGE:**
|
|
99
|
-
- "I will fix this myself"
|
|
100
|
-
- "I am working to resolve this issue"
|
|
101
|
-
- "I will complete the proper validation"
|
|
102
|
-
- "I take full responsibility for this mistake"
|
|
103
|
-
|
|
104
|
-
### HELP vs RESPONSIBILITY DISTINCTION
|
|
105
|
-
|
|
106
|
-
**APPROPRIATE Help Requests (when genuinely blocked):**
|
|
107
|
-
- "I'm blocked on X technical issue, can you provide guidance?"
|
|
108
|
-
- "I need clarification on Y requirement"
|
|
109
|
-
- "I'm stuck on Z approach, what direction should I take?"
|
|
110
|
-
|
|
111
|
-
**INAPPROPRIATE Responsibility Deflection:**
|
|
112
|
-
- "Can you handle this testing for me?"
|
|
113
|
-
- "Would you prefer to do this validation yourself?"
|
|
114
|
-
- "Should I continue or do you want to take over?"
|
|
115
|
-
|
|
116
|
-
### OWNERSHIP PROTOCOL
|
|
117
|
-
- **Agent breaks it** → **Agent fixes it**
|
|
118
|
-
- **Agent makes mistake** → **Agent corrects it**
|
|
119
|
-
- **Agent claims false success** → **Agent provides real validation**
|
|
120
|
-
- **Agent creates problems** → **Agent solves them**
|
|
121
|
-
|
|
122
|
-
**No exceptions. No deflection. No user responsibility for agent mistakes.**
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Continuous Learning
|
|
2
|
-
|
|
3
|
-
## INTENT
|
|
4
|
-
To prevent repeating past mistakes and build upon existing solutions by systematically learning from retrospectives, RFCs, and historical issue patterns, ensuring continuous improvement and knowledge accumulation across all agents.
|
|
5
|
-
|
|
6
|
-
## PRINCIPLES
|
|
7
|
-
- **Learn from History**: Always review past work before starting new tasks
|
|
8
|
-
- **Build on Success**: Apply proven solutions rather than reinventing
|
|
9
|
-
- **Avoid Known Pitfalls**: Use retrospectives to prevent recurring issues
|
|
10
|
-
- **Share Knowledge**: Document learnings for future agents
|
|
11
|
-
- **Pattern Recognition**: Identify recurring problems and solutions
|
|
12
|
-
|
|
13
|
-
## MANDATORY LEARNING WORKFLOW
|
|
14
|
-
|
|
15
|
-
### Before Starting Any Work
|
|
16
|
-
1. **Search retrospectives** for related issues or similar problems
|
|
17
|
-
2. **Read relevant RFCs** to understand the design context
|
|
18
|
-
3. **Review test cases** to see expected behavior
|
|
19
|
-
4. **Check issue comments** for previous attempts and solutions
|
|
20
|
-
|
|
21
|
-
### Knowledge Sources
|
|
22
|
-
- **Retrospectives**: `/retrospectives/` folder for past problem analysis
|
|
23
|
-
- **RFCs**: `/docs/rfcs/` for design decisions and architectural context
|
|
24
|
-
- **Test Cases**: Existing tests show expected behavior patterns
|
|
25
|
-
- **Issue History**: Comments and PRs reveal previous attempts and solutions
|
|
26
|
-
|
|
27
|
-
## EXAMPLES
|
|
28
|
-
|
|
29
|
-
### Good: Learning from History
|
|
30
|
-
```
|
|
31
|
-
Issue: "Fix calendar sync timeout"
|
|
32
|
-
Before Starting:
|
|
33
|
-
- ✅ Read retrospective on issue-45 (similar timeout problem)
|
|
34
|
-
- ✅ Found root cause: missing retry logic
|
|
35
|
-
- ✅ Applied proven solution: exponential backoff
|
|
36
|
-
- ✅ Avoided known pitfall: infinite retry loops
|
|
37
|
-
Result: Fixed in 1 iteration using proven approach
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Bad: Ignoring History
|
|
41
|
-
```
|
|
42
|
-
Issue: "Fix calendar sync timeout"
|
|
43
|
-
Approach:
|
|
44
|
-
- ❌ Started coding immediately without research
|
|
45
|
-
- ❌ Implemented naive retry logic
|
|
46
|
-
- ❌ Hit same infinite loop issue from issue-45
|
|
47
|
-
- ❌ Wasted 3 iterations on known problem
|
|
48
|
-
Result: Eventually found retrospective, but too late
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## RETROSPECTIVE CREATION
|
|
52
|
-
- **Use template**: Retrieve via `get_fraim_file({ path: "templates/retrospective/RETROSPECTIVE-TEMPLATE.md" })` for consistent structure
|
|
53
|
-
- **Follow process**: Use the `get_fraim_file({ path: "workflows/product-building/retrospect.md" })` workflow for retrospective creation workflow
|
|
54
|
-
|
|
55
|
-
Remember: The best code is often written by those who learn from history rather than repeat it.
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# Systematic Debugging Approach for Multi-Tenancy issues
|
|
2
|
-
|
|
3
|
-
## INTENT
|
|
4
|
-
To prevent inefficient debugging practices that waste time and frustrate users by running tests repeatedly without fixing root causes.
|
|
5
|
-
|
|
6
|
-
## PRINCIPLES
|
|
7
|
-
- Analyze test failures before re-running tests
|
|
8
|
-
- Focus on broken functionality, not working tests
|
|
9
|
-
- Follow user instructions immediately
|
|
10
|
-
- Fix root causes, not symptoms
|
|
11
|
-
- Use systematic approach for multi-tenancy debugging
|
|
12
|
-
|
|
13
|
-
## MANDATORY DEBUGGING WORKFLOW
|
|
14
|
-
|
|
15
|
-
### 1. **Before Re-running Any Test**
|
|
16
|
-
- [ ] Read the test output carefully to understand WHY it failed
|
|
17
|
-
- [ ] Identify the specific error messages or assertions that failed
|
|
18
|
-
- [ ] Determine if it's a configuration issue, missing data, or broken functionality
|
|
19
|
-
- [ ] Plan the specific fix needed
|
|
20
|
-
|
|
21
|
-
### 2. **Multi-Tenancy Debugging Checklist**
|
|
22
|
-
- [ ] Verify executive context is being passed correctly (headers + query params)
|
|
23
|
-
- [ ] Check that API calls include `x-executive-id` header
|
|
24
|
-
- [ ] Ensure test navigation includes `executive_id` query parameter
|
|
25
|
-
- [ ] Verify middleware is extracting executive context properly
|
|
26
|
-
- [ ] Check that database operations use correct executive ID
|
|
27
|
-
|
|
28
|
-
### 3. **Test Analysis Template**
|
|
29
|
-
When a test fails, answer these questions:
|
|
30
|
-
- What specific assertion failed?
|
|
31
|
-
- What data was expected vs. what was received?
|
|
32
|
-
- Is the issue in the test setup, API call, or UI logic?
|
|
33
|
-
- Are all required headers/parameters being sent?
|
|
34
|
-
- Is the executive context being set correctly?
|
|
35
|
-
|
|
36
|
-
### 4. **Prohibited Actions**
|
|
37
|
-
- ❌ Running the same failing test multiple times without analysis
|
|
38
|
-
- ❌ Adding debug logging without fixing the underlying issue
|
|
39
|
-
- ❌ Running tests that are already working
|
|
40
|
-
- ❌ Ignoring specific user instructions
|
|
41
|
-
- ❌ Making assumptions about what's broken
|
|
42
|
-
|
|
43
|
-
### 5. **Required Actions**
|
|
44
|
-
- ✅ Analyze test output to identify root cause
|
|
45
|
-
- ✅ Fix the specific issue identified
|
|
46
|
-
- ✅ Verify the fix works before moving on
|
|
47
|
-
- ✅ Follow user instructions exactly as given
|
|
48
|
-
- ✅ Focus on broken functionality only
|
|
49
|
-
|
|
50
|
-
## COMMON MULTI-TENANCY ISSUES
|
|
51
|
-
|
|
52
|
-
### Executive Context Problems
|
|
53
|
-
- **Symptom**: "No executive_id found in request" or "Invalid executive context"
|
|
54
|
-
- **Root Cause**: Missing `x-executive-id` header in API calls
|
|
55
|
-
- **Fix**: Add `'x-executive-id': getExecutiveId()` to all API call headers
|
|
56
|
-
|
|
57
|
-
### Test Navigation Issues
|
|
58
|
-
- **Symptom**: Test can't find records or gets wrong data
|
|
59
|
-
- **Root Cause**: Missing `executive_id` query parameter in navigation URLs
|
|
60
|
-
- **Fix**: Include `&executive_id=${this.testExecutiveId}` in all test navigation
|
|
61
|
-
|
|
62
|
-
### Middleware Context Issues
|
|
63
|
-
- **Symptom**: API returns 401 or wrong data
|
|
64
|
-
- **Root Cause**: Middleware not setting executive context properly
|
|
65
|
-
- **Fix**: Ensure middleware extracts from headers first, query params as fallback
|
|
66
|
-
|
|
67
|
-
## SUCCESS METRICS
|
|
68
|
-
- Tests pass on first re-run after fixes
|
|
69
|
-
- No more than 2 iterations per test case
|
|
70
|
-
- User satisfaction with debugging efficiency
|
|
71
|
-
- Clear identification of root causes before fixes
|
|
72
|
-
|
|
73
|
-
## ANTI-PATTERNS TO AVOID
|
|
74
|
-
|
|
75
|
-
1. **Debug Loop Anti-Pattern**: Running same test repeatedly without analysis
|
|
76
|
-
2. **Symptom Fixing Anti-Pattern**: Adding logging instead of fixing functionality
|
|
77
|
-
3. **Working Test Anti-Pattern**: Running tests that already pass
|
|
78
|
-
4. **Instruction Ignoring Anti-Pattern**: Not following specific user guidance
|
|
79
|
-
5. **Assumption Anti-Pattern**: Guessing what's wrong instead of analyzing
|
|
80
|
-
|
|
81
|
-
## ENFORCEMENT
|
|
82
|
-
- Every test failure must be analyzed before re-running
|
|
83
|
-
- User instructions take priority over agent assumptions
|
|
84
|
-
- Focus on broken functionality only
|
|
85
|
-
- Document root cause analysis in comments
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Rule: Direct Script Execution
|
|
2
|
-
|
|
3
|
-
FRAIM scripts are pre-synchronized to the user's local directory and executed directly from there.
|
|
4
|
-
|
|
5
|
-
## Policy
|
|
6
|
-
|
|
7
|
-
1. **Pre-Synchronized Scripts**: All FRAIM scripts are automatically synced to `~/.fraim/scripts/` during `fraim init` and `fraim sync`.
|
|
8
|
-
2. **Direct Execution**: Execute scripts directly from the user scripts directory using standard shell commands.
|
|
9
|
-
3. **No Fetching Required**: Scripts are already available locally - no need to fetch from MCP server.
|
|
10
|
-
|
|
11
|
-
## Script Location
|
|
12
|
-
|
|
13
|
-
Scripts are located in the user's home directory at `~/.fraim/scripts/`
|
|
14
|
-
|
|
15
|
-
**Note for Windows users**: Always use Git Bash terminal to ensure `~` path expansion works correctly.
|
|
16
|
-
|
|
17
|
-
## Implementation Pattern
|
|
18
|
-
|
|
19
|
-
When a script is needed:
|
|
20
|
-
|
|
21
|
-
1. **Verify Sync**: Ensure scripts are up to date with `fraim sync` if needed
|
|
22
|
-
2. **Execute Directly**: Run the script from its synced location
|
|
23
|
-
3. **Working Directory**: Scripts operate on the current working directory
|
|
24
|
-
|
|
25
|
-
## Example (Bash)
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
# Execute script directly from synced location
|
|
29
|
-
~/.fraim/scripts/prep-issue.sh 123
|
|
30
|
-
|
|
31
|
-
# TypeScript scripts
|
|
32
|
-
npx tsx ~/.fraim/scripts/generate-engagement-emails.ts
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Example (Node.js/JavaScript)
|
|
36
|
-
|
|
37
|
-
```javascript
|
|
38
|
-
// Execute script using child_process
|
|
39
|
-
const { execSync } = require('child_process');
|
|
40
|
-
const os = require('os');
|
|
41
|
-
const path = require('path');
|
|
42
|
-
|
|
43
|
-
const scriptsDir = path.join(os.homedir(), '.fraim', 'scripts');
|
|
44
|
-
const scriptPath = path.join(scriptsDir, 'prep-issue.sh');
|
|
45
|
-
|
|
46
|
-
// Execute script
|
|
47
|
-
execSync(`"${scriptPath}" 123`, {
|
|
48
|
-
cwd: process.cwd(), // Current working directory
|
|
49
|
-
stdio: 'inherit'
|
|
50
|
-
});
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
> [!IMPORTANT]
|
|
54
|
-
> This rule replaces the previous ephemeral execution pattern. Scripts are now treated as pre-installed tools rather than dynamic content.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Git Safe Commands Rule
|
|
2
|
-
|
|
3
|
-
## Problem
|
|
4
|
-
Some Git commands (`git log`, `git diff`, `git branch`, `git commit`) open an interactive pager or editor, which causes Windsurf agents to hang.
|
|
5
|
-
|
|
6
|
-
## Rule
|
|
7
|
-
Agents **must not** run Git commands that may open interactive prompts or pagers **without non-interactive flags**.
|
|
8
|
-
|
|
9
|
-
### Disallowed (will hang)
|
|
10
|
-
- `git log`
|
|
11
|
-
- `git diff`
|
|
12
|
-
- `git branch`
|
|
13
|
-
- `git commit`
|
|
14
|
-
|
|
15
|
-
### Allowed (safe variants)
|
|
16
|
-
- `git log --oneline --no-pager`
|
|
17
|
-
- `git diff --no-pager`
|
|
18
|
-
- `git branch --no-color`
|
|
19
|
-
- `git commit -m "message"`
|
|
20
|
-
|
|
21
|
-
## Enforcement
|
|
22
|
-
If an agent attempts to run one of the disallowed forms, **reject the command** and suggest the safe variant instead.
|
|
23
|
-
|
|
24
|
-
## Examples
|
|
25
|
-
❌ `git log` → hangs
|
|
26
|
-
✅ `git log --oneline --no-pager` → safe
|
|
27
|
-
|
|
28
|
-
❌ `git diff` → hangs
|
|
29
|
-
✅ `git diff --no-pager` → safe
|
|
30
|
-
|
|
31
|
-
❌ `git commit` → opens editor
|
|
32
|
-
✅ `git commit -m "Fix issue #123"` → safe
|
|
33
|
-
|
|
34
|
-
---
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
# HITL PPE Record Analysis & Debugging Patterns
|
|
2
|
-
|
|
3
|
-
## INTENT
|
|
4
|
-
To provide agents with systematic patterns for analyzing HITL (Human-In-The-Loop) records from PPE database, categorizing issues, and implementing appropriate fixes. This rule ensures consistent analysis and prevents overfitting or missing root causes.
|
|
5
|
-
|
|
6
|
-
## PRINCIPLES
|
|
7
|
-
- **Systematic Analysis**: Always follow a structured approach (query → analyze → categorize → fix)
|
|
8
|
-
- **Categorize Before Fixing**: Distinguish systemic issues from executive preferences before implementing
|
|
9
|
-
- **Leverage Existing Infrastructure**: Check if existing features can handle needs before adding new fields
|
|
10
|
-
- **Minimal Fixes**: Focus on smallest changes that solve the problem
|
|
11
|
-
- **Avoid Overfitting**: Use generic examples, never specific person names or scenarios
|
|
12
|
-
|
|
13
|
-
## CORE WORKFLOW PATTERN
|
|
14
|
-
|
|
15
|
-
### The "Query → Filter → Analyze → Categorize → Fix → Document" Pattern
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
1. QUERY: Connect to PPE database and query HITL records
|
|
19
|
-
2. FILTER: Exclude test/synthetic data (e.g., ChatGPT records)
|
|
20
|
-
3. ANALYZE: Extract reviewer feedback patterns and identify issues
|
|
21
|
-
4. CATEGORIZE: Divide into systemic (BAML/code) vs preferences (configurable)
|
|
22
|
-
5. FIX: Implement minimal fixes for systemic issues
|
|
23
|
-
6. DOCUMENT: Create GitHub issues for preference gaps
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## RULE 1: Data Collection & Filtering
|
|
27
|
-
|
|
28
|
-
### When Querying HITL Records
|
|
29
|
-
|
|
30
|
-
**Always filter by source:**
|
|
31
|
-
- Exclude test/synthetic records: `Inputs.source != 'chatgpt'`
|
|
32
|
-
- Handle missing source fields: Use `$or` with `$exists: false`
|
|
33
|
-
- Filter for non-empty reviewer feedback: `ReviewerFeeback: { $exists: true, $regex: /\S/ }`
|
|
34
|
-
|
|
35
|
-
**Query Pattern:**
|
|
36
|
-
```typescript
|
|
37
|
-
const query = {
|
|
38
|
-
ReviewerFeeback: {
|
|
39
|
-
$exists: true,
|
|
40
|
-
$regex: /\S/ // At least one non-whitespace character
|
|
41
|
-
},
|
|
42
|
-
$or: [
|
|
43
|
-
{ 'Inputs.source': { $exists: false } },
|
|
44
|
-
{ 'Inputs.source': { $ne: 'chatgpt' } }
|
|
45
|
-
]
|
|
46
|
-
};
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**Verification:**
|
|
50
|
-
- [ ] Verify record count makes sense (not too many/too few)
|
|
51
|
-
- [ ] Check that filtered results exclude test data
|
|
52
|
-
- [ ] Confirm reviewer feedback exists and is non-empty
|
|
53
|
-
|
|
54
|
-
## RULE 2: Issue Categorization
|
|
55
|
-
|
|
56
|
-
### Before Implementing Fixes, Categorize All Issues
|
|
57
|
-
|
|
58
|
-
**Systemic Issues (BAML/Code Fixes):**
|
|
59
|
-
- ✅ Affect all executives universally
|
|
60
|
-
- ✅ Examples: Fake conference links, date logic errors, missing calendar data extraction, accountability violations
|
|
61
|
-
- **Action**: Fix in BAML prompts or code logic
|
|
62
|
-
|
|
63
|
-
**Executive Preferences (Configurable):**
|
|
64
|
-
- ✅ Differ per executive
|
|
65
|
-
- ✅ Examples: Time preferences (avoid 6-7pm), location defaults (virtual vs in-person), verbosity level
|
|
66
|
-
- **Action**: Add to ExecutivePreferences schema OR use existing infrastructure (focus blocks)
|
|
67
|
-
|
|
68
|
-
**Hybrid Issues:**
|
|
69
|
-
- ✅ Core logic is systemic, but thresholds/preferences differ
|
|
70
|
-
- **Action**: Implement systemic fix with configurable parameters
|
|
71
|
-
|
|
72
|
-
**Categorization Checklist:**
|
|
73
|
-
- [ ] Identify which category each issue belongs to
|
|
74
|
-
- [ ] Verify categorization makes sense (would this affect all executives?)
|
|
75
|
-
- [ ] Check if existing infrastructure can handle preference needs
|
|
76
|
-
- [ ] Only add new fields after confirming no existing solution
|
|
77
|
-
|
|
78
|
-
## RULE 3: Leverage Existing Infrastructure
|
|
79
|
-
|
|
80
|
-
### Before Adding New Preference Fields
|
|
81
|
-
|
|
82
|
-
**Check if focus blocks can handle it:**
|
|
83
|
-
- Time-based preferences (avoided windows, thresholds) → Use HIGH protection focus blocks
|
|
84
|
-
- Example: "Avoid 6-7pm meetings" → Create focus block with HIGH protection for 6-7pm
|
|
85
|
-
|
|
86
|
-
**Check if rules can handle it:**
|
|
87
|
-
- Natural language rules may cover edge cases
|
|
88
|
-
- Example: "Prefer in-person for direct reports" → Could use rule with condition
|
|
89
|
-
|
|
90
|
-
**Only add new fields if:**
|
|
91
|
-
- ❌ No existing infrastructure can handle the use case
|
|
92
|
-
- ✅ The preference is structural (location type, duration defaults)
|
|
93
|
-
- ✅ It needs explicit configuration (not inferable from behavior)
|
|
94
|
-
|
|
95
|
-
**Infrastructure Check:**
|
|
96
|
-
- [ ] Check `ExecutivePreferences` schema for existing fields
|
|
97
|
-
- [ ] Check if `focus_blocks` can handle time-based preferences
|
|
98
|
-
- [ ] Check if `rules` can handle natural language preferences
|
|
99
|
-
- [ ] Only add new fields after confirming no existing solution
|
|
100
|
-
|
|
101
|
-
## RULE 4: BAML Prompt Updates
|
|
102
|
-
|
|
103
|
-
### When Fixing Systemic Issues in BAML
|
|
104
|
-
|
|
105
|
-
**Add explicit instructions:**
|
|
106
|
-
- Don't rely on implicit understanding
|
|
107
|
-
- Use phrases like "NEVER", "CRITICAL", "MUST NOT"
|
|
108
|
-
- Example: "NEVER generate conference links" not "Don't generate conference links"
|
|
109
|
-
|
|
110
|
-
**Use multiple locations:**
|
|
111
|
-
- Add rules in all relevant sections
|
|
112
|
-
- Example: Conference link prohibition → LocationGuidelines, EmailResponseGuidelines, CalendarInviteDetails
|
|
113
|
-
|
|
114
|
-
**Provide examples:**
|
|
115
|
-
- Include both correct ✅ and incorrect ❌ examples
|
|
116
|
-
- Show what NOT to do, not just what to do
|
|
117
|
-
|
|
118
|
-
**List banned phrases explicitly:**
|
|
119
|
-
- When fixing verbosity/accountability, list specific phrases to avoid
|
|
120
|
-
- Example: "DO NOT say: 'I'll note it for the team', 'I can take responsibility', etc."
|
|
121
|
-
|
|
122
|
-
**Avoid overfitting:**
|
|
123
|
-
- ❌ Never use specific person names ("Lindy", "Sarah")
|
|
124
|
-
- ✅ Use generic examples ("a person", "someone coordinating")
|
|
125
|
-
- ✅ Use placeholder variables when possible
|
|
126
|
-
|
|
127
|
-
**BAML Update Checklist:**
|
|
128
|
-
- [ ] No specific person names (generic examples only)
|
|
129
|
-
- [ ] Explicit instructions (NEVER, CRITICAL, MUST NOT)
|
|
130
|
-
- [ ] Multiple relevant sections updated if needed
|
|
131
|
-
- [ ] Banned phrases listed explicitly
|
|
132
|
-
- [ ] Examples provided (correct and incorrect)
|
|
133
|
-
- [ ] Regenerated BAML client (`npm run generate`)
|
|
134
|
-
|
|
135
|
-
## RULE 5: Iterative Refinement
|
|
136
|
-
|
|
137
|
-
### For Complex Rule Updates
|
|
138
|
-
|
|
139
|
-
**Start with core rule:**
|
|
140
|
-
- Add basic rule first
|
|
141
|
-
- Test to see if it works
|
|
142
|
-
|
|
143
|
-
**Test edge cases:**
|
|
144
|
-
- Identify problematic phrases/behaviors
|
|
145
|
-
- Look for variations of the issue
|
|
146
|
-
|
|
147
|
-
**Iterate:**
|
|
148
|
-
- Add specific exceptions and banned phrases
|
|
149
|
-
- Refine based on user feedback
|
|
150
|
-
|
|
151
|
-
**Regenerate and verify:**
|
|
152
|
-
- Always run `npm run generate` after changes
|
|
153
|
-
- Check for lint errors (note pre-existing vs new)
|
|
154
|
-
|
|
155
|
-
**Refinement Checklist:**
|
|
156
|
-
- [ ] Core rule added
|
|
157
|
-
- [ ] Edge cases identified
|
|
158
|
-
- [ ] Specific exceptions added
|
|
159
|
-
- [ ] BAML client regenerated
|
|
160
|
-
- [ ] Lint errors checked
|
|
161
|
-
|
|
162
|
-
## RULE 6: Minimal Fixes Strategy
|
|
163
|
-
|
|
164
|
-
### When Implementing Fixes
|
|
165
|
-
|
|
166
|
-
**Focus on root cause:**
|
|
167
|
-
- Don't fix symptoms, fix the underlying issue
|
|
168
|
-
- Example: Don't add workarounds, fix the prompt logic
|
|
169
|
-
|
|
170
|
-
**Smallest change:**
|
|
171
|
-
- Make the minimal change that solves the problem
|
|
172
|
-
- Avoid over-engineering
|
|
173
|
-
|
|
174
|
-
**Multiple locations if needed:**
|
|
175
|
-
- If issue appears in multiple places, fix all instances
|
|
176
|
-
- Don't partially fix
|
|
177
|
-
|
|
178
|
-
**Don't over-engineer:**
|
|
179
|
-
- Avoid adding complex logic when simple rule updates work
|
|
180
|
-
- Example: Adding validation code when prompt instruction works
|
|
181
|
-
|
|
182
|
-
**Minimal Fix Checklist:**
|
|
183
|
-
- [ ] Root cause identified (not just symptom)
|
|
184
|
-
- [ ] Smallest possible change made
|
|
185
|
-
- [ ] All instances fixed if issue appears multiple times
|
|
186
|
-
- [ ] No unnecessary complexity added
|
|
187
|
-
|
|
188
|
-
## RULE 7: Documentation
|
|
189
|
-
|
|
190
|
-
### After Analysis
|
|
191
|
-
|
|
192
|
-
**Create analysis document:**
|
|
193
|
-
- Document findings, patterns, and recommendations
|
|
194
|
-
- Include specific examples from records
|
|
195
|
-
- Link to source data
|
|
196
|
-
|
|
197
|
-
**Create GitHub issues:**
|
|
198
|
-
- For gaps that can't be fixed immediately (preferences)
|
|
199
|
-
- Include clear recommendations and implementation points
|
|
200
|
-
- Label appropriately (enhancement, area:preferences, etc.)
|
|
201
|
-
|
|
202
|
-
**Link to analysis:**
|
|
203
|
-
- Reference source documents in issues and code comments
|
|
204
|
-
- Include record IDs for traceability
|
|
205
|
-
|
|
206
|
-
**Record patterns:**
|
|
207
|
-
- Document patterns for future reference
|
|
208
|
-
- Note what worked and what didn't
|
|
209
|
-
|
|
210
|
-
**Documentation Checklist:**
|
|
211
|
-
- [ ] Analysis document created with findings
|
|
212
|
-
- [ ] GitHub issues created for preference gaps
|
|
213
|
-
- [ ] Source documents linked
|
|
214
|
-
- [ ] Patterns documented for future reference
|
|
215
|
-
|
|
216
|
-
## RULE 8: Testing & Validation
|
|
217
|
-
|
|
218
|
-
### Before Considering Fixes Complete
|
|
219
|
-
|
|
220
|
-
**Regenerate BAML client:**
|
|
221
|
-
- Always run `npm run generate` after BAML changes
|
|
222
|
-
- Verify generation succeeds
|
|
223
|
-
|
|
224
|
-
**Check lint errors:**
|
|
225
|
-
- Verify no new errors introduced
|
|
226
|
-
- Note any pre-existing errors (don't fix unrelated issues)
|
|
227
|
-
|
|
228
|
-
**Verify changes:**
|
|
229
|
-
- Confirm changes are in correct locations
|
|
230
|
-
- Check that all relevant sections updated
|
|
231
|
-
|
|
232
|
-
**Don't commit prematurely:**
|
|
233
|
-
- User may request multiple iterations
|
|
234
|
-
- Wait for explicit commit instruction
|
|
235
|
-
|
|
236
|
-
**Testing Checklist:**
|
|
237
|
-
- [ ] BAML client regenerated (`npm run generate`)
|
|
238
|
-
- [ ] Lint errors checked (no new errors)
|
|
239
|
-
- [ ] Changes verified in correct locations
|
|
240
|
-
- [ ] Not committed (wait for user instruction)
|
|
241
|
-
|
|
242
|
-
## COMMON PATTERNS
|
|
243
|
-
|
|
244
|
-
### Pattern 1: Time Window Preferences
|
|
245
|
-
**Issue**: "Executive prefers not to have 6-7pm meetings"
|
|
246
|
-
**Solution**: Use focus blocks with HIGH protection (don't add new field)
|
|
247
|
-
**Implementation**: Create focus block for 6-7pm with `protection_level: HIGH`
|
|
248
|
-
|
|
249
|
-
### Pattern 2: Location Defaults
|
|
250
|
-
**Issue**: "Location incorrectly defaulted to virtual when should be in-person"
|
|
251
|
-
**Solution**: Add `default_meeting_location_type` to ExecutivePreferences
|
|
252
|
-
**Implementation**: New field in schema, use in BAML when location not specified
|
|
253
|
-
|
|
254
|
-
### Pattern 3: Accountability Violations
|
|
255
|
-
**Issue**: "Ashley took over coordination when someone else was coordinating"
|
|
256
|
-
**Solution**: Add explicit rules to respect existing accountability
|
|
257
|
-
**Implementation**: Update AccountabilityRules template, add banned phrases list
|
|
258
|
-
|
|
259
|
-
### Pattern 4: Date Interpretation Errors
|
|
260
|
-
**Issue**: "This week included past dates"
|
|
261
|
-
**Solution**: Add validation rules to never include past dates
|
|
262
|
-
**Implementation**: Update date interpretation rules in calendar_intent.baml
|
|
263
|
-
|
|
264
|
-
## ANTI-PATTERNS TO AVOID
|
|
265
|
-
|
|
266
|
-
1. **❌ Adding new fields when focus blocks work**: Use existing infrastructure first
|
|
267
|
-
2. **❌ Using specific names in prompts**: Always use generic examples
|
|
268
|
-
3. **❌ Fixing symptoms not root causes**: Dig deeper to find underlying issue
|
|
269
|
-
4. **❌ Over-engineering solutions**: Simple prompt updates often work better than complex logic
|
|
270
|
-
5. **❌ Skipping categorization**: Always categorize before fixing
|
|
271
|
-
|
|
272
|
-
## RELATED RULES
|
|
273
|
-
|
|
274
|
-
- `get_fraim_file({ path: "rules/successful-debugging-patterns.md" })` - General debugging patterns
|
|
275
|
-
- `get_fraim_file({ path: "rules/code-quality-and-debugging-patterns.md" })` - Code quality standards
|
|
276
|
-
- Read local architecture document (path from `.fraim/config.json` `customizations.architectureDoc`) - Project-specific architecture guidelines
|
|
277
|
-
|
|
278
|
-
## EXAMPLES
|
|
279
|
-
|
|
280
|
-
### Good: Systematic Analysis
|
|
281
|
-
```
|
|
282
|
-
1. Query PPE database with proper filters
|
|
283
|
-
2. Identify 18 records with reviewer feedback
|
|
284
|
-
3. Categorize: 7 systemic, 3 preferences
|
|
285
|
-
4. Fix systemic issues in BAML
|
|
286
|
-
5. Create GitHub issue for preferences
|
|
287
|
-
6. Document in retrospective
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
### Bad: Ad-hoc Fixes
|
|
291
|
-
```
|
|
292
|
-
1. See one issue
|
|
293
|
-
2. Fix it immediately
|
|
294
|
-
3. Don't check for patterns
|
|
295
|
-
4. Don't categorize
|
|
296
|
-
5. Don't document
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
|
-
**Source**: Derived from retrospective `retrospectives/ppe-hitl-feedback-analysis-debugging-patterns.mdc`
|
|
302
|
-
**Last Updated**: 2025-11-05
|