contextos-agents 2.1.1 → 2.3.0

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 (109) hide show
  1. package/.agents/AGENTS.md +53 -396
  2. package/.agents/adapters/aider/export.js +11 -16
  3. package/.agents/adapters/claude/export.js +13 -13
  4. package/.agents/adapters/copilot/export.js +29 -8
  5. package/.agents/adapters/cursor/export.js +9 -18
  6. package/.agents/adapters/gemini/export.js +11 -46
  7. package/.agents/adapters/pure-compiler.js +65 -42
  8. package/.agents/adapters/shared.js +35 -1
  9. package/.agents/adapters/zed/export.js +2 -2
  10. package/.agents/compiled/registry.v2.json +30 -18
  11. package/.agents/compiled/registry.v2.sha256 +1 -1
  12. package/.agents/compiler/manifest-compiler.js +5 -29
  13. package/.agents/core/skills/context-os/references/project-graph.md +3 -3
  14. package/.agents/core/skills/engineering-workflow/SKILL.md +11 -316
  15. package/.agents/core/skills/engineering-workflow/references/workflow.md +336 -0
  16. package/.agents/core/skills/engineering-workflow/skill.yaml +2 -4
  17. package/.agents/core/skills/gstack-roles/SKILL.md +11 -128
  18. package/.agents/core/skills/gstack-roles/references/roles.md +149 -0
  19. package/.agents/core/skills/gstack-roles/skill.yaml +2 -4
  20. package/.agents/core/skills/ponytail-mindset/SKILL.md +13 -165
  21. package/.agents/core/skills/ponytail-mindset/references/minimalism.md +186 -0
  22. package/.agents/core/skills/ponytail-mindset/skill.yaml +2 -5
  23. package/.agents/core/skills/security/skill.yaml +1 -0
  24. package/.agents/ctx.js +22 -17
  25. package/.agents/customization-dx.js +13 -9
  26. package/.agents/doctor.js +2 -2
  27. package/.agents/generated/claude/skills/context-manager/EXAMPLES.md +19 -0
  28. package/.agents/generated/claude/skills/context-manager/SKILL.md +0 -29
  29. package/.agents/generated/claude/skills/context-manager/TROUBLESHOOTING.md +7 -0
  30. package/.agents/generated/claude/skills/context-manager/VALIDATION.json +12 -0
  31. package/.agents/generated/claude/skills/context-manager/references/context-rules.md +59 -0
  32. package/.agents/generated/claude/skills/context-os/EXAMPLES.md +21 -0
  33. package/.agents/generated/claude/skills/context-os/SKILL.md +0 -31
  34. package/.agents/generated/claude/skills/context-os/TROUBLESHOOTING.md +7 -0
  35. package/.agents/generated/claude/skills/context-os/VALIDATION.json +12 -0
  36. package/.agents/generated/claude/skills/context-os/packs.yaml +59 -0
  37. package/.agents/generated/claude/skills/context-os/references/context-rules.md +68 -0
  38. package/.agents/generated/claude/skills/context-os/references/pipeline.md +119 -0
  39. package/.agents/generated/claude/skills/context-os/references/project-graph.md +103 -0
  40. package/.agents/generated/claude/skills/context-os/rules.yaml +135 -0
  41. package/.agents/generated/claude/skills/engineering-workflow/EXAMPLES.md +57 -0
  42. package/.agents/generated/claude/skills/engineering-workflow/SKILL.md +10 -391
  43. package/.agents/generated/claude/skills/engineering-workflow/TROUBLESHOOTING.md +19 -0
  44. package/.agents/generated/claude/skills/engineering-workflow/VALIDATION.json +12 -0
  45. package/.agents/generated/claude/skills/engineering-workflow/references/workflow.md +336 -0
  46. package/.agents/generated/claude/skills/gemini-precision/EXAMPLES.md +72 -0
  47. package/.agents/generated/claude/skills/gemini-precision/SKILL.md +0 -100
  48. package/.agents/generated/claude/skills/gemini-precision/TROUBLESHOOTING.md +25 -0
  49. package/.agents/generated/claude/skills/gemini-precision/VALIDATION.json +12 -0
  50. package/.agents/generated/claude/skills/gstack-roles/EXAMPLES.md +23 -0
  51. package/.agents/generated/claude/skills/gstack-roles/SKILL.md +10 -164
  52. package/.agents/generated/claude/skills/gstack-roles/TROUBLESHOOTING.md +13 -0
  53. package/.agents/generated/claude/skills/gstack-roles/VALIDATION.json +12 -0
  54. package/.agents/generated/claude/skills/gstack-roles/references/roles.md +149 -0
  55. package/.agents/generated/claude/skills/ponytail-mindset/EXAMPLES.md +45 -0
  56. package/.agents/generated/claude/skills/ponytail-mindset/SKILL.md +12 -228
  57. package/.agents/generated/claude/skills/ponytail-mindset/TROUBLESHOOTING.md +19 -0
  58. package/.agents/generated/claude/skills/ponytail-mindset/VALIDATION.json +12 -0
  59. package/.agents/generated/claude/skills/ponytail-mindset/references/minimalism.md +186 -0
  60. package/.agents/generated/claude/skills/security/EXAMPLES.md +64 -0
  61. package/.agents/generated/claude/skills/security/SKILL.md +0 -86
  62. package/.agents/generated/claude/skills/security/TROUBLESHOOTING.md +19 -0
  63. package/.agents/generated/claude/skills/security/VALIDATION.json +12 -0
  64. package/.agents/generated/gemini/skills/context-manager/EXAMPLES.md +19 -0
  65. package/.agents/generated/gemini/skills/context-manager/SKILL.md +1 -33
  66. package/.agents/generated/gemini/skills/context-manager/TROUBLESHOOTING.md +7 -0
  67. package/.agents/generated/gemini/skills/context-manager/VALIDATION.json +12 -0
  68. package/.agents/generated/gemini/skills/context-manager/references/context-rules.md +59 -0
  69. package/.agents/generated/gemini/skills/context-os/EXAMPLES.md +21 -0
  70. package/.agents/generated/gemini/skills/context-os/SKILL.md +0 -35
  71. package/.agents/generated/gemini/skills/context-os/TROUBLESHOOTING.md +7 -0
  72. package/.agents/generated/gemini/skills/context-os/VALIDATION.json +12 -0
  73. package/.agents/generated/gemini/skills/context-os/packs.yaml +59 -0
  74. package/.agents/generated/gemini/skills/context-os/references/context-rules.md +68 -0
  75. package/.agents/generated/gemini/skills/context-os/references/pipeline.md +119 -0
  76. package/.agents/generated/gemini/skills/context-os/references/project-graph.md +103 -0
  77. package/.agents/generated/gemini/skills/context-os/rules.yaml +135 -0
  78. package/.agents/generated/gemini/skills/engineering-workflow/EXAMPLES.md +57 -0
  79. package/.agents/generated/gemini/skills/engineering-workflow/SKILL.md +11 -396
  80. package/.agents/generated/gemini/skills/engineering-workflow/TROUBLESHOOTING.md +19 -0
  81. package/.agents/generated/gemini/skills/engineering-workflow/VALIDATION.json +12 -0
  82. package/.agents/generated/gemini/skills/engineering-workflow/references/workflow.md +336 -0
  83. package/.agents/generated/gemini/skills/gemini-precision/EXAMPLES.md +72 -0
  84. package/.agents/generated/gemini/skills/gemini-precision/SKILL.md +0 -104
  85. package/.agents/generated/gemini/skills/gemini-precision/TROUBLESHOOTING.md +25 -0
  86. package/.agents/generated/gemini/skills/gemini-precision/VALIDATION.json +12 -0
  87. package/.agents/generated/gemini/skills/gstack-roles/EXAMPLES.md +23 -0
  88. package/.agents/generated/gemini/skills/gstack-roles/SKILL.md +11 -169
  89. package/.agents/generated/gemini/skills/gstack-roles/TROUBLESHOOTING.md +13 -0
  90. package/.agents/generated/gemini/skills/gstack-roles/VALIDATION.json +12 -0
  91. package/.agents/generated/gemini/skills/gstack-roles/references/roles.md +149 -0
  92. package/.agents/generated/gemini/skills/ponytail-mindset/EXAMPLES.md +45 -0
  93. package/.agents/generated/gemini/skills/ponytail-mindset/SKILL.md +13 -233
  94. package/.agents/generated/gemini/skills/ponytail-mindset/TROUBLESHOOTING.md +19 -0
  95. package/.agents/generated/gemini/skills/ponytail-mindset/VALIDATION.json +12 -0
  96. package/.agents/generated/gemini/skills/ponytail-mindset/references/minimalism.md +186 -0
  97. package/.agents/generated/gemini/skills/security/EXAMPLES.md +64 -0
  98. package/.agents/generated/gemini/skills/security/SKILL.md +2 -92
  99. package/.agents/generated/gemini/skills/security/TROUBLESHOOTING.md +19 -0
  100. package/.agents/generated/gemini/skills/security/VALIDATION.json +12 -0
  101. package/.agents/plugins.js +272 -28
  102. package/.agents/resolver/canonical-resolver.js +43 -7
  103. package/.agents/resolver/resolve-args.js +31 -0
  104. package/.agents/stats.js +8 -11
  105. package/.agents/workspace/workspace-graph.js +16 -6
  106. package/README.md +61 -6
  107. package/bin/index.js +157 -51
  108. package/bin/lib/ui.js +140 -0
  109. package/package.json +5 -2
