ai-core-framework 0.1.0 → 0.3.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 (106) hide show
  1. package/README.md +19 -19
  2. package/{core/agents → agents}/business-analyst.md +7 -7
  3. package/{core/agents → agents}/developer.md +2 -2
  4. package/{core/agents → agents}/qa-tester.md +3 -3
  5. package/{core/agents → agents}/scrum-master.md +16 -12
  6. package/{core/agents → agents}/tech-lead.md +4 -4
  7. package/bin/ai-core-framework.js +4 -4
  8. package/{core → docs}/config/backlog.schema.json +1 -1
  9. package/{core → docs}/config/release.schema.json +1 -1
  10. package/{core → docs}/config/ticket.schema.json +1 -1
  11. package/hooks/hooks-cursor.json +16 -0
  12. package/hooks/hooks.json +16 -0
  13. package/hooks/session-start +21 -0
  14. package/lib/install-codex.js +39 -7
  15. package/package.json +9 -2
  16. package/{core/rules → rules}/00-global-rules.md +18 -18
  17. package/{core/rules → rules}/02-code-quality.md +1 -1
  18. package/{core/rules → rules}/04-documentation.md +1 -1
  19. package/{core/rules → rules}/05-testing-mandatory.md +2 -2
  20. package/{core/rules → rules}/06-approval-gates.md +2 -2
  21. package/{core/rules → rules}/08-definition-of-done.md +1 -1
  22. package/{core/scripts → scripts}/ai-core.sh +43 -21
  23. package/{core/scripts → scripts}/generate-views.sh +2 -2
  24. package/{core/scripts → scripts}/install-codex-prompts.sh +23 -15
  25. package/{core/scripts → scripts}/log-user-request.sh +5 -5
  26. package/{core/scripts → scripts}/setup-project.sh +33 -38
  27. package/{core/scripts → scripts}/sync-platforms.sh +49 -45
  28. package/{core/scripts → scripts}/validate-audit-log.sh +2 -2
  29. package/{core/scripts → scripts}/validate-docs.sh +6 -6
  30. package/{core/scripts → scripts}/validate-permissions.sh +17 -3
  31. package/{core/scripts → scripts}/validate-state.sh +6 -6
  32. package/{core/scripts → scripts}/workflow.sh +16 -16
  33. package/{core/skills → skills}/ai-core-commands/SKILL.md +9 -9
  34. package/{core/skills → skills}/brainstorming/SKILL.md +1 -1
  35. package/{core/skills → skills}/development-implement-task/SKILL.md +7 -7
  36. package/{core/skills → skills}/meta-generate-views/SKILL.md +8 -8
  37. package/{core/skills → skills}/meta-request-log/SKILL.md +4 -4
  38. package/{core/skills → skills}/meta-sprint-report/SKILL.md +2 -2
  39. package/{core/skills → skills}/meta-sync-platforms/SKILL.md +5 -5
  40. package/{core/skills → skills}/meta-ticket-health/SKILL.md +1 -1
  41. package/{core/skills → skills}/meta-validate-audit-log/SKILL.md +2 -2
  42. package/{core/skills → skills}/meta-validate-docs/SKILL.md +1 -1
  43. package/{core/skills → skills}/meta-validate-permissions/SKILL.md +2 -2
  44. package/{core/skills → skills}/meta-validate-state/SKILL.md +4 -4
  45. package/{core/skills → skills}/planning-analyze-requirements/SKILL.md +10 -10
  46. package/{core/skills → skills}/planning-backlog-status/SKILL.md +6 -6
  47. package/{core/skills → skills}/planning-groom-ticket/SKILL.md +4 -4
  48. package/{core/skills → skills}/planning-mark-ready/SKILL.md +3 -3
  49. package/{core/skills → skills}/planning-plan-refactor/SKILL.md +6 -6
  50. package/{core/skills → skills}/planning-plan-sprint/SKILL.md +4 -4
  51. package/{core/skills → skills}/planning-prioritize-backlog/SKILL.md +2 -2
  52. package/{core/skills → skills}/planning-write-plan/SKILL.md +1 -1
  53. package/{core/skills → skills}/project-detect-stack/SKILL.md +1 -1
  54. package/{core/skills → skills}/project-discover-codebase/SKILL.md +2 -2
  55. package/skills/project-setup-project/SKILL.md +113 -0
  56. package/{core/skills → skills}/qa-bug-status/SKILL.md +1 -1
  57. package/{core/skills → skills}/qa-report-bug/SKILL.md +8 -8
  58. package/{core/skills → skills}/qa-smoke-test/SKILL.md +3 -3
  59. package/{core/skills → skills}/qa-verify-fix/SKILL.md +3 -3
  60. package/{core/skills → skills}/release-hotfix/SKILL.md +2 -2
  61. package/{core/skills → skills}/release-release/SKILL.md +2 -2
  62. package/{core/skills → skills}/release-rollback/SKILL.md +1 -1
  63. package/{core/skills → skills}/review-create-pr/SKILL.md +2 -2
  64. package/{core/skills → skills}/review-merge-pr/SKILL.md +1 -1
  65. package/{core/skills → skills}/using-ai-core/SKILL.md +7 -7
  66. package/{core/skills → skills}/verification-before-done/SKILL.md +1 -1
  67. package/{core/templates → templates}/ci/ai-core-governance.yml +29 -19
  68. package/{core/templates → templates}/pr/pull-request-template.md +1 -1
  69. package/{core/templates → templates}/project/CODEOWNERS +8 -3
  70. package/templates/project/docs-policy.json +3 -0
  71. package/templates/project/project-structure.yaml +76 -0
  72. package/{core/templates → templates}/qa/bug-report-template.md +1 -1
  73. package/{core/templates → templates}/requirements/user-story-template.md +1 -1
  74. package/{core/workflows → workflows}/bug-lifecycle.md +3 -3
  75. package/{core/workflows → workflows}/feature-lifecycle.md +2 -2
  76. package/{core/workflows → workflows}/sprint-lifecycle.md +2 -2
  77. package/core/README.md +0 -162
  78. package/core/skills/project-setup-project/SKILL.md +0 -113
  79. package/core/templates/project/docs-policy.json +0 -3
  80. package/core/templates/project/project-structure.yaml +0 -76
  81. /package/{core/agents → agents}/README.md +0 -0
  82. /package/{core → docs}/config/docs-policy.default.json +0 -0
  83. /package/{core/rules → rules}/01-git-workflow.md +0 -0
  84. /package/{core/rules → rules}/03-security.md +0 -0
  85. /package/{core/rules → rules}/07-definition-of-ready.md +0 -0
  86. /package/{core/skills → skills}/README.md +0 -0
  87. /package/{core/skills → skills}/executing-ticket/SKILL.md +0 -0
  88. /package/{core/skills → skills}/git-branch-status/SKILL.md +0 -0
  89. /package/{core/skills → skills}/git-cleanup-branches/SKILL.md +0 -0
  90. /package/{core/skills → skills}/git-scan-untracked/SKILL.md +0 -0
  91. /package/{core/skills → skills}/planning-document-existing-requirements/SKILL.md +0 -0
  92. /package/{core/skills → skills}/planning-estimate-task/SKILL.md +0 -0
  93. /package/{core/skills → skills}/qa-triage-bug/SKILL.md +0 -0
  94. /package/{core/skills → skills}/review-techlead-review/SKILL.md +0 -0
  95. /package/{core/skills → skills}/writing-implementation-plan/SKILL.md +0 -0
  96. /package/{core/templates → templates}/ci/node-pnpm.yml +0 -0
  97. /package/{core/templates → templates}/pm/retrospective-template.md +0 -0
  98. /package/{core/templates → templates}/pm/sprint-plan-template.md +0 -0
  99. /package/{core/templates → templates}/project/project-config.yaml +0 -0
  100. /package/{core/templates → templates}/qa/test-plan-template.md +0 -0
  101. /package/{core/templates → templates}/release/release-record-template.json +0 -0
  102. /package/{core/templates → templates}/requirements/PRD-template.md +0 -0
  103. /package/{core/templates → templates}/technical/ADR-template.md +0 -0
  104. /package/{core/templates → templates}/technical/refactor-plan-template.md +0 -0
  105. /package/{core/templates → templates}/technical/tech-design-template.md +0 -0
  106. /package/{core/workflows → workflows}/hotfix-lifecycle.md +0 -0
