@agentic15.com/agentic15-claude-zen 1.0.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 (88) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/LICENSE +201 -0
  3. package/README.md +204 -0
  4. package/bin/create-agentic15-claude-zen.js +201 -0
  5. package/dist/hooks/auto-format.js +2 -0
  6. package/dist/hooks/check-pending-reviews.js +2 -0
  7. package/dist/hooks/complete-task.js +2 -0
  8. package/dist/hooks/detect-pending-reviews.js +2 -0
  9. package/dist/hooks/enforce-hard-requirements.js +2 -0
  10. package/dist/hooks/enforce-migration-workflow.js +2 -0
  11. package/dist/hooks/enforce-plan-template.js +2 -0
  12. package/dist/hooks/enforce-structured-development.js +2 -0
  13. package/dist/hooks/enforce-test-pyramid.js +2 -0
  14. package/dist/hooks/init-task-tracker.js +2 -0
  15. package/dist/hooks/performance-cache.js +2 -0
  16. package/dist/hooks/prevent-read-bypass.js +2 -0
  17. package/dist/hooks/session-start-context.js +2 -0
  18. package/dist/hooks/start-task.js +2 -0
  19. package/dist/hooks/task-status.js +2 -0
  20. package/dist/hooks/validate-component-contract.js +2 -0
  21. package/dist/hooks/validate-database-changes.js +2 -0
  22. package/dist/hooks/validate-e2e-coverage.js +2 -0
  23. package/dist/hooks/validate-git-workflow.js +2 -0
  24. package/dist/hooks/validate-integration-site.js +2 -0
  25. package/dist/hooks/validate-migration-impact.js +2 -0
  26. package/dist/hooks/validate-task-completion.js +2 -0
  27. package/dist/hooks/validate-test-quality.js +2 -0
  28. package/dist/hooks/validate-test-results.js +2 -0
  29. package/dist/hooks/validate-ui-integration.js +2 -0
  30. package/dist/hooks/validate-ui-runtime.js +2 -0
  31. package/dist/hooks/validate-ui-syntax.js +2 -0
  32. package/dist/hooks/validate-ui-visual-native.js +2 -0
  33. package/dist/hooks/validate-ui-visual.js +2 -0
  34. package/dist/hooks/validate-visual-regression.js +2 -0
  35. package/dist/index.js +24 -0
  36. package/dist/index.js.map +7 -0
  37. package/dist/scripts/add-version-headers.js +2 -0
  38. package/dist/scripts/help.js +2 -0
  39. package/dist/scripts/plan-amend.js +2 -0
  40. package/dist/scripts/plan-create.js +2 -0
  41. package/dist/scripts/plan-generate.js +2 -0
  42. package/dist/scripts/plan-help.js +2 -0
  43. package/dist/scripts/plan-init.js +2 -0
  44. package/dist/scripts/plan-manager.js +2 -0
  45. package/dist/scripts/pre-publish-checklist.js +2 -0
  46. package/dist/scripts/production-test.js +2 -0
  47. package/dist/scripts/profile-hooks.js +2 -0
  48. package/dist/scripts/setup-git-hooks.js +2 -0
  49. package/dist/scripts/task-done.js +2 -0
  50. package/dist/scripts/task-merge.js +2 -0
  51. package/dist/scripts/task-next.js +2 -0
  52. package/dist/scripts/task-start.js +2 -0
  53. package/dist/scripts/task-status.js +2 -0
  54. package/dist/scripts/verify-hooks.js +2 -0
  55. package/package.json +61 -0
  56. package/src/core/DependencyInstaller.js +41 -0
  57. package/src/core/GitInitializer.js +45 -0
  58. package/src/core/HookInstaller.js +54 -0
  59. package/src/core/ProjectInitializer.js +105 -0
  60. package/src/core/TemplateManager.js +159 -0
  61. package/src/index.js +56 -0
  62. package/templates/.babelrc +6 -0
  63. package/templates/.claude/CLAUDE.md +408 -0
  64. package/templates/.claude/ONBOARDING.md +723 -0
  65. package/templates/.claude/PLAN-SCHEMA.json +240 -0
  66. package/templates/.claude/POST-INSTALL.md +248 -0
  67. package/templates/.claude/PROJECT-PLAN-TEMPLATE.json +223 -0
  68. package/templates/.claude/hooks/enforce-plan-template.js +106 -0
  69. package/templates/.claude/hooks/session-start-context.js +130 -0
  70. package/templates/.claude/hooks/validate-git-workflow.js +74 -0
  71. package/templates/.claude/settings.json +262 -0
  72. package/templates/.gitignore +14 -0
  73. package/templates/Agent/.gitkeep +3 -0
  74. package/templates/README.md +76 -0
  75. package/templates/__mocks__/fileMock.js +9 -0
  76. package/templates/jest.config.js +48 -0
  77. package/templates/jest.setup.js +13 -0
  78. package/templates/package.json +40 -0
  79. package/templates/scripts/.gitkeep +3 -0
  80. package/templates/test-site/README.md +271 -0
  81. package/templates/test-site/index.html +13 -0
  82. package/templates/test-site/package.json +25 -0
  83. package/templates/test-site/server.js +125 -0
  84. package/templates/test-site/src/App.css +130 -0
  85. package/templates/test-site/src/App.jsx +78 -0
  86. package/templates/test-site/src/index.css +39 -0
  87. package/templates/test-site/src/main.jsx +10 -0
  88. package/templates/test-site/vite.config.js +12 -0
