-
Notifications
You must be signed in to change notification settings - Fork 351
agent: add basic rules for agents #10586
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
lgirdwood
wants to merge
4
commits into
thesofproject:main
Choose a base branch
from
lgirdwood:agent
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.
+82
−2
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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,24 @@ | ||
| # Agent Commit Rules | ||
|
|
||
| The user expects all commit messages generated by the agent to follow a specific style and include a proper sign-off. | ||
|
|
||
| ## Commit Message Style | ||
|
|
||
| Commit messages must be formatted with a subject line and a body, following this format: | ||
| ``` | ||
| <feature>: <description> | ||
| <body> | ||
| ``` | ||
|
|
||
| * **`<feature>`**: A short name or tag representing the feature or component being modified. | ||
| * **`<description>`**: A succinct description of the change. | ||
| * **`<body>`**: A detailed description of the changes made in the commit. | ||
|
|
||
| ## Sign-off | ||
|
|
||
| Every commit message must end with a `Signed-off-by:` line using the user's name and email from the local git config: | ||
|
|
||
| ``` | ||
| Signed-off-by: <name> <email> | ||
| ``` |
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,13 @@ | ||
| # Documentation Rules | ||
|
|
||
| The user expects all new features and in-code documentation to adhere to Doxygen standards. | ||
|
|
||
| ## Doxygen Requirements | ||
|
|
||
| 1. **Mandatory Documentation:** All new features, functions, and structures must include Doxygen comments describing their purpose, parameters, and return values. | ||
| 2. **Clean Build:** Any in-code documentation added or modified must build with Doxygen without producing any new errors or warnings. | ||
| 3. **Format:** Use standard Doxygen formatting tags (e.g., `@brief`, `@param`, `@return` or `\brief`, `\param`, `\return`). Ensure the styling matches the existing codebase conventions. | ||
|
|
||
| ## Directory Documentation | ||
|
|
||
| When creating a new file or modifying an existing one, check if there is an `architecture.md` or `readme.md` (or `README.md`) file in the same directory. If present, evaluate whether the code changes require an update to these documentation files and make the necessary updates to keep them synchronized with the code. |
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,19 @@ | ||
| --- | ||
| description: Build and validate new C code features | ||
| --- | ||
|
|
||
| This workflow describes the process for building and validating any new C code features in the SOF repository. | ||
|
|
||
| **Note:** The QEMU build targets must be used for both building and testing. | ||
|
|
||
| 1. Build the new C code feature using the `xtensa-build-zephyr.py` script. | ||
| ```bash | ||
| ./scripts/xtensa-build-zephyr.py | ||
| ``` | ||
|
|
||
| 2. Validate the feature with a ztest run using the `sof-qemu-run.sh` script. | ||
| ```bash | ||
| ./scripts/sof-qemu-run.sh | ||
| ``` | ||
|
|
||
| 3. Ensure that all new features and functions have appropriate Doxygen comments and that the Doxygen documentation builds without errors or warnings. |
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,21 @@ | ||
| --- | ||
| description: Develop and validate new audio processing modules | ||
| --- | ||
|
|
||
| This workflow describes the expected steps to create and validate a new audio processing module within the SOF repository. | ||
|
|
||
| 1. **(Optional)** Generate the module skeleton using the `sdk-create-module.py` script. | ||
| ```bash | ||
| # Run the script with relevant arguments to create a new module template | ||
| ./scripts/sdk-create-module.py --help | ||
| ``` | ||
|
|
||
| 2. Develop the module logic within the generated skeleton. | ||
|
|
||
| 3. Validate the module by executing the host testbench. This ensures that the module functions as expected outside of full system simulations. | ||
| ```bash | ||
| # Configure and run the testbench against the developed module | ||
| ./scripts/host-testbench.sh --help | ||
| ``` | ||
|
|
||
| 4. Document the new module using Doxygen comments. Validate that the Doxygen build completes without errors or warnings. |
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
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.
The usage text hard-codes the script name. If the script is renamed, invoked via a symlink, or run as
python scripts/sdk-create-module.py, the printed usage can become misleading. Prefer building the usage string fromos.path.basename(sys.argv[0])(or similar) so it always matches the invoked command.