@@ -25,7 +25,21 @@ command_file_for() {
25
25
  local command="$1"
26
26
  local name
27
27
  name=$(printf '%s' "$command" | sed 's#^/##')
28
- find core/commands -name "$name.md" -type f | head -1
28
+
29
+ if [ -d "commands" ]; then
30
+ find commands -name "$name.md" -type f | head -1
31
+ return 0
32
+ fi
33
+
34
+ if [ -d "skills" ]; then
35
+ find skills -name 'SKILL.md' -type f -print0 |
36
+ while IFS= read -r -d '' file; do
37
+ if awk -v command="/$name" '$1 == "command:" && $2 == command { found=1 } END { exit found ? 0 : 1 }' "$file"; then
38
+ printf '%s\n' "$file"
39
+ break
40
+ fi
41
+ done
42
+ fi
29
43
  }
30
44
 
31
45
  allowed_agents_for_command() {
@@ -64,7 +78,7 @@ main() {
64
78
  echo "========================================================"
65
79
  echo ""
66
80
 
67
- if [ ! -d "project/tickets" ]; then
81
+ if [ ! -d "docs/runtime/project/tickets" ]; then
68
82
  log_info "No tickets directory; skipping"
69
83
  exit 0
70
84
  fi
@@ -114,7 +128,7 @@ main() {
114
128
  errors=$((errors + 1))
115
129
  fi
116
130
  done
117
- done < <(find project/tickets -name '*.json' -type f -print0)
131
+ done < <(find docs/runtime/project/tickets -name '*.json' -type f -print0)
118
132
 
119
133
  echo ""
120
134
  echo "========================================================"
@@ -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="core/config/ticket.schema.json"
38
+ TICKETS_DIR="docs/runtime/project/tickets"
39
+ BUGS_DIR="docs/runtime/project/bugs"
40
+ BACKLOG_FILE="docs/runtime/project/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/project/releases"
448
448
 
449
449
  if [ ! -d "$releases_dir" ]; then
450
450
  return 0
@@ -606,6 +606,6 @@ else
606
606
  echo "════════════════════════════════════════════════════════"
607
607
  echo ""
608
608
  echo "Per RULE 06 (Approval Gates), all tickets must follow state machine."
609
- echo "See: core/rules/06-approval-gates.md"
609
+ echo "See: rules/06-approval-gates.md"
610
610
  exit 1
611
611
  fi
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # core/scripts/workflow.sh
2
+ # scripts/workflow.sh
3
3
  #
4
4
  # Executable handlers for AI Core state workflow commands.
5
5
 
@@ -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/project/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/project/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/project/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/project/audit-log.jsonl"
99
99
  local at by prev payload hash
100
100
  at=$(now_utc)
101
101
  by=$(agent_name)
@@ -159,8 +159,8 @@ transition_ticket() {
159
159
  }]' "$file" | write_json "$file"
160
160
 
161
161
  append_audit "$command" "$ticket_id" "$from_state" "$to_state" "$reason"
162
- bash core/scripts/validate-state.sh "$ticket_id"
163
- bash core/scripts/validate-permissions.sh
162
+ bash scripts/validate-state.sh "$ticket_id"
163
+ bash scripts/validate-permissions.sh
164
164
  log_pass "$ticket_id transitioned $from_state -> $to_state"
165
165
  }
166
166
 
@@ -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/project/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")
@@ -277,7 +277,7 @@ EOF
277
277
  }' > "$file"
