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.
- package/.agentic-pdlc/templates/docs/pdlc.md +105 -0
- package/adapters/claude-code/skill.md +28 -12
- package/bin/cli.js +55 -36
- package/docs/pdlc.md +3 -3
- package/package.json +1 -1
- package/scripts/reset-test-project.sh +45 -0
- package/templates/docs/pdlc.md +3 -3
|
@@ -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.
|
|
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
|
@@ -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: "
|
|
217
|
-
{ name: "π§ Brainstorming", description: "
|
|
218
|
-
{ name: "π Detail Solution", description: "
|
|
219
|
-
{ name: "β
Approval", description: "Spec ready", color: "GREEN" },
|
|
220
|
-
{ name: "βοΈ Development", description: "
|
|
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(
|
|
278
|
-
if (statusFieldId) pdlcContent = pdlcContent.replace(
|
|
279
|
-
pdlcContent = pdlcContent.replace(
|
|
280
|
-
pdlcContent = pdlcContent.replace(
|
|
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(/\{\{
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 | `{{
|
|
42
|
+
| π Ready for Production | `{{ID_READY_FOR_PRODUCTION}}` |
|
|
43
43
|
|
|
44
44
|
## Agent Γ Phase Mapping
|
|
45
45
|
|
package/package.json
CHANGED
|
@@ -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}"
|
package/templates/docs/pdlc.md
CHANGED
|
@@ -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 | `{{
|
|
47
|
+
| π Ready for Production | `{{ID_READY_FOR_PRODUCTION}}` |
|
|
48
48
|
|
|
49
49
|
## Agent Γ Phase Mapping
|
|
50
50
|
|