Skip to content

docs: strengthen tree API report guidance to prevent spurious diffs#27052

Merged
noencke merged 4 commits intomicrosoft:mainfrom
noencke:noencke/improve-tree-api-docs
Apr 20, 2026
Merged

docs: strengthen tree API report guidance to prevent spurious diffs#27052
noencke merged 4 commits intomicrosoft:mainfrom
noencke:noencke/improve-tree-api-docs

Conversation

@noencke
Copy link
Copy Markdown
Contributor

@noencke noencke commented Apr 15, 2026

Description

Strengthens documentation around handling unexpected API report diffs in @fluidframework/tree. The existing docs recommended per-package clean builds, but these are unreliable due to an incremental TypeScript bug that leaves stale artifacts in dependency packages. All relevant docs now prescribe a full root-level pnpm clean && pnpm build as the only reliable fix.

Also adds a note to the fluid-pr skill about the workaround for editing existing PR descriptions (write to a temp file for the user to copy-paste, since the agent lacks upstream write access).

Changes:

  • CLAUDE.md / copilot-instructions.md: Add short "never hand-edit api.md" rule with pointer to tree-api-checks.md
  • tree-api-checks.md: Rewrite phantom-diff section with explicit "golden rule", anti-pattern list, full root clean commands, and guidance to inform the user before starting long builds. Remove incorrect azure-client references and redundant cascade section (full build already covers aggregators).
  • ci-readiness-check SKILL.md: Distinguish tree (needs root clean) from other packages (scoped clean OK); add never-hand-edit warning
  • fluid-pr SKILL.md: Add section on updating existing PR descriptions via temp file

Reviewer Guidance

The review process is outlined on this wiki page.

Documentation-only change — no functional code affected.

The existing docs recommended per-package clean builds to fix unexpected
API report diffs in the tree package, but this is unreliable due to an
incremental TypeScript bug that leaves stale artifacts in dependency
packages. Update all relevant docs to prescribe a full root-level
`pnpm clean && pnpm build` as the only reliable fix.

Changes:
- CLAUDE.md / copilot-instructions.md: add short "never hand-edit
  api.md" rule with pointer to tree-api-checks.md
- tree-api-checks.md: rewrite phantom-diff section with explicit
  "golden rule", anti-pattern list, and full root clean commands;
  remove incorrect azure-client references; remove redundant cascade
  section (full build already covers aggregators)
- ci-readiness-check SKILL.md: distinguish tree (needs root clean)
  from other packages (scoped clean OK); add never-hand-edit warning

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 15, 2026 18:29
noencke and others added 2 commits April 15, 2026 18:31
Add guidance for agents to inform the user when and why they're doing
a full clean build, since it takes several minutes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The agent doesn't have write access to upstream PRs. Add instructions
to write the updated description to a temp file and tell the user to
copy-paste it into GitHub.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

Updates internal contributor/agent documentation to reduce spurious @fluidframework/tree API report diffs by steering folks toward reliable “full clean build” workflows and away from hand-editing generated artifacts.

Changes:

  • Adds “never hand-edit *.api.md” guidance and pointers to tree-specific API diff troubleshooting docs.
  • Reworks tree API diff troubleshooting instructions to emphasize root-level pnpm clean && pnpm build over scoped cleans.
  • Updates CI readiness-check guidance to reflect the tree/aggregator incremental TypeScript nondeterminism behavior.

Reviewed changes

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

Show a summary per file
File Description
.github/copilot-instructions.md Adds API report “generated artifact” rule + pointer to tree API checks doc.
.claude/CLAUDE.md Mirrors the API report guidance for Claude instructions.
.claude/skills/ci-readiness-check/tree-api-checks.md Reframes tree-specific API report troubleshooting around full clean builds and examples.
.claude/skills/ci-readiness-check/SKILL.md Updates readiness-check workflow to prefer root clean/build for tree-related API diffs.
.claude/skills/fluid-pr/SKILL.md Documents how to provide updated PR body text via a temp file for manual copy/paste.

Comment thread .claude/skills/ci-readiness-check/SKILL.md
Comment thread .claude/skills/ci-readiness-check/tree-api-checks.md
Comment thread .claude/skills/ci-readiness-check/tree-api-checks.md
Comment thread .claude/skills/fluid-pr/SKILL.md
Comment thread .claude/skills/fluid-pr/SKILL.md
Comment thread .claude/skills/fluid-pr/SKILL.md
Comment thread .claude/CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  279037 links
    1880 destination URLs
    2126 URLs ignored
       0 warnings
       0 errors


@noencke noencke merged commit 618f42c into microsoft:main Apr 20, 2026
25 checks passed
@noencke noencke deleted the noencke/improve-tree-api-docs branch April 20, 2026 23:15
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.

3 participants