278
278
 
279
279
  append_audit "/analyze-requirements" "$ticket_id" "null" "DRAFT" "Created from executable requirement intake"
280
- bash core/scripts/validate-state.sh "$ticket_id"
280
+ bash scripts/validate-state.sh "$ticket_id"
281
281
  log_pass "Created $ticket_id"
282
282
  log_pass "Created $spec_path"
283
283
  }
@@ -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/project/tickets/${ticket_id}.json\`.
353
353
  - Read the linked spec if present.
354
354
  - Inspect affected code before editing.
355
355
 
@@ -407,8 +407,8 @@ EOF
407
407
  }])' "$file" | write_json "$file"
408
408
 
409
409
  append_audit "/write-plan" "$ticket_id" "$status" "$status" "Implementation plan created"
410
- bash core/scripts/validate-state.sh "$ticket_id"
411
- bash core/scripts/validate-permissions.sh
410
+ bash scripts/validate-state.sh "$ticket_id"
411
+ bash scripts/validate-permissions.sh
412
412
  log_pass "Created $plan_path"
413
413
  log_pass "Linked plan from $file"
414
414
  }
@@ -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/project/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/project/releases
482
+ local file="docs/runtime/project/releases/${version}.json"
483
483
  if [ -f "$file" ]; then
484
484
  log_fail "Release record already exists: $file"
485
485
  exit 1
@@ -490,7 +490,7 @@ cmd_release() {
490
490
  jq --arg version "$version" --arg at "$at" --arg by "$by" \
491
491
  '.version = $version
492
492
  | .created_at = $at
493
- | .created_by = $by' core/templates/release/release-record-template.json > "$file"
493
+ | .created_by = $by' templates/release/release-record-template.json > "$file"
494
494
  log_pass "Created release record $file"
495
495
  }
496
496
 
@@ -5,7 +5,7 @@ description: Interpret AI Core slash-command text in Codex. Use when the user ty
5
5
 
6
6
  # AI Core Commands
7
7
 
8
- Codex plugins do not expose `core/commands/*.md` as native slash-command autocomplete. This skill makes AI Core command text executable through normal chat.
8
+ Codex plugins do not expose `commands/*.md` as native slash-command autocomplete. This skill makes AI Core command text executable through normal chat.
9
9
 
10
10
  ## Mandatory Trigger
11
11
 
@@ -34,21 +34,21 @@ next TICKET-XXX
34
34
 
35
35
  1. Log the user request first:
36
36
  ```bash
37
- AI_AGENT=codex bash core/scripts/log-user-request.sh "<user request text>"
37
+ AI_AGENT=codex bash scripts/log-user-request.sh "<user request text>"
38
38
  ```
39
39
 
40
40
  2. Resolve command metadata:
41
- - Search `core/commands/**/<command-name>.md`.
41
+ - Search `commands/**/<command-name>.md`.
42
42
  - Read the command file.
43
43
  - Infer `owner_agent`, `requires_agents`, args, preconditions, postconditions, hard rules, and output format.
44
44
 
45
45
  3. Load the matching agent file when present:
46
- - `core/agents/<owner_agent>.md`
46
+ - `agents/<owner_agent>.md`
47
47
 
48
48
  4. Execute the command in chat-first mode:
49
49
  - Use deterministic scripts only when the command file or workflow requires them.
50
50
  - Do not ask the user to run shell wrappers during normal use.
51
- - Preserve all hard rules from `core/rules/00-global-rules.md`.
51
+ - Preserve all hard rules from `rules/00-global-rules.md`.
52
52
 
53
53
  5. Report:
54
54
  - Command executed
@@ -62,19 +62,19 @@ next TICKET-XXX
62
62
  Command files are stored under:
63
63
 
64
64
  ```text
