ai-core-framework 0.1.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/.claude-plugin/plugin.json +21 -0
- package/.codex-plugin/plugin.json +35 -0
- package/.cursor-plugin/plugin.json +22 -0
- package/README.md +173 -0
- package/bin/ai-core-framework.js +110 -0
- package/core/README.md +162 -0
- package/core/agents/README.md +32 -0
- package/core/agents/business-analyst.md +269 -0
- package/core/agents/developer.md +375 -0
- package/core/agents/qa-tester.md +477 -0
- package/core/agents/scrum-master.md +136 -0
- package/core/agents/tech-lead.md +345 -0
- package/core/config/backlog.schema.json +38 -0
- package/core/config/docs-policy.default.json +37 -0
- package/core/config/release.schema.json +120 -0
- package/core/config/ticket.schema.json +253 -0
- package/core/rules/00-global-rules.md +373 -0
- package/core/rules/01-git-workflow.md +388 -0
- package/core/rules/02-code-quality.md +77 -0
- package/core/rules/03-security.md +78 -0
- package/core/rules/04-documentation.md +72 -0
- package/core/rules/05-testing-mandatory.md +374 -0
- package/core/rules/06-approval-gates.md +388 -0
- package/core/rules/07-definition-of-ready.md +112 -0
- package/core/rules/08-definition-of-done.md +149 -0
- package/core/scripts/ai-core.sh +456 -0
- package/core/scripts/generate-views.sh +210 -0
- package/core/scripts/install-codex-prompts.sh +127 -0
- package/core/scripts/log-user-request.sh +113 -0
- package/core/scripts/setup-project.sh +183 -0
- package/core/scripts/sync-platforms.sh +322 -0
- package/core/scripts/validate-audit-log.sh +73 -0
- package/core/scripts/validate-docs.sh +365 -0
- package/core/scripts/validate-permissions.sh +132 -0
- package/core/scripts/validate-state.sh +611 -0
- package/core/scripts/workflow.sh +513 -0
- package/core/skills/README.md +21 -0
- package/core/skills/ai-core-commands/SKILL.md +86 -0
- package/core/skills/brainstorming/SKILL.md +40 -0
- package/core/skills/development-implement-task/SKILL.md +308 -0
- package/core/skills/executing-ticket/SKILL.md +28 -0
- package/core/skills/git-branch-status/SKILL.md +56 -0
- package/core/skills/git-cleanup-branches/SKILL.md +57 -0
- package/core/skills/git-scan-untracked/SKILL.md +50 -0
- package/core/skills/meta-generate-views/SKILL.md +54 -0
- package/core/skills/meta-request-log/SKILL.md +61 -0
- package/core/skills/meta-sprint-report/SKILL.md +59 -0
- package/core/skills/meta-sync-platforms/SKILL.md +53 -0
- package/core/skills/meta-ticket-health/SKILL.md +61 -0
- package/core/skills/meta-validate-audit-log/SKILL.md +42 -0
- package/core/skills/meta-validate-docs/SKILL.md +58 -0
- package/core/skills/meta-validate-permissions/SKILL.md +53 -0
- package/core/skills/meta-validate-state/SKILL.md +58 -0
- package/core/skills/planning-analyze-requirements/SKILL.md +471 -0
- package/core/skills/planning-backlog-status/SKILL.md +57 -0
- package/core/skills/planning-document-existing-requirements/SKILL.md +246 -0
- package/core/skills/planning-estimate-task/SKILL.md +60 -0
- package/core/skills/planning-groom-ticket/SKILL.md +442 -0
- package/core/skills/planning-mark-ready/SKILL.md +111 -0
- package/core/skills/planning-plan-refactor/SKILL.md +66 -0
- package/core/skills/planning-plan-sprint/SKILL.md +112 -0
- package/core/skills/planning-prioritize-backlog/SKILL.md +62 -0
- package/core/skills/planning-write-plan/SKILL.md +68 -0
- package/core/skills/project-detect-stack/SKILL.md +71 -0
- package/core/skills/project-discover-codebase/SKILL.md +74 -0
- package/core/skills/project-setup-project/SKILL.md +113 -0
- package/core/skills/qa-bug-status/SKILL.md +52 -0
- package/core/skills/qa-report-bug/SKILL.md +518 -0
- package/core/skills/qa-smoke-test/SKILL.md +387 -0
- package/core/skills/qa-triage-bug/SKILL.md +62 -0
- package/core/skills/qa-verify-fix/SKILL.md +446 -0
- package/core/skills/release-hotfix/SKILL.md +117 -0
- package/core/skills/release-release/SKILL.md +123 -0
- package/core/skills/release-rollback/SKILL.md +62 -0
- package/core/skills/review-create-pr/SKILL.md +418 -0
- package/core/skills/review-merge-pr/SKILL.md +425 -0
- package/core/skills/review-techlead-review/SKILL.md +547 -0
- package/core/skills/using-ai-core/SKILL.md +72 -0
- package/core/skills/verification-before-done/SKILL.md +35 -0
- package/core/skills/writing-implementation-plan/SKILL.md +45 -0
- package/core/templates/ci/ai-core-governance.yml +112 -0
- package/core/templates/ci/node-pnpm.yml +35 -0
- package/core/templates/pm/retrospective-template.md +47 -0
- package/core/templates/pm/sprint-plan-template.md +45 -0
- package/core/templates/pr/pull-request-template.md +247 -0
- package/core/templates/project/CODEOWNERS +11 -0
- package/core/templates/project/docs-policy.json +3 -0
- package/core/templates/project/project-config.yaml +137 -0
- package/core/templates/project/project-structure.yaml +76 -0
- package/core/templates/qa/bug-report-template.md +371 -0
- package/core/templates/qa/test-plan-template.md +57 -0
- package/core/templates/release/release-record-template.json +67 -0
- package/core/templates/requirements/PRD-template.md +58 -0
- package/core/templates/requirements/user-story-template.md +381 -0
- package/core/templates/technical/ADR-template.md +46 -0
- package/core/templates/technical/refactor-plan-template.md +84 -0
- package/core/templates/technical/tech-design-template.md +71 -0
- package/core/workflows/bug-lifecycle.md +56 -0
- package/core/workflows/feature-lifecycle.md +347 -0
- package/core/workflows/hotfix-lifecycle.md +65 -0
- package/core/workflows/sprint-lifecycle.md +56 -0
- package/lib/install-codex.js +85 -0
- package/package.json +36 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
# 🔄 Feature Lifecycle Workflow
|
|
2
|
+
|
|
3
|
+
> From requirement to production. Strict Agile/Scrum flow.
|
|
4
|
+
|
|
5
|
+
## Overview Diagram
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌──────────────────────────────────────────────────────────────────────┐
|
|
9
|
+
│ FEATURE LIFECYCLE │
|
|
10
|
+
└──────────────────────────────────────────────────────────────────────┘
|
|
11
|
+
|
|
12
|
+
Stakeholder BA/PM Tech Lead Dev QA SM
|
|
13
|
+
│ │ │ │ │ │
|
|
14
|
+
│ requirement │ │ │ │ │
|
|
15
|
+
├───────────────────▶│ │ │ │ │
|
|
16
|
+
│ │ /analyze-req │ │ │ │
|
|
17
|
+
│ │ creates TICKET │ │ │ │
|
|
18
|
+
│ │ creates spec │ │ │ │
|
|
19
|
+
│ │ state: DRAFT │ │ │ │
|
|
20
|
+
│ │ │ │ │ │
|
|
21
|
+
│ │ HANDOFF───────────▶│ │ │ │
|
|
22
|
+
│ │ │ /groom-ticket │ │ │
|
|
23
|
+
│ │ │ estimates │ │ │
|
|
24
|
+
│ │ │ state: GROOMED │ │ │
|
|
25
|
+
│ │ │ │ │ │
|
|
26
|
+
│ │ │ /write-plan │ │ │
|
|
27
|
+
│ │ │ creates plan │ │ │
|
|
28
|
+
│ │ │ │ │ │
|
|
29
|
+
│ │◀───────────────────┤ │ │ │
|
|
30
|
+
│ │ DoR check │ │ │ │
|
|
31
|
+
│ │ state: READY │ │ │ │
|
|
32
|
+
│ │ │ │ │ │
|
|
33
|
+
│ │ │ │ │ /plan-sprint │
|
|
34
|
+
│ │ │ │ │ pulls │
|
|
35
|
+
│ │ │ │ │ ticket to │
|
|
36
|
+
│ │ │ │ │ sprint │
|
|
37
|
+
│ │ │ │ │ │
|
|
38
|
+
│ │ │ │ /implement-task│ │
|
|
39
|
+
│ │ │ │ state: │ │
|
|
40
|
+
│ │ │ │ IN_PROGRESS │ │
|
|
41
|
+
│ │ │ │ │ │
|
|
42
|
+
│ │ │ │ TDD: │ │
|
|
43
|
+
│ │ │ │ - test first │ │
|
|
44
|
+
│ │ │ │ - implement │ │
|
|
45
|
+
│ │ │ │ - refactor │ │
|
|
46
|
+
│ │ │ │ │ │
|
|
47
|
+
│ │ │ │ /create-pr │ │
|
|
48
|
+
│ │ │ │ state: │ │
|
|
49
|
+
│ │ │ │ IN_REVIEW │ │
|
|
50
|
+
│ │ │ │ │ │
|
|
51
|
+
│ │ │ /techlead-review│ │ │
|
|
52
|
+
│ │ │◀────────────────┤ │ │
|
|
53
|
+
│ │ │ approve / reject│ │ │
|
|
54
|
+
│ │ │ │ │ │
|
|
55
|
+
│ │ │ /merge-pr │ │ │
|
|
56
|
+
│ │ │ state: QA │ │ │
|
|
57
|
+
│ │ │ │ │ │
|
|
58
|
+
│ │ │ │ │ /smoke-test │
|
|
59
|
+
│ │ │ │ │ verify AC │
|
|
60
|
+
│ │ │ │ │ │
|
|
61
|
+
│ │ │ │ │ Pass? ──────▶│
|
|
62
|
+
│ │ │ │ │ │
|
|
63
|
+
│ │ │ │ │ │ /release
|
|
64
|
+
│ │ │ │ │ │ state: DONE
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Phase 1: Requirement Intake
|
|
70
|
+
|
|
71
|
+
**Owner**: `business-analyst` agent
|
|
72
|
+
**Input**: Free text from stakeholder (email, Slack, voice transcript, Figma)
|
|
73
|
+
**Output**: Ticket JSON with state `DRAFT` and linked spec in `docs/project/specs/`
|
|
74
|
+
|
|
75
|
+
### Steps
|
|
76
|
+
1. User invoke: `/analyze-requirements "I want users to reset passwords by email"`
|
|
77
|
+
2. BA agent:
|
|
78
|
+
- Check 5W1H (Who/What/Why/When/Where/How)
|
|
79
|
+
- If information is missing → ask user and do not create ticket
|
|
80
|
+
- Classify: feature / enhancement / bug / tech-debt
|
|
81
|
+
- If bug → assign severity (SEV-1/2/3/4)
|
|
82
|
+
3. BA writes User Story (INVEST)
|
|
83
|
+
4. BA writes ≥3 AC scenarios (Gherkin)
|
|
84
|
+
5. BA creates `docs/project/specs/TICKET-XXX-<slug>.md`
|
|
85
|
+
6. BA creates `project/tickets/TICKET-XXX.json` with `spec_path`
|
|
86
|
+
7. BA output HANDOFF → tech-lead
|
|
87
|
+
|
|
88
|
+
### Gates
|
|
89
|
+
- ✅ User Story pass INVEST
|
|
90
|
+
- ✅ Has ≥3 AC scenarios
|
|
91
|
+
- ✅ Business value is clear
|
|
92
|
+
|
|
93
|
+
### Timeboxed
|
|
94
|
+
Each requirement should finish in one session (< 30 minutes of BA work).
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Phase 2: Grooming
|
|
99
|
+
|
|
100
|
+
**Owner**: `tech-lead` agent (primary), `business-analyst` (consult)
|
|
101
|
+
**Input**: Ticket with state `DRAFT`
|
|
102
|
+
**Output**: Ticket with state `GROOMED`
|
|
103
|
+
|
|
104
|
+
### Steps
|
|
105
|
+
1. User invoke: `/groom-ticket TICKET-XXX`
|
|
106
|
+
2. Tech Lead:
|
|
107
|
+
- Read ticket + related code
|
|
108
|
+
- Identify technical approach
|
|
109
|
+
- Flag risks / unknowns
|
|
110
|
+
- Estimate story points (Fibonacci: 1, 2, 3, 5, 8, 13)
|
|
111
|
+
- If > 8 points → MUST split into sub-tickets
|
|
112
|
+
3. If ambiguity exists → escalate back to BA
|
|
113
|
+
4. Update ticket with `estimate`, technical notes, risks
|
|
114
|
+
5. Transition state: DRAFT → GROOMED
|
|
115
|
+
|
|
116
|
+
### Gates
|
|
117
|
+
- ✅ Technical approach feasible
|
|
118
|
+
- ✅ Estimate ≤ 8 points, or split
|
|
119
|
+
- ✅ No critical unknowns
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Phase 2.5: Implementation Plan
|
|
124
|
+
|
|
125
|
+
**Owner**: `tech-lead` agent
|
|
126
|
+
**Input**: Ticket with state `GROOMED`
|
|
127
|
+
**Output**: Linked implementation plan in `docs/project/plans/`
|
|
128
|
+
|
|
129
|
+
### Steps
|
|
130
|
+
1. User invoke: `/write-plan TICKET-XXX`
|
|
131
|
+
2. Tech Lead:
|
|
132
|
+
- Read ticket and linked `spec_path`
|
|
133
|
+
- Inspect relevant code/docs enough to identify implementation boundaries
|
|
134
|
+
- Create `docs/project/plans/TICKET-XXX-<slug>-plan.md`
|
|
135
|
+
- Link ticket field `implementation_plan_path`
|
|
136
|
+
- Define tests, docs, verification, and rollback notes
|
|
137
|
+
3. Suggest `/mark-ready TICKET-XXX`
|
|
138
|
+
|
|
139
|
+
### Gates
|
|
140
|
+
- ✅ Plan has concrete tasks
|
|
141
|
+
- ✅ Test strategy defined
|
|
142
|
+
- ✅ Documentation obligations identified
|
|
143
|
+
- ✅ No production code modified
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Phase 3: Definition of Ready Check
|
|
148
|
+
|
|
149
|
+
**Owner**: `scrum-master` agent
|
|
150
|
+
**Input**: Ticket with state `GROOMED`
|
|
151
|
+
**Output**: Ticket with state `READY`
|
|
152
|
+
|
|
153
|
+
### DoR Checklist (from `rules/07-definition-of-ready.md`)
|
|
154
|
+
- [ ] User Story pass INVEST
|
|
155
|
+
- [ ] ≥3 AC scenarios (Gherkin)
|
|
156
|
+
- [ ] Estimated (≤8 points)
|
|
157
|
+
- [ ] Dependencies identified
|
|
158
|
+
- [ ] Technical approach clear
|
|
159
|
+
- [ ] Implementation plan linked when work is non-trivial
|
|
160
|
+
- [ ] No blockers
|
|
161
|
+
- [ ] Test strategy defined
|
|
162
|
+
|
|
163
|
+
### Steps
|
|
164
|
+
1. User invoke: `/mark-ready TICKET-XXX`
|
|
165
|
+
2. SM run DoR checklist
|
|
166
|
+
3. If pass → state: READY
|
|
167
|
+
4. If fail → return to previous phase
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Phase 4: Sprint Planning
|
|
172
|
+
|
|
173
|
+
**Owner**: `scrum-master` agent
|
|
174
|
+
**Input**: Backlog of READY tickets
|
|
175
|
+
**Output**: Sprint with selected tickets
|
|
176
|
+
|
|
177
|
+
### Steps
|
|
178
|
+
1. At sprint start, user invoke: `/plan-sprint`
|
|
179
|
+
2. SM:
|
|
180
|
+
- Load all READY tickets
|
|
181
|
+
- Sort by priority (MUST > SHOULD > COULD)
|
|
182
|
+
- Pull tickets into sprint until capacity is reached (30 points default)
|
|
183
|
+
- Assign tickets to sprint
|
|
184
|
+
3. Create `project/sprints/SPRINT-XXX.json`
|
|
185
|
+
|
|
186
|
+
### Gates
|
|
187
|
+
- ✅ Total points ≤ team capacity
|
|
188
|
+
- ✅ All tickets state = READY
|
|
189
|
+
- ✅ No sprint currently active
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Phase 5: Development (TDD)
|
|
194
|
+
|
|
195
|
+
**Owner**: `developer` agent
|
|
196
|
+
**Input**: Ticket with state `READY`, in active sprint
|
|
197
|
+
**Output**: Ticket with state `IN_REVIEW`, PR created
|
|
198
|
+
|
|
199
|
+
### Steps
|
|
200
|
+
1. User invoke: `/implement-task TICKET-XXX`
|
|
201
|
+
2. Dev agent:
|
|
202
|
+
- Run precondition checks
|
|
203
|
+
- Create branch: `feature/TICKET-XXX-slug`
|
|
204
|
+
- State transition: READY → IN_PROGRESS
|
|
205
|
+
3. **TDD cycle** (strict):
|
|
206
|
+
- Write failing test for AC scenario 1
|
|
207
|
+
- Run test → must fail (red)
|
|
208
|
+
- Commit: `test(TICKET-XXX): add failing test for happy path`
|
|
209
|
+
- Write minimum code to pass
|
|
210
|
+
- Run test → must pass (green)
|
|
211
|
+
- Commit: `feat(TICKET-XXX): implement happy path`
|
|
212
|
+
- Refactor
|
|
213
|
+
- Commit: `refactor(TICKET-XXX): ...`
|
|
214
|
+
- Repeat for each AC scenario
|
|
215
|
+
4. Coverage check: `/check-coverage` → must ≥80%
|
|
216
|
+
5. Lint check
|
|
217
|
+
6. Update docs if there is a new API
|
|
218
|
+
7. Push branch
|
|
219
|
+
8. State: IN_PROGRESS → ready for PR
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Phase 6: Code Review
|
|
224
|
+
|
|
225
|
+
**Owner**: `developer` (create PR), `tech-lead` (review)
|
|
226
|
+
**Input**: Ticket with implementation complete
|
|
227
|
+
**Output**: Ticket with state `IN_REVIEW`, then approved
|
|
228
|
+
|
|
229
|
+
### Steps
|
|
230
|
+
1. Dev invoke: `/create-pr`
|
|
231
|
+
2. System:
|
|
232
|
+
- Generate PR with template
|
|
233
|
+
- Auto-link ticket
|
|
234
|
+
- Auto-add test results, coverage
|
|
235
|
+
- State: → IN_REVIEW
|
|
236
|
+
3. User invoke: `/techlead-review` (or SM auto-assigns)
|
|
237
|
+
4. Tech Lead:
|
|
238
|
+
- Code quality
|
|
239
|
+
- Architecture alignment
|
|
240
|
+
- Security (OWASP checklist)
|
|
241
|
+
- Test adequacy
|
|
242
|
+
- Performance
|
|
243
|
+
5. Outcome:
|
|
244
|
+
- **Approve** → next phase
|
|
245
|
+
- **Request changes** → back to Dev, state stays IN_REVIEW
|
|
246
|
+
- **Reject** → state back to IN_PROGRESS
|
|
247
|
+
|
|
248
|
+
### Gates
|
|
249
|
+
- ✅ All CI checks pass
|
|
250
|
+
- ✅ Coverage ≥ 80% on diff
|
|
251
|
+
- ✅ No critical security issues
|
|
252
|
+
- ✅ Architecture aligned with ADRs
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Phase 7: Merge & QA
|
|
257
|
+
|
|
258
|
+
**Owner**: `tech-lead` (merge), `qa-tester` (test)
|
|
259
|
+
**Input**: Approved PR
|
|
260
|
+
**Output**: Ticket with state `QA`, then `DONE`
|
|
261
|
+
|
|
262
|
+
### Steps
|
|
263
|
+
1. User invoke: `/merge-pr`
|
|
264
|
+
2. System:
|
|
265
|
+
- Squash merge into develop
|
|
266
|
+
- Delete feature branch
|
|
267
|
+
- Deploy to staging
|
|
268
|
+
- State: IN_REVIEW → QA
|
|
269
|
+
3. User invoke: `/smoke-test TICKET-XXX`
|
|
270
|
+
4. QA agent:
|
|
271
|
+
- Verify each AC scenario on staging
|
|
272
|
+
- Exploratory testing
|
|
273
|
+
- Regression check
|
|
274
|
+
5. Outcome:
|
|
275
|
+
- **Pass** → state: QA → DONE
|
|
276
|
+
- **Fail** → create bug ticket, link to feature, state back
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Phase 8: Release
|
|
281
|
+
|
|
282
|
+
**Owner**: `scrum-master` agent
|
|
283
|
+
**Input**: Multiple DONE tickets
|
|
284
|
+
**Output**: Production deployment
|
|
285
|
+
|
|
286
|
+
### Steps
|
|
287
|
+
1. End of sprint: `/release v1.2.0`
|
|
288
|
+
2. SM:
|
|
289
|
+
- Generate CHANGELOG from DONE tickets
|
|
290
|
+
- Create release/v1.2.0 branch
|
|
291
|
+
- Tag
|
|
292
|
+
- Deploy to production, or trigger CI
|
|
293
|
+
- Update all tickets: released_in = v1.2.0
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Special Paths
|
|
298
|
+
|
|
299
|
+
### Hotfix Path (bypass sprint)
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
SEV-1 bug → /report-bug → /triage-bug (SEV-1 confirmed)
|
|
303
|
+
→ /hotfix (bypass sprint planning)
|
|
304
|
+
→ Fast track: implement → tech-lead review → merge → release to prod
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
See `workflows/hotfix-lifecycle.md`.
|
|
308
|
+
|
|
309
|
+
### Blocked Path
|
|
310
|
+
|
|
311
|
+
```
|
|
312
|
+
Ticket hits blocker → state: BLOCKED
|
|
313
|
+
→ Log blocker in comment
|
|
314
|
+
→ Escalate to SM
|
|
315
|
+
→ Khi unblock → return to previous state
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Metrics Tracked
|
|
321
|
+
|
|
322
|
+
Per ticket:
|
|
323
|
+
- Lead time (DRAFT → DONE)
|
|
324
|
+
- Cycle time (IN_PROGRESS → DONE)
|
|
325
|
+
- Time in each state
|
|
326
|
+
- Number of state transitions (measure churn)
|
|
327
|
+
- Review iterations
|
|
328
|
+
|
|
329
|
+
Per sprint:
|
|
330
|
+
- Velocity (completed points)
|
|
331
|
+
- Commitment vs. completion ratio
|
|
332
|
+
- Scope change during sprint
|
|
333
|
+
|
|
334
|
+
Dashboard: `/sprint-report`
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Anti-patterns (Will be flagged)
|
|
339
|
+
|
|
340
|
+
❌ **Code without ticket**: Violates G-001
|
|
341
|
+
❌ **Skip states**: Violates G-003
|
|
342
|
+
❌ **Self-approval**: Violates G-008b
|
|
343
|
+
❌ **Direct push to main**: Violates G-009c
|
|
344
|
+
❌ **Disabled tests**: Violates G-011 (#6)
|
|
345
|
+
❌ **Mid-sprint scope change** without explicit SM approval
|
|
346
|
+
❌ **Cherry-pick merge** (squash merge is required)
|
|
347
|
+
❌ **Long-lived branches** (>5 days without PR)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Hotfix Lifecycle Workflow
|
|
2
|
+
|
|
3
|
+
> Emergency path for production-impacting SEV-1 and SEV-2 issues.
|
|
4
|
+
|
|
5
|
+
## 🎯 Purpose
|
|
6
|
+
|
|
7
|
+
Restore production quickly while preserving traceability, review, QA verification, and follow-up work.
|
|
8
|
+
|
|
9
|
+
## 🔄 Flow
|
|
10
|
+
|
|
11
|
+
1. Incident confirmation
|
|
12
|
+
- Bug is reported with `/report-bug` or described directly to `/hotfix`.
|
|
13
|
+
- Tech Lead confirms severity and production impact.
|
|
14
|
+
|
|
15
|
+
2. Incident ownership
|
|
16
|
+
- Assign incident owner.
|
|
17
|
+
- Identify communication channel.
|
|
18
|
+
- Record current production version and rollback option.
|
|
19
|
+
|
|
20
|
+
3. Hotfix branch
|
|
21
|
+
- Branch from production source.
|
|
22
|
+
- Use `hotfix/BUG-XXX-slug` or `hotfix/TICKET-XXX-slug`.
|
|
23
|
+
|
|
24
|
+
4. Minimal fix
|
|
25
|
+
- Reproduce issue.
|
|
26
|
+
- Add regression test if feasible.
|
|
27
|
+
- Implement smallest safe fix.
|
|
28
|
+
- Run targeted tests and security checks.
|
|
29
|
+
|
|
30
|
+
5. Emergency review
|
|
31
|
+
- Open PR.
|
|
32
|
+
- Require Tech Lead approval.
|
|
33
|
+
- Require second reviewer if Tech Lead authored fix.
|
|
34
|
+
|
|
35
|
+
6. Deploy and verify
|
|
36
|
+
- Merge and tag patch version.
|
|
37
|
+
- Deploy.
|
|
38
|
+
- QA verifies impacted production flow or approved pre-prod flow.
|
|
39
|
+
|
|
40
|
+
7. Back-merge and follow-up
|
|
41
|
+
- Back-merge to `develop`.
|
|
42
|
+
- Create follow-up ticket for full DoD, root cause analysis, monitoring, and prevention.
|
|
43
|
+
- Write incident summary.
|
|
44
|
+
|
|
45
|
+
## 🔒 Rules
|
|
46
|
+
|
|
47
|
+
- Hotfix is only for urgent production incidents.
|
|
48
|
+
- Minimal change only.
|
|
49
|
+
- No direct push to protected branches.
|
|
50
|
+
- Review still required.
|
|
51
|
+
- Back-merge is mandatory.
|
|
52
|
+
- Follow-up ticket is mandatory.
|
|
53
|
+
|
|
54
|
+
## 📊 Artifacts
|
|
55
|
+
|
|
56
|
+
- Bug report
|
|
57
|
+
- Hotfix ticket if needed
|
|
58
|
+
- Hotfix PR
|
|
59
|
+
- Patch release record
|
|
60
|
+
- Incident summary
|
|
61
|
+
- Follow-up ticket
|
|
62
|
+
|
|
63
|
+
## 🔗 Commands
|
|
64
|
+
|
|
65
|
+
`/report-bug` → `/triage-bug` → `/hotfix` → `/create-pr` → `/techlead-review` → `/merge-pr` → `/verify-fix` → `/release` or patch deploy record
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Sprint Lifecycle Workflow
|
|
2
|
+
|
|
3
|
+
> End-to-end sprint process from backlog readiness to sprint report and retrospective.
|
|
4
|
+
|
|
5
|
+
## 🎯 Purpose
|
|
6
|
+
|
|
7
|
+
Ensure sprint commitments are realistic, tracked, and closed with factual metrics.
|
|
8
|
+
|
|
9
|
+
## 🔄 Flow
|
|
10
|
+
|
|
11
|
+
1. Backlog refinement
|
|
12
|
+
- BA creates `DRAFT` tickets with `/analyze-requirements`.
|
|
13
|
+
- Tech Lead grooms with `/groom-ticket`.
|
|
14
|
+
- Scrum Master verifies DoR with `/mark-ready`.
|
|
15
|
+
|
|
16
|
+
2. Sprint planning
|
|
17
|
+
- Scrum Master runs `/validate-state`.
|
|
18
|
+
- Scrum Master runs `/plan-sprint`.
|
|
19
|
+
- Only `READY` tickets may be committed.
|
|
20
|
+
|
|
21
|
+
3. Sprint execution
|
|
22
|
+
- Developer starts tickets with `/implement-task`.
|
|
23
|
+
- Developer creates PRs with `/create-pr`.
|
|
24
|
+
- Tech Lead reviews with `/techlead-review`.
|
|
25
|
+
- Tech Lead merges with `/merge-pr`.
|
|
26
|
+
- QA verifies with `/smoke-test`.
|
|
27
|
+
|
|
28
|
+
4. Daily health check
|
|
29
|
+
- Review blocked tickets.
|
|
30
|
+
- Review IN_PROGRESS aging.
|
|
31
|
+
- Review IN_REVIEW and QA queues.
|
|
32
|
+
- Escalate blockers early.
|
|
33
|
+
|
|
34
|
+
5. Sprint close
|
|
35
|
+
- Run `/sprint-report`.
|
|
36
|
+
- Mark completed, carryover, and cancelled work.
|
|
37
|
+
- Capture metrics and retrospective actions.
|
|
38
|
+
|
|
39
|
+
## 🔒 Rules
|
|
40
|
+
|
|
41
|
+
- No ticket enters sprint unless status is `READY`.
|
|
42
|
+
- Capacity overcommit requires explicit human approval.
|
|
43
|
+
- Scope changes require removed/added item record.
|
|
44
|
+
- DONE requires QA verification.
|
|
45
|
+
- Carryover is visible, not hidden.
|
|
46
|
+
|
|
47
|
+
## 📊 Artifacts
|
|
48
|
+
|
|
49
|
+
- `project/sprints/SPRINT-XXX.json`
|
|
50
|
+
- `project/metrics/`
|
|
51
|
+
- Retrospective notes
|
|
52
|
+
- Sprint report
|
|
53
|
+
|
|
54
|
+
## 🔗 Commands
|
|
55
|
+
|
|
56
|
+
`/analyze-requirements` → `/groom-ticket` → `/mark-ready` → `/plan-sprint` → `/implement-task` → `/create-pr` → `/techlead-review` → `/merge-pr` → `/smoke-test` → `/sprint-report`
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
const fs = require('node:fs');
|
|
2
|
+
const path = require('node:path');
|
|
3
|
+
|
|
4
|
+
function listFiles(rootDir) {
|
|
5
|
+
const files = [];
|
|
6
|
+
|
|
7
|
+
function walk(currentDir) {
|
|
8
|
+
for (const entry of fs.readdirSync(currentDir, { withFileTypes: true })) {
|
|
9
|
+
const absolutePath = path.join(currentDir, entry.name);
|
|
10
|
+
|
|
11
|
+
if (entry.isDirectory()) {
|
|
12
|
+
walk(absolutePath);
|
|
13
|
+
} else if (entry.isFile()) {
|
|
14
|
+
files.push(absolutePath);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
walk(rootDir);
|
|
20
|
+
return files;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async function installCodex({ targetDir = process.cwd(), sourceCoreDir, confirm }) {
|
|
24
|
+
if (!sourceCoreDir) {
|
|
25
|
+
throw new Error('sourceCoreDir is required');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (!fs.existsSync(sourceCoreDir) || !fs.statSync(sourceCoreDir).isDirectory()) {
|
|
29
|
+
throw new Error(`Source core directory not found: ${sourceCoreDir}`);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const targetCodexDir = path.join(targetDir, '.codex');
|
|
33
|
+
const stats = {
|
|
34
|
+
copied: 0,
|
|
35
|
+
skipped: 0,
|
|
36
|
+
overwritten: 0,
|
|
37
|
+
targetDir: targetCodexDir,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
fs.mkdirSync(targetCodexDir, { recursive: true });
|
|
41
|
+
|
|
42
|
+
for (const sourceFile of listFiles(sourceCoreDir)) {
|
|
43
|
+
const relativePath = path.relative(sourceCoreDir, sourceFile);
|
|
44
|
+
const targetFile = path.join(targetCodexDir, relativePath);
|
|
45
|
+
let shouldCopy = true;
|
|
46
|
+
let overwriting = false;
|
|
47
|
+
|
|
48
|
+
if (fs.existsSync(targetFile)) {
|
|
49
|
+
const answer = confirm
|
|
50
|
+
? await confirm(`Overwrite existing ${path.relative(targetDir, targetFile)}?`)
|
|
51
|
+
: 'skip';
|
|
52
|
+
|
|
53
|
+
if (answer === 'cancel') {
|
|
54
|
+
throw new Error('Installation cancelled');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (answer !== 'overwrite') {
|
|
58
|
+
stats.skipped += 1;
|
|
59
|
+
shouldCopy = false;
|
|
60
|
+
} else {
|
|
61
|
+
overwriting = true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (!shouldCopy) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
fs.mkdirSync(path.dirname(targetFile), { recursive: true });
|
|
70
|
+
fs.copyFileSync(sourceFile, targetFile);
|
|
71
|
+
fs.chmodSync(targetFile, fs.statSync(sourceFile).mode);
|
|
72
|
+
|
|
73
|
+
if (overwriting) {
|
|
74
|
+
stats.overwritten += 1;
|
|
75
|
+
} else {
|
|
76
|
+
stats.copied += 1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return stats;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
module.exports = {
|
|
84
|
+
installCodex,
|
|
85
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ai-core-framework",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Chat-first enterprise AI SDLC framework installer for AI coding CLIs.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "AI Core"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"sdlc",
|
|
11
|
+
"enterprise",
|
|
12
|
+
"agentic-workflow",
|
|
13
|
+
"agile",
|
|
14
|
+
"governance",
|
|
15
|
+
"codex"
|
|
16
|
+
],
|
|
17
|
+
"bin": {
|
|
18
|
+
"ai-core-framework": "bin/ai-core-framework.js"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"bin/",
|
|
22
|
+
"core/",
|
|
23
|
+
"lib/",
|
|
24
|
+
"README.md",
|
|
25
|
+
".codex-plugin/",
|
|
26
|
+
".claude-plugin/",
|
|
27
|
+
".cursor-plugin/"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"test": "node --test test/*.test.js",
|
|
31
|
+
"pack:dry-run": "npm pack --dry-run"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18"
|
|
35
|
+
}
|
|
36
|
+
}
|