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.
Files changed (103) hide show
  1. package/.claude-plugin/plugin.json +21 -0
  2. package/.codex-plugin/plugin.json +35 -0
  3. package/.cursor-plugin/plugin.json +22 -0
  4. package/README.md +173 -0
  5. package/bin/ai-core-framework.js +110 -0
  6. package/core/README.md +162 -0
  7. package/core/agents/README.md +32 -0
  8. package/core/agents/business-analyst.md +269 -0
  9. package/core/agents/developer.md +375 -0
  10. package/core/agents/qa-tester.md +477 -0
  11. package/core/agents/scrum-master.md +136 -0
  12. package/core/agents/tech-lead.md +345 -0
  13. package/core/config/backlog.schema.json +38 -0
  14. package/core/config/docs-policy.default.json +37 -0
  15. package/core/config/release.schema.json +120 -0
  16. package/core/config/ticket.schema.json +253 -0
  17. package/core/rules/00-global-rules.md +373 -0
  18. package/core/rules/01-git-workflow.md +388 -0
  19. package/core/rules/02-code-quality.md +77 -0
  20. package/core/rules/03-security.md +78 -0
  21. package/core/rules/04-documentation.md +72 -0
  22. package/core/rules/05-testing-mandatory.md +374 -0
  23. package/core/rules/06-approval-gates.md +388 -0
  24. package/core/rules/07-definition-of-ready.md +112 -0
  25. package/core/rules/08-definition-of-done.md +149 -0
  26. package/core/scripts/ai-core.sh +456 -0
  27. package/core/scripts/generate-views.sh +210 -0
  28. package/core/scripts/install-codex-prompts.sh +127 -0
  29. package/core/scripts/log-user-request.sh +113 -0
  30. package/core/scripts/setup-project.sh +183 -0
  31. package/core/scripts/sync-platforms.sh +322 -0
  32. package/core/scripts/validate-audit-log.sh +73 -0
  33. package/core/scripts/validate-docs.sh +365 -0
  34. package/core/scripts/validate-permissions.sh +132 -0
  35. package/core/scripts/validate-state.sh +611 -0
  36. package/core/scripts/workflow.sh +513 -0
  37. package/core/skills/README.md +21 -0
  38. package/core/skills/ai-core-commands/SKILL.md +86 -0
  39. package/core/skills/brainstorming/SKILL.md +40 -0
  40. package/core/skills/development-implement-task/SKILL.md +308 -0
  41. package/core/skills/executing-ticket/SKILL.md +28 -0
  42. package/core/skills/git-branch-status/SKILL.md +56 -0
  43. package/core/skills/git-cleanup-branches/SKILL.md +57 -0
  44. package/core/skills/git-scan-untracked/SKILL.md +50 -0
  45. package/core/skills/meta-generate-views/SKILL.md +54 -0
  46. package/core/skills/meta-request-log/SKILL.md +61 -0
  47. package/core/skills/meta-sprint-report/SKILL.md +59 -0
  48. package/core/skills/meta-sync-platforms/SKILL.md +53 -0
  49. package/core/skills/meta-ticket-health/SKILL.md +61 -0
  50. package/core/skills/meta-validate-audit-log/SKILL.md +42 -0
  51. package/core/skills/meta-validate-docs/SKILL.md +58 -0
  52. package/core/skills/meta-validate-permissions/SKILL.md +53 -0
  53. package/core/skills/meta-validate-state/SKILL.md +58 -0
  54. package/core/skills/planning-analyze-requirements/SKILL.md +471 -0
  55. package/core/skills/planning-backlog-status/SKILL.md +57 -0
  56. package/core/skills/planning-document-existing-requirements/SKILL.md +246 -0
  57. package/core/skills/planning-estimate-task/SKILL.md +60 -0
  58. package/core/skills/planning-groom-ticket/SKILL.md +442 -0
  59. package/core/skills/planning-mark-ready/SKILL.md +111 -0
  60. package/core/skills/planning-plan-refactor/SKILL.md +66 -0
  61. package/core/skills/planning-plan-sprint/SKILL.md +112 -0
  62. package/core/skills/planning-prioritize-backlog/SKILL.md +62 -0
  63. package/core/skills/planning-write-plan/SKILL.md +68 -0
  64. package/core/skills/project-detect-stack/SKILL.md +71 -0
  65. package/core/skills/project-discover-codebase/SKILL.md +74 -0
  66. package/core/skills/project-setup-project/SKILL.md +113 -0
  67. package/core/skills/qa-bug-status/SKILL.md +52 -0
  68. package/core/skills/qa-report-bug/SKILL.md +518 -0
  69. package/core/skills/qa-smoke-test/SKILL.md +387 -0
  70. package/core/skills/qa-triage-bug/SKILL.md +62 -0
  71. package/core/skills/qa-verify-fix/SKILL.md +446 -0
  72. package/core/skills/release-hotfix/SKILL.md +117 -0
  73. package/core/skills/release-release/SKILL.md +123 -0
  74. package/core/skills/release-rollback/SKILL.md +62 -0
  75. package/core/skills/review-create-pr/SKILL.md +418 -0
  76. package/core/skills/review-merge-pr/SKILL.md +425 -0
  77. package/core/skills/review-techlead-review/SKILL.md +547 -0
  78. package/core/skills/using-ai-core/SKILL.md +72 -0
  79. package/core/skills/verification-before-done/SKILL.md +35 -0
  80. package/core/skills/writing-implementation-plan/SKILL.md +45 -0
  81. package/core/templates/ci/ai-core-governance.yml +112 -0
  82. package/core/templates/ci/node-pnpm.yml +35 -0
  83. package/core/templates/pm/retrospective-template.md +47 -0
  84. package/core/templates/pm/sprint-plan-template.md +45 -0
  85. package/core/templates/pr/pull-request-template.md +247 -0
  86. package/core/templates/project/CODEOWNERS +11 -0
  87. package/core/templates/project/docs-policy.json +3 -0
  88. package/core/templates/project/project-config.yaml +137 -0
  89. package/core/templates/project/project-structure.yaml +76 -0
  90. package/core/templates/qa/bug-report-template.md +371 -0
  91. package/core/templates/qa/test-plan-template.md +57 -0
  92. package/core/templates/release/release-record-template.json +67 -0
  93. package/core/templates/requirements/PRD-template.md +58 -0
  94. package/core/templates/requirements/user-story-template.md +381 -0
  95. package/core/templates/technical/ADR-template.md +46 -0
  96. package/core/templates/technical/refactor-plan-template.md +84 -0
  97. package/core/templates/technical/tech-design-template.md +71 -0
  98. package/core/workflows/bug-lifecycle.md +56 -0
  99. package/core/workflows/feature-lifecycle.md +347 -0
  100. package/core/workflows/hotfix-lifecycle.md +65 -0
  101. package/core/workflows/sprint-lifecycle.md +56 -0
  102. package/lib/install-codex.js +85 -0
  103. package/package.json +36 -0
