@kennethsolomon/shipkit 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +321 -0
  2. package/bin/shipkit.js +146 -0
  3. package/commands/sk/brainstorm.md +63 -0
  4. package/commands/sk/branch.md +35 -0
  5. package/commands/sk/config.md +96 -0
  6. package/commands/sk/execute-plan.md +85 -0
  7. package/commands/sk/features.md +238 -0
  8. package/commands/sk/finish-feature.md +154 -0
  9. package/commands/sk/help.md +103 -0
  10. package/commands/sk/hotfix.md +61 -0
  11. package/commands/sk/plan.md +30 -0
  12. package/commands/sk/release.md +72 -0
  13. package/commands/sk/security-check.md +188 -0
  14. package/commands/sk/set-profile.md +71 -0
  15. package/commands/sk/status.md +25 -0
  16. package/commands/sk/update-task.md +35 -0
  17. package/commands/sk/write-plan.md +72 -0
  18. package/package.json +23 -0
  19. package/skills/sk:accessibility/LICENSE.txt +177 -0
  20. package/skills/sk:accessibility/SKILL.md +150 -0
  21. package/skills/sk:api-design/LICENSE.txt +177 -0
  22. package/skills/sk:api-design/SKILL.md +158 -0
  23. package/skills/sk:brainstorming/SKILL.md +124 -0
  24. package/skills/sk:debug/SKILL.md +252 -0
  25. package/skills/sk:debug/debug_conductor.py +177 -0
  26. package/skills/sk:debug/lib/__init__.py +1 -0
  27. package/skills/sk:debug/lib/bug_gatherer.py +55 -0
  28. package/skills/sk:debug/lib/context_reader.py +139 -0
  29. package/skills/sk:debug/lib/findings_writer.py +76 -0
  30. package/skills/sk:debug/lib/lessons_writer.py +165 -0
  31. package/skills/sk:debug/lib/step_runner.py +326 -0
  32. package/skills/sk:features/SKILL.md +238 -0
  33. package/skills/sk:frontend-design/LICENSE.txt +177 -0
  34. package/skills/sk:frontend-design/SKILL.md +191 -0
  35. package/skills/sk:laravel-init/SKILL.md +37 -0
  36. package/skills/sk:laravel-new/SKILL.md +68 -0
  37. package/skills/sk:lint/SKILL.md +113 -0
  38. package/skills/sk:perf/LICENSE.txt +177 -0
  39. package/skills/sk:perf/SKILL.md +188 -0
  40. package/skills/sk:release/SKILL.md +113 -0
  41. package/skills/sk:release/references/android-checklist.md +269 -0
  42. package/skills/sk:release/references/ios-checklist.md +339 -0
  43. package/skills/sk:release/release.sh +378 -0
  44. package/skills/sk:review/SKILL.md +346 -0
  45. package/skills/sk:review/references/security-checklist.md +223 -0
  46. package/skills/sk:schema-migrate/SKILL.md +125 -0
  47. package/skills/sk:schema-migrate/orms/drizzle.md +546 -0
  48. package/skills/sk:schema-migrate/orms/laravel.md +367 -0
  49. package/skills/sk:schema-migrate/orms/prisma.md +357 -0
  50. package/skills/sk:schema-migrate/orms/rails.md +351 -0
  51. package/skills/sk:schema-migrate/orms/sqlalchemy.md +385 -0
  52. package/skills/sk:schema-migrate/references/detection.md +110 -0
  53. package/skills/sk:setup-claude/SKILL.md +365 -0
  54. package/skills/sk:setup-claude/references/detection.md +6 -0
  55. package/skills/sk:setup-claude/references/templates.md +11 -0
  56. package/skills/sk:setup-claude/scripts/apply_setup_claude.py +443 -0
  57. package/skills/sk:setup-claude/scripts/detect_arch_changes.py +437 -0
  58. package/skills/sk:setup-claude/templates/.claude/docs/arch-changelog-guide.md.template +6 -0
  59. package/skills/sk:setup-claude/templates/.claude/docs/changelog-guide.md.template +12 -0
  60. package/skills/sk:setup-claude/templates/CHANGELOG.md.template +21 -0
  61. package/skills/sk:setup-claude/templates/CLAUDE.md.template +299 -0
  62. package/skills/sk:setup-claude/templates/arch-changelog-guide.md.template +3 -0
  63. package/skills/sk:setup-claude/templates/changelog-guide.md.template +3 -0
  64. package/skills/sk:setup-claude/templates/commands/brainstorm.md.template +74 -0
  65. package/skills/sk:setup-claude/templates/commands/execute-plan.md.template +57 -0
  66. package/skills/sk:setup-claude/templates/commands/features.md.template +238 -0
  67. package/skills/sk:setup-claude/templates/commands/finish-feature.md.template +155 -0
  68. package/skills/sk:setup-claude/templates/commands/plan.md.template +30 -0
  69. package/skills/sk:setup-claude/templates/commands/re-setup.md.template +38 -0
  70. package/skills/sk:setup-claude/templates/commands/release.md.template +74 -0
  71. package/skills/sk:setup-claude/templates/commands/security-check.md.template +172 -0
  72. package/skills/sk:setup-claude/templates/commands/status.md.template +17 -0
  73. package/skills/sk:setup-claude/templates/commands/write-plan.md.template +34 -0
  74. package/skills/sk:setup-claude/templates/finish-feature.md.template +3 -0
  75. package/skills/sk:setup-claude/templates/plan.md.template +3 -0
  76. package/skills/sk:setup-claude/templates/status.md.template +3 -0
  77. package/skills/sk:setup-claude/templates/tasks/findings.md.template +19 -0
  78. package/skills/sk:setup-claude/templates/tasks/lessons.md.template +26 -0
  79. package/skills/sk:setup-claude/templates/tasks/progress.md.template +20 -0
  80. package/skills/sk:setup-claude/templates/tasks/security-findings.md.template +5 -0
  81. package/skills/sk:setup-claude/templates/tasks/todo.md.template +26 -0
  82. package/skills/sk:setup-claude/templates/tasks/workflow-status.md.template +31 -0
  83. package/skills/sk:setup-claude/templates/tasks-findings.md.template +3 -0
  84. package/skills/sk:setup-claude/templates/tasks-lessons.md.template +3 -0
  85. package/skills/sk:setup-claude/templates/tasks-progress.md.template +3 -0
  86. package/skills/sk:setup-claude/templates/tasks-todo.md.template +3 -0
  87. package/skills/sk:setup-claude/tests/test_apply_setup_claude.py +193 -0
  88. package/skills/sk:setup-optimizer/SKILL.md +184 -0
  89. package/skills/sk:setup-optimizer/lib/__init__.py +24 -0
  90. package/skills/sk:setup-optimizer/lib/detect.py +205 -0
  91. package/skills/sk:setup-optimizer/lib/discover.py +221 -0
  92. package/skills/sk:setup-optimizer/lib/enrich.py +163 -0
  93. package/skills/sk:setup-optimizer/lib/merge.py +277 -0
  94. package/skills/sk:setup-optimizer/lib/sidecar.py +129 -0
  95. package/skills/sk:setup-optimizer/optimize_claude.py +174 -0
  96. package/skills/sk:setup-optimizer/templates/CLAUDE.md.template +105 -0
  97. package/skills/sk:skill-creator/LICENSE.txt +202 -0
  98. package/skills/sk:skill-creator/SKILL.md +479 -0
  99. package/skills/sk:skill-creator/agents/analyzer.md +274 -0
  100. package/skills/sk:skill-creator/agents/comparator.md +202 -0
  101. package/skills/sk:skill-creator/agents/grader.md +223 -0
  102. package/skills/sk:skill-creator/assets/eval_review.html +146 -0
  103. package/skills/sk:skill-creator/eval-viewer/generate_review.py +471 -0
  104. package/skills/sk:skill-creator/eval-viewer/viewer.html +1325 -0
  105. package/skills/sk:skill-creator/references/schemas.md +430 -0
  106. package/skills/sk:skill-creator/scripts/aggregate_benchmark.py +401 -0
  107. package/skills/sk:skill-creator/scripts/generate_report.py +326 -0
  108. package/skills/sk:skill-creator/scripts/improve_description.py +248 -0
  109. package/skills/sk:skill-creator/scripts/package_skill.py +136 -0
  110. package/skills/sk:skill-creator/scripts/quick_validate.py +103 -0
  111. package/skills/sk:skill-creator/scripts/run_eval.py +310 -0
  112. package/skills/sk:skill-creator/scripts/run_loop.py +332 -0
  113. package/skills/sk:skill-creator/scripts/utils.py +47 -0
  114. package/skills/sk:smart-commit/SKILL.md +175 -0
  115. package/skills/sk:test/SKILL.md +171 -0
  116. package/skills/sk:write-tests/SKILL.md +195 -0
  117. package/skills/sk:write-tests/references/patterns.md +209 -0
