create-agentic-pdlc 2.0.5 β†’ 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.
@@ -0,0 +1,105 @@
1
+ # PDLC β€” {{PROJECT_NAME}}
2
+
3
+ ## Board Columns
4
+
5
+ | Column | Meaning | Who moves the card |
6
+ |---|---|---|
7
+ | πŸ’‘ Idea | Backlog β€” every new issue lands here | Manual |
8
+ | πŸ” Exploration | Claude is analyzing code and context | Label `stage:exploration` |
9
+ | 🧠 Brainstorming | Claude proposed approaches, awaiting PM gate | Label `stage:brainstorming` |
10
+ | πŸ“ Detail Solution | Claude is writing the technical spec | Label `stage:detailing` |
11
+ | βœ… Approval | Spec ready, awaiting `spec:approved` label | Label `spec:approved` |
12
+ | βš™οΈ Development | Agent implementing the spec | Label `stage:development` |
13
+ | πŸ§ͺ Testing | CI pipeline or AI QA Agent running (Variant B) | GitHub Actions / QA Agent |
14
+ | πŸ‘ Code Review / PR | PR opened (Variant A) or QA passed (Variant B) | GitHub Actions |
15
+ | πŸš€ Ready for Production | Merged | GitHub Actions |
16
+
17
+ <!--
18
+ Adapt columns as needed. The functional baseline is:
19
+ πŸ’‘ Idea β†’ βš™οΈ Development β†’ πŸ‘ Code Review / PR β†’ πŸš€ Ready for Production
20
+ -->
21
+
22
+ ## Workflow Variants (QA Agent)
23
+
24
+ - **Variant A (Default):** PRs bypass the `Testing` column and land directly in `Code Review / PR`.
25
+ - **Variant B (QA Agent Enabled):** PRs land in the `Testing` column first. An AI QA agent verifies the PR, adding `qa:pass` or `qa:fail`. Only after a `qa:pass` is the issue moved to `Code Review / PR`.
26
+
27
+ ## Board Identifiers (GitHub Projects)
28
+
29
+ ```
30
+ PROJECT_ID = {{PROJECT_ID}}
31
+ STATUS_FIELD = {{STATUS_FIELD_ID}}
32
+ REPO = {{REPO_OWNER}}/{{REPO_NAME}}
33
+ ```
34
+
35
+ ## Column Option IDs
36
+
37
+ | Column | Option ID |
38
+ |---|---|
39
+ | πŸ’‘ Idea | `{{ID_IDEA}}` |
40
+ | πŸ” Exploration | `{{ID_EXPLORATION}}` |
41
+ | 🧠 Brainstorming | `{{ID_BRAINSTORMING}}` |
42
+ | πŸ“ Detail Solution | `{{ID_DETAIL}}` |
43
+ | βœ… Approval | `{{ID_APPROVAL}}` |
44
+ | βš™οΈ Development | `{{ID_DEVELOPMENT}}` |
45
+ | πŸ§ͺ Testing | `{{ID_TESTING}}` |
46
+ | πŸ‘ Code Review / PR | `{{ID_CODE_REVIEW_PR}}` |
47
+ | πŸš€ Ready for Production | `{{ID_READY_FOR_PRODUCTION}}` |
48
+
49
+ ## Agent Γ— Phase Mapping
50
+
51
+ | Phase | Responsible |
52
+ |---|---|
53
+ | πŸ’‘ β†’ πŸ“ (upstream) | Claude (or ideation agent) in conversational session |
54
+ | βš™οΈ β†’ πŸ”€ (downstream) | {{IMPLEMENTATION_AGENT}} (e.g. Jules `@google-labs-jules`) |
55
+ | πŸ‘ Code Review / PR | Human (you) |
56
+ | Automatic transitions | GitHub Actions |
57
+
58
+ ## Issue Title Conventions
59
+
60
+ ```
61
+ [icon] [PREFIX]: [short description, imperative tense]
62
+
63
+ πŸ‘€ US: user story
64
+ πŸ› BUG: bug
65
+ πŸ”§ TASK: operational task
66
+ πŸ”¬ SPIKE: exploration/evaluation spike
67
+ ```
68
+
69
+ ## Labels
70
+
71
+ | Label | Entity | Color | Meaning |
72
+ |---|---|---|---|
73
+ | `stage:exploration` | Issue | Purple | Issue is being evaluated |
74
+ | `stage:brainstorming` | Issue | Pink | Proposed approaches awaiting PM gate |
75
+ | `stage:detailing` | Issue | Blue | Technical spec is being written |
76
+ | `stage:development` | Issue | Orange | Agent is implementing the spec |
77
+ | `spec:approved` | Issue | Green | Gate 2 β€” agent is cleared to implement |
78
+ | `pr:in-review` | PR | Yellow | Awaiting code review |
79
+ | `pr:approved` | PR | Green | Code review approved |
80
+
81
+ ## Approval Gates
82
+
83
+ **Gate 1 β€” PM/Ideation (Brainstorming):**
84
+ You comment on the issue approving one of the approaches proposed by the ideation agent.
85
+ Format: *"Approved β€” proceed with option X."*
86
+
87
+ **Gate 2 β€” Tech Lead (Spec):**
88
+ You add the `spec:approved` label to the issue after reviewing the technical spec in the body.
89
+ This triggers the implementation agent via `agent-trigger.yml`.
90
+
91
+ ## Shortcuts by Type
92
+
93
+ - **BUG** β€” Skips Brainstorming; enters Detail Solution with diagnostics + fix.
94
+ - **TASK** β€” Skips Brainstorming; enters Detail Solution with operational steps.
95
+ - **SPIKE** β€” Never reaches Development; delivery is a concluding comment.
96
+ - **US** β€” Full flow observing both gates.
97
+
98
+ ## Definition of Done
99
+
100
+ An issue is truly done when:
101
+ - [ ] All Acceptance Criteria described in the body are implemented
102
+ - [ ] Tests passing: `{{TEST_COMMAND}}`
103
+ - [ ] No invariant violations (CI green)
104
+ - [ ] Associated PR explicitly contains `Closes #N`
105
+ - [ ] Basic manual smoke test executed after deploy (when applicable)
@@ -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. Interactively ask the user for required values **one group at a time**:
25
- - **Project basics:** Project Name, Description, Technical Stack (Structure), and GitHub Username (for CODEOWNERS security).
26
- - **Commands:** Test command, Lint command, Build command.
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:** PROJECT_ID, STATUS_FIELD_ID, column option IDs (provide standard PDLC options: Idea, Exploration, Brainstorming, Detail Solution, Approval, Development, Testing, Code Review / PR, Production). Allow user to answer "skip", which means you leave the placeholders intact.
29
- - **Architecture Violation:** Ask "Does your project use an automated architecture auditing tool (e.g., a CI job that creates issues with an `architecture-violation` label)?". If yes, uncomment the `move-violation-to-board` job inside `project-automation.yml`. If no, ask if they would like help implementing one, reminding them that it significantly improves their agentic development process. If they decline, you can leave the job commented out.
30
- - **QA Agent (Variant B):** Ask "Do you plan to use an AI QA Agent (e.g. QAWolf or a secondary script) to verify your PRs before Code Review?". If yes, explain you will adopt Variant B: you will change `STATUS_CODE_REVIEW_PR` to `STATUS_TESTING` inside the `move-card-on-pr-open` job in `project-automation.yml` and uncomment the `move-card-on-qa-pass` job. If no, leave the workflow as Variant A (default) and delete the optional `.github/workflows/qa-agent.yml` template.
31
- - **Implementation agent handle:** e.g., `@google-labs-jules`, or "none".
32
- 3. Generate and write the missing files replacing the `{{SCREAMING_SNAKE_CASE}}` placeholders using the templates logic you know (usually they reside in standard Agentic PDLC templates).
33
- 4. Offer to run the `gh` commands for labels (`spec:approved`, `pr:in-review`, `pr:approved`, `architecture-violation`).
34
- 5. Commit everything with the message: `chore: setup agentic-pdlc framework`.
35
- 6. **IMPORTANT:** Delete this setup prompt file (e.g., `.agentic-setup.md`, `.agentic-setup-prompt.md`, or `.agentic-pdlc/SETUP_PROMPT.md`) from the root or `.agentic-pdlc/` directory to clean up the workspace.
36
- 7. Conclude Setup Mode.
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
@@ -51,6 +51,8 @@ const i18n = {
51
51
  creating_project: t('[2/2] Creating Project V2 Board...', '[2/2] Criando Project V2 Board...', '[2/2] Creando Project V2 Board...'),
52
52
  project_ok: t('βœ… Project created (ID: ', 'βœ… Projeto criado (ID: ', 'βœ… Proyecto creado (ID: '),
53
53
  project_err: t('❌ Failed to create project. Error: ', '❌ Falha ao criar o projeto. Erro: ', '❌ Fallo al crear el proyecto. Error: '),
54
+ link_project_ok: t('βœ… Project linked to repository.', 'βœ… Projeto vinculado ao repositΓ³rio.', 'βœ… Proyecto vinculado al repositorio.'),
55
+ link_project_warn: t('⚠️ Failed to link project to repository. Link it manually in GitHub Projects settings.', '⚠️ Falha ao vincular projeto ao repositório. Faça isso manualmente nas configuraçáes do GitHub Projects.', '⚠️ Fallo al vincular el proyecto al repositorio. Hazlo manualmente en la configuración de GitHub Projects.'),
54
56
  config_columns: t('Configuring Project Columns...', 'Configurando colunas do Projeto...', 'Configurando columnas del Proyecto...'),
55
57
  columns_ok: t('βœ… Project columns configured successfully.', 'βœ… Colunas do projeto configuradas com sucesso.', 'βœ… Columnas del proyecto configuradas con Γ©xito.'),
56
58
  columns_warn: t('⚠️ Failed to configure project columns. You may need to add them manually.', '⚠️ Falha ao configurar colunas. VocΓͺ pode precisar adicionΓ‘-las manualmente.', '⚠️ Fallo al configurar columnas. Es posible que debas agregarlas manualmente.'),
@@ -70,7 +72,9 @@ const i18n = {
70
72
  cursor_step_1: t('\t1. Open Cursor', '\t1. Abra o Cursor', '\t1. Abre Cursor'),
71
73
  cursor_step_2: t('\t2. Open Composer (Cmd+I or Cmd+L) and type: "@.agentic-pdlc/SETUP_PROMPT.md execute Setup Mode"\n', '\t2. Abra o Composer (Cmd+I ou Cmd+L) e digite: "@.agentic-pdlc/SETUP_PROMPT.md execute Setup Mode"\n', '\t2. Abre Composer (Cmd+I o Cmd+L) y escribe: "@.agentic-pdlc/SETUP_PROMPT.md execute Setup Mode"\n'),
72
74
  generic_written: t('βœ… Agent generic setup instructions written to .agentic-setup.md', 'βœ… InstruΓ§Γ΅es genΓ©ricas salvas em .agentic-setup.md', 'βœ… Instrucciones genΓ©ricas guardadas en .agentic-setup.md'),
73
- generic_done: t('Tell your AI agent to read and execute the .agentic-setup.md file!\n', 'Diga ao seu agente para ler e executar o arquivo .agentic-setup.md!\n', 'Β‘Dile a tu agente de IA que lea y ejecute el archivo .agentic-setup.md!\n')
75
+ generic_done: t('Tell your AI agent to read and execute the .agentic-setup.md file!\n', 'Diga ao seu agente para ler e executar o arquivo .agentic-setup.md!\n', 'Β‘Dile a tu agente de IA que lea y ejecute el archivo .agentic-setup.md!\n'),
76
+ setup_done: t('πŸŽ‰ All set! Continue the setup with your agent:', 'πŸŽ‰ Aqui tΓ‘ pronto! Continue o setup com o seu agente:', 'πŸŽ‰ Β‘Listo! ContinΓΊa el setup con tu agente:'),
77
+ setup_done_hint: t('>>> Tell it to read and execute the .agentic-setup.md file!', '>>> Diga a ele para ler e executar o arquivo .agentic-setup.md!', '>>> Dile que lea y ejecute el archivo .agentic-setup.md!')
74
78
  };
75
79
 
76
80
  const cyan = '\x1b[36m';
@@ -99,6 +103,16 @@ function copyDirSync(src, dest) {
99
103
  }
100
104
  }
