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
@@ -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/project/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/project/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`.
@@ -57,7 +57,7 @@ If any precondition fails, ABORT and keep the ticket in `GROOMED` or move to `BL
57
57
 
58
58
  ## 🔄 Execution Flow
59
59
 
60
- 1. Load ticket JSON and `core/rules/07-definition-of-ready.md`.
60
+ 1. Load ticket JSON and `rules/07-definition-of-ready.md`.
61
61
  2. Validate INVEST criteria.
62
62
  3. Validate acceptance criteria are testable and include happy path, edge case, and error case.
63
63
  4. Validate estimation evidence from grooming.
@@ -28,24 +28,24 @@ postconditions:
28
28
 
29
29
  ## 🎯 Purpose
30
30
 
31
- Plan large refactors without putting project-specific design into `core/`.
31
+ Plan large refactors without putting project-specific design into framework source folders.
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
- 5. Create `docs/runtime/refactor/<slug>-refactor-plan.md` from `core/templates/technical/refactor-plan-template.md`.
40
- 6. Propose ticket breakdown for `project/tickets/`.
41
- 7. Propose backlog entries for `project/backlog/backlog.json`.
39
+ 5. Create `docs/runtime/refactor/<slug>-refactor-plan.md` from `templates/technical/refactor-plan-template.md`.
40
+ 6. Propose ticket breakdown for `docs/runtime/project/tickets/`.
41
+ 7. Propose backlog entries for `docs/runtime/project/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
 
45
45
  ## 🔒 Hard Rules
46
46
 
47
47
  - MUST NOT modify production code during planning.
48
- - MUST keep plan in `docs/runtime/refactor/`, not `core/`.
48
+ - MUST keep plan in `docs/runtime/refactor/`, not framework source folders.
49
49
  - MUST create characterization test ticket before risky behavior-preserving refactors.
50
50
  - MUST require ADR for architectural decisions.
51
51
  - MUST split work into tickets of 8 points or less.
@@ -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/project/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/project/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/project/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/project/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/project/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/project/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/project/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
@@ -0,0 +1,113 @@
1
+ ---
2
+ name: project-setup-project
3
+ description: Use when the user asks to run /setup-project, initialize AI Core project state, review project config, sync platform configs, or prepare directories and logs for AI Core.
4
+ command: /setup-project
5
+ display_name: "Setup Project"
6
+ version: 1.0.0
7
+ status: READY
8
+ owner_agent: scrum-master
9
+ requires_agents:
10
+ - scrum-master
11
+ consults_agents:
12
+ - tech-lead
13
+ model_preference: sonnet
14
+ args: []
15
+ preconditions:
16
+ - ai_core_exists: true
17
+ - git_repo_exists: true
18
+ postconditions:
19
+ - project_config_reviewed: true
20
+ - platform_configs_synced: true
21
+ - state_directories_created: true
22
+ - user_request_log_created: true
23
+ - hooks_install_recommended: true
24
+ ---
25
+
26
+ # /setup-project
27
+
28
+ > Initialize AI Core framework inside a project and prepare it for daily use.
29
+
30
+ ## 🎯 Purpose
31
+
32
+ Make copied root-level framework folders operational in a real repository. This command checks repo structure, updates configuration, creates state directories, syncs platform instructions, and explains next steps.
33
+
34
+ ## 🚦 Trigger
35
+
36
+ Manual after copying root-level framework folders into a project:
37
+
38
+ - `/setup-project`
39
+ - `bash scripts/setup-project.sh`
40
+
41
+ ## 📋 Preconditions, STRICT
42
+
43
+ 1. Repository has `.git/`.
44
+ 2. `README.md` exists.
45
+ 3. `templates/project/project-config.yaml` exists.
46
+ 4. `templates/project/project-structure.yaml` exists.
47
+ 5. User has permission to create `docs/config/`, `docs/runtime/project/`, `docs/project/`, `docs/runtime/`, `.claude/`, `.cursor/`, `.windsurfrules`, and `CLAUDE.md`.
48
+
49
+ ## 🔄 Execution Flow
50
+
51
+ 1. Confirm repo root and framework folder locations.
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
+ 5. Ask for missing project fields or infer with `/detect-stack`.
56
+ 6. Create required `docs/runtime/project/` directories: tickets, backlog, bugs, sprints, releases, metrics, views, test-runs, verifications, incidents, prs.
57
+ 7. Create required docs namespaces: `docs/project/` for project/product requirements and `docs/runtime/` for operational AI Core documentation.
58
+ 8. Create `docs/runtime/project/backlog/backlog.json` and `docs/runtime/project/user-requests.jsonl` if missing.
59
+ 9. Run `bash scripts/setup-project.sh` when shell access is available, or perform steps 2-8 manually.
60
+ 10. Confirm `scripts/` contains the portable enforcement scripts.
61
+ 11. Install portable `.github/workflows/ai-core-governance.yml` if missing.
62
+ 12. Run `/sync-platforms` or `bash scripts/sync-platforms.sh`.
63
+ 13. Recommend installing hooks with `bash scripts/install-hooks.sh` if `.githooks/` exists.
64
+ 14. Run `/validate-state`.
65
+ 15. Output project readiness summary and first workflow suggestion.
66
+
67
+ ## 🔒 Hard Rules
68
+
69
+ ### RULE SP-001: Do not overwrite user config blindly
70
+ If config values already exist, preserve them unless user confirms change.
71
+
72
+ ### RULE SP-002: Keep root-level framework folders canonical
73
+ Generated `.claude/`, `.cursor/`, and `.windsurfrules` files are exports. Source changes belong in root-level framework folders.
74
+
75
+ ### RULE SP-003: No product code changes
76
+ Setup modifies AI runtime/config files only: `docs/config/`, `docs/runtime/project/`, `docs/project/`, `docs/runtime/`, generated platform config, and optional docs scaffolding. It MUST NOT modify production source code.
77
+
78
+ ### RULE SP-004: State directories required
79
+ A project is not ready until `docs/runtime/project/` contains directories for tickets, backlog, bugs, sprints, releases, metrics, views, test-runs, verifications, incidents, and prs.
80
+
81
+ ### RULE SP-004a: User request log required
82
+ A project is not ready until `docs/runtime/project/user-requests.jsonl` exists. Every AI-handled user request **MUST** be logged there before substantive work begins.
83
+
84
+ ### RULE SP-005: Framework folders remain framework-only
85
+ Project-specific state and config MUST NOT be written under framework source folders. Use `docs/runtime/project/` and `docs/config/`.
86
+
87
+ ### RULE SP-006: `scripts/` is canonical
88
+ Portable enforcement scripts live under `scripts/`.
89
+
90
+ ## 📤 Outputs
91
+
92
+ Success:
93
+
94
+ - Config status
95
+ - User request log status
96
+ - Detected stack summary
97
+ - Generated platform files
98
+ - Hook install recommendation
99
+ - Next command: `/analyze-requirements` or `/discover-codebase`
100
+
101
+ Failure:
102
+
103
+ - Missing root-level framework folders
104
+ - Not a Git repository
105
+ - Sync failure
106
+ - Invalid config
107
+
108
+ ## 🔗 Related Commands
109
+
110
+ - `/detect-stack`
111
+ - `/discover-codebase`
112
+ - `/sync-platforms`
113
+ - `/validate-state`
@@ -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/project/bugs/*.json`.
28
28
  2. Group bugs by severity and status.
