codebyplan 1.5.1 → 1.9.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 (211) hide show
  1. package/dist/cli.js +4462 -748
  2. package/package.json +5 -1
  3. package/templates/.gitkeep +0 -0
  4. package/templates/README.md +20 -0
  5. package/templates/agents/cbp-cc-executor.md +213 -0
  6. package/templates/agents/cbp-database-agent.md +229 -0
  7. package/templates/agents/cbp-improve-claude.md +245 -0
  8. package/templates/agents/cbp-improve-round.md +284 -0
  9. package/templates/agents/cbp-mechanical-edits.md +111 -0
  10. package/templates/agents/cbp-research.md +282 -0
  11. package/templates/agents/cbp-round-executor.md +604 -0
  12. package/templates/agents/cbp-security-agent.md +134 -0
  13. package/templates/agents/cbp-task-check.md +213 -0
  14. package/templates/agents/cbp-task-planner.md +582 -0
  15. package/templates/agents/cbp-test-e2e-agent.md +363 -0
  16. package/templates/agents/cbp-testing-qa-agent.md +400 -0
  17. package/templates/context/mcp-docs.md +139 -0
  18. package/templates/hooks/README.md +236 -0
  19. package/templates/hooks/cbp-auto-test-hooks.sh +44 -0
  20. package/templates/hooks/cbp-lint-format-on-edit.sh +159 -0
  21. package/templates/hooks/cbp-maestro-yaml-validate.sh +100 -0
  22. package/templates/hooks/cbp-mcp-migration-guard.sh +32 -0
  23. package/templates/hooks/cbp-mcp-round-sync.sh +79 -0
  24. package/templates/hooks/cbp-mcp-worktree-inject.sh +76 -0
  25. package/templates/hooks/cbp-notify.sh +68 -0
  26. package/templates/hooks/cbp-plugin-dispatch.sh +29 -0
  27. package/templates/hooks/cbp-pre-commit-quality-gate.sh +204 -0
  28. package/templates/hooks/cbp-statusline.sh +347 -0
  29. package/templates/hooks/cbp-subagent-statusline.sh +182 -0
  30. package/templates/hooks/cbp-test-coverage-gate.sh +144 -0
  31. package/templates/hooks/cbp-test-hooks.sh +320 -0
  32. package/templates/hooks/hooks.json +85 -0
  33. package/templates/hooks/validate-context-usage.sh +59 -0
  34. package/templates/hooks/validate-git-commit.sh +78 -0
  35. package/templates/hooks/validate-git-stash-deny.sh +32 -0
  36. package/templates/hooks/validate-structure-lengths.sh +57 -0
  37. package/templates/hooks/validate-structure-lib.sh +104 -0
  38. package/templates/hooks/validate-structure-patterns.sh +54 -0
  39. package/templates/hooks/validate-structure-scope.sh +33 -0
  40. package/templates/hooks/validate-structure-smoke.sh +95 -0
  41. package/templates/hooks/validate-structure-templates.sh +34 -0
  42. package/templates/hooks/validate-structure.sh +69 -0
  43. package/templates/rules/.gitkeep +0 -0
  44. package/templates/rules/README.md +47 -0
  45. package/templates/rules/context-file-loading.md +52 -0
  46. package/templates/rules/scope-vocabulary.md +64 -0
  47. package/templates/rules/todo-backend.md +109 -0
  48. package/templates/settings.project.base.json +55 -0
  49. package/templates/settings.user.base.json +25 -0
  50. package/templates/skills/cbp-build-cc-agent/SKILL.md +139 -0
  51. package/templates/skills/cbp-build-cc-agent/examples/read-only-reviewer.md +32 -0
  52. package/templates/skills/cbp-build-cc-agent/examples/with-hooks.md +41 -0
  53. package/templates/skills/cbp-build-cc-agent/examples/with-skills-preload.md +25 -0
  54. package/templates/skills/cbp-build-cc-agent/reference/cbp-quality.md +153 -0
  55. package/templates/skills/cbp-build-cc-agent/reference/frontmatter-fields.md +37 -0
  56. package/templates/skills/cbp-build-cc-agent/reference/permission-modes.md +18 -0
  57. package/templates/skills/cbp-build-cc-agent/scripts/validate-agent.sh +67 -0
  58. package/templates/skills/cbp-build-cc-agent/templates/agent.md +66 -0
  59. package/templates/skills/cbp-build-cc-claude-file/SKILL.md +178 -0
  60. package/templates/skills/cbp-build-cc-claude-file/examples/minimal-project.md +33 -0
  61. package/templates/skills/cbp-build-cc-claude-file/examples/monorepo-with-imports.md +39 -0
  62. package/templates/skills/cbp-build-cc-claude-file/reference/imports.md +72 -0
  63. package/templates/skills/cbp-build-cc-claude-file/reference/what-belongs.md +39 -0
  64. package/templates/skills/cbp-build-cc-claude-file/templates/project-claude-md.md +48 -0
  65. package/templates/skills/cbp-build-cc-claude-file/templates/user-claude-md.md +22 -0
  66. package/templates/skills/cbp-build-cc-memory/SKILL.md +201 -0
  67. package/templates/skills/cbp-build-cc-memory/examples/feedback-memory.md +11 -0
  68. package/templates/skills/cbp-build-cc-memory/examples/project-memory.md +11 -0
  69. package/templates/skills/cbp-build-cc-memory/examples/reference-memory.md +13 -0
  70. package/templates/skills/cbp-build-cc-memory/examples/user-memory.md +14 -0
  71. package/templates/skills/cbp-build-cc-memory/reference/memory-types.md +59 -0
  72. package/templates/skills/cbp-build-cc-memory/reference/when-to-save.md +62 -0
  73. package/templates/skills/cbp-build-cc-memory/templates/MEMORY-index.md +4 -0
  74. package/templates/skills/cbp-build-cc-memory/templates/memory-entry.md +15 -0
  75. package/templates/skills/cbp-build-cc-mode/SKILL.md +99 -0
  76. package/templates/skills/cbp-build-cc-rule/SKILL.md +176 -0
  77. package/templates/skills/cbp-build-cc-rule/examples/global-rule.md +19 -0
  78. package/templates/skills/cbp-build-cc-rule/examples/scoped-rule.md +41 -0
  79. package/templates/skills/cbp-build-cc-rule/reference/paths-patterns.md +48 -0
  80. package/templates/skills/cbp-build-cc-rule/templates/rule.md +32 -0
  81. package/templates/skills/cbp-build-cc-settings/SKILL.md +220 -0
  82. package/templates/skills/cbp-build-cc-settings/examples/hooks-config.json +64 -0
  83. package/templates/skills/cbp-build-cc-settings/examples/permissions-config.json +34 -0
  84. package/templates/skills/cbp-build-cc-settings/examples/sandbox-config.json +42 -0
  85. package/templates/skills/cbp-build-cc-settings/reference/cbp-conventions.md +104 -0
  86. package/templates/skills/cbp-build-cc-settings/reference/permission-rules.md +61 -0
  87. package/templates/skills/cbp-build-cc-settings/reference/scope-precedence.md +73 -0
  88. package/templates/skills/cbp-build-cc-settings/reference/settings-fields.md +166 -0
  89. package/templates/skills/cbp-build-cc-settings/templates/settings.json +23 -0
  90. package/templates/skills/cbp-build-cc-settings/templates/settings.local.json +10 -0
  91. package/templates/skills/cbp-build-cc-skill/SKILL.md +154 -0
  92. package/templates/skills/cbp-build-cc-skill/examples/dynamic-context.md +31 -0
  93. package/templates/skills/cbp-build-cc-skill/examples/fork-skill.md +22 -0
  94. package/templates/skills/cbp-build-cc-skill/examples/knowledge-skill.md +25 -0
  95. package/templates/skills/cbp-build-cc-skill/examples/task-skill.md +29 -0
  96. package/templates/skills/cbp-build-cc-skill/reference/cbp-quality.md +157 -0
  97. package/templates/skills/cbp-build-cc-skill/reference/frontmatter-fields.md +35 -0
  98. package/templates/skills/cbp-build-cc-skill/reference/string-substitutions.md +60 -0
  99. package/templates/skills/cbp-build-cc-skill/scripts/validate-skill.sh +90 -0
  100. package/templates/skills/cbp-build-cc-skill/templates/skill.md +51 -0
  101. package/templates/skills/cbp-checkpoint-check/SKILL.md +156 -0
  102. package/templates/skills/cbp-checkpoint-complete/SKILL.md +109 -0
  103. package/templates/skills/cbp-checkpoint-create/SKILL.md +116 -0
  104. package/templates/skills/cbp-checkpoint-end/SKILL.md +241 -0
  105. package/templates/skills/cbp-checkpoint-plan/SKILL.md +137 -0
  106. package/templates/skills/cbp-checkpoint-plan/reference/alternative-comparison-template.md +54 -0
  107. package/templates/skills/cbp-checkpoint-plan/reference/dep-decision-rubric.md +50 -0
  108. package/templates/skills/cbp-checkpoint-plan/reference/e2e-discovery-probe.md +57 -0
  109. package/templates/skills/cbp-checkpoint-plan/reference/gap-analysis-playbook.md +47 -0
  110. package/templates/skills/cbp-checkpoint-start/SKILL.md +84 -0
  111. package/templates/skills/cbp-checkpoint-update/SKILL.md +115 -0
  112. package/templates/skills/cbp-frontend-a11y/SKILL.md +109 -0
  113. package/templates/skills/cbp-frontend-a11y/reference/aria-roles-states.md +130 -0
  114. package/templates/skills/cbp-frontend-a11y/reference/contrast-visual.md +122 -0
  115. package/templates/skills/cbp-frontend-a11y/reference/keyboard-patterns.md +154 -0
  116. package/templates/skills/cbp-frontend-a11y/reference/semantic-html.md +111 -0
  117. package/templates/skills/cbp-frontend-design/SKILL.md +145 -0
  118. package/templates/skills/cbp-frontend-design/reference/nextjs-scss.md +118 -0
  119. package/templates/skills/cbp-frontend-design/reference/rn-expo.md +101 -0
  120. package/templates/skills/cbp-frontend-design/reference/tauri-react.md +82 -0
  121. package/templates/skills/cbp-frontend-ui/SKILL.md +262 -0
  122. package/templates/skills/cbp-frontend-ui/reference/ui-label-maps.md +42 -0
  123. package/templates/skills/cbp-frontend-ui/reference/ui-layout-patterns.md +105 -0
  124. package/templates/skills/cbp-frontend-ui/reference/variant-defaults.md +149 -0
  125. package/templates/skills/cbp-frontend-ux/SKILL.md +181 -0
  126. package/templates/skills/cbp-git-branch-feat-create/SKILL.md +115 -0
  127. package/templates/skills/cbp-git-commit/SKILL.md +278 -0
  128. package/templates/skills/cbp-git-worktree-create/SKILL.md +226 -0
  129. package/templates/skills/cbp-git-worktree-remove/SKILL.md +145 -0
  130. package/templates/skills/cbp-merge-main/SKILL.md +228 -0
  131. package/templates/skills/cbp-round-check/SKILL.md +104 -0
  132. package/templates/skills/cbp-round-end/SKILL.md +183 -0
  133. package/templates/skills/cbp-round-end/reference/findings-presentation.md +44 -0
  134. package/templates/skills/cbp-round-end/reference/inline-fallback.md +35 -0
  135. package/templates/skills/cbp-round-execute/SKILL.md +211 -0
  136. package/templates/skills/cbp-round-execute/reference/inline-fallback.md +59 -0
  137. package/templates/skills/cbp-round-input/SKILL.md +165 -0
  138. package/templates/skills/cbp-round-start/SKILL.md +222 -0
  139. package/templates/skills/cbp-round-update/SKILL.md +163 -0
  140. package/templates/skills/cbp-session-end/SKILL.md +187 -0
  141. package/templates/skills/cbp-session-start/SKILL.md +155 -0
  142. package/templates/skills/cbp-ship/SKILL.md +332 -0
  143. package/templates/skills/cbp-ship/reference/changesets-overview.md +120 -0
  144. package/templates/skills/cbp-ship/reference/eas-cli-overview.md +60 -0
  145. package/templates/skills/cbp-ship/reference/gh-cli-overview.md +135 -0
  146. package/templates/skills/cbp-ship/reference/gh-cli-shipment-commands.md +283 -0
  147. package/templates/skills/cbp-ship/reference/npm-publish-monorepo.md +252 -0
  148. package/templates/skills/cbp-ship/reference/npm-publish-oidc-trusted.md +157 -0
  149. package/templates/skills/cbp-ship/reference/npm-publish-overview.md +171 -0
  150. package/templates/skills/cbp-ship/reference/preflight-checklist.md +88 -0
  151. package/templates/skills/cbp-ship/reference/railway-nestjs-deployment.md +169 -0
  152. package/templates/skills/cbp-ship/reference/railway-overview.md +120 -0
  153. package/templates/skills/cbp-ship/reference/railway-troubleshooting.md +168 -0
  154. package/templates/skills/cbp-ship/reference/release-please-overview.md +99 -0
  155. package/templates/skills/cbp-ship/reference/surface-expo-eas.md +155 -0
  156. package/templates/skills/cbp-ship/reference/surface-npm.md +180 -0
  157. package/templates/skills/cbp-ship/reference/surface-railway.md +152 -0
  158. package/templates/skills/cbp-ship/reference/surface-supabase.md +178 -0
  159. package/templates/skills/cbp-ship/reference/surface-tauri.md +138 -0
  160. package/templates/skills/cbp-ship/reference/surface-vercel.md +124 -0
  161. package/templates/skills/cbp-ship/reference/surface-vscode-ext.md +144 -0
  162. package/templates/skills/cbp-ship/reference/surfaces.md +60 -0
  163. package/templates/skills/cbp-ship/reference/testflight-automation.md +215 -0
  164. package/templates/skills/cbp-ship/reference/testflight-internal-vs-external.md +69 -0
  165. package/templates/skills/cbp-ship/reference/testflight-overview.md +98 -0
  166. package/templates/skills/cbp-ship/reference/versioning.md +116 -0
  167. package/templates/skills/cbp-ship/scripts/detect-surfaces.sh +217 -0
  168. package/templates/skills/cbp-ship/scripts/verify-expo-eas.sh +35 -0
  169. package/templates/skills/cbp-ship/scripts/verify-npm.sh +21 -0
  170. package/templates/skills/cbp-ship/scripts/verify-railway.sh +41 -0
  171. package/templates/skills/cbp-ship/scripts/verify-supabase.sh +19 -0
  172. package/templates/skills/cbp-ship/scripts/verify-tauri.sh +24 -0
  173. package/templates/skills/cbp-ship/scripts/verify-vercel.sh +32 -0
  174. package/templates/skills/cbp-ship/scripts/verify-vscode-ext.sh +25 -0
  175. package/templates/skills/cbp-ship/templates/eas.json +66 -0
  176. package/templates/skills/cbp-ship/templates/railway.toml +15 -0
  177. package/templates/skills/cbp-ship/templates/release-please-config.json +17 -0
  178. package/templates/skills/cbp-ship/templates/vercel.json +19 -0
  179. package/templates/skills/cbp-ship/templates/vscodeignore +21 -0
  180. package/templates/skills/cbp-ship/templates/workflow-changesets.yml +41 -0
  181. package/templates/skills/cbp-ship/templates/workflow-eas-submit.yml +53 -0
  182. package/templates/skills/cbp-ship/templates/workflow-npm-publish.yml +36 -0
  183. package/templates/skills/cbp-ship/templates/workflow-release-please.yml +21 -0
  184. package/templates/skills/cbp-ship/templates/workflow-tauri-release.yml +69 -0
  185. package/templates/skills/cbp-ship/templates/workflow-vsce-publish.yml +31 -0
  186. package/templates/skills/cbp-ship-configure/SKILL.md +296 -0
  187. package/templates/skills/cbp-ship-configure/reference/expo-mobile.md +204 -0
  188. package/templates/skills/cbp-ship-configure/reference/npm-package.md +165 -0
  189. package/templates/skills/cbp-ship-configure/reference/railway-backend.md +199 -0
  190. package/templates/skills/cbp-ship-configure/reference/supabase.md +200 -0
  191. package/templates/skills/cbp-ship-configure/reference/tauri-desktop.md +181 -0
  192. package/templates/skills/cbp-ship-configure/reference/vercel.md +117 -0
  193. package/templates/skills/cbp-ship-configure/reference/vscode-ext.md +155 -0
  194. package/templates/skills/cbp-ship-main/SKILL.md +65 -0
  195. package/templates/skills/cbp-supabase-branch-check/SKILL.md +337 -0
  196. package/templates/skills/cbp-supabase-branch-check/reference/dag-steps.md +29 -0
  197. package/templates/skills/cbp-supabase-migrate/SKILL.md +314 -0
  198. package/templates/skills/cbp-supabase-migrate/reference/advisor-triage.md +70 -0
  199. package/templates/skills/cbp-supabase-migrate/reference/cli-fallback.md +87 -0
  200. package/templates/skills/cbp-supabase-migrate/reference/preflight-dry-run.md +58 -0
  201. package/templates/skills/cbp-supabase-setup/SKILL.md +239 -0
  202. package/templates/skills/cbp-supabase-setup/reference/branching-setup.md +121 -0
  203. package/templates/skills/cbp-supabase-setup/reference/cli-fallback.md +109 -0
  204. package/templates/skills/cbp-task-check/SKILL.md +166 -0
  205. package/templates/skills/cbp-task-complete/SKILL.md +206 -0
  206. package/templates/skills/cbp-task-complete/reference/checkpoint-done-branching.md +48 -0
  207. package/templates/skills/cbp-task-complete/reference/next-step-heuristic.md +56 -0
  208. package/templates/skills/cbp-task-create/SKILL.md +167 -0
  209. package/templates/skills/cbp-task-start/SKILL.md +239 -0
  210. package/templates/skills/cbp-task-testing/SKILL.md +277 -0
  211. package/templates/skills/cbp-todo/SKILL.md +111 -0
