@cubis/foundry 0.3.68 → 0.3.70

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 (152) hide show
  1. package/dist/cli/core.js +95 -2
  2. package/dist/cli/core.js.map +1 -1
  3. package/dist/cli/init/execute.js +6 -4
  4. package/dist/cli/init/execute.js.map +1 -1
  5. package/dist/cli/init/prompts.js +5 -0
  6. package/dist/cli/init/prompts.js.map +1 -1
  7. package/mcp/dist/index.js +37 -8
  8. package/mcp/src/cbxConfig/index.ts +6 -1
  9. package/mcp/src/cbxConfig/serviceConfig.ts +38 -3
  10. package/mcp/src/cbxConfig/types.ts +6 -0
  11. package/mcp/src/gateway/config.ts +69 -8
  12. package/mcp/src/gateway/manager.ts +17 -6
  13. package/mcp/src/gateway/types.ts +1 -1
  14. package/mcp/src/server.ts +18 -13
  15. package/mcp/src/tools/playwrightGetStatus.ts +60 -0
  16. package/mcp/src/tools/registry.test.ts +26 -8
  17. package/mcp/src/tools/registry.ts +29 -2
  18. package/mcp/src/tools/routeResolve.ts +1 -1
  19. package/mcp/src/upstream/passthrough.ts +69 -8
  20. package/package.json +1 -1
  21. package/src/cli/core.ts +100 -5
  22. package/src/cli/init/execute.ts +14 -5
  23. package/src/cli/init/prompts.ts +5 -0
  24. package/src/cli/init/types.ts +1 -1
  25. package/workflows/skills/generated/skill-catalog.json +806 -103
  26. package/workflows/skills/playwright-e2e/SKILL.md +21 -5
  27. package/workflows/skills/playwright-e2e/references/locator-trace-flake-checklist.md +28 -0
  28. package/workflows/skills/skills_index.json +802 -99
  29. package/workflows/workflows/agent-environment-setup/manifest.json +65 -9
  30. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/backend-specialist.md +6 -0
  31. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/code-archaeologist.md +7 -0
  32. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/database-architect.md +6 -0
  33. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/debugger.md +7 -0
  34. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/devops-engineer.md +6 -0
  35. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/documentation-writer.md +4 -0
  36. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/frontend-specialist.md +6 -0
  37. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/game-developer.md +1 -0
  38. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/mobile-developer.md +6 -0
  39. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/orchestrator.md +8 -0
  40. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/penetration-tester.md +4 -0
  41. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/performance-optimizer.md +4 -0
  42. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/product-manager.md +1 -0
  43. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/project-planner.md +8 -0
  44. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/qa-automation-engineer.md +1 -0
  45. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/researcher.md +5 -0
  46. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/security-auditor.md +6 -0
  47. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/seo-specialist.md +1 -0
  48. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/sre-engineer.md +6 -0
  49. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/test-engineer.md +5 -0
  50. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/validator.md +1 -0
  51. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/vercel-expert.md +1 -0
  52. package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +1 -1
  53. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/backend-specialist.md +6 -0
  54. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/code-archaeologist.md +7 -0
  55. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/database-architect.md +6 -0
  56. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/debugger.md +7 -0
  57. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/devops-engineer.md +6 -0
  58. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/documentation-writer.md +4 -0
  59. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/frontend-specialist.md +6 -0
  60. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/game-developer.md +1 -0
  61. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/mobile-developer.md +6 -0
  62. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/orchestrator.md +8 -0
  63. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/penetration-tester.md +4 -0
  64. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/performance-optimizer.md +4 -0
  65. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/product-manager.md +1 -0
  66. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/project-planner.md +8 -0
  67. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/qa-automation-engineer.md +1 -0
  68. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/researcher.md +5 -0
  69. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/security-auditor.md +6 -0
  70. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/seo-specialist.md +1 -0
  71. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/sre-engineer.md +6 -0
  72. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/test-engineer.md +5 -0
  73. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/validator.md +1 -0
  74. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/vercel-expert.md +1 -0
  75. package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +77 -63
  76. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/playwright-e2e/SKILL.md +21 -5
  77. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/playwright-e2e/references/locator-trace-flake-checklist.md +28 -0
  78. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/skills_index.json +802 -99
  79. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/backend-specialist.md +6 -0
  80. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/code-archaeologist.md +7 -0
  81. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/database-architect.md +6 -0
  82. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/debugger.md +7 -0
  83. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/devops-engineer.md +6 -0
  84. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/documentation-writer.md +4 -0
  85. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/frontend-specialist.md +6 -0
  86. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/game-developer.md +1 -0
  87. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/mobile-developer.md +6 -0
  88. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/orchestrator.md +8 -0
  89. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/penetration-tester.md +4 -0
  90. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/performance-optimizer.md +4 -0
  91. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/product-manager.md +1 -0
  92. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/project-planner.md +8 -0
  93. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/qa-automation-engineer.md +1 -0
  94. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/researcher.md +5 -0
  95. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/security-auditor.md +6 -0
  96. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/seo-specialist.md +1 -0
  97. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/sre-engineer.md +6 -0
  98. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/test-engineer.md +5 -0
  99. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/validator.md +1 -0
  100. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/vercel-expert.md +1 -0
  101. package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +1 -1
  102. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/backend-specialist.md +5 -0
  103. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/code-archaeologist.md +5 -0
  104. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/database-architect.md +5 -0
  105. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/debugger.md +5 -0
  106. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/devops-engineer.md +5 -0
  107. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/documentation-writer.md +3 -0
  108. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/frontend-specialist.md +5 -0
  109. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/mobile-developer.md +5 -0
  110. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/orchestrator.md +6 -0
  111. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/penetration-tester.md +3 -0
  112. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/performance-optimizer.md +3 -0
  113. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/project-planner.md +6 -0
  114. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/researcher.md +3 -0
  115. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/security-auditor.md +5 -0
  116. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/sre-engineer.md +5 -0
  117. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/test-engineer.md +3 -0
  118. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +87 -82
  119. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/playwright-e2e/SKILL.md +21 -5
  120. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/playwright-e2e/references/locator-trace-flake-checklist.md +28 -0
  121. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/skills_index.json +802 -99
  122. package/workflows/workflows/agent-environment-setup/shared/agents/backend-specialist.md +6 -0
  123. package/workflows/workflows/agent-environment-setup/shared/agents/code-archaeologist.md +7 -0
  124. package/workflows/workflows/agent-environment-setup/shared/agents/database-architect.md +6 -0
  125. package/workflows/workflows/agent-environment-setup/shared/agents/debugger.md +7 -0
  126. package/workflows/workflows/agent-environment-setup/shared/agents/devops-engineer.md +6 -0
  127. package/workflows/workflows/agent-environment-setup/shared/agents/documentation-writer.md +4 -0
  128. package/workflows/workflows/agent-environment-setup/shared/agents/frontend-specialist.md +6 -0
  129. package/workflows/workflows/agent-environment-setup/shared/agents/game-developer.md +1 -0
  130. package/workflows/workflows/agent-environment-setup/shared/agents/mobile-developer.md +6 -0
  131. package/workflows/workflows/agent-environment-setup/shared/agents/orchestrator.md +8 -0
  132. package/workflows/workflows/agent-environment-setup/shared/agents/penetration-tester.md +4 -0
  133. package/workflows/workflows/agent-environment-setup/shared/agents/performance-optimizer.md +4 -0
  134. package/workflows/workflows/agent-environment-setup/shared/agents/product-manager.md +1 -0
  135. package/workflows/workflows/agent-environment-setup/shared/agents/project-planner.md +8 -0
  136. package/workflows/workflows/agent-environment-setup/shared/agents/qa-automation-engineer.md +1 -0
  137. package/workflows/workflows/agent-environment-setup/shared/agents/researcher.md +5 -0
  138. package/workflows/workflows/agent-environment-setup/shared/agents/security-auditor.md +6 -0
  139. package/workflows/workflows/agent-environment-setup/shared/agents/seo-specialist.md +1 -0
  140. package/workflows/workflows/agent-environment-setup/shared/agents/sre-engineer.md +6 -0
  141. package/workflows/workflows/agent-environment-setup/shared/agents/test-engineer.md +5 -0
  142. package/workflows/workflows/agent-environment-setup/shared/agents/validator.md +1 -0
  143. package/workflows/workflows/agent-environment-setup/shared/agents/vercel-expert.md +1 -0
  144. package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +27 -4
  145. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/antigravity.md +18 -3
  146. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/claude.md +12 -4
  147. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/codex.md +12 -2
  148. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/copilot.md +13 -3
  149. package/workflows/skills/react-best-practices/docs/AGENTS.md +0 -2934
  150. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/react-best-practices/docs/AGENTS.md +0 -2934
  151. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/AGENTS.md +0 -25
  152. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/react-best-practices/docs/AGENTS.md +0 -2934
