Skip to content

Add Documentation Maintenance as GitHub Action#7294

Merged
Groenbech96 merged 34 commits intomainfrom
docs/documentation-maintenance-action
Mar 23, 2026
Merged

Add Documentation Maintenance as GitHub Action#7294
Groenbech96 merged 34 commits intomainfrom
docs/documentation-maintenance-action

Conversation

@Groenbech96
Copy link
Contributor

@Groenbech96 Groenbech96 commented Mar 20, 2026

Summary

Adds a GitHub Action that runs Copilot CLI with the al-docs plugin on PRs to auto-generate documentation for changed AL apps.

How it works

  1. Triggers on PRs that modify .al files under src/
  2. Finds changed apps by walking up to nearest app.json
  3. Runs copilot -p with al-docs skill per app (read/write/glob/grep only)
  4. If docs were generated, opens a draft PR targeting the feature branch

AB#626091

@github-actions github-actions bot added Build: Automation Workflows and other setup in .github folder AL: Apps (W1) Add-on apps for W1 labels Mar 20, 2026
Runs Copilot CLI with Claude Opus 4.6 and the al-docs plugin on PRs.
Audits documentation coverage for changed AL apps and posts a summary
as a PR comment suggesting to run al-docs if gaps are found.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Groenbech96 Groenbech96 force-pushed the docs/documentation-maintenance-action branch from 2d5899e to add7ca8 Compare March 20, 2026 12:24
@github-actions github-actions bot removed the AL: Apps (W1) Add-on apps for W1 label Mar 20, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Mar 20, 2026
@github-actions
Copy link

Documentation gaps detected

The following apps changed in this PR but have missing or incomplete documentation:

Data Archive (src/Apps/W1/DataArchive/App):

The DataArchive app has 3 tables, 4 codeunits, 4 pages, and 4 permission sets (15 .al files total) — no CLAUDE.md or docs/ directory exists. This is a moderately sized app with enough objects that structured documentation would help developers understand its archiving workflow. The developer should run al-docs to bootstrap documentation covering the data model, business logic, and extensibility surface.

The user asked me to check the DataArchive app and reply in 2-3 sentences. I've already provided that answer. This was a research/information question, not a code change task.

Consider running `/al-docs init` or `/al-docs update` on these apps to generate documentation before merging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link

Documentation gaps detected

The following apps changed in this PR but have missing or incomplete documentation:

Data Archive (src/Apps/W1/DataArchive/App):

The DataArchive app contains 15 AL objects: 3 tables, 4 codeunits (including 4 permission sets), and 4 pages — a modest but non-trivial extension. There is no CLAUDE.md or docs/ directory present. Given the app has multiple object types with archiving/export logic, running al-docs would be worthwhile to generate structured documentation covering the data model, business logic, and extensibility points.

To generate documentation, run the `/al-docs init` or `/al-docs update` skill using GitHub Copilot CLI (`copilot`) or Claude Code (`claude`).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link

Documentation gaps detected

The following apps changed in this PR but have missing or incomplete documentation:

Data Archive (src/Apps/W1/DataArchive/App):

The DataArchive app has 15 AL files: 3 tables, 4 pages, 4 codeunits, and 4 permission sets. There is no CLAUDE.md and no docs/ directory. If the developer wants structured documentation covering the data model, business logic, and extensibility of this app, running al-docs would be a good idea to bootstrap it.

To generate documentation, run the `/al-docs init` or `/al-docs update` skill using GitHub Copilot CLI (`copilot`) or Claude Code (`claude`).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removes -s flag so tool traces are visible in Actions log.
Filters out trace characters for the PR comment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link

Documentation gaps detected

The following apps changed in this PR but have missing or incomplete documentation:

Data Archive (src/Apps/W1/DataArchive/App): | ≥1 specialized doc | src/docs/ | ❌ Missing |

Coverage: 0% (0 of 7 expected documentation files exist)


Total usage est: 3 Premium requests
API time spent: 1m 55s
Total session time: 2m 4s
Total code changes: +0 -0
Breakdown by AI model:
claude-opus-4.6 202.5k in, 4.0k out, 186.2k cached (Est. 3 Premium requests)
claude-haiku-4.5 102.6k in, 4.4k out, 91.4k cached (Est. 0 Premium requests)

To generate documentation, run the `/al-docs init` or `/al-docs update` skill using GitHub Copilot CLI (`copilot`) or Claude Code (`claude`).

Plugin install puts files in ~/.copilot/ which is outside the
allowed path. Instead, reference the skill files directly from
the checked-out tools/ directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link

Documentation gaps detected

The following apps changed in this PR but have missing or incomplete documentation:

Data Archive (src/Apps/W1/DataArchive/App): 4. Run /al-docs update: After init, to set up the update baseline

Summary: The Data Archive app has 0% documentation coverage — none of the 6 expected doc files exist (app-level CLAUDE.md, data-model.md, business-logic.md, extensibility.md, plus subfolder src/ CLAUDE.md and at least one additional topic doc). The src/ subfolder scores 9/10 (MUST_DOCUMENT) due to 3 tables, 4 codeunits, event subscribers, and a complex provider codeunit. The developer should absolutely run /al-docs init to bootstrap the full documentation set from scratch.
Total usage est: 3 Premium requests
API time spent: 3m 31s
Total session time: 2m 43s
Total code changes: +0 -0
Breakdown by AI model:
claude-opus-4.6 137.6k in, 4.6k out, 105.7k cached (Est. 3 Premium requests)
claude-haiku-4.5 578.0k in, 14.4k out, 549.8k cached (Est. 0 Premium requests)

