-
-
Notifications
You must be signed in to change notification settings - Fork 17
✨ Repo hygene #305
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
Merged
Merged
✨ Repo hygene #305
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
75da356
disable prettier
007d13c
add repohygiene
96e9a04
add parallel execution of all repositories in workspaces
abc7771
add smarter ui
a02e1ee
crossite scripting
e1b2c93
Apply suggestions from code review
rajbos 418575b
Fix merge conflict issues
rajbos 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,2 @@ | ||
| # Ignore all files - formatting disabled for 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,172 @@ | ||
| /** | ||
| * Repository Hygiene Check Skill | ||
| * This skill analyzes repository structure and configuration to identify hygiene issues | ||
| * and provide actionable recommendations. | ||
| */ | ||
| export const REPO_HYGIENE_SKILL = `--- | ||
| name: repo-hygiene | ||
| description: Analyze repository hygiene and structure to identify missing configuration files, documentation, and best practices. Returns structured JSON report with actionable recommendations. | ||
| --- | ||
|
|
||
| # Repository Hygiene Check Skill | ||
|
|
||
| This skill analyzes repository structure and configuration to identify hygiene issues and provide actionable recommendations. It checks for the presence of essential files, consistent coding standards, CI/CD setup, and other foundational signals that indicate a well-maintained repository suitable for AI-assisted development. | ||
|
|
||
| ## Overview | ||
|
|
||
| The skill performs 16 automated checks across 4 categories: | ||
|
|
||
| - **Version Control**: Git setup, ignore files, environment templates | ||
| - **Code Quality**: Linters, formatters, type safety configuration | ||
| - **CI/CD & Automation**: Continuous integration, standard scripts, task runners | ||
| - **Environment**: Dev containers, Docker, runtime version pinning | ||
|
|
||
| Each check has a weight (2-5) indicating its importance. The skill returns a structured JSON report with: | ||
|
|
||
| - Overall hygiene score (0-100%) | ||
| - Individual check results (pass/fail/warning) | ||
| - Prioritized recommendations | ||
| - Missing files and configuration hints | ||
|
|
||
| ## Hygiene Checks Performed | ||
|
|
||
| ### Category: Version Control (Weight: 13/76 total) | ||
|
|
||
| #### 1. Git Repository (\`.git\`) | ||
| - **ID**: \`git-repo\` | ||
| - **Weight**: 5 (Critical) | ||
| - **Type**: Directory check | ||
| - **Description**: Repository is under Git version control | ||
| - **Paths**: \`['.git']\` | ||
|
|
||
| #### 2. Git Ignore File (\`.gitignore\`) | ||
| - **ID**: \`gitignore\` | ||
| - **Weight**: 5 (Critical) | ||
| - **Type**: File check | ||
| - **Description**: Prevents tracking of generated/sensitive files | ||
| - **Paths**: \`['.gitignore']\` | ||
|
|
||
| #### 3. Environment Example (\`.env.example\`) | ||
| - **ID**: \`env-example\` | ||
| - **Weight**: 3 (Important) | ||
| - **Type**: File check | ||
| - **Description**: Documents required environment variables without exposing secrets | ||
| - **Paths**: \`['.env.example', '.env.sample', '.env.template']\` | ||
| - **Hint**: \`cp .env .env.example # strip secrets\` | ||
|
|
||
| ### Category: Code Quality (Weight: 17/76 total) | ||
|
|
||
| #### 4. Editor Config (\`.editorconfig\`) | ||
| - **ID**: \`editorconfig\` | ||
| - **Weight**: 2 (Nice-to-have) | ||
| - **Type**: File check | ||
| - **Description**: Consistent editor settings across contributors and agents | ||
| - **Paths**: \`['.editorconfig']\` | ||
| - **Hint**: \`touch .editorconfig\` | ||
|
|
||
| #### 5. Linter Configuration | ||
| - **ID**: \`linter\` | ||
| - **Weight**: 4 (Important) | ||
| - **Type**: File check | ||
| - **Description**: Linting enforces consistent style for humans and agents alike | ||
| - **Paths**: JavaScript/TypeScript, Python, Ruby, Go config files | ||
|
|
||
| #### 6. Formatter Configuration | ||
| - **ID**: \`formatter\` | ||
| - **Weight**: 3 (Important) | ||
| - **Type**: File check | ||
| - **Description**: Auto-formatting keeps agent-generated code consistent | ||
| - **Paths**: Prettier, Biome, Deno, and other formatter configs | ||
|
|
||
| #### 7. Type Safety Configuration | ||
| - **ID**: \`type-safety\` | ||
| - **Weight**: 3 (Important) | ||
| - **Type**: File check | ||
| - **Description**: Type checking helps agents generate correct, type-safe code | ||
| - **Paths**: \`['tsconfig.json', 'jsconfig.json', 'mypy.ini', 'pyrightconfig.json']\` | ||
|
|
||
| #### 8. Descriptive Commit Messages | ||
| - **ID**: \`commit-messages\` | ||
| - **Weight**: 3 (Important) | ||
| - **Type**: Custom analysis | ||
| - **Description**: Recent commit messages are descriptive (not just "fix" or "update") | ||
| - **Analysis**: Check last 10 commits for quality (≥60% should be descriptive, ≥10 chars) | ||
|
|
||
| #### 9. Conventional Commits | ||
| - **ID**: \`conventional-commits\` | ||
| - **Weight**: 2 (Nice-to-have) | ||
| - **Type**: Custom analysis | ||
| - **Description**: Commit messages follow conventional format (feat:, fix:, chore:, etc.) | ||
| - **Analysis**: Check last 10 commits for conventional format (≥50% match pattern) | ||
|
|
||
| ### Category: CI/CD & Automation (Weight: 10/76 total) | ||
|
|
||
| #### 10. CI Pipeline Configuration | ||
| - **ID**: \`ci-config\` | ||
| - **Weight**: 4 (Important) | ||
| - **Type**: Directory/File check | ||
| - **Description**: CI pipeline catches agent regressions before they merge | ||
| - **Paths**: \`['.github/workflows', '.gitlab-ci.yml', '.circleci', 'Jenkinsfile']\` | ||
|
|
||
| #### 11. Standard Scripts | ||
| - **ID**: \`scripts\` | ||
| - **Weight**: 4 (Important) | ||
| - **Type**: Custom analysis | ||
| - **Description**: Single obvious commands for start/test/lint | ||
| - **Analysis**: Check for at least 2 of 3 standard scripts in package.json or Makefile | ||
|
|
||
| #### 12. Task Runner Configuration | ||
| - **ID**: \`task-runner\` | ||
| - **Weight**: 2 (Nice-to-have) | ||
| - **Type**: File check | ||
| - **Description**: Task runner gives agents discoverable project commands | ||
| - **Paths**: \`['Makefile', 'justfile', 'Taskfile.yml']\` | ||
|
|
||
| ### Category: Environment (Weight: 9/76 total) | ||
|
|
||
| #### 13. Dev Container Configuration | ||
| - **ID**: \`devcontainer\` | ||
| - **Weight**: 3 (Important) | ||
| - **Type**: Directory/File check | ||
| - **Description**: Reproducible dev environment for agents and contributors | ||
| - **Paths**: \`['.devcontainer', '.devcontainer/devcontainer.json']\` | ||
|
|
||
| #### 14. Docker Configuration | ||
| - **ID**: \`dockerfile\` | ||
| - **Weight**: 2 (Nice-to-have) | ||
| - **Type**: File check | ||
| - **Description**: Containerization provides reproducible environments | ||
| - **Paths**: \`['Dockerfile', 'docker-compose.yml', 'compose.yml']\` | ||
|
|
||
| #### 15. Runtime Version Pinning | ||
| - **ID**: \`version-pinning\` | ||
| - **Weight**: 2 (Nice-to-have) | ||
| - **Type**: File check | ||
| - **Description**: Pinned runtime versions ensure consistent agent environments | ||
| - **Paths**: \`['.nvmrc', '.node-version', '.python-version', '.tool-versions']\` | ||
|
|
||
| #### 16. License File | ||
| - **ID**: \`license\` | ||
| - **Weight**: 2 (Nice-to-have) | ||
| - **Type**: File check | ||
| - **Description**: License file clarifies usage rights for contributors and agents | ||
| - **Paths**: \`['LICENSE', 'LICENSE.md', 'LICENCE']\` | ||
|
|
||
| ## Total Weights: 81 points | ||
| - Version Control: 13 points (16%) | ||
| - Code Quality: 17 points (21%) | ||
| - CI/CD & Automation: 10 points (12%) | ||
| - Environment: 9 points (11%) | ||
| - Documentation: 5 points (6%) | ||
|
|
||
| ## Expected JSON Output Schema | ||
|
|
||
| Return a structured JSON object with: | ||
| - summary: Overall scores and category breakdowns | ||
| - checks: Array of 16 check results (id, category, label, status, weight, found, detail, hint) | ||
| - recommendations: Prioritized action items (priority, category, action, weight, impact) | ||
| - metadata: Scan version, timestamp, repository info | ||
|
|
||
| Each check should have status "pass", "fail", or "warning". | ||
| Recommendations should be sorted by priority (high > medium > low). | ||
| `; |
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.
Uh oh!
There was an error while loading. Please reload this page.