ganbatte-os 0.2.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 (200) hide show
  1. package/AGENTS.md +46 -0
  2. package/CLAUDE.md +31 -0
  3. package/GEMINI.md +17 -0
  4. package/LICENSE +21 -0
  5. package/README.md +141 -0
  6. package/agents/profiles/architect.md +13 -0
  7. package/agents/profiles/dev.md +13 -0
  8. package/agents/profiles/devops.md +12 -0
  9. package/agents/profiles/ganbatte-os-master.md +444 -0
  10. package/agents/profiles/index.json +14 -0
  11. package/agents/profiles/po.md +7 -0
  12. package/agents/profiles/qa.md +456 -0
  13. package/agents/profiles/sm.md +7 -0
  14. package/agents/profiles/squad-creator.md +7 -0
  15. package/agents/profiles/ux-design-expert.md +14 -0
  16. package/config.json +15 -0
  17. package/docs/curation.md +60 -0
  18. package/docs/gos_installation_guide.md +114 -0
  19. package/docs/ide-compatibility.md +20 -0
  20. package/docs/plan/plan-git-operations.md +51 -0
  21. package/docs/plan-distribuicao-publica.md +360 -0
  22. package/docs/stacks/stack-git-operations.md +154 -0
  23. package/docs/toolchain-map.md +18 -0
  24. package/integrations/README.md +42 -0
  25. package/integrations/antigravity/README.md +29 -0
  26. package/integrations/antigravity/command-map.json +29 -0
  27. package/integrations/claude/README.md +35 -0
  28. package/integrations/claude/agent-map.json +46 -0
  29. package/integrations/claude/command-map.json +32 -0
  30. package/integrations/claude/litellm-proxy.md +93 -0
  31. package/integrations/claude/mcp-specifics.md +121 -0
  32. package/integrations/codex/README.md +29 -0
  33. package/integrations/codex/command-map.json +29 -0
  34. package/integrations/cursor/README.md +8 -0
  35. package/integrations/cursor/command-map.json +11 -0
  36. package/integrations/gemini/README.md +13 -0
  37. package/integrations/gemini/command-map.json +11 -0
  38. package/integrations/kilo-code/README.md +7 -0
  39. package/integrations/kilo-code/command-map.json +11 -0
  40. package/integrations/opencode/README.md +91 -0
  41. package/integrations/opencode/command-map.json +46 -0
  42. package/integrations/registry.json +20 -0
  43. package/manifests/g-os-runtime-manifest.json +39 -0
  44. package/manifests/gos-install-manifest.json +46 -0
  45. package/opencode.json +7 -0
  46. package/package.json +51 -0
  47. package/playbooks/feature-development-playbook.md +239 -0
  48. package/playbooks/sprint-planner-playbook.md +127 -0
  49. package/playbooks/squad-pipeline-runner.md +196 -0
  50. package/playbooks/ssh-multi-account-setup.md +185 -0
  51. package/prompts/01-search.md +18 -0
  52. package/prompts/02-spec.md +19 -0
  53. package/prompts/03-tasks.md +15 -0
  54. package/prompts/04-code.md +10 -0
  55. package/prompts/05-reviews.md +11 -0
  56. package/rules/plan-mode.md +60 -0
  57. package/scripts/cli/gos-cli.js +679 -0
  58. package/scripts/hooks/pre-commit-validate.js +201 -0
  59. package/scripts/integrations/check-ide-compat.js +44 -0
  60. package/scripts/integrations/setup-ide-adapters.js +87 -0
  61. package/scripts/tools/clickup-preprocess.js +218 -0
  62. package/scripts/tools/clickup.js +1058 -0
  63. package/skills/agent-teams/SKILL.md +78 -0
  64. package/skills/agent-teams/presets/team-all.yaml +14 -0
  65. package/skills/agent-teams/presets/team-fullstack.yaml +17 -0
  66. package/skills/agent-teams/presets/team-ide-minimal.yaml +9 -0
  67. package/skills/agent-teams/presets/team-no-ui.yaml +12 -0
  68. package/skills/agent-teams/presets/team-qa-focused.yaml +83 -0
  69. package/skills/clickup/SKILL.md +151 -0
  70. package/skills/component-dedup/SKILL.md +101 -0
  71. package/skills/design-to-code/SKILL.md +255 -0
  72. package/skills/figma-implement-design/SKILL.md +227 -0
  73. package/skills/figma-make-analyzer/SKILL.md +140 -0
  74. package/skills/frontend-dev/SKILL.md +271 -0
  75. package/skills/git-ssh-setup/SKILL.md +164 -0
  76. package/skills/interface-design/SKILL.md +350 -0
  77. package/skills/interface-design/references/audit.md +76 -0
  78. package/skills/interface-design/references/craft-examples.md +134 -0
  79. package/skills/interface-design/references/critique.md +92 -0
  80. package/skills/interface-design/references/extract.md +92 -0
  81. package/skills/interface-design/references/principles.md +348 -0
  82. package/skills/interface-design/references/templates/system-precision.md +73 -0
  83. package/skills/interface-design/references/templates/system-warmth.md +67 -0
  84. package/skills/interface-design/references/validation.md +137 -0
  85. package/skills/make-code-triage/SKILL.md +135 -0
  86. package/skills/make-version-diff/SKILL.md +87 -0
  87. package/skills/plan-to-tasks/SKILL.md +136 -0
  88. package/skills/react-best-practices/AGENTS.md +2975 -0
  89. package/skills/react-best-practices/SKILL.md +151 -0
  90. package/skills/react-best-practices/metadata.json +15 -0
  91. package/skills/react-best-practices/rules/_sections.md +46 -0
  92. package/skills/react-best-practices/rules/_template.md +28 -0
  93. package/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  94. package/skills/react-best-practices/rules/advanced-init-once.md +42 -0
  95. package/skills/react-best-practices/rules/advanced-use-latest.md +39 -0
  96. package/skills/react-best-practices/rules/async-api-routes.md +38 -0
  97. package/skills/react-best-practices/rules/async-defer-await.md +80 -0
  98. package/skills/react-best-practices/rules/async-dependencies.md +51 -0
  99. package/skills/react-best-practices/rules/async-parallel.md +28 -0
  100. package/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  101. package/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  102. package/skills/react-best-practices/rules/bundle-conditional.md +31 -0
  103. package/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  104. package/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  105. package/skills/react-best-practices/rules/bundle-preload.md +50 -0
  106. package/skills/react-best-practices/rules/client-event-listeners.md +74 -0
  107. package/skills/react-best-practices/rules/client-localstorage-schema.md +71 -0
  108. package/skills/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  109. package/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  110. package/skills/react-best-practices/rules/js-batch-dom-css.md +107 -0
  111. package/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  112. package/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  113. package/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  114. package/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  115. package/skills/react-best-practices/rules/js-early-exit.md +50 -0
  116. package/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  117. package/skills/react-best-practices/rules/js-index-maps.md +37 -0
  118. package/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  119. package/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  120. package/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  121. package/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  122. package/skills/react-best-practices/rules/rendering-activity.md +26 -0
  123. package/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  124. package/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  125. package/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  126. package/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  127. package/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  128. package/skills/react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  129. package/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  130. package/skills/react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  131. package/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  132. package/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  133. package/skills/react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  134. package/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  135. package/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  136. package/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  137. package/skills/react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  138. package/skills/react-best-practices/rules/rerender-memo.md +44 -0
  139. package/skills/react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  140. package/skills/react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  141. package/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  142. package/skills/react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  143. package/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  144. package/skills/react-best-practices/rules/server-auth-actions.md +96 -0
  145. package/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  146. package/skills/react-best-practices/rules/server-cache-react.md +76 -0
  147. package/skills/react-best-practices/rules/server-dedup-props.md +65 -0
  148. package/skills/react-best-practices/rules/server-hoist-static-io.md +142 -0
  149. package/skills/react-best-practices/rules/server-parallel-fetching.md +83 -0
  150. package/skills/react-best-practices/rules/server-serialization.md +38 -0
  151. package/skills/react-doctor/SKILL.md +74 -0
  152. package/skills/registry.json +21 -0
  153. package/skills/sprint-planner/SKILL.md +434 -0
  154. package/squads/design-delivery/README.md +10 -0
  155. package/squads/design-delivery/squad.yaml +30 -0
  156. package/squads/design-delivery/workflows/wf-design-delivery.yaml +27 -0
  157. package/squads/design-squad/README.md +31 -0
  158. package/squads/design-squad/agents/brad-frost.md +185 -0
  159. package/squads/design-squad/agents/dan-mall.md +178 -0
  160. package/squads/design-squad/agents/dave-malouf.md +198 -0
  161. package/squads/design-squad/agents/design-chief.md +109 -0
  162. package/squads/design-squad/agents/design-system-architect.md +109 -0
  163. package/squads/design-squad/agents/ui-engineer.md +102 -0
  164. package/squads/design-squad/agents/ux-designer.md +105 -0
  165. package/squads/design-squad/agents/visual-generator.md +108 -0
  166. package/squads/design-squad/checklists/output-quality.md +76 -0
  167. package/squads/design-squad/config/config.yaml +65 -0
  168. package/squads/design-squad/data/design-patterns-catalog.yaml +276 -0
  169. package/squads/design-squad/data/routing-catalog.yaml +95 -0
  170. package/squads/design-squad/squad.yaml +88 -0
  171. package/squads/design-squad/tasks/audit-design.md +174 -0
  172. package/squads/design-squad/tasks/create-component-spec.md +185 -0
  173. package/squads/design-squad/tasks/create-design-system.md +179 -0
  174. package/squads/design-squad/tasks/design-ux-flow.md +184 -0
  175. package/squads/design-squad/tasks/diagnose.md +138 -0
  176. package/squads/design-squad/tasks/generate-handoff.md +186 -0
  177. package/squads/design-squad/tasks/review.md +133 -0
  178. package/squads/design-squad/tasks/setup-design-ops.md +177 -0
  179. package/squads/design-squad/workflows/wf-design-system-creation.yaml +131 -0
  180. package/squads/design-squad/workflows/wf-feature-design.yaml +114 -0
  181. package/squads/git-operations/README.md +30 -0
  182. package/squads/git-operations/squad.yaml +27 -0
  183. package/squads/git-operations/workflows/wf-safe-commit.yaml +27 -0
  184. package/squads/git-operations/workflows/wf-ssh-setup.yaml +27 -0
  185. package/squads/sprint-planning/agents/sprint-chief.md +47 -0
  186. package/squads/sprint-planning/agents/sprint-planner-agent.md +43 -0
  187. package/squads/sprint-planning/agents/sprint-tracker.md +43 -0
  188. package/squads/sprint-planning/agents/task-importer.md +44 -0
  189. package/squads/sprint-planning/checklists/sprint-readiness.md +27 -0
  190. package/squads/sprint-planning/config/config.yaml +65 -0
  191. package/squads/sprint-planning/data/clickup-field-mapping.yaml +94 -0
  192. package/squads/sprint-planning/squad.yaml +52 -0
  193. package/squads/sprint-planning/tasks/close-sprint.md +43 -0
  194. package/squads/sprint-planning/tasks/create-sprint.md +42 -0
  195. package/squads/sprint-planning/tasks/import-tasks.md +39 -0
  196. package/squads/sprint-planning/tasks/sync-status.md +31 -0
  197. package/squads/sprint-planning/workflows/wf-sprint-creation.yaml +59 -0
  198. package/squads/sprint-planning/workflows/wf-sprint-sync.yaml +35 -0
  199. package/templates/adr-tmpl.yaml +76 -0
  200. package/templates/sprint-clickup.template.md +80 -0
