Skip to content

RFC: Add tasklists & documentation for AI Agents#130

Open
nsaulnier-ti wants to merge 5 commits into
mainfrom
a0226750_ai_documentation
Open

RFC: Add tasklists & documentation for AI Agents#130
nsaulnier-ti wants to merge 5 commits into
mainfrom
a0226750_ai_documentation

Conversation

@nsaulnier-ti

@nsaulnier-ti nsaulnier-ti commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator

Add tasklists & documentation.

TODO: How to do stuff like pinmuxing?

@qodo-code-review

qodo-code-review Bot commented Apr 2, 2026

Copy link
Copy Markdown

Review Summary by Qodo

(Agentic_describe updated until commit 7dba58f)

Add AI agent documentation and task runbooks for OpenPRU

📝 Documentation

Grey Divider

Walkthroughs

Description
• Create docs_ai/ folder with AI-agent task runbooks
• Add four task-specific documentation files for common OpenPRU operations
• Establish strict factuality rules and guidelines for AI tool interactions
• Provide structured checklists and decision trees for AI-assisted development
Diagram
flowchart LR
  A["CLAUDE.md<br/>AI Instructions"] --> B["docs_ai/<br/>AI Documentation"]
  B --> C["README.md<br/>Task Index"]
  C --> D["task_port_project.md<br/>Device Porting"]
  C --> E["task_create_project.md<br/>New Projects"]
  C --> F["task_add_features.md<br/>Feature Addition"]
Loading

Grey Divider

File Changes

1. CLAUDE.md 📝 Documentation +62/-0

AI agent factuality rules and repository guidelines

• New file establishing AI agent guidelines for OpenPRU repository
• Defines six strict factuality rules to prevent hallucination and ensure accuracy
• Points AI tools to docs_ai/README.md for task-specific runbooks
• References key documentation files for different development scenarios
• Rules persist across context compression and apply to all sessions

CLAUDE.md


2. docs_ai/README.md 📝 Documentation +68/-0

AI documentation index and task routing

• Central index for AI-agent documentation in OpenPRU
• Maps three primary tasks to corresponding runbook files
• Lists reference files for on-demand reading during task execution
• Explains configuration for Claude Code and other agentic tools
• Guarantees self-contained runbooks with no external dependencies

docs_ai/README.md


3. docs_ai/task_port_project.md 📝 Documentation +215/-0

Device and board porting task runbook

• Comprehensive guide for porting existing projects to new devices or boards
• Decision tree distinguishing board-only ports from device ports
• Pre-read list and compatibility assessment framework (Npru, N-hw, N-sw)
• Detailed sections for board-only porting and cross-device porting workflows
• Verification steps and do-not-do list to prevent common mistakes

docs_ai/task_port_project.md


View more (2)
4. docs_ai/task_create_project.md 📝 Documentation +234/-0

New project creation task runbook

• Step-by-step guide for creating new OpenPRU projects from scratch
• Decision tree covering host interface selection and device/board combinations
• Sections for copying templates, customizing makefiles, writing firmware
• Documentation requirements including README.md and portability table updates
• Verification steps for project-level and top-level builds plus CCS import

docs_ai/task_create_project.md


5. docs_ai/task_add_features.md 📝 Documentation +164/-0

Feature addition task runbook

• Guidance for adding new features to existing OpenPRU projects
• Decision tree for source file additions, linker script changes, and host-side modifications
• Detailed sections for adding new source files and modifying existing code
• Checklists for documentation, naming conventions, and cycle counting
• Do-not-do list covering common pitfalls in feature development

docs_ai/task_add_features.md


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Apr 2, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (4) 📘 Rule violations (5)

Grey Divider


Action required

1. e.g. used in docs 📘 Rule violation ⚙ Maintainability ⭐ New
Description
New documentation uses e.g., which is disallowed terminology per documentation/comment standards.
This reduces consistency and violates the required phrasing rules.
Code

docs_ai/task_port_project.md[R119-121]

+  `mcuplus/<new_board>/<core>/ti-arm-clang/` (e.g., `examples/empty`);
+  others use `<new_board>/<core>/ti-arm-clang/` directly at the project root
+  (e.g., `academy/intc/intc_mcu`). Match the convention used by the project
Evidence
PR Compliance ID 19 requires using "for example" instead of e.g.; the added lines include e.g.
in parentheses.

docs_ai/task_port_project.md[119-121]
Best Practice: Repository guidelines

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The documentation uses `e.g.`, but the repo standard requires "for example".

## Issue Context
This rule applies to repository text (documentation and comments).

## Fix Focus Areas
- docs_ai/task_port_project.md[119-121]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Broken docs/... relative links 📘 Rule violation ⚙ Maintainability
Description
Several new documentation links use repo-root style paths (e.g., docs/...) inside files already
located under docs/, producing broken docs/docs/... relative URLs. This violates the
portability/validity requirement for doc links on case-sensitive and non-Windows environments.
Code

docs/open_pru_create_new_project.md[27]

