Setup Documentation Autogen Pipeline#2348
Draft
GeorgeNgMsft wants to merge 2 commits into
Draft
Conversation
| function normalize(text: string): string { | ||
| let out = stripStalenessFooter(text); | ||
| out = stripHashComment(out); | ||
| out = out.replace(/[ \t]+$/gmu, ""); |
| */ | ||
| export const realGit: GitRunner = (args, cwd) => | ||
| new Promise<GitResult>((resolve, reject) => { | ||
| const child = spawn("git", args, { |
| if (inFence) continue; | ||
| linkRegex.lastIndex = 0; | ||
| let m: RegExpExecArray | null; | ||
| while ((m = linkRegex.exec(raw)) !== null) { |
| const patterns: string[] = []; | ||
| let inPackages = false; | ||
| for (const raw of lines) { | ||
| const line = raw.replace(/#.*$/u, ""); |
| continue; | ||
| } | ||
| if (inPackages) { | ||
| const m = /^\s*-\s*"?([^"\s][^"]*?)"?\s*$/u.exec(line); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated package README regeneration
Adds a daily-cron pipeline that regenerates the
README.mdof every package underts/packages/**whose source has changed since the last successful run, and opens a single batched PR with the updates.What's in this PR
@typeagent/docs-autogen— new tool atts/tools/docsAutogen/that builds each README from a deterministic skeleton (entry points, dependencies, used-by, agent surface, file map) plus an optionalLLM-authored
## Overviewsection viapackages/aiclient. Output is split into a human-readable section and an LLM-friendly Reference section with disk-resolvable file links..github/workflows/docs-generate.yml— runs daily at 08:00 UTC and onworkflow_dispatch. Mirrors the existingfix-dependabot-alerts.ymlpatterns: GitHub-App auth, branchautomated/docs-readmes-<date>-<run_number>, supersedes prior open bot PRs, advances adocs-bot/last-rungit tag only on scheduled successes.ts/docs/architecture/doc-autogen.mdcaptures the full architecture, format rules, idempotency model, and operations playbook.pnpm docs:generate,docs:generate:dry,docs:generate:llm,docs:verify-linksfor local one-off runs.Safety guardrails
tools/scripts/policyChecks/npmPackage.mjsbefore each write — refuses to write if it would break.--max-packagescap (default 25) bounds the per-run blast radius; overflow defers to the next run.to a deterministic placeholder.
Required repository configuration
DOCS_BOT_APP_IDDOCS_BOT_APP_PRIVATE_KEYAZURE_OPENAI_ENDPOINTAZURE_OPENAI_API_KEYThe workflow runs but no-ops at the auth step until these are provisioned, so it cannot modify anything before they're in place.
Verification
prettier --checkclean;repo-policy-checkclean (6510 checks).list-agent: dry-run →unchanged; first real--write→wrote(351 → 2470 bytes, 10 valid links, 0 broken); second--write→footer-only(no churn);--verify-links→0 broken.Follow-ups (not in this PR)
DOCS_BOT_APP_ID+ secrets in repo settings.workflow_dispatchwithdry-run: trueandsince: mainagainst this branch to confirm the full pipeline end-to-end.docs-bot/last-runtag is seeded (see operations notes intools/docsAutogen/README.md).