DOC: Capture recent CI lessons in Documentation/AI/ skill files#6040
DOC: Capture recent CI lessons in Documentation/AI/ skill files#6040hjmjohnson wants to merge 2 commits intoInsightSoftwareConsortium:mainfrom
Conversation
|
| Filename | Overview |
|---|---|
| Documentation/AI/compiler-cautions.md | Adds §12 (KWStyle/Doxygen) and §13 (NumericTraits float range), renumbers old §12→14 and §13→15; sub-section labels 12a/12b/12c inside the newly-renamed §14 were not updated and remain stale. |
| Documentation/AI/conventions.md | Adds SWIG %pythoncode verbatim-form guidance and a 9-point new-class checklist; accurate and well-structured. |
| Documentation/AI/git-commits.md | Removes WIP: prefix, adds BUILD:, documents [WIP] PR-title workflow, and adds commit-length guidance; all correct. |
| Documentation/AI/style.md | Updates prefix list to replace WIP: with BUILD: and adds a cross-reference note; clean change. |
| Documentation/AI/testing.md | Adds a GTest-compatible exception-test section with correct EXPECT_THROW/ASSERT_THROW guidance; accurate. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[New ITK class or commit] --> B{Commit prefix check}
B -->|WIP: used| C[ghostflow-check-main REJECTS]
B -->|ENH or BUG or BUILD etc.| D[ghostflow OK]
D --> E{enum class with doxygen comment?}
E -->|no backslash-class tag| F[KWStyle CI FAILS]
E -->|plain comment or backslash-class tag| G[KWStyle OK]
G --> H{GTest exception test?}
H -->|ITK_TRY_EXPECT_EXCEPTION| I[Compile error in TestBody]
H -->|EXPECT_THROW or ASSERT_THROW| J[GTest OK]
J --> K{Python wrapping?}
K -->|Missing itkXxx.wrap| L[Python CI KeyError]
K -->|wrap file present| M[CI GREEN]
K -->|pythoncode single-brace with hash comment| N[SWIG preprocessor error]
K -->|pythoncode verbatim form| M
Comments Outside Diff (1)
-
Documentation/AI/compiler-cautions.md, line 570-592 (link)Stale sub-section numbers after renumbering
Section 12 (clang-tidy) was promoted to section 14, but its three sub-sections (
### 12a,### 12b,### 12c) were not updated to### 14a,### 14b,### 14c. An agent loading this file and following the numbering will see a mismatch: the parent heading says 14 while the children still say 12.
Reviews (1): Last reviewed commit: "DOC: Capture recent CI lessons in Docume..." | Re-trigger Greptile
968d8ee to
9e9d8d5
Compare
|
I have been using CMakeUSerPresets.json to hold predefined configuration of ITK such as "development", "wrapping", "system-libraries", or "doxygen". Currently I have some local instructions in .github-instructions.md Specifically I have: I have found these CMakePreset.json files very useful to manage different configurations, perhaps they could be more widely adopted? Not sure how user customization of these instructions should occur. |
|
@blowekamp Are you suggesting changes to the proposed updates? |
|
@hjmjohnson No. Just a question/conversation relate to these changes.
|
@blowekamp Ahh... I see. My opinion "CMakePresets[User].json into the build/testing instruction be widely" would be widely useful. I've had some success with it, and I think it would be a way to codify, in an AI-friendly JSON format, more meaning than can be achieved with mixes of shell command-line options. I've made a note to make a WIP to promote discussion after some of my other open PR's have cleared. |
12eedae to
c2ea712
Compare
c2ea712 to
bab0248
Compare
|
@blowekamp @N-Dekker @thewtex @dzenanz I think these are in a reasonable state to consider now. After these updates, Greptile will be able to better enforce the "historical community perspectives" as represented by these rules extracted from various commit, PR-comment, and discourse comments. |
bab0248 to
cb73c5a
Compare
| ## 10. ITK Initializer Patterns | ||
|
|
cb73c5a to
0a91cb6
Compare
…ion/AI/ Add and expand AI agent guidance files based on lessons from recent PRs (ccache fixes, compiler flag removal, backports, attribution policy): - attribution.md: commit/PR attribution rules for AI-assisted work - code-review-lessons.md: patterns from 50+ reviewed PRs - compiler-cautions.md: new sections on unused-variable warnings, declare-then-assign pitfalls, refactoring checklist - conventions.md: ITK class/CMake/wrapping conventions - enforced-code-style.md: renamed from style.md, expanded - git-commits.md: hook enforcement, pre-commit checklist, deduplication with attribution.md (now cross-references instead of duplicating) - pull-requests.md: AI disclosure requirements - testing.md: targeted ctest patterns - AGENTS.md: updated routing table for new/renamed files
0a91cb6 to
d6c9dc0
Compare
…community feedback Incorporate feedback from N-Dekker, blowekamp, and dzenanz: - Remove Tool-Assisted: and Assisted-by: trailers from commit guidance — AI disclosure moves entirely to the PR description inside <details> blocks (blowekamp's position) - Change Co-Authored-By: for AI from "never" to "discouraged" with rationale, acknowledging the open question (N-Dekker's GitHub-linking-semantics argument) - Distinguish reviewer Co-Authored-By: (design-shaping feedback) from review acknowledgment (prose mention) per N-Dekker's reviewer-vs-coauthor distinction - Strengthen brevity guidance: PR descriptions use collapsed <details> sections by default, keeping only 1-3 line summary visible (dzenanz's conciseness feedback) - Make PR description the primary and sole mechanism for AI disclosure, with commit messages containing no AI attribution Closes InsightSoftwareConsortium#6055
aebbf21 to
1aea1f9
Compare
Update Documentation/AI/ skill files with CI lessons learned and revised attribution rules based on community feedback. Closes #6055.
Commit 1: CI lessons and code-review patterns
git-commits.md,style.md— dropWIP:prefix, addBUILD:, document[WIP]PR-title workflowcompiler-cautions.md— KWStyleenum classpitfall (§12), NumericTraits float range (§13)testing.md— GTest exception macros (ITK_TRY_EXPECT_EXCEPTION incompatible with GoogleTest)attribution.md— initial attribution rulescode-review-lessons.md— new file capturing recurring review patternsCommit 2: Revise attribution rules per #6055 feedback
Incorporates feedback from N-Dekker (#6055 comment), blowekamp (Discourse #7728 post #16), and dzenanz (#6055 comment):
Tool-Assisted:andAssisted-by:trailers removed. AI disclosure moves entirely to PR description inside<details>blocks.Co-Authored-By:only for design-shaping feedback, not routine review. Per N-Dekker: "A reviewer may not completely agree with the PR... A co-author usually does."<details>blocks. Per dzenanz: "commit messages and PR body should be concise."