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,21 @@
1
+ {
2
+ "name": "ai-core",
3
+ "description": "Enterprise AI SDLC framework: chat-first workflow commands, role agents, project state, docs governance, and validation gates.",
4
+ "version": "0.1.0",
5
+ "author": {
6
+ "name": "AI Core"
7
+ },
8
+ "license": "MIT",
9
+ "keywords": [
10
+ "sdlc",
11
+ "enterprise",
12
+ "agents",
13
+ "workflow",
14
+ "governance",
15
+ "skills"
16
+ ],
17
+ "skills": "./core/skills/",
18
+ "agents": "./core/agents/",
19
+ "commands": "./core/commands/",
20
+ "hooks": "./hooks/hooks.json"
21
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "ai-core",
3
+ "version": "0.1.0",
4
+ "description": "Chat-first enterprise AI SDLC framework with agents, workflow commands, project state, docs governance, and validation gates.",
5
+ "author": {
6
+ "name": "AI Core"
7
+ },
8
+ "license": "MIT",
9
+ "keywords": [
10
+ "sdlc",
11
+ "enterprise",
12
+ "agentic-workflow",
13
+ "agile",
14
+ "governance",
15
+ "skills"
16
+ ],
17
+ "skills": "./core/skills/",
18
+ "interface": {
19
+ "displayName": "AI Core",
20
+ "shortDescription": "Enterprise AI SDLC workflow with tickets, docs, validation, and guided chat commands",
21
+ "longDescription": "Use AI Core to guide AI agents through requirement intake, grooming, implementation planning, development, review, QA, release governance, documentation enforcement, and project-state tracking.",
22
+ "developerName": "AI Core",
23
+ "category": "Coding",
24
+ "capabilities": [
25
+ "Interactive",
26
+ "Read",
27
+ "Write"
28
+ ],
29
+ "defaultPrompt": [
30
+ "Set up AI Core for this project.",
31
+ "Analyze this requirement and create a managed ticket."
32
+ ],
33
+ "brandColor": "#2563EB"
34
+ }
35
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "ai-core",
3
+ "displayName": "AI Core",
4
+ "description": "Enterprise AI SDLC framework: chat-first workflow commands, role agents, project state, docs governance, and validation gates.",
5
+ "version": "0.1.0",
6
+ "author": {
7
+ "name": "AI Core"
8
+ },
9
+ "license": "MIT",
10
+ "keywords": [
11
+ "sdlc",
12
+ "enterprise",
13
+ "agents",
14
+ "workflow",
15
+ "governance",
16
+ "skills"
17
+ ],
18
+ "skills": "./core/skills/",
19
+ "agents": "./core/agents/",
20
+ "commands": "./core/commands/",
21
+ "hooks": "./hooks/hooks-cursor.json"
22
+ }
package/README.md ADDED
@@ -0,0 +1,173 @@
1
+
2
+ ## Install with npx
3
+
4
+ AI Core can be installed into a project as an npm-powered CLI:
5
+
6
+ ```bash
7
+ npx ai-core-framework
8
+ ```
9
+
10
+ Run the command from the root of the project that should receive AI Core. The
11
+ installer asks which AI CLI to target. Version 0.1 supports Codex and copies the
12
+ contents of this repo's `core/` directory directly into the target project's
13
+ `.codex/` directory:
14
+
15
+ ```text
16
+ .codex/
17
+ agents/
18
+ config/
19
+ rules/
20
+ scripts/
21
+ skills/
22
+ templates/
23
+ workflows/
24
+ README.md
25
+ ```
26
+
27
+ If a destination file already exists, the installer asks whether to overwrite,
28
+ skip, or cancel. Pressing Enter at a conflict prompt skips the file.
29
+
30
+ ---
31
+
32
+ ## 📊 Phase 1 Status (2026-04-18)
33
+
34
+ **10/10 Priority 1 files completed** — production-ready content.
35
+
36
+ ### Completed files (Phase 0 + Phase 1)
37
+
38
+ **Agents** (all 5 complete):
39
+ - ✅ business-analyst.md (Phase 0)
40
+ - ✅ tech-lead.md (Phase 1)
41
+ - ✅ developer.md (Phase 1)
42
+ - ✅ qa-tester.md (placeholder, Phase 2)
43
+ - ✅ scrum-master.md (placeholder, Phase 2)
44
+
45
+ **Rules** (3/10 complete):
46
+ - ✅ 00-global-rules.md (Phase 0)
47
+ - ✅ 01-git-workflow.md (Phase 1)
48
+ - ✅ 05-testing-mandatory.md (Phase 1)
49
+ - ✅ 07-definition-of-ready.md (Phase 0)
50
+ - ✅ 08-definition-of-done.md (Phase 0)
51
+ - 📝 Others: placeholders (Phase 2+)
52
+
53
+ **Commands** (5/15+ complete):
54
+ - ✅ planning/analyze-requirements.md (Phase 1)
55
+ - ✅ planning/groom-ticket.md (Phase 1)
56
+ - ✅ development/implement-task.md (Phase 0)
57
+ - ✅ review/create-pr.md (Phase 1)
58
+ - ✅ review/techlead-review.md (Phase 1)
59
+ - 📝 Others: placeholders (Phase 2+)
60
+
61
+ **Templates** (2/4 complete):
62
+ - ✅ pr/pull-request-template.md (Phase 1)
63
+ - ✅ requirements/user-story-template.md (Phase 1)
64
+ - 📝 Others: placeholders
65
+
66
+ ### Total content
67
+ - **4,105 lines** of production-quality specification across Phase 1 files alone
68
+ - All files follow consistent structure: YAML frontmatter, purpose, hard rules, flow, examples, metrics
69
+ - Cross-references between files validated
70
+ - Sync script tested & working
71
+
72
+ ---
73
+
74
+ ## 📊 Phase 2 Status (2026-04-18)
75
+
76
+ **7/7 Priority 2 files completed** — QA flow + state enforcement.
77
+
78
+ ### Completed files (Phase 2)
79
+
80
+ **Agents**:
81
+ - ✅ qa-tester.md — Full QA agent (10 hard rules QA-001 to QA-010)
82
+
83
+ **Commands**:
84
+ - ✅ review/merge-pr.md — Merge gate (10 hard rules MP-001 to MP-010)
85
+ - ✅ qa/smoke-test.md — Feature verification (10 hard rules SM-001 to SM-010)
86
+ - ✅ qa/verify-fix.md — Bug fix verification (10 hard rules VF-001 to VF-010)
87
+ - ✅ qa/report-bug.md — Bug filing (10 hard rules RB-001 to RB-010)
88
+
89
+ **Rules**:
90
+ - ✅ 06-approval-gates.md — State machine enforcement (10 hard rules AG-001 to AG-010)
91
+
92
+ **Templates**:
93
+ - ✅ qa/bug-report-template.md — Comprehensive bug template with severity justification
94
+
95
+ ### Total Phase 2 content
96
+ - **3,002 lines** of production-quality specification
97
+ - Full state machine documented with allowed/forbidden transitions
98
+ - Complete happy path now covered: DRAFT → GROOMED → READY → IN_PROGRESS → IN_REVIEW → QA → DONE
99
+ - Bug flow covered: report → triage → fix → verify
100
+
101
+ ### Combined Phase 1 + Phase 2 stats
102
+ - **21 files production-ready** (~9,500 lines)
103
+ - **All 5 agents complete** (BA, Tech Lead, Developer, QA, Scrum Master placeholder)
104
+ - **9 commands complete** (analyze, groom, implement, create-pr, techlead-review, merge-pr, smoke-test, verify-fix, report-bug)
105
+ - **6 rules complete** (global, git, testing, approval-gates, DoR, DoD)
106
+ - **3 templates complete** (user story, PR, bug report)
107
+
108
+ ### Happy path E2E now possible:
109
+ ```
110
+ BA: /analyze-requirements "Add feature X"
111
+ → creates TICKET-042 (DRAFT)
112
+ Tech Lead: /groom-ticket TICKET-042
113
+ → DRAFT → GROOMED (estimated, risks identified)
114
+ SM: /mark-ready TICKET-042 (Phase 3)
115
+ → GROOMED → READY
116
+ Dev: /implement-task TICKET-042
117
+ → READY → IN_PROGRESS (TDD)
118
+ Dev: /create-pr
119
+ → IN_PROGRESS → IN_REVIEW (quality gates passed)
120
+ Tech Lead: /techlead-review 123
121
+ → approval or request changes
122
+ Tech Lead: /merge-pr 123
123
+ → IN_REVIEW → QA (merged to develop)
124
+ QA: /smoke-test TICKET-042
125
+ → QA → DONE (verified in staging)
126
+ ```
127
+
128
+ ## Enterprise Enforcement Additions
129
+
130
+ The framework now includes mechanical gates beyond prompt-level rules:
131
+
132
+ - `scripts/validate-state.sh` validates ticket state transitions, backlog rank integrity, dependency ordering, blocked-ticket unblock evidence, DONE-ticket DoD fields, QA evidence, and release governance records.
133
+ - `scripts/validate-docs.sh` validates documentation obligations from diffs and ticket metadata, including API docs, README/setup docs, migration runbooks, ADRs, changelog/release notes, and DONE-ticket documentation evidence.
134
+ - `scripts/validate-permissions.sh` validates state-history command execution against `core/commands/**` role metadata and blocks obvious self-approval.
135
+ - `core/scripts/` is now the canonical portable script source. Root `scripts/` copies are installed for convenience by setup.
136
+ - `core/scripts/ai-core.sh` is a lightweight command runner that checks command role metadata before dispatching executable handlers.
137
+ - `core/scripts/workflow.sh` provides executable state-transition handlers for `/analyze-requirements`, `/groom-ticket`, `/mark-ready`, `/implement-task`, `/create-pr`, `/merge-pr`, `/smoke-test`, and `/release`.
138
+ - `core/skills/` provides chat-first behavior guidance inspired by skill-based systems: AI Core bootstrap, brainstorming, implementation planning, ticket execution, and verification-before-done.
139
+ - `/analyze-requirements` can create a linked spec in `docs/project/specs/`; `/write-plan` creates a linked implementation plan in `docs/project/plans/`.
140
+ - `core/scripts/validate-audit-log.sh` validates the hash chain in `project/audit-log.jsonl`; executable workflow handlers append audit records.
141
+ - `core/scripts/log-user-request.sh` appends every AI-handled user request to `project/user-requests.jsonl` so the user can review what they asked for.
142
+ - `/request-log` shows recent entries from `project/user-requests.jsonl`.
143
+ - `core/scripts/install-codex-prompts.sh` installs AI Core commands as Codex custom slash prompts in `~/.codex/prompts`.
144
+ - `CODEOWNERS` adds review ownership defaults for `core/`, `config/`, `project/`, ADRs, runbooks, and workflows.
145
+ - `config/docs-policy.json` can override documentation detection paths from `core/config/docs-policy.default.json`.
146
+ - `.github/workflows/ai-core-governance.yml` is the portable governance workflow. App CI remains stack-specific and can be replaced with templates from `core/templates/ci/`.
147
+ - `scripts/setup-project.sh` and `core/scripts/setup-project.sh` make copied `core/` installs executable: project config, runtime state folders, docs folders, backlog seed file, platform sync, and state validation.
148
+ - `.github/workflows/ci.yml` and `.github/workflows/validate-state.yml` run AI Core governance checks in CI.
149
+ - `.githooks/pre-commit` runs documentation gates before commit after hooks are installed with `bash scripts/install-hooks.sh`.
150
+ - `core/config/release.schema.json` and `core/templates/release/release-record-template.json` define release approval, rollback, QA, security, and known-issue evidence.
151
+ - `scripts/generate-views.sh` now produces dashboard and release readiness views in `project/views/`.
152
+
153
+ Chat-first setup flow:
154
+
155
+ ```text
156
+ /setup-project
157
+ /validate-state
158
+ /validate-docs
159
+ /validate-permissions
160
+ /generate-views
161
+ /analyze-requirements "User can reset password"
162
+ ```
163
+
164
+ Guided workflow mode:
165
+
166
+ ```text
167
+ guide /analyze-requirements "User can reset password"
168
+ next TICKET-001
169
+ ```
170
+
171
+ The normal interface is the AI chat window. The AI should infer the correct role from command metadata (`owner_agent` / `requires_agents`) and may use `core/scripts/ai-core.sh` internally for deterministic execution and validation. Users should not need to type `bash ...` or `AI_AGENT=...`.
172
+
173
+ `guide` runs one step, reports the completed command, ticket state before/after, updated `project` files, validation results, and the suggested next chat command. It asks before continuing and does not auto-run steps that still need placeholders such as `<story_points>` or `<pr_url>`.
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('node:fs');
4
+ const path = require('node:path');
5
+ const readline = require('node:readline/promises');
6
+ const { stdin, stdout } = require('node:process');
7
+
8
+ const { installCodex } = require('../lib/install-codex');
9
+
10
+ const packageRoot = path.resolve(__dirname, '..');
11
+ const sourceCoreDir = path.join(packageRoot, 'core');
12
+
13
+ function normalizeAnswer(answer) {
14
+ return answer.trim().toLowerCase();
15
+ }
16
+
17
+ async function askConflict(rl, question) {
18
+ const answer = normalizeAnswer(await rl.question(`${question} [skip/overwrite/cancel] `));
19
+
20
+ if (answer === 'o' || answer === 'overwrite') {
21
+ return 'overwrite';
22
+ }
23
+
24
+ if (answer === 'c' || answer === 'cancel') {
25
+ return 'cancel';
26
+ }
27
+
28
+ return 'skip';
29
+ }
30
+
31
+ async function chooseCli(rl) {
32
+ stdout.write('Which CLI do you want to install AI Core for?\n');
33
+ stdout.write(' 1. Codex\n\n');
34
+
35
+ const answer = normalizeAnswer(await rl.question('Select an option [1]: '));
36
+
37
+ if (answer === '' || answer === '1' || answer === 'codex') {
38
+ return 'codex';
39
+ }
40
+
41
+ throw new Error(`Unsupported CLI selection: ${answer}`);
42
+ }
43
+
44
+ async function confirmInstall(rl, targetDir) {
45
+ const answer = normalizeAnswer(
46
+ await rl.question(`Install AI Core into ${path.join(targetDir, '.codex')}? [Y/n] `),
47
+ );
48
+
49
+ return answer === '' || answer === 'y' || answer === 'yes';
50
+ }
51
+
52
+ async function main() {
53
+ const targetDir = process.cwd();
54
+ const rl = createPrompter();
55
+
56
+ try {
57
+ if (!fs.existsSync(sourceCoreDir)) {
58
+ throw new Error(`Package is missing core assets: ${sourceCoreDir}`);
59
+ }
60
+
61
+ const selectedCli = await chooseCli(rl);
62
+
63
+ if (selectedCli !== 'codex') {
64
+ throw new Error(`Unsupported CLI: ${selectedCli}`);
65
+ }
66
+
67
+ if (!(await confirmInstall(rl, targetDir))) {
68
+ stdout.write('Installation cancelled.\n');
69
+ return;
70
+ }
71
+
72
+ const result = await installCodex({
73
+ targetDir,
74
+ sourceCoreDir,
75
+ confirm: (question) => askConflict(rl, question),
76
+ });
77
+
78
+ stdout.write('\nAI Core installed for Codex.\n');
79
+ stdout.write(`Target: ${result.targetDir}\n`);
80
+ stdout.write(`Copied: ${result.copied}\n`);
81
+ stdout.write(`Overwritten: ${result.overwritten}\n`);
82
+ stdout.write(`Skipped: ${result.skipped}\n`);
83
+ } finally {
84
+ rl.close();
85
+ }
86
+ }
87
+
88
+ function createPrompter() {
89
+ if (stdin.isTTY) {
90
+ return readline.createInterface({ input: stdin, output: stdout });
91
+ }
92
+
93
+ const answers = fs.readFileSync(0, 'utf8').split(/\r?\n/);
94
+ let index = 0;
95
+
96
+ return {
97
+ async question(prompt) {
98
+ stdout.write(prompt);
99
+ const answer = answers[index] || '';
100
+ index += 1;
101
+ return answer;
102
+ },
103
+ close() {},
104
+ };
105
+ }
106
+
107
+ main().catch((error) => {
108
+ console.error(`Error: ${error.message}`);
109
+ process.exitCode = 1;
110
+ });
package/core/README.md ADDED
@@ -0,0 +1,162 @@
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.
@@ -0,0 +1,32 @@
1
+ # 🎭 Agents Directory
2
+
3
+ Each `.md` file defines one agent persona.
4
+
5
+ ## Standard Format (YAML frontmatter)
6
+
7
+ ```yaml
8
+ ---
9
+ name: agent-name
10
+ display_name: "Human Readable Name"
11
+ role: ROLE_CODE
12
+ version: 1.0.0
13
+ model_preference: opus | sonnet | haiku
14
+ can_invoke_commands: [...]
15
+ cannot_invoke_commands: [...]
16
+ read_access: [...]
17
+ write_access: [...]
18
+ escalates_to: other-agent
19
+ ---
20
+ ```
21
+
22
+ ## Gold standard
23
+
24
+ See `business-analyst.md` for a full example.
25
+
26
+ ## Available agents
27
+
28
+ - `business-analyst.md` - BA + PM (combined for small teams)
29
+ - `tech-lead.md` - Tech Lead + Architect + Security
30
+ - `developer.md` - Developer
31
+ - `qa-tester.md` - QA
32
+ - `scrum-master.md` - SM + DevOps