65
- core/commands/
65
+ commands/
66
66
  ```
67
67
 
68
68
  The command name maps to a Markdown file by removing the leading slash:
69
69
 
70
70
  ```text
71
- /analyze-requirements -> core/commands/**/analyze-requirements.md
72
- /request-log -> core/commands/**/request-log.md
71
+ /analyze-requirements -> commands/**/analyze-requirements.md
72
+ /request-log -> commands/**/request-log.md
73
73
  ```
74
74
 
75
75
  If multiple files match the same command name, stop and ask for clarification.
76
76
 
77
- If no file matches, say the command is not defined and suggest `/request-log`, `/setup-project`, or checking `core/commands/README.md`.
77
+ If no file matches, say the command is not defined and suggest `/request-log`, `/setup-project`, or checking `commands/README.md`.
78
78
 
79
79
  ## Strict Rules
80
80
 
@@ -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/project/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/project/tickets/"
17
17
  preconditions:
18
- - ticket_exists: "project/tickets/${ticket_id}.json"
18
+ - ticket_exists: "docs/runtime/project/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/project/tickets/${TICKET_ID}.json" || ABORT "Ticket not found"
58
58
  ```
59
59
 
60
60
  ### 2. Ticket status valid
@@ -90,8 +90,8 @@ Load `rules/07-definition-of-ready.md`. Verify the ticket passes every item. If
90
90
  │ → Read ticket JSON │
