create-agentic-pdlc 1.0.0 → 1.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,36 @@
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish-npm:
9
+ name: Publish NPM Package
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
13
+ id-token: write # Required for NPM provenance tracking
14
+
15
+ steps:
16
+ - name: Checkout Code
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Setup Node.js
20
+ uses: actions/setup-node@v4
21
+ with:
22
+ node-version: '24'
23
+ registry-url: 'https://registry.npmjs.org'
24
+
25
+ - name: Sync Version with GitHub Release Tag
26
+ run: |
27
+ # Strip 'v' from tag (e.g., v1.0.2 -> 1.0.2)
28
+ VERSION=${GITHUB_REF_NAME#v}
29
+ echo "Setting package version to $VERSION"
30
+ npm version $VERSION --no-git-tag-version
31
+
32
+ - name: Install Dependencies
33
+ run: npm install
34
+
35
+ - name: Publish to NPM Registry
36
+ run: npm publish --provenance
@@ -5,15 +5,79 @@ on:
5
5
  types: [opened, reopened, closed]
6
6
  pull_request_review:
7
7
  types: [submitted]
8
+ issue_comment:
9
+ types: [created]
8
10
 
9
11
  env:
10
12
  PROJECT_ID: "{{PROJECT_ID}}"
11
13
  STATUS_FIELD_ID: "{{STATUS_FIELD_ID}}"
14
+ STATUS_EXPLORATION: "{{ID_EXPLORATION}}"
15
+ STATUS_BRAINSTORMING: "{{ID_BRAINSTORMING}}"
16
+ STATUS_DETAILING: "{{ID_DETAILING}}"
17
+ STATUS_APPROVAL: "{{ID_APPROVAL}}"
12
18
  STATUS_CODE_REVIEW: "{{ID_CODE_REVIEW}}"
13
19
  STATUS_PULL_REQUEST: "{{ID_PULL_REQUEST}}"
14
20
  STATUS_PRODUCAO: "{{ID_PRODUCAO}}"
15
21
 
16
22
  jobs:
23
+ # Issue Comment → Move Upstream
24
+ move-card-on-comment:
25
+ name: Upstream Comment Marker → Move Card
26
+ if: github.event_name == 'issue_comment' && github.event.action == 'created'
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - name: Detect Marker and Move Issue
30
+ if: ${{ secrets.PROJECT_TOKEN != '' }}
31
+ uses: actions/github-script@v7
32
+ with:
33
+ github-token: ${{ secrets.PROJECT_TOKEN }}
34
+ script: |
35
+ const body = context.payload.comment.body;
36
+ let targetStatusId = null;
37
+ let stageName = null;
38
+
39
+ if (body.includes('<!-- PDLC:stage:exploration -->')) {
40
+ targetStatusId = process.env.STATUS_EXPLORATION;
41
+ stageName = 'Exploration';
42
+ } else if (body.includes('<!-- PDLC:stage:brainstorming -->')) {
43
+ targetStatusId = process.env.STATUS_BRAINSTORMING;
44
+ stageName = 'Brainstorming';
45
+ } else if (body.includes('<!-- PDLC:stage:detailing -->')) {
46
+ targetStatusId = process.env.STATUS_DETAILING;
47
+ stageName = 'Detailing';
48
+ } else if (body.includes('<!-- PDLC:stage:approval -->')) {
49
+ targetStatusId = process.env.STATUS_APPROVAL;
50
+ stageName = 'Approval';
51
+ }
52
+
53
+ if (!targetStatusId) {
54
+ console.log('No upstream PDLC marker found. Skipping.');
55
+ return;
56
+ }
57
+
58
+ const { issue: { number, node_id } } = context.payload;
59
+
60
+ const moveItem = async (nodeId, statusId) => {
61
+ const { addProjectV2ItemById: { item } } = await github.graphql(`
62
+ mutation($p: ID!, $c: ID!) {
63
+ addProjectV2ItemById(input: {projectId: $p, contentId: $c}) { item { id } }
64
+ }`, { p: process.env.PROJECT_ID, c: nodeId });
65
+
66
+ await github.graphql(`
67
+ mutation($p: ID!, $i: ID!, $f: ID!, $v: ProjectV2FieldValue!) {
68
+ updateProjectV2ItemFieldValue(input: {projectId: $p, itemId: $i, fieldId: $f, value: $v}) {
69
+ projectV2Item { id }
70
+ }
71
+ }`, {
72
+ p: process.env.PROJECT_ID, i: item.id, f: process.env.STATUS_FIELD_ID,
73
+ v: { singleSelectOptionId: statusId }
74
+ });
75
+ };
76
+
77
+ await moveItem(node_id, targetStatusId);
78
+ console.log(`Issue #${number} moved to ${stageName}`);
79
+
80
+
17
81
  # PR Opened → Move linked issue to Code Review
18
82
  move-card-on-pr-open:
19
83
  name: Open PR → Code Review
@@ -21,6 +85,7 @@ jobs:
21
85
  runs-on: ubuntu-latest
22
86
  steps:
23
87
  - name: Move linked issue to Code Review
88
+ if: ${{ secrets.PROJECT_TOKEN != '' }}
24
89
  uses: actions/github-script@v7
25
90
  with:
26
91
  github-token: ${{ secrets.PROJECT_TOKEN }}
@@ -72,6 +137,7 @@ jobs:
72
137
  runs-on: ubuntu-latest
73
138
  steps:
74
139
  - name: Move issue to Pull Request
140
+ if: ${{ secrets.PROJECT_TOKEN != '' }}
75
141
  uses: actions/github-script@v7
76
142
  with:
77
143
  github-token: ${{ secrets.PROJECT_TOKEN }}
@@ -115,6 +181,7 @@ jobs:
115
181
  runs-on: ubuntu-latest
116
182
  steps:
117
183
  - name: Move issue to Production
184
+ if: ${{ secrets.PROJECT_TOKEN != '' }}
118
185
  uses: actions/github-script@v7
119
186
  with:
120
187
  github-token: ${{ secrets.PROJECT_TOKEN }}
package/AGENTS.md CHANGED
@@ -26,6 +26,7 @@ Always start from the current `main` HEAD. Never work over stale snapshots.
26
26
 
27
27
  ## Mandatory Workflow
28
28
 
29
+ 0. **Identity**: Always prefix your GitHub comments with `🤖 **Agent:** ` to distinguish yourself.
29
30
  1. Read the issue entirely — understand its type (US/BUG/TASK/SPIKE) and the Acceptance Criteria.
30
31
  2. Read `docs/pdlc.md` — understand the PDLC and the Definition of Done in this project.
31
32
  3. Read all files mentioned in the issue's technical context.
package/bin/cli.js CHANGED
@@ -39,7 +39,7 @@ function copyDirSync(src, dest) {
39
39
  }
40
40
  }
