create-agentic-pdlc 2.4.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.
- package/.agentic-pdlc/hooks/pdlc-stage-gate.sh +37 -10
- package/.claude/settings.json +18 -0
- package/.coderabbit.yaml +35 -0
- package/.github/workflows/project-automation.yml +13 -67
- package/CLAUDE.md +1 -1
- package/README.md +33 -32
- package/adapters/claude-code/skill.md +7 -3
- package/bin/cli.js +549 -209
- package/docs/superpowers/plans/2026-06-04-spec-format-issue-template.md +160 -0
- package/docs/superpowers/plans/2026-06-04-two-tier-installer.md +1056 -0
- package/docs/superpowers/specs/2026-06-04-spec-format-issue-template-design.md +46 -0
- package/package.json +2 -2
- package/templates/full/CLAUDE.md +30 -0
- package/templates/lite/AGENTS.md +121 -0
- package/templates/lite/CLAUDE.md +44 -0
- package/tests/cli.test.js +32 -0
- package/.github/workflows/agentic-metrics.yml +0 -545
- package/.github/workflows/qa-agent.yml +0 -139
- package/.github/workflows/qa-gate.yml +0 -51
- /package/templates/{AGENTS.md → full/AGENTS.md} +0 -0
- /package/templates/{docs → full/docs}/pdlc.md +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Design: ship spec-format issue template (lite)
|
|
2
|
+
|
|
3
|
+
**Issue:** #157
|
|
4
|
+
**Date:** 2026-06-04
|
|
5
|
+
**Status:** approved
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
`npx create-agentic-pdlc` copies templates to `.agentic-pdlc/templates/` — a path GitHub ignores entirely. Users who open "New Issue" after setup see a blank text box instead of the spec format template.
|
|
10
|
+
|
|
11
|
+
## Decision
|
|
12
|
+
|
|
13
|
+
Copy `templates/.github/ISSUE_TEMPLATE/` directly to `targetDir/.github/ISSUE_TEMPLATE/` during `runSetup()` in `bin/cli.js`. No agent involvement — templates have no `{{PLACEHOLDER}}` substitution, so the CLI can write them directly.
|
|
14
|
+
|
|
15
|
+
## Change
|
|
16
|
+
|
|
17
|
+
**File:** `bin/cli.js`
|
|
18
|
+
|
|
19
|
+
After the existing `copyDirSync(sourceTemplates, targetTemplates)` block (around line 386):
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
// i18n string (add to i18n object)
|
|
23
|
+
issue_templates_copied: t(
|
|
24
|
+
'✅ Issue templates copied to .github/ISSUE_TEMPLATE/',
|
|
25
|
+
'✅ Issue templates copiados para .github/ISSUE_TEMPLATE/',
|
|
26
|
+
'✅ Issue templates copiados a .github/ISSUE_TEMPLATE/'
|
|
27
|
+
),
|
|
28
|
+
|
|
29
|
+
// Copy block (add inside runSetup(), after template copy)
|
|
30
|
+
const sourceIssueTemplates = path.join(sourceDir, 'templates', '.github', 'ISSUE_TEMPLATE');
|
|
31
|
+
const targetIssueTemplates = path.join(targetDir, '.github', 'ISSUE_TEMPLATE');
|
|
32
|
+
if (fs.existsSync(sourceIssueTemplates)) {
|
|
33
|
+
copyDirSync(sourceIssueTemplates, targetIssueTemplates);
|
|
34
|
+
console.log(i18n.issue_templates_copied);
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Edge Cases
|
|
39
|
+
|
|
40
|
+
- `.github/ISSUE_TEMPLATE/` already exists → `copyDirSync` overwrites. Correct — boilerplate, not user customizations.
|
|
41
|
+
- Source dir missing (corrupt install) → guarded by `if (fs.existsSync(...))`, skips silently.
|
|
42
|
+
|
|
43
|
+
## Out of Scope
|
|
44
|
+
|
|
45
|
+
- Changes to template content — existing `feature.md`, `bug.md`, `task.md` already have all required sections.
|
|
46
|
+
- Changes to `adapters/claude-code/skill.md` — agent setup not involved.
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-agentic-pdlc",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Agentic PDLC Framework - Conversational setup for your AI coding assistants",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"bin": {
|
|
7
7
|
"create-agentic-pdlc": "./bin/cli.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"test": "
|
|
10
|
+
"test": "node --test tests/cli.test.js"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [
|
|
13
13
|
"agentic",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!-- agentic-full -->
|
|
2
|
+
## Multi-Agent Pipeline
|
|
3
|
+
|
|
4
|
+
This project uses automated agents beyond the spec gate:
|
|
5
|
+
|
|
6
|
+
| Agent | Role | Trigger |
|
|
7
|
+
|---|---|---|
|
|
8
|
+
| Implementation Agent (Jules or custom) | Implements spec after `spec:approved` | `agent-trigger.yml` |
|
|
9
|
+
| QA Agent | Verifies PR against ACs via GitHub Models | `project-automation.yml` Variant B |
|
|
10
|
+
| Sentinel | Architecture audit via Gemini Code Assist CI | `architecture-violation` label |
|
|
11
|
+
|
|
12
|
+
**QA Labels — automation-owned, never apply manually:**
|
|
13
|
+
- `qa:approved` — QA Agent passed; card moves to Code Review
|
|
14
|
+
- `qa:needs-work` — QA Agent found issues; PR flow halts
|
|
15
|
+
- `infra:qa-broken` — QA Agent error; requires manual review
|
|
16
|
+
|
|
17
|
+
**Board Automation:**
|
|
18
|
+
`project-automation.yml` moves cards between board columns based on labels and PR events.
|
|
19
|
+
Column Option IDs and Project IDs are documented in `docs/pdlc.md`.
|
|
20
|
+
|
|
21
|
+
Read `docs/pdlc.md` for the full board layout, column IDs, and label reference.
|
|
22
|
+
|
|
23
|
+
**Pipeline Updates:**
|
|
24
|
+
To add or configure optional agents (Jules, QA Agent, Sentinel):
|
|
25
|
+
```bash
|
|
26
|
+
npx create-agentic-pdlc --update
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Run this when asked to "update the pipeline", "configure the agents", or "update the board".
|
|
30
|
+
It detects what is already configured and sets up what is missing — without touching user-owned files.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} — AI Agent Instructions
|
|
2
|
+
|
|
3
|
+
This is the contract between the project and any external AI agent
|
|
4
|
+
(Claude Code, Cursor, Copilot, Codex, Sweep, etc.). Read this before committing any change.
|
|
5
|
+
|
|
6
|
+
## Project Overview
|
|
7
|
+
|
|
8
|
+
{{PROJECT_DESCRIPTION}}
|
|
9
|
+
|
|
10
|
+
**Structure:**
|
|
11
|
+
{{PROJECT_STRUCTURE}}
|
|
12
|
+
|
|
13
|
+
## Before Any Change
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git fetch origin && git checkout main && git pull
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Always start from the current `main` HEAD. Never work over stale snapshots.
|
|
20
|
+
|
|
21
|
+
## Invariants / Non-negotiable business rules
|
|
22
|
+
|
|
23
|
+
{{INVARIANTS}}
|
|
24
|
+
<!-- Examples:
|
|
25
|
+
1. **Minimum viable change** — implement exactly what the spec says; no future-proofing.
|
|
26
|
+
2. **Human-in-the-Loop** — No external side-effect actions without explicit human approval.
|
|
27
|
+
3. **Immutable Audit-Log** — INSERT only on audit_log; never UPDATE/DELETE.
|
|
28
|
+
-->
|
|
29
|
+
|
|
30
|
+
## Mandatory Workflow
|
|
31
|
+
|
|
32
|
+
0. **Identity**: Always prefix your GitHub comments with `🤖 **Agent:** ` to distinguish yourself.
|
|
33
|
+
1. **Stage Check**: Run `gh issue view <N> --json labels,title` to determine current stage.
|
|
34
|
+
- `spec:approved` → begin implementation (gate already passed)
|
|
35
|
+
- `stage:approval` → spec written; wait for PM to add `spec:approved`
|
|
36
|
+
- Otherwise → follow the stage gate below
|
|
37
|
+
2. Apply `stage:brainstorming` before reading any code: `gh issue edit <N> --add-label "stage:brainstorming"`
|
|
38
|
+
3. Read the issue entirely — understand type and Acceptance Criteria.
|
|
39
|
+
4. Read all files mentioned in the issue's technical context.
|
|
40
|
+
5. Present problem summary + 2–3 solution options. **Stop and wait for PM choice.**
|
|
41
|
+
6. Once PM selects an approach, write the complete spec into the issue body. Advance to `stage:approval`.
|
|
42
|
+
7. Wait for PM to add `spec:approved`. Then implement the **minimum viable change** that satisfies the ACs.
|
|
43
|
+
8. Run tests: `{{TEST_COMMAND}}`
|
|
44
|
+
9. Create a Pull Request with `Closes #N` in the body.
|
|
45
|
+
|
|
46
|
+
## Spec Format
|
|
47
|
+
|
|
48
|
+
**Destination: the issue body.** Write spec content using `gh issue edit <N> --body "..."` — not to a file.
|
|
49
|
+
Automation checks the issue body for `## Acceptance Criteria` and `## Files to Modify`.
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
## Problem
|
|
53
|
+
[1-3 sentences. What fails. Who affected. Measured impact.]
|
|
54
|
+
|
|
55
|
+
## Sprint Goal / Success Metrics
|
|
56
|
+
| Metric | Baseline | Target | When |
|
|
57
|
+
|--------|----------|--------|------|
|
|
58
|
+
|
|
59
|
+
## Solution
|
|
60
|
+
[Behavioral description of what is built. No implementation details.]
|
|
61
|
+
|
|
62
|
+
## Acceptance Criteria
|
|
63
|
+
**AC1 — [name]**
|
|
64
|
+
- Given [precondition]
|
|
65
|
+
- When [action]
|
|
66
|
+
- Then [outcome]
|
|
67
|
+
|
|
68
|
+
## Edge Cases
|
|
69
|
+
- EC1: [condition] → [expected behavior]
|
|
70
|
+
|
|
71
|
+
## Out of Scope
|
|
72
|
+
- [item] — reason
|
|
73
|
+
|
|
74
|
+
## Non-Functional Requirements
|
|
75
|
+
- Performance: [metric with number]
|
|
76
|
+
- Security: [constraint]
|
|
77
|
+
- Reliability: [constraint]
|
|
78
|
+
> For pure docs/markdown issues with zero runtime behavior, include the NFRs section and state "N/A".
|
|
79
|
+
|
|
80
|
+
## Files to Modify
|
|
81
|
+
- `path/to/file` — what changes
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Stage Gate Labels
|
|
85
|
+
|
|
86
|
+
| Label | Who sets it | Meaning |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| `stage:brainstorming` | Agent | Brainstorming started — first action before reading code |
|
|
89
|
+
| `stage:detailing` | Agent | Spec is being written |
|
|
90
|
+
| `stage:approval` | Agent | Spec complete, awaiting PM review |
|
|
91
|
+
| `spec:approved` | **PM only** | Gate cleared — implement |
|
|
92
|
+
|
|
93
|
+
**NEVER apply `spec:approved`, `stage:development`, or `qa:*`.** These are owned by the PM and automation.
|
|
94
|
+
|
|
95
|
+
## Stage Transition Rules (non-negotiable)
|
|
96
|
+
|
|
97
|
+
MUST apply `stage:brainstorming` immediately on starting work — before reading any code,
|
|
98
|
+
before invoking any skill.
|
|
99
|
+
|
|
100
|
+
MUST NOT add `stage:detailing` until the user has explicitly selected an approach
|
|
101
|
+
in the current conversation turn.
|
|
102
|
+
|
|
103
|
+
MUST NOT add `spec:approved` or any approval-trigger label under any circumstances.
|
|
104
|
+
|
|
105
|
+
Each stage transition requires a fresh explicit signal from the user in the same session.
|
|
106
|
+
|
|
107
|
+
## What NOT to Do
|
|
108
|
+
|
|
109
|
+
- Never commit directly to `main`.
|
|
110
|
+
- Never open a PR without `spec:approved` on the linked issue.
|
|
111
|
+
- Never implement beyond the immediate scope of the issue.
|
|
112
|
+
- Never create future-proofing abstractions for hypothetical features.
|
|
113
|
+
{{EXTRA_DONT}}
|
|
114
|
+
|
|
115
|
+
## Project Standards
|
|
116
|
+
|
|
117
|
+
- **Tests:** `{{TEST_COMMAND}}`
|
|
118
|
+
- **Lint/Types:** `{{LINT_COMMAND}}`
|
|
119
|
+
- **Typecheck:** `{{TYPECHECK_COMMAND}}`
|
|
120
|
+
- **Build:** `{{BUILD_COMMAND}}`
|
|
121
|
+
{{EXTRA_PATTERNS}}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
**What it is:** {{PROJECT_DESCRIPTION}}
|
|
4
|
+
|
|
5
|
+
## Non-Negotiable Invariants
|
|
6
|
+
|
|
7
|
+
1. **Minimum viable change** — implement exactly what the spec says. No refactoring beyond scope, no future-proofing, no abstractions for hypothetical needs.
|
|
8
|
+
2. **Spec before code** — never edit files, create branches, or commit unless the linked issue has label `spec:approved` (set by PM only) or the branch starts with `hotfix/`.
|
|
9
|
+
|
|
10
|
+
## Stage Gate
|
|
11
|
+
|
|
12
|
+
Three labels gate every issue:
|
|
13
|
+
|
|
14
|
+
| Label | Who sets it | What it unlocks |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| `stage:brainstorming` | Agent (first action) | Reading code + presenting options |
|
|
17
|
+
| `stage:approval` | Agent (after spec is written) | Signals spec is ready for PM review |
|
|
18
|
+
| `spec:approved` | **PM only** | Clears agent to implement |
|
|
19
|
+
|
|
20
|
+
**NEVER apply `spec:approved`.** The PM sets it after reviewing the spec in the issue body. Applying it triggers irreversible automation.
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
1. Apply `stage:brainstorming` immediately — before reading code or invoking any tool.
|
|
25
|
+
2. Read the issue. Present problem summary + 2–3 solution options. **Stop and wait for PM to choose.**
|
|
26
|
+
3. Once PM selects an approach, write the complete spec into the issue body (`gh issue edit <N> --body "..."`). Advance to `stage:approval`.
|
|
27
|
+
4. **Stop.** Wait for PM to add `spec:approved`.
|
|
28
|
+
5. After `spec:approved`: create branch, implement minimum viable change, open PR with `Closes #N`.
|
|
29
|
+
|
|
30
|
+
## Hook Behavior
|
|
31
|
+
|
|
32
|
+
A `PreToolUse` hook blocks `gh pr create` unless:
|
|
33
|
+
- The linked issue has `spec:approved`, **or**
|
|
34
|
+
- The branch name starts with `hotfix/`
|
|
35
|
+
|
|
36
|
+
If blocked: check the issue labels before retrying.
|
|
37
|
+
|
|
38
|
+
## What NOT to Do
|
|
39
|
+
|
|
40
|
+
- Never commit to `main` directly.
|
|
41
|
+
- Never open a PR without `spec:approved` on the linked issue.
|
|
42
|
+
- Never implement beyond the immediate scope of the spec.
|
|
43
|
+
- Never add abstractions, error handling, or features for hypothetical future needs.
|
|
44
|
+
- Never apply `spec:approved`, `stage:development`, or `qa:*` — these are PM/automation only.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const { describe, it } = require('node:test');
|
|
2
|
+
const assert = require('node:assert/strict');
|
|
3
|
+
|
|
4
|
+
const { resolveMode } = require('../bin/cli.js');
|
|
5
|
+
|
|
6
|
+
describe('resolveMode', () => {
|
|
7
|
+
it('returns lite when no flags', () => {
|
|
8
|
+
assert.equal(resolveMode([]), 'lite');
|
|
9
|
+
});
|
|
10
|
+
it('returns full for --agentic', () => {
|
|
11
|
+
assert.equal(resolveMode(['--agentic']), 'full');
|
|
12
|
+
});
|
|
13
|
+
it('returns update for --update', () => {
|
|
14
|
+
assert.equal(resolveMode(['--update']), 'update');
|
|
15
|
+
});
|
|
16
|
+
it('returns upgrade for --upgrade-to-agentic', () => {
|
|
17
|
+
assert.equal(resolveMode(['--upgrade-to-agentic']), 'upgrade');
|
|
18
|
+
});
|
|
19
|
+
it('--update takes precedence over --agentic', () => {
|
|
20
|
+
assert.equal(resolveMode(['--update', '--agentic']), 'update');
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
describe('buildFullClaudeContent', () => {
|
|
25
|
+
it('concatenates lite and full with a newline separator', () => {
|
|
26
|
+
const lite = '# Lite\ncontent';
|
|
27
|
+
const full = '## Extra\nmore';
|
|
28
|
+
const result = lite + '\n' + full;
|
|
29
|
+
assert.ok(result.startsWith('# Lite'));
|
|
30
|
+
assert.ok(result.includes('## Extra'));
|
|
31
|
+
});
|
|
32
|
+
});
|