dev-booster 1.11.0 → 1.12.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 +20 -13
- package/package.json +2 -2
- package/src/index.js +289 -192
- package/template/.devbooster/MANIFEST.md +23 -15
- package/template/.devbooster/boosters/advisor.md +7 -4
- package/template/.devbooster/boosters/code-audit.md +10 -7
- package/template/.devbooster/boosters/coder.md +1 -1
- package/template/.devbooster/boosters/context.md +9 -3
- package/template/.devbooster/boosters/debug.md +7 -4
- package/template/.devbooster/boosters/deploy.md +7 -4
- package/template/.devbooster/boosters/diff-review.md +199 -0
- package/template/.devbooster/boosters/discovery.md +7 -4
- package/template/.devbooster/boosters/global-documentation.md +7 -1
- package/template/.devbooster/boosters/implementation.md +9 -3
- package/template/.devbooster/boosters/internal-documentation.md +8 -2
- package/template/.devbooster/boosters/investigation.md +7 -4
- package/template/.devbooster/boosters/planning.md +7 -4
- package/template/.devbooster/boosters/save-context.md +106 -0
- package/template/.devbooster/boosters/security.md +7 -4
- package/template/.devbooster/hub/scripts/doctor_parser.py +5 -5
- package/template/.devbooster/rules/GUIDE.md +3 -0
- package/template/.devbooster/rules/PROTOCOL.md +1 -1
- package/template/.devbooster/rules/TRIGGERS.md +5 -3
- package/src/sync-template.js +0 -55
|
@@ -57,9 +57,12 @@ Rules:
|
|
|
57
57
|
- `.devbooster/hub/skills/vulnerability-scanner/SKILL.md`
|
|
58
58
|
- `.devbooster/hub/skills/red-team-tactics/SKILL.md`
|
|
59
59
|
|
|
60
|
-
## ARTIFACT GENERATION
|
|
61
|
-
During your execution,
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
## ARTIFACT GENERATION
|
|
61
|
+
During your execution, create a state file at `@booster-generated/security/<slug>.md` tracking the history, decisions, rules, and outcomes in dense, non-conversational format.
|
|
62
|
+
|
|
63
|
+
- **Uniqueness rule:** If the slug already exists in `@booster-generated/security/`, generate a new variation of the name instead of overwriting
|
|
64
|
+
- **Notification rule:** After writing, notify the user with: 📝 Registo em `@booster-generated/security/<slug>.md`
|
|
65
|
+
|
|
66
|
+
Do NOT update this file silently in the background.
|
|
64
67
|
|
|
65
68
|
**Reply:** On activation only, use the armed-mode banner above. On the first real task, load the minimum required security context based on the user's pain, then execute.
|
|
@@ -26,7 +26,7 @@ def parse_diagnostics(file_path):
|
|
|
26
26
|
|
|
27
27
|
# Categorias consideradas essenciais para o funcionamento/performance
|
|
28
28
|
CRITICAL_CATEGORIES = {"Correctness", "Performance", "Security", "Next.js", "Bundle Size"}
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
# Regras que são puramente estéticas/opcionais (mesmo que caiam em Architecture)
|
|
31
31
|
COSMETIC_RULES_PREFIXES = ("design-", "no-pure-black-")
|
|
32
32
|
|
|
@@ -37,7 +37,7 @@ def parse_diagnostics(file_path):
|
|
|
37
37
|
rule = diag.get('rule', 'unknown')
|
|
38
38
|
category = diag.get('category', 'Unknown')
|
|
39
39
|
severity = diag.get('severity', 'warning')
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
is_cosmetic = any(rule.startswith(prefix) for prefix in COSMETIC_RULES_PREFIXES)
|
|
42
42
|
|
|
43
43
|
# Se for error de verdade ou uma categoria crítica (e não for puramente cosmético)
|
|
@@ -49,7 +49,7 @@ def parse_diagnostics(file_path):
|
|
|
49
49
|
cosmetic_counts[rule] += 1
|
|
50
50
|
|
|
51
51
|
# === GERAÇÃO DO RELATÓRIO MOLDADO ===
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
print("### 🔴 AÇÃO IMEDIATA (Erros Críticos)")
|
|
54
54
|
if not critical_items:
|
|
55
55
|
print("Nenhum erro crítico de performance ou lógica encontrado nas alterações.\n")
|
|
@@ -69,9 +69,9 @@ def parse_diagnostics(file_path):
|
|
|
69
69
|
else:
|
|
70
70
|
for rule, count in sorted(cosmetic_counts.items(), key=lambda x: x[1], reverse=True):
|
|
71
71
|
print(f"- `{rule}`: {count} ocorrência(s)")
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
print("\n*Rodapé: Conteúdo extraído do relatório gerado diagnostics.json*")
|
|
74
74
|
|
|
75
75
|
if __name__ == "__main__":
|
|
76
|
-
target_file = sys.argv[1] if len(sys.argv) > 1 else "@booster-generated/diagnostics
|
|
76
|
+
target_file = sys.argv[1] if len(sys.argv) > 1 else "@booster-generated/code-audit/diagnostics-review.json"
|
|
77
77
|
parse_diagnostics(target_file)
|
|
@@ -34,6 +34,8 @@ It has been formatted as a code block to facilitate direct reading in the IDE.
|
|
|
34
34
|
ideas, writing code only under command.
|
|
35
35
|
• builder.md -> Builder Specialist. Executes implementation plans and writes
|
|
36
36
|
actual code surgically.
|
|
37
|
+
• save-context.md -> Save Context. Compacta toda a conversa em YAML para continuar
|
|
38
|
+
em um novo chat sem perda de contexto.
|
|
37
39
|
|
|
38
40
|
---
|
|
39
41
|
|
|
@@ -53,6 +55,7 @@ It has been formatted as a code block to facilitate direct reading in the IDE.
|
|
|
53
55
|
[ 🐞 FIX & QUALITY ]
|
|
54
56
|
|
|
55
57
|
• debug.md -> Root Cause Analysis. Uses a hypothesis engine to systematically investigate bugs.
|
|
58
|
+
• diff-review.md -> Diff Review. Analisa o diff como um dev sênior revisando PR — naming, padrões do projeto, complexidade e boas práticas.
|
|
56
59
|
• code-audit.md -> Code Audit. Strict inspector for syntax, typing,
|
|
57
60
|
and diagnostics (React Doctor) pre-PR.
|
|
58
61
|
• testing.md -> Test Strategist. Defines coverage strategy (Unit, E2E)
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
- **Logs, Code, Comments, Variables:** English, unless the project explicitly requires another convention.
|
|
36
36
|
|
|
37
37
|
## 📚 5. PERSISTENCE & SHORTCUTS (TRIGGERS)
|
|
38
|
-
- **TRIGGER ROUTING:** Whenever the user references a `@` trigger (e.g., `@Coder`, `@
|
|
38
|
+
- **TRIGGER ROUTING:** Whenever the user references a `@` trigger (e.g., `@Coder`, `@SaveContext`, `@SavePattern`), you MUST refer specifically to `.devbooster/rules/TRIGGERS.md` to identify the trigger's contract, load the corresponding files, and execute the behavior mode or background action.
|
|
39
39
|
- **RESTRICTION:** Execute code edits, file writes, or log updates ONLY when explicitly instructed by the trigger contract or a direct user command.
|
|
40
40
|
|
|
41
41
|
---
|
|
@@ -12,9 +12,10 @@ These triggers execute background utility tasks and update persistent rule or st
|
|
|
12
12
|
- **Action:** Extract newly resolved technical patterns or rules from the conversation.
|
|
13
13
|
- **Destination:** Append/Update in `.devbooster/rules/USER_PREFERENCES.md` (Technical English).
|
|
14
14
|
|
|
15
|
-
- **`@
|
|
16
|
-
- **Action:**
|
|
17
|
-
- **Destination:**
|
|
15
|
+
- **`@SaveContext`**
|
|
16
|
+
- **Action:** Compact the entire conversation into a YAML snapshot for chat continuity.
|
|
17
|
+
- **Destination:** `@booster-generated/saved-context/context-<slug>.yaml`
|
|
18
|
+
- **Trigger behavior:** Ativates `.devbooster/boosters/save-context.md` and follows its execution protocol.
|
|
18
19
|
|
|
19
20
|
- **`@LogTask`**
|
|
20
21
|
- **Action:** Capture pending tasks mentioned in the chat.
|
|
@@ -37,6 +38,7 @@ These triggers instantly activate specific booster behavior contracts without re
|
|
|
37
38
|
- **`@Implementation`** ➔ Activates `.devbooster/boosters/implementation.md` (Sizing and plan writing).
|
|
38
39
|
- **`@Atomic`** ➔ Activates `.devbooster/boosters/atomic.md` (Surgical step-by-step code writing).
|
|
39
40
|
- **`@Review`** ➔ Activates `.devbooster/boosters/review.md` (Elite code and architecture audit).
|
|
41
|
+
- **`@ReviewDiff`** ➔ Activates `.devbooster/boosters/diff-review.md` (Pre-PR code review with project standards).
|
|
40
42
|
- **`@Advisor`** ➔ Activates `.devbooster/boosters/advisor.md` (Kit GPS / routing consultant).
|
|
41
43
|
- **`@Changelog`** ➔ Activates `.devbooster/boosters/changelog.md` (Release notes generator).
|
|
42
44
|
- **`@Debug`** ➔ Activates `.devbooster/boosters/debug.md` (Systematic RCA / hypothesis engine).
|
package/src/sync-template.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import fs from 'fs'
|
|
2
|
-
import path from 'path'
|
|
3
|
-
import { fileURLToPath } from 'url'
|
|
4
|
-
|
|
5
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
6
|
-
const ROOT_DIR = path.resolve(__dirname, '..')
|
|
7
|
-
const SOURCE_DIR = path.join(ROOT_DIR, '.devbooster')
|
|
8
|
-
const TEMPLATE_DIR = path.join(ROOT_DIR, 'template')
|
|
9
|
-
const TEMPLATE_KIT_DIR = path.join(TEMPLATE_DIR, '.devbooster')
|
|
10
|
-
const INIT_FILE = 'DEVBOOSTER_INIT.md'
|
|
11
|
-
|
|
12
|
-
function copyDir(src, dest) {
|
|
13
|
-
fs.mkdirSync(dest, { recursive: true })
|
|
14
|
-
|
|
15
|
-
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
16
|
-
if (entry.name === '.DS_Store') continue
|
|
17
|
-
|
|
18
|
-
const srcPath = path.join(src, entry.name)
|
|
19
|
-
const destPath = path.join(dest, entry.name)
|
|
20
|
-
|
|
21
|
-
if (entry.isDirectory()) {
|
|
22
|
-
copyDir(srcPath, destPath)
|
|
23
|
-
} else {
|
|
24
|
-
fs.copyFileSync(srcPath, destPath)
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function ensureExists(targetPath, label) {
|
|
30
|
-
if (!fs.existsSync(targetPath)) {
|
|
31
|
-
throw new Error(`${label} not found: ${targetPath}`)
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function run() {
|
|
36
|
-
ensureExists(SOURCE_DIR, 'Source kit')
|
|
37
|
-
ensureExists(path.join(ROOT_DIR, INIT_FILE), 'Root init file')
|
|
38
|
-
|
|
39
|
-
fs.mkdirSync(TEMPLATE_DIR, { recursive: true })
|
|
40
|
-
fs.rmSync(TEMPLATE_KIT_DIR, { recursive: true, force: true })
|
|
41
|
-
copyDir(SOURCE_DIR, TEMPLATE_KIT_DIR)
|
|
42
|
-
fs.copyFileSync(path.join(ROOT_DIR, INIT_FILE), path.join(TEMPLATE_DIR, INIT_FILE))
|
|
43
|
-
|
|
44
|
-
console.log('╭──────────────────────────────────────────────╮')
|
|
45
|
-
console.log('│ DEV BOOSTER TEMPLATE SYNC │')
|
|
46
|
-
console.log('╰──────────────────────────────────────────────╯')
|
|
47
|
-
console.log('')
|
|
48
|
-
console.log('▸ origem: .devbooster/')
|
|
49
|
-
console.log('▸ destino: template/.devbooster/')
|
|
50
|
-
console.log(`▸ init: template/${INIT_FILE}`)
|
|
51
|
-
console.log('')
|
|
52
|
-
console.log('status: sync concluido com sucesso')
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
run()
|