+steps at [Getting Started with OpenPRU](docs/getting_started.md).
Evidence
Rule 26 requires doc links to be portable and valid; the added links point to docs/... from within
the docs/ directory (and ../docs/... from the repo root), which does not match real on-disk
paths and results in broken links.

docs/open_pru_create_new_project.md[27-27]
docs/open_pru_create_new_mcuplus_project.md[13-13]
best_practices.md[499-500]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Several markdown links were added with incorrect relative paths (e.g., `docs/...` inside files under `docs/`, and `../docs/...` inside repo-root files), which breaks navigation.
## Issue Context
These documents live under `docs/` or the repo root, so links should be relative to the current file location (or use correct repo-root-relative links where supported by the renderer).
## Fix Focus Areas
- docs/open_pru_create_new_project.md[27-27]
- docs/open_pru_create_new_mcuplus_project.md[13-13]
- best_practices.md[499-500]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Trailing whitespace in README 📘 Rule violation ⚙ Maintainability
Description
The updated README contains a line with trailing whitespace, which can cause markdown render
instability and formatting noise in diffs. This violates the documentation formatting requirements.
Code

README.md[122]

+  MCU+ SDK documentation: **Developer Guides > Using SDK with CCS Projects** 
Evidence
Rule 28 requires controlled whitespace and avoidance of trailing spaces (except intentional markdown
line breaks). The updated line ends with an extra trailing space after Projects**.

README.md[122-122]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A modified README line contains trailing whitespace, which violates the documentation formatting rule.
## Issue Context
Trailing whitespace is discouraged because it can create inconsistent rendering and noisy diffs.
## Fix Focus Areas
- README.md[122-122]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (3)
4. Broken best_practices link 🐞 Bug ≡ Correctness
Description
best_practices.md links to ../docs/open_pru_organization.md, which points outside the repo root and
breaks the reference to the organization doc. Readers won’t be able to reach the authoritative
layout documentation from best_practices.md.
Code

best_practices.md[R499-500]

+See [docs/open_pru_organization.md](../docs/open_pru_organization.md) for the
+authoritative project and repository layout.
Evidence
best_practices.md is located at the repo root, and the organization document is at
docs/open_pru_organization.md. Using a leading "../" escapes the repo root, so the link won’t
resolve correctly in standard Markdown renderers.

best_practices.md[495-500]
docs/open_pru_organization.md[1-6]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`best_practices.md` contains a broken relative link to the OpenPRU organization document.
### Issue Context
`best_practices.md` is at the repo root, so linking to `../docs/...` escapes the repo and breaks on GitHub.
### Fix Focus Areas
- best_practices.md[499-500]
### What to change
- Update:
- `See [docs/open_pru_organization.md](../docs/open_pru_organization.md)`
- To one of:
- `See [docs/open_pru_organization.md](./docs/open_pru_organization.md)`
- `See [docs/open_pru_organization.md](docs/open_pru_organization.md)`

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Inline cd && make command 📘 Rule violation ⚙ Maintainability
Description
docs_ai/task_add_features.md presents a user-entered shell command inline (backticks) instead of a
fenced code block, which can wrap and break copy/paste. This violates the documentation requirement
to fence shell commands.
Code

docs_ai/task_add_features.md[131]

+  `cd <project> && make -s clean && make`
Evidence
PR Compliance ID 22 requires documentation shell commands to be in fenced code blocks; the added
line shows an inline shell command in backticks.

docs_ai/task_add_features.md[131-131]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Shell commands in `docs_ai/task_add_features.md` are written inline (single-line backticks) instead of fenced code blocks, which can break copy/paste due to wrapping.
## Issue Context
Compliance requires user-entered shell commands in documentation to be presented in fenced code blocks.
## Fix Focus Areas
- docs_ai/task_add_features.md[130-137]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Wrong OPEN_PRU_PATH depth 🐞 Bug ≡ Correctness
Description
Several makefile_projectspec files set OPEN_PRU_PATH with too few .. levels, so `include
$(OPEN_PRU_PATH)/imports.mak` points at a non-root directory and the project-spec build/export
targets fail unless OPEN_PRU_PATH is manually overridden. This also contradicts the documented
requirement that makefile_projectspec must follow the same folder-depth rule as the sibling
makefile.
Code

examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[R1-2]

export OPEN_PRU_PATH?=$(abspath ../../../../..)
include $(OPEN_PRU_PATH)/imports.mak
Evidence
In the affected directories, makefile_projectspec computes OPEN_PRU_PATH as `$(abspath
../../../../..) (5 levels up) while the sibling makefile` uses a deeper relative path (e.g.,
../../../../../..). Since makefile_projectspec then does include $(OPEN_PRU_PATH)/imports.mak,
the too-shallow value makes it look for imports.mak in the wrong place. The docs explicitly state
OPEN_PRU_PATH in makefile_projectspec must follow the same folder-depth rule as makefile.

examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]
examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile[5-7]
examples/custom_frequency_generator/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
examples/custom_frequency_generator/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile[1-2]
academy/getting_started_labs/c_code/solution/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]
academy/getting_started_labs/c_code/solution/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile[5-7]
docs/open_pru_create_new_mcuplus_project.md[261-271]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Multiple `makefile_projectspec` files set `OPEN_PRU_PATH` with an incorrect relative depth (too few `..` components). Because these files immediately do `include $(OPEN_PRU_PATH)/imports.mak`, the wrong depth makes Make try to include `imports.mak` from the wrong directory, breaking the documented `makefile_projectspec` command-line workflow (build/export CCS projects).
### Issue Context
The repo docs explicitly state that `OPEN_PRU_PATH` in `makefile_projectspec` must follow the same folder-depth rule as the sibling `makefile`. In the affected directories, `makefile` and `makefile_projectspec` disagree on the number of `..` levels.
### Fix Focus Areas
Update each affected `makefile_projectspec` so `OPEN_PRU_PATH` matches the sibling `makefile` in the same directory (same number of `..` levels).
- examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]
- examples/fir/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
- examples/custom_frequency_generator/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
- examples/logic_scope/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
- academy/getting_started_labs/c_code/solution/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]
(Recommended) Add a quick consistency check script or CI lint that asserts `OPEN_PRU_PATH` lines match between `makefile` and `makefile_projectspec` in the same folder.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

7. Guarantee contradicts URLs 🐞 Bug ⚙ Maintainability ⭐ New
Description
docs_ai/README.md states task runbooks reference only repo files and standard tool install paths,
but it also points to online TI documentation URLs. This undermines the stated guarantee and can
cause agent runs to unexpectedly depend on external network access.
Code

docs_ai/README.md[R52-61]

+- PRU assembly language tools user guide:
+  Can be found online at `https://www.ti.com/lit/spruhv6`
+- PRU optimizing C compiler user guide:
+  Can be found online at `https://www.ti.com/lit/spruhv7`
+
+## Self-contained guarantee
+
+All task runbooks reference only files within the repo and standard tool
+install paths. They do not depend on any individual developer's local
+configuration (for example, `~/.claude/CLAUDE.md`).
Evidence
The README’s “Deep references” section explicitly points to online URLs, while the immediately
following “Self-contained guarantee” claims runbooks reference only repo files and standard install
paths.

docs_ai/README.md[50-61]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`docs_ai/README.md` claims runbooks only reference repo files and standard tool install paths, but it also includes online-only deep references. This is internally contradictory.

### Issue Context
The intent seems to be: runbooks are self-contained for primary workflows, but deep compiler/assembler references may be external.

### Fix Focus Areas
- docs_ai/README.md[50-61]

### Suggested change
Do one of:
- Narrow the guarantee (e.g., “Primary runbooks reference only repo files…; deep references may be external”), or
- Move the external URLs out of the “self-contained” framing and explicitly label them as optional external references, or
- Replace online URLs with on-disk locations under the installed toolchain (if that’s truly the guarantee).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


8. Wrong PRU doc path var 🐞 Bug ≡ Correctness ⭐ New
Description
docs_ai/task_add_features.md tells readers to locate PRU tool docs via $CG_TOOL_ROOT, but the
repo’s PRU toolchain configuration and build rules use CGT_TI_PRU_PATH (and invoke
$(CGT_TI_PRU_PATH)/bin/clpru). Following the runbook literally is likely to fail to find the docs
in typical OpenPRU setups.
Code

docs_ai/task_add_features.md[R15-18]

+- PRU assembly language tools user guide:
+  typically at `$CG_TOOL_ROOT/../../../docs/pru_assembly_language_tools_users_guide*.txt`
+- PRU optimizing C compiler user guide:
+  typically at `$CG_TOOL_ROOT/../../../docs/pru_optimizing_c_compiler_users_guide*.txt`
Evidence
The runbook references $CG_TOOL_ROOT, but the repo-defined PRU compiler root is CGT_TI_PRU_PATH
(set in imports.mak.default) and the shared PRU build rules reference $(CGT_TI_PRU_PATH) for
includes/libs and compiler invocation; CG_TOOL_ROOT is used in TI ARM Clang makefiles, not the PRU
flow.

docs_ai/task_add_features.md[13-19]
imports.mak.default[51-56]
pru_rules.mak[49-55]
pru_rules.mak[125-146]
examples/empty/mcuplus/am243x-evm/r5fss0-0_freertos/ti-arm-clang/makefile[10-14]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The runbook uses `$CG_TOOL_ROOT` to locate PRU compiler/assembler documentation, but the repo’s PRU toolchain is configured around `CGT_TI_PRU_PATH`. This mismatch can make the documented paths unusable.

### Issue Context
- PRU tooling in this repo is rooted at `CGT_TI_PRU_PATH`.
- `$CG_TOOL_ROOT` appears in the ARM (ti-arm-clang) makefiles, so reusing it for PRU docs is inconsistent.

### Fix Focus Areas
- docs_ai/task_add_features.md[15-18]

