ai-core-framework 0.2.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.
Files changed (68) hide show
  1. package/README.md +8 -8
  2. package/agents/business-analyst.md +6 -6
  3. package/agents/developer.md +2 -2
  4. package/agents/qa-tester.md +3 -3
  5. package/agents/scrum-master.md +9 -9
  6. package/agents/tech-lead.md +4 -4
  7. package/{config → docs/config}/backlog.schema.json +1 -1
  8. package/{config → docs/config}/release.schema.json +1 -1
  9. package/{config → docs/config}/ticket.schema.json +1 -1
  10. package/lib/install-codex.js +1 -1
  11. package/package.json +2 -2
  12. package/rules/00-global-rules.md +13 -13
  13. package/rules/02-code-quality.md +1 -1
  14. package/rules/05-testing-mandatory.md +2 -2
  15. package/rules/06-approval-gates.md +2 -2
  16. package/rules/08-definition-of-done.md +1 -1
  17. package/scripts/ai-core.sh +8 -8
  18. package/scripts/generate-views.sh +2 -2
  19. package/scripts/log-user-request.sh +2 -2
  20. package/scripts/setup-project.sh +35 -27
  21. package/scripts/sync-platforms.sh +3 -3
  22. package/scripts/validate-audit-log.sh +1 -1
  23. package/scripts/validate-docs.sh +6 -6
  24. package/scripts/validate-permissions.sh +2 -2
  25. package/scripts/validate-state.sh +5 -5
  26. package/scripts/workflow.sh +9 -9
  27. package/skills/brainstorming/SKILL.md +1 -1
  28. package/skills/development-implement-task/SKILL.md +5 -5
  29. package/skills/meta-generate-views/SKILL.md +8 -8
  30. package/skills/meta-request-log/SKILL.md +4 -4
  31. package/skills/meta-sprint-report/SKILL.md +2 -2
  32. package/skills/meta-ticket-health/SKILL.md +1 -1
  33. package/skills/meta-validate-audit-log/SKILL.md +1 -1
  34. package/skills/meta-validate-permissions/SKILL.md +1 -1
  35. package/skills/meta-validate-state/SKILL.md +3 -3
  36. package/skills/planning-analyze-requirements/SKILL.md +8 -8
  37. package/skills/planning-backlog-status/SKILL.md +6 -6
  38. package/skills/planning-groom-ticket/SKILL.md +4 -4
  39. package/skills/planning-mark-ready/SKILL.md +2 -2
  40. package/skills/planning-plan-refactor/SKILL.md +3 -3
  41. package/skills/planning-plan-sprint/SKILL.md +4 -4
  42. package/skills/planning-prioritize-backlog/SKILL.md +2 -2
  43. package/skills/planning-write-plan/SKILL.md +1 -1
  44. package/skills/project-detect-stack/SKILL.md +1 -1
  45. package/skills/project-discover-codebase/SKILL.md +2 -2
  46. package/skills/project-setup-project/SKILL.md +10 -10
  47. package/skills/qa-bug-status/SKILL.md +1 -1
  48. package/skills/qa-report-bug/SKILL.md +7 -7
  49. package/skills/qa-smoke-test/SKILL.md +3 -3
  50. package/skills/qa-verify-fix/SKILL.md +3 -3
  51. package/skills/release-hotfix/SKILL.md +2 -2
  52. package/skills/release-release/SKILL.md +2 -2
  53. package/skills/release-rollback/SKILL.md +1 -1
  54. package/skills/review-create-pr/SKILL.md +2 -2
  55. package/skills/review-merge-pr/SKILL.md +1 -1
  56. package/skills/using-ai-core/SKILL.md +4 -4
  57. package/skills/verification-before-done/SKILL.md +1 -1
  58. package/templates/ci/ai-core-governance.yml +11 -11
  59. package/templates/pr/pull-request-template.md +1 -1
  60. package/templates/project/CODEOWNERS +2 -2
  61. package/templates/project/docs-policy.json +1 -1
  62. package/templates/project/project-structure.yaml +20 -20
  63. package/templates/qa/bug-report-template.md +1 -1
  64. package/templates/requirements/user-story-template.md +1 -1
  65. package/workflows/bug-lifecycle.md +3 -3
  66. package/workflows/feature-lifecycle.md +2 -2
  67. package/workflows/sprint-lifecycle.md +2 -2
  68. /package/{config → docs/config}/docs-policy.default.json +0 -0
