@agentic15.com/agentic15-claude-zen 1.0.0 → 1.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.
- package/CHANGELOG.md +60 -45
- package/LICENSE +1 -1
- package/README.md +6 -4
- package/bin/create-agentic15-claude-zen.js +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +3 -3
- package/package.json +64 -61
- package/src/core/DependencyInstaller.js +1 -1
- package/src/core/GitHubClient.js +170 -0
- package/src/core/GitHubConfig.js +192 -0
- package/src/core/GitInitializer.js +1 -1
- package/src/core/HookInstaller.js +71 -54
- package/src/core/ProjectInitializer.js +1 -1
- package/src/core/TaskIssueMapper.js +137 -0
- package/src/core/TemplateManager.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/updateTaskGitHubStatus.js +81 -0
- package/templates/.claude/POST-INSTALL.md +367 -248
- package/templates/.claude/hooks/complete-task.js +224 -0
- package/templates/.claude/hooks/post-merge.js +163 -0
- package/templates/.claude/hooks/start-task.js +233 -0
- package/templates/.claude/settings.json +272 -262
- package/templates/.claude/settings.local.json.example +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,45 +1,60 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
Copyright 2024-2025 agentic15.com
|
|
9
|
+
|
|
10
|
+
## [1.0.1] - 2025-12-24
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Updated package name to @agentic15.com/agentic15-claude-zen
|
|
14
|
+
- Updated bin command to agentic15-claude-zen
|
|
15
|
+
- Removed obfuscation, now using standard minification with sourcemaps
|
|
16
|
+
- Updated all copyright references from "Agentic15" to "agentic15.com"
|
|
17
|
+
- Added complete package documentation (README.md, CHANGELOG.md, LICENSE)
|
|
18
|
+
- Added npm package link to README
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- Package now includes README.md, LICENSE, and CHANGELOG.md files
|
|
22
|
+
|
|
23
|
+
## [1.0.0] - 2025-12-24
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- Initial release of Agentic15 Claude Zen framework
|
|
27
|
+
- Structured project planning with hierarchical organization (Project → Subproject → Milestone → Task)
|
|
28
|
+
- Automated quality enforcement through Git hooks
|
|
29
|
+
- Smart testing that runs only changed files during commits
|
|
30
|
+
- UI component workflow enforcement (component + test + integration site)
|
|
31
|
+
- Framework-agnostic support (React, Vue, Angular, Svelte)
|
|
32
|
+
- Complete Jest + Babel configuration for testing
|
|
33
|
+
- Token-optimized prompts with caching support
|
|
34
|
+
- Minified and bundled hooks for fast execution
|
|
35
|
+
- Comprehensive documentation and examples
|
|
36
|
+
- Post-install guide for quick setup
|
|
37
|
+
- Task management scripts (start, done, next, status)
|
|
38
|
+
- Plan management scripts (generate, init, amend)
|
|
39
|
+
- Integration testing site for UI previews
|
|
40
|
+
- Dependency tracking and validation
|
|
41
|
+
- Progress monitoring and time estimation
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
- **Pre-commit hooks** validate tests, code quality, and UI components
|
|
45
|
+
- **Smart testing** runs only changed files during commits (scales to 43,000+ line codebases)
|
|
46
|
+
- **Test quality validation** blocks empty tests and missing assertions
|
|
47
|
+
- **UI integration validation** enforces complete component workflow
|
|
48
|
+
- **Immutable plans** with audit trail for amendments
|
|
49
|
+
- **SOLID architecture** with clean separation of concerns
|
|
50
|
+
|
|
51
|
+
### Documentation
|
|
52
|
+
- Getting Started guide
|
|
53
|
+
- User Workflows documentation
|
|
54
|
+
- Agent Workflows documentation
|
|
55
|
+
- Plan Management guide
|
|
56
|
+
- Task Management guide
|
|
57
|
+
- Test Execution strategies
|
|
58
|
+
- Architecture documentation with SOLID principles
|
|
59
|
+
|
|
60
|
+
[1.0.0]: https://github.com/agentic15/claude-zen/releases/tag/v1.0.0
|
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright 2024-2025
|
|
189
|
+
Copyright 2024-2025 agentic15.com
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -20,6 +20,8 @@ A comprehensive development framework that transforms Claude Code into a discipl
|
|
|
20
20
|
|
|
21
21
|
## 🚀 Quick Start
|
|
22
22
|
|
|
23
|
+
Install from [npm](https://www.npmjs.com/package/@agentic15.com/agentic15-claude-zen):
|
|
24
|
+
|
|
23
25
|
```bash
|
|
24
26
|
# Create a new project
|
|
25
27
|
npx @agentic15.com/agentic15-claude-zen my-project
|
|
@@ -173,7 +175,7 @@ See [SECURITY.md](https://github.com/agentic15/claude-zen/blob/main/SECURITY.md)
|
|
|
173
175
|
|
|
174
176
|
## 📄 License
|
|
175
177
|
|
|
176
|
-
Copyright 2024-2025
|
|
178
|
+
Copyright 2024-2025 agentic15.com
|
|
177
179
|
|
|
178
180
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
179
181
|
you may not use this file except in compliance with the License.
|
|
@@ -189,9 +191,9 @@ limitations under the License.
|
|
|
189
191
|
|
|
190
192
|
See [LICENSE](https://github.com/agentic15/claude-zen/blob/main/LICENSE) for full text.
|
|
191
193
|
|
|
192
|
-
## 🏢 About
|
|
194
|
+
## 🏢 About agentic15.com
|
|
193
195
|
|
|
194
|
-
**
|
|
196
|
+
**agentic15.com** is a software development company specializing in AI-assisted development tools and frameworks.
|
|
195
197
|
|
|
196
198
|
- **Website**: https://agentic15.com
|
|
197
199
|
- **Documentation**: https://docs.agentic15.com
|
|
@@ -201,4 +203,4 @@ See [LICENSE](https://github.com/agentic15/claude-zen/blob/main/LICENSE) for ful
|
|
|
201
203
|
|
|
202
204
|
---
|
|
203
205
|
|
|
204
|
-
**"Code with Intelligence, Ship with Confidence"** -
|
|
206
|
+
**"Code with Intelligence, Ship with Confidence"** - agentic15.com
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a=class{constructor(e,o,n,t){this.templateManager=e,this.hookInstaller=o,this.dependencyInstaller=n,this.gitInitializer=t}async initialize(e,o,n={}){let{initGit:t=!0,installDeps:s=!0}=n;console.log(`
|
|
2
2
|
`+"\u2550".repeat(70)),console.log("\u{1F680} Agentic15 Claude Zen - Project Initialization"),console.log(' "Code with Intelligence, Ship with Confidence"'),console.log("\u2550".repeat(70)+`
|
|
3
|
-
`),await this.templateManager.copyTemplates(e,o),await this.templateManager.extractBundledFiles(o),t&&await this.gitInitializer.initialize(o),
|
|
3
|
+
`),await this.templateManager.copyTemplates(e,o),await this.templateManager.extractBundledFiles(o),t&&await this.gitInitializer.initialize(o),s&&await this.dependencyInstaller.install(o),t&&await this.hookInstaller.install(o),this.displayOnboarding()}displayOnboarding(){console.log(`
|
|
4
4
|
`+"\u2550".repeat(70)),console.log("\u{1F3AF} CRITICAL: NEXT STEP FOR CLAUDE CODE"),console.log("\u2550".repeat(70)),console.log(`
|
|
5
5
|
\u{1F4D6} READ THIS FILE: .claude/POST-INSTALL.md`),console.log(`
|
|
6
6
|
This file contains the COMPLETE 6-step setup workflow.`),console.log(` Single clear path - no confusion or multiple options.
|
|
@@ -8,9 +8,9 @@ var r=class{constructor(e,o,n,t){this.templateManager=e,this.hookInstaller=o,thi
|
|
|
8
8
|
\u{1F4C2} Your Workspace:`),console.log(" ./Agent/ - Edit your source code here"),console.log(" ./scripts/ - Edit your scripts here"),console.log(" ./.claude/ - Framework files (DO NOT EDIT)"),console.log(`
|
|
9
9
|
\u26A0\uFE0F Work on main branch only - NO feature branches`),console.log("\u26A0\uFE0F Hooks enforce rules - violations will be BLOCKED"),console.log(`
|
|
10
10
|
`+"\u2550".repeat(70)),console.log("\u2705 Setup complete! Read .claude/POST-INSTALL.md to continue."),console.log("\u2550".repeat(70)+`
|
|
11
|
-
`)}};import{mkdirSync as
|
|
12
|
-
\u{1F4E6} Setting up bundled scripts and hooks...`),
|
|
13
|
-
\u{1F517} Setting up Git hooks...`);try{let o=
|
|
11
|
+
`)}};import{mkdirSync as f,cpSync as c,readFileSync as w,writeFileSync as T,existsSync as C}from"fs";import{join as i,dirname as I}from"path";import{fileURLToPath as z}from"url";var A=z(import.meta.url),k=I(A),p=class{constructor(){this.templatesDir=i(k,"..","templates"),this.distDir=i(k,".")}async copyTemplates(e,o){console.log("\u{1F4E6} Creating project directory..."),f(o,{recursive:!0}),console.log("\u{1F4CB} Copying framework templates..."),this.copyDirectory(".claude",o),this.copyAndCustomize("package.json",o,e),this.copyAndCustomize("README.md",o,e),this.copyGitignore(o),this.copyDirectory("test-site",o),this.copyDirectory("Agent",o),this.copyDirectory("scripts",o),this.copySingleFile("jest.config.js",o),this.copySingleFile("jest.setup.js",o),this.copySingleFile(".babelrc",o),this.copyDirectory("__mocks__",o),console.log("\u2705 Framework structure created"),console.log("\u2705 Templates copied"),console.log("\u2705 Configuration files generated")}async extractBundledFiles(e){let o=i(e,"node_modules",".agentic15-claude-zen");console.log(`
|
|
12
|
+
\u{1F4E6} Setting up bundled scripts and hooks...`),f(o,{recursive:!0}),console.log(" \u251C\u2500 scripts/");let n=i(this.distDir,"scripts");c(n,i(o,"scripts"),{recursive:!0}),console.log(" \u2514\u2500 hooks/");let t=i(this.distDir,"hooks");c(t,i(o,"hooks"),{recursive:!0}),console.log("\u2705 Bundled files extracted")}copyDirectory(e,o){console.log(` \u251C\u2500 ${e}/`),c(i(this.templatesDir,e),i(o,e),{recursive:!0})}copySingleFile(e,o){console.log(` \u251C\u2500 ${e}`),c(i(this.templatesDir,e),i(o,e))}copyAndCustomize(e,o,n){console.log(` \u251C\u2500 ${e}`);let s=w(i(this.templatesDir,e),"utf8").replace(/\{\{PROJECT_NAME\}\}/g,n);T(i(o,e),s)}copyGitignore(e){console.log(" \u251C\u2500 .gitignore");let o=C(i(this.templatesDir,".gitignore"))?i(this.templatesDir,".gitignore"):i(this.templatesDir,".npmignore");c(o,i(e,".gitignore"))}};import{writeFileSync as S,readFileSync as E,existsSync as L,chmodSync as j}from"fs";import{join as r}from"path";var g=class{async install(e){console.log(`
|
|
13
|
+
\u{1F517} Setting up Git hooks...`);try{let o=r(e,".git","hooks"),n=r(e,".claude","hooks");S(r(o,"pre-commit"),`#!/bin/sh
|
|
14
14
|
# agentic15-claude-zen pre-commit hook
|
|
15
15
|
# This hook is CRITICAL for enforcement
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ echo "\u26A0\uFE0F agentic15-claude-zen git hooks are NOT yet active"
|
|
|
18
18
|
echo " Hooks run via Claude Code settings.json, not git hooks"
|
|
19
19
|
echo " This is just a reminder"
|
|
20
20
|
exit 0
|
|
21
|
-
`,{mode:493}),console.log("\u2705 Git hooks configured")}catch(o){console.log("\u26A0\uFE0F Warning: Git hooks setup failed"),console.log(` Error: ${o.message}`)}}};import{execSync as
|
|
22
|
-
\u{1F4E6} Installing dependencies...`),console.log(" This may take a minute...");try{
|
|
23
|
-
\u{1F527} Initializing git repository...`);try{
|
|
21
|
+
`,{mode:493});let s=r(n,"post-merge.js");if(L(s)){let u=E(s,"utf8"),h=r(o,"post-merge");S(h,u,{mode:493});try{j(h,493)}catch{}console.log("\u2705 Git hooks configured (including post-merge for GitHub integration)")}else console.log("\u2705 Git hooks configured")}catch(o){console.log("\u26A0\uFE0F Warning: Git hooks setup failed"),console.log(` Error: ${o.message}`)}}};import{execSync as O}from"child_process";var d=class{async install(e){console.log(`
|
|
22
|
+
\u{1F4E6} Installing dependencies...`),console.log(" This may take a minute...");try{O("npm install",{cwd:e,stdio:"inherit"}),console.log("\u2705 Dependencies installed")}catch{console.log("\u26A0\uFE0F Warning: npm install failed"),console.log(" You can install manually with: npm install")}}};import{execSync as y}from"child_process";var m=class{async initialize(e){console.log(`
|
|
23
|
+
\u{1F527} Initializing git repository...`);try{y("git init",{cwd:e,stdio:"ignore"}),y("git add .",{cwd:e,stdio:"ignore"}),y('git commit -m "Initial commit: Agentic15 Claude Zen framework"',{cwd:e,stdio:"ignore"}),console.log("\u2705 Git repository initialized")}catch{console.log("\u26A0\uFE0F Warning: Git initialization failed"),console.log(" You can initialize manually with: git init")}}};async function Z(l,e,o={}){let n=new p,t=new g,s=new d,u=new m;await new a(n,t,s,u).initialize(l,e,o)}export{Z as initializeProject};
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/core/ProjectInitializer.js", "../src/core/TemplateManager.js", "../src/core/HookInstaller.js", "../src/core/DependencyInstaller.js", "../src/core/GitInitializer.js", "../src/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright 2024-2025 Agentic15\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * ProjectInitializer - Orchestrates project setup\n *\n * Single Responsibility: Coordinate the initialization process\n */\nexport class ProjectInitializer {\n /**\n * @param {TemplateManager} templateManager - Manages template copying\n * @param {HookInstaller} hookInstaller - Installs git hooks\n * @param {DependencyInstaller} dependencyInstaller - Installs npm dependencies\n * @param {GitInitializer} gitInitializer - Initializes git repository\n */\n constructor(templateManager, hookInstaller, dependencyInstaller, gitInitializer) {\n this.templateManager = templateManager;\n this.hookInstaller = hookInstaller;\n this.dependencyInstaller = dependencyInstaller;\n this.gitInitializer = gitInitializer;\n }\n\n /**\n * Initialize a new project with Agentic15 Claude Zen framework\n *\n * @param {string} projectName - Name of the project\n * @param {string} targetDir - Target directory path\n * @param {Object} options - Configuration options\n * @param {boolean} options.initGit - Initialize git repository\n * @param {boolean} options.installDeps - Install npm dependencies\n */\n async initialize(projectName, targetDir, options = {}) {\n const { initGit = true, installDeps = true } = options;\n\n console.log('\\n' + '\u2550'.repeat(70));\n console.log('\uD83D\uDE80 Agentic15 Claude Zen - Project Initialization');\n console.log(' \"Code with Intelligence, Ship with Confidence\"');\n console.log('\u2550'.repeat(70) + '\\n');\n\n // Step 1: Copy templates\n await this.templateManager.copyTemplates(projectName, targetDir);\n\n // Step 2: Extract bundled scripts and hooks\n await this.templateManager.extractBundledFiles(targetDir);\n\n // Step 3: Initialize git repository\n if (initGit) {\n await this.gitInitializer.initialize(targetDir);\n }\n\n // Step 4: Install dependencies\n if (installDeps) {\n await this.dependencyInstaller.install(targetDir);\n }\n\n // Step 5: Setup git hooks\n if (initGit) {\n await this.hookInstaller.install(targetDir);\n }\n\n // Step 6: Display onboarding instructions\n this.displayOnboarding();\n }\n\n /**\n * Display critical onboarding instructions\n */\n displayOnboarding() {\n console.log('\\n' + '\u2550'.repeat(70));\n console.log('\uD83C\uDFAF CRITICAL: NEXT STEP FOR CLAUDE CODE');\n console.log('\u2550'.repeat(70));\n console.log('\\n\uD83D\uDCD6 READ THIS FILE: .claude/POST-INSTALL.md');\n console.log('\\n This file contains the COMPLETE 6-step setup workflow.');\n console.log(' Single clear path - no confusion or multiple options.\\n');\n console.log('\uD83D\uDE80 QUICK START (6 steps):');\n console.log(' 1. npm run plan:generate \"description\"');\n console.log(' 2. Claude creates PROJECT-PLAN.json');\n console.log(' 3. echo \"plan-001-generated\" > .claude/ACTIVE-PLAN');\n console.log(' 4. npm run plan:init');\n console.log(' 5. npm run task:start TASK-001');\n console.log(' 6. Work on task (9-step workflow in POST-INSTALL.md)');\n console.log('\\n\uD83D\uDCC2 Your Workspace:');\n console.log(' ./Agent/ - Edit your source code here');\n console.log(' ./scripts/ - Edit your scripts here');\n console.log(' ./.claude/ - Framework files (DO NOT EDIT)');\n console.log('\\n\u26A0\uFE0F Work on main branch only - NO feature branches');\n console.log('\u26A0\uFE0F Hooks enforce rules - violations will be BLOCKED');\n console.log('\\n' + '\u2550'.repeat(70));\n console.log('\u2705 Setup complete! Read .claude/POST-INSTALL.md to continue.');\n console.log('\u2550'.repeat(70) + '\\n');\n }\n}\n", "/**\n * Copyright 2024-2025 Agentic15\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { mkdirSync, cpSync, readFileSync, writeFileSync, existsSync } from 'fs';\nimport { join, dirname } from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/**\n * TemplateManager - Manages template copying and customization\n *\n * Single Responsibility: Copy and customize project templates\n */\nexport class TemplateManager {\n constructor() {\n this.templatesDir = join(__dirname, '..', 'templates');\n this.distDir = join(__dirname, '.');\n }\n\n /**\n * Copy all templates to target directory\n *\n * @param {string} projectName - Name of the project\n * @param {string} targetDir - Target directory path\n */\n async copyTemplates(projectName, targetDir) {\n console.log('\uD83D\uDCE6 Creating project directory...');\n mkdirSync(targetDir, { recursive: true });\n\n console.log('\uD83D\uDCCB Copying framework templates...');\n\n // Copy .claude directory structure\n this.copyDirectory('.claude', targetDir);\n\n // Copy and customize package.json\n this.copyAndCustomize('package.json', targetDir, projectName);\n\n // Copy and customize README.md\n this.copyAndCustomize('README.md', targetDir, projectName);\n\n // Copy .gitignore (npm may rename it)\n this.copyGitignore(targetDir);\n\n // Copy test-site\n this.copyDirectory('test-site', targetDir);\n\n // Copy Agent directory\n this.copyDirectory('Agent', targetDir);\n\n // Copy scripts directory\n this.copyDirectory('scripts', targetDir);\n\n // Copy Jest configuration files\n this.copySingleFile('jest.config.js', targetDir);\n this.copySingleFile('jest.setup.js', targetDir);\n this.copySingleFile('.babelrc', targetDir);\n\n // Copy __mocks__ directory\n this.copyDirectory('__mocks__', targetDir);\n\n console.log('\u2705 Framework structure created');\n console.log('\u2705 Templates copied');\n console.log('\u2705 Configuration files generated');\n }\n\n /**\n * Extract bundled scripts and hooks to node_modules\n *\n * @param {string} targetDir - Target directory path\n */\n async extractBundledFiles(targetDir) {\n const bundleDir = join(targetDir, 'node_modules', '.agentic15-claude-zen');\n console.log('\\n\uD83D\uDCE6 Setting up bundled scripts and hooks...');\n mkdirSync(bundleDir, { recursive: true });\n\n // Copy bundled scripts\n console.log(' \u251C\u2500 scripts/');\n const bundledScriptsDir = join(this.distDir, 'scripts');\n cpSync(bundledScriptsDir, join(bundleDir, 'scripts'), { recursive: true });\n\n // Copy bundled hooks\n console.log(' \u2514\u2500 hooks/');\n const bundledHooksDir = join(this.distDir, 'hooks');\n cpSync(bundledHooksDir, join(bundleDir, 'hooks'), { recursive: true });\n\n console.log('\u2705 Bundled files extracted');\n }\n\n /**\n * Copy a directory from templates to target\n *\n * @param {string} dirName - Directory name\n * @param {string} targetDir - Target directory path\n */\n copyDirectory(dirName, targetDir) {\n console.log(` \u251C\u2500 ${dirName}/`);\n cpSync(\n join(this.templatesDir, dirName),\n join(targetDir, dirName),\n { recursive: true }\n );\n }\n\n /**\n * Copy a single file from templates to target\n *\n * @param {string} fileName - File name\n * @param {string} targetDir - Target directory path\n */\n copySingleFile(fileName, targetDir) {\n console.log(` \u251C\u2500 ${fileName}`);\n cpSync(\n join(this.templatesDir, fileName),\n join(targetDir, fileName)\n );\n }\n\n /**\n * Copy and customize a file with project name replacement\n *\n * @param {string} fileName - File name\n * @param {string} targetDir - Target directory path\n * @param {string} projectName - Project name for replacement\n */\n copyAndCustomize(fileName, targetDir, projectName) {\n console.log(` \u251C\u2500 ${fileName}`);\n const template = readFileSync(join(this.templatesDir, fileName), 'utf8');\n const customized = template.replace(/\\{\\{PROJECT_NAME\\}\\}/g, projectName);\n writeFileSync(join(targetDir, fileName), customized);\n }\n\n /**\n * Copy .gitignore file (handles npm renaming issue)\n *\n * @param {string} targetDir - Target directory path\n */\n copyGitignore(targetDir) {\n console.log(' \u251C\u2500 .gitignore');\n const gitignoreSource = existsSync(join(this.templatesDir, '.gitignore'))\n ? join(this.templatesDir, '.gitignore')\n : join(this.templatesDir, '.npmignore');\n cpSync(gitignoreSource, join(targetDir, '.gitignore'));\n }\n}\n", "/**\n * Copyright 2024-2025 Agentic15\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { writeFileSync } from 'fs';\nimport { join } from 'path';\n\n/**\n * HookInstaller - Installs git hooks\n *\n * Single Responsibility: Setup git hooks in project\n */\nexport class HookInstaller {\n /**\n * Install git hooks\n *\n * @param {string} targetDir - Target directory path\n */\n async install(targetDir) {\n console.log('\\n\uD83D\uDD17 Setting up Git hooks...');\n try {\n const gitHooksDir = join(targetDir, '.git', 'hooks');\n\n // Create pre-commit hook (reminder that hooks run via Claude Code)\n const preCommitHook = `#!/bin/sh\n# agentic15-claude-zen pre-commit hook\n# This hook is CRITICAL for enforcement\n\necho \"\u26A0\uFE0F agentic15-claude-zen git hooks are NOT yet active\"\necho \" Hooks run via Claude Code settings.json, not git hooks\"\necho \" This is just a reminder\"\nexit 0\n`;\n\n writeFileSync(join(gitHooksDir, 'pre-commit'), preCommitHook, { mode: 0o755 });\n console.log('\u2705 Git hooks configured');\n } catch (error) {\n console.log('\u26A0\uFE0F Warning: Git hooks setup failed');\n console.log(` Error: ${error.message}`);\n }\n }\n}\n", "/**\n * Copyright 2024-2025 Agentic15\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { execSync } from 'child_process';\n\n/**\n * DependencyInstaller - Installs npm dependencies\n *\n * Single Responsibility: Install project dependencies\n */\nexport class DependencyInstaller {\n /**\n * Install npm dependencies\n *\n * @param {string} targetDir - Target directory path\n */\n async install(targetDir) {\n console.log('\\n\uD83D\uDCE6 Installing dependencies...');\n console.log(' This may take a minute...');\n try {\n execSync('npm install', { cwd: targetDir, stdio: 'inherit' });\n console.log('\u2705 Dependencies installed');\n } catch (error) {\n console.log('\u26A0\uFE0F Warning: npm install failed');\n console.log(' You can install manually with: npm install');\n }\n }\n}\n", "/**\n * Copyright 2024-2025 Agentic15\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { execSync } from 'child_process';\n\n/**\n * GitInitializer - Initializes git repository\n *\n * Single Responsibility: Initialize and configure git\n */\nexport class GitInitializer {\n /**\n * Initialize git repository\n *\n * @param {string} targetDir - Target directory path\n */\n async initialize(targetDir) {\n console.log('\\n\uD83D\uDD27 Initializing git repository...');\n try {\n execSync('git init', { cwd: targetDir, stdio: 'ignore' });\n execSync('git add .', { cwd: targetDir, stdio: 'ignore' });\n execSync('git commit -m \"Initial commit: Agentic15 Claude Zen framework\"', {\n cwd: targetDir,\n stdio: 'ignore'\n });\n console.log('\u2705 Git repository initialized');\n } catch (error) {\n console.log('\u26A0\uFE0F Warning: Git initialization failed');\n console.log(' You can initialize manually with: git init');\n }\n }\n}\n", "/**\n * Copyright 2024-2025 Agentic15\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Agentic15 Claude Zen - Main Entry Point\n *\n * Structured AI-assisted development framework for Claude Code\n * with enforced quality standards\n */\n\nimport { ProjectInitializer } from './core/ProjectInitializer.js';\nimport { TemplateManager } from './core/TemplateManager.js';\nimport { HookInstaller } from './core/HookInstaller.js';\nimport { DependencyInstaller } from './core/DependencyInstaller.js';\nimport { GitInitializer } from './core/GitInitializer.js';\n\n/**\n * Initialize a new project with Agentic15 Claude Zen framework\n *\n * @param {string} projectName - Name of the project\n * @param {string} targetDir - Target directory path\n * @param {Object} options - Configuration options\n * @param {boolean} options.initGit - Initialize git repository (default: true)\n * @param {boolean} options.installDeps - Install npm dependencies (default: true)\n */\nexport async function initializeProject(projectName, targetDir, options = {}) {\n // Dependency Injection: Create all dependencies\n const templateManager = new TemplateManager();\n const hookInstaller = new HookInstaller();\n const dependencyInstaller = new DependencyInstaller();\n const gitInitializer = new GitInitializer();\n\n // Create orchestrator with injected dependencies\n const projectInitializer = new ProjectInitializer(\n templateManager,\n hookInstaller,\n dependencyInstaller,\n gitInitializer\n );\n\n // Execute initialization\n await projectInitializer.initialize(projectName, targetDir, options);\n}\n"],
|
|
5
|
-
"mappings": "AAqBO,IAAMA,EAAN,KAAyB,CAO9B,YAAYC,EAAiBC,EAAeC,EAAqBC,EAAgB,CAC/E,KAAK,gBAAkBH,EACvB,KAAK,cAAgBC,EACrB,KAAK,oBAAsBC,EAC3B,KAAK,eAAiBC,CACxB,CAWA,MAAM,WAAWC,EAAaC,EAAWC,EAAU,CAAC,EAAG,CACrD,GAAM,CAAE,QAAAC,EAAU,GAAM,YAAAC,EAAc,EAAK,EAAIF,EAE/C,QAAQ,IAAI;AAAA,EAAO,SAAI,OAAO,EAAE,CAAC,EACjC,QAAQ,IAAI,yDAAkD,EAC9D,QAAQ,IAAI,mDAAmD,EAC/D,QAAQ,IAAI,SAAI,OAAO,EAAE,EAAI;AAAA,CAAI,EAGjC,MAAM,KAA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AAW,CAChC,QAAQ,IAAI,kBAAQI,CAAO,GAAG,EAC9Bf,EACEI,EAAK,KAAK,aAAcW,CAAO,EAC/BX,EAAKO,EAAWI,CAAO,EACvB,CAAE,UAAW,EAAK,CACpB,CACF,CAQA,eAAeC,EAAUL,EAAW,CAClC,QAAQ,IAAI,kBAAQK,CAAQ,EAAE,EAC9BhB,EACEI,EAAK,KAAK,aAAcY,CAAQ,EAChCZ,EAAKO,EAAWK,CAAQ,CAC1B,CACF,CASA,iBAAiBA,EAAUL,EAAWD,EAAa,CACjD,QAAQ,IAAI,kBAAQM,CAAQ,EAAE,EAE9B,IAAMC,EADWhB,EAAaG,EAAK,KAAK,aAAcY,CAAQ,EAAG,MAAM,EAC3C,QAAQ,wBAAyBN,CAAW,EACxER,EAAcE,EAAKO,EAAWK,CAAQ,EAAGC,CAAU,CACrD,CAOA,cAAcN,EAAW,CACvB,QAAQ,IAAI,2BAAiB,EAC7B,IAAMO,EAAkBf,EAAWC,EAAK,KAAK,aAAc,YAAY,CAAC,EACpEA,EAAK,KAAK,aAAc,YAAY,EACpCA,EAAK,KAAK,aAAc,YAAY,EACxCJ,EAAOkB,EAAiBd,EAAKO,EAAW,YAAY,CAAC,CACvD,CACF,EC9IA,OAAS,iBAAAQ,
|
|
6
|
-
"names": ["ProjectInitializer", "templateManager", "hookInstaller", "dependencyInstaller", "gitInitializer", "projectName", "targetDir", "options", "initGit", "installDeps", "mkdirSync", "cpSync", "readFileSync", "writeFileSync", "existsSync", "join", "dirname", "fileURLToPath", "__filename", "__dirname", "TemplateManager", "projectName", "targetDir", "bundleDir", "bundledScriptsDir", "bundledHooksDir", "dirName", "fileName", "customized", "gitignoreSource", "writeFileSync", "join", "HookInstaller", "targetDir", "gitHooksDir", "error", "execSync", "DependencyInstaller", "targetDir", "execSync", "GitInitializer", "targetDir", "initializeProject", "projectName", "targetDir", "options", "templateManager", "TemplateManager", "hookInstaller", "HookInstaller", "dependencyInstaller", "DependencyInstaller", "gitInitializer", "GitInitializer", "ProjectInitializer"]
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2024-2025 agentic15.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * ProjectInitializer - Orchestrates project setup\n *\n * Single Responsibility: Coordinate the initialization process\n */\nexport class ProjectInitializer {\n /**\n * @param {TemplateManager} templateManager - Manages template copying\n * @param {HookInstaller} hookInstaller - Installs git hooks\n * @param {DependencyInstaller} dependencyInstaller - Installs npm dependencies\n * @param {GitInitializer} gitInitializer - Initializes git repository\n */\n constructor(templateManager, hookInstaller, dependencyInstaller, gitInitializer) {\n this.templateManager = templateManager;\n this.hookInstaller = hookInstaller;\n this.dependencyInstaller = dependencyInstaller;\n this.gitInitializer = gitInitializer;\n }\n\n /**\n * Initialize a new project with Agentic15 Claude Zen framework\n *\n * @param {string} projectName - Name of the project\n * @param {string} targetDir - Target directory path\n * @param {Object} options - Configuration options\n * @param {boolean} options.initGit - Initialize git repository\n * @param {boolean} options.installDeps - Install npm dependencies\n */\n async initialize(projectName, targetDir, options = {}) {\n const { initGit = true, installDeps = true } = options;\n\n console.log('\\n' + '\u2550'.repeat(70));\n console.log('\uD83D\uDE80 Agentic15 Claude Zen - Project Initialization');\n console.log(' \"Code with Intelligence, Ship with Confidence\"');\n console.log('\u2550'.repeat(70) + '\\n');\n\n // Step 1: Copy templates\n await this.templateManager.copyTemplates(projectName, targetDir);\n\n // Step 2: Extract bundled scripts and hooks\n await this.templateManager.extractBundledFiles(targetDir);\n\n // Step 3: Initialize git repository\n if (initGit) {\n await this.gitInitializer.initialize(targetDir);\n }\n\n // Step 4: Install dependencies\n if (installDeps) {\n await this.dependencyInstaller.install(targetDir);\n }\n\n // Step 5: Setup git hooks\n if (initGit) {\n await this.hookInstaller.install(targetDir);\n }\n\n // Step 6: Display onboarding instructions\n this.displayOnboarding();\n }\n\n /**\n * Display critical onboarding instructions\n */\n displayOnboarding() {\n console.log('\\n' + '\u2550'.repeat(70));\n console.log('\uD83C\uDFAF CRITICAL: NEXT STEP FOR CLAUDE CODE');\n console.log('\u2550'.repeat(70));\n console.log('\\n\uD83D\uDCD6 READ THIS FILE: .claude/POST-INSTALL.md');\n console.log('\\n This file contains the COMPLETE 6-step setup workflow.');\n console.log(' Single clear path - no confusion or multiple options.\\n');\n console.log('\uD83D\uDE80 QUICK START (6 steps):');\n console.log(' 1. npm run plan:generate \"description\"');\n console.log(' 2. Claude creates PROJECT-PLAN.json');\n console.log(' 3. echo \"plan-001-generated\" > .claude/ACTIVE-PLAN');\n console.log(' 4. npm run plan:init');\n console.log(' 5. npm run task:start TASK-001');\n console.log(' 6. Work on task (9-step workflow in POST-INSTALL.md)');\n console.log('\\n\uD83D\uDCC2 Your Workspace:');\n console.log(' ./Agent/ - Edit your source code here');\n console.log(' ./scripts/ - Edit your scripts here');\n console.log(' ./.claude/ - Framework files (DO NOT EDIT)');\n console.log('\\n\u26A0\uFE0F Work on main branch only - NO feature branches');\n console.log('\u26A0\uFE0F Hooks enforce rules - violations will be BLOCKED');\n console.log('\\n' + '\u2550'.repeat(70));\n console.log('\u2705 Setup complete! Read .claude/POST-INSTALL.md to continue.');\n console.log('\u2550'.repeat(70) + '\\n');\n }\n}\n", "/**\n * Copyright 2024-2025 agentic15.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { mkdirSync, cpSync, readFileSync, writeFileSync, existsSync } from 'fs';\nimport { join, dirname } from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/**\n * TemplateManager - Manages template copying and customization\n *\n * Single Responsibility: Copy and customize project templates\n */\nexport class TemplateManager {\n constructor() {\n this.templatesDir = join(__dirname, '..', 'templates');\n this.distDir = join(__dirname, '.');\n }\n\n /**\n * Copy all templates to target directory\n *\n * @param {string} projectName - Name of the project\n * @param {string} targetDir - Target directory path\n */\n async copyTemplates(projectName, targetDir) {\n console.log('\uD83D\uDCE6 Creating project directory...');\n mkdirSync(targetDir, { recursive: true });\n\n console.log('\uD83D\uDCCB Copying framework templates...');\n\n // Copy .claude directory structure\n this.copyDirectory('.claude', targetDir);\n\n // Copy and customize package.json\n this.copyAndCustomize('package.json', targetDir, projectName);\n\n // Copy and customize README.md\n this.copyAndCustomize('README.md', targetDir, projectName);\n\n // Copy .gitignore (npm may rename it)\n this.copyGitignore(targetDir);\n\n // Copy test-site\n this.copyDirectory('test-site', targetDir);\n\n // Copy Agent directory\n this.copyDirectory('Agent', targetDir);\n\n // Copy scripts directory\n this.copyDirectory('scripts', targetDir);\n\n // Copy Jest configuration files\n this.copySingleFile('jest.config.js', targetDir);\n this.copySingleFile('jest.setup.js', targetDir);\n this.copySingleFile('.babelrc', targetDir);\n\n // Copy __mocks__ directory\n this.copyDirectory('__mocks__', targetDir);\n\n console.log('\u2705 Framework structure created');\n console.log('\u2705 Templates copied');\n console.log('\u2705 Configuration files generated');\n }\n\n /**\n * Extract bundled scripts and hooks to node_modules\n *\n * @param {string} targetDir - Target directory path\n */\n async extractBundledFiles(targetDir) {\n const bundleDir = join(targetDir, 'node_modules', '.agentic15-claude-zen');\n console.log('\\n\uD83D\uDCE6 Setting up bundled scripts and hooks...');\n mkdirSync(bundleDir, { recursive: true });\n\n // Copy bundled scripts\n console.log(' \u251C\u2500 scripts/');\n const bundledScriptsDir = join(this.distDir, 'scripts');\n cpSync(bundledScriptsDir, join(bundleDir, 'scripts'), { recursive: true });\n\n // Copy bundled hooks\n console.log(' \u2514\u2500 hooks/');\n const bundledHooksDir = join(this.distDir, 'hooks');\n cpSync(bundledHooksDir, join(bundleDir, 'hooks'), { recursive: true });\n\n console.log('\u2705 Bundled files extracted');\n }\n\n /**\n * Copy a directory from templates to target\n *\n * @param {string} dirName - Directory name\n * @param {string} targetDir - Target directory path\n */\n copyDirectory(dirName, targetDir) {\n console.log(` \u251C\u2500 ${dirName}/`);\n cpSync(\n join(this.templatesDir, dirName),\n join(targetDir, dirName),\n { recursive: true }\n );\n }\n\n /**\n * Copy a single file from templates to target\n *\n * @param {string} fileName - File name\n * @param {string} targetDir - Target directory path\n */\n copySingleFile(fileName, targetDir) {\n console.log(` \u251C\u2500 ${fileName}`);\n cpSync(\n join(this.templatesDir, fileName),\n join(targetDir, fileName)\n );\n }\n\n /**\n * Copy and customize a file with project name replacement\n *\n * @param {string} fileName - File name\n * @param {string} targetDir - Target directory path\n * @param {string} projectName - Project name for replacement\n */\n copyAndCustomize(fileName, targetDir, projectName) {\n console.log(` \u251C\u2500 ${fileName}`);\n const template = readFileSync(join(this.templatesDir, fileName), 'utf8');\n const customized = template.replace(/\\{\\{PROJECT_NAME\\}\\}/g, projectName);\n writeFileSync(join(targetDir, fileName), customized);\n }\n\n /**\n * Copy .gitignore file (handles npm renaming issue)\n *\n * @param {string} targetDir - Target directory path\n */\n copyGitignore(targetDir) {\n console.log(' \u251C\u2500 .gitignore');\n const gitignoreSource = existsSync(join(this.templatesDir, '.gitignore'))\n ? join(this.templatesDir, '.gitignore')\n : join(this.templatesDir, '.npmignore');\n cpSync(gitignoreSource, join(targetDir, '.gitignore'));\n }\n}\n", "/**\r\n * Copyright 2024-2025 agentic15.com\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\nimport { writeFileSync, readFileSync, existsSync, chmodSync } from 'fs';\r\nimport { join, dirname } from 'path';\r\nimport { fileURLToPath } from 'url';\r\n\r\n/**\r\n * HookInstaller - Installs git hooks\r\n *\r\n * Single Responsibility: Setup git hooks in project\r\n */\r\nexport class HookInstaller {\r\n /**\r\n * Install git hooks\r\n *\r\n * @param {string} targetDir - Target directory path\r\n */\r\n async install(targetDir) {\r\n console.log('\\n\uD83D\uDD17 Setting up Git hooks...');\r\n try {\r\n const gitHooksDir = join(targetDir, '.git', 'hooks');\r\n const claudeHooksDir = join(targetDir, '.claude', 'hooks');\r\n\r\n // Create pre-commit hook (reminder that hooks run via Claude Code)\r\n const preCommitHook = `#!/bin/sh\r\n# agentic15-claude-zen pre-commit hook\r\n# This hook is CRITICAL for enforcement\r\n\r\necho \"\u26A0\uFE0F agentic15-claude-zen git hooks are NOT yet active\"\r\necho \" Hooks run via Claude Code settings.json, not git hooks\"\r\necho \" This is just a reminder\"\r\nexit 0\r\n`;\r\n\r\n writeFileSync(join(gitHooksDir, 'pre-commit'), preCommitHook, { mode: 0o755 });\r\n\r\n // Install post-merge hook for GitHub issue auto-close\r\n const postMergeSource = join(claudeHooksDir, 'post-merge.js');\r\n if (existsSync(postMergeSource)) {\r\n const postMergeContent = readFileSync(postMergeSource, 'utf8');\r\n const postMergeHook = join(gitHooksDir, 'post-merge');\r\n writeFileSync(postMergeHook, postMergeContent, { mode: 0o755 });\r\n try {\r\n chmodSync(postMergeHook, 0o755);\r\n } catch (chmodError) {\r\n // chmod might fail on some systems, but file should still be executable\r\n }\r\n console.log('\u2705 Git hooks configured (including post-merge for GitHub integration)');\r\n } else {\r\n console.log('\u2705 Git hooks configured');\r\n }\r\n } catch (error) {\r\n console.log('\u26A0\uFE0F Warning: Git hooks setup failed');\r\n console.log(` Error: ${error.message}`);\r\n }\r\n }\r\n}\r\n", "/**\n * Copyright 2024-2025 agentic15.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { execSync } from 'child_process';\n\n/**\n * DependencyInstaller - Installs npm dependencies\n *\n * Single Responsibility: Install project dependencies\n */\nexport class DependencyInstaller {\n /**\n * Install npm dependencies\n *\n * @param {string} targetDir - Target directory path\n */\n async install(targetDir) {\n console.log('\\n\uD83D\uDCE6 Installing dependencies...');\n console.log(' This may take a minute...');\n try {\n execSync('npm install', { cwd: targetDir, stdio: 'inherit' });\n console.log('\u2705 Dependencies installed');\n } catch (error) {\n console.log('\u26A0\uFE0F Warning: npm install failed');\n console.log(' You can install manually with: npm install');\n }\n }\n}\n", "/**\n * Copyright 2024-2025 agentic15.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { execSync } from 'child_process';\n\n/**\n * GitInitializer - Initializes git repository\n *\n * Single Responsibility: Initialize and configure git\n */\nexport class GitInitializer {\n /**\n * Initialize git repository\n *\n * @param {string} targetDir - Target directory path\n */\n async initialize(targetDir) {\n console.log('\\n\uD83D\uDD27 Initializing git repository...');\n try {\n execSync('git init', { cwd: targetDir, stdio: 'ignore' });\n execSync('git add .', { cwd: targetDir, stdio: 'ignore' });\n execSync('git commit -m \"Initial commit: Agentic15 Claude Zen framework\"', {\n cwd: targetDir,\n stdio: 'ignore'\n });\n console.log('\u2705 Git repository initialized');\n } catch (error) {\n console.log('\u26A0\uFE0F Warning: Git initialization failed');\n console.log(' You can initialize manually with: git init');\n }\n }\n}\n", "/**\n * Copyright 2024-2025 agentic15.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Agentic15 Claude Zen - Main Entry Point\n *\n * Structured AI-assisted development framework for Claude Code\n * with enforced quality standards\n */\n\nimport { ProjectInitializer } from './core/ProjectInitializer.js';\nimport { TemplateManager } from './core/TemplateManager.js';\nimport { HookInstaller } from './core/HookInstaller.js';\nimport { DependencyInstaller } from './core/DependencyInstaller.js';\nimport { GitInitializer } from './core/GitInitializer.js';\n\n/**\n * Initialize a new project with Agentic15 Claude Zen framework\n *\n * @param {string} projectName - Name of the project\n * @param {string} targetDir - Target directory path\n * @param {Object} options - Configuration options\n * @param {boolean} options.initGit - Initialize git repository (default: true)\n * @param {boolean} options.installDeps - Install npm dependencies (default: true)\n */\nexport async function initializeProject(projectName, targetDir, options = {}) {\n // Dependency Injection: Create all dependencies\n const templateManager = new TemplateManager();\n const hookInstaller = new HookInstaller();\n const dependencyInstaller = new DependencyInstaller();\n const gitInitializer = new GitInitializer();\n\n // Create orchestrator with injected dependencies\n const projectInitializer = new ProjectInitializer(\n templateManager,\n hookInstaller,\n dependencyInstaller,\n gitInitializer\n );\n\n //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,OAAS,YAAAC,MAAgB,gBAOlB,IAAMC,EAAN,KAAqB,CAM1B,MAAM,WAAWC,EAAW,CAC1B,QAAQ,IAAI;AAAA,yCAAqC,EACjD,GAAI,CACFF,EAAS,WAAY,CAAE,IAAKE,EAAW,MAAO,QAAS,CAAC,EACxDF,EAAS,YAAa,CAAE,IAAKE,EAAW,MAAO,QAAS,CAAC,EACzDF,EAAS,iEAAkE,CACzE,IAAKE,EACL,MAAO,QACT,CAAC,EACD,QAAQ,IAAI,mCAA8B,CAC5C,MAAgB,CACd,QAAQ,IAAI,kDAAwC,EACpD,QAAQ,IAAI,+CAA+C,CAC7D,CACF,CACF,ECNA,eAAsBC,EAAkBC,EAAaC,EAAWC,EAAU,CAAC,EAAG,CAE5E,IAAMC,EAAkB,IAAIC,EACtBC,EAAgB,IAAIC,EACpBC,EAAsB,IAAIC,EAC1BC,EAAiB,IAAIC,EAW3B,MAR2B,IAAIC,EAC7BR,EACAE,EACAE,EACAE,CACF,EAGyB,WAAWT,EAAaC,EAAWC,CAAO,CACrE",
|
|
6
|
+
"names": ["ProjectInitializer", "templateManager", "hookInstaller", "dependencyInstaller", "gitInitializer", "projectName", "targetDir", "options", "initGit", "installDeps", "mkdirSync", "cpSync", "readFileSync", "writeFileSync", "existsSync", "join", "dirname", "fileURLToPath", "__filename", "__dirname", "TemplateManager", "projectName", "targetDir", "bundleDir", "bundledScriptsDir", "bundledHooksDir", "dirName", "fileName", "customized", "gitignoreSource", "writeFileSync", "readFileSync", "existsSync", "chmodSync", "join", "HookInstaller", "targetDir", "gitHooksDir", "join", "claudeHooksDir", "writeFileSync", "postMergeSource", "existsSync", "postMergeContent", "readFileSync", "postMergeHook", "chmodSync", "error", "execSync", "DependencyInstaller", "targetDir", "execSync", "GitInitializer", "targetDir", "initializeProject", "projectName", "targetDir", "options", "templateManager", "TemplateManager", "hookInstaller", "HookInstaller", "dependencyInstaller", "DependencyInstaller", "gitInitializer", "GitInitializer", "ProjectInitializer"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,61 +1,64 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@agentic15.com/agentic15-claude-zen",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Structured AI-assisted development framework for Claude Code with enforced quality standards",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"agentic15-claude-zen": "./bin/create-agentic15-claude-zen.js"
|
|
8
|
-
},
|
|
9
|
-
"type": "module",
|
|
10
|
-
"scripts": {
|
|
11
|
-
"build": "node esbuild.config.js",
|
|
12
|
-
"test": "node test/integration.test.js",
|
|
13
|
-
"test:e2e": "node test/e2e-verification.test.js",
|
|
14
|
-
"test:site": "node test/verify-test-site.js",
|
|
15
|
-
"prepublishOnly": "npm run build"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"agentic15",
|
|
19
|
-
"claude-code",
|
|
20
|
-
"claude-zen",
|
|
21
|
-
"ai-assisted-development",
|
|
22
|
-
"project-scaffold",
|
|
23
|
-
"workflow-enforcement",
|
|
24
|
-
"task-tracking",
|
|
25
|
-
"development-framework",
|
|
26
|
-
"quality-automation",
|
|
27
|
-
"git-hooks",
|
|
28
|
-
"test-driven-development"
|
|
29
|
-
],
|
|
30
|
-
"author": "Agentic15 <developers@agentic15.com>",
|
|
31
|
-
"license": "Apache-2.0",
|
|
32
|
-
"homepage": "https://github.com/agentic15/claude-zen",
|
|
33
|
-
"repository": {
|
|
34
|
-
"type": "git",
|
|
35
|
-
"url": "https://github.com/agentic15/claude-zen.git"
|
|
36
|
-
},
|
|
37
|
-
"bugs": {
|
|
38
|
-
"url": "https://github.com/agentic15/claude-zen/issues"
|
|
39
|
-
},
|
|
40
|
-
"publishConfig": {
|
|
41
|
-
"access": "public"
|
|
42
|
-
},
|
|
43
|
-
"files": [
|
|
44
|
-
"bin/",
|
|
45
|
-
"src/",
|
|
46
|
-
"dist/",
|
|
47
|
-
"templates/",
|
|
48
|
-
"templates/.gitignore",
|
|
49
|
-
"README.md",
|
|
50
|
-
"CHANGELOG.md",
|
|
51
|
-
"LICENSE"
|
|
52
|
-
],
|
|
53
|
-
"engines": {
|
|
54
|
-
"node": ">=18.0.0"
|
|
55
|
-
},
|
|
56
|
-
"
|
|
57
|
-
"@
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentic15.com/agentic15-claude-zen",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Structured AI-assisted development framework for Claude Code with enforced quality standards",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"agentic15-claude-zen": "./bin/create-agentic15-claude-zen.js"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "node esbuild.config.js",
|
|
12
|
+
"test": "node test/integration.test.js",
|
|
13
|
+
"test:e2e": "node test/e2e-verification.test.js",
|
|
14
|
+
"test:site": "node test/verify-test-site.js",
|
|
15
|
+
"prepublishOnly": "npm run build"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"agentic15",
|
|
19
|
+
"claude-code",
|
|
20
|
+
"claude-zen",
|
|
21
|
+
"ai-assisted-development",
|
|
22
|
+
"project-scaffold",
|
|
23
|
+
"workflow-enforcement",
|
|
24
|
+
"task-tracking",
|
|
25
|
+
"development-framework",
|
|
26
|
+
"quality-automation",
|
|
27
|
+
"git-hooks",
|
|
28
|
+
"test-driven-development"
|
|
29
|
+
],
|
|
30
|
+
"author": "Agentic15 <developers@agentic15.com>",
|
|
31
|
+
"license": "Apache-2.0",
|
|
32
|
+
"homepage": "https://github.com/agentic15/claude-zen",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/agentic15/claude-zen.git"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/agentic15/claude-zen/issues"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"bin/",
|
|
45
|
+
"src/",
|
|
46
|
+
"dist/",
|
|
47
|
+
"templates/",
|
|
48
|
+
"templates/.gitignore",
|
|
49
|
+
"README.md",
|
|
50
|
+
"CHANGELOG.md",
|
|
51
|
+
"LICENSE"
|
|
52
|
+
],
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=18.0.0"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@octokit/rest": "^20.0.2"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@playwright/test": "^1.57.0",
|
|
61
|
+
"esbuild": "^0.20.0",
|
|
62
|
+
"playwright": "^1.57.0"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024-2025 agentic15.com
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { Octokit } from '@octokit/rest';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* GitHubClient - Handles all GitHub API interactions
|
|
21
|
+
*
|
|
22
|
+
* Single Responsibility: Communicate with GitHub Issues API
|
|
23
|
+
*
|
|
24
|
+
* This class encapsulates all GitHub API calls and provides graceful
|
|
25
|
+
* degradation when GitHub integration is unavailable or disabled.
|
|
26
|
+
*/
|
|
27
|
+
export class GitHubClient {
|
|
28
|
+
/**
|
|
29
|
+
* Initialize GitHub client
|
|
30
|
+
*
|
|
31
|
+
* @param {string|null} token - GitHub Personal Access Token
|
|
32
|
+
* @param {string|null} owner - Repository owner
|
|
33
|
+
* @param {string|null} repo - Repository name
|
|
34
|
+
*/
|
|
35
|
+
constructor(token, owner, repo) {
|
|
36
|
+
if (!token || !owner || !repo) {
|
|
37
|
+
this.configured = false;
|
|
38
|
+
this.octokit = null;
|
|
39
|
+
this.owner = null;
|
|
40
|
+
this.repo = null;
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
this.configured = true;
|
|
45
|
+
this.octokit = new Octokit({ auth: token });
|
|
46
|
+
this.owner = owner;
|
|
47
|
+
this.repo = repo;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if GitHub client is configured and ready
|
|
52
|
+
*
|
|
53
|
+
* @returns {boolean} True if configured, false otherwise
|
|
54
|
+
*/
|
|
55
|
+
isConfigured() {
|
|
56
|
+
return this.configured;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Create a new GitHub issue
|
|
61
|
+
*
|
|
62
|
+
* @param {string} title - Issue title
|
|
63
|
+
* @param {string} body - Issue body (markdown supported)
|
|
64
|
+
* @param {string[]} labels - Array of label names
|
|
65
|
+
* @returns {Promise<number|null>} Issue number if created, null on failure
|
|
66
|
+
*/
|
|
67
|
+
async createIssue(title, body, labels = []) {
|
|
68
|
+
if (!this.configured) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
try {
|
|
73
|
+
const response = await this.octokit.issues.create({
|
|
74
|
+
owner: this.owner,
|
|
75
|
+
repo: this.repo,
|
|
76
|
+
title,
|
|
77
|
+
body,
|
|
78
|
+
labels
|
|
79
|
+
});
|
|
80
|
+
return response.data.number;
|
|
81
|
+
} catch (error) {
|
|
82
|
+
console.warn('⚠ Failed to create GitHub issue:', error.message);
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Update labels on an existing GitHub issue
|
|
89
|
+
*
|
|
90
|
+
* @param {number} issueNumber - Issue number
|
|
91
|
+
* @param {string[]} labels - Array of label names to set
|
|
92
|
+
* @returns {Promise<boolean>} True if updated, false on failure
|
|
93
|
+
*/
|
|
94
|
+
async updateIssueLabels(issueNumber, labels) {
|
|
95
|
+
if (!this.configured || !issueNumber) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
try {
|
|
100
|
+
await this.octokit.issues.update({
|
|
101
|
+
owner: this.owner,
|
|
102
|
+
repo: this.repo,
|
|
103
|
+
issue_number: issueNumber,
|
|
104
|
+
labels
|
|
105
|
+
});
|
|
106
|
+
return true;
|
|
107
|
+
} catch (error) {
|
|
108
|
+
console.warn('⚠ Failed to update issue labels:', error.message);
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Add a comment to an existing GitHub issue
|
|
115
|
+
*
|
|
116
|
+
* @param {number} issueNumber - Issue number
|
|
117
|
+
* @param {string} comment - Comment text (markdown supported)
|
|
118
|
+
* @returns {Promise<boolean>} True if added, false on failure
|
|
119
|
+
*/
|
|
120
|
+
async addIssueComment(issueNumber, comment) {
|
|
121
|
+
if (!this.configured || !issueNumber) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
try {
|
|
126
|
+
await this.octokit.issues.createComment({
|
|
127
|
+
owner: this.owner,
|
|
128
|
+
repo: this.repo,
|
|
129
|
+
issue_number: issueNumber,
|
|
130
|
+
body: comment
|
|
131
|
+
});
|
|
132
|
+
return true;
|
|
133
|
+
} catch (error) {
|
|
134
|
+
console.warn('⚠ Failed to add issue comment:', error.message);
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Close a GitHub issue with optional comment
|
|
141
|
+
*
|
|
142
|
+
* @param {number} issueNumber - Issue number
|
|
143
|
+
* @param {string|null} comment - Optional closing comment
|
|
144
|
+
* @returns {Promise<boolean>} True if closed, false on failure
|
|
145
|
+
*/
|
|
146
|
+
async closeIssue(issueNumber, comment = null) {
|
|
147
|
+
if (!this.configured || !issueNumber) {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
try {
|
|
152
|
+
// Add comment first if provided
|
|
153
|
+
if (comment) {
|
|
154
|
+
await this.addIssueComment(issueNumber, comment);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Close the issue
|
|
158
|
+
await this.octokit.issues.update({
|
|
159
|
+
owner: this.owner,
|
|
160
|
+
repo: this.repo,
|
|
161
|
+
issue_number: issueNumber,
|
|
162
|
+
state: 'closed'
|
|
163
|
+
});
|
|
164
|
+
return true;
|
|
165
|
+
} catch (error) {
|
|
166
|
+
console.warn('⚠ Failed to close issue:', error.message);
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|