up-cc 0.16.1 → 2.0.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.
- package/README.md +87 -577
- package/package.json +5 -3
- package/up/CHANGELOG.md +110 -0
- package/up/agents/up-arquiteto.md +95 -39
- package/up/agents/up-auditor.md +218 -0
- package/up/agents/up-executor.md +94 -31
- package/up/agents/up-mapeador-codigo.md +63 -10
- package/up/agents/up-pesquisador.md +278 -0
- package/up/agents/up-revisor.md +249 -0
- package/up/agents/up-sintetizador.md +156 -179
- package/up/agents/up-tester.md +280 -0
- package/up/agents/up-verificador.md +95 -11
- package/up/bin/install.js +182 -19
- package/up/bin/lib/core.cjs +17 -43
- package/up/bin/lib/github.cjs +495 -0
- package/up/bin/lib/multica.cjs +424 -0
- package/up/bin/up-tools.cjs +167 -46
- package/up/commands/auditar.md +66 -0
- package/up/commands/build.md +54 -43
- package/up/commands/depurar.md +1 -1
- package/up/commands/plan.md +52 -38
- package/up/commands/rapido.md +15 -9
- package/up/commands/testar.md +81 -122
- package/up/commands/up.md +106 -0
- package/up/hooks/up-session-start.js +107 -0
- package/up/references/engineering-principles.md +1 -1
- package/up/references/governance-rules.md +5 -5
- package/up/references/production-requirements.md +1 -1
- package/up/references/severity-levels.md +2 -2
- package/up/references/tdd-evidence-types.md +81 -0
- package/up/skills/up-brainstorm/SKILL.md +39 -0
- package/up/skills/up-tdd/SKILL.md +39 -0
- package/up/skills/up-verificar-antes-de-concluir/SKILL.md +49 -0
- package/up/skills/usando-up/SKILL.md +26 -0
- package/up/templates/audit-plan.md +3 -3
- package/up/templates/audit-report.md +2 -2
- package/up/templates/design-tokens.md +2 -2
- package/up/workflows/auditar.md +255 -0
- package/up/workflows/build.md +600 -386
- package/up/workflows/dcrv.md +183 -99
- package/up/workflows/governance.md +112 -220
- package/up/workflows/plan.md +169 -399
- package/up/workflows/rapido.md +7 -1
- package/up/workflows/up.md +447 -0
- package/up/agents/up-analista-codigo.md +0 -446
- package/up/agents/up-api-tester.md +0 -405
- package/up/agents/up-architecture-supervisor.md +0 -126
- package/up/agents/up-audit-supervisor.md +0 -83
- package/up/agents/up-auditor-modernidade.md +0 -378
- package/up/agents/up-auditor-performance.md +0 -426
- package/up/agents/up-auditor-ux.md +0 -396
- package/up/agents/up-backend-specialist.md +0 -175
- package/up/agents/up-blind-validator.md +0 -259
- package/up/agents/up-chief-architect.md +0 -184
- package/up/agents/up-chief-engineer.md +0 -202
- package/up/agents/up-chief-operations.md +0 -123
- package/up/agents/up-chief-product.md +0 -103
- package/up/agents/up-chief-quality.md +0 -211
- package/up/agents/up-clone-crawler.md +0 -234
- package/up/agents/up-clone-design-extractor.md +0 -227
- package/up/agents/up-clone-feature-mapper.md +0 -225
- package/up/agents/up-clone-prd-writer.md +0 -169
- package/up/agents/up-clone-verifier.md +0 -227
- package/up/agents/up-code-reviewer.md +0 -229
- package/up/agents/up-consolidador-ideias.md +0 -493
- package/up/agents/up-database-specialist.md +0 -169
- package/up/agents/up-delivery-auditor.md +0 -247
- package/up/agents/up-devops-agent.md +0 -203
- package/up/agents/up-execution-supervisor.md +0 -315
- package/up/agents/up-exhaustive-tester.md +0 -348
- package/up/agents/up-frontend-specialist.md +0 -152
- package/up/agents/up-operations-supervisor.md +0 -94
- package/up/agents/up-pesquisador-mercado.md +0 -350
- package/up/agents/up-pesquisador-projeto.md +0 -358
- package/up/agents/up-planning-auditor.md +0 -284
- package/up/agents/up-planning-supervisor.md +0 -260
- package/up/agents/up-product-analyst.md +0 -192
- package/up/agents/up-product-supervisor.md +0 -83
- package/up/agents/up-project-ceo.md +0 -352
- package/up/agents/up-qa-agent.md +0 -171
- package/up/agents/up-quality-supervisor.md +0 -178
- package/up/agents/up-requirements-validator.md +0 -230
- package/up/agents/up-security-reviewer.md +0 -137
- package/up/agents/up-sintetizador-melhorias.md +0 -407
- package/up/agents/up-system-designer.md +0 -332
- package/up/agents/up-technical-writer.md +0 -188
- package/up/agents/up-verification-supervisor.md +0 -111
- package/up/agents/up-visual-critic.md +0 -358
- package/up/commands/adicionar-fase.md +0 -47
- package/up/commands/adicionar-testes.md +0 -145
- package/up/commands/ajuda.md +0 -176
- package/up/commands/atualizar.md +0 -103
- package/up/commands/clone-builder.md +0 -67
- package/up/commands/configurar.md +0 -219
- package/up/commands/custos.md +0 -67
- package/up/commands/dashboard.md +0 -48
- package/up/commands/discutir-fase.md +0 -35
- package/up/commands/executar-fase.md +0 -40
- package/up/commands/ideias.md +0 -49
- package/up/commands/iniciar.md +0 -31
- package/up/commands/mapear-codigo.md +0 -63
- package/up/commands/melhorias.md +0 -45
- package/up/commands/mobile-first.md +0 -71
- package/up/commands/modo-builder.md +0 -186
- package/up/commands/novo-projeto.md +0 -40
- package/up/commands/onboard.md +0 -69
- package/up/commands/pausar.md +0 -33
- package/up/commands/planejar-fase.md +0 -45
- package/up/commands/progresso.md +0 -33
- package/up/commands/remover-fase.md +0 -34
- package/up/commands/resetar.md +0 -27
- package/up/commands/retomar.md +0 -35
- package/up/commands/saude.md +0 -103
- package/up/commands/ux-tester.md +0 -63
- package/up/commands/verificar-trabalho.md +0 -35
- package/up/workflows/adicionar-fase.md +0 -112
- package/up/workflows/builder-e2e.md +0 -501
- package/up/workflows/builder.md +0 -3419
- package/up/workflows/ceo-intake.md +0 -305
- package/up/workflows/ceo-updates.md +0 -183
- package/up/workflows/clone-builder.md +0 -320
- package/up/workflows/discutir-fase.md +0 -336
- package/up/workflows/executar-fase.md +0 -358
- package/up/workflows/executar-plano.md +0 -659
- package/up/workflows/ideias.md +0 -381
- package/up/workflows/iniciar.md +0 -235
- package/up/workflows/melhorias.md +0 -409
- package/up/workflows/mobile-first.md +0 -692
- package/up/workflows/novo-projeto.md +0 -778
- package/up/workflows/planejar-fase.md +0 -293
- package/up/workflows/progresso.md +0 -226
- package/up/workflows/retomar.md +0 -231
- package/up/workflows/ux-tester.md +0 -526
- package/up/workflows/verificar-trabalho.md +0 -308
package/up/bin/install.js
CHANGED
|
@@ -105,6 +105,15 @@ if (hasHelp) {
|
|
|
105
105
|
const scriptDir = __dirname;
|
|
106
106
|
const packageRoot = path.resolve(scriptDir, '..');
|
|
107
107
|
|
|
108
|
+
// Known UP skill directory names (namespaced). Only these are installed/removed,
|
|
109
|
+
// so third-party skills under <config>/skills/ are never touched.
|
|
110
|
+
const UP_SKILLS = [
|
|
111
|
+
'usando-up',
|
|
112
|
+
'up-brainstorm',
|
|
113
|
+
'up-tdd',
|
|
114
|
+
'up-verificar-antes-de-concluir',
|
|
115
|
+
];
|
|
116
|
+
|
|
108
117
|
// ── Runtime Helpers ──
|
|
109
118
|
|
|
110
119
|
function getDirName(runtime) {
|
|
@@ -384,16 +393,14 @@ function convertCommandToGeminiToml(content) {
|
|
|
384
393
|
* Supervisors/auditors/reviewers get read-only.
|
|
385
394
|
*/
|
|
386
395
|
function getCodexSandboxMode(agentName) {
|
|
396
|
+
// 12 agentes (onda 2 do corte). up-executor roteia frontend/backend/database
|
|
397
|
+
// por contexto; up-tester funde visual + exhaustive + api num spawn multi-pass
|
|
398
|
+
// (precisa de workspace-write pra escrever reports).
|
|
387
399
|
const writeAgents = [
|
|
388
|
-
'up-
|
|
389
|
-
'up-
|
|
390
|
-
'up-
|
|
391
|
-
'up-
|
|
392
|
-
'up-clone-feature-mapper', 'up-clone-prd-writer', 'up-clone-verifier',
|
|
393
|
-
'up-visual-critic', 'up-exhaustive-tester', 'up-api-tester', 'up-qa-agent',
|
|
394
|
-
'up-depurador', 'up-verificador', 'up-blind-validator', 'up-planejador',
|
|
395
|
-
'up-mapeador-codigo', 'up-analista-codigo', 'up-pesquisador-projeto',
|
|
396
|
-
'up-pesquisador-mercado', 'up-product-analyst', 'up-project-ceo',
|
|
400
|
+
'up-executor', 'up-arquiteto', 'up-roteirista', 'up-sintetizador',
|
|
401
|
+
'up-tester',
|
|
402
|
+
'up-depurador', 'up-verificador', 'up-planejador', 'up-mapeador-codigo',
|
|
403
|
+
'up-pesquisador', 'up-revisor', 'up-auditor',
|
|
397
404
|
];
|
|
398
405
|
return writeAgents.includes(agentName) ? 'workspace-write' : 'read-only';
|
|
399
406
|
}
|
|
@@ -659,6 +666,21 @@ function uninstall(targetDir, runtime) {
|
|
|
659
666
|
if (removed > 0) console.log(` ${green}✓${reset} Removed UP agents`);
|
|
660
667
|
}
|
|
661
668
|
|
|
669
|
+
// Remove o bootstrap brainstorm-first do arquivo de instrucoes (non-Claude)
|
|
670
|
+
const bootstrapFile = bootstrapTargetFile(runtime);
|
|
671
|
+
if (bootstrapFile) {
|
|
672
|
+
const bootstrapPath = path.join(targetDir, bootstrapFile);
|
|
673
|
+
if (fs.existsSync(bootstrapPath)) {
|
|
674
|
+
const before = fs.readFileSync(bootstrapPath, 'utf8');
|
|
675
|
+
const after = stripUpBootstrapBlock(before);
|
|
676
|
+
if (after !== before) {
|
|
677
|
+
if (after.trim()) fs.writeFileSync(bootstrapPath, after.trimEnd() + '\n');
|
|
678
|
+
else fs.unlinkSync(bootstrapPath); // o arquivo era so do UP -> remove
|
|
679
|
+
console.log(` ${green}✓${reset} Removed UP bootstrap de ${bootstrapFile}`);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
662
684
|
// Remove UP commands (runtime-specific structure)
|
|
663
685
|
if (runtime === 'codex') {
|
|
664
686
|
// Codex: skills/up-X folders
|
|
@@ -714,6 +736,27 @@ function uninstall(targetDir, runtime) {
|
|
|
714
736
|
console.log(` ${green}✓${reset} Removed UP hooks`);
|
|
715
737
|
}
|
|
716
738
|
|
|
739
|
+
// Remove UP skills layer (Claude Code only — only the known UP skill dirs,
|
|
740
|
+
// never third-party skills).
|
|
741
|
+
if (runtime === 'claude') {
|
|
742
|
+
const skillsDir = path.join(targetDir, 'skills');
|
|
743
|
+
if (fs.existsSync(skillsDir)) {
|
|
744
|
+
let skillCount = 0;
|
|
745
|
+
for (const skillName of UP_SKILLS) {
|
|
746
|
+
const skillPath = path.join(skillsDir, skillName);
|
|
747
|
+
if (fs.existsSync(skillPath)) {
|
|
748
|
+
const count = countFiles(skillPath);
|
|
749
|
+
rmDir(skillPath);
|
|
750
|
+
removed += count;
|
|
751
|
+
skillCount++;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
if (skillCount > 0) {
|
|
755
|
+
console.log(` ${green}✓${reset} Removed ${skillCount} UP skills`);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
|
|
717
760
|
// Clean settings.json references
|
|
718
761
|
if (runtime === 'claude') {
|
|
719
762
|
const settingsPath = path.join(targetDir, 'settings.json');
|
|
@@ -733,7 +776,20 @@ function uninstall(targetDir, runtime) {
|
|
|
733
776
|
return !hooks.some(h => h.command && h.command.includes('up-context-monitor'));
|
|
734
777
|
});
|
|
735
778
|
if (settings.hooks.PostToolUse.length === 0) delete settings.hooks.PostToolUse;
|
|
736
|
-
|
|
779
|
+
changed = true;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
if (settings.hooks && settings.hooks.SessionStart) {
|
|
783
|
+
settings.hooks.SessionStart = settings.hooks.SessionStart.filter(entry => {
|
|
784
|
+
const hooks = entry.hooks || [];
|
|
785
|
+
return !hooks.some(h => h.command && h.command.includes('up-session-start'));
|
|
786
|
+
});
|
|
787
|
+
if (settings.hooks.SessionStart.length === 0) delete settings.hooks.SessionStart;
|
|
788
|
+
changed = true;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
if (settings.hooks && Object.keys(settings.hooks).length === 0) {
|
|
792
|
+
delete settings.hooks;
|
|
737
793
|
changed = true;
|
|
738
794
|
}
|
|
739
795
|
|
|
@@ -754,6 +810,67 @@ function uninstall(targetDir, runtime) {
|
|
|
754
810
|
|
|
755
811
|
// ── INSTALL ──
|
|
756
812
|
|
|
813
|
+
// ── Brainstorm-first bootstrap for non-Claude runtimes ──
|
|
814
|
+
// Claude usa o hook SessionStart + skills. Gemini/OpenCode/Codex nao tem esse mecanismo,
|
|
815
|
+
// entao injetamos a doutrina UP no arquivo de instrucoes global do runtime (sempre carregado).
|
|
816
|
+
const UP_BOOTSTRAP_START = '<!-- UP-BOOTSTRAP:START (gerado por up-cc; nao edite a mao) -->';
|
|
817
|
+
const UP_BOOTSTRAP_END = '<!-- UP-BOOTSTRAP:END -->';
|
|
818
|
+
|
|
819
|
+
function bootstrapTargetFile(runtime) {
|
|
820
|
+
if (runtime === 'gemini') return 'GEMINI.md';
|
|
821
|
+
if (runtime === 'opencode' || runtime === 'codex') return 'AGENTS.md';
|
|
822
|
+
return null;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
function buildUpBootstrapBlock(runtime, pathPrefix) {
|
|
826
|
+
const cmd = runtime === 'opencode' ? '/up-' : runtime === 'codex' ? '$up-' : '/up:';
|
|
827
|
+
const entry = runtime === 'opencode' ? '/up-up' : runtime === 'codex' ? '$up-up' : '/up:up';
|
|
828
|
+
const skills = toHomePrefix(pathPrefix) + 'up/skills';
|
|
829
|
+
return [
|
|
830
|
+
UP_BOOTSTRAP_START,
|
|
831
|
+
'# UP (up-cc): doutrina sempre-ativa',
|
|
832
|
+
'',
|
|
833
|
+
'Voce tem o UP instalado. Antes de QUALQUER trabalho de codigo, design ou decisao, siga:',
|
|
834
|
+
'',
|
|
835
|
+
'1. BRAINSTORM-FIRST: explore intencao, requisitos e design ANTES de implementar. Escale por tamanho:',
|
|
836
|
+
' trivial = 0 perguntas (anuncia e faz); pequena = 1 pergunta; media/grande = brainstorm completo com',
|
|
837
|
+
' aprovacao por secao. Ref: ' + skills + '/up-brainstorm/SKILL.md',
|
|
838
|
+
'2. LEI DE FERRO (evidencia antes de afirmar): nunca diga "pronto", "funciona" ou "corrigido" sem rodar a',
|
|
839
|
+
' prova NESTA resposta e confirmar a saida. Ref: ' + skills + '/up-verificar-antes-de-concluir/SKILL.md',
|
|
840
|
+
'3. TDD POR TIPO: logica/parser/bugfix = teste red-green; UI/CSS = prova visual (antes/depois);',
|
|
841
|
+
' glue/integracao = smoke-test. Ref: ' + skills + '/up-tdd/SKILL.md',
|
|
842
|
+
'4. GitHub-nativo e o padrao no ' + cmd + 'build (worktree -> issue -> PR -> merge); ' + cmd + 'rapido pula a cerimonia.',
|
|
843
|
+
'5. O estado vive em .plano/ e sobrevive a reset de contexto. Persistencia e o coracao do UP.',
|
|
844
|
+
'',
|
|
845
|
+
'Porta unica: ' + entry + ' "sua ideia". Comandos: ' + cmd + 'up, ' + cmd + 'plan, ' + cmd + 'build, ' + cmd + 'testar, ' + cmd + 'auditar, ' + cmd + 'depurar, ' + cmd + 'rapido.',
|
|
846
|
+
UP_BOOTSTRAP_END,
|
|
847
|
+
].join('\n');
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
// Remove um bloco UP previo (idempotente). Retorna o conteudo sem o bloco.
|
|
851
|
+
function stripUpBootstrapBlock(content) {
|
|
852
|
+
const startIdx = content.indexOf(UP_BOOTSTRAP_START);
|
|
853
|
+
if (startIdx === -1) return content;
|
|
854
|
+
const endIdx = content.indexOf(UP_BOOTSTRAP_END, startIdx);
|
|
855
|
+
if (endIdx === -1) return content;
|
|
856
|
+
const before = content.slice(0, startIdx).replace(/\n*$/, '');
|
|
857
|
+
const after = content.slice(endIdx + UP_BOOTSTRAP_END.length).replace(/^\n*/, '');
|
|
858
|
+
return (before + (before && after ? '\n\n' : '') + after).trim();
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
function injectBootstrapInstructions(runtime, targetDir, pathPrefix) {
|
|
862
|
+
const fileName = bootstrapTargetFile(runtime);
|
|
863
|
+
if (!fileName) return;
|
|
864
|
+
const filePath = path.join(targetDir, fileName);
|
|
865
|
+
let existing = '';
|
|
866
|
+
if (fs.existsSync(filePath)) existing = fs.readFileSync(filePath, 'utf8');
|
|
867
|
+
existing = stripUpBootstrapBlock(existing); // idempotente: tira o bloco antigo
|
|
868
|
+
const block = buildUpBootstrapBlock(runtime, pathPrefix);
|
|
869
|
+
const next = existing ? existing.trimEnd() + '\n\n' + block + '\n' : block + '\n';
|
|
870
|
+
fs.writeFileSync(filePath, next);
|
|
871
|
+
console.log(` ${green}✓${reset} Brainstorm-first em ${fileName} (bootstrap UP)`);
|
|
872
|
+
}
|
|
873
|
+
|
|
757
874
|
function install(isGlobal, runtime) {
|
|
758
875
|
const targetDir = getTargetDir(runtime, isGlobal);
|
|
759
876
|
const pathPrefix = buildPathPrefix(targetDir, isGlobal, runtime);
|
|
@@ -927,6 +1044,7 @@ function install(isGlobal, runtime) {
|
|
|
927
1044
|
|
|
928
1045
|
const statuslineCmd = `node "${path.join(hooksDest, 'up-statusline.js')}"`;
|
|
929
1046
|
const contextMonitorCmd = `node "${path.join(hooksDest, 'up-context-monitor.js')}"`;
|
|
1047
|
+
const sessionStartCmd = `node "${path.join(hooksDest, 'up-session-start.js')}"`;
|
|
930
1048
|
|
|
931
1049
|
// Set statusLine
|
|
932
1050
|
settings.statusLine = { type: 'command', command: statuslineCmd };
|
|
@@ -951,13 +1069,51 @@ function install(isGlobal, runtime) {
|
|
|
951
1069
|
if (settings.hooks.SessionStart.length === 0) delete settings.hooks.SessionStart;
|
|
952
1070
|
}
|
|
953
1071
|
|
|
1072
|
+
// Set SessionStart hook for the UP skill bootstrap (idempotent).
|
|
1073
|
+
// Fires on startup/clear/compact; the hook itself decides per source.
|
|
1074
|
+
const sessionStartHooks = settings.hooks.SessionStart || [];
|
|
1075
|
+
// Drop any prior UP session-start entries before re-adding (no duplicates)
|
|
1076
|
+
const sessionFiltered = sessionStartHooks.filter(entry => {
|
|
1077
|
+
const hooks = entry.hooks || [];
|
|
1078
|
+
return !hooks.some(h => h.command && h.command.includes('up-session-start'));
|
|
1079
|
+
});
|
|
1080
|
+
sessionFiltered.push({
|
|
1081
|
+
matcher: 'startup|clear|compact',
|
|
1082
|
+
hooks: [{ type: 'command', command: sessionStartCmd }],
|
|
1083
|
+
});
|
|
1084
|
+
settings.hooks.SessionStart = sessionFiltered;
|
|
1085
|
+
|
|
954
1086
|
// Clean old GSD statusLine reference
|
|
955
1087
|
if (settings.statusLine && settings.statusLine.command && settings.statusLine.command.includes('gsd-statusline')) {
|
|
956
1088
|
settings.statusLine = { type: 'command', command: statuslineCmd };
|
|
957
1089
|
}
|
|
958
1090
|
|
|
959
1091
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
|
|
960
|
-
console.log(` ${green}✓${reset} Configured statusLine and
|
|
1092
|
+
console.log(` ${green}✓${reset} Configured statusLine, context monitor and session-start hook`);
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
// 4c. Install skills layer (Claude Code discovers skills at <config>/skills/*/SKILL.md)
|
|
1097
|
+
if (runtime === 'claude') {
|
|
1098
|
+
const skillsSrc = path.join(packageRoot, 'skills');
|
|
1099
|
+
if (fs.existsSync(skillsSrc)) {
|
|
1100
|
+
const skillsDest = path.join(targetDir, 'skills');
|
|
1101
|
+
fs.mkdirSync(skillsDest, { recursive: true });
|
|
1102
|
+
|
|
1103
|
+
let skillCount = 0;
|
|
1104
|
+
for (const skillName of UP_SKILLS) {
|
|
1105
|
+
const src = path.join(skillsSrc, skillName);
|
|
1106
|
+
if (fs.existsSync(src) && fs.statSync(src).isDirectory()) {
|
|
1107
|
+
// copyDirWithReplace clears the dest dir first, so existing third-party
|
|
1108
|
+
// skills (other names) are untouched — only this dir is replaced.
|
|
1109
|
+
copyDirWithReplace(src, path.join(skillsDest, skillName), pathPrefix, runtime);
|
|
1110
|
+
skillCount++;
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
if (skillCount > 0) {
|
|
1115
|
+
console.log(` ${green}✓${reset} Installed ${skillCount} skills`);
|
|
1116
|
+
}
|
|
961
1117
|
}
|
|
962
1118
|
}
|
|
963
1119
|
|
|
@@ -971,9 +1127,13 @@ function install(isGlobal, runtime) {
|
|
|
971
1127
|
|
|
972
1128
|
// UP needs deeper agent nesting than Codex default (max_depth=1).
|
|
973
1129
|
// Hierarchy: CEO → Chiefs → Supervisors → Operationals = 4 levels.
|
|
974
|
-
// We do an idempotent merge: if [agents] section exists, only add missing keys.
|
|
975
1130
|
const upMarker = '# UP — added by up-cc installer';
|
|
976
|
-
|
|
1131
|
+
const hasAgentsSection = /^\[agents\]/m.test(existing);
|
|
1132
|
+
if (existing.includes(upMarker)) {
|
|
1133
|
+
console.log(` ${dim}config.toml already has UP settings — skipped${reset}`);
|
|
1134
|
+
} else if (hasAgentsSection) {
|
|
1135
|
+
console.log(` ${dim}config.toml already has [agents] section — skipped (verify max_depth>=4, max_threads>=8)${reset}`);
|
|
1136
|
+
} else {
|
|
977
1137
|
const upConfig =
|
|
978
1138
|
`\n${upMarker}\n` +
|
|
979
1139
|
`[agents]\n` +
|
|
@@ -982,11 +1142,14 @@ function install(isGlobal, runtime) {
|
|
|
982
1142
|
`job_max_runtime_seconds = 3600\n`;
|
|
983
1143
|
fs.writeFileSync(configPath, existing + upConfig);
|
|
984
1144
|
console.log(` ${green}✓${reset} Configured config.toml ([agents] max_depth=4, max_threads=8)`);
|
|
985
|
-
} else {
|
|
986
|
-
console.log(` ${dim}config.toml already has UP settings — skipped${reset}`);
|
|
987
1145
|
}
|
|
988
1146
|
}
|
|
989
1147
|
|
|
1148
|
+
// 4d. Brainstorm-first bootstrap (non-Claude runtimes; Claude usa hook + skills no lugar)
|
|
1149
|
+
if (runtime !== 'claude') {
|
|
1150
|
+
injectBootstrapInstructions(runtime, targetDir, pathPrefix);
|
|
1151
|
+
}
|
|
1152
|
+
|
|
990
1153
|
// 5. Write VERSION file
|
|
991
1154
|
const versionDest = path.join(upDest, 'VERSION');
|
|
992
1155
|
fs.writeFileSync(versionDest, VERSION);
|
|
@@ -1008,10 +1171,10 @@ function install(isGlobal, runtime) {
|
|
|
1008
1171
|
}
|
|
1009
1172
|
|
|
1010
1173
|
let command;
|
|
1011
|
-
if (runtime === 'opencode') command = '/up-
|
|
1012
|
-
else if (runtime === 'codex') command = '$up-
|
|
1013
|
-
else command = '/up:
|
|
1014
|
-
console.log(`\n ${green}Done!${reset} Run ${cyan}${command}${reset} in ${label} to get started.\n`);
|
|
1174
|
+
if (runtime === 'opencode') command = '/up-up';
|
|
1175
|
+
else if (runtime === 'codex') command = '$up-up';
|
|
1176
|
+
else command = '/up:up';
|
|
1177
|
+
console.log(`\n ${green}Done!${reset} Run ${cyan}${command} "sua ideia"${reset} in ${label} to get started.\n`);
|
|
1015
1178
|
}
|
|
1016
1179
|
|
|
1017
1180
|
// ── INTERACTIVE MODE ──
|
package/up/bin/lib/core.cjs
CHANGED
|
@@ -86,59 +86,23 @@ const MODEL_PRESETS = {
|
|
|
86
86
|
},
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
// Map agent names to their model role
|
|
89
|
+
// Map agent names to their model role (12 agentes — onda 2 do corte)
|
|
90
90
|
const AGENT_ROLE_MAP = {
|
|
91
91
|
// Planning
|
|
92
92
|
'up-planejador': 'planning',
|
|
93
93
|
'up-arquiteto': 'planning',
|
|
94
|
-
'up-product-analyst': 'planning',
|
|
95
|
-
'up-system-designer': 'planning',
|
|
96
94
|
'up-roteirista': 'planning',
|
|
97
|
-
'up-pesquisador-projeto': 'planning',
|
|
98
95
|
'up-sintetizador': 'planning',
|
|
99
96
|
'up-mapeador-codigo': 'planning',
|
|
100
|
-
'up-
|
|
101
|
-
// Execution
|
|
97
|
+
'up-pesquisador': 'planning',
|
|
98
|
+
// Execution (up-executor roteia frontend/backend/database por contexto)
|
|
102
99
|
'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
100
|
'up-depurador': 'execution',
|
|
109
|
-
//
|
|
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
|
|
101
|
+
// Review & Testing (up-tester funde os 3 detectores DCRV)
|
|
127
102
|
'up-verificador': 'review',
|
|
128
|
-
'up-
|
|
129
|
-
'up-
|
|
130
|
-
'up-
|
|
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',
|
|
103
|
+
'up-revisor': 'review',
|
|
104
|
+
'up-auditor': 'review',
|
|
105
|
+
'up-tester': 'review',
|
|
142
106
|
};
|
|
143
107
|
|
|
144
108
|
function loadConfig(cwd) {
|
|
@@ -150,6 +114,13 @@ function loadConfig(cwd) {
|
|
|
150
114
|
auto_advance: false,
|
|
151
115
|
instrumentation: { enabled: true },
|
|
152
116
|
budget_ceiling: null,
|
|
117
|
+
// Fase 4: GitHub-native e o PADRAO. --solo no comando forca github_native=false
|
|
118
|
+
// so na execucao (o build.md le a flag e roteia para o modo solo, sem persistir).
|
|
119
|
+
github_native: true,
|
|
120
|
+
merge_strategy: 'squash',
|
|
121
|
+
// Fim de fase: se a fase tem UI, sobe dev server e exige aprovacao visual ANTES do merge.
|
|
122
|
+
// true por padrao (projeto em producao nao mergeia sem o dono ver na tela). --auto so pula se false.
|
|
123
|
+
require_visual_test: true,
|
|
153
124
|
};
|
|
154
125
|
|
|
155
126
|
try {
|
|
@@ -164,6 +135,9 @@ function loadConfig(cwd) {
|
|
|
164
135
|
modelos: parsed.modelos ?? null,
|
|
165
136
|
instrumentation: parsed.instrumentation ?? defaults.instrumentation,
|
|
166
137
|
budget_ceiling: parsed.budget_ceiling ?? defaults.budget_ceiling,
|
|
138
|
+
github_native: parsed.github_native ?? defaults.github_native,
|
|
139
|
+
merge_strategy: parsed.merge_strategy ?? defaults.merge_strategy,
|
|
140
|
+
require_visual_test: parsed.require_visual_test ?? defaults.require_visual_test,
|
|
167
141
|
};
|
|
168
142
|
} catch {
|
|
169
143
|
return defaults;
|