@@ -0,0 +1,149 @@
1
+ # Variant Defaults & Button Patterns
2
+
3
+ 3-layer variant architecture using `createResolver` with SIZE, COLOR, and CUSTOM variants, lightweight variant maps for simpler components, plus button-specific patterns.
4
+
5
+ Apply when working with `variants.ts` files, components in `src/components/buttons/`, or components using size/color variant props with BEM modifier classes. Ensures correct variant resolution order and prevents duplicate defaults.
6
+
7
+ ## 1. 3-Layer Architecture
8
+
9
+ ```
10
+ Props -> createResolver -> CSS Classes
11
+ Resolution Order:
12
+ 1. Custom variant (presets)
13
+ 2. Size variant (typography/spacing)
14
+ 3. Color variant (colors/interactions)
15
+ 4. Direct prop overrides (highest priority)
16
+ ```
17
+
18
+ ## 2. Never Duplicate Defaults
19
+
20
+ Values in SIZE/COLOR/CUSTOM_VARIANTS MUST NOT repeat defaults:
21
+
22
+ ```typescript
23
+ // WRONG
24
+ const defaults = { fontWeight: 'medium', typoPx: 's1' };
25
+ const SIZE_VARIANTS = {
26
+ md: { fontSize: 'body-md', fontWeight: 'medium' }, // duplicates default
27
+ };
28
+
29
+ // CORRECT
30
+ const SIZE_VARIANTS = {
31
+ md: { fontSize: 'body-md' }, // only what differs
32
+ };
33
+ ```
34
+
35
+ ## 3. Layer Definitions
36
+
37
+ **SIZE_VARIANTS** (typography/spacing):
38
+ ```typescript
39
+ const SIZE_VARIANTS = {
40
+ sm: { fontSize: 'body-sm' },
41
+ md: { fontSize: 'body-md' },
42
+ lg: { fontSize: 'body-lg', typoPx: 's15', typoPy: 's1' },
43
+ } as const satisfies Record<string, SizeConfig>;
44
+ ```
45
+
46
+ **COLOR_VARIANTS** (colors/interactions):
47
+ ```typescript
48
+ const COLOR_VARIANTS = {
49
+ primary: { bg: 'primary', text: 'inverse' },
50
+ highlight: { bg: 'highlight', text: 'primary' },
51
+ transparent: { bg: 'transparent', text: 'primary' },
52
+ } as const satisfies Record<string, ColorConfig>;
53
+ ```
54
+
55
+ **CUSTOM_VARIANTS** (presets combining size + color + overrides):
56
+ ```typescript
57
+ const CUSTOM_VARIANTS = {
58
+ cta: {
59
+ colorVariant: 'highlight',
60
+ fontFamily: 'accent',
61
+ glow: 'sm',
62
+ },
63
+ } as const satisfies Record<string, CustomConfig>;
64
+ ```
65
+
66
+ ## 4. Type Annotations Required
67
+
68
+ All variant maps MUST use `as const satisfies Record<string, *Config>`.
69
+
70
+ ## 5. createResolver Setup
71
+
72
+ ```typescript
73
+ import { createResolver, SizeConfig, ColorConfig, CustomConfig } from '@/utils/variants';
74
+
75
+ export const getVariant = createResolver({
76
+ sizes: SIZE_VARIANTS,
77
+ colors: COLOR_VARIANTS,
78
+ custom: CUSTOM_VARIANTS,
79
+ defaults,
80
+ });
81
+ ```
82
+
83
+ ## 6. Button Types
84
+
85
+ ```
86
+ src/components/buttons/
87
+ ├── Button/ # Form submit, modal triggers, state changes
88
+ ├── LinkButton/ # Navigation (links)
89
+ └── IconButton/ # Icon-only actions
90
+ ```
91
+
92
+ All buttons use `createResolver`. Each has 5 files: `index.ts`, `Component.tsx`, `Component.module.scss`, `types.ts`, `variants.ts`.
93
+
94
+ ## 7. Button Defaults
95
+
96
+ | Button | Default Size | Default Color |
97
+ |--------|--------------|---------------|
98
+ | Button | md | primary |
99
+ | LinkButton | md | transparent |
100
+ | IconButton | md | transparent |
101
+
102
+ ## 8. SCSS Modifier Includes
103
+
104
+ All buttons include the standard modifier mixins:
105
+
106
+ ```scss
107
+ .button {
108
+ @include typography.font-family;
109
+ @include typography.font-weight;
110
+ @include typography.font-size;
111
+ @include typography.tracking;
112
+ @include typography.leading;
113
+ @include typography.transform;
114
+ @include typography.typo-px;
115
+ @include typography.typo-py;
116
+ @include typography.typo-gap;
117
+ @include borders.border-radius;
118
+ @include borders.border-width;
119
+ @include borders.border-color;
120
+ @include interactive.color-interactive;
121
+ @include shadows.glow;
122
+ @include a11y.focus-visible;
123
+ }
124
+ ```
125
+
126
+ ## 9. Lightweight Variant Maps (Alternative to createResolver)
127
+
128
+ For components that only need prop-to-BEM-suffix resolution without the full variant pipeline, use simple `Record<TypeUnion, string>` maps or direct prop interpolation.
129
+
130
+ **When to use**: Component has 1-2 variant dimensions (size, color) with no defaults merging, no custom presets, and no resolution priority logic. Common in icon components and simple wrappers.
131
+
132
+ **Pattern A — Direct prop interpolation** (no variants.ts needed):
133
+ ```typescript
134
+ // Prop value IS the BEM suffix — no map needed
135
+ styles[`spinner--${size}`]
136
+ styles[`checkmark--text-${color}`]
137
+ ```
138
+
139
+ **Pattern B — Explicit variant map** (in variants.ts):
140
+ ```typescript
141
+ export const SIZE_VARIANTS: Record<ContainerSize, string> = {
142
+ sm: 'sm',
143
+ md: 'md',
144
+ lg: 'lg',
145
+ }
146
+ // Usage: styles[`container--${SIZE_VARIANTS[size]}`]
147
+ ```
148
+
149
+ **Decision rule**: If prop values map 1:1 to BEM suffixes, use Pattern A. If mapping differs from prop names or you want a centralized variants.ts, use Pattern B. If you need defaults merging, resolution priority, or custom presets, use `createResolver` (sections 1-5).
@@ -0,0 +1,181 @@
1
+ ---
2
+ scope: org-shared
3
+ name: cbp-frontend-ux
4
+ description: Interaction-quality self-review pass loaded by round-executor AFTER UI code is written. Catches navigation flow issues, missing feedback states, cognitive-load problems, form usability gaps, and accessibility violations. Auto-applies in-scope mechanical UX fixes within the round's files_changed. Replaces the post-implementation ux-agent spawn with an inline skill invocation.
5
+ effort: xhigh
6
+ ---
7
+
8
+ # Frontend UX (Post-Implementation Interaction Self-Review)
9
+
10
+ Loaded by `round-executor` Step 3.8 AFTER UI code is written. Inline counterpart of `frontend-design` (pre-implementation aesthetic) and sibling of `frontend-ui` (post-implementation visual review). This skill evaluates interaction quality and auto-applies mechanical UX fixes that fall inside the round's `files_changed`.
11
+
12
+ ## When this skill fires
13
+
14
+ Round-executor invokes when the round's `files_changed` contains ANY of:
15
+
16
+ - `*.tsx`, `*.jsx` (React, RN, RN-Web components)
17
+ - New page / screen / route / layout files
18
+ - Form / modal / interactive control files
19
+ - Plan deliverables explicitly mentioning interaction, navigation, form, feedback, error, loading
20
+
21
+ If none match, skip — proceed to Step 4 (Quality Checks).
22
+
23
+ ## Input Contract
24
+
25
+ ```yaml
26
+ input:
27
+ task_number: number
28
+ round_number: number
29
+ files_changed: [{path, action}]
30
+ context:
31
+ checkpoint_goal: string
32
+ round_requirements: string
33
+ ```
34
+
35
+ ## Output Contract
36
+
37
+ ```yaml
38
+ output:
39
+ status: 'completed'
40
+ findings:
41
+ - category: 'navigation' | 'interaction' | 'feedback' | 'cognitive_load' | 'form_usability' | 'error_handling'
42
+ severity: 'critical' | 'warning' | 'suggestion'
43
+ file: string
44
+ issue: string
45
+ suggestion: string
46
+ files_changed:
47
+ - path: string
48
+ action: 'modified'
49
+ fix_for: string # Which finding this fix addresses
50
+ summary:
51
+ total_issues: number
52
+ critical: number
53
+ warnings: number
54
+ suggestions: number
55
+ auto_fixed: number
56
+ out_of_scope_fixes: number # Findings whose fix would have edited a file not in files_changed
57
+ ```
58
+
59
+ The executor writes the output to `round.context.frontend_ux_review` and merges `files_changed` into the round's `files_changed` list.
60
+
61
+ ## Workflow
62
+
63
+ ### Phase 1: Read Changed Files
64
+
65
+ Read all `.tsx` and page/layout files from `files_changed`. Identify components, pages, and interaction handlers.
66
+
67
+ ### Phase 2: Navigation Flow
68
+
69
+ - Check page transitions and routing logic
70
+ - Verify breadcrumbs, back navigation, and deep links
71
+ - Check that navigation state is preserved across page changes
72
+ - Verify loading states during navigation
73
+
74
+ ### Phase 2.5: Mobile Density Check
75
+
76
+ For settings/configuration screens with multiple sections:
77
+
78
+ 1. **Scroll height vs viewport**: Estimate total content height. Flag if >3x viewport height
79
+ 2. **Compact layouts**: Verify list-type sections use chip rows, toggle rows, or horizontal selectors — not vertical block layouts
80
+ 3. **Conceptual clarity**: Check whether section groupings match user mental model (e.g., "schedule type" is clearer than separate "preferred days" + "time windows")
81
+ 4. **Touch targets**: Verify compact elements still meet minimum touch target (except when user explicitly requests smaller)
82
+
83
+ Report findings under `cognitive_load` category with `warning` severity.
84
+
85
+ ### Phase 3: Interaction Patterns
86
+
87
+ - Check click/touch target sizes (minimum 44x44px)
88
+ - Verify drag-and-drop has proper visual feedback
89
+ - Check hover states provide clear affordance
90
+ - Verify interactive elements have cursor changes
91
+ - Check that disabled states are visually distinct
92
+
93
+ ### Phase 4: User Feedback
94
+
95
+ - Verify loading states exist for async operations
96
+ - Check success/error messages after form submissions
97
+ - Verify progress indicators for multi-step processes
98
+ - Check that empty states have helpful messaging
99
+ - Verify optimistic updates where appropriate
100
+
101
+ ### Phase 5: Cognitive Load
102
+
103
+ - Check information density (not too much on screen)
104
+ - Verify visual hierarchy guides the eye
105
+ - Check that related items are grouped logically
106
+ - Verify progressive disclosure for complex interfaces
107
+ - Check that actions are clearly labeled
108
+
109
+ ### Phase 6: Form Usability
110
+
111
+ - Check input labels and placeholders
112
+ - Verify validation messages are clear and positioned near inputs
113
+ - Check tab order is logical
114
+ - Verify autofocus on primary input
115
+ - Check that required fields are marked
116
+
117
+ ### Phase 7: Error Handling UX
118
+
119
+ - Verify error messages are user-friendly (not technical)
120
+ - Check recovery paths from error states
121
+ - Verify network error handling (offline, timeout)
122
+ - Check that errors do not lose user input
123
+
124
+ ### Phase 8: Aggregate Findings
125
+
126
+ Categorize by severity:
127
+ - **Critical**: Missing feedback states, broken navigation, lost user input
128
+ - **Warning**: Suboptimal interaction patterns, unclear labels
129
+ - **Suggestion**: Enhanced micro-interactions, better copy
130
+
131
+ ### Phase 9: Auto-Fix In-Scope Findings
132
+
133
+ For every finding (critical, warning, and suggestion), apply the fix directly — but only when the file is in scope. The skill has Edit/Write capability via the executor's invocation; that capability requires a scope guard so the skill does not silently mutate files outside the round's contract (per `rules/workflow-discipline.md` "Agent Scope Boundary").
134
+
135
+ #### Pre-Edit Scope Gate (MANDATORY)
136
+
137
+ Before any Write/Edit:
138
+
139
+ 1. Build `allowed = new Set(input.files_changed.map(f => f.path))`.
140
+ 2. If the target path is in `allowed`, proceed to apply the fix.
141
+ 3. If the target path is NOT in `allowed`, do NOT edit. Instead:
142
+ - Emit the proposed fix as a `findings[]` entry with `severity: 'warning'` and a `suggestion` describing the change verbatim.
143
+ - Set `auto_fixed = false` for that finding.
144
+ - Increment `summary.out_of_scope_fixes`.
145
+
146
+ This rule applies to every file. The skill's auto-fix surface exists because in-scope mechanical fixes are part of its value, not because it should rewrite anything it sees worth improving.
147
+
148
+ **Specifically forbidden** (always out of scope, never edited regardless of `files_changed`):
149
+
150
+ - `.claude/**` — managed infrastructure under user-level governance
151
+ - Project test infrastructure (e.g., `playwright.config.*`, `e2e/**`) — governed by `test-e2e-agent`
152
+ - DB migrations (e.g., `supabase/migrations/**`) — governed by `database-agent`
153
+ - Vendor mirrors and read-only reference trees
154
+
155
+ If a UX-relevant change is needed in a forbidden path, raise it as a finding only.
156
+
157
+ #### In-Scope Auto-Fix Procedure
158
+
159
+ For findings whose target file IS in `allowed`:
160
+
161
+ 1. Read the file at the reported location
162
+ 2. Apply the fix (e.g., add missing loading state, add error feedback, fix tab order, improve labels, add empty states, enhance interaction patterns)
163
+ 3. Track in `files_changed` with `fix_for` referencing the finding
164
+ 4. Set `auto_fixed = true` on the finding
165
+
166
+ Go beyond fixing violations — actively improve user experience. If a form could have better validation feedback, add it. If a loading state is missing, add it. If labels are unclear, rewrite them. Deliver a comfortable, intuitive experience, not just a functional one.
167
+
168
+ **Do not change** business logic or data flow — only UX patterns (feedback, states, labels, interactions). The scope gate enforces *where* you may edit; this rule enforces *what kind* of edit is allowed.
169
+
170
+ ## Completion Criteria
171
+
172
+ - All changed page/component files reviewed
173
+ - Navigation, interaction, feedback patterns checked
174
+ - Critical/warning issues auto-fixed where possible (in-scope only)
175
+ - Findings categorized by severity
176
+
177
+ ## Integration
178
+
179
+ - **Loaded by**: `round-executor` Step 3.8 (mandatory when files_changed contains UI / interaction files)
180
+ - **Output written to**: `round.context.frontend_ux_review`
181
+ - **Paired with**: `frontend-design` (pre-implementation aesthetic), `frontend-ui` (visual self-review, also Step 3.8)
@@ -0,0 +1,115 @@
1
+ ---
2
+ scope: org-shared
3
+ name: cbp-git-branch-feat-create
4
+ description: Create feature branch from the production branch (main, config-driven)
5
+ argument-hint: "[name] e.g. add-user-auth"
6
+ effort: low
7
+ ---
8
+
9
+ # Git Branch Feat Create
10
+
11
+ Create a feature branch from the configured production branch (`main`).
12
+
13
+ ## Arguments
14
+
15
+ `$ARGUMENTS`: [name] - branch name without type prefix
16
+
17
+ Examples:
18
+ - `add-user-auth` → creates `feat/add-user-auth`
19
+ - `fix-login-bug` → creates `fix/fix-login-bug` (use fix prefix when fixing)
20
+
21
+ ## When to Use
22
+
23
+ - Starting work on new feature
24
+ - Triggered by `/cbp-checkpoint-create`
25
+ - Manual use for ad-hoc features
26
+
27
+ ## Prerequisites
28
+
29
+ - Repo must have the configured production branch (default `main`)
30
+ - Working tree must be clean
31
+
32
+ ## Instructions
33
+
34
+ ### Step 1: Read Branch Config
35
+
36
+ Read `.codebyplan/git.json` and extract `branch_config.production`:
37
+
38
+ ```
39
+ BASE = branch_config.production (default: "main")
40
+ ```
41
+
42
+ If `branch_config` is absent, fall back to `"main"`.
43
+
44
+ ### Step 2: Determine Repo Path
45
+
46
+ The repo path is the current working directory root:
47
+
48
+ ```bash
49
+ REPO_PATH="$(git rev-parse --show-toplevel)"
50
+ ```
51
+
52
+ ### Step 3: Verify Base Branch Exists
53
+
54
+ Check the base branch is present (exact match — local or remote):
55
+
56
+ ```bash
57
+ git rev-parse --verify "$BASE" >/dev/null 2>&1 || git ls-remote --exit-code --heads origin "$BASE" >/dev/null 2>&1
58
+ ```
59
+
60
+ **If the base branch is missing:**
61
+ ```
62
+ Base branch '$BASE' not found. Cannot create a feature branch.
63
+ ```
64
+ Stop here.
65
+
66
+ ### Step 4: Verify Clean State
67
+
68
+ ```bash
69
+ cd "$REPO_PATH" && git status --porcelain
70
+ ```
71
+
72
+ **If uncommitted changes:**
73
+ ```
74
+ Uncommitted changes exist. Commit your changes first.
75
+ ```
76
+ Stop here.
77
+
78
+ ### Step 5: Create Branch
79
+
80
+ ```bash
81
+ cd "$REPO_PATH" && git checkout "$BASE" && git checkout -b feat/$ARGUMENTS && git push -u origin feat/$ARGUMENTS
82
+ ```
83
+
84
+ ### Step 6: Show Result
85
+
86
+ ```
87
+ ## Branch Created
88
+
89
+ **Branch**: feat/[name]
90
+ **From**: [BASE]
91
+ **Pushed**: origin/feat/[name]
92
+
93
+ ---
94
+
95
+ Work on this branch. When done:
96
+ - Commit with `/cbp-git-commit`
97
+ - Ship via `/cbp-checkpoint-end` (feat → main, PR preview reviewed before merge)
98
+ ```
99
+
100
+ ## Branch Naming
101
+
102
+ *Branch type conventions follow GitFlow:*
103
+
104
+ | Type | When |
105
+ |------|------|
106
+ | `feat/` | New features (default) |
107
+ | `fix/` | Bug fixes |
108
+ | `chore/` | Maintenance |
109
+ | `refactor/` | Restructuring |
110
+
111
+ ## Integration
112
+
113
+ - **Triggered by**: `/cbp-checkpoint-create`
114
+ - **Followed by**: `/cbp-checkpoint-end` (ships feat → main via PR preview)
115
+ - **Config**: `branch_config.production` from `.codebyplan/git.json`