create-agentic-pdlc 2.3.0 → 2.4.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/metrics/raw/2026-W22.jsonl +114 -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/agentic-metrics.yml +150 -27
- 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 +51 -12
- package/.github/workflows/qa-agent.yml +22 -11
- package/.github/workflows/qa-gate.yml +51 -0
- package/AGENTS.md +50 -8
- package/CLAUDE.md +2 -0
- package/SETUP.md +2 -1
- package/adapters/claude-code/skill.md +32 -11
- package/adapters/hooks/pdlc-stage-gate.sh +3 -8
- package/bin/cli.js +23 -2
- 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/specs/2026-05-29-agentic-pulse-rework-taxonomy-design.md +122 -0
- package/package.json +1 -1
- 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/AGENTS.md +57 -29
- package/templates/docs/pdlc.md +4 -4
- 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
|
@@ -14,9 +14,9 @@ jobs:
|
|
|
14
14
|
name: AC Coverage Verification (GitHub Models)
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
16
|
env:
|
|
17
|
-
|
|
17
|
+
PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
19
|
+
- uses: actions/checkout@v5.0.1
|
|
20
20
|
with:
|
|
21
21
|
fetch-depth: 0
|
|
22
22
|
|
|
@@ -31,7 +31,7 @@ jobs:
|
|
|
31
31
|
HEAD="${{ github.event.pull_request.head.sha }}"
|
|
32
32
|
|
|
33
33
|
# Get PR diff (truncated to 8000 chars to stay within context limits)
|
|
34
|
-
DIFF=$(git diff "$BASE" "$HEAD" | head -c
|
|
34
|
+
DIFF=$(git diff "$BASE" "$HEAD" | head -c 8000)
|
|
35
35
|
|
|
36
36
|
# Extract linked issues from PR body
|
|
37
37
|
PR_BODY=$(gh pr view "$PR_NUMBER" --json body --jq '.body // ""')
|
|
@@ -51,31 +51,45 @@ jobs:
|
|
|
51
51
|
fi
|
|
52
52
|
|
|
53
53
|
# Serialize prompt as JSON string and call GitHub Models API (30s timeout)
|
|
54
|
-
PROMPT_JSON=$(printf '%s' "You are
|
|
54
|
+
PROMPT_JSON=$(printf '%s' "You are an adversarial product tester. Your mission is to find what the Acceptance Criteria do NOT cover — undefined edge cases, ambiguous states, missing user scenarios. Do NOT review code quality, file structure, or technical consistency.\n\nACCEPTANCE CRITERIA:\n${AC_CONTEXT}\n\nPR DIFF:\n${DIFF}\n\nRespond in exactly 3 lines (do NOT wrap your response in markdown code blocks or any other formatting):\nLine 1: PASS or FAIL (PASS if the PR diff fully satisfies the stated Acceptance Criteria, FAIL if it falls short of covering them)\nLine 2: Gaps: [one-line summary of AC gaps found, or \"none\"]\nLine 3: Not covered: [AC refs where diff falls short, or \"all covered\"]" | python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))')
|
|
55
55
|
|
|
56
|
-
RESPONSE
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
RESPONSE="API_ERROR"
|
|
57
|
+
for attempt in 1 2 3; do
|
|
58
|
+
RESULT=$(curl -s -X POST \
|
|
59
|
+
"https://models.github.ai/inference/chat/completions" \
|
|
60
|
+
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
|
|
61
|
+
-H "Content-Type: application/json" \
|
|
62
|
+
-d "{\"model\":\"gpt-4o-mini\",\"messages\":[{\"role\":\"user\",\"content\":${PROMPT_JSON}}]}" \
|
|
63
|
+
-w "\n__HTTP_STATUS__:%{http_code}" \
|
|
64
|
+
--max-time 45 2>/dev/null)
|
|
65
|
+
HTTP_STATUS=$(echo "$RESULT" | grep -o '__HTTP_STATUS__:[0-9]*' | cut -d: -f2)
|
|
66
|
+
BODY=$(echo "$RESULT" | sed 's/__HTTP_STATUS__:[0-9]*$//')
|
|
67
|
+
echo "Attempt $attempt: HTTP $HTTP_STATUS"
|
|
68
|
+
if [ "$HTTP_STATUS" = "200" ]; then RESPONSE="$BODY"; break; fi
|
|
69
|
+
[ $attempt -lt 3 ] && sleep 20
|
|
70
|
+
done
|
|
62
71
|
|
|
63
72
|
if [ "$RESPONSE" = "API_ERROR" ]; then
|
|
64
|
-
GH_TOKEN="$
|
|
73
|
+
GH_TOKEN="$PROJECT_TOKEN" gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --method POST -f 'labels[]=infra:qa-broken'
|
|
65
74
|
gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:** Could not reach GitHub Models API. Manual review required."
|
|
66
|
-
exit
|
|
75
|
+
exit 1
|
|
67
76
|
fi
|
|
68
77
|
|
|
69
|
-
VERDICT=$(echo "$RESPONSE" | python3 -c 'import json,sys,re; d=json.load(sys.stdin); t=d.get("choices",[{}])[0].get("message",{}).get("content","").strip();
|
|
78
|
+
VERDICT=$(echo "$RESPONSE" | python3 -c 'import json,sys,re; d=json.load(sys.stdin); t=d.get("choices",[{}])[0].get("message",{}).get("content","").strip(); lines=[l for l in t.split("\n") if not l.strip().startswith("```")]; first=lines[0].upper() if lines else ""; print("FAIL" if re.search(r"\bFAIL\b",first) else "PASS" if re.search(r"\bPASS\b",first) else "API_ERROR")')
|
|
70
79
|
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 "")')
|
|
71
80
|
|
|
72
81
|
if echo "$VERDICT" | grep -q "^PASS"; then
|
|
73
|
-
GH_TOKEN="$
|
|
74
|
-
gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:**
|
|
82
|
+
GH_TOKEN="$PROJECT_TOKEN" gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --method POST -f 'labels[]=qa:approved'
|
|
83
|
+
gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:** PASS
|
|
84
|
+
|
|
85
|
+
${EXPLANATION}"
|
|
75
86
|
elif echo "$VERDICT" | grep -q "^FAIL"; then
|
|
76
|
-
GH_TOKEN="$
|
|
77
|
-
gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:**
|
|
87
|
+
GH_TOKEN="$PROJECT_TOKEN" gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --method POST -f 'labels[]=qa:needs-work'
|
|
88
|
+
gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:** FAIL
|
|
89
|
+
|
|
90
|
+
${EXPLANATION}"
|
|
78
91
|
else
|
|
79
|
-
GH_TOKEN="$
|
|
92
|
+
GH_TOKEN="$PROJECT_TOKEN" gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --method POST -f 'labels[]=infra:qa-broken'
|
|
80
93
|
gh pr comment "$PR_NUMBER" --body "🤖 **QA Agent:** Could not parse GitHub Models response. Manual review required."
|
|
94
|
+
exit 1
|
|
81
95
|
fi
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: QA Gate
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened, labeled, unlabeled]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
pull-requests: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
qa-gate:
|
|
12
|
+
name: QA Gate
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Check QA status label
|
|
16
|
+
env:
|
|
17
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
18
|
+
run: |
|
|
19
|
+
set -e
|
|
20
|
+
PR_NUMBER="${{ github.event.pull_request.number }}"
|
|
21
|
+
REPO="${{ github.repository }}"
|
|
22
|
+
|
|
23
|
+
PR_LABELS=$(gh pr view "$PR_NUMBER" --repo "$REPO" --json labels --jq '.labels[].name')
|
|
24
|
+
|
|
25
|
+
if echo "$PR_LABELS" | grep -qx "hotfix"; then
|
|
26
|
+
echo "✅ QA Gate: hotfix label — bypassed."
|
|
27
|
+
exit 0
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
if echo "$PR_LABELS" | grep -qx "human-approved"; then
|
|
31
|
+
echo "✅ QA Gate: human-approved label — manual QA sign-off, bypassed."
|
|
32
|
+
exit 0
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
if echo "$PR_LABELS" | grep -qx "qa:approved"; then
|
|
36
|
+
echo "✅ QA Gate: qa:approved — merge allowed."
|
|
37
|
+
exit 0
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
if echo "$PR_LABELS" | grep -qx "infra:qa-broken"; then
|
|
41
|
+
echo "❌ QA Gate: infra:qa-broken — GitHub Models API unreachable. Manual QA review required before merge."
|
|
42
|
+
exit 1
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
if echo "$PR_LABELS" | grep -qx "qa:needs-work"; then
|
|
46
|
+
echo "❌ QA Gate: qa:needs-work — acceptance criteria not fully met. Fix required before merge."
|
|
47
|
+
exit 1
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
echo "❌ QA Gate: no QA label found — AC Coverage Verification has not completed. Wait for the check to finish."
|
|
51
|
+
exit 1
|
package/templates/AGENTS.md
CHANGED
|
@@ -30,38 +30,56 @@ 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. **
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
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**:
|
|
34
|
+
- `spec:approved` → begin implementation (gate already passed)
|
|
35
|
+
- `stage:development` or `stage:testing` → issue is owned by automation; do not intervene unless explicitly asked to fix a specific problem
|
|
36
|
+
- `stage:approval` → spec already written; wait for PM to add `spec:approved` before doing anything
|
|
37
|
+
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`.
|
|
38
|
+
3. Read the issue entirely — understand its type (US/BUG/TASK/SPIKE) and the Acceptance Criteria.
|
|
39
|
+
4. Read `docs/pdlc.md` — understand the PDLC and the Definition of Done in this project.
|
|
40
|
+
5. Read all files mentioned in the issue's technical context.
|
|
41
|
+
6. Implement the **minimum viable change** that satisfies the ACs — do not refactor beyond scope.
|
|
42
|
+
7. Run tests: `{{TEST_COMMAND}}`
|
|
43
|
+
8. Run typecheck (if applicable): `{{TYPECHECK_COMMAND}}`
|
|
44
|
+
9. Create a Pull Request with `Closes #N` in the body — automation moves the board.
|
|
41
45
|
|
|
42
|
-
|
|
46
|
+
## Spec Format
|
|
43
47
|
|
|
44
|
-
When
|
|
48
|
+
When writing or rewriting an issue body during detailing, include ALL sections below. Omitting any section blocks `stage:approval`.
|
|
49
|
+
|
|
50
|
+
**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.
|
|
45
51
|
|
|
46
52
|
```
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
53
|
+
## Problem
|
|
54
|
+
[1-3 sentences. What fails. Who affected. Measured impact.]
|
|
55
|
+
|
|
56
|
+
## Sprint Goal / Success Metrics
|
|
57
|
+
| Metric | Baseline | Target | When |
|
|
58
|
+
|--------|----------|--------|------|
|
|
50
59
|
|
|
51
|
-
|
|
60
|
+
## Solution
|
|
61
|
+
[Behavioral description of what is built. No implementation details.]
|
|
52
62
|
|
|
53
63
|
## Acceptance Criteria
|
|
64
|
+
**AC1 — [name]**
|
|
65
|
+
- Given [precondition]
|
|
66
|
+
- When [action]
|
|
67
|
+
- Then [outcome]
|
|
68
|
+
|
|
69
|
+
## Edge Cases
|
|
70
|
+
- EC1: [condition] → [expected behavior]
|
|
54
71
|
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
- When ...
|
|
58
|
-
- Then ...
|
|
72
|
+
## Out of Scope
|
|
73
|
+
- [item] — reason
|
|
59
74
|
|
|
60
|
-
|
|
61
|
-
|
|
75
|
+
## Non-Functional Requirements
|
|
76
|
+
- Performance: [metric with number]
|
|
77
|
+
- Security: [constraint]
|
|
78
|
+
- Reliability: [constraint]
|
|
79
|
+
> For pure docs/markdown issues with zero runtime behavior, include the NFRs section and state "N/A".
|
|
62
80
|
|
|
63
|
-
## Files to
|
|
64
|
-
- `path/to/file
|
|
81
|
+
## Files to Modify
|
|
82
|
+
- `path/to/file` — what changes
|
|
65
83
|
```
|
|
66
84
|
|
|
67
85
|
## Stage Transition Rules (non-negotiable)
|
|
@@ -74,14 +92,24 @@ MUST NOT add `stage:detailing` label until the user has explicitly selected
|
|
|
74
92
|
an approach in the current conversation turn. Work done in a prior
|
|
75
93
|
planning session does NOT count as confirmation.
|
|
76
94
|
|
|
77
|
-
MUST NOT add `spec:approved
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
95
|
+
MUST NOT add `spec:approved` or `stage:development` — these represent final
|
|
96
|
+
human approval or automation output. Adding them manually triggers irreversible
|
|
97
|
+
automation (Jules dispatch, board move).
|
|
98
|
+
|
|
99
|
+
MUST NOT manually add `stage:approval` except via the pre-spec'd exception
|
|
100
|
+
below. In the standard flow, `stage:approval` is set after you write a complete
|
|
101
|
+
spec and the user confirms; it is not applied before the spec exists.
|
|
82
102
|
|
|
83
103
|
Each stage transition requires a fresh explicit signal from the user in the same
|
|
84
|
-
session where the transition happens.
|
|
104
|
+
session where the transition happens. The pre-spec'd exception is the only
|
|
105
|
+
deviation from this rule.
|
|
106
|
+
|
|
107
|
+
**Pre-spec'd exception**: if the issue body already contains all required spec
|
|
108
|
+
sections (`## Problem`, `## Solution`, `## Acceptance Criteria`, `## Edge Cases`,
|
|
109
|
+
`## Out of Scope`, `## Files to Modify`) — all present and non-empty — apply
|
|
110
|
+
`stage:approval` directly in a single `gh issue edit` call, skipping
|
|
111
|
+
`stage:brainstorming` and `stage:detailing`. One label event eliminates the
|
|
112
|
+
race condition that causes the project board to land on the wrong column.
|
|
85
113
|
|
|
86
114
|
## Pipeline Updates
|
|
87
115
|
|
|
@@ -103,7 +131,7 @@ Run this when the user says anything like "update the pipeline", "update the boa
|
|
|
103
131
|
- `spec:approved`: triggers Jules dispatch + board move to Development.
|
|
104
132
|
- `qa:approved`: triggers board move to Code Review.
|
|
105
133
|
- `qa:needs-work`: signals the PR requires changes and halts the flow.
|
|
106
|
-
- Never add or remove stage:* labels manually, except
|
|
134
|
+
- Never add or remove stage:* labels manually, except: `stage:brainstorming` as the initial label when starting work, or `stage:approval` directly when applying the pre-spec'd exception. All other stage transitions are owned by GitHub Actions automation and the PM.
|
|
107
135
|
{{EXTRA_DONT}}
|
|
108
136
|
|
|
109
137
|
## Project Standards
|
package/templates/docs/pdlc.md
CHANGED
|
@@ -58,7 +58,7 @@ REPO = {{REPO_OWNER}}/{{REPO_NAME}}
|
|
|
58
58
|
```
|
|
59
59
|
[icon] [PREFIX]: [short description, imperative tense]
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
✨ feat: new feature or behavioral change
|
|
62
62
|
🐛 BUG: bug
|
|
63
63
|
🔧 TASK: operational task
|
|
64
64
|
🔬 SPIKE: exploration/evaluation spike
|
|
@@ -77,7 +77,7 @@ REPO = {{REPO_OWNER}}/{{REPO_NAME}}
|
|
|
77
77
|
| `qa:approved` | PR | Green | QA Agent passed — AC coverage verified |
|
|
78
78
|
| `qa:needs-work` | PR | Red | QA Agent failed — PR needs changes |
|
|
79
79
|
| `infra:qa-broken` | PR | Orange | QA Agent error — manual review required |
|
|
80
|
-
| `type:
|
|
80
|
+
| `type:feature` | Issue | Blue | New feature or behavioral change — full flow |
|
|
81
81
|
| `type:task` | Issue | Yellow | Operational/non-functional change — full flow |
|
|
82
82
|
| `type:bug` | Issue | Red | Something broken — full flow |
|
|
83
83
|
| `type:spike` | Issue | Gray | Research/evaluation — never reaches Development |
|
|
@@ -98,12 +98,12 @@ The `type:*` label is the authoritative signal — set automatically by the agen
|
|
|
98
98
|
|
|
99
99
|
| Label | Flow |
|
|
100
100
|
|---|---|
|
|
101
|
-
| `type:
|
|
101
|
+
| `type:feature` | brainstorming → Gate 1 → detailing → approval |
|
|
102
102
|
| `type:task` | brainstorming → Gate 1 → detailing → approval |
|
|
103
103
|
| `type:bug` | brainstorming → Gate 1 → detailing → approval |
|
|
104
104
|
| `type:spike` | brainstorming → Gate 1 → detailing → conclusion comment (never reaches Development) |
|
|
105
105
|
|
|
106
|
-
If no `type:*` label present and agent confidence < 85%, defaults to `type:
|
|
106
|
+
If no `type:*` label present and agent confidence < 85%, defaults to `type:feature` (safe fallback — never skips gates by omission).
|
|
107
107
|
|
|
108
108
|
## Bypass Mechanism
|
|
109
109
|
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Agentic PDLC Instructions for GitHub Copilot Workspace
|
|
2
|
-
|
|
3
|
-
Hello! You are operating within the Agentic PDLC framework.
|
|
4
|
-
|
|
5
|
-
Before addressing the user's prompt or executing any task in this workspace, you MUST:
|
|
6
|
-
|
|
7
|
-
1. Read the `AGENTS.md` file located at the root of this repository. It contains the primary instructions, definitions of done, and absolute invariants you must respect.
|
|
8
|
-
2. Read `docs/pdlc.md` to understand your role in the project lifecycle.
|
|
9
|
-
|
|
10
|
-
Never violate the invariants described in those files. If a user asks you to do something that contradicts `AGENTS.md`, you must refuse and point out the conflict.
|
|
11
|
-
|
|
12
|
-
Focus on delivering the absolute minimum required to satisfy the immediate technical specs. Start!
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
name: Add to Board on Open
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
issues:
|
|
5
|
-
types: [opened]
|
|
6
|
-
|
|
7
|
-
env:
|
|
8
|
-
PROJECT_ID: "{{PROJECT_ID}}"
|
|
9
|
-
STATUS_FIELD_ID: "{{STATUS_FIELD_ID}}"
|
|
10
|
-
STATUS_IDEA: "{{ID_IDEA}}"
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
add-to-board:
|
|
14
|
-
name: Auto-add new issue to board
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
env:
|
|
17
|
-
PROJECT_PAT: ${{ secrets.PROJECT_PAT }}
|
|
18
|
-
steps:
|
|
19
|
-
- name: Add issue to project board
|
|
20
|
-
if: ${{ env.PROJECT_PAT != '' && env.PROJECT_ID != '{{PROJECT_ID}}' }}
|
|
21
|
-
uses: actions/github-script@v7
|
|
22
|
-
with:
|
|
23
|
-
github-token: ${{ env.PROJECT_PAT }}
|
|
24
|
-
script: |
|
|
25
|
-
const nodeId = context.payload.issue.node_id;
|
|
26
|
-
const number = context.payload.issue.number;
|
|
27
|
-
const { addProjectV2ItemById: { item } } = await github.graphql(`
|
|
28
|
-
mutation($p: ID!, $c: ID!) {
|
|
29
|
-
addProjectV2ItemById(input: {projectId: $p, contentId: $c}) { item { id } }
|
|
30
|
-
}`, { p: process.env.PROJECT_ID, c: nodeId });
|
|
31
|
-
await github.graphql(`
|
|
32
|
-
mutation($p: ID!, $i: ID!, $f: ID!, $v: ProjectV2FieldValue!) {
|
|
33
|
-
updateProjectV2ItemFieldValue(input: {projectId: $p, itemId: $i, fieldId: $f, value: $v}) {
|
|
34
|
-
projectV2Item { id }
|
|
35
|
-
}
|
|
36
|
-
}`, { p: process.env.PROJECT_ID, i: item.id, f: process.env.STATUS_FIELD_ID,
|
|
37
|
-
v: { singleSelectOptionId: process.env.STATUS_IDEA } });
|
|
38
|
-
console.log(`Issue #${number} added to board → Idea`);
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
name: Trigger Implementation Agent
|
|
2
|
-
|
|
3
|
-
# Triggers when spec:approved is added to an issue (Gate 2)
|
|
4
|
-
# or when an architecture-violation issue is modified (Sentinel flow)
|
|
5
|
-
on:
|
|
6
|
-
issues:
|
|
7
|
-
types: [labeled]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
trigger-implementation-agent:
|
|
11
|
-
name: Trigger {{IMPLEMENTATION_AGENT_NAME}} for implementation
|
|
12
|
-
# Runs only when spec:approved is added
|
|
13
|
-
if: github.event.label.name == 'spec:approved'
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
permissions:
|
|
16
|
-
issues: write
|
|
17
|
-
pull-requests: write
|
|
18
|
-
contents: read
|
|
19
|
-
env:
|
|
20
|
-
PROJECT_PAT: ${{ secrets.PROJECT_PAT }}
|
|
21
|
-
PROJECT_ID: "{{PROJECT_ID}}"
|
|
22
|
-
STATUS_FIELD_ID: "{{STATUS_FIELD_ID}}"
|
|
23
|
-
STATUS_DEVELOPMENT: "{{ID_DEVELOPMENT}}"
|
|
24
|
-
steps:
|
|
25
|
-
- name: Update Labels
|
|
26
|
-
uses: actions/github-script@v7
|
|
27
|
-
with:
|
|
28
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
29
|
-
script: |
|
|
30
|
-
const { owner, repo } = context.repo;
|
|
31
|
-
const issue_number = context.payload.issue.number;
|
|
32
|
-
|
|
33
|
-
try {
|
|
34
|
-
await github.rest.issues.removeLabel({
|
|
35
|
-
owner,
|
|
36
|
-
repo,
|
|
37
|
-
issue_number,
|
|
38
|
-
name: 'stage:approval'
|
|
39
|
-
});
|
|
40
|
-
} catch (error) {
|
|
41
|
-
console.log('Label stage:approval not found or could not be removed');
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const agentLabel = '{{IMPLEMENTATION_AGENT_LABEL}}';
|
|
45
|
-
const labelsToAdd = ['stage:development'];
|
|
46
|
-
if (!agentLabel.includes('{{')) labelsToAdd.push(agentLabel, 'agent:working');
|
|
47
|
-
|
|
48
|
-
await github.rest.issues.addLabels({
|
|
49
|
-
owner,
|
|
50
|
-
repo,
|
|
51
|
-
issue_number,
|
|
52
|
-
labels: labelsToAdd
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
- name: Move board card to Development
|
|
56
|
-
if: ${{ env.PROJECT_PAT != '' && env.PROJECT_ID != '{{PROJECT_ID}}' }}
|
|
57
|
-
continue-on-error: true
|
|
58
|
-
uses: actions/github-script@v7
|
|
59
|
-
with:
|
|
60
|
-
github-token: ${{ env.PROJECT_PAT }}
|
|
61
|
-
script: |
|
|
62
|
-
const nodeId = context.payload.issue.node_id;
|
|
63
|
-
const number = context.payload.issue.number;
|
|
64
|
-
const { addProjectV2ItemById: { item } } = await github.graphql(`
|
|
65
|
-
mutation($p: ID!, $c: ID!) {
|
|
66
|
-
addProjectV2ItemById(input: {projectId: $p, contentId: $c}) { item { id } }
|
|
67
|
-
}`, { p: process.env.PROJECT_ID, c: nodeId });
|
|
68
|
-
await github.graphql(`
|
|
69
|
-
mutation($p: ID!, $i: ID!, $f: ID!, $v: ProjectV2FieldValue!) {
|
|
70
|
-
updateProjectV2ItemFieldValue(input: {projectId: $p, itemId: $i, fieldId: $f, value: $v}) {
|
|
71
|
-
projectV2Item { id }
|
|
72
|
-
}
|
|
73
|
-
}`, { p: process.env.PROJECT_ID, i: item.id, f: process.env.STATUS_FIELD_ID,
|
|
74
|
-
v: { singleSelectOptionId: process.env.STATUS_DEVELOPMENT } });
|
|
75
|
-
console.log(`Issue #${number} → Development`);
|
|
76
|
-
|
|
77
|
-
- name: Comment on issue to trigger agent and prevent race conditions
|
|
78
|
-
if: ${{ !contains('{{IMPLEMENTATION_AGENT_LABEL}}', '{{') && vars.JULES_ENABLED == 'true' }}
|
|
79
|
-
uses: actions/github-script@v7
|
|
80
|
-
with:
|
|
81
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
82
|
-
script: |
|
|
83
|
-
const issueNumber = context.payload.issue.number;
|
|
84
|
-
const issueTitle = context.payload.issue.title;
|
|
85
|
-
|
|
86
|
-
const body = [
|
|
87
|
-
`🤖 **Agentic PDLC Orchestrator:** I have dispatched the implementation agent. Please wait for the Pull Request and avoid making concurrent commits on this task to prevent race conditions.`,
|
|
88
|
-
'',
|
|
89
|
-
`{{AGENT_HANDLE}} The spec for this issue has been approved. Please implement it exactly as described in the body above.`,
|
|
90
|
-
'',
|
|
91
|
-
'**Mandatory steps before you begin:**',
|
|
92
|
-
'1. `git fetch origin && git checkout main && git pull` — always start from the current HEAD',
|
|
93
|
-
'2. Read `AGENTS.md` — mandatory rules for agents in this repository',
|
|
94
|
-
'3. Read `docs/pdlc.md` — Definition of Done and invariants reference',
|
|
95
|
-
'',
|
|
96
|
-
'**Rules:**',
|
|
97
|
-
'- Implement strictly what the Acceptance Criteria describes',
|
|
98
|
-
'- Run `{{TEST_COMMAND}}` before opening the Pull Request',
|
|
99
|
-
`- Include \`Closes #${issueNumber}\` in the PR body`,
|
|
100
|
-
'- Create a descriptive branch branching from `main`',
|
|
101
|
-
].join('\n');
|
|
102
|
-
|
|
103
|
-
await github.rest.issues.createComment({
|
|
104
|
-
owner: context.repo.owner,
|
|
105
|
-
repo: context.repo.repo,
|
|
106
|
-
issue_number: issueNumber,
|
|
107
|
-
body,
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
trigger-agent-on-violation:
|
|
111
|
-
name: Trigger {{IMPLEMENTATION_AGENT_NAME}} for architecture violation
|
|
112
|
-
# Runs when architecture-violation is added (Sentinel flow)
|
|
113
|
-
if: github.event.label.name == 'architecture-violation'
|
|
114
|
-
runs-on: ubuntu-latest
|
|
115
|
-
permissions:
|
|
116
|
-
issues: write
|
|
117
|
-
pull-requests: write
|
|
118
|
-
contents: read
|
|
119
|
-
steps:
|
|
120
|
-
- name: Comment on issue to trigger agent
|
|
121
|
-
if: ${{ !contains('{{IMPLEMENTATION_AGENT_LABEL}}', '{{') && vars.JULES_ENABLED == 'true' }}
|
|
122
|
-
uses: actions/github-script@v7
|
|
123
|
-
with:
|
|
124
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
125
|
-
script: |
|
|
126
|
-
const issueNumber = context.payload.issue.number;
|
|
127
|
-
|
|
128
|
-
const body = [
|
|
129
|
-
`{{AGENT_HANDLE}} Please fix the architecture violation described in this issue.`,
|
|
130
|
-
'',
|
|
131
|
-
'**Mandatory steps before you begin:**',
|
|
132
|
-
'1. `git fetch origin && git checkout main && git pull` — always start from the current HEAD',
|
|
133
|
-
'2. Read `AGENTS.md` — mandatory rules for agents in this repository',
|
|
134
|
-
'',
|
|
135
|
-
'**Rules:**',
|
|
136
|
-
'- Fix only what the violation points out — do not refactor unrelated code',
|
|
137
|
-
'- Run `{{TEST_COMMAND}}` before opening the Pull Request',
|
|
138
|
-
`- Include \`Closes #${issueNumber}\` in the PR body`,
|
|
139
|
-
].join('\n');
|
|
140
|
-
|
|
141
|
-
await github.rest.issues.createComment({
|
|
142
|
-
owner: context.repo.owner,
|
|
143
|
-
repo: context.repo.repo,
|
|
144
|
-
issue_number: issueNumber,
|
|
145
|
-
body,
|
|
146
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
name: Auto Approve PRs
|
|
2
|
-
on:
|
|
3
|
-
pull_request:
|
|
4
|
-
types: [opened, labeled, synchronize]
|
|
5
|
-
|
|
6
|
-
permissions:
|
|
7
|
-
pull-requests: write
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
auto-approve:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
if: contains(github.event.pull_request.labels.*.name, 'auto-approve')
|
|
13
|
-
steps:
|
|
14
|
-
- uses: hmarr/auto-approve-action@v4
|
|
15
|
-
with:
|
|
16
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
name: Sentinel / CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches: [ main ]
|
|
6
|
-
push:
|
|
7
|
-
branches: [ main ]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
validate:
|
|
11
|
-
name: Run tests and linters
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
|
|
16
|
-
- name: Setup environment
|
|
17
|
-
run: echo "Replace this with your language/toolchain setup (e.g., actions/setup-node)"
|
|
18
|
-
|
|
19
|
-
- name: Install dependencies
|
|
20
|
-
run: echo "Replace this with your package manager install command"
|
|
21
|
-
|
|
22
|
-
- name: Run Linters
|
|
23
|
-
if: ${{ !contains('{{LINT_COMMAND}}', '{{') }}
|
|
24
|
-
run: |
|
|
25
|
-
{{LINT_COMMAND}}
|
|
26
|
-
|
|
27
|
-
- name: Typecheck
|
|
28
|
-
if: ${{ !contains('{{TYPECHECK_COMMAND}}', '{{') }}
|
|
29
|
-
run: |
|
|
30
|
-
{{TYPECHECK_COMMAND}}
|
|
31
|
-
|
|
32
|
-
- name: Build
|
|
33
|
-
if: ${{ !contains('{{BUILD_COMMAND}}', '{{') }}
|
|
34
|
-
run: |
|
|
35
|
-
{{BUILD_COMMAND}}
|
|
36
|
-
|
|
37
|
-
- name: Run Tests
|
|
38
|
-
if: ${{ !contains('{{TEST_COMMAND}}', '{{') }}
|
|
39
|
-
run: |
|
|
40
|
-
{{TEST_COMMAND}}
|
|
41
|
-
|
|
42
|
-
ci-status:
|
|
43
|
-
name: Sentinel / CI
|
|
44
|
-
needs: [validate]
|
|
45
|
-
if: always()
|
|
46
|
-
runs-on: ubuntu-latest
|
|
47
|
-
steps:
|
|
48
|
-
- name: Check validate result
|
|
49
|
-
run: |
|
|
50
|
-
result="${{ needs.validate.result }}"
|
|
51
|
-
if [[ "$result" != "success" && "$result" != "skipped" ]]; then
|
|
52
|
-
echo "CI failed: validate=$result"
|
|
53
|
-
exit 1
|
|
54
|
-
fi
|