@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,262 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Read(**)",
5
+ "Glob",
6
+ "Grep",
7
+ "Bash(npm run *)",
8
+ "Bash(git status*)",
9
+ "Bash(git log*)",
10
+ "Bash(git diff*)",
11
+ "Bash(git branch*)",
12
+ "Bash(git checkout main)",
13
+ "Bash(git add *)",
14
+ "Bash(git commit*)",
15
+ "Bash(git push*)",
16
+ "Edit(./Agent/**)",
17
+ "Write(./Agent/**)",
18
+ "Edit(./scripts/**)",
19
+ "Write(./scripts/**)",
20
+ "Write(./.claude/PROJECT-PLAN.json)"
21
+ ],
22
+ "ask": [
23
+ "Edit(./package.json)",
24
+ "Edit(./tsconfig.json)",
25
+ "Edit(./jest.config.*)",
26
+ "Write(./config/**)"
27
+ ],
28
+ "deny": [
29
+ "Edit(**/*.md)",
30
+ "Write(**/*.md)",
31
+ "Edit(./docs/**)",
32
+ "Write(./docs/**)",
33
+ "Edit(./README.md)",
34
+ "Edit(./CHANGELOG.md)",
35
+ "Edit(./.env*)",
36
+ "Write(./.env*)",
37
+ "Edit(./.claude/PROJECT-PLAN.json)",
38
+ "Edit(./.claude/settings.json)",
39
+ "Edit(./.claude/hooks/**)",
40
+ "Write(./.claude/hooks/**)",
41
+ "Edit(./.claude/CLAUDE.md)",
42
+ "Edit(./.claude/TASK-TRACKER.json)",
43
+ "Bash(curl*)",
44
+ "Bash(wget*)",
45
+ "Bash(rm -rf*)",
46
+ "Bash(sudo*)",
47
+ "Bash(npm install*)",
48
+ "Bash(npm publish*)",
49
+ "Bash(git push --force*)",
50
+ "Bash(git merge*)",
51
+ "Bash(psql*)",
52
+ "Bash(mysql*)",
53
+ "Bash(sqlite3*)",
54
+ "Bash(mongosh*)",
55
+ "Bash(redis-cli*)",
56
+ "Bash(node ./scripts/**)",
57
+ "Bash(node ./Agent/db/**)",
58
+ "Bash(bash ./scripts/**)",
59
+ "Bash(sh ./scripts/**)",
60
+ "Bash(git checkout -b *)",
61
+ "WebFetch",
62
+ "WebSearch"
63
+ ]
64
+ },
65
+ "sandbox": {
66
+ "enabled": true,
67
+ "autoAllowBashIfSandboxed": true,
68
+ "allowUnsandboxedCommands": false
69
+ },
70
+ "env": {
71
+ "DISABLE_PROMPT_CACHING": "0",
72
+ "CLAUDE_CODE_MAX_OUTPUT_TOKENS": "8192",
73
+ "DISABLE_NON_ESSENTIAL_MODEL_CALLS": "1"
74
+ },
75
+ "testing": {
76
+ "ui": {
77
+ "strictMode": true,
78
+ "requireTestFile": true,
79
+ "requireImport": true,
80
+ "requireRender": true,
81
+ "requireProps": true,
82
+ "requireEventTests": true,
83
+ "requireApiMocking": true,
84
+ "requireStateTests": true,
85
+ "requireFormTests": true,
86
+ "requireConditionalTests": true,
87
+ "requireIntegrationSite": true,
88
+ "integrationSiteDir": "test-site",
89
+ "conditionalThreshold": 3,
90
+ "requireVisualCheck": true,
91
+ "requireContract": false,
92
+ "comment": "⚠️ ALL UI testing requirements are HARD REQUIREMENTS (cannot be disabled). Commits will be blocked if any requirement is violated."
93
+ },
94
+ "visual": {
95
+ "enabled": true,
96
+ "strictMode": false,
97
+ "autoApprove": false,
98
+ "requireBaseline": true,
99
+ "pixelMatchThreshold": 0.1,
100
+ "diffThreshold": 1.0,
101
+ "browsers": ["chromium"],
102
+ "viewports": [
103
+ {
104
+ "name": "desktop",
105
+ "width": 1920,
106
+ "height": 1080,
107
+ "deviceScaleFactor": 1
108
+ },
109
+ {
110
+ "name": "tablet",
111
+ "width": 768,
112
+ "height": 1024,
113
+ "deviceScaleFactor": 2
114
+ },
115
+ {
116
+ "name": "mobile",
117
+ "width": 375,
118
+ "height": 667,
119
+ "deviceScaleFactor": 2
120
+ }
121
+ ],
122
+ "excludePatterns": [
123
+ "**/node_modules/**",
124
+ "**/dist/**",
125
+ "**/build/**"
126
+ ],
127
+ "baselineDir": ".claude/visual-baselines",
128
+ "diffDir": ".claude/visual-diffs",
129
+ "tempDir": ".claude/visual-temp",
130
+ "comment": "Visual regression testing configuration. Triggers on UI component changes (.tsx, .jsx, .vue, .svelte). Set enabled:false to disable."
131
+ }
132
+ },
133
+ "hooks": {
134
+ "SessionStart": [
135
+ {
136
+ "matcher": "startup",
137
+ "hooks": [
138
+ {
139
+ "type": "command",
140
+ "command": "node node_modules/.agentic15-claude-zen/hooks/session-start-context.js"
141
+ },
142
+ {
143
+ "type": "command",
144
+ "command": "node node_modules/.agentic15-claude-zen/hooks/detect-pending-reviews.js"
145
+ }
146
+ ]
147
+ }
148
+ ],
149
+ "PreToolUse": [
150
+ {
151
+ "matcher": "*",
152
+ "hooks": [
153
+ {
154
+ "type": "command",
155
+ "command": "node node_modules/.agentic15-claude-zen/hooks/enforce-hard-requirements.js"
156
+ },
157
+ {
158
+ "type": "command",
159
+ "command": "node node_modules/.agentic15-claude-zen/hooks/prevent-read-bypass.js"
160
+ },
161
+ {
162
+ "type": "command",
163
+ "command": "node node_modules/.agentic15-claude-zen/hooks/enforce-structured-development.js"
164
+ },
165
+ {
166
+ "type": "command",
167
+ "command": "node node_modules/.agentic15-claude-zen/hooks/enforce-plan-template.js"
168
+ }
169
+ ]
170
+ },
171
+ {
172
+ "matcher": "Bash",
173
+ "hooks": [
174
+ {
175
+ "type": "command",
176
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-git-workflow.js"
177
+ },
178
+ {
179
+ "type": "command",
180
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-task-completion.js"
181
+ }
182
+ ]
183
+ }
184
+ ],
185
+ "PostToolUse": [
186
+ {
187
+ "matcher": "Edit|Write",
188
+ "hooks": [
189
+ {
190
+ "type": "command",
191
+ "command": "node node_modules/.agentic15-claude-zen/hooks/enforce-structured-development.js"
192
+ },
193
+ {
194
+ "type": "command",
195
+ "command": "node node_modules/.agentic15-claude-zen/hooks/auto-format.js"
196
+ },
197
+ {
198
+ "type": "command",
199
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-ui-syntax.js"
200
+ },
201
+ {
202
+ "type": "command",
203
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-ui-runtime.js"
204
+ },
205
+ {
206
+ "type": "command",
207
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-ui-visual-native.js"
208
+ },
209
+ {
210
+ "type": "command",
211
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-component-contract.js"
212
+ },
213
+ {
214
+ "type": "command",
215
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-test-quality.js"
216
+ },
217
+ {
218
+ "type": "command",
219
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-ui-integration.js"
220
+ },
221
+ {
222
+ "type": "command",
223
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-integration-site.js"
224
+ },
225
+ {
226
+ "type": "command",
227
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-database-changes.js"
228
+ },
229
+ {
230
+ "type": "command",
231
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-migration-impact.js"
232
+ },
233
+ {
234
+ "type": "command",
235
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-visual-regression.js"
236
+ }
237
+ ]
238
+ },
239
+ {
240
+ "matcher": "Bash",
241
+ "hooks": [
242
+ {
243
+ "type": "command",
244
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-test-results.js"
245
+ },
246
+ {
247
+ "type": "command",
248
+ "command": "node node_modules/.agentic15-claude-zen/hooks/validate-e2e-coverage.js"
249
+ },
250
+ {
251
+ "type": "command",
252
+ "command": "node node_modules/.agentic15-claude-zen/hooks/enforce-test-pyramid.js"
253
+ },
254
+ {
255
+ "type": "command",
256
+ "command": "node node_modules/.agentic15-claude-zen/hooks/enforce-migration-workflow.js"
257
+ }
258
+ ]
259
+ }
260
+ ]
261
+ }
262
+ }
@@ -0,0 +1,14 @@
1
+ node_modules/
2
+ dist/
3
+ *.log
4
+ .DS_Store
5
+ .env
6
+ .env.local
7
+ *.tgz
8
+
9
+ # Claude Code local settings
10
+ .claude/settings.local.json
11
+
12
+ # Build artifacts
13
+ build/
14
+ coverage/
@@ -0,0 +1,3 @@
1
+ # Agent Directory
2
+ # Your source code, tests, and database files go here
3
+ # Edit files in this directory as part of your tasks
@@ -0,0 +1,76 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ Project initialized with [Agentic15 Claude Code Framework](https://github.com/ajayhanda/agentic15-claude-zen)
4
+
5
+ ## Structured Development Workflow
6
+
7
+ This project uses the Claude Code enforcement framework for task-based development with built-in guardrails.
8
+
9
+ ### Quick Start
10
+
11
+ 1. **Create a project plan:**
12
+ ```bash
13
+ npm run plan:create
14
+ ```
15
+
16
+ 2. **Initialize the plan:**
17
+ ```bash
18
+ npm run plan:init
19
+ ```
20
+
21
+ 3. **Start the next available task (recommended):**
22
+ ```bash
23
+ npm run task:next
24
+ ```
25
+
26
+ Or manually start a specific task:
27
+ ```bash
28
+ npm run task:start TASK-001
29
+ ```
30
+
31
+ 4. **Check task status:**
32
+ ```bash
33
+ npm run task:status
34
+ ```
35
+
36
+ 5. **Complete a task:**
37
+ ```bash
38
+ npm run task:done TASK-001
39
+ ```
40
+
41
+ ### Available Commands
42
+
43
+ - `npm run help` - Show all available commands
44
+ - `npm run plan:create` - Create a new project plan
45
+ - `npm run plan:init` - Initialize and lock the plan
46
+ - `npm run plan:manager` - Manage plans (switch, archive, delete)
47
+ - `npm run plan:amend` - Amend locked plan with audit trail
48
+ - `npm run task:next` - Start next available task (auto-picks based on dependencies)
49
+ - `npm run task:start TASK-XXX` - Start a specific task
50
+ - `npm run task:done TASK-XXX` - Complete a task
51
+ - `npm run task:status` - View task status
52
+ - `npm run task:merge TASK-XXX` - Merge completed task to main
53
+
54
+ ### Framework Features
55
+
56
+ - **Task-Based Development** - Structured workflow with dependencies
57
+ - **Git Workflow Enforcement** - Automatic branch management
58
+ - **Pre-commit Hooks** - Code quality and test validation
59
+ - **Project Plan Management** - Hierarchical plans with milestones
60
+ - **Task Tracking** - Automatic progress tracking and time estimates
61
+
62
+ ### Documentation
63
+
64
+ Configuration files are in [.claude/](.claude/):
65
+ - `CLAUDE.md` - Complete framework documentation
66
+ - `settings.json` - Permissions and hook configuration
67
+ - `PLAN-SCHEMA.json` - Project plan schema
68
+ - `PROJECT-PLAN-TEMPLATE.json` - Plan template
69
+
70
+ ### Framework Updates
71
+
72
+ See the [agentic15-claude-zen CHANGELOG](https://github.com/ajayhanda/agentic15-claude-zen/blob/main/create-agentic15-claude-zen/CHANGELOG.md) for framework version history and breaking changes.
73
+
74
+ ## Development
75
+
76
+ Your code goes here!
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Mock for static assets (images, fonts, etc.)
3
+ * Used by Jest to handle imports of non-JS files
4
+ *
5
+ * @version 1.4.4
6
+ * @package agentic15-claude-zen
7
+ */
8
+
9
+ module.exports = 'test-file-stub';
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Jest Configuration
3
+ * Framework-agnostic configuration supporting React, Vue, Angular, Svelte
4
+ *
5
+ * @version 1.4.4
6
+ * @package agentic15-claude-zen
7
+ */
8
+
9
+ module.exports = {
10
+ // Use jsdom for DOM testing (React, Vue, Svelte, Angular)
11
+ testEnvironment: 'jsdom',
12
+
13
+ // Transform JS/JSX/TS/TSX files with babel-jest
14
+ transform: {
15
+ '^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
16
+ },
17
+
18
+ // Support JS, JSX, TS, TSX file extensions
19
+ moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json'],
20
+
21
+ // Find test files in tests/ directory
22
+ testMatch: [
23
+ '**/tests/**/*.test.{js,jsx,ts,tsx}',
24
+ '**/tests/**/*.spec.{js,jsx,ts,tsx}',
25
+ ],
26
+
27
+ // Coverage collection
28
+ collectCoverageFrom: [
29
+ 'Agent/src/**/*.{js,jsx,ts,tsx}',
30
+ '!Agent/src/**/*.d.ts',
31
+ '!Agent/src/index.{js,ts}',
32
+ ],
33
+
34
+ // Setup files for different frameworks
35
+ setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
36
+
37
+ // Module name mapper for CSS/asset imports
38
+ moduleNameMapper: {
39
+ '\\.(css|less|scss|sass)$': 'identity-obj-proxy',
40
+ '\\.(jpg|jpeg|png|gif|svg)$': '<rootDir>/__mocks__/fileMock.js',
41
+ },
42
+
43
+ // Ignore patterns
44
+ testPathIgnorePatterns: ['/node_modules/', '/test-site/'],
45
+
46
+ // Verbose output
47
+ verbose: true,
48
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Jest Setup File
3
+ * Configures testing environment for UI components
4
+ *
5
+ * @version 1.4.4
6
+ * @package agentic15-claude-zen
7
+ */
8
+
9
+ // Import jest-dom matchers for better assertions
10
+ import '@testing-library/jest-dom';
11
+
12
+ // Suppress console errors during tests (optional)
13
+ // global.console.error = jest.fn();
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "1.0.0",
4
+ "description": "Project with Claude Code structured development framework",
5
+ "type": "commonjs",
6
+ "scripts": {
7
+ "test": "jest",
8
+ "help": "node node_modules/.agentic15-claude-zen/scripts/help.js",
9
+ "plan:generate": "node node_modules/.agentic15-claude-zen/scripts/plan-generate.js",
10
+ "plan:create": "node node_modules/.agentic15-claude-zen/scripts/plan-create.js",
11
+ "plan:init": "node node_modules/.agentic15-claude-zen/scripts/plan-init.js",
12
+ "plan:manager": "node node_modules/.agentic15-claude-zen/scripts/plan-manager.js",
13
+ "plan:amend": "node node_modules/.agentic15-claude-zen/scripts/plan-amend.js",
14
+ "plan:help": "node node_modules/.agentic15-claude-zen/scripts/plan-help.js",
15
+ "task:start": "node node_modules/.agentic15-claude-zen/scripts/task-start.js",
16
+ "task:done": "node node_modules/.agentic15-claude-zen/scripts/task-done.js",
17
+ "task:next": "node node_modules/.agentic15-claude-zen/scripts/task-next.js",
18
+ "task:status": "node node_modules/.agentic15-claude-zen/scripts/task-status.js",
19
+ "task:merge": "node node_modules/.agentic15-claude-zen/scripts/task-merge.js",
20
+ "setup:git-hooks": "node node_modules/.agentic15-claude-zen/scripts/setup-git-hooks.js"
21
+ },
22
+ "keywords": [
23
+ "claude-code",
24
+ "structured-development",
25
+ "task-tracking"
26
+ ],
27
+ "license": "MIT",
28
+ "devDependencies": {
29
+ "jest": "^30.2.0",
30
+ "@testing-library/react": "^16.1.0",
31
+ "@testing-library/jest-dom": "^6.6.3",
32
+ "@testing-library/user-event": "^14.5.2",
33
+ "@babel/preset-env": "^7.26.0",
34
+ "@babel/preset-react": "^7.26.3",
35
+ "babel-jest": "^30.0.0",
36
+ "jest-environment-jsdom": "^30.0.0",
37
+ "prop-types": "^15.8.1",
38
+ "identity-obj-proxy": "^3.0.0"
39
+ }
40
+ }
@@ -0,0 +1,3 @@
1
+ # Scripts Directory
2
+ # Your custom scripts go here (build, deploy, utilities, etc.)
3
+ # Claude can write scripts here, human executes them