ai-core-framework 0.1.0 → 0.2.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 (104) hide show
  1. package/README.md +16 -16
  2. package/{core/agents → agents}/business-analyst.md +1 -1
  3. package/{core/agents → agents}/scrum-master.md +7 -3
  4. package/bin/ai-core-framework.js +4 -4
  5. package/hooks/hooks-cursor.json +16 -0
  6. package/hooks/hooks.json +16 -0
  7. package/hooks/session-start +21 -0
  8. package/lib/install-codex.js +39 -7
  9. package/package.json +9 -2
  10. package/{core/rules → rules}/00-global-rules.md +6 -6
  11. package/{core/rules → rules}/04-documentation.md +1 -1
  12. package/{core/scripts → scripts}/ai-core.sh +35 -13
  13. package/{core/scripts → scripts}/install-codex-prompts.sh +23 -15
  14. package/{core/scripts → scripts}/log-user-request.sh +3 -3
  15. package/{core/scripts → scripts}/setup-project.sh +18 -23
  16. package/{core/scripts → scripts}/sync-platforms.sh +47 -43
  17. package/{core/scripts → scripts}/validate-audit-log.sh +1 -1
  18. package/{core/scripts → scripts}/validate-docs.sh +1 -1
  19. package/{core/scripts → scripts}/validate-permissions.sh +15 -1
  20. package/{core/scripts → scripts}/validate-state.sh +2 -2
  21. package/{core/scripts → scripts}/workflow.sh +7 -7
  22. package/{core/skills → skills}/ai-core-commands/SKILL.md +9 -9
  23. package/{core/skills → skills}/development-implement-task/SKILL.md +2 -2
  24. package/{core/skills → skills}/meta-sync-platforms/SKILL.md +5 -5
  25. package/{core/skills → skills}/meta-validate-audit-log/SKILL.md +1 -1
  26. package/{core/skills → skills}/meta-validate-docs/SKILL.md +1 -1
  27. package/{core/skills → skills}/meta-validate-permissions/SKILL.md +2 -2
  28. package/{core/skills → skills}/meta-validate-state/SKILL.md +2 -2
  29. package/{core/skills → skills}/planning-analyze-requirements/SKILL.md +3 -3
  30. package/{core/skills → skills}/planning-mark-ready/SKILL.md +1 -1
  31. package/{core/skills → skills}/planning-plan-refactor/SKILL.md +3 -3
  32. package/{core/skills → skills}/project-setup-project/SKILL.md +19 -19
  33. package/{core/skills → skills}/qa-report-bug/SKILL.md +1 -1
  34. package/{core/skills → skills}/release-release/SKILL.md +2 -2
  35. package/{core/skills → skills}/using-ai-core/SKILL.md +2 -3
  36. package/{core/templates → templates}/ci/ai-core-governance.yml +23 -13
  37. package/{core/templates → templates}/project/CODEOWNERS +6 -1
  38. package/templates/project/docs-policy.json +3 -0
  39. package/{core/templates → templates}/project/project-structure.yaml +11 -11
  40. package/{core/templates → templates}/qa/bug-report-template.md +1 -1
  41. package/{core/templates → templates}/requirements/user-story-template.md +1 -1
  42. package/core/README.md +0 -162
  43. package/core/templates/project/docs-policy.json +0 -3
  44. /package/{core/agents → agents}/README.md +0 -0
  45. /package/{core/agents → agents}/developer.md +0 -0
  46. /package/{core/agents → agents}/qa-tester.md +0 -0
  47. /package/{core/agents → agents}/tech-lead.md +0 -0
  48. /package/{core/config → config}/backlog.schema.json +0 -0
  49. /package/{core/config → config}/docs-policy.default.json +0 -0
  50. /package/{core/config → config}/release.schema.json +0 -0
  51. /package/{core/config → config}/ticket.schema.json +0 -0
  52. /package/{core/rules → rules}/01-git-workflow.md +0 -0
  53. /package/{core/rules → rules}/02-code-quality.md +0 -0
  54. /package/{core/rules → rules}/03-security.md +0 -0
  55. /package/{core/rules → rules}/05-testing-mandatory.md +0 -0
  56. /package/{core/rules → rules}/06-approval-gates.md +0 -0
  57. /package/{core/rules → rules}/07-definition-of-ready.md +0 -0
  58. /package/{core/rules → rules}/08-definition-of-done.md +0 -0
  59. /package/{core/scripts → scripts}/generate-views.sh +0 -0
  60. /package/{core/skills → skills}/README.md +0 -0
  61. /package/{core/skills → skills}/brainstorming/SKILL.md +0 -0
  62. /package/{core/skills → skills}/executing-ticket/SKILL.md +0 -0
  63. /package/{core/skills → skills}/git-branch-status/SKILL.md +0 -0
  64. /package/{core/skills → skills}/git-cleanup-branches/SKILL.md +0 -0
  65. /package/{core/skills → skills}/git-scan-untracked/SKILL.md +0 -0
  66. /package/{core/skills → skills}/meta-generate-views/SKILL.md +0 -0
  67. /package/{core/skills → skills}/meta-request-log/SKILL.md +0 -0
  68. /package/{core/skills → skills}/meta-sprint-report/SKILL.md +0 -0
  69. /package/{core/skills → skills}/meta-ticket-health/SKILL.md +0 -0
  70. /package/{core/skills → skills}/planning-backlog-status/SKILL.md +0 -0
  71. /package/{core/skills → skills}/planning-document-existing-requirements/SKILL.md +0 -0
  72. /package/{core/skills → skills}/planning-estimate-task/SKILL.md +0 -0
  73. /package/{core/skills → skills}/planning-groom-ticket/SKILL.md +0 -0
  74. /package/{core/skills → skills}/planning-plan-sprint/SKILL.md +0 -0
  75. /package/{core/skills → skills}/planning-prioritize-backlog/SKILL.md +0 -0
  76. /package/{core/skills → skills}/planning-write-plan/SKILL.md +0 -0
  77. /package/{core/skills → skills}/project-detect-stack/SKILL.md +0 -0
  78. /package/{core/skills → skills}/project-discover-codebase/SKILL.md +0 -0
  79. /package/{core/skills → skills}/qa-bug-status/SKILL.md +0 -0
  80. /package/{core/skills → skills}/qa-smoke-test/SKILL.md +0 -0
  81. /package/{core/skills → skills}/qa-triage-bug/SKILL.md +0 -0
  82. /package/{core/skills → skills}/qa-verify-fix/SKILL.md +0 -0
  83. /package/{core/skills → skills}/release-hotfix/SKILL.md +0 -0
  84. /package/{core/skills → skills}/release-rollback/SKILL.md +0 -0
  85. /package/{core/skills → skills}/review-create-pr/SKILL.md +0 -0
  86. /package/{core/skills → skills}/review-merge-pr/SKILL.md +0 -0
  87. /package/{core/skills → skills}/review-techlead-review/SKILL.md +0 -0
  88. /package/{core/skills → skills}/verification-before-done/SKILL.md +0 -0
  89. /package/{core/skills → skills}/writing-implementation-plan/SKILL.md +0 -0
  90. /package/{core/templates → templates}/ci/node-pnpm.yml +0 -0
  91. /package/{core/templates → templates}/pm/retrospective-template.md +0 -0
  92. /package/{core/templates → templates}/pm/sprint-plan-template.md +0 -0
  93. /package/{core/templates → templates}/pr/pull-request-template.md +0 -0
  94. /package/{core/templates → templates}/project/project-config.yaml +0 -0
  95. /package/{core/templates → templates}/qa/test-plan-template.md +0 -0
  96. /package/{core/templates → templates}/release/release-record-template.json +0 -0
  97. /package/{core/templates → templates}/requirements/PRD-template.md +0 -0
  98. /package/{core/templates → templates}/technical/ADR-template.md +0 -0
  99. /package/{core/templates → templates}/technical/refactor-plan-template.md +0 -0
  100. /package/{core/templates → templates}/technical/tech-design-template.md +0 -0
  101. /package/{core/workflows → workflows}/bug-lifecycle.md +0 -0
  102. /package/{core/workflows → workflows}/feature-lifecycle.md +0 -0
  103. /package/{core/workflows → workflows}/hotfix-lifecycle.md +0 -0
  104. /package/{core/workflows → workflows}/sprint-lifecycle.md +0 -0
