@bugzy-ai/bugzy 1.19.0 → 1.19.2

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 (58) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +273 -273
  3. package/dist/cli/index.cjs +157 -13
  4. package/dist/cli/index.cjs.map +1 -1
  5. package/dist/cli/index.js +156 -12
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/index.cjs +153 -10
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.js +153 -10
  10. package/dist/index.js.map +1 -1
  11. package/dist/subagents/index.cjs +150 -10
  12. package/dist/subagents/index.cjs.map +1 -1
  13. package/dist/subagents/index.js +150 -10
  14. package/dist/subagents/index.js.map +1 -1
  15. package/dist/subagents/metadata.cjs +8 -0
  16. package/dist/subagents/metadata.cjs.map +1 -1
  17. package/dist/subagents/metadata.js +8 -0
  18. package/dist/subagents/metadata.js.map +1 -1
  19. package/dist/tasks/index.cjs.map +1 -1
  20. package/dist/tasks/index.js.map +1 -1
  21. package/package.json +95 -95
  22. package/templates/init/.bugzy/runtime/hooks/pre-compact.sh +53 -53
  23. package/templates/init/.bugzy/runtime/hooks/session-start.sh +68 -68
  24. package/templates/init/.bugzy/runtime/knowledge-base.md +61 -61
  25. package/templates/init/.bugzy/runtime/knowledge-maintenance-guide.md +140 -140
  26. package/templates/init/.bugzy/runtime/project-context.md +35 -35
  27. package/templates/init/.bugzy/runtime/subagent-memory-guide.md +122 -122
  28. package/templates/init/.bugzy/runtime/templates/event-examples.md +194 -194
  29. package/templates/init/.bugzy/runtime/templates/test-plan-template.md +50 -50
  30. package/templates/init/.bugzy/runtime/templates/test-result-schema.md +498 -498
  31. package/templates/init/.claude/settings.json +49 -49
  32. package/templates/init/.env.testdata +18 -18
  33. package/templates/init/.gitignore-template +24 -24
  34. package/templates/init/AGENTS.md +155 -155
  35. package/templates/init/CLAUDE.md +157 -157
  36. package/templates/init/test-runs/README.md +45 -45
  37. package/templates/init/tests/CLAUDE.md +199 -199
  38. package/templates/init/tests/docs/test-execution-strategy.md +535 -535
  39. package/templates/init/tests/docs/testing-best-practices.md +724 -724
  40. package/templates/playwright/BasePage.template.ts +190 -190
  41. package/templates/playwright/auth.setup.template.ts +89 -89
  42. package/templates/playwright/dataGenerators.helper.template.ts +148 -148
  43. package/templates/playwright/dateUtils.helper.template.ts +96 -96
  44. package/templates/playwright/pages.fixture.template.ts +50 -50
  45. package/templates/playwright/playwright.config.template.ts +97 -97
  46. package/templates/playwright/reporters/__tests__/bugzy-reporter-failure-classification.test.ts +299 -299
  47. package/templates/playwright/reporters/__tests__/bugzy-reporter-manifest-merge.test.ts +329 -329
  48. package/templates/playwright/reporters/__tests__/playwright.config.ts +5 -5
  49. package/templates/playwright/reporters/bugzy-reporter.ts +784 -784
  50. package/dist/templates/init/.bugzy/runtime/knowledge-base.md +0 -61
  51. package/dist/templates/init/.bugzy/runtime/knowledge-maintenance-guide.md +0 -97
  52. package/dist/templates/init/.bugzy/runtime/project-context.md +0 -35
  53. package/dist/templates/init/.bugzy/runtime/subagent-memory-guide.md +0 -87
  54. package/dist/templates/init/.bugzy/runtime/templates/test-plan-template.md +0 -50
  55. package/dist/templates/init/.bugzy/runtime/templates/test-result-schema.md +0 -498
  56. package/dist/templates/init/.bugzy/runtime/test-execution-strategy.md +0 -535
  57. package/dist/templates/init/.bugzy/runtime/testing-best-practices.md +0 -632
  58. package/dist/templates/init/.gitignore-template +0 -25