101
105
 
106
+ function printSetupDone() {
107
+ const line1 = i18n.setup_done;
108
+ const line2 = i18n.setup_done_hint;
109
+ const sep = '='.repeat(Math.max(line1.length, line2.length));
110
+ console.log(`\n${green}${sep}${reset}`);
111
+ console.log(`${green}${line1}${reset}`);
112
+ console.log(`${cyan}${line2}${reset}`);
113
+ console.log(`${green}${sep}${reset}\n`);
114
+ }
115
+
102
116
  async function runSetup() {
103
117
  console.log(`${yellow}${i18n.checking_gh}${reset}`);
104
118
  try {
@@ -138,7 +152,7 @@ async function runSetup() {
138
152
 
139
153
  let isOrg = false;
140
154
  try {
141
- const ownerType = execFileSync('gh', ['api', `repos/${repo}`, '--jq', '.owner.type']).toString().trim();
155
+ const ownerType = execFileSync('gh', ['api', `repos/${repo}`, '--jq', '.owner.type'], { stdio: ['ignore', 'pipe', 'ignore'] }).toString().trim();
142
156
  isOrg = ownerType === 'Organization';
143
157
  } catch (err) {
144
158
  const accountTypeAnswer = await askQuestion(i18n.ask_org);
@@ -147,7 +161,7 @@ async function runSetup() {
147
161
 
148
162
  let branchName = 'main';
149
163
  try {
150
- branchName = execFileSync('gh', ['api', `repos/${repo}`, '--jq', '.default_branch']).toString().trim() || 'main';
164
+ branchName = execFileSync('gh', ['api', `repos/${repo}`, '--jq', '.default_branch'], { stdio: ['ignore', 'pipe', 'ignore'] }).toString().trim() || 'main';
151
165
  } catch (err) {
152
166
  const branchAnswer = await askQuestion(i18n.ask_branch);
153
167
  if (branchAnswer.trim()) branchName = branchAnswer.trim();
@@ -197,6 +211,15 @@ async function runSetup() {
197
211
  projectId = projectCreateOutput;
198
212
 
199
213
  console.log(` ${i18n.project_ok}${projectId})`);
214
+
215
+ try {
216
+ const repoNodeId = execFileSync('gh', ['api', `repos/${repo}`, '--jq', '.node_id'], { stdio: ['ignore', 'pipe', 'ignore'] }).toString().trim();
217
+ execFileSync('gh', ['api', 'graphql', '-f', `query=mutation($projectId: ID!, $repositoryId: ID!) { linkProjectV2ToRepository(input: {projectId: $projectId, repositoryId: $repositoryId}) { repository { name } } }`, '-f', `projectId=${projectId}`, '-f', `repositoryId=${repoNodeId}`], { stdio: 'ignore' });
218
+ console.log(` ${i18n.link_project_ok}`);
219
+ } catch (err) {
220
+ console.log(` ${i18n.link_project_warn}`);
221
+ }
222
+
200
223
  } catch (err) {
201
224
  console.log(` ${i18n.project_err}${err.message}`);
202
225
  }
@@ -212,15 +235,15 @@ async function runSetup() {
212
235
 
213
236
  if (statusFieldId) {
214
237
  const columns = [
215
- { name: "πŸ’‘ Idea", description: "Backlog", color: "GRAY" },
216
- { name: "πŸ” Exploration", description: "Claude is analyzing", color: "PURPLE" },
217
- { name: "🧠 Brainstorming", description: "Awaiting PM gate", color: "PINK" },
218
- { name: "πŸ“ Detail Solution", description: "Technical spec", color: "BLUE" },
219
- { name: "βœ… Approval", description: "Spec ready", color: "GREEN" },
220
- { name: "βš™οΈ Development", description: "Agent implementing", color: "ORANGE" },
221
- { name: "πŸ§ͺ Testing", description: "QA testing", color: "RED" },
222
- { name: "πŸ‘ Code Review / PR", description: "PR opened", color: "YELLOW" },
223
- { name: "πŸš€ Production", description: "Merged", color: "GREEN" }
238
+ { name: "πŸ’‘ Idea", description: "Backlog β€” every new issue lands here", color: "GRAY" },
239
+ { name: "πŸ” Exploration", description: "AI is analyzing code and context", color: "PURPLE" },
240
+ { name: "🧠 Brainstorming", description: "AI proposed approaches and trade-offs", color: "PINK" },
241
+ { name: "πŸ“ Detail Solution", description: "AI is writing the technical spec", color: "BLUE" },
242
+ { name: "βœ… Approval", description: "Spec ready, awaiting `spec:approved` label", color: "GREEN" },
243
+ { name: "βš™οΈ Development", description: "AI implementing the spec", color: "ORANGE" },
244
+ { name: "πŸ§ͺ Testing", description: "QA testing and CI pipeline checks", color: "RED" },
245
+ { name: "πŸ‘ Code Review / PR", description: "PR opened, awaiting your review", color: "YELLOW" },
246
+ { name: "πŸš€ Ready for Production", description: "Merged and ready for production", color: "GREEN" }
224
247
  ];
225
248
 
226
249
  const updateFieldQuery = `mutation($fieldId: ID!, $options: [ProjectV2SingleSelectFieldOptionInput!]) {
@@ -247,7 +270,7 @@ async function runSetup() {
247
270
  const updateOutput = execFileSync('gh', ['api', 'graphql', '--input', '-'], { input: queryPayload }).toString().trim();
248
271
  const jsonResponse = updateOutput ? JSON.parse(updateOutput) : null;
249
272
  const returnedOptions = jsonResponse?.data?.updateProjectV2Field?.projectV2Field?.options || [];
250
-
273
+
251
274
  for (const opt of returnedOptions) {
252
275
  optionMap[opt.name] = opt.id;
253
276
  }
@@ -264,7 +287,7 @@ async function runSetup() {
264
287
  // We copy the templates folder so the agent has the real text logic to replace and rename
265
288
  const sourceTemplates = path.join(sourceDir, 'templates');
266
289
  const targetTemplates = path.join(targetDir, '.agentic-pdlc', 'templates');
267
-
290
+
268
291
  if (fs.existsSync(sourceTemplates)) {
269
292
  copyDirSync(sourceTemplates, targetTemplates);
270
293
  console.log(`${i18n.templates_copied}`);
@@ -273,11 +296,11 @@ async function runSetup() {
273
296
  const pdlcDest = path.join(targetTemplates, 'docs', 'pdlc.md');
274
297
  if (fs.existsSync(pdlcDest)) {
275
298
  let pdlcContent = fs.readFileSync(pdlcDest, 'utf8');
276
-
277
- if (projectId) pdlcContent = pdlcContent.replace(/\\{\\{PROJECT_ID\\}\\}/g, () => projectId);
278
- if (statusFieldId) pdlcContent = pdlcContent.replace(/\\{\\{STATUS_FIELD_ID\\}\\}/g, () => statusFieldId);
279
- pdlcContent = pdlcContent.replace(/\\{\\{REPO_OWNER\\}\\}/g, () => repoOwner);
280
- pdlcContent = pdlcContent.replace(/\\{\\{REPO_NAME\\}\\}/g, () => repoName);
299
+
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);
281
304
 
282
305
  if (Object.keys(optionMap).length > 0) {
283
306
  pdlcContent = pdlcContent.replace(/\{\{ID_IDEA\}\}/g, optionMap["πŸ’‘ Idea"] || 'MISSING_ID');
@@ -288,7 +311,7 @@ async function runSetup() {
288
311
  pdlcContent = pdlcContent.replace(/\{\{ID_DEVELOPMENT\}\}/g, optionMap["βš™οΈ Development"] || 'MISSING_ID');
289
312
  pdlcContent = pdlcContent.replace(/\{\{ID_TESTING\}\}/g, optionMap["πŸ§ͺ Testing"] || 'MISSING_ID');
290
313
  pdlcContent = pdlcContent.replace(/\{\{ID_CODE_REVIEW_PR\}\}/g, optionMap["πŸ‘ Code Review / PR"] || 'MISSING_ID');
291
- pdlcContent = pdlcContent.replace(/\{\{ID_PRODUCTION\}\}/g, optionMap["πŸš€ Production"] || 'MISSING_ID');
314
+ pdlcContent = pdlcContent.replace(/\{\{ID_READY_FOR_PRODUCTION\}\}/g, optionMap["πŸš€ Ready for Production"] || 'MISSING_ID');
292
315
  }
293
316
 
294
317
  fs.writeFileSync(pdlcDest, pdlcContent);
@@ -296,6 +319,14 @@ async function runSetup() {
296
319
  }
297
320
  }
298
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
+
299
330
  // Handle the specific setup instructions target
300
331
  const claudeSetupSrc = path.join(sourceDir, 'adapters', 'claude-code', 'skill.md');
301
332
  const cursorSetupSrc = path.join(sourceDir, 'adapters', 'cursor', 'rules.md');
@@ -305,16 +336,7 @@ async function runSetup() {
305
336
  const dest = path.join(targetDir, '.agentic-setup.md');
306
337
  fs.copyFileSync(claudeSetupSrc, dest);
307
338
  console.log(`${i18n.setup_written}`);
308
- console.log(`${green}============================================================${reset}`);
309
- console.log(`${green}${i18n.framework_scaffolded}${reset}`);
310
- console.log(`${green}============================================================${reset}\n`);
311
- console.log(`${yellow}${i18n.next_steps}${reset}`);
312
- console.log(`${cyan}${i18n.step_1}${reset}`);
313
- console.log(`${cyan}${i18n.step_2}${reset}`);
314
- console.log(`${cyan}>>> English: "Read .agentic-setup.md and guide me through the setup."${reset}`);
315
- console.log(`${cyan}>>> EspaΓ±ol: "Lea el archivo .agentic-setup.md e inicie el Setup Mode"${reset}`);
316
- console.log(`${cyan}>>> PortuguΓͺs: "Leia o arquivo .agentic-setup.md e inicie o Setup Mode."${reset}\n`);
317
- console.log(`${i18n.note_cleanup}`);
339
+ printSetupDone();
318
340
  } else {
319
341
  console.error(`${i18n.missing_claude}${claudeSetupSrc}`);
320
342
  }
@@ -323,16 +345,14 @@ async function runSetup() {
323
345
  // Create .cursorrules which has the general invariants
324
346
  const dest = path.join(targetDir, '.cursorrules');
325
347
  fs.copyFileSync(cursorSetupSrc, dest);
326
-
348
+
327
349
  // Also copy skill.md as a setup prompt for cursor composer
328
350
  const setupPromptDest = path.join(targetDir, '.agentic-pdlc', 'SETUP_PROMPT.md');
329
351
  if (fs.existsSync(claudeSetupSrc)) fs.copyFileSync(claudeSetupSrc, setupPromptDest);
330
352
 
331
353
  console.log(`${i18n.cursor_rules_written}`);
332
354
  console.log(`${i18n.cursor_setup_written}`);
333
- console.log(`\n${green}${i18n.cursor_done}${reset}`);
334
- console.log(`${cyan}${i18n.cursor_step_1}${reset}`);
335
- console.log(`${cyan}${i18n.cursor_step_2}${reset}`);
355
+ printSetupDone();
336
356
  } else {
337
357
  console.error(`${i18n.missing_claude}${cursorSetupSrc}`);
338
358
  }
@@ -341,8 +361,7 @@ async function runSetup() {
341
361
  const dest = path.join(targetDir, '.agentic-setup.md');
342
362
  fs.copyFileSync(claudeSetupSrc, dest);
343
363
  console.log(`${i18n.generic_written}`);
344
- console.log(`\n${green}${i18n.cursor_done}${reset}`);
345
- console.log(`${cyan}>>> ${i18n.generic_done}${reset}`);
364
+ printSetupDone();
346
365
  }
347
366
 
348
367
  rl.close();
package/docs/pdlc.md CHANGED
@@ -12,11 +12,11 @@
12
12
  | βš™οΈ Development | AI implementing the spec | Label `stage:development` |
13
13
  | πŸ§ͺ Testing | CI pipeline running | GitHub Actions |
14
14
  | πŸ‘ Code Review / PR | PR opened, awaiting human review | GitHub Actions |
15
- | πŸš€ Production | Merged | GitHub Actions |
15
+ | πŸš€ Ready for Production | Merged | GitHub Actions |
16
16
 
17
17
  <!--
18
18
  Adapt columns as needed. The functional baseline is:
19
- πŸ’‘ Idea β†’ βš™οΈ Development β†’ πŸ‘ Code Review / PR β†’ πŸš€ Production
19
+ πŸ’‘ Idea β†’ βš™οΈ Development β†’ πŸ‘ Code Review / PR β†’ πŸš€ Ready for Production
20
20
  -->
21
21
 
22
22
  ## Board Identifiers (GitHub Projects)
@@ -39,7 +39,7 @@ REPO = {{REPO_OWNER}}/{{REPO_NAME}}
39
39
  | βš™οΈ Development | `{{ID_DEVELOPMENT}}` |
40
40
  | πŸ§ͺ Testing | `{{ID_TESTING}}` |
41
41
  | πŸ‘ Code Review / PR | `{{ID_CODE_REVIEW_PR}}` |
42
- | πŸš€ Production | `{{ID_PRODUCTION}}` |
42
+ | πŸš€ Ready for Production | `{{ID_READY_FOR_PRODUCTION}}` |
43
43
 
44
44
  ## Agent Γ— Phase Mapping
45
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agentic-pdlc",
3
- "version": "2.0.5",
3
+ "version": "2.1.0",
4
4
  "description": "Agentic PDLC Framework - Conversational setup for your AI coding assistants",
5
5
  "type": "commonjs",
6
6
  "bin": {
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env bash
2
+ # Run from the root of a test project to undo everything npx create-agentic-pdlc creates.
3
+ set -euo pipefail
4
+
5
+ RED='\033[0;31m'
6
+ GREEN='\033[0;32m'
7
+ YELLOW='\033[1;33m'
8
+ NC='\033[0m'
9
+
10
+ echo -e "${YELLOW}Resetting agentic-pdlc artifacts in: $(pwd)${NC}\n"
11
+
12
+ remove() {
13
+ local target="$1"
14
+ if [ ! -e "$target" ] && [ ! -L "$target" ]; then
15
+ echo -e " skipped $target (not found)"
16
+ return
17
+ fi
18
+ # Skip files/dirs tracked by git β€” they predate the setup run
19
+ if git ls-files --error-unmatch "$target" &>/dev/null 2>&1; then
20
+ echo -e " ${YELLOW}protected${NC} $target (tracked by git β€” skipping)"
21
+ return
22
+ fi
23
+ rm -rf "$target"
24
+ echo -e " ${GREEN}removed${NC} $target"
25
+ }
26
+
27
+ # --- CLI phase ---
28
+ remove .agentic-pdlc
29
+ remove .agentic-setup.md
30
+ remove .cursorrules
31
+
32
+ # --- Setup Mode phase (agent-generated) ---
33
+ remove AGENTS.md
34
+ remove docs/pdlc.md
35
+ remove .github/workflows/project-automation.yml
36
+ remove .github/workflows/agent-trigger.yml
37
+ remove .github/workflows/ci.yml
38
+ remove .github/workflows/qa-agent.yml
39
+
40
+ # Clean up empty dirs left behind
41
+ rmdir --ignore-fail-on-non-empty docs 2>/dev/null || true
42
+ rmdir --ignore-fail-on-non-empty .github/workflows 2>/dev/null || true
43
+ rmdir --ignore-fail-on-non-empty .github 2>/dev/null || true
44
+
45
+ echo -e "\n${GREEN}Done. Run 'npx create-agentic-pdlc' to start fresh.${NC}"
@@ -12,11 +12,11 @@
12
12
  | βš™οΈ Development | Agent implementing the spec | Label `stage:development` |
13
13
  | πŸ§ͺ Testing | CI pipeline or AI QA Agent running (Variant B) | GitHub Actions / QA Agent |
14
14
  | πŸ‘ Code Review / PR | PR opened (Variant A) or QA passed (Variant B) | GitHub Actions |
15
- | πŸš€ Production | Merged | GitHub Actions |
15
+ | πŸš€ Ready for Production | Merged | GitHub Actions |
16
16
 
17
17
  <!--
18
18
  Adapt columns as needed. The functional baseline is:
19
- πŸ’‘ Idea β†’ βš™οΈ Development β†’ πŸ‘ Code Review / PR β†’ πŸš€ Production
19
+ πŸ’‘ Idea β†’ βš™οΈ Development β†’ πŸ‘ Code Review / PR β†’ πŸš€ Ready for Production
20
20
  -->
21
21
 
22
22
  ## Workflow Variants (QA Agent)
@@ -44,7 +44,7 @@ REPO = {{REPO_OWNER}}/{{REPO_NAME}}
44
44
  | βš™οΈ Development | `{{ID_DEVELOPMENT}}` |
45
45
  | πŸ§ͺ Testing | `{{ID_TESTING}}` |
46
46
  | πŸ‘ Code Review / PR | `{{ID_CODE_REVIEW_PR}}` |
47
- | πŸš€ Production | `{{ID_PRODUCTION}}` |
47
+ | πŸš€ Ready for Production | `{{ID_READY_FOR_PRODUCTION}}` |
48
48
 
49
49
  ## Agent Γ— Phase Mapping
50
50