@@ -0,0 +1,46 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "runtime": "gos-design-delivery",
4
+ "preserveUserContent": [
5
+ "packages/",
6
+ "data/sprints/",
7
+ "data/clients/",
8
+ ".gos-local/",
9
+ "config.json"
10
+ ],
11
+ "frameworkManaged": [
12
+ "agents/",
13
+ "skills/",
14
+ "squads/",
15
+ "templates/",
16
+ "prompts/",
17
+ "integrations/",
18
+ "scripts/",
19
+ "manifests/",
20
+ "docs/",
21
+ "playbooks/",
22
+ "AGENTS.md",
23
+ "CLAUDE.md",
24
+ "GEMINI.md"
25
+ ],
26
+ "requiredPaths": [
27
+ "agents/profiles/index.json",
28
+ "skills/registry.json",
29
+ "manifests/g-os-runtime-manifest.json",
30
+ "scripts/cli/gos-cli.js",
31
+ "scripts/integrations/setup-ide-adapters.js",
32
+ "scripts/integrations/check-ide-compat.js",
33
+ "AGENTS.md",
34
+ "CLAUDE.md"
35
+ ],
36
+ "gitignoreEntries": [
37
+ ".gos-local/",
38
+ ".temp/",
39
+ ".backups/",
40
+ "packages/*/figma-make/",
41
+ "packages/*/node_modules/",
42
+ ".env",
43
+ ".env.local",
44
+ ".env.*.local"
45
+ ]
46
+ }
package/opencode.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://opencode.ai/config.json",
3
+ "instructions": [
4
+ "AGENTS.md",
5
+ "CLAUDE.md"
6
+ ]
7
+ }
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "ganbatte-os",
3
+ "version": "0.2.1",
4
+ "description": "Framework operacional para design-to-code, squads de entrega e sprint sync com ClickUp.",
5
+ "bin": {
6
+ "ganbatte-os": "scripts/cli/gos-cli.js",
7
+ "gos": "scripts/cli/gos-cli.js"
8
+ },
9
+ "scripts": {
10
+ "ganbatte-os:init": "node scripts/cli/gos-cli.js init",
11
+ "ganbatte-os:update": "node scripts/cli/gos-cli.js update",
12
+ "ganbatte-os:doctor": "node scripts/cli/gos-cli.js doctor",
13
+ "ganbatte-os:version": "node scripts/cli/gos-cli.js version",
14
+ "gos:init": "node scripts/cli/gos-cli.js init",
15
+ "gos:update": "node scripts/cli/gos-cli.js update",
16
+ "gos:doctor": "node scripts/cli/gos-cli.js doctor",
17
+ "gos:version": "node scripts/cli/gos-cli.js version",
18
+ "clickup": "node scripts/tools/clickup.js",
19
+ "sync:ides": "node scripts/integrations/setup-ide-adapters.js",
20
+ "check:ides": "node scripts/integrations/check-ide-compat.js",
21
+ "doctor": "node scripts/cli/gos-cli.js doctor"
22
+ },
23
+ "engines": {
24
+ "node": ">=18"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/adrianomorais-ganbatte/g-os.git"
29
+ },
30
+ "license": "MIT",
31
+ "author": "Adriano Morais",
32
+ "files": [
33
+ "agents/",
34
+ "skills/",
35
+ "squads/",
36
+ "scripts/",
37
+ "manifests/",
38
+ "docs/",
39
+ "integrations/",
40
+ "templates/",
41
+ "prompts/",
42
+ "rules/",
43
+ "playbooks/",
44
+ "config.json",
45
+ "opencode.json",
46
+ "AGENTS.md",
47
+ "CLAUDE.md",
48
+ "GEMINI.md",
49
+ "README.md"
50
+ ]
51
+ }
@@ -0,0 +1,239 @@
1
+ # Feature Development Playbook
2
+
3
+ **Purpose:** Desenvolvimento guiado de features com exploracao profunda do codebase, perguntas de clarificacao, design de arquitetura com multiplas opcoes, implementacao e revisao de qualidade -- tudo usando agentes paralelos para velocidade.
4
+
5
+ **Success Criteria:**
6
+ - Feature entendida completamente antes de codar
7
+ - Codebase explorado com agentes paralelos
8
+ - Todas as ambiguidades resolvidas com o usuario
9
+ - Arquitetura desenhada com trade-offs claros
10
+ - Implementacao seguindo patterns do projeto
11
+ - Revisao de qualidade com multiplas perspectivas
12
+ - Resumo documentado do que foi feito
13
+
14
+ ---
15
+
16
+ ## Overview
17
+
18
+ This playbook implements a 7-phase feature development workflow that uses parallel agents at key stages to maximize throughput while maintaining quality. The human stays in the loop at every decision point.
19
+
20
+ **Core Principles:**
21
+ - **Ask clarifying questions:** Identify all ambiguities, edge cases, and underspecified behaviors. Ask specific, concrete questions rather than making assumptions. Wait for user answers before proceeding.
22
+ - **Understand before acting:** Read and comprehend existing code patterns first.
23
+ - **Read files identified by agents:** When launching agents, ask them to return lists of the most important files to read. After agents complete, read those files to build detailed context.
24
+ - **Simple and elegant:** Prioritize readable, maintainable, architecturally sound code.
25
+ - **Use TodoWrite:** Track all progress throughout.
26
+
27
+ ---
28
+
29
+ ## Phase 1: Discovery
30
+
31
+ **Goal:** Understand what needs to be built.
32
+
33
+ **Input:** Feature description from user (or `$ARGUMENTS`).
34
+
35
+ **Actions:**
36
+ 1. Create TodoWrite with all 7 phases
37
+ 2. If the feature is unclear, ask the user:
38
+ - What problem are they solving?
39
+ - What should the feature do?
40
+ - Any constraints or requirements?
41
+ 3. Summarize your understanding and confirm with the user before proceeding
42
+
43
+ **Exit criteria:** Clear, confirmed understanding of what needs to be built.
44
+
45
+ ---
46
+
47
+ ## Phase 2: Codebase Exploration (parallel agents)
48
+
49
+ **Goal:** Understand relevant existing code and patterns at both high and low levels.
50
+
51
+ **Actions:**
52
+ 1. Launch 2-3 code-explorer agents in parallel. Each agent should:
53
+ - Trace through the code comprehensively and focus on getting a thorough understanding of abstractions, architecture, and flow of control
54
+ - Target a different aspect of the codebase
55
+ - Return a list of 5-10 key files to read
56
+
57
+ **Example agent prompts:**
58
+ - "Find features similar to [feature] and trace through their implementation comprehensively"
59
+ - "Map the architecture and abstractions for [feature area], tracing through the code comprehensively"
60
+ - "Analyze the current implementation of [existing feature/area], tracing through the code comprehensively"
61
+ - "Identify UI patterns, testing approaches, or extension points relevant to [feature]"
62
+
63
+ 2. Once agents return, read ALL files identified by agents to build deep understanding
64
+ 3. Present comprehensive summary of findings and patterns discovered to the user
65
+
66
+ **Exit criteria:** Deep understanding of codebase patterns, conventions, and relevant code.
67
+
68
+ ---
69
+
70
+ ## Phase 3: Clarifying Questions
71
+
72
+ **Goal:** Fill in gaps and resolve ALL ambiguities before designing.
73
+
74
+ **CRITICAL: This is one of the most important phases. DO NOT SKIP.**
75
+
76
+ **Actions:**
77
+ 1. Review the codebase findings and original feature request together
78
+ 2. Identify underspecified aspects:
79
+ - Edge cases and error handling
80
+ - Integration points with existing code
81
+ - Scope boundaries (what is IN and OUT)
82
+ - Design preferences (UI/UX, API shape)
83
+ - Backward compatibility requirements
84
+ - Performance needs and constraints
85
+ 3. **Present all questions to the user in a clear, organized list**
86
+ 4. **Wait for answers before proceeding to architecture design**
87
+
88
+ If the user says "whatever you think is best", provide your recommendation and get explicit confirmation.
89
+
90
+ **Exit criteria:** All ambiguities resolved. No assumptions remaining.
91
+
92
+ ---
93
+
94
+ ## Phase 4: Architecture Design (parallel agents)
95
+
96
+ **Goal:** Design multiple implementation approaches with different trade-offs.
97
+
98
+ **Actions:**
99
+ 1. Launch 2-3 code-architect agents in parallel, each with a different focus:
100
+ - **Minimal changes:** Smallest change, maximum reuse of existing code
101
+ - **Clean architecture:** Maintainability, elegant abstractions, future-proof
102
+ - **Pragmatic balance:** Speed + quality, best fit for the specific context
103
+
104
+ 2. Review all approaches and form your opinion on which fits best for this specific task. Consider:
105
+ - Is this a small fix or a large feature?
106
+ - How urgent is it?
107
+ - How complex is the domain?
108
+ - What is the team context?
109
+
110
+ 3. Present to user:
111
+ - Brief summary of each approach
112
+ - Trade-offs comparison (table format works well)
113
+ - **Your recommendation with reasoning**
114
+ - Concrete implementation differences (what files, what patterns)
115
+
116
+ 4. **Ask user which approach they prefer**
117
+
118
+ **Exit criteria:** Architecture approach chosen and approved by user.
119
+
120
+ ---
121
+
122
+ ## Phase 4.1: Guias Frontend/UX (quando houver UI/React/RN)
123
+
124
+ **Goal:** Travar padrões de performance e UX antes de codar.**
125
+
126
+ - Consulte skills de apoio:
127
+ - `react-best-practices` — evitar waterfalls, reduzir bundle, otimizar rendering (React/Next).
128
+ - `composition-patterns` — arquitetura de componentes, evitar props booleanas, compound components.
129
+ - `web-design-guidelines` — checklist de UI/acessibilidade via Web Interface Guidelines.
130
+ - `react-native-skills` — listas/animações/navegação em RN/Expo.
131
+ - Registre no plano quais guias serão aplicados e onde (componentes/rotas/telas).
132
+
133
+ **Exit criteria:** Padrões de UI/perf selecionados e anotados.
134
+
135
+ ---
136
+
137
+ ## Phase 5: Implementation
138
+
139
+ **Goal:** Build the feature.
140
+
141
+ **DO NOT START WITHOUT USER APPROVAL of the chosen architecture.**
142
+
143
+ **Actions:**
144
+ 1. Wait for explicit user approval
145
+ 2. Read all relevant files identified in previous phases
146
+ 3. Implement following the chosen architecture
147
+ 4. Follow codebase conventions strictly (check CLAUDE.md, existing patterns)
148
+ 5. Write clean, well-documented code
149
+ 6. Update TodoWrite as you progress
150
+ 7. Use TDD patterns where applicable (see `tdd` skill)
151
+
152
+ **For complex implementations:** Consider using `subagent-driven-development` skill to dispatch fresh subagents per task with two-stage review.
153
+
154
+ **Exit criteria:** Feature implemented, all planned files created/modified.
155
+
156
+ ---
157
+
158
+ ## Phase 6: Quality Review (parallel agents)
159
+
160
+ **Goal:** Ensure code is simple, DRY, elegant, easy to read, and functionally correct.
161
+
162
+ **Actions:**
163
+ 1. Launch 3 code-reviewer agents in parallel with different focuses:
164
+ - **Simplicity/DRY/Elegance:** Is the code clean? Any duplication? Could it be simpler?
165
+ - **Bugs/Functional correctness:** Will it work? Edge cases handled? Error handling complete?
166
+ - **Project conventions/Abstractions:** Does it follow existing patterns? Are abstractions appropriate?
167
+
168
+ 2. Consolidate findings and identify highest severity issues
169
+ 3. **Present findings to user and ask what they want to do:**
170
+ - Fix now
171
+ - Fix later (create follow-up task)
172
+ - Proceed as-is (acknowledge known limitations)
173
+
174
+ 4. Address issues based on user decision
175
+
176
+ **For deeper verification:** Use `verification-patterns` skill to verify implementations are real, not stubs.
177
+
178
+ **Exit criteria:** Code reviewed from multiple perspectives, issues addressed per user decision.
179
+
180
+ ---
181
+
182
+ ## Phase 7: Summary
183
+
184
+ **Goal:** Document what was accomplished.
185
+
186
+ **Actions:**
187
+ 1. Mark all TodoWrite items complete
188
+ 2. Present summary:
189
+ - **What was built:** Feature description and scope
190
+ - **Key decisions made:** Architecture choices, trade-offs accepted
191
+ - **Files modified:** List of all created/modified files with brief description
192
+ - **Suggested next steps:** Testing, deployment, follow-up tasks, known limitations
193
+ - Se deploy para Vercel for solicitado: apontar skill `deploy-to-vercel` e default preview (prod só se pedido)
194
+
195
+ **Exit criteria:** User has clear picture of what was done and what comes next.
196
+
197
+ ---
198
+
199
+ ## Escalation Points
200
+
201
+ | Situation | Action |
202
+ |-----------|--------|
203
+ | Feature requirements unclear after Phase 1 | Ask user for more context, do not proceed |
204
+ | Codebase too complex to understand | Break into smaller exploration agents, ask user for guidance |
205
+ | Too many ambiguities in Phase 3 | Prioritize questions, ask in batches |
206
+ | No architecture approach fits well | Discuss constraints with user, consider hybrid approach |
207
+ | Implementation blocked by dependency | Report to user, suggest workaround or pause |
208
+ | Quality review finds critical issues | Fix before proceeding, do not skip |
209
+
210
+ ---
211
+
212
+ ## Model Guidance
213
+
214
+ | Phase | Recommended Model |
215
+ |-------|-------------------|
216
+ | Phase 1: Discovery | sonnet |
217
+ | Phase 2: Code explorer agents | sonnet |
218
+ | Phase 3: Clarifying questions | sonnet |
219
+ | Phase 4: Architect agents | sonnet or opus for complex domains |
220
+ | Phase 5: Implementation | sonnet (or subagent-driven-development) |
221
+ | Phase 6: Reviewer agents | sonnet (simplicity, conventions) + opus (bugs) |
222
+ | Phase 7: Summary | sonnet |
223
+
224
+ ---
225
+
226
+ ## Related Skills and Playbooks
227
+
228
+ - **writing-plans** -- Create implementation plan before Phase 5
229
+ - **subagent-driven-development** -- Execute Phase 5 with fresh subagents and two-stage review
230
+ - **tdd** -- Test-driven development patterns for Phase 5
231
+ - **verification-patterns** -- Verify implementations in Phase 6
232
+ - **verification-before-completion** -- Final validation before Phase 7
233
+ - **dispatching-parallel-agents** -- General pattern for Phases 2, 4, 6
234
+ - **dev-implementation-playbook** -- More structured playbook for story-based development
235
+
236
+ ---
237
+
238
+ *Version:* 1.0
239
+ *Created:* 2026-03-11
@@ -0,0 +1,127 @@
1
+ # Sprint Planner — Playbook Operacional
2
+
3
+ > Guia a execucao completa do sprint-planner: do input ate sprint montada com PRD, ADR, roadmap e tasks.
4
+
5
+ ## Objetivo
6
+
7
+ Transformar qualquer input (caminho de projeto, design Figma, transcricao, documento)
8
+ em um pacote completo de sprint com artefatos prontos para execucao.
9
+
10
+ ## Pre-requisitos
11
+
12
+ - [ ] Input disponivel (caminho de projeto, design, transcricao ou descricao)
13
+ - [ ] Acesso ao projeto/codebase (se for project-path)
14
+ - [ ] Usuario disponivel para loops de discovery (15-30 min)
15
+ - [ ] Branch correta (`dev` para framework, feature branch para projetos)
16
+
17
+ ## Step 1 — Triage do Input (5 min)
18
+
19
+ - [ ] Classificar tipo: project-path | design | transcription | document | free-text | mixed
20
+ - [ ] Se project-path: executar `/project-brief <path>` para contexto
21
+ - [ ] Se design: analise visual — extrair telas, fluxos, componentes
22
+ - [ ] Se transcription: extrair requisitos, fluxos, restricoes, decisoes
23
+ - [ ] Se document: ler, sumarizar, identificar gaps
24
+ - [ ] Gerar `input-analysis.md`
25
+ - [ ] Apresentar resumo ao usuario
26
+
27
+ ## Step 2 — Discovery Loops (15-30 min)
28
+
29
+ - [ ] Loop 1: Contexto e Objetivo (SCQA + Analise de Premissas)
30
+ - [ ] Loop 2: Usuarios e Escopo (Task-Oriented Thought + Brainstorming)
31
+ - [ ] Loop 3: Fluxos e Regras (Verificacao de Consistencia)
32
+ - [ ] Loop 4 (se necessario): Dados e Restricoes (ReAct + Feynman)
33
+ - [ ] Avaliar clarity checklist (>= 70%?)
34
+ - [ ] Se < 70% apos 4 loops: consolidar e sinalizar gaps
35
+
36
+ ## Step 3 — PRD (20-30 min)
37
+
38
+ - [ ] Gerar `sprint-planner/<slug>/PRD.md`
39
+ - [ ] Escopo IN/OUT explicito
40
+ - [ ] Criterios de aceite verificaveis (Given/When/Then)
41
+ - [ ] Decisoes menores embedded (contexto, opcoes, escolha)
42
+ - [ ] **GATE: Usuario aprova PRD**
43
+
44
+ ## Step 4 — Arquitetura & Schema (15-30 min)
45
+
46
+ - [ ] Identificar decisoes arquiteturais significativas
47
+ - [ ] Gerar `ADR-NNN.md` para cada decisao com 3+ opcoes e trade-offs
48
+ - [ ] Se projeto envolve banco: gerar `schema.dbml`
49
+ - [ ] Se projeto envolve APIs: listar endpoints com contratos
50
+ - [ ] **GATE: Usuario aprova ADRs e schema**
51
+
52
+ ## Step 5 — Roadmap (10 min)
53
+
54
+ - [ ] Classificar complexidade: simples | medio | complexo
55
+ - [ ] Gerar `ROADMAP.md` com fases, duracoes e entregaveis
56
+ - [ ] Validar: soma duracoes <= total + 20% margem
57
+ - [ ] Validar: cada fase tem pelo menos 1 entregavel concreto
58
+ - [ ] **GATE: Fases e prazos validados**
59
+
60
+ ## Step 6 — Task Decomposition (15-20 min)
61
+
62
+ - [ ] Executar `/plan-to-tasks` no PRD
63
+ - [ ] Validar: cada task max 1 dia, DoD mensuravel
64
+ - [ ] User stories em Given/When/Then
65
+ - [ ] Complexidade scoring (1-25) por story
66
+ - [ ] Ordenar por dependencias
67
+
68
+ ## Step 7 — Setup Tasks (10 min)
69
+
70
+ - [ ] Detectar necessidades: contas, credenciais, infra, repos
71
+ - [ ] Gerar tasks P0 com area devops/general
72
+ - [ ] Incluir instrucoes passo-a-passo
73
+ - [ ] Vincular como pre-requisitos das tasks de dev
74
+
75
+ ## Step 8 — Sprint Assembly (10 min)
76
+
77
+ - [ ] Gerar `SPRINT-OVERVIEW.md` consolidando tudo
78
+ - [ ] Registrar decisoes no `memory/decision-log.json`
79
+ - [ ] Apresentar resumo final ao usuario
80
+ - [ ] Indicar proximos passos (qual skill usar para executar)
81
+
82
+ ## Armadilhas Comuns
83
+
84
+ | Armadilha | Sintoma | Solucao |
85
+ |-----------|---------|---------|
86
+ | Discovery infinito | Mais de 5 loops sem convergir | Consolidar o que tem, sinalizar gaps |
87
+ | Scope creep no PRD | PRD com 20+ tasks | Dividir em 2+ sprints |
88
+ | ADR para tudo | ADR para decisoes triviais | Embedded no PRD se < 3 opcoes |
89
+ | Schema sem RLS | Tabelas sem politicas de seguranca | Sempre incluir nota sobre RLS |
90
+ | Setup esquecido | Dev trava por falta de credencial | Phase 6 existe para isso |
91
+ | Pular gates | Avancar sem aprovacao | Cada fase TEM que ter aprovacao |
92
+
93
+ ## Tempo Estimado
94
+
95
+ | Complexidade | Tempo total |
96
+ |-------------|-------------|
97
+ | Simples (escopo claro, 3-5 tasks) | 45-60 min |
98
+ | Medio (ambiguidade moderada, 5-15 tasks) | 60-90 min |
99
+ | Complexo (multi-dominio, 15+ tasks) | 90-150 min |
100
+
101
+ ## Continuacao
102
+
103
+ Apos sprint-planner concluir, o usuario escolhe como executar:
104
+
105
+ | Objetivo | Comando |
106
+ |----------|---------|
107
+ | Executar spec-driven (completo) | `/sdd sprint-planner/<slug>/PRD.md` |
108
+ | Orquestrar execucao (composicao) | `/compose TASK-YYYYMM-001` |
109
+ | Refinar backlog | `@sm` ou `@po` |
110
+ | Frontend direto | `/fe` com tasks geradas |
111
+ | Backend direto | `/be` com tasks geradas |
112
+
113
+ ## Referencias
114
+
115
+ - `skills/sprint-planner/SKILL.md` — skill completa
116
+ - `templates/adr-tmpl.yaml` — template ADR
117
+ - `playbooks/story-creation-playbook.md` — formato de stories
118
+ - `playbooks/gsd-agent-decomposition-playbook.md` — padrao de handoff por artefatos
119
+ - `skills/sdd/SKILL.md` — para continuacao com execucao
120
+ - `skills/plan-to-tasks/SKILL.md` — decomposicao em tasks
121
+
122
+ ## Cadencia Sugerida
123
+
124
+ - Ao iniciar qualquer projeto novo (greenfield)
125
+ - Ao receber novo escopo ou fase de projeto existente (brownfield)
126
+ - Quando receber designs Figma ou transcricoes de reuniao para planejar
127
+ - Antes de sprints que envolvem multiplos dominios (FE + BE + infra)
@@ -0,0 +1,196 @@
1
+ # Squad Pipeline Runner Playbook
2
+
3
+ **Purpose:** Executar pipelines de squad sequencialmente, gerenciando estado, outputs e quality gates entre steps.
4
+
5
+ **When to Use:** Executando uma squad via `squads:run` ou manualmente seguindo um `pipeline.yaml`.
6
+
7
+ ---
8
+
9
+ ## Visao Geral
10
+
11
+ Uma squad e um conjunto de agentes organizados em um pipeline sequencial. Cada step executa um agente com inputs definidos e produz outputs que alimentam o proximo step.
12
+
13
+ ```
14
+ [Step 1: Pesquisa] → [Step 2: Copy] → [Step 3: Review] → [Step 4: Imagem] → [Step 5: Publicacao]
15
+ ```
16
+
17
+ ---
18
+
19
+ ## Estrutura do Pipeline
20
+
21
+ ### pipeline.yaml
22
+
23
+ ```yaml
24
+ squad: linkedin-content
25
+ version: "1.0"
26
+ description: "Pipeline para criacao de posts LinkedIn"
27
+
28
+ defaults:
29
+ model_tier: sonnet
30
+ output_dir: output/
31
+
32
+ steps:
33
+ - name: pesquisar
34
+ agent: pesquisador
35
+ type: subagent
36
+ input: data/brief.md
37
+ output: data/pesquisa.md
38
+ model_tier: haiku
39
+
40
+ - name: gerar-copy
41
+ agent: copywriter
42
+ type: subagent
43
+ input: data/pesquisa.md
44
+ output: data/copy.md
45
+ model_tier: sonnet
46
+ veto_conditions:
47
+ - "Caption entre 500 e 2200 caracteres"
48
+ - "Pelo menos 1 CTA explicito"
49
+ - "3 a 8 hashtags"
50
+
51
+ - name: revisar
52
+ agent: revisor
53
+ type: subagent
54
+ input: data/copy.md
55
+ output: data/review.md
56
+ on_reject: gerar-copy
57
+ model_tier: sonnet
58
+
59
+ - name: criar-imagem
60
+ agent: designer
61
+ type: subagent
62
+ input: data/copy.md
63
+ output: output/slides/
64
+ model_tier: sonnet
65
+
66
+ - name: publicar
67
+ agent: publisher
68
+ type: checkpoint
69
+ input:
70
+ - data/copy.md
71
+ - output/slides/
72
+ output: output/publish-result.json
73
+ ```
74
+
75
+ ### Tipos de step
76
+
77
+ | Tipo | Comportamento |
78
+ |------|--------------|
79
+ | `subagent` | Despacha agente autonomo. Espera conclusao. Coleta output. |
80
+ | `inline` | Executa no contexto atual (sem subagente). Util para transformacoes simples. |
81
+ | `checkpoint` | Pausa e pede confirmacao do usuario antes de prosseguir. Obrigatorio antes de publicacao. |
82
+
83
+ ---
84
+
85
+ ## Workflow de Execucao
86
+
87
+ ### Fase 1: Inicializacao
88
+
89
+ 1. Validar que `pipeline.yaml` existe e e valido
90
+ 2. Gerar `run_id` unico (formato: `YYYYMMDD-HHMMSS-randomhex`)
91
+ 3. Criar `state.json` com status inicial:
92
+ ```json
93
+ {
94
+ "run_id": "20260313-143000-a1b2c3",
95
+ "squad": "linkedin-content",
96
+ "status": "running",
97
+ "current_step": 0,
98
+ "steps": [
99
+ { "name": "pesquisar", "status": "pending" },
100
+ { "name": "gerar-copy", "status": "pending" },
101
+ { "name": "revisar", "status": "pending" },
102
+ { "name": "criar-imagem", "status": "pending" },
103
+ { "name": "publicar", "status": "pending" }
104
+ ],
105
+ "started_at": "2026-03-13T14:30:00Z"
106
+ }
107
+ ```
108
+ 4. Resolver paths de input/output relativos ao diretorio da squad
109
+
110
+ ### Fase 2: Execucao sequencial
111
+
112
+ Para cada step no pipeline:
113
+
114
+ 1. **Pre-check**: Verificar que o input existe
115
+ 2. **Carregar agente**: Ler o agent profile do step
116
+ 3. **Montar contexto**: Combinar agent profile + input + libraries relevantes
117
+ 4. **Executar**:
118
+ - `subagent`: Despachar via Agent tool com prompt montado
119
+ - `inline`: Executar diretamente no contexto atual
120
+ - `checkpoint`: Apresentar preview ao usuario e aguardar confirmacao
121
+ 5. **Coletar output**: Salvar no path definido
122
+ 6. **Avaliar veto conditions** (se definidas — ver `rules/veto-conditions.md`):
123
+ - Todas passam: prosseguir
124
+ - Alguma falha: re-executar (max 2x), depois escalar
125
+ 7. **Atualizar state.json**: Marcar step como `completed` ou `failed`
126
+
127
+ ### Fase 3: Review loops
128
+
129
+ Quando um step de review emite `REJECT`:
130
+
131
+ 1. Verificar campo `on_reject` do step
132
+ 2. Se definido: voltar ao step indicado e re-executar com o feedback do review
133
+ 3. Se nao definido: escalar ao usuario
134
+ 4. Max 3 ciclos de revisao no mesmo step (depois escalar)
135
+
136
+ ### Fase 4: Finalizacao
137
+
138
+ 1. Atualizar `state.json` com status final (`completed` | `failed` | `cancelled`)
139
+ 2. Registrar `finished_at` e duracao
140
+ 3. Copiar outputs finais para `output/{run_id}/`
141
+ 4. Apresentar resumo ao usuario:
142
+ ```
143
+ SQUAD RUN COMPLETE
144
+ Squad: linkedin-content
145
+ Run ID: 20260313-143000-a1b2c3
146
+ Steps: 5/5 completed
147
+ Duration: 4m 32s
148
+ Outputs:
149
+ - data/copy.md (1,847 chars)
150
+ - output/slides/ (7 images)
151
+ - output/publish-result.json
152
+ ```
153
+
154
+ ---
155
+
156
+ ## State Management
157
+
158
+ O `state.json` e a fonte de verdade do estado da execucao. Permite:
159
+
160
+ - **Retomada**: Se o pipeline for interrompido, pode ser retomado do ultimo step concluido
161
+ - **Auditoria**: Historico completo de execucao com timestamps
162
+ - **Debugging**: Identificar qual step falhou e por que
163
+
164
+ ### Status por step
165
+
166
+ | Status | Significado |
167
+ |--------|------------|
168
+ | `pending` | Ainda nao executado |
169
+ | `running` | Em execucao |
170
+ | `completed` | Concluido com sucesso |
171
+ | `failed` | Falhou (apos retries e escalacao) |
172
+ | `skipped` | Pulado pelo usuario |
173
+ | `retrying` | Re-executando apos veto condition |
174
+
175
+ ---
176
+
177
+ ## Regras Criticas
178
+
179
+ 1. **Nunca pular checkpoint antes de publicacao.** Steps do tipo `checkpoint` sao obrigatorios. O usuario deve confirmar antes de qualquer acao irreversivel.
180
+ 2. **Nunca executar steps em paralelo.** O pipeline e sequencial por design. Cada step depende do output do anterior.
181
+ 3. **Sempre salvar state.json apos cada step.** Se o processo for interrompido, o estado deve refletir o ultimo step concluido.
182
+ 4. **Respeitar model_tier do step.** Se o step define `model_tier: haiku`, usar haiku. Nao fazer upgrade automatico (exceto em re-execucao por veto condition).
183
+ 5. **Inputs devem existir.** Se o input de um step nao existe, falhar imediatamente em vez de tentar executar sem contexto.
184
+ 6. **Outputs sao imutaveis por run.** Cada execucao gera outputs em `output/{run_id}/`. Nao sobrescrever runs anteriores.
185
+
186
+ ---
187
+
188
+ ## Troubleshooting
189
+
190
+ | Problema | Causa provavel | Solucao |
191
+ |----------|---------------|---------|
192
+ | Step falha sem mensagem | Input nao existe | Verificar output do step anterior |
193
+ | Loop infinito de review | `on_reject` aponta para step errado | Verificar `on_reject` no pipeline.yaml |
194
+ | Veto condition sempre falha | Condicao impossivel ou modelo inadequado | Revisar condicoes ou usar model_tier superior |
195
+ | State.json corrompido | Interrupcao durante escrita | Deletar state.json e re-executar do inicio |
196
+ | Checkpoint nao aparece | Step nao e tipo `checkpoint` | Mudar type para `checkpoint` |