-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Why
CLAUDE.md is a file which gives context to different coding agents like copilot, cursor and some others. This file helps them to understand the project better and create PRs/generate code of better quality.
What
Generate CLAUDE.md from https://github.com/akash-network/console/discussions/categories/contribution-rfc?discussions_q=is%3Aopen+category%3A%22Contribution+RFC%22 using GHA.
For every discussion, we will use a separate file and will link it into root CLAUDE.md with a reference to that file. All sub-files will live in .contribution-guidelines folder. Every file has the same title as RFC discussion (lowercased with spaces replaced by dashes).
Implementation Details
AI Instructions Section in RFCs
Each RFC discussion must include a dedicated section called ## AI Instructions. The author of the RFC needs to add this section before changing the label to RFC:Landed. This section will contain instructions that will be extracted and included in the CLAUDE.md file.
Note: Currently, RFCs don't have this section. It needs to be added manually to existing RFC:Landed discussions.
GitHub Actions Automation
The automation script should be implemented in bash using gh cli and will:
-
Trigger on these discussion events:
labeled- when RFC:Landed label is added, create new fileunlabeled- when RFC:Landed label is removed, delete the fileedited- when discussion is edited, recreate (update) the file
-
Process:
- Regenerate the entire CLAUDE.md structure on every event
- Only update files that were actually modified
- Create a PR with the changes for review (don't commit directly)
Root CLAUDE.md Structure
The root CLAUDE.md file should have the following structure:
## <RFC title>
@.contribution-guidelines/rfc-title.md # lowercased, dashedFile Naming Convention
RFC discussion titles should be converted to filenames using this rule:
- Convert to lowercase
- Replace spaces with hyphens
- Remove special characters
Example: "Testing Strategy" → testing-strategy.md
Workflow
- GHA monitors discussions in the "Contribution RFC" category
- When a discussion receives/loses the
RFC:Landedlabel or is edited, the workflow triggers - Script extracts the
## AI Instructionssection from all RFC:Landed discussions - Generates/updates files in
.contribution-guidelines/directory - Generates root CLAUDE.md with links to all sub-files
- Creates a PR with changes for human review