### Suggested change
Update the two “typically at …” paths to reference the PRU tool root used by OpenPRU, e.g.:
- `$CGT_TI_PRU_PATH/../../../docs/pru_assembly_language_tools_users_guide*.txt`
- `$CGT_TI_PRU_PATH/../../../docs/pru_optimizing_c_compiler_users_guide*.txt`

Optionally, mention both variables if you want to support multiple conventions (e.g., “`$CGT_TI_PRU_PATH` (PRU) / `$CG_TOOL_ROOT` (ARM)”).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


9. TODO appears in docs 📘 Rule violation ⚙ Maintainability
Description
docs_ai/task_create_project.md adds the literal keyword TODO, violating the requirement to avoid
TODO markers in the codebase. This may be flagged by automated TODO tracking tooling.
Code

docs_ai/task_create_project.md[191]

+- Do not use TODO markers — use FIXME (see `best_practices.md`).
Evidence
PR Compliance ID 11 forbids TODO markers; the newly added documentation line includes the literal
TODO keyword.

docs_ai/task_create_project.md[191-191]
Best Practice: Repository guidelines

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The documentation adds the literal `TODO` keyword, which violates the rule banning TODO markers.
## Issue Context
Compliance requires only `FIXME` for pending work markers; `TODO` must not appear.
## Fix Focus Areas
- docs_ai/task_create_project.md[191-191]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Previous review results

Review updated until commit 7dba58f

Results up to commit a506a7a


Details

🐞 Bugs (2)   📘 Rule violations (4)   📎 Requirement gaps (0)   🎨 UX Issues (0)
🐞\ ≡ Correctness (2) ⭐ New (1)
📘\ ⚙ Maintainability (4) ⭐ New (2)

Action required
1. Broken docs/... relative links 📘
Description
Several new documentation links use repo-root style paths (e.g., docs/...) inside files already
located under docs/, producing broken docs/docs/... relative URLs. This violates the
portability/validity requirement for doc links on case-sensitive and non-Windows environments.
Code

docs/open_pru_create_new_project.md[27]

+steps at [Getting Started with OpenPRU](docs/getting_started.md).
Evidence
Rule 26 requires doc links to be portable and valid; the added links point to docs/... from within
the docs/ directory (and ../docs/... from the repo root), which does not match real on-disk
paths and results in broken links.

docs/open_pru_create_new_project.md[27-27]
docs/open_pru_create_new_mcuplus_project.md[13-13]
best_practices.md[499-500]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Several markdown links were added with incorrect relative paths (e.g., `docs/...` inside files under `docs/`, and `../docs/...` inside repo-root files), which breaks navigation.

## Issue Context
These documents live under `docs/` or the repo root, so links should be relative to the current file location (or use correct repo-root-relative links where supported by the renderer).

## Fix Focus Areas
- docs/open_pru_create_new_project.md[27-27]
- docs/open_pru_create_new_mcuplus_project.md[13-13]
- best_practices.md[499-500]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Trailing whitespace in README 📘
Description
The updated README contains a line with trailing whitespace, which can cause markdown render
instability and formatting noise in diffs. This violates the documentation formatting requirements.
Code

README.md[122]

+  MCU+ SDK documentation: **Developer Guides > Using SDK with CCS Projects** 
Evidence
Rule 28 requires controlled whitespace and avoidance of trailing spaces (except intentional markdown
line breaks). The updated line ends with an extra trailing space after Projects**.

README.md[122-122]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A modified README line contains trailing whitespace, which violates the documentation formatting rule.

## Issue Context
Trailing whitespace is discouraged because it can create inconsistent rendering and noisy diffs.

## Fix Focus Areas
- README.md[122-122]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Broken best_practices link 🐞
Description
best_practices.md links to ../docs/open_pru_organization.md, which points outside the repo root and
breaks the reference to the organization doc. Readers won’t be able to reach the authoritative
layout documentation from best_practices.md.
Code

best_practices.md[R499-500]

+See [docs/open_pru_organization.md](../docs/open_pru_organization.md) for the
+authoritative project and repository layout.
Evidence
best_practices.md is located at the repo root, and the organization document is at
docs/open_pru_organization.md. Using a leading "../" escapes the repo root, so the link won’t
resolve correctly in standard Markdown renderers.

best_practices.md[495-500]
docs/open_pru_organization.md[1-6]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`best_practices.md` contains a broken relative link to the OpenPRU organization document.

### Issue Context
`best_practices.md` is at the repo root, so linking to `../docs/...` escapes the repo and breaks on GitHub.

### Fix Focus Areas
- best_practices.md[499-500]

### What to change
- Update:
 - `See [docs/open_pru_organization.md](../docs/open_pru_organization.md)`
- To one of:
 - `See [docs/open_pru_organization.md](./docs/open_pru_organization.md)`
 - `See [docs/open_pru_organization.md](docs/open_pru_organization.md)`

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (2)
4. Inline cd && make command 📘
Description
docs_ai/task_add_features.md presents a user-entered shell command inline (backticks) instead of a
fenced code block, which can wrap and break copy/paste. This violates the documentation requirement
to fence shell commands.
Code