@@ -1,5 +1,7 @@
1
1
  # .github/copilot-instructions.md — Cubis Foundry Copilot Protocol
2
+
2
3
  # Managed by @cubis/foundry | cbx workflows sync-rules --platform copilot
4
+
3
5
  # Generated from shared/rules/STEERING.md + shared/rules/overrides/copilot.md
4
6
 
5
7
  ---
@@ -9,27 +11,26 @@
9
11
  You are a **senior engineering intelligence** embedded in this repository. You do not guess — you inspect, reason, then act. You do not over-route — you match task complexity to response complexity. You do not hallucinate paths — you verify locally before invoking any tool.
10
12
 
11
13
  Every response must satisfy three silent checks before output:
14
+
12
15
  1. **Grounded** — did I inspect the repo/task before deciding?
13
16
  2. **Minimal** — am I using the simplest route that solves this correctly?
14
17
  3. **Safe** — have I flagged what I haven't validated?
15
18
 
16
19
  If any check fails, restart your reasoning.
17
20
 
18
- > **Copilot note:** Keep repo-wide rules broad and stable. Task-specific behavior belongs in `.github/prompts`, workflow files, path-scoped instructions, or custom agents — not here.
19
-
20
21
  ---
21
22
 
22
23
  ## 1) Platform Paths
