ai-core-framework 0.3.0 → 0.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/README.md +5 -5
- package/agents/business-analyst.md +6 -6
- package/agents/developer.md +2 -2
- package/agents/qa-tester.md +3 -3
- package/agents/scrum-master.md +6 -6
- package/agents/tech-lead.md +4 -4
- package/docs/config/backlog.schema.json +1 -1
- package/docs/config/release.schema.json +1 -1
- package/docs/config/ticket.schema.json +1 -1
- package/package.json +1 -1
- package/rules/00-global-rules.md +9 -9
- package/rules/08-definition-of-done.md +1 -1
- package/scripts/ai-core.sh +8 -8
- package/scripts/generate-views.sh +2 -2
- package/scripts/log-user-request.sh +2 -2
- package/scripts/setup-project.sh +34 -26
- package/scripts/sync-platforms.sh +3 -3
- package/scripts/validate-audit-log.sh +1 -1
- package/scripts/validate-docs.sh +4 -4
- package/scripts/validate-permissions.sh +2 -2
- package/scripts/validate-state.sh +4 -4
- package/scripts/workflow.sh +9 -9
- package/skills/brainstorming/SKILL.md +1 -1
- package/skills/development-implement-task/SKILL.md +5 -5
- package/skills/meta-generate-views/SKILL.md +8 -8
- package/skills/meta-request-log/SKILL.md +4 -4
- package/skills/meta-sprint-report/SKILL.md +2 -2
- package/skills/meta-ticket-health/SKILL.md +1 -1
- package/skills/meta-validate-audit-log/SKILL.md +1 -1
- package/skills/meta-validate-permissions/SKILL.md +1 -1
- package/skills/meta-validate-state/SKILL.md +2 -2
- package/skills/planning-analyze-requirements/SKILL.md +7 -7
- package/skills/planning-backlog-status/SKILL.md +6 -6
- package/skills/planning-groom-ticket/SKILL.md +4 -4
- package/skills/planning-mark-ready/SKILL.md +2 -2
- package/skills/planning-plan-refactor/SKILL.md +2 -2
- package/skills/planning-plan-sprint/SKILL.md +3 -3
- package/skills/planning-prioritize-backlog/SKILL.md +2 -2
- package/skills/planning-write-plan/SKILL.md +1 -1
- package/skills/project-discover-codebase/SKILL.md +1 -1
- package/skills/project-setup-project/SKILL.md +7 -7
- package/skills/qa-bug-status/SKILL.md +1 -1
- package/skills/qa-report-bug/SKILL.md +7 -7
- package/skills/qa-smoke-test/SKILL.md +3 -3
- package/skills/qa-verify-fix/SKILL.md +3 -3
- package/skills/release-hotfix/SKILL.md +2 -2
- package/skills/release-release/SKILL.md +1 -1
- package/skills/release-rollback/SKILL.md +1 -1
- package/skills/review-create-pr/SKILL.md +2 -2
- package/skills/review-merge-pr/SKILL.md +1 -1
- package/skills/using-ai-core/SKILL.md +2 -3
- package/skills/verification-before-done/SKILL.md +1 -1
- package/templates/ci/ai-core-governance.yml +7 -7
- package/templates/pr/pull-request-template.md +1 -1
- package/templates/project/CODEOWNERS +1 -1
- package/templates/project/project-structure.yaml +16 -16
- package/workflows/bug-lifecycle.md +3 -3
- package/workflows/feature-lifecycle.md +2 -2
- package/workflows/sprint-lifecycle.md +2 -2
|
@@ -13,9 +13,9 @@ args:
|
|
|
13
13
|
- name: ticket_id
|
|
14
14
|
required: true
|
|
15
15
|
format: "TICKET-XXX"
|
|
16
|
-
description: "Ticket ID from docs/runtime/
|
|
16
|
+
description: "Ticket ID from docs/runtime/tickets/"
|
|
17
17
|
preconditions:
|
|
18
|
-
- ticket_exists: "docs/runtime/
|
|
18
|
+
- ticket_exists: "docs/runtime/tickets/${ticket_id}.json"
|
|
19
19
|
- ticket_status_in: [READY, IN_PROGRESS]
|
|
20
20
|
- ticket_has_acceptance_criteria: true
|
|
21
21
|
- no_uncommitted_changes_on_main: true
|
|
@@ -54,7 +54,7 @@ Before starting, the AI **MUST** check every condition below. If any condition f
|
|
|
54
54
|
|
|
55
55
|
### 1. Ticket exists
|
|
56
56
|
```bash
|
|
57
|
-
test -f "docs/runtime/
|
|
57
|
+
test -f "docs/runtime/tickets/${TICKET_ID}.json" || ABORT "Ticket not found"
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
### 2. Ticket status valid
|
|
@@ -99,7 +99,7 @@ Load `rules/07-definition-of-ready.md`. Verify the ticket passes every item. If
|
|
|
99
99
|
│ → Example: feature/TICKET-123-reset-password │
|
|
100
100
|
├─────────────────────────────────────────────────┤
|
|
101
101
|
│ STEP 4: Update ticket status → IN_PROGRESS │
|
|
102
|
-
│ → Update docs/runtime/
|
|
102
|
+
│ → Update docs/runtime/tickets/${TICKET_ID}.json │
|
|
103
103
|
│ → Add started_at timestamp │
|
|
104
104
|
│ → Add assignee = "developer-agent" │
|
|
105
105
|
├─────────────────────────────────────────────────┤
|
|
@@ -251,7 +251,7 @@ Ready for review. Key things to verify:
|
|
|
251
251
|
|
|
252
252
|
## 📊 Metrics Tracked
|
|
253
253
|
|
|
254
|
-
After each run, log to `docs/runtime/
|
|
254
|
+
After each run, log to `docs/runtime/metrics/implement-task.jsonl`:
|
|
255
255
|
|
|
256
256
|
```json
|
|
257
257
|
{
|
|
@@ -16,7 +16,7 @@ postconditions:
|
|
|
16
16
|
|
|
17
17
|
# /generate-views
|
|
18
18
|
|
|
19
|
-
> Generates human-readable views from `docs/runtime
|
|
19
|
+
> Generates human-readable views from `docs/runtime/` without changing canonical state.
|
|
20
20
|
|
|
21
21
|
## 🎯 Purpose
|
|
22
22
|
|
|
@@ -24,14 +24,14 @@ Help humans navigate many tickets without making duplicate sources of truth.
|
|
|
24
24
|
|
|
25
25
|
## 🔄 Execution Flow
|
|
26
26
|
|
|
27
|
-
1. Load `docs/runtime/
|
|
27
|
+
1. Load `docs/runtime/backlog/backlog.json`.
|
|
28
28
|
2. Load tickets, bugs, sprints, and releases.
|
|
29
|
-
3. Generate `docs/runtime/
|
|
30
|
-
4. Generate `docs/runtime/
|
|
31
|
-
5. Generate `docs/runtime/
|
|
32
|
-
6. Generate `docs/runtime/
|
|
33
|
-
7. Generate `docs/runtime/
|
|
34
|
-
8. Generate `docs/runtime/
|
|
29
|
+
3. Generate `docs/runtime/views/backlog.md`.
|
|
30
|
+
4. Generate `docs/runtime/views/ready.md`.
|
|
31
|
+
5. Generate `docs/runtime/views/blocked.md`.
|
|
32
|
+
6. Generate `docs/runtime/views/by-epic.md`.
|
|
33
|
+
7. Generate `docs/runtime/views/by-sprint.md`.
|
|
34
|
+
8. Generate `docs/runtime/views/release-candidates.md`.
|
|
35
35
|
9. Include generation timestamp and source files.
|
|
36
36
|
|
|
37
37
|
## 🔒 Hard Rules
|
|
@@ -15,14 +15,14 @@ args:
|
|
|
15
15
|
default: 20
|
|
16
16
|
description: "Number of recent user requests to show"
|
|
17
17
|
preconditions:
|
|
18
|
-
- user_request_log_exists: "docs/runtime/
|
|
18
|
+
- user_request_log_exists: "docs/runtime/user-requests.jsonl"
|
|
19
19
|
postconditions:
|
|
20
20
|
- request_log_reported: true
|
|
21
21
|
---
|
|
22
22
|
|
|
23
23
|
# /request-log
|
|
24
24
|
|
|
25
|
-
> Show recent user requests recorded in `docs/runtime/
|
|
25
|
+
> Show recent user requests recorded in `docs/runtime/user-requests.jsonl`.
|
|
26
26
|
|
|
27
27
|
## 🎯 Purpose
|
|
28
28
|
|
|
@@ -37,7 +37,7 @@ Give the user an auditable view of what they asked the AI to do.
|
|
|
37
37
|
|
|
38
38
|
## 🔄 Execution Flow
|
|
39
39
|
|
|
40
|
-
1. Read `docs/runtime/
|
|
40
|
+
1. Read `docs/runtime/user-requests.jsonl`.
|
|
41
41
|
2. Show the most recent N entries, default 20.
|
|
42
42
|
3. Include timestamp, agent, detected command, ticket ID, and sanitized request text.
|
|
43
43
|
4. If the log is missing, tell the user to run `/setup-project`.
|
|
@@ -48,7 +48,7 @@ Give the user an auditable view of what they asked the AI to do.
|
|
|
48
48
|
The command **MUST NOT** attempt to reconstruct secrets from `request_hash` or any redacted value.
|
|
49
49
|
|
|
50
50
|
### RULE RL-002: Log is append-only
|
|
51
|
-
Existing `docs/runtime/
|
|
51
|
+
Existing `docs/runtime/user-requests.jsonl` entries **MUST NOT** be edited. Corrections require a new request entry.
|
|
52
52
|
|
|
53
53
|
## 📤 Output Format
|
|
54
54
|
|
|
@@ -19,7 +19,7 @@ postconditions:
|
|
|
19
19
|
|
|
20
20
|
# /sprint-report
|
|
21
21
|
|
|
22
|
-
> Produces a factual sprint health and outcome report from `docs/runtime
|
|
22
|
+
> Produces a factual sprint health and outcome report from `docs/runtime/`.
|
|
23
23
|
|
|
24
24
|
## 🎯 Purpose
|
|
25
25
|
|
|
@@ -33,7 +33,7 @@ Give the team an auditable view of commitment, progress, blockers, carryover, de
|
|
|
33
33
|
4. List work by state.
|
|
34
34
|
5. Identify aging tickets and unresolved blockers.
|
|
35
35
|
6. Summarize risks, decisions, and recommended next actions.
|
|
36
|
-
7. Save report under `docs/runtime/
|
|
36
|
+
7. Save report under `docs/runtime/sprints/` or `docs/runtime/metrics/` if requested.
|
|
37
37
|
|
|
38
38
|
## 🔒 Hard Rules
|
|
39
39
|
|
|
@@ -20,7 +20,7 @@ postconditions:
|
|
|
20
20
|
|
|
21
21
|
# /ticket-health
|
|
22
22
|
|
|
23
|
-
> Finds stale, blocked, inconsistent, or under-specified tickets in `docs/runtime/
|
|
23
|
+
> Finds stale, blocked, inconsistent, or under-specified tickets in `docs/runtime/tickets/`.
|
|
24
24
|
|
|
25
25
|
## 🎯 Purpose
|
|
26
26
|
|
|
@@ -23,7 +23,7 @@ postconditions:
|
|
|
23
23
|
|
|
24
24
|
## Purpose
|
|
25
25
|
|
|
26
|
-
Detect manual edits to `docs/runtime/
|
|
26
|
+
Detect manual edits to `docs/runtime/audit-log.jsonl`. Executable workflow handlers append records with `prev_hash` and `hash`; this command recomputes the chain.
|
|
27
27
|
|
|
28
28
|
## Chat Usage
|
|
29
29
|
|
|
@@ -24,7 +24,7 @@ postconditions:
|
|
|
24
24
|
|
|
25
25
|
## Purpose
|
|
26
26
|
|
|
27
|
-
Make role boundaries mechanically enforceable by comparing `docs/runtime/
|
|
27
|
+
Make role boundaries mechanically enforceable by comparing `docs/runtime/tickets/*.json` history entries with `commands/**` command ownership metadata.
|
|
28
28
|
|
|
29
29
|
## Chat Usage
|
|
30
30
|
|
|
@@ -19,7 +19,7 @@ postconditions:
|
|
|
19
19
|
|
|
20
20
|
# /validate-state
|
|
21
21
|
|
|
22
|
-
> Validates `docs/runtime
|
|
22
|
+
> Validates `docs/runtime/` integrity, backlog references, ticket schema, and allowed state transitions.
|
|
23
23
|
|
|
24
24
|
## 🎯 Purpose
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ Catch corrupted backlog data, missing ticket references, skipped transitions, mi
|
|
|
29
29
|
|
|
30
30
|
1. Verify `jq` is installed.
|
|
31
31
|
2. In chat, run `/validate-state` with optional ticket ID. The AI may call `scripts/validate-state.sh` internally.
|
|
32
|
-
3. Validate `docs/runtime/
|
|
32
|
+
3. Validate `docs/runtime/backlog/backlog.json` references existing tickets when validating all state.
|
|
33
33
|
4. If available, run JSON schema validation against `docs/config/ticket.schema.json` and `docs/config/backlog.schema.json`.
|
|
34
34
|
5. Report failures with file path, field, and recovery command.
|
|
35
35
|
6. Block workflow if validation fails.
|
|
@@ -64,7 +64,7 @@ Check before starting. **ABORT** if any check fails.
|
|
|
64
64
|
|
|
65
65
|
### 1. Root-level framework folders initialized
|
|
66
66
|
```bash
|
|
67
|
-
test -d "docs/runtime/
|
|
67
|
+
test -d "docs/runtime/tickets" || ABORT "Run /setup-project first"
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
### 2. BA agent available
|
|
@@ -139,12 +139,12 @@ If empty or < 10 chars → ABORT and ask for the actual requirement.
|
|
|
139
139
|
│ - External dependencies (3rd party API)? │
|
|
140
140
|
├──────────────────────────────────────────────────────────┤
|
|
141
141
|
│ STEP 8: Generate ticket ID │
|
|
142
|
-
│ - Read docs/runtime/
|
|
142
|
+
│ - Read docs/runtime/tickets/ │
|
|
143
143
|
│ - Find highest TICKET-NNN │
|
|
144
144
|
│ - Increment: TICKET-NNN+1 │
|
|
145
145
|
├──────────────────────────────────────────────────────────┤
|
|
146
146
|
│ STEP 9: Write ticket JSON │
|
|
147
|
-
│ Path: docs/runtime/
|
|
147
|
+
│ Path: docs/runtime/tickets/TICKET-XXX.json │
|
|
148
148
|
│ Schema: docs/config/ticket.schema.json │
|
|
149
149
|
│ State: DRAFT │
|
|
150
150
|
│ created_by: "business-analyst-agent" │
|
|
@@ -194,7 +194,7 @@ SEV-1 bug **MUST** trigger hotfix notification:
|
|
|
194
194
|
|
|
195
195
|
### RULE AR-009: No duplicate tickets
|
|
196
196
|
Before creating, **MUST** search existing tickets for similar work:
|
|
197
|
-
- Grep titles in `docs/runtime/
|
|
197
|
+
- Grep titles in `docs/runtime/tickets/*.json`
|
|
198
198
|
- If high similarity (>80%) → flag to user, ask if duplicate
|
|
199
199
|
|
|
200
200
|
### RULE AR-010: Complete source tracking
|
|
@@ -297,7 +297,7 @@ Estimated: 40% support load reduction if self-service reset works.
|
|
|
297
297
|
- [ ] Email template: existing template system or custom?
|
|
298
298
|
|
|
299
299
|
### Ticket File
|
|
300
|
-
Created: `docs/runtime/
|
|
300
|
+
Created: `docs/runtime/tickets/TICKET-042.json`
|
|
301
301
|
|
|
302
302
|
---
|
|
303
303
|
HANDOFF → tech-lead
|
|
@@ -404,7 +404,7 @@ Then Login fails, no SQL injection possible
|
|
|
404
404
|
3. **Dev**: Pair with Tech Lead on fix
|
|
405
405
|
|
|
406
406
|
### Ticket File
|
|
407
|
-
Created: `docs/runtime/
|
|
407
|
+
Created: `docs/runtime/tickets/TICKET-101.json`
|
|
408
408
|
|
|
409
409
|
---
|
|
410
410
|
HANDOFF → scrum-master + tech-lead (URGENT)
|
|
@@ -433,7 +433,7 @@ Action needed: /hotfix TICKET-101
|
|
|
433
433
|
|
|
434
434
|
## 📊 Metrics Tracked
|
|
435
435
|
|
|
436
|
-
Log to `docs/runtime/
|
|
436
|
+
Log to `docs/runtime/metrics/analyze-requirements.jsonl`:
|
|
437
437
|
|
|
438
438
|
```json
|
|
439
439
|
{
|
|
@@ -11,14 +11,14 @@ consults_agents:
|
|
|
11
11
|
model_preference: sonnet
|
|
12
12
|
args: []
|
|
13
13
|
preconditions:
|
|
14
|
-
- backlog_exists: "docs/runtime/
|
|
14
|
+
- backlog_exists: "docs/runtime/backlog/backlog.json"
|
|
15
15
|
postconditions:
|
|
16
16
|
- backlog_report_generated: true
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
# /backlog-status
|
|
20
20
|
|
|
21
|
-
> Reports backlog health from `docs/runtime/
|
|
21
|
+
> Reports backlog health from `docs/runtime/backlog/backlog.json` and linked ticket files.
|
|
22
22
|
|
|
23
23
|
## 🎯 Purpose
|
|
24
24
|
|
|
@@ -26,8 +26,8 @@ Show whether the backlog is prioritized, actionable, and aligned with ticket sta
|
|
|
26
26
|
|
|
27
27
|
## 🔄 Execution Flow
|
|
28
28
|
|
|
29
|
-
1. Load `docs/runtime/
|
|
30
|
-
2. Load referenced `docs/runtime/
|
|
29
|
+
1. Load `docs/runtime/backlog/backlog.json`.
|
|
30
|
+
2. Load referenced `docs/runtime/tickets/TICKET-XXX.json` files.
|
|
31
31
|
3. Detect missing ticket references.
|
|
32
32
|
4. Detect duplicate ranks or duplicate ticket IDs.
|
|
33
33
|
5. Group by priority, epic, and status.
|
|
@@ -36,8 +36,8 @@ Show whether the backlog is prioritized, actionable, and aligned with ticket sta
|
|
|
36
36
|
|
|
37
37
|
## 🔒 Hard Rules
|
|
38
38
|
|
|
39
|
-
- Backlog ordering source of truth is `docs/runtime/
|
|
40
|
-
- Ticket detail source of truth is `docs/runtime/
|
|
39
|
+
- Backlog ordering source of truth is `docs/runtime/backlog/backlog.json`.
|
|
40
|
+
- Ticket detail source of truth is `docs/runtime/tickets/TICKET-XXX.json`.
|
|
41
41
|
- MUST NOT duplicate full ticket content in backlog reports.
|
|
42
42
|
- MUST flag backlog items pointing to missing tickets.
|
|
43
43
|
|
|
@@ -17,7 +17,7 @@ args:
|
|
|
17
17
|
format: "TICKET-XXX"
|
|
18
18
|
description: "Ticket ID to groom"
|
|
19
19
|
preconditions:
|
|
20
|
-
- ticket_exists: "docs/runtime/
|
|
20
|
+
- ticket_exists: "docs/runtime/tickets/${ticket_id}.json"
|
|
21
21
|
- ticket_status: DRAFT
|
|
22
22
|
- has_user_story: true
|
|
23
23
|
- has_acceptance_criteria: true (min 3 scenarios)
|
|
@@ -60,7 +60,7 @@ After BA creates a DRAFT ticket, Tech Lead must:
|
|
|
60
60
|
|
|
61
61
|
### 1. Ticket exists
|
|
62
62
|
```bash
|
|
63
|
-
test -f "docs/runtime/
|
|
63
|
+
test -f "docs/runtime/tickets/${TICKET_ID}.json" || ABORT "Ticket not found"
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
### 2. Ticket status = DRAFT
|
|
@@ -300,7 +300,7 @@ Block transition to GROOMED until ADR created OR explicit decision to defer.
|
|
|
300
300
|
### Ticket Update
|
|
301
301
|
|
|
302
302
|
**State**: DRAFT → GROOMED ✅ (assuming questions minor)
|
|
303
|
-
**Updated**: `docs/runtime/
|
|
303
|
+
**Updated**: `docs/runtime/tickets/TICKET-042.json`
|
|
304
304
|
|
|
305
305
|
Added fields:
|
|
306
306
|
- `estimate`: `{ story_points: 5, estimated_by: "tech-lead-agent", estimated_at: "..." }`
|
|
@@ -420,7 +420,7 @@ State: DRAFT → BLOCKED (pending split)
|
|
|
420
420
|
|
|
421
421
|
## 📊 Metrics Tracked
|
|
422
422
|
|
|
423
|
-
Log to `docs/runtime/
|
|
423
|
+
Log to `docs/runtime/metrics/groom-ticket.jsonl`:
|
|
424
424
|
|
|
425
425
|
```json
|
|
426
426
|
{
|
|
@@ -18,7 +18,7 @@ args:
|
|
|
18
18
|
format: "TICKET-XXX"
|
|
19
19
|
description: "GROOMED ticket to verify against Definition of Ready"
|
|
20
20
|
preconditions:
|
|
21
|
-
- ticket_exists: "docs/runtime/
|
|
21
|
+
- ticket_exists: "docs/runtime/tickets/${ticket_id}.json"
|
|
22
22
|
- ticket_status: GROOMED
|
|
23
23
|
- has_estimate: true
|
|
24
24
|
- has_acceptance_criteria: true
|
|
@@ -46,7 +46,7 @@ Manual only:
|
|
|
46
46
|
|
|
47
47
|
## 📋 Preconditions, STRICT
|
|
48
48
|
|
|
49
|
-
1. Ticket exists in `docs/runtime/
|
|
49
|
+
1. Ticket exists in `docs/runtime/tickets/`.
|
|
50
50
|
2. Ticket status is exactly `GROOMED`.
|
|
51
51
|
3. Ticket has user story, acceptance criteria, estimate, technical approach, risks, and dependencies.
|
|
52
52
|
4. Ticket estimate is one of `1, 2, 3, 5, 8`.
|
|
@@ -37,8 +37,8 @@ Plan large refactors without putting project-specific design into framework sour
|
|
|
37
37
|
3. Identify current problem, target state, constraints, and risks.
|
|
38
38
|
4. Determine whether ADR is required.
|
|
39
39
|
5. Create `docs/runtime/refactor/<slug>-refactor-plan.md` from `templates/technical/refactor-plan-template.md`.
|
|
40
|
-
6. Propose ticket breakdown for `docs/runtime/
|
|
41
|
-
7. Propose backlog entries for `docs/runtime/
|
|
40
|
+
6. Propose ticket breakdown for `docs/runtime/tickets/`.
|
|
41
|
+
7. Propose backlog entries for `docs/runtime/backlog/backlog.json`.
|
|
42
42
|
8. Define testing, rollout, and rollback plan.
|
|
43
43
|
9. HANDOFF to BA for ticket creation or Tech Lead for ADR.
|
|
44
44
|
|
|
@@ -35,7 +35,7 @@ postconditions:
|
|
|
35
35
|
|
|
36
36
|
## 🎯 Purpose
|
|
37
37
|
|
|
38
|
-
Build a realistic sprint commitment. It selects only `READY` tickets, respects configured sprint capacity, checks dependencies, and writes the sprint plan to `docs/runtime/
|
|
38
|
+
Build a realistic sprint commitment. It selects only `READY` tickets, respects configured sprint capacity, checks dependencies, and writes the sprint plan to `docs/runtime/sprints/`.
|
|
39
39
|
|
|
40
40
|
## 🚦 Trigger
|
|
41
41
|
|
|
@@ -63,9 +63,9 @@ Manual at sprint planning:
|
|
|
63
63
|
6. Select tickets until capacity is reached.
|
|
64
64
|
7. Reserve capacity for bugs, review, QA, and operational work.
|
|
65
65
|
8. Validate no selected ticket violates DoR.
|
|
66
|
-
9. Write `docs/runtime/
|
|
66
|
+
9. Write `docs/runtime/sprints/SPRINT-XXX.json` with goal, dates, capacity, committed tickets, risks, and assumptions.
|
|
67
67
|
10. Update selected tickets with `sprint_id`.
|
|
68
|
-
11. Append planning metrics to `docs/runtime/
|
|
68
|
+
11. Append planning metrics to `docs/runtime/metrics/sprint-planning.jsonl`.
|
|
69
69
|
12. Output sprint goal, commitment, risks, and handoffs.
|
|
70
70
|
|
|
71
71
|
## 🔒 Hard Rules
|
|
@@ -16,14 +16,14 @@ args:
|
|
|
16
16
|
enum: [moscow, rice, manual]
|
|
17
17
|
default: moscow
|
|
18
18
|
preconditions:
|
|
19
|
-
- backlog_exists: "docs/runtime/
|
|
19
|
+
- backlog_exists: "docs/runtime/backlog/backlog.json"
|
|
20
20
|
postconditions:
|
|
21
21
|
- backlog_order_updated: true
|
|
22
22
|
---
|
|
23
23
|
|
|
24
24
|
# /prioritize-backlog
|
|
25
25
|
|
|
26
|
-
> Updates backlog ranking in `docs/runtime/
|
|
26
|
+
> Updates backlog ranking in `docs/runtime/backlog/backlog.json` using MoSCoW, RICE, dependencies, and stakeholder input.
|
|
27
27
|
|
|
28
28
|
## 🎯 Purpose
|
|
29
29
|
|
|
@@ -42,7 +42,7 @@ Turn a groomed or ready ticket into a concrete execution plan before coding star
|
|
|
42
42
|
|
|
43
43
|
## Execution Flow
|
|
44
44
|
|
|
45
|
-
1. Read `docs/runtime/
|
|
45
|
+
1. Read `docs/runtime/tickets/TICKET-XXX.json`.
|
|
46
46
|
2. Read `spec_path` if present.
|
|
47
47
|
3. Inspect relevant code/docs just enough to identify affected files and test strategy.
|
|
48
48
|
4. Create `docs/project/plans/TICKET-XXX-<slug>-plan.md`.
|
|
@@ -43,7 +43,7 @@ Give AI agents shared context before implementation and review. The output helps
|
|
|
43
43
|
4. Identify test layout and command coverage.
|
|
44
44
|
5. Identify architecture docs and ADRs.
|
|
45
45
|
6. Identify external integrations and environment assumptions.
|
|
46
|
-
7. Produce `docs/runtime/
|
|
46
|
+
7. Produce `docs/runtime/codebase-map.md` or update existing map with timestamp.
|
|
47
47
|
8. List risks, missing docs, and recommended follow-up tickets.
|
|
48
48
|
|
|
49
49
|
## 🔒 Hard Rules
|
|
@@ -44,7 +44,7 @@ Manual after copying root-level framework folders into a project:
|
|
|
44
44
|
2. `README.md` exists.
|
|
45
45
|
3. `templates/project/project-config.yaml` exists.
|
|
46
46
|
4. `templates/project/project-structure.yaml` exists.
|
|
47
|
-
5. User has permission to create `docs/config/`, `docs/runtime
|
|
47
|
+
5. User has permission to create `docs/config/`, `docs/runtime/`, `docs/project/`, `.claude/`, `.cursor/`, `.windsurfrules`, and `CLAUDE.md`.
|
|
48
48
|
|
|
49
49
|
## 🔄 Execution Flow
|
|
50
50
|
|
|
@@ -53,9 +53,9 @@ Manual after copying root-level framework folders into a project:
|
|
|
53
53
|
3. Copy `templates/project/project-config.yaml` to `docs/config/project-config.yaml` if missing.
|
|
54
54
|
4. Copy `templates/project/project-structure.yaml` to `docs/config/project-structure.yaml` if missing.
|
|
55
55
|
5. Ask for missing project fields or infer with `/detect-stack`.
|
|
56
|
-
6. Create required `docs/runtime
|
|
56
|
+
6. Create required `docs/runtime/` directories: tickets, backlog, bugs, sprints, releases, metrics, views, test-runs, verifications, incidents, prs.
|
|
57
57
|
7. Create required docs namespaces: `docs/project/` for project/product requirements and `docs/runtime/` for operational AI Core documentation.
|
|
58
|
-
8. Create `docs/runtime/
|
|
58
|
+
8. Create `docs/runtime/backlog/backlog.json` and `docs/runtime/user-requests.jsonl` if missing.
|
|
59
59
|
9. Run `bash scripts/setup-project.sh` when shell access is available, or perform steps 2-8 manually.
|
|
60
60
|
10. Confirm `scripts/` contains the portable enforcement scripts.
|
|
61
61
|
11. Install portable `.github/workflows/ai-core-governance.yml` if missing.
|
|
@@ -73,16 +73,16 @@ If config values already exist, preserve them unless user confirms change.
|
|
|
73
73
|
Generated `.claude/`, `.cursor/`, and `.windsurfrules` files are exports. Source changes belong in root-level framework folders.
|
|
74
74
|
|
|
75
75
|
### RULE SP-003: No product code changes
|
|
76
|
-
Setup modifies AI runtime/config files only: `docs/config/`, `docs/runtime
|
|
76
|
+
Setup modifies AI runtime/config files only: `docs/config/`, `docs/runtime/`, `docs/project/`, generated platform config, and optional docs scaffolding. It MUST NOT modify production source code.
|
|
77
77
|
|
|
78
78
|
### RULE SP-004: State directories required
|
|
79
|
-
A project is not ready until `docs/runtime
|
|
79
|
+
A project is not ready until `docs/runtime/` contains directories for tickets, backlog, bugs, sprints, releases, metrics, views, test-runs, verifications, incidents, and prs.
|
|
80
80
|
|
|
81
81
|
### RULE SP-004a: User request log required
|
|
82
|
-
A project is not ready until `docs/runtime/
|
|
82
|
+
A project is not ready until `docs/runtime/user-requests.jsonl` exists. Every AI-handled user request **MUST** be logged there before substantive work begins.
|
|
83
83
|
|
|
84
84
|
### RULE SP-005: Framework folders remain framework-only
|
|
85
|
-
Project-specific state and config MUST NOT be written under framework source folders. Use `docs/runtime
|
|
85
|
+
Project-specific state and config MUST NOT be written under framework source folders. Use `docs/runtime/` and `docs/config/`.
|
|
86
86
|
|
|
87
87
|
### RULE SP-006: `scripts/` is canonical
|
|
88
88
|
Portable enforcement scripts live under `scripts/`.
|
|
@@ -24,7 +24,7 @@ Give QA, Scrum Master, and Tech Lead a clear picture of defect health.
|
|
|
24
24
|
|
|
25
25
|
## 🔄 Execution Flow
|
|
26
26
|
|
|
27
|
-
1. Load `docs/runtime/
|
|
27
|
+
1. Load `docs/runtime/bugs/*.json`.
|
|
28
28
|
2. Group bugs by severity and status.
|
|
29
29
|
3. Identify stale bugs and missing owners.
|
|
30
30
|
4. Identify release-blocking bugs.
|
|
@@ -66,7 +66,7 @@ If not → prompt interactive collection.
|
|
|
66
66
|
|
|
67
67
|
### 2. Not duplicate
|
|
68
68
|
Check existing open bugs for similar:
|
|
69
|
-
- Grep bug titles in `docs/runtime/
|
|
69
|
+
- Grep bug titles in `docs/runtime/bugs/*.json`
|
|
70
70
|
- If > 80% similarity → flag, ask if linking to existing
|
|
71
71
|
|
|
72
72
|
### 3. Has evidence (soft requirement)
|
|
@@ -125,7 +125,7 @@ If missing, still accept but flag in bug.
|
|
|
125
125
|
│ BUG-NNN (separate sequence from TICKET-) │
|
|
126
126
|
├──────────────────────────────────────────────────────────┤
|
|
127
127
|
│ STEP 8: Create bug ticket │
|
|
128
|
-
│ Path: docs/runtime/
|
|
128
|
+
│ Path: docs/runtime/bugs/BUG-NNN.json │
|
|
129
129
|
│ Follow template: templates/qa/bug-report-template.md │
|
|
130
130
|
│ Initial status: NEW │
|
|
131
131
|
├──────────────────────────────────────────────────────────┤
|
|
@@ -224,7 +224,7 @@ Missing env info = bug 50% harder to fix.
|
|
|
224
224
|
Don't say "always" if not sure.
|
|
225
225
|
|
|
226
226
|
### RULE RB-009: Evidence preservation
|
|
227
|
-
Screenshots, logs, HAR files → save to `docs/runtime/
|
|
227
|
+
Screenshots, logs, HAR files → save to `docs/runtime/bugs/evidence/BUG-NNN/`.
|
|
228
228
|
|
|
229
229
|
Don't paste long logs in bug body → link to file.
|
|
230
230
|
|
|
@@ -304,8 +304,8 @@ Auto assess: Data integrity concern → SEV-1.
|
|
|
304
304
|
Always (5/5 attempts)
|
|
305
305
|
|
|
306
306
|
### Evidence
|
|
307
|
-
- Screenshot: `docs/runtime/
|
|
308
|
-
- Network trace: `docs/runtime/
|
|
307
|
+
- Screenshot: `docs/runtime/bugs/evidence/BUG-005/screenshot-1.png`
|
|
308
|
+
- Network trace: `docs/runtime/bugs/evidence/BUG-005/har.json`
|
|
309
309
|
- Server log excerpt:
|
|
310
310
|
```
|
|
311
311
|
2026-04-18T18:45:23Z ERROR handler/login.ts:42
|
|
@@ -349,7 +349,7 @@ Likely: URL decoding treating + as space (classic `encodeURIComponent` vs `+` is
|
|
|
349
349
|
|
|
350
350
|
### Ticket File
|
|
351
351
|
|
|
352
|
-
Created: `docs/runtime/
|
|
352
|
+
Created: `docs/runtime/bugs/BUG-005.json`
|
|
353
353
|
|
|
354
354
|
### Next Steps
|
|
355
355
|
|
|
@@ -405,7 +405,7 @@ Action: /triage-bug BUG-005
|
|
|
405
405
|
- [ ] Executive team (if not resolved in 2h)
|
|
406
406
|
|
|
407
407
|
### Ticket File
|
|
408
|
-
Created: `docs/runtime/
|
|
408
|
+
Created: `docs/runtime/bugs/BUG-006.json`
|
|
409
409
|
|
|
410
410
|
---
|
|
411
411
|
HANDOFF → tech-lead + scrum-master (URGENT)
|
|
@@ -79,7 +79,7 @@ curl -sf --max-time 10 "$STAGING_URL/health" || ABORT "Staging not responding"
|
|
|
79
79
|
Check build version matches expected:
|
|
80
80
|
```bash
|
|
81
81
|
deployed_commit=$(curl -s "$STAGING_URL/version" | jq -r .commit)
|
|
82
|
-
expected_commit=$(cat docs/runtime/
|
|
82
|
+
expected_commit=$(cat docs/runtime/tickets/${TICKET_ID}.json | jq -r .merge_info.merge_commit_sha)
|
|
83
83
|
# Verify deployed >= expected
|
|
84
84
|
```
|
|
85
85
|
|
|
@@ -145,7 +145,7 @@ Required test accounts / test data exist. If not, setup before testing.
|
|
|
145
145
|
│ → File separate regression bug (own ticket) │
|
|
146
146
|
├──────────────────────────────────────────────────────────┤
|
|
147
147
|
│ STEP 9: Generate report │
|
|
148
|
-
│ Save to: docs/runtime/
|
|
148
|
+
│ Save to: docs/runtime/test-runs/TICKET-XXX-YYYYMMDD.md│
|
|
149
149
|
├──────────────────────────────────────────────────────────┤
|
|
150
150
|
│ STEP 10: Handoff │
|
|
151
151
|
│ Pass → scrum-master (ready for release) │
|
|
@@ -261,7 +261,7 @@ None 🎉
|
|
|
261
261
|
Ticket state: QA → DONE ✅
|
|
262
262
|
|
|
263
263
|
### Test Run Record
|
|
264
|
-
Saved to: `docs/runtime/
|
|
264
|
+
Saved to: `docs/runtime/test-runs/TICKET-042-20260418.md`
|
|
265
265
|
|
|
266
266
|
---
|
|
267
267
|
HANDOFF → scrum-master
|
|
@@ -54,7 +54,7 @@ After developer claims the bug is fixed and PR is merged + deployed:
|
|
|
54
54
|
|
|
55
55
|
### 1. Bug exists + in correct state
|
|
56
56
|
```bash
|
|
57
|
-
bug_status=$(cat docs/runtime/
|
|
57
|
+
bug_status=$(cat docs/runtime/bugs/${BUG_ID}.json | jq -r .status)
|
|
58
58
|
[ "$bug_status" = "FIXED" ] || [ "$bug_status" = "READY_FOR_QA" ] || ABORT
|
|
59
59
|
```
|
|
60
60
|
|
|
@@ -141,7 +141,7 @@ Check linked PR is merged (not still open).
|
|
|
141
141
|
│ → HANDOFF → developer │
|
|
142
142
|
├──────────────────────────────────────────────────────────┤
|
|
143
143
|
│ STEP 9: Generate report │
|
|
144
|
-
│ Save to: docs/runtime/
|
|
144
|
+
│ Save to: docs/runtime/verifications/BUG-XXX-YYYYMMDD.md│
|
|
145
145
|
├──────────────────────────────────────────────────────────┤
|
|
146
146
|
│ STEP 10: Update bug state + notify │
|
|
147
147
|
└──────────────────────────────────────────────────────────┘
|
|
@@ -267,7 +267,7 @@ Bug status: FIXED → VERIFIED
|
|
|
267
267
|
- BUG-004 (email HTML rendering): Still open, separate fix
|
|
268
268
|
|
|
269
269
|
### Verification Record
|
|
270
|
-
Saved to: `docs/runtime/
|
|
270
|
+
Saved to: `docs/runtime/verifications/BUG-002-20260418.md`
|
|
271
271
|
|
|
272
272
|
---
|
|
273
273
|
HANDOFF → scrum-master
|
|
@@ -56,7 +56,7 @@ Manual:
|
|
|
56
56
|
## 🔄 Execution Flow
|
|
57
57
|
|
|
58
58
|
1. Triage severity and impact.
|
|
59
|
-
2. Create or link `BUG-NNN` in `docs/runtime/
|
|
59
|
+
2. Create or link `BUG-NNN` in `docs/runtime/bugs/`.
|
|
60
60
|
3. Create hotfix ticket if needed with minimal AC and status `READY`.
|
|
61
61
|
4. Create branch `hotfix/BUG-NNN-short-slug` or `hotfix/TICKET-NNN-short-slug` from production branch.
|
|
62
62
|
5. Reproduce the issue and write a regression test if feasible.
|
|
@@ -69,7 +69,7 @@ Manual:
|
|
|
69
69
|
12. QA verifies production or pre-prod depending on incident protocol.
|
|
70
70
|
13. Back-merge hotfix into `develop`.
|
|
71
71
|
14. Create follow-up ticket for full DoD, monitoring, and root cause analysis.
|
|
72
|
-
15. Write incident summary in `docs/runtime/
|
|
72
|
+
15. Write incident summary in `docs/runtime/releases/` or `docs/runtime/incidents/`.
|
|
73
73
|
|
|
74
74
|
## 🔒 Hard Rules
|
|
75
75
|
|
|
@@ -65,7 +65,7 @@ Manual:
|
|
|
65
65
|
5. Confirm QA evidence exists for every included ticket.
|
|
66
66
|
6. Check open bugs and known issues.
|
|
67
67
|
7. Generate changelog with ticket IDs, PRs, bug fixes, migrations, and breaking changes.
|
|
68
|
-
8. Create `docs/runtime/
|
|
68
|
+
8. Create `docs/runtime/releases/vX.Y.Z.json` from `templates/release/release-record-template.json` with scope, approvals, risks, deploy plan, rollback plan, and timestamps.
|
|
69
69
|
9. Create or update release branch if configured.
|
|
70
70
|
10. Tag release using `vX.Y.Z`.
|
|
71
71
|
11. Trigger deployment or document manual deployment step.
|
|
@@ -38,7 +38,7 @@ Restore service safely, preserve audit trail, and start follow-up remediation.
|
|
|
38
38
|
4. Notify stakeholders and freeze related deploys.
|
|
39
39
|
5. Execute documented rollback steps.
|
|
40
40
|
6. Verify service health and core flows.
|
|
41
|
-
7. Record rollback result in `docs/runtime/
|
|
41
|
+
7. Record rollback result in `docs/runtime/releases/`.
|
|
42
42
|
8. Create follow-up bug/ticket and incident notes.
|
|
43
43
|
|
|
44
44
|
## 🔒 Hard Rules
|
|
@@ -79,7 +79,7 @@ fi
|
|
|
79
79
|
Extract TICKET-XXX from branch name, verify:
|
|
80
80
|
```bash
|
|
81
81
|
TICKET_ID=$(echo "$current_branch" | grep -oE 'TICKET-[0-9]+')
|
|
82
|
-
test -f "docs/runtime/
|
|
82
|
+
test -f "docs/runtime/tickets/${TICKET_ID}.json" || ABORT
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
### 3. Ticket in IN_PROGRESS
|
|
@@ -203,7 +203,7 @@ fi
|
|
|
203
203
|
│ - (Optional) Slack notification via webhook │
|
|
204
204
|
├──────────────────────────────────────────────────────────┤
|
|
205
205
|
│ STEP 10: Log metrics │
|
|
206
|
-
│ docs/runtime/
|
|
206
|
+
│ docs/runtime/metrics/create-pr.jsonl │
|
|
207
207
|
└──────────────────────────────────────────────────────────┘
|
|
208
208
|
```
|
|
209
209
|
|
|
@@ -205,7 +205,7 @@ If branch is `hotfix/*`:
|
|
|
205
205
|
- Merge commit SHA
|
|
206
206
|
- Strategy used
|
|
207
207
|
|
|
208
|
-
Store in `docs/runtime/
|
|
208
|
+
Store in `docs/runtime/audit-log.jsonl`.
|
|
209
209
|
|
|
210
210
|
### RULE MP-009: Rollback plan for risky merges
|
|
211
211
|
If PR flagged as `high-risk` (auth changes, DB migration, payment):
|