docs_ai/task_add_features.md[131]

+  `cd <project> && make -s clean && make`
Evidence
PR Compliance ID 22 requires documentation shell commands to be in fenced code blocks; the added
line shows an inline shell command in backticks.

docs_ai/task_add_features.md[131-131]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Shell commands in `docs_ai/task_add_features.md` are written inline (single-line backticks) instead of fenced code blocks, which can break copy/paste due to wrapping.
## Issue Context
Compliance requires user-entered shell commands in documentation to be presented in fenced code blocks.
## Fix Focus Areas
- docs_ai/task_add_features.md[130-137]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Wrong OPEN_PRU_PATH depth 🐞
Description
Several makefile_projectspec files set OPEN_PRU_PATH with too few .. levels, so `include
$(OPEN_PRU_PATH)/imports.mak` points at a non-root directory and the project-spec build/export
targets fail unless OPEN_PRU_PATH is manually overridden. This also contradicts the documented
requirement that makefile_projectspec must follow the same folder-depth rule as the sibling
makefile.
Code

examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[R1-2]

export OPEN_PRU_PATH?=$(abspath ../../../../..)
include $(OPEN_PRU_PATH)/imports.mak
Evidence
In the affected directories, makefile_projectspec computes OPEN_PRU_PATH as `$(abspath
../../../../..) (5 levels up) while the sibling makefile` uses a deeper relative path (e.g.,
../../../../../..). Since makefile_projectspec then does include $(OPEN_PRU_PATH)/imports.mak,
the too-shallow value makes it look for imports.mak in the wrong place. The docs explicitly state
OPEN_PRU_PATH in makefile_projectspec must follow the same folder-depth rule as makefile.

examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]
examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile[5-7]
examples/custom_frequency_generator/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
examples/custom_frequency_generator/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile[1-2]
academy/getting_started_labs/c_code/solution/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]
academy/getting_started_labs/c_code/solution/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile[5-7]
docs/open_pru_create_new_mcuplus_project.md[261-271]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Multiple `makefile_projectspec` files set `OPEN_PRU_PATH` with an incorrect relative depth (too few `..` components). Because these files immediately do `include $(OPEN_PRU_PATH)/imports.mak`, the wrong depth makes Make try to include `imports.mak` from the wrong directory, breaking the documented `makefile_projectspec` command-line workflow (build/export CCS projects).
### Issue Context
The repo docs explicitly state that `OPEN_PRU_PATH` in `makefile_projectspec` must follow the same folder-depth rule as the sibling `makefile`. In the affected directories, `makefile` and `makefile_projectspec` disagree on the number of `..` levels.
### Fix Focus Areas
Update each affected `makefile_projectspec` so `OPEN_PRU_PATH` matches the sibling `makefile` in the same directory (same number of `..` levels).
- examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]
- examples/fir/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
- examples/custom_frequency_generator/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
- examples/logic_scope/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
- academy/getting_started_labs/c_code/solution/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]
(Recommended) Add a quick consistency check script or CI lint that asserts `OPEN_PRU_PATH` lines match between `makefile` and `makefile_projectspec` in the same folder.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended
6. TODO appears in docs 📘
Description
docs_ai/task_create_project.md adds the literal keyword TODO, violating the requirement to avoid
TODO markers in the codebase. This may be flagged by automated TODO tracking tooling.
Code

docs_ai/task_create_project.md[191]

+- Do not use TODO markers — use FIXME (see `best_practices.md`).
Evidence
PR Compliance ID 11 forbids TODO markers; the newly added documentation line includes the literal
TODO keyword.

docs_ai/task_create_project.md[191-191]
Best Practice: Repository guidelines

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The documentation adds the literal `TODO` keyword, which violates the rule banning TODO markers.
## Issue Context
Compliance requires only `FIXME` for pending work markers; `TODO` must not appear.
## Fix Focus Areas
- docs_ai/task_create_project.md[191-191]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


ⓘ The new review experience is currently in Beta. Learn more
Results up to commit 06f1c94


🐞 Bugs (1) 📘 Rule violations (2) 📎 Requirement gaps (0)

Grey Divider
Action required
1. Inline cd && make command 📘 Rule violation ⚙ Maintainability
Description
docs_ai/task_add_features.md presents a user-entered shell command inline (backticks) instead of a
fenced code block, which can wrap and break copy/paste. This violates the documentation requirement
to fence shell commands.
Code

docs_ai/task_add_features.md[131]

+  `cd <project> && make -s clean && make`
Evidence
PR Compliance ID 22 requires documentation shell commands to be in fenced code blocks; the added
line shows an inline shell command in backticks.

docs_ai/task_add_features.md[131-131]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Shell commands in `docs_ai/task_add_features.md` are written inline (single-line backticks) instead of fenced code blocks, which can break copy/paste due to wrapping.

## Issue Context
Compliance requires user-entered shell commands in documentation to be presented in fenced code blocks.

