@agentic15.com/agentic15-claude-zen 4.2.3 → 5.0.4

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.
@@ -1,223 +1,223 @@
1
- {
2
- "version": "2.0",
3
- "project": {
4
- "id": "PROJ-001",
5
- "name": "E-commerce Platform",
6
- "description": "Full-featured online store with payment processing",
7
- "status": "planning",
8
- "createdAt": "2025-12-18T00:00:00.000Z",
9
- "createdBy": "human",
10
- "locked": false,
11
- "subprojects": [
12
- {
13
- "id": "SUB-001",
14
- "name": "User Management System",
15
- "description": "Authentication, authorization, and user profiles",
16
- "status": "pending",
17
- "dependencies": [],
18
- "milestones": [
19
- {
20
- "id": "MILE-001",
21
- "name": "Core Authentication",
22
- "description": "Basic login/logout functionality",
23
- "status": "pending",
24
- "dependencies": [],
25
- "tasks": [
26
- {
27
- "id": "TASK-001",
28
- "title": "Design user database schema",
29
- "description": "Create ERD for users, roles, sessions",
30
- "status": "pending",
31
- "phase": "design",
32
- "dependencies": [],
33
- "estimatedHours": 4,
34
- "completionCriteria": [
35
- "ERD diagram completed",
36
- "Schema reviewed by team",
37
- "Migration scripts ready"
38
- ],
39
- "artifacts": {
40
- "design": ["./Agent/db/schema/users.sql"],
41
- "code": [],
42
- "tests": [],
43
- "documentation": ["./docs/database-design.md"]
44
- }
45
- },
46
- {
47
- "id": "TASK-002",
48
- "title": "Implement user registration API",
49
- "description": "POST /api/auth/register endpoint",
50
- "status": "pending",
51
- "phase": "implementation",
52
- "dependencies": ["TASK-001"],
53
- "estimatedHours": 6,
54
- "completionCriteria": [
55
- "Email validation implemented",
56
- "Password hashing with bcrypt",
57
- "Duplicate email check",
58
- "Returns JWT token"
59
- ],
60
- "testCases": [
61
- "Valid registration succeeds",
62
- "Invalid email rejected",
63
- "Weak password rejected",
64
- "Duplicate email rejected"
65
- ],
66
- "artifacts": {
67
- "design": [],
68
- "code": [
69
- "./Agent/src/controllers/authController.js",
70
- "./Agent/src/services/userService.js"
71
- ],
72
- "tests": ["./Agent/tests/auth.test.js"],
73
- "documentation": []
74
- }
75
- },
76
- {
77
- "id": "TASK-003",
78
- "title": "Write unit tests for registration",
79
- "description": "Test all registration edge cases",
80
- "status": "pending",
81
- "phase": "testing",
82
- "dependencies": ["TASK-002"],
83
- "estimatedHours": 3,
84
- "completionCriteria": [
85
- "100% code coverage for registration",
86
- "All edge cases tested",
87
- "Integration tests pass"
88
- ],
89
- "artifacts": {
90
- "code": [],
91
- "tests": [
92
- "./Agent/tests/auth.test.js",
93
- "./Agent/tests/integration/register.test.js"
94
- ]
95
- }
96
- }
97
- ]
98
- },
99
- {
100
- "id": "MILE-002",
101
- "name": "User Profile Management",
102
- "description": "Profile viewing and editing",
103
- "status": "pending",
104
- "dependencies": ["MILE-001"],
105
- "tasks": [
106
- {
107
- "id": "TASK-004",
108
- "title": "Create profile update API",
109
- "description": "PATCH /api/users/:id endpoint",
110
- "status": "pending",
111
- "phase": "implementation",
112
- "dependencies": ["TASK-003"],
113
- "estimatedHours": 5,
114
- "completionCriteria": [
115
- "Can update name, email, avatar",
116
- "Email uniqueness validated",
117
- "Authorization checked"
118
- ],
119
- "artifacts": {
120
- "code": ["./Agent/src/controllers/userController.js"],
121
- "tests": ["./Agent/tests/userProfile.test.js"]
122
- }
123
- }
124
- ]
125
- }
126
- ]
127
- },
128
- {
129
- "id": "SUB-002",
130
- "name": "Product Catalog System",
131
- "description": "Product listings, search, and categories",
132
- "status": "pending",
133
- "dependencies": [],
134
- "milestones": [
135
- {
136
- "id": "MILE-003",
137
- "name": "Basic Product CRUD",
138
- "description": "Create, read, update, delete products",
139
- "status": "pending",
140
- "dependencies": [],
141
- "tasks": [
142
- {
143
- "id": "TASK-005",
144
- "title": "Design product database schema",
145
- "description": "Tables for products, categories, images",
146
- "status": "pending",
147
- "phase": "design",
148
- "dependencies": [],
149
- "estimatedHours": 3,
150
- "completionCriteria": [
151
- "Schema supports multiple categories",
152
- "Image URLs stored properly",
153
- "Price and inventory tracked"
154
- ],
155
- "artifacts": {
156
- "design": ["./Agent/db/schema/products.sql"]
157
- }
158
- },
159
- {
160
- "id": "TASK-006",
161
- "title": "Implement product listing API",
162
- "description": "GET /api/products with pagination",
163
- "status": "pending",
164
- "phase": "implementation",
165
- "dependencies": ["TASK-005"],
166
- "estimatedHours": 4,
167
- "completionCriteria": [
168
- "Pagination works (limit/offset)",
169
- "Filtering by category",
170
- "Sorting by price, name, date"
171
- ],
172
- "artifacts": {
173
- "code": ["./Agent/src/controllers/productController.js"],
174
- "tests": ["./Agent/tests/products.test.js"]
175
- }
176
- }
177
- ]
178
- }
179
- ]
180
- },
181
- {
182
- "id": "SUB-003",
183
- "name": "Shopping Cart & Checkout",
184
- "description": "Cart management and order processing",
185
- "status": "pending",
186
- "dependencies": ["SUB-001", "SUB-002"],
187
- "milestones": [
188
- {
189
- "id": "MILE-004",
190
- "name": "Shopping Cart",
191
- "description": "Add/remove/update cart items",
192
- "status": "pending",
193
- "dependencies": ["MILE-001", "MILE-003"],
194
- "tasks": [
195
- {
196
- "id": "TASK-007",
197
- "title": "Implement cart management",
198
- "description": "Session-based cart for guests, DB for users",
199
- "status": "pending",
200
- "phase": "implementation",
201
- "dependencies": ["TASK-002", "TASK-006"],
202
- "estimatedHours": 8,
203
- "completionCriteria": [
204
- "Add items to cart",
205
- "Update quantities",
206
- "Calculate totals",
207
- "Persist cart for logged-in users"
208
- ],
209
- "artifacts": {
210
- "code": [
211
- "./Agent/src/services/cartService.js",
212
- "./Agent/src/controllers/cartController.js"
213
- ],
214
- "tests": ["./Agent/tests/cart.test.js"]
215
- }
216
- }
217
- ]
218
- }
219
- ]
220
- }
221
- ]
222
- }
223
- }
1
+ {
2
+ "version": "2.0",
3
+ "project": {
4
+ "id": "PROJ-001",
5
+ "name": "E-commerce Platform",
6
+ "description": "Full-featured online store with payment processing",
7
+ "status": "planning",
8
+ "createdAt": "2025-12-18T00:00:00.000Z",
9
+ "createdBy": "human",
10
+ "locked": false,
11
+ "subprojects": [
12
+ {
13
+ "id": "SUB-001",
14
+ "name": "User Management System",
15
+ "description": "Authentication, authorization, and user profiles",
16
+ "status": "pending",
17
+ "dependencies": [],
18
+ "milestones": [
19
+ {
20
+ "id": "MILE-001",
21
+ "name": "Core Authentication",
22
+ "description": "Basic login/logout functionality",
23
+ "status": "pending",
24
+ "dependencies": [],
25
+ "tasks": [
26
+ {
27
+ "id": "TASK-001",
28
+ "title": "Design user database schema",
29
+ "description": "Create ERD for users, roles, sessions",
30
+ "status": "pending",
31
+ "phase": "design",
32
+ "dependencies": [],
33
+ "estimatedHours": 4,
34
+ "completionCriteria": [
35
+ "ERD diagram completed",
36
+ "Schema reviewed by team",
37
+ "Migration scripts ready"
38
+ ],
39
+ "artifacts": {
40
+ "design": ["./Agent/db/schema/users.sql"],
41
+ "code": [],
42
+ "tests": [],
43
+ "documentation": ["./docs/database-design.md"]
44
+ }
45
+ },
46
+ {
47
+ "id": "TASK-002",
48
+ "title": "Implement user registration API",
49
+ "description": "POST /api/auth/register endpoint",
50
+ "status": "pending",
51
+ "phase": "implementation",
52
+ "dependencies": ["TASK-001"],
53
+ "estimatedHours": 6,
54
+ "completionCriteria": [
55
+ "Email validation implemented",
56
+ "Password hashing with bcrypt",
57
+ "Duplicate email check",
58
+ "Returns JWT token"
59
+ ],
60
+ "testCases": [
61
+ "Valid registration succeeds",
62
+ "Invalid email rejected",
63
+ "Weak password rejected",
64
+ "Duplicate email rejected"
65
+ ],
66
+ "artifacts": {
67
+ "design": [],
68
+ "code": [
69
+ "./Agent/src/controllers/authController.js",
70
+ "./Agent/src/services/userService.js"
71
+ ],
72
+ "tests": ["./Agent/tests/auth.test.js"],
73
+ "documentation": []
74
+ }
75
+ },
76
+ {
77
+ "id": "TASK-003",
78
+ "title": "Write unit tests for registration",
79
+ "description": "Test all registration edge cases",
80
+ "status": "pending",
81
+ "phase": "testing",
82
+ "dependencies": ["TASK-002"],
83
+ "estimatedHours": 3,
84
+ "completionCriteria": [
85
+ "100% code coverage for registration",
86
+ "All edge cases tested",
87
+ "Integration tests pass"
88
+ ],
89
+ "artifacts": {
90
+ "code": [],
91
+ "tests": [
92
+ "./Agent/tests/auth.test.js",
93
+ "./Agent/tests/integration/register.test.js"
94
+ ]
95
+ }
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "id": "MILE-002",
101
+ "name": "User Profile Management",
102
+ "description": "Profile viewing and editing",
103
+ "status": "pending",
104
+ "dependencies": ["MILE-001"],
105
+ "tasks": [
106
+ {
107
+ "id": "TASK-004",
108
+ "title": "Create profile update API",
109
+ "description": "PATCH /api/users/:id endpoint",
110
+ "status": "pending",
111
+ "phase": "implementation",
112
+ "dependencies": ["TASK-003"],
113
+ "estimatedHours": 5,
114
+ "completionCriteria": [
115
+ "Can update name, email, avatar",
116
+ "Email uniqueness validated",
117
+ "Authorization checked"
118
+ ],
119
+ "artifacts": {
120
+ "code": ["./Agent/src/controllers/userController.js"],
121
+ "tests": ["./Agent/tests/userProfile.test.js"]
122
+ }
123
+ }
124
+ ]
125
+ }
126
+ ]
127
+ },
128
+ {
129
+ "id": "SUB-002",
130
+ "name": "Product Catalog System",
131
+ "description": "Product listings, search, and categories",
132
+ "status": "pending",
133
+ "dependencies": [],
134
+ "milestones": [
135
+ {
136
+ "id": "MILE-003",
137
+ "name": "Basic Product CRUD",
138
+ "description": "Create, read, update, delete products",
139
+ "status": "pending",
140
+ "dependencies": [],
141
+ "tasks": [
142
+ {
143
+ "id": "TASK-005",
144
+ "title": "Design product database schema",
145
+ "description": "Tables for products, categories, images",
146
+ "status": "pending",
147
+ "phase": "design",
148
+ "dependencies": [],
149
+ "estimatedHours": 3,
150
+ "completionCriteria": [
151
+ "Schema supports multiple categories",
152
+ "Image URLs stored properly",
153
+ "Price and inventory tracked"
154
+ ],
155
+ "artifacts": {
156
+ "design": ["./Agent/db/schema/products.sql"]
157
+ }
158
+ },
159
+ {
160
+ "id": "TASK-006",
161
+ "title": "Implement product listing API",
162
+ "description": "GET /api/products with pagination",
163
+ "status": "pending",
164
+ "phase": "implementation",
165
+ "dependencies": ["TASK-005"],
166
+ "estimatedHours": 4,
167
+ "completionCriteria": [
168
+ "Pagination works (limit/offset)",
169
+ "Filtering by category",
170
+ "Sorting by price, name, date"
171
+ ],
172
+ "artifacts": {
173
+ "code": ["./Agent/src/controllers/productController.js"],
174
+ "tests": ["./Agent/tests/products.test.js"]
175
+ }
176
+ }
177
+ ]
178
+ }
179
+ ]
180
+ },
181
+ {
182
+ "id": "SUB-003",
183
+ "name": "Shopping Cart & Checkout",
184
+ "description": "Cart management and order processing",
185
+ "status": "pending",
186
+ "dependencies": ["SUB-001", "SUB-002"],
187
+ "milestones": [
188
+ {
189
+ "id": "MILE-004",
190
+ "name": "Shopping Cart",
191
+ "description": "Add/remove/update cart items",
192
+ "status": "pending",
193
+ "dependencies": ["MILE-001", "MILE-003"],
194
+ "tasks": [
195
+ {
196
+ "id": "TASK-007",
197
+ "title": "Implement cart management",
198
+ "description": "Session-based cart for guests, DB for users",
199
+ "status": "pending",
200
+ "phase": "implementation",
201
+ "dependencies": ["TASK-002", "TASK-006"],
202
+ "estimatedHours": 8,
203
+ "completionCriteria": [
204
+ "Add items to cart",
205
+ "Update quantities",
206
+ "Calculate totals",
207
+ "Persist cart for logged-in users"
208
+ ],
209
+ "artifacts": {
210
+ "code": [
211
+ "./Agent/src/services/cartService.js",
212
+ "./Agent/src/controllers/cartController.js"
213
+ ],
214
+ "tests": ["./Agent/tests/cart.test.js"]
215
+ }
216
+ }
217
+ ]
218
+ }
219
+ ]
220
+ }
221
+ ]
222
+ }
223
+ }
@@ -1,106 +1,106 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Enforce Plan Template Hook
5
- *
6
- * CRITICAL: Blocks custom plan formats - ONLY allow official template
7
- *
8
- * When Claude writes PROJECT-PLAN.json, this hook validates:
9
- * 1. Plan follows PLAN-SCHEMA.json structure
10
- * 2. Has required fields: planId, projectName, structure, tasks
11
- * 3. Tasks have proper format: id, title, description, phase, dependencies
12
- * 4. No custom formats allowed
13
- */
14
-
15
- const fs = require('fs');
16
- const path = require('path');
17
-
18
- // Read the tool input
19
- const input = process.argv[2] || '{}';
20
- const toolData = JSON.parse(input);
21
-
22
- const filePath = toolData.tool_input?.file_path;
23
- const content = toolData.tool_input?.content;
24
- const tool = toolData.tool;
25
-
26
- // Only check when writing PROJECT-PLAN.json
27
- if (tool === 'Write' && filePath && filePath.includes('PROJECT-PLAN.json')) {
28
-
29
- let plan;
30
- try {
31
- plan = JSON.parse(content);
32
- } catch (error) {
33
- console.error('\n❌ BLOCKED: PROJECT-PLAN.json must be valid JSON');
34
- console.error(` Parse error: ${error.message}\n`);
35
- process.exit(2);
36
- }
37
-
38
- const errors = [];
39
-
40
- // Required top-level fields
41
- const requiredFields = ['planId', 'projectName', 'description', 'structure', 'tasks'];
42
- for (const field of requiredFields) {
43
- if (!plan[field]) {
44
- errors.push(`Missing required field: ${field}`);
45
- }
46
- }
47
-
48
- // Validate structure field
49
- if (plan.structure && typeof plan.structure !== 'string') {
50
- errors.push('Field "structure" must be "flat" or "hierarchical"');
51
- }
52
-
53
- // Validate tasks array
54
- if (plan.tasks && !Array.isArray(plan.tasks)) {
55
- errors.push('Field "tasks" must be an array');
56
- }
57
-
58
- // Validate each task
59
- if (Array.isArray(plan.tasks)) {
60
- const taskRequiredFields = ['id', 'title', 'description', 'phase', 'dependencies', 'estimatedHours'];
61
-
62
- plan.tasks.forEach((task, index) => {
63
- for (const field of taskRequiredFields) {
64
- if (task[field] === undefined) {
65
- errors.push(`Task ${task.id || index}: Missing required field "${field}"`);
66
- }
67
- }
68
-
69
- // Validate task ID format
70
- if (task.id && !task.id.match(/^TASK-\d{3}$/)) {
71
- errors.push(`Task ${task.id || index}: Invalid ID format. Must be TASK-XXX (e.g., TASK-001)`);
72
- }
73
-
74
- // Validate dependencies is array
75
- if (task.dependencies && !Array.isArray(task.dependencies)) {
76
- errors.push(`Task ${task.id || index}: dependencies must be an array`);
77
- }
78
-
79
- // Validate phase
80
- const validPhases = ['design', 'implementation', 'testing', 'deployment'];
81
- if (task.phase && !validPhases.includes(task.phase)) {
82
- errors.push(`Task ${task.id || index}: Invalid phase "${task.phase}". Must be one of: ${validPhases.join(', ')}`);
83
- }
84
- });
85
- }
86
-
87
- // If errors found, block
88
- if (errors.length > 0) {
89
- console.error('\n❌ BLOCKED: PROJECT-PLAN.json does NOT follow template');
90
- console.error('\n Validation errors:');
91
- errors.forEach(err => console.error(` • ${err}`));
92
- console.error('\n ✅ Use the official template:');
93
- console.error(' 1. Read .claude/PLAN-SCHEMA.json for structure');
94
- console.error(' 2. Read .claude/PROJECT-PLAN-TEMPLATE.json for format');
95
- console.error(' 3. Follow the exact structure');
96
- console.error('\n Required fields:');
97
- console.error(' - planId, projectName, description, structure, tasks');
98
- console.error(' - Each task: id (TASK-XXX), title, description, phase, dependencies, estimatedHours\n');
99
- process.exit(2);
100
- }
101
-
102
- // Validation passed
103
- console.log('✅ PROJECT-PLAN.json follows official template');
104
- }
105
-
106
- process.exit(0);
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Enforce Plan Template Hook
5
+ *
6
+ * CRITICAL: Blocks custom plan formats - ONLY allow official template
7
+ *
8
+ * When Claude writes PROJECT-PLAN.json, this hook validates:
9
+ * 1. Plan follows PLAN-SCHEMA.json structure
10
+ * 2. Has required fields: planId, projectName, structure, tasks
11
+ * 3. Tasks have proper format: id, title, description, phase, dependencies
12
+ * 4. No custom formats allowed
13
+ */
14
+
15
+ const fs = require('fs');
16
+ const path = require('path');
17
+
18
+ // Read the tool input
19
+ const input = process.argv[2] || '{}';
20
+ const toolData = JSON.parse(input);
21
+
22
+ const filePath = toolData.tool_input?.file_path;
23
+ const content = toolData.tool_input?.content;
24
+ const tool = toolData.tool;
25
+
26
+ // Only check when writing PROJECT-PLAN.json
27
+ if (tool === 'Write' && filePath && filePath.includes('PROJECT-PLAN.json')) {
28
+
29
+ let plan;
30
+ try {
31
+ plan = JSON.parse(content);
32
+ } catch (error) {
33
+ console.error('\n❌ BLOCKED: PROJECT-PLAN.json must be valid JSON');
34
+ console.error(` Parse error: ${error.message}\n`);
35
+ process.exit(2);
36
+ }
37
+
38
+ const errors = [];
39
+
40
+ // Required top-level fields
41
+ const requiredFields = ['planId', 'projectName', 'description', 'structure', 'tasks'];
42
+ for (const field of requiredFields) {
43
+ if (!plan[field]) {
44
+ errors.push(`Missing required field: ${field}`);
45
+ }
46
+ }
47
+
48
+ // Validate structure field
49
+ if (plan.structure && typeof plan.structure !== 'string') {
50
+ errors.push('Field "structure" must be "flat" or "hierarchical"');
51
+ }
52
+
53
+ // Validate tasks array
54
+ if (plan.tasks && !Array.isArray(plan.tasks)) {
55
+ errors.push('Field "tasks" must be an array');
56
+ }
57
+
58
+ // Validate each task
59
+ if (Array.isArray(plan.tasks)) {
60
+ const taskRequiredFields = ['id', 'title', 'description', 'phase', 'dependencies', 'estimatedHours'];
61
+
62
+ plan.tasks.forEach((task, index) => {
63
+ for (const field of taskRequiredFields) {
64
+ if (task[field] === undefined) {
65
+ errors.push(`Task ${task.id || index}: Missing required field "${field}"`);
66
+ }
67
+ }
68
+
69
+ // Validate task ID format
70
+ if (task.id && !task.id.match(/^TASK-\d{3}$/)) {
71
+ errors.push(`Task ${task.id || index}: Invalid ID format. Must be TASK-XXX (e.g., TASK-001)`);
72
+ }
73
+
74
+ // Validate dependencies is array
75
+ if (task.dependencies && !Array.isArray(task.dependencies)) {
76
+ errors.push(`Task ${task.id || index}: dependencies must be an array`);
77
+ }
78
+
79
+ // Validate phase
80
+ const validPhases = ['design', 'implementation', 'testing', 'deployment'];
81
+ if (task.phase && !validPhases.includes(task.phase)) {
82
+ errors.push(`Task ${task.id || index}: Invalid phase "${task.phase}". Must be one of: ${validPhases.join(', ')}`);
83
+ }
84
+ });
85
+ }
86
+
87
+ // If errors found, block
88
+ if (errors.length > 0) {
89
+ console.error('\n❌ BLOCKED: PROJECT-PLAN.json does NOT follow template');
90
+ console.error('\n Validation errors:');
91
+ errors.forEach(err => console.error(` • ${err}`));
92
+ console.error('\n ✅ Use the official template:');
93
+ console.error(' 1. Read node_modules/@agentic15.com/agentic15-claude-zen/framework/PLAN-SCHEMA.json for structure');
94
+ console.error(' 2. Read node_modules/@agentic15.com/agentic15-claude-zen/framework/PROJECT-PLAN-TEMPLATE.json for format');
95
+ console.error(' 3. Follow the exact structure');
96
+ console.error('\n Required fields:');
97
+ console.error(' - planId, projectName, description, structure, tasks');
98
+ console.error(' - Each task: id (TASK-XXX), title, description, phase, dependencies, estimatedHours\n');
99
+ process.exit(2);
100
+ }
101
+
102
+ // Validation passed
103
+ console.log('✅ PROJECT-PLAN.json follows official template');
104
+ }
105
+
106
+ process.exit(0);