tech-lead-stack 1.0.1

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 (123) hide show
  1. package/.agents/hr-workflows/hr-ad-distributor.md +18 -0
  2. package/.agents/hr-workflows/hr-candidate-sourcer.md +18 -0
  3. package/.agents/hr-workflows/hr-endorsement-synthesizer.md +18 -0
  4. package/.agents/hr-workflows/hr-intake-specifier.md +18 -0
  5. package/.agents/hr-workflows/hr-interview-auditor.md +18 -0
  6. package/.agents/hr-workflows/hr-jd-drafter.md +18 -0
  7. package/.agents/hr-workflows/hr-pipeline-translator.md +18 -0
  8. package/.agents/pm-workflows/pm-action-item-mapper.md +18 -0
  9. package/.agents/pm-workflows/pm-backlog-auditor.md +18 -0
  10. package/.agents/pm-workflows/pm-context-summarizer.md +18 -0
  11. package/.agents/pm-workflows/pm-design-system-auditor.md +18 -0
  12. package/.agents/pm-workflows/pm-effort-estimator.md +18 -0
  13. package/.agents/pm-workflows/pm-newsletter-generator.md +18 -0
  14. package/.agents/pm-workflows/pm-progress-translator.md +18 -0
  15. package/.agents/pm-workflows/pm-release-note-drafter.md +18 -0
  16. package/.agents/pm-workflows/pm-risk-detector.md +18 -0
  17. package/.agents/pm-workflows/pm-story-augmenter.md +18 -0
  18. package/.agents/pm-workflows/pm-task-specifier.md +18 -0
  19. package/.agents/workflows/accessibility-audit.md +30 -0
  20. package/.agents/workflows/ask.md +44 -0
  21. package/.agents/workflows/audit-tech-debt.md +31 -0
  22. package/.agents/workflows/changelog.md +31 -0
  23. package/.agents/workflows/clean-code-audit.md +31 -0
  24. package/.agents/workflows/code-review.md +38 -0
  25. package/.agents/workflows/competitive-analysis.md +46 -0
  26. package/.agents/workflows/design-requirements-to-architecture.md +31 -0
  27. package/.agents/workflows/design-system-review.md +113 -0
  28. package/.agents/workflows/dev-team-sub-max.md +57 -0
  29. package/.agents/workflows/dev-team-sub-pro.md +57 -0
  30. package/.agents/workflows/dev-team.md +52 -0
  31. package/.agents/workflows/feature-orchestrator.md +43 -0
  32. package/.agents/workflows/init.md +31 -0
  33. package/.agents/workflows/mission-architect.md +31 -0
  34. package/.agents/workflows/onboard-dev.md +31 -0
  35. package/.agents/workflows/plan-quick.md +33 -0
  36. package/.agents/workflows/plan.md +31 -0
  37. package/.agents/workflows/pr-automator.md +44 -0
  38. package/.agents/workflows/pr-design-review-init.md +57 -0
  39. package/.agents/workflows/qa-handover.md +40 -0
  40. package/.agents/workflows/reflexion-loop-sub-max.md +46 -0
  41. package/.agents/workflows/reflexion-loop-sub-pro.md +45 -0
  42. package/.agents/workflows/reflexion-loop.md +66 -0
  43. package/.agents/workflows/regression-bug-fix.md +31 -0
  44. package/.agents/workflows/security-audit.md +31 -0
  45. package/.agents/workflows/standup-daily-summary.md +31 -0
  46. package/.agents/workflows/strategy-target-evaluation.md +31 -0
  47. package/.agents/workflows/style-logic-exporter.md +84 -0
  48. package/.agents/workflows/ui-spec-generator.md +156 -0
  49. package/.agents/workflows/verify-changes.md +31 -0
  50. package/.agents/workflows/vertical-slice.md +52 -0
  51. package/.agents/workflows/weekly-leadership-report.md +39 -0
  52. package/.ai/agent-surfaces.json +1235 -0
  53. package/.ai/hooks/README.md +32 -0
  54. package/.ai/hooks/build-requires-approved-spec.json +10 -0
  55. package/.ai/hooks/deploy-requires-review.json +11 -0
  56. package/.ai/hooks/no-ai-approve-deploy.json +10 -0
  57. package/.ai/hooks/protected-paths.json +10 -0
  58. package/.ai/hr-skills/hr-ad-distributor.md +61 -0
  59. package/.ai/hr-skills/hr-candidate-sourcer.md +69 -0
  60. package/.ai/hr-skills/hr-endorsement-synthesizer.md +82 -0
  61. package/.ai/hr-skills/hr-intake-specifier.md +71 -0
  62. package/.ai/hr-skills/hr-interview-auditor.md +60 -0
  63. package/.ai/hr-skills/hr-jd-drafter.md +61 -0
  64. package/.ai/hr-skills/hr-pipeline-translator.md +58 -0
  65. package/.ai/pm-skills/pm-action-item-mapper.md +61 -0
  66. package/.ai/pm-skills/pm-backlog-auditor.md +57 -0
  67. package/.ai/pm-skills/pm-context-summarizer.md +61 -0
  68. package/.ai/pm-skills/pm-effort-estimator.md +79 -0
  69. package/.ai/pm-skills/pm-newsletter-generator.md +60 -0
  70. package/.ai/pm-skills/pm-progress-translator.md +59 -0
  71. package/.ai/pm-skills/pm-release-note-drafter.md +58 -0
  72. package/.ai/pm-skills/pm-risk-detector.md +58 -0
  73. package/.ai/pm-skills/pm-story-augmenter.md +70 -0
  74. package/.ai/pm-skills/pm-task-specifier.md +70 -0
  75. package/.ai/policies/diagnosis-first.md +26 -0
  76. package/.ai/policies/four-pillars.md +72 -0
  77. package/.ai/policies/user-sovereignty.md +25 -0
  78. package/.ai/skills/accessibility-auditor.md +105 -0
  79. package/.ai/skills/agent-optimizer.md +99 -0
  80. package/.ai/skills/ask.md +200 -0
  81. package/.ai/skills/capacity-planner.md +60 -0
  82. package/.ai/skills/changelog-generator.md +131 -0
  83. package/.ai/skills/clean-code.md +136 -0
  84. package/.ai/skills/code-review-checklist.md +103 -0
  85. package/.ai/skills/codebase-onboarding-intelligence.md +130 -0
  86. package/.ai/skills/competitive-analysis.md +114 -0
  87. package/.ai/skills/daily-standup.md +106 -0
  88. package/.ai/skills/design-system-review.md +308 -0
  89. package/.ai/skills/dev-team-local.md +52 -0
  90. package/.ai/skills/dev-team-orchestrator.md +289 -0
  91. package/.ai/skills/dev-team-sub-max.md +369 -0
  92. package/.ai/skills/dev-team-sub-pro.md +288 -0
  93. package/.ai/skills/dummy-skill.md +28 -0
  94. package/.ai/skills/feature-design-assistant.md +134 -0
  95. package/.ai/skills/feature-orchestrator.md +163 -0
  96. package/.ai/skills/knowledge-manager.md +103 -0
  97. package/.ai/skills/mission-architect.md +86 -0
  98. package/.ai/skills/mission-control.md +102 -0
  99. package/.ai/skills/operational-boundaries.md +94 -0
  100. package/.ai/skills/planning-expert-quick.md +164 -0
  101. package/.ai/skills/planning-expert.md +390 -0
  102. package/.ai/skills/pr-automator.md +431 -0
  103. package/.ai/skills/product-strategist.md +123 -0
  104. package/.ai/skills/qa-handover-generator.md +182 -0
  105. package/.ai/skills/reflexion-loop-local.md +39 -0
  106. package/.ai/skills/reflexion-loop-sub-max.md +214 -0
  107. package/.ai/skills/reflexion-loop-sub-pro.md +164 -0
  108. package/.ai/skills/reflexion-loop.md +119 -0
  109. package/.ai/skills/regression-bug-fix.md +95 -0
  110. package/.ai/skills/security-audit.md +97 -0
  111. package/.ai/skills/solutioning-facilitator.md +338 -0
  112. package/.ai/skills/style-logic-exporter.md +115 -0
  113. package/.ai/skills/technical-debt-auditor.md +119 -0
  114. package/.ai/skills/ui-spec-generator.md +78 -0
  115. package/.ai/skills/verification-auditor.md +101 -0
  116. package/.ai/skills/vertical-slice-decomposer.md +335 -0
  117. package/.ai/skills/visual-verifier.md +134 -0
  118. package/.ai/skills/weekly-leadership-report.md +224 -0
  119. package/.ai/skills.graph.json +1550 -0
  120. package/LICENSE +21 -0
  121. package/README.md +58 -0
  122. package/dist/mcp-server.mjs +5203 -0
  123. package/package.json +48 -0