91
91
  │ → Read acceptance criteria │
92
92
  │ → Read related code (if ticket references it) │
93
- │ → Read core/rules/02-code-quality.md │
94
- │ → Read core/rules/05-testing-mandatory.md │
93
+ │ → Read rules/02-code-quality.md │
94
+ │ → Read rules/05-testing-mandatory.md │
95
95
  ├─────────────────────────────────────────────────┤
96
96
  │ STEP 3: Create/checkout branch │
97
97
  │ → Branch name: feature/${TICKET_ID}-${slug} │
@@ -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/project/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/project/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/project/` 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/project/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/project/views/backlog.md`.
30
+ 4. Generate `docs/runtime/project/views/ready.md`.
31
+ 5. Generate `docs/runtime/project/views/blocked.md`.
32
+ 6. Generate `docs/runtime/project/views/by-epic.md`.
33
+ 7. Generate `docs/runtime/project/views/by-sprint.md`.
34
+ 8. Generate `docs/runtime/project/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/project/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/project/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/project/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/project/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/project/`.
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/project/sprints/` or `docs/runtime/project/metrics/` if requested.
37
37
 
38
38
  ## 🔒 Hard Rules
39
39
 
@@ -19,23 +19,23 @@ postconditions:
19
19
 
20
20
  # /sync-platforms
21
21
 
22
- > Exports `core/` source-of-truth specs to Claude Code, Cursor, and Windsurf config files.
22
+ > Exports root-level framework source-of-truth specs to Claude Code, Cursor, and Windsurf config files.
23
23
 
24
24
  ## 🎯 Purpose
25
25
 
26
- Keep all supported AI tools aligned with the same agents, commands, and rules while editing only `core/` as the canonical source.
26
+ Keep all supported AI tools aligned with the same agents, commands, and rules while editing only root-level framework folders as the canonical source.
27
27
 
28
28
  ## 🔄 Execution Flow
29
29
 
30
- 1. Verify `core/scripts/sync-platforms.sh` exists.
31
- 2. Run `bash core/scripts/sync-platforms.sh`.
30
+ 1. Verify `scripts/sync-platforms.sh` exists.
31
+ 2. Run `bash scripts/sync-platforms.sh`.
32
32
  3. Review generated `.claude/`, `.cursor/rules/`, `.windsurfrules`, and `CLAUDE.md`.
33
33
  4. Confirm generated files should be committed.
34
34
  5. Report created/updated files.
35
35
 
36
36
  ## 🔒 Hard Rules
37
37
 
38
- - Source changes MUST be made in `core/`, not generated exports.
38
+ - Source changes MUST be made in root-level framework folders, not generated exports.
39
39
  - MUST review generated files before commit.
40
40
  - MUST rerun after changing agents, commands, or rules.
41
41
  - MUST NOT delete user custom platform config without confirmation.
@@ -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/project/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/project/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
 
@@ -31,7 +31,7 @@ Detect manual edits to `project/audit-log.jsonl`. Executable workflow handlers a
31
31
  /validate-audit-log
32
32
  ```
