create-agentic-pdlc 2.4.0 → 3.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.
Files changed (33) hide show
  1. package/.agentic-pdlc/hooks/pdlc-stage-gate.sh +37 -10
  2. package/.claude/settings.json +18 -0
  3. package/.coderabbit.yaml +41 -0
  4. package/.github/workflows/add-to-board.yml +55 -7
  5. package/.github/workflows/agent-trigger.yml +57 -25
  6. package/.github/workflows/board-reconciliation.yml +176 -0
  7. package/.github/workflows/pdlc-health-check.yml +81 -81
  8. package/.github/workflows/project-automation.yml +252 -259
  9. package/CLAUDE.md +1 -1
  10. package/README.md +33 -32
  11. package/adapters/claude-code/skill.md +12 -8
  12. package/bin/cli.js +607 -213
  13. package/docs/superpowers/plans/2026-06-04-spec-format-issue-template.md +160 -0
  14. package/docs/superpowers/plans/2026-06-04-two-tier-installer.md +1056 -0
  15. package/docs/superpowers/plans/2026-06-05-archive-card-on-issue-close.md +105 -0
  16. package/docs/superpowers/plans/2026-06-05-project-id-actions-variable.md +336 -0
  17. package/docs/superpowers/specs/2026-06-04-spec-format-issue-template-design.md +46 -0
  18. package/docs/superpowers/specs/2026-06-05-project-id-actions-variable-design.md +114 -0
  19. package/package.json +2 -2
  20. package/scripts/derive-column.js +20 -0
  21. package/templates/.github/workflows/add-to-board.yml +2 -2
  22. package/templates/.github/workflows/agent-trigger.yml +2 -2
  23. package/templates/.github/workflows/pdlc-health-check.yml +2 -2
  24. package/templates/.github/workflows/project-automation.yml +47 -8
  25. package/templates/full/CLAUDE.md +30 -0
  26. package/templates/lite/AGENTS.md +121 -0
  27. package/templates/lite/CLAUDE.md +44 -0
  28. package/tests/cli.test.js +118 -0
  29. package/.github/workflows/agentic-metrics.yml +0 -545
  30. package/.github/workflows/qa-agent.yml +0 -139
  31. package/.github/workflows/qa-gate.yml +0 -51
  32. /package/templates/{AGENTS.md → full/AGENTS.md} +0 -0
  33. /package/templates/{docs → full/docs}/pdlc.md +0 -0
@@ -5,117 +5,117 @@ on:
5
5
  schedule:
6
6
  - cron: '0 8 * * 1' # Every Monday at 8am
7
7
 
8
- env:
9
- PROJECT_ID: "PVT_kwHODpFFL84BXg7h"
10
- STATUS_FIELD_ID: "PVTSSF_lAHODpFFL84BXg7hzhStRHI"
11
- STATUS_BRAINSTORMING: "8eb07c5b"
12
- STATUS_DETAILING: "9f6ce70e"
13
- STATUS_APPROVAL: "31bf4610"
14
- STATUS_DEVELOPMENT: "2c9e78e6"
15
- STATUS_TESTING: "96b59ade"
16
- STATUS_CODE_REVIEW_PR: "86ca9720"
17
- STATUS_PRODUCTION: "1581e5bd"
18
-
19
8
  jobs:
20
- check-drift:
21
- name: Detect Project Board Drift
9
+ resolve-ids:
10
+ name: Resolve Board Column IDs
22
11
  runs-on: ubuntu-latest
23
12
  env:
24
13
  PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
25
- permissions:
26
- issues: write
14
+ outputs:
15
+ project_id: ${{ steps.resolve.outputs.project_id }}
16
+ status_field_id: ${{ steps.resolve.outputs.status_field_id }}
17
+ status_brainstorming: ${{ steps.resolve.outputs.status_brainstorming }}
18
+ status_detailing: ${{ steps.resolve.outputs.status_detailing }}
19
+ status_approval: ${{ steps.resolve.outputs.status_approval }}
20
+ status_development: ${{ steps.resolve.outputs.status_development }}
21
+ status_code_review_pr: ${{ steps.resolve.outputs.status_code_review_pr }}
22
+ status_production: ${{ steps.resolve.outputs.status_production }}
27
23
  steps:
28
- - name: Validate Board Configuration
29
- if: ${{ env.PROJECT_TOKEN != '' && env.PROJECT_ID != '{{PROJECT_ID}}' }}
30
- uses: actions/github-script@v8
24
+ - name: Resolve column IDs by name
25
+ id: resolve
26
+ if: ${{ env.PROJECT_TOKEN != '' && vars.PROJECT_ID != '' }}
27
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
31
28
  with:
32
29
  github-token: ${{ env.PROJECT_TOKEN }}
33
30
  script: |
34
- const projectId = process.env.PROJECT_ID;
35
- const statusFieldId = process.env.STATUS_FIELD_ID;
36
- const envVars = {
37
- 'STATUS_BRAINSTORMING': process.env.STATUS_BRAINSTORMING,
38
- 'STATUS_DETAILING': process.env.STATUS_DETAILING,
39
- 'STATUS_APPROVAL': process.env.STATUS_APPROVAL,
40
- 'STATUS_DEVELOPMENT': process.env.STATUS_DEVELOPMENT,
41
- 'STATUS_TESTING': process.env.STATUS_TESTING,
42
- 'STATUS_CODE_REVIEW_PR': process.env.STATUS_CODE_REVIEW_PR,
43
- 'STATUS_PRODUCTION': process.env.STATUS_PRODUCTION
44
- };
45
-
46
- const query = `
47
- query($projectId: ID!) {
48
- node(id: $projectId) {
31
+ const projectId = '${{ vars.PROJECT_ID }}';
32
+ if (!projectId || projectId === '{{PROJECT_ID}}') {
33
+ core.warning('vars.PROJECT_ID not set — board features disabled');
34
+ return;
35
+ }
36
+ const { node } = await github.graphql(`
37
+ query($id: ID!) {
38
+ node(id: $id) {
49
39
  ... on ProjectV2 {
50
- title
51
40
  fields(first: 20) {
52
41
  nodes {
53
42
  ... on ProjectV2SingleSelectField {
54
43
  id
55
44
  name
56
- options {
57
- id
58
- name
59
- }
45
+ options { id name }
60
46
  }
61
47
  }
62
48
  }
63
49
  }
64
50
  }
65
51
  }
66
- `;
67
-
68
- let result;
69
- try {
70
- result = await github.graphql(query, { projectId });
71
- } catch (error) {
72
- console.log("❌ Error fetching project. Verify your PROJECT_ID.");
73
- console.log(error);
74
- return;
75
- }
76
-
77
- const project = result.node;
78
- if (!project) {
79
- console.log("❌ Project not found.");
80
- return;
81
- }
82
-
83
- const statusField = project.fields.nodes.find(f => f.id === statusFieldId);
84
- if (!statusField) {
85
- console.log("❌ Status field not found.");
86
- return;
87
- }
52
+ `, { id: projectId });
53
+ const statusField = node.fields.nodes.find(f => f.name === 'Status');
54
+ if (!statusField) { core.setFailed('Status field not found on board'); return; }
55
+ const opt = (name) => statusField.options.find(o => o.name.includes(name))?.id ?? '';
56
+ core.setOutput('project_id', projectId);
57
+ core.setOutput('status_field_id', statusField.id);
58
+ core.setOutput('status_brainstorming', opt('Brainstorming'));
59
+ core.setOutput('status_detailing', opt('Detailing'));
60
+ core.setOutput('status_approval', opt('Approval'));
61
+ core.setOutput('status_development', opt('Development'));
62
+ core.setOutput('status_code_review_pr', opt('Code Review'));
63
+ core.setOutput('status_production', opt('Production'));
64
+ console.log('✅ Board IDs resolved by name');
88
65
 