## Fix Focus Areas
- docs_ai/task_add_features.md[130-137]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Wrong OPEN_PRU_PATH depth 🐞 Bug ≡ Correctness
Description
Several makefile_projectspec files set OPEN_PRU_PATH with too few .. levels, so `include
$(OPEN_PRU_PATH)/imports.mak` points at a non-root directory and the project-spec build/export
targets fail unless OPEN_PRU_PATH is manually overridden. This also contradicts the documented
requirement that makefile_projectspec must follow the same folder-depth rule as the sibling
makefile.
Code

examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[R1-2]

export OPEN_PRU_PATH?=$(abspath ../../../../..)
include $(OPEN_PRU_PATH)/imports.mak
Evidence
In the affected directories, makefile_projectspec computes OPEN_PRU_PATH as `$(abspath
../../../../..) (5 levels up) while the sibling makefile` uses a deeper relative path (e.g.,
../../../../../..). Since makefile_projectspec then does include $(OPEN_PRU_PATH)/imports.mak,
the too-shallow value makes it look for imports.mak in the wrong place. The docs explicitly state
OPEN_PRU_PATH in makefile_projectspec must follow the same folder-depth rule as makefile.

examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]
examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile[5-7]
examples/custom_frequency_generator/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
examples/custom_frequency_generator/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile[1-2]
academy/getting_started_labs/c_code/solution/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]
academy/getting_started_labs/c_code/solution/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile[5-7]
docs/open_pru_create_new_mcuplus_project.md[261-271]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
Multiple `makefile_projectspec` files set `OPEN_PRU_PATH` with an incorrect relative depth (too few `..` components). Because these files immediately do `include $(OPEN_PRU_PATH)/imports.mak`, the wrong depth makes Make try to include `imports.mak` from the wrong directory, breaking the documented `makefile_projectspec` command-line workflow (build/export CCS projects).

### Issue Context
The repo docs explicitly state that `OPEN_PRU_PATH` in `makefile_projectspec` must follow the same folder-depth rule as the sibling `makefile`. In the affected directories, `makefile` and `makefile_projectspec` disagree on the number of `..` levels.

### Fix Focus Areas
Update each affected `makefile_projectspec` so `OPEN_PRU_PATH` matches the sibling `makefile` in the same directory (same number of `..` levels).

- examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]
- examples/fir/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
- examples/custom_frequency_generator/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
- examples/logic_scope/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
- academy/getting_started_labs/c_code/solution/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]

(Recommended) Add a quick consistency check script or CI lint that asserts `OPEN_PRU_PATH` lines match between `makefile` and `makefile_projectspec` in the same folder.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended
3. TODO appears in docs 📘 Rule violation ⚙ Maintainability
Description
docs_ai/task_create_project.md adds the literal keyword TODO, violating the requirement to avoid
TODO markers in the codebase. This may be flagged by automated TODO tracking tooling.
Code

docs_ai/task_create_project.md[191]

+- Do not use TODO markers — use FIXME (see `best_practices.md`).
Evidence
PR Compliance ID 11 forbids TODO markers; the newly added documentation line includes the literal
TODO keyword.

docs_ai/task_create_project.md[191-191]
Best Practice: Repository guidelines

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The documentation adds the literal `TODO` keyword, which violates the rule banning TODO markers.

## Issue Context
Compliance requires only `FIXME` for pending work markers; `TODO` must not appear.

## Fix Focus Areas
- docs_ai/task_create_project.md[191-191]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider Grey Divider
Qodo Logo

## Verification steps

- [ ] V1. Build the project after each significant change:
`cd <project> && make -s clean && make`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Inline cd && make command 📘 Rule violation ⚙ Maintainability

docs_ai/task_add_features.md presents a user-entered shell command inline (backticks) instead of a
fenced code block, which can wrap and break copy/paste. This violates the documentation requirement
to fence shell commands.
Agent Prompt
## Issue description
Shell commands in `docs_ai/task_add_features.md` are written inline (single-line backticks) instead of fenced code blocks, which can break copy/paste due to wrapping.

## Issue Context
Compliance requires user-entered shell commands in documentation to be presented in fenced code blocks.

## Fix Focus Areas
- docs_ai/task_add_features.md[130-137]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines 1 to 2
export OPEN_PRU_PATH?=$(abspath ../../../../..)
include $(OPEN_PRU_PATH)/imports.mak

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Wrong open_pru_path depth 🐞 Bug ≡ Correctness

Several makefile_projectspec files set OPEN_PRU_PATH with too few .. levels, so `include
$(OPEN_PRU_PATH)/imports.mak` points at a non-root directory and the project-spec build/export
targets fail unless OPEN_PRU_PATH is manually overridden. This also contradicts the documented
requirement that makefile_projectspec must follow the same folder-depth rule as the sibling
makefile.
Agent Prompt
### Issue description
Multiple `makefile_projectspec` files set `OPEN_PRU_PATH` with an incorrect relative depth (too few `..` components). Because these files immediately do `include $(OPEN_PRU_PATH)/imports.mak`, the wrong depth makes Make try to include `imports.mak` from the wrong directory, breaking the documented `makefile_projectspec` command-line workflow (build/export CCS projects).

### Issue Context
The repo docs explicitly state that `OPEN_PRU_PATH` in `makefile_projectspec` must follow the same folder-depth rule as the sibling `makefile`. In the affected directories, `makefile` and `makefile_projectspec` disagree on the number of `..` levels.

### Fix Focus Areas
Update each affected `makefile_projectspec` so `OPEN_PRU_PATH` matches the sibling `makefile` in the same directory (same number of `..` levels).

- examples/empty/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]
- examples/fir/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
- examples/custom_frequency_generator/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
- examples/logic_scope/firmware/am243x-lp/icss_g0_pru0_fw/ti-pru-cgt/makefile_projectspec[1-2]
- academy/getting_started_labs/c_code/solution/mcuplus/am263x-lp/r5fss0-0_freertos/ti-arm-clang/makefile_projectspec[1-2]

(Recommended) Add a quick consistency check script or CI lint that asserts `OPEN_PRU_PATH` lines match between `makefile` and `makefile_projectspec` in the same folder.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Add comprehensive AI-agent documentation and enhance contribution guidelines

📝 Documentation ✨ Enhancement

Grey Divider

Walkthroughs

Description
• Comprehensive documentation updates for project creation and contribution workflows
• New AI-agent task runbooks for porting, creating, and extending projects
• Enhanced contributing guidelines with detailed build verification and documentation requirements
• Improved project organization documentation with clearer directory structure explanations
Diagram
flowchart LR
  A["Contributing Guidelines"] -->|enhanced| B["docs/contributing.md"]
  C["Project Creation"] -->|new runbook| D["docs_ai/task_create_project.md"]
  E["Project Porting"] -->|new runbook| F["docs_ai/task_port_project.md"]
  G["Feature Addition"] -->|new runbook| H["docs_ai/task_add_features.md"]
  I["AI Documentation Index"] -->|new| J["docs_ai/README.md"]
  K["Claude Integration"] -->|new| L["CLAUDE.md"]
  B -->|references| D
  B -->|references| F
  B -->|references| H
  M["Compliance Checklist"] -->|expanded| N["pr_compliance_checklist.yaml"]
  O["Project Organization"] -->|clarified| P["docs/open_pru_organization.md"]
  Q["Best Practices"] -->|expanded| R["best_practices.md"]
  S["Main README"] -->|updated| T["README.md"]
Loading

Grey Divider

File Changes

1. docs/open_pru_create_new_project.md 📝 Documentation +386/-44

Comprehensive project creation guide with detailed step-by-step instructions

docs/open_pru_create_new_project.md


2. docs_ai/task_create_project.md 📝 Documentation +234/-0

AI-agent runbook for creating new OpenPRU projects from scratch

docs_ai/task_create_project.md


3. docs_ai/task_port_project.md 📝 Documentation +215/-0

AI-agent runbook for porting projects to new devices or boards

docs_ai/task_port_project.md


View more (13)
4. docs_ai/task_add_features.md 📝 Documentation +164/-0

AI-agent runbook for adding features to existing projects

docs_ai/task_add_features.md


5. docs_ai/README.md 📝 Documentation +68/-0

Index and guide for AI-agent task runbooks and reference files

docs_ai/README.md


6. docs/contributing.md 📝 Documentation +157/-46

Enhanced contribution guidelines with detailed workflows and verification steps

docs/contributing.md


7. docs/open_pru_create_new_mcuplus_project.md 📝 Documentation +276/-0

New guide for adding MCU+ code to OpenPRU projects

docs/open_pru_create_new_mcuplus_project.md


8. docs/open_pru_organization.md 📝 Documentation +22/-1

Clarified repository and project directory structure documentation

docs/open_pru_organization.md


9. pr_compliance_checklist.yaml ⚙️ Configuration changes +78/-1

Added compliance checks for documentation drift and contribution requirements

pr_compliance_checklist.yaml


10. CLAUDE.md 📝 Documentation +62/-0

New Claude Code project instructions with strict factuality rules

CLAUDE.md


11. best_practices.md 📝 Documentation +42/-17

Separated PRU C and MCU+ host C best practices with expanded file structure guidance

best_practices.md


12. README.md 📝 Documentation +49/-31

Updated main README with training links and improved CCS build instructions

README.md


13. imports.mak.default 📝 Documentation +4/-0

Added clarifying comments for compiler toolchain path variables

imports.mak.default


14. docs/pru_dependencies.bat Additional files +0/-255

...

docs/pru_dependencies.bat


15. docs/pru_dependencies.sh Additional files +0/-397

...

docs/pru_dependencies.sh


16. docs/pru_dependencies_readme.md Additional files +0/-129

...

docs/pru_dependencies_readme.md


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Apr 9, 2026

Copy link
Copy Markdown

Persistent review updated to latest commit a506a7a