@@ -0,0 +1,308 @@
1
+ ---
2
+ name: design-system-review
3
+ description: >
4
+ AI-augmented design review with a strict 2-iteration guard, sequential memory
5
+ persistence, and KI creation. Enforces Shadcn/Radix token alignment, layout
6
+ fidelity against the Figma frame, and coordinates designer quality gates.
7
+ cost: ~3400 tokens
8
+ modes: [read-only, write, mcp]
9
+ surface: public
10
+ category: Design & UI
11
+ phase: review
12
+ kind: skill
13
+ domain: eng
14
+ ownership:
15
+ drive: human-ai
16
+ approve: human
17
+ targets: [local, api, subscription]
18
+ minModelClass: small
19
+ consumes: [diff]
20
+ emits: [review-report]
21
+ requires: [accessibility-auditor, style-logic-exporter]
22
+ suggests: [pr-automator, qa-handover-generator, visual-verifier]
23
+ policies:
24
+ - user-sovereignty
25
+ - diagnosis-first
26
+ - four-pillars
27
+ ---
28
+
29
+ # Design System Review (Iteration Guard)
30
+
31
+ ## Runtime modes
32
+
33
+ Produces a verifiable design blueprint in read-only chat, and executes +
34
+ verifies the audit phase in an IDE/MCP agent.
35
+
36
+ > [!IMPORTANT] **Iteration Discipline**: This skill enforces a hard
37
+ > **2-iteration limit**. Iteration 1 produces feedback. Iteration 2 verifies
38
+ > fixes. If alignment is not reached by Iteration 2, the component is escalated
39
+ > — NOT reviewed a 3rd time. Context must be persisted to a scratch file at the
40
+ > start of every session so iteration count survives chat resets.
41
+ >
42
+ > [!IMPORTANT] **Credential Protocol**: If an external tool (Chromatic, Figma)
43
+ > is required during the audit, PAUSE execution, prompt the user for
44
+ > credentials, wait for their response, then resume. Never assume credentials
45
+ > are available. Never hard-code or log credential values.
46
+ >
47
+ > **Methodology Alignment**: This skill strictly adheres to the four core
48
+ > pillars: **G-Stack Ethos**, **MinimumCD**, **Agent Skills**, and **Modern Web
49
+ > Guidance**.
50
+
51
+ ## 🎯 Verification Gates
52
+
53
+ ### Phase 0: Tech-Stack Discovery (MANDATORY)
54
+
55
+ - **Skill Usage Enforcement (NON-NEGOTIABLE):**
56
+ - **FORBIDDEN:** Direct file access via `view_file` or `run_command` is
57
+ strictly prohibited without first calling the skill tool.
58
+ - **IDE / MCP-enabled Agent:** You MUST call the MCP `get_skills` tool (which
59
+ may be prefixed as `mcp_tech-lead-stack_get_skills` or
60
+ `tech-lead-stack_get_skills` depending on client prefixing).
61
+ - **Chat UI (/chat):** You MUST call the internal `get_skill` tool.
62
+
63
+ - **Action:** Identify the project's UI foundation.
64
+ - **Target Files:** Inspect `package.json`, `components.json` (Shadcn config),
65
+ `tailwind.config.*`, and `globals.css`.
66
+ - **Confirm:** Which Shadcn/Radix primitives are installed? What Tailwind token
67
+ namespace is in use (`--color-*`, `--spacing-*`, etc.)?
68
+ - **MANDATORY Guardrail:** Focus ONLY on UI/design configuration. Ignore
69
+ unrelated logic, auth, and infrastructure files. Avoid Goal Drift.
70
+
71
+ ### Phase 0.5: Session Memory Init (MANDATORY — runs before Phase 1)
72
+
73
+ Before doing ANY analysis:
74
+
75
+ 1. **Check for existing session file:**
76
+ - Path pattern:
77
+ `scratch/design-review/<project-name>/session-<YYYY-MM-DD>.md`
78
+ - If a file for today exists, READ it to restore iteration count and
79
+ component state.
80
+ - If no file exists, CREATE it with this template:
81
+
82
+ ```markdown
83
+ # Design Review Session
84
+
85
+ - project: <project-name>
86
+ - component: <component-being-reviewed>
87
+ - started: <ISO timestamp>
88
+ - iteration: 1
89
+ - status: IN_PROGRESS
90
+ - figma_url: (not provided)
91
+ - chromatic_build: (not provided)
92
+
93
+ ## Iteration 1 — Findings
94
+
95
+ (populate after audit)
96
+
97
+ ## Iteration 2 — Verification
98
+
99
+ (populate after fix)
100
+
101
+ ## Decision
102
+
103
+ (populate on completion)
104
+ ```
105
+
106
+ 1. **Report to user:** "Session file created/restored. Currently at Iteration
107
+ **N**. Resuming from: `<status>`."
108
+
109
+ ### Gate 1: Token Alignment
110
+
111
+ - **Positive (Pass):** Colors, spacing, radius, and typography use the project's
112
+ defined Tailwind variables or CSS custom properties. No arbitrary values like
113
+ `text-[#3a3a3a]` or `p-[13px]`.
114
+ - **Negative (Fail):** Hard-coded hex values, magic pixel values, or inline
115
+ styles that bypass the token system.
116
+ - **Action on Fail:** List every violation with the file + line reference.
117
+ Propose the correct token replacement.
118
+
119
+ ### Gate 2: Shadcn/Radix Primitive Alignment
120
+
121
+ - **Positive (Pass):** Component uses the appropriate `@gilly-ui` primitive
122
+ (Button, Dialog, Select, etc.) as its base. Radix accessibility attributes
123
+ (`aria-*`, `data-state`, keyboard handlers) are present.
124
+ - **Negative (Fail):** Custom HTML elements used where a Shadcn primitive
125
+ exists; missing focus management or keyboard navigation.
126
+ - **Action on Fail:** Identify the correct primitive and provide a migration
127
+ snippet.
128
+
129
+ ### Gate 3: Logic Consistency
130
+
131
+ - **Positive (Pass):** Component follows Early Returns, no mixed UI/data logic,
132
+ Zod validation on inputs, no `any` types.
133
+ - **Negative (Fail):** Nested conditionals instead of early returns, inline
134
+ fetch calls, missing error boundaries.
135
+
136
+ ### Gate 4: Layout Fidelity (MANDATORY for any UI-facing change — BLOCKING)
137
+
138
+ This gate exists because token alignment and primitive alignment do NOT prove
139
+ the built UI matches the design. A component can use every correct token and
140
+ Shadcn primitive and still be the wrong width, the wrong proportions, or reflow
141
+ its sub-elements incorrectly. Layout requirements stated in prose ("side by
142
+ side", "wider", "stacked") are CONSEQUENCES of building to the frame, never the
143
+ instruction. Build to the frame; the prose is a hint, the frame is the spec.
144
+
145
+ - **Fetch the design source at plan and review time (NON-NEGOTIABLE):** Retrieve
146
+ the specific Figma node for this component via the Figma MCP `get_figma_data`
147
+ tool — the actual frame, not a prose summary or a Phase-0 recollection. The
148
+ Figma MCP `get_figma_data` fetch MUST happen when the plan/acceptance criteria
149
+ are produced, and the plan MUST embed the actual fetched measurements. A plan
150
+ that only PROMISES to fetch during execution, or that states goals like 'match
151
+ Figma constraints' without concrete numbers, FAILS this gate and MUST NOT be
152
+ approved. Follow the **Credential Protocol** in the header if the Figma MCP is
153
+ not yet authenticated.
154
+ - **Tool-name-robustness note:** The Figma fetch tool's base name is
155
+ `get_figma_data` (from the figma-developer-mcp server) but MAY be exposed
156
+ with a client prefix (e.g. `mcp_Figma_get_figma_data`). Use whichever name
157
+ is actually present in the tool list. If NO Figma fetch tool is available,
158
+ STOP and tell the human — do not proceed from memory or produce a plan
159
+ without fetched numbers.
160
+ - **Anti-deferral clause:** Deferring the fetch to execution is NOT
161
+ acceptable. 'The execution step will call get_figma_data' is not a
162
+ substitute for fetching now and recording the numbers. The frame is the
163
+ spec; the numbers are the acceptance criteria.
164
+ - **Required "Frame read" block:** This block must appear per screen/component
165
+ IN THE PLAN, listing the concrete values pulled from the fetched node, e.g.:
166
+ container width + max-width, column widths + gaps, key spacing/vertical
167
+ rhythm, button width, and any breakpoint-specific values. If these numbers
168
+ are absent, the plan is incomplete by definition.
169
+ - If no Figma node/URL is available for this component, do NOT silently pass.
170
+ Mark this gate `BLOCKED — no design source` and escalate per Gate 5 (Design
171
+ Debt); a UI change with no design source cannot be verified as matching the
172
+ design.
173
+ - **Render the built result:** Capture the implemented component (delegate to
174
+ `visual-verifier` for the actual capture at the mandatory
175
+ Desktop/Tablet/Mobile resolutions). For interactive screens, exercise the
176
+ relevant states (default, focus, error, loading).
177
+ - **Produce an itemised Layout Deviation Report** comparing built vs frame. Each
178
+ line is **MATCH** or **DEVIATION** with the specific difference:
179
+ - Container / card width and max-width at each breakpoint.
180
+ - Column widths and gaps for multi-column areas (e.g. side-by-side fields).
181
+ - Element placement and vertical rhythm (label → input → helper/error
182
+ spacing).
183
+ - Responsive reflow: how sub-elements (helper text, requirement lists, labels)
184
+ rearrange across breakpoints — a single list must not fragment across
185
+ columns unless the frame shows it that way.
186
+ - Button width, alignment, and inline-link placement.
187
+ - **Positive (Pass):** Every line in the Layout Deviation Report is MATCH across
188
+ Desktop, Tablet, and Mobile.
189
+ - **Negative (Fail):** Any DEVIATION line. A DEVIATION is a 🔴 **Critical**
190
+ finding — it BLOCKS completion. The component returns to the developer with
191
+ the report until it is all-MATCH, or a specific deviation is explicitly waived
192
+ by the Tech-Lead at a gate (record the waiver in the session file).
193
+ - **Action on Fail:** List each DEVIATION with the frame's target value vs the
194
+ built value (e.g. "card max-width: frame 1100px, built ~720px"), and the
195
+ concrete fix. Paste the final all-MATCH report as the gate's evidence.
196
+
197
+ > [!CAUTION] **Test-pass is not design-pass.** `check-types` and unit tests
198
+ > passing say nothing about visual fidelity. A UI-facing change is NOT complete
199
+ > until this gate's Layout Deviation Report is all-MATCH (or an explicit
200
+ > Tech-Lead waiver is recorded). Never mark a UI slice complete on tests alone.
201
+
202
+ ### Gate 5: Storybook Figma Link Validation
203
+
204
+ - **Action:** Check if the component has a Storybook story file
205
+ (`*.stories.tsx`). If yes, verify it has `addon-designs` parameters with a
206
+ Figma URL.
207
+ - **If Figma URL is missing:**
208
+ - Ask: "Do you have a Figma frame URL for this component? (Paste it here or
209
+ press Enter to skip)"
210
+ - If provided: update the session file with `figma_url` and include it in
211
+ audit output.
212
+ - If skipped: flag as "Design Debt — No Figma link" in the session file.
213
+
214
+ ### Gate 6: Chromatic / Visual Regression (Optional, credentials required)
215
+
216
+ - **Trigger:** Only runs if the user has connected a Chromatic build.
217
+ - **Credential Protocol:**
218
+ 1. Prompt: "To run Chromatic validation, I need your
219
+ `CHROMATIC_PROJECT_TOKEN`. Please paste it here (it will only be used for
220
+ this session and not stored)."
221
+ 2. **PAUSE** — do not proceed until user responds.
222
+ 3. On receipt: use the token to reference the build; report the build URL and
223
+ whether all stories passed visual review.
224
+ 4. If user declines: mark Chromatic gate as "SKIPPED — manual review
225
+ required."
226
+
227
+ ---
228
+
229
+ ## 🔄 Iteration Management
230
+
231
+ ### Iteration 1 — Full Audit
232
+
233
+ 1. Run Gates 1–6 (in order). Gate 4 (Layout Fidelity) is BLOCKING for any
234
+ UI-facing change.
235
+ 2. Produce a **"Must Fix"** list sorted by severity:
236
+ - 🔴 **Critical** — Accessibility failure or token violation blocking release
237
+ - 🟡 **Recommended** — Code consistency and design alignment
238
+ - 🟢 **Advisory** — Nice-to-have improvements
239
+ 3. Update session file `Iteration 1 — Findings` section.
240
+ 4. Ask: "I've completed Iteration 1. Apply these fixes, then reply
241
+ `/design-system-review iterate` to trigger Iteration 2 verification."
242
+
243
+ ### Iteration 2 — Fix Verification
244
+
245
+ 1. Re-read session file to confirm we're at Iteration 2.
246
+ 2. Re-run only the **failed** gates from Iteration 1.
247
+ 3. Calculate alignment score: `(gates_passed / total_gates) * 100`.
248
+ 4. **Decision branch:**
249
+ - **Score ≥ 90%** → Mark as `READY_FOR_DESIGNER_GATE`:
250
+ - Update session file `status: READY_FOR_DESIGNER_GATE`
251
+ - Call `create_knowledge_item` with the decision summary (see KI schema
252
+ below)
253
+ - Notify: "✅ Component is ready for designer gate review."
254
+ - **Score < 90%** → Mark as `ESCALATED`:
255
+ - Update session file `status: ESCALATED`
256
+ - Create a `DESIGN_DEBT` entry in `docs/design-debt.md`
257
+ - Notify: "⚠️ 2 iterations reached without 90% alignment. Escalated to
258
+ manual designer review queue. A Design Debt record has been created."
259
+
260
+ ---
261
+
262
+ ## 📦 Knowledge Item Schema
263
+
264
+ When a review reaches `READY_FOR_DESIGNER_GATE`, call `create_knowledge_item`
265
+ with this structure:
266
+
267
+ ```json
268
+ {
269
+ "slug": "design-decision-<component-name>-<YYYY-MM-DD>",
270
+ "summary": "One-line summary of what was approved or what deviation was accepted.",
271
+ "projectName": "<detected-project-name>",
272
+ "tags": ["design-system", "ui-review", "shadcn"],
273
+ "artifacts": [
274
+ {
275
+ "name": "decision-details.md",
276
+ "content": "## Component\n<component-name>\n\n## Decision\n<approved/deviated>\n\n## Rationale\n<why>\n\n## Figma URL\n<url or N/A>\n\n## Chromatic Build\n<url or SKIPPED>\n\n## Gates Passed\n<list>\n\n## Alignment Score\n<N>%"
277
+ }
278
+ ],
279
+ "references": ["<PR link if known>", "<Storybook story URL if known>"]
280
+ }
281
+ ```
282
+
283
+ ---
284
+
285
+ ## 🔍 Critical Patterns to Detect
286
+
287
+ - **Shadow DOM bypass:** Any component using `dangerouslySetInnerHTML` to inject
288
+ styles — flag as Critical.
289
+ - **Hardcoded breakpoints:** `sm:`, `md:` used inconsistently with the project's
290
+ layout strategy — flag as Recommended.
291
+ - **Missing `data-testid`:** UI components without test selectors make visual
292
+ testing brittle — flag as Advisory.
293
+
294
+ ## 🛠 Companion Skills
295
+
296
+ - Run `style-logic-exporter` BEFORE this skill to extract the current token
297
+ state. Pass the output as context when starting the audit.
298
+ - Run `accessibility-auditor` in parallel on the same component to catch WCAG
299
+ violations that are distinct from design token issues.
300
+
301
+ ## 📋 Outcome Actions
302
+
303
+ - **`READY_FOR_DESIGNER_GATE`:** Proceed to designer approval handoff. Share
304
+ Chromatic build link and KI slug with the design team.
305
+ - **`ESCALATED`:** Route to `docs/design-debt.md` and add to the Manual Review
306
+ queue. Schedule a sync with a designer.
307
+ - **`IN_PROGRESS`:** Wait for the user to apply Iteration 1 fixes before calling
308
+ `/design-system-review iterate`.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: dev-team-local
3
+ description:
4
+ '[DEV-TEAM · LOCAL] Orchestrator for fully offline, single-lane execution.'
5
+ phase: build
6
+ kind: orchestrator
7
+ domain: eng
8
+ spans:
9
+ - intent
10
+ - specify
11
+ - plan
12
+ - build
13
+ - review
14
+ targets:
15
+ - local
16
+ minModelClass: small
17
+ ownership:
18
+ drive: ai
19
+ approve: human
20
+ cost: ~350 tokens
21
+ modes: [read-only, write, mcp]
22
+ surface: public
23
+ category: Orchestrators
24
+ policies:
25
+ - four-pillars
26
+ ---
27
+
28
+ # Dev Team Local Orchestrator
29
+
30
+ This is the offline analogue to the subscription-tier dev team orchestrators
31
+ (sub-pro/sub-max). It coordinates the single-lane pipeline through the same
32
+ phases (intent -> plan -> build -> review) but degrades execution to fit local
33
+ environments:
34
+
35
+ - **Single Lane**: Concurrency and worktrees are entirely disabled.
36
+ - **Local Model Loop**: Uses the identical model for all generative and critical
37
+ steps (see `reflexion-loop-local`).
38
+ - **Offline Strictness**: Relies on a wall-clock and token budget without
39
+ applying USD cost limits.
40
+
41
+ Usage: The execution flows exactly like `dev-team-sub-pro`, utilizing local
42
+ endpoints specified in `LOCAL_MODEL_ENDPOINT` and `LOCAL_MODEL_NAME`.
43
+
44
+ ## Code Modification Convention
45
+
46
+ **REQUIREMENT:** When modifying files, you MUST use the `apply_patch` tool with
47
+ minimal SEARCH/REPLACE blocks instead of rewriting whole files.
48
+
49
+ - Never emit a full-file rewrite.
50
+ - Never restate unchanged code.
51
+ - **Rule:** Include only the lines that change plus minimal surrounding anchor
52
+ context.
@@ -0,0 +1,289 @@
1
+ ---
2
+ name: dev-team-orchestrator
3
+ description: >
4
+ [DEV-TEAM · FULL · MCP] The flagship orchestration skill: an agent-agnostic
5
+ "dev team" you manage as a technical product manager. Sizes the crew to the
6
+ task, runs multiple task lanes in parallel without collision, interviews the
7
+ human only at gates, and files friction defects automatically on its own repo.
8
+ cost: ~2600 tokens
9
+ modes: [read-only, write, mcp]
10
+ surface: public
11
+ category: Orchestrators
12
+ kind: orchestrator
13
+ domain: eng
14
+ spans: [intent, specify, plan, build, maintain, review, deploy]
15
+ ownership:
16
+ drive: human-ai
17
+ approve: human
18
+ targets: [api, subscription]
19
+ minModelClass: large
20
+ requires: [design-system-review, reflexion-loop]
21
+ suggests:
22
+ [
23
+ accessibility-auditor,
24
+ ask,
25
+ code-review-checklist,
26
+ dev-team-sub-max,
27
+ dev-team-sub-pro,
28
+ feature-design-assistant,
29
+ mission-architect,
30
+ planning-expert,
31
+ verification-auditor,
32
+ vertical-slice-decomposer,
33
+ visual-verifier,
34
+ ]
35
+ policies:
36
+ - user-sovereignty
37
+ - diagnosis-first
38
+ - four-pillars
39
+ ---
40
+
41
+ # Dev Team Orchestrator (The Agentic Crew)
42
+
43
+ > Tier siblings: dev-team-orchestrator (API keys, dual-model) · dev-team-sub-max
44
+ > ($100 tier) · dev-team-sub-pro ($20 tier). See the tier table in the README.
45
+ >
46
+ > [!NOTE] **Sibling subscription tiers (no API keys required):** For
47
+ > subscription-only accounts, use `dev-team-sub-max` ($100/mo tier, max 2
48
+ > parallel lanes) or `dev-team-sub-pro` ($20/mo tier, single-lane pair).
49
+
50
+ ## Runtime modes
51
+
52
+ Produces a blueprint and hand-off in read-only chat; executes in an IDE/MCP
53
+ agent.
54
+
55
+ > [!IMPORTANT] **Anti-Micromanagement Litmus** Personas receive goals + gates,
56
+ > never line-by-line instructions. The human appears only at gates. We advise;
57
+ > the User Tech-Lead decides.
58
+
59
+ <!-- -->
60
+
61
+ > [!CAUTION] **RUNTIME MODE (DETERMINE FIRST — NON-NEGOTIABLE)**
62
+ >
63
+ > - **Read-only chat (`/chat`):** write/exec tools are forbidden; only
64
+ > `get_skill`, `list_skills`, `read_file` exist. Deliver a **verifiable
65
+ > blueprint + handoff**.
66
+ > - **IDE / MCP-enabled Agent:** you have full write access and must use `rtk`
67
+ > (Run Tool Kit) to execute and verify changes.
68
+
69
+ <!-- -->
70
+
71
+ > [!IMPORTANT] **EXECUTION DISCIPLINE (IDE/MCP MODE)**
72
+ >
73
+ > - **Produce, don't deliberate:** never call a sequential-thinking/planning
74
+ > tool more than twice consecutively without emitting a concrete output. If
75
+ > unsure, emit the current phase's artifact.
76
+ > - **No stall commands:** run no further search/terminal command between
77
+ > finishing a phase's inputs and emitting its artifact.
78
+ > - **DIRECT EDITS ONLY:** never write generated regex/patch.js scripts that
79
+ > mutate source (they fail silently and leave no reviewable diff). Use native
80
+ > file edit tools.
81
+
82
+ ## Phase 0 — Discovery (MANDATORY)
83
+
84
+ - **Skill acquisition (NON-NEGOTIABLE):** IDE/MCP agent MUST call `get_skills`
85
+ tool; Chat UI MUST call `get_skill`. Never read `.ai/skills/` via raw file
86
+ access.
87
+ - **Discovery Budget:** Apply a small cap of scoped searches only. Every
88
+ grep/find MUST exclude `node_modules`, `.next`, `.nx`, `dist`, and `build`. No
89
+ unscoped recursive search. Discovery is COMPLETE once the stack, relevant
90
+ files, and named config flags are known. The FIRST output after discovery MUST
91
+ be the Phase 1 sizing scores, with no terminal command between discovery and
92
+ sizing.
93
+ - **Stack ID:** Inspect manifest/config (`package.json`, `tsconfig.json`, etc.)
94
+ for framework + conventions.
95
+ - **Mission Frame:** Formulate a one-sentence mission statement and a success
96
+ metric.
97
+ - **Runtime-mode determination:** Confirm whether you are in a read-only chat or
98
+ an IDE/MCP agent capable of execution.
99
+
100
+ ## Phase 1 — Crew Sizing Gate
101
+
102
+ Evaluate the task based on the five-signal 0–2 rubric to determine the crew
103
+ size. **HARD RULES:** idle personas are never instantiated; the sizing decision
104
+ and its scores MUST be printed before any work begins; a size may be revised at
105
+ a gate but never silently.
106
+
107
+ **Phase artifact:** The printed sizing scores (the first thing emitted after
108
+ discovery).
109
+
110
+ | Signal | 0 | 1 | 2 |
111
+ | ------------ | ---------------- | ---------------------- | ------------------------ |
112
+ | Surface area | 1 file, 1 layer | ≤5 files or 2 layers | many files / cross-layer |
113
+ | Novelty | existing pattern | adjacent pattern | new pattern/system |
114
+ | Risk | cosmetic | business logic | auth/payments/data/infra |
115
+ | Ambiguity | spec is exact | minor gaps | open questions |
116
+ | Parallelism | none | 2 independent subtasks | 3+ independent subtasks |
117
+
118
+ Total score → size → crew preset:
119
+
120
+ | Size | Score | Crew | Parallel lanes | Loop hardening |
121
+ | ---- | ----- | --------------------------------------------- | -------------- | ------------------------------------ |
122
+ | XS | 0–1 | Developer only | 1 | self-check + autoeval |
123
+ | S | 2–3 | Developer + Reviewer | 1 | reviewer gate |
124
+ | M | 4–5 | Planner + Developer + Reviewer | 1–2 | plan gate + review gate |
125
+ | L | 6–8 | PM-analyst + Planner + Dev ×N + Reviewer + QA | 2–3 | reflexion-hardened plan recommended |
126
+ | XL | 9–10 | mission-architect strategy + full L crew | 3+ | `reflexion-loop` plan gate mandatory |
127
+
128
+ ## Phase 2 — Lane Ledger
129
+
130
+ One row per task lane, tracking concurrent work.
131
+
132
+ | lane-id | task | size | crew | branch+worktree | state-file | status | next-gate |
133
+ | ------- | ---- | ---- | ---- | --------------- | ---------- | ------ | --------- |
134
+ | ... | ... | ... | ... | ... | ... | ... | ... |
135
+
136
+ - **Isolation:** One git worktree per lane (`rtk git worktree add ...`), single
137
+ writer per lane. Lane creation is NOT silent — when a worktree/branch is
138
+ created, print the worktree path and branch, and record them in the Ledger row
139
+ and lane state file immediately.
140
+ - **Worktree Bootstrap (MANDATORY):** A fresh worktree does not inherit
141
+ `node_modules`, built workspace packages, `.env` files, or generated clients
142
+ (e.g. Prisma). Before any `check-types` or `test` in a new lane, you MUST
143
+ bootstrap it: install deps, copy required `.env` file(s) from the source
144
+ checkout, generate clients, and build dependent workspace packages. Only then
145
+ run `check-types`/`tests`.
146
+ - **Persistence:** State file `.dev-team/lanes/<lane-id>.md` updated at every
147
+ gate.
148
+ - **Anti-drift:** The Ledger is the source of truth. Reprint the Ledger after
149
+ every detour; lanes advance independently without cross-talk. Never silently
150
+ abandon a pending slice.
151
+
152
+ **State File Template:**
153
+
154
+ ```md
155
+ # Lane: <lane-id>
156
+
157
+ - Task: <description>
158
+ - Status: <status>
159
+ - Next Gate: <gate>
160
+ - Current Artifacts: <links/paths>
161
+ ```
162
+
163
+ ## Phase 3 — Persona Execution Protocol
164
+
165
+ Each persona maps to a chained sequence of EXISTING skills. The orchestrator
166
+ routes lanes by reading skill frontmatter (`modes:`, `surface:`) — a read-only
167
+ lane may only invoke skills whose modes include read-only delivery.
168
+
169
+ - **pm-analyst:** `feature-design-assistant`
170
+ - **planner:** `planning-expert` or `vertical-slice-decomposer`
171
+ - **developer:** Implement per plan
172
+ - **reviewer:** `code-review-checklist` + `verification-auditor`
173
+ - **qa:** `design-system-review` (authoritative layout/design gate) driving
174
+ `visual-verifier` (capture) + `accessibility-auditor` — MANDATORY for any
175
+ UI-facing slice, not optional
176
+
177
+ **Reviewer Rules:** The Reviewer NEVER shares the developer's context. The
178
+ Reviewer must ACT, not read: run the stated verification gates and paste hard
179
+ evidence. **Loop Hardening:** For L/XL sizes, the plan gate SHOULD (L) or MUST
180
+ (XL) be hardened via `rtk run reflexion-loop` before execution. Note that the
181
+ reflexion loop is the stack's one declared non-agnostic feature (refer to
182
+ `reflexion-loop.md` wording).
183
+
184
+ **Visual Fidelity Gate (MANDATORY for any UI-facing slice — BLOCKING):** A UI
185
+ slice does NOT close on `check-types` + passing tests; those prove the code
186
+ compiles and behaves, not that it matches the design. For any UI-facing slice,
187
+ the PLAN for that slice MUST already contain the fetched Figma measurements (a
188
+ 'Frame read' block with concrete numbers per screen). If the plan lacks fetched
189
+ numbers, it is not ready for approval — return it for Figma fetching before any
190
+ code is written. Deferring the fetch to execution is a defect. For any slice
191
+ that changes rendered UI, the QA persona MUST, before the slice is marked
192
+ complete:
193
+
194
+ 1. **Fetch the design source at implementation time** — the specific Figma node
195
+ for the slice via the Figma MCP `get_figma_data` tool (the actual frame, not
196
+ the Phase-0 summary). The frame's measurements are acceptance criteria:
197
+ container/card width, column widths, gaps, breakpoints, and sub-element
198
+ reflow.
199
+ 2. **Run `design-system-review`** on the changed component. Its **Gate 4 (Layout
200
+ Fidelity)** produces an itemised built-vs-frame Layout Deviation Report and
201
+ is BLOCKING; `visual-verifier` performs the capture at Desktop/Tablet/Mobile.
202
+ 3. **Any DEVIATION blocks the slice.** It returns to the developer with the
203
+ report until all-MATCH, or a specific deviation is explicitly waived by the
204
+ Tech-Lead at a gate (record the waiver). Paste the final all-MATCH Layout
205
+ Deviation Report as the slice's completion evidence, alongside the test
206
+ output.
207
+
208
+ > [!CAUTION] Layout words in prose ("side by side", "wider", "stacked") are
209
+ > CONSEQUENCES of building to the frame, never the instruction. Build to the
210
+ > frame; the prose is a hint, the frame is the spec. Implementing the words
211
+ > without matching the frame is a FAILED slice, not a complete one. Test-pass is
212
+ > not design-pass.
213
+
214
+ ## Phase 4 — Tech-Lead Interview at Gates
215
+
216
+ Questions for the human (the Tech-Lead) are batched at gate boundaries ONLY.
217
+ Append them to `.dev-team/inbox.md` using the fenced yaml convention:
218
+
219
+ ```yaml answers:
220
+ # Leave blank for the human to answer inline
221
+ question_1: ''
222
+ ```
223
+
224
+ **Gate Guardrails (HARD RULES):**
225
+
226
+ - **PARK IS A HARD STOP:** After writing questions to `.dev-team/inbox.md`, the
227
+ lane MUST stop ALL commands (no searches, reads, edits, discovery) and yield
228
+ until the human fills answers and signals continue. Continuing to work after
229
+ posting questions is a defect. Parking is correct behaviour, not a stall, and
230
+ must not be worked around by guessing an answer.
231
+ - **INBOX IS READ-ONLY TO THE AGENT ONCE POPULATED:** The agent may CREATE the
232
+ question block, but once the human saves answers it must read them in place
233
+ and MUST NOT rm/overwrite/rewrite `.dev-team/inbox.md` (read into memory if a
234
+ normalized copy is needed; never destroy or paraphrase the human's file). The
235
+ inbox is for QUESTIONS only; status/confirmations go to the Lane Ledger or
236
+ chat, never as inbox answer entries.
237
+ - **NEVER SILENTLY BYPASS A GATE ON TOOL FAILURE:** If a gate tool (e.g.
238
+ `reflexion-loop`) fails or times out, do NOT auto-skip by writing a
239
+ "bypassing" note and continuing. Retry once; if it still fails, PARK and ask
240
+ the human whether to proceed un-hardened. For Risk-2+ tasks
241
+ (auth/payments/data/infra), proceeding un-hardened REQUIRES explicit human
242
+ approval.
243
+
244
+ ## Phase 5 — Friction Defect Protocol
245
+
246
+ **Triggers:**
247
+
248
+ - ≥2 rework loops on one gate.
249
+ - A skill behaving contrary to its description.
250
+ - Missing tool/permission.
251
+
252
+ **Action:** Write `.dev-team/friction/<date>-<slug>.md` using the Friction
253
+ Defect template (observed vs expected, skill involved, reproduction, rework
254
+ count, proposed prevention class). Append a ready-to-run command to the inbox:
255
+ `gh issue create --repo bronz3beard/ai.tech-lead-stack --label friction --title "..." --body-file ...`
256
+
257
+ **Execution:** DEFAULT is draft only. In IDE/MCP mode, the agent MAY execute
258
+ `gh issue create` iff the env var `DEV_TEAM_AUTOFILE_ISSUES=1`.
259
+
260
+ > [!CAUTION] **ABSOLUTE RULE** `git push`, `git add`, and `merge` remain
261
+ > STRICTLY FORBIDDEN regardless of mode or env var. Restated from
262
+ > `.ai/agents.md`.
263
+
264
+ ## Telemetry
265
+
266
+ Every persona action MUST run through the MCP skill tools so `withAnalytics`
267
+ records it. Instruct agents to pass telemetry overrides to correctly tag team
268
+ role actions:
269
+
270
+ Pass `{ teamRole: "<ROLE>", loopRunId: "<MISSION_ID>", actorType: "AGENT" }`
271
+ when invoking skills to ensure the activity is correctly attributed on the
272
+ Agentic Health dashboard.
273
+
274
+ ### Hooks (Ownership Gates)
275
+
276
+ Before advancing to the next phase or gate, you MUST consult `.ai/hooks/`. If a
277
+ guard is triggered and requires human approval (`require-human-approve`), you
278
+ MUST append the question to the human inbox (`.dev-team/inbox.md`) rather than
279
+ proceeding.
280
+
281
+ ## Code Modification Convention
282
+
283
+ **REQUIREMENT:** When modifying files, you MUST use the `apply_patch` tool with
284
+ minimal SEARCH/REPLACE blocks instead of rewriting whole files.
285
+
286
+ - Never emit a full-file rewrite.
287
+ - Never restate unchanged code.
288
+ - **Rule:** Include only the lines that change plus minimal surrounding anchor
289
+ context.