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.
- package/.agentic-pdlc/hooks/pdlc-stage-gate.sh +37 -10
- package/.agentic-pdlc/metrics/raw/2026-W22.jsonl +114 -0
- package/.claude/settings.json +18 -0
- package/.coderabbit.yaml +35 -0
- package/.github/ISSUE_TEMPLATE/bug.md +53 -0
- package/.github/ISSUE_TEMPLATE/feature.md +54 -0
- package/.github/ISSUE_TEMPLATE/task.md +33 -0
- package/.github/workflows/add-to-board.yml +1 -1
- package/.github/workflows/agent-trigger.yml +4 -4
- package/.github/workflows/ci.yml +1 -1
- package/.github/workflows/npm-publish.yml +2 -2
- package/.github/workflows/pdlc-health-check.yml +1 -1
- package/.github/workflows/pdlc-stage-gate.yml +2 -2
- package/.github/workflows/project-automation.yml +25 -40
- package/AGENTS.md +50 -8
- package/CLAUDE.md +3 -1
- package/README.md +33 -32
- package/SETUP.md +2 -1
- package/adapters/claude-code/skill.md +39 -14
- package/adapters/hooks/pdlc-stage-gate.sh +3 -8
- package/bin/cli.js +555 -194
- package/docs/pdlc.md +5 -5
- package/docs/superpowers/plans/2026-05-28-jules-label-pat-split.md +240 -0
- package/docs/superpowers/plans/2026-05-29-agentic-pulse-rework-taxonomy.md +474 -0
- package/docs/superpowers/plans/2026-05-29-qa-gate-enforcement.md +354 -0
- 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-05-29-agentic-pulse-rework-taxonomy-design.md +122 -0
- package/docs/superpowers/specs/2026-06-04-spec-format-issue-template-design.md +46 -0
- package/package.json +2 -2
- package/templates/.github/ISSUE_TEMPLATE/bug.md +53 -0
- package/templates/.github/ISSUE_TEMPLATE/feature.md +54 -0
- package/templates/.github/ISSUE_TEMPLATE/task.md +33 -0
- package/templates/.github/workflows/add-to-board.yml +4 -4
- package/templates/.github/workflows/agent-trigger.yml +22 -13
- package/{.agentic-pdlc/templates → templates}/.github/workflows/agentic-metrics.yml +150 -27
- package/templates/.github/workflows/ci.yml +1 -1
- package/templates/.github/workflows/pdlc-health-check.yml +1 -1
- package/templates/.github/workflows/pdlc-stage-gate.yml +2 -2
- package/templates/.github/workflows/project-automation.yml +71 -32
- package/templates/.github/workflows/qa-agent.yml +32 -18
- package/templates/.github/workflows/qa-gate.yml +51 -0
- package/templates/full/AGENTS.md +143 -0
- package/templates/full/CLAUDE.md +30 -0
- package/templates/{docs → full/docs}/pdlc.md +4 -4
- package/templates/lite/AGENTS.md +121 -0
- package/templates/lite/CLAUDE.md +44 -0
- package/tests/cli.test.js +32 -0
- package/.agentic-pdlc/templates/.github/CODEOWNERS +0 -5
- package/.agentic-pdlc/templates/.github/copilot-instructions.md +0 -12
- package/.agentic-pdlc/templates/.github/workflows/add-to-board.yml +0 -38
- package/.agentic-pdlc/templates/.github/workflows/agent-trigger.yml +0 -146
- package/.agentic-pdlc/templates/.github/workflows/auto-approve.yml +0 -16
- package/.agentic-pdlc/templates/.github/workflows/ci.yml +0 -54
- package/.agentic-pdlc/templates/.github/workflows/pdlc-health-check.yml +0 -121
- package/.agentic-pdlc/templates/.github/workflows/pdlc-stage-gate.yml +0 -51
- package/.agentic-pdlc/templates/.github/workflows/project-automation.yml +0 -274
- package/.agentic-pdlc/templates/.github/workflows/protect-workflows.yml +0 -21
- package/.agentic-pdlc/templates/.github/workflows/qa-agent.yml +0 -128
- package/.agentic-pdlc/templates/AGENTS.md +0 -104
- package/.agentic-pdlc/templates/docs/pdlc.md +0 -123
- package/.github/workflows/agentic-metrics.yml +0 -422
- package/.github/workflows/qa-agent.yml +0 -128
- package/templates/AGENTS.md +0 -115
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
name: AI QA Agent
|
|
2
|
-
on:
|
|
3
|
-
pull_request:
|
|
4
|
-
types: [opened, synchronize, reopened]
|
|
5
|
-
|
|
6
|
-
permissions:
|
|
7
|
-
pull-requests: write
|
|
8
|
-
contents: read
|
|
9
|
-
issues: read
|
|
10
|
-
models: read
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
qa:
|
|
14
|
-
name: AC Coverage Verification (GitHub Models)
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
env:
|
|
17
|
-
PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
|
|
18
|
-
PROJECT_ID: "PVT_kwHODpFFL84BXg7h"
|
|
19
|
-
STATUS_FIELD_ID: "PVTSSF_lAHODpFFL84BXg7hzhStRHI"
|
|
20
|
-
STATUS_CODE_REVIEW_PR: "86ca9720"
|
|
21
|
-
steps:
|
|
22
|
-
- uses: actions/checkout@v4
|
|
23
|
-
with:
|
|
24
|
-
fetch-depth: 0
|
|
25
|
-
|
|
26
|
-
- name: Verify AC Coverage via GitHub Models
|
|
27
|
-
env:
|
|
28
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
29
|
-
run: |
|
|
30
|
-
set -e
|
|
31
|
-
|
|
32
|
-
PR_NUMBER="${{ github.event.pull_request.number }}"
|
|
33
|
-
BASE="${{ github.event.pull_request.base.sha }}"
|
|
34
|
-
HEAD="${{ github.event.pull_request.head.sha }}"
|
|
35
|
-
|
|
36
|
-
# Get PR diff (truncated to 8000 chars to stay within context limits)
|
|
37
|
-
DIFF=$(git diff "$BASE" "$HEAD" | head -c 64000)
|
|
38
|
-
|
|
39
|
-
# Extract linked issues from PR body
|
|
40
|
-
PR_BODY=$(gh pr view "$PR_NUMBER" --json body --jq '.body // ""')
|
|
41
|
-
ISSUE_NUMS=$(echo "$PR_BODY" | grep -oiE '(Closes?|Fixes?|Resolves?)\s+#([0-9]+)' | grep -oE '[0-9]+' || true)
|
|
42
|
-
|
|
43
|
-
# Build acceptance criteria context
|
|
44
|
-
AC_CONTEXT=""
|
|
45
|
-
if [ -n "$ISSUE_NUMS" ]; then
|
|
46
|
-
for NUM in $ISSUE_NUMS; do
|
|
47
|
-
ISSUE_BODY=$(gh issue view "$NUM" --json body --jq '.body // ""' 2>/dev/null || echo "")
|
|
48
|
-
AC_CONTEXT="${AC_CONTEXT}\\n\\n--- Issue #${NUM} ---\\n${ISSUE_BODY}"
|
|
49
|
-
done
|
|
50
|
-
fi
|
|
51
|
-
|
|
52
|
-
if [ -z "$AC_CONTEXT" ]; then
|
|
53
|
-
AC_CONTEXT="No linked issue found. Evaluate if the PR description is self-contained."
|
|
54
|
-
fi
|
|
55
|
-
|
|
56
|
-
# Serialize prompt as JSON string and call GitHub Models API (30s timeout)
|
|
57
|
-
PROMPT_JSON=$(printf '%s' "You are a senior QA engineer. Review whether this PR diff satisfies the Acceptance Criteria below.\n\nACCEPTANCE CRITERIA:\n${AC_CONTEXT}\n\nPR DIFF:\n${DIFF}\n\nFirst line of your response must be exactly one word: PASS or FAIL. Second line: brief explanation (max 3 sentences)." | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))')
|
|
58
|
-
|
|
59
|
-
RESPONSE=$(curl -sf -X POST \
|
|
60
|
-
"https://models.github.ai/inference/chat/completions" \
|
|
61
|
-
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
|
|
62
|
-
-H "Content-Type: application/json" \
|
|
63
|
-
-d "{\"model\":\"gpt-4o-mini\",\"messages\":[{\"role\":\"user\",\"content\":${PROMPT_JSON}}]}" \
|
|
64
|
-
--max-time 30 || echo "API_ERROR")
|
|
65
|
-
|
|
66
|
-
if [ "$RESPONSE" = "API_ERROR" ]; then
|
|
67
|
-
GH_TOKEN="$PROJECT_TOKEN" gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --method POST -f 'labels[]=infra:qa-broken'
|
|
68
|
-
gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:** Could not reach GitHub Models API. Manual review required."
|
|
69
|
-
exit 0
|
|
70
|
-
fi
|
|
71
|
-
|
|
72
|
-
VERDICT=$(echo "$RESPONSE" | python3 -c 'import json,sys,re; d=json.load(sys.stdin); t=d.get("choices",[{}])[0].get("message",{}).get("content","").strip(); first=t.split("\n")[0].upper() if t else ""; print("FAIL" if re.search(r"\bFAIL\b",first) else "PASS" if re.search(r"\bPASS\b",first) else "API_ERROR")')
|
|
73
|
-
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 "")')
|
|
74
|
-
|
|
75
|
-
if echo "$VERDICT" | grep -q "^PASS"; then
|
|
76
|
-
GH_TOKEN="$PROJECT_TOKEN" gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --method POST -f 'labels[]=qa:approved'
|
|
77
|
-
gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:** AC coverage verified. ${EXPLANATION}"
|
|
78
|
-
elif echo "$VERDICT" | grep -q "^FAIL"; then
|
|
79
|
-
GH_TOKEN="$PROJECT_TOKEN" gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --method POST -f 'labels[]=qa:needs-work'
|
|
80
|
-
gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:** AC coverage insufficient. ${EXPLANATION}"
|
|
81
|
-
else
|
|
82
|
-
GH_TOKEN="$PROJECT_TOKEN" gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --method POST -f 'labels[]=infra:qa-broken'
|
|
83
|
-
gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:** Could not parse GitHub Models response. Manual review required."
|
|
84
|
-
fi
|
|
85
|
-
|
|
86
|
-
- name: Move board card to Code Review on qa:approved
|
|
87
|
-
if: ${{ env.PROJECT_TOKEN != '' && env.PROJECT_ID != '{{PROJECT_ID}}' }}
|
|
88
|
-
uses: actions/github-script@v7
|
|
89
|
-
with:
|
|
90
|
-
github-token: ${{ env.PROJECT_TOKEN }}
|
|
91
|
-
script: |
|
|
92
|
-
const prNumber = context.payload.pull_request.number;
|
|
93
|
-
const { owner, repo } = context.repo;
|
|
94
|
-
|
|
95
|
-
const { data: pr } = await github.rest.pulls.get({ owner, repo, pull_number: prNumber });
|
|
96
|
-
if (!pr.labels.some(l => l.name === 'qa:approved')) {
|
|
97
|
-
console.log('qa:approved not on PR — skipping board move');
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const body = pr.body ?? '';
|
|
102
|
-
const linkedIssues = [...body.matchAll(/(?:Closes?|Fixes?|Resolves?)\s+#(\d+)/gi)]
|
|
103
|
-
.map(m => parseInt(m[1]));
|
|
104
|
-
|
|
105
|
-
const moveItem = async (nodeId) => {
|
|
106
|
-
const { addProjectV2ItemById: { item } } = await github.graphql(`
|
|
107
|
-
mutation($p: ID!, $c: ID!) {
|
|
108
|
-
addProjectV2ItemById(input: {projectId: $p, contentId: $c}) { item { id } }
|
|
109
|
-
}`, { p: process.env.PROJECT_ID, c: nodeId });
|
|
110
|
-
await github.graphql(`
|
|
111
|
-
mutation($p: ID!, $i: ID!, $f: ID!, $v: ProjectV2FieldValue!) {
|
|
112
|
-
updateProjectV2ItemFieldValue(input: {projectId: $p, itemId: $i, fieldId: $f, value: $v}) {
|
|
113
|
-
projectV2Item { id }
|
|
114
|
-
}
|
|
115
|
-
}`, { p: process.env.PROJECT_ID, i: item.id, f: process.env.STATUS_FIELD_ID,
|
|
116
|
-
v: { singleSelectOptionId: process.env.STATUS_CODE_REVIEW_PR } });
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
if (linkedIssues.length > 0) {
|
|
120
|
-
for (const n of linkedIssues) {
|
|
121
|
-
const { data: issue } = await github.rest.issues.get({ owner, repo, issue_number: n });
|
|
122
|
-
await moveItem(issue.node_id);
|
|
123
|
-
console.log(`Issue #${n} → Code Review / PR`);
|
|
124
|
-
}
|
|
125
|
-
} else {
|
|
126
|
-
await moveItem(pr.node_id);
|
|
127
|
-
console.log(`PR #${prNumber} → Code Review / PR (no linked issue)`);
|
|
128
|
-
}
|
package/templates/AGENTS.md
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# {{PROJECT_NAME}} — AI Agent Instructions
|
|
2
|
-
|
|
3
|
-
This template is the contract between the project and any external AI agent
|
|
4
|
-
(Claude Code, Cursor, Copilot, Jules, 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. **Human-in-the-Loop** — No external side-effect actions without explicit human approval.
|
|
26
|
-
2. **Immutable Audit-Log** — It's strictly forbidden to UPDATE/DELETE on audit_log; INSERT only.
|
|
27
|
-
3. **Credential Isolation** — Decryption occurs only in a specific service.
|
|
28
|
-
-->
|
|
29
|
-
|
|
30
|
-
## Mandatory Workflow
|
|
31
|
-
|
|
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:brainstorming` label using the GitHub CLI (`gh issue edit <N> --add-label "stage:brainstorming"`).
|
|
34
|
-
2. Read the issue entirely — understand its type (US/BUG/TASK/SPIKE) and the Acceptance Criteria.
|
|
35
|
-
3. Read `docs/pdlc.md` — understand the PDLC and the Definition of Done in this project.
|
|
36
|
-
4. Read all files mentioned in the issue's technical context.
|
|
37
|
-
5. Implement the **minimum viable change** that satisfies the ACs — do not refactor beyond scope.
|
|
38
|
-
6. Run tests: `{{TEST_COMMAND}}`
|
|
39
|
-
7. Run typecheck (if applicable): `{{TYPECHECK_COMMAND}}`
|
|
40
|
-
8. Create a Pull Request with `Closes #N` in the body — automation moves the board.
|
|
41
|
-
|
|
42
|
-
### Spec format (Upstream Agents)
|
|
43
|
-
|
|
44
|
-
When detailing a solution in an issue body, you must **always** include both the user story and the acceptance criteria. Never append only the ACs to an existing text; rewrite the full issue body in this standard format:
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
**As** [user],
|
|
48
|
-
**I want** [action],
|
|
49
|
-
**so that** [benefit].
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Acceptance Criteria
|
|
54
|
-
|
|
55
|
-
**AC1 — ...**
|
|
56
|
-
- Given ...
|
|
57
|
-
- When ...
|
|
58
|
-
- Then ...
|
|
59
|
-
|
|
60
|
-
**AC2 — ...**
|
|
61
|
-
...
|
|
62
|
-
|
|
63
|
-
## Files to modify
|
|
64
|
-
- `path/to/file.ts` — what changes
|
|
65
|
-
```
|
|
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
|
-
|
|
86
|
-
## Pipeline Updates
|
|
87
|
-
|
|
88
|
-
To add or configure optional agents (Jules, QA Agent, Sentinel) at any time:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
npx create-agentic-pdlc --update
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Run this when the user says anything like "update the pipeline", "update the board", or "configure the agents". It detects what is already configured and interactively sets up what is missing — without touching this file or any user-owned config.
|
|
95
|
-
|
|
96
|
-
## What NOT to do
|
|
97
|
-
|
|
98
|
-
- Never commit directly to `main`.
|
|
99
|
-
- Never open a PR without passing the tests.
|
|
100
|
-
- Never implement beyond the immediate scope of the issue.
|
|
101
|
-
- Never create future-proofing abstractions for hypothetical features.
|
|
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.
|
|
107
|
-
{{EXTRA_DONT}}
|
|
108
|
-
|
|
109
|
-
## Project Standards
|
|
110
|
-
|
|
111
|
-
- **Tests:** `{{TEST_COMMAND}}`
|
|
112
|
-
- **Lint/Types:** `{{LINT_COMMAND}}`
|
|
113
|
-
- **Typecheck:** `{{TYPECHECK_COMMAND}}`
|
|
114
|
-
- **Build:** `{{BUILD_COMMAND}}`
|
|
115
|
-
{{EXTRA_PATTERNS}}
|