jarvis-ai-framework 7.0.0 → 8.2.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 +2 -2
- package/README.md +11 -34
- package/agents/engineering/data/eng.data-engineer.agent.md +3 -3
- package/agents/engineering/eng.agent.md +13 -11
- package/agents/engineering/eng.dev-code-reviewer.md +19 -4
- package/agents/engineering/eng.docs-consolidator.agent.md +2 -2
- package/agents/engineering/eng.docs-writer.md +17 -2
- package/agents/engineering/qa/eng.qa.quality-champion-task-agent.md +2 -2
- package/agents/engineering/qa/eng.qa.test-planner.md +20 -5
- package/agents/product/prod.pm-checker.md +16 -1
- package/bin/README.md +4 -4
- package/bin/commands/init.js +237 -29
- package/bin/lib/cli/program.js +7 -11
- package/bin/lib/core/sync-engine.js +8 -4
- package/bin/lib/utils/frontmatter.js +1 -1
- package/bin/lib/utils/paths.js +2 -1
- package/bin/lib/utils/version.js +65 -0
- package/bin/postinstall.js +7 -31
- package/package.json +2 -2
- package/rules/AGENTS.md +1 -1
- package/rules/engineering/data/data-rules.md +2 -2
- package/rules/engineering/eng-rules.md +1 -1
- package/rules/engineering/eng-security-rules.md +1 -1
- package/rules/engineering/eng.integrations-rules.md +6 -2
- package/rules/rtk-rules.md +1 -1
- package/rules-on-demand/doc-links-rules.md +2 -2
- package/rules-on-demand/engineering/eng.breakdown-subtasks-rules.md +1 -1
- package/rules-on-demand/engineering/eng.plan-rules.md +2 -0
- package/rules-on-demand/engineering/eng.pr-rules.md +8 -6
- package/rules-on-demand/engineering/eng.pre-pr-rules.md +10 -3
- package/rules-on-demand/engineering/eng.start-rules.md +7 -5
- package/rules-on-demand/engineering/eng.tech-spec-rules.md +9 -7
- package/rules-on-demand/engineering/eng.transitions-rules.md +7 -6
- package/skills/AGENTS.md +2 -2
- package/skills/SKILLS-ROADMAP.md +3 -3
- package/skills/eng-backend-arch-c4/assets/example-container.md +4 -4
- package/skills/eng-backend-arch-c4/assets/example-context.md +6 -6
- package/skills/eng-backend-microservices-trace/SKILL.md +1 -1
- package/skills/eng-global-investigation/SKILL.md +4 -0
- package/skills/eng-global-pr/SKILL.md +15 -12
- package/skills/eng-global-task-comment/SKILL.md +11 -3
- package/skills/eng-global-tech-spec/references/delivery-spec.md +28 -21
- package/skills/jarvis-docs-central/README.md +4 -4
- package/skills/jarvis-docs-central/SKILL.md +5 -3
- package/skills/jarvis-evolution-architect/references/exemplos.md +3 -3
- package/skills/jarvis-init/SKILL.md +89 -24
- package/skills/jarvis-init/assets/setup-guide.md +1 -1
- package/skills/jarvis-report-issue/SKILL.md +37 -24
- package/skills/product-roadmap-report/SKILL.md +2 -2
- package/skills/product-roadmap-report/commands/status.memory.md +1 -1
- package/skills/product-roadmap-report/commands/status.roadmap.preview.md +2 -2
- package/skills/product-specs/SKILL.md +1 -1
- package/skills/product-specs-update/SKILL.md +138 -121
- package/templates/ENV-template.md +57 -27
- package/templates/cdd-aplicado-a-prompts.md +1 -1
- package/templates/engineering/AGENTS-template.md +2 -2
- package/templates/engineering/CONTACTS-template.md +1 -1
- package/templates/engineering/advisor-template.md +2 -2
- package/templates/engineering/architecture-template.md +14 -1
- package/templates/engineering/data-contract-template.md +1 -1
- package/templates/engineering/plan-template.md +2 -0
- package/templates/engineering/tech-spec-delivery-template.md +8 -8
- package/templates/engineering/tech-spec-template.md +3 -3
- package/templates/product/prod-frd-template.md +1 -1
- package/templates/product/prod-prd-template.md +1 -1
- package/workflows/AGENTS.md +1 -1
- package/workflows/README.md +1 -1
- package/workflows/engineering/data/data.contract.md +12 -8
- package/workflows/engineering/eng.breakdown-subtasks.md +2 -2
- package/workflows/engineering/eng.build-tech-spec.md +1 -1
- package/workflows/engineering/eng.create-ard-from-code.md +3 -5
- package/workflows/engineering/eng.create-ard.md +3 -5
- package/workflows/engineering/eng.create-rfc.md +5 -5
- package/workflows/engineering/eng.light-arch.md +1 -1
- package/workflows/engineering/eng.plan.md +10 -7
- package/workflows/engineering/eng.pr.md +26 -19
- package/workflows/engineering/eng.pre-pr.md +126 -27
- package/workflows/engineering/eng.spec-consolidate.md +5 -5
- package/workflows/engineering/eng.start.md +23 -9
- package/workflows/engineering/eng.work.md +4 -4
- package/workflows/engineering/qa/eng.qa-release-signoff.md +1 -66
- package/workflows/product/prod.roadmap.preview.md +10 -14
- package/workflows/product/prod.spec.ard.md +2 -2
- package/workflows/product/prod.spec.breakdown.md +2 -2
- package/workflows/product/prod.spec.epic.md +4 -4
- package/workflows/product/prod.spec.frd.md +3 -3
- package/workflows/product/prod.spec.issue.md +3 -3
- package/workflows/product/prod.spec.prd.md +5 -5
- package/bin/commands/qa-signoff.js +0 -115
|
@@ -123,15 +123,15 @@ Após a aprovação do usuário:
|
|
|
123
123
|
1. Atualize a PRD com as alterações relacionadas ao épico
|
|
124
124
|
2. Atualize o arquivo de breakdown (plan) com as alterações relacionadas ao épico
|
|
125
125
|
|
|
126
|
-
## Busca
|
|
126
|
+
## Busca de contexto (`$PROD_DOCS` sempre; Central docs se configurado)
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
Antes de criar o épico (a busca em `$PROD_DOCS` é sempre feita; a consulta ao Central docs só se `CENTRAL_DOCS_STORAGE` estiver definido no ENV.md; vazio, pule só o `jarvis docs sync`):
|
|
129
129
|
|
|
130
|
-
-
|
|
130
|
+
- Se `CENTRAL_DOCS_STORAGE` estiver definido, consultar no Central docs as funcionalidades já implementadas relacionadas (o que existe hoje):
|
|
131
131
|
```bash
|
|
132
132
|
jarvis docs sync --silent
|
|
133
133
|
```
|
|
134
|
-
- Buscar PRD e épicos existentes em `$PROD_DOCS`
|
|
134
|
+
- Buscar PRD e épicos existentes em `$PROD_DOCS`
|
|
135
135
|
- Se encontrar: carregar como contexto e informar o usuário
|
|
136
136
|
- Se não encontrado: continuar com fluxo normal
|
|
137
137
|
|
|
@@ -61,9 +61,9 @@ A FRD não é um épico, história ou task: ela serve como documento de detalham
|
|
|
61
61
|
|
|
62
62
|
---
|
|
63
63
|
|
|
64
|
-
## Busca
|
|
64
|
+
## Busca de contexto (`$PROD_DOCS` sempre; Central docs se configurado)
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
A busca em `$PROD_DOCS` é sempre feita. A consulta ao Central docs (o que já foi implementado) só acontece se `CENTRAL_DOCS_STORAGE` estiver definido no ENV.md; vazio, pule só o `jarvis docs sync`.
|
|
67
67
|
|
|
68
68
|
1. **Buscar PRD correspondente:**
|
|
69
69
|
- Consultar no Central docs as funcionalidades já implementadas relacionadas (o que existe hoje):
|
|
@@ -178,7 +178,7 @@ O sistema deve validar os dados do formulário.
|
|
|
178
178
|
## Instruções
|
|
179
179
|
|
|
180
180
|
- Se o usuário forneceu ou está atuando em um projeto existente, priorize obter informações sobre o projeto a partir de:
|
|
181
|
-
- **Central-docs** (se configurado) -
|
|
181
|
+
- **Central-docs** (se configurado) - funcionalidades já implementadas; o PRD correspondente vem de `$PROD_DOCS`
|
|
182
182
|
- Documentação existente (README, docs/, PRDs, FRDs, ARDs, etc.)
|
|
183
183
|
- Commits recentes para entender o que está sendo desenvolvido
|
|
184
184
|
- Arquivos de AI como CLAUDE.md e AGENTS.md para obter informações estruturadas sobre o contexto do projeto/produto.
|
|
@@ -47,7 +47,7 @@ Um grupo de histórias de um mesmo assunto podem formar um épico.
|
|
|
47
47
|
|
|
48
48
|
| Passo | Skill | Condição |
|
|
49
49
|
|-------|-------|----------|
|
|
50
|
-
| Estrutura da Issue (salvar no `$TASK_MANAGER`) | CLI do vendor (`gh`/`glab issue create`, `acli jira workitem create`) | Se o usuário pedir para salvar no `$TASK_MANAGER` e `TASK_MANAGER`, `TASK_MANAGER_ACCESS` e `TASK_MANAGER_URL_BASE` estiverem no ENV.md, com a CLI logada; freelance, CLI indisponível ou `TASK_MANAGER_ACCESS=manual`: salvar só o markdown local |
|
|
50
|
+
| Estrutura da Issue (salvar no `$TASK_MANAGER`) | CLI do vendor (`gh`/`glab issue create`, `acli jira workitem create`) | Se o usuário pedir para salvar no `$TASK_MANAGER` e `TASK_MANAGER`, `TASK_MANAGER_ACCESS` e `TASK_MANAGER_URL_BASE` estiverem no ENV.md, com a CLI logada, só com o Sim da pergunta (regra de ouro; a pergunta só existe quando o envio vai sair); freelance, CLI indisponível ou `TASK_MANAGER_ACCESS=manual`: salvar só o markdown local |
|
|
51
51
|
|
|
52
52
|
## Resultado Final
|
|
53
53
|
- Siga a estrutura exata do template `$PROD_TEMPLATES/prod-issue-template.md`
|
|
@@ -55,8 +55,8 @@ Um grupo de histórias de um mesmo assunto podem formar um épico.
|
|
|
55
55
|
- O idioma do arquivo deve corresponder ao idioma de interação do usuário
|
|
56
56
|
- Se o usuário não tiver um título claro, crie um título baseado no conteúdo do arquivo e no contexto do épico
|
|
57
57
|
- Uma História ou Task pode ou não ter subtasks. Sugira as subtasks que são as menores partes da issue para guiar o PM ou o Dev na criação dessas histórias ou tasks.
|
|
58
|
-
- Se o usuário pedir para salvar no `$TASK_MANAGER
|
|
59
|
-
- Se `TASK_MANAGER` estiver vazio (freelance), a CLI não estiver disponível ou `TASK_MANAGER_ACCESS=manual`, **não invente board
|
|
58
|
+
- Se o usuário pedir para salvar no `$TASK_MANAGER` e o envio vai sair (leia `TASK_MANAGER`, `TASK_MANAGER_ACCESS` e `TASK_MANAGER_URL_BASE` no ENV.md: board preenchido, CLI do vendor logada e `TASK_MANAGER_ACCESS=cli` ou vazio), mostre o título e o corpo, pergunte com `AskUserQuestion` (regra de ouro, `eng.integrations-rules.md`) e, só com o Sim, abra o card pela CLI oficial do vendor, com o login dela (github: `gh issue create`; gitlab: `glab issue create`; jira: `acli jira workitem create`, conferindo os flags no `--help`), seguindo a cadeia de `rules/engineering/eng.integrations-rules.md`. Nunca peça token.
|
|
59
|
+
- Se `TASK_MANAGER` estiver vazio (freelance), a CLI não estiver disponível ou `TASK_MANAGER_ACCESS=manual`, **não invente board**; não há envio e, portanto, nenhuma pergunta: salve só o markdown local e diga onde ele está.
|
|
60
60
|
|
|
61
61
|
## Estrutura da Issue
|
|
62
62
|
|
|
@@ -37,7 +37,7 @@ Utilize o `$ARGUMENTS` que o usuário passar como ponto de partida e para entend
|
|
|
37
37
|
|
|
38
38
|
| Passo | Skill | Condição |
|
|
39
39
|
|-------|-------|----------|
|
|
40
|
-
| Busca no Central Docs (condicional) | `/jarvis-docs-central` (via `jarvis docs sync --silent`) | Se `CENTRAL_DOCS_STORAGE` estiver definido no ENV.md (iteração
|
|
40
|
+
| Busca no Central Docs (condicional) | `/jarvis-docs-central` (via `jarvis docs sync --silent`) | Se `CENTRAL_DOCS_STORAGE` estiver definido no ENV.md (PRD novo ou iteração; o PRD existente vem de `$PROD_DOCS`) |
|
|
41
41
|
|
|
42
42
|
## Princípios Fundamentais
|
|
43
43
|
1. **Sempre use o template** `$PROD_TEMPLATES/prod-prd-template.md` para o output final
|
|
@@ -46,9 +46,9 @@ Utilize o `$ARGUMENTS` que o usuário passar como ponto de partida e para entend
|
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
49
|
-
## Busca
|
|
49
|
+
## Busca de contexto (`$PROD_DOCS` sempre; Central docs se configurado)
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
A busca em `$PROD_DOCS` é sempre feita. A consulta ao Central docs (o que já foi implementado) só acontece se `CENTRAL_DOCS_STORAGE` estiver definido no ENV.md; vazio, pule só o `jarvis docs sync`.
|
|
52
52
|
|
|
53
53
|
1. **Para iteração de PRD existente:**
|
|
54
54
|
- Consultar no Central docs as funcionalidades já implementadas relacionadas (o que existe hoje):
|
|
@@ -68,7 +68,7 @@ Se `CENTRAL_DOCS_STORAGE` definido no ENV.md:
|
|
|
68
68
|
- Continuar com fluxo normal
|
|
69
69
|
|
|
70
70
|
2. **Para PRD novo:**
|
|
71
|
-
- Pular busca
|
|
71
|
+
- Pular a busca de PRD existente (a consulta ao Central docs, se configurado, continua)
|
|
72
72
|
- Continuar com criação normal
|
|
73
73
|
|
|
74
74
|
## Fluxo de Trabalho
|
|
@@ -165,7 +165,7 @@ Quais métricas? A) Engajamento B) Receita C) Outro
|
|
|
165
165
|
## Instruções
|
|
166
166
|
|
|
167
167
|
- Se o usuário forneceu ou está atuando em um projeto existente, priorize obter informações sobre o projeto a partir de:
|
|
168
|
-
- **Central-docs** (se configurado) -
|
|
168
|
+
- **Central-docs** (se configurado) - funcionalidades já implementadas; os PRDs existentes vêm de `$PROD_DOCS`
|
|
169
169
|
- Documentação existente (README, docs/, PRDs, FRDs, ARDs, etc.)
|
|
170
170
|
- Commits recentes para entender o que está sendo desenvolvido
|
|
171
171
|
- Arquivos de AI como CLAUDE.md e AGENTS.md para obter informações estruturadas sobre o contexto do projeto/produto.
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { loadEnv, resolveEnvPath } from "../lib/env-loader.js";
|
|
4
|
-
import { extractFrontmatterBlock } from "../lib/utils/frontmatter.js";
|
|
5
|
-
import { GREEN, RED, YELLOW, DIM, NC } from "../lib/utils/ui.js";
|
|
6
|
-
import { logger } from "../lib/utils/logger.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Verifica se existe um sign-off QA válido para a branch atual (ou informada).
|
|
10
|
-
* Retorna 0 (válido) ou 1 (inválido/ausente) — usado pelo CI.
|
|
11
|
-
*
|
|
12
|
-
* @param {Object} flags
|
|
13
|
-
* @param {string} flags.branch - Branch a verificar (padrão: lido do git)
|
|
14
|
-
* @param {string} flags['max-age'] - Validade máxima em horas (padrão: 24)
|
|
15
|
-
*/
|
|
16
|
-
export async function qaSignoff(flags = {}) {
|
|
17
|
-
const cwd = process.cwd();
|
|
18
|
-
const maxAgeHours = parseInt(flags["max-age"] ?? "24", 10);
|
|
19
|
-
|
|
20
|
-
// Resolver branch
|
|
21
|
-
let branch = flags.branch;
|
|
22
|
-
if (!branch) {
|
|
23
|
-
try {
|
|
24
|
-
const { execSync } = await import("node:child_process");
|
|
25
|
-
branch = execSync("git branch --show-current", { cwd, encoding: "utf-8" }).trim();
|
|
26
|
-
} catch {
|
|
27
|
-
logger.error(`${RED}❌ Não foi possível detectar a branch atual.${NC}`);
|
|
28
|
-
logger.info(`${YELLOW}Passe a branch via --branch <nome>${NC}`);
|
|
29
|
-
process.exit(1);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (!branch) {
|
|
34
|
-
logger.error(`${RED}❌ Branch não identificada.${NC}`);
|
|
35
|
-
process.exit(1);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Carregar ENV.md para descobrir DOCS_FOLDER
|
|
39
|
-
let docsFolder = "docs";
|
|
40
|
-
try {
|
|
41
|
-
const resolved = resolveEnvPath(cwd, flags);
|
|
42
|
-
const env = loadEnv(cwd, resolved.path);
|
|
43
|
-
if (env.DOCS_FOLDER) docsFolder = env.DOCS_FOLDER;
|
|
44
|
-
} catch {
|
|
45
|
-
// Se não encontrar ENV.md, usa default
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const signoffsDir = join(cwd, docsFolder, "engineering", "qa", "signoffs");
|
|
49
|
-
|
|
50
|
-
if (!existsSync(signoffsDir)) {
|
|
51
|
-
logger.error(`${RED}❌ Nenhum sign-off QA encontrado para a branch: ${branch}${NC}`);
|
|
52
|
-
logger.info(`${YELLOW}Execute o workflow qa.release-signoff antes do deploy.${NC}`);
|
|
53
|
-
process.exit(1);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Normalizar slug da branch para busca nos nomes de arquivo
|
|
57
|
-
const branchSlug = branch.replace(/\//g, "-").replace(/[^a-zA-Z0-9-_]/g, "-");
|
|
58
|
-
|
|
59
|
-
// Buscar arquivos de sign-off que correspondam à branch
|
|
60
|
-
const files = readdirSync(signoffsDir)
|
|
61
|
-
.filter((f) => f.endsWith(".md") && f.includes(branchSlug))
|
|
62
|
-
.sort()
|
|
63
|
-
.reverse(); // mais recente primeiro
|
|
64
|
-
|
|
65
|
-
if (files.length === 0) {
|
|
66
|
-
logger.error(`${RED}❌ Nenhum sign-off QA encontrado para a branch: ${branch}${NC}`);
|
|
67
|
-
logger.info(`${YELLOW}Execute o workflow qa.release-signoff antes do deploy.${NC}`);
|
|
68
|
-
process.exit(1);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Ler o sign-off mais recente
|
|
72
|
-
const latestFile = files[0];
|
|
73
|
-
const filePath = join(signoffsDir, latestFile);
|
|
74
|
-
const content = readFileSync(filePath, "utf-8");
|
|
75
|
-
|
|
76
|
-
// Extrair frontmatter
|
|
77
|
-
const frontmatter = extractFrontmatterBlock(content);
|
|
78
|
-
if (frontmatter === null) {
|
|
79
|
-
logger.error(`${RED}❌ Sign-off inválido: frontmatter ausente em ${latestFile}${NC}`);
|
|
80
|
-
process.exit(1);
|
|
81
|
-
}
|
|
82
|
-
const statusMatch = frontmatter.match(/^status:\s*(.+)$/m);
|
|
83
|
-
const dateMatch = frontmatter.match(/^date:\s*(.+)$/m);
|
|
84
|
-
|
|
85
|
-
const status = statusMatch?.[1]?.trim().replace(/['"]/g, "") ?? "";
|
|
86
|
-
const dateStr = dateMatch?.[1]?.trim().replace(/['"]/g, "") ?? "";
|
|
87
|
-
|
|
88
|
-
// Verificar status
|
|
89
|
-
if (status.toUpperCase() !== "GO") {
|
|
90
|
-
logger.error(`${RED}❌ Sign-off com status ${status} — deploy bloqueado.${NC}`);
|
|
91
|
-
logger.info(`${DIM}Arquivo: ${latestFile}${NC}`);
|
|
92
|
-
process.exit(1);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// Verificar validade (max-age)
|
|
96
|
-
if (dateStr) {
|
|
97
|
-
const signoffDate = new Date(dateStr);
|
|
98
|
-
const now = new Date();
|
|
99
|
-
const ageHours = (now - signoffDate) / (1000 * 60 * 60);
|
|
100
|
-
|
|
101
|
-
if (ageHours > maxAgeHours) {
|
|
102
|
-
logger.error(
|
|
103
|
-
`${RED}❌ Sign-off expirado: criado há ${Math.round(ageHours)}h (máximo: ${maxAgeHours}h).${NC}`
|
|
104
|
-
);
|
|
105
|
-
logger.info(`${YELLOW}Execute qa.release-signoff novamente antes do deploy.${NC}`);
|
|
106
|
-
process.exit(1);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
logger.info(`${GREEN}✅ Sign-off QA válido para branch: ${branch}${NC}`);
|
|
111
|
-
logger.info(
|
|
112
|
-
`${DIM}Arquivo: ${latestFile} | Status: GO | Válido por mais ${Math.round(maxAgeHours - (new Date() - new Date(dateStr)) / (1000 * 60 * 60))}h${NC}`
|
|
113
|
-
);
|
|
114
|
-
process.exit(0);
|
|
115
|
-
}
|