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
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # core/scripts/ai-core.sh
2
+ # scripts/ai-core.sh
3
3
  #
4
4
  # Lightweight command runner for executable AI Core commands.
5
5
  #
@@ -21,7 +21,7 @@ log_warn() { echo -e "${YELLOW}!${NC} $1"; }
21
21
  log_fail() { echo -e "${RED}x${NC} $1"; }
22
22
 
23
23
  AI_CORE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
24
- PROJECT_ROOT="$(dirname "$AI_CORE_DIR")"
24
+ PROJECT_ROOT="$AI_CORE_DIR"
25
25
 
26
26
  usage() {
27
27
  cat <<'EOF'
@@ -32,10 +32,10 @@ Usage:
32
32
  next TICKET-XXX
33
33
 
34
34
  Internal runner form:
35
- bash core/scripts/ai-core.sh [--agent role] run /command [args...]
36
- bash core/scripts/ai-core.sh [--agent role] guide /command [args...]
37
- bash core/scripts/ai-core.sh [--agent role] next TICKET-XXX
38
- bash core/scripts/ai-core.sh list
35
+ bash scripts/ai-core.sh [--agent role] run /command [args...]
36
+ bash scripts/ai-core.sh [--agent role] guide /command [args...]
37
+ bash scripts/ai-core.sh [--agent role] next TICKET-XXX
38
+ bash scripts/ai-core.sh list
39
39
 
40
40
  Environment:
41
41
  AI_AGENT=<agent-role> Optional internal override. Runner auto-selects owner_agent by default.
@@ -60,7 +60,21 @@ command_file_for() {
60
60
  local command="$1"
61
61
  local name
62
62
  name=$(command_name "$command")
63
- find "$AI_CORE_DIR/commands" -name "$name.md" -type f | head -1
63
+
64
+ if [ -d "$AI_CORE_DIR/commands" ]; then
65
+ find "$AI_CORE_DIR/commands" -name "$name.md" -type f | head -1
66
+ return 0
67
+ fi
68
+
69
+ if [ -d "$AI_CORE_DIR/skills" ]; then
70
+ find "$AI_CORE_DIR/skills" -name 'SKILL.md' -type f -print0 |
71
+ while IFS= read -r -d '' file; do
72
+ if awk -v command="/$name" '$1 == "command:" && $2 == command { found=1 } END { exit found ? 0 : 1 }' "$file"; then
73
+ printf '%s\n' "$file"
74
+ break
75
+ fi
76
+ done
77
+ fi
64
78
  }
65
79
 
66
80
  allowed_agents_for_command() {
@@ -174,12 +188,12 @@ run_command() {
174
188
  }
175
189
 
176
190
  ticket_file() {
177
- printf '%s/project/tickets/%s.json' "$PROJECT_ROOT" "$1"
191
+ printf '%s/docs/runtime/project/tickets/%s.json' "$PROJECT_ROOT" "$1"
178
192
  }
179
193
 
180
194
  latest_audit_field() {
181
195
  local field="$1"
182
- local audit_file="$PROJECT_ROOT/project/audit-log.jsonl"
196
+ local audit_file="$PROJECT_ROOT/docs/runtime/project/audit-log.jsonl"
183
197
  if [ ! -s "$audit_file" ]; then
184
198
  printf ''
185
199
  return 0
@@ -323,20 +337,20 @@ guide_command() {
323
337
  echo ""
324
338
  echo "Updated:"
325
339
  if [ -n "$ticket_id" ] && [ -f "$(ticket_file "$ticket_id")" ]; then
326
- echo "- project/tickets/$ticket_id.json"
340
+ echo "- docs/runtime/project/tickets/$ticket_id.json"
327
341
  fi
328
- if [ "$before_audit_hash" != "$after_audit_hash" ] && [ -s "project/audit-log.jsonl" ]; then
329
- echo "- project/audit-log.jsonl"
342
+ if [ "$before_audit_hash" != "$after_audit_hash" ] && [ -s "docs/runtime/project/audit-log.jsonl" ]; then
343
+ echo "- docs/runtime/project/audit-log.jsonl"
330
344
  fi
331
345
  case "$(command_name "$command")" in
332
346
  generate-views)
333
- echo "- project/views/*.md"
347
+ echo "- docs/runtime/project/views/*.md"
334
348
  ;;
335
349
  smoke-test)
336
- echo "- project/test-runs/${ticket_id}-*.md"
350
+ echo "- docs/runtime/project/test-runs/${ticket_id}-*.md"
337
351
  ;;
338
352
  release)
339
- echo "- project/releases/*.json"
353
+ echo "- docs/runtime/project/releases/*.json"
340
354
  ;;
341
355
  esac
342
356
 
@@ -388,12 +402,20 @@ next_command() {
388
402
  }
389
403
 
390
404
  list_commands() {
391
- find "$AI_CORE_DIR/commands" -name '*.md' -type f |
392
- grep -v '/README.md$' |
393
- sed "s#^$AI_CORE_DIR/commands/##" |
394
- sed 's#/# #g; s#\.md$##' |
395
- awk '{ print "/" $NF }' |
396
- sort
405
+ {
406
+ if [ -d "$AI_CORE_DIR/commands" ]; then
407
+ find "$AI_CORE_DIR/commands" -name '*.md' -type f |
408
+ grep -v '/README.md$' |
409
+ sed "s#^$AI_CORE_DIR/commands/##" |
410
+ sed 's#/# #g; s#\.md$##' |
411
+ awk '{ print "/" $NF }'
412
+ fi
413
+
414
+ if [ -d "$AI_CORE_DIR/skills" ]; then
415
+ find "$AI_CORE_DIR/skills" -name 'SKILL.md' -type f -print0 |
416
+ xargs -0 awk '$1 == "command:" { print $2 }'
417
+ fi
418
+ } | sort -u
397
419
  }
398
420
 
399
421
  main() {
@@ -3,8 +3,8 @@
3
3
  #
4
4
  # Generates human-readable views from project without changing canonical state.
5
5
  # Canonical sources:
6
- # - project/backlog/backlog.json for backlog order
7
- # - project/tickets/*.json for ticket details and state history
6
+ # - docs/runtime/project/backlog/backlog.json for backlog order
7
+ # - docs/runtime/project/tickets/*.json for ticket details and state history
8
8
 
9
9
  set -euo pipefail
10
10
 
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env bash
2
- # core/scripts/install-codex-prompts.sh
2
+ # scripts/install-codex-prompts.sh
3
3
  #
4
4
  # Installs AI Core command wrappers as Codex custom slash prompts.
5
5
  #
6
6
  # Usage:
7
- # bash core/scripts/install-codex-prompts.sh
8
- # CODEX_PROMPTS_DIR=~/.codex/prompts bash core/scripts/install-codex-prompts.sh
7
+ # bash scripts/install-codex-prompts.sh
8
+ # CODEX_PROMPTS_DIR=~/.codex/prompts bash scripts/install-codex-prompts.sh
9
9
 
10
10
  set -euo pipefail
11
11
 
@@ -50,9 +50,9 @@ write_prompt() {
50
50
  prompt_file="$PROMPTS_DIR/${command#/}.md"
51
51
  rel_command_file="${command_file#./}"
52
52
  fallback_command_file="${root}/${rel_command_file}"
53
- fallback_rules_file="${root}/core/rules/00-global-rules.md"
54
- fallback_agents_dir="${root}/core/agents"
55
- fallback_log_script="${root}/core/scripts/log-user-request.sh"
53
+ fallback_rules_file="${root}/rules/00-global-rules.md"
54
+ fallback_agents_dir="${root}/agents"
55
+ fallback_log_script="${root}/scripts/log-user-request.sh"
56
56
  description="${display_name:-AI Core command ${command}}"
57
57
 
58
58
  cat > "$prompt_file" <<EOF
@@ -72,8 +72,8 @@ Mandatory steps:
72
72
 
73
73
  1. Log this user request first. Prefer the project-local script when it exists; otherwise use the installed AI Core fallback:
74
74
  \`\`\`bash
75
- if [ -f core/scripts/log-user-request.sh ]; then
76
- AI_AGENT=codex bash core/scripts/log-user-request.sh "${command} \$ARGUMENTS"
75
+ if [ -f scripts/log-user-request.sh ]; then
76
+ AI_AGENT=codex bash scripts/log-user-request.sh "${command} \$ARGUMENTS"
77
77
  else
78
78
  AI_AGENT=codex bash ${fallback_log_script} "${command} \$ARGUMENTS"
79
79
  fi
@@ -87,13 +87,13 @@ Mandatory steps:
87
87
 
88
88
  3. Read and follow the global rules. Prefer the project-local path when it exists; otherwise use the installed AI Core fallback:
89
89
  \`\`\`text
90
- core/rules/00-global-rules.md
90
+ rules/00-global-rules.md
91
91
  ${fallback_rules_file}
92
92
  \`\`\`
93
93
 
94
94
  4. Infer the owner agent from the command frontmatter. If an agent file exists, read it before acting. Prefer the project-local path, then the installed fallback:
95
95
  \`\`\`text
96
- core/agents/<owner_agent>.md
96
+ agents/<owner_agent>.md
97
97
  ${fallback_agents_dir}/<owner_agent>.md
98
98
  \`\`\`
99
99
 
@@ -110,16 +110,24 @@ main() {
110
110
  root="$(repo_root)"
111
111
  cd "$root"
112
112
 
113
- if [ ! -d "core/commands" ]; then
114
- log_fail "Missing core/commands. Run from AI Core repo root."
113
+ if [ ! -d "commands" ] && [ ! -d "skills" ]; then
114
+ log_fail "Missing commands or skills. Run from AI Core repo root."
115
115
  exit 1
116
116
  fi
117
117
 
118
118
  mkdir -p "$PROMPTS_DIR"
119
119
 
120
- while IFS= read -r command_file; do
121
- write_prompt "$command_file" "$root"
122
- done < <(find core/commands -name '*.md' -type f | sort)
120
+ if [ -d "commands" ]; then
121
+ while IFS= read -r command_file; do
122
+ write_prompt "$command_file" "$root"
123
+ done < <(find commands -name '*.md' -type f | sort)
124
+ fi
125
+
126
+ if [ -d "skills" ]; then
127
+ while IFS= read -r command_file; do
128
+ write_prompt "$command_file" "$root"
129
+ done < <(find skills -name 'SKILL.md' -type f | sort)
130
+ fi
123
131
 
124
132
  log_pass "AI Core Codex prompts installed in ${PROMPTS_DIR}"
125
133
  }
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env bash
2
- # core/scripts/log-user-request.sh
2
+ # scripts/log-user-request.sh
3
3
  #
4
- # Append a sanitized user request record to project/user-requests.jsonl.
4
+ # Append a sanitized user request record to docs/runtime/project/user-requests.jsonl.
5
5
  #
6
6
  # Usage:
7
- # bash core/scripts/log-user-request.sh "user request text"
7
+ # bash scripts/log-user-request.sh "user request text"
8
8
 
9
9
  set -euo pipefail
10
10
 
11
11
  REQUEST_TEXT="${*:-}"
12
- LOG_FILE="${AI_CORE_USER_REQUEST_LOG:-project/user-requests.jsonl}"
12
+ LOG_FILE="${AI_CORE_USER_REQUEST_LOG:-docs/runtime/project/user-requests.jsonl}"
13
13
 
14
14
  RED='\033[0;31m'
15
15
  GREEN='\033[0;32m'
@@ -19,7 +19,7 @@ log_pass() { echo -e "${GREEN}+${NC} $1"; }
19
19
  log_fail() { echo -e "${RED}x${NC} $1"; }
20
20
 
21
21
  if [ -z "$REQUEST_TEXT" ]; then
22
- log_fail "Usage: bash core/scripts/log-user-request.sh \"user request text\""
22
+ log_fail "Usage: bash scripts/log-user-request.sh \"user request text\""
23
23
  exit 2
24
24
  fi
25
25
 
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env bash
2
- # core/scripts/setup-project.sh
2
+ # scripts/setup-project.sh
3
3
  #
4
- # Makes a copied core/ framework operational in a project.
4
+ # Makes copied root-level framework folders operational in a project.
5
5
  #
6
6
  # Usage:
7
- # bash core/scripts/setup-project.sh
7
+ # bash scripts/setup-project.sh
8
8
 
9
9
  set -euo pipefail
10
10
 
@@ -33,7 +33,7 @@ copy_if_missing() {
33
33
  }
34
34
 
35
35
  write_backlog_if_missing() {
36
- local path="project/backlog/backlog.json"
36
+ local path="docs/runtime/project/backlog/backlog.json"
37
37
 
38
38
  if [ -f "$path" ]; then
39
39
  log_pass "Preserved existing $path"
@@ -48,7 +48,7 @@ install_framework_scripts() {
48
48
  mkdir -p scripts
49
49
 
50
50
  for script in ai-core.sh workflow.sh validate-state.sh validate-docs.sh validate-permissions.sh validate-audit-log.sh generate-views.sh install-codex-prompts.sh log-user-request.sh setup-project.sh; do
51
- local src="core/scripts/$script"
51
+ local src="scripts/$script"
52
52
  local dst="scripts/$script"
53
53
 
54
54
  if [ ! -f "$src" ]; then
@@ -68,7 +68,7 @@ install_framework_scripts() {
68
68
  }
69
69
 
70
70
  install_governance_workflow() {
71
- local src="core/templates/ci/ai-core-governance.yml"
71
+ local src="templates/ci/ai-core-governance.yml"
72
72
  local dst=".github/workflows/ai-core-governance.yml"
73
73
 
74
74
  if [ ! -f "$src" ]; then
@@ -103,35 +103,30 @@ main() {
103
103
  repo_root=$(git rev-parse --show-toplevel)
104
104
  cd "$repo_root"
105
105
 
106
- if [ ! -d "core" ]; then
107
- log_fail "Missing core directory"
106
+ if [ ! -f "templates/project/project-config.yaml" ] ||
107
+ [ ! -f "templates/project/project-structure.yaml" ]; then
108
+ log_fail "Missing framework project templates"
108
109
  exit 1
109
110
  fi
110
111
 
111
- if [ ! -f "core/templates/project/project-config.yaml" ] ||
112
- [ ! -f "core/templates/project/project-structure.yaml" ]; then
113
- log_fail "Missing core project templates"
114
- exit 1
115
- fi
116
-
117
- mkdir -p config
118
- copy_if_missing "core/templates/project/project-config.yaml" "config/project-config.yaml"
119
- copy_if_missing "core/templates/project/project-structure.yaml" "config/project-structure.yaml"
120
- copy_if_missing "core/templates/project/docs-policy.json" "config/docs-policy.json"
121
- copy_if_missing "core/templates/project/CODEOWNERS" "CODEOWNERS"
112
+ mkdir -p docs/config
113
+ copy_if_missing "templates/project/project-config.yaml" "docs/config/project-config.yaml"
114
+ copy_if_missing "templates/project/project-structure.yaml" "docs/config/project-structure.yaml"
115
+ copy_if_missing "templates/project/docs-policy.json" "docs/config/docs-policy.json"
116
+ copy_if_missing "templates/project/CODEOWNERS" "CODEOWNERS"
122
117
 
123
118
  for dir in \
124
- project/tickets \
125
- project/backlog \
126
- project/bugs \
127
- project/sprints \
128
- project/releases \
129
- project/metrics \
130
- project/views \
131
- project/test-runs \
132
- project/verifications \
133
- project/incidents \
134
- project/prs \
119
+ docs/runtime/project/tickets \
120
+ docs/runtime/project/backlog \
121
+ docs/runtime/project/bugs \
122
+ docs/runtime/project/sprints \
123
+ docs/runtime/project/releases \
124
+ docs/runtime/project/metrics \
125
+ docs/runtime/project/views \
126
+ docs/runtime/project/test-runs \
127
+ docs/runtime/project/verifications \
128
+ docs/runtime/project/incidents \
129
+ docs/runtime/project/prs \
135
130
  docs/project/product \
136
131
  docs/project/planning \
137
132
  docs/project/specs \
@@ -152,21 +147,21 @@ main() {
152
147
  log_pass "Created required state and docs directories"
153
148
 
154
149
  write_backlog_if_missing
155
- touch project/audit-log.jsonl
156
- touch project/user-requests.jsonl
150
+ touch docs/runtime/project/audit-log.jsonl
151
+ touch docs/runtime/project/user-requests.jsonl
157
152
  install_framework_scripts
158
153
  install_governance_workflow
159
154
 
160
- if [ -f "core/scripts/sync-platforms.sh" ]; then
161
- bash core/scripts/sync-platforms.sh
155
+ if [ -f "scripts/sync-platforms.sh" ]; then
156
+ bash scripts/sync-platforms.sh
162
157
  else
163
- log_warn "Missing core/scripts/sync-platforms.sh; platform configs not synced"
158
+ log_warn "Missing scripts/sync-platforms.sh; platform configs not synced"
164
159
  fi
165
160
 
166
- if [ -f "core/scripts/validate-state.sh" ]; then
167
- bash core/scripts/validate-state.sh
161
+ if [ -f "scripts/validate-state.sh" ]; then
162
+ bash scripts/validate-state.sh
168
163
  else
169
- log_warn "Missing core/scripts/validate-state.sh; skipped state validation"
164
+ log_warn "Missing scripts/validate-state.sh; skipped state validation"
170
165
  fi
171
166
 
172
167
  if [ -d ".githooks" ] && [ -f "scripts/install-hooks.sh" ]; then
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env bash
2
2
  # ============================================================================
3
3
  # sync-platforms.sh
4
- # Sync core/ content sang Claude Code, Cursor, Windsurf format.
5
- # Usage: bash core/scripts/sync-platforms.sh
4
+ # Sync root-level framework folders to Claude Code, Cursor, and Windsurf format.
5
+ # Usage: bash scripts/sync-platforms.sh
6
6
  # ============================================================================
7
7
 
8
8
  set -euo pipefail
9
9
 
10
10
  AI_CORE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
11
- PROJECT_ROOT="$(dirname "$AI_CORE_DIR")"
11
+ PROJECT_ROOT="$AI_CORE_DIR"
12
12
 
13
- echo "🔄 Syncing core/ to AI platforms..."
13
+ echo "🔄 Syncing root-level framework folders to AI platforms..."
14
14
  echo " Source: $AI_CORE_DIR"
15
15
  echo " Target: $PROJECT_ROOT"
16
16
 
@@ -41,14 +41,16 @@ sync_claude_code() {
41
41
  done
42
42
 
43
43
  # --- Sync commands (flatten from subdirs) ---
44
- find "$AI_CORE_DIR/commands" -name "*.md" -type f | while read -r cmd_file; do
45
- local basename
46
- basename=$(basename "$cmd_file")
47
- # Skip README files
48
- [[ "$basename" == "README.md" ]] && continue
49
- cp "$cmd_file" "$claude_dir/commands/$basename"
50
- echo " command: $basename"
51
- done
44
+ if [ -d "$AI_CORE_DIR/commands" ]; then
45
+ find "$AI_CORE_DIR/commands" -name "*.md" -type f | while read -r cmd_file; do
46
+ local basename
47
+ basename=$(basename "$cmd_file")
48
+ # Skip README files
49
+ [[ "$basename" == "README.md" ]] && continue
50
+ cp "$cmd_file" "$claude_dir/commands/$basename"
51
+ echo " ✓ command: $basename"
52
+ done
53
+ fi
52
54
 
53
55
  # --- Sync skills ---
54
56
  for skill_file in "$AI_CORE_DIR"/skills/*/SKILL.md; do
@@ -64,26 +66,26 @@ sync_claude_code() {
64
66
  cat > "$PROJECT_ROOT/CLAUDE.md" <<'EOF'
65
67
  # Project Instructions for Claude Code
66
68
 
67
- This project uses `core/` framework for structured Agile/Scrum development.
69
+ This project uses root-level framework folders for structured Agile/Scrum development.
68
70
 
69
71
  ## 🚨 CRITICAL: Read these first
70
72
 
71
- 1. **Rules**: See `core/rules/00-global-rules.md` — **MUST follow**
72
- 2. **Agents**: See `core/agents/` — pick correct agent for task
73
- 3. **Skills**: See `core/skills/using-ai-core/SKILL.md` — chat-first bootstrap
74
- 4. **Commands**: See `core/commands/` — use slash commands for workflows
75
- 5. **Workflows**: See `core/workflows/feature-lifecycle.md`
73
+ 1. **Rules**: See `rules/00-global-rules.md` — **MUST follow**
74
+ 2. **Agents**: See `agents/` — pick correct agent for task
75
+ 3. **Skills**: See `skills/using-ai-core/SKILL.md` — chat-first bootstrap
76
+ 4. **Commands**: See `commands/` — use slash commands for workflows
77
+ 5. **Workflows**: See `workflows/feature-lifecycle.md`
76
78
 
77
79
  ## Quick reference
78
80
 
79
81
  ### User interface
80
82
  The normal user interface is the AI chat window. When the user types `/command ...`,
81
83
  `guide /command ...`, or `next TICKET-XXX`, interpret it as an AI Core workflow
82
- request. Do not ask the user to run `bash core/scripts/ai-core.sh` or set
84
+ request. Do not ask the user to run `bash scripts/ai-core.sh` or set
83
85
  `AI_AGENT`; use those executable scripts internally only when helpful.
84
86
 
85
87
  ### Before any code change
86
- - [ ] There's an active ticket in `project/tickets/` with `status: IN_PROGRESS`
88
+ - [ ] There's an active ticket in `docs/runtime/project/tickets/` with `status: IN_PROGRESS`
87
89
  - [ ] You're on the correct feature branch
88
90
  - [ ] You're playing the correct agent role inferred from command metadata
89
91
 
@@ -100,7 +102,7 @@ DRAFT → GROOMED → READY → IN_PROGRESS → IN_REVIEW → QA → DONE
100
102
 
101
103
  ## ❌ Absolute prohibitions
102
104
 
103
- See `core/rules/00-global-rules.md` → G-011
105
+ See `rules/00-global-rules.md` → G-011
104
106
 
105
107
  ## 🎭 Your current role
106
108
 
@@ -115,10 +117,10 @@ Read the agent file to understand your boundaries.
115
117
 
116
118
  ## Skill bootstrap
117
119
 
118
- At session start or before any workflow request, read `core/skills/using-ai-core/SKILL.md`.
119
- For feature discovery use `core/skills/brainstorming/SKILL.md`.
120
- For implementation plans use `core/skills/writing-implementation-plan/SKILL.md`.
121
- For completion claims use `core/skills/verification-before-done/SKILL.md`.
120
+ At session start or before any workflow request, read `skills/using-ai-core/SKILL.md`.
121
+ For feature discovery use `skills/brainstorming/SKILL.md`.
122
+ For implementation plans use `skills/writing-implementation-plan/SKILL.md`.
123
+ For completion claims use `skills/verification-before-done/SKILL.md`.
122
124
  EOF
123
125
  echo " ✓ CLAUDE.md"
124
126
 
@@ -149,16 +151,16 @@ alwaysApply: true
149
151
 
150
152
  # Project Rules
151
153
 
152
- This project uses `core/` framework. Read these files for full context:
154
+ This project uses root-level framework folders. Read these files for full context:
153
155
 
154
- - `core/rules/00-global-rules.md` — Hard rules (MUST follow)
155
- - `core/agents/` — Agent personas
156
- - `core/commands/` — Workflow commands
157
- - `core/workflows/feature-lifecycle.md` — End-to-end process
156
+ - `rules/00-global-rules.md` — Hard rules (MUST follow)
157
+ - `agents/` — Agent personas
158
+ - `commands/` — Workflow commands
159
+ - `workflows/feature-lifecycle.md` — End-to-end process
158
160
 
159
161
  ## Top 10 Rules (summary)
160
162
 
161
- 1. **No code without ticket** (G-001): Active ticket in `project/tickets/` with status IN_PROGRESS
163
+ 1. **No code without ticket** (G-001): Active ticket in `docs/runtime/project/tickets/` with status IN_PROGRESS
162
164
  2. **State machine**: DRAFT → GROOMED → READY → IN_PROGRESS → IN_REVIEW → QA → DONE. No skipping.
163
165
  3. **TDD mandatory**: Tests before code
164
166
  4. **Coverage ≥ 80%** on diff
@@ -167,7 +169,7 @@ This project uses `core/` framework. Read these files for full context:
167
169
  7. **No direct push** to main/develop
168
170
  8. **No secrets** committed
169
171
  9. **No self-approval** of PRs
170
- 10. **Follow agent boundaries** in `core/agents/<agent>.md`
172
+ 10. **Follow agent boundaries** in `agents/<agent>.md`
171
173
 
172
174
  ## Before any task
173
175
 
@@ -188,7 +190,7 @@ Users should type workflow commands in chat, for example:
188
190
  - `guide /mark-ready TICKET-001`
189
191
  - `next TICKET-001`
190
192
 
191
- Do not require users to type shell commands such as `bash core/scripts/ai-core.sh`
193
+ Do not require users to type shell commands such as `bash scripts/ai-core.sh`
192
194
  or environment variables such as `AI_AGENT=...`. Shell scripts are internal tools
193
195
  for deterministic execution, validation, and CI.
194
196
  EOF
@@ -264,15 +266,15 @@ sync_windsurf() {
264
266
  cat > "$windsurf_file" <<'EOF'
265
267
  # Windsurf Project Rules
266
268
 
267
- This project uses core/ framework for Agile/Scrum enforcement.
269
+ This project uses root-level framework folders for Agile/Scrum enforcement.
268
270
 
269
271
  ## Required Reading
270
272
 
271
273
  Before ANY task, read:
272
- 1. `core/rules/00-global-rules.md` — hard rules
273
- 2. `core/agents/` — role definitions
274
- 3. `core/skills/using-ai-core/SKILL.md` — chat-first bootstrap
275
- 4. `core/workflows/feature-lifecycle.md` — process
274
+ 1. `rules/00-global-rules.md` — hard rules
275
+ 2. `agents/` — role definitions
276
+ 3. `skills/using-ai-core/SKILL.md` — chat-first bootstrap
277
+ 4. `workflows/feature-lifecycle.md` — process
276
278
 
277
279
  ## Non-negotiable rules
278
280
 
@@ -284,12 +286,14 @@ EOF
284
286
  echo "" >> "$windsurf_file"
285
287
  echo "## Available commands" >> "$windsurf_file"
286
288
  echo "" >> "$windsurf_file"
287
- find "$AI_CORE_DIR/commands" -name "*.md" -type f | while read -r cmd_file; do
288
- local basename
289
- basename=$(basename "$cmd_file" .md)
290
- [[ "$basename" == "README" ]] && continue
291
- echo "- /$basename" >> "$windsurf_file"
292
- done
289
+ if [ -d "$AI_CORE_DIR/commands" ]; then
290
+ find "$AI_CORE_DIR/commands" -name "*.md" -type f | while read -r cmd_file; do
291
+ local basename
292
+ basename=$(basename "$cmd_file" .md)
293
+ [[ "$basename" == "README" ]] && continue
294
+ echo "- /$basename" >> "$windsurf_file"
295
+ done
296
+ fi
293
297
 
294
298
  echo "" >> "$windsurf_file"
295
299
  echo "## Available skills" >> "$windsurf_file"
@@ -297,7 +301,7 @@ EOF
297
301
  find "$AI_CORE_DIR/skills" -name "SKILL.md" -type f | while read -r skill_file; do
298
302
  local skill_name
299
303
  skill_name=$(basename "$(dirname "$skill_file")")
300
- echo "- $skill_name: core/skills/$skill_name/SKILL.md" >> "$windsurf_file"
304
+ echo "- $skill_name: skills/$skill_name/SKILL.md" >> "$windsurf_file"
301
305
  done
302
306
 
303
307
  echo " ✓ .windsurfrules generated"
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env bash
2
- # core/scripts/validate-audit-log.sh
2
+ # scripts/validate-audit-log.sh
3
3
  #
4
4
  # Validates append-only audit log hash chaining.
5
5
 
6
6
  set -euo pipefail
7
7
 
8
- AUDIT_FILE="project/audit-log.jsonl"
8
+ AUDIT_FILE="docs/runtime/project/audit-log.jsonl"
9
9
  RED='\033[0;31m'
10
10
  GREEN='\033[0;32m'
11
11
  BLUE='\033[0;34m'
@@ -102,7 +102,7 @@ has_changed_path() {
102
102
  }
103
103
 
104
104
  load_docs_policy() {
105
- DOCS_POLICY_FILE="config/docs-policy.json"
105
+ DOCS_POLICY_FILE="docs/config/docs-policy.json"
106
106
 
107
107
  if [ -f "$DOCS_POLICY_FILE" ]; then
108
108
  local extends
@@ -116,7 +116,7 @@ load_docs_policy() {
116
116
  return 0
117
117
  fi
118
118
 
119
- DOCS_POLICY_FILE="core/config/docs-policy.default.json"
119
+ DOCS_POLICY_FILE="docs/config/docs-policy.default.json"
120
120
  DOCS_POLICY_JSON=$(jq '.' "$DOCS_POLICY_FILE")
121
121
  }
122
122
 
@@ -162,7 +162,7 @@ current_ticket_id() {
162
162
  validate_ticket_doc_paths() {
163
163
  local errors=0
164
164
 
165
- if [ ! -d "project/tickets" ]; then
165
+ if [ ! -d "docs/runtime/project/tickets" ]; then
166
166
  return 0
167
167
  fi
168
168
 
@@ -210,7 +210,7 @@ validate_ticket_doc_paths() {
210
210
  errors=$((errors + 1))
211
211
  fi
212
212
  fi
213
- done < <(find project/tickets -name '*.json' -type f -print0)
213
+ done < <(find docs/runtime/project/tickets -name '*.json' -type f -print0)
214
214
 
215
215
  return "$errors"
216
216
  }
@@ -218,7 +218,7 @@ validate_ticket_doc_paths() {
218
218
  validate_done_tickets() {
219
219
  local errors=0
220
220
 
221
- if [ ! -d "project/tickets" ]; then
221
+ if [ ! -d "docs/runtime/project/tickets" ]; then
222
222
  return 0
223
223
  fi
224
224
 
@@ -250,7 +250,7 @@ validate_done_tickets() {
250
250
  errors=$((errors + 1))
251
251
  fi
252
252
  fi
253
- done < <(find project/tickets -name '*.json' -type f -print0)
253
+ done < <(find docs/runtime/project/tickets -name '*.json' -type f -print0)
254
254
 
255
255
  return "$errors"
256
256
  }