create-agentic-pdlc 2.2.0 → 2.3.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/SETUP_PROMPT.md +3 -4
  2. package/.agentic-pdlc/metrics/raw/2026-W18.jsonl +2 -0
  3. package/.agentic-pdlc/metrics/raw/2026-W21.jsonl +68 -0
  4. package/.agentic-pdlc/templates/.github/workflows/agent-trigger.yml +2 -2
  5. package/.agentic-pdlc/templates/.github/workflows/agentic-metrics.yml +16 -9
  6. package/.agentic-pdlc/templates/.github/workflows/ci.yml +14 -0
  7. package/.agentic-pdlc/templates/.github/workflows/pdlc-health-check.yml +0 -2
  8. package/.agentic-pdlc/templates/.github/workflows/project-automation.yml +1 -5
  9. package/.agentic-pdlc/templates/.github/workflows/qa-agent.yml +4 -4
  10. package/.agentic-pdlc/templates/AGENTS.md +24 -1
  11. package/.agentic-pdlc/templates/docs/pdlc.md +21 -13
  12. package/.agentic-setup-prompt.md +3 -4
  13. package/.agentic-setup.md +3 -4
  14. package/.github/workflows/agentic-metrics.yml +21 -11
  15. package/.github/workflows/pdlc-health-check.yml +0 -2
  16. package/.github/workflows/project-automation.yml +31 -7
  17. package/.github/workflows/qa-agent.yml +4 -4
  18. package/AGENTS.md +1 -1
  19. package/CLAUDE.md +51 -3
  20. package/SETUP.md +2 -0
  21. package/adapters/claude-code/skill.md +35 -22
  22. package/adapters/hooks/pdlc-stage-gate.sh +3 -3
  23. package/bin/cli.js +103 -13
  24. package/docs/flow.md +8 -21
  25. package/docs/pdlc.md +21 -13
  26. package/package.json +1 -1
  27. package/templates/.github/workflows/agent-trigger.yml +2 -2
  28. package/templates/.github/workflows/ci.yml +14 -0
  29. package/templates/.github/workflows/pdlc-health-check.yml +0 -2
  30. package/templates/.github/workflows/project-automation.yml +24 -6
  31. package/templates/.github/workflows/qa-agent.yml +6 -4
  32. package/templates/AGENTS.md +25 -2
  33. package/templates/docs/pdlc.md +21 -13
@@ -6,13 +6,12 @@ on:
6
6
  pull_request_review:
7
7
  types: [submitted]
8
8
  issues:
9
- types: [labeled, edited]
9
+ types: [labeled, edited, closed]
10
10
 
11
11
  env:
12
12
  PROJECT_ID: "{{PROJECT_ID}}"
13
13
  STATUS_FIELD_ID: "{{STATUS_FIELD_ID}}"
14
14
  STATUS_IDEA: "{{ID_IDEA}}"
15
- STATUS_EXPLORATION: "{{ID_EXPLORATION}}"
16
15
  STATUS_BRAINSTORMING: "{{ID_BRAINSTORMING}}"
17
16
  STATUS_DETAILING: "{{ID_DETAILING}}"
18
17
  STATUS_APPROVAL: "{{ID_APPROVAL}}"
@@ -40,10 +39,7 @@ jobs:
40
39
  let targetStatusId = null;
41
40
  let stageName = null;
42
41
 