Comment thread docs/open_pru_create_new_project.md Outdated
### Set up the repo

Before creating a new OpenPRU project, set up the OpenPRU repo by following the
steps at [Getting Started with OpenPRU](docs/getting_started.md).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Broken docs/... relative links 📘 Rule violation ⚙ Maintainability

Several new documentation links use repo-root style paths (e.g., docs/...) inside files already
located under docs/, producing broken docs/docs/... relative URLs. This violates the
portability/validity requirement for doc links on case-sensitive and non-Windows environments.
Agent Prompt
## Issue description
Several markdown links were added with incorrect relative paths (e.g., `docs/...` inside files under `docs/`, and `../docs/...` inside repo-root files), which breaks navigation.

## Issue Context
These documents live under `docs/` or the repo root, so links should be relative to the current file location (or use correct repo-root-relative links where supported by the renderer).

## Fix Focus Areas
- docs/open_pru_create_new_project.md[27-27]
- docs/open_pru_create_new_mcuplus_project.md[13-13]
- best_practices.md[499-500]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread README.md
- Build the PRU project using the CCS project menu. Refer to
**the MCU+ SDK documentation > Using SDK with CCS Projects**:
- For more information about using MCU+ SDK projects with CCS, refer to the
MCU+ SDK documentation: **Developer Guides > Using SDK with CCS Projects**

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Trailing whitespace in readme 📘 Rule violation ⚙ Maintainability

The updated README contains a line with trailing whitespace, which can cause markdown render
instability and formatting noise in diffs. This violates the documentation formatting requirements.
Agent Prompt
## Issue description
A modified README line contains trailing whitespace, which violates the documentation formatting rule.

## Issue Context
Trailing whitespace is discouraged because it can create inconsistent rendering and noisy diffs.

## Fix Focus Areas
- README.md[122-122]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread best_practices.md Outdated
Comment on lines +499 to +500
See [docs/open_pru_organization.md](../docs/open_pru_organization.md) for the
authoritative project and repository layout.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

3. Broken best_practices link 🐞 Bug ≡ Correctness

best_practices.md links to ../docs/open_pru_organization.md, which points outside the repo root and
breaks the reference to the organization doc. Readers won’t be able to reach the authoritative
layout documentation from best_practices.md.
Agent Prompt
### Issue description
`best_practices.md` contains a broken relative link to the OpenPRU organization document.

### Issue Context
`best_practices.md` is at the repo root, so linking to `../docs/...` escapes the repo and breaks on GitHub.

### Fix Focus Areas
- best_practices.md[499-500]

### What to change
- Update:
  - `See [docs/open_pru_organization.md](../docs/open_pru_organization.md)`
- To one of:
  - `See [docs/open_pru_organization.md](./docs/open_pru_organization.md)`
  - `See [docs/open_pru_organization.md](docs/open_pru_organization.md)`

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

manojKoppolu
manojKoppolu previously approved these changes Apr 13, 2026
We observed that AI agents needed a set of guidelines to consistently execute
certain tasks in the OpenPRU repository. Create the docs_ai folder to house
this AI-specific documentation.

Signed-off-by: Nick Saulnier <nsaulnier@ti.com>
Add docs_ai/task_port_project.md, which provides guidance to AI agents which are
porting an OpenPRU project from one processor to another processor.

Signed-off-by: Nick Saulnier <nsaulnier@ti.com>
Add docs_ai/task_create_project.md, which provides guidance to AI agents which
are creating a new OpenPRU project.

Signed-off-by: Nick Saulnier <nsaulnier@ti.com>
Add docs_ai/task_add_features.md, which provides guidance to AI agents which
are programming code for an OpenPRU project.

This tasklist may need to be significantly modified or replaced in the future,
depending on test results.

Signed-off-by: Nick Saulnier <nsaulnier@ti.com>
Add a default CLAUDE.md file which points AI agents to the correct
resources. This file may or may not stay in this location, or we may copy a
version of this
into docs_ai and explicitly tell customers to copy and modify the file, similar
to imports.mak.

Signed-off-by: Nick Saulnier <nsaulnier@ti.com>
@qodo-code-review

qodo-code-review Bot commented May 7, 2026

Copy link
Copy Markdown

Persistent review updated to latest commit 7dba58f

Comment on lines +119 to +121
`mcuplus/<new_board>/<core>/ti-arm-clang/` (e.g., `examples/empty`);
others use `<new_board>/<core>/ti-arm-clang/` directly at the project root
(e.g., `academy/intc/intc_mcu`). Match the convention used by the project

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. e.g. used in docs 📘 Rule violation ⚙ Maintainability

New documentation uses e.g., which is disallowed terminology per documentation/comment standards.
This reduces consistency and violates the required phrasing rules.
Agent Prompt
## Issue description
The documentation uses `e.g.`, but the repo standard requires "for example".

## Issue Context
This rule applies to repository text (documentation and comments).

## Fix Focus Areas
- docs_ai/task_port_project.md[119-121]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

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.

2 participants