29
29
  3. Identify stale bugs and missing owners.
30
30
  4. Identify release-blocking bugs.
@@ -66,7 +66,7 @@ If not → prompt interactive collection.
66
66
 
67
67
  ### 2. Not duplicate
68
68
  Check existing open bugs for similar:
69
- - Grep bug titles in `project/bugs/*.json`
69
+ - Grep bug titles in `docs/runtime/project/bugs/*.json`
70
70
  - If > 80% similarity → flag, ask if linking to existing
71
71
 
72
72
  ### 3. Has evidence (soft requirement)
@@ -125,7 +125,7 @@ If missing, still accept but flag in bug.
125
125
  │ BUG-NNN (separate sequence from TICKET-) │
126
126
  ├──────────────────────────────────────────────────────────┤
127
127
  │ STEP 8: Create bug ticket │
128
- │ Path: project/bugs/BUG-NNN.json │
128
+ │ Path: docs/runtime/project/bugs/BUG-NNN.json │
129
129
  │ Follow template: templates/qa/bug-report-template.md │
130
130
  │ Initial status: NEW │
131
131
  ├──────────────────────────────────────────────────────────┤
@@ -224,7 +224,7 @@ Missing env info = bug 50% harder to fix.
224
224
  Don't say "always" if not sure.
225
225
 
226
226
  ### RULE RB-009: Evidence preservation
227
- Screenshots, logs, HAR files → save to `project/bugs/evidence/BUG-NNN/`.
227
+ Screenshots, logs, HAR files → save to `docs/runtime/project/bugs/evidence/BUG-NNN/`.
228
228
 
229
229
  Don't paste long logs in bug body → link to file.
230
230
 
@@ -304,8 +304,8 @@ Auto assess: Data integrity concern → SEV-1.
304
304
  Always (5/5 attempts)
305
305
 
306
306
  ### Evidence
307
- - Screenshot: `project/bugs/evidence/BUG-005/screenshot-1.png`
308
- - Network trace: `project/bugs/evidence/BUG-005/har.json`
307
+ - Screenshot: `docs/runtime/project/bugs/evidence/BUG-005/screenshot-1.png`
308
+ - Network trace: `docs/runtime/project/bugs/evidence/BUG-005/har.json`
309
309
  - Server log excerpt:
310
310
  ```
311
311
  2026-04-18T18:45:23Z ERROR handler/login.ts:42
@@ -349,7 +349,7 @@ Likely: URL decoding treating + as space (classic `encodeURIComponent` vs `+` is
349
349
 
350
350
  ### Ticket File
351
351
 
352
- Created: `project/bugs/BUG-005.json`
352
+ Created: `docs/runtime/project/bugs/BUG-005.json`
353
353
 
354
354
  ### Next Steps
355
355
 
@@ -405,7 +405,7 @@ Action: /triage-bug BUG-005
405
405
  - [ ] Executive team (if not resolved in 2h)
406
406
 
407
407
  ### Ticket File
408
- Created: `project/bugs/BUG-006.json`
408
+ Created: `docs/runtime/project/bugs/BUG-006.json`
409
409
 
410
410
  ---
411
411
  HANDOFF → tech-lead + scrum-master (URGENT)
@@ -485,7 +485,7 @@ Developer cannot fix "broken" — needs specific scenario. Example of good bug:
485
485
  | Ambiguous severity | AI suggests, human confirms |
486
486
  | SEV-1 after hours | File + page on-call immediately |
487
487
  | Reporter gave bad info | Diplomatic pushback, guide to quality |
488
- | Evidence file too large | Store in core, link reference |
488
+ | Evidence file too large | Store in the project evidence area, link reference |
489
489
 
490
490
  ## 🔗 Related Commands
491
491
 
@@ -79,7 +79,7 @@ curl -sf --max-time 10 "$STAGING_URL/health" || ABORT "Staging not responding"
79
79
  Check build version matches expected:
80
80
  ```bash
81
81
  deployed_commit=$(curl -s "$STAGING_URL/version" | jq -r .commit)
82
- expected_commit=$(cat project/tickets/${TICKET_ID}.json | jq -r .merge_info.merge_commit_sha)
82
+ expected_commit=$(cat docs/runtime/project/tickets/${TICKET_ID}.json | jq -r .merge_info.merge_commit_sha)
83
83
  # Verify deployed >= expected
84
84
  ```
85
85
 
@@ -145,7 +145,7 @@ Required test accounts / test data exist. If not, setup before testing.
145
145
  │ → File separate regression bug (own ticket) │
146
146
  ├──────────────────────────────────────────────────────────┤
147
147
  │ STEP 9: Generate report │
148
- │ Save to: project/test-runs/TICKET-XXX-YYYYMMDD.md│
148
+ │ Save to: docs/runtime/project/test-runs/TICKET-XXX-YYYYMMDD.md│
149
149
  ├──────────────────────────────────────────────────────────┤
150
150
  │ STEP 10: Handoff │
151
151
  │ Pass → scrum-master (ready for release) │
@@ -261,7 +261,7 @@ None 🎉
261
261
  Ticket state: QA → DONE ✅
262
262
 
263
263
  ### Test Run Record
264
- Saved to: `project/test-runs/TICKET-042-20260418.md`
264
+ Saved to: `docs/runtime/project/test-runs/TICKET-042-20260418.md`
265
265
 
266
266
  ---
267
267
  HANDOFF → scrum-master
@@ -54,7 +54,7 @@ After developer claims the bug is fixed and PR is merged + deployed:
54
54
 
55
55
  ### 1. Bug exists + in correct state
56
56
  ```bash
57
- bug_status=$(cat project/bugs/${BUG_ID}.json | jq -r .status)
57
+ bug_status=$(cat docs/runtime/project/bugs/${BUG_ID}.json | jq -r .status)
58
58
  [ "$bug_status" = "FIXED" ] || [ "$bug_status" = "READY_FOR_QA" ] || ABORT
59
59
  ```
60
60
 
@@ -141,7 +141,7 @@ Check linked PR is merged (not still open).
141
141
  │ → HANDOFF → developer │
142
142
  ├──────────────────────────────────────────────────────────┤
143
143
  │ STEP 9: Generate report │
144
- │ Save to: project/verifications/BUG-XXX-YYYYMMDD.md│
144
+ │ Save to: docs/runtime/project/verifications/BUG-XXX-YYYYMMDD.md│
145
145
  ├──────────────────────────────────────────────────────────┤
146
146
  │ STEP 10: Update bug state + notify │
147
147
  └──────────────────────────────────────────────────────────┘
@@ -267,7 +267,7 @@ Bug status: FIXED → VERIFIED
267
267
  - BUG-004 (email HTML rendering): Still open, separate fix
268
268
 
269
269
  ### Verification Record
270
- Saved to: `project/verifications/BUG-002-20260418.md`
270
+ Saved to: `docs/runtime/project/verifications/BUG-002-20260418.md`
271
271
 
272
272
  ---
273
273
  HANDOFF → scrum-master
@@ -56,7 +56,7 @@ Manual:
56
56
  ## 🔄 Execution Flow
57
57
 
58
58
  1. Triage severity and impact.
59
- 2. Create or link `BUG-NNN` in `project/bugs/`.
59
+ 2. Create or link `BUG-NNN` in `docs/runtime/project/bugs/`.
60
60
  3. Create hotfix ticket if needed with minimal AC and status `READY`.
61
61
  4. Create branch `hotfix/BUG-NNN-short-slug` or `hotfix/TICKET-NNN-short-slug` from production branch.
62
62
  5. Reproduce the issue and write a regression test if feasible.
@@ -69,7 +69,7 @@ Manual:
69
69
  12. QA verifies production or pre-prod depending on incident protocol.
70
70
  13. Back-merge hotfix into `develop`.
71
71
  14. Create follow-up ticket for full DoD, monitoring, and root cause analysis.
72
- 15. Write incident summary in `project/releases/` or `project/incidents/`.
72
+ 15. Write incident summary in `docs/runtime/project/releases/` or `docs/runtime/project/incidents/`.
73
73
 
74
74
  ## 🔒 Hard Rules
75
75
 
@@ -65,7 +65,7 @@ Manual:
65
65
  5. Confirm QA evidence exists for every included ticket.
66
66
  6. Check open bugs and known issues.
67
67
  7. Generate changelog with ticket IDs, PRs, bug fixes, migrations, and breaking changes.
68
- 8. Create `project/releases/vX.Y.Z.json` from `core/templates/release/release-record-template.json` with scope, approvals, risks, deploy plan, rollback plan, and timestamps.
68
+ 8. Create `docs/runtime/project/releases/vX.Y.Z.json` from `templates/release/release-record-template.json` with scope, approvals, risks, deploy plan, rollback plan, and timestamps.
69
69
  9. Create or update release branch if configured.
70
70
  10. Tag release using `vX.Y.Z`.
71
71
  11. Trigger deployment or document manual deployment step.
@@ -93,7 +93,7 @@ Database migrations MUST include forward plan, rollback or mitigation, and backu
93
93
  Do not move an existing release tag. Create a new patch release instead.
94
94
 
95
95
  ### RULE REL-007: Release record schema required
96
- Every release record MUST satisfy `core/config/release.schema.json`. Missing approvals, rollback verification, QA evidence, security scan status, or known issue approval blocks release.
96
+ Every release record MUST satisfy `docs/config/release.schema.json`. Missing approvals, rollback verification, QA evidence, security scan status, or known issue approval blocks release.
97
97
 
98
98
  ### RULE REL-008: Post-release smoke evidence
99
99
  If a release is marked `RELEASED` and `qa.post_release_smoke_required=true`, then `qa.post_release_smoke_passed=true` and the evidence path MUST be recorded.
@@ -38,7 +38,7 @@ Restore service safely, preserve audit trail, and start follow-up remediation.
38
38
  4. Notify stakeholders and freeze related deploys.
39
39
  5. Execute documented rollback steps.
40
40
  6. Verify service health and core flows.
41
- 7. Record rollback result in `project/releases/`.
41
+ 7. Record rollback result in `docs/runtime/project/releases/`.
42
42
  8. Create follow-up bug/ticket and incident notes.
43
43
 
44
44
  ## 🔒 Hard Rules
@@ -79,7 +79,7 @@ fi
79
79
  Extract TICKET-XXX from branch name, verify:
80
80
  ```bash
81
81
  TICKET_ID=$(echo "$current_branch" | grep -oE 'TICKET-[0-9]+')
82
- test -f "project/tickets/${TICKET_ID}.json" || ABORT
82
+ test -f "docs/runtime/project/tickets/${TICKET_ID}.json" || ABORT
83
83
  ```
84
84
 
85
85
  ### 3. Ticket in IN_PROGRESS
@@ -203,7 +203,7 @@ fi
203
203
  │ - (Optional) Slack notification via webhook │
204
204
  ├──────────────────────────────────────────────────────────┤
205
205
  │ STEP 10: Log metrics │
206
- │ project/metrics/create-pr.jsonl │
206
+ docs/runtime/project/metrics/create-pr.jsonl │
207
207
  └──────────────────────────────────────────────────────────┘
208
208
  ```
209
209
 
@@ -205,7 +205,7 @@ If branch is `hotfix/*`:
205
205
  - Merge commit SHA
206
206
  - Strategy used
207
207
 
208
- Store in `project/audit-log.jsonl`.
208
+ Store in `docs/runtime/project/audit-log.jsonl`.
209
209
 
210
210
  ### RULE MP-009: Rollback plan for risky merges
211
211
  If PR flagged as `high-risk` (auth changes, DB migration, payment):
@@ -29,7 +29,7 @@ guide /mark-ready TICKET-001
29
29
  next TICKET-001