33
33
 
34
- The AI may call `core/scripts/validate-audit-log.sh` internally and must summarize the result.
34
+ The AI may call `scripts/validate-audit-log.sh` internally and must summarize the result.
35
35
 
36
36
  ## Hard Rules
37
37
 
@@ -29,7 +29,7 @@ postconditions:
29
29
 
30
30
  ## Purpose
31
31
 
32
- Catch missing docs before review or release. In chat, use `/validate-docs`; the AI may call `core/scripts/validate-docs.sh` internally and must summarize the result.
32
+ Catch missing docs before review or release. In chat, use `/validate-docs`; the AI may call `scripts/validate-docs.sh` internally and must summarize the result.
33
33
 
34
34
  ## Execution Flow
35
35
 
@@ -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 `core/commands/**` command ownership metadata.
27
+ Make role boundaries mechanically enforceable by comparing `docs/runtime/project/tickets/*.json` history entries with `commands/**` command ownership metadata.
28
28
 
29
29
  ## Chat Usage
30
30
 
@@ -38,7 +38,7 @@ Make role boundaries mechanically enforceable by comparing `project/tickets/*.js
38
38
  `state_history[].by_agent` must match the command `owner_agent` or `requires_agents`.
39
39
 
40
40
  ### RULE VP-002: Unknown commands fail
41
- Any `by_command` value without a matching `core/commands/**/<name>.md` file blocks validation.
41
+ Any `by_command` value without a matching `commands/**/<name>.md` file blocks validation.
42
42
 
43
43
  ### RULE VP-003: No self-approval
44
44
  If `assignee` is recorded, the same agent cannot approve review-to-QA or DONE transitions.
@@ -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/project/` integrity, backlog references, ticket schema, and allowed state transitions.
23
23
 
24
24
  ## 🎯 Purpose
25
25
 
@@ -28,9 +28,9 @@ Catch corrupted backlog data, missing ticket references, skipped transitions, mi
28
28
  ## 🔄 Execution Flow
29
29
 
30
30
  1. Verify `jq` is installed.
31
- 2. In chat, run `/validate-state` with optional ticket ID. The AI may call `core/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 `core/config/ticket.schema.json` and `core/config/backlog.schema.json`.
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/project/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
 
@@ -62,13 +62,13 @@ Turn free-text requirement (email, Slack, voice note) into a structured ticket w
62
62
 
63
63
  Check before starting. **ABORT** if any check fails.
64
64
 
65
- ### 1. `core/` initialized
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/project/tickets" || ABORT "Run /setup-project first"
68
68
  ```
69
69
 
70
70
  ### 2. BA agent available
71
- Check `core/agents/business-analyst.md` exists and is enabled in config.
71
+ Check `agents/business-analyst.md` exists and is enabled in config.
72
72
 
73
73
  ### 3. Requirement text is not empty
74
74
  If empty or < 10 chars → ABORT and ask for the actual requirement.
@@ -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/project/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: core/config/ticket.schema.json │
147
+ │ Path: docs/runtime/project/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/project/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/project/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/project/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/project/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/project/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/project/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/project/backlog/backlog.json`.
30
+ 2. Load referenced `docs/runtime/project/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/project/backlog/backlog.json`.
40
+ - Ticket detail source of truth is `docs/runtime/project/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/project/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/project/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/project/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/project/metrics/groom-ticket.jsonl`:
424
424
 
425
425
  ```json
426
426
  {