@@ -1,140 +1,140 @@
1
- # Knowledge Maintenance Guide
2
-
3
- ## Overview
4
-
5
- This document provides instructions for maintaining a **Context** or **Knowledge Base** - a living collection of factual knowledge that is actively curated and updated rather than simply accumulated over time.
6
-
7
- ---
8
-
9
- ## Core Principle: This is a Curated Snapshot, Not a Log
10
-
11
- This document represents **what we currently know and believe to be true**, not a history of what we've learned. Think of it as a living reference that evolves as understanding improves.
12
-
13
- ---
14
-
15
- ## When to ADD
16
-
17
- Add new entries when:
18
-
19
- - New factual information is discovered
20
- - New patterns or relationships emerge
21
- - New areas of knowledge become relevant
22
-
23
- **Check first**: Does this duplicate or overlap with existing entries?
24
-
25
- ---
26
-
27
- ## When to UPDATE
28
-
29
- Update existing entries when:
30
-
31
- - Facts change or we discover more accurate information
32
- - Understanding deepens (replace shallow with deeper insight)
33
- - Multiple related facts can be consolidated into one coherent statement
34
- - Language can be clarified or made more precise
35
-
36
- **Goal**: Replace outdated understanding with current understanding
37
-
38
- ---
39
-
40
- ## When to REMOVE
41
-
42
- Remove entries when:
43
-
44
- - Information becomes irrelevant to current needs
45
- - Facts are proven incorrect (unless there's value in noting the correction)
46
- - Information is superseded by better, more comprehensive entries
47
- - Entry is redundant with other content
48
-
49
- **Key question**: "If someone reads this in 6 months, will it help them?"
50
-
51
- ---
52
-
53
- ## Maintenance Principles
54
-
55
- ### 1. Favor Consolidation Over Addition
56
-
57
- - Before adding, ask: "Can this merge with existing knowledge?"
58
- - Example: Instead of 10 facts about a person, maintain 2-3 well-organized paragraphs
59
-
60
- ### 2. Update Rather Than Append
61
-
62
- - When information evolves, replace the old statement
63
- - Keep history only if the evolution itself is important
64
- - Example: ~~"User is learning Python"~~ → "User is proficient in Python and focusing on FastAPI"
65
-
66
- ### 3. Regular Pruning
67
-
68
- - Periodically review for outdated or low-value entries
69
- - Ask: "Is this still accurate? Still relevant? Could it be stated better?"
70
- - Aim for signal-to-noise ratio improvement
71
-
72
- ### 4. Quality Over Completeness
73
-
74
- - Better to have 50 highly relevant, accurate facts than 500 marginally useful ones
75
- - Prioritize insights over raw data
76
- - Focus on what's actionable or decision-relevant
77
-
78
- ### 5. Resolve Contradictions Immediately
79
-
80
- - If new information contradicts old, investigate and keep only the truth
81
- - Don't accumulate conflicting statements
82
-
83
- ### 6. Use Clear, Declarative Statements
84
-
85
- - Write in present tense: "User works at X" not "User mentioned they work at X"
86
- - State facts confidently when known; flag uncertainty when it exists
87
- - Avoid hedging unless genuinely uncertain
88
-
89
- ---
90
-
91
- ## Anti-Patterns to Avoid
92
-
93
- | ❌ Don't Do This | ✅ Do This Instead |
94
- |-----------------|-------------------|
95
- | "On Tuesday user said X, then on Friday user said Y" | "User's position on X is Y" (keep most current) |
96
- | Keeping every detail ever mentioned | Keeping relevant, current details |
97
- | "User might like coffee, user mentioned tea once, user drinks water" | "User prefers tea; also drinks coffee occasionally" |
98
-
99
- ---
100
-
101
- ## Extraction Schema
102
-
103
- When deciding what to save, use these structured categories as guidance. Not every session produces entries in every category — only save what genuinely qualifies.
104
-
105
- ### Application Patterns
106
- UI flows, navigation structure, page load behaviors, API response patterns, authentication flows, state transitions.
107
-
108
- ### Test Reliability
109
- Flaky selectors, timing-sensitive flows, environment-specific behaviors, retry patterns, stable vs unstable locators.
110
-
111
- ### Team Preferences
112
- Communication style, channel routing, workflow expectations, review preferences, notification conventions.
113
-
114
- ### Technical Constraints
115
- API rate limits, auth token lifetimes, infrastructure boundaries, deployment gotchas, browser compatibility issues.
116
-
117
- ### Environment Facts
118
- URLs, credentials structure (not values), test data patterns, feature flags, environment-specific configurations.
119
-
120
- ---
121
-
122
- ## Provenance Format
123
-
124
- Every knowledge base entry must include provenance metadata as an HTML comment immediately after the heading:
125
-
126
- ```markdown
127
- ## Entry Title
128
- <!-- source: {task-or-subagent} | learned: {YYYY-MM-DD} | verified: {YYYY-MM-DD} -->
129
-
130
- Entry content here...
131
- ```
132
-
133
- **Fields:**
134
- - **source**: Which task or subagent produced this knowledge (e.g., `run-tests`, `test-engineer`, `explore-application`)
135
- - **learned**: Date the knowledge was first discovered
136
- - **verified**: Date the knowledge was last confirmed as still accurate
137
-
138
- **Verification Rule:** If an entry's `verified` date is more than 30 days old and you encounter the same topic, re-verify the information and update the `verified` date. If the fact has changed, update or remove the entry.
139
-
140
- **Gradual Migration:** Existing entries without provenance remain valid. Add provenance when you next update an entry — no bulk migration needed.
1
+ # Knowledge Maintenance Guide
2
+
3
+ ## Overview
4
+
5
+ This document provides instructions for maintaining a **Context** or **Knowledge Base** - a living collection of factual knowledge that is actively curated and updated rather than simply accumulated over time.
6
+
7
+ ---
8
+
9
+ ## Core Principle: This is a Curated Snapshot, Not a Log
10
+
11
+ This document represents **what we currently know and believe to be true**, not a history of what we've learned. Think of it as a living reference that evolves as understanding improves.
12
+
13
+ ---
14
+
15
+ ## When to ADD
16
+
17
+ Add new entries when:
18
+
19
+ - New factual information is discovered
20
+ - New patterns or relationships emerge
21
+ - New areas of knowledge become relevant
22
+
23
+ **Check first**: Does this duplicate or overlap with existing entries?
24
+
25
+ ---
26
+
27
+ ## When to UPDATE
28
+
29
+ Update existing entries when:
30
+
31
+ - Facts change or we discover more accurate information
32
+ - Understanding deepens (replace shallow with deeper insight)
33
+ - Multiple related facts can be consolidated into one coherent statement
34
+ - Language can be clarified or made more precise
35
+
36
+ **Goal**: Replace outdated understanding with current understanding
37
+
38
+ ---
39
+
40
+ ## When to REMOVE
41
+
42
+ Remove entries when:
43
+
44
+ - Information becomes irrelevant to current needs
45
+ - Facts are proven incorrect (unless there's value in noting the correction)
46
+ - Information is superseded by better, more comprehensive entries
47
+ - Entry is redundant with other content
48
+
49
+ **Key question**: "If someone reads this in 6 months, will it help them?"
50
+
51
+ ---
52
+
53
+ ## Maintenance Principles
54
+
55
+ ### 1. Favor Consolidation Over Addition
56
+
57
+ - Before adding, ask: "Can this merge with existing knowledge?"
58
+ - Example: Instead of 10 facts about a person, maintain 2-3 well-organized paragraphs
59
+
60
+ ### 2. Update Rather Than Append
61
+
62
+ - When information evolves, replace the old statement
63
+ - Keep history only if the evolution itself is important
64
+ - Example: ~~"User is learning Python"~~ → "User is proficient in Python and focusing on FastAPI"
65
+
66
+ ### 3. Regular Pruning
67
+
68
+ - Periodically review for outdated or low-value entries
69
+ - Ask: "Is this still accurate? Still relevant? Could it be stated better?"
70
+ - Aim for signal-to-noise ratio improvement
71
+
72
+ ### 4. Quality Over Completeness
73
+
74
+ - Better to have 50 highly relevant, accurate facts than 500 marginally useful ones
75
+ - Prioritize insights over raw data
76
+ - Focus on what's actionable or decision-relevant
77
+
78
+ ### 5. Resolve Contradictions Immediately
79
+
80
+ - If new information contradicts old, investigate and keep only the truth
81
+ - Don't accumulate conflicting statements
82
+
83
+ ### 6. Use Clear, Declarative Statements
84
+
85
+ - Write in present tense: "User works at X" not "User mentioned they work at X"
86
+ - State facts confidently when known; flag uncertainty when it exists
87
+ - Avoid hedging unless genuinely uncertain
88
+
89
+ ---
90
+
91
+ ## Anti-Patterns to Avoid
92
+
93
+ | ❌ Don't Do This | ✅ Do This Instead |
94
+ |-----------------|-------------------|
95
+ | "On Tuesday user said X, then on Friday user said Y" | "User's position on X is Y" (keep most current) |
96
+ | Keeping every detail ever mentioned | Keeping relevant, current details |
97
+ | "User might like coffee, user mentioned tea once, user drinks water" | "User prefers tea; also drinks coffee occasionally" |
98
+
99
+ ---
100
+
101
+ ## Extraction Schema
102
+
103
+ When deciding what to save, use these structured categories as guidance. Not every session produces entries in every category — only save what genuinely qualifies.
104
+
105
+ ### Application Patterns
106
+ UI flows, navigation structure, page load behaviors, API response patterns, authentication flows, state transitions.
107
+
108
+ ### Test Reliability
109
+ Flaky selectors, timing-sensitive flows, environment-specific behaviors, retry patterns, stable vs unstable locators.
110
+
111
+ ### Team Preferences
112
+ Communication style, channel routing, workflow expectations, review preferences, notification conventions.
113
+
114
+ ### Technical Constraints
115
+ API rate limits, auth token lifetimes, infrastructure boundaries, deployment gotchas, browser compatibility issues.
116
+
117
+ ### Environment Facts
118
+ URLs, credentials structure (not values), test data patterns, feature flags, environment-specific configurations.
119
+
120
+ ---
121
+
122
+ ## Provenance Format
123
+
124
+ Every knowledge base entry must include provenance metadata as an HTML comment immediately after the heading:
125
+
126
+ ```markdown
127
+ ## Entry Title
128
+ <!-- source: {task-or-subagent} | learned: {YYYY-MM-DD} | verified: {YYYY-MM-DD} -->
129
+
130
+ Entry content here...
131
+ ```
132
+
133
+ **Fields:**
134
+ - **source**: Which task or subagent produced this knowledge (e.g., `run-tests`, `test-engineer`, `explore-application`)
135
+ - **learned**: Date the knowledge was first discovered
136
+ - **verified**: Date the knowledge was last confirmed as still accurate
137
+
138
+ **Verification Rule:** If an entry's `verified` date is more than 30 days old and you encounter the same topic, re-verify the information and update the `verified` date. If the fact has changed, update or remove the entry.
139
+
140
+ **Gradual Migration:** Existing entries without provenance remain valid. Add provenance when you next update an entry — no bulk migration needed.
@@ -1,35 +1,35 @@
1
- # Project Context
2
-
3
- ## Customer Information
4
- **Customer Name:** {{CUSTOMER_NAME}}
5
- **Primary Contact:** [To be filled]
6
-
7
- ## Project Information
8
- **Project Name:** {{PROJECT_NAME}}
9
- **Description:** [To be filled]
10
- **Repository:** [To be filled]
11
-
12
- ## Development Process
13
- **Methodology:** [Agile/Waterfall/Hybrid - To be filled]
14
- **Sprint Length:** [e.g., 2 weeks - To be filled]
15
- **Current Sprint:** [To be filled]
16
-
17
- ## QA Integration
18
- **QA Entry Point:** [e.g., After development complete, During development - To be filled]
19
- **Definition of Done:** [QA criteria for story completion - To be filled]
20
- **Sign-off Process:** [Who approves test results - To be filled]
21
-
22
- ## Tools & Systems
23
- **Bug Tracking:** {{BUG_TRACKING_SYSTEM}}
24
- **Documentation:** {{DOCUMENTATION_SYSTEM}}
25
- **CI/CD Platform:** [e.g., GitHub Actions, Jenkins - To be filled]
26
- **Communication:** [e.g., Slack channel - To be filled]
27
-
28
- ## Team Contacts
29
- **Product Owner:** [Name and contact - To be filled]
30
- **Tech Lead:** [Name and contact - To be filled]
31
- **QA Lead:** [Name and contact - To be filled]
32
- **DevOps Contact:** [Name and contact - To be filled]
33
-
34
- ## Notes
35
- [Any additional context about the project, special requirements, or considerations]
1
+ # Project Context
2
+
3
+ ## Customer Information
4
+ **Customer Name:** {{CUSTOMER_NAME}}
5
+ **Primary Contact:** [To be filled]
6
+
7
+ ## Project Information
8
+ **Project Name:** {{PROJECT_NAME}}
9
+ **Description:** [To be filled]
10
+ **Repository:** [To be filled]
11
+
12
+ ## Development Process
13
+ **Methodology:** [Agile/Waterfall/Hybrid - To be filled]
14
+ **Sprint Length:** [e.g., 2 weeks - To be filled]
15
+ **Current Sprint:** [To be filled]
16
+
17
+ ## QA Integration
18
+ **QA Entry Point:** [e.g., After development complete, During development - To be filled]
19
+ **Definition of Done:** [QA criteria for story completion - To be filled]
20
+ **Sign-off Process:** [Who approves test results - To be filled]
21
+
22
+ ## Tools & Systems
23
+ **Bug Tracking:** {{BUG_TRACKING_SYSTEM}}
24
+ **Documentation:** {{DOCUMENTATION_SYSTEM}}
25
+ **CI/CD Platform:** [e.g., GitHub Actions, Jenkins - To be filled]
26
+ **Communication:** [e.g., Slack channel - To be filled]
27
+
28
+ ## Team Contacts
29
+ **Product Owner:** [Name and contact - To be filled]
30
+ **Tech Lead:** [Name and contact - To be filled]
31
+ **QA Lead:** [Name and contact - To be filled]
32
+ **DevOps Contact:** [Name and contact - To be filled]
33
+
34
+ ## Notes
35
+ [Any additional context about the project, special requirements, or considerations]
@@ -1,122 +1,122 @@
1
- # Sub-Agent Memory: Maintenance Instructions
2
-
3
- ## What This Memory Is
4
-
5
- A focused collection of knowledge relevant to your specific role. This is your working knowledge, not a log of interactions.
6
-
7
- ---
8
-
9
- ## When to ADD
10
-
11
- Add when information:
12
- - Directly impacts your decisions or outputs
13
- - Represents a pattern or learning within your domain
14
- - Prevents repeated mistakes in your area
15
-
16
- **Check first**: Does this overlap with main agent knowledge or another sub-agent's domain?
17
-
18
- ---
19
-
20
- ## When to UPDATE
21
-
22
- Update when:
23
- - Preferences or requirements change within your domain
24
- - Understanding deepens through repeated interactions
25
- - Patterns evolve or are refined
26
- - Multiple related facts can be consolidated
27
-
28
- **Replace** outdated information with current understanding.
29
-
30
- ---
31
-
32
- ## When to REMOVE
33
-
34
- Remove when:
35
- - No longer relevant to current work
36
- - Better handled by main agent's knowledge
37
- - Proven incorrect or outdated
38
- - Never actually used in decision-making
39
-
40
- **Test**: "Has this influenced a decision recently? Will it influence one soon?"
41
-
42
- ---
43
-
44
- ## Core Rules
45
-
46
- 1. **Stay in your domain** - Don't duplicate main agent knowledge
47
- 2. **Operational over historical** - Keep patterns, not logs
48
- 3. **Patterns over instances** - Generalize from specific events
49
- 4. **Actionable over observational** - Every entry must answer "How does this change what I do?"
50
- 5. **Consolidate aggressively** - Aim for 10-30 high-signal entries
51
- 6. **Update as understanding crystallizes** - Refine vague into specific
52
-
53
- ---
54
-
55
- ## Quick Decision Tree
56
-
57
- ```
58
- New information
59
-
60
- ├─ Relevant to my function? No → Ignore or suggest for main agent
61
- │ Yes ↓
62
-
63
- ├─ Actionable (changes what I do)? No → Don't store
64
- │ Yes ↓
65
-
66
- ├─ Duplicates existing? Yes → UPDATE existing entry
67
- │ No ↓
68
-
69
- └─ Belongs in main agent? Yes → Move to main agent
70
- No → ADD to my memory
71
- ```
72
-
73
- ---
74
-
75
- ## Division with Main Agent
76
-
77
- **Main Agent** stores:
78
- - User's overall preferences and background
79
- - Project-wide decisions
80
- - Cross-cutting concerns
81
-
82
- **You (Sub-Agent)** store:
83
- - Domain-specific preferences and patterns
84
- - Tactical learnings within your scope
85
- - Working knowledge for your specific tasks
86
-
87
- **When in doubt**: If multiple sub-agents could use it → Main agent
88
-
89
- ---
90
-
91
- ## Provenance Format
92
-
93
- Every memory entry must include provenance metadata as an HTML comment immediately after the heading:
94
-
95
- ```markdown
96
- ## Entry Title
97
- <!-- source: {your-role} | learned: {YYYY-MM-DD} | verified: {YYYY-MM-DD} -->
98
-
99
- Entry content here...
100
- ```
101
-
102
- **Fields:**
103
- - **source**: Your subagent role (e.g., `test-engineer`, `browser-automation`)
104
- - **learned**: Date the knowledge was first discovered
105
- - **verified**: Date the knowledge was last confirmed as still accurate
106
-
107
- **Verification Rule:** If an entry's `verified` date is more than 30 days old and you encounter the same topic, re-verify the information and update the `verified` date. If the fact has changed, update or remove the entry.
108
-
109
- **Gradual Migration:** Existing entries without provenance remain valid. Add provenance when you next update an entry.
110
-
111
- ---
112
-
113
- ## Role-Specific Extraction Hints
114
-
115
- Each role should focus on extracting knowledge within its domain:
116
-
117
- - **test-engineer**: Selector strategies, page object patterns, framework conventions, test data patterns
118
- - **test-debugger-fixer**: Failure patterns, root cause categories, fix strategies, flaky test indicators
119
- - **team-communicator**: Channel configurations, message format preferences, thread conventions, escalation paths
120
- - **browser-automation**: Timing patterns, navigation quirks, viewport requirements, wait strategies
121
- - **issue-tracker**: Bug categorization, priority heuristics, label conventions, duplicate detection patterns
122
- - **documentation-researcher**: Source reliability, content structure, search strategies, documentation gaps
1
+ # Sub-Agent Memory: Maintenance Instructions
2
+
3
+ ## What This Memory Is
4
+
5
+ A focused collection of knowledge relevant to your specific role. This is your working knowledge, not a log of interactions.
6
+
7
+ ---
8
+
9
+ ## When to ADD
10
+
11
+ Add when information:
12
+ - Directly impacts your decisions or outputs
13
+ - Represents a pattern or learning within your domain
14
+ - Prevents repeated mistakes in your area
15
+
16
+ **Check first**: Does this overlap with main agent knowledge or another sub-agent's domain?
17
+
18
+ ---
19
+
20
+ ## When to UPDATE
21
+
22
+ Update when:
23
+ - Preferences or requirements change within your domain
24
+ - Understanding deepens through repeated interactions
25
+ - Patterns evolve or are refined
26
+ - Multiple related facts can be consolidated
27
+
28
+ **Replace** outdated information with current understanding.
29
+
30
+ ---
31
+
32
+ ## When to REMOVE
33
+
34
+ Remove when:
35
+ - No longer relevant to current work
36
+ - Better handled by main agent's knowledge
37
+ - Proven incorrect or outdated
38
+ - Never actually used in decision-making
39
+
40
+ **Test**: "Has this influenced a decision recently? Will it influence one soon?"
41
+
42
+ ---
43
+
44
+ ## Core Rules
45
+
46
+ 1. **Stay in your domain** - Don't duplicate main agent knowledge
47
+ 2. **Operational over historical** - Keep patterns, not logs
48
+ 3. **Patterns over instances** - Generalize from specific events
49
+ 4. **Actionable over observational** - Every entry must answer "How does this change what I do?"
50
+ 5. **Consolidate aggressively** - Aim for 10-30 high-signal entries
51
+ 6. **Update as understanding crystallizes** - Refine vague into specific
52
+
53
+ ---
54
+
55
+ ## Quick Decision Tree
56
+
57
+ ```
58
+ New information
59
+
60
+ ├─ Relevant to my function? No → Ignore or suggest for main agent
61
+ │ Yes ↓
62
+
63
+ ├─ Actionable (changes what I do)? No → Don't store
64
+ │ Yes ↓
65
+
66
+ ├─ Duplicates existing? Yes → UPDATE existing entry
67
+ │ No ↓
68
+
69
+ └─ Belongs in main agent? Yes → Move to main agent
70
+ No → ADD to my memory
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Division with Main Agent
76
+
77
+ **Main Agent** stores:
78
+ - User's overall preferences and background
79
+ - Project-wide decisions
80
+ - Cross-cutting concerns
81
+
82
+ **You (Sub-Agent)** store:
83
+ - Domain-specific preferences and patterns
84
+ - Tactical learnings within your scope
85
+ - Working knowledge for your specific tasks
86
+
87
+ **When in doubt**: If multiple sub-agents could use it → Main agent
88
+
89
+ ---
90
+
91
+ ## Provenance Format
92
+
93
+ Every memory entry must include provenance metadata as an HTML comment immediately after the heading:
94
+
95
+ ```markdown
96
+ ## Entry Title
97
+ <!-- source: {your-role} | learned: {YYYY-MM-DD} | verified: {YYYY-MM-DD} -->
98
+
99
+ Entry content here...
100
+ ```
101
+
102
+ **Fields:**
103
+ - **source**: Your subagent role (e.g., `test-engineer`, `browser-automation`)
104
+ - **learned**: Date the knowledge was first discovered
105
+ - **verified**: Date the knowledge was last confirmed as still accurate
106
+
107
+ **Verification Rule:** If an entry's `verified` date is more than 30 days old and you encounter the same topic, re-verify the information and update the `verified` date. If the fact has changed, update or remove the entry.
108
+
109
+ **Gradual Migration:** Existing entries without provenance remain valid. Add provenance when you next update an entry.
110
+
111
+ ---
112
+
113
+ ## Role-Specific Extraction Hints
114
+
115
+ Each role should focus on extracting knowledge within its domain:
116
+
117
+ - **test-engineer**: Selector strategies, page object patterns, framework conventions, test data patterns
118
+ - **test-debugger-fixer**: Failure patterns, root cause categories, fix strategies, flaky test indicators
119
+ - **team-communicator**: Channel configurations, message format preferences, thread conventions, escalation paths
120
+ - **browser-automation**: Timing patterns, navigation quirks, viewport requirements, wait strategies
121
+ - **issue-tracker**: Bug categorization, priority heuristics, label conventions, duplicate detection patterns
122
+ - **documentation-researcher**: Source reliability, content structure, search strategies, documentation gaps