@@ -3,20 +3,30 @@ name: AI Core Governance
3
3
  on:
4
4
  pull_request:
5
5
  paths:
6
- - "core/**"
6
+ - "agents/**"
7
7
  - "config/**"
8
- - "project/**"
9
8
  - "docs/**"
9
+ - "hooks/**"
10
+ - "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/**"
20
+ - "agents/**"
16
21
  - "config/**"
17
- - "project/**"
18
22
  - "docs/**"
23
+ - "hooks/**"
24
+ - "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,14 +50,14 @@ 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
58
  for ticket in 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 config/ticket.schema.json -d "$ticket"
51
61
  done
52
62
 
53
63
  - name: Validate backlog schema
@@ -56,31 +66,31 @@ jobs:
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 config/backlog.schema.json -d project/backlog/backlog.json
60
70
 
61
71
  - name: Validate release schemas
62
72
  run: |
63
73
  set -e
64
74
  for release in 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 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'
@@ -1,7 +1,12 @@
1
1
  # AI Core governance ownership.
2
2
  #
3
3
  # Replace placeholder teams/users for each consuming repo.
4
- /core/ @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
5
10
  /config/ @scrum-masters @tech-leads
6
11
  /project/ @scrum-masters @tech-leads
7
12
  /docs/runtime/adr/ @tech-leads
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "config/docs-policy.default.json"
3
+ }
@@ -1,5 +1,5 @@
1
1
  # Project-specific structure map copied by /setup-project into config/project-structure.yaml
