Skip to content

Commit b4d54c6

Browse files
committed
feat: upstream tracking — auto-categorize prompt vs format changes
1 parent 0f164d8 commit b4d54c6

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

.github/workflows/track-upstream.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,18 @@ jobs:
4242
--jq '[.commits[] | "- `" + (.sha | .[:7]) + "` " + (.commit.message | split("\n") | .[0])] | join("\n")' 2>/dev/null || echo "- Unable to fetch diff")
4343
FILES=$(gh api "repos/garrytan/gstack/compare/${LAST_KNOWN}...${LATEST}" \
4444
--jq '[.files[].filename] | map(select(test("^(plan-ceo|plan-eng|review|ship|qa|retro)/"))) | if length == 0 then "No skill files changed" else join("\n") end' 2>/dev/null || echo "- Unable to determine")
45+
46+
# Categorize changes
47+
PROMPT_CHANGES=$(gh api "repos/garrytan/gstack/compare/${LAST_KNOWN}...${LATEST}" \
48+
--jq '[.files[] | select(.filename | test("^(plan-ceo|plan-eng|review|ship|qa|retro)/")) | select(.patch // "" | test("(You are|## |### |\\*\\*|prompt|instruction|checklist|principle|workflow)", "i")) | .filename] | unique | if length == 0 then "None detected" else join("\n") end' 2>/dev/null || echo "Unable to analyze")
49+
FORMAT_CHANGES=$(gh api "repos/garrytan/gstack/compare/${LAST_KNOWN}...${LATEST}" \
50+
--jq '[.files[] | select(.filename | test("^(plan-ceo|plan-eng|review|ship|qa|retro)/")) | select((.patch // "" | test("(You are|## |### |\\*\\*|prompt|instruction|checklist|principle|workflow)", "i")) | not) | .filename] | unique | if length == 0 then "None detected" else join("\n") end' 2>/dev/null || echo "Unable to analyze")
4551
else
4652
COMMITS=$(gh api 'repos/garrytan/gstack/commits?per_page=10' \
4753
--jq '[.[] | "- `" + (.sha | .[:7]) + "` " + (.commit.message | split("\n") | .[0])] | join("\n")')
4854
FILES="First sync — review all skills"
55+
PROMPT_CHANGES="First sync — review all"
56+
FORMAT_CHANGES="First sync — review all"
4957
fi
5058
5159
# Multi-line env vars
@@ -55,6 +63,12 @@ jobs:
5563
echo "FILES<<EOF" >> "$GITHUB_ENV"
5664
echo "$FILES" >> "$GITHUB_ENV"
5765
echo "EOF" >> "$GITHUB_ENV"
66+
echo "PROMPT_CHANGES<<EOF" >> "$GITHUB_ENV"
67+
echo "$PROMPT_CHANGES" >> "$GITHUB_ENV"
68+
echo "EOF" >> "$GITHUB_ENV"
69+
echo "FORMAT_CHANGES<<EOF" >> "$GITHUB_ENV"
70+
echo "$FORMAT_CHANGES" >> "$GITHUB_ENV"
71+
echo "EOF" >> "$GITHUB_ENV"
5872
fi
5973
6074
- name: Ensure upstream label exists
@@ -82,6 +96,14 @@ jobs:
8296
### Affected skill files
8397
${FILES}
8498
99+
### Change analysis
100+
101+
**Prompt/logic changes** (likely need porting):
102+
${PROMPT_CHANGES}
103+
104+
**Format-only changes** (likely safe to skip):
105+
${FORMAT_CHANGES}
106+
85107
### Mapping
86108
| gstack | kstack | Action needed? |
87109
|--------|--------|----------------|
@@ -96,7 +118,7 @@ jobs:
96118
97119
### Checklist
98120
- [ ] Read the gstack diff
99-
- [ ] Identify changes relevant to kstack
121+
- [ ] Review prompt/logic changes above
100122
- [ ] Adapt to Kiro CLI SKILL.md format (remove Go templates, Playwright, Greptile, slash commands)
101123
- [ ] Update affected skills
102124
- [ ] Run evals on changed skills

0 commit comments

Comments
 (0)