-
-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from yamadashy/feature/custom-instruction
Add support for project instruction file
- Loading branch information
Showing
19 changed files
with
427 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Coding Guidelines | ||
- Follow the Airbnb JavaScript Style Guide | ||
- Suggest splitting files into smaller, focused units when appropriate | ||
- Add comments for non-obvious logic. Keep all text in English | ||
- All new features should have corresponding unit tests | ||
|
||
# Generate Comprehensive Output | ||
- Include all content without abbreviation, unless specified otherwise | ||
- Optimize for handling large codebases while maintaining output quality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import type { RepopackConfigMerged } from '../../config/configTypes.js'; | ||
|
||
export const generateHeader = (generationDate: string): string => { | ||
return ` | ||
This file is a merged representation of the entire codebase, combining all repository files into a single document. | ||
Generated by Repopack on: ${generationDate} | ||
`.trim(); | ||
}; | ||
|
||
export const generateSummaryPurpose = (): string => { | ||
return ` | ||
This file contains a packed representation of the entire repository's contents. | ||
It is designed to be easily consumable by AI systems for analysis, code review, | ||
or other automated processes. | ||
`.trim(); | ||
}; | ||
|
||
export const generateSummaryFileFormat = (): string => { | ||
return ` | ||
The content is organized as follows: | ||
1. This summary section | ||
2. Repository information | ||
3. Repository structure | ||
`.trim(); | ||
}; | ||
|
||
export const generateSummaryUsageGuidelines = (config: RepopackConfigMerged, repositoryInstruction: string): string => { | ||
return ` | ||
- This file should be treated as read-only. Any changes should be made to the | ||
original repository files, not this packed version. | ||
- When processing this file, use the file path to distinguish | ||
between different files in the repository. | ||
- Be aware that this file may contain sensitive information. Handle it with | ||
the same level of security as you would the original repository. | ||
${config.output.headerText ? '- Pay special attention to the Repository Description. These contain important context and guidelines specific to this project.' : ''} | ||
${repositoryInstruction ? '- Pay special attention to the Repository Instruction. These contain important context and guidelines specific to this project.' : ''} | ||
`.trim(); | ||
}; | ||
|
||
export const generateSummaryNotes = (config: RepopackConfigMerged): string => { | ||
return ` | ||
- Some files may have been excluded based on .gitignore rules and Repopack's | ||
configuration. | ||
- Binary files are not included in this packed representation. Please refer to | ||
the Repository Structure section for a complete list of file paths, including | ||
binary files. | ||
${config.output.removeComments ? '- Code comments have been removed.\n' : ''} | ||
${config.output.showLineNumbers ? '- Line numbers have been added to the beginning of each line.\n' : ''} | ||
`.trim(); | ||
}; | ||
|
||
export const generateSummaryAdditionalInfo = (): string => { | ||
return ` | ||
For more information about Repopack, visit: https://github.com/yamadashy/repopack | ||
`.trim(); | ||
}; |
Oops, something went wrong.