fraim-framework 2.0.34 → 2.0.36

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 (49) hide show
  1. package/bin/fraim.js +52 -5
  2. package/dist/registry/scripts/cleanup-branch.js +62 -33
  3. package/dist/registry/scripts/generate-engagement-emails.js +119 -44
  4. package/dist/registry/scripts/newsletter-helpers.js +208 -268
  5. package/dist/registry/scripts/profile-server.js +387 -0
  6. package/dist/tests/test-chalk-regression.js +18 -2
  7. package/dist/tests/test-client-scripts-validation.js +133 -0
  8. package/dist/tests/test-markdown-to-pdf.js +454 -0
  9. package/dist/tests/test-script-location-independence.js +76 -28
  10. package/package.json +5 -2
  11. package/registry/agent-guardrails.md +62 -62
  12. package/registry/rules/communication.md +121 -121
  13. package/registry/rules/continuous-learning.md +54 -54
  14. package/registry/rules/hitl-ppe-record-analysis.md +302 -302
  15. package/registry/rules/software-development-lifecycle.md +104 -104
  16. package/registry/scripts/cleanup-branch.ts +341 -0
  17. package/registry/scripts/code-quality-check.sh +559 -559
  18. package/registry/scripts/detect-tautological-tests.sh +38 -38
  19. package/registry/scripts/generate-engagement-emails.ts +830 -0
  20. package/registry/scripts/markdown-to-pdf.js +395 -0
  21. package/registry/scripts/newsletter-helpers.ts +777 -0
  22. package/registry/scripts/profile-server.ts +424 -0
  23. package/registry/scripts/run-thank-you-workflow.ts +122 -0
  24. package/registry/scripts/send-newsletter-simple.ts +102 -0
  25. package/registry/scripts/send-thank-you-emails.ts +57 -0
  26. package/registry/scripts/validate-openapi-limits.ts +366 -366
  27. package/registry/scripts/validate-test-coverage.ts +280 -280
  28. package/registry/scripts/verify-pr-comments.sh +70 -70
  29. package/registry/templates/bootstrap/ARCHITECTURE-TEMPLATE.md +53 -53
  30. package/registry/templates/evidence/Implementation-BugEvidence.md +85 -85
  31. package/registry/templates/evidence/Implementation-FeatureEvidence.md +120 -120
  32. package/registry/workflows/convert-to-pdf.md +235 -0
  33. package/registry/workflows/customer-development/insight-analysis.md +156 -156
  34. package/registry/workflows/customer-development/interview-preparation.md +421 -421
  35. package/registry/workflows/customer-development/strategic-brainstorming.md +146 -146
  36. package/registry/workflows/quality-assurance/iterative-improvement-cycle.md +562 -562
  37. package/registry/workflows/reviewer/review-implementation-vs-feature-spec.md +669 -669
  38. package/dist/registry/scripts/build-scripts-generator.js +0 -205
  39. package/dist/registry/scripts/fraim-config.js +0 -61
  40. package/dist/registry/scripts/generic-issues-api.js +0 -100
  41. package/dist/registry/scripts/openapi-generator.js +0 -664
  42. package/dist/registry/scripts/performance/profile-server.js +0 -390
  43. package/dist/test-utils.js +0 -96
  44. package/dist/tests/esm-compat.js +0 -11
  45. package/dist/tests/test-chalk-esm-issue.js +0 -159
  46. package/dist/tests/test-chalk-real-world.js +0 -265
  47. package/dist/tests/test-chalk-resolution-issue.js +0 -304
  48. package/dist/tests/test-fraim-install-chalk-issue.js +0 -254
  49. package/dist/tests/test-npm-resolution-diagnostic.js +0 -140