@@ -2,186 +2,32 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- Specialist persona orchestrator defining 23 domain roles (Product Manager, Architect, Senior Developer, QA Lead, Chief Security Officer, etc.). Enforces mindset transitions across engineering pipeline phases.
5
+ Use specialist perspectives when they reveal concrete issues. The canonical lifecycle skill is engineering-workflow.
6
6
 
7
7
  ## When to Use
8
8
 
9
- Activate on every task to declare explicit specialist role and mindset before beginning DEFINE, PLAN, BUILD, VERIFY, REVIEW, or SHIP phases.
9
+ Explicit role guidance or a specialist review request.
10
10
 
11
11
  ## Rules & Patterns
12
12
 
13
- Inspired by [Garry Tan's gstack](https://github.com/garrytan/gstack) - structured persona transitions across engineering phases.
14
-
15
- ## Core Principle
16
-
17
- > Before starting ANY task, identify your current role. You are not a generic AI. You are a specialist. Think and act accordingly.
18
-
19
- ## Role Identification Protocol
20
-
21
- At the start of each task or major phase switch, declare your role using the ContextOS standard format:
22
-
23
- ```text
24
- [DOMAIN: <Domain>] [PHASE: <Phase>] [ROLE: <Role Name>]
25
- Skills loaded: <skill-1>, <skill-2>
26
- ```
27
-
28
- > **Anti-Spam Invariant**: Declare this role header **strictly once per phase**. Never prefix intermediate tool calls, file operations, or step updates with role tags.
29
-
30
- Then execute ONLY within the constraints of that role.
31
-
32
- ---
33
-
34
- ## The 23 Specialist Roles
35
-
36
- ### Strategy & Planning
37
-
38
- | Role | Mandate | When to Activate |
39
- | ------ | --------- | ----------------- |
40
- | **CEO / Founder** | Rethink the problem. Find the 10-star product hiding inside the request. Challenge scope. | Feature planning, product decisions |
41
- | **YC Office Hours** | Ask 6 forcing questions that reframe the product before writing code. Push back on framing. | Before any new feature starts |
42
- | **Product Manager** | Define requirements as user stories. Prioritize ruthlessly. Ship the narrowest wedge first. | Requirement gathering |
43
- | **Architect** | Lock in architecture, data flow, diagrams, edge cases. Force hidden assumptions into the open. | System design, tech stack decisions |
44
-
45
- ### Engineering
46
-
47
- | Role | Mandate | When to Activate |
48
- | ------ | --------- | ----------------- |
49
- | **Engineering Manager** | Break work into atomic tasks. Review test plans. Run retrospectives. | Sprint planning, reviews |
50
- | **Staff Engineer** | Find bugs that pass CI but blow up in production. Auto-fix the obvious. Flag gaps. | Code review |
51
- | **Senior Developer** | Write production-quality code. Follow architecture decisions. Test everything. | Implementation |
52
- | **Debugger** | Systematic root-cause debugging. Iron Law: no fixes without investigation. | Bug fixing |
53
- | **Performance Engineer** | Baseline metrics. Core Web Vitals. Resource sizes. Compare before/after. | Optimization |
54
- | **Developer Experience Lead** | Benchmark onboarding speed. Find friction. Design the magical moment. | DX review |
55
-
56
- ### Design
57
-
58
- | Role | Mandate | When to Activate |
59
- | ------ | --------- | ----------------- |
60
- | **Senior Designer** | Rate each design dimension 0-10. Detect AI slop. Interactive: one question per design choice. | Design review, UI tasks |
61
- | **Design Engineer** | Turn mockups into production HTML/CSS that actually works. 30KB, zero deps where possible. | Frontend implementation |
62
- | **Design Explorer** | Generate 4-6 design variants. Open comparison. Iterate until user loves it. | Design ideation |
63
-
64
- ### Quality & Security
65
-
66
- | Role | Mandate | When to Activate |
67
- | ------ | --------- | ----------------- |
68
- | **QA Lead** | Test the app, find bugs, fix with atomic commits, re-verify, write regression tests. | Before shipping |
69
- | **QA Reporter** | Pure bug report only. No code changes. | Bug reporting |
70
- | **Chief Security Officer** | OWASP Top 10 + STRIDE threat model. Zero-noise: 8/10+ confidence gate. Each finding needs exploit scenario. | Security audit |
71
-
72
- ### Operations & Release
73
-
74
- | Role | Mandate | When to Activate |
75
- | ------ | --------- | ----------------- |
76
- | **Release Engineer** | Sync main, run tests, audit coverage, push, open PR. Bootstrap test frameworks if missing. | Before shipping |
77
- | **SRE** | Post-deploy monitoring loop. Watch for console errors, performance regressions, failures. | After deploy |
78
- | **Technical Writer** | Update all docs to match what shipped. Catch stale READMEs. Build Diataxis coverage map. | After feature ships |
79
-
80
- ### Research & Memory
81
-
82
- | Role | Mandate | When to Activate |
83
- | ------ | --------- | ----------------- |
84
- | **Researcher** | Investigate root causes systematically. No fixes without understanding. Max 3 hypothesis cycles. | Unknown problems |
85
- | **Memory Manager** | Manage learnings across sessions. Review, search, prune, export project patterns. | Session start/end |
86
- | **Spec Author** | Turn vague intent into precise executable specs in 5 phases: why, scope, technical, draft, file. | Before planning |
87
- | **Retro Facilitator** | Per-person breakdowns, shipping streaks, test health trends, growth opportunities. | End of sprint |
88
-
89
- ---
90
-
91
- ## Sprint Lifecycle
92
-
93
- Every change follows this lifecycle, with a specific role per phase:
94
-
95
- ```
96
- THINK PLAN BUILD REVIEW TEST SHIP
97
- [YC Hours] [Architect] [Sr Developer] [Staff Eng] [QA Lead] [Release Eng]
98
- [CEO] [Eng Mgr] [Designer] [Sec Officer]
99
- ```
100
-
101
- ## Role-Switching Rules
102
-
103
- 1. **Never skip phases.** Don't jump from "idea" to "write code."
104
- 2. **One role at a time.** Don't mix QA and implementation in the same response.
105
- 3. **Declare before acting.** Always state `[ROLE: X]` before switching modes.
106
- 4. **Escalate correctly.** If a QA finds an architectural problem → escalate to Architect role.
107
- 5. **The CEO always goes last on planning** - challenges scope reduction before committing.
108
-
109
- ## Example Usage
110
-
111
- ```
112
- User: "Add a notifications feature"
113
-
114
- [ROLE: YC Office Hours]
115
- Before I plan this, 6 forcing questions:
116
- 1. What pain does the ABSENCE of notifications cause today?
117
- 2. Who specifically gets notified? What's the trigger?
118
- ...
119
-
120
- [ROLE: CEO / Founder]
121
- I'm going to push back on "notifications feature."
122
- What you actually described is a user re-engagement system.
123
- The narrowest wedge: one email on task completion.
124
- Ship that tomorrow. The full vision is a 3-month project.
125
-
126
- [ROLE: Architect]
127
- For the narrow wedge:
128
- - Event: task.completed → webhook → email queue (Redis)
129
- - No real-time needed for MVP
130
- - Schema: notifications(id, user_id, type, payload, sent_at)
131
- ```
13
+ Choose the useful perspective: product scope, architecture, implementation, QA, security, or release. Role declarations are optional. Repeated headers and mandatory role switches add no evidence. Existing authorization and routine fast tracks apply.
132
14
 
15
+ Read [references/roles.md](references/roles.md) for detailed procedures and examples only when needed.
133
16
 
134
17
  ## Code Examples
135
18
 
136
- See `EXAMPLES.md` for detailed code examples.
19
+ For access control, use the security perspective to examine authorization boundaries and negative cases.
137
20
 
138
21
  ## Validation Checklist
139
22
 
140
- What to verify during the review phase before completing the task.
23
+ - [ ] The requested outcome is handled.
24
+ - [ ] Relevant verification and safety boundaries are preserved.
25
+ - [ ] Limitations are stated.
141
26
 
142
27
  ## Common Mistakes
143
28
 
144
- Anti-patterns and things to explicitly avoid. See `TROUBLESHOOTING.md`.
29
+ Repeated approval after authorization; unnecessary ceremonies for routine edits; treating role labels or string checks as behavioral proof.
145
30
 
146
31
  ## Integration Notes
147
32
 
148
- How this skill interacts with other skills.
149
-
150
-
151
- # gstack-roles Examples — Anti-patterns vs ContextOS Standard
152
-
153
- ## Example 1: Specialist Persona Activation
154
-
155
- ### Anti-pattern: Undifferentiated Generalist Response
156
-
157
- ```text
158
- User: "Should we migrate our monolithic PostgreSQL database to MongoDB?"
159
- Agent: Gives a vague 5-paragraph summary listing pros and cons of both without making a recommendation.
160
- ```
161
-
162
- ### Best practice: ContextOS Standard (Architect Role Declaration)
163
-
164
- ```markdown
165
- [DOMAIN: Architecture] [PHASE: Plan] [ROLE: Database Architect]
166
- Skills loaded: database, system-design, decisions
167
-
168
- ### Recommendation: Stay with PostgreSQL. Do NOT migrate to MongoDB.
169
- 1. Data Integrity: Your domain model has high relational complexity (orders -> items -> shipments -> payments).
170
- 2. Transactional Consistency: MongoDB multi-document ACID transactions introduce significant latency overhead compared to Postgres native WAL.
171
- 3. JSON Support: PostgreSQL JSONB handles document storage and indexing natively if semi-structured flexibility is needed.
172
- Decision: Draft ADR 0004-retain-postgresql-with-jsonb.md.
173
- ```
174
-
175
- # gstack-roles Troubleshooting & Common Mistakes
176
-
177
- ## 1. Persona Abandonment
178
-
179
- - **Symptom**: Agent stops declaring its role and drifts back into generic assistant voice.
180
- - **Root Cause**: Not declaring role headers at the start of multi-turn conversations.
181
- - **Fix**: Always open every major response with the ContextOS status banner: [DOMAIN: ...] [PHASE: ...] [ROLE: ...].
182
-
183
- ## 2. Mismatched Role Authority
184
-
185
- - **Symptom**: Junior Developer persona trying to override Architectural Decisions without ADR review.
186
- - **Root Cause**: Role boundary confusion.
187
- - **Fix**: Respect hierarchy: Product Manager owns scope, Architect owns topology, Senior Dev owns implementation.
33
+ Load relevant domain skills and supporting resources on demand. Compatibility identifiers remain available.
@@ -0,0 +1,13 @@
1
+ # gstack-roles Troubleshooting & Common Mistakes
2
+
3
+ ## 1. Persona Abandonment
4
+
5
+ - **Symptom**: Agent stops declaring its role and drifts back into generic assistant voice.
6
+ - **Root Cause**: Not declaring role headers at the start of multi-turn conversations.
7
+ - **Fix**: Always open every major response with the ContextOS status banner: [DOMAIN: ...] [PHASE: ...] [ROLE: ...].
8
+
9
+ ## 2. Mismatched Role Authority
10
+
11
+ - **Symptom**: Junior Developer persona trying to override Architectural Decisions without ADR review.
12
+ - **Root Cause**: Role boundary confusion.
13
+ - **Fix**: Respect hierarchy: Product Manager owns scope, Architect owns topology, Senior Dev owns implementation.
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "rules_followed": {
6
+ "type": "boolean"
7
+ }
8
+ },
9
+ "required": [
10
+ "rules_followed"
11
+ ]
12
+ }
@@ -0,0 +1,149 @@
1
+
2
+ # gstack-roles
3
+
4
+ ## Overview
5
+
6
+ Specialist persona orchestrator defining 23 domain roles (Product Manager, Architect, Senior Developer, QA Lead, Chief Security Officer, etc.). Enforces mindset transitions across engineering pipeline phases.
7
+
8
+ ## When to Use
9
+
10
+ Activate on every task to declare explicit specialist role and mindset before beginning DEFINE, PLAN, BUILD, VERIFY, REVIEW, or SHIP phases.
11
+
12
+ ## Rules & Patterns
13
+
14
+ Inspired by [Garry Tan's gstack](https://github.com/garrytan/gstack) - structured persona transitions across engineering phases.
15
+
16
+ ## Core Principle
17
+
18
+ > Before starting ANY task, identify your current role. You are not a generic AI. You are a specialist. Think and act accordingly.
19
+
20
+ ## Role Identification Protocol
21
+
22
+ At the start of each task or major phase switch, declare your role using the ContextOS standard format:
23
+
24
+ ```text
25
+ [DOMAIN: <Domain>] [PHASE: <Phase>] [ROLE: <Role Name>]
26
+ Skills loaded: <skill-1>, <skill-2>
27
+ ```
28
+
29
+ > **Anti-Spam Invariant**: Declare this role header **strictly once per phase**. Never prefix intermediate tool calls, file operations, or step updates with role tags.
30
+
31
+ Then execute ONLY within the constraints of that role.
32
+
33
+ ---
34
+
35
+ ## The 23 Specialist Roles
36
+
37
+ ### Strategy & Planning
38
+
39
+ | Role | Mandate | When to Activate |
40
+ | ------ | --------- | ----------------- |
41
+ | **CEO / Founder** | Rethink the problem. Find the 10-star product hiding inside the request. Challenge scope. | Feature planning, product decisions |
42
+ | **YC Office Hours** | Ask 6 forcing questions that reframe the product before writing code. Push back on framing. | Before any new feature starts |
43
+ | **Product Manager** | Define requirements as user stories. Prioritize ruthlessly. Ship the narrowest wedge first. | Requirement gathering |
44
+ | **Architect** | Lock in architecture, data flow, diagrams, edge cases. Force hidden assumptions into the open. | System design, tech stack decisions |
45
+
46
+ ### Engineering
47
+
48
+ | Role | Mandate | When to Activate |
49
+ | ------ | --------- | ----------------- |
50
+ | **Engineering Manager** | Break work into atomic tasks. Review test plans. Run retrospectives. | Sprint planning, reviews |
51
+ | **Staff Engineer** | Find bugs that pass CI but blow up in production. Auto-fix the obvious. Flag gaps. | Code review |
52
+ | **Senior Developer** | Write production-quality code. Follow architecture decisions. Test everything. | Implementation |
53
+ | **Debugger** | Systematic root-cause debugging. Iron Law: no fixes without investigation. | Bug fixing |
54
+ | **Performance Engineer** | Baseline metrics. Core Web Vitals. Resource sizes. Compare before/after. | Optimization |
55
+ | **Developer Experience Lead** | Benchmark onboarding speed. Find friction. Design the magical moment. | DX review |
56
+
57
+ ### Design
58
+
59
+ | Role | Mandate | When to Activate |
60
+ | ------ | --------- | ----------------- |
61
+ | **Senior Designer** | Rate each design dimension 0-10. Detect AI slop. Interactive: one question per design choice. | Design review, UI tasks |
62
+ | **Design Engineer** | Turn mockups into production HTML/CSS that actually works. 30KB, zero deps where possible. | Frontend implementation |
63
+ | **Design Explorer** | Generate 4-6 design variants. Open comparison. Iterate until user loves it. | Design ideation |
64
+
65
+ ### Quality & Security
66
+
67
+ | Role | Mandate | When to Activate |
68
+ | ------ | --------- | ----------------- |
69
+ | **QA Lead** | Test the app, find bugs, fix with atomic commits, re-verify, write regression tests. | Before shipping |
70
+ | **QA Reporter** | Pure bug report only. No code changes. | Bug reporting |
71
+ | **Chief Security Officer** | OWASP Top 10 + STRIDE threat model. Zero-noise: 8/10+ confidence gate. Each finding needs exploit scenario. | Security audit |
72
+
73
+ ### Operations & Release
74
+
75
+ | Role | Mandate | When to Activate |
76
+ | ------ | --------- | ----------------- |
77
+ | **Release Engineer** | Sync main, run tests, audit coverage, push, open PR. Bootstrap test frameworks if missing. | Before shipping |
78
+ | **SRE** | Post-deploy monitoring loop. Watch for console errors, performance regressions, failures. | After deploy |
79
+ | **Technical Writer** | Update all docs to match what shipped. Catch stale READMEs. Build Diataxis coverage map. | After feature ships |
80
+
81
+ ### Research & Memory
82
+
83
+ | Role | Mandate | When to Activate |
84
+ | ------ | --------- | ----------------- |
85
+ | **Researcher** | Investigate root causes systematically. No fixes without understanding. Max 3 hypothesis cycles. | Unknown problems |
86
+ | **Memory Manager** | Manage learnings across sessions. Review, search, prune, export project patterns. | Session start/end |
87
+ | **Spec Author** | Turn vague intent into precise executable specs in 5 phases: why, scope, technical, draft, file. | Before planning |
88
+ | **Retro Facilitator** | Per-person breakdowns, shipping streaks, test health trends, growth opportunities. | End of sprint |
89
+
90
+ ---
91
+
92
+ ## Sprint Lifecycle
93
+
94
+ Every change follows this lifecycle, with a specific role per phase:
95
+
96
+ ```
97
+ THINK PLAN BUILD REVIEW TEST SHIP
98
+ [YC Hours] [Architect] [Sr Developer] [Staff Eng] [QA Lead] [Release Eng]
99
+ [CEO] [Eng Mgr] [Designer] [Sec Officer]
100
+ ```
101
+
102
+ ## Role-Switching Rules
103
+
104
+ 1. **Use proportional phases.** Scope substantial work; routine edits can proceed directly.
105
+ 2. **One role at a time.** Don't mix QA and implementation in the same response.
106
+ 3. **Declare when helpful.** Role labels are optional communication aids.
107
+ 4. **Escalate correctly.** If a QA finds an architectural problem → escalate to Architect role.
108
+ 5. **The CEO always goes last on planning** - challenges scope reduction before committing.
109
+
110
+ ## Example Usage
111
+
112
+ ```
113
+ User: "Add a notifications feature"
114
+
115
+ [ROLE: YC Office Hours]
116
+ Before I plan this, 6 forcing questions:
117
+ 1. What pain does the ABSENCE of notifications cause today?
118
+ 2. Who specifically gets notified? What's the trigger?
119
+ ...
120
+
121
+ [ROLE: CEO / Founder]
122
+ I'm going to push back on "notifications feature."
123
+ What you actually described is a user re-engagement system.
124
+ The narrowest wedge: one email on task completion.
125
+ Ship that tomorrow. The full vision is a 3-month project.
126
+
127
+ [ROLE: Architect]
128
+ For the narrow wedge:
129
+ - Event: task.completed → webhook → email queue (Redis)
130
+ - No real-time needed for MVP
131
+ - Schema: notifications(id, user_id, type, payload, sent_at)
132
+ ```
133
+
134
+
135
+ ## Code Examples
136
+
137
+ See `EXAMPLES.md` for detailed code examples.
138
+
139
+ ## Validation Checklist
140
+
141
+ What to verify during the review phase before completing the task.
142
+
143
+ ## Common Mistakes
144
+
145
+ Anti-patterns and things to explicitly avoid. See `TROUBLESHOOTING.md`.
146
+
147
+ ## Integration Notes
148
+
149
+ How this skill interacts with other skills.
@@ -0,0 +1,45 @@
1
+ # ponytail-mindset Examples — Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Data Formatting and Manipulation
4
+
5
+ ### Anti-pattern: Over-engineered Custom Utility Class
6
+
7
+ ```typescript
8
+ // BAD: 40 lines of boilerplate for relative date formatting
9
+ export class DateFormatterService {
10
+ private static instance: DateFormatterService;
11
+ public static getInstance() { /* singleton boilerplate */ }
12
+ public formatRelative(date: Date): string {
13
+ const diff = Date.now() - date.getTime();
14
+ // 30 lines of manual math, plurals, and string building
15
+ }
16
+ }
17
+ ```
18
+
19
+ ### Best practice: ContextOS Standard (Standard Library Native API)
20
+
21
+ ```typescript
22
+ // GOOD: Native Intl API, zero bundle cost, handles all locales
23
+ export const formatRelativeTime = (date: Date, locale = 'en'): string => {
24
+ const diffDays = Math.round((date.getTime() - Date.now()) / (1000 * 60 * 60 * 24));
25
+ return new Intl.RelativeTimeFormat(locale, { numeric: 'auto' }).format(diffDays, 'day');
26
+ };
27
+ ```
28
+
29
+ ---
30
+
31
+ ## Example 2: Component Library Reuse
32
+
33
+ ### Anti-pattern: Hand-rolled Modal from Scratch
34
+
35
+ ```text
36
+ BAD: Writing custom overlay DOM, manual scroll locking, manual focus trapping,
37
+ and custom keydown listeners. Burns 300+ lines of fragile code.
38
+ ```
39
+
40
+ ### Best practice: ContextOS Standard (Leverage Established Primitives)
41
+
42
+ ```bash
43
+ # GOOD: Install battle-tested primitive that handles ARIA, portals, and keyboard navigation
44
+ npx shadcn@latest add dialog
45
+ ```