-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: add init command support #1886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
amitksingh1490
wants to merge
5
commits into
main
Choose a base branch
from
feat/project-onbaording
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+76
−1
Open
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
607b770
feat: add init command support
amitksingh1490 eee7381
Merge branch 'main' into feat/project-onbaording
amitksingh1490 e52e243
Merge branch 'main' into feat/project-onbaording
amitksingh1490 2c8c13a
refactor(init): update AGENTS.md description and streamline contribut…
amitksingh1490 b91558d
Merge branch 'main' into feat/project-onbaording
amitksingh1490 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,78 @@ | ||
| --- | ||
| name: init | ||
| description: Initialize or update AGENTS.md with project contribution guidelines | ||
| --- | ||
| # STEP 1: ANALYZE THE CODEBASE | ||
|
|
||
| **Always start by analyzing the project** to understand: | ||
| - Build system | ||
| - Test framework and conventions | ||
| - Code organization patterns and architecture | ||
| - Existing conventions in the codebase | ||
|
|
||
| Read key files to understand the project structure and patterns. | ||
|
|
||
| # STEP 2: CHECK EXISTING DOCUMENTATION | ||
|
|
||
| - Check if `.cursor/rules/` or `.cursorrules` exists - extract important development rules | ||
| - Check if `.github/copilot-instructions.md` exists - extract important development rules | ||
| - Check if `README.md` exists - extract development/contribution guidelines (NOT project description) | ||
| - Check if `AGENTS.md` exists - use it as a starting point to improve upon | ||
|
|
||
| # STEP 3: CREATE/UPDATE AGENTS.MD | ||
|
|
||
| Create a concise AGENTS.md file focused on HOW TO CONTRIBUTE to this codebase, not what the project does. | ||
|
|
||
| ## CRITICAL CONSTRAINTS: | ||
| - **HARD LIMIT: Maximum 250 lines total** - if file exceeds this, remove content until under limit | ||
| - Focus on contribution workflow, not project explanation | ||
| - Assume reader is already familiar with the tech stack | ||
| - No sections explaining "what is X" - only "how to work with X" | ||
| - Brevity over completeness - capture only the essentials | ||
|
|
||
| ## REQUIRED CONTENT: | ||
|
|
||
| ## 1. Common Commands | ||
| Essential commands for development workflow: | ||
| - How to run tests (all tests, single test, specific module) | ||
| - How to build/compile (dev, release, verification) | ||
| - How to lint/format code | ||
| - Any project-specific dev commands | ||
|
|
||
| ## 2. Architecture Overview | ||
| **Critical patterns only** - architectural rules that prevent bugs: | ||
| - Project structure and layer dependencies | ||
| - Key design patterns used (with 1 short example if complex) | ||
| - Important data flows (1-2 sentences each) | ||
| - Any non-obvious architectural decisions | ||
|
|
||
| ## 3. Contribution Guidelines | ||
| Project-specific development practices: | ||
| - Error handling patterns | ||
| - Test writing conventions | ||
| - Code organization patterns | ||
| - Documentation requirements | ||
| - Any project-specific coding standards | ||
|
|
||
| ## 4. Development Notes | ||
| - Git commit conventions | ||
| - Important anti-patterns to avoid | ||
| - When to ask before making changes | ||
|
|
||
| ## STRICT RULES: | ||
| - NO detailed component/module/class lists that can be discovered by reading code | ||
| - NO exhaustive inventories of files, tools, or features | ||
| - NO examples longer than 10 lines | ||
| - NO generic advice that applies to any project (e.g., "write tests", "use version control") | ||
| - NO descriptions of what the software does or its features | ||
| - NO repetition - be concise and direct | ||
| - If updating existing AGENTS.md, preserve project-specific knowledge while removing bloat | ||
|
|
||
| ## OUTPUT FORMAT: | ||
| Begin with: | ||
|
|
||
| ``` | ||
| # AGENTS.md | ||
|
|
||
| This file provides guidance to coding agents (like yourself) when working with code in this repository. | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.