@@ -1,63 +1,63 @@
1
- # AI Agent Guardrails
2
-
3
- This file references the centralized rules located in `rules/` to ensure consistency across all AI platforms.
4
-
5
- ## SUCCESS CRITERIA (THE "FRAIM 5")
6
- **Source**: Retrieve via `get_fraim_file({ path: "rules/agent-success-criteria.md" })`
7
-
8
- All agents are evaluated on:
9
- 1. **Integrity (100 pts)**: Honesty above all.
10
- 2. **Correctness (50 pts)**: Architecture & tests.
11
- 3. **Completeness (30 pts)**: Thoroughness.
12
- 4. **Independence (20 pts)**: Smart decisions.
13
- 5. **Speed (10 pts)**: Velocity.
14
-
15
- ## Referenced Rules
16
-
17
- ### 0. Integrity
18
- **Source**: Retrieve via `get_fraim_file({ path: "rules/integrity-and-test-ethics.md" })`
19
-
20
- THIS IS THE MOST CRITICAL RULE. Be ethical, truthful, honest above all.
21
-
22
- ### 1. Simplicity
23
- **Source**: Retrieve via `get_fraim_file({ path: "rules/simplicity.md" })`
24
-
25
- Keep solutions simple and focused, avoid over-engineering. Focus on the assigned issue only and don't make unrelated changes.
26
-
27
- ### 2. Communication
28
- **Source**: Retrieve via `get_fraim_file({ path: "rules/communication.md" })`
29
-
30
- Establish clear communication patterns and progress reporting standards for effective coordination between agents and stakeholders.
31
-
32
- ### 3. Architecture
33
- **Source**: Retrieve via `get_fraim_file({ path: "rules/architecture.md" })`
34
-
35
- Maintain clean architectural boundaries by using BAML (LLM) for natural-language understanding and TypeScript for deterministic work.
36
-
37
- ### 4. Continuous Learning
38
- **Source**: Retrieve via `get_fraim_file({ path: "rules/continuous-learning.md" })`
39
-
40
- Prevent repeating past mistakes by systematically learning from retrospectives, RFCs, and historical issue patterns.
41
-
42
- ### 5. Agent Testing Guidelines
43
- **Source**: Retrieve via `get_fraim_file({ path: "rules/agent-testing-guidelines.md" })`
44
-
45
- Comprehensive testing and validation requirements with concrete evidence. Ensures all work is thoroughly validated before completion.
46
-
47
- ### 6. Local Development
48
- **Source**: Retrieve via `get_fraim_file({ path: "rules/local-development.md" })`
49
-
50
- Local development guidelines and workspace safety. Enables safe parallel development through strict workspace separation.
51
-
52
- ### 7. Software Development Lifecycle
53
- **Source**: Retrieve via `get_fraim_file({ path: "rules/software-development-lifecycle.md" })`
54
-
55
- ### 9. Merge Requirements
56
- **Source**: Retrieve via `get_fraim_file({ path: "rules/merge-requirements.md" })`
57
-
58
- Enforces a strict `git rebase` workflow to ensure feature branches are up-to-date with `master` before merging, maintaining a clean and stable history.
59
-
60
- ### 10. Best practices while debuggin
61
- **Source**: Retrieve via `get_fraim_file({ path: "rules/successful-debugging-patterns.md" })`
62
-
1
+ # AI Agent Guardrails
2
+
3
+ This file references the centralized rules located in `rules/` to ensure consistency across all AI platforms.
4
+
5
+ ## SUCCESS CRITERIA (THE "FRAIM 5")
6
+ **Source**: Retrieve via `get_fraim_file({ path: "rules/agent-success-criteria.md" })`
7
+
8
+ All agents are evaluated on:
9
+ 1. **Integrity (100 pts)**: Honesty above all.
10
+ 2. **Correctness (50 pts)**: Architecture & tests.
11
+ 3. **Completeness (30 pts)**: Thoroughness.
12
+ 4. **Independence (20 pts)**: Smart decisions.
13
+ 5. **Speed (10 pts)**: Velocity.
14
+
15
+ ## Referenced Rules
16
+
17
+ ### 0. Integrity
18
+ **Source**: Retrieve via `get_fraim_file({ path: "rules/integrity-and-test-ethics.md" })`
19
+
20
+ THIS IS THE MOST CRITICAL RULE. Be ethical, truthful, honest above all.
21
+
22
+ ### 1. Simplicity
23
+ **Source**: Retrieve via `get_fraim_file({ path: "rules/simplicity.md" })`
24
+
25
+ Keep solutions simple and focused, avoid over-engineering. Focus on the assigned issue only and don't make unrelated changes.
26
+
27
+ ### 2. Communication
28
+ **Source**: Retrieve via `get_fraim_file({ path: "rules/communication.md" })`
29
+
30
+ Establish clear communication patterns and progress reporting standards for effective coordination between agents and stakeholders.
31
+
32
+ ### 3. Architecture
33
+ **Source**: Retrieve via `get_fraim_file({ path: "rules/architecture.md" })`
34
+
35
+ Maintain clean architectural boundaries by using BAML (LLM) for natural-language understanding and TypeScript for deterministic work.
36
+
37
+ ### 4. Continuous Learning
38
+ **Source**: Retrieve via `get_fraim_file({ path: "rules/continuous-learning.md" })`
39
+
40
+ Prevent repeating past mistakes by systematically learning from retrospectives, RFCs, and historical issue patterns.
41
+
42
+ ### 5. Agent Testing Guidelines
43
+ **Source**: Retrieve via `get_fraim_file({ path: "rules/agent-testing-guidelines.md" })`
44
+
45
+ Comprehensive testing and validation requirements with concrete evidence. Ensures all work is thoroughly validated before completion.
46
+
47
+ ### 6. Local Development
48
+ **Source**: Retrieve via `get_fraim_file({ path: "rules/local-development.md" })`
49
+
50
+ Local development guidelines and workspace safety. Enables safe parallel development through strict workspace separation.
51
+
52
+ ### 7. Software Development Lifecycle
53
+ **Source**: Retrieve via `get_fraim_file({ path: "rules/software-development-lifecycle.md" })`
54
+
55
+ ### 9. Merge Requirements
56
+ **Source**: Retrieve via `get_fraim_file({ path: "rules/merge-requirements.md" })`
57
+
58
+ Enforces a strict `git rebase` workflow to ensure feature branches are up-to-date with `master` before merging, maintaining a clean and stable history.
59
+
60
+ ### 10. Best practices while debuggin
61
+ **Source**: Retrieve via `get_fraim_file({ path: "rules/successful-debugging-patterns.md" })`
62
+
63
63
  Patterns on debugging issues systematically and converting learnings into test cases
@@ -1,122 +1,122 @@
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
-
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
122
  **No exceptions. No deflection. No user responsibility for agent mistakes.**
@@ -1,55 +1,55 @@
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
-
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
55
  Remember: The best code is often written by those who learn from history rather than repeat it.