@@ -0,0 +1,240 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Project Plan Schema",
4
+ "description": "Hierarchical project plan with SDLC state machine",
5
+ "type": "object",
6
+ "required": ["version", "project"],
7
+ "properties": {
8
+ "version": {
9
+ "type": "string",
10
+ "const": "2.0",
11
+ "description": "Schema version"
12
+ },
13
+ "project": {
14
+ "type": "object",
15
+ "required": ["id", "name", "description", "status", "subprojects"],
16
+ "properties": {
17
+ "id": {
18
+ "type": "string",
19
+ "pattern": "^PROJ-[0-9]{3}$"
20
+ },
21
+ "name": {
22
+ "type": "string",
23
+ "minLength": 1
24
+ },
25
+ "description": {
26
+ "type": "string"
27
+ },
28
+ "status": {
29
+ "type": "string",
30
+ "enum": ["planning", "active", "on-hold", "completed", "cancelled"]
31
+ },
32
+ "createdAt": {
33
+ "type": "string",
34
+ "format": "date-time"
35
+ },
36
+ "createdBy": {
37
+ "type": "string"
38
+ },
39
+ "locked": {
40
+ "type": "boolean"
41
+ },
42
+ "lockedAt": {
43
+ "type": "string",
44
+ "format": "date-time"
45
+ },
46
+ "subprojects": {
47
+ "type": "array",
48
+ "items": {
49
+ "$ref": "#/definitions/subproject"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ },
55
+ "definitions": {
56
+ "subproject": {
57
+ "type": "object",
58
+ "required": ["id", "name", "description", "status", "milestones"],
59
+ "properties": {
60
+ "id": {
61
+ "type": "string",
62
+ "pattern": "^SUB-[0-9]{3}$"
63
+ },
64
+ "name": {
65
+ "type": "string"
66
+ },
67
+ "description": {
68
+ "type": "string"
69
+ },
70
+ "status": {
71
+ "type": "string",
72
+ "enum": ["pending", "active", "on-hold", "completed", "cancelled"]
73
+ },
74
+ "dependencies": {
75
+ "type": "array",
76
+ "items": {
77
+ "type": "string",
78
+ "pattern": "^SUB-[0-9]{3}$"
79
+ }
80
+ },
81
+ "milestones": {
82
+ "type": "array",
83
+ "items": {
84
+ "$ref": "#/definitions/milestone"
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "milestone": {
90
+ "type": "object",
91
+ "required": ["id", "name", "description", "status", "tasks"],
92
+ "properties": {
93
+ "id": {
94
+ "type": "string",
95
+ "pattern": "^MILE-[0-9]{3}$"
96
+ },
97
+ "name": {
98
+ "type": "string"
99
+ },
100
+ "description": {
101
+ "type": "string"
102
+ },
103
+ "status": {
104
+ "type": "string",
105
+ "enum": ["pending", "active", "completed"]
106
+ },
107
+ "dueDate": {
108
+ "type": "string",
109
+ "format": "date"
110
+ },
111
+ "dependencies": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "string",
115
+ "pattern": "^MILE-[0-9]{3}$"
116
+ }
117
+ },
118
+ "tasks": {
119
+ "type": "array",
120
+ "items": {
121
+ "$ref": "#/definitions/task"
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "task": {
127
+ "type": "object",
128
+ "required": ["id", "title", "status", "phase"],
129
+ "properties": {
130
+ "id": {
131
+ "type": "string",
132
+ "pattern": "^TASK-[0-9]{3}$"
133
+ },
134
+ "title": {
135
+ "type": "string"
136
+ },
137
+ "description": {
138
+ "type": "string"
139
+ },
140
+ "status": {
141
+ "type": "string",
142
+ "enum": ["pending", "in_progress", "blocked", "review", "testing", "completed", "cancelled"]
143
+ },
144
+ "phase": {
145
+ "type": "string",
146
+ "enum": ["requirements", "design", "implementation", "testing", "deployment", "maintenance"],
147
+ "description": "SDLC phase"
148
+ },
149
+ "dependencies": {
150
+ "type": "array",
151
+ "items": {
152
+ "type": "string",
153
+ "pattern": "^TASK-[0-9]{3}$"
154
+ }
155
+ },
156
+ "assignee": {
157
+ "type": "string"
158
+ },
159
+ "estimatedHours": {
160
+ "type": "number",
161
+ "minimum": 0
162
+ },
163
+ "actualHours": {
164
+ "type": "number",
165
+ "minimum": 0
166
+ },
167
+ "completionCriteria": {
168
+ "type": "array",
169
+ "items": {
170
+ "type": "string"
171
+ }
172
+ },
173
+ "testCases": {
174
+ "type": "array",
175
+ "items": {
176
+ "type": "string"
177
+ }
178
+ },
179
+ "artifacts": {
180
+ "type": "object",
181
+ "properties": {
182
+ "design": {
183
+ "type": "array",
184
+ "items": {
185
+ "type": "string"
186
+ }
187
+ },
188
+ "code": {
189
+ "type": "array",
190
+ "items": {
191
+ "type": "string"
192
+ }
193
+ },
194
+ "tests": {
195
+ "type": "array",
196
+ "items": {
197
+ "type": "string"
198
+ }
199
+ },
200
+ "documentation": {
201
+ "type": "array",
202
+ "items": {
203
+ "type": "string"
204
+ }
205
+ }
206
+ }
207
+ },
208
+ "startedAt": {
209
+ "type": "string",
210
+ "format": "date-time"
211
+ },
212
+ "completedAt": {
213
+ "type": "string",
214
+ "format": "date-time"
215
+ },
216
+ "blockedReason": {
217
+ "type": "string"
218
+ },
219
+ "notes": {
220
+ "type": "array",
221
+ "items": {
222
+ "type": "object",
223
+ "properties": {
224
+ "timestamp": {
225
+ "type": "string",
226
+ "format": "date-time"
227
+ },
228
+ "author": {
229
+ "type": "string"
230
+ },
231
+ "content": {
232
+ "type": "string"
233
+ }
234
+ }
235
+ }
236
+ }
237
+ }
238
+ }
239
+ }
240
+ }
@@ -0,0 +1,248 @@
1
+ # 🎯 POST-INSTALL INSTRUCTIONS FOR CLAUDE
2
+ **Version:** 1.4.4
3
+ **Last Updated:** 2025-12-24
4
+ **Package:** agentic15-claude-zen
5
+
6
+ **CRITICAL: Claude MUST follow these exact steps after package installation**
7
+
8
+ ## ✅ 6-Step Setup Workflow
9
+
10
+ ### STEP 1: Verify Directory Structure
11
+ ```bash
12
+ ls -la
13
+ ```
14
+
15
+ **Expected structure:**
16
+ ```
17
+ ./
18
+ ├── .claude/ ✅ Framework configuration
19
+ ├── Agent/ ✅ Your workspace (EDIT HERE)
20
+ ├── scripts/ ✅ Your scripts (EDIT HERE)
21
+ ├── test-site/ ✅ Integration testing site
22
+ ├── node_modules/ ✅ Dependencies
23
+ ├── package.json ✅ Project config
24
+ └── README.md ✅ Documentation
25
+ ```
26
+
27
+ ### STEP 2: Generate Project Plan
28
+ ```bash
29
+ npm run plan:generate "Your project description here"
30
+ ```
31
+
32
+ **What this does:**
33
+ - Creates `.claude/plans/plan-001-generated/PROJECT-REQUIREMENTS.txt`
34
+ - Claude MUST read this file and create `PROJECT-PLAN.json` in the same directory
35
+ - Follow the PLAN-SCHEMA.json structure exactly
36
+
37
+ ### STEP 3: Set Active Plan
38
+ ```bash
39
+ echo "plan-001-generated" > .claude/ACTIVE-PLAN
40
+ ```
41
+
42
+ **CRITICAL:** This MUST be done BEFORE running plan:init in Step 4.
43
+
44
+ ### STEP 4: Lock the Plan
45
+ ```bash
46
+ npm run plan:init
47
+ ```
48
+
49
+ **What this creates:**
50
+ - `.claude/plans/plan-001-generated/TASK-TRACKER.json` - Progress tracking
51
+ - `.claude/plans/plan-001-generated/tasks/TASK-XXX.json` - Individual task files
52
+ - `.claude/plans/plan-001-generated/.plan-locked` - Immutability marker
53
+
54
+ ### STEP 5: Start First Task
55
+ ```bash
56
+ npm run task:start TASK-001
57
+ ```
58
+
59
+ **What this does:**
60
+ - Marks TASK-001 as "in_progress"
61
+ - Displays task details and requirements
62
+ - Sets up task tracking
63
+
64
+ ### STEP 6: Work on the Task
65
+
66
+ **MANDATORY 9-STEP WORKFLOW:**
67
+ ```
68
+ 1. Read task file: .claude/plans/plan-001-generated/tasks/TASK-001.json
69
+ 2. Read related files mentioned in task
70
+ 3. Make changes ONLY in ./Agent/ or ./scripts/
71
+ 4. Write/update tests with real assertions
72
+ 5. Run tests: npm test (must pass)
73
+ - Git hooks test ONLY changed files (fast)
74
+ - Manual "npm test" runs FULL test suite (slow)
75
+ 6. Commit: git commit -m "[TASK-001] Description"
76
+ 7. Push: git push origin main
77
+ 8. Verify ALL completion criteria met
78
+ 9. Complete: npm run task:done TASK-001
79
+ ```
80
+
81
+ **⚡ SMART TESTING (43,000+ line codebases):**
82
+ - Git hooks automatically detect changed files and run ONLY those tests
83
+ - Manual `npm test` by Claude or human runs complete test suite
84
+ - This prevents infinite loops and speeds up commits
85
+
86
+ ## 🎨 UI COMPONENT WORKFLOW (CRITICAL FOR REACT/VUE/ANGULAR PROJECTS)
87
+
88
+ **If you're building UI components (.jsx, .tsx, .vue, .svelte), follow this workflow:**
89
+
90
+ ### When Creating a UI Component:
91
+
92
+ **1. Create component in Agent/src/components/**
93
+ ```bash
94
+ ./Agent/src/components/Button.jsx
95
+ ```
96
+
97
+ **2. Create component test (REQUIRED - will be BLOCKED otherwise)**
98
+ ```bash
99
+ ./Agent/tests/components/Button.test.jsx
100
+ ```
101
+
102
+ Test MUST include:
103
+ - Import and render the component
104
+ - Test user interactions (clicks, inputs)
105
+ - Mock API calls if component uses them
106
+ - Test state changes
107
+ - Test props validation
108
+
109
+ **3. Add component to test-site (REQUIRED - will be BLOCKED otherwise)**
110
+ ```bash
111
+ ./test-site/src/components/Button.jsx
112
+ ```
113
+
114
+ Purpose: Stakeholder preview with hot-reload
115
+
116
+ **4. Run tests**
117
+ ```bash
118
+ npm test
119
+ ```
120
+
121
+ **Example UI Component Workflow:**
122
+ ```bash
123
+ # Create Button component
124
+ Write(./Agent/src/components/Button.jsx)
125
+
126
+ # Create Button test (BLOCKED without this)
127
+ Write(./Agent/tests/components/Button.test.jsx)
128
+
129
+ # Add to integration site (BLOCKED without this)
130
+ Write(./test-site/src/components/Button.jsx)
131
+
132
+ # Run tests
133
+ npm test
134
+
135
+ # Commit
136
+ git commit -m "[TASK-XXX] Add Button component with tests"
137
+ ```
138
+
139
+ **Why test-site?**
140
+ - Allows stakeholders to preview components
141
+ - Hot-reload for rapid iteration
142
+ - Visual regression baseline
143
+ - Component showcase
144
+
145
+ ## 🚨 HARD RULES (Enforced by Hooks)
146
+
147
+ 1. **NO work without active task**
148
+ - Hooks will BLOCK Edit/Write in Agent/ without active task
149
+
150
+ 2. **Work ONLY on main branch**
151
+ - NO feature branches
152
+ - NO pull requests
153
+ - Direct commits to main
154
+
155
+ 3. **Edit ONLY in allowed directories**
156
+ - ✅ ALLOWED: ./Agent/**
157
+ - ✅ ALLOWED: ./scripts/**
158
+ - ❌ BLOCKED: Everything else
159
+
160
+ 4. **Tests MUST pass before commit**
161
+ - Hooks validate npm test exit code
162
+ - Fake/empty tests are BLOCKED
163
+
164
+ 5. **UI components MUST have tests**
165
+ - Component test files required
166
+ - Must render, test props, events, API mocks
167
+
168
+ ## 📋 Quick Reference Commands
169
+
170
+ ```bash
171
+ # Setup (Steps 2-5)
172
+ npm run plan:generate "description"
173
+ echo "plan-001-generated" > .claude/ACTIVE-PLAN
174
+ npm run plan:init
175
+ npm run task:start TASK-001
176
+
177
+ # During Work (Step 6)
178
+ npm test
179
+ git commit -m "[TASK-001] Description"
180
+ git push origin main
181
+ npm run task:done TASK-001
182
+
183
+ # Next Task
184
+ npm run task:next
185
+ ```
186
+
187
+ ## ⚠️ What NOT to Do
188
+
189
+ ❌ Create feature branches
190
+ ❌ Create pull requests
191
+ ❌ Edit .md files (documentation)
192
+ ❌ Edit .claude/ framework files
193
+ ❌ Run scripts with node ./scripts/** (human executes)
194
+ ❌ Run database CLI directly (psql, mysql, etc.)
195
+ ❌ Force push (git push --force)
196
+ ❌ Modify files outside ./Agent/ or ./scripts/
197
+
198
+ ## 🎯 Complete Example
199
+
200
+ ```bash
201
+ # STEP 2: Generate plan
202
+ npm run plan:generate "Build a calculator with add/subtract functions"
203
+
204
+ # Claude creates PROJECT-PLAN.json in .claude/plans/plan-001-generated/
205
+
206
+ # STEP 3: Set active plan (CRITICAL - do this BEFORE plan:init)
207
+ echo "plan-001-generated" > .claude/ACTIVE-PLAN
208
+
209
+ # STEP 4: Lock the plan
210
+ npm run plan:init
211
+
212
+ # STEP 5: Start first task
213
+ npm run task:start TASK-001
214
+ # Output: Starting TASK-001: Implement add function
215
+
216
+ # STEP 6: Work on task
217
+ # Read task
218
+ cat .claude/plans/plan-001-generated/tasks/TASK-001.json
219
+
220
+ # Write test
221
+ Write(./Agent/tests/calculator.test.js)
222
+
223
+ # Write code
224
+ Write(./Agent/src/calculator.js)
225
+
226
+ # Run tests
227
+ npm test
228
+
229
+ # Commit
230
+ git commit -m "[TASK-001] Implement add function with tests"
231
+ git push origin main
232
+
233
+ # Complete
234
+ npm run task:done TASK-001
235
+
236
+ # Next task
237
+ npm run task:next
238
+ ```
239
+
240
+ ## 📖 Additional Resources
241
+
242
+ - **Workflow details:** Read `.claude/ONBOARDING.md`
243
+ - **Permissions:** Read `.claude/settings.json`
244
+ - **Plan schema:** Read `.claude/PLAN-SCHEMA.json`
245
+
246
+ ---
247
+
248
+ **This file is for Claude's reference. Human should read README.md instead.**