@@ -0,0 +1,308 @@
1
+ ---
2
+ name: development-implement-task
3
+ description: Use when the user asks to run /implement-task, implement a READY or IN_PROGRESS ticket, start feature work from a ticket, or code against acceptance criteria in AI Core.
4
+ command: /implement-task
5
+ display_name: "Implement Task"
6
+ version: 1.0.0
7
+ owner_agent: developer
8
+ requires_agents:
9
+ - developer # Main executor
10
+ - tech-lead # Consult when architecture decision is required
11
+ model_preference: sonnet # Fast for coding
12
+ args:
13
+ - name: ticket_id
14
+ required: true
15
+ format: "TICKET-XXX"
16
+ description: "Ticket ID from project/tickets/"
17
+ preconditions:
18
+ - ticket_exists: "project/tickets/${ticket_id}.json"
19
+ - ticket_status_in: [READY, IN_PROGRESS]
20
+ - ticket_has_acceptance_criteria: true
21
+ - no_uncommitted_changes_on_main: true
22
+ - current_branch_matches: "feature/${ticket_id}-* OR creates new branch"
23
+ postconditions:
24
+ - ticket_status: IN_PROGRESS
25
+ - branch_exists: "feature/${ticket_id}-*"
26
+ - unit_tests_written: true
27
+ - coverage_threshold: ">=80%"
28
+ - commit_messages_conventional: true
29
+ ---
30
+
31
+ # /implement-task
32
+
33
+ > Implement a ticket following strict Agile workflow. Main workhorse command.
34
+
35
+ ## 🎯 Purpose
36
+
37
+ When Developer agent receives a READY ticket, this command:
38
+ 1. Validate the ticket is eligible to start
39
+ 2. Create feature branch with required convention
40
+ 3. Implement theo TDD (test first, code after)
41
+ 4. Run tests + coverage check
42
+ 5. Commit with Conventional Commits format
43
+ 6. Update ticket state → IN_REVIEW when complete
44
+
45
+ ## 🚦 Trigger
46
+
47
+ **Manual**: User types `/implement-task TICKET-123`
48
+
49
+ **Auto**: No auto-trigger. Explicit invocation is required.
50
+
51
+ ## 📋 Preconditions (STRICT - ABORT if fail)
52
+
53
+ Before starting, the AI **MUST** check every condition below. If any condition fails, **ABORT** with a clear error message.
54
+
55
+ ### 1. Ticket exists
56
+ ```bash
57
+ test -f "project/tickets/${TICKET_ID}.json" || ABORT "Ticket not found"
58
+ ```
59
+
60
+ ### 2. Ticket status valid
61
+ Read `state.status` from ticket JSON. It **MUST** be `READY` or `IN_PROGRESS`.
62
+ - If `DRAFT` → ABORT, suggest `/groom-ticket ${TICKET_ID}`
63
+ - If `DONE` → ABORT, ticket is already closed
64
+ - If `BLOCKED` → ABORT, show blocker
65
+
66
+ ### 3. Acceptance Criteria exists
67
+ Ticket **MUST** have an `acceptance_criteria` array with ≥1 scenario. If not → ABORT, suggest `/analyze-requirements`.
68
+
69
+ ### 4. Git clean state
70
+ ```bash
71
+ git status --porcelain | grep -q . && ABORT "Working directory not clean. Commit or stash changes first."
72
+ ```
73
+
74
+ ### 5. Current branch check
75
+ - If currently on `main`/`master`/`develop` → create new feature branch
76
+ - If currently on feature branch for a **different ticket** → ABORT, suggest switch
77
+ - If currently on feature branch for **this ticket** → continue
78
+
79
+ ### 6. Definition of Ready check
80
+ Load `rules/07-definition-of-ready.md`. Verify the ticket passes every item. If not → ABORT.
81
+
82
+ ## 🔄 Execution Flow (STRICT ORDER)
83
+
84
+ ```
85
+ ┌─────────────────────────────────────────────────┐
86
+ │ STEP 1: Validate preconditions │
87
+ │ → If any fail: ABORT with clear error │
88
+ ├─────────────────────────────────────────────────┤
89
+ │ STEP 2: Load context │
90
+ │ → Read ticket JSON │
91
+ │ → Read acceptance criteria │
92
+ │ → Read related code (if ticket references it) │
93
+ │ → Read core/rules/02-code-quality.md │
94
+ │ → Read core/rules/05-testing-mandatory.md │
95
+ ├─────────────────────────────────────────────────┤
96
+ │ STEP 3: Create/checkout branch │
97
+ │ → Branch name: feature/${TICKET_ID}-${slug} │
98
+ │ → Slug = kebab-case from ticket title │
99
+ │ → Example: feature/TICKET-123-reset-password │
100
+ ├─────────────────────────────────────────────────┤
101
+ │ STEP 4: Update ticket status → IN_PROGRESS │
102
+ │ → Update project/tickets/${TICKET_ID}.json │
103
+ │ → Add started_at timestamp │
104
+ │ → Add assignee = "developer-agent" │
105
+ ├─────────────────────────────────────────────────┤
106
+ │ STEP 5: TDD - Write tests FIRST │
107
+ │ → For each AC scenario → write failing test │
108
+ │ → Run tests → MUST fail (red) │
109
+ │ → Commit: "test(TICKET-XXX): add failing tests"│
110
+ ├─────────────────────────────────────────────────┤
111
+ │ STEP 6: Implement minimum code to pass │
112
+ │ → Code to AC. Do not over-engineer │
113
+ │ → Run tests → MUST pass (green) │
114
+ │ → Commit: "feat(TICKET-XXX): implement ..." │
115
+ ├─────────────────────────────────────────────────┤
116
+ │ STEP 7: Refactor │
117
+ │ → Clean up, DRY, SOLID │
118
+ │ → Tests must still pass │
119
+ │ → Commit: "refactor(TICKET-XXX): ..." │
120
+ ├─────────────────────────────────────────────────┤
121
+ │ STEP 8: Coverage check │
122
+ │ → Run /check-coverage │
123
+ │ → MUST >= 80% (or threshold in config) │
124
+ │ → If fail → return to STEP 5 │
125
+ ├─────────────────────────────────────────────────┤
126
+ │ STEP 9: Lint & format │
127
+ │ → Run project's lint command │
128
+ │ → MUST pass with 0 errors │
129
+ │ → Warnings are allowed but MUST be logged │
130
+ ├─────────────────────────────────────────────────┤
131
+ │ STEP 10: Security quick check │
132
+ │ → No hardcoded secrets │
133
+ │ → No console.log/print debug │
134
+ │ → No TODO/FIXME without ticket │
135
+ ├─────────────────────────────────────────────────┤
136
+ │ STEP 11: Update documentation │
137
+ │ → If there is a new API → update docs/project/api/ │
138
+ │ → If there is a breaking change → update CHANGELOG │
139
+ ├─────────────────────────────────────────────────┤
140
+ │ STEP 12: Final commit + push │
141
+ │ → git push -u origin feature/${TICKET_ID}-... │
142
+ ├─────────────────────────────────────────────────┤
143
+ │ STEP 13: Update ticket → READY_FOR_REVIEW │
144
+ │ → Add implementation_notes │
145
+ │ → Add self_review_checklist │
146
+ │ → Add suggested_reviewer: "tech-lead" │
147
+ ├─────────────────────────────────────────────────┤
148
+ │ STEP 14: HANDOFF │
149
+ │ → Suggest next command: /create-pr │
150
+ └─────────────────────────────────────────────────┘
151
+ ```
152
+
153
+ ## 🔒 Hard Rules (MUST follow)
154
+
155
+ ### RULE IT-001: TDD mandatory
156
+ **MUST** write tests before code. If the user says "skip tests, code first", **REFUSE** and explain the rule.
157
+
158
+ ### RULE IT-002: No commit without test
159
+ Every commit touching production code (`src/**`) **MUST** include corresponding tests, except pure refactor commits.
160
+
161
+ ### RULE IT-003: Conventional Commits
162
+ Commit message **MUST** theo format:
163
+ ```
164
+ <type>(TICKET-XXX): <short description>
165
+
166
+ [optional body]
167
+
168
+ [optional footer]
169
+ ```
170
+ Types: `feat`, `fix`, `test`, `refactor`, `docs`, `chore`, `perf`, `style`.
171
+
172
+ ### RULE IT-004: Branch naming
173
+ Branch name **MUST** match regex: `^(feature|bugfix|hotfix)/TICKET-\d+-[a-z0-9-]+$`
174
+
175
+ ### RULE IT-005: No scope creep
176
+ **MUST NOT** implement anything outside ticket AC. If additional work is required, create a new ticket and document it in the current ticket.
177
+
178
+ ### RULE IT-006: Atomic commits
179
+ Every commit = 1 logical change. Random "WIP" commits are **FORBIDDEN**.
180
+
181
+ ### RULE IT-007: Coverage threshold
182
+ Coverage on **new code** (diff coverage) **MUST** be ≥ 80%. Overall coverage may be lower.
183
+
184
+ ### RULE IT-008: No direct push to protected branches
185
+ **MUST NOT** push directly to `main`, `master`, `develop`, `release/*`. Only push feature branches.
186
+
187
+ ### RULE IT-009: Escalation on ambiguity
188
+ If AC ambiguity or missing AC is discovered while coding, **STOP**, update ticket with `clarification_needed`, invoke BA agent.
189
+
190
+ ### RULE IT-010: Max scope
191
+ If ticket estimate > 5 story points or > 2 days of work, **SPLIT** into sub-tickets before implementation.
192
+
193
+ ## 📥 Expected Inputs
194
+
195
+ - `ticket_id` (required): Format `TICKET-XXX`
196
+
197
+ ## 📤 Expected Outputs
198
+
199
+ ### Success
200
+ ```markdown
201
+ ✅ TICKET-XXX implementation complete
202
+
203
+ **Branch**: feature/TICKET-XXX-short-slug
204
+ **Commits**: 7
205
+ **Files changed**: 12
206
+ **Coverage**: 85% (+3% from main)
207
+ **Tests**: 23 added, all passing
208
+ **Lint**: ✓ passed
209
+
210
+ ### Self-review checklist
211
+ - [x] All AC scenarios implemented
212
+ - [x] Unit tests cover happy + edge + error cases
213
+ - [x] No TODO/FIXME without ticket reference
214
+ - [x] Docs updated
215
+ - [x] Conventional commits used
216
+
217
+ ### Next steps
218
+ Run: `/create-pr`
219
+
220
+ ### HANDOFF → tech-lead
221
+ Ready for review. Key things to verify:
222
+ - [Specific concern 1]
223
+ - [Specific concern 2]
224
+ ```
225
+
226
+ ### Failure
227
+ ```markdown
228
+ ❌ /implement-task ABORTED
229
+
230
+ **Reason**: [Specific reason]
231
+ **Precondition failed**: [Which one]
232
+ **Suggested action**: [Next command to run]
233
+ ```
234
+
235
+ ## 🚨 Failure Modes & Recovery
236
+
237
+ | Scenario | Action |
238
+ |----------|--------|
239
+ | Tests keep failing after 3 iterations | STOP, escalate to tech-lead |
240
+ | Coverage not reached after 2 attempts | STOP, check whether AC is not testable |
241
+ | Architecture issue found | STOP, invoke tech-lead for ADR |
242
+ | Ticket is bigger than estimate | STOP, suggest split, escalate to SM |
243
+ | Dependency conflict | STOP, escalate to tech-lead |
244
+ | Security concern found | STOP, invoke tech-lead security review |
245
+
246
+ ## 🔗 Related Commands
247
+
248
+ - **Before**: `/groom-ticket`, `/analyze-requirements`
249
+ - **After**: `/create-pr`, `/techlead-review`
250
+ - **Utility**: `/check-coverage`, `/run-tests`
251
+
252
+ ## 📊 Metrics Tracked
253
+
254
+ After each run, log to `project/metrics/implement-task.jsonl`:
255
+
256
+ ```json
257
+ {
258
+ "ticket_id": "TICKET-123",
259
+ "started_at": "2026-04-18T10:00:00Z",
260
+ "completed_at": "2026-04-18T12:30:00Z",
261
+ "duration_minutes": 150,
262
+ "commits": 7,
263
+ "lines_added": 234,
264
+ "lines_removed": 45,
265
+ "coverage_delta": 3.2,
266
+ "tests_added": 23,
267
+ "aborts": 0
268
+ }
269
+ ```
270
+
271
+ ## 💡 Examples
272
+
273
+ ### Example 1: Happy path
274
+ ```
275
+ User: /implement-task TICKET-042
276
+
277
+ AI: Loading TICKET-042...
278
+ ✓ Preconditions passed
279
+ ✓ Created branch: feature/TICKET-042-reset-password-email
280
+ ✓ Ticket status: READY → IN_PROGRESS
281
+
282
+ Step 5: Writing failing tests for AC scenarios...
283
+ [writes test file]
284
+ [runs tests → 3 failing, as expected ✓]
285
+ [commits: "test(TICKET-042): add failing tests for password reset"]
286
+
287
+ Step 6: Implementing...
288
+ [writes src/auth/reset-password.ts]
289
+ [runs tests → all 3 pass ✓]
290
+ [commits: "feat(TICKET-042): implement password reset via email"]
291
+
292
+ ...
293
+
294
+ ✅ Complete. Run /create-pr next.
295
+ ```
296
+
297
+ ### Example 2: Abort (no AC)
298
+ ```
299
+ User: /implement-task TICKET-099
300
+
301
+ AI: ❌ ABORTED
302
+ Reason: TICKET-099 has no acceptance criteria
303
+ Suggested: Run /analyze-requirements TICKET-099 first
304
+ ```
305
+
306
+ ---
307
+ **Last updated**: 2026-04-18
308
+ **Maintainer**: Tech Lead
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: executing-ticket
3
+ description: Use when implementing an IN_PROGRESS ticket from an approved plan, coding against acceptance criteria, updating ticket state during development, or preparing implementation evidence.
4
+ ---
5
+
6
+ # Executing Tickets
7
+
8
+ Use this after `/implement-task TICKET-XXX` has moved a ticket to `IN_PROGRESS`.
9
+
10
+ ## Process
11
+
12
+ 1. Read the ticket.
13
+ 2. Read `spec_path` and `implementation_plan_path` when present.
14
+ 3. Confirm scope and affected files.
15
+ 4. Follow the plan task by task.
16
+ 5. Write or update tests before production code where practical.
17
+ 6. Run verification commands.
18
+ 7. Update docs evidence in the ticket.
19
+ 8. Suggest `/create-pr TICKET-XXX <pr_url>`.
20
+
21
+ ## Stop Conditions
22
+
23
+ Stop and ask when:
24
+
25
+ - the plan contradicts the codebase
26
+ - verification repeatedly fails
27
+ - the ticket lacks required acceptance criteria
28
+ - implementation would exceed the approved scope
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: git-branch-status
3
+ description: Use when the user asks to run /branch-status, summarize current Git branch state, inspect branch health, or report repository branch context.
4
+ command: /branch-status
5
+ display_name: "Branch Status"
6
+ version: 1.0.0
7
+ status: READY
8
+ owner_agent: developer
9
+ model_preference: sonnet
10
+ args: []
11
+ preconditions:
12
+ - git_repo_exists: true
13
+ postconditions:
14
+ - branch_report_generated: true
15
+ ---
16
+
17
+ # /branch-status
18
+
19
+ > Reports current branch health, ticket linkage, divergence, and cleanup recommendations.
20
+
21
+ ## 🎯 Purpose
22
+
23
+ Help agents understand where they are before changing code or creating PRs.
24
+
25
+ ## 🔄 Execution Flow
26
+
27
+ 1. Verify repository is a Git repo.
28
+ 2. Read current branch and protected branch config.
29
+ 3. Check branch naming convention.
30
+ 4. Extract ticket ID from branch if present.
31
+ 5. Compare with remote and base branch.
32
+ 6. Check working tree and staged changes.
33
+ 7. Report open PR if any.
34
+ 8. Suggest next safe action.
35
+
36
+ ## 🔒 Hard Rules
37
+
38
+ - MUST NOT modify files or branches.
39
+ - MUST warn when on protected branch.
40
+ - MUST warn when branch ticket does not match active ticket.
41
+ - MUST report uncommitted changes before recommending checkout or pull.
42
+
43
+ ## 📤 Outputs
44
+
45
+ - Current branch
46
+ - Clean/dirty state
47
+ - Ahead/behind status
48
+ - Linked ticket
49
+ - PR status
50
+ - Suggested next command
51
+
52
+ ## 🔗 Related Commands
53
+
54
+ - `/scan-untracked`
55
+ - `/cleanup-branches`
56
+ - `/create-pr`
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: git-cleanup-branches
3
+ description: Use when the user asks to run /cleanup-branches, find stale Git branches, prepare branch cleanup, or apply a safe branch cleanup workflow.
4
+ command: /cleanup-branches
5
+ display_name: "Cleanup Branches"
6
+ version: 1.0.0
7
+ status: READY
8
+ owner_agent: developer
9
+ model_preference: sonnet
10
+ args:
11
+ - name: mode
12
+ required: false
13
+ enum: [dry-run, apply]
14
+ default: dry-run
15
+ preconditions:
16
+ - git_repo_exists: true
17
+ - working_tree_clean: true
18
+ postconditions:
19
+ - stale_branch_report_generated: true
20
+ ---
21
+
22
+ # /cleanup-branches
23
+
24
+ > Identifies merged, stale, or invalid local branches and optionally deletes safe ones.
25
+
26
+ ## 🎯 Purpose
27
+
28
+ Keep branch lists clean without risking active work.
29
+
30
+ ## 🔄 Execution Flow
31
+
32
+ 1. Verify clean working tree.
33
+ 2. Fetch remote pruning metadata.
34
+ 3. List local branches excluding protected branches.
35
+ 4. Classify branches as merged, remote-deleted, stale, active-ticket, or unsafe.
36
+ 5. For dry-run, print proposed deletes only.
37
+ 6. For apply, delete only branches classified safe.
38
+ 7. Report skipped branches with reasons.
39
+
40
+ ## 🔒 Hard Rules
41
+
42
+ - Default mode MUST be dry-run.
43
+ - MUST NOT delete current branch.
44
+ - MUST NOT delete protected branches.
45
+ - MUST NOT delete branches with unmerged commits.
46
+ - MUST NOT delete branches linked to tickets not `DONE` or `CANCELLED`.
47
+
48
+ ## 📤 Outputs
49
+
50
+ - Safe to delete branches
51
+ - Unsafe branches and reasons
52
+ - Commands that would run or did run
53
+
54
+ ## 🔗 Related Commands
55
+
56
+ - `/branch-status`
57
+ - `/scan-untracked`
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: git-scan-untracked
3
+ description: Use when the user asks to run /scan-untracked, inspect untracked files in a Git repo, classify generated or accidental files, or prepare an untracked-file report.
4
+ command: /scan-untracked
5
+ display_name: "Scan Untracked Files"
6
+ version: 1.0.0
7
+ status: READY
8
+ owner_agent: developer
9
+ model_preference: sonnet
10
+ args: []
11
+ preconditions:
12
+ - git_repo_exists: true
13
+ postconditions:
14
+ - untracked_report_generated: true
15
+ ---
16
+
17
+ # /scan-untracked
18
+
19
+ > Reviews untracked files and recommends add, ignore, or delete actions.
20
+
21
+ ## 🎯 Purpose
22
+
23
+ Prevent accidental commits of secrets, build artifacts, generated files, or local-only files.
24
+
25
+ ## 🔄 Execution Flow
26
+
27
+ 1. Run Git untracked file listing.
28
+ 2. Classify files: source, tests, docs, generated, local config, secrets risk, dependency/build artifacts.
29
+ 3. Compare with `.gitignore`.
30
+ 4. Recommend action for each file.
31
+ 5. Suggest `.gitignore` additions where appropriate.
32
+
33
+ ## 🔒 Hard Rules
34
+
35
+ - MUST NOT delete files automatically.
36
+ - MUST flag `.env`, private keys, certificates, and credentials as blocking.
37
+ - MUST prefer ignore rules for build artifacts and local editor files.
38
+ - MUST ask before staging any file.
39
+
40
+ ## 📤 Outputs
41
+
42
+ - File classification table
43
+ - Risk warnings
44
+ - Suggested `.gitignore` additions
45
+ - Suggested `git add` commands
46
+
47
+ ## 🔗 Related Commands
48
+
49
+ - `/branch-status`
50
+ - `/create-pr`
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: meta-generate-views
3
+ description: Use when the user asks to run /generate-views, regenerate AI Core derived views, refresh project dashboards or summaries, or rebuild state-derived reporting files.
4
+ command: /generate-views
5
+ display_name: "Generate Views"
6
+ version: 1.0.0
7
+ status: READY
8
+ owner_agent: scrum-master
9
+ model_preference: sonnet
10
+ args: []
11
+ preconditions:
12
+ - ai_state_exists: true
13
+ postconditions:
14
+ - views_generated: true
15
+ ---
16
+
17
+ # /generate-views
18
+
19
+ > Generates human-readable views from `project/` without changing canonical state.
20
+
21
+ ## 🎯 Purpose
22
+
23
+ Help humans navigate many tickets without making duplicate sources of truth.
24
+
25
+ ## 🔄 Execution Flow
26
+
27
+ 1. Load `project/backlog/backlog.json`.
28
+ 2. Load tickets, bugs, sprints, and releases.
29
+ 3. Generate `project/views/backlog.md`.
30
+ 4. Generate `project/views/ready.md`.
31
+ 5. Generate `project/views/blocked.md`.
32
+ 6. Generate `project/views/by-epic.md`.
33
+ 7. Generate `project/views/by-sprint.md`.
34
+ 8. Generate `project/views/release-candidates.md`.
35
+ 9. Include generation timestamp and source files.
36
+
37
+ ## 🔒 Hard Rules
38
+
39
+ - Generated views MUST NOT be edited as canonical state.
40
+ - Views MUST reference ticket IDs, not copy full ticket details.
41
+ - Regeneration MUST be safe and deterministic.
42
+ - Missing source files MUST be reported.
43
+
44
+ ## 📤 Outputs
45
+
46
+ - Generated view file list
47
+ - Warning list
48
+ - Suggested next commands
49
+
50
+ ## 🔗 Related Commands
51
+
52
+ - `/backlog-status`
53
+ - `/prioritize-backlog`
54
+ - `/ticket-health`
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: meta-request-log
3
+ description: Use when the user asks to run /request-log, inspect recent user requests, summarize project request history, or show entries from the AI Core user request log.
4
+ command: /request-log
5
+ display_name: "Request Log"
6
+ version: 1.0.0
7
+ owner_agent: scrum-master
8
+ requires_agents:
9
+ - scrum-master
10
+ model_preference: sonnet
11
+ args:
12
+ - name: limit
13
+ required: false
14
+ type: number
15
+ default: 20
16
+ description: "Number of recent user requests to show"
17
+ preconditions:
18
+ - user_request_log_exists: "project/user-requests.jsonl"
19
+ postconditions:
20
+ - request_log_reported: true
21
+ ---
22
+
23
+ # /request-log
24
+
25
+ > Show recent user requests recorded in `project/user-requests.jsonl`.
26
+
27
+ ## 🎯 Purpose
28
+
29
+ Give the user an auditable view of what they asked the AI to do.
30
+
31
+ ## 🚦 Trigger
32
+
33
+ ```text
34
+ /request-log
35
+ /request-log 50
36
+ ```
37
+
38
+ ## 🔄 Execution Flow
39
+
40
+ 1. Read `project/user-requests.jsonl`.
41
+ 2. Show the most recent N entries, default 20.
42
+ 3. Include timestamp, agent, detected command, ticket ID, and sanitized request text.
43
+ 4. If the log is missing, tell the user to run `/setup-project`.
44
+
45
+ ## 🔒 Hard Rules
46
+
47
+ ### RULE RL-001: Do not expose redacted values
48
+ The command **MUST NOT** attempt to reconstruct secrets from `request_hash` or any redacted value.
49
+
50
+ ### RULE RL-002: Log is append-only
51
+ Existing `project/user-requests.jsonl` entries **MUST NOT** be edited. Corrections require a new request entry.
52
+
53
+ ## 📤 Output Format
54
+
55
+ ```markdown
56
+ ## User Request Log
57
+
58
+ | Time | Agent | Command | Ticket | Request |
59
+ |------|-------|---------|--------|---------|
60
+ | 2026-05-10T14:29:03Z | codex-agent | - | - | ... |
61
+ ```
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: meta-sprint-report
3
+ description: Use when the user asks to run /sprint-report, generate a sprint report, summarize sprint state, or report sprint progress from AI Core project data.
4
+ command: /sprint-report
5
+ display_name: "Sprint Report"
6
+ version: 1.0.0
7
+ status: READY
8
+ owner_agent: scrum-master
9
+ model_preference: sonnet
10
+ args:
11
+ - name: sprint_id
12
+ required: false
13
+ format: "SPRINT-XXX"
14
+ preconditions:
15
+ - sprint_state_available: true
16
+ postconditions:
17
+ - sprint_report_generated: true
18
+ ---
19
+
20
+ # /sprint-report
21
+
22
+ > Produces a factual sprint health and outcome report from `project/`.
23
+
24
+ ## 🎯 Purpose
25
+
26
+ Give the team an auditable view of commitment, progress, blockers, carryover, defects, and delivery risks.
27
+
28
+ ## 🔄 Execution Flow
29
+
30
+ 1. Load target sprint or active sprint.
31
+ 2. Load tickets, bugs, metrics, and state history.
32
+ 3. Calculate committed points, done points, carryover, blocked count, cycle time, and defect counts.
33
+ 4. List work by state.
34
+ 5. Identify aging tickets and unresolved blockers.
35
+ 6. Summarize risks, decisions, and recommended next actions.
36
+ 7. Save report under `project/sprints/` or `project/metrics/` if requested.
37
+
38
+ ## 🔒 Hard Rules
39
+
40
+ - MUST compute from state files where possible.
41
+ - MUST label estimates when data is incomplete.
42
+ - MUST NOT hide blocked or failed work.
43
+ - MUST distinguish committed scope from added scope.
44
+
45
+ ## 📤 Outputs
46
+
47
+ - Sprint goal
48
+ - Capacity and velocity
49
+ - Ticket state table
50
+ - Blockers
51
+ - Bugs and escaped defects
52
+ - Carryover
53
+ - Recommendations
54
+
55
+ ## 🔗 Related Commands
56
+
57
+ - `/plan-sprint`
58
+ - `/mark-ready`
59
+ - `/release`