jarvis-ai-framework 1.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/AGENTS.md +416 -0
- package/LICENSE +21 -0
- package/README.md +190 -0
- package/agents/AGENTS.md +234 -0
- package/agents/README.md +309 -0
- package/agents/engineering/data/eng.data-engineer.agent.md +309 -0
- package/agents/engineering/eng.agent.md +303 -0
- package/agents/engineering/eng.bug-hunter.md +386 -0
- package/agents/engineering/eng.cybersecurity.agent.md +503 -0
- package/agents/engineering/eng.dev-code-reviewer.md +148 -0
- package/agents/engineering/eng.docs-writer.md +152 -0
- package/agents/engineering/eng.frontend.agent.md +117 -0
- package/agents/engineering/eng.rpa.agent.md +215 -0
- package/agents/engineering/eng.tech-analyst.agent.md +102 -0
- package/agents/engineering/eng.ux-designer.agent.md +193 -0
- package/agents/engineering/qa/eng.qa.cypress-specialist.md +109 -0
- package/agents/engineering/qa/eng.qa.quality-champion-task-agent.md +85 -0
- package/agents/engineering/qa/eng.qa.quality-strategist.md +111 -0
- package/agents/engineering/qa/eng.qa.test-architect.md +400 -0
- package/agents/engineering/qa/eng.qa.test-planner.md +477 -0
- package/agents/engineering/qa/eng.qa.testing-engineer.md +339 -0
- package/agents/product/prod.pm-checker.md +52 -0
- package/bin/commands/docs-publish.js +184 -0
- package/bin/commands/docs-sync.js +139 -0
- package/bin/commands/info.js +87 -0
- package/bin/commands/init.js +237 -0
- package/bin/commands/install-rtk.js +90 -0
- package/bin/commands/list.js +48 -0
- package/bin/commands/qa-signoff.js +112 -0
- package/bin/commands/whoami.js +43 -0
- package/bin/jarvis.js +159 -0
- package/bin/lib/auth/session.js +56 -0
- package/bin/lib/config/constants.js +123 -0
- package/bin/lib/config/ide-config.js +233 -0
- package/bin/lib/core/scanner.js +124 -0
- package/bin/lib/core/sync-engine.js +551 -0
- package/bin/lib/docs/fetch-file.sh +41 -0
- package/bin/lib/docs/publish-file.sh +284 -0
- package/bin/lib/docs/validate-frontmatter.js +157 -0
- package/bin/lib/env-loader.js +198 -0
- package/bin/lib/tasks/comment.js +131 -0
- package/bin/lib/utils/git-parser.js +145 -0
- package/bin/lib/utils/logger.js +104 -0
- package/bin/lib/utils/npmrc-parser.js +106 -0
- package/bin/lib/utils/paths.js +55 -0
- package/bin/lib/utils/ui.js +59 -0
- package/bin/lib/vcs/api.js +312 -0
- package/bin/lib/vcs/create-issue.js +43 -0
- package/bin/lib/vcs/create-merge.js +43 -0
- package/bin/lib/vcs/fetch-raw.js +30 -0
- package/bin/postinstall.js +41 -0
- package/members.md +25 -0
- package/package.json +55 -0
- package/rules/AGENTS.md +205 -0
- package/rules/engineering/data/data-rules.md +200 -0
- package/rules/engineering/eng-rules.md +243 -0
- package/rules/engineering/eng-security-rules.md +186 -0
- package/rules/engineering/eng.breakdown-subtasks-rules.md +585 -0
- package/rules/engineering/eng.bump-rules.md +27 -0
- package/rules/engineering/eng.docs-scraping-rules.md +64 -0
- package/rules/engineering/eng.downstream-flow-rules.md +297 -0
- package/rules/engineering/eng.integrations-rules.md +73 -0
- package/rules/engineering/eng.plan-rules.md +333 -0
- package/rules/engineering/eng.pr-rules.md +359 -0
- package/rules/engineering/eng.pre-pr-rules.md +103 -0
- package/rules/engineering/eng.start-rules.md +246 -0
- package/rules/engineering/eng.tech-spec-rules.md +968 -0
- package/rules/engineering/eng.work-rules.md +312 -0
- package/rules/engineering/frontend/eng.frontend-rules.md +147 -0
- package/rules/engineering/qa/eng.qa.cypress-standards-rules.md +259 -0
- package/rules/engineering/qa/eng.qa.exploratory-session-rules.md +137 -0
- package/rules/engineering/qa/eng.qa.quality-gate-scoring-rules.md +181 -0
- package/rules/engineering/qa/eng.qa.tech-spec-validation-criteria-rules.md +120 -0
- package/rules/engineering/rpa/eng.rpa-rules.md +230 -0
- package/rules/product/README.md +24 -0
- package/rules/product/prod-rules.md +151 -0
- package/rules/rtk-rules.md +68 -0
- package/skills/AGENTS.md +290 -0
- package/skills/SKILLS-ROADMAP.md +333 -0
- package/skills/churn-audit/SKILL.md +385 -0
- package/skills/context-detect/SKILL.md +399 -0
- package/skills/context-detect/assets/context-profile-template.md +127 -0
- package/skills/docs-central/README.md +310 -0
- package/skills/docs-central/SKILL.md +423 -0
- package/skills/docs-index/SKILL.md +377 -0
- package/skills/eng-ai-engineer/SKILL.md +296 -0
- package/skills/eng-arch-c4/SKILL.md +358 -0
- package/skills/eng-arch-c4/assets/example-code.md +189 -0
- package/skills/eng-arch-c4/assets/example-component.md +105 -0
- package/skills/eng-arch-c4/assets/example-container.md +104 -0
- package/skills/eng-arch-c4/assets/example-context.md +81 -0
- package/skills/eng-backend/SKILL.md +776 -0
- package/skills/eng-browser-extension-builder/SKILL.md +385 -0
- package/skills/eng-cybersecurity/SKILL.md +645 -0
- package/skills/eng-data-bi/SKILL.md +199 -0
- package/skills/eng-data-debug/SKILL.md +307 -0
- package/skills/eng-data-engineer/SKILL.md +256 -0
- package/skills/eng-data-onboard/SKILL.md +310 -0
- package/skills/eng-data-orchestrator/SKILL.md +426 -0
- package/skills/eng-design-system/SKILL.md +619 -0
- package/skills/eng-docs-write/SKILL.md +312 -0
- package/skills/eng-frontend/SKILL.md +913 -0
- package/skills/eng-jira-comment/SKILL.md +17 -0
- package/skills/eng-microfrontend/SKILL.md +602 -0
- package/skills/eng-ms-trace/SKILL.md +469 -0
- package/skills/eng-nestjs/SKILL.md +791 -0
- package/skills/eng-performance-engineer/SKILL.md +312 -0
- package/skills/eng-pr/SKILL.md +339 -0
- package/skills/eng-qa-a11y-audit/SKILL.md +269 -0
- package/skills/eng-qa-bug-report/SKILL.md +1088 -0
- package/skills/eng-qa-bug-report/TASK_MANAGERS.md +138 -0
- package/skills/eng-qa-cypress-e2e/SKILL.md +177 -0
- package/skills/eng-qa-dev-guide/SKILL.md +164 -0
- package/skills/eng-qa-e2e/SKILL.md +400 -0
- package/skills/eng-qa-e2e-spec-writer/SKILL.md +322 -0
- package/skills/eng-qa-exploratory/SKILL.md +188 -0
- package/skills/eng-qa-gate/SKILL.md +370 -0
- package/skills/eng-qa-gate/assets/checklist-validacao.md +291 -0
- package/skills/eng-qa-graphql-contract/SKILL.md +256 -0
- package/skills/eng-qa-quality-report/SKILL.md +412 -0
- package/skills/eng-qa-test-plan/SKILL.md +466 -0
- package/skills/eng-qa-test-plan/assets/test-coverage-template.md +92 -0
- package/skills/eng-qa-test-plan/assets/test-patterns.md +178 -0
- package/skills/eng-qa-testsprite/SKILL.md +325 -0
- package/skills/eng-qa-testsprite/references/testsprite-mcp.md +224 -0
- package/skills/eng-qa-unit-test/SKILL.md +471 -0
- package/skills/eng-rabbitmq/SKILL.md +661 -0
- package/skills/eng-scraper/SKILL.md +683 -0
- package/skills/eng-scraper-robot-builder/SKILL.md +370 -0
- package/skills/eng-security-patch/SKILL.md +378 -0
- package/skills/eng-security-triage/SKILL.md +266 -0
- package/skills/eng-task-comment/SKILL.md +60 -0
- package/skills/eng-tech-analyst/SKILL.md +529 -0
- package/skills/eng-threat-model/SKILL.md +161 -0
- package/skills/init-jarvis/SKILL.md +1304 -0
- package/skills/init-jarvis/assets/mcp-configs.md +389 -0
- package/skills/init-jarvis/assets/onboarding-checklist.md +104 -0
- package/skills/init-jarvis/assets/setup-guide.md +360 -0
- package/skills/lovable-prompt-generator/SKILL.md +304 -0
- package/skills/prod-roadmap-report/README.md +303 -0
- package/skills/prod-roadmap-report/SKILL.md +198 -0
- package/skills/prod-roadmap-report/commands/status.compiled.single.team.md +23 -0
- package/skills/prod-roadmap-report/commands/status.list.projects.md +17 -0
- package/skills/prod-roadmap-report/commands/status.memory.md +192 -0
- package/skills/prod-roadmap-report/commands/status.roadmap.preview.md +94 -0
- package/skills/prod-roadmap-report/references/detailed-guide.md +236 -0
- package/skills/prod-roadmap-report/rules/detailed-guide.md +237 -0
- package/skills/prod-roadmap-report/rules/status-report-rules.md +44 -0
- package/skills/prod-roadmap-report/templates/template-multiple-teams-compiled-status.md +53 -0
- package/skills/prod-roadmap-report/templates/template-projects-list.md +23 -0
- package/skills/prod-roadmap-report/templates/template-single-team-compiled-status.md +60 -0
- package/skills/prod-roadmap-report/templates/template-single-team-status.md +49 -0
- package/skills/prod-specs/SKILL.md +108 -0
- package/skills/prod-specs/references/prod.spec.clarify.md +176 -0
- package/skills/prod-specs/references/prod.spec.epic.md +107 -0
- package/skills/prod-specs/references/prod.spec.frd.md +135 -0
- package/skills/prod-specs/references/prod.spec.issue.md +145 -0
- package/skills/prod-specs/references/prod.spec.prd.md +118 -0
- package/skills/prod-specs/rules/prod-spec-rules.md +186 -0
- package/skills/prod-specs/templates/prod-breakdown-template.md +136 -0
- package/skills/prod-specs/templates/prod-epic-template.md +76 -0
- package/skills/prod-specs/templates/prod-frd-template.md +172 -0
- package/skills/prod-specs/templates/prod-issue-template.md +68 -0
- package/skills/prod-specs/templates/prod-prd-full-template.md +159 -0
- package/skills/prod-specs/templates/prod-prd-template.md +173 -0
- package/skills/prod-specs-update/SKILL.md +272 -0
- package/skills/report-issue/SKILL.md +156 -0
- package/taxonomy.md +270 -0
- package/templates/AGENTS.md +189 -0
- package/templates/CDD aplicado a Prompts.md +182 -0
- package/templates/ENV-template.md +187 -0
- package/templates/engineering/AGENTS-template.md +71 -0
- package/templates/engineering/ARD-template.md +193 -0
- package/templates/engineering/CONTACTS-template.md +135 -0
- package/templates/engineering/PR-template.md +40 -0
- package/templates/engineering/RFC-Playbook.md +325 -0
- package/templates/engineering/RFC-template.md +199 -0
- package/templates/engineering/architecture-template.md +277 -0
- package/templates/engineering/breakdown-subtasks-template.md +582 -0
- package/templates/engineering/c4-model-template.md +516 -0
- package/templates/engineering/data-contract-template.md +135 -0
- package/templates/engineering/data-pipeline-template.md +163 -0
- package/templates/engineering/plan-template.md +255 -0
- package/templates/engineering/qa/eng.qa.quality-gate-examples-template.md +311 -0
- package/templates/engineering/qa/eng.qa.quality-gate-report-template.md +249 -0
- package/templates/engineering/qa/qa.cypress-test-template.md +172 -0
- package/templates/engineering/qa/qa.exploratory-session-template.md +148 -0
- package/templates/engineering/qa/qa.quality-report-template.md +130 -0
- package/templates/engineering/qa/qa.release-signoff-template.md +54 -0
- package/templates/engineering/qa/qa.sprint-plan-template.md +49 -0
- package/templates/engineering/swagger-template.md +145 -0
- package/templates/engineering/tech-spec-template.md +497 -0
- package/templates/engineering/work-progress-template.md +155 -0
- package/workflows/AGENTS.md +240 -0
- package/workflows/README.md +160 -0
- package/workflows/all-tools.md +11 -0
- package/workflows/engineering/data/data.contract.md +202 -0
- package/workflows/engineering/data/data.new-pipeline.md +234 -0
- package/workflows/engineering/eng.breakdown-subtasks.md +420 -0
- package/workflows/engineering/eng.bug-audit.md +591 -0
- package/workflows/engineering/eng.build-tech-spec.md +1116 -0
- package/workflows/engineering/eng.create-ard-from-code.md +259 -0
- package/workflows/engineering/eng.create-ard.md +382 -0
- package/workflows/engineering/eng.create-rfc.md +245 -0
- package/workflows/engineering/eng.debug.md +479 -0
- package/workflows/engineering/eng.docs.md +40 -0
- package/workflows/engineering/eng.light-arch.md +84 -0
- package/workflows/engineering/eng.plan.md +213 -0
- package/workflows/engineering/eng.pr.md +466 -0
- package/workflows/engineering/eng.pre-pr.md +167 -0
- package/workflows/engineering/eng.review.md +185 -0
- package/workflows/engineering/eng.rpa.robot.md +342 -0
- package/workflows/engineering/eng.security-audit.md +312 -0
- package/workflows/engineering/eng.security-incident.md +275 -0
- package/workflows/engineering/eng.security-pipeline.md +210 -0
- package/workflows/engineering/eng.security-review.md +235 -0
- package/workflows/engineering/eng.start.md +494 -0
- package/workflows/engineering/eng.work.md +558 -0
- package/workflows/engineering/frontend/eng.frontend-component.md +190 -0
- package/workflows/engineering/frontend/eng.frontend-perf-audit.md +375 -0
- package/workflows/engineering/frontend/eng.frontend-review.md +185 -0
- package/workflows/engineering/qa/eng.qa-dev-quality-guide.md +51 -0
- package/workflows/engineering/qa/eng.qa-e2e-test-generation.md +51 -0
- package/workflows/engineering/qa/eng.qa-exploratory-session.md +60 -0
- package/workflows/engineering/qa/eng.qa-quality-gate-validation.md +202 -0
- package/workflows/engineering/qa/eng.qa-quality-report.md +83 -0
- package/workflows/engineering/qa/eng.qa-refinement-entry.md +83 -0
- package/workflows/engineering/qa/eng.qa-release-signoff.md +170 -0
- package/workflows/engineering/qa/eng.qa-sprint-planning.md +100 -0
- package/workflows/engineering/ta/eng.ta.atendimento.md +93 -0
- package/workflows/product/prod.roadmap.preview.md +110 -0
- package/workflows/product/prod.spec.breakdown.md +163 -0
- package/workflows/product/prod.spec.clarify.md +178 -0
- package/workflows/product/prod.spec.epic.md +154 -0
- package/workflows/product/prod.spec.frd.md +96 -0
- package/workflows/product/prod.spec.issue.md +145 -0
- package/workflows/product/prod.spec.md +60 -0
- package/workflows/product/prod.spec.prd.md +100 -0
- package/workflows/taxonomy.md +92 -0
- package/workflows/warm-up.md +574 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { loadEnv, resolveEnvPath } from '../lib/env-loader.js'
|
|
2
|
+
import { exec } from 'node:child_process'
|
|
3
|
+
import { promisify } from 'node:util'
|
|
4
|
+
import { existsSync } from 'node:fs'
|
|
5
|
+
import { join, dirname } from 'node:path'
|
|
6
|
+
import { fileURLToPath } from 'node:url'
|
|
7
|
+
|
|
8
|
+
const execAsync = promisify(exec)
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
10
|
+
const __dirname = dirname(__filename)
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Sincroniza documentação do central-docs
|
|
14
|
+
* Executado automaticamente em /warm-up
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} flags - Flags do comando
|
|
17
|
+
* @param {boolean} flags.silent - Modo silencioso (sem output)
|
|
18
|
+
* @param {boolean} flags.verbose - Modo verbose (mostra conteúdo)
|
|
19
|
+
* @param {string} flags.envFile - Path customizado do ENV.md
|
|
20
|
+
*/
|
|
21
|
+
export async function docsSync(flags = {}) {
|
|
22
|
+
const cwd = process.cwd()
|
|
23
|
+
|
|
24
|
+
// Resolver path do ENV.md (suporta --ide e --env-file)
|
|
25
|
+
let envPath
|
|
26
|
+
try {
|
|
27
|
+
const resolved = resolveEnvPath(cwd, flags)
|
|
28
|
+
envPath = resolved.path
|
|
29
|
+
} catch (error) {
|
|
30
|
+
if (!flags.silent) {
|
|
31
|
+
console.error('❌ Erro ao resolver ENV.md:', error.message)
|
|
32
|
+
}
|
|
33
|
+
process.exit(1)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Carregar ENV.md
|
|
37
|
+
let env
|
|
38
|
+
try {
|
|
39
|
+
env = loadEnv(cwd, envPath)
|
|
40
|
+
} catch (error) {
|
|
41
|
+
if (!flags.silent) {
|
|
42
|
+
console.error('❌ Erro ao carregar ENV.md:', error.message)
|
|
43
|
+
}
|
|
44
|
+
process.exit(1)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Verificar se central-docs está configurado
|
|
48
|
+
if (!env.CENTRAL_DOCS_REPO) {
|
|
49
|
+
if (!flags.silent) {
|
|
50
|
+
console.log('ℹ️ Central docs não configurado (CENTRAL_DOCS_REPO vazio)')
|
|
51
|
+
}
|
|
52
|
+
return
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const { SQUAD, WORKSPACE, CENTRAL_DOCS_REF = 'main' } = env
|
|
56
|
+
|
|
57
|
+
if (!SQUAD || !WORKSPACE) {
|
|
58
|
+
if (!flags.silent) {
|
|
59
|
+
console.error('❌ SQUAD ou WORKSPACE não definidos no ENV.md')
|
|
60
|
+
}
|
|
61
|
+
process.exit(1)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (!flags.silent) {
|
|
65
|
+
console.log(`🔄 Sincronizando docs do squad ${SQUAD}...`)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Verificar se script fetch-file.sh existe
|
|
69
|
+
// Usar path relativo ao módulo, não ao cwd do usuário
|
|
70
|
+
const fetchScript = join(__dirname, '../lib/docs/fetch-file.sh')
|
|
71
|
+
if (!existsSync(fetchScript)) {
|
|
72
|
+
console.error('❌ Script não encontrado:', fetchScript)
|
|
73
|
+
process.exit(1)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Buscar index.md do squad
|
|
77
|
+
const indexPath = `${SQUAD}/index.md`
|
|
78
|
+
|
|
79
|
+
try {
|
|
80
|
+
// Exportar variáveis de ambiente para o script bash
|
|
81
|
+
const envVars = {
|
|
82
|
+
...process.env,
|
|
83
|
+
CENTRAL_DOCS_REPO: env.CENTRAL_DOCS_REPO,
|
|
84
|
+
CENTRAL_DOCS_CACHE_TTL: env.CENTRAL_DOCS_CACHE_TTL || '3600'
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const { stdout, stderr } = await execAsync(
|
|
88
|
+
`bash "${fetchScript}" "${indexPath}" "${CENTRAL_DOCS_REF}"`,
|
|
89
|
+
{ env: envVars }
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
if (!flags.silent) {
|
|
93
|
+
console.log('✅ Docs sincronizados')
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (flags.verbose && stdout) {
|
|
97
|
+
console.log('\n📄 Conteúdo do index.md:\n')
|
|
98
|
+
console.log(stdout)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Parsear index.md para contar documentos
|
|
102
|
+
if (!flags.silent && stdout) {
|
|
103
|
+
const prdCount = (stdout.match(/\[prd-.*\.md\]/g) || []).length
|
|
104
|
+
const frdCount = (stdout.match(/\[frd-.*\.md\]/g) || []).length
|
|
105
|
+
const ardCount = (stdout.match(/\[ard-.*\.md\]/g) || []).length
|
|
106
|
+
const rfcCount = (stdout.match(/\[rfc-.*\.md\]/g) || []).length
|
|
107
|
+
|
|
108
|
+
const total = prdCount + frdCount + ardCount + rfcCount
|
|
109
|
+
|
|
110
|
+
if (total > 0) {
|
|
111
|
+
console.log(`📊 ${total} documentos disponíveis:`)
|
|
112
|
+
if (prdCount > 0) console.log(` - ${prdCount} PRD(s)`)
|
|
113
|
+
if (frdCount > 0) console.log(` - ${frdCount} FRD(s)`)
|
|
114
|
+
if (ardCount > 0) console.log(` - ${ardCount} ARD(s)`)
|
|
115
|
+
if (rfcCount > 0) console.log(` - ${rfcCount} RFC(s)`)
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (stderr && !flags.silent) {
|
|
120
|
+
console.warn('⚠️ Avisos:', stderr)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
} catch (error) {
|
|
124
|
+
if (!flags.silent) {
|
|
125
|
+
console.error('❌ Erro ao sincronizar docs:', error.message)
|
|
126
|
+
|
|
127
|
+
// Dicas de troubleshooting
|
|
128
|
+
if (error.message.includes('Token GitLab')) {
|
|
129
|
+
console.error('\n💡 Configure o token GitLab no .npmrc:')
|
|
130
|
+
console.error(' //gitlab.com/api/v4/packages/npm/:_authToken=seu-token')
|
|
131
|
+
} else if (error.message.includes('não encontrado')) {
|
|
132
|
+
console.error('\n💡 Verifique se o squad existe no central-docs:')
|
|
133
|
+
console.error(` ${SQUAD}/index.md`)
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
process.exit(1)
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { findPrompt, discoverAll } from "../lib/core/scanner.js";
|
|
2
|
+
import {
|
|
3
|
+
showBanner,
|
|
4
|
+
RED,
|
|
5
|
+
GREEN,
|
|
6
|
+
BLUE,
|
|
7
|
+
YELLOW,
|
|
8
|
+
CYAN,
|
|
9
|
+
DIM,
|
|
10
|
+
NC,
|
|
11
|
+
} from "../lib/utils/ui.js";
|
|
12
|
+
import { logger } from "../lib/utils/logger.js";
|
|
13
|
+
|
|
14
|
+
export async function info(target) {
|
|
15
|
+
showBanner();
|
|
16
|
+
|
|
17
|
+
if (!target) {
|
|
18
|
+
logger.error(`${RED}❌ Uso incorreto${NC}`);
|
|
19
|
+
logger.info(`${YELLOW}Uso: jarvis info <type/name>${NC}`);
|
|
20
|
+
logger.info(`${DIM}Exemplo: jarvis info agent/eng.agent${NC}\n`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let prompt = findPrompt(target);
|
|
25
|
+
|
|
26
|
+
if (!prompt && !target.includes("/")) {
|
|
27
|
+
const all = discoverAll();
|
|
28
|
+
const allPrompts = [...all.agents, ...all.skills, ...all.workflows];
|
|
29
|
+
|
|
30
|
+
prompt = allPrompts.find((p) => p.id === target);
|
|
31
|
+
|
|
32
|
+
if (!prompt) {
|
|
33
|
+
prompt = allPrompts.find((p) => p.id.startsWith(target));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!prompt) {
|
|
37
|
+
prompt = allPrompts.find((p) => p.id.includes(target));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (!prompt) {
|
|
42
|
+
logger.error(`${RED}❌ Não encontrado: ${YELLOW}${target}${NC}`);
|
|
43
|
+
logger.info(
|
|
44
|
+
`${DIM}Execute: ${YELLOW}jarvis list${DIM} para ver prompts disponíveis${NC}\n`,
|
|
45
|
+
);
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Icon based on type
|
|
50
|
+
const icon =
|
|
51
|
+
prompt.type === "agent" ? "🤖" : prompt.type === "skill" ? "⚡" : "🔄";
|
|
52
|
+
|
|
53
|
+
logger.info(`${CYAN}${icon} ${prompt.type.toUpperCase()}/${prompt.id}${NC}`);
|
|
54
|
+
logger.info("");
|
|
55
|
+
logger.info(` ${BLUE}Nome:${NC} ${GREEN}${prompt.name}${NC}`);
|
|
56
|
+
logger.info(` ${BLUE}Versão:${NC} ${prompt.version}`);
|
|
57
|
+
if (prompt.model) {
|
|
58
|
+
logger.info(` ${BLUE}Modelo:${NC} ${prompt.model}`);
|
|
59
|
+
}
|
|
60
|
+
logger.info(` ${BLUE}Descrição:${NC} ${DIM}${prompt.description}${NC}`);
|
|
61
|
+
logger.info(` ${BLUE}Caminho:${NC} ${DIM}${prompt.path}${NC}`);
|
|
62
|
+
logger.info("");
|
|
63
|
+
|
|
64
|
+
const deps = prompt.deps;
|
|
65
|
+
const hasDeps = Object.values(deps).some((arr) => arr.length > 0);
|
|
66
|
+
|
|
67
|
+
if (hasDeps) {
|
|
68
|
+
logger.info(` ${YELLOW}📦 Dependências:${NC}`);
|
|
69
|
+
if (deps.rules.length)
|
|
70
|
+
logger.info(
|
|
71
|
+
` ${BLUE}Rules:${NC} ${DIM}${deps.rules.join(", ")}${NC}`,
|
|
72
|
+
);
|
|
73
|
+
if (deps.templates.length)
|
|
74
|
+
logger.info(
|
|
75
|
+
` ${BLUE}Templates:${NC} ${DIM}${deps.templates.join(", ")}${NC}`,
|
|
76
|
+
);
|
|
77
|
+
if (deps.agents.length)
|
|
78
|
+
logger.info(
|
|
79
|
+
` ${BLUE}Agents:${NC} ${DIM}${deps.agents.join(", ")}${NC}`,
|
|
80
|
+
);
|
|
81
|
+
if (deps.skills.length)
|
|
82
|
+
logger.info(
|
|
83
|
+
` ${BLUE}Skills:${NC} ${DIM}${deps.skills.join(", ")}${NC}`,
|
|
84
|
+
);
|
|
85
|
+
logger.info("");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, appendFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { createInterface } from "node:readline";
|
|
4
|
+
import { syncAssets } from "../lib/core/sync-engine.js";
|
|
5
|
+
import { discoverAll } from "../lib/core/scanner.js";
|
|
6
|
+
import {
|
|
7
|
+
IDES,
|
|
8
|
+
getIDEConfig,
|
|
9
|
+
getIDEFolder,
|
|
10
|
+
getWorkflowsFolder,
|
|
11
|
+
isIDESupported,
|
|
12
|
+
} from "../lib/config/ide-config.js";
|
|
13
|
+
import {
|
|
14
|
+
showBanner,
|
|
15
|
+
RED,
|
|
16
|
+
GREEN,
|
|
17
|
+
BLUE,
|
|
18
|
+
YELLOW,
|
|
19
|
+
CYAN,
|
|
20
|
+
DIM,
|
|
21
|
+
BOLD,
|
|
22
|
+
NC,
|
|
23
|
+
} from "../lib/utils/ui.js";
|
|
24
|
+
import { getPackageInfo } from "../lib/utils/paths.js";
|
|
25
|
+
import { logger, configureFromFlags } from "../lib/utils/logger.js";
|
|
26
|
+
|
|
27
|
+
function ask(rl, question) {
|
|
28
|
+
return new Promise((resolve) => rl.question(question, resolve));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export async function init(flags) {
|
|
32
|
+
configureFromFlags(flags);
|
|
33
|
+
|
|
34
|
+
const cwd = process.cwd();
|
|
35
|
+
|
|
36
|
+
showBanner();
|
|
37
|
+
|
|
38
|
+
let ide;
|
|
39
|
+
if (flags.ide) {
|
|
40
|
+
if (!isIDESupported(flags.ide)) {
|
|
41
|
+
logger.error(`${RED}❌ IDE inválida: ${flags.ide}${NC}`);
|
|
42
|
+
logger.info(
|
|
43
|
+
`${YELLOW}IDEs disponíveis: ${IDES.filter((i) => i.supported).map((i) => i.value).join(", ")}${NC}\n`,
|
|
44
|
+
);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
ide = flags.ide;
|
|
48
|
+
const ideObj = getIDEConfig(ide);
|
|
49
|
+
logger.info(`${GREEN}✓ IDE: ${ideObj.name}${NC}\n`);
|
|
50
|
+
} else {
|
|
51
|
+
logger.info(`${YELLOW}Qual IDE você está usando?${NC}`);
|
|
52
|
+
logger.info("");
|
|
53
|
+
|
|
54
|
+
IDES.forEach((ideObj, index) => {
|
|
55
|
+
if (ideObj.supported) {
|
|
56
|
+
logger.info(` ${GREEN}${index + 1}${NC}) ${ideObj.name}`);
|
|
57
|
+
} else {
|
|
58
|
+
logger.info(
|
|
59
|
+
` ${DIM}${index + 1}) ${ideObj.name} (não suportado)${NC}`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
logger.info("");
|
|
64
|
+
|
|
65
|
+
const rl = createInterface({
|
|
66
|
+
input: process.stdin,
|
|
67
|
+
output: process.stdout,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
let choice;
|
|
71
|
+
while (true) {
|
|
72
|
+
choice = await ask(
|
|
73
|
+
rl,
|
|
74
|
+
`${BLUE}Digite o número da sua escolha (1-${IDES.length}): ${NC}`,
|
|
75
|
+
);
|
|
76
|
+
const choiceNum = parseInt(choice, 10);
|
|
77
|
+
|
|
78
|
+
if (choiceNum >= 1 && choiceNum <= IDES.length) {
|
|
79
|
+
const selectedIde = IDES[choiceNum - 1];
|
|
80
|
+
if (selectedIde.supported) {
|
|
81
|
+
ide = selectedIde.value;
|
|
82
|
+
logger.info("");
|
|
83
|
+
logger.info(
|
|
84
|
+
`${GREEN}Interface selecionada: ${selectedIde.name}${NC}`,
|
|
85
|
+
);
|
|
86
|
+
logger.info(`${DIM}Pasta destino: .${getIDEFolder(ide)}${NC}`);
|
|
87
|
+
logger.info("");
|
|
88
|
+
break;
|
|
89
|
+
} else {
|
|
90
|
+
logger.info(`${DIM}Esta interface ainda não é suportada.${NC}\n`);
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
logger.info(
|
|
94
|
+
`${RED}Opção inválida. Por favor, escolha um número entre 1 e ${IDES.length}.${NC}\n`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
rl.close();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const ideDir = join(cwd, `.${getIDEFolder(ide)}`);
|
|
103
|
+
|
|
104
|
+
// Reinstall: --force ou confirmação "s" devem sobrescrever assets (cpSync force:true).
|
|
105
|
+
let forceSync = !!flags.force;
|
|
106
|
+
|
|
107
|
+
if (existsSync(ideDir) && !forceSync) {
|
|
108
|
+
logger.info(`${YELLOW}⚠️ Framework já instalado em .${getIDEFolder(ide)}${NC}`);
|
|
109
|
+
logger.info("");
|
|
110
|
+
|
|
111
|
+
const rl = createInterface({
|
|
112
|
+
input: process.stdin,
|
|
113
|
+
output: process.stdout,
|
|
114
|
+
});
|
|
115
|
+
const confirm = await ask(
|
|
116
|
+
rl,
|
|
117
|
+
`Deseja reinstalar? Isso irá sobrescrever a instalação existente. (s/N): `,
|
|
118
|
+
);
|
|
119
|
+
rl.close();
|
|
120
|
+
|
|
121
|
+
if (confirm.toLowerCase() !== "s") {
|
|
122
|
+
logger.info(`${BLUE}ℹ️ Instalação cancelada.${NC}\n`);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
forceSync = true;
|
|
126
|
+
logger.info("");
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const ideConfig = getIDEConfig(ide);
|
|
130
|
+
logger.info(
|
|
131
|
+
`${BLUE}Configurando ambiente para ${ideConfig?.name}...${NC}`,
|
|
132
|
+
);
|
|
133
|
+
logger.info("");
|
|
134
|
+
const result = syncAssets(cwd, ide, {
|
|
135
|
+
force: forceSync,
|
|
136
|
+
workflowsFolder: getWorkflowsFolder(ide),
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
for (const item of result.copied) {
|
|
140
|
+
logger.info(`${BLUE} ↳ ${item}${NC}`);
|
|
141
|
+
}
|
|
142
|
+
for (const item of result.skipped) {
|
|
143
|
+
logger.info(`${DIM} ↳ ${item} (já existe)${NC}`);
|
|
144
|
+
}
|
|
145
|
+
for (const item of result.errors) {
|
|
146
|
+
logger.error(`${RED} ✗ ${item}${NC}`);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const jarvisRoot = join(cwd, '.jarvis');
|
|
150
|
+
for (const area of ['eng', 'prod', 'qa']) {
|
|
151
|
+
mkdirSync(join(jarvisRoot, 'sessions', area), { recursive: true });
|
|
152
|
+
}
|
|
153
|
+
const gitignore = join(cwd, '.gitignore');
|
|
154
|
+
const ignoreLine = '.jarvis/';
|
|
155
|
+
if (existsSync(gitignore)) {
|
|
156
|
+
const text = readFileSync(gitignore, 'utf8');
|
|
157
|
+
if (!text.split('\n').some((l) => l.trim() === ignoreLine || l.trim() === '.jarvis')) {
|
|
158
|
+
appendFileSync(gitignore, `${text.endsWith('\n') ? '' : '\n'}${ignoreLine}\n`);
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
writeFileSync(gitignore, `${ignoreLine}\n`);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const pkg = getPackageInfo();
|
|
165
|
+
|
|
166
|
+
logger.info("");
|
|
167
|
+
logger.info(`${GREEN}✓ Configuração concluída!${NC}`);
|
|
168
|
+
logger.info(
|
|
169
|
+
`${BOLD}${CYAN} versão: ${pkg.name} v${pkg.version}${NC}`,
|
|
170
|
+
);
|
|
171
|
+
logger.info(`${DIM} origem: ${pkg.root}${NC}`);
|
|
172
|
+
logger.info(`${DIM}Pasta criada: ${ideDir}${NC}`);
|
|
173
|
+
logger.info("");
|
|
174
|
+
|
|
175
|
+
const all = discoverAll();
|
|
176
|
+
|
|
177
|
+
logger.info(
|
|
178
|
+
`${YELLOW}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}`,
|
|
179
|
+
);
|
|
180
|
+
logger.info(`${CYAN} 🏁 PRÓXIMO PASSO${NC}`);
|
|
181
|
+
logger.info(
|
|
182
|
+
`${YELLOW}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}`,
|
|
183
|
+
);
|
|
184
|
+
logger.info("");
|
|
185
|
+
|
|
186
|
+
if (ide === "codex") {
|
|
187
|
+
logger.info(` No ${GREEN}Codex${NC}, skills não usam slash commands.`);
|
|
188
|
+
logger.info(` Para invocar um skill, use linguagem natural:`);
|
|
189
|
+
logger.info(` ${DIM} "use o skill init-jarvis para configurar o projeto"${NC}`);
|
|
190
|
+
logger.info(` ${DIM} "execute o warm-up do Jarvis"${NC}`);
|
|
191
|
+
logger.info("");
|
|
192
|
+
logger.info(` Skills disponíveis em ${YELLOW}.codex/skills/${NC}`);
|
|
193
|
+
logger.info(` Cada pasta é um skill — veja o SKILL.md para a descrição.`);
|
|
194
|
+
logger.info("");
|
|
195
|
+
logger.info(` Para configurar as variáveis do projeto, peça ao Codex:`);
|
|
196
|
+
logger.info(` ${GREEN}"execute o skill init-jarvis"${NC}`);
|
|
197
|
+
} else if (ide === "kiro") {
|
|
198
|
+
logger.info(` No ${GREEN}Kiro${NC}, skills e workflows são steering files.`);
|
|
199
|
+
logger.info(` Para invocar um skill, use ${GREEN}#skill-{nome}${NC} no chat:`);
|
|
200
|
+
logger.info(` ${DIM} #skill-init-jarvis${NC}`);
|
|
201
|
+
logger.info(` ${DIM} #skill-eng-backend${NC}`);
|
|
202
|
+
logger.info("");
|
|
203
|
+
logger.info(` Steering files gerados em ${YELLOW}.kiro/steering/${NC}`);
|
|
204
|
+
logger.info(` • ${DIM}steering/*.md${NC} — workflows (inclusion: manual)`);
|
|
205
|
+
logger.info(` • ${DIM}steering/*.md${NC} — rules (inclusion: auto)`);
|
|
206
|
+
logger.info(` • ${DIM}steering/skills/*.md${NC} — skills (inclusion: manual)`);
|
|
207
|
+
logger.info("");
|
|
208
|
+
logger.info(` Para configurar as variáveis do projeto, ative:`);
|
|
209
|
+
logger.info(` ${GREEN}#skill-init-jarvis${NC} no chat do Kiro`);
|
|
210
|
+
} else {
|
|
211
|
+
logger.info(` Execute o comando ${GREEN}/init-jarvis${NC} na sua IDE para`);
|
|
212
|
+
logger.info(` configurar as variáveis de ambiente do projeto.`);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
logger.info("");
|
|
216
|
+
logger.info(
|
|
217
|
+
`${DIM} Isso irá criar o arquivo ENV.md com as configurações${NC}`,
|
|
218
|
+
);
|
|
219
|
+
logger.info(`${DIM} necessárias para o funcionamento do JARVIS.${NC}`);
|
|
220
|
+
logger.info("");
|
|
221
|
+
logger.info(
|
|
222
|
+
`${YELLOW}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}`,
|
|
223
|
+
);
|
|
224
|
+
logger.info("");
|
|
225
|
+
logger.info(`${GREEN}✓ Instalação completa! 🎉${NC}`);
|
|
226
|
+
logger.info("");
|
|
227
|
+
logger.info(`${BLUE}📁 Estrutura criada:${NC}`);
|
|
228
|
+
logger.info(` • ${YELLOW}.${getIDEFolder(ide)}/${NC} - Configuração da IDE`);
|
|
229
|
+
logger.info(` • ${GREEN}${all.agents.length}${NC} agents`);
|
|
230
|
+
logger.info(` • ${GREEN}${all.skills.length}${NC} skills`);
|
|
231
|
+
logger.info(` • ${GREEN}${all.workflows.length}${NC} workflows`);
|
|
232
|
+
logger.info("");
|
|
233
|
+
logger.info(`${BLUE}📖 Para ver todos os prompts disponíveis:${NC}`);
|
|
234
|
+
logger.info(` ${YELLOW}jarvis list${NC}`);
|
|
235
|
+
logger.info("");
|
|
236
|
+
|
|
237
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { execSync } from "node:child_process";
|
|
2
|
+
import { logger, configureFromFlags } from "../lib/utils/logger.js";
|
|
3
|
+
import { GREEN, RED, YELLOW, DIM, NC } from "../lib/utils/ui.js";
|
|
4
|
+
|
|
5
|
+
function commandExists(cmd) {
|
|
6
|
+
try {
|
|
7
|
+
execSync(`which ${cmd} 2>/dev/null`, { stdio: "pipe" });
|
|
8
|
+
return true;
|
|
9
|
+
} catch {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export async function installRtk(flags) {
|
|
15
|
+
configureFromFlags(flags);
|
|
16
|
+
|
|
17
|
+
logger.info("");
|
|
18
|
+
logger.info(`${GREEN}🦀 RTK — Rust Token Killer${NC}`);
|
|
19
|
+
logger.info(`${DIM} Proxy CLI que economiza 60-90% de tokens em outputs de shell${NC}`);
|
|
20
|
+
logger.info("");
|
|
21
|
+
|
|
22
|
+
// 1. Verificar se RTK já está instalado
|
|
23
|
+
if (commandExists("rtk")) {
|
|
24
|
+
try {
|
|
25
|
+
const version = execSync("rtk --version", { encoding: "utf-8" }).trim();
|
|
26
|
+
logger.info(`${GREEN}✓ RTK já instalado: ${version}${NC}`);
|
|
27
|
+
logger.info(`${DIM} Para atualizar: cargo install rtk --force${NC}`);
|
|
28
|
+
logger.info("");
|
|
29
|
+
return;
|
|
30
|
+
} catch {}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// 2. Verificar se cargo está disponível
|
|
34
|
+
if (!commandExists("cargo")) {
|
|
35
|
+
logger.info(`${YELLOW}⚠ cargo não encontrado — instalando Rust via rustup...${NC}`);
|
|
36
|
+
logger.info("");
|
|
37
|
+
try {
|
|
38
|
+
execSync('curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y', {
|
|
39
|
+
stdio: "inherit",
|
|
40
|
+
shell: true,
|
|
41
|
+
});
|
|
42
|
+
// Atualizar PATH para a sessão atual
|
|
43
|
+
const home = process.env.HOME || process.env.USERPROFILE;
|
|
44
|
+
process.env.PATH = `${home}/.cargo/bin:${process.env.PATH}`;
|
|
45
|
+
} catch (err) {
|
|
46
|
+
logger.error(`${RED}✗ Falha ao instalar Rust: ${err.message}${NC}`);
|
|
47
|
+
logger.info(`${DIM} Instale manualmente: https://rustup.rs${NC}`);
|
|
48
|
+
logger.info("");
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (!commandExists("cargo")) {
|
|
53
|
+
logger.error(`${RED}✗ cargo não encontrado após instalação do Rust${NC}`);
|
|
54
|
+
logger.info(`${DIM} Reinicie o terminal e tente novamente: jarvis install-rtk${NC}`);
|
|
55
|
+
logger.info("");
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
logger.info(`${GREEN}✓ Rust instalado${NC}`);
|
|
60
|
+
logger.info("");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// 3. Instalar RTK via cargo
|
|
64
|
+
logger.info(`${YELLOW}⏳ Instalando RTK via cargo (pode levar alguns minutos)...${NC}`);
|
|
65
|
+
logger.info("");
|
|
66
|
+
try {
|
|
67
|
+
execSync("cargo install rtk", { stdio: "inherit" });
|
|
68
|
+
} catch (err) {
|
|
69
|
+
logger.error(`${RED}✗ Falha ao instalar RTK: ${err.message}${NC}`);
|
|
70
|
+
logger.info("");
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// 4. Verificar instalação
|
|
75
|
+
if (commandExists("rtk")) {
|
|
76
|
+
const version = execSync("rtk --version", { encoding: "utf-8" }).trim();
|
|
77
|
+
logger.info("");
|
|
78
|
+
logger.info(`${GREEN}✓ RTK instalado com sucesso: ${version}${NC}`);
|
|
79
|
+
logger.info("");
|
|
80
|
+
logger.info(`${YELLOW}Próximo passo:${NC}`);
|
|
81
|
+
logger.info(` Execute ${GREEN}jarvis init${NC} (ou atualize o ENV.md) para ativar ${GREEN}RTK_ENABLED=true${NC}`);
|
|
82
|
+
logger.info(` A rule de economia de tokens será ativada automaticamente.`);
|
|
83
|
+
logger.info("");
|
|
84
|
+
} else {
|
|
85
|
+
logger.error(`${RED}✗ RTK não encontrado no PATH após instalação${NC}`);
|
|
86
|
+
logger.info(`${DIM} Reinicie o terminal e verifique: rtk --version${NC}`);
|
|
87
|
+
logger.info("");
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { discoverAll } from "../lib/core/scanner.js";
|
|
2
|
+
import {
|
|
3
|
+
showBanner,
|
|
4
|
+
GREEN,
|
|
5
|
+
BLUE,
|
|
6
|
+
YELLOW,
|
|
7
|
+
CYAN,
|
|
8
|
+
DIM,
|
|
9
|
+
NC,
|
|
10
|
+
} from "../lib/utils/ui.js";
|
|
11
|
+
import { logger } from "../lib/utils/logger.js";
|
|
12
|
+
|
|
13
|
+
export async function list(flags) {
|
|
14
|
+
const all = discoverAll();
|
|
15
|
+
const filter = flags.type || flags._?.[0];
|
|
16
|
+
|
|
17
|
+
showBanner();
|
|
18
|
+
|
|
19
|
+
logger.info(`${CYAN}📋 Prompts Disponíveis${NC}`);
|
|
20
|
+
logger.info("");
|
|
21
|
+
|
|
22
|
+
function printSection(title, items, emoji) {
|
|
23
|
+
if (items.length === 0) return;
|
|
24
|
+
logger.info(`${YELLOW}${emoji} ${title}${NC} ${DIM}(${items.length})${NC}`);
|
|
25
|
+
logger.info(`${DIM}${"─".repeat(80)}${NC}`);
|
|
26
|
+
for (const item of items) {
|
|
27
|
+
const desc =
|
|
28
|
+
item.description.length > 45
|
|
29
|
+
? item.description.slice(0, 45) + "..."
|
|
30
|
+
: item.description;
|
|
31
|
+
logger.info(` ${GREEN}${item.id.padEnd(30)}${NC} ${DIM}${desc}${NC}`);
|
|
32
|
+
}
|
|
33
|
+
logger.info("");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!filter || filter === "agent")
|
|
37
|
+
printSection("AGENTS", all.agents, "🤖");
|
|
38
|
+
if (!filter || filter === "skill")
|
|
39
|
+
printSection("SKILLS", all.skills, "⚡");
|
|
40
|
+
if (!filter || filter === "workflow")
|
|
41
|
+
printSection("WORKFLOWS", all.workflows, "🔄");
|
|
42
|
+
|
|
43
|
+
const total = all.agents.length + all.skills.length + all.workflows.length;
|
|
44
|
+
logger.info(`${BLUE}📦 Total: ${GREEN}${total}${BLUE} prompts disponíveis${NC}`);
|
|
45
|
+
logger.info("");
|
|
46
|
+
logger.info(`${DIM}Use: ${YELLOW}jarvis info <type/name>${DIM} para ver detalhes${NC}`);
|
|
47
|
+
logger.info("");
|
|
48
|
+
}
|