aped-method 1.9.0 → 2.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/package.json +1 -1
- package/src/templates/references.js +193 -0
- package/src/templates/skills.js +71 -17
package/package.json
CHANGED
|
@@ -66,6 +66,10 @@ export function references(c) {
|
|
|
66
66
|
path: `${a}/aped-qa/references/test-patterns.md`,
|
|
67
67
|
content: TEST_PATTERNS,
|
|
68
68
|
},
|
|
69
|
+
{
|
|
70
|
+
path: `${a}/aped-d/references/ticket-git-workflow.md`,
|
|
71
|
+
content: TICKET_GIT_WORKFLOW,
|
|
72
|
+
},
|
|
69
73
|
];
|
|
70
74
|
}
|
|
71
75
|
|
|
@@ -1111,3 +1115,192 @@ describe("{Endpoint/Service}", () => {
|
|
|
1111
1115
|
- **Testing implementation**: Test behavior, not internal structure.
|
|
1112
1116
|
- **No assertions**: Every test must assert something. \`expect(true).toBe(true)\` is not a test.
|
|
1113
1117
|
`;
|
|
1118
|
+
|
|
1119
|
+
const TICKET_GIT_WORKFLOW = `# Ticket System & Git Provider Integration
|
|
1120
|
+
|
|
1121
|
+
Read \`ticket_system\` and \`git_provider\` from config.yaml to adapt all instructions below.
|
|
1122
|
+
|
|
1123
|
+
---
|
|
1124
|
+
|
|
1125
|
+
## Ticket System Sync Rules
|
|
1126
|
+
|
|
1127
|
+
### If ticket_system = "none"
|
|
1128
|
+
Skip all ticket references. Use plain commit messages without ticket IDs.
|
|
1129
|
+
|
|
1130
|
+
### If ticket_system = "linear"
|
|
1131
|
+
|
|
1132
|
+
**BEFORE starting a story:**
|
|
1133
|
+
1. Find the corresponding Linear issue
|
|
1134
|
+
2. Move issue status to **In Progress**
|
|
1135
|
+
3. Use the **Linear-suggested git branch name** (from Linear UI: "Copy git branch name")
|
|
1136
|
+
4. Add a comment on the issue: what you're about to implement
|
|
1137
|
+
|
|
1138
|
+
**DURING development:**
|
|
1139
|
+
- Reference the Linear issue ID in EVERY commit message
|
|
1140
|
+
- Use **Linear magic words** for auto-linking:
|
|
1141
|
+
- \`Part of TEAM-XX\` — links without closing (use in intermediate commits)
|
|
1142
|
+
- \`Fixes TEAM-XX\` — links and auto-closes issue on merge
|
|
1143
|
+
- Commit format: \`type(TEAM-XX): description\\n\\nPart of TEAM-XX\`
|
|
1144
|
+
|
|
1145
|
+
**AFTER completing:**
|
|
1146
|
+
1. Create PR with issue ID: \`gh pr create --title "feat(TEAM-XX): Story X.Y - Description" --body "Fixes TEAM-XX"\`
|
|
1147
|
+
2. Move issue to **In Review**
|
|
1148
|
+
3. After merge: move to **Done**
|
|
1149
|
+
4. Update state.yaml to match
|
|
1150
|
+
|
|
1151
|
+
### If ticket_system = "jira"
|
|
1152
|
+
|
|
1153
|
+
**BEFORE:** Find JIRA issue (PROJ-XX), move to In Progress, use branch: \`feature/PROJ-XX-description\`
|
|
1154
|
+
|
|
1155
|
+
**DURING:**
|
|
1156
|
+
- Reference JIRA issue ID in every commit: \`type(PROJ-XX): description\`
|
|
1157
|
+
- JIRA smart commits: \`PROJ-XX #in-progress\`, \`PROJ-XX #done\`
|
|
1158
|
+
|
|
1159
|
+
**AFTER:**
|
|
1160
|
+
- PR title: \`feat(PROJ-XX): Story X.Y - Description\`
|
|
1161
|
+
- JIRA auto-links PRs via issue ID in branch name or commit
|
|
1162
|
+
|
|
1163
|
+
### If ticket_system = "github-issues"
|
|
1164
|
+
|
|
1165
|
+
**BEFORE:** Find GitHub issue #XX, assign yourself
|
|
1166
|
+
|
|
1167
|
+
**DURING:**
|
|
1168
|
+
- Reference in commits: \`type(#XX): description\`
|
|
1169
|
+
- Use \`Closes #XX\` or \`Fixes #XX\` in final commit/PR body
|
|
1170
|
+
|
|
1171
|
+
**AFTER:**
|
|
1172
|
+
- \`gh pr create --title "feat: Story X.Y" --body "Closes #XX"\`
|
|
1173
|
+
- Issue auto-closes when PR merges
|
|
1174
|
+
|
|
1175
|
+
### If ticket_system = "gitlab-issues"
|
|
1176
|
+
|
|
1177
|
+
**BEFORE:** Find GitLab issue #XX, assign yourself
|
|
1178
|
+
|
|
1179
|
+
**DURING:**
|
|
1180
|
+
- Reference: \`type(#XX): description\`
|
|
1181
|
+
- Use \`Closes #XX\` in commit/MR body
|
|
1182
|
+
|
|
1183
|
+
**AFTER:**
|
|
1184
|
+
- \`glab mr create --title "feat: Story X.Y" --description "Closes #XX"\`
|
|
1185
|
+
- Issue auto-closes when MR merges
|
|
1186
|
+
|
|
1187
|
+
---
|
|
1188
|
+
|
|
1189
|
+
## Git Provider Workflow
|
|
1190
|
+
|
|
1191
|
+
### If git_provider = "github"
|
|
1192
|
+
|
|
1193
|
+
**Branch strategy:**
|
|
1194
|
+
\`\`\`
|
|
1195
|
+
main (production)
|
|
1196
|
+
└── develop (integration, if configured)
|
|
1197
|
+
└── feature/{ticket-id}-description
|
|
1198
|
+
\`\`\`
|
|
1199
|
+
|
|
1200
|
+
**Commands:**
|
|
1201
|
+
\`\`\`bash
|
|
1202
|
+
# Start story
|
|
1203
|
+
git checkout main # or develop if exists
|
|
1204
|
+
git pull
|
|
1205
|
+
git checkout -b feature/{ticket-id}-description
|
|
1206
|
+
|
|
1207
|
+
# During dev
|
|
1208
|
+
git add <specific-files> # NEVER git add . or git add -A
|
|
1209
|
+
git commit -m "type({ticket-id}): description"
|
|
1210
|
+
|
|
1211
|
+
# Complete
|
|
1212
|
+
git push -u origin feature/{ticket-id}-description
|
|
1213
|
+
gh pr create --base main --title "type({ticket-id}): Story X.Y - Title" --body "Fixes {ticket-id}"
|
|
1214
|
+
|
|
1215
|
+
# After merge
|
|
1216
|
+
git checkout main && git pull
|
|
1217
|
+
git branch -d feature/{ticket-id}-description
|
|
1218
|
+
\`\`\`
|
|
1219
|
+
|
|
1220
|
+
### If git_provider = "gitlab"
|
|
1221
|
+
|
|
1222
|
+
**Commands:**
|
|
1223
|
+
\`\`\`bash
|
|
1224
|
+
# Start
|
|
1225
|
+
git checkout main && git pull
|
|
1226
|
+
git checkout -b feature/{ticket-id}-description
|
|
1227
|
+
|
|
1228
|
+
# Complete
|
|
1229
|
+
git push -u origin feature/{ticket-id}-description
|
|
1230
|
+
glab mr create --base main --title "type({ticket-id}): Story X.Y" --description "Closes {ticket-id}"
|
|
1231
|
+
|
|
1232
|
+
# After merge
|
|
1233
|
+
git checkout main && git pull
|
|
1234
|
+
git branch -d feature/{ticket-id}-description
|
|
1235
|
+
\`\`\`
|
|
1236
|
+
|
|
1237
|
+
### If git_provider = "bitbucket"
|
|
1238
|
+
|
|
1239
|
+
**Commands:**
|
|
1240
|
+
\`\`\`bash
|
|
1241
|
+
# Start
|
|
1242
|
+
git checkout main && git pull
|
|
1243
|
+
git checkout -b feature/{ticket-id}-description
|
|
1244
|
+
|
|
1245
|
+
# Complete
|
|
1246
|
+
git push -u origin feature/{ticket-id}-description
|
|
1247
|
+
# Create PR via Bitbucket web UI or API
|
|
1248
|
+
\`\`\`
|
|
1249
|
+
|
|
1250
|
+
---
|
|
1251
|
+
|
|
1252
|
+
## Commit Message Format
|
|
1253
|
+
|
|
1254
|
+
\`\`\`
|
|
1255
|
+
type({ticket-id}): short description
|
|
1256
|
+
|
|
1257
|
+
[Optional body]
|
|
1258
|
+
|
|
1259
|
+
{Magic word} {ticket-id}
|
|
1260
|
+
\`\`\`
|
|
1261
|
+
|
|
1262
|
+
| Prefix | Usage |
|
|
1263
|
+
|--------|-------|
|
|
1264
|
+
| feat | New feature / story implementation |
|
|
1265
|
+
| fix | Bug fix |
|
|
1266
|
+
| refactor | Code restructuring (no behavior change) |
|
|
1267
|
+
| test | Adding or updating tests |
|
|
1268
|
+
| docs | Documentation changes |
|
|
1269
|
+
| chore | Build, config, tooling changes |
|
|
1270
|
+
|
|
1271
|
+
---
|
|
1272
|
+
|
|
1273
|
+
## State Sync
|
|
1274
|
+
|
|
1275
|
+
Local state.yaml and ticket system MUST agree:
|
|
1276
|
+
|
|
1277
|
+
| state.yaml | Linear | Jira | GitHub/GitLab Issues |
|
|
1278
|
+
|------------|--------|------|---------------------|
|
|
1279
|
+
| backlog | Backlog | Backlog | No label |
|
|
1280
|
+
| ready-for-dev | Todo | To Do | "ready" label |
|
|
1281
|
+
| in-progress | In Progress | In Progress | "in progress" label |
|
|
1282
|
+
| review | In Review | In Review | PR linked |
|
|
1283
|
+
| done | Done | Done | Closed |
|
|
1284
|
+
|
|
1285
|
+
**If they diverge, the ticket system is the authority.** Update state.yaml to match.
|
|
1286
|
+
|
|
1287
|
+
---
|
|
1288
|
+
|
|
1289
|
+
## Epic/Milestone Tracking
|
|
1290
|
+
|
|
1291
|
+
- When first story of an epic moves to In Progress → update epic/milestone status
|
|
1292
|
+
- When ALL stories in an epic are Done → mark milestone complete
|
|
1293
|
+
- Keep milestone descriptions updated if scope changes
|
|
1294
|
+
|
|
1295
|
+
---
|
|
1296
|
+
|
|
1297
|
+
## Critical Rules
|
|
1298
|
+
|
|
1299
|
+
1. NEVER commit directly to main
|
|
1300
|
+
2. ALWAYS create feature branch before starting
|
|
1301
|
+
3. ALWAYS include ticket ID in every commit message
|
|
1302
|
+
4. ALWAYS update ticket status: In Progress → In Review → Done
|
|
1303
|
+
5. ALWAYS stage specific files — never \`git add .\` or \`git add -A\`
|
|
1304
|
+
6. ALWAYS use ticket system's suggested branch name when available
|
|
1305
|
+
7. NEVER commit secrets (.env, API keys, settings.local.json)
|
|
1306
|
+
`;
|
package/src/templates/skills.js
CHANGED
|
@@ -335,13 +335,18 @@ Story files: \`${o}/stories/{story-key}.md\`
|
|
|
335
335
|
|
|
336
336
|
## Ticket System Integration
|
|
337
337
|
|
|
338
|
-
Read \`ticket_system\` from config.
|
|
338
|
+
Read \`ticket_system\` from config. Read \`${a}/aped-d/references/ticket-git-workflow.md\` for full guide.
|
|
339
|
+
|
|
340
|
+
If \`ticket_system\` is not \`none\`:
|
|
339
341
|
- Add ticket reference in each story header: \`**Ticket:** {{ticket_id}}\`
|
|
340
|
-
-
|
|
341
|
-
-
|
|
342
|
-
-
|
|
343
|
-
-
|
|
342
|
+
- Add suggested branch name: \`**Branch:** feature/{{ticket_id}}-{{story-slug}}\`
|
|
343
|
+
- Format ticket ID per provider:
|
|
344
|
+
- \`linear\`: \`TEAM-###\` (e.g., \`KON-10\`)
|
|
345
|
+
- \`jira\`: \`PROJ-###\` (e.g., \`PROJ-42\`)
|
|
346
|
+
- \`github-issues\`: \`#issue_number\` (e.g., \`#10\`)
|
|
347
|
+
- \`gitlab-issues\`: \`#issue_number\` (e.g., \`#10\`)
|
|
344
348
|
- Note: actual ticket creation is manual — these are reference placeholders
|
|
349
|
+
- In Dev Notes, add: "Commit prefix: \`feat({{ticket_id}})\`"
|
|
345
350
|
|
|
346
351
|
## FR Coverage Map
|
|
347
352
|
|
|
@@ -469,11 +474,32 @@ Mark \`[x]\` ONLY when: tests exist, pass 100%, implementation matches, ACs sati
|
|
|
469
474
|
|
|
470
475
|
**STOP and ask user if:** new dependency, 3 consecutive failures, missing config, ambiguity.
|
|
471
476
|
|
|
472
|
-
## Git
|
|
477
|
+
## Git & Ticket Workflow
|
|
478
|
+
|
|
479
|
+
Read \`${a}/aped-d/references/ticket-git-workflow.md\` for full integration guide.
|
|
480
|
+
|
|
481
|
+
Read \`ticket_system\` and \`git_provider\` from \`${a}/config.yaml\`.
|
|
482
|
+
|
|
483
|
+
### Before Implementation
|
|
484
|
+
If \`ticket_system\` is not \`none\`:
|
|
485
|
+
1. Find the corresponding ticket/issue for this story
|
|
486
|
+
2. Move ticket status to **In Progress**
|
|
487
|
+
3. Create feature branch using ticket system's suggested name
|
|
488
|
+
4. Add a comment on the ticket: implementation plan
|
|
489
|
+
|
|
490
|
+
If \`ticket_system\` is \`none\`:
|
|
491
|
+
1. Create branch: \`feature/{story-key}\`
|
|
473
492
|
|
|
474
|
-
|
|
475
|
-
-
|
|
476
|
-
-
|
|
493
|
+
### During Implementation
|
|
494
|
+
- Include ticket ID in EVERY commit: \`type({ticket-id}): description\`
|
|
495
|
+
- Use magic words for auto-linking (see reference doc)
|
|
496
|
+
- NEVER use \`git add .\` — stage specific files only
|
|
497
|
+
|
|
498
|
+
### After Implementation
|
|
499
|
+
1. Push branch and create PR/MR (adapt to \`git_provider\`):
|
|
500
|
+
- \`github\`: \`gh pr create --title "feat({ticket-id}): Story X.Y" --body "Fixes {ticket-id}"\`
|
|
501
|
+
- \`gitlab\`: \`glab mr create --title "feat({ticket-id}): Story X.Y" --description "Closes {ticket-id}"\`
|
|
502
|
+
2. Move ticket to **In Review**
|
|
477
503
|
|
|
478
504
|
## Completion
|
|
479
505
|
|
|
@@ -572,6 +598,20 @@ Severity: CRITICAL > HIGH > MEDIUM > LOW. Format: \`[Severity] Description [file
|
|
|
572
598
|
- MEDIUM/LOW only: fix automatically, story — \`done\`
|
|
573
599
|
- HIGH+: fix or add \`[AI-Review]\` items, story — \`in-progress\`
|
|
574
600
|
|
|
601
|
+
## Ticket & Git Update
|
|
602
|
+
|
|
603
|
+
Read \`ticket_system\` and \`git_provider\` from \`${a}/config.yaml\`.
|
|
604
|
+
Read \`${a}/aped-d/references/ticket-git-workflow.md\` for details.
|
|
605
|
+
|
|
606
|
+
If story → \`done\`:
|
|
607
|
+
1. If PR exists: approve/merge (adapt to \`git_provider\`)
|
|
608
|
+
2. If \`ticket_system\` is not \`none\`: move ticket to **Done**
|
|
609
|
+
3. Cleanup: delete feature branch after merge
|
|
610
|
+
|
|
611
|
+
If story → \`in-progress\` (review found HIGH+ issues):
|
|
612
|
+
1. Add [AI-Review] items as comments on the PR
|
|
613
|
+
2. Ticket stays in **In Review**
|
|
614
|
+
|
|
575
615
|
## State Update
|
|
576
616
|
|
|
577
617
|
Update \`${o}/state.yaml\`. If more stories remain: invoke Skill tool with \`skill: "aped-d"\`. If all stories done: report pipeline completion.
|
|
@@ -966,11 +1006,20 @@ Based on current state, suggest the next logical command:
|
|
|
966
1006
|
- If all stories \`done\`: suggest pipeline complete
|
|
967
1007
|
- If blockers found: describe resolution path
|
|
968
1008
|
|
|
969
|
-
## Ticket System
|
|
1009
|
+
## Ticket System Sync
|
|
1010
|
+
|
|
1011
|
+
Read \`${a}/aped-d/references/ticket-git-workflow.md\` for status mapping.
|
|
970
1012
|
|
|
971
1013
|
If \`ticket_system\` is not \`none\`:
|
|
972
|
-
- Show ticket
|
|
973
|
-
-
|
|
1014
|
+
- Show ticket ID alongside each story status
|
|
1015
|
+
- Flag any stories without ticket references
|
|
1016
|
+
- Check sync: compare state.yaml statuses with expected ticket statuses
|
|
1017
|
+
- If divergence detected: warn user — "state.yaml says X, ticket system should be Y"
|
|
1018
|
+
- Display mapping table:
|
|
1019
|
+
- \`backlog\` → Backlog/Todo
|
|
1020
|
+
- \`in-progress\` → In Progress
|
|
1021
|
+
- \`review\` → In Review
|
|
1022
|
+
- \`done\` → Done
|
|
974
1023
|
|
|
975
1024
|
## Output
|
|
976
1025
|
|
|
@@ -1402,13 +1451,18 @@ Quick checklist — no full adversarial review:
|
|
|
1402
1451
|
- [ ] No regressions in existing tests
|
|
1403
1452
|
- [ ] AC from quick spec satisfied
|
|
1404
1453
|
|
|
1405
|
-
## Git
|
|
1454
|
+
## Git & Ticket Workflow
|
|
1406
1455
|
|
|
1407
1456
|
Read \`ticket_system\` and \`git_provider\` from config.
|
|
1408
|
-
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1457
|
+
Read \`${a}/aped-d/references/ticket-git-workflow.md\` for full guide.
|
|
1458
|
+
|
|
1459
|
+
1. **Branch**: create \`fix/{ticket-id}-{slug}\` or \`feature/{ticket-id}-{slug}\`
|
|
1460
|
+
2. **Commits**: \`type({ticket-id}): description\` — include magic words per ticket provider
|
|
1461
|
+
3. **PR/MR**:
|
|
1462
|
+
- \`github\`: \`gh pr create --title "fix({ticket-id}): description" --body "Fixes {ticket-id}"\`
|
|
1463
|
+
- \`gitlab\`: \`glab mr create --title "fix({ticket-id}): description" --description "Closes {ticket-id}"\`
|
|
1464
|
+
- \`bitbucket\`: push branch, create PR via web
|
|
1465
|
+
4. **Ticket**: move to Done after merge
|
|
1412
1466
|
|
|
1413
1467
|
## Output
|
|
1414
1468
|
|