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.
- package/README.md +19 -19
- package/{core/agents → agents}/business-analyst.md +7 -7
- package/{core/agents → agents}/developer.md +2 -2
- package/{core/agents → agents}/qa-tester.md +3 -3
- package/{core/agents → agents}/scrum-master.md +16 -12
- package/{core/agents → agents}/tech-lead.md +4 -4
- package/bin/ai-core-framework.js +4 -4
- package/{core → docs}/config/backlog.schema.json +1 -1
- package/{core → docs}/config/release.schema.json +1 -1
- package/{core → docs}/config/ticket.schema.json +1 -1
- package/hooks/hooks-cursor.json +16 -0
- package/hooks/hooks.json +16 -0
- package/hooks/session-start +21 -0
- package/lib/install-codex.js +39 -7
- package/package.json +9 -2
- package/{core/rules → rules}/00-global-rules.md +18 -18
- package/{core/rules → rules}/02-code-quality.md +1 -1
- package/{core/rules → rules}/04-documentation.md +1 -1
- package/{core/rules → rules}/05-testing-mandatory.md +2 -2
- package/{core/rules → rules}/06-approval-gates.md +2 -2
- package/{core/rules → rules}/08-definition-of-done.md +1 -1
- package/{core/scripts → scripts}/ai-core.sh +43 -21
- package/{core/scripts → scripts}/generate-views.sh +2 -2
- package/{core/scripts → scripts}/install-codex-prompts.sh +23 -15
- package/{core/scripts → scripts}/log-user-request.sh +5 -5
- package/{core/scripts → scripts}/setup-project.sh +33 -38
- package/{core/scripts → scripts}/sync-platforms.sh +49 -45
- package/{core/scripts → scripts}/validate-audit-log.sh +2 -2
- package/{core/scripts → scripts}/validate-docs.sh +6 -6
- package/{core/scripts → scripts}/validate-permissions.sh +17 -3
- package/{core/scripts → scripts}/validate-state.sh +6 -6
- package/{core/scripts → scripts}/workflow.sh +16 -16
- package/{core/skills → skills}/ai-core-commands/SKILL.md +9 -9
- package/{core/skills → skills}/brainstorming/SKILL.md +1 -1
- package/{core/skills → skills}/development-implement-task/SKILL.md +7 -7
- package/{core/skills → skills}/meta-generate-views/SKILL.md +8 -8
- package/{core/skills → skills}/meta-request-log/SKILL.md +4 -4
- package/{core/skills → skills}/meta-sprint-report/SKILL.md +2 -2
- package/{core/skills → skills}/meta-sync-platforms/SKILL.md +5 -5
- package/{core/skills → skills}/meta-ticket-health/SKILL.md +1 -1
- package/{core/skills → skills}/meta-validate-audit-log/SKILL.md +2 -2
- package/{core/skills → skills}/meta-validate-docs/SKILL.md +1 -1
- package/{core/skills → skills}/meta-validate-permissions/SKILL.md +2 -2
- package/{core/skills → skills}/meta-validate-state/SKILL.md +4 -4
- package/{core/skills → skills}/planning-analyze-requirements/SKILL.md +10 -10
- package/{core/skills → skills}/planning-backlog-status/SKILL.md +6 -6
- package/{core/skills → skills}/planning-groom-ticket/SKILL.md +4 -4
- package/{core/skills → skills}/planning-mark-ready/SKILL.md +3 -3
- package/{core/skills → skills}/planning-plan-refactor/SKILL.md +6 -6
- package/{core/skills → skills}/planning-plan-sprint/SKILL.md +4 -4
- package/{core/skills → skills}/planning-prioritize-backlog/SKILL.md +2 -2
- package/{core/skills → skills}/planning-write-plan/SKILL.md +1 -1
- package/{core/skills → skills}/project-detect-stack/SKILL.md +1 -1
- package/{core/skills → skills}/project-discover-codebase/SKILL.md +2 -2
- package/skills/project-setup-project/SKILL.md +113 -0
- package/{core/skills → skills}/qa-bug-status/SKILL.md +1 -1
- package/{core/skills → skills}/qa-report-bug/SKILL.md +8 -8
- package/{core/skills → skills}/qa-smoke-test/SKILL.md +3 -3
- package/{core/skills → skills}/qa-verify-fix/SKILL.md +3 -3
- package/{core/skills → skills}/release-hotfix/SKILL.md +2 -2
- package/{core/skills → skills}/release-release/SKILL.md +2 -2
- package/{core/skills → skills}/release-rollback/SKILL.md +1 -1
- package/{core/skills → skills}/review-create-pr/SKILL.md +2 -2
- package/{core/skills → skills}/review-merge-pr/SKILL.md +1 -1
- package/{core/skills → skills}/using-ai-core/SKILL.md +7 -7
- package/{core/skills → skills}/verification-before-done/SKILL.md +1 -1
- package/{core/templates → templates}/ci/ai-core-governance.yml +29 -19
- package/{core/templates → templates}/pr/pull-request-template.md +1 -1
- package/{core/templates → templates}/project/CODEOWNERS +8 -3
- package/templates/project/docs-policy.json +3 -0
- package/templates/project/project-structure.yaml +76 -0
- package/{core/templates → templates}/qa/bug-report-template.md +1 -1
- package/{core/templates → templates}/requirements/user-story-template.md +1 -1
- package/{core/workflows → workflows}/bug-lifecycle.md +3 -3
- package/{core/workflows → workflows}/feature-lifecycle.md +2 -2
- package/{core/workflows → workflows}/sprint-lifecycle.md +2 -2
- package/core/README.md +0 -162
- package/core/skills/project-setup-project/SKILL.md +0 -113
- package/core/templates/project/docs-policy.json +0 -3
- package/core/templates/project/project-structure.yaml +0 -76
- /package/{core/agents → agents}/README.md +0 -0
- /package/{core → docs}/config/docs-policy.default.json +0 -0
- /package/{core/rules → rules}/01-git-workflow.md +0 -0
- /package/{core/rules → rules}/03-security.md +0 -0
- /package/{core/rules → rules}/07-definition-of-ready.md +0 -0
- /package/{core/skills → skills}/README.md +0 -0
- /package/{core/skills → skills}/executing-ticket/SKILL.md +0 -0
- /package/{core/skills → skills}/git-branch-status/SKILL.md +0 -0
- /package/{core/skills → skills}/git-cleanup-branches/SKILL.md +0 -0
- /package/{core/skills → skills}/git-scan-untracked/SKILL.md +0 -0
- /package/{core/skills → skills}/planning-document-existing-requirements/SKILL.md +0 -0
- /package/{core/skills → skills}/planning-estimate-task/SKILL.md +0 -0
- /package/{core/skills → skills}/qa-triage-bug/SKILL.md +0 -0
- /package/{core/skills → skills}/review-techlead-review/SKILL.md +0 -0
- /package/{core/skills → skills}/writing-implementation-plan/SKILL.md +0 -0
- /package/{core/templates → templates}/ci/node-pnpm.yml +0 -0
- /package/{core/templates → templates}/pm/retrospective-template.md +0 -0
- /package/{core/templates → templates}/pm/sprint-plan-template.md +0 -0
- /package/{core/templates → templates}/project/project-config.yaml +0 -0
- /package/{core/templates → templates}/qa/test-plan-template.md +0 -0
- /package/{core/templates → templates}/release/release-record-template.json +0 -0
- /package/{core/templates → templates}/requirements/PRD-template.md +0 -0
- /package/{core/templates → templates}/technical/ADR-template.md +0 -0
- /package/{core/templates → templates}/technical/refactor-plan-template.md +0 -0
- /package/{core/templates → templates}/technical/tech-design-template.md +0 -0
- /package/{core/workflows → workflows}/hotfix-lifecycle.md +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Project-specific structure map copied by /setup-project into docs/config/project-structure.yaml
|
|
2
|
+
# Framework folders remain framework-only. Runtime state and project docs live outside them.
|
|
3
|
+
|
|
4
|
+
state:
|
|
5
|
+
root: "docs/runtime/project"
|
|
6
|
+
tickets: "docs/runtime/project/tickets"
|
|
7
|
+
backlog: "docs/runtime/project/backlog"
|
|
8
|
+
bugs: "docs/runtime/project/bugs"
|
|
9
|
+
sprints: "docs/runtime/project/sprints"
|
|
10
|
+
releases: "docs/runtime/project/releases"
|
|
11
|
+
metrics: "docs/runtime/project/metrics"
|
|
12
|
+
views: "docs/runtime/project/views"
|
|
13
|
+
test_runs: "docs/runtime/project/test-runs"
|
|
14
|
+
incidents: "docs/runtime/project/incidents"
|
|
15
|
+
audit_log: "docs/runtime/project/audit-log.jsonl"
|
|
16
|
+
|
|
17
|
+
project_docs:
|
|
18
|
+
root: "docs/project"
|
|
19
|
+
product: "docs/project/product"
|
|
20
|
+
planning: "docs/project/planning"
|
|
21
|
+
specs: "docs/project/specs"
|
|
22
|
+
user_stories: "docs/project/user-stories"
|
|
23
|
+
plans: "docs/project/plans"
|
|
24
|
+
requirements: "docs/project/requirements"
|
|
25
|
+
api: "docs/project/api"
|
|
26
|
+
|
|
27
|
+
runtime_docs:
|
|
28
|
+
root: "docs/runtime"
|
|
29
|
+
refactor: "docs/runtime/refactor"
|
|
30
|
+
adr: "docs/runtime/adr"
|
|
31
|
+
technical: "docs/runtime/technical"
|
|
32
|
+
runbooks: "docs/runtime/runbooks"
|
|
33
|
+
qa: "docs/runtime/qa"
|
|
34
|
+
test_runs: "docs/runtime/test-runs"
|
|
35
|
+
verifications: "docs/runtime/verifications"
|
|
36
|
+
incidents: "docs/runtime/incidents"
|
|
37
|
+
|
|
38
|
+
backlog:
|
|
39
|
+
source_of_truth: "docs/runtime/project/backlog/backlog.json"
|
|
40
|
+
ticket_details: "docs/runtime/project/tickets/TICKET-XXX.json"
|
|
41
|
+
generated_views: "docs/runtime/project/views"
|
|
42
|
+
|
|
43
|
+
ticket_docs:
|
|
44
|
+
spec_path_field: "spec_path"
|
|
45
|
+
spec_dir: "docs/project/specs"
|
|
46
|
+
implementation_plan_path_field: "implementation_plan_path"
|
|
47
|
+
plan_dir: "docs/project/plans"
|
|
48
|
+
|
|
49
|
+
refactor:
|
|
50
|
+
plan_dir: "docs/runtime/refactor"
|
|
51
|
+
template: "templates/technical/refactor-plan-template.md"
|
|
52
|
+
requires_ticket_breakdown: true
|
|
53
|
+
requires_adr_when_architectural: true
|
|
54
|
+
|
|
55
|
+
release:
|
|
56
|
+
records: "docs/runtime/project/releases/vX.Y.Z.json"
|
|
57
|
+
schema: "docs/config/release.schema.json"
|
|
58
|
+
template: "templates/release/release-record-template.json"
|
|
59
|
+
requires_rollback_verification: true
|
|
60
|
+
requires_post_release_smoke: true
|
|
61
|
+
|
|
62
|
+
scripts:
|
|
63
|
+
canonical: "scripts"
|
|
64
|
+
generated_root: "scripts"
|
|
65
|
+
command_runner: "scripts/ai-core.sh"
|
|
66
|
+
workflow_handlers: "scripts/workflow.sh"
|
|
67
|
+
audit_validator: "scripts/validate-audit-log.sh"
|
|
68
|
+
audit_log: "docs/runtime/project/audit-log.jsonl"
|
|
69
|
+
|
|
70
|
+
ci:
|
|
71
|
+
governance_template: "templates/ci/ai-core-governance.yml"
|
|
72
|
+
app_templates: "templates/ci"
|
|
73
|
+
|
|
74
|
+
docs_policy:
|
|
75
|
+
project_override: "docs/config/docs-policy.json"
|
|
76
|
+
default: "docs/config/docs-policy.default.json"
|
|
@@ -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:
|
|
381
|
+
<!-- SCHEMA: docs/config/ticket.schema.json -->
|
|
@@ -10,7 +10,7 @@ Make bugs reproducible, prioritized, fixed with regression coverage, and verifie
|
|
|
10
10
|
|
|
11
11
|
1. Discovery
|
|
12
12
|
- Any agent or user reports a defect with `/report-bug`.
|
|
13
|
-
- Bug is created in `project/bugs/` with status `NEW` or `NEEDS_MORE_INFO`.
|
|
13
|
+
- Bug is created in `docs/runtime/project/bugs/` with status `NEW` or `NEEDS_MORE_INFO`.
|
|
14
14
|
|
|
15
15
|
2. Triage
|
|
16
16
|
- BA runs `/triage-bug` with Tech Lead and QA input.
|
|
@@ -46,8 +46,8 @@ Make bugs reproducible, prioritized, fixed with regression coverage, and verifie
|
|
|
46
46
|
|
|
47
47
|
## 📊 Artifacts
|
|
48
48
|
|
|
49
|
-
- `project/bugs/BUG-XXX.json`
|
|
50
|
-
- Linked ticket in `project/tickets/`
|
|
49
|
+
- `docs/runtime/project/bugs/BUG-XXX.json`
|
|
50
|
+
- Linked ticket in `docs/runtime/project/tickets/`
|
|
51
51
|
- Verification report
|
|
52
52
|
- Regression tests
|
|
53
53
|
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
3. BA writes User Story (INVEST)
|
|
83
83
|
4. BA writes ≥3 AC scenarios (Gherkin)
|
|
84
84
|
5. BA creates `docs/project/specs/TICKET-XXX-<slug>.md`
|
|
85
|
-
6. BA creates `project/tickets/TICKET-XXX.json` with `spec_path`
|
|
85
|
+
6. BA creates `docs/runtime/project/tickets/TICKET-XXX.json` with `spec_path`
|
|
86
86
|
7. BA output HANDOFF → tech-lead
|
|
87
87
|
|
|
88
88
|
### Gates
|
|
@@ -181,7 +181,7 @@ Each requirement should finish in one session (< 30 minutes of BA work).
|
|
|
181
181
|
- Sort by priority (MUST > SHOULD > COULD)
|
|
182
182
|
- Pull tickets into sprint until capacity is reached (30 points default)
|
|
183
183
|
- Assign tickets to sprint
|
|
184
|
-
3. Create `project/sprints/SPRINT-XXX.json`
|
|
184
|
+
3. Create `docs/runtime/project/sprints/SPRINT-XXX.json`
|
|
185
185
|
|
|
186
186
|
### Gates
|
|
187
187
|
- ✅ Total points ≤ team capacity
|
|
@@ -46,8 +46,8 @@ Ensure sprint commitments are realistic, tracked, and closed with factual metric
|
|
|
46
46
|
|
|
47
47
|
## 📊 Artifacts
|
|
48
48
|
|
|
49
|
-
- `project/sprints/SPRINT-XXX.json`
|
|
50
|
-
- `project/metrics/`
|
|
49
|
+
- `docs/runtime/project/sprints/SPRINT-XXX.json`
|
|
50
|
+
- `docs/runtime/project/metrics/`
|
|
51
51
|
- Retrospective notes
|
|
52
52
|
- Sprint report
|
|
53
53
|
|
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,113 +0,0 @@
|
|
|
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 a copied `core/` framework 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 `core/` into a project:
|
|
37
|
-
|
|
38
|
-
- `/setup-project`
|
|
39
|
-
- `bash core/scripts/setup-project.sh`
|
|
40
|
-
|
|
41
|
-
## 📋 Preconditions, STRICT
|
|
42
|
-
|
|
43
|
-
1. Repository has `.git/`.
|
|
44
|
-
2. `core/README.md` exists.
|
|
45
|
-
3. `core/templates/project/project-config.yaml` exists.
|
|
46
|
-
4. `core/templates/project/project-structure.yaml` exists.
|
|
47
|
-
5. User has permission to create `config/`, `project/`, `docs/project/`, `docs/runtime/`, `.claude/`, `.cursor/`, `.windsurfrules`, and `CLAUDE.md`.
|
|
48
|
-
|
|
49
|
-
## 🔄 Execution Flow
|
|
50
|
-
|
|
51
|
-
1. Confirm repo root and `core/` location.
|
|
52
|
-
2. Create `config/` if missing.
|
|
53
|
-
3. Copy `core/templates/project/project-config.yaml` to `config/project-config.yaml` if missing.
|
|
54
|
-
4. Copy `core/templates/project/project-structure.yaml` to `config/project-structure.yaml` if missing.
|
|
55
|
-
5. Ask for missing project fields or infer with `/detect-stack`.
|
|
56
|
-
6. Create required `project/` directories: tickets, backlog, bugs, sprints, releases, metrics, views, test-runs, verifications, incidents, prs.
|
|
57
|
-
7. Create required docs namespaces: `docs/project/` for project/product requirements and `docs/runtime/` for operational AI Core documentation.
|
|
58
|
-
8. Create `project/backlog/backlog.json` and `project/user-requests.jsonl` if missing.
|
|
59
|
-
9. Run `bash core/scripts/setup-project.sh` when shell access is available, or perform steps 2-8 manually.
|
|
60
|
-
10. Install root `scripts/` copies from canonical `core/scripts/` if they are missing.
|
|
61
|
-
11. Install portable `.github/workflows/ai-core-governance.yml` if missing.
|
|
62
|
-
12. Run `/sync-platforms` or `bash core/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 `core/` canonical
|
|
73
|
-
Generated `.claude/`, `.cursor/`, and `.windsurfrules` files are exports. Source changes belong in `core/`.
|
|
74
|
-
|
|
75
|
-
### RULE SP-003: No product code changes
|
|
76
|
-
Setup modifies AI runtime/config files only: `config/`, `project/`, `docs/project/`, `docs/runtime/`, generated platform config, and optional docs scaffolding. It MUST NOT modify production source code.
|
|
77
|
-
|
|
78
|
-
### RULE SP-004: State directories required
|
|
79
|
-
A project is not ready until `project/` contains directories for tickets, backlog, bugs, sprints, releases, metrics, views, test-runs, verifications, incidents, and prs.
|
|
80
|
-
|
|
81
|
-
### RULE SP-004a: User request log required
|
|
82
|
-
A project is not ready until `project/user-requests.jsonl` exists. Every AI-handled user request **MUST** be logged there before substantive work begins.
|
|
83
|
-
|
|
84
|
-
### RULE SP-005: `core` remains framework-only
|
|
85
|
-
Project-specific state and config MUST NOT be written under `core/`. Use `project/` and `config/`.
|
|
86
|
-
|
|
87
|
-
### RULE SP-006: `core/scripts` is canonical
|
|
88
|
-
Portable enforcement scripts live under `core/scripts/`. Root `scripts/` entries are install-time copies for developer convenience.
|
|
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 `core/`
|
|
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`
|
|
@@ -1,76 +0,0 @@
|
|
|
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.
|
|
3
|
-
|
|
4
|
-
state:
|
|
5
|
-
root: "project"
|
|
6
|
-
tickets: "project/tickets"
|
|
7
|
-
backlog: "project/backlog"
|
|
8
|
-
bugs: "project/bugs"
|
|
9
|
-
sprints: "project/sprints"
|
|
10
|
-
releases: "project/releases"
|
|
11
|
-
metrics: "project/metrics"
|
|
12
|
-
views: "project/views"
|
|
13
|
-
test_runs: "project/test-runs"
|
|
14
|
-
incidents: "project/incidents"
|
|
15
|
-
audit_log: "project/audit-log.jsonl"
|
|
16
|
-
|
|
17
|
-
project_docs:
|
|
18
|
-
root: "docs/project"
|
|
19
|
-
product: "docs/project/product"
|
|
20
|
-
planning: "docs/project/planning"
|
|
21
|
-
specs: "docs/project/specs"
|
|
22
|
-
user_stories: "docs/project/user-stories"
|
|
23
|
-
plans: "docs/project/plans"
|
|
24
|
-
requirements: "docs/project/requirements"
|
|
25
|
-
api: "docs/project/api"
|
|
26
|
-
|
|
27
|
-
runtime_docs:
|
|
28
|
-
root: "docs/runtime"
|
|
29
|
-
refactor: "docs/runtime/refactor"
|
|
30
|
-
adr: "docs/runtime/adr"
|
|
31
|
-
technical: "docs/runtime/technical"
|
|
32
|
-
runbooks: "docs/runtime/runbooks"
|
|
33
|
-
qa: "docs/runtime/qa"
|
|
34
|
-
test_runs: "docs/runtime/test-runs"
|
|
35
|
-
verifications: "docs/runtime/verifications"
|
|
36
|
-
incidents: "docs/runtime/incidents"
|
|
37
|
-
|
|
38
|
-
backlog:
|
|
39
|
-
source_of_truth: "project/backlog/backlog.json"
|
|
40
|
-
ticket_details: "project/tickets/TICKET-XXX.json"
|
|
41
|
-
generated_views: "project/views"
|
|
42
|
-
|
|
43
|
-
ticket_docs:
|
|
44
|
-
spec_path_field: "spec_path"
|
|
45
|
-
spec_dir: "docs/project/specs"
|
|
46
|
-
implementation_plan_path_field: "implementation_plan_path"
|
|
47
|
-
plan_dir: "docs/project/plans"
|
|
48
|
-
|
|
49
|
-
refactor:
|
|
50
|
-
plan_dir: "docs/runtime/refactor"
|
|
51
|
-
template: "core/templates/technical/refactor-plan-template.md"
|
|
52
|
-
requires_ticket_breakdown: true
|
|
53
|
-
requires_adr_when_architectural: true
|
|
54
|
-
|
|
55
|
-
release:
|
|
56
|
-
records: "project/releases/vX.Y.Z.json"
|
|
57
|
-
schema: "core/config/release.schema.json"
|
|
58
|
-
template: "core/templates/release/release-record-template.json"
|
|
59
|
-
requires_rollback_verification: true
|
|
60
|
-
requires_post_release_smoke: true
|
|
61
|
-
|
|
62
|
-
scripts:
|
|
63
|
-
canonical: "core/scripts"
|
|
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"
|
|
68
|
-
audit_log: "project/audit-log.jsonl"
|
|
69
|
-
|
|
70
|
-
ci:
|
|
71
|
-
governance_template: "core/templates/ci/ai-core-governance.yml"
|
|
72
|
-
app_templates: "core/templates/ci"
|
|
73
|
-
|
|
74
|
-
docs_policy:
|
|
75
|
-
project_override: "config/docs-policy.json"
|
|
76
|
-
default: "core/config/docs-policy.default.json"
|
|
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
|
|
File without changes
|
|
File without changes
|