Skip to content

Add Documentation Maintenance as GitHub Action#7294

Draft
Groenbech96 wants to merge 24 commits intomainfrom
docs/documentation-maintenance-action
Draft

Add Documentation Maintenance as GitHub Action#7294
Groenbech96 wants to merge 24 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

Prerequisites

  • Repository secret COPILOT_PAT — PAT with "Copilot Requests" + repo scope

@github-actions github-actions bot added the Build: Automation Workflows and other setup in .github folder label Mar 20, 2026
@github-actions
Copy link

Could not find a linked ADO work item. Please link one by using the pattern 'AB#' followed by the relevant work item number. You may use the 'Fixes' keyword to automatically resolve the work item when the pull request is merged. E.g. 'Fixes AB#1234'

@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label 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>
on:
pull_request:
branches: [ 'main', 'releases/*', 'features/*' ]
paths: ['THIS_PR_IS_TESTING_DOCS_WORKFLOW_ONLY']
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be removed

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).

- 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>
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.

I’m skimming the generated report structure first, then I’ll condense the documentation gaps into a short PR-ready note.

I found the session log; now I’m extracting just the audit result lines so the final review body names the affected apps and missing docs precisely.

src/Apps/W1/DataArchive/App: 0% documentation coverage; missing app-level CLAUDE.md, docs/data-model.md, and docs/business-logic.md.
Also missing subfolder docs for src/ (scored MUST_DOCUMENT): src/docs/CLAUDE.md plus at least one supplementary doc (data-model.md or business-logic.md).
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 15:00
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Data Archive (src/Apps/W1/DataArchive/App): 0%, missing CLAUDE.md, docs/data-model.md, docs/business-logic.md, docs/extensibility.md, src/docs/CLAUDE.md, src/docs/{data-model|business-logic|extensibility|patterns}.md.
Data Search (src/Apps/W1/DataSearch/App): 0%, missing CLAUDE.md, docs/data-model.md, docs/business-logic.md, docs/extensibility.md, docs/patterns.md.
To generate documentation, run the /al-docs init or /al-docs update skill using GitHub Copilot CLI or Claude Code.

…ew prompt

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:

I reviewed the changed apps and found:

Troubleshoot FA Ledger Entries (src/Apps/W1/DataCorrectionFA/App): 0% documentation coverage

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

Magnus Hartvig Grønbech and others added 2 commits March 20, 2026 15:23
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:

I reviewed the changed apps and found:

Troubleshoot FA Ledger Entries (src/Apps/W1/DataCorrectionFA/App): 50% documentation coverage

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

Magnus Hartvig Grønbech and others added 4 commits March 20, 2026 15:41
Checks for existing review starting with "AL Documentation Audit"
before posting a new one.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Saves runner time and copilot API calls on repeated pushes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Groenbech96 Groenbech96 changed the title feat: add Documentation Maintenance GitHub Action Add Documentation Maintenance as GitHub Action Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Build: Automation Workflows and other setup in .github folder

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants