Skip to content

DYN-10982: Add area READMEs and cap the agent instruction files - #17386

Open
QilongTang wants to merge 1 commit into
masterfrom
DYN-10982-area-readmes
Open

QilongTang wants to merge 1 commit into
masterfrom
DYN-10982-area-readmes

Conversation

@QilongTang

Copy link
Copy Markdown
Contributor

Purpose

DYN-10982 follow-up to #17379. The 2026-10-07 Agent-Friendly Codebase audit of master noted two documentation gaps that #17379 didn't cover:

  • src/DynamoCore, src/Engine and src/Libraries have no local orientation. The area map exists only in the on-demand dynamo-onboarding skill.
  • .github/copilot-instructions.md, which Copilot always loads, was 244 lines, just under the 250-line limit the audit applies.

This PR adds area READMEs and gives the Copilot file headroom that a gate now protects. No production code changes.

Key changes:

  • Area READMEs: new README.md in src/DynamoCore/, src/Engine/ and src/Libraries/ (26–28 lines each). Each covers what the area is and isn't, its main projects, the files to open first, where its tests live, and which contracts apply. Each links to the matching AGENTS.md sections (Running a Single Test, Blast Radius, Node Registration Patterns, Proof Checklist) instead of copying them.
    • Dependency statements were checked against the .csproj ProjectReferences; nothing in src/Engine references DynamoCore.
    • Package membership was checked against the nuspecs.
    • AGENTS.md § Architecture and the Copilot Project Structure section point to the READMEs.
  • Copilot file 244 → 197 lines:
    • The node-registration code samples, the debugging detail and the Blast Radius detail are now short summaries with a link to the matching AGENTS.md section.
    • Small subsections are folded together.
    • Every dotnet/msbuild line, the PublicAPI project list, and the security, PublicAPI, localization and CPM rules are unchanged.
  • Line budget in check_instruction_drift.ps1: the gate now also fails if AGENTS.md or copilot-instructions.md goes over 250 lines (one $maxInstructionLines variable), counted like wc -l. It reports both counts and their headroom in -Report and the step summary.
  • Small fixes:
    • The UI test folders are DynamoCoreWpf2Tests/DynamoCoreWpf3Tests, not DynamoCoreWpfTests2/3; fixed in both instruction files.
    • The Copilot skills list was missing dynamo-release-notes.
    • The Copilot file's Contributing Guide link pointed to the non-existent .github/CONTRIBUTING.md.
    • The Copilot file was missing its final newline.

Declarations

Check these if you believe they are true

Release Notes

N/A

Reviewers

@DynamoDS/eidos

Notes to reviewers:

  • The PowerShell change hasn't been run locally, because the authoring machine has no pwsh. Both checks (command/PublicAPI parity and the new line budget) were re-implemented in Python and run on the edited files:

    • 0 drift: the same 12 dotnet/msbuild lines and the same four PublicAPI projects in both files;
    • AGENTS.md 199/250 and the Copilot file 197/250;
    • padding the Copilot file to 251 lines fails as expected.

    CI's "Validate AGENTS.md / copilot-instructions.md Parity" job runs the real script on this PR.

  • Every relative link and anchor in the changed files resolves, and every path named in the READMEs exists.

  • The unit-tests-in-CI gap is still left to DYN-10984: Run engine tests (ProtoTest) in GitHub Actions #17370.

FYIs

🤖 Generated with Claude Code

Area orientation: add README.md to src/DynamoCore, src/Engine and
src/Libraries. Each gives the area's scope, its main subfolders and
projects, the files to open first, where its tests live and which
contracts apply (PublicAPI files, NuGet packages, .dyn format, node
help files). Dependencies are taken from the csproj ProjectReferences.
They link to AGENTS.md sections (Running a Single Test, Blast Radius,
Node Registration Patterns) instead of restating them. AGENTS.md
Architecture and the Copilot Project Structure section point at them.

Copilot headroom: .github/copilot-instructions.md is always loaded and
had grown to 245 lines. Cut it to 197 by replacing the Node
Registration code samples, the debugging quick-start detail and the
Blast Radius detail with short summaries that link to the matching
AGENTS.md section, and by folding small subsections together. Every
dotnet/msbuild line, the PublicAPI project list and the security,
PublicAPI, localization and CPM rules are unchanged. Also fix the
Contributing Guide link (it resolved to .github/CONTRIBUTING.md) and
add the missing final newline.

Line budget: check_instruction_drift.ps1 now also fails when AGENTS.md
or copilot-instructions.md exceeds 250 lines ($maxInstructionLines),
counted like wc -l, and reports both counts and their headroom in
-Report and the step summary.

Also correct two existing errors in both instruction files: the UI test
folders are DynamoCoreWpf2Tests/DynamoCoreWpf3Tests (not DynamoCoreWpfTests2/3),
and the Copilot skills list now includes dynamo-release-notes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@QilongTang
QilongTang requested a review from a team as a code owner October 8, 2026 20:01
Copilot AI balanced review requested due to automatic review settings October 8, 2026 20:01

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://autodesk.atlassian.net/browse/DYN-10982

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The documentation matches the repository structure, and the line-budget gate is consistent with the stated requirements.

0 open findings

What changed in this PR

Adds concise subsystem orientation docs and caps always-loaded agent instructions at 250 lines.

Changes:

  • Adds READMEs for DynamoCore, Engine, and Libraries.
  • Condenses Copilot guidance while preserving key rules.
  • Extends instruction-drift CI checks with line budgets.
File Description
src/​DynamoCore/​README.md Documents core architecture, tests, and contracts.
src/​Engine/​README.md Maps runtime projects, dependencies, and tests.
src/​Libraries/​README.md Documents built-in node projects and packaging.
AGENTS.md Links area READMEs and corrects test project names.
.github/​copilot-instructions.md Condenses guidance and fixes references.
.github/​scripts/​check_instruction_drift.ps1 Enforces and reports 250-line limits.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@QilongTang

QilongTang commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Status update, now that #17370 has merged.

#17370 added 8 lines to .github/copilot-instructions.md, taking it from 244 back to 252 lines on master, over the 250-line limit the AFC audit applies to always-loaded agent guidance. A fresh re-audit of master @ 72b753c970 scored Dynamo 78/100, and this limit is now one of the two caps still holding it back. The details are in the survey record.

This PR fixes that and keeps it from happening again:

The branch still merges cleanly onto the current master, and the "Validate AGENTS.md / copilot-instructions.md Parity" job passed on this PR. A review from @DynamoDS/eidos would be appreciated when someone has a moment.

This branch has not been deployed

No deployments
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