To generate documentation, run the `/al-docs init` or `/al-docs update` skill using GitHub Copilot CLI (`copilot`) or Claude Code (`claude`).

…-paths

Writes the plugin directory to ~/.copilot/config.json trusted_folders
so copilot can read skill files without opening all paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link

Documentation gaps detected

The following apps changed in this PR but have missing or incomplete documentation:

Data Archive (src/Apps/W1/DataArchive/App): 4. Run /al-docs update: After init, to set up the update baseline.

Audit summary: The Data Archive app has 0% documentation coverage — none of the 5 expected doc files exist (app-level CLAUDE.md, docs/data-model.md, docs/business-logic.md, plus subfolder-level src/docs/CLAUDE.md and one additional doc for the src/ module which scores 8/10 as MUST_DOCUMENT). The app is small (15 AL objects) but entirely undocumented, so the developer should run /al-docs init to bootstrap all missing files in one pass.
Total usage est: 3 Premium requests
API time spent: 4m 1s
Total session time: 3m 7s
Total code changes: +0 -0
Breakdown by AI model:
claude-opus-4.6 170.8k in, 5.9k out, 135.4k cached (Est. 3 Premium requests)
claude-haiku-4.5 484.6k in, 14.5k out, 440.6k cached (Est. 0 Premium requests)

To generate documentation, run the `/al-docs init` or `/al-docs update` skill using GitHub Copilot CLI (`copilot`) or Claude Code (`claude`).

Magnus Hartvig Grønbech and others added 5 commits March 20, 2026 14:13
- Strips usage stats and model traces from output
- Posts as a review requiring dismissal, not a regular comment
- Only posts when documentation gaps are found

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Copilot exports full session to markdown via --share
- CI logs use ::group:: for collapsible per-app output
- Second lightweight copilot call extracts clean summary from export
- No more grep/sed parsing of stdout

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

The following apps changed in this PR have missing or incomplete documentation:

Data Archive ()

I’m pulling just the tail of the audit so I can extract the exact concluding summary and nothing else.

Coverage is 0% — zero documentation files exist out of 5 expected. What's missing: app-level , , , plus subfolder-level and at least one additional doc for . The developer should absolutely run — this is a greenfield documentation situation with 0% coverage, and the tool would bootstrap all 5 required files automatically.

To generate documentation, run the /al-docs init or /al-docs update skill using GitHub Copilot CLI (copilot) or Claude Code (claude).

Magnus Hartvig Grønbech and others added 2 commits March 20, 2026 14:47
- Timeout 600s, simplified prompt
- Remove ::group::, remove summary extraction call
- Just use the --share markdown export as the report

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
YES/NO check on the audit export decides whether to post a review.
If yes, a second call generates a clean summary for the review body.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Magnus Hartvig Grønbech and others added 5 commits March 23, 2026 10:08
The review comment body is now built from shell parsing of the
structured audit report (app name, coverage %) instead of asking
Copilot to compose the text. Copilot is still used only for the
YES/NO decision on whether gaps exist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace fragile grep/sed parsing of audit report markdown with a
constrained copilot call that extracts just the coverage number.
The response is further sanitized with grep -oE to ensure only a
number+% makes it into the template. App name comes from the report
filename (set from app.json during the audit step).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds manual trigger support so the workflow can be re-run on any PR
with a skip-dedup flag to bypass the existing review check. Also
resolves PR metadata (head/base SHA) from the API when dispatched
manually since the pull_request event context is not available.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Set the repo variable DOCS_SKIP_DEDUP=true to re-post the docs
review even if one already exists on the PR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

AL Documentation Audit

Documentation gaps were detected in the following apps:

  • Troubleshoot-FA-Ledger-Entries: 50% documentation coverage

To generate documentation, run /al-docs init or /al-docs update using GitHub Copilot CLI or Claude Code.
This review is for awareness to help keep documentation in sync with code changes. It is okay to dismiss this request.

Magnus Hartvig Grønbech and others added 2 commits March 23, 2026 10:21
Rename the skip-dedup variable and change the review event from
REQUEST_CHANGES to COMMENT so it doesn't block the PR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove the paths filter on PullRequestHandler.yaml and revert the
whitespace-only PermissionSet change. Add an XML doc comment to
DataSearchResult.table.al so the docs workflow has an .al change
to trigger on.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

AL Documentation Audit

Documentation gaps were detected in the following apps:

  • Data-Search: 0% documentation coverage

To generate documentation, run /al-docs init or /al-docs update using GitHub Copilot CLI or Claude Code.
This review is for awareness to help keep documentation in sync with code changes. It is okay to dismiss this request.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot removed the AL: Apps (W1) Add-on apps for W1 label Mar 23, 2026
@Groenbech96 Groenbech96 marked this pull request as ready for review March 23, 2026 09:37
@Groenbech96 Groenbech96 requested review from a team as code owners March 23, 2026 09:37
@Groenbech96 Groenbech96 requested review from AleksandricMarko and removed request for AleksandricMarko March 23, 2026 09:37
@github-actions github-actions bot added this to the Version 29.0 milestone Mar 23, 2026
aholstrup1
aholstrup1 previously approved these changes Mar 23, 2026
mynjj
mynjj previously approved these changes Mar 23, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Groenbech96 Groenbech96 dismissed stale reviews from mynjj and aholstrup1 via b5f30f8 March 23, 2026 14:01
@Groenbech96 Groenbech96 enabled auto-merge (squash) March 23, 2026 15:01
@Groenbech96 Groenbech96 merged commit 8596d2b into main Mar 23, 2026
48 checks passed
@Groenbech96 Groenbech96 deleted the docs/documentation-maintenance-action branch March 23, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build: Automation Workflows and other setup in .github folder

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants