ai-core-framework 0.1.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 (103) hide show
  1. package/.claude-plugin/plugin.json +21 -0
  2. package/.codex-plugin/plugin.json +35 -0
  3. package/.cursor-plugin/plugin.json +22 -0
  4. package/README.md +173 -0
  5. package/bin/ai-core-framework.js +110 -0
  6. package/core/README.md +162 -0
  7. package/core/agents/README.md +32 -0
  8. package/core/agents/business-analyst.md +269 -0
  9. package/core/agents/developer.md +375 -0
  10. package/core/agents/qa-tester.md +477 -0
  11. package/core/agents/scrum-master.md +136 -0
  12. package/core/agents/tech-lead.md +345 -0
  13. package/core/config/backlog.schema.json +38 -0
  14. package/core/config/docs-policy.default.json +37 -0
  15. package/core/config/release.schema.json +120 -0
  16. package/core/config/ticket.schema.json +253 -0
  17. package/core/rules/00-global-rules.md +373 -0
  18. package/core/rules/01-git-workflow.md +388 -0
  19. package/core/rules/02-code-quality.md +77 -0
  20. package/core/rules/03-security.md +78 -0
  21. package/core/rules/04-documentation.md +72 -0
  22. package/core/rules/05-testing-mandatory.md +374 -0
  23. package/core/rules/06-approval-gates.md +388 -0
  24. package/core/rules/07-definition-of-ready.md +112 -0
  25. package/core/rules/08-definition-of-done.md +149 -0
  26. package/core/scripts/ai-core.sh +456 -0
  27. package/core/scripts/generate-views.sh +210 -0
  28. package/core/scripts/install-codex-prompts.sh +127 -0
  29. package/core/scripts/log-user-request.sh +113 -0
  30. package/core/scripts/setup-project.sh +183 -0
  31. package/core/scripts/sync-platforms.sh +322 -0
  32. package/core/scripts/validate-audit-log.sh +73 -0
  33. package/core/scripts/validate-docs.sh +365 -0
  34. package/core/scripts/validate-permissions.sh +132 -0
  35. package/core/scripts/validate-state.sh +611 -0
  36. package/core/scripts/workflow.sh +513 -0
  37. package/core/skills/README.md +21 -0
  38. package/core/skills/ai-core-commands/SKILL.md +86 -0
  39. package/core/skills/brainstorming/SKILL.md +40 -0
  40. package/core/skills/development-implement-task/SKILL.md +308 -0
  41. package/core/skills/executing-ticket/SKILL.md +28 -0
  42. package/core/skills/git-branch-status/SKILL.md +56 -0
  43. package/core/skills/git-cleanup-branches/SKILL.md +57 -0
  44. package/core/skills/git-scan-untracked/SKILL.md +50 -0
  45. package/core/skills/meta-generate-views/SKILL.md +54 -0
  46. package/core/skills/meta-request-log/SKILL.md +61 -0
  47. package/core/skills/meta-sprint-report/SKILL.md +59 -0
  48. package/core/skills/meta-sync-platforms/SKILL.md +53 -0
  49. package/core/skills/meta-ticket-health/SKILL.md +61 -0
  50. package/core/skills/meta-validate-audit-log/SKILL.md +42 -0
  51. package/core/skills/meta-validate-docs/SKILL.md +58 -0
  52. package/core/skills/meta-validate-permissions/SKILL.md +53 -0
  53. package/core/skills/meta-validate-state/SKILL.md +58 -0
  54. package/core/skills/planning-analyze-requirements/SKILL.md +471 -0
  55. package/core/skills/planning-backlog-status/SKILL.md +57 -0
  56. package/core/skills/planning-document-existing-requirements/SKILL.md +246 -0
  57. package/core/skills/planning-estimate-task/SKILL.md +60 -0
  58. package/core/skills/planning-groom-ticket/SKILL.md +442 -0
  59. package/core/skills/planning-mark-ready/SKILL.md +111 -0
  60. package/core/skills/planning-plan-refactor/SKILL.md +66 -0
  61. package/core/skills/planning-plan-sprint/SKILL.md +112 -0
  62. package/core/skills/planning-prioritize-backlog/SKILL.md +62 -0
  63. package/core/skills/planning-write-plan/SKILL.md +68 -0
  64. package/core/skills/project-detect-stack/SKILL.md +71 -0
  65. package/core/skills/project-discover-codebase/SKILL.md +74 -0
  66. package/core/skills/project-setup-project/SKILL.md +113 -0
  67. package/core/skills/qa-bug-status/SKILL.md +52 -0
  68. package/core/skills/qa-report-bug/SKILL.md +518 -0
  69. package/core/skills/qa-smoke-test/SKILL.md +387 -0
  70. package/core/skills/qa-triage-bug/SKILL.md +62 -0
  71. package/core/skills/qa-verify-fix/SKILL.md +446 -0
  72. package/core/skills/release-hotfix/SKILL.md +117 -0
  73. package/core/skills/release-release/SKILL.md +123 -0
  74. package/core/skills/release-rollback/SKILL.md +62 -0
  75. package/core/skills/review-create-pr/SKILL.md +418 -0
  76. package/core/skills/review-merge-pr/SKILL.md +425 -0
  77. package/core/skills/review-techlead-review/SKILL.md +547 -0
  78. package/core/skills/using-ai-core/SKILL.md +72 -0
  79. package/core/skills/verification-before-done/SKILL.md +35 -0
  80. package/core/skills/writing-implementation-plan/SKILL.md +45 -0
  81. package/core/templates/ci/ai-core-governance.yml +112 -0
  82. package/core/templates/ci/node-pnpm.yml +35 -0
  83. package/core/templates/pm/retrospective-template.md +47 -0
  84. package/core/templates/pm/sprint-plan-template.md +45 -0
  85. package/core/templates/pr/pull-request-template.md +247 -0
  86. package/core/templates/project/CODEOWNERS +11 -0
  87. package/core/templates/project/docs-policy.json +3 -0
  88. package/core/templates/project/project-config.yaml +137 -0
  89. package/core/templates/project/project-structure.yaml +76 -0
  90. package/core/templates/qa/bug-report-template.md +371 -0
  91. package/core/templates/qa/test-plan-template.md +57 -0
  92. package/core/templates/release/release-record-template.json +67 -0
  93. package/core/templates/requirements/PRD-template.md +58 -0
  94. package/core/templates/requirements/user-story-template.md +381 -0
  95. package/core/templates/technical/ADR-template.md +46 -0
  96. package/core/templates/technical/refactor-plan-template.md +84 -0
  97. package/core/templates/technical/tech-design-template.md +71 -0
  98. package/core/workflows/bug-lifecycle.md +56 -0
  99. package/core/workflows/feature-lifecycle.md +347 -0
  100. package/core/workflows/hotfix-lifecycle.md +65 -0
  101. package/core/workflows/sprint-lifecycle.md +56 -0
  102. package/lib/install-codex.js +85 -0
  103. package/package.json +36 -0
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: planning-plan-sprint
3
+ description: Use when the user asks to run /plan-sprint, create or update a sprint plan, select READY tickets by capacity, or assign tickets to a sprint.
4
+ command: /plan-sprint
5
+ display_name: "Plan Sprint"
6
+ version: 1.0.0
7
+ status: READY
8
+ owner_agent: scrum-master
9
+ requires_agents:
10
+ - scrum-master
11
+ consults_agents:
12
+ - business-analyst
13
+ - tech-lead
14
+ - developer
15
+ - qa-tester
16
+ model_preference: sonnet
17
+ args:
18
+ - name: sprint_id
19
+ required: false
20
+ format: "SPRINT-XXX"
21
+ description: "Sprint ID to create or update"
22
+ preconditions:
23
+ - state_valid: true
24
+ - ready_tickets_exist: true
25
+ - capacity_configured: true
26
+ postconditions:
27
+ - sprint_plan_created: true
28
+ - selected_tickets_have_sprint_id: true
29
+ - capacity_not_exceeded_without_approval: true
30
+ ---
31
+
32
+ # /plan-sprint
33
+
34
+ > Creates an auditable sprint plan from READY tickets using capacity, priority, dependencies, and team availability.
35
+
36
+ ## 🎯 Purpose
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/`.
39
+
40
+ ## 🚦 Trigger
41
+
42
+ Manual at sprint planning:
43
+
44
+ - `/plan-sprint`
45
+ - `/plan-sprint SPRINT-008`
46
+
47
+ ## 📋 Preconditions, STRICT
48
+
49
+ 1. `config/project-config.yaml` exists.
50
+ 2. `/validate-state` passes.
51
+ 3. At least one ticket has status `READY`.
52
+ 4. Sprint capacity is configured under `scrum.sprint_capacity_points`.
53
+ 5. No selected ticket has unresolved blockers.
54
+ 6. Current active sprint is closed or explicitly being replanned.
55
+
56
+ ## 🔄 Execution Flow
57
+
58
+ 1. Load project config, tickets, bugs, and previous sprint metrics.
59
+ 2. Determine sprint ID, dates, capacity, and team availability.
60
+ 3. List eligible tickets with status `READY`.
61
+ 4. Remove tickets blocked by unresolved dependencies.
62
+ 5. Sort candidates by priority, dependency order, risk, and age.
63
+ 6. Select tickets until capacity is reached.
64
+ 7. Reserve capacity for bugs, review, QA, and operational work.
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.
67
+ 10. Update selected tickets with `sprint_id`.
68
+ 11. Append planning metrics to `project/metrics/sprint-planning.jsonl`.
69
+ 12. Output sprint goal, commitment, risks, and handoffs.
70
+
71
+ ## 🔒 Hard Rules
72
+
73
+ ### RULE PS-001: Only READY tickets enter sprint
74
+ Tickets in `DRAFT`, `GROOMED`, `IN_PROGRESS`, `IN_REVIEW`, `QA`, `DONE`, `BLOCKED`, or `CANCELLED` MUST NOT be newly committed.
75
+
76
+ ### RULE PS-002: Capacity must be respected
77
+ Committed story points MUST NOT exceed configured capacity unless a human explicitly approves and the risk is recorded.
78
+
79
+ ### RULE PS-003: Dependencies determine order
80
+ A ticket MUST NOT be selected before its `blocked_by` tickets are done or planned earlier with a clear sequence.
81
+
82
+ ### RULE PS-004: Sprint goal required
83
+ Every sprint plan MUST include a concise business goal, not just a list of tickets.
84
+
85
+ ### RULE PS-005: QA and review capacity reserved
86
+ The plan MUST reserve capacity for code review, QA, bug verification, and carryover.
87
+
88
+ ### RULE PS-006: Replanning must be explicit
89
+ Mid-sprint scope changes require SM approval, reason, removed/added items, and impact.
90
+
91
+ ## 📤 Outputs
92
+
93
+ Success includes:
94
+
95
+ - Sprint ID and dates
96
+ - Sprint goal
97
+ - Capacity summary
98
+ - Committed ticket list
99
+ - Risks and dependency notes
100
+ - Handoff to Developer for first `/implement-task`
101
+
102
+ Failure includes:
103
+
104
+ - Missing precondition
105
+ - Tickets requiring `/mark-ready`
106
+ - Capacity or dependency conflict
107
+
108
+ ## 🔗 Related Commands
109
+
110
+ - Before: `/mark-ready`, `/sprint-report`
111
+ - After: `/implement-task`, `/daily-standup`, `/sprint-report`
112
+ - Utility: `/validate-state`
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: planning-prioritize-backlog
3
+ description: Use when the user asks to run /prioritize-backlog, rank backlog items, apply MoSCoW/RICE/manual prioritization, or update backlog ordering.
4
+ command: /prioritize-backlog
5
+ display_name: "Prioritize Backlog"
6
+ version: 1.0.0
7
+ status: READY
8
+ owner_agent: business-analyst
9
+ consults_agents:
10
+ - tech-lead
11
+ - scrum-master
12
+ model_preference: opus
13
+ args:
14
+ - name: strategy
15
+ required: false
16
+ enum: [moscow, rice, manual]
17
+ default: moscow
18
+ preconditions:
19
+ - backlog_exists: "project/backlog/backlog.json"
20
+ postconditions:
21
+ - backlog_order_updated: true
22
+ ---
23
+
24
+ # /prioritize-backlog
25
+
26
+ > Updates backlog ranking in `project/backlog/backlog.json` using MoSCoW, RICE, dependencies, and stakeholder input.
27
+
28
+ ## 🎯 Purpose
29
+
30
+ Keep product priority separate from ticket detail state. The backlog file owns order. Ticket files own implementation detail and state history.
31
+
32
+ ## 🔄 Execution Flow
33
+
34
+ 1. Load backlog and ticket details.
35
+ 2. Validate all backlog ticket references exist.
36
+ 3. Apply chosen strategy: MoSCoW, RICE, or manual human-specified order.
37
+ 4. Consider dependencies and blocked tickets.
38
+ 5. Produce proposed rank changes.
39
+ 6. Ask for confirmation before writing.
40
+ 7. Update `rank`, `priority`, scoring notes, `updated_at`, and `updated_by`.
41
+ 8. Run `/generate-views`.
42
+
43
+ ## 🔒 Hard Rules
44
+
45
+ - MUST NOT rewrite ticket AC or technical approach.
46
+ - MUST preserve every backlog item unless user confirms removal.
47
+ - MUST put blocked dependencies before dependent work.
48
+ - MUST log rationale for major priority changes.
49
+
50
+ ## 📤 Outputs
51
+
52
+ - New backlog order
53
+ - Changed ranks
54
+ - Priority rationale
55
+ - Risk notes
56
+ - Next command recommendations
57
+
58
+ ## 🔗 Related Commands
59
+
60
+ - `/backlog-status`
61
+ - `/generate-views`
62
+ - `/plan-sprint`
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: planning-write-plan
3
+ description: Use when the user asks to run /write-plan, create an implementation plan for a groomed ticket, break down technical work, or prepare a ticket for development.
4
+ command: /write-plan
5
+ display_name: "Write Implementation Plan"
6
+ version: 1.0.0
7
+ status: READY
8
+ owner_agent: tech-lead
9
+ requires_agents:
10
+ - tech-lead
11
+ consults_agents:
12
+ - developer
13
+ - qa-tester
14
+ model_preference: opus
15
+ args:
16
+ - name: ticket_id
17
+ required: true
18
+ format: "TICKET-XXX"
19
+ preconditions:
20
+ - ticket_exists: true
21
+ - ticket_status_in:
22
+ - GROOMED
23
+ - READY
24
+ postconditions:
25
+ - implementation_plan_created: true
26
+ - ticket_links_plan: true
27
+ ---
28
+
29
+ # /write-plan
30
+
31
+ > Create a detailed implementation plan in `docs/project/plans/` and link it from the ticket.
32
+
33
+ ## Purpose
34
+
35
+ Turn a groomed or ready ticket into a concrete execution plan before coding starts. This gives AI agents exact scope, files, tests, docs, and verification steps.
36
+
37
+ ## Chat Usage
38
+
39
+ ```text
40
+ /write-plan TICKET-001
41
+ ```
42
+
43
+ ## Execution Flow
44
+
45
+ 1. Read `project/tickets/TICKET-XXX.json`.
46
+ 2. Read `spec_path` if present.
47
+ 3. Inspect relevant code/docs just enough to identify affected files and test strategy.
48
+ 4. Create `docs/project/plans/TICKET-XXX-<slug>-plan.md`.
49
+ 5. Link the plan from the ticket as `implementation_plan_path`.
50
+ 6. Add a ticket comment noting the plan path.
51
+ 7. Validate state.
52
+ 8. Suggest `/implement-task TICKET-XXX`.
53
+
54
+ ## Hard Rules
55
+
56
+ - MUST NOT modify production code.
57
+ - MUST NOT create vague plan steps.
58
+ - MUST include exact verification expectations where known.
59
+ - MUST include documentation obligations.
60
+ - MUST include rollback notes for risky behavior, migration, data, auth, billing, or deployment changes.
61
+ - MUST stop and ask if the ticket is too ambiguous to plan.
62
+
63
+ ## Output
64
+
65
+ - plan path
66
+ - linked ticket
67
+ - validation result
68
+ - suggested next command
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: project-detect-stack
3
+ description: Use when the user asks to run /detect-stack, identify the project's technology stack, inspect dependencies and build tools, or propose project config updates from repository evidence.
4
+ command: /detect-stack
5
+ display_name: "Detect Stack"
6
+ version: 1.0.0
7
+ status: READY
8
+ owner_agent: tech-lead
9
+ model_preference: sonnet
10
+ args: []
11
+ preconditions:
12
+ - repository_readable: true
13
+ postconditions:
14
+ - stack_report_generated: true
15
+ - project_config_update_proposed: true
16
+ ---
17
+
18
+ # /detect-stack
19
+
20
+ > Detect language, framework, package manager, database, test runner, and quality commands.
21
+
22
+ ## 🎯 Purpose
23
+
24
+ Populate or validate `config/project-config.yaml` from actual repository evidence instead of guesses.
25
+
26
+ ## 🚦 Trigger
27
+
28
+ - `/detect-stack`
29
+ - Usually invoked during `/setup-project`
30
+
31
+ ## 📋 Preconditions, STRICT
32
+
33
+ 1. Run from project root.
34
+ 2. Repository files are readable.
35
+ 3. Do not modify config unless user approves or command is explicitly in update mode.
36
+
37
+ ## 🔄 Execution Flow
38
+
39
+ 1. Inspect dependency files such as `package.json`, `pnpm-lock.yaml`, `pyproject.toml`, `requirements.txt`, `go.mod`, `pom.xml`, `build.gradle`, `Cargo.toml`.
40
+ 2. Detect primary language and runtime.
41
+ 3. Detect framework from dependencies and folder structure.
42
+ 4. Detect package manager from lock files.
43
+ 5. Detect test runner, lint command, type check command, and build command.
44
+ 6. Detect database and infra dependencies from config, compose files, and env examples.
45
+ 7. Compare detected values with `project-config.yaml`.
46
+ 8. Output proposed config patch and confidence per field.
47
+ 9. If approved, update config and recommend `/sync-platforms`.
48
+
49
+ ## 🔒 Hard Rules
50
+
51
+ ### RULE DS-001: Evidence over assumptions
52
+ Every detected field MUST cite evidence path or be marked `unknown`.
53
+
54
+ ### RULE DS-002: Do not invent commands
55
+ Only list test/lint/build commands that exist in project config files or scripts.
56
+
57
+ ### RULE DS-003: Preserve manual config
58
+ Do not overwrite user-defined config without explicit approval.
59
+
60
+ ## 📤 Outputs
61
+
62
+ - Detected stack table
63
+ - Confidence and evidence
64
+ - Suggested config changes
65
+ - Unknowns requiring user input
66
+
67
+ ## 🔗 Related Commands
68
+
69
+ - `/setup-project`
70
+ - `/discover-codebase`
71
+ - `/sync-platforms`
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: project-discover-codebase
3
+ description: Use when the user asks to run /discover-codebase, map an unfamiliar codebase, document architecture notes, inspect project structure, or gather repository context for AI Core.
4
+ command: /discover-codebase
5
+ display_name: "Discover Codebase"
6
+ version: 1.0.0
7
+ status: READY
8
+ owner_agent: tech-lead
9
+ model_preference: opus
10
+ args: []
11
+ preconditions:
12
+ - repository_readable: true
13
+ - stack_detected_or_known: true
14
+ postconditions:
15
+ - codebase_map_generated: true
16
+ - architecture_notes_updated: true
17
+ ---
18
+
19
+ # /discover-codebase
20
+
21
+ > Build a concise map of modules, boundaries, data flow, test layout, and operational entry points.
22
+
23
+ ## 🎯 Purpose
24
+
25
+ Give AI agents shared context before implementation and review. The output helps agents find the right files, understand architecture boundaries, and avoid accidental scope creep.
26
+
27
+ ## 🚦 Trigger
28
+
29
+ - `/discover-codebase`
30
+ - Recommended after `/detect-stack`
31
+
32
+ ## 📋 Preconditions, STRICT
33
+
34
+ 1. Repository is readable.
35
+ 2. Generated/vendor/build directories are excluded.
36
+ 3. Sensitive files such as `.env` are not read.
37
+
38
+ ## 🔄 Execution Flow
39
+
40
+ 1. Load `config/project-config.yaml`.
41
+ 2. Enumerate top-level directories and identify application, test, config, docs, scripts, and infra areas.
42
+ 3. Identify entry points, routes/controllers, domain modules, data access, jobs/workers, and shared libraries.
43
+ 4. Identify test layout and command coverage.
44
+ 5. Identify architecture docs and ADRs.
45
+ 6. Identify external integrations and environment assumptions.
46
+ 7. Produce `project/codebase-map.md` or update existing map with timestamp.
47
+ 8. List risks, missing docs, and recommended follow-up tickets.
48
+
49
+ ## 🔒 Hard Rules
50
+
51
+ ### RULE DC-001: Do not read secrets
52
+ Never open `.env`, private keys, or credential files. Use `.env.example` only.
53
+
54
+ ### RULE DC-002: Do not modify production code
55
+ Discovery is read-only except writing framework state/docs.
56
+
57
+ ### RULE DC-003: Keep map concise
58
+ The map should help navigation, not duplicate source code.
59
+
60
+ ## 📤 Outputs
61
+
62
+ - Module map
63
+ - Entry points
64
+ - Test map
65
+ - Architecture notes
66
+ - Integration list
67
+ - Missing documentation risks
68
+
69
+ ## 🔗 Related Commands
70
+
71
+ - `/setup-project`
72
+ - `/detect-stack`
73
+ - `/groom-ticket`
74
+ - `/implement-task`
@@ -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 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`
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: qa-bug-status
3
+ description: Use when the user asks to run /bug-status, summarize bug state, report open/fixed/verified bugs, or inspect QA bug tracking data.
4
+ command: /bug-status
5
+ display_name: "Bug Status"
6
+ version: 1.0.0
7
+ status: READY
8
+ owner_agent: qa-tester
9
+ model_preference: sonnet
10
+ args: []
11
+ preconditions:
12
+ - bug_state_readable: true
13
+ postconditions:
14
+ - bug_report_generated: true
15
+ ---
16
+
17
+ # /bug-status
18
+
19
+ > Summarizes open bugs by severity, priority, status, age, owner, and release impact.
20
+
21
+ ## 🎯 Purpose
22
+
23
+ Give QA, Scrum Master, and Tech Lead a clear picture of defect health.
24
+
25
+ ## 🔄 Execution Flow
26
+
27
+ 1. Load `project/bugs/*.json`.
28
+ 2. Group bugs by severity and status.
29
+ 3. Identify stale bugs and missing owners.
30
+ 4. Identify release-blocking bugs.
31
+ 5. Summarize recent fixes awaiting verification.
32
+ 6. Recommend next commands.
33
+
34
+ ## 🔒 Hard Rules
35
+
36
+ - MUST highlight SEV-1 and SEV-2 first.
37
+ - MUST flag bugs without reproducer, owner, or priority.
38
+ - MUST separate open bugs from verified/closed bugs.
39
+
40
+ ## 📤 Outputs
41
+
42
+ - Bug count by severity
43
+ - Bug count by status
44
+ - Release blockers
45
+ - Verification queue
46
+ - Stale bugs
47
+
48
+ ## 🔗 Related Commands
49
+
50
+ - `/report-bug`
51
+ - `/triage-bug`
52
+ - `/verify-fix`