2
- # core remains framework-only. Runtime state and project docs live outside core.
2
+ # Framework folders remain framework-only. Runtime state and project docs live outside them.
3
3
 
4
4
  state:
5
5
  root: "project"
@@ -48,29 +48,29 @@ ticket_docs:
48
48
 
49
49
  refactor:
50
50
  plan_dir: "docs/runtime/refactor"
51
- template: "core/templates/technical/refactor-plan-template.md"
51
+ template: "templates/technical/refactor-plan-template.md"
52
52
  requires_ticket_breakdown: true
53
53
  requires_adr_when_architectural: true
54
54
 
55
55
  release:
56
56
  records: "project/releases/vX.Y.Z.json"
57
- schema: "core/config/release.schema.json"
58
- template: "core/templates/release/release-record-template.json"
57
+ schema: "config/release.schema.json"
58
+ template: "templates/release/release-record-template.json"
59
59
  requires_rollback_verification: true
60
60
  requires_post_release_smoke: true
61
61
 
62
62
  scripts:
63
- canonical: "core/scripts"
63
+ canonical: "scripts"
64
64
  generated_root: "scripts"
65
- command_runner: "core/scripts/ai-core.sh"
66
- workflow_handlers: "core/scripts/workflow.sh"
67
- audit_validator: "core/scripts/validate-audit-log.sh"
65
+ command_runner: "scripts/ai-core.sh"
66
+ workflow_handlers: "scripts/workflow.sh"
67
+ audit_validator: "scripts/validate-audit-log.sh"
68
68
  audit_log: "project/audit-log.jsonl"
69
69
 
70
70
  ci:
71
- governance_template: "core/templates/ci/ai-core-governance.yml"
72
- app_templates: "core/templates/ci"
71
+ governance_template: "templates/ci/ai-core-governance.yml"
72
+ app_templates: "templates/ci"
73
73
 
74
74
  docs_policy:
75
75
  project_override: "config/docs-policy.json"
76
- default: "core/config/docs-policy.default.json"
76
+ default: "config/docs-policy.default.json"
@@ -367,5 +367,5 @@ DO NOT EDIT BELOW - auto-populated
367
367
  -->
368
368
 
369
369
  <!-- TEMPLATE_VERSION: 1.0.0 -->
370
- <!-- SCHEMA: core/config/bug.schema.json -->
370
+ <!-- SCHEMA: config/bug.schema.json -->
371
371
  <!-- FILED_BY_AGENT: [agent-name] -->
@@ -378,4 +378,4 @@ DO NOT EDIT BELOW - auto-populated fields
378
378
  <!-- TEMPLATE_VERSION: 1.0.0 -->
379
379
  <!-- CREATED_BY_AGENT: business-analyst -->
380
380
  <!-- NEXT_AGENT: tech-lead -->
381
- <!-- SCHEMA: core/config/ticket.schema.json -->
381
+ <!-- SCHEMA: config/ticket.schema.json -->
package/core/README.md DELETED
@@ -1,162 +0,0 @@
1
- # AI Core, Enterprise SDLC Framework
2
-
3
- > Framework source of truth for AI agents, commands, rules, templates, and workflows.
4
- > Compatible with Claude Code, Cursor, and Windsurf.
5
-
6
- ## 🎯 Purpose
7
-
8
- AI Core turns AI coding assistants into a small structured delivery team following Agile/Scrum roles: BA, Tech Lead, Developer, QA, and Scrum Master.
9
-
10
- Important separation:
11
-
12
- - `core/` is framework-only and should be portable across projects.
13
- - `config/` is project-specific configuration.
14
- - `project/` is project-specific runtime state.
15
- - `docs/project/` contains product and project documentation such as requirements, specs, plans, and API docs.
16
- - `docs/runtime/` contains operational AI Core documentation such as ADRs, refactor plans, runbooks, QA evidence, and technical notes.
17
-
18
- ## 📁 Framework structure
19
-
20
- `core/` contains reusable framework assets only:
21
-
22
- - `agents/`, role definitions
23
- - `commands/`, slash-command workflows
24
- - `rules/`, strict constraints AI must follow
25
- - `templates/`, reusable document templates
26
- - `workflows/`, lifecycle specs
27
- - `config/`, framework schemas only
28
- - `scripts/`, framework utilities
29
-
30
- `core/` MUST NOT contain project runtime state such as tickets, backlog, sprints, releases, or bugs.
31
-
32
- ## 📁 Project runtime structure
33
-
34
- A project using this framework should have:
35
-
36
- - `config/project-config.yaml`, project-specific settings
37
- - `config/project-structure.yaml`, path conventions for this project
38
- - `project/backlog/backlog.json`, backlog ordering and prioritization source of truth
39
- - `project/tickets/TICKET-XXX.json`, ticket details and state machine history
40
- - `project/bugs/BUG-XXX.json`, bug state
41
- - `project/sprints/SPRINT-XXX.json`, sprint plans and reports
42
- - `project/releases/vX.Y.Z.json`, release records
43
- - `project/user-requests.jsonl`, append-only user request log
44
- - `project/views/`, generated views for humans
45
- - `docs/project/requirements/`, reverse-documented and stakeholder-provided requirements
46
- - `docs/project/specs/`, approved feature and behavior specs
47
- - `docs/project/user-stories/`, user story drafts and supporting product notes
48
- - `docs/project/plans/`, implementation plans linked from tickets
49
- - `docs/project/api/`, API documentation
50
- - `docs/runtime/refactor/`, refactor plans
51
- - `docs/runtime/adr/`, Architecture Decision Records
52
- - `docs/runtime/technical/`, technical designs
53
- - `docs/runtime/runbooks/`, operational runbooks
54
- - `docs/runtime/qa/`, QA plans and reports
55
-
56
- ## 🚀 Quick Start
57
-
58
- 1. Copy `core/` into your project root.
59
- 2. Run `/setup-project` to create `config/`, `project/`, and docs scaffolding.
60
- 3. Run `/sync-platforms` to export framework instructions to Claude Code, Cursor, and Windsurf.
61
- 4. Start with `/detect-stack`, `/discover-codebase`, then `/analyze-requirements`.
62
-
63
- ## 🧭 Guided workflow
64
-
65
- This framework is chat-first. In your AI chat window, type the workflow command directly:
66
-
67
- ```text
68
- /analyze-requirements "User can reset password"
69
- /groom-ticket TICKET-001 5
70
- next TICKET-001
71
- ```
72
-
73
- The AI must infer the correct agent from command metadata (`owner_agent` / `requires_agents`). Users should not need to type agent names. The executable runner exists for AI tooling and CI, not as the normal user interface.
74
-
75
- For guided mode, ask naturally:
76
-
77
- ```text
78
- guide /groom-ticket TICKET-001 5
79
- ```
80
-
81
- The AI should execute one step, report the completed command, ticket state before/after, updated `project` files, validation results, and the next recommended chat command. It must ask before continuing and must not auto-run steps requiring missing arguments like `<story_points>` or `<pr_url>`.
82
-
83
- ## 🤖 Agents
84
-
85
- | Agent | Role | Can do | Must not do |
86
- |-------|------|--------|-------------|
87
- | `business-analyst` | BA + PM | Requirements, user stories, backlog priority | Write code, technical estimate |
88
- | `tech-lead` | Architect + reviewer | Design, review, ADR, security | Self-merge own PR |
89
- | `developer` | Engineer | Implement tasks and tests | Merge PR, approve own work |
90
- | `qa-tester` | QA | Test plan, bug report, fix verification | Modify production code |
91
- | `scrum-master` | Delivery coordinator | Sprint planning, release, metrics | Technical decisions |
92
-
93
- ## ⚙️ Commands
94
-
95
- See `commands/README.md` for the full catalog.
96
-
97
- Core workflow:
98
-
99
- `/analyze-requirements` → `/groom-ticket` → `/write-plan` → `/mark-ready` → `/plan-sprint` → `/implement-task` → `/create-pr` → `/techlead-review` → `/merge-pr` → `/smoke-test`
100
-
101
- Project setup and reporting:
102
-
103
- - `/setup-project`
104
- - `/detect-stack`
105
- - `/discover-codebase`
106
- - `/validate-state`
107
- - `/sprint-report`
108
- - `/sync-platforms`
109
-
110
- ## 📊 State Machine
111
-
112
- Tickets in `project/tickets/` move through:
113
-
114
- `DRAFT → GROOMED → READY → IN_PROGRESS → IN_REVIEW → QA → DONE`
115
-
116
- Side states:
117
-
118
- - `BLOCKED`
119
- - `CANCELLED`
120
-
121
- Transitions must go through commands, not manual JSON edits.
122
-
123
- ## 📌 Backlog model
124
-
125
- Backlog source of truth is `project/backlog/backlog.json`.
126
-
127
- Ticket details are in `project/tickets/TICKET-XXX.json`.
128
-
129
- Generated views can be written to `project/views/`.
130
-
131
- This avoids treating the ticket folder itself as the backlog. The ticket folder stores ticket details, while the backlog file owns ranking and prioritization.
132
-
133
- ## 🧱 Refactor planning
134
-
135
- Large refactors should use:
136
-
137
- - `docs/runtime/refactor/<name>-refactor-plan.md`
138
- - `core/templates/technical/refactor-plan-template.md`
139
- - `docs/runtime/adr/NNN-title.md` if the refactor changes architecture
140
- - `project/tickets/TICKET-XXX.json` for each executable refactor step
141
-
142
- ## 🛠️ Platform Sync
143
-
144
- User-facing command:
145
-
146
- ```text
147
- /sync-platforms
148
- ```
149
-
150
- Internal executable used by AI tooling/CI:
151
-
152
- `bash core/scripts/sync-platforms.sh`
153
-
154
- Generated files:
155
-
156
- - `.claude/agents/`
157
- - `.claude/commands/`
158
- - `CLAUDE.md`
159
- - `.cursor/rules/*.mdc`
160
- - `.windsurfrules`
161
-
162
- Generated files are exports. Edit `core/` source files instead.
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "core/config/docs-policy.default.json"
3
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes