create-agentic-pdlc 2.0.6 → 2.1.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/adapters/claude-code/skill.md +28 -12
- package/bin/cli.js +12 -4
- package/package.json +1 -1
|
@@ -19,21 +19,37 @@ Specifically, check for:
|
|
|
19
19
|
- `.github/workflows/pdlc-health-check.yml`
|
|
20
20
|
|
|
21
21
|
If any of these files are missing, you are in **Setup Mode**. Do not proceed with feature requests until setup is complete.
|
|
22
|
+
|
|
22
23
|
1. **Language Detection:** Analyze the user's previous prompts and preferred language. Conduct this entire Setup Mode and ask all your interactive questions in that same language.
|
|
23
24
|
2. Acknowledge that the framework is not yet set up.
|
|
24
|
-
3.
|
|
25
|
-
-
|
|
26
|
-
-
|
|
25
|
+
3. **Pre-filled Context:** Before asking any questions, read the following files if they exist:
|
|
26
|
+
- `.agentic-pdlc/cli-context.json` — written by the CLI. Contains `projectName`, `repoOwner`, `repoName`. Use these values directly and skip the corresponding questions.
|
|
27
|
+
- `.agentic-pdlc/templates/docs/pdlc.md` — the CLI pre-fills PROJECT_ID, STATUS_FIELD_ID, REPO_OWNER, REPO_NAME, and all 9 column option IDs. If none of the values still contain `{{...}}` placeholders, skip the entire Board IDs question group.
|
|
28
|
+
4. Interactively ask the user only for the **missing values**, **one group at a time**:
|
|
29
|
+
- **Project basics:** Project Name (skip if present in `cli-context.json`), Description, Technical Stack/Structure. **Do not ask for GitHub Username** — use `repoOwner` from `cli-context.json` directly for CODEOWNERS.
|
|
30
|
+
- **Commands:** In the user's detected language, ask for each command with its purpose and concrete examples:
|
|
31
|
+
- **Test command** — the command that runs automated tests (e.g. `npm test`, `pytest`, `go test ./...`, `./gradlew test`) — reply "none" if not applicable.
|
|
32
|
+
- **Lint command** — the command that checks code quality/style (e.g. `npm run lint`, `ruff check .`, `eslint .`, `golangci-lint run`) — reply "none" if not applicable.
|
|
33
|
+
- **Build command** — the command that compiles or bundles the project (e.g. `npm run build`, `tsc`, `go build ./...`, `./gradlew build`) — reply "none" if not applicable.
|
|
27
34
|
- **Invariants:** Critical business rules agents must never violate (e.g. Human-in-the-loop).
|
|
28
|
-
- **Board IDs:**
|
|
29
|
-
- **
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
- **Board IDs:** Skip entirely if `.agentic-pdlc/templates/docs/pdlc.md` is already pre-filled (no `{{...}}` placeholders). Only ask if placeholders remain.
|
|
36
|
+
- **Auditoria de Arquitetura (CI):** Pergunta: *"Seu projeto usa auditoria automatizada de arquitetura (CI job que cria issues com a label `architecture-violation`)?"* Apresente as opções:
|
|
37
|
+
- a) **Não uso, mas quero configurar** — *Deixa o pipeline CI/CD mais robusto via Gemini Code Assist.* → Guia o usuário na configuração.
|
|
38
|
+
- b) **Não agora** — *Deixa comentado para ativar em outro momento.* → Job permanece comentado no `project-automation.yml`.
|
|
39
|
+
- c) **Sim, ativar** — *Descomenta o job `move-violation-to-board` no `project-automation.yml`.* → Ativa imediatamente.
|
|
40
|
+
- **QA Agent:** Pergunta: *"Quer usar um agente de QA para verificar os PRs automaticamente antes do Code Review?"* Apresente as opções:
|
|
41
|
+
- a) **Não (Variant A)** — *PRs vão direto para Code Review. Padrão e mais simples.*
|
|
42
|
+
- b) **Sim (Variant B), mas preciso de ajuda pra configurar** — *PRs passam por um Agente de QA antes de serem revisados. Requer um QA Agent (ex: QAWolf).* → Guia o usuário na configuração.
|
|
43
|
+
- c) **Sim (Variant B), já tenho configurado** — *PRs passam por um Agente de QA antes de serem revisados.* → Ativa Variant B imediatamente: muda `STATUS_CODE_REVIEW_PR` para `STATUS_TESTING` no job `move-card-on-pr-open` e descomenta o job `move-card-on-qa-pass` no `project-automation.yml`.
|
|
44
|
+
- **Agente de implementação:** Pergunta: *"Usa um agente de implementação autônomo? (Ele implementa as features que você aprova para desenvolvimento)"* Apresente as opções:
|
|
45
|
+
- a) **Não** — *Sem agente de implementação autônomo.*
|
|
46
|
+
- b) **@google-labs-jules** — *Jules (recomendado caso não tenha nenhum).*
|
|
47
|
+
- c) **Outro** — *Digite o handle do agente.*
|
|
48
|
+
5. Generate and write the missing files replacing the `{{SCREAMING_SNAKE_CASE}}` placeholders using the templates in `.agentic-pdlc/templates/`.
|
|
49
|
+
6. Offer to run the `gh` commands for labels (`spec:approved`, `pr:in-review`, `pr:approved`, `architecture-violation`).
|
|
50
|
+
7. **IMPORTANTE:** Delete this setup prompt file (`.agentic-setup.md`, `.agentic-setup-prompt.md`, or `.agentic-pdlc/SETUP_PROMPT.md`) using only `rm <arquivo>` — **do NOT run `git add` or any other git command**. This file was never committed and does not exist in the git index. Delete it **before** the commit step so it is never accidentally included in the repository history.
|
|
51
|
+
8. Commit everything with the message: `chore: setup agentic-pdlc framework`.
|
|
52
|
+
9. Conclude Setup Mode.
|
|
37
53
|
|
|
38
54
|
---
|
|
39
55
|
|
package/bin/cli.js
CHANGED
|
@@ -297,10 +297,10 @@ async function runSetup() {
|
|
|
297
297
|
if (fs.existsSync(pdlcDest)) {
|
|
298
298
|
let pdlcContent = fs.readFileSync(pdlcDest, 'utf8');
|
|
299
299
|
|
|
300
|
-
if (projectId) pdlcContent = pdlcContent.replace(
|
|
301
|
-
if (statusFieldId) pdlcContent = pdlcContent.replace(
|
|
302
|
-
pdlcContent = pdlcContent.replace(
|
|
303
|
-
pdlcContent = pdlcContent.replace(
|
|
300
|
+
if (projectId) pdlcContent = pdlcContent.replace(/\{\{PROJECT_ID\}\}/g, () => projectId);
|
|
301
|
+
if (statusFieldId) pdlcContent = pdlcContent.replace(/\{\{STATUS_FIELD_ID\}\}/g, () => statusFieldId);
|
|
302
|
+
pdlcContent = pdlcContent.replace(/\{\{REPO_OWNER\}\}/g, () => repoOwner);
|
|
303
|
+
pdlcContent = pdlcContent.replace(/\{\{REPO_NAME\}\}/g, () => repoName);
|
|
304
304
|
|
|
305
305
|
if (Object.keys(optionMap).length > 0) {
|
|
306
306
|
pdlcContent = pdlcContent.replace(/\{\{ID_IDEA\}\}/g, optionMap["💡 Idea"] || 'MISSING_ID');
|
|
@@ -319,6 +319,14 @@ async function runSetup() {
|
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
+
// Write CLI context for the agent to consume in Setup Mode
|
|
323
|
+
try {
|
|
324
|
+
const cliContextPath = path.join(targetDir, '.agentic-pdlc', 'cli-context.json');
|
|
325
|
+
fs.writeFileSync(cliContextPath, JSON.stringify({ projectName, repoOwner, repoName }, null, 2));
|
|
326
|
+
} catch (err) {
|
|
327
|
+
// Non-fatal — agent will ask for the values instead
|
|
328
|
+
}
|
|
329
|
+
|
|
322
330
|
// Handle the specific setup instructions target
|
|
323
331
|
const claudeSetupSrc = path.join(sourceDir, 'adapters', 'claude-code', 'skill.md');
|
|
324
332
|
const cursorSetupSrc = path.join(sourceDir, 'adapters', 'cursor', 'rules.md');
|