{"_id":"@arkatom/ai-instructions","_rev":"5-3dcbf0231aa6d9966f110240c0495909","name":"@arkatom/ai-instructions","dist-tags":{"latest":"0.6.0"},"versions":{"0.1.0":{"name":"@arkatom/ai-instructions","version":"0.1.0","keywords":["cli","scaffolding","ai","claude","cursor","copilot","development","instructions","template"],"author":{"url":"https://github.com/arkatom","name":"arkatom","email":"murata.atsuo.95@gmail.com"},"license":"MIT","_id":"@arkatom/ai-instructions@0.1.0","maintainers":[{"name":"arkatom","email":"murata.atsuo.95@gmail.com"}],"homepage":"https://github.com/arkatom/ai-instructions#readme","bugs":{"url":"https://github.com/arkatom/ai-instructions/issues"},"bin":{"ai-instructions":"dist/cli.js"},"dist":{"shasum":"2ea32b309c10d6ed6b42e22a2319230b768ed3cd","tarball":"https://registry.npmjs.org/@arkatom/ai-instructions/-/ai-instructions-0.1.0.tgz","fileCount":31,"integrity":"sha512-Slpu4SP6yQQ9TQctNmdP+cu74sBzQn/nroEPmaUWMe8OAglK8Rc99Jgw98sZ7928xUnuPERnpeom/XVQEiQuww==","signatures":[{"sig":"MEYCIQCgFEsNbhOIhPSPbYNc9cqQl2WLG07zMVYRACGpnOEZCwIhAOO/MIEgaTOxouhpxAnBiWwRHZEHVpNo547Hg88Fzh1O","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56173},"main":"dist/cli.js","types":"dist/cli.d.ts","engines":{"npm":">=7.0.0","node":">=16.0.0"},"gitHead":"e60bf9f01d121c476fee776d3772db8e1fd64cf7","scripts":{"dev":"ts-node src/cli.ts","lint":"echo \"Linting not configured yet\"","test":"jest","build":"tsc","clean":"rm -rf dist","start":"node dist/cli.js","prepack":"npm run build","version":"npm run build && git add dist","postpack":"echo \"📦 Package ready for publishing\"","prepublish":"echo \"⚠️ Use 'npm run prepublishOnly' for safety\"","test:watch":"jest --watch","postversion":"git push && git push --tags","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm test"},"_npmUser":{"name":"arkatom","email":"murata.atsuo.95@gmail.com"},"repository":{"url":"git+https://github.com/arkatom/ai-instructions.git","type":"git"},"_npmVersion":"10.9.2","description":"🤖 CLI tool to scaffold AI development instructions for ClaudeCode, Cursor, GitHub Copilot and more","directories":{},"_nodeVersion":"23.11.0","dependencies":{"ora":"^8.2.0","chalk":"^4.1.2","fs-extra":"^11.3.0","inquirer":"^12.9.0","commander":"^14.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.4.0","ts-node":"^10.9.2","typescript":"^5.9.2","@types/jest":"^30.0.0","@types/node":"^24.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ai-instructions_0.1.0_1754254843391_0.5560098754250362","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@arkatom/ai-instructions","version":"0.2.0","keywords":["cli","scaffolding","ai","claude","cursor","copilot","development","instructions","template"],"author":{"url":"https://github.com/arkatom","name":"arkatom","email":"murata.atsuo.95@gmail.com"},"license":"MIT","_id":"@arkatom/ai-instructions@0.2.0","maintainers":[{"name":"arkatom","email":"murata.atsuo.95@gmail.com"}],"homepage":"https://github.com/arkatom/ai-instructions#readme","bugs":{"url":"https://github.com/arkatom/ai-instructions/issues"},"bin":{"ai-instructions":"dist/cli.js"},"dist":{"shasum":"8933b8e8c5759810210b866763088265ab6a87b3","tarball":"https://registry.npmjs.org/@arkatom/ai-instructions/-/ai-instructions-0.2.0.tgz","fileCount":46,"integrity":"sha512-gxxWwazadJ5IzfyKf7DbG9YziunE4Ggf7cFbGXK2BQipXWC4IoorvNYOkcO54NSx9D4pPf/0iYlDWeRRdlg6FQ==","signatures":[{"sig":"MEYCIQDjzn4Fdx5YS2ml5ZM1FH/6hY6OXdnN4cDuGSjpZO+KxAIhAPnkQtBQ0dtobsFbpnXJzYkNWPIkvYdBrbe60T+y02ZQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":65059},"main":"dist/cli.js","types":"dist/cli.d.ts","engines":{"npm":">=7.0.0","node":">=16.0.0"},"gitHead":"7ce17fbd624bf0d1a55ed678d0b1557649091a39","scripts":{"dev":"ts-node src/cli.ts","lint":"echo \"Linting not configured yet\"","test":"jest","build":"tsc","clean":"rm -rf dist","start":"node dist/cli.js","prepack":"npm run build","version":"npm run build && git add dist","postpack":"echo \"📦 Package ready for publishing\"","prepublish":"echo \"⚠️ Use 'npm run prepublishOnly' for safety\"","test:watch":"jest --watch","postversion":"git push && git push --tags","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build && npm test"},"_npmUser":{"name":"arkatom","email":"murata.atsuo.95@gmail.com"},"repository":{"url":"git+https://github.com/arkatom/ai-instructions.git","type":"git"},"_npmVersion":"10.9.2","description":"🤖 CLI tool to scaffold AI development instructions for ClaudeCode, Cursor, GitHub Copilot and more","directories":{},"_nodeVersion":"23.11.0","dependencies":{"ora":"^8.2.0","chalk":"^4.1.2","fs-extra":"^11.3.0","inquirer":"^12.9.0","commander":"^14.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.4.0","ts-node":"^10.9.2","typescript":"^5.9.2","@types/jest":"^30.0.0","@types/node":"^24.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ai-instructions_0.2.0_1754262295781_0.40369568824758995","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@arkatom/ai-instructions","version":"0.3.0","keywords":["cli","scaffolding","ai","claude","cursor","copilot","development","instructions","template"],"author":{"url":"https://github.com/arkatom","name":"arkatom","email":"murata.atsuo.95@gmail.com"},"license":"MIT","_id":"@arkatom/ai-instructions@0.3.0","maintainers":[{"name":"arkatom","email":"murata.atsuo.95@gmail.com"}],"homepage":"https://github.com/arkatom/ai-instructions#readme","bugs":{"url":"https://github.com/arkatom/ai-instructions/issues"},"bin":{"ai-instructions":"dist/cli.js"},"dist":{"shasum":"94d325d743600259aff7526698ebb26fe59d9fc2","tarball":"https://registry.npmjs.org/@arkatom/ai-instructions/-/ai-instructions-0.3.0.tgz","fileCount":31,"integrity":"sha512-jNi6MMvVomHA/8cYEA8BkXuH/hjHEmQu+AJQETD7H00KcuoyjqWJDMM82ifVjJ1g/AwqLWPuDuIavLdq+5nq7A==","signatures":[{"sig":"MEUCIGaYUU8NX/t8aTTD/Vm4LUgW52JgY+Kcsj9lvWkjtyYWAiEArGzRrm4k3W9VKd1ghQ4gAq7KkTKEI5V4jUcF6W2dnuY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64959},"main":"dist/cli.js","types":"dist/cli.d.ts","engines":{"npm":">=7.0.0","node":">=16.0.0"},"gitHead":"0b225eed9c0b4ed13abe06ee355503a3eee163d7","scripts":{"dev":"ts-node src/cli.ts","lint":"echo \"Linting not configured yet\"","test":"jest","build":"tsc","clean":"rm -rf dist","start":"node dist/cli.js","prepack":"npm run build","version":"npm run build && git add dist","postpack":"echo \"📦 Package ready for publishing\"","prepublish":"echo \"⚠️ Use 'npm run prepublishOnly' for safety\"","test:watch":"jest --watch","postversion":"git push && git push --tags","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"arkatom","email":"murata.atsuo.95@gmail.com"},"repository":{"url":"git+https://github.com/arkatom/ai-instructions.git","type":"git"},"_npmVersion":"10.9.2","description":"🤖 CLI tool to scaffold AI development instructions for ClaudeCode, Cursor, GitHub Copilot and more","directories":{},"_nodeVersion":"23.11.0","dependencies":{"ora":"^8.2.0","chalk":"^4.1.2","fs-extra":"^11.3.0","inquirer":"^12.9.0","commander":"^14.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.4.0","ts-node":"^10.9.2","typescript":"^5.9.2","@types/jest":"^30.0.0","@types/node":"^24.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ai-instructions_0.3.0_1754305503329_0.6500838310211667","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@arkatom/ai-instructions","version":"0.5.0","keywords":["cli","scaffolding","ai","claude","cursor","copilot","development","instructions","template"],"author":{"url":"https://github.com/arkatom","name":"arkatom","email":"murata.atsuo.95@gmail.com"},"license":"MIT","_id":"@arkatom/ai-instructions@0.5.0","maintainers":[{"name":"arkatom","email":"murata.atsuo.95@gmail.com"}],"homepage":"https://github.com/arkatom/ai-instructions#readme","bugs":{"url":"https://github.com/arkatom/ai-instructions/issues"},"bin":{"ai-instructions":"dist/cli.js"},"dist":{"shasum":"732d15086f6a36cb9cf3a58d3e02c6a80672ec38","tarball":"https://registry.npmjs.org/@arkatom/ai-instructions/-/ai-instructions-0.5.0.tgz","fileCount":138,"integrity":"sha512-ppw/1p8LN/Koo9mvuC6ARNAMiEsC9vjDcV6r7gyTuf/HyS/xf/fNRBdadwlhN/SaJIitrXQ4eLAZSSYeTZQPOw==","signatures":[{"sig":"MEUCIQCU2YcbjtUkMCKCxoVthkGabc1Ir9lapFwvrtWIdcQQJAIgCLTRjk8QA+AG1XMiwsXDFBKnftj6be20eugTnKxsNsI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":364016},"main":"dist/cli.js","types":"dist/cli.d.ts","engines":{"npm":">=7.0.0","node":">=16.0.0"},"gitHead":"36c6432f8249a0b6dde41b6212f1e00958cbe12f","scripts":{"dev":"ts-node src/cli.ts","lint":"eslint src/**/*.ts test/**/*.ts","test":"jest","build":"tsc","clean":"rm -rf dist","start":"node dist/cli.js","prepack":"npm run build","prepare":"husky","version":"npm run build","lint:fix":"npm run lint -- --fix","postpack":"echo \"📦 Package ready for publishing\"","prepublish":"echo \"⚠️ Use 'npm run prepublishOnly' for safety\"","test:watch":"jest --watch","postversion":"git push && git push --tags","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"arkatom","email":"murata.atsuo.95@gmail.com"},"repository":{"url":"git+https://github.com/arkatom/ai-instructions.git","type":"git"},"_npmVersion":"10.9.2","description":"🤖 CLI tool to scaffold AI development instructions for ClaudeCode, Cursor, GitHub Copilot and more","directories":{},"_nodeVersion":"23.11.0","dependencies":{"chalk":"^4.1.2","fs-extra":"^11.3.0","inquirer":"^12.9.0","commander":"^14.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","husky":"^9.1.7","eslint":"^9.32.0","ts-jest":"^29.4.0","ts-node":"^10.9.2","@eslint/js":"^9.32.0","typescript":"^5.9.2","@types/jest":"^30.0.0","@types/node":"^24.1.0","@types/inquirer":"^9.0.8","typescript-eslint":"^8.39.0","eslint-plugin-import":"^2.32.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","@typescript-eslint/parser":"^8.39.0","@typescript-eslint/eslint-plugin":"^8.39.0","eslint-import-resolver-typescript":"^4.4.4"},"_npmOperationalInternal":{"tmp":"tmp/ai-instructions_0.5.0_1754784432430_0.306714644219233","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@arkatom/ai-instructions","version":"0.6.0","description":"🤖 CLI tool to scaffold AI development instructions for ClaudeCode, Cursor, GitHub Copilot and more","main":"dist/cli.js","bin":{"ai-instructions":"dist/cli.js"},"scripts":{"build":"tsc","dev":"ts-node src/cli.ts","start":"node dist/cli.js","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","lint":"eslint src/**/*.ts test/**/*.ts","lint:fix":"npm run lint -- --fix","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build","prepack":"npm run build","postpack":"echo \"📦 Package ready for publishing\"","prepublish":"echo \"⚠️ Use 'npm run prepublishOnly' for safety\"","version":"npm run build","postversion":"git push && git push --tags","prepare":"husky"},"repository":{"type":"git","url":"git+https://github.com/arkatom/ai-instructions.git"},"keywords":["cli","scaffolding","ai","claude","cursor","copilot","cline","windsurf","development","instructions","template","japanese","multilingual"],"author":{"name":"arkatom","email":"murata.atsuo.95@gmail.com","url":"https://github.com/arkatom"},"license":"MIT","engines":{"node":">=16.0.0","npm":">=7.0.0"},"types":"dist/cli.d.ts","bugs":{"url":"https://github.com/arkatom/ai-instructions/issues"},"homepage":"https://github.com/arkatom/ai-instructions#readme","dependencies":{"chalk":"^4.1.2","commander":"^14.0.0","fs-extra":"^11.3.0","inquirer":"^12.9.0"},"devDependencies":{"@eslint/js":"^9.32.0","@types/inquirer":"^9.0.8","@types/jest":"^30.0.0","@types/js-yaml":"^4.0.9","@types/node":"^24.1.0","@typescript-eslint/eslint-plugin":"^8.39.0","@typescript-eslint/parser":"^8.39.0","eslint":"^9.32.0","eslint-config-prettier":"^10.1.8","eslint-import-resolver-typescript":"^4.4.4","eslint-plugin-import":"^2.32.0","eslint-plugin-prettier":"^5.5.4","eslint-plugin-sonarjs":"^3.0.4","husky":"^9.1.7","jest":"^29.7.0","js-yaml":"^4.1.0","ts-jest":"^29.4.0","ts-node":"^10.9.2","typescript":"^5.9.2","typescript-eslint":"^8.39.0"},"_id":"@arkatom/ai-instructions@0.6.0","gitHead":"21454321a478a4ce6f8c08b4c0b6c833e5c5a6e4","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-tGkM0w6qk41iYqKGgrhkCrzLTW37TcwugUAIJ4w8rTtyiA3IlglmoMg9LGjDHxXesGBj+eGRcJA1ifqh036+eA==","shasum":"70625527ca785b8e343598d6876a22b79fc5c11b","tarball":"https://registry.npmjs.org/@arkatom/ai-instructions/-/ai-instructions-0.6.0.tgz","fileCount":376,"unpackedSize":2022849,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICmkcQ9z+f76Czl9x7Zc4/vb8t9Vjye3dwV8KmZInq3RAiEAgBOBPdmVDd2X4BtEGmWP9CpdscAzhCTNQy3DjhWlrsE="}]},"_npmUser":{"name":"arkatom","email":"murata.atsuo.95@gmail.com"},"directories":{},"maintainers":[{"name":"arkatom","email":"murata.atsuo.95@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ai-instructions_0.6.0_1755249297175_0.5224189004885027"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-03T21:00:43.172Z","modified":"2025-08-15T09:14:57.621Z","0.1.0":"2025-08-03T21:00:43.589Z","0.2.0":"2025-08-03T23:04:55.947Z","0.3.0":"2025-08-04T11:05:03.526Z","0.5.0":"2025-08-10T00:07:12.696Z","0.6.0":"2025-08-15T09:14:57.434Z"},"bugs":{"url":"https://github.com/arkatom/ai-instructions/issues"},"author":{"name":"arkatom","email":"murata.atsuo.95@gmail.com","url":"https://github.com/arkatom"},"license":"MIT","homepage":"https://github.com/arkatom/ai-instructions#readme","keywords":["cli","scaffolding","ai","claude","cursor","copilot","cline","windsurf","development","instructions","template","japanese","multilingual"],"repository":{"type":"git","url":"git+https://github.com/arkatom/ai-instructions.git"},"description":"🤖 CLI tool to scaffold AI development instructions for ClaudeCode, Cursor, GitHub Copilot and more","maintainers":[{"name":"arkatom","email":"murata.atsuo.95@gmail.com"}],"readme":"# ai-instructions\n\n🤖 **Professional CLI tool to scaffold AI development instructions for ClaudeCode, Cursor, GitHub Copilot and more**\n\n**English** | [日本語](./README.ja.md)\n\n[![NPM Version](https://img.shields.io/npm/v/@arkatom/ai-instructions)](https://www.npmjs.com/package/@arkatom/ai-instructions)\n[![Tests](https://img.shields.io/badge/tests-110%20passing-brightgreen)](./test)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue)](https://www.typescriptlang.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n[![Semantic Versioning](https://img.shields.io/badge/semver-2.0.0-blue)](https://semver.org/)\n\n## 📋 Overview\n\n`ai-instructions` streamlines the setup of AI-driven development environments by generating comprehensive instruction templates and configuration files. Perfect for teams and individual developers who want to standardize their AI assistant interactions across projects.\n\n### ✨ Key Benefits\n\n- **🚀 Instant Setup**: Generate instruction templates in seconds\n- **🛠️ Multi-Tool Support**: Claude Code, GitHub Copilot, Cursor AI IDE, and Cline AI support\n- **📚 Development Templates**: Essential development methodology guides (TDD, Git workflow, Scrum)\n- **🌐 Multilingual Core**: Main instructions available in English, Japanese, and Chinese\n- **🛡️ Advanced File Safety**: 5 intelligent conflict resolution strategies with smart merging\n- **⚙️ Highly Configurable**: Customizable project names and output directories\n- **🔒 Validated Input**: Built-in validation for project names and paths\n- **🧪 Battle-tested**: Comprehensive test suite ensuring reliability\n- **🎯 Agent Templates**: 70+ specialized agent templates (CLI integration pending - see Issue #93)\n\n## 🛡️ Advanced File Safety System (v0.5.0)\n\n**🚀 NEW: Intelligent conflict resolution with 5 resolution strategies**\n\n### 🔒 Safe Usage Patterns\n\n```bash\n# ✅ RECOMMENDED: Interactive conflict resolution (default)\nai-instructions init --project-name \"My Project\"\n\n# ✅ SAFE: Automatic backup creation\nai-instructions init --conflict-resolution backup --project-name \"My Project\"\n\n# ✅ SMART: Merge existing + template content intelligently\nai-instructions init --conflict-resolution merge --project-name \"My Project\"\n\n# ✅ PREVIEW: See what files would be created/modified\nai-instructions init --preview\n\n# ⚠️ SKIP: Skip conflicting files (non-destructive)\nai-instructions init --conflict-resolution skip --project-name \"My Project\"\n\n# 🚨 DANGEROUS: Force overwrite (use with extreme caution)\nai-instructions init --force --conflict-resolution overwrite\n```\n\n### 🛡️ Conflict Resolution Strategies\n\nWhen existing files are detected, you can choose from 5 intelligent strategies:\n\n| Strategy | Behavior | Use Case | Data Safety |\n|----------|----------|----------|-------------|\n| `backup` | Creates timestamped backup, writes new file | **Default** - Safest option | 🟢 High |\n| `merge` | Intelligently merges existing + template content | Update existing instructions | 🟢 High |\n| `interactive` | Prompts for choice per conflict | Full control over each file | 🟢 High |\n| `skip` | Skips conflicting files, creates non-conflicting ones | Partial update scenarios | 🟢 High |\n| `overwrite` | Overwrites without backup | **Dangerous** - Only with --force | 🔴 None |\n\n### 🔧 Advanced CLI Options (v0.5.0)\n\n```bash\n# Conflict resolution strategy\nai-instructions init --conflict-resolution <backup|merge|interactive|skip|overwrite>\n\n# Disable interactive prompts (batch mode)\nai-instructions init --no-interactive\n\n# Disable automatic backups (use with caution)\nai-instructions init --no-backup\n\n# Preview mode - see what would happen\nai-instructions init --preview\n```\n\n### 🧠 Intelligent Content Merging\n\nFor markdown files, the merge strategy uses smart content analysis:\n- **Headers**: Preserves unique sections from both files\n- **Content blocks**: Avoids duplication\n- **Metadata**: Maintains existing project-specific content\n- **Templates**: Integrates new template content seamlessly\n\n### 📁 Backup System\n\nWhen using `backup` or `merge` strategies:\n- Creates timestamped backups: `filename.backup.YYYYMMDD_HHMMSS.ext`\n- Handles multiple backups automatically\n- Never overwrites existing backups\n\n> **💡 Pro Tip**: Use `--conflict-resolution merge` to update existing instruction files while preserving your customizations!\n\n## 🏗️ Architecture & Dependency Management\n\n### System Architecture\n\n```mermaid\ngraph TB\n    subgraph \"CLI Layer\"\n        CLI[cli.ts]\n    end\n\n    subgraph \"Generator Layer\"\n        Factory[GeneratorFactory]\n        Base[BaseGenerator]\n        Claude[ClaudeGenerator]\n        Cursor[CursorGenerator]\n        Copilot[CopilotGenerator]\n        Cline[ClineGenerator]\n        Windsurf[WindsurfGenerator]\n    end\n\n    subgraph \"Core Services\"\n        Config[ConfigurationManager]\n        SharedProc[SharedTemplateProcessor]\n        Parallel[ParallelGeneratorOperations]\n        Errors[Error Classes]\n        Types[Type Definitions]\n    end\n\n    subgraph \"Converter Layer\"\n        ConvFactory[ConverterFactory]\n        FormatConv[Format Converters]\n    end\n\n    subgraph \"Utilities\"\n        FileUtils[FileUtils]\n        ConflictHandler[FileConflictHandler]\n        MergeHandler[SmartMergeHandler]\n    end\n\n    CLI --> Factory\n    Factory --> Base\n    Base --> Claude\n    Base --> Cursor\n    Base --> Copilot\n    Base --> Cline\n    Base --> Windsurf\n\n    Base --> Config\n    Base --> SharedProc\n    Base --> Errors\n\n    SharedProc --> Config\n    SharedProc --> Parallel\n    SharedProc --> Types\n\n    Config --> Types\n    Config --> Errors\n\n    Parallel --> FileUtils\n\n    Claude --> ConvFactory\n    ConvFactory --> FormatConv\n\n    FileUtils --> ConflictHandler\n    ConflictHandler --> MergeHandler\n```\n\n### Dependency Flow\n\n```mermaid\ngraph LR\n    subgraph \"No Dependencies\"\n        Types[types.ts]\n        Errors[errors.ts]\n    end\n\n    subgraph \"Low-Level Dependencies\"\n        FileUtils[file-utils.ts]\n        MergeHandler[smart-merge-handler.ts]\n    end\n\n    subgraph \"Mid-Level Dependencies\"\n        Config[config-manager.ts]\n        ConflictHandler[file-conflict-handler.ts]\n        Parallel[parallel-generator.ts]\n    end\n\n    subgraph \"High-Level Dependencies\"\n        SharedProc[shared-processor.ts]\n        Base[base.ts]\n    end\n\n    subgraph \"Top-Level Components\"\n        Generators[Specific Generators]\n        Converters[Format Converters]\n        CLI[cli.ts]\n    end\n\n    Types --> Config\n    Types --> SharedProc\n    Types --> Base\n\n    Errors --> Config\n    Errors --> SharedProc\n    Errors --> Base\n    Errors --> Parallel\n\n    FileUtils --> ConflictHandler\n    FileUtils --> Parallel\n\n    MergeHandler --> ConflictHandler\n\n    Config --> SharedProc\n    Config --> Base\n\n    ConflictHandler --> Base\n\n    Parallel --> SharedProc\n\n    SharedProc --> Base\n\n    Base --> Generators\n    Base --> Converters\n\n    Generators --> CLI\n    Converters --> CLI\n```\n\n### Module Responsibilities\n\n| Module | Purpose | Dependencies | Dependents |\n|--------|---------|--------------|------------|\n| **types.ts** | Type definitions & guards | None | All modules |\n| **errors.ts** | Error class hierarchy | None | Core services |\n| **config-manager.ts** | Configuration loading & caching | types, errors | Generators, SharedProc |\n| **parallel-generator.ts** | Parallel file operations | errors, FileUtils | SharedProc |\n| **shared-processor.ts** | Template processing logic | types, config, parallel | Generators |\n| **base.ts** | Abstract generator base | All core services | Specific generators |\n| **file-utils.ts** | File operations | None | Multiple modules |\n| **file-conflict-handler.ts** | Conflict resolution | FileUtils, MergeHandler | Base generator |\n\n### Circular Dependency Prevention\n\nThis project uses **ESLint with eslint-plugin-import** to automatically detect and prevent circular dependencies:\n\n```javascript\n// eslint.config.js\n'import/no-cycle': ['error', {\n  maxDepth: Infinity,\n  ignoreExternal: true\n}]\n```\n\n**Benefits:**\n- ✅ Build-time detection of circular imports\n- ✅ Prevents runtime errors from dependency cycles\n- ✅ Enforces clean architecture principles\n- ✅ Integrated into CI/CD pipeline\n\n### Directory Structure\n\n```\nsrc/\n├── generators/           # Generator implementations\n│   ├── base.ts          # Abstract base class\n│   ├── claude.ts        # Claude-specific generator\n│   ├── cursor.ts        # Cursor-specific generator\n│   ├── cline.ts         # Cline-specific generator\n│   ├── copilot.ts       # GitHub Copilot generator\n│   ├── windsurf.ts      # Windsurf generator\n│   ├── factory.ts       # Generator factory\n│   ├── config-manager.ts    # Configuration management\n│   ├── errors.ts        # Error definitions\n│   ├── parallel-generator.ts # Parallel operations\n│   ├── shared-processor.ts   # Shared processing\n│   └── types.ts         # Type definitions\n├── converters/          # Format converters\n│   ├── index.ts         # Converter exports\n│   ├── format-converter.ts   # Base converter\n│   ├── cursor-converter.ts   # Cursor format\n│   ├── copilot-converter.ts  # Copilot format\n│   └── windsurf-converter.ts # Windsurf format\n├── utils/               # Utility functions\n│   ├── file-utils.ts    # File operations\n│   ├── file-conflict-handler.ts # Conflict resolution\n│   └── smart-merge-handler.ts   # Content merging\n└── cli.ts               # CLI entry point\n```\n\n## 📦 Installation\n\n### Global Installation (Recommended)\n\n```bash\nnpm install -g @arkatom/ai-instructions\n```\n\n### Local Project Installation\n\n```bash\nnpm install --save-dev @arkatom/ai-instructions\n```\n\n### Usage without Installation\n\n```bash\nnpx @arkatom/ai-instructions init\n```\n\n## 🚀 Quick Start\n\n### Basic Usage\n\n```bash\nai-instructions init\n```\n\nThis creates a complete set of AI development instructions in your current directory.\n\n### Check Current Status\n\n```bash\n# Check AI instruction files in current directory\nai-instructions status\n\n# Check specific directory\nai-instructions status --directory ./my-project\n```\n\n### Interactive Help Guide\n\n```bash\n# Launch interactive setup guide with examples\nai-instructions help-interactive\n```\n\n### Custom Project Setup\n\n```bash\nai-instructions init --project-name \"my-awesome-project\" --output ./my-project\n```\n\n### Multi-Tool Support\n\nGenerate instructions for different AI development tools:\n\n```bash\n# Generate Claude Code instructions (default)\nai-instructions init --tool claude\n\n# Generate GitHub Copilot instructions\nai-instructions init --tool github-copilot --project-name \"my-project\"\n\n# Generate Cursor AI IDE instructions\nai-instructions init --tool cursor --project-name \"my-project\"\n\n# Generate Cline AI instructions\nai-instructions init --tool cline --project-name \"my-project\"\n```\n\n### Format Conversion (New in v0.3.0)\n\nGenerate Claude templates and convert to other formats:\n\n```bash\n# Convert to Cursor MDC format with short option\nai-instructions init -f cursor --project-name \"my-project\"\n\n# Convert to GitHub Copilot 2024 standard\nai-instructions init --output-format copilot --project-name \"my-project\"\n\n# Convert to Windsurf pair programming rules\nai-instructions init --output-format windsurf --project-name \"my-project\"\n\n# Maintain original Claude format (default)\nai-instructions init --output-format claude --project-name \"my-project\"\n```\n\n### Language Options\n\nThe main instruction file is available in multiple languages:\n\n```bash\n# English (default)\nai-instructions init --lang en --project-name \"my-project\"\n\n# Japanese (main instruction file)\nai-instructions init --lang ja --project-name \"プロジェクト名\"\n\n# Chinese (main instruction file)\nai-instructions init --lang ch --project-name \"项目名称\"\n\n# Combined: Japanese main file with Cursor format\nai-instructions init -f cursor --lang ja --project-name \"カーソルプロジェクト\"\n```\n\n**Note**: Currently, only the main instruction file (`CLAUDE.md`/core) supports multiple languages. Other templates are in English.\n\n### Safe Updates and Migrations (v0.5.0)\n\n```bash\n# Update existing project instructions with intelligent merging\nai-instructions init --conflict-resolution merge --project-name \"existing-project\"\n\n# Backup existing files before updating\nai-instructions init --conflict-resolution backup --project-name \"existing-project\"\n\n# Interactive updates - choose per file\nai-instructions init --conflict-resolution interactive --project-name \"existing-project\"\n\n# Non-destructive partial update\nai-instructions init --conflict-resolution skip --project-name \"existing-project\"\n\n# Batch mode without prompts (CI/CD safe)\nai-instructions init --no-interactive --conflict-resolution backup\n```\n\n### Real-world Examples\n\n```bash\n# Setup for a React project\nai-instructions init --project-name \"react-dashboard\" --output ./projects/dashboard\n\n# Setup for a Japanese project\nai-instructions init --project-name \"プロジェクト名\" --output ./日本語プロジェクト\n\n# Setup with spaces in name\nai-instructions init --project-name \"My Enterprise App\" --output ./enterprise\n```\n\n## 📁 Generated File Structure\n\nThe file structure varies depending on the AI tool you select:\n\n### Claude Code (Default)\n```\nyour-project/\n├── CLAUDE.md                    # Main ClaudeCode instructions\n└── instructions/                # Development methodology guides\n    ├── base.md                  # Core development rules (MUST READ)\n    ├── deep-think.md           # Deep thinking methodology\n    ├── KentBeck-tdd-rules.md   # Test-Driven Development rules\n    ├── commit-rules.md         # Git commit conventions\n    ├── pr-rules.md             # Pull request guidelines\n    ├── git.md                  # Git workflow instructions\n    ├── develop.md              # Development process guide\n    ├── command.md              # Shell command execution rules\n    └── memo/\n        └── index.md            # Project memo template\n```\n\n### GitHub Copilot (`--tool github-copilot` or `--output-format copilot`)\n```\nyour-project/\n└── .github/\n    └── copilot-instructions.md  # GitHub Copilot 2024 standard format\n```\n\n### Cursor AI IDE (`--tool cursor` or `--output-format cursor`)\n```\nyour-project/\n└── .cursor/\n    └── rules/\n        └── main.mdc            # Cursor AI rules with YAML front matter\n```\n\n### Windsurf AI (`--output-format windsurf`)\n```\nyour-project/\n└── .windsurfrules              # Windsurf pair programming rules\n```\n\n### Cline AI (`--tool cline`)\n```\nyour-project/\n├── .clinerules/                # Cline AI rule directory\n│   ├── 01-coding.md           # Core development rules\n│   └── 02-documentation.md    # Documentation standards\n└── instructions/              # Comprehensive development guides\n    ├── base.md                # Core development rules (MUST READ)\n    ├── deep-think.md         # Deep thinking methodology\n    ├── note.md               # Work documentation guidelines\n    └── ... (additional methodology and workflow files)\n```\n\n### File Descriptions\n\n| File | Purpose | Key Content |\n|------|---------|-------------|\n| `CLAUDE.md` | Main entry point for AI assistants | Project-specific instructions with {{projectName}} replaced |\n| `base.md` | Core development principles | Fundamental rules that must be followed |\n| `deep-think.md` | Thinking methodology | Quality-first approach and analytical thinking |\n| `KentBeck-tdd-rules.md` | TDD methodology | Kent Beck's Test-Driven Development principles |\n| `commit-rules.md` | Git commit standards | Semantic commit message format with domain tags |\n| `pr-rules.md` | Pull request rules | PR creation guidelines and review process |\n\n## ⚙️ Configuration Options\n\n### Available Commands\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `init` | Initialize AI development instructions | `ai-instructions init` |\n| `status` | Show current configuration status | `ai-instructions status` |\n| `help-interactive` | Launch interactive help guide | `ai-instructions help-interactive` |\n| `help` | Display help for a command | `ai-instructions help init` |\n\n### Command Line Options\n\n| Option | Alias | Description | Default | Example |\n|--------|-------|-------------|---------|---------|\n| `--lang` | `-l` | Template language (en, ja, ch) | `en` | `--lang ja` |\n| `--output-format` | `-f` | Output format (claude, cursor, copilot, windsurf) | `claude` | `-f cursor` |\n| `--output` | `-o` | Output directory | Current directory | `--output ./my-project` |\n| `--project-name` | `-n` | Project name for templates | `my-project` | `--project-name \"My App\"` |\n| `--tool` | `-t` | AI tool type (legacy, use --output-format) | `claude` | `--tool cursor` |\n| `--conflict-resolution` | | 🛡️ Conflict resolution strategy (backup, merge, interactive, skip, overwrite) | `backup` | `--conflict-resolution merge` |\n| `--no-interactive` | | 🤖 Disable interactive conflict resolution | `false` | `--no-interactive` |\n| `--no-backup` | | 🚨 Disable automatic backups (use with caution) | `false` | `--no-backup` |\n| `--force` | | ⚠️ Force overwrite existing files (DANGEROUS) | `false` | `--force` |\n| `--preview` | | 🔍 Preview files that would be created/modified | `false` | `--preview` |\n| `--version` | | Show version number | | |\n| `--help` | | Display help information | | |\n\n### Project Name Validation\n\nThe CLI validates project names to ensure filesystem compatibility:\n\n- ✅ **Allowed**: Letters, numbers, spaces, hyphens, underscores, Unicode characters\n- ❌ **Forbidden**: `<`, `>`, `|` characters\n- ❌ **Invalid**: Empty strings or whitespace-only names\n\n### Examples of Valid Project Names\n\n```bash\nai-instructions init --project-name \"My Project\"           # ✅ Spaces\nai-instructions init --project-name \"my-awesome_project-v2\" # ✅ Hyphens & underscores\nai-instructions init --project-name \"プロジェクト名\"          # ✅ Unicode/Japanese\nai-instructions init --project-name \"Project123\"           # ✅ Numbers\n```\n\n### Output Format Validation\n\nThe CLI validates output formats to ensure compatibility:\n\n- ✅ **Supported Formats**: `claude`, `cursor`, `copilot`, `windsurf`\n- ✅ **Case Sensitive**: Format names must be lowercase\n- ❌ **Invalid**: `CLAUDE`, `Cursor`, `GitHub-Copilot`\n\n### Language Code Validation\n\n- ✅ **Supported Languages**: `en` (English), `ja` (Japanese), `ch` (Chinese)\n- ✅ **Case Sensitive**: Language codes must be lowercase\n- ❌ **Invalid**: `EN`, `JA`, `fr`, `es`\n\n## 🔄 Format Conversion Benefits\n\n### Why Use Format Conversion?\n\n1. **🎆 Single Source of Truth**: Maintain comprehensive Claude templates\n2. **🔧 Tool-Specific Optimization**: Each format optimized for its AI tool\n3. **🗏 Multi-Tool Workflows**: Switch between AI tools seamlessly\n4. **🌐 Consistent Standards**: Apply same development practices across tools\n\n### Format-Specific Features\n\n| Format | File Extension | Key Features |\n|--------|----------------|---------------|\n| `claude` | `.md` | Full instruction hierarchy, TDD rules, comprehensive guides |\n| `cursor` | `.mdc` | YAML front matter, MDC format, Cursor-optimized prompts |\n| `copilot` | `.md` | GitHub 2024 standard, repository-focused instructions |\n| `windsurf` | `.windsurfrules` | Pair programming focus, collaborative development rules |\n| `cline` | `.md` | Multiple specialized files in .clinerules directory |\n\n## 🛠️ Development\n\n### Prerequisites\n\n- Node.js 16+\n- npm 7+\n- TypeScript 5.0+\n\n### Setup Development Environment\n\n```bash\n# Clone the repository\ngit clone https://github.com/arkatom/ai-instructions.git\ncd ai-instructions\n\n# Install dependencies\nnpm install\n\n# Run tests\nnpm test\n\n# Build the project\nnpm run build\n\n# Test CLI locally\nnpm run cli init --help\n```\n\n### Running Tests\n\n```bash\n# Run all tests (8 test suites, 110 tests)\nnpm test\n\n# Run tests in watch mode\nnpm run test:watch\n\n# Run tests with coverage\nnpm run test:coverage\n```\n\n### Test Coverage\n\nOur comprehensive test suite includes:\n\n- **Basic CLI functionality** (version, help, commands) - 41 tests\n- **Format conversion system** (Claude → Cursor/Copilot/Windsurf) - 16 tests\n- **Multi-language support** (English, Japanese, Chinese templates) - 21 tests\n- **Multi-tool generators** (Claude, GitHub Copilot, Cursor) - 17 tests\n- **Error handling** (invalid inputs, filesystem errors, validation) - 8 tests\n- **Edge cases** (Unicode names, very long names, empty strings) - 7 tests\n\n**Key Test Categories:**\n- **CLI Output Format Support**: 12 comprehensive tests for --output-format/-f option\n- **Multi-Language Templates**: Tests for en/ja/ch language generation\n- **GitHub Copilot 2024 Standard**: Tests for new .github/copilot-instructions.md path\n- **Content verification**: Generated file structure and content validation\n- **Integration testing**: End-to-end CLI workflows with format conversion\n\n### Build and Distribution\n\n```bash\n# Build TypeScript to JavaScript\nnpm run build\n\n# Create distribution package\nnpm pack\n\n# Publish to npm (maintainers only)\nnpm publish\n```\n\n## 📌 Versioning\n\nThis project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) (SemVer). Version numbers follow the format `MAJOR.MINOR.PATCH`:\n\n- **MAJOR**: Incompatible API changes or breaking changes\n- **MINOR**: New functionality in a backwards compatible manner\n- **PATCH**: Backwards compatible bug fixes\n\nFor example:\n- `0.3.0` → `0.3.1`: Bug fixes or minor improvements\n- `0.3.1` → `0.4.0`: New features or enhancements\n- `0.4.0` → `1.0.0`: Breaking changes or major redesign\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guidelines](./CONTRIBUTING.md) for details.\n\n### Development Workflow\n\n1. **Fork** the repository\n2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)\n3. **Follow TDD** principles - write tests first\n4. **Implement** your changes with proper TypeScript types\n5. **Test** thoroughly (`npm test`)\n6. **Commit** using our [commit conventions](./instructions/commit-rules.md)\n7. **Submit** a pull request\n\n### Code Quality Standards\n\n- **TDD Required**: All new features must have tests\n- **TypeScript**: Strict type checking enabled\n- **ESLint**: Code style enforcement\n- **100% Test Coverage**: For new features\n- **Documentation**: Update README for new features\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n\n## 📞 Support\n\n- **Issues**: [GitHub Issues](https://github.com/arkatom/ai-instructions/issues)\n- **Documentation**: This README and generated instruction files\n- **Examples**: See the [examples](./examples) directory\n\n## 🙏 Acknowledgments\n\n- **Kent Beck** for the foundational Test-Driven Development methodology\n  - *\"Test-Driven Development: By Example\"* (2003) - The seminal work that defined TDD\n  - *\"Tidy First?\"* (2023) - Modern approach to structural vs behavioral changes\n  - The three rules of TDD that guide our development process\n- **Martin Fowler** for documenting and evangelizing TDD practices\n- **ClaudeCode team** for inspiration on AI-assisted development workflows\n- **Open source community** for the excellent tools and libraries that make this possible\n\n---\n\n**Made with ❤️ for AI-assisted development workflows**\n","readmeFilename":"README.md"}