89
- const validOptions = statusField.options;
90
- const validOptionIds = validOptions.map(o => o.id);
91
-
92
- let hasDrift = false;
93
- let missingVars = [];
66
+ check-drift:
67
+ name: Detect Project Board Drift
68
+ needs: [resolve-ids]
69
+ runs-on: ubuntu-latest
70
+ env:
71
+ PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
72
+ PROJECT_ID: ${{ needs.resolve-ids.outputs.project_id }}
73
+ permissions:
74
+ issues: write
75
+ steps:
76
+ - name: Validate Board Configuration
77
+ if: ${{ env.PROJECT_TOKEN != '' && env.PROJECT_ID != '' }}
78
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
79
+ with:
80
+ github-token: ${{ env.PROJECT_TOKEN }}
81
+ script: |
82
+ const expectedColumns = [
83
+ 'Brainstorming', 'Detailing', 'Approval',
84
+ 'Development', 'Code Review', 'Production'
85
+ ];
94
86
 
95
- for (const [varName, id] of Object.entries(envVars)) {
96
- if (id && !id.startsWith('{{') && !validOptionIds.includes(id)) {
97
- hasDrift = true;
98
- missingVars.push(varName);
99
- }
100
- }
87
+ const resolvedIds = {
88
+ 'Brainstorming': '${{ needs.resolve-ids.outputs.status_brainstorming }}',
89
+ 'Detailing': '${{ needs.resolve-ids.outputs.status_detailing }}',
90
+ 'Approval': '${{ needs.resolve-ids.outputs.status_approval }}',
91
+ 'Development': '${{ needs.resolve-ids.outputs.status_development }}',
92
+ 'Code Review': '${{ needs.resolve-ids.outputs.status_code_review_pr }}',
93
+ 'Production': '${{ needs.resolve-ids.outputs.status_production }}',
94
+ };
101
95
 
102
- if (hasDrift) {
103
- console.log("🚨 Drift detected! The following mapped columns no longer exist: " + missingVars.join(", "));
104
-
105
- let table = "| Column Name | New ID |\n|---|---|\n";
106
- validOptions.forEach(opt => {
107
- table += `| ${opt.name} | \`${opt.id}\` |\n`;
108
- });
96
+ const missing = expectedColumns.filter(col => !resolvedIds[col]);
109
97
 
110
- const body = `🚨 **Agentic PDLC Drift Detected**\n\nThe following columns mapped in your \`.github/workflows/project-automation.yml\` no longer exist in your project board:\n\n**${missingVars.join(", ")}**\n\n### How to fix it:\nHere is the list of current columns in your board with their valid IDs. Please update the \`env\` block in your \`.github/workflows/project-automation.yml\` and \`.github/workflows/pdlc-health-check.yml\`.\n\n${table}`;
98
+ if (missing.length > 0) {
99
+ const body = [
100
+ '🚨 **Agentic PDLC Drift Detected**',
101
+ '',
102
+ 'The following expected columns were not found on the board:',
103
+ '',
104
+ missing.map(c => `- **${c}**`).join('\n'),
105
+ '',
106
+ 'The board may have been recreated or columns renamed.',
107
+ 'Check `vars.PROJECT_ID` and verify column names match expected values.',
108
+ ].join('\n');
111
109
 
112
110
  await github.rest.issues.create({
113
111
  owner: context.repo.owner,
114
112
  repo: context.repo.repo,
115
113
  title: '🚨 Agentic PDLC Drift Detected in Project Board',
116
- body: body,
114
+ body,
117
115
  labels: ['bug']
118
116
  });
117
+
118
+ core.setFailed(`Missing columns: ${missing.join(', ')}`);
119
119
  } else {
120
- console.log("✅ No drift detected. Board configuration is healthy.");
120
+ console.log('✅ No drift detected. All expected columns found on board.');
121
121
  }