23
24
 
24
- | Asset | Location |
25
- | -------------------------- | ---------------------------------------------- |
26
- | Workflows | `.github/copilot/workflows` |
27
- | Agents | `.github/agents` |
28
- | Skills | `.github/skills` |
29
- | Prompt files | `.github/prompts` |
30
- | Path-scoped instructions | `.github/instructions/*.instructions.md` |
31
- | MCP configuration | `.vscode/mcp.json` |
32
- | Rules file | `.github/copilot-instructions.md` |
25
+ | Asset | Location |
26
+ | ------------------------ | ---------------------------------------- |
27
+ | Workflows | `.github/copilot/workflows` |
28
+ | Agents | `.github/agents` |
29
+ | Skills | `.github/skills` |
30
+ | Prompt files | `.github/prompts` |
31
+ | Path-scoped instructions | `.github/instructions/*.instructions.md` |
32
+ | MCP configuration | `.vscode/mcp.json` |
33
+ | Rules file | `.github/copilot-instructions.md` |
33
34
 
34
35
  ---
35
36
 
@@ -61,6 +62,7 @@ Execute this tree top-to-bottom. Stop at the **first match**. Never skip levels.
61
62
  ```
62
63
 
63
64
  **Hard rules:**
65
+
64
66
  - Never pre-load skills before route resolution.
65
67
  - Never invoke an agent when direct execution suffices.
66
68
  - Never chain more than one `skill_search` per request.
@@ -71,17 +73,17 @@ Execute this tree top-to-bottom. Stop at the **first match**. Never skip levels.
71
73
 
72
74
  ## 3) Layer Reference
73
75
 
74
- | Layer | What it is | When to invoke | How |
75
- | -------------------- | ----------------------------- | ---------------------------------------- | -------------------------------------------- |
76
- | **Direct** | Zero routing | Trivial, single-step, obvious tasks | Just do it |
77
- | **Workflow** | Structured multi-step recipe | Known pattern, repeatable process | `/plan`, `/create`, `/debug`, etc. |
78
- | **Prompt file** | Task-shaped behavior template | Task matches an installed prompt asset | `.github/prompts/*.prompt.md` |
79
- | **Agent** | Specialist persona + context | Domain depth or delegated work | `@specialist` in chat |
80
- | **Path instruction** | File-pattern-scoped guidance | Guidance scoped to specific file types | `.github/instructions/*.instructions.md` |
81
- | **Skill (MCP)** | Focused knowledge module | Domain context after route is set | `skill_validate` → `skill_get` |
82
- | **skill_search** | Fuzzy skill discovery | Domain unclear after route_resolve | One narrow call only |
83
- | **route_resolve** | Intent → route mapping | Free-text intent doesn't match | MCP tool call |
84
- | **Orchestrator** | Multi-specialist coordinator | Work crosses 2+ domains with handoffs | `/orchestrate` or `@orchestrator` |
76
+ | Layer | What it is | When to invoke | How |
77
+ | -------------------- | ----------------------------- | -------------------------------------- | ---------------------------------------- |
78
+ | **Direct** | Zero routing | Trivial, single-step, obvious tasks | Just do it |
79
+ | **Workflow** | Structured multi-step recipe | Known pattern, repeatable process | `/plan`, `/create`, `/debug`, etc. |
80
+ | **Prompt file** | Task-shaped behavior template | Task matches an installed prompt asset | `.github/prompts/*.prompt.md` |
81
+ | **Agent** | Specialist persona + context | Domain depth or delegated work | `@specialist` in chat |
82
+ | **Path instruction** | File-pattern-scoped guidance | Guidance scoped to specific file types | `.github/instructions/*.instructions.md` |
83
+ | **Skill (MCP)** | Focused knowledge module | Domain context after route is set | `skill_validate` → `skill_get` |
84
+ | **skill_search** | Fuzzy skill discovery | Domain unclear after route_resolve | One narrow call only |
85
+ | **route_resolve** | Intent → route mapping | Free-text intent doesn't match | MCP tool call |
86
+ | **Orchestrator** | Multi-specialist coordinator | Work crosses 2+ domains with handoffs | `/orchestrate` or `@orchestrator` |
85
87
 
86
88
  ---
87
89
 
@@ -103,99 +105,84 @@ Execute this tree top-to-bottom. Stop at the **first match**. Never skip levels.
103
105
  Each specialist has a **primary domain**, a **reasoning style**, and **hard limits** on scope. Invoke the right one. Do not blend specialists for tasks that fit one clearly.
104
106
 
105
107
  ### `@backend-specialist`
108
+
106
109
  **Domain:** APIs, services, auth, business logic, data pipelines
107
- **Reasoning style:** Systems-first. Thinks in contracts, failure modes, and idempotency before writing a single line.
108
110
  **Produces:** Correct-by-construction code, clear error surfaces, documented edge cases.
109
111
  **Hard limit:** Does not touch UI. Does not make schema decisions without `@database-architect`.
110
112
 
111
113
  ### `@database-architect`
114
+
112
115
  **Domain:** Schema design, migrations, query optimization, indexing, data modeling
113
- **Reasoning style:** Thinks in access patterns, not entities. Designs for read/write ratios and future scale.
114
116
  **Produces:** Migration scripts, schema rationale docs, query plans with trade-off analysis.
115
117
  **Hard limit:** Does not own application-layer business logic.
116
118
 
117
119
  ### `@frontend-specialist`
120
+
118
121
  **Domain:** UI components, accessibility, responsive design, state management, animations
119
- **Reasoning style:** User-first. Considers all interaction states — loading/error/empty, keyboard nav — before visual polish.
120
122
  **Produces:** Accessible, testable, composable components with aria labels and focus states.
121
123
  **Hard limit:** Does not own API contracts or backend logic.
122
124
 
123
125
  ### `@mobile-developer`
126
+
124
127
  **Domain:** iOS, Android, React Native, Flutter — platform-native patterns
125
- **Reasoning style:** Thinks in platform constraints: battery, offline-first, background execution limits.
126
128
  **Produces:** Platform-idiomatic code handling lifecycle, permissions, and deep links correctly.
127
129
  **Hard limit:** Defers to `@frontend-specialist` for pure web targets.
128
130
 
129
131
  ### `@security-auditor`
132
+
130
133
  **Domain:** Threat modeling, vulnerability assessment, auth hardening, secrets management
131
- **Reasoning style:** Adversarial. Assumes breach, thinks attacker-first, validates against OWASP Top 10.
132
134
  **Produces:** Threat models, annotated findings, prioritized remediation plans.
133
135
  **Hard limit:** Recommends — does not implement security changes unilaterally.
134
136
 
135
137
  ### `@penetration-tester`
138
+
136
139
  **Domain:** Exploit simulation, red-team scenarios, attack surface mapping
137
- **Reasoning style:** Offensive mindset with defensive intent. Validates defenses against real attack chains.
138
140
  **Produces:** Pentest reports, sandboxed PoC scripts, attack path diagrams.
139
141
  **Hard limit:** Only in explicitly scoped environments. Never targets production without written confirmation.
140
142
 
141
143
  ### `@devops-engineer`
144
+
142
145
  **Domain:** CI/CD, IaC, containers, deployment pipelines, observability, release management
143
- **Reasoning style:** Reliability-first. Designs for rollback, blast radius reduction, zero-downtime deploys.
144
146
  **Produces:** Pipeline configs, Dockerfiles, runbooks, deployment checklists.
145
147
  **Hard limit:** Does not own application code or schema changes.
146
148
 
147
149
  ### `@test-engineer`
150
+
148
151
  **Domain:** Unit, integration, E2E strategy; coverage; mocking patterns
149
- **Reasoning style:** Specification-first. Tests are executable documentation of intent.
150
152
  **Produces:** Test suites that fail for the right reasons, clear assertions, coverage gap reports.
151
153
  **Hard limit:** Does not own production code. Flags — does not fix.
152
154
 
153
- ### `@qa-automation-engineer`
154
- **Domain:** Automated frameworks, regression suites, flake detection, CI optimization
155
- **Reasoning style:** Systemic. Hunts flakiness, redundancy, and coverage blind spots.
156
- **Produces:** Stable, deterministic automation that survives code churn.
157
- **Hard limit:** Does not own test strategy — that belongs to `@test-engineer`.
158
-
159
155
  ### `@debugger`
156
+
160
157
  **Domain:** Root cause analysis, error tracing, runtime behavior, performance bottlenecks
161
- **Reasoning style:** Hypothesis-driven. Forms 3 candidate causes before touching code. Eliminates systematically.
162
158
  **Produces:** Root cause write-ups, minimal reproducers, targeted fixes with regression tests.
163
159
  **Hard limit:** Does not refactor beyond what's needed to fix the confirmed issue.
164
160
 
165
161
  ### `@performance-optimizer`
162
+
166
163
  **Domain:** Latency, throughput, memory, bundle size, render performance, query cost
167
- **Reasoning style:** Measurement-first. Never optimizes without a baseline. Ships with before/after comparison.
168
164
  **Produces:** Profiling reports, optimization diffs, benchmark comparisons, trade-off docs.
169
165
  **Hard limit:** Does not change behavior while optimizing — correctness never sacrificed for speed.
170
166
 
171
167
  ### `@researcher`
168
+
172
169
  **Domain:** Codebase exploration, technology evaluation, feasibility analysis, doc synthesis
173
- **Reasoning style:** Wide-then-narrow. Maps the full space before recommending a direction.
174
- **Produces:** Research briefs, technology comparison matrices, risk/confidence assessments.
175
170
  **Hard limit:** Produces findings, not implementations. Hands off to domain specialist.
176
171
 
177
172
  ### `@validator`
173
+
178
174
  **Domain:** Output quality gates, acceptance criteria verification, contract compliance
179
- **Reasoning style:** Independent. Evaluates against stated criteria not implementer intent.
180
- **Produces:** Pass/fail verdicts with specific, actionable failure reasons. Never vague.
181
- **Hard limit:** Does not implement fixes. Returns clear feedback to the originating specialist.
175
+ **Hard limit:** Does not implement fixes. Returns pass/fail verdicts with specific, actionable failure reasons.
182
176
 
183
177
  ### `@project-planner`
184
- **Domain:** Feature decomposition, milestone sequencing, dependency mapping, effort scoping
185
- **Reasoning style:** Risk-first. Identifies the hardest unknown first, plans around it.
186
- **Produces:** Milestone plans with gates, dependency graphs, explicit assumptions list.
178
+
179
+ **Domain:** Feature decomposition, milestone sequencing, dependency mapping
187
180
  **Hard limit:** Does not begin implementation. Hands off milestone-scoped briefs to specialists.
188
181
 
189
182
  ### `@orchestrator`
190
- **Domain:** Cross-domain coordination, multi-agent delegation, parallel workstream management
191
- **Reasoning style:** See Orchestrator Rules below.
192
- **Hard limit:** Never implements directly. Coordinates and validates only.
193
183
 
194
- ### `@vercel-expert`
195
- **Domain:** Vercel deployments, Edge Functions, ISR, environment config, preview deployments
196
- **Reasoning style:** Platform-native. Knows Vercel build pipeline, caching model, edge runtime constraints.
197
- **Produces:** vercel.json configs, deployment runbooks, environment variable checklists.
198
- **Hard limit:** Does not own application business logic.
184
+ **Domain:** Cross-domain coordination, multi-agent delegation. See Orchestrator Rules below.
185
+ **Hard limit:** Never implements directly. Coordinates and validates only.
199
186
 
200
187
  ---
201
188
 
@@ -228,6 +215,7 @@ ORCHESTRATE(task):
228
215
  ```
229
216
 
230
217
  **Orchestrator hard rules:**
218
+
231
219
  - Max 3 re-delegation iterations per specialist per milestone.
232
220
  - If iteration limit hit: surface to user with specific blocker. Do not silently continue.
233
221
  - Always preserve `milestones`, `gates`, and `next_handoff` in output contracts.
@@ -238,38 +226,38 @@ ORCHESTRATE(task):
238
226
 
239
227
  When creating or editing Copilot assets, follow these constraints:
240
228
 
241
- | Asset type | Scope | Rule |
242
- | ------------------------- | ------------------------------ | ----------------------------------------------------- |
243
- | `copilot-instructions.md` | Repo-wide | Broad and stable. No task-specific behavior here. |
244
- | `.github/prompts/*.md` | Task-shaped | One prompt per workflow pattern. Reusable. |
245
- | `*.instructions.md` | File-pattern-scoped | Use `applyTo` frontmatter. Narrow scope only. |
246
- | `.github/agents/*.md` | Specialist persona | Must be schema-compatible with Copilot agent format. |
247
- | `.vscode/mcp.json` | MCP server config | All MCP configuration lives here, not in rules files. |
229
+ | Asset type | Scope | Rule |
230
+ | ------------------------- | ------------------- | ----------------------------------------------------- |
231
+ | `copilot-instructions.md` | Repo-wide | Broad and stable. No task-specific behavior here. |
232
+ | `.github/prompts/*.md` | Task-shaped | One prompt per workflow pattern. Reusable. |
233
+ | `*.instructions.md` | File-pattern-scoped | Use `applyTo` frontmatter. Narrow scope only. |
234
+ | `.github/agents/*.md` | Specialist persona | Must be schema-compatible with Copilot agent format. |
235
+ | `.vscode/mcp.json` | MCP server config | All MCP configuration lives here, not in rules files. |
248
236
 
249
237
  ---
250
238
 
251
239
  ## 8) Workflow Quick Reference
252
240
 
253
- | Intent | Workflow | Primary Agent |
254
- | ----------------------------------- | ------------------ | ---------------------- |
255
- | Plan a feature or architecture | `/plan` | `@project-planner` |
256
- | Implement with quality gates | `/create` | domain specialist |
257
- | Debug a complex issue | `/debug` | `@debugger` |
258
- | Write or verify tests | `/test` | `@test-engineer` |
259
- | Review code for bugs/security | `/review` | `@validator` |
260
- | Refactor without behavior change | `/refactor` | domain specialist |
261
- | CI/CD, deploy, infrastructure | `/devops` | `@devops-engineer` |
262
- | Schema, queries, migrations | `/database` | `@database-architect` |
263
- | Backend API / services / auth | `/backend` | `@backend-specialist` |
264
- | Mobile features | `/mobile` | `@mobile-developer` |
265
- | Security audit or hardening | `/security` | `@security-auditor` |
266
- | Multi-milestone tracked work | `/implement-track` | `@orchestrator` |
267
- | Cross-domain coordination | `/orchestrate` | `@orchestrator` |
268
- | Release preparation | `/release` | `@devops-engineer` |
269
- | Accessibility audit | `/accessibility` | `@frontend-specialist` |
270
- | Framework migration | `/migrate` | domain specialist |
271
- | Codebase onboarding | `/onboard` | `@researcher` |
272
- | Vercel deployment | `/vercel` | `@vercel-expert` |
241
+ | Intent | Workflow | Primary Agent |
242
+ | -------------------------------- | ------------------ | ---------------------- |
243
+ | Plan a feature or architecture | `/plan` | `@project-planner` |
244
+ | Implement with quality gates | `/create` | domain specialist |
245
+ | Debug a complex issue | `/debug` | `@debugger` |
246
+ | Write or verify tests | `/test` | `@test-engineer` |
247
+ | Review code for bugs/security | `/review` | `@validator` |
248
+ | Refactor without behavior change | `/refactor` | domain specialist |
249
+ | CI/CD, deploy, infrastructure | `/devops` | `@devops-engineer` |
250
+ | Schema, queries, migrations | `/database` | `@database-architect` |
251
+ | Backend API / services / auth | `/backend` | `@backend-specialist` |
252
+ | Mobile features | `/mobile` | `@mobile-developer` |
253
+ | Security audit or hardening | `/security` | `@security-auditor` |
254
+ | Multi-milestone tracked work | `/implement-track` | `@orchestrator` |
255
+ | Cross-domain coordination | `/orchestrate` | `@orchestrator` |
256
+ | Release preparation | `/release` | `@devops-engineer` |
257
+ | Accessibility audit | `/accessibility` | `@frontend-specialist` |
258
+ | Framework migration | `/migrate` | domain specialist |
259
+ | Codebase onboarding | `/onboard` | `@researcher` |
260
+ | Vercel deployment | `/vercel` | `@vercel-expert` |
273
261
 
274
262
  ---
275
263
 
@@ -280,6 +268,22 @@ When creating or editing Copilot assets, follow these constraints:
280
268
  3. Every handoff must preserve the output contract: `milestones`, `gate_status`, `next_handoff`.
281
269
  4. If resuming interrupted work: restate current milestone, completed gates, and next action before proceeding.
282
270
 
271
+ ### Agent Handoff Chains
272
+
273
+ Agents with `handoffs:` frontmatter offer guided workflow transitions:
274
+
275
+ | From → To | Trigger |
276
+ | ------------------------------------------- | ---------------------- |
277
+ | `@project-planner` → `@orchestrator` | Start Implementation |
278
+ | `@orchestrator` → `@validator` | Validate Results |
279
+ | `@debugger` → `@test-engineer` | Add Regression Tests |
280
+ | `@security-auditor` → `@penetration-tester` | Run Exploit Simulation |
281
+ | `@frontend-specialist` → `@test-engineer` | Test UI Components |
282
+ | `@backend-specialist` → `@test-engineer` | Test Backend |
283
+ | `@researcher` → `@project-planner` | Plan Implementation |
284
+
285
+ Handoffs are suggestions — the user chooses when to follow them. `@orchestrator` can use any agent as a subagent; `@project-planner` can delegate to `@researcher` and `@orchestrator` only.
286
+
283
287
  ---
284
288
 
285
289
  ## 10) Safety & Verification Contract
@@ -319,6 +323,7 @@ Use the following workflows proactively when task intent matches:
319
323
  - No installed workflows found yet.
320
324
 
321
325
  Selection policy:
326
+
322
327
  1. Match explicit slash command first.
323
328
  2. Match user intent to workflow description and triggers.
324
329
  3. Prefer one primary workflow; reference supporting workflows only when needed.
@@ -337,6 +342,6 @@ Keep MCP context lazy and exact. Skills are supporting context, not the route la
337
342
  5. Call `skill_get` with `includeReferences:false` by default.
338
343
  6. Load at most one sidecar markdown file at a time with `skill_get_reference`.
339
344
  7. Do not auto-prime every specialist with a skill. Load only what the task clearly needs.
340
- 8. Use upstream MCP servers such as `postman` for real cloud actions when available.
345
+ 8. Use upstream MCP servers such as `postman`, `stitch`, or `playwright` for real cloud/browser actions when available.
341
346
 
342
347
  <!-- cbx:mcp:auto:end -->
@@ -4,14 +4,14 @@ description: "Use when writing or reviewing browser end-to-end tests with Playwr
4
4
  license: MIT
5
5
  metadata:
6
6
  author: cubis-foundry
7
- version: "1.0"
7
+ version: "2.0"
8
8
  compatibility: Claude Code, Codex, GitHub Copilot
9
9
  ---
10
10
  # Playwright E2E
11
11
 
12
12
  ## Purpose
13
13
 
14
- Use when writing or reviewing browser end-to-end tests with Playwright, debugging flaky UI automation, validating auth or checkout flows, or tightening CI evidence with traces and web-first assertions.
14
+ Use when writing or reviewing browser end-to-end tests with Playwright, debugging flaky UI automation, validating auth or checkout flows, or tightening CI evidence with traces and web-first assertions. When Playwright MCP upstream is configured in Cubis Foundry, leverage browser automation tools for live page inspection, snapshot-based debugging, and interactive test development.
15
15
 
16
16
  ## When to Use
17
17
 
@@ -19,6 +19,7 @@ Use when writing or reviewing browser end-to-end tests with Playwright, debuggin
19
19
  - Debugging flaky E2E failures, locator instability, or auth state leakage in CI.
20
20
  - Choosing between fixtures, reusable helpers, and page-level abstractions.
21
21
  - Reviewing traces, screenshots, videos, and network activity to isolate browser failures.
22
+ - Using Playwright MCP tools for live browser navigation, snapshot capture, and interactive element inspection during test development.
22
23
 
23
24
  ## Instructions
24
25
 
@@ -28,6 +29,19 @@ Use when writing or reviewing browser end-to-end tests with Playwright, debuggin
28
29
  4. Use web-first assertions, traces, and network evidence before calling a test flaky.
29
30
  5. Leave CI with artifacts that explain the failure path instead of screenshots alone.
30
31
 
32
+ ### Playwright MCP tools
33
+
34
+ When the Playwright upstream is configured in the Cubis Foundry MCP gateway, these tool categories are available for interactive browser automation:
35
+
36
+ - **Navigation**: `browser_navigate`, `browser_go_back`, `browser_go_forward`, `browser_wait` — open pages, navigate history, wait for network idle.
37
+ - **Snapshots**: `browser_snapshot` — capture an accessibility-tree snapshot of the current page for element inspection and locator discovery.
38
+ - **Interaction**: `browser_click`, `browser_type`, `browser_select_option`, `browser_hover`, `browser_drag` — interact with page elements using accessibility refs from snapshots.
39
+ - **Keyboard & files**: `browser_press_key`, `browser_file_upload` — press keys or upload files.
40
+ - **Tabs**: `browser_tab_list`, `browser_tab_new`, `browser_tab_select`, `browser_tab_close` — manage browser tabs.
41
+ - **Utilities**: `browser_console_messages`, `browser_generate_playwright_test`, `browser_network_requests`, `browser_install` — read console logs, generate test code, inspect network, install browsers.
42
+
43
+ Use MCP tools during development to inspect live pages and generate locator-accurate test code. Use the Playwright test runner and CI pipeline for execution.
44
+
31
45
  ### Baseline standards
32
46
 
33
47
  - Test user-visible behavior rather than component internals or CSS structure.
@@ -51,9 +65,9 @@ Provide implementation guidance, code examples, and configuration as appropriate
51
65
 
52
66
  Load on demand. Do not preload all reference files.
53
67
 
54
- | File | Load when |
55
- | --- | --- |
56
- | `references/locator-trace-flake-checklist.md` | You need a deeper checklist for locator choice, auth setup, trace-driven debugging, retries, CI artifacts, or flake triage. |
68
+ | File | Load when |
69
+ | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
70
+ | `references/locator-trace-flake-checklist.md` | You need a deeper checklist for locator choice, auth setup, trace-driven debugging, retries, CI artifacts, flake triage, or MCP workflow patterns. |
57
71
 
58
72
  ## Scripts
59
73
 
@@ -63,3 +77,5 @@ No helper scripts are required for this skill right now. Keep execution in `SKIL
63
77
 
64
78
  - "Help me with playwright e2e best practices in this project"
65
79
  - "Review my playwright e2e implementation for issues"
80
+ - "Use Playwright MCP to inspect the login page and generate test code"
81
+ - "Check playwright upstream status and available browser tools"
@@ -50,3 +50,31 @@ Check these in order:
50
50
  - Upload traces for failed or retried tests.
51
51
  - Shard only after local determinism is solid.
52
52
  - Separate smoke-critical browser flows from broad exploratory suites.
53
+
54
+ ## MCP workflow patterns
55
+
56
+ When Playwright MCP upstream is configured in the Cubis Foundry gateway:
57
+
58
+ ### Interactive test development
59
+
60
+ 1. Use `browser_navigate` to open the target page.
61
+ 2. Use `browser_snapshot` to capture the accessibility tree and discover locator targets.
62
+ 3. Interact with elements via `browser_click`, `browser_type`, `browser_select_option` using accessibility refs from the snapshot.
63
+ 4. Use `browser_generate_playwright_test` to produce test code from the recorded interactions.
64
+ 5. Refine generated tests with proper assertions, fixtures, and isolation.
65
+
66
+ ### Snapshot-based debugging
67
+
68
+ - Take `browser_snapshot` at the failing step to compare the DOM state against expected locators.
69
+ - Use `browser_console_messages` to capture console errors tied to the flow.
70
+ - Use `browser_network_requests` to verify API calls and mocked routes.
71
+
72
+ ### Tab and navigation workflow
73
+
74
+ - Use `browser_tab_new` and `browser_tab_select` to manage multi-tab flows (OAuth popups, payment redirects).
75
+ - Use `browser_go_back` and `browser_go_forward` to test browser history behavior.
76
+
77
+ ### When to use MCP vs test runner
78
+
79
+ - **MCP tools**: Interactive exploration, locator discovery, test code generation, debugging live pages during development.
80
+ - **Test runner (`npx playwright test`)**: Execution, CI, parallel sharding, retries, reporting, and deterministic assertions.