@@ -35,10 +35,10 @@ NC='\033[0m'
35
35
  # ============================================================
36
36
  # Config
37
37
  # ============================================================
38
- TICKETS_DIR="project/tickets"
39
- BUGS_DIR="project/bugs"
40
- BACKLOG_FILE="project/backlog/backlog.json"
41
- SCHEMA_FILE="config/ticket.schema.json"
38
+ TICKETS_DIR="docs/runtime/tickets"
39
+ BUGS_DIR="docs/runtime/bugs"
40
+ BACKLOG_FILE="docs/runtime/backlog/backlog.json"
41
+ SCHEMA_FILE="docs/config/ticket.schema.json"
42
42
 
43
43
  # ============================================================
44
44
  # Allowed state transitions matrix (per RULE 06)
@@ -444,7 +444,7 @@ validate_backlog() {
444
444
  # Validate release governance records
445
445
  # ============================================================
446
446
  validate_releases() {
447
- local releases_dir="project/releases"
447
+ local releases_dir="docs/runtime/releases"
448
448
 
449
449
  if [ ! -d "$releases_dir" ]; then
450
450
  return 0
@@ -38,7 +38,7 @@ agent_name() {
38
38
  }
39
39
 
40
40
  ticket_file() {
41
- printf 'project/tickets/%s.json' "$1"
41
+ printf 'docs/runtime/tickets/%s.json' "$1"
42
42
  }
43
43
 
44
44
  slugify() {
@@ -50,7 +50,7 @@ slugify() {
50
50
 
51
51
  next_ticket_id() {
52
52
  local max_id
53
- max_id=$(find project/tickets -name 'TICKET-*.json' -type f 2>/dev/null |
53
+ max_id=$(find docs/runtime/tickets -name 'TICKET-*.json' -type f 2>/dev/null |
54
54
  sed -E 's/.*TICKET-([0-9]+)\.json/\1/' |
55
55
  sort -n |
56
56
  tail -1)
@@ -79,7 +79,7 @@ hash_value() {
79
79
  }
80
80
 
81
81
  last_audit_hash() {
82
- local audit_file="project/audit-log.jsonl"
82
+ local audit_file="docs/runtime/audit-log.jsonl"
83
83
  if [ ! -s "$audit_file" ]; then
84
84
  printf ''
85
85
  return 0
@@ -95,7 +95,7 @@ append_audit() {
95
95
  local reason="$5"
96
96
 
97
97
  mkdir -p project
98
- local audit_file="project/audit-log.jsonl"
98
+ local audit_file="docs/runtime/audit-log.jsonl"
99
99
  local at by prev payload hash
100
100
  at=$(now_utc)
101
101
  by=$(agent_name)
@@ -181,7 +181,7 @@ cmd_analyze_requirements() {
181
181
  exit 1
182
182
  fi
183
183
 
184
- mkdir -p project/tickets docs/project/specs
184
+ mkdir -p docs/runtime/tickets docs/project/specs
185
185
  local ticket_id file at by slug spec_path
186
186
  ticket_id=$(next_ticket_id)
187
187
  file=$(ticket_file "$ticket_id")
@@ -349,7 +349,7 @@ Implement the ticket scope while preserving the approved acceptance criteria and
349
349
 
350
350
  ## Current Context
351
351
 
352
- - Read \`project/tickets/${ticket_id}.json\`.
352
+ - Read \`docs/runtime/tickets/${ticket_id}.json\`.
353
353
  - Read the linked spec if present.
354
354
  - Inspect affected code before editing.
355
355
 
@@ -452,7 +452,7 @@ cmd_smoke_test() {
452
452
  log_fail "$ticket_id status must be QA before QA evidence is written"
453
453
  exit 1
454
454
  fi
455
- [ -n "$evidence_path" ] || evidence_path="project/test-runs/${ticket_id}-$(date -u +%Y%m%d%H%M%S).md"
455
+ [ -n "$evidence_path" ] || evidence_path="docs/runtime/test-runs/${ticket_id}-$(date -u +%Y%m%d%H%M%S).md"
456
456
  mkdir -p "$(dirname "$evidence_path")"
457
457
  if [ ! -f "$evidence_path" ]; then
458
458
  printf '# Smoke Test Evidence: %s\n\nGenerated by executable smoke-test gate at %s.\n' "$ticket_id" "$(now_utc)" > "$evidence_path"
@@ -478,8 +478,8 @@ cmd_smoke_test() {
478
478
  cmd_release() {
479
479
  local version="${1:-}"
480
480
  [ -n "$version" ] || { log_fail "Usage: /release vMAJOR.MINOR.PATCH"; exit 2; }
481
- mkdir -p project/releases
482
- local file="project/releases/${version}.json"
481
+ mkdir -p docs/runtime/releases
482
+ local file="docs/runtime/releases/${version}.json"
483
483
  if [ -f "$file" ]; then
484
484
  log_fail "Release record already exists: $file"
485
485
  exit 1
@@ -14,7 +14,7 @@ Use this before implementation work, feature creation, behavior changes, or larg
14
14
  3. Propose 2-3 approaches with tradeoffs and a recommendation.
15
15
  4. Present a concise design for user approval.
16
16
  5. Save the approved spec to `docs/project/specs/TICKET-XXX-<slug>.md`.
17
- 6. Link the spec from `project/tickets/TICKET-XXX.json` as `spec_path`.
17
+ 6. Link the spec from `docs/runtime/tickets/TICKET-XXX.json` as `spec_path`.
18
18
  7. Suggest `/groom-ticket TICKET-XXX`.
19
19
 
20
20
  ## Hard Gates
@@ -13,9 +13,9 @@ args:
13
13
  - name: ticket_id
14
14
  required: true
15
15
  format: "TICKET-XXX"
16
- description: "Ticket ID from project/tickets/"
16
+ description: "Ticket ID from docs/runtime/tickets/"
17
17
  preconditions:
18
- - ticket_exists: "project/tickets/${ticket_id}.json"
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 "project/tickets/${TICKET_ID}.json" || ABORT "Ticket not found"
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 project/tickets/${TICKET_ID}.json │
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 `project/metrics/implement-task.jsonl`:
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 `project/` without changing canonical state.
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 `project/backlog/backlog.json`.
27
+ 1. Load `docs/runtime/backlog/backlog.json`.
28
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`.
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: "project/user-requests.jsonl"
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 `project/user-requests.jsonl`.
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 `project/user-requests.jsonl`.
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 `project/user-requests.jsonl` entries **MUST NOT** be edited. Corrections require a new request entry.
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 `project/`.
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 `project/sprints/` or `project/metrics/` if requested.
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 `project/tickets/`.
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 `project/audit-log.jsonl`. Executable workflow handlers append records with `prev_hash` and `hash`; this command recomputes the chain.
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 `project/tickets/*.json` history entries with `commands/**` command ownership metadata.
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 `project/` integrity, backlog references, ticket schema, and allowed state transitions.
22
+ > Validates `docs/runtime/` integrity, backlog references, ticket schema, and allowed state transitions.
23
23
 
24
24
  ## 🎯 Purpose
25
25
 
@@ -29,8 +29,8 @@ 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 `project/backlog/backlog.json` references existing tickets when validating all state.
33
- 4. If available, run JSON schema validation against `config/ticket.schema.json` and `config/backlog.schema.json`.
32
+ 3. Validate `docs/runtime/backlog/backlog.json` references existing tickets when validating all state.
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.
36
36
 
@@ -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 "project/tickets" || ABORT "Run /setup-project first"
67
+ test -d "docs/runtime/tickets" || ABORT "Run /setup-project first"
68
68
  ```
69
69
 
70
70
  ### 2. BA agent available
@@ -139,13 +139,13 @@ 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 project/tickets/ │
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: project/tickets/TICKET-XXX.json │
148
- │ Schema: config/ticket.schema.json │
147
+ │ Path: docs/runtime/tickets/TICKET-XXX.json │
148
+ │ Schema: docs/config/ticket.schema.json │
149
149
  │ State: DRAFT │
150
150
  │ created_by: "business-analyst-agent" │
151
151
  ├──────────────────────────────────────────────────────────┤
@@ -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 `project/tickets/*.json`
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: `project/tickets/TICKET-042.json`
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: `project/tickets/TICKET-101.json`
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 `project/metrics/analyze-requirements.jsonl`:
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: "project/backlog/backlog.json"
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 `project/backlog/backlog.json` and linked ticket files.
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 `project/backlog/backlog.json`.
30
- 2. Load referenced `project/tickets/TICKET-XXX.json` files.
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 `project/backlog/backlog.json`.
40
- - Ticket detail source of truth is `project/tickets/TICKET-XXX.json`.
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: "project/tickets/${ticket_id}.json"
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 "project/tickets/${TICKET_ID}.json" || ABORT "Ticket not found"
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**: `project/tickets/TICKET-042.json`
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 `project/metrics/groom-ticket.jsonl`:
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: "project/tickets/${ticket_id}.json"
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 `project/tickets/`.
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`.
@@ -32,13 +32,13 @@ Plan large refactors without putting project-specific design into framework sour
32
32
 
33
33
  ## 🔄 Execution Flow
34
34
 
35
- 1. Load `config/project-structure.yaml`.
35
+ 1. Load `docs/config/project-structure.yaml`.
36
36
  2. Inspect affected code areas and docs.
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 `project/tickets/`.
41
- 7. Propose backlog entries for `project/backlog/backlog.json`.
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 `project/sprints/`.
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
 
@@ -46,7 +46,7 @@ Manual at sprint planning:
46
46
 
47
47
  ## 📋 Preconditions, STRICT
48
48
 
49
- 1. `config/project-config.yaml` exists.
49
+ 1. `docs/config/project-config.yaml` exists.
50
50
  2. `/validate-state` passes.
51
51
  3. At least one ticket has status `READY`.
52
52
  4. Sprint capacity is configured under `scrum.sprint_capacity_points`.
@@ -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 `project/sprints/SPRINT-XXX.json` with goal, dates, capacity, committed tickets, risks, and assumptions.
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 `project/metrics/sprint-planning.jsonl`.
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: "project/backlog/backlog.json"
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 `project/backlog/backlog.json` using MoSCoW, RICE, dependencies, and stakeholder input.
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 `project/tickets/TICKET-XXX.json`.
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`.
@@ -21,7 +21,7 @@ postconditions:
21
21
 
22
22
  ## 🎯 Purpose
23
23
 
24
- Populate or validate `config/project-config.yaml` from actual repository evidence instead of guesses.
24
+ Populate or validate `docs/config/project-config.yaml` from actual repository evidence instead of guesses.
25
25
 
26
26
  ## 🚦 Trigger
27
27
 
@@ -37,13 +37,13 @@ Give AI agents shared context before implementation and review. The output helps
37
37
 
38
38
  ## 🔄 Execution Flow
39
39
 
40
- 1. Load `config/project-config.yaml`.
40
+ 1. Load `docs/config/project-config.yaml`.
41
41
  2. Enumerate top-level directories and identify application, test, config, docs, scripts, and infra areas.
42
42
  3. Identify entry points, routes/controllers, domain modules, data access, jobs/workers, and shared libraries.
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 `project/codebase-map.md` or update existing map with timestamp.
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,18 +44,18 @@ 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 `config/`, `project/`, `docs/project/`, `docs/runtime/`, `.claude/`, `.cursor/`, `.windsurfrules`, and `CLAUDE.md`.
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
 
51
51
  1. Confirm repo root and framework folder locations.
52
- 2. Create `config/` if missing.
53
- 3. Copy `templates/project/project-config.yaml` to `config/project-config.yaml` if missing.
54
- 4. Copy `templates/project/project-structure.yaml` to `config/project-structure.yaml` if missing.
52
+ 2. Create `docs/config/` if missing.
53
+ 3. Copy `templates/project/project-config.yaml` to `docs/config/project-config.yaml` if missing.
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 `project/` directories: tickets, backlog, bugs, sprints, releases, metrics, views, test-runs, verifications, incidents, prs.
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 `project/backlog/backlog.json` and `project/user-requests.jsonl` if missing.
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: `config/`, `project/`, `docs/project/`, `docs/runtime/`, generated platform config, and optional docs scaffolding. It MUST NOT modify production source code.
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 `project/` contains directories for tickets, backlog, bugs, sprints, releases, metrics, views, test-runs, verifications, incidents, and prs.
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 `project/user-requests.jsonl` exists. Every AI-handled user request **MUST** be logged there before substantive work begins.
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 `project/` and `config/`.
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 `project/bugs/*.json`.
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.