30
30
  ```
31
31
 
32
- Do not ask users to type `bash core/scripts/ai-core.sh` or `AI_AGENT=...` during normal use. Those are internal tools for deterministic execution and CI.
32
+ Do not ask users to type `bash scripts/ai-core.sh` or `AI_AGENT=...` during normal use. Those are internal tools for deterministic execution and CI.
33
33
 
34
34
  ## Agent Selection
35
35
 
@@ -42,12 +42,13 @@ If command metadata and user intent conflict, explain the conflict and stop.
42
42
 
43
43
  ## Source Of Truth
44
44
 
45
- - `project/` is machine-readable runtime state.
46
- - `docs/` is human-readable project documentation.
47
- - `config/` is project configuration.
48
- - `core/` is portable framework code.
45
+ - `docs/runtime/project/` is machine-readable AI Core runtime state.
46
+ - `docs/project/` is human-readable project and product documentation.
47
+ - `docs/runtime/` also contains operational AI Core documentation.
48
+ - `docs/config/` is project configuration.
49
+ - Root-level framework folders are portable framework code.
49
50
 
50
- Do not move backlog, tickets, releases, bugs, sprints, or audit records into `docs/`. Generate human-readable summaries in `project/views/` and keep longer narrative docs in `docs/`.
51
+ Keep backlog, tickets, releases, bugs, sprints, and audit records under `docs/runtime/project/`. Generate human-readable summaries in `docs/runtime/project/views/` and keep longer narrative project/product docs in `docs/project/`.
51
52
 
52
53
  ## Guided Report
53
54
 
@@ -69,4 +70,3 @@ Ask before running the next step. Do not continue automatically when the next co
69
70
  - No self-approval.
70
71
  - No DONE without fresh verification evidence.
71
72
  - No public API, setup, migration, architecture, or release-impacting change without the required docs evidence.
72
-
@@ -14,7 +14,7 @@ Before saying a workflow step is complete:
14
14
  1. Identify what proves the claim.
15
15
  2. Run or inspect the relevant verification.
16
16
  3. Read the result.
17
- 4. Record evidence in `project/test-runs/`, `project/verifications/`, or the ticket.
17
+ 4. Record evidence in `docs/runtime/project/test-runs/`, `docs/runtime/project/verifications/`, or the ticket.
18
18
  5. Only then report completion.
19
19
 
20
20
  ## Required Evidence
@@ -3,20 +3,30 @@ name: AI Core Governance
3
3
  on:
4
4
  pull_request:
5
5
  paths:
6
- - "core/**"
7
- - "config/**"
8
- - "project/**"
6
+ - "agents/**"
7
+ - "docs/config/**"
9
8
  - "docs/**"
9
+ - "hooks/**"
10
+ - "docs/runtime/project/**"
11
+ - "rules/**"
10
12
  - "scripts/**"
13
+ - "skills/**"
14
+ - "templates/**"
15
+ - "workflows/**"
11
16
  - ".github/workflows/ai-core-governance.yml"
12
17
  push:
13
18
  branches: [main, develop, "release/**"]
14
19
  paths:
15
- - "core/**"
16
- - "config/**"
17
- - "project/**"
20
+ - "agents/**"
21
+ - "docs/config/**"
18
22
  - "docs/**"
23
+ - "hooks/**"
24
+ - "docs/runtime/project/**"
25
+ - "rules/**"
19
26
  - "scripts/**"
27
+ - "skills/**"
28
+ - "templates/**"
29
+ - "workflows/**"
20
30
  - ".github/workflows/ai-core-governance.yml"
21
31
 
22
32
  concurrency:
@@ -40,52 +50,52 @@ jobs:
40
50
  npm install -g ajv-cli@5
41
51
 
42
52
  - name: Make scripts executable
43
- run: chmod +x core/scripts/*.sh
53
+ run: chmod +x scripts/*.sh
44
54
 
45
55
  - name: Validate ticket schemas
46
56
  run: |
47
57
  set -e
48
- for ticket in project/tickets/*.json; do
58
+ for ticket in docs/runtime/project/tickets/*.json; do
49
59
  if [ ! -f "$ticket" ]; then continue; fi
50
- ajv validate -s core/config/ticket.schema.json -d "$ticket"
60
+ ajv validate -s docs/config/ticket.schema.json -d "$ticket"
51
61
  done
52
62
 
53
63
  - name: Validate backlog schema
54
64
  run: |
55
- if [ ! -f "project/backlog/backlog.json" ]; then
65
+ if [ ! -f "docs/runtime/project/backlog/backlog.json" ]; then
56
66
  echo "No backlog file, skipping"
57
67
  exit 0
58
68
  fi
59
- ajv validate -s core/config/backlog.schema.json -d project/backlog/backlog.json
69
+ ajv validate -s docs/config/backlog.schema.json -d docs/runtime/project/backlog/backlog.json
60
70
 
61
71
  - name: Validate release schemas
62
72
  run: |
63
73
  set -e
64
- for release in project/releases/*.json; do
74
+ for release in docs/runtime/project/releases/*.json; do
65
75
  if [ ! -f "$release" ]; then continue; fi
66
- ajv validate -s core/config/release.schema.json -d "$release"
76
+ ajv validate -s docs/config/release.schema.json -d "$release"
67
77
  done
68
78
 
69
79
  - name: Validate state
70
- run: bash core/scripts/validate-state.sh
80
+ run: bash scripts/validate-state.sh
71
81
 
72
82
  - name: Validate docs
73
83
  if: github.event_name == 'pull_request'
74
- run: bash core/scripts/validate-docs.sh --base origin/${{ github.base_ref }}
84
+ run: bash scripts/validate-docs.sh --base origin/${{ github.base_ref }}
75
85
 
76
86
  - name: Validate permissions
77
- run: bash core/scripts/validate-permissions.sh
87
+ run: bash scripts/validate-permissions.sh
78
88
 
79
89
  - name: Validate audit log
80
- run: bash core/scripts/validate-audit-log.sh
90
+ run: bash scripts/validate-audit-log.sh
81
91
 
82
92
  - name: Generate views smoke test
83
- run: bash core/scripts/generate-views.sh
93
+ run: bash scripts/generate-views.sh
84
94
 
85
95
  - name: Check state history immutability
86
96
  if: github.event_name == 'pull_request'
87
97
  run: |
88
- CHANGED=$(git diff --name-only origin/${{ github.base_ref }}...HEAD -- 'project/tickets/*.json' || true)
98
+ CHANGED=$(git diff --name-only origin/${{ github.base_ref }}...HEAD -- 'docs/runtime/project/tickets/*.json' || true)
89
99
  if [ -z "$CHANGED" ]; then
90
100
  echo "No ticket changes"
91
101
  exit 0
@@ -11,7 +11,7 @@ Instructions for developer:
11
11
 
12
12
  <!-- 1-3 sentences: what does this PR do and why? -->
13
13
 
14
- **Ticket**: [TICKET-XXX](./project/tickets/TICKET-XXX.json) <!-- Auto-filled by /create-pr -->
14
+ **Ticket**: [TICKET-XXX](./docs/runtime/project/tickets/TICKET-XXX.json) <!-- Auto-filled by /create-pr -->
15
15
 
16
16
  **Type**: <!-- feature | bugfix | hotfix | refactor | chore | docs -->
17
17
 
@@ -1,9 +1,14 @@
1
1
  # AI Core governance ownership.
2
2
  #
3
3
  # Replace placeholder teams/users for each consuming repo.
4
- /core/ @tech-leads
5
- /config/ @scrum-masters @tech-leads
6
- /project/ @scrum-masters @tech-leads
4
+ /agents/ @tech-leads
5
+ /rules/ @tech-leads
6
+ /scripts/ @tech-leads
7
+ /skills/ @tech-leads
8
+ /templates/ @tech-leads
9
+ /workflows/ @tech-leads
10
+ /docs/config/ @scrum-masters @tech-leads
11
+ /docs/runtime/project/ @scrum-masters @tech-leads
7
12
  /docs/runtime/adr/ @tech-leads
8
13
  /docs/project/specs/ @product-owners @tech-leads
9
14
  /docs/project/plans/ @tech-leads
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "docs/config/docs-policy.default.json"
3
+ }