43
- if (labelName === 'stage:exploration') {
44
- targetStatusId = process.env.STATUS_EXPLORATION;
45
- stageName = 'Exploration';
46
- } else if (labelName === 'stage:brainstorming') {
42
+ if (labelName === 'stage:brainstorming') {
47
43
  targetStatusId = process.env.STATUS_BRAINSTORMING;
48
44
  stageName = 'Brainstorming';
49
45
  } else if (labelName === 'stage:detailing') {
@@ -302,3 +298,25 @@ jobs:
302
298
  } else {
303
299
  await moveItem(pr.node_id);
304
300
  }
301
+
302
+ cleanup-labels-on-close:
303
+ name: Issue closed → strip stage/agent labels
304
+ if: github.event_name == 'issues' && github.event.action == 'closed'
305
+ runs-on: ubuntu-latest
306
+ steps:
307
+ - name: Remove transient labels
308
+ uses: actions/github-script@v7
309
+ with:
310
+ github-token: ${{ secrets.GITHUB_TOKEN }}
311
+ script: |
312
+ const { owner, repo } = context.repo;
313
+ const issue_number = context.payload.issue.number;
314
+ const toRemove = [
315
+ 'stage:brainstorming', 'stage:detailing',
316
+ 'stage:approval', 'stage:development', 'stage:testing',
317
+ 'agent:working', 'qa:needs-work', 'pr:in-review', 'jules'
318
+ ];
319
+ for (const label of toRemove) {
320
+ await github.rest.issues.removeLabel({ owner, repo, issue_number, name: label }).catch(() => {});
321
+ }
322
+ console.log(`Issue #${issue_number} labels cleaned up`);
@@ -13,6 +13,8 @@ jobs:
13
13
  qa:
14
14
  name: AC Coverage Verification (GitHub Models)
15
15
  runs-on: ubuntu-latest
16
+ env:
17
+ PROJECT_PAT: ${{ secrets.PROJECT_PAT }}
16
18
  steps:
17
19
  - uses: actions/checkout@v4
18
20
  with:
@@ -59,7 +61,7 @@ jobs:
59
61
  --max-time 30 || echo "API_ERROR")
60
62
 
61
63
  if [ "$RESPONSE" = "API_ERROR" ]; then
62
- gh pr edit "$PR_NUMBER" --add-label "infra:qa-broken"
64
+ GH_TOKEN="$PROJECT_PAT" gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --method POST -f 'labels[]=infra:qa-broken'
63
65
  gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:** Could not reach GitHub Models API. Manual review required."
64
66
  exit 0
65
67
  fi
@@ -68,12 +70,12 @@ jobs:
68
70
  EXPLANATION=$(echo "$RESPONSE" | python3 -c 'import json,sys; d=json.load(sys.stdin); t=d.get("choices",[{}])[0].get("message",{}).get("content","").strip(); lines=t.split("\n",1); print(lines[1].strip() if len(lines)>1 else "")')
69
71
 
70
72
  if echo "$VERDICT" | grep -q "^PASS"; then
71
- gh pr edit "$PR_NUMBER" --add-label "qa:approved"
73
+ GH_TOKEN="$PROJECT_PAT" gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --method POST -f 'labels[]=qa:approved'
72
74
  gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:** AC coverage verified. ${EXPLANATION}"
73
75
  elif echo "$VERDICT" | grep -q "^FAIL"; then
74
- gh pr edit "$PR_NUMBER" --add-label "qa:needs-work"
76
+ GH_TOKEN="$PROJECT_PAT" gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --method POST -f 'labels[]=qa:needs-work'
75
77
  gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:** AC coverage insufficient. ${EXPLANATION}"
76
78
  else
77
- gh pr edit "$PR_NUMBER" --add-label "infra:qa-broken"
79
+ GH_TOKEN="$PROJECT_PAT" gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --method POST -f 'labels[]=infra:qa-broken'
78
80
  gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:** Could not parse GitHub Models response. Manual review required."
79
81
  fi
@@ -30,7 +30,7 @@ Always start from the current `main` HEAD. Never work over stale snapshots.
30
30
  ## Mandatory Workflow
31
31
 
32
32
  0. **Identity**: Always prefix your GitHub comments with `🤖 **Agent:** ` to distinguish yourself.
33
- 1. **Initial State**: When beginning work on a new issue, your very first action must be to apply the `stage:exploration` label using the GitHub CLI (`gh issue edit <N> --add-label "stage:exploration"`).
33
+ 1. **Initial State**: When beginning work on a new issue, your very first action must be to apply the `stage:brainstorming` label using the GitHub CLI (`gh issue edit <N> --add-label "stage:brainstorming"`).
34
34
  2. Read the issue entirely — understand its type (US/BUG/TASK/SPIKE) and the Acceptance Criteria.