41
41
 
42
- rl.question('Which AI Agent do you use to bootstrap? (claude / cursor): ', (answer) => {
42
+ rl.question('Which AI Agent will you use for the setup? (e.g. claude, cursor, copilot, or other): ', (answer) => {
43
43
  const agent = answer.trim().toLowerCase();
44
44
 
45
45
  console.log(`\n${yellow}Scaffolding Agentic PDLC into your project...${reset}`);
@@ -59,13 +59,13 @@ rl.question('Which AI Agent do you use to bootstrap? (claude / cursor): ', (answ
59
59
 
60
60
  if (agent === 'claude') {
61
61
  if (fs.existsSync(claudeSetupSrc)) {
62
- const dest = path.join(targetDir, '.claude.md');
62
+ const dest = path.join(targetDir, '.agentic-setup.md');
63
63
  fs.copyFileSync(claudeSetupSrc, dest);
64
- console.log(`✅ Setup agent profile written to .claude.md`);
64
+ console.log(`✅ Setup agent profile written to .agentic-setup.md`);
65
65
  console.log(`\n${green}🎉 Done! To start the conversational setup:${reset}`);
66
66
  console.log(`${cyan}\t1. Type 'claude'${reset}`);
67
- console.log(`${cyan}\t2. It should automatically detect Setup Mode and prompt you.${reset}`);
68
- console.log(`\nNote: The agent expects templates in .agentic-pdlc/templates.\n`);
67
+ console.log(`${cyan}\t2. Ask Claude to "read .agentic-setup.md to enter Setup Mode."${reset}`);
68
+ console.log(`\nNote: Once setup is completed, the agent will typically delete .agentic-setup.md to keep your root clean.\n`);
69
69
  } else {
70
70
  console.error(`❌ Could not find claude instruction file at ${claudeSetupSrc}`);
71
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agentic-pdlc",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Scaffold the Agentic PDLC framework effortlessly",
5
5
  "type": "commonjs",
6
6
  "bin": {
@@ -21,6 +21,10 @@
21
21
  "license": "MIT",
22
22
  "repository": {
23
23
  "type": "git",
24
- "url": "https://github.com/rafaeltcosta86/agentic-pdlc.git"
24
+ "url": "git+https://github.com/rafaeltcosta86/agentic-pdlc.git"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public",
28
+ "registry": "https://registry.npmjs.org/"
25
29
  }
26
30
  }
@@ -5,15 +5,79 @@ on:
5
5
  types: [opened, reopened, closed]
6
6
  pull_request_review:
7
7
  types: [submitted]
8
+ issue_comment:
9
+ types: [created]
8
10
 
9
11
  env:
10
12
  PROJECT_ID: "{{PROJECT_ID}}"
11
13
  STATUS_FIELD_ID: "{{STATUS_FIELD_ID}}"
14
+ STATUS_EXPLORATION: "{{ID_EXPLORATION}}"
15
+ STATUS_BRAINSTORMING: "{{ID_BRAINSTORMING}}"
16
+ STATUS_DETAILING: "{{ID_DETAILING}}"
17
+ STATUS_APPROVAL: "{{ID_APPROVAL}}"
12
18
  STATUS_CODE_REVIEW: "{{ID_CODE_REVIEW}}"
13
19
  STATUS_PULL_REQUEST: "{{ID_PULL_REQUEST}}"
14
20
  STATUS_PRODUCAO: "{{ID_PRODUCAO}}"
15
21
 
16
22
  jobs:
23
+ # Issue Comment → Move Upstream
24
+ move-card-on-comment:
25
+ name: Upstream Comment Marker → Move Card
26
+ if: github.event_name == 'issue_comment' && github.event.action == 'created'
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - name: Detect Marker and Move Issue
30
+ if: ${{ secrets.PROJECT_TOKEN != '' }}
31
+ uses: actions/github-script@v7
32
+ with:
33
+ github-token: ${{ secrets.PROJECT_TOKEN }}
34
+ script: |
35
+ const body = context.payload.comment.body;
36
+ let targetStatusId = null;
37
+ let stageName = null;
38
+
39
+ if (body.includes('<!-- PDLC:stage:exploration -->')) {
40
+ targetStatusId = process.env.STATUS_EXPLORATION;
41
+ stageName = 'Exploration';
42
+ } else if (body.includes('<!-- PDLC:stage:brainstorming -->')) {
43
+ targetStatusId = process.env.STATUS_BRAINSTORMING;
44
+ stageName = 'Brainstorming';
45
+ } else if (body.includes('<!-- PDLC:stage:detailing -->')) {
46
+ targetStatusId = process.env.STATUS_DETAILING;
47
+ stageName = 'Detailing';
48
+ } else if (body.includes('<!-- PDLC:stage:approval -->')) {
49
+ targetStatusId = process.env.STATUS_APPROVAL;
50
+ stageName = 'Approval';
51
+ }
52
+
53
+ if (!targetStatusId) {
54
+ console.log('No upstream PDLC marker found. Skipping.');
55
+ return;
56
+ }
57
+
58
+ const { issue: { number, node_id } } = context.payload;
59
+
60
+ const moveItem = async (nodeId, statusId) => {
61
+ const { addProjectV2ItemById: { item } } = await github.graphql(`
62
+ mutation($p: ID!, $c: ID!) {
63
+ addProjectV2ItemById(input: {projectId: $p, contentId: $c}) { item { id } }
64
+ }`, { p: process.env.PROJECT_ID, c: nodeId });
65
+
66
+ await github.graphql(`
67
+ mutation($p: ID!, $i: ID!, $f: ID!, $v: ProjectV2FieldValue!) {
68
+ updateProjectV2ItemFieldValue(input: {projectId: $p, itemId: $i, fieldId: $f, value: $v}) {
69
+ projectV2Item { id }
70
+ }
71
+ }`, {
72
+ p: process.env.PROJECT_ID, i: item.id, f: process.env.STATUS_FIELD_ID,
73
+ v: { singleSelectOptionId: statusId }
74
+ });
75
+ };
76
+
77
+ await moveItem(node_id, targetStatusId);
78
+ console.log(`Issue #${number} moved to ${stageName}`);
79
+
80
+
17
81
  # PR Opened → Move linked issue to Code Review
18
82
  move-card-on-pr-open:
19
83
  name: Open PR → Code Review
@@ -21,6 +85,7 @@ jobs:
21
85
  runs-on: ubuntu-latest
22
86
  steps:
23
87
  - name: Move linked issue to Code Review
88
+ if: ${{ secrets.PROJECT_TOKEN != '' }}
24
89
  uses: actions/github-script@v7
25
90
  with:
26
91
  github-token: ${{ secrets.PROJECT_TOKEN }}
@@ -72,6 +137,7 @@ jobs:
72
137
  runs-on: ubuntu-latest
73
138
  steps:
74
139
  - name: Move issue to Pull Request
140
+ if: ${{ secrets.PROJECT_TOKEN != '' }}
75
141
  uses: actions/github-script@v7
76
142
  with:
77
143
  github-token: ${{ secrets.PROJECT_TOKEN }}
@@ -115,6 +181,7 @@ jobs:
115
181
  runs-on: ubuntu-latest
116
182
  steps:
117
183
  - name: Move issue to Production
184
+ if: ${{ secrets.PROJECT_TOKEN != '' }}
118
185
  uses: actions/github-script@v7
119
186
  with:
120
187
  github-token: ${{ secrets.PROJECT_TOKEN }}
@@ -29,6 +29,7 @@ Always start from the current `main` HEAD. Never work over stale snapshots.
29
29
 
30
30
  ## Mandatory Workflow
31
31
 
32
+ 0. **Identity**: Always prefix your GitHub comments with `🤖 **Agent:** ` to distinguish yourself.
32
33
  1. Read the issue entirely — understand its type (US/BUG/TASK/SPIKE) and the Acceptance Criteria.
33
34
  2. Read `docs/pdlc.md` — understand the PDLC and the Definition of Done in this project.
34
35
  3. Read all files mentioned in the issue's technical context.