@@ -0,0 +1,129 @@
1
+ """File handling and marker detection for safe CLAUDE.md updates."""
2
+
3
+ from pathlib import Path
4
+ from typing import Tuple, Optional
5
+
6
+
7
+ MARKER = "<!-- Generated by /setup-claude-tools -->"
8
+
9
+
10
+ def has_marker(file_path: Path) -> bool:
11
+ """Check if file contains the generation marker.
12
+
13
+ Args:
14
+ file_path: Path to the file
15
+
16
+ Returns:
17
+ True if marker is present, False otherwise
18
+ """
19
+ if not file_path.exists():
20
+ return False
21
+
22
+ try:
23
+ content = file_path.read_text()
24
+ return MARKER in content
25
+ except Exception:
26
+ return False
27
+
28
+
29
+ def is_custom_file(file_path: Path) -> bool:
30
+ """Check if file exists and was not generated by our tools.
31
+
32
+ Args:
33
+ file_path: Path to the file
34
+
35
+ Returns:
36
+ True if file is custom (not generated), False otherwise
37
+ """
38
+ if not file_path.exists():
39
+ return False
40
+ return not has_marker(file_path)
41
+
42
+
43
+ def get_target_file(base_name: str = "CLAUDE.md") -> Tuple[Path, bool]:
44
+ """Determine where to write the file.
45
+
46
+ Args:
47
+ base_name: Original filename (e.g., 'CLAUDE.md')
48
+
49
+ Returns:
50
+ Tuple of (target_path, is_sidecar) where is_sidecar indicates if we're
51
+ writing to a sidecar file instead of the original
52
+ """
53
+ original = Path(base_name)
54
+
55
+ # If file doesn't exist, use the original location
56
+ if not original.exists():
57
+ return original, False
58
+
59
+ # If file has our marker, it's safe to update
60
+ if has_marker(original):
61
+ return original, False
62
+
63
+ # File exists but is custom - write to sidecar
64
+ sidecar = Path(f"{base_name}.setup-claude.md")
65
+ return sidecar, True
66
+
67
+
68
+ def add_marker(content: str) -> str:
69
+ """Add generation marker to content.
70
+
71
+ Args:
72
+ content: File content
73
+
74
+ Returns:
75
+ Content with marker appended
76
+ """
77
+ if content.endswith("\n"):
78
+ return f"{content}\n{MARKER}\n"
79
+ else:
80
+ return f"{content}\n\n{MARKER}\n"
81
+
82
+
83
+ def format_output(
84
+ target_path: Path,
85
+ is_sidecar: bool,
86
+ line_count: int,
87
+ sections: list,
88
+ ) -> str:
89
+ """Format user-friendly output message.
90
+
91
+ Args:
92
+ target_path: Path where file was written
93
+ is_sidecar: Whether writing to sidecar
94
+ line_count: Number of lines in the file
95
+ sections: List of sections in the file
96
+
97
+ Returns:
98
+ Formatted output message
99
+ """
100
+ msg = f"✓ {'CLAUDE.md suggestion' if is_sidecar else 'CLAUDE.md created'}: "
101
+ msg += f"{target_path}\n"
102
+ msg += f" Lines: {line_count}/150\n"
103
+ msg += f" Sections: {', '.join(sections)}\n"
104
+
105
+ if is_sidecar:
106
+ msg += "\n📝 Note: CLAUDE.md already exists. Review the suggestion above and merge manually.\n"
107
+
108
+ return msg
109
+
110
+
111
+ def count_lines(content: str) -> int:
112
+ """Count non-empty lines in content."""
113
+ return len([line for line in content.split("\n") if line.strip()])
114
+
115
+
116
+ def extract_sections(content: str) -> list:
117
+ """Extract section names from markdown.
118
+
119
+ Args:
120
+ content: Markdown content
121
+
122
+ Returns:
123
+ List of section names
124
+ """
125
+ sections = []
126
+ for line in content.split("\n"):
127
+ if line.startswith("## "):
128
+ sections.append(line[3:].strip())
129
+ return sections
@@ -0,0 +1,174 @@
1
+ #!/usr/bin/env python3
2
+ """Enhanced optimizer: Enrich CLAUDE.md with comprehensive project context.
3
+
4
+ Instead of just trimming lines, this discovers:
5
+ - Project directory structure (src/, tests/, docs/, etc.)
6
+ - Documentation files and resources
7
+ - Build workflows and common commands
8
+ - Preserves user customizations across multiple runs
9
+ """
10
+
11
+ import sys
12
+ from pathlib import Path
13
+
14
+ # Add lib to path
15
+ sys.path.insert(0, str(Path(__file__).parent.parent))
16
+
17
+ from lib.sidecar import has_marker, add_marker, count_lines, extract_sections
18
+ from lib.discover import discover_directories, discover_documentation, discover_workflows
19
+ from lib.merge import (
20
+ parse_claude_md, merge_sections, reconstruct_claude_md,
21
+ extract_preservation_report
22
+ )
23
+ from lib.enrich import (
24
+ generate_directories_section, generate_documentation_section,
25
+ generate_workflows_section, estimate_content_lines
26
+ )
27
+
28
+
29
+ def optimize_claude_md(file_path: Path = None) -> None:
30
+ """Optimize CLAUDE.md by enriching with project context.
31
+
32
+ This is now a maintenance command that:
33
+ 1. Discovers actual project structure
34
+ 2. Finds documentation and workflows
35
+ 3. Merges discoveries with existing content
36
+ 4. Preserves user customizations
37
+ 5. Reports what was added/preserved
38
+
39
+ Args:
40
+ file_path: Path to CLAUDE.md (defaults to ./CLAUDE.md)
41
+ """
42
+ if file_path is None:
43
+ file_path = Path("CLAUDE.md")
44
+
45
+ if not file_path.exists():
46
+ print(f"❌ CLAUDE.md not found at {file_path}")
47
+ print(" Run `/setup-starter` to create one")
48
+ return
49
+
50
+ print("🔍 Analyzing project structure...")
51
+
52
+ # Discover project information
53
+ root_path = file_path.parent
54
+ discovered_dirs = discover_directories(root_path)
55
+ discovered_docs = discover_documentation(root_path)
56
+ discovered_workflows = discover_workflows(root_path)
57
+
58
+ # Parse existing CLAUDE.md
59
+ existing_content = file_path.read_text()
60
+ existing_sections = parse_claude_md(existing_content)
61
+ original_lines = count_lines(existing_content)
62
+
63
+ # Generate new sections based on discoveries
64
+ generated_sections = _generate_sections_from_discoveries(
65
+ discovered_dirs, discovered_docs, discovered_workflows
66
+ )
67
+
68
+ # Merge existing with generated (preserves user edits)
69
+ merged_sections, preservation_report = merge_sections(
70
+ existing_sections, generated_sections
71
+ )
72
+
73
+ # Reconstruct CLAUDE.md
74
+ optimized = reconstruct_claude_md(merged_sections, include_marker=True)
75
+ optimized_lines = count_lines(optimized)
76
+
77
+ # Print report
78
+ print()
79
+ print("📊 Analysis Complete:")
80
+ print(f" 📁 Directories discovered: {len(discovered_dirs)}")
81
+ print(f" 📚 Documentation files: {len(discovered_docs)}")
82
+ print(f" 🔧 Workflows found: {sum(len(v) for v in discovered_workflows.values())}")
83
+ print()
84
+
85
+ # Show what was discovered
86
+ if discovered_dirs:
87
+ print("✅ Key Directories Found:")
88
+ for dir_name, desc in list(discovered_dirs.items())[:5]:
89
+ print(f" - {dir_name}/")
90
+ if len(discovered_dirs) > 5:
91
+ print(f" ... and {len(discovered_dirs) - 5} more")
92
+ print()
93
+
94
+ if discovered_docs:
95
+ print("📖 Documentation Found:")
96
+ for doc_path, desc in list(discovered_docs.items())[:5]:
97
+ print(f" - {doc_path}")
98
+ if len(discovered_docs) > 5:
99
+ print(f" ... and {len(discovered_docs) - 5} more")
100
+ print()
101
+
102
+ # Show preservation report
103
+ if preservation_report:
104
+ print(preservation_report)
105
+ print()
106
+
107
+ # Save the updated file
108
+ if has_marker(file_path):
109
+ # Safe to overwrite - file was generated by our tools
110
+ try:
111
+ file_path.write_text(optimized)
112
+ print(f"✨ CLAUDE.md enriched and saved!")
113
+ print(f" Before: {original_lines} lines")
114
+ print(f" After: {optimized_lines} lines")
115
+ if optimized_lines > original_lines:
116
+ print(f" Added: {optimized_lines - original_lines} lines (comprehensive context)")
117
+ else:
118
+ print(f" Optimized: {original_lines - optimized_lines} lines saved")
119
+ print()
120
+ print("💡 Tip: Run this command again after adding new directories or docs!")
121
+ except Exception as e:
122
+ print(f"❌ Error updating file: {e}")
123
+ else:
124
+ # File is custom - write to sidecar
125
+ sidecar_path = Path(f"CLAUDE.md.setup-claude.md")
126
+ try:
127
+ sidecar_path.write_text(optimized)
128
+ print(f"📝 Enriched version saved to: {sidecar_path}")
129
+ print(f" Original: {original_lines} lines")
130
+ print(f" Enriched: {optimized_lines} lines")
131
+ print()
132
+ print(" Your CLAUDE.md is custom (no generation marker).")
133
+ print(" Review the suggestion above and merge manually if desired.")
134
+ except Exception as e:
135
+ print(f"❌ Error creating suggestion: {e}")
136
+
137
+
138
+ def _generate_sections_from_discoveries(
139
+ discovered_dirs, discovered_docs, discovered_workflows
140
+ ) -> dict:
141
+ """Generate template sections from discoveries.
142
+
143
+ Args:
144
+ discovered_dirs: Dict of directory names to descriptions
145
+ discovered_docs: Dict of doc paths to descriptions
146
+ discovered_workflows: Dict of workflow types to commands
147
+
148
+ Returns:
149
+ Dict of section_name -> content
150
+ """
151
+ sections = {}
152
+
153
+ # Add Key Directories section
154
+ if discovered_dirs:
155
+ sections['Key Directories'] = generate_directories_section(discovered_dirs)
156
+
157
+ # Add Documentation section
158
+ if discovered_docs:
159
+ sections['Documentation & Resources'] = generate_documentation_section(discovered_docs)
160
+
161
+ # Add Workflows section
162
+ if discovered_workflows:
163
+ sections['Common Workflows'] = generate_workflows_section(discovered_workflows)
164
+
165
+ return sections
166
+
167
+
168
+ def main():
169
+ """Main entry point."""
170
+ optimize_claude_md()
171
+
172
+
173
+ if __name__ == "__main__":
174
+ main()
@@ -0,0 +1,105 @@
1
+ # [PROJECT_NAME]
2
+
3
+ [DESCRIPTION]
4
+
5
+ ## Stack
6
+
7
+ | Layer | Tech |
8
+ |-------|------|
9
+ | Language | [LANGUAGE] |
10
+ | Framework | [FRAMEWORK] |
11
+ | Database | [DATABASE] |
12
+ | UI | [UI] |
13
+ | Testing | [TESTING] |
14
+
15
+ ## Quick Start
16
+
17
+ ```bash
18
+ [DEV_COMMAND]
19
+ ```
20
+
21
+ ## Project Structure
22
+
23
+ ```
24
+ [PROJECT_NAME]/
25
+ ├── src/ # Source code
26
+ ├── tests/ # Test suite
27
+ ├── docs/ # Documentation
28
+ ├── package.json # Dependencies
29
+ └── README.md # Project readme
30
+ ```
31
+
32
+ ## Key Files
33
+
34
+ - **src/** - Main application code
35
+ - **tests/** - Unit and integration tests
36
+ - **.env.example** - Environment variables template
37
+ - **package.json** - Dependencies and scripts
38
+
39
+ ## Development
40
+
41
+ ### Setup
42
+ ```bash
43
+ [BUILD_COMMAND]
44
+ ```
45
+
46
+ ### Run
47
+ ```bash
48
+ [DEV_COMMAND]
49
+ ```
50
+
51
+ ### Test
52
+ ```bash
53
+ [TEST_COMMAND]
54
+ ```
55
+
56
+ ### Lint
57
+ ```bash
58
+ [LINT_COMMAND]
59
+ ```
60
+
61
+ ## Build & Deploy
62
+
63
+ - **Development**: `[DEV_COMMAND]`
64
+ - **Production build**: `[BUILD_COMMAND]`
65
+ - **Testing**: `[TEST_COMMAND]`
66
+ - **Linting**: `[LINT_COMMAND]`
67
+
68
+ ## Important Context
69
+
70
+ - The project uses [LANGUAGE] with [FRAMEWORK]
71
+ - Database: [DATABASE]
72
+ - Testing framework: [TESTING]
73
+ - Build tool: [BUILD_SYSTEM]
74
+
75
+ ## Environment Variables
76
+
77
+ Create a `.env` file based on `.env.example` with:
78
+ - Required API keys
79
+ - Database connection strings
80
+ - Feature flags
81
+
82
+ ## Common Tasks
83
+
84
+ ### Add a dependency
85
+ ```bash
86
+ npm install <package-name>
87
+ ```
88
+
89
+ ### Run tests
90
+ ```bash
91
+ [TEST_COMMAND]
92
+ ```
93
+
94
+ ### Build for production
95
+ ```bash
96
+ [BUILD_COMMAND]
97
+ ```
98
+
99
+ ## Documentation
100
+
101
+ - **Architecture**: See `docs/architecture.md`
102
+ - **API**: See `docs/api.md`
103
+ - **Contributing**: See `CONTRIBUTING.md`
104
+
105
+ <!-- Generated by /setup-claude-tools -->
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.