35
35
  3. Read `docs/pdlc.md` — understand the PDLC and the Definition of Done in this project.
36
36
  4. Read all files mentioned in the issue's technical context.
@@ -64,6 +64,25 @@ When detailing a solution in an issue body, you must **always** include both the
64
64
  - `path/to/file.ts` — what changes
65
65
  ```
66
66
 
67
+ ## Stage Transition Rules (non-negotiable)
68
+
69
+ MUST apply `stage:brainstorming` label immediately on starting work — before reading
70
+ any code, before invoking any skill. Then read context and present problem summary
71
+ + 2–3 solution options in a single message.
72
+
73
+ MUST NOT add `stage:detailing` label until the user has explicitly selected
74
+ an approach in the current conversation turn. Work done in a prior
75
+ planning session does NOT count as confirmation.
76
+
77
+ MUST NOT add `spec:approved`, `stage:development`, or manually add
78
+ `stage:approval` — these represent final human approval or the result of it.
79
+ `stage:approval` is only set by system automation after you provide a complete
80
+ spec for human review. Adding them manually triggers irreversible automation
81
+ (Jules dispatch, board move).
82
+
83
+ Each stage transition requires a fresh explicit signal from the user in the same
84
+ session where the transition happens. These rules have no exceptions.
85
+
67
86
  ## Pipeline Updates
68
87
 
69
88
  To add or configure optional agents (Jules, QA Agent, Sentinel) at any time:
@@ -80,7 +99,11 @@ Run this when the user says anything like "update the pipeline", "update the boa
80
99
  - Never open a PR without passing the tests.
81
100
  - Never implement beyond the immediate scope of the issue.
82
101
  - Never create future-proofing abstractions for hypothetical features.
83
- - Never add or remove `stage:*` or `qa:*` labels manually. These are owned by GitHub Actions automation and the PM only.
102
+ - The agent MUST NOT apply these labels under any circumstances (PM only):
103
+ - `spec:approved`: triggers Jules dispatch + board move to Development.
104
+ - `qa:approved`: triggers board move to Code Review.
105
+ - `qa:needs-work`: signals the PR requires changes and halts the flow.
106
+ - Never add or remove stage:* labels manually, except for stage:brainstorming as the initial label when starting work. All other stage transitions are owned by GitHub Actions automation and the PM.
84
107
  {{EXTRA_DONT}}
85
108
 
86
109
  ## Project Standards
@@ -4,9 +4,8 @@
4
4
 
5
5
  | Column | Meaning | Who moves the card |
6
6
  |---|---|---|
7
- | 💡 Idea — don't move manually to Exploration | Backlog — tell agent: "work on issue #XX" | Don't move manually |
8
- | 🔍 Exploration | Claude is analyzing code and context | Label `stage:exploration` |
9
- | 🧠 Brainstorming | Claude proposed approaches, awaiting PM gate | Label `stage:brainstorming` |
7
+ | 💡 Idea | Backlog — tell agent: "work on issue #XX" | Don't move manually |
8
+ | 🧠 Brainstorming | AI reading context, proposing approaches and trade-offs | Label `stage:brainstorming` |
10
9
  | 📐 Detail Solution | Claude is writing the technical spec | Label `stage:detailing` |
11
10
  | ✅ Approval | Spec ready, awaiting `spec:approved` label | Label `spec:approved` |
12
11
  | ⚙️ Development | Agent implementing the spec | Label `stage:development` |
@@ -37,7 +36,6 @@ REPO = {{REPO_OWNER}}/{{REPO_NAME}}
37
36
  | Column | Option ID |
38
37
  |---|---|
39
38
  | 💡 Idea | `{{ID_IDEA}}` |
40
- | 🔍 Exploration | `{{ID_EXPLORATION}}` |
41
39
  | 🧠 Brainstorming | `{{ID_BRAINSTORMING}}` |
42
40
  | 📐 Detail Solution | `{{ID_DETAIL}}` |
43
41
  | ✅ Approval | `{{ID_APPROVAL}}` |
@@ -70,7 +68,6 @@ REPO = {{REPO_OWNER}}/{{REPO_NAME}}
70
68
 
71
69
  | Label | Entity | Color | Meaning |
72
70
  |---|---|---|---|
73
- | `stage:exploration` | Issue | Purple | Issue is being evaluated |
74
71
  | `stage:brainstorming` | Issue | Pink | Proposed approaches awaiting PM gate |
75
72
  | `stage:detailing` | Issue | Blue | Technical spec is being written |
76
73
  | `stage:development` | Issue | Orange | Agent is implementing the spec |
@@ -81,15 +78,15 @@ REPO = {{REPO_OWNER}}/{{REPO_NAME}}
81
78
  | `qa:needs-work` | PR | Red | QA Agent failed — PR needs changes |
82
79
  | `infra:qa-broken` | PR | Orange | QA Agent error — manual review required |
83
80
  | `type:us` | Issue | Blue | New feature or behavioral change — full flow |
84
- | `type:task` | Issue | Yellow | Operational/non-functional change — skips brainstorming |
85
- | `type:bug` | Issue | Red | Something broken — skips brainstorming |
81
+ | `type:task` | Issue | Yellow | Operational/non-functional change — full flow |
82
+ | `type:bug` | Issue | Red | Something broken — full flow |
86
83
  | `type:spike` | Issue | Gray | Research/evaluation — never reaches Development |
87
84
 
88
85
  ## Approval Gates
89
86
 
90
87
  **Gate 1 — PM/Ideation (Brainstorming):**
91
- You comment on the issue approving one of the approaches proposed by the ideation agent.
92
- Format: *"Approved — proceed with option X."*
88
+ Agent presents problem summary + 2–3 solution options in a single message. You select an approach.
89
+ Format: *"Option X"* or *"Go with B"* or *"Approved — proceed with option X."*
93
90
 
94
91
  **Gate 2 — Tech Lead (Spec):**
95
92
  You add the `spec:approved` label to the issue after reviewing the technical spec in the body.
@@ -101,13 +98,24 @@ The `type:*` label is the authoritative signal — set automatically by the agen
101
98
 
102
99
  | Label | Flow |
103
100
  |---|---|
104
- | `type:us` | Full flow — exploration → brainstorming → Gate 1 → detailing → approval |
105
- | `type:task` | Skips brainstorming exploration → detailing → approval |
106
- | `type:bug` | Skips brainstorming exploration → detailing → approval |
107
- | `type:spike` | Skips brainstorming exploration → detailing → conclusion comment (never reaches Development) |
101
+ | `type:us` | brainstorming → Gate 1 → detailing → approval |
102
+ | `type:task` | brainstorming Gate 1 → detailing → approval |
103
+ | `type:bug` | brainstorming Gate 1 → detailing → approval |
104
+ | `type:spike` | brainstorming Gate 1 → detailing → conclusion comment (never reaches Development) |
108
105
 
109
106
  If no `type:*` label present and agent confidence < 85%, defaults to `type:us` (safe fallback — never skips gates by omission).
110
107
 
108
+ ## Bypass Mechanism
109
+
110
+ Agents MUST NOT skip any stage. The ONLY authorized bypasses are:
111
+
112
+ | Mechanism | Who authorizes | What it bypasses |
113
+ |---|---|---|
114
+ | `human-approved` label on issue | PM (human) only | All stage gates |
115
+ | Branch prefix `hotfix/` | PM (human) only | PR gate only |
116
+
117
+ Agents MUST NOT self-authorize a bypass. Stop and ask the PM explicitly.
118
+
111
119
  ## Definition of Done
112
120
 
113
121
  An issue is truly done when: