create-agentic-pdlc 2.3.0 → 3.0.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 (64) hide show
  1. package/.agentic-pdlc/hooks/pdlc-stage-gate.sh +37 -10
  2. package/.agentic-pdlc/metrics/raw/2026-W22.jsonl +114 -0
  3. package/.claude/settings.json +18 -0
  4. package/.coderabbit.yaml +35 -0
  5. package/.github/ISSUE_TEMPLATE/bug.md +53 -0
  6. package/.github/ISSUE_TEMPLATE/feature.md +54 -0
  7. package/.github/ISSUE_TEMPLATE/task.md +33 -0
  8. package/.github/workflows/add-to-board.yml +1 -1
  9. package/.github/workflows/agent-trigger.yml +4 -4
  10. package/.github/workflows/ci.yml +1 -1
  11. package/.github/workflows/npm-publish.yml +2 -2
  12. package/.github/workflows/pdlc-health-check.yml +1 -1
  13. package/.github/workflows/pdlc-stage-gate.yml +2 -2
  14. package/.github/workflows/project-automation.yml +25 -40
  15. package/AGENTS.md +50 -8
  16. package/CLAUDE.md +3 -1
  17. package/README.md +33 -32
  18. package/SETUP.md +2 -1
  19. package/adapters/claude-code/skill.md +39 -14
  20. package/adapters/hooks/pdlc-stage-gate.sh +3 -8
  21. package/bin/cli.js +555 -194
  22. package/docs/pdlc.md +5 -5
  23. package/docs/superpowers/plans/2026-05-28-jules-label-pat-split.md +240 -0
  24. package/docs/superpowers/plans/2026-05-29-agentic-pulse-rework-taxonomy.md +474 -0
  25. package/docs/superpowers/plans/2026-05-29-qa-gate-enforcement.md +354 -0
  26. package/docs/superpowers/plans/2026-06-04-spec-format-issue-template.md +160 -0
  27. package/docs/superpowers/plans/2026-06-04-two-tier-installer.md +1056 -0
  28. package/docs/superpowers/specs/2026-05-29-agentic-pulse-rework-taxonomy-design.md +122 -0
  29. package/docs/superpowers/specs/2026-06-04-spec-format-issue-template-design.md +46 -0
  30. package/package.json +2 -2
  31. package/templates/.github/ISSUE_TEMPLATE/bug.md +53 -0
  32. package/templates/.github/ISSUE_TEMPLATE/feature.md +54 -0
  33. package/templates/.github/ISSUE_TEMPLATE/task.md +33 -0
  34. package/templates/.github/workflows/add-to-board.yml +4 -4
  35. package/templates/.github/workflows/agent-trigger.yml +22 -13
  36. package/{.agentic-pdlc/templates → templates}/.github/workflows/agentic-metrics.yml +150 -27
  37. package/templates/.github/workflows/ci.yml +1 -1
  38. package/templates/.github/workflows/pdlc-health-check.yml +1 -1
  39. package/templates/.github/workflows/pdlc-stage-gate.yml +2 -2
  40. package/templates/.github/workflows/project-automation.yml +71 -32
  41. package/templates/.github/workflows/qa-agent.yml +32 -18
  42. package/templates/.github/workflows/qa-gate.yml +51 -0
  43. package/templates/full/AGENTS.md +143 -0
  44. package/templates/full/CLAUDE.md +30 -0
  45. package/templates/{docs → full/docs}/pdlc.md +4 -4
  46. package/templates/lite/AGENTS.md +121 -0
  47. package/templates/lite/CLAUDE.md +44 -0
  48. package/tests/cli.test.js +32 -0
  49. package/.agentic-pdlc/templates/.github/CODEOWNERS +0 -5
  50. package/.agentic-pdlc/templates/.github/copilot-instructions.md +0 -12
  51. package/.agentic-pdlc/templates/.github/workflows/add-to-board.yml +0 -38
  52. package/.agentic-pdlc/templates/.github/workflows/agent-trigger.yml +0 -146
  53. package/.agentic-pdlc/templates/.github/workflows/auto-approve.yml +0 -16
  54. package/.agentic-pdlc/templates/.github/workflows/ci.yml +0 -54
  55. package/.agentic-pdlc/templates/.github/workflows/pdlc-health-check.yml +0 -121
  56. package/.agentic-pdlc/templates/.github/workflows/pdlc-stage-gate.yml +0 -51
  57. package/.agentic-pdlc/templates/.github/workflows/project-automation.yml +0 -274
  58. package/.agentic-pdlc/templates/.github/workflows/protect-workflows.yml +0 -21
  59. package/.agentic-pdlc/templates/.github/workflows/qa-agent.yml +0 -128
  60. package/.agentic-pdlc/templates/AGENTS.md +0 -104
  61. package/.agentic-pdlc/templates/docs/pdlc.md +0 -123
  62. package/.github/workflows/agentic-metrics.yml +0 -422
  63. package/.github/workflows/qa-agent.yml +0 -128
  64. package/templates/AGENTS.md +0 -115
@@ -31,7 +31,7 @@ jobs:
31
31
  steps:
32
32
  - name: Detect Label and Move Issue
33
33
  if: ${{ env.PROJECT_TOKEN != '' && env.PROJECT_ID != '{{PROJECT_ID}}' }}
34
- uses: actions/github-script@v7
34
+ uses: actions/github-script@v8
35
35
  with:
36
36
  github-token: ${{ env.PROJECT_TOKEN }}
37
37
  script: |
@@ -51,9 +51,6 @@ jobs:
51
51
  } else if (labelName === 'stage:development') {
52
52
  targetStatusId = process.env.STATUS_DEVELOPMENT;
53
53
  stageName = 'Development';
54
- } else if (labelName === 'stage:testing') {
55
- targetStatusId = process.env.STATUS_TESTING;
56
- stageName = 'Testing';
57
54
  }
58
55
 
59
56
  if (!targetStatusId) {
@@ -91,7 +88,7 @@ jobs:
91
88
  # steps:
92
89
  # - name: Move issue to Idea
93
90
  # if: ${{ env.PROJECT_TOKEN != '' && env.PROJECT_ID != '{{PROJECT_ID}}' }}
94
- # uses: actions/github-script@v7
91
+ # uses: actions/github-script@v8
95
92
  # with:
96
93
  # github-token: ${{ env.PROJECT_TOKEN }}
97
94
  # script: |
@@ -111,17 +108,17 @@ jobs:
111
108
  # });
112
109
  # console.log(`Issue #${number} moved to Idea`);
113
110
 
114
- # PR Opened → Move linked issue to Testing (Variant B — QA Agent enabled)
111
+ # PR Opened → Move linked issue to Code Review / PR
115
112
  move-card-on-pr-open:
116
- name: Open PR → Testing
113
+ name: Open PR → Code Review / PR
117
114
  if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened')
118
115
  runs-on: ubuntu-latest
119
116
  env:
120
117
  PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
121
118
  steps:
122
- - name: Move linked issue to Testing
119
+ - name: Move linked issue to Code Review / PR
123
120
  if: ${{ env.PROJECT_TOKEN != '' && env.PROJECT_ID != '{{PROJECT_ID}}' }}
124
- uses: actions/github-script@v7
121
+ uses: actions/github-script@v8
125
122
  with:
126
123
  github-token: ${{ env.PROJECT_TOKEN }}
127
124
  script: |
@@ -131,7 +128,6 @@ jobs:
131
128
  const { data: pr } = await github.rest.pulls.get({ owner, repo, pull_number: prNumber });
132
129
  const body = pr.body ?? '';
133
130
 
134
- // Extract issues linked via "Closes #N", "Fixes #N", "Resolves #N"
135
131
  const linkedIssues = [...body.matchAll(/(?:Closes?|Fixes?|Resolves?)\s+#(\d+)/gi)]
136
132
  .map(m => parseInt(m[1]));
137
133
 
@@ -148,11 +144,11 @@ jobs:
148
144
  }
149
145
  }`, {
150
146
  p: process.env.PROJECT_ID, i: item.id, f: process.env.STATUS_FIELD_ID,
151
- v: { singleSelectOptionId: process.env.STATUS_TESTING }
147
+ v: { singleSelectOptionId: process.env.STATUS_CODE_REVIEW_PR }
152
148
  });
153
149
  };
154
150
 
155
- const stageLabelsToRemove = ['stage:development', 'stage:brainstorming', 'stage:detailing', 'stage:approval', 'jules', 'agent:working'];
151
+ const stageLabelsToRemove = ['stage:development', 'stage:brainstorming', 'stage:detailing', 'stage:testing', 'jules'];
156
152
 
157
153
  if (linkedIssues.length > 0) {
158
154
  for (const n of linkedIssues) {
@@ -161,27 +157,26 @@ jobs:
161
157
  for (const label of stageLabelsToRemove) {
162
158
  await github.rest.issues.removeLabel({ owner, repo, issue_number: n, name: label }).catch(() => {});
163
159
  }
164
- await github.rest.issues.addLabels({ owner, repo, issue_number: n, labels: ['stage:testing'] }).catch(() => {});
165
- console.log(`Issue #${n} → Testing (labels updated)`);
160
+ console.log(`Issue #${n} Code Review / PR`);
166
161
  }
167
162
  } else {
168
163
  await moveItem(pr.node_id);
169
- console.log(`PR #${prNumber} → Testing (no linked issue)`);
164
+ console.log(`PR #${prNumber} → Code Review / PR (no linked issue)`);
170
165
  }
171
166
 
172
167
  await github.rest.issues.addLabels({ owner, repo, issue_number: prNumber, labels: ['pr:in-review'] }).catch(() => {});
173
168
 
174
- # QA Approved → Move linked issue to Code Review / PR
175
- move-card-on-qa-pass:
176
- name: qa:approved → Code Review / PR
177
- if: github.event_name == 'pull_request' && github.event.action == 'labeled' && github.event.label.name == 'qa:approved'
169
+ # Review Approved → Move linked issue to Code Review / PR + swap PR labels
170
+ move-card-on-review-approved:
171
+ name: Approved PR → Code Review / PR
172
+ if: github.event_name == 'pull_request_review' && github.event.review.state == 'approved'
178
173
  runs-on: ubuntu-latest
179
174
  env:
180
175
  PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
181
176
  steps:
182
- - name: Move linked issue to Code Review / PR
177
+ - name: Move linked issue to Code Review and swap PR labels
183
178
  if: ${{ env.PROJECT_TOKEN != '' && env.PROJECT_ID != '{{PROJECT_ID}}' }}
184
- uses: actions/github-script@v7
179
+ uses: actions/github-script@v8
185
180
  with:
186
181
  github-token: ${{ env.PROJECT_TOKEN }}
187
182
  script: |
@@ -215,6 +210,9 @@ jobs:
215
210
  for (const n of linkedIssues) {
216
211
  const { data: issue } = await github.rest.issues.get({ owner, repo, issue_number: n });
217
212
  await moveItem(issue.node_id);
213
+ if (issue.labels?.some(l => l.name === 'stage:testing')) {
214
+ await github.rest.issues.removeLabel({ owner, repo, issue_number: n, name: 'stage:testing' }).catch(() => {});
215
+ }
218
216
  console.log(`Issue #${n} → Code Review / PR`);
219
217
  }
220
218
  } else {
@@ -222,22 +220,6 @@ jobs:
222
220
  console.log(`PR #${prNumber} → Code Review / PR (no linked issue)`);
223
221
  }
224
222
 
225
- # Review Approved → Add Label
226
- move-card-on-review-approved:
227
- name: Approved PR → Add Label
228
- if: github.event_name == 'pull_request_review' && github.event.review.state == 'approved'
229
- runs-on: ubuntu-latest
230
- env:
231
- PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
232
- steps:
233
- - name: Swap PR labels
234
- if: ${{ env.PROJECT_TOKEN != '' && env.PROJECT_ID != '{{PROJECT_ID}}' }}
235
- uses: actions/github-script@v7
236
- with:
237
- github-token: ${{ env.PROJECT_TOKEN }}
238
- script: |
239
- const prNumber = context.payload.pull_request.number;
240
- const { owner, repo } = context.repo;
241
223
  try { await github.rest.issues.removeLabel({ owner, repo, issue_number: prNumber, name: 'pr:in-review' }); } catch {}
242
224
  await github.rest.issues.addLabels({ owner, repo, issue_number: prNumber, labels: ['pr:approved'] }).catch(() => {});
243
225
 
@@ -251,7 +233,7 @@ jobs:
251
233
  steps:
252
234
  - name: Move issue to Production
253
235
  if: ${{ env.PROJECT_TOKEN != '' && env.PROJECT_ID != '{{PROJECT_ID}}' }}
254
- uses: actions/github-script@v7
236
+ uses: actions/github-script@v8
255
237
  with:
256
238
  github-token: ${{ env.PROJECT_TOKEN }}
257
239
  script: |
@@ -279,6 +261,9 @@ jobs:
279
261
  for (const n of linkedIssues) {
280
262
  const { data: issue } = await github.rest.issues.get({ owner, repo, issue_number: n });
281
263
  await moveItem(issue.node_id);
264
+ if (issue.labels?.some(l => l.name === 'stage:approval')) {
265
+ await github.rest.issues.removeLabel({ owner, repo, issue_number: n, name: 'stage:approval' }).catch(() => {});
266
+ }
282
267
  console.log(`Issue #${n} → Production`);
283
268
  }
284
269
  } else {
@@ -291,7 +276,7 @@ jobs:
291
276
  runs-on: ubuntu-latest
292
277
  steps:
293
278
  - name: Remove transient labels
294
- uses: actions/github-script@v7
279
+ uses: actions/github-script@v8
295
280
  with:
296
281
  github-token: ${{ secrets.GITHUB_TOKEN }}
297
282
  script: |
@@ -300,7 +285,7 @@ jobs:
300
285
  const toRemove = [
301
286
  'stage:brainstorming', 'stage:detailing',
302
287
  'stage:approval', 'stage:development', 'stage:testing',
303
- 'agent:working', 'qa:needs-work', 'pr:in-review', 'jules'
288
+ 'pr:in-review', 'jules'
304
289
  ];
305
290
  for (const label of toRemove) {
306
291
  await github.rest.issues.removeLabel({ owner, repo, issue_number, name: label }).catch(() => {});
package/AGENTS.md CHANGED
@@ -27,14 +27,55 @@ Always start from the current `main` HEAD. Never work over stale snapshots.
27
27
  ## Mandatory Workflow
28
28
 
29
29
  0. **Identity**: Always prefix your GitHub comments with `🤖 **Agent:** ` to distinguish yourself.
30
- 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"`).
31
- 2. Read the issue entirely understand its type (US/BUG/TASK/SPIKE) and the Acceptance Criteria.
32
- 3. Read `docs/pdlc.md` understand the PDLC and the Definition of Done in this project.
33
- 4. Read all files mentioned in the issue's technical context.
34
- 5. Implement the **minimum viable change** that satisfies the ACsdo not refactor beyond scope.
35
- 6. Run tests: `echo "No tests/build needed."`
36
- 7. Run typecheck: `echo "No typecheck needed."`
37
- 8. Create a Pull Request with `Closes #N` in the body automation moves the board.
30
+ 1. **Stage Check**: Before applying any label or taking any action, run `gh issue view <N> --json labels,title` to determine the issue's current stage. State: *"Issue #N [title] is currently at `<stage>`. Requesting confirmation to advance to `<next>`."* Wait for an explicit stage-advancement signal in this conversation turn. A prioritization signal ("work on X", "tackle X next") does **not** count as confirmation — only an explicit signal counts (e.g. "start brainstorming", "yes advance", "go"). **Exceptions — skip this step and proceed directly**:
31
+ - `spec:approved` begin implementation (gate already passed)
32
+ - `stage:development` or `stage:testing` issue is owned by automation; do not intervene unless explicitly asked to fix a specific problem
33
+ - `stage:approval` spec already written; wait for PM to add `spec:approved` before doing anything
34
+ 2. **Initial State**: Apply the `stage:brainstorming` label using the GitHub CLI (`gh issue edit <N> --add-label "stage:brainstorming"`). **Exception pre-spec'd issue**: if the issue body already contains all required spec sections (`## Problem`, `## Solution`, `## Acceptance Criteria`, `## Edge Cases`, `## Out of Scope`, `## Files to Modify`) all present and non-empty — apply `stage:approval` directly in a single call instead, skipping `stage:brainstorming` and `stage:detailing`.
35
+ 3. Read the issue entirely — understand its type (US/BUG/TASK/SPIKE) and the Acceptance Criteria.
36
+ 4. Read `docs/pdlc.md` understand the PDLC and the Definition of Done in this project.
37
+ 5. Read all files mentioned in the issue's technical context.
38
+ 6. Implement the **minimum viable change** that satisfies the ACs — do not refactor beyond scope.
39
+ 7. Run tests: `echo "No tests/build needed."`
40
+ 8. Run typecheck: `echo "No typecheck needed."`
41
+ 9. Create a Pull Request with `Closes #N` in the body — automation moves the board.
42
+
43
+ ## Spec Format
44
+
45
+ When writing or rewriting an issue body during detailing, include ALL sections below. Omitting any section blocks `stage:approval`.
46
+
47
+ ```
48
+ ## Problem
49
+ [1-3 sentences. What fails. Who affected. Measured impact.]
50
+
51
+ ## Sprint Goal / Success Metrics
52
+ | Metric | Baseline | Target | When |
53
+ |--------|----------|--------|------|
54
+
55
+ ## Solution
56
+ [Behavioral description of what is built. No implementation details.]
57
+
58
+ ## Acceptance Criteria
59
+ **AC1 — [name]**
60
+ - Given [precondition]
61
+ - When [action]
62
+ - Then [outcome]
63
+
64
+ ## Edge Cases
65
+ - EC1: [condition] → [expected behavior]
66
+
67
+ ## Out of Scope
68
+ - [item] — reason
69
+
70
+ ## Non-Functional Requirements
71
+ - Performance: [metric with number]
72
+ - Security: [constraint]
73
+ - Reliability: [constraint]
74
+ > For pure docs/markdown issues with zero runtime behavior, include the NFRs section and state "N/A".
75
+
76
+ ## Files to Modify
77
+ - `path/to/file` — what changes
78
+ ```
38
79
 
39
80
  ## What NOT to do
40
81
 
@@ -50,3 +91,4 @@ Always start from the current `main` HEAD. Never work over stale snapshots.
50
91
  - **Lint/Types:** `echo "No tests/build needed."`
51
92
  - **Typecheck:** `echo "No typecheck needed."`
52
93
  - **Build:** `echo "No tests/build needed."`
94
+ - **Canonical secret name:** `PROJECT_TOKEN` (not `PROJECT_PAT`) — use this in all workflow files, both live and templates
package/CLAUDE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # agentic-pdlc
2
2
 
3
- **What it is:** npm CLI (`npx create-agentic-pdlc`) that installs a PDLC workflow for AI agent projects. Stack: Markdown + GitHub Actions YAML only — never complex Node/Python/Bash scripts.
3
+ **What it is:** npm CLI (`npx create-agentic-pdlc`) that installs a PDLC workflow for AI agent projects.
4
4
 
5
5
  **Workflow:** `stage:brainstorming` → `stage:detailing` → `spec:approved` → `stage:development` → PR → merge. Labels move the board automatically.
6
6
 
@@ -33,6 +33,8 @@ The PreToolUse hook will block `gh pr create` automatically if this rule is viol
33
33
 
34
34
  **Detailing is fully autonomous.** Write the complete spec, add it to the issue, advance to `stage:approval` — no confirmation needed. Then **stop and wait** for human to add `spec:approved` before any implementation.
35
35
 
36
+ **Spec destination: the issue body.** Write spec content to the issue body using `gh issue edit <N> --body "..."` — not to a file. A file is acceptable as optional reference only. Automation checks the issue body for `## Acceptance Criteria` and `## Files to Modify` to advance the stage; content that exists only in a file is invisible to it.
37
+
36
38
  ## Stage Transition Rules (non-negotiable)
37
39
 
38
40
  MUST apply `stage:brainstorming` label immediately on starting work — before
package/README.md CHANGED
@@ -1,57 +1,54 @@
1
- # 🤖 Agentic PDLC Framework
1
+ # 🤖 Agentic PDLC
2
2
 
3
- > Do your AI agents build features that don't match the spec?
4
- > Do you find bugs and architecture violations only at the end of the lifecycle?
5
- > Are you the one manually moving cards across your board — every single time?
3
+ > Does your AI agent add code you didn't ask for?
4
+ > Does it skip the spec and jump straight to a PR?
5
+ > Does it ignore the rules in your CLAUDE.md?
6
6
 
7
- **Agentic PDLC** gives your agents a shared rulebook, a self-moving board, and a CI that won't let broken code reach production. One `npx` command to set up.
7
+ **Agentic PDLC** gives your agent a brake it can't ignore a hook that makes it write the spec first, keep changes small, and stop at each gate. One `npx` to install.
8
8
 
9
9
  <div align="center">
10
- <img src=".github/assets/agentic-pdlc-flow.svg" alt="Agentic PDLC Architecture Flow" width="100%">
10
+ <img src=".github/assets/agentic-pdlc-flow.svg" alt="Agentic PDLC: Upstream idea-to-spec, gated by spec:approved, into Downstream spec-to-production" width="100%">
11
11
  </div>
12
12
 
13
- Solo devs and small teams hit the same wall: one agent writes the spec, another implements it differently, a third reviews without knowing either. Agentic PDLC gives all of them a shared brief, automates the board, and puts a CI guard between your agents and production.
13
+ ---
14
+
15
+ ## Two modes — pick yours
16
+
17
+ **`lite` (default) — the brake**
18
+ Your agent writes the spec, waits for your approval, then implements it. It won't add code you didn't ask for. It won't open a PR before the spec is approved. It won't skip your `CLAUDE.md` rules — because the gate is a hook, not text the agent can ignore. Value on your first PR.
19
+
20
+ **`--agentic` — see your whole pipeline**
21
+ Everything in `lite`, plus a self-moving kanban board that shows your full product lifecycle, from **Idea → Production**. It makes transparent what needs your attention/approval, what's been done by the agent, and what's ready to merge. It supports as many agents as you need.
14
22
 
15
23
  ---
16
24
 
17
25
  ## ⚡ Why it works
18
26
 
19
- - 🗺️ **A transparent lifecycle** — Every feature travels a Kanban board from Idea to Production. You always know where things are.
20
- - 🤖 **A board that moves itself** — When you approve a spec, the card moves. When an agent opens a PR, the card moves. You just approve or reject.
21
- - 🧠 **Agents that agree with each other**One briefing (`AGENTS.md`), read by every agent. Claude, Jules, Gemini all pulling in the same direction, without you copy-pasting context between tabs.
22
- - 🛡️ **Code that can't silently break production** — A CI auditor checks every PR for architecture violations before anything reaches your main branch. *(Maturity Model — coming soon)*
27
+ - 🛑 **A brake the agent can't ignore** — the gate is a hook, not text in CLAUDE.md. Text gets ignored; a hook does not.
28
+ - 📋 **Spec before code** — the agent can't open a PR until the spec is approved, with acceptance criteria, edge cases, and files to change.
29
+ - 🗺️ **See your whole pipeline** *(`--agentic` only)*a board tracks every task from idea to production, and the gate between spec and code stays yours. You approve before anything ships.
23
30
 
24
31
  ---
25
32
 
26
33
  ## 🚀 Quick Start
27
34
 
28
- Run this in the root of your project:
29
-
30
35
  ```bash
31
36
  npx create-agentic-pdlc
32
37
  ```
33
38
 
34
- The CLI sets up your GitHub board, labels, and workflows, then hands over to your AI assistant to finish the configuration interactively. No YAML editing. No manual config.
39
+ Installs `lite` by default your AGENTS.md, CLAUDE.md, and the gate hook. Your AI assistant finishes the setup with you; no YAML to edit.
35
40
 
36
- **Already set up? Add or reconfigure optional agents at any time:**
41
+ **Want the full board and pipeline view?**
37
42
 
38
43
  ```bash
39
- npx create-agentic-pdlc --update
44
+ npx create-agentic-pdlc --agentic
40
45
  ```
41
46
 
42
- Detects what is already configured (Jules, QA Agent, Sentinel) and interactively sets up what is missing. Your existing board IDs and customizations are never touched.
43
-
44
- ---
45
-
46
- ## 🏗️ How It Works
47
-
48
- The framework splits work into two phases:
49
-
50
- ### 1. You + AI: Idea → Spec
51
- Use conversational AI (e.g., **Claude Code**, **Gemini CLI**) as your brainstorming partner. Together, you flesh out user stories, acceptance criteria, and technical specifications until they are solid.
47
+ **Already set up? Add or change things any time:**
52
48
 
53
- ### 2. Your agents: Spec → Production
54
- Once you approve the spec, autonomous implementation agents (e.g., **Jules**, **Sweep**, **Copilot Workspace**) pick up the task. The board moves automatically; the CI auditor guards the main branch.
49
+ ```bash
50
+ npx create-agentic-pdlc --update
51
+ ```
55
52
 
56
53
  ---
57
54
 
@@ -71,11 +68,15 @@ One shared brief (`AGENTS.md`). Every agent reads it.
71
68
 
72
69
  ## 📦 What you get
73
70
 
74
- After setup, your project has:
71
+ **`lite` (default)**
72
+ - **`AGENTS.md`** — the shared brief every agent reads; your rules, once
73
+ - **`CLAUDE.md`** — keep-changes-small rule + the stage gates
74
+ - **`.agentic-pdlc/hooks/pdlc-stage-gate.sh`** — the hook; the agent can't open a PR until the spec is approved
75
75
 
76
- - **`AGENTS.md`** — The shared brief every agent reads. Your rules, once.
77
- - **`docs/pdlc.md`** Your pipeline map: board columns, IDs, and who does what.
78
- - **`.github/workflows/`**Three automations: board moves itself, agent wakes on spec approval, CI audits every PR.
76
+ **`--agentic` (opt-in)**
77
+ Everything in lite, plus:
78
+ - **`docs/pdlc.md`**your pipeline map: board columns and who does what
79
+ - **`.github/workflows/`** — board automation: moves cards on spec approval, PR open, and CI pass
79
80
 
80
81
  ---
81
82
 
package/SETUP.md CHANGED
@@ -63,7 +63,7 @@ npx create-agentic-pdlc
63
63
  The CLI will:
64
64
  1. Ask you which AI Agent you use (Claude Code, Cursor, etc.).
65
65
  2. Copy the system instructions pointing to our interactive Setup Mode.
66
- 3. Automatically download the base templates to `.agentic-pdlc/templates/`.
66
+ 3. Automatically install the base templates into your project.
67
67
 
68
68
  Once the CLI finishes, it will instruct you to open your AI agent and run the **Setup Mode**. Your AI agent will then ask you the required project variables interactively and generate `AGENTS.md`, `docs/pdlc.md`, and the GitHub Actions for you!
69
69
 
@@ -169,6 +169,7 @@ The issue appears in your GitHub notifications automatically — zero extra setu
169
169
  ```bash
170
170
  cp .agentic-pdlc/templates/.github/workflows/agentic-metrics.yml .github/workflows/agentic-metrics.yml
171
171
  ```
172
+ > If the file is missing, re-run `npx create-agentic-pdlc` to update your installed templates.
172
173
 
173
174
  2. Commit and push. The first pulse runs next Sunday, or trigger it manually:
174
175
  ```bash
@@ -22,12 +22,14 @@ Specifically, check for:
22
22
 
23
23
  If any of these files are missing, you are in **Setup Mode**. Do not proceed with feature requests until setup is complete.
24
24
 
25
+ **Lite profile note:** If `cli-context.json` contains `"profile": "lite"`, the only mandatory artifacts are `AGENTS.md` and `CLAUDE.md` — `docs/pdlc.md` and the workflow files are not installed in the lite profile. Skip checks for those files.
26
+
25
27
  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.
26
28
  2. Acknowledge that the framework is not yet set up.
27
29
  3. **Pre-filled Context:** Before asking any questions, read the following files if they exist:
28
- - `.agentic-pdlc/cli-context.json` — written by the CLI. Contains `projectName`, `repoOwner`, `repoName`, `projectNumber`, `isOrg`, `boardUrl`, and `patAutoSet` (boolean). Use these values directly and skip the corresponding questions. Honor `patAutoSet` in Step 7 and `boardUrl` in Step 10.
29
- - `.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.
30
- - `.agentic-pdlc/templates/.github/workflows/project-automation.yml` — the CLI also pre-fills all ID placeholders here. When writing the workflow file, the remaining `{{...}}` placeholders are only non-ID ones (project name, commands, etc.).
30
+ - `.agentic-pdlc/cli-context.json` — written by the CLI. Contains `projectName`, `repoOwner`, `repoName`, `projectNumber`, `isOrg`, `boardUrl`, `patAutoSet` (boolean), and `profile` (`"lite"` or `"full"`). Use these values directly and skip the corresponding questions. Honor `patAutoSet` in Step 7 and `boardUrl` in Step 10.
31
+ - `.agentic-pdlc/templates/docs/pdlc.md` — **only present in the `full` profile.** If absent (lite install), skip the Board IDs question group entirely and skip all steps that reference this file. If present, the CLI pre-fills PROJECT_ID, STATUS_FIELD_ID, REPO_OWNER, REPO_NAME, and all 9 column option IDs; if none still contain `{{...}}` placeholders, skip the Board IDs question group.
32
+ - `.agentic-pdlc/templates/.github/workflows/project-automation.yml` — **only present in the `full` profile.** If absent, skip. If present, the CLI also pre-fills all ID placeholders here; remaining `{{...}}` placeholders are non-ID ones (project name, commands, etc.).
31
33
  4. Interactively ask the user only for the **missing values**, **one group at a time**:
32
34
  - **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.
33
35
  - **Commands:** In the user's detected language, ask for each command with its purpose and concrete examples:
@@ -53,6 +55,8 @@ If any of these files are missing, you are in **Setup Mode**. Do not proceed wit
53
55
  - Jules (`@google-labs-jules`): use `jules` — this is the native label the Jules GitHub App watches. **Do NOT use `agent:jules`** — Jules does not watch that label and the trigger will silently fail.
54
56
  - Other agents: use the handle without `@`, lowercase (e.g. `@my-agent` → `my-agent`).
55
57
  5. Generate and write the missing files replacing the `{{SCREAMING_SNAKE_CASE}}` placeholders using the templates in `.agentic-pdlc/templates/`.
58
+ - **CLAUDE.md:** If `.agentic-pdlc/templates/CLAUDE.md` exists and `CLAUDE.md` does not yet exist at the project root, write it — replacing only `{{PROJECT_NAME}}` with the project name. Skip if CLAUDE.md already exists (never downgrade).
59
+ - **Lite profile:** If `cli-context.json` has `"profile": "lite"`, skip steps that reference `docs/pdlc.md`, `project-automation.yml`, `agent-trigger.yml`, and `pdlc-health-check.yml` — these are not installed in lite.
56
60
  6. Offer to run the `gh` commands for labels (`spec:approved`, `pr:in-review`, `pr:approved`, `architecture-violation`).
57
61
  7. **`PROJECT_PAT` secret (required for board automation):**
58
62
 
@@ -106,21 +110,21 @@ If `AGENTS.md` and `docs/pdlc.md` are present, you are in **Execution Mode**.
106
110
 
107
111
  Reading the issue title and body for type inference is exempt from the initial label requirement: it is metadata already present in the request, not code reading or skill invocation.
108
112
 
109
- 1. Check if issue already has a `type:*` label (`type:us`, `type:task`, `type:bug`, `type:spike`) → if yes, skip to Section 0.1.
113
+ 1. Check if issue already has a `type:*` label (`type:feature`, `type:task`, `type:bug`, `type:spike`) → if yes, skip to Section 0.1.
110
114
  2. Read issue title + body (metadata only — no code reading at this step).
111
115
  3. Classify using these rules:
112
116
  - `type:task` — operational change, config, rename, docs update, non-functional (no user-facing behavior change)
113
117
  - `type:bug` — something broken that should work
114
118
  - `type:spike` — research/evaluation spike, never reaches Development
115
- - `type:us` — new feature, behavioral change, anything product-facing
119
+ - `type:feature` — new feature, behavioral change, anything product-facing
116
120
  4. Confidence ≥ 85% → add inferred label: `gh issue edit <N> --add-label "type:<inferred>"`
117
- 5. Confidence < 85% → default to `type:us`: `gh issue edit <N> --add-label "type:us"`
121
+ 5. Confidence < 85% → default to `type:feature`: `gh issue edit <N> --add-label "type:feature"`
118
122
 
119
123
  **Type drives the PDLC flow:**
120
124
 
121
125
  | Type | Flow |
122
126
  |---|---|
123
- | `type:us` | brainstorming → Gate 1 → detailing → approval |
127
+ | `type:feature` | brainstorming → Gate 1 → detailing → approval |
124
128
  | `type:task` | brainstorming → Gate 1 → detailing → approval |
125
129
  | `type:bug` | brainstorming → Gate 1 → detailing → approval |
126
130
  | `type:spike` | brainstorming → Gate 1 → detailing → conclusion comment (never reaches Development) |
@@ -157,18 +161,39 @@ When asked to work on a feature, you will:
157
161
  - Stop and wait for the human PM's explicit approval (Gate 1).
158
162
 
159
163
  ### 2. Creating the Spec
160
- Once approved, you will detail the solution directly into the GitHub Issue body. Focus on precise Acceptance Criteria.
161
- **IMPORTANT:** You must always rewrite the full issue body to include both the user story and the Acceptance Criteria. Do not simply append the ACs to the existing text. Use this format:
164
+ Once approved, detail the solution directly into the GitHub Issue body. Always rewrite the full issue body — never append only ACs to existing text. Include ALL sections below. Omitting any section blocks `stage:approval`. Use this format:
162
165
 
163
166
  ```
164
- **As** [user],
165
- **I want** [action],
166
- **so that** [benefit].
167
+ ## Problem
168
+ [1-3 sentences. What fails. Who affected. Measured impact.]
167
169
 
168
- ---
170
+ ## Sprint Goal / Success Metrics
171
+ | Metric | Baseline | Target | When |
172
+ |--------|----------|--------|------|
173
+
174
+ ## Solution
175
+ [Behavioral description of what is built. No implementation details.]
169
176
 
170
177
  ## Acceptance Criteria
171
- ...
178
+ **AC1 — [name]**
179
+ - Given [precondition]
180
+ - When [action]
181
+ - Then [outcome]
182
+
183
+ ## Edge Cases
184
+ - EC1: [condition] → [expected behavior]
185
+
186
+ ## Out of Scope
187
+ - [item] — reason
188
+
189
+ ## Non-Functional Requirements
190
+ - Performance: [metric with number]
191
+ - Security: [constraint]
192
+ - Reliability: [constraint]
193
+ > For pure docs/markdown issues with zero runtime behavior, include the NFRs section and state "N/A".
194
+
195
+ ## Files to Modify
196
+ - `path/to/file` — what changes
172
197
  ```
173
198
 
174
199
  ### 3. Handoff
@@ -26,19 +26,14 @@ fi
26
26
 
27
27
  LABELS=$(gh issue view "$ISSUE_NUM" --json labels --jq '[.labels[].name] | join(" ")' 2>/dev/null || echo "")
28
28
 
29
- if echo "$LABELS" | grep -qw "spec:approved"; then
30
- echo "✅ PDLC: Issue #$ISSUE_NUM spec approved by PM — gate passed."
31
- exit 0
32
- fi
33
-
34
- if echo "$LABELS" | grep -qw "stage:development"; then
35
- echo "✅ PDLC: Issue #$ISSUE_NUM in development (spec already approved) — gate passed."
29
+ if echo "$LABELS" | grep -qw "spec:approved" || echo "$LABELS" | grep -qw "stage:approval" || echo "$LABELS" | grep -qw "stage:development" || echo "$LABELS" | grep -qw "stage:testing" || echo "$LABELS" | grep -qw "human-approved"; then
30
+ echo "✅ PDLC: Issue #$ISSUE_NUM approved — gate passed."
36
31
  exit 0
37
32
  fi
38
33
 
39
34
  STAGE=$(echo "$LABELS" | tr ' ' '\n' | grep "^stage:" | head -1 || echo "none")
40
35
  echo "❌ PDLC Stage Gate: Issue #$ISSUE_NUM is not approved."
41
36
  echo " Current stage: $STAGE"
42
- echo " Required: spec:approved (set by human PM) or stage:development label on the issue."
37
+ echo " Required: stage:approval OR spec:approved OR stage:development OR stage:testing OR human-approved label on the issue."
43
38
  echo " Emergency bypass: rename branch to hotfix/<issue-number>-<description>."
44
39
  exit 1