up-cc 0.14.0 → 0.16.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 (171) hide show
  1. package/package.json +9 -9
  2. package/{agents → up/agents}/up-architecture-supervisor.md +1 -1
  3. package/{agents → up/agents}/up-audit-supervisor.md +1 -1
  4. package/{agents → up/agents}/up-backend-specialist.md +13 -3
  5. package/{agents → up/agents}/up-chief-architect.md +1 -1
  6. package/{agents → up/agents}/up-chief-engineer.md +1 -1
  7. package/{agents → up/agents}/up-chief-operations.md +2 -2
  8. package/{agents → up/agents}/up-chief-product.md +1 -1
  9. package/{agents → up/agents}/up-chief-quality.md +1 -1
  10. package/{agents → up/agents}/up-code-reviewer.md +2 -2
  11. package/{agents → up/agents}/up-database-specialist.md +13 -3
  12. package/{agents → up/agents}/up-execution-supervisor.md +4 -4
  13. package/{agents → up/agents}/up-executor.md +107 -9
  14. package/{agents → up/agents}/up-frontend-specialist.md +13 -3
  15. package/{agents → up/agents}/up-operations-supervisor.md +1 -1
  16. package/{agents → up/agents}/up-planejador.md +17 -1
  17. package/{agents → up/agents}/up-planning-supervisor.md +3 -3
  18. package/{agents → up/agents}/up-product-supervisor.md +1 -1
  19. package/{agents → up/agents}/up-project-ceo.md +2 -2
  20. package/{agents → up/agents}/up-quality-supervisor.md +1 -1
  21. package/{agents → up/agents}/up-system-designer.md +2 -2
  22. package/{agents → up/agents}/up-verification-supervisor.md +1 -1
  23. package/{agents → up/agents}/up-visual-critic.md +1 -1
  24. package/{bin → up/bin}/lib/core.cjs +132 -0
  25. package/{bin → up/bin}/up-tools.cjs +1341 -3
  26. package/up/commands/adicionar-fase.md +47 -0
  27. package/up/commands/configurar.md +219 -0
  28. package/{commands → up/commands}/depurar.md +1 -1
  29. package/{commands → up/commands}/planejar-fase.md +4 -2
  30. package/up/templates/config.json +8 -0
  31. package/up/workflows/build.md +650 -0
  32. package/{workflows → up/workflows}/builder.md +766 -35
  33. package/{workflows → up/workflows}/executar-plano.md +69 -0
  34. package/{workflows → up/workflows}/governance.md +3 -3
  35. package/{workflows → up/workflows}/plan.md +214 -29
  36. package/{workflows → up/workflows}/planejar-fase.md +63 -5
  37. package/commands/adicionar-fase.md +0 -33
  38. package/commands/configurar.md +0 -106
  39. package/templates/config.json +0 -6
  40. package/workflows/build.md +0 -431
  41. /package/{agents → up/agents}/up-analista-codigo.md +0 -0
  42. /package/{agents → up/agents}/up-api-tester.md +0 -0
  43. /package/{agents → up/agents}/up-arquiteto.md +0 -0
  44. /package/{agents → up/agents}/up-auditor-modernidade.md +0 -0
  45. /package/{agents → up/agents}/up-auditor-performance.md +0 -0
  46. /package/{agents → up/agents}/up-auditor-ux.md +0 -0
  47. /package/{agents → up/agents}/up-blind-validator.md +0 -0
  48. /package/{agents → up/agents}/up-clone-crawler.md +0 -0
  49. /package/{agents → up/agents}/up-clone-design-extractor.md +0 -0
  50. /package/{agents → up/agents}/up-clone-feature-mapper.md +0 -0
  51. /package/{agents → up/agents}/up-clone-prd-writer.md +0 -0
  52. /package/{agents → up/agents}/up-clone-verifier.md +0 -0
  53. /package/{agents → up/agents}/up-consolidador-ideias.md +0 -0
  54. /package/{agents → up/agents}/up-delivery-auditor.md +0 -0
  55. /package/{agents → up/agents}/up-depurador.md +0 -0
  56. /package/{agents → up/agents}/up-devops-agent.md +0 -0
  57. /package/{agents → up/agents}/up-exhaustive-tester.md +0 -0
  58. /package/{agents → up/agents}/up-mapeador-codigo.md +0 -0
  59. /package/{agents → up/agents}/up-pesquisador-mercado.md +0 -0
  60. /package/{agents → up/agents}/up-pesquisador-projeto.md +0 -0
  61. /package/{agents → up/agents}/up-planning-auditor.md +0 -0
  62. /package/{agents → up/agents}/up-product-analyst.md +0 -0
  63. /package/{agents → up/agents}/up-qa-agent.md +0 -0
  64. /package/{agents → up/agents}/up-requirements-validator.md +0 -0
  65. /package/{agents → up/agents}/up-roteirista.md +0 -0
  66. /package/{agents → up/agents}/up-security-reviewer.md +0 -0
  67. /package/{agents → up/agents}/up-sintetizador-melhorias.md +0 -0
  68. /package/{agents → up/agents}/up-sintetizador.md +0 -0
  69. /package/{agents → up/agents}/up-technical-writer.md +0 -0
  70. /package/{agents → up/agents}/up-verificador.md +0 -0
  71. /package/{bin → up/bin}/install.js +0 -0
  72. /package/{bin → up/bin}/up-instrument.cjs +0 -0
  73. /package/{commands → up/commands}/adicionar-testes.md +0 -0
  74. /package/{commands → up/commands}/ajuda.md +0 -0
  75. /package/{commands → up/commands}/atualizar.md +0 -0
  76. /package/{commands → up/commands}/build.md +0 -0
  77. /package/{commands → up/commands}/clone-builder.md +0 -0
  78. /package/{commands → up/commands}/custos.md +0 -0
  79. /package/{commands → up/commands}/dashboard.md +0 -0
  80. /package/{commands → up/commands}/discutir-fase.md +0 -0
  81. /package/{commands → up/commands}/executar-fase.md +0 -0
  82. /package/{commands → up/commands}/ideias.md +0 -0
  83. /package/{commands → up/commands}/iniciar.md +0 -0
  84. /package/{commands → up/commands}/mapear-codigo.md +0 -0
  85. /package/{commands → up/commands}/melhorias.md +0 -0
  86. /package/{commands → up/commands}/mobile-first.md +0 -0
  87. /package/{commands → up/commands}/modo-builder.md +0 -0
  88. /package/{commands → up/commands}/novo-projeto.md +0 -0
  89. /package/{commands → up/commands}/onboard.md +0 -0
  90. /package/{commands → up/commands}/pausar.md +0 -0
  91. /package/{commands → up/commands}/plan.md +0 -0
  92. /package/{commands → up/commands}/progresso.md +0 -0
  93. /package/{commands → up/commands}/rapido.md +0 -0
  94. /package/{commands → up/commands}/remover-fase.md +0 -0
  95. /package/{commands → up/commands}/resetar.md +0 -0
  96. /package/{commands → up/commands}/retomar.md +0 -0
  97. /package/{commands → up/commands}/saude.md +0 -0
  98. /package/{commands → up/commands}/testar.md +0 -0
  99. /package/{commands → up/commands}/ux-tester.md +0 -0
  100. /package/{commands → up/commands}/verificar-trabalho.md +0 -0
  101. /package/{hooks → up/hooks}/up-context-monitor.js +0 -0
  102. /package/{hooks → up/hooks}/up-statusline.js +0 -0
  103. /package/{references → up/references}/audit-modernidade.md +0 -0
  104. /package/{references → up/references}/audit-performance.md +0 -0
  105. /package/{references → up/references}/audit-ux.md +0 -0
  106. /package/{references → up/references}/blueprints/audit.md +0 -0
  107. /package/{references → up/references}/blueprints/booking.md +0 -0
  108. /package/{references → up/references}/blueprints/community.md +0 -0
  109. /package/{references → up/references}/blueprints/crm.md +0 -0
  110. /package/{references → up/references}/blueprints/dashboard.md +0 -0
  111. /package/{references → up/references}/blueprints/data-management.md +0 -0
  112. /package/{references → up/references}/blueprints/ecommerce.md +0 -0
  113. /package/{references → up/references}/blueprints/marketplace.md +0 -0
  114. /package/{references → up/references}/blueprints/notifications.md +0 -0
  115. /package/{references → up/references}/blueprints/saas-users.md +0 -0
  116. /package/{references → up/references}/blueprints/settings.md +0 -0
  117. /package/{references → up/references}/checkpoints.md +0 -0
  118. /package/{references → up/references}/engineering-principles-compressed.md +0 -0
  119. /package/{references → up/references}/engineering-principles.md +0 -0
  120. /package/{references → up/references}/git-integration.md +0 -0
  121. /package/{references → up/references}/governance-rules-compressed.md +0 -0
  122. /package/{references → up/references}/governance-rules.md +0 -0
  123. /package/{references → up/references}/production-requirements-compressed.md +0 -0
  124. /package/{references → up/references}/production-requirements.md +0 -0
  125. /package/{references → up/references}/questioning.md +0 -0
  126. /package/{references → up/references}/rework-limits-compressed.md +0 -0
  127. /package/{references → up/references}/rework-limits.md +0 -0
  128. /package/{references → up/references}/severity-levels.md +0 -0
  129. /package/{references → up/references}/state-persistence.md +0 -0
  130. /package/{references → up/references}/ui-brand.md +0 -0
  131. /package/{templates → up/templates}/audit-plan.md +0 -0
  132. /package/{templates → up/templates}/audit-report.md +0 -0
  133. /package/{templates → up/templates}/builder-defaults.md +0 -0
  134. /package/{templates → up/templates}/checklist.md +0 -0
  135. /package/{templates → up/templates}/continue-here.md +0 -0
  136. /package/{templates → up/templates}/delivery.md +0 -0
  137. /package/{templates → up/templates}/design-tokens.md +0 -0
  138. /package/{templates → up/templates}/owner-profile.md +0 -0
  139. /package/{templates → up/templates}/owner.md +0 -0
  140. /package/{templates → up/templates}/pending.md +0 -0
  141. /package/{templates → up/templates}/plan-ready.md +0 -0
  142. /package/{templates → up/templates}/project.md +0 -0
  143. /package/{templates → up/templates}/report.md +0 -0
  144. /package/{templates → up/templates}/requirements.md +0 -0
  145. /package/{templates → up/templates}/roadmap.md +0 -0
  146. /package/{templates → up/templates}/state.md +0 -0
  147. /package/{templates → up/templates}/suggestion.md +0 -0
  148. /package/{templates → up/templates}/summary.md +0 -0
  149. /package/{workflows → up/workflows}/adicionar-fase.md +0 -0
  150. /package/{workflows → up/workflows}/builder-e2e.md +0 -0
  151. /package/{workflows → up/workflows}/ceo-intake.md +0 -0
  152. /package/{workflows → up/workflows}/ceo-updates.md +0 -0
  153. /package/{workflows → up/workflows}/clone-builder.md +0 -0
  154. /package/{workflows → up/workflows}/dcrv.md +0 -0
  155. /package/{workflows → up/workflows}/discutir-fase.md +0 -0
  156. /package/{workflows → up/workflows}/executar-fase.md +0 -0
  157. /package/{workflows → up/workflows}/ideias.md +0 -0
  158. /package/{workflows → up/workflows}/iniciar.md +0 -0
  159. /package/{workflows → up/workflows}/mapear-codigo.md +0 -0
  160. /package/{workflows → up/workflows}/melhorias.md +0 -0
  161. /package/{workflows → up/workflows}/mobile-first.md +0 -0
  162. /package/{workflows → up/workflows}/novo-projeto.md +0 -0
  163. /package/{workflows → up/workflows}/onboarding.md +0 -0
  164. /package/{workflows → up/workflows}/pausar.md +0 -0
  165. /package/{workflows → up/workflows}/progresso.md +0 -0
  166. /package/{workflows → up/workflows}/rapido.md +0 -0
  167. /package/{workflows → up/workflows}/remover-fase.md +0 -0
  168. /package/{workflows → up/workflows}/resetar.md +0 -0
  169. /package/{workflows → up/workflows}/retomar.md +0 -0
  170. /package/{workflows → up/workflows}/ux-tester.md +0 -0
  171. /package/{workflows → up/workflows}/verificar-trabalho.md +0 -0
@@ -46,6 +46,101 @@ function safeReadFile(filePath) {
46
46
  }
47
47
  }
48
48
 
49
+ // --- Model presets ---
50
+
51
+ const MODEL_PRESETS = {
52
+ 'opus-completo': {
53
+ descricao: 'Opus em tudo (maximo qualidade, maximo custo)',
54
+ planning: 'opus',
55
+ execution: 'opus',
56
+ governance: 'opus',
57
+ review: 'opus',
58
+ },
59
+ 'hibrido': {
60
+ descricao: 'Opus planeja e governa, Sonnet executa (melhor custo-beneficio)',
61
+ planning: 'opus',
62
+ execution: 'sonnet',
63
+ governance: 'opus',
64
+ review: 'opus',
65
+ },
66
+ 'sonnet-completo': {
67
+ descricao: 'Sonnet em tudo (rapido e economico)',
68
+ planning: 'sonnet',
69
+ execution: 'sonnet',
70
+ governance: 'sonnet',
71
+ review: 'sonnet',
72
+ },
73
+ 'economico': {
74
+ descricao: 'Sonnet planeja e executa, Haiku governa (maximo economia)',
75
+ planning: 'sonnet',
76
+ execution: 'sonnet',
77
+ governance: 'haiku',
78
+ review: 'sonnet',
79
+ },
80
+ 'custom': {
81
+ descricao: 'Configuracao manual por papel',
82
+ planning: null,
83
+ execution: null,
84
+ governance: null,
85
+ review: null,
86
+ },
87
+ };
88
+
89
+ // Map agent names to their model role
90
+ const AGENT_ROLE_MAP = {
91
+ // Planning
92
+ 'up-planejador': 'planning',
93
+ 'up-arquiteto': 'planning',
94
+ 'up-product-analyst': 'planning',
95
+ 'up-system-designer': 'planning',
96
+ 'up-roteirista': 'planning',
97
+ 'up-pesquisador-projeto': 'planning',
98
+ 'up-sintetizador': 'planning',
99
+ 'up-mapeador-codigo': 'planning',
100
+ 'up-requirements-validator': 'planning',
101
+ // Execution
102
+ 'up-executor': 'execution',
103
+ 'up-frontend-specialist': 'execution',
104
+ 'up-backend-specialist': 'execution',
105
+ 'up-database-specialist': 'execution',
106
+ 'up-devops-agent': 'execution',
107
+ 'up-technical-writer': 'execution',
108
+ 'up-depurador': 'execution',
109
+ // Governance (supervisors + chiefs + CEO)
110
+ 'up-execution-supervisor': 'governance',
111
+ 'up-verification-supervisor': 'governance',
112
+ 'up-planning-supervisor': 'governance',
113
+ 'up-quality-supervisor': 'governance',
114
+ 'up-audit-supervisor': 'governance',
115
+ 'up-product-supervisor': 'governance',
116
+ 'up-architecture-supervisor': 'governance',
117
+ 'up-operations-supervisor': 'governance',
118
+ 'up-chief-engineer': 'governance',
119
+ 'up-chief-architect': 'governance',
120
+ 'up-chief-quality': 'governance',
121
+ 'up-chief-operations': 'governance',
122
+ 'up-chief-product': 'governance',
123
+ 'up-project-ceo': 'governance',
124
+ 'up-delivery-auditor': 'governance',
125
+ 'up-planning-auditor': 'governance',
126
+ // Review & Testing
127
+ 'up-verificador': 'review',
128
+ 'up-blind-validator': 'review',
129
+ 'up-code-reviewer': 'review',
130
+ 'up-security-reviewer': 'review',
131
+ 'up-visual-critic': 'review',
132
+ 'up-exhaustive-tester': 'review',
133
+ 'up-api-tester': 'review',
134
+ 'up-qa-agent': 'review',
135
+ 'up-auditor-ux': 'review',
136
+ 'up-auditor-performance': 'review',
137
+ 'up-auditor-modernidade': 'review',
138
+ 'up-sintetizador-melhorias': 'review',
139
+ 'up-analista-codigo': 'review',
140
+ 'up-pesquisador-mercado': 'review',
141
+ 'up-consolidador-ideias': 'review',
142
+ };
143
+
49
144
  function loadConfig(cwd) {
50
145
  const configPath = path.join(cwd, '.plano', 'config.json');
51
146
  const defaults = {
@@ -53,6 +148,8 @@ function loadConfig(cwd) {
53
148
  paralelizacao: true,
54
149
  commit_docs: true,
55
150
  auto_advance: false,
151
+ instrumentation: { enabled: true },
152
+ budget_ceiling: null,
56
153
  };
57
154
 
58
155
  try {
@@ -64,12 +161,44 @@ function loadConfig(cwd) {
64
161
  paralelizacao: parsed.paralelizacao ?? defaults.paralelizacao,
65
162
  commit_docs: parsed.commit_docs ?? defaults.commit_docs,
66
163
  auto_advance: parsed.auto_advance ?? defaults.auto_advance,
164
+ modelos: parsed.modelos ?? null,
165
+ instrumentation: parsed.instrumentation ?? defaults.instrumentation,
166
+ budget_ceiling: parsed.budget_ceiling ?? defaults.budget_ceiling,
67
167
  };
68
168
  } catch {
69
169
  return defaults;
70
170
  }
71
171
  }
72
172
 
173
+ /**
174
+ * Resolve the model for a given agent based on config.
175
+ * Returns model string (opus/sonnet/haiku) or null (use runtime default).
176
+ */
177
+ function resolveAgentModel(cwd, agentName) {
178
+ const config = loadConfig(cwd);
179
+ const modelConfig = config.modelos;
180
+
181
+ // No model config = runtime decides (v0.6.0 default behavior)
182
+ if (!modelConfig) return null;
183
+
184
+ const preset = modelConfig.preset;
185
+ if (!preset || preset === 'runtime') return null;
186
+
187
+ // Custom: check per-role overrides
188
+ const role = AGENT_ROLE_MAP[agentName];
189
+ if (!role) return null;
190
+
191
+ if (preset === 'custom') {
192
+ return modelConfig[role] || null;
193
+ }
194
+
195
+ // Named preset
196
+ const presetConfig = MODEL_PRESETS[preset];
197
+ if (!presetConfig) return null;
198
+
199
+ return presetConfig[role] || null;
200
+ }
201
+
73
202
  // --- Git utilities ---
74
203
 
75
204
  function isGitIgnored(cwd, targetPath) {
@@ -256,6 +385,9 @@ module.exports = {
256
385
  error,
257
386
  safeReadFile,
258
387
  loadConfig,
388
+ resolveAgentModel,
389
+ MODEL_PRESETS,
390
+ AGENT_ROLE_MAP,
259
391
  isGitIgnored,
260
392
  execGit,
261
393
  escapeRegex,