Skip to content

agent: add basic rules for agents#10586

Open
lgirdwood wants to merge 4 commits intothesofproject:mainfrom
lgirdwood:agent
Open

agent: add basic rules for agents#10586
lgirdwood wants to merge 4 commits intothesofproject:mainfrom
lgirdwood:agent

Conversation

@lgirdwood
Copy link
Member

Add some initial and basic rules for agents to use when performing work on the codebase. These can be expanded and improved as agents improve.

This includes a --help needed in sdk-config for agent use.

Add some initial and basic rules for agents to use when performing
work on the codebase. These can be expanded and improved as agents
improve.

This includes a --help needed in sdk-config for agent use.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Copilot AI review requested due to automatic review settings March 2, 2026 17:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial agent-oriented workflows/rules and improves the module creation script with a --help usage message to support agent ergonomics.

Changes:

  • Added --help handling and normalized the usage string in sdk-create-module.py.
  • Introduced new agent workflows for module development and build/validation.
  • Added agent rules for documentation standards and commit message/sign-off format.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/sdk-create-module.py Adds --help output and standardizes usage text for the module creation script
.agent/workflows/module_development.md New workflow instructions for creating and validating a module
.agent/workflows/build_and_validate.md New workflow instructions for building and validating C features
.agent/rules/documentation.md New rules describing expected Doxygen/documentation practices
.agent/rules/commit_style.md New rules defining commit message format and sign-off expectations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +365 to +370
if len(sys.argv) == 2 and sys.argv[1] in ['-h', '--help']:
print("Usage: sdk-create-module.py <new_module_name>")
sys.exit(0)
elif len(sys.argv) != 2:
print("\n[ERROR] Invalid number of arguments.")
print("Usage: sdk_create_module.py <new_module_name>")
print("Usage: sdk-create-module.py <new_module_name>")
Copy link

Copilot AI Mar 2, 2026

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 from os.path.basename(sys.argv[0]) (or similar) so it always matches the invoked command.

Copilot uses AI. Check for mistakes.
lgirdwood and others added 3 commits March 3, 2026 12:21
Make email generic

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Liam Girdwood <lgirdwood@gmail.com>
Indent fenced code block.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Liam Girdwood <lgirdwood@gmail.com>
indent fenced code block

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Liam Girdwood <lgirdwood@gmail.com>
Copy link
Member

@abonislawski abonislawski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! A true sign of the times :)

However, I see 2 potential issues here:

  • Written for humans: some instructions are written in a very natural, human-like language. Since SOF is a large project, the documentation for agents could potentially grow huge over time. We should focus on short, direct, and more "robotic" instructions right from the start (using strict commands, removing filler words to save context window tokens and improve the agent's accuracy).
  • It lacks a basic one-liner project description.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example:

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.

USE THIS to build/test C code. REQUIREMENT: Always use QEMU targets.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English is fine, I has the same thought but I asked the agent to craft these. So far so good, but we will need to get something that works with most agents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants